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

81 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 13531
// Function ID: 13532
2026-07-20 16:05:17 +00:00
// Name: getItemKey
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 17, 21, 4661, 13532, 9959, 1643, 4669, 4716, 4668, 2]
2026-07-20 16:05:17 +00:00
// Exports: ContextMenuContainer
2026-08-15 05:55:55 +00:00
// Module 13531 (getItemKey)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import get_ActivityIndicator from "get ActivityIndicator";
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
let StyleSheet;
2026-07-29 08:29:29 +00:00
let c4;
2026-07-23 10:11:24 +00:00
let 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;
createCacheKey = 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-15 05:55:55 +00:00
return jsx(require(13532) /* ContextMenuDivider */.ContextMenuPopout, { menu, transitionState, cleanUp }, arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("design/components/ContextMenu/native/ContextMenuContainer.native.tsx");
2026-07-20 16:05:17 +00:00
export const ContextMenuContainer = function ContextMenuContainer() {
2026-07-29 08:29:29 +00:00
let tmp = createCacheKey();
2026-07-23 10:11:24 +00:00
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(() => {
const KeyboardEvents = tmp(callback[6]).KeyboardEvents;
2026-07-23 10:11:24 +00:00
tmp = KeyboardEvents.addListener("keyboardDidHide", tmp(callback[5]).hideContextMenu);
2026-07-20 16:05:17 +00:00
return () => {
closure_0.remove();
};
}, []);
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);
const items2 = [callback, , ];
({ overlayView: arr3[1], wrapperView: arr3[2] } = tmp);
const callback1 = React.useCallback((children) => {
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.overlayView, children: null };
2026-07-20 16:05:17 +00:00
let str = "auto";
if (0 === arg1.length) {
str = "none";
}
2026-07-29 08:29:29 +00:00
obj = { pointerEvents: str, style: outer1_5.wrapperView, children: tmp(tmp(callback[8]).Dialog, obj) };
2026-07-20 16:05:17 +00:00
obj = { onDismiss: callback, children };
2026-07-29 08:29:29 +00:00
obj[1] = outer1_5(outer1_4, obj);
2026-07-23 10:11:24 +00:00
return outer1_5(requestClose(callback[7]), 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[9]).TransitionGroup, { wrapChildren: callback1, items: tmp5, renderItem, getItemKey });
2026-07-20 16:05:17 +00:00
};