decord/source/design/components/ContextMenu/native/ContextMenuContainer.native.tsx

99 lines
3.4 KiB
TypeScript
Raw Normal View History

// Module ID: 14170
// Function ID: 14171
2026-07-20 16:05:17 +00:00
// Name: getItemKey
// Dependencies: [19, 17, 21, 4560, 14171, 8672, 1625, 4972, 4911, 4958, 4271, 2]
2026-07-20 16:05:17 +00:00
// Exports: ContextMenuContainer
// Module 14170 (getItemKey)
import ContextMenuDivider from "ContextMenuDivider" /* 14171 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function getItemKey(key) {
return key.key;
}
2026-07-29 08:29:29 +00:00
({ StyleSheet, View: c4 } = get_ActivityIndicator);
createCacheKey = { overlayView: null, wrapperView: null };
createCacheKey = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
createCacheKey.zIndex = 99999;
createCacheKey[0] = createCacheKey;
createCacheKey[1] = StyleSheet.absoluteFillObject;
2026-08-24 06:08:38 +00:00
let closure_6 = createCacheKey.createStyles(createCacheKey);
2026-07-20 16:05:17 +00:00
let closure_7 = [];
function EMPTY_CALLBACK() {
}
function renderItem(arg0, menu, transitionState, cleanUp) {
2026-08-24 06:08:38 +00:00
return jsx(ContextMenuDivider.ContextMenuPopout, { menu, transitionState, cleanUp }, arg0);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/ContextMenu/native/ContextMenuContainer.native.tsx");
2026-07-20 16:05:17 +00:00
export const ContextMenuContainer = function ContextMenuContainer() {
2026-08-24 06:08:38 +00:00
const tmp = callback();
const _require = tmp;
let obj = _require(callback[5]);
2026-07-20 16:05:17 +00:00
const activeContextMenu = obj.useActiveContextMenu();
if (null != activeContextMenu) {
const items = [activeContextMenu];
2026-07-29 08:29:29 +00:00
let tmp5 = items;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp5 = closure_7;
2026-07-20 16:05:17 +00:00
}
let requestClose;
2026-07-29 08:29:29 +00:00
if (activeContextMenu != null) {
2026-07-20 16:05:17 +00:00
requestClose = activeContextMenu.requestClose;
}
2026-07-29 08:29:29 +00:00
if (requestClose == null) {
2026-07-20 16:05:17 +00:00
requestClose = EMPTY_CALLBACK;
}
const effect = React.useEffect(() => {
2026-08-24 06:08:38 +00:00
const KeyboardEvents = lib(callback[6]).KeyboardEvents;
lib = KeyboardEvents.addListener("keyboardDidHide", () => {
const ContextMenuStore = lib(table[5]).ContextMenuStore;
const menu = ContextMenuStore.getState().menu;
let ignoreKeyboardHide;
if (menu != null) {
ignoreKeyboardHide = menu.ignoreKeyboardHide;
}
if (true !== ignoreKeyboardHide) {
lib(table[5]).hideContextMenu();
const tmpResult = lib(table[5]);
}
});
2026-07-20 16:05:17 +00:00
return () => {
lib.remove();
2026-07-20 16:05:17 +00:00
};
}, []);
const items1 = [requestClose];
2026-07-23 10:11:24 +00:00
callback = React.useCallback(() => {
2026-07-20 16:05:17 +00:00
requestClose(true);
}, items1);
let ignoreKeyboardHide;
if (activeContextMenu != null) {
ignoreKeyboardHide = activeContextMenu.ignoreKeyboardHide;
}
requestClose(callback[7])(() => {
callback();
return true;
}, true === ignoreKeyboardHide);
2026-07-20 16:05:17 +00:00
const items2 = [callback, , ];
({ overlayView: arr3[1], wrapperView: arr3[2] } = tmp);
const callback1 = React.useCallback((children) => {
2026-08-24 06:08:38 +00:00
let obj = { style: lib.overlayView, children: null };
2026-07-20 16:05:17 +00:00
let str = "auto";
if (0 === arg1.length) {
str = "none";
}
obj = { pointerEvents: str, style: lib.wrapperView, children: tmp(lib(callback[9]).Dialog, obj) };
2026-07-20 16:05:17 +00:00
obj = { onDismiss: callback, children };
2026-08-24 06:08:38 +00:00
obj[1] = closure_1_5(closure_1_4, obj);
return closure_1_5(requestClose(callback[8]), obj);
2026-07-20 16:05:17 +00:00
}, items2);
2026-07-29 08:29:29 +00:00
obj = { wrapChildren: callback1, items: tmp5, renderItem, getItemKey };
return jsx(_require(callback[10]).TransitionGroup, { wrapChildren: callback1, items: tmp5, renderItem, getItemKey });
2026-07-20 16:05:17 +00:00
};