136 lines
6.4 KiB
JavaScript
136 lines
6.4 KiB
JavaScript
// Module ID: 9228
|
|
// Function ID: 72187
|
|
// Name: CountryCodeSelector
|
|
// Dependencies: []
|
|
|
|
// Module 9228 (CountryCodeSelector)
|
|
function CountryCodeSelector(alpha2) {
|
|
let countryCode;
|
|
let onPress;
|
|
let show;
|
|
alpha2 = alpha2.alpha2;
|
|
({ show, countryCode, onPress } = alpha2);
|
|
const tmp = callback3();
|
|
let str = "";
|
|
if (null != alpha2) {
|
|
str = alpha2;
|
|
}
|
|
const combined = "" + str + " " + countryCode;
|
|
let tmp3 = null;
|
|
if (show) {
|
|
let obj = { style: tmp.selectorOuterContainer };
|
|
obj = { style: tmp.selectorContainer };
|
|
obj = { onPress, style: tmp.selectorPressable };
|
|
const obj1 = { borderless: true };
|
|
obj.androidRippleConfig = obj1;
|
|
obj.accessibilityRole = "button";
|
|
obj.accessibilityLabel = combined;
|
|
const intl = arg1(dependencyMap[6]).intl;
|
|
obj.accessibilityHint = intl.string(arg1(dependencyMap[6]).t.GwAW3k);
|
|
const obj2 = { Promise: -246006407672989600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, marginTop: 0.0000000000000000000000000000000000000000000000000000000000000000000741841232901058, flags: 0.158, style: tmp.selectorText, children: combined };
|
|
obj.children = callback(arg1(dependencyMap[7]).Text, obj2);
|
|
const items = [callback(arg1(dependencyMap[5]).PressableOpacity, obj), ];
|
|
const obj3 = { style: tmp.separator };
|
|
items[1] = callback(View, obj3);
|
|
obj.children = items;
|
|
obj.children = callback2(View, obj);
|
|
tmp3 = callback(View, obj);
|
|
}
|
|
return tmp3;
|
|
}
|
|
const importAllResult = importAll(dependencyMap[0]);
|
|
const View = arg1(dependencyMap[1]).View;
|
|
({ jsx: closure_5, jsxs: closure_6 } = arg1(dependencyMap[2]));
|
|
const tmp2 = arg1(dependencyMap[2]);
|
|
let obj = { label: { marginBottom: 8 }, input: {}, error: { marginBottom: 8 }, hint: { marginBottom: 8 }, selectorOuterContainer: { overflow: "hidden" }, selectorContainer: { "Bool(false)": "<string:1783693314>", "Bool(false)": "<string:618889>" }, selectorPressable: { justifyContent: "center" }, selectorText: { alignSelf: "center" } };
|
|
obj = { "Bool(false)": true, "Bool(false)": true, "Bool(false)": true, "Bool(false)": true, borderLeftColor: importDefault(dependencyMap[4]).colors.INTERACTIVE_BACKGROUND_SELECTED };
|
|
obj.separator = obj;
|
|
let closure_7 = arg1(dependencyMap[3]).createStyles(obj);
|
|
const obj2 = arg1(dependencyMap[3]);
|
|
const forwardRefResult = importAllResult.forwardRef((arg0, arg1) => {
|
|
let countryCode;
|
|
let error;
|
|
let forceMode;
|
|
let hint;
|
|
let label;
|
|
let style;
|
|
let textInputStyle;
|
|
let value;
|
|
({ label, error, value, hint, onChangeText: closure_0, alpha2: closure_1, countryCode } = arg0);
|
|
const dependencyMap = countryCode;
|
|
({ onPressCountrySelector: closure_3, forceMode } = arg0);
|
|
const View = forceMode;
|
|
let obj = { <string:1657310883>: -2376370495520816400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, <string:1901189074>: 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000953240533, <string:3846853176>: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042439915824, <string:979695803>: "asmile.png", <string:592882268>: "png", -1632332980: "image_0", 1396216620: 1, -279797017: null, 1404468722: 0, -1791194950: 0, 1550094482: 901 };
|
|
({ style, textInputStyle } = arg0);
|
|
Object.setPrototypeOf(null);
|
|
const merged = Object.assign(arg0, obj);
|
|
function handleChangeText(value) {
|
|
let str = "";
|
|
if (obj.shouldShowCountryCodeSelector(forceMode, value)) {
|
|
str = countryCode;
|
|
}
|
|
if (null != callback) {
|
|
callback(value, str);
|
|
}
|
|
}
|
|
const tmp3 = callback3();
|
|
let obj1 = arg1(dependencyMap[8]);
|
|
const callback = obj1.shouldShowCountryCodeSelector(forceMode, value);
|
|
obj = { handleChangeText, value };
|
|
const callback3 = importAllResult.useRef(obj);
|
|
const effect = importAllResult.useEffect(() => {
|
|
closure_7.current = obj;
|
|
});
|
|
const items = [countryCode];
|
|
const effect1 = importAllResult.useEffect(() => {
|
|
ref.current.handleChangeText(ref.current.value);
|
|
}, items);
|
|
obj = { style };
|
|
let tmp8 = null;
|
|
if (null != label) {
|
|
obj1 = { style: tmp3.label, children: label };
|
|
tmp8 = callback(importDefault(dependencyMap[9]), obj1);
|
|
}
|
|
const items1 = [tmp8, , , ];
|
|
const obj2 = {};
|
|
const merged1 = Object.assign(merged);
|
|
obj2["renderLeadingComponent"] = function renderLeadingComponent() {
|
|
return callback2(closure_8, { show: callback2, alpha2: closure_1, countryCode, onPress: closure_3 });
|
|
};
|
|
obj2["error"] = null != error;
|
|
obj2["ref"] = arg1;
|
|
obj2["value"] = value;
|
|
const items2 = [tmp3.input, textInputStyle];
|
|
obj2["style"] = items2;
|
|
obj2["onChangeText"] = handleChangeText;
|
|
let str = "emailAddress";
|
|
if (forceMode === arg1(dependencyMap[8]).PhoneOrEmailSelectorForceMode.PHONE) {
|
|
str = "telephoneNumber";
|
|
}
|
|
obj2["textContentType"] = str;
|
|
let str2 = "email-address";
|
|
if (forceMode === arg1(dependencyMap[8]).PhoneOrEmailSelectorForceMode.PHONE) {
|
|
str2 = "phone-pad";
|
|
}
|
|
obj2["keyboardType"] = str2;
|
|
obj2["accessibilityLabel"] = label;
|
|
obj2["accessibilityHint"] = hint;
|
|
items1[1] = callback(importDefault(dependencyMap[10]), obj2);
|
|
let tmp15 = null;
|
|
if (null != error) {
|
|
const obj3 = { style: tmp3.error, children: error };
|
|
tmp15 = callback(importDefault(dependencyMap[11]), obj3);
|
|
}
|
|
items1[2] = tmp15;
|
|
let tmp19 = null;
|
|
if (null != hint) {
|
|
const obj4 = { Promise: "ur", marginTop: "SECTION_INDEX_FIRST_NAMED_CATEGORY", flags: "ur", style: tmp3.hint, children: hint };
|
|
tmp19 = callback(arg1(dependencyMap[7]).Text, obj4);
|
|
}
|
|
items1[3] = tmp19;
|
|
obj.children = items1;
|
|
return obj(View, obj);
|
|
});
|
|
const result = arg1(dependencyMap[12]).fileFinishedImporting("modules/phone/native/FormPhoneOrEmail.tsx");
|
|
|
|
export default forwardRefResult;
|