add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

2
node_modules/rc-menu/es/utils/commonUtil.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import * as React from 'react';
export declare function parseChildren(children: React.ReactNode | undefined, keyPath: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];

25
node_modules/rc-menu/es/utils/commonUtil.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import toArray from "rc-util/es/Children/toArray";
import * as React from 'react';
export function parseChildren(children, keyPath) {
return toArray(children).map(function (child, index) {
if ( /*#__PURE__*/React.isValidElement(child)) {
var _eventKey, _child$props;
var key = child.key;
var eventKey = (_eventKey = (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.eventKey) !== null && _eventKey !== void 0 ? _eventKey : key;
var emptyKey = eventKey === null || eventKey === undefined;
if (emptyKey) {
eventKey = "tmp_key-".concat([].concat(_toConsumableArray(keyPath), [index]).join('-'));
}
var cloneProps = {
key: eventKey,
eventKey: eventKey
};
if (process.env.NODE_ENV !== 'production' && emptyKey) {
cloneProps.warnKey = true;
}
return /*#__PURE__*/React.cloneElement(child, cloneProps);
}
return child;
});
}

2
node_modules/rc-menu/es/utils/motionUtil.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { CSSMotionProps } from 'rc-motion';
export declare function getMotion(mode: string, motion?: CSSMotionProps, defaultMotions?: Record<string, CSSMotionProps>): CSSMotionProps;

9
node_modules/rc-menu/es/utils/motionUtil.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export function getMotion(mode, motion, defaultMotions) {
if (motion) {
return motion;
}
if (defaultMotions) {
return defaultMotions[mode] || defaultMotions.other;
}
return undefined;
}

3
node_modules/rc-menu/es/utils/nodeUtil.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import * as React from 'react';
import type { Components, ItemType } from '../interface';
export declare function parseItems(children: React.ReactNode | undefined, items: ItemType[] | undefined, keyPath: string[], components: Components, prefixCls?: string): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];

78
node_modules/rc-menu/es/utils/nodeUtil.js generated vendored Normal file
View File

@@ -0,0 +1,78 @@
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _typeof from "@babel/runtime/helpers/esm/typeof";
var _excluded = ["label", "children", "key", "type", "extra"];
import * as React from 'react';
import Divider from "../Divider";
import MenuItem from "../MenuItem";
import MenuItemGroup from "../MenuItemGroup";
import SubMenu from "../SubMenu";
import { parseChildren } from "./commonUtil";
function convertItemsToNodes(list, components, prefixCls) {
var MergedMenuItem = components.item,
MergedMenuItemGroup = components.group,
MergedSubMenu = components.submenu,
MergedDivider = components.divider;
return (list || []).map(function (opt, index) {
if (opt && _typeof(opt) === 'object') {
var _ref = opt,
label = _ref.label,
children = _ref.children,
key = _ref.key,
type = _ref.type,
extra = _ref.extra,
restProps = _objectWithoutProperties(_ref, _excluded);
var mergedKey = key !== null && key !== void 0 ? key : "tmp-".concat(index);
// MenuItemGroup & SubMenuItem
if (children || type === 'group') {
if (type === 'group') {
// Group
return /*#__PURE__*/React.createElement(MergedMenuItemGroup, _extends({
key: mergedKey
}, restProps, {
title: label
}), convertItemsToNodes(children, components, prefixCls));
}
// Sub Menu
return /*#__PURE__*/React.createElement(MergedSubMenu, _extends({
key: mergedKey
}, restProps, {
title: label
}), convertItemsToNodes(children, components, prefixCls));
}
// MenuItem & Divider
if (type === 'divider') {
return /*#__PURE__*/React.createElement(MergedDivider, _extends({
key: mergedKey
}, restProps));
}
return /*#__PURE__*/React.createElement(MergedMenuItem, _extends({
key: mergedKey
}, restProps, {
extra: extra
}), label, (!!extra || extra === 0) && /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-item-extra")
}, extra));
}
return null;
}).filter(function (opt) {
return opt;
});
}
export function parseItems(children, items, keyPath, components, prefixCls) {
var childNodes = children;
var mergedComponents = _objectSpread({
divider: Divider,
item: MenuItem,
group: MenuItemGroup,
submenu: SubMenu
}, components);
if (items) {
childNodes = convertItemsToNodes(items, mergedComponents, prefixCls);
}
return parseChildren(childNodes, keyPath);
}

1
node_modules/rc-menu/es/utils/timeUtil.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function nextSlice(callback: () => void): void;

4
node_modules/rc-menu/es/utils/timeUtil.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export function nextSlice(callback) {
/* istanbul ignore next */
Promise.resolve().then(callback);
}

8
node_modules/rc-menu/es/utils/warnUtil.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
/// <reference types="react" />
/**
* `onClick` event return `info.item` which point to react node directly.
* We should warning this since it will not work on FC.
*/
export declare function warnItemProp<T extends {
item: React.ReactInstance;
}>({ item, ...restInfo }: T): T;

19
node_modules/rc-menu/es/utils/warnUtil.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["item"];
import warning from "rc-util/es/warning";
/**
* `onClick` event return `info.item` which point to react node directly.
* We should warning this since it will not work on FC.
*/
export function warnItemProp(_ref) {
var item = _ref.item,
restInfo = _objectWithoutProperties(_ref, _excluded);
Object.defineProperty(restInfo, 'item', {
get: function get() {
warning(false, '`info.item` is deprecated since we will move to function component that not provides React Node instance in future.');
return item;
}
});
return restInfo;
}