138 lines
8.6 KiB
TypeScript
138 lines
8.6 KiB
TypeScript
/* Metro module 8992; source: modules/phone/native/PhoneOrEmailInput.tsx; dependencies: [57, 31, 33, 8993, 8994, 1244, 8996, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import UseStableCallback from '../../../hooks/useStableCallback.tsx'; /* Metro dependency 8994 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as PhoneOrEmailUtilsModule from '../PhoneOrEmailUtils.tsx'; /* Metro dependency 8993 */
|
|
import * as SplitTextInputNativeModule from '../../../design/components/SplitTextInput/native/SplitTextInput.native.tsx'; /* Metro dependency 8996 */
|
|
|
|
function _fun70028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:6, offset: 0x01cebb2a, size: 169 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
value = value.forwardRef(_fun70029);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/phone/native/PhoneOrEmailInput.tsx');
|
|
exports.default = value;
|
|
function _fun70029(a0, a1) { // fn#70029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:146, offset: 0x01cebbd3, size: 475 bytes, params: 3, frame: 28
|
|
const onChange = a0.onChange;
|
|
const alpha2 = a0.alpha2;
|
|
const countryCode = a0.countryCode;
|
|
const onPressCountrySelector = a0.onPressCountrySelector;
|
|
const forceMode = a0.forceMode;
|
|
const forceMode2 = forceMode;
|
|
const object = {'onChange': 0, 'alpha2': 0, 'countryCode': 0, 'onPressCountrySelector': 0, 'forceMode': 0};
|
|
silentSetPrototypeOf(object, null, undefined);
|
|
const value = copyDataProperties({}, a0, object, undefined);
|
|
const value2 = undefined;
|
|
const binding = env0_4;
|
|
const value4 = '';
|
|
var [property, env0_4] = forceMode2(binding.useState(value4), 2);
|
|
const value7 = binding.useRef(null);
|
|
binding.useImperativeHandle(a1, function() {
|
|
return {blur: _fun70031, focus: _fun70032, isFocused: _fun70033, setText: _fun70034, getText: _fun70035,
|
|
measure: _fun70036, measureInWindow: _fun70037, measureLayout: _fun70038};
|
|
}, []);
|
|
const shouldShowCountryCodeSelector2 = (PhoneOrEmailUtilsModule).shouldShowCountryCodeSelector(forceMode,
|
|
property);
|
|
const value8 = binding.useCallback(_fun70039, [countryCode, forceMode, onChange]);
|
|
binding.useEffect(_fun70040, [countryCode,
|
|
(UseStableCallback)(value8)]);
|
|
const r6 = shouldShowCountryCodeSelector2 ? value4 + (alpha2 ?? value4) + ' ' + countryCode : value2;
|
|
const value11 = env0_4.useMemo(_fun70041, [r6, onPressCountrySelector]);
|
|
const SplitTextInput = (SplitTextInputNativeModule).SplitTextInput;
|
|
return (
|
|
<SplitTextInput
|
|
{...value}
|
|
{...{['ref']: value7}}
|
|
{...{['onChange']: value8}}
|
|
{...{['leadingText']: r6}}
|
|
{...{['leadingPressableProps']: value11}}
|
|
/>
|
|
);
|
|
function _fun70030() { // fn#70030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:322, offset: 0x01cebdae, size: 102 bytes, params: 1, frame: 3
|
|
return {blur: blur_70031, focus: focus_70032, isFocused: isFocused_70033, setText: setText_70034,
|
|
getText: getText_70035, measure: measure_70036, measureInWindow: measureInWindow_70037,
|
|
measureLayout: measureLayout_70038};
|
|
function blur_70031() { // fn#70031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:333, offset: 0x01cebe14, size: 35 bytes, params: 1, frame: 10
|
|
const value = environment.__proto__;
|
|
return env1_5.current?.blur();
|
|
}
|
|
|
|
function focus_70032() { // fn#70032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:394, offset: 0x01cebe37, size: 35 bytes, params: 1, frame: 10
|
|
const value = environment.__proto__;
|
|
return env1_5.current?.focus();
|
|
}
|
|
|
|
function isFocused_70033() { // fn#70033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:460, offset: 0x01cebe5a, size: 45 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
const isFocused = env1_5.current?.isFocused();
|
|
return isFocused != null && isFocused;
|
|
}
|
|
|
|
function setText_70034(a0) { // fn#70034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:543, offset: 0x01cebe87, size: 45 bytes, params: 2, frame: 12
|
|
env1_4(a0);
|
|
const current = env1_5.current;
|
|
if (current != null) {
|
|
current.setText(a0);
|
|
}
|
|
}
|
|
|
|
function getText_70035() { // fn#70035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:601, offset: 0x01cebeb4, size: 49 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return env1_5.current?.getText() ?? '';
|
|
}
|
|
|
|
function measure_70036(a0) { // fn#70036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:684, offset: 0x01cebee5, size: 39 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
return env1_5.current?.measure(a0);
|
|
}
|
|
|
|
function measureInWindow_70037(a0) { // fn#70037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:758, offset: 0x01cebf0c, size: 39 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
return env1_5.current?.measureInWindow(a0);
|
|
}
|
|
|
|
function measureLayout_70038(a0, a1, a2) { // fn#70038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:838, offset: 0x01cebf33, size: 47 bytes, params: 4, frame: 16
|
|
const value = environment.__proto__;
|
|
return env1_5.current?.measureLayout(a0, a1, a2);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun70039(a0) { // fn#70039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:985, offset: 0x01cebf62, size: 89 bytes, params: 2, frame: 15
|
|
env0_4(a0);
|
|
if (onChange != null) {
|
|
onChange(a0, PhoneOrEmailUtilsModule.shouldShowCountryCodeSelector(forceMode, a0) ? countryCode : '');
|
|
}
|
|
}
|
|
|
|
function _fun70040() { // fn#70040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:1101, offset: 0x01cebfbb, size: 60 bytes, params: 1, frame: 14
|
|
const binding = env0_6;
|
|
const current = JsxRuntimeModule.jsx.current;
|
|
const value = undefined;
|
|
binding((current == null ? value : current.getText()) ?? '');
|
|
return value;
|
|
}
|
|
|
|
function _fun70041() { // fn#70041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9177:1231, offset: 0x01cebff7, size: 113 bytes, params: 1, frame: 15
|
|
const object = {};
|
|
object.onPress = onPressCountrySelector;
|
|
object.accessibilityRole = 'button';
|
|
object.accessibilityLabel = env0_7 ?? '';
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const GwAW3k = (IndexNativeModule).t.GwAW3k;
|
|
object.accessibilityHint = Reflect.apply(string, intl, [GwAW3k]);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun70028, 8992, [57, 31, 33, 8993, 8994, 1244, 8996,
|
|
2]) /* metro module 8992, dependencies: [57, 31, 33, 8993, 8994, 1244, 8996, 2] */;
|