Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,309 @@
|
||||
/* Metro module 9066; source: components_native/DatePickerActionSheet.tsx; dependencies: [57, 31, 27, 482, 33, 4501, 697, 6597, 4080, 477, 6758, 6806, 9067, 1244, 4570, 4017, 1305, 4504, 4573, 4579, 4048, 8994, 3738, 6275, 9068, 4002, 2] */
|
||||
function _fun70841(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:6, offset: 0x01d0a451, size: 523 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = value.createStyles;
|
||||
const object2 = {'backgroundColor': null, 'padding': 12, 'marginHorizontal': 12};
|
||||
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object2.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{rangeErrorContainer: {justifyContent: 'flex-start'},
|
||||
rangeError: object2, datetimePickerContainer: {'display': 'flex', 'alignItems': 'center'}}]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
const object5 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
copyDataProperties(object5, textStyles(DISPLAY_SEMIBOLD, TEXT_DEFAULT, 16), undefined);
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{footer: {'marginVertical': 6, 'paddingHorizontal': 12,
|
||||
'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-end'}, actionButtonText: object5,
|
||||
actionButton: {marginLeft: 24}}]);
|
||||
object = {code: 'function DatePickerActionSheetTsx1(){const{STANDARD_EASING,show,withTiming}=this.__closure;const animationSettings={easing:STANDARD_EASING,duration:show?200:150};return{opacity:withTiming(show?1:0,animationSettings),maxHeight:withTiming(show?500:0,animationSettings),paddingVertical:withTiming(show?12:0,animationSettings)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/DatePickerActionSheet.tsx');
|
||||
exports.default = DatePickerActionSheet;
|
||||
}
|
||||
|
||||
function closeActionSheet() { // fn#70842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:689, offset: 0x01d0a65c, size: 37 bytes, params: 1, frame: 11
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function ActionSheetHeader({title, handleCancel, handleSubmit}) { // fn#70843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:743, offset: 0x01d0a681, size: 332 bytes, params: 2, frame: 27
|
||||
var bottomSheetTitleHeader;
|
||||
var object;
|
||||
const ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object3;
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
if (isAndroid2) {
|
||||
bottomSheetTitleHeader = <BottomSheetTitleHeader title={title} trailing={((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={handleCancel} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)} />;
|
||||
} else {
|
||||
bottomSheetTitleHeader = <BottomSheetTitleHeader title={title} leading={<ActionSheetHeaderPressableText onPress={handleCancel} label={intl.string(t['ETE/oC'])} />} trailing={<ActionSheetHeaderPressableText onPress={handleSubmit} label={intl.string(t['R3BPH+'])} />} />;
|
||||
}
|
||||
return bottomSheetTitleHeader;
|
||||
}
|
||||
|
||||
function DateRangeError({show, errorText}) { // fn#70844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1550, offset: 0x01d0a7cd, size: 390 bytes, params: 2, frame: 23
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_4.useRef(null);
|
||||
env0_4.useEffect(_fun70845, [show]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = DateRangeErrorS;
|
||||
object2 = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.STANDARD_EASING = STANDARD_EASING;
|
||||
object2.show = show;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 11991491746736;
|
||||
closure.__initData = env0_10;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.rangeErrorContainer, value3];
|
||||
const r4 = show ? 'auto' : 'no-hide-descendants';
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View2
|
||||
style={items2}
|
||||
accessibilityElementsHidden={!show}
|
||||
importantForAccessibility={r4}
|
||||
>
|
||||
<View
|
||||
ref={value2}
|
||||
accessible
|
||||
accessibilityRole="alert"
|
||||
style={styles.rangeError}
|
||||
>
|
||||
<Text variant="text-md/medium" color="always-white">
|
||||
{errorText}
|
||||
</Text>
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function ActionSheetFooter({handleCancel, handleSubmit, canSubmit}) { // fn#70847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:2392, offset: 0x01d0aa58, size: 524 bytes, params: 2, frame: 33
|
||||
var r0;
|
||||
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
|
||||
var object;
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
var actionButtonText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var actionButton;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
|
||||
var viewBindingProps = {style: styles.footer};
|
||||
object = {'shrink': true, 'size': 'md', 'variant': 'secondary'};
|
||||
actionButtonText = styles.actionButtonText;
|
||||
string = intl.string;
|
||||
object.textElement = <LegacyText style={actionButtonText}>{Reflect.apply(string, intl,
|
||||
[t['ETE/oC']])}</LegacyText>;
|
||||
object.accessibilityLabel = intl.string(t['ETE/oC']);
|
||||
actionButton = styles.actionButton;
|
||||
object.style = actionButton;
|
||||
object.onPress = handleCancel;
|
||||
items2 = [<BaseTextButton {...object} />];
|
||||
var baseTextButtonProps = {'shrink': true, 'disabled': null, 'size': 'md', 'variant': 'secondary',
|
||||
disabled: !canSubmit};
|
||||
actionButtonText = styles.actionButtonText;
|
||||
string = intl.string;
|
||||
baseTextButtonProps.textElement = <LegacyText style={actionButtonText}>{Reflect.apply(string, intl,
|
||||
[t['cY+Oob']])}</LegacyText>;
|
||||
baseTextButtonProps.accessibilityLabel = intl.string(t['cY+Oob']);
|
||||
actionButton = styles.actionButton;
|
||||
baseTextButtonProps.style = actionButton;
|
||||
baseTextButtonProps.onPress = handleSubmit;
|
||||
items2[1] = <BaseTextButton {...baseTextButtonProps} />;
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function DatePickerActionSheet({mode, title, startDate, maximumDate, minimumDate, onSubmit, onCancel, requireDateChanged}) { // fn#70848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3109, offset: 0x01d0ac64, size: 1185 bytes, params: 2, frame: 42
|
||||
var r8;
|
||||
var r17;
|
||||
var r16;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var date;
|
||||
mode = mode === undefined ? 'date' : mode;
|
||||
let r11 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.epc9sr);
|
||||
const env0_3 = onCancel;
|
||||
const closure = isAboveMin;
|
||||
const closure2 = isBelowMax;
|
||||
const styles = useStyles();
|
||||
if (startDate != null) {
|
||||
r8 = startDate;
|
||||
} else {
|
||||
date = new global.Date();
|
||||
}
|
||||
const env0_4 = r8;
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value8 = Reflect.apply(useState, binding, [r8]);
|
||||
binding = env0_3;
|
||||
const value9 = binding(value8, 2);
|
||||
const property = value9[0];
|
||||
const env0_6 = value9[1];
|
||||
const binding2 = env0_4;
|
||||
useState = binding2.useState;
|
||||
const value10 = binding(Reflect.apply(useState, binding2, [!requireDateChanged]), 2);
|
||||
const property2 = value10[0];
|
||||
const env0_8 = value10[1];
|
||||
const binding3 = env0_4;
|
||||
useState = binding3.useState;
|
||||
const value11 = binding(Reflect.apply(useState, binding3, [true]), 2);
|
||||
const env0_9 = value11[0];
|
||||
const env0_10 = value11[1];
|
||||
const binding4 = env0_4;
|
||||
useState = binding4.useState;
|
||||
const value12 = binding(Reflect.apply(useState, binding4, [false]), 2);
|
||||
const property3 = value12[0];
|
||||
const env0_11 = value12[1];
|
||||
const value13 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const env0_12 = env0_4.useRef(property);
|
||||
if (maximumDate != null) {
|
||||
date = new global.Date(maximumDate.getFullYear() + 1, 0, 1, 0, -1);
|
||||
} else {
|
||||
r17 = undefined;
|
||||
}
|
||||
if (minimumDate != null) {
|
||||
date = new global.Date(minimumDate.getFullYear(), 0, 1, 0);
|
||||
} else {
|
||||
r16 = undefined;
|
||||
}
|
||||
env0_4.useEffect(_fun70851, [property]);
|
||||
const value20 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(_fun70852);
|
||||
const value21 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(_fun70853);
|
||||
const value22 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(_fun70854);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {onDismiss: onCancel,
|
||||
header: <ActionSheetHeader title={r11} handleCancel={value20} handleSubmit={value21} />};
|
||||
r11 = property3 && !closure(property);
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
const FsJO55 = (require(1244) /* metro dependency 1244: indexNative */).t.FsJO55;
|
||||
const object = {};
|
||||
object.minDate = (importDefault(3738) /* metro dependency 3738 */)(minimumDate).format('L');
|
||||
const items2 = [<DateRangeError show={r11} errorText={Reflect.apply(formatToPlainString, intl, [FsJO55,
|
||||
object])} />];
|
||||
const r14 = property3 && !closure2(property);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const R7r9VN = (require(1244) /* metro dependency 1244: indexNative */).t.R7r9VN;
|
||||
const object2 = {};
|
||||
object2.maxDate = (importDefault(3738) /* metro dependency 3738 */)(maximumDate).format('L');
|
||||
items2[1] = <DateRangeError show={r14} errorText={Reflect.apply(formatToPlainString, intl, [R7r9VN, object2])} />;
|
||||
items2[2] = <View style={styles.datetimePickerContainer}>{((Component) => <Component theme={(require(4002) /* metro dependency 4002: shared */).isThemeLight(value13) ? 'light' : 'dark'} date={property} onDateChange={value22} maximumDate={r17} minimumDate={r16} mode={mode} />)(importDefault(9068) /* metro dependency 9068 */)}</View>;
|
||||
items2[3] = <ActionSheetFooter handleCancel={value20} handleSubmit={value21} canSubmit={property2} />;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
{items2}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun70845() { // fn#70845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1636, offset: 0x01d0a953, size: 59 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: env0_1,
|
||||
delay: 200});
|
||||
}
|
||||
|
||||
function DateRangeErrorS() { // fn#70846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1736, owner: DateRangeError.S, offset: 0x01d0a98e, size: 202 bytes, params: 1, frame: 20
|
||||
const object3 = {};
|
||||
let value = environment.__proto__;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object3.easing = STANDARD_EASING;
|
||||
object3.duration = show ? 200 : 150;
|
||||
const object4 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
showBinding = show;
|
||||
const value5 = 0;
|
||||
object4.opacity = Reflect.apply(withTiming, timingModule, [showBinding ? 1 : value5, object3]);
|
||||
const moduleValue2 = timingModule;
|
||||
object4.maxHeight = moduleValue2.withTiming(show ? 500 : value5, object3);
|
||||
value = timingModule;
|
||||
object4.paddingVertical = value.withTiming(show ? 12 : value5, object3);
|
||||
return object4;
|
||||
}
|
||||
|
||||
function isAboveMin(a0) { // fn#70849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3608, owner: DatePickerActionSheet.isAboveMin, offset: 0x01d0b105, size: 49 bytes, params: 2, frame: 11
|
||||
var r0;
|
||||
var time;
|
||||
const value2 = minimumDate == null;
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
time = a0.getTime();
|
||||
minimumDateBinding = minimumDate;
|
||||
r0 = time >= minimumDateBinding.getTime();
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function isBelowMax(a0) { // fn#70850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3672, owner: DatePickerActionSheet.isBelowMax, offset: 0x01d0b136, size: 49 bytes, params: 2, frame: 11
|
||||
var r0;
|
||||
var time;
|
||||
const value2 = maximumDate == null;
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
time = a0.getTime();
|
||||
maximumDateBinding = maximumDate;
|
||||
r0 = time <= maximumDateBinding.getTime();
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun70852() { // fn#70852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3789, offset: 0x01d0b17c, size: 52 bytes, params: 1, frame: 10
|
||||
env0_12.current = env0_4;
|
||||
if (onCancel != null) {
|
||||
onCancel();
|
||||
}
|
||||
closeActionSheet();
|
||||
}
|
||||
|
||||
function _fun70853() { // fn#70853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3853, offset: 0x01d0b1b0, size: 104 bytes, params: 1, frame: 14
|
||||
var onSubmitBinding;
|
||||
var value2;
|
||||
if (env0_7 && env0_9) {
|
||||
onSubmitBinding = onSubmit;
|
||||
value2 = environment.__proto__;
|
||||
onSubmitBinding((importDefault(3738) /* metro dependency 3738 */)(env0_12.current));
|
||||
}
|
||||
if (env0_9) {
|
||||
value = environment.__proto__;
|
||||
closeActionSheet();
|
||||
} else {
|
||||
env0_11(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun70854(a0) { // fn#70854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3937, offset: 0x01d0b218, size: 103 bytes, params: 2, frame: 14
|
||||
if (a0 != null) {
|
||||
if (!(minimumDate == null && maximumDate == null)) {
|
||||
env0_10(isAboveMin(a0) && isBelowMax(a0));
|
||||
}
|
||||
env0_11(false);
|
||||
env0_8(true);
|
||||
env0_6(a0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user