decord/source/design/components/Sheet/native/ActionSheetPresenter.native.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

82 lines
3.6 KiB
TypeScript

// Module ID: 14209
// Function ID: 14210
// Name: ActionSheetPresenter
// Dependencies: [32, 19, 17, 4295, 1074, 21, 8838, 1250, 4572, 5022, 7204, 5008, 504, 12493, 4956, 2]
// Exports: ActionSheetPresenter
// Module 14209 (ActionSheetPresenter)
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4572 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import ActionSheetStore from "ActionSheetStore" /* 4295 */;
const require = fn;
const StyleSheet = fn(17).StyleSheet;
const NOOP = fn(1074).NOOP;
const jsx = fn(21).jsx;
let closure_9 = noop.forwardRef((sheetKey, ref) => {
sheetKey = sheetKey.sheetKey;
transitionState = undefined;
dependencyMap = undefined;
let registerDismissHandler;
let callback2;
({ content, impressionName, impressionProperties, zIndex } = sheetKey);
[transitionState, dependencyMap] = registerDismissHandler.useState("visible");
_slicedToArray = registerDismissHandler.useRef(callback2);
registerDismissHandler = registerDismissHandler.useCallback((current) => {
closure_3.current = current;
}, []);
registerDismissHandler.useRef(callback2);
const callback1 = registerDismissHandler.useCallback(() => {
ref2.current();
}, []);
const obj = { type: sheetKey(1250).ImpressionTypes.HALFSHEET, name: impressionName, properties: impressionProperties };
transitionState(8838)(obj);
const imperativeHandle = registerDismissHandler.useImperativeHandle(ref, () => ({
componentDidEnter() {
closure_1_2("visible");
},
componentWillLeave(current) {
closure_1_2("exiting");
ref2.current = current;
},
componentDidLeave() {
closure_1_2("exited");
ref2.current = callback2;
}
}), []);
const items = [sheetKey];
callback2 = registerDismissHandler.useCallback(() => {
ActionSheetActionCreatorsDefault.hideActionSheet(sheetKey);
}, items);
const items1 = [transitionState, callback2, callback1, registerDismissHandler];
const items2 = [callback2];
const memo = registerDismissHandler.useMemo(() => ({ transitionState, close: callback2, onLeave: callback1, registerDismissHandler }), items1);
const callback3 = registerDismissHandler.useCallback(() => {
const current = ref.current;
if (current != null) {
current();
}
callback2();
return true;
}, items2);
transitionState(5022)(callback3);
const tmp5 = transitionState(8838);
return jsx(transitionState(7204).Provider, { value: memo, children: jsx(sheetKey(5008).Dialog, { dialogKey: sheetKey, onDismiss: callback2, zIndex, children: content }) });
});
const size = fn(2);
let result = size.fileFinishedImporting("design/components/Sheet/native/ActionSheetPresenter.native.tsx");
export const ActionSheetPresenter = function ActionSheetPresenter(appEntryKey) {
appEntryKey = appEntryKey.appEntryKey;
const items = [appEntryKey];
const effect = noop.useEffect(() => () => {
const result = ActionSheetActionCreatorsDefault.resetActionSheetsForAppEntryKey(appEntryKey);
}, items);
const items1 = [ActionSheetStore];
const stateFromStoresArray = appEntryKey(504).useStateFromStoresArray(items1, () => stack.getStack(), []);
const found = stateFromStoresArray.filter((appEntryKey) => appEntryKey.appEntryKey === appEntryKey);
const mapped = found.map((content) => <closure_1_9 key={arg0.key} sheetKey={arg0.key} content={arg0.content} impressionName={arg0.impressionName} impressionProperties={arg0.impressionProperties} zIndex={arg0.zIndex} />);
const obj = appEntryKey(504);
return jsx(appEntryKey(12493).TransitionGroup, { style: StyleSheet.absoluteFill, component: appEntryKey(4956).TransitionGroupOverlayView, children: mapped });
};