Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
87 lines
3.8 KiB
TypeScript
87 lines
3.8 KiB
TypeScript
// Module ID: 10411
|
|
// Function ID: 10412
|
|
// Name: GIFPickerItemView
|
|
// Dependencies: [19, 17, 21, 4574, 10401, 576, 1874, 4541, 10412, 1896, 1114, 5137, 5601, 2]
|
|
// Exports: default
|
|
|
|
// Module 10411 (GIFPickerItemView)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import util from "util" /* 1114 */;
|
|
import KeyboardManagerUtils from "KeyboardManagerUtils" /* 1874 */;
|
|
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
|
|
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4541 */;
|
|
import gif_picker_GIFPickerUtils from "gif_picker/GIFPickerUtils" /* 10401 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const View = fn(17).View;
|
|
const jsx = fn(21).jsx;
|
|
const createStyles = fn(4574);
|
|
let closure_6 = createStyles.createStyles((height) => {
|
|
const obj = { container: null, gifImage: null, gifImageSelected: null };
|
|
const size = { paddingBottom: gif_picker_GIFPickerUtils.GIF_PICKER_GUTTER_SPACING, paddingHorizontal: gif_picker_GIFPickerUtils.GIF_PICKER_GUTTER_SPACING / 2, borderRadius: nativeDefault.radii.xs, width: "100%", height, flex: 1 };
|
|
obj.container = size;
|
|
obj.gifImage = { backgroundColor: nativeDefault.colors.BORDER_SUBTLE, borderRadius: nativeDefault.radii.xs, flex: 1 };
|
|
const obj2 = { backgroundColor: nativeDefault.colors.BORDER_SUBTLE, borderRadius: nativeDefault.radii.xs, flex: 1 };
|
|
obj.gifImageSelected = { borderWidth: 2, borderColor: nativeDefault.colors.BACKGROUND_BRAND };
|
|
return obj;
|
|
});
|
|
let size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/gif_picker/native/GIFPickerItemView.tsx");
|
|
|
|
export default function GIFPickerItemView(onPressGIF) {
|
|
onPressGIF = onPressGIF.onPressGIF;
|
|
const item = onPressGIF.item;
|
|
const index = onPressGIF.index;
|
|
const selected = onPressGIF.selected;
|
|
const tmp = closure_6(onPressGIF.height);
|
|
const items = [item, index, onPressGIF];
|
|
const items1 = [item];
|
|
const callback = noop.useCallback(() => {
|
|
onPressGIF(item, index);
|
|
const result = KeyboardManagerUtils.dismissGlobalKeyboard();
|
|
}, items);
|
|
const items2 = [index, item.src];
|
|
const callback1 = noop.useCallback(() => {
|
|
ActionSheetActionCreatorsDefault.openLazy(asyncRequireImpl(10412, dependencyMap.paths), "GIFPickerItemActionSheet", { item }, "stack");
|
|
const obj2 = { item };
|
|
const result = KeyboardManagerUtils.dismissGlobalKeyboard();
|
|
}, items1);
|
|
const memo = noop.useMemo(() => {
|
|
const parts = item.src.split("/");
|
|
const str2 = parts.pop();
|
|
let first;
|
|
if (str2 != null) {
|
|
first = str2.split(".")[0];
|
|
}
|
|
if (null == first) {
|
|
const intl = util.intl;
|
|
const obj = { index: index + 1 };
|
|
first = intl.formatToPlainString(util.t["5iIGZI"], obj);
|
|
}
|
|
return first;
|
|
}, items2);
|
|
let obj = { style: tmp.container, accessibilityRole: "button", accessibilityLabel: memo, accessibilityState: null, onPress: null, onLongPress: null, children: null };
|
|
let tmp7;
|
|
if (null != selected) {
|
|
let obj2 = { selected };
|
|
tmp7 = obj2;
|
|
}
|
|
obj.accessibilityState = tmp7;
|
|
obj.onPress = callback;
|
|
obj.onLongPress = callback1;
|
|
if (true === selected) {
|
|
const items3 = [, ];
|
|
({ gifImage: arr4[0], gifImageSelected: arr4[1] } = tmp);
|
|
let gifImage = items3;
|
|
} else {
|
|
gifImage = tmp.gifImage;
|
|
}
|
|
obj.children = jsx(item(index[12]), { style: gifImage, source: { uri: item.src } });
|
|
return jsx(onPressGIF(index[11]).PressableOpacity, { style: tmp.container, accessibilityRole: "button", accessibilityLabel: memo, accessibilityState: null, onPress: null, onLongPress: null, children: null });
|
|
};
|
|
export const GIFPickerItemPlaceholder = noop.memo((height) => {
|
|
const tmp = closure_6(height.height);
|
|
const obj = { style: tmp.container, children: <View style={tmp.gifImage} /> };
|
|
return <View style={tmp.container}><View style={tmp.gifImage} /></View>;
|
|
});
|