76 lines
3.9 KiB
TypeScript
76 lines
3.9 KiB
TypeScript
/* Metro module 6994; source: design/components/TextField/native/BaseTextField.native.tsx; dependencies: [31, 33, 477, 1357, 6992, 3865, 6995, 3864, 2] */
|
|
function _fun55416(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7172:6, offset: 0x013a699b, size: 156 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const value2 = require(33) /* metro dependency 33 */;
|
|
const env0_3 = value2.jsx;
|
|
const env0_4 = value2.jsxs;
|
|
value = value.forwardRef(_fun55417);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/TextField/native/BaseTextField.native.tsx');
|
|
exports.BaseTextField = value;
|
|
}
|
|
|
|
function _fun55417(a0, a1) { // fn#55417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7172:153, offset: 0x013a6a37, size: 561 bytes, params: 3, frame: 24
|
|
var r14;
|
|
var secureTextEntry;
|
|
var keyboardType;
|
|
var r2;
|
|
var r10;
|
|
var autoComplete;
|
|
var isAndroid2;
|
|
var isAndroid3;
|
|
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('InputFieldContainer');
|
|
const inputFieldContainerNativeModule = require(6992) /* metro dependency 6992: InputFieldContainerNative */;
|
|
const useInputStyles = inputFieldContainerNativeModule.useInputStyles;
|
|
let object2 = {};
|
|
object2.size = a0.size;
|
|
object2.isRound = a0.isRound;
|
|
const leadingIcon = a0.leadingIcon;
|
|
const value3 = null;
|
|
object2.hasLeadingIcon = value3 != leadingIcon;
|
|
object2.isRefreshEnabled = value2;
|
|
const value4 = Reflect.apply(useInputStyles, inputFieldContainerNativeModule, [object2]);
|
|
const {focusProps, isFocused} = (require(3865) /* metro dependency 3865: useFocusNative */).useFocus();
|
|
if (a0.enableAndroidSanitizedInputWorkaround) {
|
|
secureTextEntry = a0.secureTextEntry;
|
|
keyboardType = a0.keyboardType;
|
|
autoComplete = a0.autoComplete;
|
|
secureTextEntry = !(secureTextEntry === undefined) && secureTextEntry;
|
|
keyboardType = keyboardType === undefined ? 'default' : keyboardType;
|
|
object2 = {};
|
|
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
|
r2 = isAndroid2 ? 'off' : autoComplete;
|
|
object2.autoComplete = r2;
|
|
isAndroid3 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
|
r2 = isAndroid3 ? !!isAndroid3 : secureTextEntry;
|
|
object2.secureTextEntry = r2;
|
|
r2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'visible-password' : keyboardType;
|
|
object2.keyboardType = r2;
|
|
r10 = object2;
|
|
r14 = isAndroid2;
|
|
} else {
|
|
r10 = value3;
|
|
}
|
|
const InputFieldContainer = inputFieldContainerNativeModule.InputFieldContainer;
|
|
const inputFieldContainerProps = {...a0};
|
|
inputFieldContainerProps['isFocused'] = isFocused;
|
|
const leading = a0.leading;
|
|
const NativeTextInput = (require(6995) /* metro dependency 6995: NativeTextInputNative */).NativeTextInput;
|
|
const nativeTextInputProps = {...r10};
|
|
const value = require(3864) /* metro dependency 3864: mergePropsNative */;
|
|
copyDataProperties(nativeTextInputProps, value.mergeProps(a0, focusProps), r14);
|
|
nativeTextInputProps['ref'] = a1;
|
|
nativeTextInputProps['style'] = [value4.padding, value4.text, a0.inputStyle];
|
|
nativeTextInputProps['placeholderTextColor'] = value4.placeholderText.color;
|
|
return (
|
|
<InputFieldContainer {...inputFieldContainerProps}>
|
|
{leading}
|
|
<NativeTextInput {...nativeTextInputProps} />
|
|
{a0.trailing}
|
|
</InputFieldContainer>
|
|
);
|
|
}
|
|
|