@arpproject/recrate 0.1.36 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/recrate.es.js
CHANGED
|
@@ -1524,6 +1524,9 @@ var supportRef = function supportRef2(nodeOrComponent) {
|
|
|
1524
1524
|
function isReactElement(node2) {
|
|
1525
1525
|
return /* @__PURE__ */ isValidElement(node2) && !isFragment$1(node2);
|
|
1526
1526
|
}
|
|
1527
|
+
var supportNodeRef = function supportNodeRef2(node2) {
|
|
1528
|
+
return isReactElement(node2) && supportRef(node2);
|
|
1529
|
+
};
|
|
1527
1530
|
var getNodeRef = function getNodeRef2(node2) {
|
|
1528
1531
|
if (node2 && isReactElement(node2)) {
|
|
1529
1532
|
var ele = node2;
|
|
@@ -6212,7 +6215,7 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
6212
6215
|
a: 1
|
|
6213
6216
|
}).toRgbString();
|
|
6214
6217
|
}
|
|
6215
|
-
var __rest$
|
|
6218
|
+
var __rest$_ = function(s2, e3) {
|
|
6216
6219
|
var t2 = {};
|
|
6217
6220
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
6218
6221
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -6223,7 +6226,7 @@ var __rest$V = function(s2, e3) {
|
|
|
6223
6226
|
function formatToken(derivativeToken) {
|
|
6224
6227
|
const {
|
|
6225
6228
|
override
|
|
6226
|
-
} = derivativeToken, restToken = __rest$
|
|
6229
|
+
} = derivativeToken, restToken = __rest$_(derivativeToken, ["override"]);
|
|
6227
6230
|
const overrideTokens = Object.assign({}, override);
|
|
6228
6231
|
Object.keys(seedToken).forEach((token2) => {
|
|
6229
6232
|
delete overrideTokens[token2];
|
|
@@ -6377,7 +6380,7 @@ function formatToken(derivativeToken) {
|
|
|
6377
6380
|
}), overrideTokens);
|
|
6378
6381
|
return aliasToken;
|
|
6379
6382
|
}
|
|
6380
|
-
var __rest$
|
|
6383
|
+
var __rest$Z = function(s2, e3) {
|
|
6381
6384
|
var t2 = {};
|
|
6382
6385
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
6383
6386
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -6427,7 +6430,7 @@ const getComputedToken2 = (originToken, overrideToken, theme2) => {
|
|
|
6427
6430
|
const derivativeToken = theme2.getDerivativeToken(originToken);
|
|
6428
6431
|
const {
|
|
6429
6432
|
override
|
|
6430
|
-
} = overrideToken, components = __rest$
|
|
6433
|
+
} = overrideToken, components = __rest$Z(overrideToken, ["override"]);
|
|
6431
6434
|
let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {
|
|
6432
6435
|
override
|
|
6433
6436
|
});
|
|
@@ -6436,7 +6439,7 @@ const getComputedToken2 = (originToken, overrideToken, theme2) => {
|
|
|
6436
6439
|
Object.entries(components).forEach(([key, value]) => {
|
|
6437
6440
|
const {
|
|
6438
6441
|
theme: componentTheme
|
|
6439
|
-
} = value, componentTokens = __rest$
|
|
6442
|
+
} = value, componentTokens = __rest$Z(value, ["theme"]);
|
|
6440
6443
|
let mergedComponentToken = componentTokens;
|
|
6441
6444
|
if (componentTheme) {
|
|
6442
6445
|
mergedComponentToken = getComputedToken2(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {
|
|
@@ -7397,7 +7400,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
7397
7400
|
PropWarning.displayName = "PropWarning";
|
|
7398
7401
|
}
|
|
7399
7402
|
const PropWarning$1 = process.env.NODE_ENV !== "production" ? PropWarning : () => null;
|
|
7400
|
-
var __rest$
|
|
7403
|
+
var __rest$Y = function(s2, e3) {
|
|
7401
7404
|
var t2 = {};
|
|
7402
7405
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
7403
7406
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -7684,7 +7687,7 @@ const ProviderChildren = (props) => {
|
|
|
7684
7687
|
token: token2,
|
|
7685
7688
|
components,
|
|
7686
7689
|
cssVar
|
|
7687
|
-
} = _a2, rest = __rest$
|
|
7690
|
+
} = _a2, rest = __rest$Y(_a2, ["algorithm", "token", "components", "cssVar"]);
|
|
7688
7691
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme$1;
|
|
7689
7692
|
const parsedComponents = {};
|
|
7690
7693
|
Object.entries(components || {}).forEach(([componentName, componentToken]) => {
|
|
@@ -7936,9 +7939,9 @@ var CheckCircleFilled = function CheckCircleFilled2(props, ref) {
|
|
|
7936
7939
|
icon: CheckCircleFilled$1
|
|
7937
7940
|
}));
|
|
7938
7941
|
};
|
|
7939
|
-
var RefIcon$
|
|
7942
|
+
var RefIcon$D = /* @__PURE__ */ React.forwardRef(CheckCircleFilled);
|
|
7940
7943
|
if (process.env.NODE_ENV !== "production") {
|
|
7941
|
-
RefIcon$
|
|
7944
|
+
RefIcon$D.displayName = "CheckCircleFilled";
|
|
7942
7945
|
}
|
|
7943
7946
|
var CloseCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
|
|
7944
7947
|
var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
@@ -7947,9 +7950,9 @@ var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
|
7947
7950
|
icon: CloseCircleFilled$1
|
|
7948
7951
|
}));
|
|
7949
7952
|
};
|
|
7950
|
-
var RefIcon$
|
|
7953
|
+
var RefIcon$C = /* @__PURE__ */ React.forwardRef(CloseCircleFilled);
|
|
7951
7954
|
if (process.env.NODE_ENV !== "production") {
|
|
7952
|
-
RefIcon$
|
|
7955
|
+
RefIcon$C.displayName = "CloseCircleFilled";
|
|
7953
7956
|
}
|
|
7954
7957
|
var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
|
|
7955
7958
|
var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
@@ -7958,9 +7961,9 @@ var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
|
7958
7961
|
icon: CloseOutlined$1
|
|
7959
7962
|
}));
|
|
7960
7963
|
};
|
|
7961
|
-
var RefIcon$
|
|
7964
|
+
var RefIcon$B = /* @__PURE__ */ React.forwardRef(CloseOutlined);
|
|
7962
7965
|
if (process.env.NODE_ENV !== "production") {
|
|
7963
|
-
RefIcon$
|
|
7966
|
+
RefIcon$B.displayName = "CloseOutlined";
|
|
7964
7967
|
}
|
|
7965
7968
|
var ExclamationCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
|
|
7966
7969
|
var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
@@ -7969,9 +7972,9 @@ var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
|
7969
7972
|
icon: ExclamationCircleFilled$1
|
|
7970
7973
|
}));
|
|
7971
7974
|
};
|
|
7972
|
-
var RefIcon$
|
|
7975
|
+
var RefIcon$A = /* @__PURE__ */ React.forwardRef(ExclamationCircleFilled);
|
|
7973
7976
|
if (process.env.NODE_ENV !== "production") {
|
|
7974
|
-
RefIcon$
|
|
7977
|
+
RefIcon$A.displayName = "ExclamationCircleFilled";
|
|
7975
7978
|
}
|
|
7976
7979
|
var InfoCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
|
|
7977
7980
|
var InfoCircleFilled = function InfoCircleFilled2(props, ref) {
|
|
@@ -7980,9 +7983,9 @@ var InfoCircleFilled = function InfoCircleFilled2(props, ref) {
|
|
|
7980
7983
|
icon: InfoCircleFilled$1
|
|
7981
7984
|
}));
|
|
7982
7985
|
};
|
|
7983
|
-
var RefIcon$
|
|
7986
|
+
var RefIcon$z = /* @__PURE__ */ React.forwardRef(InfoCircleFilled);
|
|
7984
7987
|
if (process.env.NODE_ENV !== "production") {
|
|
7985
|
-
RefIcon$
|
|
7988
|
+
RefIcon$z.displayName = "InfoCircleFilled";
|
|
7986
7989
|
}
|
|
7987
7990
|
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
|
|
7988
7991
|
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
|
|
@@ -8723,9 +8726,9 @@ var LoadingOutlined = function LoadingOutlined2(props, ref) {
|
|
|
8723
8726
|
icon: LoadingOutlined$1
|
|
8724
8727
|
}));
|
|
8725
8728
|
};
|
|
8726
|
-
var RefIcon$
|
|
8729
|
+
var RefIcon$y = /* @__PURE__ */ React.forwardRef(LoadingOutlined);
|
|
8727
8730
|
if (process.env.NODE_ENV !== "production") {
|
|
8728
|
-
RefIcon$
|
|
8731
|
+
RefIcon$y.displayName = "LoadingOutlined";
|
|
8729
8732
|
}
|
|
8730
8733
|
function mergeProps$1(...items) {
|
|
8731
8734
|
const ret = {};
|
|
@@ -8784,7 +8787,7 @@ const useClosable = (propCloseCollection, contextCloseCollection, fallbackCloseC
|
|
|
8784
8787
|
const [contextLocale] = useLocale$1("global", localeValues.global);
|
|
8785
8788
|
const closeBtnIsDisabled = typeof propCloseConfig !== "boolean" ? !!(propCloseConfig === null || propCloseConfig === void 0 ? void 0 : propCloseConfig.disabled) : false;
|
|
8786
8789
|
const mergedFallbackCloseCollection = React__default.useMemo(() => Object.assign({
|
|
8787
|
-
closeIcon: /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
8790
|
+
closeIcon: /* @__PURE__ */ React__default.createElement(RefIcon$B, null)
|
|
8788
8791
|
}, fallbackCloseCollection), [fallbackCloseCollection]);
|
|
8789
8792
|
const mergedClosableConfig = React__default.useMemo(() => {
|
|
8790
8793
|
if (propCloseConfig === false) {
|
|
@@ -9089,17 +9092,17 @@ const genMessageStyle = (token2) => {
|
|
|
9089
9092
|
}
|
|
9090
9093
|
];
|
|
9091
9094
|
};
|
|
9092
|
-
const prepareComponentToken$
|
|
9095
|
+
const prepareComponentToken$o = (token2) => ({
|
|
9093
9096
|
zIndexPopup: token2.zIndexPopupBase + CONTAINER_MAX_OFFSET + 10,
|
|
9094
9097
|
contentBg: token2.colorBgElevated,
|
|
9095
9098
|
contentPadding: `${(token2.controlHeightLG - token2.fontSize * token2.lineHeight) / 2}px ${token2.paddingSM}px`
|
|
9096
9099
|
});
|
|
9097
|
-
const useStyle$
|
|
9100
|
+
const useStyle$x = genStyleHooks("Message", (token2) => {
|
|
9098
9101
|
const combinedToken = merge$1(token2, {
|
|
9099
9102
|
height: 150
|
|
9100
9103
|
});
|
|
9101
9104
|
return genMessageStyle(combinedToken);
|
|
9102
|
-
}, prepareComponentToken$
|
|
9105
|
+
}, prepareComponentToken$o);
|
|
9103
9106
|
(function(s2, e3) {
|
|
9104
9107
|
var t2 = {};
|
|
9105
9108
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
@@ -9109,11 +9112,11 @@ const useStyle$u = genStyleHooks("Message", (token2) => {
|
|
|
9109
9112
|
return t2;
|
|
9110
9113
|
});
|
|
9111
9114
|
const TypeIcon = {
|
|
9112
|
-
info: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9113
|
-
success: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9114
|
-
error: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9115
|
-
warning: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9116
|
-
loading: /* @__PURE__ */ React.createElement(RefIcon$
|
|
9115
|
+
info: /* @__PURE__ */ React.createElement(RefIcon$z, null),
|
|
9116
|
+
success: /* @__PURE__ */ React.createElement(RefIcon$D, null),
|
|
9117
|
+
error: /* @__PURE__ */ React.createElement(RefIcon$C, null),
|
|
9118
|
+
warning: /* @__PURE__ */ React.createElement(RefIcon$A, null),
|
|
9119
|
+
loading: /* @__PURE__ */ React.createElement(RefIcon$y, null)
|
|
9117
9120
|
};
|
|
9118
9121
|
const PureContent$1 = ({
|
|
9119
9122
|
prefixCls,
|
|
@@ -9142,7 +9145,7 @@ function wrapPromiseFn(openFn) {
|
|
|
9142
9145
|
result.promise = closePromise;
|
|
9143
9146
|
return result;
|
|
9144
9147
|
}
|
|
9145
|
-
var __rest$
|
|
9148
|
+
var __rest$X = function(s2, e3) {
|
|
9146
9149
|
var t2 = {};
|
|
9147
9150
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
9148
9151
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -9157,7 +9160,7 @@ const Wrapper$1 = ({
|
|
|
9157
9160
|
prefixCls
|
|
9158
9161
|
}) => {
|
|
9159
9162
|
const rootCls = useCSSVarCls(prefixCls);
|
|
9160
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
9163
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$x(prefixCls, rootCls);
|
|
9161
9164
|
return wrapCSSVar(/* @__PURE__ */ React.createElement(NotificationProvider, {
|
|
9162
9165
|
classNames: {
|
|
9163
9166
|
list: classNames(hashId, cssVarCls, rootCls)
|
|
@@ -9200,7 +9203,7 @@ const Holder$1 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
9200
9203
|
const getNotificationMotion = () => getMotion$3(prefixCls, transitionName);
|
|
9201
9204
|
const mergedCloseIcon = /* @__PURE__ */ React.createElement("span", {
|
|
9202
9205
|
className: `${prefixCls}-close-x`
|
|
9203
|
-
}, /* @__PURE__ */ React.createElement(RefIcon$
|
|
9206
|
+
}, /* @__PURE__ */ React.createElement(RefIcon$B, {
|
|
9204
9207
|
className: `${prefixCls}-close-icon`
|
|
9205
9208
|
}));
|
|
9206
9209
|
const [api2, holder] = useNotification$1({
|
|
@@ -9254,7 +9257,7 @@ function useInternalMessage(messageConfig) {
|
|
|
9254
9257
|
className,
|
|
9255
9258
|
style: style2,
|
|
9256
9259
|
onClose
|
|
9257
|
-
} = config2, restConfig = __rest$
|
|
9260
|
+
} = config2, restConfig = __rest$X(config2, ["content", "icon", "type", "key", "className", "style", "onClose"]);
|
|
9258
9261
|
let mergedKey = key;
|
|
9259
9262
|
if (mergedKey === void 0 || mergedKey === null) {
|
|
9260
9263
|
keyIndex += 1;
|
|
@@ -9774,7 +9777,7 @@ const genWaveStyle = (token2) => {
|
|
|
9774
9777
|
}
|
|
9775
9778
|
};
|
|
9776
9779
|
};
|
|
9777
|
-
const useStyle$
|
|
9780
|
+
const useStyle$w = genComponentStyleHook("Wave", genWaveStyle);
|
|
9778
9781
|
const TARGET_CLS = `${defaultPrefixCls}-wave-target`;
|
|
9779
9782
|
function isValidWaveColor(color) {
|
|
9780
9783
|
return color && color !== "#fff" && color !== "#ffffff" && color !== "rgb(255, 255, 255)" && color !== "rgba(255, 255, 255, 1)" && !/rgba\((?:\d*, ){3}0\)/.test(color) && // any transparent rgba color
|
|
@@ -9952,7 +9955,7 @@ const Wave = (props) => {
|
|
|
9952
9955
|
} = useContext(ConfigContext);
|
|
9953
9956
|
const containerRef = useRef(null);
|
|
9954
9957
|
const prefixCls = getPrefixCls("wave");
|
|
9955
|
-
const [, hashId] = useStyle$
|
|
9958
|
+
const [, hashId] = useStyle$w(prefixCls);
|
|
9956
9959
|
const showWave = useWave(containerRef, classNames(prefixCls, hashId), component);
|
|
9957
9960
|
React__default.useEffect(() => {
|
|
9958
9961
|
const node2 = containerRef.current;
|
|
@@ -10018,12 +10021,12 @@ const genSpaceCompactStyle = (token2) => {
|
|
|
10018
10021
|
}
|
|
10019
10022
|
};
|
|
10020
10023
|
};
|
|
10021
|
-
const useStyle$
|
|
10024
|
+
const useStyle$v = genStyleHooks(["Space", "Compact"], (token2) => [genSpaceCompactStyle(token2)], () => ({}), {
|
|
10022
10025
|
// Space component don't apply extra font style
|
|
10023
10026
|
// https://github.com/ant-design/ant-design/issues/40315
|
|
10024
10027
|
resetStyle: false
|
|
10025
10028
|
});
|
|
10026
|
-
var __rest$
|
|
10029
|
+
var __rest$W = function(s2, e3) {
|
|
10027
10030
|
var t2 = {};
|
|
10028
10031
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
10029
10032
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -10067,7 +10070,7 @@ const NoCompactStyle = (props) => {
|
|
|
10067
10070
|
const CompactItem = (props) => {
|
|
10068
10071
|
const {
|
|
10069
10072
|
children
|
|
10070
|
-
} = props, others = __rest$
|
|
10073
|
+
} = props, others = __rest$W(props, ["children"]);
|
|
10071
10074
|
return /* @__PURE__ */ React.createElement(SpaceCompactItemContext.Provider, {
|
|
10072
10075
|
value: React.useMemo(() => others, [others])
|
|
10073
10076
|
}, children);
|
|
@@ -10085,10 +10088,10 @@ const Compact$1 = (props) => {
|
|
|
10085
10088
|
className,
|
|
10086
10089
|
rootClassName,
|
|
10087
10090
|
children
|
|
10088
|
-
} = props, restProps = __rest$
|
|
10091
|
+
} = props, restProps = __rest$W(props, ["size", "direction", "block", "prefixCls", "className", "rootClassName", "children"]);
|
|
10089
10092
|
const mergedSize = useSize((ctx) => size !== null && size !== void 0 ? size : ctx);
|
|
10090
10093
|
const prefixCls = getPrefixCls("space-compact", customizePrefixCls);
|
|
10091
|
-
const [wrapCSSVar, hashId] = useStyle$
|
|
10094
|
+
const [wrapCSSVar, hashId] = useStyle$v(prefixCls);
|
|
10092
10095
|
const clx = classNames(prefixCls, hashId, {
|
|
10093
10096
|
[`${prefixCls}-rtl`]: directionConfig === "rtl",
|
|
10094
10097
|
[`${prefixCls}-block`]: block,
|
|
@@ -10113,7 +10116,7 @@ const Compact$1 = (props) => {
|
|
|
10113
10116
|
className: clx
|
|
10114
10117
|
}, restProps), nodes));
|
|
10115
10118
|
};
|
|
10116
|
-
var __rest$
|
|
10119
|
+
var __rest$V = function(s2, e3) {
|
|
10117
10120
|
var t2 = {};
|
|
10118
10121
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
10119
10122
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -10131,7 +10134,7 @@ const ButtonGroup = (props) => {
|
|
|
10131
10134
|
prefixCls: customizePrefixCls,
|
|
10132
10135
|
size,
|
|
10133
10136
|
className
|
|
10134
|
-
} = props, others = __rest$
|
|
10137
|
+
} = props, others = __rest$V(props, ["prefixCls", "size", "className"]);
|
|
10135
10138
|
const prefixCls = getPrefixCls("btn-group", customizePrefixCls);
|
|
10136
10139
|
const [, , hashId] = useToken();
|
|
10137
10140
|
const sizeCls = React.useMemo(() => {
|
|
@@ -10240,7 +10243,7 @@ const InnerLoadingIcon = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
10240
10243
|
className: mergedIconCls,
|
|
10241
10244
|
style: style2,
|
|
10242
10245
|
ref
|
|
10243
|
-
}, /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
10246
|
+
}, /* @__PURE__ */ React__default.createElement(RefIcon$y, {
|
|
10244
10247
|
className: iconClassName
|
|
10245
10248
|
}));
|
|
10246
10249
|
});
|
|
@@ -10976,9 +10979,9 @@ var RightOutlined = function RightOutlined2(props, ref) {
|
|
|
10976
10979
|
icon: RightOutlined$1
|
|
10977
10980
|
}));
|
|
10978
10981
|
};
|
|
10979
|
-
var RefIcon$
|
|
10982
|
+
var RefIcon$x = /* @__PURE__ */ React.forwardRef(RightOutlined);
|
|
10980
10983
|
if (process.env.NODE_ENV !== "production") {
|
|
10981
|
-
RefIcon$
|
|
10984
|
+
RefIcon$x.displayName = "RightOutlined";
|
|
10982
10985
|
}
|
|
10983
10986
|
const genCollapseMotion = (token2) => ({
|
|
10984
10987
|
[token2.componentCls]: {
|
|
@@ -11556,7 +11559,7 @@ const prepareToken$5 = (token2) => {
|
|
|
11556
11559
|
});
|
|
11557
11560
|
return buttonToken;
|
|
11558
11561
|
};
|
|
11559
|
-
const prepareComponentToken$
|
|
11562
|
+
const prepareComponentToken$n = (token2) => {
|
|
11560
11563
|
var _a2, _b, _c, _d, _e2, _f;
|
|
11561
11564
|
const contentFontSize = (_a2 = token2.contentFontSize) !== null && _a2 !== void 0 ? _a2 : token2.fontSize;
|
|
11562
11565
|
const contentFontSizeSM = (_b = token2.contentFontSizeSM) !== null && _b !== void 0 ? _b : token2.fontSize;
|
|
@@ -12059,7 +12062,7 @@ const genBlockButtonStyle = (token2) => {
|
|
|
12059
12062
|
}
|
|
12060
12063
|
};
|
|
12061
12064
|
};
|
|
12062
|
-
const useStyle$
|
|
12065
|
+
const useStyle$u = genStyleHooks("Button", (token2) => {
|
|
12063
12066
|
const buttonToken = prepareToken$5(token2);
|
|
12064
12067
|
return [
|
|
12065
12068
|
// Shared
|
|
@@ -12077,7 +12080,7 @@ const useStyle$r = genStyleHooks("Button", (token2) => {
|
|
|
12077
12080
|
// Button Group
|
|
12078
12081
|
genGroupStyle$1(buttonToken)
|
|
12079
12082
|
];
|
|
12080
|
-
}, prepareComponentToken$
|
|
12083
|
+
}, prepareComponentToken$n, {
|
|
12081
12084
|
unitless: {
|
|
12082
12085
|
fontWeight: true,
|
|
12083
12086
|
contentLineHeight: true,
|
|
@@ -12229,8 +12232,8 @@ const Compact = genSubStyleComponent(["Button", "compact"], (token2) => {
|
|
|
12229
12232
|
genCompactItemVerticalStyle(buttonToken),
|
|
12230
12233
|
genButtonCompactStyle(buttonToken)
|
|
12231
12234
|
];
|
|
12232
|
-
}, prepareComponentToken$
|
|
12233
|
-
var __rest$
|
|
12235
|
+
}, prepareComponentToken$n);
|
|
12236
|
+
var __rest$U = function(s2, e3) {
|
|
12234
12237
|
var t2 = {};
|
|
12235
12238
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
12236
12239
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -12286,7 +12289,7 @@ const InternalCompoundedButton = /* @__PURE__ */ React__default.forwardRef((prop
|
|
|
12286
12289
|
style: customStyle = {},
|
|
12287
12290
|
autoInsertSpace,
|
|
12288
12291
|
autoFocus
|
|
12289
|
-
} = props, rest = __rest$
|
|
12292
|
+
} = props, rest = __rest$U(props, ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"]);
|
|
12290
12293
|
const mergedType = type4 || "default";
|
|
12291
12294
|
const {
|
|
12292
12295
|
button
|
|
@@ -12321,7 +12324,7 @@ const InternalCompoundedButton = /* @__PURE__ */ React__default.forwardRef((prop
|
|
|
12321
12324
|
} = useComponentConfig("button");
|
|
12322
12325
|
const mergedInsertSpace = (_a2 = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : contextAutoInsertSpace) !== null && _a2 !== void 0 ? _a2 : true;
|
|
12323
12326
|
const prefixCls = getPrefixCls("btn", customizePrefixCls);
|
|
12324
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
12327
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$u(prefixCls);
|
|
12325
12328
|
const disabled2 = useContext(DisabledContext);
|
|
12326
12329
|
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled2;
|
|
12327
12330
|
const groupSize = useContext(GroupSizeContext);
|
|
@@ -16592,7 +16595,7 @@ const genSkeletonElementButton = (token2) => {
|
|
|
16592
16595
|
[`${skeletonButtonCls}-sm`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightSM, calc))
|
|
16593
16596
|
}), genSkeletonElementButtonShape(token2, controlHeightSM, `${skeletonButtonCls}-sm`));
|
|
16594
16597
|
};
|
|
16595
|
-
const genBaseStyle$
|
|
16598
|
+
const genBaseStyle$5 = (token2) => {
|
|
16596
16599
|
const {
|
|
16597
16600
|
componentCls,
|
|
16598
16601
|
skeletonAvatarCls,
|
|
@@ -16709,7 +16712,7 @@ const genBaseStyle$4 = (token2) => {
|
|
|
16709
16712
|
}
|
|
16710
16713
|
};
|
|
16711
16714
|
};
|
|
16712
|
-
const prepareComponentToken$
|
|
16715
|
+
const prepareComponentToken$m = (token2) => {
|
|
16713
16716
|
const {
|
|
16714
16717
|
colorFillContent,
|
|
16715
16718
|
colorFill
|
|
@@ -16727,7 +16730,7 @@ const prepareComponentToken$j = (token2) => {
|
|
|
16727
16730
|
paragraphLiHeight: token2.controlHeight / 2
|
|
16728
16731
|
};
|
|
16729
16732
|
};
|
|
16730
|
-
const useStyle$
|
|
16733
|
+
const useStyle$t = genStyleHooks("Skeleton", (token2) => {
|
|
16731
16734
|
const {
|
|
16732
16735
|
componentCls,
|
|
16733
16736
|
calc
|
|
@@ -16745,8 +16748,8 @@ const useStyle$q = genStyleHooks("Skeleton", (token2) => {
|
|
|
16745
16748
|
skeletonLoadingBackground: `linear-gradient(90deg, ${token2.gradientFromColor} 25%, ${token2.gradientToColor} 37%, ${token2.gradientFromColor} 63%)`,
|
|
16746
16749
|
skeletonLoadingMotionDuration: "1.4s"
|
|
16747
16750
|
});
|
|
16748
|
-
return genBaseStyle$
|
|
16749
|
-
}, prepareComponentToken$
|
|
16751
|
+
return genBaseStyle$5(skeletonToken);
|
|
16752
|
+
}, prepareComponentToken$m, {
|
|
16750
16753
|
deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
|
|
16751
16754
|
});
|
|
16752
16755
|
const SkeletonAvatar = (props) => {
|
|
@@ -16762,7 +16765,7 @@ const SkeletonAvatar = (props) => {
|
|
|
16762
16765
|
getPrefixCls
|
|
16763
16766
|
} = React.useContext(ConfigContext);
|
|
16764
16767
|
const prefixCls = getPrefixCls("skeleton", customizePrefixCls);
|
|
16765
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
16768
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$t(prefixCls);
|
|
16766
16769
|
const otherProps = omit(props, ["prefixCls", "className"]);
|
|
16767
16770
|
const cls = classNames(prefixCls, `${prefixCls}-element`, {
|
|
16768
16771
|
[`${prefixCls}-active`]: active
|
|
@@ -16788,7 +16791,7 @@ const SkeletonButton = (props) => {
|
|
|
16788
16791
|
getPrefixCls
|
|
16789
16792
|
} = React.useContext(ConfigContext);
|
|
16790
16793
|
const prefixCls = getPrefixCls("skeleton", customizePrefixCls);
|
|
16791
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
16794
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$t(prefixCls);
|
|
16792
16795
|
const otherProps = omit(props, ["prefixCls"]);
|
|
16793
16796
|
const cls = classNames(prefixCls, `${prefixCls}-element`, {
|
|
16794
16797
|
[`${prefixCls}-active`]: active,
|
|
@@ -16814,7 +16817,7 @@ const SkeletonImage = (props) => {
|
|
|
16814
16817
|
getPrefixCls
|
|
16815
16818
|
} = React.useContext(ConfigContext);
|
|
16816
16819
|
const prefixCls = getPrefixCls("skeleton", customizePrefixCls);
|
|
16817
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
16820
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$t(prefixCls);
|
|
16818
16821
|
const cls = classNames(prefixCls, `${prefixCls}-element`, {
|
|
16819
16822
|
[`${prefixCls}-active`]: active
|
|
16820
16823
|
}, className, rootClassName, hashId, cssVarCls);
|
|
@@ -16845,7 +16848,7 @@ const SkeletonInput = (props) => {
|
|
|
16845
16848
|
getPrefixCls
|
|
16846
16849
|
} = React.useContext(ConfigContext);
|
|
16847
16850
|
const prefixCls = getPrefixCls("skeleton", customizePrefixCls);
|
|
16848
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
16851
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$t(prefixCls);
|
|
16849
16852
|
const otherProps = omit(props, ["prefixCls"]);
|
|
16850
16853
|
const cls = classNames(prefixCls, `${prefixCls}-element`, {
|
|
16851
16854
|
[`${prefixCls}-active`]: active,
|
|
@@ -16871,7 +16874,7 @@ const SkeletonNode = (props) => {
|
|
|
16871
16874
|
getPrefixCls
|
|
16872
16875
|
} = React.useContext(ConfigContext);
|
|
16873
16876
|
const prefixCls = getPrefixCls("skeleton", customizePrefixCls);
|
|
16874
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
16877
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$t(prefixCls);
|
|
16875
16878
|
const cls = classNames(prefixCls, `${prefixCls}-element`, {
|
|
16876
16879
|
[`${prefixCls}-active`]: active
|
|
16877
16880
|
}, hashId, className, rootClassName, cssVarCls);
|
|
@@ -16996,7 +16999,7 @@ const Skeleton = (props) => {
|
|
|
16996
16999
|
style: contextStyle
|
|
16997
17000
|
} = useComponentConfig("skeleton");
|
|
16998
17001
|
const prefixCls = getPrefixCls("skeleton", customizePrefixCls);
|
|
16999
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
17002
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$t(prefixCls);
|
|
17000
17003
|
if (loading || !("loading" in props)) {
|
|
17001
17004
|
const hasAvatar = !!avatar;
|
|
17002
17005
|
const hasTitle = !!title;
|
|
@@ -17099,7 +17102,7 @@ const NormalOkBtn = () => {
|
|
|
17099
17102
|
function renderCloseIcon(prefixCls, closeIcon) {
|
|
17100
17103
|
return /* @__PURE__ */ React__default.createElement("span", {
|
|
17101
17104
|
className: `${prefixCls}-close-x`
|
|
17102
|
-
}, closeIcon || /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
17105
|
+
}, closeIcon || /* @__PURE__ */ React__default.createElement(RefIcon$B, {
|
|
17103
17106
|
className: `${prefixCls}-close-icon`
|
|
17104
17107
|
}));
|
|
17105
17108
|
}
|
|
@@ -17577,7 +17580,7 @@ const prepareToken$4 = (token2) => {
|
|
|
17577
17580
|
});
|
|
17578
17581
|
return modalToken;
|
|
17579
17582
|
};
|
|
17580
|
-
const prepareComponentToken$
|
|
17583
|
+
const prepareComponentToken$l = (token2) => ({
|
|
17581
17584
|
footerBg: "transparent",
|
|
17582
17585
|
headerBg: token2.colorBgElevated,
|
|
17583
17586
|
titleLineHeight: token2.lineHeightHeading5,
|
|
@@ -17598,15 +17601,15 @@ const prepareComponentToken$i = (token2) => ({
|
|
|
17598
17601
|
confirmIconMarginInlineEnd: token2.wireframe ? token2.margin : token2.marginSM,
|
|
17599
17602
|
confirmBtnsMarginTop: token2.wireframe ? token2.marginLG : token2.marginSM
|
|
17600
17603
|
});
|
|
17601
|
-
const useStyle$
|
|
17604
|
+
const useStyle$s = genStyleHooks("Modal", (token2) => {
|
|
17602
17605
|
const modalToken = prepareToken$4(token2);
|
|
17603
17606
|
return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), initZoomMotion(modalToken, "zoom"), genResponsiveWidthStyle(modalToken)];
|
|
17604
|
-
}, prepareComponentToken$
|
|
17607
|
+
}, prepareComponentToken$l, {
|
|
17605
17608
|
unitless: {
|
|
17606
17609
|
titleLineHeight: true
|
|
17607
17610
|
}
|
|
17608
17611
|
});
|
|
17609
|
-
var __rest$
|
|
17612
|
+
var __rest$T = function(s2, e3) {
|
|
17610
17613
|
var t2 = {};
|
|
17611
17614
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
17612
17615
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -17655,7 +17658,7 @@ const Modal = (props) => {
|
|
|
17655
17658
|
destroyOnClose,
|
|
17656
17659
|
panelRef = null,
|
|
17657
17660
|
modalRender
|
|
17658
|
-
} = props, restProps = __rest$
|
|
17661
|
+
} = props, restProps = __rest$T(props, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading", "confirmLoading", "zIndex", "mousePosition", "onOk", "onCancel", "destroyOnHidden", "destroyOnClose", "panelRef", "modalRender"]);
|
|
17659
17662
|
const {
|
|
17660
17663
|
getPopupContainer: getContextPopupContainer,
|
|
17661
17664
|
getPrefixCls,
|
|
@@ -17680,7 +17683,7 @@ const Modal = (props) => {
|
|
|
17680
17683
|
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
17681
17684
|
const rootPrefixCls = getPrefixCls();
|
|
17682
17685
|
const rootCls = useCSSVarCls(prefixCls);
|
|
17683
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
17686
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$s(prefixCls, rootCls);
|
|
17684
17687
|
const wrapClassNameExtended = classNames(wrapClassName, {
|
|
17685
17688
|
[`${prefixCls}-centered`]: centered !== null && centered !== void 0 ? centered : modalContext === null || modalContext === void 0 ? void 0 : modalContext.centered,
|
|
17686
17689
|
[`${prefixCls}-wrap-rtl`]: direction === "rtl"
|
|
@@ -17691,7 +17694,7 @@ const Modal = (props) => {
|
|
|
17691
17694
|
})) : null;
|
|
17692
17695
|
const [mergedClosable, mergedCloseIcon, closeBtnIsDisabled, ariaProps] = useClosable(pickClosable(props), pickClosable(modalContext), {
|
|
17693
17696
|
closable: true,
|
|
17694
|
-
closeIcon: /* @__PURE__ */ React.createElement(RefIcon$
|
|
17697
|
+
closeIcon: /* @__PURE__ */ React.createElement(RefIcon$B, {
|
|
17695
17698
|
className: `${prefixCls}-close-icon`
|
|
17696
17699
|
}),
|
|
17697
17700
|
closeIconRender: (icon2) => renderCloseIcon(prefixCls, icon2)
|
|
@@ -17855,11 +17858,11 @@ const genModalConfirmStyle = (token2) => {
|
|
|
17855
17858
|
const Confirm = genSubStyleComponent(["Modal", "confirm"], (token2) => {
|
|
17856
17859
|
const modalToken = prepareToken$4(token2);
|
|
17857
17860
|
return genModalConfirmStyle(modalToken);
|
|
17858
|
-
}, prepareComponentToken$
|
|
17861
|
+
}, prepareComponentToken$l, {
|
|
17859
17862
|
// confirm is weak than modal since no conflict here
|
|
17860
17863
|
order: -1e3
|
|
17861
17864
|
});
|
|
17862
|
-
var __rest$
|
|
17865
|
+
var __rest$S = function(s2, e3) {
|
|
17863
17866
|
var t2 = {};
|
|
17864
17867
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
17865
17868
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -17879,7 +17882,7 @@ const ConfirmContent = (props) => {
|
|
|
17879
17882
|
footer,
|
|
17880
17883
|
// Legacy for static function usage
|
|
17881
17884
|
locale: staticLocale
|
|
17882
|
-
} = props, resetProps = __rest$
|
|
17885
|
+
} = props, resetProps = __rest$S(props, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
|
|
17883
17886
|
if (process.env.NODE_ENV !== "production") {
|
|
17884
17887
|
const warning3 = devUseWarning("Modal");
|
|
17885
17888
|
process.env.NODE_ENV !== "production" ? warning3(!(typeof icon2 === "string" && icon2.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon2}\` at https://ant.design/components/icon`) : void 0;
|
|
@@ -17888,16 +17891,16 @@ const ConfirmContent = (props) => {
|
|
|
17888
17891
|
if (!icon2 && icon2 !== null) {
|
|
17889
17892
|
switch (type4) {
|
|
17890
17893
|
case "info":
|
|
17891
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17894
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$z, null);
|
|
17892
17895
|
break;
|
|
17893
17896
|
case "success":
|
|
17894
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17897
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$D, null);
|
|
17895
17898
|
break;
|
|
17896
17899
|
case "error":
|
|
17897
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17900
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$C, null);
|
|
17898
17901
|
break;
|
|
17899
17902
|
default:
|
|
17900
|
-
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
17903
|
+
mergedIcon = /* @__PURE__ */ React.createElement(RefIcon$A, null);
|
|
17901
17904
|
}
|
|
17902
17905
|
}
|
|
17903
17906
|
const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type4 === "confirm";
|
|
@@ -18048,7 +18051,7 @@ function withConfirm(props) {
|
|
|
18048
18051
|
type: "confirm"
|
|
18049
18052
|
});
|
|
18050
18053
|
}
|
|
18051
|
-
var __rest$
|
|
18054
|
+
var __rest$R = function(s2, e3) {
|
|
18052
18055
|
var t2 = {};
|
|
18053
18056
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
18054
18057
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -18061,7 +18064,7 @@ const HookModal = (_a2, ref) => {
|
|
|
18061
18064
|
var {
|
|
18062
18065
|
afterClose: hookAfterClose,
|
|
18063
18066
|
config: config2
|
|
18064
|
-
} = _a2, restProps = __rest$
|
|
18067
|
+
} = _a2, restProps = __rest$R(_a2, ["afterClose", "config"]);
|
|
18065
18068
|
const [open, setOpen] = React.useState(true);
|
|
18066
18069
|
const [innerConfig, setInnerConfig] = React.useState(config2);
|
|
18067
18070
|
const {
|
|
@@ -18615,7 +18618,7 @@ const genNotificationStyle = (token2) => {
|
|
|
18615
18618
|
}
|
|
18616
18619
|
];
|
|
18617
18620
|
};
|
|
18618
|
-
const prepareComponentToken$
|
|
18621
|
+
const prepareComponentToken$k = (token2) => ({
|
|
18619
18622
|
zIndexPopup: token2.zIndexPopupBase + CONTAINER_MAX_OFFSET + 50,
|
|
18620
18623
|
width: 384,
|
|
18621
18624
|
// Fix notification background color issue
|
|
@@ -18645,10 +18648,10 @@ const prepareNotificationToken = (token2) => {
|
|
|
18645
18648
|
});
|
|
18646
18649
|
return notificationToken;
|
|
18647
18650
|
};
|
|
18648
|
-
const useStyle$
|
|
18651
|
+
const useStyle$r = genStyleHooks("Notification", (token2) => {
|
|
18649
18652
|
const notificationToken = prepareNotificationToken(token2);
|
|
18650
18653
|
return [genNotificationStyle(notificationToken), genNotificationPlacementStyle(notificationToken), genStackStyle(notificationToken)];
|
|
18651
|
-
}, prepareComponentToken$
|
|
18654
|
+
}, prepareComponentToken$k);
|
|
18652
18655
|
(function(s2, e3) {
|
|
18653
18656
|
var t2 = {};
|
|
18654
18657
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
@@ -18661,15 +18664,15 @@ function getCloseIcon(prefixCls, closeIcon) {
|
|
|
18661
18664
|
if (closeIcon === null || closeIcon === false) {
|
|
18662
18665
|
return null;
|
|
18663
18666
|
}
|
|
18664
|
-
return closeIcon || /* @__PURE__ */ React.createElement(RefIcon$
|
|
18667
|
+
return closeIcon || /* @__PURE__ */ React.createElement(RefIcon$B, {
|
|
18665
18668
|
className: `${prefixCls}-close-icon`
|
|
18666
18669
|
});
|
|
18667
18670
|
}
|
|
18668
18671
|
const typeToIcon = {
|
|
18669
|
-
success: RefIcon$
|
|
18670
|
-
info: RefIcon$
|
|
18671
|
-
error: RefIcon$
|
|
18672
|
-
warning: RefIcon$
|
|
18672
|
+
success: RefIcon$D,
|
|
18673
|
+
info: RefIcon$z,
|
|
18674
|
+
error: RefIcon$C,
|
|
18675
|
+
warning: RefIcon$A
|
|
18673
18676
|
};
|
|
18674
18677
|
const PureContent = (props) => {
|
|
18675
18678
|
const {
|
|
@@ -18770,7 +18773,7 @@ function getCloseIconConfig(closeIcon, notificationConfig, notification) {
|
|
|
18770
18773
|
}
|
|
18771
18774
|
return notification === null || notification === void 0 ? void 0 : notification.closeIcon;
|
|
18772
18775
|
}
|
|
18773
|
-
var __rest$
|
|
18776
|
+
var __rest$Q = function(s2, e3) {
|
|
18774
18777
|
var t2 = {};
|
|
18775
18778
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
18776
18779
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -18786,7 +18789,7 @@ const Wrapper = ({
|
|
|
18786
18789
|
prefixCls
|
|
18787
18790
|
}) => {
|
|
18788
18791
|
const rootCls = useCSSVarCls(prefixCls);
|
|
18789
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
18792
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$r(prefixCls, rootCls);
|
|
18790
18793
|
return wrapCSSVar(/* @__PURE__ */ React__default.createElement(NotificationProvider, {
|
|
18791
18794
|
classNames: {
|
|
18792
18795
|
list: classNames(hashId, cssVarCls, rootCls)
|
|
@@ -18881,7 +18884,7 @@ function useInternalNotification(notificationConfig) {
|
|
|
18881
18884
|
role = "alert",
|
|
18882
18885
|
closeIcon,
|
|
18883
18886
|
closable
|
|
18884
|
-
} = config2, restConfig = __rest$
|
|
18887
|
+
} = config2, restConfig = __rest$Q(config2, ["message", "description", "icon", "type", "btn", "actions", "className", "style", "role", "closeIcon", "closable"]);
|
|
18885
18888
|
if (process.env.NODE_ENV !== "production") {
|
|
18886
18889
|
warning3.deprecated(!btn, "btn", "actions");
|
|
18887
18890
|
}
|
|
@@ -18941,7 +18944,7 @@ const AppContext = /* @__PURE__ */ React__default.createContext({
|
|
|
18941
18944
|
notification: {},
|
|
18942
18945
|
modal: {}
|
|
18943
18946
|
});
|
|
18944
|
-
const genBaseStyle$
|
|
18947
|
+
const genBaseStyle$4 = (token2) => {
|
|
18945
18948
|
const {
|
|
18946
18949
|
componentCls,
|
|
18947
18950
|
colorText,
|
|
@@ -18961,8 +18964,8 @@ const genBaseStyle$3 = (token2) => {
|
|
|
18961
18964
|
}
|
|
18962
18965
|
};
|
|
18963
18966
|
};
|
|
18964
|
-
const prepareComponentToken$
|
|
18965
|
-
const useStyle$
|
|
18967
|
+
const prepareComponentToken$j = () => ({});
|
|
18968
|
+
const useStyle$q = genStyleHooks("App", genBaseStyle$4, prepareComponentToken$j);
|
|
18966
18969
|
const App$1 = (props) => {
|
|
18967
18970
|
const {
|
|
18968
18971
|
prefixCls: customizePrefixCls,
|
|
@@ -18979,7 +18982,7 @@ const App$1 = (props) => {
|
|
|
18979
18982
|
getPrefixCls
|
|
18980
18983
|
} = useContext(ConfigContext);
|
|
18981
18984
|
const prefixCls = getPrefixCls("app", customizePrefixCls);
|
|
18982
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
18985
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$q(prefixCls);
|
|
18983
18986
|
const customClassName = classNames(hashId, prefixCls, className, rootClassName, cssVarCls, {
|
|
18984
18987
|
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
18985
18988
|
});
|
|
@@ -19050,7 +19053,7 @@ const genPurePanel = (Component, alignPropName, postProps, defaultPrefixCls2, ge
|
|
|
19050
19053
|
});
|
|
19051
19054
|
const interval = setInterval(() => {
|
|
19052
19055
|
var _a2;
|
|
19053
|
-
const dropdownCls = `.${prefixCls}-dropdown`;
|
|
19056
|
+
const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls)}` : `.${prefixCls}-dropdown`;
|
|
19054
19057
|
const popup = (_a2 = holderRef.current) === null || _a2 === void 0 ? void 0 : _a2.querySelector(dropdownCls);
|
|
19055
19058
|
if (popup) {
|
|
19056
19059
|
clearInterval(interval);
|
|
@@ -24013,7 +24016,7 @@ const genSharedEmptyStyle = (token2) => {
|
|
|
24013
24016
|
}
|
|
24014
24017
|
};
|
|
24015
24018
|
};
|
|
24016
|
-
const useStyle$
|
|
24019
|
+
const useStyle$p = genStyleHooks("Empty", (token2) => {
|
|
24017
24020
|
const {
|
|
24018
24021
|
componentCls,
|
|
24019
24022
|
controlHeightLG,
|
|
@@ -24027,7 +24030,7 @@ const useStyle$m = genStyleHooks("Empty", (token2) => {
|
|
|
24027
24030
|
});
|
|
24028
24031
|
return genSharedEmptyStyle(emptyToken);
|
|
24029
24032
|
});
|
|
24030
|
-
var __rest$
|
|
24033
|
+
var __rest$P = function(s2, e3) {
|
|
24031
24034
|
var t2 = {};
|
|
24032
24035
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
24033
24036
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -24050,7 +24053,7 @@ const Empty = (props) => {
|
|
|
24050
24053
|
style: style2,
|
|
24051
24054
|
classNames: emptyClassNames,
|
|
24052
24055
|
styles: styles2
|
|
24053
|
-
} = props, restProps = __rest$
|
|
24056
|
+
} = props, restProps = __rest$P(props, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]);
|
|
24054
24057
|
const {
|
|
24055
24058
|
getPrefixCls,
|
|
24056
24059
|
direction,
|
|
@@ -24061,7 +24064,7 @@ const Empty = (props) => {
|
|
|
24061
24064
|
image: contextImage
|
|
24062
24065
|
} = useComponentConfig("empty");
|
|
24063
24066
|
const prefixCls = getPrefixCls("empty", customizePrefixCls);
|
|
24064
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
24067
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$p(prefixCls);
|
|
24065
24068
|
const [locale2] = useLocale$1("Empty");
|
|
24066
24069
|
const des = typeof description !== "undefined" ? description : locale2 === null || locale2 === void 0 ? void 0 : locale2.description;
|
|
24067
24070
|
const alt = typeof des === "string" ? des : "empty";
|
|
@@ -24761,7 +24764,7 @@ function genSingleStyle(token2) {
|
|
|
24761
24764
|
}), "lg")
|
|
24762
24765
|
];
|
|
24763
24766
|
}
|
|
24764
|
-
const prepareComponentToken$
|
|
24767
|
+
const prepareComponentToken$i = (token2) => {
|
|
24765
24768
|
const {
|
|
24766
24769
|
fontSize,
|
|
24767
24770
|
lineHeight,
|
|
@@ -25080,7 +25083,7 @@ const getSearchInputWithoutBorderStyle = (token2) => {
|
|
|
25080
25083
|
}
|
|
25081
25084
|
};
|
|
25082
25085
|
};
|
|
25083
|
-
const genBaseStyle$
|
|
25086
|
+
const genBaseStyle$3 = (token2) => {
|
|
25084
25087
|
const {
|
|
25085
25088
|
antCls,
|
|
25086
25089
|
componentCls,
|
|
@@ -25233,7 +25236,7 @@ const genSelectStyle = (token2) => {
|
|
|
25233
25236
|
// == LTR ==
|
|
25234
25237
|
// =====================================================
|
|
25235
25238
|
// Base
|
|
25236
|
-
genBaseStyle$
|
|
25239
|
+
genBaseStyle$3(token2),
|
|
25237
25240
|
// Single
|
|
25238
25241
|
genSingleStyle(token2),
|
|
25239
25242
|
// Multiple
|
|
@@ -25267,7 +25270,7 @@ const useSelectStyle = genStyleHooks("Select", (token2, {
|
|
|
25267
25270
|
selectHeight: token2.controlHeight
|
|
25268
25271
|
});
|
|
25269
25272
|
return [genSelectStyle(selectToken), genVariantsStyle$1(selectToken)];
|
|
25270
|
-
}, prepareComponentToken$
|
|
25273
|
+
}, prepareComponentToken$i, {
|
|
25271
25274
|
unitless: {
|
|
25272
25275
|
optionLineHeight: true,
|
|
25273
25276
|
optionSelectedFontWeight: true
|
|
@@ -25280,9 +25283,9 @@ var CheckOutlined = function CheckOutlined2(props, ref) {
|
|
|
25280
25283
|
icon: CheckOutlined$1
|
|
25281
25284
|
}));
|
|
25282
25285
|
};
|
|
25283
|
-
var RefIcon$
|
|
25286
|
+
var RefIcon$w = /* @__PURE__ */ React.forwardRef(CheckOutlined);
|
|
25284
25287
|
if (process.env.NODE_ENV !== "production") {
|
|
25285
|
-
RefIcon$
|
|
25288
|
+
RefIcon$w.displayName = "CheckOutlined";
|
|
25286
25289
|
}
|
|
25287
25290
|
var DownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
25288
25291
|
var DownOutlined = function DownOutlined2(props, ref) {
|
|
@@ -25291,9 +25294,9 @@ var DownOutlined = function DownOutlined2(props, ref) {
|
|
|
25291
25294
|
icon: DownOutlined$1
|
|
25292
25295
|
}));
|
|
25293
25296
|
};
|
|
25294
|
-
var RefIcon$
|
|
25297
|
+
var RefIcon$v = /* @__PURE__ */ React.forwardRef(DownOutlined);
|
|
25295
25298
|
if (process.env.NODE_ENV !== "production") {
|
|
25296
|
-
RefIcon$
|
|
25299
|
+
RefIcon$v.displayName = "DownOutlined";
|
|
25297
25300
|
}
|
|
25298
25301
|
var SearchOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
|
|
25299
25302
|
var SearchOutlined = function SearchOutlined2(props, ref) {
|
|
@@ -25302,9 +25305,9 @@ var SearchOutlined = function SearchOutlined2(props, ref) {
|
|
|
25302
25305
|
icon: SearchOutlined$1
|
|
25303
25306
|
}));
|
|
25304
25307
|
};
|
|
25305
|
-
var RefIcon$
|
|
25308
|
+
var RefIcon$u = /* @__PURE__ */ React.forwardRef(SearchOutlined);
|
|
25306
25309
|
if (process.env.NODE_ENV !== "production") {
|
|
25307
|
-
RefIcon$
|
|
25310
|
+
RefIcon$u.displayName = "SearchOutlined";
|
|
25308
25311
|
}
|
|
25309
25312
|
function useIcons$1({
|
|
25310
25313
|
suffixIcon,
|
|
@@ -25324,7 +25327,7 @@ function useIcons$1({
|
|
|
25324
25327
|
const warning3 = devUseWarning(componentName);
|
|
25325
25328
|
warning3.deprecated(!clearIcon, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
25326
25329
|
}
|
|
25327
|
-
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$
|
|
25330
|
+
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$C, null);
|
|
25328
25331
|
const getSuffixIconNode = (arrowIcon) => {
|
|
25329
25332
|
if (suffixIcon === null && !hasFeedback && !showArrow) {
|
|
25330
25333
|
return null;
|
|
@@ -25335,7 +25338,7 @@ function useIcons$1({
|
|
|
25335
25338
|
if (suffixIcon !== void 0) {
|
|
25336
25339
|
mergedSuffixIcon = getSuffixIconNode(suffixIcon);
|
|
25337
25340
|
} else if (loading) {
|
|
25338
|
-
mergedSuffixIcon = getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$
|
|
25341
|
+
mergedSuffixIcon = getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$y, {
|
|
25339
25342
|
spin: true
|
|
25340
25343
|
}));
|
|
25341
25344
|
} else {
|
|
@@ -25345,11 +25348,11 @@ function useIcons$1({
|
|
|
25345
25348
|
showSearch
|
|
25346
25349
|
}) => {
|
|
25347
25350
|
if (open && showSearch) {
|
|
25348
|
-
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$
|
|
25351
|
+
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$u, {
|
|
25349
25352
|
className: iconCls
|
|
25350
25353
|
}));
|
|
25351
25354
|
}
|
|
25352
|
-
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$
|
|
25355
|
+
return getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$v, {
|
|
25353
25356
|
className: iconCls
|
|
25354
25357
|
}));
|
|
25355
25358
|
};
|
|
@@ -25358,7 +25361,7 @@ function useIcons$1({
|
|
|
25358
25361
|
if (menuItemSelectedIcon !== void 0) {
|
|
25359
25362
|
mergedItemIcon = menuItemSelectedIcon;
|
|
25360
25363
|
} else if (multiple) {
|
|
25361
|
-
mergedItemIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
25364
|
+
mergedItemIcon = /* @__PURE__ */ React.createElement(RefIcon$w, null);
|
|
25362
25365
|
} else {
|
|
25363
25366
|
mergedItemIcon = null;
|
|
25364
25367
|
}
|
|
@@ -25366,7 +25369,7 @@ function useIcons$1({
|
|
|
25366
25369
|
if (removeIcon !== void 0) {
|
|
25367
25370
|
mergedRemoveIcon = removeIcon;
|
|
25368
25371
|
} else {
|
|
25369
|
-
mergedRemoveIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
25372
|
+
mergedRemoveIcon = /* @__PURE__ */ React.createElement(RefIcon$B, null);
|
|
25370
25373
|
}
|
|
25371
25374
|
return {
|
|
25372
25375
|
clearIcon: mergedClearIcon,
|
|
@@ -25388,7 +25391,7 @@ function usePopupRender(renderFn) {
|
|
|
25388
25391
|
function useShowArrow(suffixIcon, showArrow) {
|
|
25389
25392
|
return showArrow !== void 0 ? showArrow : suffixIcon !== null;
|
|
25390
25393
|
}
|
|
25391
|
-
var __rest$
|
|
25394
|
+
var __rest$O = function(s2, e3) {
|
|
25392
25395
|
var t2 = {};
|
|
25393
25396
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
25394
25397
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -25432,7 +25435,7 @@ const InternalSelect = (props, ref) => {
|
|
|
25432
25435
|
onOpenChange,
|
|
25433
25436
|
styles: styles2,
|
|
25434
25437
|
classNames: classNames$1
|
|
25435
|
-
} = props, rest = __rest$
|
|
25438
|
+
} = props, rest = __rest$O(props, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix", "dropdownRender", "popupRender", "onDropdownVisibleChange", "onOpenChange", "styles", "classNames"]);
|
|
25436
25439
|
const {
|
|
25437
25440
|
getPopupContainer: getContextPopupContainer,
|
|
25438
25441
|
getPrefixCls,
|
|
@@ -25591,11 +25594,11 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
25591
25594
|
InternalSelect.displayName = "Select";
|
|
25592
25595
|
}
|
|
25593
25596
|
const Select = /* @__PURE__ */ React.forwardRef(InternalSelect);
|
|
25594
|
-
const PurePanel$
|
|
25597
|
+
const PurePanel$5 = genPurePanel(Select, "dropdownAlign");
|
|
25595
25598
|
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
|
|
25596
25599
|
Select.Option = Option$1;
|
|
25597
25600
|
Select.OptGroup = OptGroup;
|
|
25598
|
-
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$
|
|
25601
|
+
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$5;
|
|
25599
25602
|
if (process.env.NODE_ENV !== "production") {
|
|
25600
25603
|
Select.displayName = "Select";
|
|
25601
25604
|
}
|
|
@@ -25984,7 +25987,7 @@ function getArrowStyle(token2, colorBg, options) {
|
|
|
25984
25987
|
top: true,
|
|
25985
25988
|
bottom: true
|
|
25986
25989
|
}
|
|
25987
|
-
} = {};
|
|
25990
|
+
} = options || {};
|
|
25988
25991
|
return {
|
|
25989
25992
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({
|
|
25990
25993
|
// ============================ Basic ============================
|
|
@@ -26205,7 +26208,8 @@ function getPlacements(config2) {
|
|
|
26205
26208
|
autoAdjustOverflow: autoAdjustOverflow2,
|
|
26206
26209
|
arrowPointAtCenter,
|
|
26207
26210
|
offset: offset2,
|
|
26208
|
-
borderRadius
|
|
26211
|
+
borderRadius,
|
|
26212
|
+
visibleFirst
|
|
26209
26213
|
} = config2;
|
|
26210
26214
|
const halfArrowWidth = arrowWidth / 2;
|
|
26211
26215
|
const placementMap = {};
|
|
@@ -26266,7 +26270,7 @@ function getPlacements(config2) {
|
|
|
26266
26270
|
}
|
|
26267
26271
|
}
|
|
26268
26272
|
placementInfo.overflow = getOverflowOptions(key, arrowOffset, arrowWidth, autoAdjustOverflow2);
|
|
26269
|
-
{
|
|
26273
|
+
if (visibleFirst) {
|
|
26270
26274
|
placementInfo.htmlRegion = "visibleFirst";
|
|
26271
26275
|
}
|
|
26272
26276
|
});
|
|
@@ -26364,7 +26368,7 @@ const genTooltipStyle = (token2) => {
|
|
|
26364
26368
|
}
|
|
26365
26369
|
];
|
|
26366
26370
|
};
|
|
26367
|
-
const prepareComponentToken$
|
|
26371
|
+
const prepareComponentToken$h = (token2) => Object.assign(Object.assign({
|
|
26368
26372
|
zIndexPopup: token2.zIndexPopupBase + 70
|
|
26369
26373
|
}, getArrowOffsetToken({
|
|
26370
26374
|
contentRadius: token2.borderRadius,
|
|
@@ -26372,7 +26376,7 @@ const prepareComponentToken$e = (token2) => Object.assign(Object.assign({
|
|
|
26372
26376
|
})), getArrowToken(merge$1(token2, {
|
|
26373
26377
|
borderRadiusOuter: Math.min(token2.borderRadiusOuter, 4)
|
|
26374
26378
|
})));
|
|
26375
|
-
const useStyle$
|
|
26379
|
+
const useStyle$o = (prefixCls, injectStyle = true) => {
|
|
26376
26380
|
const useStyle2 = genStyleHooks("Tooltip", (token2) => {
|
|
26377
26381
|
const {
|
|
26378
26382
|
borderRadius,
|
|
@@ -26387,7 +26391,7 @@ const useStyle$l = (prefixCls, injectStyle = true) => {
|
|
|
26387
26391
|
tooltipBg: colorBgSpotlight
|
|
26388
26392
|
});
|
|
26389
26393
|
return [genTooltipStyle(TooltipToken), initZoomMotion(token2, "zoom-big-fast")];
|
|
26390
|
-
}, prepareComponentToken$
|
|
26394
|
+
}, prepareComponentToken$h, {
|
|
26391
26395
|
resetStyle: false,
|
|
26392
26396
|
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
26393
26397
|
injectStyle
|
|
@@ -26426,7 +26430,7 @@ function parseColor(prefixCls, color) {
|
|
|
26426
26430
|
arrowStyle
|
|
26427
26431
|
};
|
|
26428
26432
|
}
|
|
26429
|
-
const PurePanel$
|
|
26433
|
+
const PurePanel$4 = (props) => {
|
|
26430
26434
|
const {
|
|
26431
26435
|
prefixCls: customizePrefixCls,
|
|
26432
26436
|
className,
|
|
@@ -26439,7 +26443,7 @@ const PurePanel$3 = (props) => {
|
|
|
26439
26443
|
getPrefixCls
|
|
26440
26444
|
} = React.useContext(ConfigContext);
|
|
26441
26445
|
const prefixCls = getPrefixCls("tooltip", customizePrefixCls);
|
|
26442
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
26446
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
26443
26447
|
const colorInfo = parseColor(prefixCls, color);
|
|
26444
26448
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
26445
26449
|
const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);
|
|
@@ -26455,7 +26459,7 @@ const PurePanel$3 = (props) => {
|
|
|
26455
26459
|
overlayInnerStyle: formattedOverlayInnerStyle
|
|
26456
26460
|
}), title)));
|
|
26457
26461
|
};
|
|
26458
|
-
var __rest$
|
|
26462
|
+
var __rest$N = function(s2, e3) {
|
|
26459
26463
|
var t2 = {};
|
|
26460
26464
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
26461
26465
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -26492,7 +26496,7 @@ const InternalTooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
26492
26496
|
overlayClassName,
|
|
26493
26497
|
styles: styles2,
|
|
26494
26498
|
classNames: tooltipClassNames
|
|
26495
|
-
} = props, restProps = __rest$
|
|
26499
|
+
} = props, restProps = __rest$N(props, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "destroyOnHidden", "arrow", "title", "overlay", "builtinPlacements", "arrowPointAtCenter", "autoAdjustOverflow", "motion", "getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]);
|
|
26496
26500
|
const mergedShowArrow = !!arrow;
|
|
26497
26501
|
const [, token2] = useToken();
|
|
26498
26502
|
const {
|
|
@@ -26553,7 +26557,8 @@ const InternalTooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
26553
26557
|
autoAdjustOverflow: autoAdjustOverflow2,
|
|
26554
26558
|
arrowWidth: mergedShowArrow ? token2.sizePopupArrow : 0,
|
|
26555
26559
|
borderRadius: token2.borderRadius,
|
|
26556
|
-
offset: token2.marginXXS
|
|
26560
|
+
offset: token2.marginXXS,
|
|
26561
|
+
visibleFirst: true
|
|
26557
26562
|
});
|
|
26558
26563
|
}, [arrowPointAtCenter, arrow, builtinPlacements, token2]);
|
|
26559
26564
|
const memoOverlay = React.useMemo(() => {
|
|
@@ -26575,7 +26580,7 @@ const InternalTooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
26575
26580
|
const child = /* @__PURE__ */ React.isValidElement(children) && !isFragment(children) ? children : /* @__PURE__ */ React.createElement("span", null, children);
|
|
26576
26581
|
const childProps = child.props;
|
|
26577
26582
|
const childCls = !childProps.className || typeof childProps.className === "string" ? classNames(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;
|
|
26578
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
26583
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$o(prefixCls, !injectFromPopover);
|
|
26579
26584
|
const colorInfo = parseColor(prefixCls, color);
|
|
26580
26585
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
26581
26586
|
const rootClassNames = classNames(overlayClassName, {
|
|
@@ -26625,8 +26630,8 @@ const Tooltip2 = InternalTooltip;
|
|
|
26625
26630
|
if (process.env.NODE_ENV !== "production") {
|
|
26626
26631
|
Tooltip2.displayName = "Tooltip";
|
|
26627
26632
|
}
|
|
26628
|
-
Tooltip2._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$
|
|
26629
|
-
const genBaseStyle$
|
|
26633
|
+
Tooltip2._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$4;
|
|
26634
|
+
const genBaseStyle$2 = (token2) => {
|
|
26630
26635
|
const {
|
|
26631
26636
|
componentCls,
|
|
26632
26637
|
popoverColor,
|
|
@@ -26733,7 +26738,7 @@ const genColorStyle = (token2) => {
|
|
|
26733
26738
|
})
|
|
26734
26739
|
};
|
|
26735
26740
|
};
|
|
26736
|
-
const prepareComponentToken$
|
|
26741
|
+
const prepareComponentToken$g = (token2) => {
|
|
26737
26742
|
const {
|
|
26738
26743
|
lineWidth,
|
|
26739
26744
|
controlHeight,
|
|
@@ -26766,7 +26771,7 @@ const prepareComponentToken$d = (token2) => {
|
|
|
26766
26771
|
innerContentPadding: wireframe ? `${paddingSM}px ${popoverPaddingHorizontal}px` : 0
|
|
26767
26772
|
});
|
|
26768
26773
|
};
|
|
26769
|
-
const useStyle$
|
|
26774
|
+
const useStyle$n = genStyleHooks("Popover", (token2) => {
|
|
26770
26775
|
const {
|
|
26771
26776
|
colorBgElevated,
|
|
26772
26777
|
colorText
|
|
@@ -26775,12 +26780,12 @@ const useStyle$k = genStyleHooks("Popover", (token2) => {
|
|
|
26775
26780
|
popoverBg: colorBgElevated,
|
|
26776
26781
|
popoverColor: colorText
|
|
26777
26782
|
});
|
|
26778
|
-
return [genBaseStyle$
|
|
26779
|
-
}, prepareComponentToken$
|
|
26783
|
+
return [genBaseStyle$2(popoverToken), genColorStyle(popoverToken), initZoomMotion(popoverToken, "zoom-big")];
|
|
26784
|
+
}, prepareComponentToken$g, {
|
|
26780
26785
|
resetStyle: false,
|
|
26781
26786
|
deprecatedTokens: [["width", "titleMinWidth"], ["minWidth", "titleMinWidth"]]
|
|
26782
26787
|
});
|
|
26783
|
-
var __rest$
|
|
26788
|
+
var __rest$M = function(s2, e3) {
|
|
26784
26789
|
var t2 = {};
|
|
26785
26790
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
26786
26791
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -26830,23 +26835,23 @@ const RawPurePanel = (props) => {
|
|
|
26830
26835
|
content: contentNode
|
|
26831
26836
|
})));
|
|
26832
26837
|
};
|
|
26833
|
-
const PurePanel$
|
|
26838
|
+
const PurePanel$3 = (props) => {
|
|
26834
26839
|
const {
|
|
26835
26840
|
prefixCls: customizePrefixCls,
|
|
26836
26841
|
className
|
|
26837
|
-
} = props, restProps = __rest$
|
|
26842
|
+
} = props, restProps = __rest$M(props, ["prefixCls", "className"]);
|
|
26838
26843
|
const {
|
|
26839
26844
|
getPrefixCls
|
|
26840
26845
|
} = React.useContext(ConfigContext);
|
|
26841
26846
|
const prefixCls = getPrefixCls("popover", customizePrefixCls);
|
|
26842
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
26847
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$n(prefixCls);
|
|
26843
26848
|
return wrapCSSVar(/* @__PURE__ */ React.createElement(RawPurePanel, Object.assign({}, restProps, {
|
|
26844
26849
|
prefixCls,
|
|
26845
26850
|
hashId,
|
|
26846
26851
|
className: classNames(className, cssVarCls)
|
|
26847
26852
|
})));
|
|
26848
26853
|
};
|
|
26849
|
-
var __rest$
|
|
26854
|
+
var __rest$L = function(s2, e3) {
|
|
26850
26855
|
var t2 = {};
|
|
26851
26856
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
26852
26857
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -26870,7 +26875,7 @@ const InternalPopover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
26870
26875
|
overlayStyle = {},
|
|
26871
26876
|
styles: styles2,
|
|
26872
26877
|
classNames: popoverClassNames
|
|
26873
|
-
} = props, otherProps = __rest$
|
|
26878
|
+
} = props, otherProps = __rest$L(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle", "styles", "classNames"]);
|
|
26874
26879
|
const {
|
|
26875
26880
|
getPrefixCls,
|
|
26876
26881
|
className: contextClassName,
|
|
@@ -26879,7 +26884,7 @@ const InternalPopover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
26879
26884
|
styles: contextStyles
|
|
26880
26885
|
} = useComponentConfig("popover");
|
|
26881
26886
|
const prefixCls = getPrefixCls("popover", customizePrefixCls);
|
|
26882
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
26887
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$n(prefixCls);
|
|
26883
26888
|
const rootPrefixCls = getPrefixCls();
|
|
26884
26889
|
const rootClassNames = classNames(overlayClassName, hashId, cssVarCls, contextClassName, contextClassNames.root, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.root);
|
|
26885
26890
|
const bodyClassNames = classNames(contextClassNames.body, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.body);
|
|
@@ -26937,7 +26942,7 @@ const InternalPopover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
26937
26942
|
})));
|
|
26938
26943
|
});
|
|
26939
26944
|
const Popover = InternalPopover;
|
|
26940
|
-
Popover._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$
|
|
26945
|
+
Popover._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$3;
|
|
26941
26946
|
if (process.env.NODE_ENV !== "production") {
|
|
26942
26947
|
Popover.displayName = "Popover";
|
|
26943
26948
|
}
|
|
@@ -27241,7 +27246,7 @@ const prepareToken$3 = (token2) => {
|
|
|
27241
27246
|
});
|
|
27242
27247
|
return badgeToken;
|
|
27243
27248
|
};
|
|
27244
|
-
const prepareComponentToken$
|
|
27249
|
+
const prepareComponentToken$f = (token2) => {
|
|
27245
27250
|
const {
|
|
27246
27251
|
fontSize,
|
|
27247
27252
|
lineHeight,
|
|
@@ -27259,10 +27264,10 @@ const prepareComponentToken$c = (token2) => {
|
|
|
27259
27264
|
statusSize: fontSizeSM / 2
|
|
27260
27265
|
};
|
|
27261
27266
|
};
|
|
27262
|
-
const useStyle$
|
|
27267
|
+
const useStyle$m = genStyleHooks("Badge", (token2) => {
|
|
27263
27268
|
const badgeToken = prepareToken$3(token2);
|
|
27264
27269
|
return genSharedBadgeStyle(badgeToken);
|
|
27265
|
-
}, prepareComponentToken$
|
|
27270
|
+
}, prepareComponentToken$f);
|
|
27266
27271
|
const genRibbonStyle = (token2) => {
|
|
27267
27272
|
const {
|
|
27268
27273
|
antCls,
|
|
@@ -27334,10 +27339,10 @@ const genRibbonStyle = (token2) => {
|
|
|
27334
27339
|
})
|
|
27335
27340
|
};
|
|
27336
27341
|
};
|
|
27337
|
-
const useStyle$
|
|
27342
|
+
const useStyle$l = genStyleHooks(["Badge", "Ribbon"], (token2) => {
|
|
27338
27343
|
const badgeToken = prepareToken$3(token2);
|
|
27339
27344
|
return genRibbonStyle(badgeToken);
|
|
27340
|
-
}, prepareComponentToken$
|
|
27345
|
+
}, prepareComponentToken$f);
|
|
27341
27346
|
const Ribbon = (props) => {
|
|
27342
27347
|
const {
|
|
27343
27348
|
className,
|
|
@@ -27355,7 +27360,7 @@ const Ribbon = (props) => {
|
|
|
27355
27360
|
} = React.useContext(ConfigContext);
|
|
27356
27361
|
const prefixCls = getPrefixCls("ribbon", customizePrefixCls);
|
|
27357
27362
|
const wrapperCls = `${prefixCls}-wrapper`;
|
|
27358
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
27363
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$l(prefixCls, wrapperCls);
|
|
27359
27364
|
const colorInPreset = isPresetColor(color, false);
|
|
27360
27365
|
const ribbonCls = classNames(prefixCls, `${prefixCls}-placement-${placement}`, {
|
|
27361
27366
|
[`${prefixCls}-rtl`]: direction === "rtl",
|
|
@@ -27470,7 +27475,7 @@ const SingleNumber = (props) => {
|
|
|
27470
27475
|
onTransitionEnd
|
|
27471
27476
|
}, unitNodes);
|
|
27472
27477
|
};
|
|
27473
|
-
var __rest$
|
|
27478
|
+
var __rest$K = function(s2, e3) {
|
|
27474
27479
|
var t2 = {};
|
|
27475
27480
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
27476
27481
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -27489,7 +27494,7 @@ const ScrollNumber = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
27489
27494
|
show,
|
|
27490
27495
|
component: Component = "sup",
|
|
27491
27496
|
children
|
|
27492
|
-
} = props, restProps = __rest$
|
|
27497
|
+
} = props, restProps = __rest$K(props, ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"]);
|
|
27493
27498
|
const {
|
|
27494
27499
|
getPrefixCls
|
|
27495
27500
|
} = React.useContext(ConfigContext);
|
|
@@ -27525,7 +27530,7 @@ const ScrollNumber = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
27525
27530
|
ref
|
|
27526
27531
|
}), numberNodes);
|
|
27527
27532
|
});
|
|
27528
|
-
var __rest$
|
|
27533
|
+
var __rest$J = function(s2, e3) {
|
|
27529
27534
|
var t2 = {};
|
|
27530
27535
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
27531
27536
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -27554,14 +27559,14 @@ const InternalBadge = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
27554
27559
|
classNames: classNames$1,
|
|
27555
27560
|
styles: styles2,
|
|
27556
27561
|
showZero = false
|
|
27557
|
-
} = props, restProps = __rest$
|
|
27562
|
+
} = props, restProps = __rest$J(props, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "rootClassName", "classNames", "styles", "showZero"]);
|
|
27558
27563
|
const {
|
|
27559
27564
|
getPrefixCls,
|
|
27560
27565
|
direction,
|
|
27561
27566
|
badge
|
|
27562
27567
|
} = React.useContext(ConfigContext);
|
|
27563
27568
|
const prefixCls = getPrefixCls("badge", customizePrefixCls);
|
|
27564
|
-
const [wrapCSSVar, hashId, cssVarCls] = useStyle$
|
|
27569
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$m(prefixCls);
|
|
27565
27570
|
const numberedDisplayCount = count > overflowCount ? `${overflowCount}+` : count;
|
|
27566
27571
|
const isZero = numberedDisplayCount === "0" || numberedDisplayCount === 0 || text === "0" || text === 0;
|
|
27567
27572
|
const ignoreCount = count === null || isZero && !showZero;
|
|
@@ -27693,9 +27698,9 @@ var LeftOutlined = function LeftOutlined2(props, ref) {
|
|
|
27693
27698
|
icon: LeftOutlined$1
|
|
27694
27699
|
}));
|
|
27695
27700
|
};
|
|
27696
|
-
var RefIcon$
|
|
27701
|
+
var RefIcon$t = /* @__PURE__ */ React.forwardRef(LeftOutlined);
|
|
27697
27702
|
if (process.env.NODE_ENV !== "production") {
|
|
27698
|
-
RefIcon$
|
|
27703
|
+
RefIcon$t.displayName = "LeftOutlined";
|
|
27699
27704
|
}
|
|
27700
27705
|
var ESC$1 = KeyCode.ESC, TAB = KeyCode.TAB;
|
|
27701
27706
|
function useAccessibility$1(_ref) {
|
|
@@ -27814,7 +27819,7 @@ var placements$1 = {
|
|
|
27814
27819
|
}
|
|
27815
27820
|
};
|
|
27816
27821
|
var _excluded$n = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
|
|
27817
|
-
function Dropdown(props, ref) {
|
|
27822
|
+
function Dropdown$2(props, ref) {
|
|
27818
27823
|
var _children$props;
|
|
27819
27824
|
var _props$arrow = props.arrow, arrow = _props$arrow === void 0 ? false : _props$arrow, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-dropdown" : _props$prefixCls, transitionName = props.transitionName, animation = props.animation, align = props.align, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottomLeft" : _props$placement, _props$placements = props.placements, placements2 = _props$placements === void 0 ? placements$1 : _props$placements, getPopupContainer = props.getPopupContainer, showAction = props.showAction, hideAction = props.hideAction, overlayClassName = props.overlayClassName, overlayStyle = props.overlayStyle, visible = props.visible, _props$trigger = props.trigger, trigger = _props$trigger === void 0 ? ["hover"] : _props$trigger, autoFocus = props.autoFocus, overlay = props.overlay, children = props.children, onVisibleChange = props.onVisibleChange, otherProps = _objectWithoutProperties$1(props, _excluded$n);
|
|
27820
27825
|
var _React$useState = React__default.useState(), _React$useState2 = _slicedToArray$1(_React$useState, 2), triggerVisible = _React$useState2[0], setTriggerVisible = _React$useState2[1];
|
|
@@ -27901,7 +27906,8 @@ function Dropdown(props, ref) {
|
|
|
27901
27906
|
getPopupContainer
|
|
27902
27907
|
}), childrenNode);
|
|
27903
27908
|
}
|
|
27904
|
-
const Dropdown$
|
|
27909
|
+
const Dropdown$3 = /* @__PURE__ */ React__default.forwardRef(Dropdown$2);
|
|
27910
|
+
const isPrimitive = (value) => typeof value !== "object" && typeof value !== "function" || value === null;
|
|
27905
27911
|
var IdContext = /* @__PURE__ */ React.createContext(null);
|
|
27906
27912
|
function getMenuId(uuid2, eventKey) {
|
|
27907
27913
|
if (uuid2 === void 0) {
|
|
@@ -27914,7 +27920,7 @@ function useMenuId(eventKey) {
|
|
|
27914
27920
|
return getMenuId(id2, eventKey);
|
|
27915
27921
|
}
|
|
27916
27922
|
var _excluded$m = ["children", "locked"];
|
|
27917
|
-
var MenuContext = /* @__PURE__ */ React.createContext(null);
|
|
27923
|
+
var MenuContext$1 = /* @__PURE__ */ React.createContext(null);
|
|
27918
27924
|
function mergeProps(origin, target) {
|
|
27919
27925
|
var clone = _objectSpread2$2({}, origin);
|
|
27920
27926
|
Object.keys(target).forEach(function(key) {
|
|
@@ -27927,13 +27933,13 @@ function mergeProps(origin, target) {
|
|
|
27927
27933
|
}
|
|
27928
27934
|
function InheritableContextProvider(_ref) {
|
|
27929
27935
|
var children = _ref.children, locked = _ref.locked, restProps = _objectWithoutProperties$1(_ref, _excluded$m);
|
|
27930
|
-
var context = React.useContext(MenuContext);
|
|
27936
|
+
var context = React.useContext(MenuContext$1);
|
|
27931
27937
|
var inheritableContext = useMemo(function() {
|
|
27932
27938
|
return mergeProps(context, restProps);
|
|
27933
27939
|
}, [context, restProps], function(prev2, next2) {
|
|
27934
27940
|
return !locked && (prev2[0] !== next2[0] || !isEqual$1(prev2[1], next2[1], true));
|
|
27935
27941
|
});
|
|
27936
|
-
return /* @__PURE__ */ React.createElement(MenuContext.Provider, {
|
|
27942
|
+
return /* @__PURE__ */ React.createElement(MenuContext$1.Provider, {
|
|
27937
27943
|
value: inheritableContext
|
|
27938
27944
|
}, children);
|
|
27939
27945
|
}
|
|
@@ -28309,7 +28315,7 @@ function useUUID(id2) {
|
|
|
28309
28315
|
return uuid2;
|
|
28310
28316
|
}
|
|
28311
28317
|
function useActive(eventKey, disabled2, onMouseEnter, onMouseLeave) {
|
|
28312
|
-
var _React$useContext = React.useContext(MenuContext), activeKey = _React$useContext.activeKey, onActive = _React$useContext.onActive, onInactive = _React$useContext.onInactive;
|
|
28318
|
+
var _React$useContext = React.useContext(MenuContext$1), activeKey = _React$useContext.activeKey, onActive = _React$useContext.onActive, onInactive = _React$useContext.onInactive;
|
|
28313
28319
|
var ret = {
|
|
28314
28320
|
active: activeKey === eventKey
|
|
28315
28321
|
};
|
|
@@ -28332,7 +28338,7 @@ function useActive(eventKey, disabled2, onMouseEnter, onMouseLeave) {
|
|
|
28332
28338
|
return ret;
|
|
28333
28339
|
}
|
|
28334
28340
|
function useDirectionStyle(level) {
|
|
28335
|
-
var _React$useContext = React.useContext(MenuContext), mode = _React$useContext.mode, rtl = _React$useContext.rtl, inlineIndent = _React$useContext.inlineIndent;
|
|
28341
|
+
var _React$useContext = React.useContext(MenuContext$1), mode = _React$useContext.mode, rtl = _React$useContext.rtl, inlineIndent = _React$useContext.inlineIndent;
|
|
28336
28342
|
if (mode !== "inline") {
|
|
28337
28343
|
return null;
|
|
28338
28344
|
}
|
|
@@ -28393,7 +28399,7 @@ var LegacyMenuItem = /* @__PURE__ */ (function(_React$Component) {
|
|
|
28393
28399
|
var InternalMenuItem = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
28394
28400
|
var style2 = props.style, className = props.className, eventKey = props.eventKey, warnKey = props.warnKey, disabled2 = props.disabled, itemIcon = props.itemIcon, children = props.children, role = props.role, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onClick = props.onClick, onKeyDown = props.onKeyDown, onFocus = props.onFocus, restProps = _objectWithoutProperties$1(props, _excluded2$4);
|
|
28395
28401
|
var domDataId = useMenuId(eventKey);
|
|
28396
|
-
var _React$useContext = React.useContext(MenuContext), prefixCls = _React$useContext.prefixCls, onItemClick = _React$useContext.onItemClick, contextDisabled = _React$useContext.disabled, overflowDisabled = _React$useContext.overflowDisabled, contextItemIcon = _React$useContext.itemIcon, selectedKeys = _React$useContext.selectedKeys, onActive = _React$useContext.onActive;
|
|
28402
|
+
var _React$useContext = React.useContext(MenuContext$1), prefixCls = _React$useContext.prefixCls, onItemClick = _React$useContext.onItemClick, contextDisabled = _React$useContext.disabled, overflowDisabled = _React$useContext.overflowDisabled, contextItemIcon = _React$useContext.itemIcon, selectedKeys = _React$useContext.selectedKeys, onActive = _React$useContext.onActive;
|
|
28397
28403
|
var _React$useContext2 = React.useContext(PrivateContext), _internalRenderMenuItem = _React$useContext2._internalRenderMenuItem;
|
|
28398
28404
|
var itemCls = "".concat(prefixCls, "-item");
|
|
28399
28405
|
var legacyMenuItemRef = React.useRef();
|
|
@@ -28468,7 +28474,7 @@ var InternalMenuItem = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
28468
28474
|
}
|
|
28469
28475
|
return renderNode;
|
|
28470
28476
|
});
|
|
28471
|
-
function MenuItem$
|
|
28477
|
+
function MenuItem$2(props, ref) {
|
|
28472
28478
|
var eventKey = props.eventKey;
|
|
28473
28479
|
var measure = useMeasure();
|
|
28474
28480
|
var connectedKeyPath = useFullPath(eventKey);
|
|
@@ -28487,11 +28493,11 @@ function MenuItem$1(props, ref) {
|
|
|
28487
28493
|
ref
|
|
28488
28494
|
}));
|
|
28489
28495
|
}
|
|
28490
|
-
const MenuItem$
|
|
28496
|
+
const MenuItem$3 = /* @__PURE__ */ React.forwardRef(MenuItem$2);
|
|
28491
28497
|
var _excluded$j = ["className", "children"];
|
|
28492
28498
|
var InternalSubMenuList = function InternalSubMenuList2(_ref, ref) {
|
|
28493
28499
|
var className = _ref.className, children = _ref.children, restProps = _objectWithoutProperties$1(_ref, _excluded$j);
|
|
28494
|
-
var _React$useContext = React.useContext(MenuContext), prefixCls = _React$useContext.prefixCls, mode = _React$useContext.mode, rtl = _React$useContext.rtl;
|
|
28500
|
+
var _React$useContext = React.useContext(MenuContext$1), prefixCls = _React$useContext.prefixCls, mode = _React$useContext.mode, rtl = _React$useContext.rtl;
|
|
28495
28501
|
return /* @__PURE__ */ React.createElement("ul", _extends$1({
|
|
28496
28502
|
className: classNames(prefixCls, rtl && "".concat(prefixCls, "-rtl"), "".concat(prefixCls, "-sub"), "".concat(prefixCls, "-").concat(mode === "inline" ? "inline" : "vertical"), className),
|
|
28497
28503
|
role: "menu"
|
|
@@ -28613,7 +28619,7 @@ var popupPlacementMap = {
|
|
|
28613
28619
|
};
|
|
28614
28620
|
function PopupTrigger(_ref) {
|
|
28615
28621
|
var prefixCls = _ref.prefixCls, visible = _ref.visible, children = _ref.children, popup = _ref.popup, popupStyle = _ref.popupStyle, popupClassName = _ref.popupClassName, popupOffset = _ref.popupOffset, disabled2 = _ref.disabled, mode = _ref.mode, onVisibleChange = _ref.onVisibleChange;
|
|
28616
|
-
var _React$useContext = React.useContext(MenuContext), getPopupContainer = _React$useContext.getPopupContainer, rtl = _React$useContext.rtl, subMenuOpenDelay = _React$useContext.subMenuOpenDelay, subMenuCloseDelay = _React$useContext.subMenuCloseDelay, builtinPlacements = _React$useContext.builtinPlacements, triggerSubMenuAction = _React$useContext.triggerSubMenuAction, forceSubMenuRender = _React$useContext.forceSubMenuRender, rootClassName = _React$useContext.rootClassName, motion2 = _React$useContext.motion, defaultMotions = _React$useContext.defaultMotions;
|
|
28622
|
+
var _React$useContext = React.useContext(MenuContext$1), getPopupContainer = _React$useContext.getPopupContainer, rtl = _React$useContext.rtl, subMenuOpenDelay = _React$useContext.subMenuOpenDelay, subMenuCloseDelay = _React$useContext.subMenuCloseDelay, builtinPlacements = _React$useContext.builtinPlacements, triggerSubMenuAction = _React$useContext.triggerSubMenuAction, forceSubMenuRender = _React$useContext.forceSubMenuRender, rootClassName = _React$useContext.rootClassName, motion2 = _React$useContext.motion, defaultMotions = _React$useContext.defaultMotions;
|
|
28617
28623
|
var _React$useState = React.useState(false), _React$useState2 = _slicedToArray$1(_React$useState, 2), innerVisible = _React$useState2[0], setInnerVisible = _React$useState2[1];
|
|
28618
28624
|
var placement = rtl ? _objectSpread2$2(_objectSpread2$2({}, placementsRtl), builtinPlacements) : _objectSpread2$2(_objectSpread2$2({}, placements), builtinPlacements);
|
|
28619
28625
|
var popupPlacement = popupPlacementMap[mode];
|
|
@@ -28661,7 +28667,7 @@ function PopupTrigger(_ref) {
|
|
|
28661
28667
|
function InlineSubMenuList(_ref) {
|
|
28662
28668
|
var id2 = _ref.id, open = _ref.open, keyPath = _ref.keyPath, children = _ref.children;
|
|
28663
28669
|
var fixedMode = "inline";
|
|
28664
|
-
var _React$useContext = React.useContext(MenuContext), prefixCls = _React$useContext.prefixCls, forceSubMenuRender = _React$useContext.forceSubMenuRender, motion2 = _React$useContext.motion, defaultMotions = _React$useContext.defaultMotions, mode = _React$useContext.mode;
|
|
28670
|
+
var _React$useContext = React.useContext(MenuContext$1), prefixCls = _React$useContext.prefixCls, forceSubMenuRender = _React$useContext.forceSubMenuRender, motion2 = _React$useContext.motion, defaultMotions = _React$useContext.defaultMotions, mode = _React$useContext.mode;
|
|
28665
28671
|
var sameModeRef = React.useRef(false);
|
|
28666
28672
|
sameModeRef.current = mode === fixedMode;
|
|
28667
28673
|
var _React$useState = React.useState(!sameModeRef.current), _React$useState2 = _slicedToArray$1(_React$useState, 2), destroy = _React$useState2[0], setDestroy = _React$useState2[1];
|
|
@@ -28707,7 +28713,7 @@ var _excluded$i = ["style", "className", "title", "eventKey", "warnKey", "disabl
|
|
|
28707
28713
|
var InternalSubMenu = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
28708
28714
|
var style2 = props.style, className = props.className, title = props.title, eventKey = props.eventKey, warnKey = props.warnKey, disabled2 = props.disabled, internalPopupClose = props.internalPopupClose, children = props.children, itemIcon = props.itemIcon, expandIcon = props.expandIcon, popupClassName = props.popupClassName, popupOffset = props.popupOffset, popupStyle = props.popupStyle, onClick = props.onClick, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onTitleClick = props.onTitleClick, onTitleMouseEnter = props.onTitleMouseEnter, onTitleMouseLeave = props.onTitleMouseLeave, restProps = _objectWithoutProperties$1(props, _excluded$i);
|
|
28709
28715
|
var domDataId = useMenuId(eventKey);
|
|
28710
|
-
var _React$useContext = React.useContext(MenuContext), prefixCls = _React$useContext.prefixCls, mode = _React$useContext.mode, openKeys = _React$useContext.openKeys, contextDisabled = _React$useContext.disabled, overflowDisabled = _React$useContext.overflowDisabled, activeKey = _React$useContext.activeKey, selectedKeys = _React$useContext.selectedKeys, contextItemIcon = _React$useContext.itemIcon, contextExpandIcon = _React$useContext.expandIcon, onItemClick = _React$useContext.onItemClick, onOpenChange = _React$useContext.onOpenChange, onActive = _React$useContext.onActive;
|
|
28716
|
+
var _React$useContext = React.useContext(MenuContext$1), prefixCls = _React$useContext.prefixCls, mode = _React$useContext.mode, openKeys = _React$useContext.openKeys, contextDisabled = _React$useContext.disabled, overflowDisabled = _React$useContext.overflowDisabled, activeKey = _React$useContext.activeKey, selectedKeys = _React$useContext.selectedKeys, contextItemIcon = _React$useContext.itemIcon, contextExpandIcon = _React$useContext.expandIcon, onItemClick = _React$useContext.onItemClick, onOpenChange = _React$useContext.onOpenChange, onActive = _React$useContext.onActive;
|
|
28711
28717
|
var _React$useContext2 = React.useContext(PrivateContext), _internalRenderSubMenuItem = _React$useContext2._internalRenderSubMenuItem;
|
|
28712
28718
|
var _React$useContext3 = React.useContext(PathUserContext), isSubPathKey = _React$useContext3.isSubPathKey;
|
|
28713
28719
|
var connectedPath = useFullPath();
|
|
@@ -28864,7 +28870,7 @@ var InternalSubMenu = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
28864
28870
|
expandIcon: mergedExpandIcon
|
|
28865
28871
|
}, listNode);
|
|
28866
28872
|
});
|
|
28867
|
-
var SubMenu = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
28873
|
+
var SubMenu$1 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
28868
28874
|
var eventKey = props.eventKey, children = props.children;
|
|
28869
28875
|
var connectedKeyPath = useFullPath(eventKey);
|
|
28870
28876
|
var childList = parseChildren(children, connectedKeyPath);
|
|
@@ -28890,11 +28896,11 @@ var SubMenu = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
28890
28896
|
}, renderNode);
|
|
28891
28897
|
});
|
|
28892
28898
|
if (process.env.NODE_ENV !== "production") {
|
|
28893
|
-
SubMenu.displayName = "SubMenu";
|
|
28899
|
+
SubMenu$1.displayName = "SubMenu";
|
|
28894
28900
|
}
|
|
28895
28901
|
function Divider$1(_ref) {
|
|
28896
28902
|
var className = _ref.className, style2 = _ref.style;
|
|
28897
|
-
var _React$useContext = React.useContext(MenuContext), prefixCls = _React$useContext.prefixCls;
|
|
28903
|
+
var _React$useContext = React.useContext(MenuContext$1), prefixCls = _React$useContext.prefixCls;
|
|
28898
28904
|
var measure = useMeasure();
|
|
28899
28905
|
if (measure) {
|
|
28900
28906
|
return null;
|
|
@@ -28910,7 +28916,7 @@ var InternalMenuItemGroup = /* @__PURE__ */ React.forwardRef(function(props, ref
|
|
|
28910
28916
|
var className = props.className, title = props.title;
|
|
28911
28917
|
props.eventKey;
|
|
28912
28918
|
var children = props.children, restProps = _objectWithoutProperties$1(props, _excluded$h);
|
|
28913
|
-
var _React$useContext = React.useContext(MenuContext), prefixCls = _React$useContext.prefixCls;
|
|
28919
|
+
var _React$useContext = React.useContext(MenuContext$1), prefixCls = _React$useContext.prefixCls;
|
|
28914
28920
|
var groupPrefixCls = "".concat(prefixCls, "-item-group");
|
|
28915
28921
|
return /* @__PURE__ */ React.createElement("li", _extends$1({
|
|
28916
28922
|
ref,
|
|
@@ -28987,9 +28993,9 @@ function parseItems(children, items, keyPath, components, prefixCls) {
|
|
|
28987
28993
|
var childNodes = children;
|
|
28988
28994
|
var mergedComponents = _objectSpread2$2({
|
|
28989
28995
|
divider: Divider$1,
|
|
28990
|
-
item: MenuItem$
|
|
28996
|
+
item: MenuItem$3,
|
|
28991
28997
|
group: MenuItemGroup,
|
|
28992
|
-
submenu: SubMenu
|
|
28998
|
+
submenu: SubMenu$1
|
|
28993
28999
|
}, components);
|
|
28994
29000
|
if (items) {
|
|
28995
29001
|
childNodes = convertItemsToNodes(items, mergedComponents, prefixCls);
|
|
@@ -28998,7 +29004,7 @@ function parseItems(children, items, keyPath, components, prefixCls) {
|
|
|
28998
29004
|
}
|
|
28999
29005
|
var _excluded$f = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"];
|
|
29000
29006
|
var EMPTY_LIST$2 = [];
|
|
29001
|
-
var Menu$
|
|
29007
|
+
var Menu$2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
29002
29008
|
var _childList$;
|
|
29003
29009
|
var _ref = props, _ref$prefixCls = _ref.prefixCls, prefixCls = _ref$prefixCls === void 0 ? "rc-menu" : _ref$prefixCls, rootClassName = _ref.rootClassName, style2 = _ref.style, className = _ref.className, _ref$tabIndex = _ref.tabIndex, tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex, items = _ref.items, children = _ref.children, direction = _ref.direction, id2 = _ref.id, _ref$mode = _ref.mode, mode = _ref$mode === void 0 ? "vertical" : _ref$mode, inlineCollapsed = _ref.inlineCollapsed, disabled2 = _ref.disabled, disabledOverflow = _ref.disabledOverflow, _ref$subMenuOpenDelay = _ref.subMenuOpenDelay, subMenuOpenDelay = _ref$subMenuOpenDelay === void 0 ? 0.1 : _ref$subMenuOpenDelay, _ref$subMenuCloseDela = _ref.subMenuCloseDelay, subMenuCloseDelay = _ref$subMenuCloseDela === void 0 ? 0.1 : _ref$subMenuCloseDela, forceSubMenuRender = _ref.forceSubMenuRender, defaultOpenKeys = _ref.defaultOpenKeys, openKeys = _ref.openKeys, activeKey = _ref.activeKey, defaultActiveFirst = _ref.defaultActiveFirst, _ref$selectable = _ref.selectable, selectable = _ref$selectable === void 0 ? true : _ref$selectable, _ref$multiple = _ref.multiple, multiple = _ref$multiple === void 0 ? false : _ref$multiple, defaultSelectedKeys = _ref.defaultSelectedKeys, selectedKeys = _ref.selectedKeys, onSelect = _ref.onSelect, onDeselect = _ref.onDeselect, _ref$inlineIndent = _ref.inlineIndent, inlineIndent = _ref$inlineIndent === void 0 ? 24 : _ref$inlineIndent, motion2 = _ref.motion, defaultMotions = _ref.defaultMotions, _ref$triggerSubMenuAc = _ref.triggerSubMenuAction, triggerSubMenuAction = _ref$triggerSubMenuAc === void 0 ? "hover" : _ref$triggerSubMenuAc, builtinPlacements = _ref.builtinPlacements, itemIcon = _ref.itemIcon, expandIcon = _ref.expandIcon, _ref$overflowedIndica = _ref.overflowedIndicator, overflowedIndicator = _ref$overflowedIndica === void 0 ? "..." : _ref$overflowedIndica, overflowedIndicatorPopupClassName = _ref.overflowedIndicatorPopupClassName, getPopupContainer = _ref.getPopupContainer, onClick = _ref.onClick, onOpenChange = _ref.onOpenChange, onKeyDown = _ref.onKeyDown, openAnimation = _ref.openAnimation, openTransitionName = _ref.openTransitionName, _internalRenderMenuItem = _ref._internalRenderMenuItem, _internalRenderSubMenuItem = _ref._internalRenderSubMenuItem, _internalComponents = _ref._internalComponents, restProps = _objectWithoutProperties$1(_ref, _excluded$f);
|
|
29004
29010
|
var _React$useMemo = React.useMemo(function() {
|
|
@@ -29204,7 +29210,7 @@ var Menu$1 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
29204
29210
|
ref: containerRef,
|
|
29205
29211
|
prefixCls: "".concat(prefixCls, "-overflow"),
|
|
29206
29212
|
component: "ul",
|
|
29207
|
-
itemComponent: MenuItem$
|
|
29213
|
+
itemComponent: MenuItem$3,
|
|
29208
29214
|
className: classNames(prefixCls, "".concat(prefixCls, "-root"), "".concat(prefixCls, "-").concat(internalMode), className, _defineProperty$3(_defineProperty$3({}, "".concat(prefixCls, "-inline-collapsed"), internalInlineCollapsed), "".concat(prefixCls, "-rtl"), isRtl), rootClassName),
|
|
29209
29215
|
dir: direction,
|
|
29210
29216
|
style: style2,
|
|
@@ -29217,7 +29223,7 @@ var Menu$1 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
29217
29223
|
renderRawRest: function renderRawRest(omitItems) {
|
|
29218
29224
|
var len = omitItems.length;
|
|
29219
29225
|
var originOmitItems = len ? childList.slice(-len) : null;
|
|
29220
|
-
return /* @__PURE__ */ React.createElement(SubMenu, {
|
|
29226
|
+
return /* @__PURE__ */ React.createElement(SubMenu$1, {
|
|
29221
29227
|
eventKey: OVERFLOW_KEY,
|
|
29222
29228
|
title: overflowedIndicator,
|
|
29223
29229
|
disabled: allVisible,
|
|
@@ -29272,11 +29278,395 @@ var Menu$1 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
29272
29278
|
value: registerPathContext
|
|
29273
29279
|
}, measureChildList)))));
|
|
29274
29280
|
});
|
|
29275
|
-
var ExportMenu = Menu$
|
|
29276
|
-
ExportMenu.Item = MenuItem$
|
|
29277
|
-
ExportMenu.SubMenu = SubMenu;
|
|
29281
|
+
var ExportMenu = Menu$2;
|
|
29282
|
+
ExportMenu.Item = MenuItem$3;
|
|
29283
|
+
ExportMenu.SubMenu = SubMenu$1;
|
|
29278
29284
|
ExportMenu.ItemGroup = MenuItemGroup;
|
|
29279
29285
|
ExportMenu.Divider = Divider$1;
|
|
29286
|
+
var BarsOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "bars", "theme": "outlined" };
|
|
29287
|
+
var BarsOutlined = function BarsOutlined2(props, ref) {
|
|
29288
|
+
return /* @__PURE__ */ React.createElement(Icon$2, _extends$1({}, props, {
|
|
29289
|
+
ref,
|
|
29290
|
+
icon: BarsOutlined$1
|
|
29291
|
+
}));
|
|
29292
|
+
};
|
|
29293
|
+
var RefIcon$s = /* @__PURE__ */ React.forwardRef(BarsOutlined);
|
|
29294
|
+
if (process.env.NODE_ENV !== "production") {
|
|
29295
|
+
RefIcon$s.displayName = "BarsOutlined";
|
|
29296
|
+
}
|
|
29297
|
+
const LayoutContext = /* @__PURE__ */ React.createContext({
|
|
29298
|
+
siderHook: {
|
|
29299
|
+
addSider: () => null,
|
|
29300
|
+
removeSider: () => null
|
|
29301
|
+
}
|
|
29302
|
+
});
|
|
29303
|
+
const genLayoutStyle = (token2) => {
|
|
29304
|
+
const {
|
|
29305
|
+
antCls,
|
|
29306
|
+
// .ant
|
|
29307
|
+
componentCls,
|
|
29308
|
+
// .ant-layout
|
|
29309
|
+
colorText,
|
|
29310
|
+
footerBg,
|
|
29311
|
+
headerHeight,
|
|
29312
|
+
headerPadding,
|
|
29313
|
+
headerColor,
|
|
29314
|
+
footerPadding,
|
|
29315
|
+
fontSize,
|
|
29316
|
+
bodyBg,
|
|
29317
|
+
headerBg
|
|
29318
|
+
} = token2;
|
|
29319
|
+
return {
|
|
29320
|
+
[componentCls]: {
|
|
29321
|
+
display: "flex",
|
|
29322
|
+
flex: "auto",
|
|
29323
|
+
flexDirection: "column",
|
|
29324
|
+
/* fix firefox can't set height smaller than content on flex item */
|
|
29325
|
+
minHeight: 0,
|
|
29326
|
+
background: bodyBg,
|
|
29327
|
+
"&, *": {
|
|
29328
|
+
boxSizing: "border-box"
|
|
29329
|
+
},
|
|
29330
|
+
[`&${componentCls}-has-sider`]: {
|
|
29331
|
+
flexDirection: "row",
|
|
29332
|
+
[`> ${componentCls}, > ${componentCls}-content`]: {
|
|
29333
|
+
// https://segmentfault.com/a/1190000019498300
|
|
29334
|
+
width: 0
|
|
29335
|
+
}
|
|
29336
|
+
},
|
|
29337
|
+
[`${componentCls}-header, &${componentCls}-footer`]: {
|
|
29338
|
+
flex: "0 0 auto"
|
|
29339
|
+
},
|
|
29340
|
+
// RTL
|
|
29341
|
+
"&-rtl": {
|
|
29342
|
+
direction: "rtl"
|
|
29343
|
+
}
|
|
29344
|
+
},
|
|
29345
|
+
// ==================== Header ====================
|
|
29346
|
+
[`${componentCls}-header`]: {
|
|
29347
|
+
height: headerHeight,
|
|
29348
|
+
padding: headerPadding,
|
|
29349
|
+
color: headerColor,
|
|
29350
|
+
lineHeight: unit$1(headerHeight),
|
|
29351
|
+
background: headerBg,
|
|
29352
|
+
// Other components/menu/style/index.less line:686
|
|
29353
|
+
// Integration with header element so menu items have the same height
|
|
29354
|
+
[`${antCls}-menu`]: {
|
|
29355
|
+
lineHeight: "inherit"
|
|
29356
|
+
}
|
|
29357
|
+
},
|
|
29358
|
+
// ==================== Footer ====================
|
|
29359
|
+
[`${componentCls}-footer`]: {
|
|
29360
|
+
padding: footerPadding,
|
|
29361
|
+
color: colorText,
|
|
29362
|
+
fontSize,
|
|
29363
|
+
background: footerBg
|
|
29364
|
+
},
|
|
29365
|
+
// =================== Content ====================
|
|
29366
|
+
[`${componentCls}-content`]: {
|
|
29367
|
+
flex: "auto",
|
|
29368
|
+
color: colorText,
|
|
29369
|
+
// fix firefox can't set height smaller than content on flex item
|
|
29370
|
+
minHeight: 0
|
|
29371
|
+
}
|
|
29372
|
+
};
|
|
29373
|
+
};
|
|
29374
|
+
const prepareComponentToken$e = (token2) => {
|
|
29375
|
+
const {
|
|
29376
|
+
colorBgLayout,
|
|
29377
|
+
controlHeight,
|
|
29378
|
+
controlHeightLG,
|
|
29379
|
+
colorText,
|
|
29380
|
+
controlHeightSM,
|
|
29381
|
+
marginXXS,
|
|
29382
|
+
colorTextLightSolid,
|
|
29383
|
+
colorBgContainer
|
|
29384
|
+
} = token2;
|
|
29385
|
+
const paddingInline = controlHeightLG * 1.25;
|
|
29386
|
+
return {
|
|
29387
|
+
// Deprecated
|
|
29388
|
+
colorBgHeader: "#001529",
|
|
29389
|
+
colorBgBody: colorBgLayout,
|
|
29390
|
+
colorBgTrigger: "#002140",
|
|
29391
|
+
bodyBg: colorBgLayout,
|
|
29392
|
+
headerBg: "#001529",
|
|
29393
|
+
headerHeight: controlHeight * 2,
|
|
29394
|
+
headerPadding: `0 ${paddingInline}px`,
|
|
29395
|
+
headerColor: colorText,
|
|
29396
|
+
footerPadding: `${controlHeightSM}px ${paddingInline}px`,
|
|
29397
|
+
footerBg: colorBgLayout,
|
|
29398
|
+
siderBg: "#001529",
|
|
29399
|
+
triggerHeight: controlHeightLG + marginXXS * 2,
|
|
29400
|
+
triggerBg: "#002140",
|
|
29401
|
+
triggerColor: colorTextLightSolid,
|
|
29402
|
+
zeroTriggerWidth: controlHeightLG,
|
|
29403
|
+
zeroTriggerHeight: controlHeightLG,
|
|
29404
|
+
lightSiderBg: colorBgContainer,
|
|
29405
|
+
lightTriggerBg: colorBgContainer,
|
|
29406
|
+
lightTriggerColor: colorText
|
|
29407
|
+
};
|
|
29408
|
+
};
|
|
29409
|
+
const DEPRECATED_TOKENS = [["colorBgBody", "bodyBg"], ["colorBgHeader", "headerBg"], ["colorBgTrigger", "triggerBg"]];
|
|
29410
|
+
genStyleHooks("Layout", genLayoutStyle, prepareComponentToken$e, {
|
|
29411
|
+
deprecatedTokens: DEPRECATED_TOKENS
|
|
29412
|
+
});
|
|
29413
|
+
const genSiderStyle = (token2) => {
|
|
29414
|
+
const {
|
|
29415
|
+
componentCls,
|
|
29416
|
+
siderBg,
|
|
29417
|
+
motionDurationMid,
|
|
29418
|
+
motionDurationSlow,
|
|
29419
|
+
antCls,
|
|
29420
|
+
triggerHeight,
|
|
29421
|
+
triggerColor,
|
|
29422
|
+
triggerBg,
|
|
29423
|
+
headerHeight,
|
|
29424
|
+
zeroTriggerWidth,
|
|
29425
|
+
zeroTriggerHeight,
|
|
29426
|
+
borderRadiusLG,
|
|
29427
|
+
lightSiderBg,
|
|
29428
|
+
lightTriggerColor,
|
|
29429
|
+
lightTriggerBg,
|
|
29430
|
+
bodyBg
|
|
29431
|
+
} = token2;
|
|
29432
|
+
return {
|
|
29433
|
+
[componentCls]: {
|
|
29434
|
+
position: "relative",
|
|
29435
|
+
// fix firefox can't set width smaller than content on flex item
|
|
29436
|
+
minWidth: 0,
|
|
29437
|
+
background: siderBg,
|
|
29438
|
+
transition: `all ${motionDurationMid}, background 0s`,
|
|
29439
|
+
"&-has-trigger": {
|
|
29440
|
+
paddingBottom: triggerHeight
|
|
29441
|
+
},
|
|
29442
|
+
"&-right": {
|
|
29443
|
+
order: 1
|
|
29444
|
+
},
|
|
29445
|
+
[`${componentCls}-children`]: {
|
|
29446
|
+
height: "100%",
|
|
29447
|
+
// Hack for fixing margin collapse bug
|
|
29448
|
+
// https://github.com/ant-design/ant-design/issues/7967
|
|
29449
|
+
// solution from https://stackoverflow.com/a/33132624/3040605
|
|
29450
|
+
marginTop: -0.1,
|
|
29451
|
+
paddingTop: 0.1,
|
|
29452
|
+
[`${antCls}-menu${antCls}-menu-inline-collapsed`]: {
|
|
29453
|
+
width: "auto"
|
|
29454
|
+
}
|
|
29455
|
+
},
|
|
29456
|
+
[`&-zero-width ${componentCls}-children`]: {
|
|
29457
|
+
overflow: "hidden"
|
|
29458
|
+
},
|
|
29459
|
+
[`${componentCls}-trigger`]: {
|
|
29460
|
+
position: "fixed",
|
|
29461
|
+
bottom: 0,
|
|
29462
|
+
zIndex: 1,
|
|
29463
|
+
height: triggerHeight,
|
|
29464
|
+
color: triggerColor,
|
|
29465
|
+
lineHeight: unit$1(triggerHeight),
|
|
29466
|
+
textAlign: "center",
|
|
29467
|
+
background: triggerBg,
|
|
29468
|
+
cursor: "pointer",
|
|
29469
|
+
transition: `all ${motionDurationMid}`
|
|
29470
|
+
},
|
|
29471
|
+
[`${componentCls}-zero-width-trigger`]: {
|
|
29472
|
+
position: "absolute",
|
|
29473
|
+
top: headerHeight,
|
|
29474
|
+
insetInlineEnd: token2.calc(zeroTriggerWidth).mul(-1).equal(),
|
|
29475
|
+
zIndex: 1,
|
|
29476
|
+
width: zeroTriggerWidth,
|
|
29477
|
+
height: zeroTriggerHeight,
|
|
29478
|
+
color: triggerColor,
|
|
29479
|
+
fontSize: token2.fontSizeXL,
|
|
29480
|
+
display: "flex",
|
|
29481
|
+
alignItems: "center",
|
|
29482
|
+
justifyContent: "center",
|
|
29483
|
+
background: siderBg,
|
|
29484
|
+
borderRadius: `0 ${unit$1(borderRadiusLG)} ${unit$1(borderRadiusLG)} 0`,
|
|
29485
|
+
cursor: "pointer",
|
|
29486
|
+
transition: `background ${motionDurationSlow} ease`,
|
|
29487
|
+
"&::after": {
|
|
29488
|
+
position: "absolute",
|
|
29489
|
+
inset: 0,
|
|
29490
|
+
background: "transparent",
|
|
29491
|
+
transition: `all ${motionDurationSlow}`,
|
|
29492
|
+
content: '""'
|
|
29493
|
+
},
|
|
29494
|
+
"&:hover::after": {
|
|
29495
|
+
background: `rgba(255, 255, 255, 0.2)`
|
|
29496
|
+
},
|
|
29497
|
+
"&-right": {
|
|
29498
|
+
insetInlineStart: token2.calc(zeroTriggerWidth).mul(-1).equal(),
|
|
29499
|
+
borderRadius: `${unit$1(borderRadiusLG)} 0 0 ${unit$1(borderRadiusLG)}`
|
|
29500
|
+
}
|
|
29501
|
+
},
|
|
29502
|
+
// Light
|
|
29503
|
+
"&-light": {
|
|
29504
|
+
background: lightSiderBg,
|
|
29505
|
+
[`${componentCls}-trigger`]: {
|
|
29506
|
+
color: lightTriggerColor,
|
|
29507
|
+
background: lightTriggerBg
|
|
29508
|
+
},
|
|
29509
|
+
[`${componentCls}-zero-width-trigger`]: {
|
|
29510
|
+
color: lightTriggerColor,
|
|
29511
|
+
background: lightTriggerBg,
|
|
29512
|
+
border: `1px solid ${bodyBg}`,
|
|
29513
|
+
// Safe to modify to any other color
|
|
29514
|
+
borderInlineStart: 0
|
|
29515
|
+
}
|
|
29516
|
+
}
|
|
29517
|
+
}
|
|
29518
|
+
};
|
|
29519
|
+
};
|
|
29520
|
+
const useStyle$k = genStyleHooks(["Layout", "Sider"], genSiderStyle, prepareComponentToken$e, {
|
|
29521
|
+
deprecatedTokens: DEPRECATED_TOKENS
|
|
29522
|
+
});
|
|
29523
|
+
var __rest$I = function(s2, e3) {
|
|
29524
|
+
var t2 = {};
|
|
29525
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
29526
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
29527
|
+
if (e3.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i])) t2[p2[i]] = s2[p2[i]];
|
|
29528
|
+
}
|
|
29529
|
+
return t2;
|
|
29530
|
+
};
|
|
29531
|
+
const dimensionMaxMap = {
|
|
29532
|
+
xs: "479.98px",
|
|
29533
|
+
sm: "575.98px",
|
|
29534
|
+
md: "767.98px",
|
|
29535
|
+
lg: "991.98px",
|
|
29536
|
+
xl: "1199.98px",
|
|
29537
|
+
xxl: "1599.98px"
|
|
29538
|
+
};
|
|
29539
|
+
const isNumeric$1 = (val) => !Number.isNaN(Number.parseFloat(val)) && Number.isFinite(Number(val));
|
|
29540
|
+
const SiderContext = /* @__PURE__ */ React.createContext({});
|
|
29541
|
+
const generateId = /* @__PURE__ */ (() => {
|
|
29542
|
+
let i = 0;
|
|
29543
|
+
return (prefix2 = "") => {
|
|
29544
|
+
i += 1;
|
|
29545
|
+
return `${prefix2}${i}`;
|
|
29546
|
+
};
|
|
29547
|
+
})();
|
|
29548
|
+
const Sider = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
29549
|
+
const {
|
|
29550
|
+
prefixCls: customizePrefixCls,
|
|
29551
|
+
className,
|
|
29552
|
+
trigger,
|
|
29553
|
+
children,
|
|
29554
|
+
defaultCollapsed = false,
|
|
29555
|
+
theme: theme2 = "dark",
|
|
29556
|
+
style: style2 = {},
|
|
29557
|
+
collapsible = false,
|
|
29558
|
+
reverseArrow = false,
|
|
29559
|
+
width = 200,
|
|
29560
|
+
collapsedWidth = 80,
|
|
29561
|
+
zeroWidthTriggerStyle,
|
|
29562
|
+
breakpoint,
|
|
29563
|
+
onCollapse,
|
|
29564
|
+
onBreakpoint
|
|
29565
|
+
} = props, otherProps = __rest$I(props, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]);
|
|
29566
|
+
const {
|
|
29567
|
+
siderHook
|
|
29568
|
+
} = useContext(LayoutContext);
|
|
29569
|
+
const [collapsed, setCollapsed] = useState("collapsed" in props ? props.collapsed : defaultCollapsed);
|
|
29570
|
+
const [below, setBelow] = useState(false);
|
|
29571
|
+
useEffect(() => {
|
|
29572
|
+
if ("collapsed" in props) {
|
|
29573
|
+
setCollapsed(props.collapsed);
|
|
29574
|
+
}
|
|
29575
|
+
}, [props.collapsed]);
|
|
29576
|
+
const handleSetCollapsed = (value, type4) => {
|
|
29577
|
+
if (!("collapsed" in props)) {
|
|
29578
|
+
setCollapsed(value);
|
|
29579
|
+
}
|
|
29580
|
+
onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(value, type4);
|
|
29581
|
+
};
|
|
29582
|
+
const {
|
|
29583
|
+
getPrefixCls,
|
|
29584
|
+
direction
|
|
29585
|
+
} = useContext(ConfigContext);
|
|
29586
|
+
const prefixCls = getPrefixCls("layout-sider", customizePrefixCls);
|
|
29587
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$k(prefixCls);
|
|
29588
|
+
const responsiveHandlerRef = useRef(null);
|
|
29589
|
+
responsiveHandlerRef.current = (mql) => {
|
|
29590
|
+
setBelow(mql.matches);
|
|
29591
|
+
onBreakpoint === null || onBreakpoint === void 0 ? void 0 : onBreakpoint(mql.matches);
|
|
29592
|
+
if (collapsed !== mql.matches) {
|
|
29593
|
+
handleSetCollapsed(mql.matches, "responsive");
|
|
29594
|
+
}
|
|
29595
|
+
};
|
|
29596
|
+
useEffect(() => {
|
|
29597
|
+
function responsiveHandler(mql2) {
|
|
29598
|
+
var _a2;
|
|
29599
|
+
return (_a2 = responsiveHandlerRef.current) === null || _a2 === void 0 ? void 0 : _a2.call(responsiveHandlerRef, mql2);
|
|
29600
|
+
}
|
|
29601
|
+
let mql;
|
|
29602
|
+
if (typeof (window === null || window === void 0 ? void 0 : window.matchMedia) !== "undefined" && breakpoint && breakpoint in dimensionMaxMap) {
|
|
29603
|
+
mql = window.matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
|
|
29604
|
+
addMediaQueryListener(mql, responsiveHandler);
|
|
29605
|
+
responsiveHandler(mql);
|
|
29606
|
+
}
|
|
29607
|
+
return () => {
|
|
29608
|
+
removeMediaQueryListener(mql, responsiveHandler);
|
|
29609
|
+
};
|
|
29610
|
+
}, [breakpoint]);
|
|
29611
|
+
useEffect(() => {
|
|
29612
|
+
const uniqueId = generateId("ant-sider-");
|
|
29613
|
+
siderHook.addSider(uniqueId);
|
|
29614
|
+
return () => siderHook.removeSider(uniqueId);
|
|
29615
|
+
}, []);
|
|
29616
|
+
const toggle = () => {
|
|
29617
|
+
handleSetCollapsed(!collapsed, "clickTrigger");
|
|
29618
|
+
};
|
|
29619
|
+
const divProps = omit(otherProps, ["collapsed"]);
|
|
29620
|
+
const rawWidth = collapsed ? collapsedWidth : width;
|
|
29621
|
+
const siderWidth = isNumeric$1(rawWidth) ? `${rawWidth}px` : String(rawWidth);
|
|
29622
|
+
const zeroWidthTrigger = Number.parseFloat(String(collapsedWidth || 0)) === 0 ? /* @__PURE__ */ React.createElement("span", {
|
|
29623
|
+
onClick: toggle,
|
|
29624
|
+
className: classNames(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? "right" : "left"}`),
|
|
29625
|
+
style: zeroWidthTriggerStyle
|
|
29626
|
+
}, trigger || /* @__PURE__ */ React.createElement(RefIcon$s, null)) : null;
|
|
29627
|
+
const reverseIcon = direction === "rtl" === !reverseArrow;
|
|
29628
|
+
const iconObj = {
|
|
29629
|
+
expanded: reverseIcon ? /* @__PURE__ */ React.createElement(RefIcon$x, null) : /* @__PURE__ */ React.createElement(RefIcon$t, null),
|
|
29630
|
+
collapsed: reverseIcon ? /* @__PURE__ */ React.createElement(RefIcon$t, null) : /* @__PURE__ */ React.createElement(RefIcon$x, null)
|
|
29631
|
+
};
|
|
29632
|
+
const status = collapsed ? "collapsed" : "expanded";
|
|
29633
|
+
const defaultTrigger = iconObj[status];
|
|
29634
|
+
const triggerDom = trigger !== null ? zeroWidthTrigger || /* @__PURE__ */ React.createElement("div", {
|
|
29635
|
+
className: `${prefixCls}-trigger`,
|
|
29636
|
+
onClick: toggle,
|
|
29637
|
+
style: {
|
|
29638
|
+
width: siderWidth
|
|
29639
|
+
}
|
|
29640
|
+
}, trigger || defaultTrigger) : null;
|
|
29641
|
+
const divStyle = Object.assign(Object.assign({}, style2), {
|
|
29642
|
+
flex: `0 0 ${siderWidth}`,
|
|
29643
|
+
maxWidth: siderWidth,
|
|
29644
|
+
minWidth: siderWidth,
|
|
29645
|
+
width: siderWidth
|
|
29646
|
+
});
|
|
29647
|
+
const siderCls = classNames(prefixCls, `${prefixCls}-${theme2}`, {
|
|
29648
|
+
[`${prefixCls}-collapsed`]: !!collapsed,
|
|
29649
|
+
[`${prefixCls}-has-trigger`]: collapsible && trigger !== null && !zeroWidthTrigger,
|
|
29650
|
+
[`${prefixCls}-below`]: !!below,
|
|
29651
|
+
[`${prefixCls}-zero-width`]: Number.parseFloat(siderWidth) === 0
|
|
29652
|
+
}, className, hashId, cssVarCls);
|
|
29653
|
+
const contextValue = React.useMemo(() => ({
|
|
29654
|
+
siderCollapsed: collapsed
|
|
29655
|
+
}), [collapsed]);
|
|
29656
|
+
return wrapCSSVar(/* @__PURE__ */ React.createElement(SiderContext.Provider, {
|
|
29657
|
+
value: contextValue
|
|
29658
|
+
}, /* @__PURE__ */ React.createElement("aside", Object.assign({
|
|
29659
|
+
className: siderCls
|
|
29660
|
+
}, divProps, {
|
|
29661
|
+
style: divStyle,
|
|
29662
|
+
ref
|
|
29663
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
29664
|
+
className: `${prefixCls}-children`
|
|
29665
|
+
}, children), collapsible || below && zeroWidthTrigger ? triggerDom : null)));
|
|
29666
|
+
});
|
|
29667
|
+
if (process.env.NODE_ENV !== "production") {
|
|
29668
|
+
Sider.displayName = "Sider";
|
|
29669
|
+
}
|
|
29280
29670
|
var EllipsisOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "ellipsis", "theme": "outlined" };
|
|
29281
29671
|
var EllipsisOutlined = function EllipsisOutlined2(props, ref) {
|
|
29282
29672
|
return /* @__PURE__ */ React.createElement(Icon$2, _extends$1({}, props, {
|
|
@@ -29288,6 +29678,1832 @@ var RefIcon$r = /* @__PURE__ */ React.forwardRef(EllipsisOutlined);
|
|
|
29288
29678
|
if (process.env.NODE_ENV !== "production") {
|
|
29289
29679
|
RefIcon$r.displayName = "EllipsisOutlined";
|
|
29290
29680
|
}
|
|
29681
|
+
const MenuContext = /* @__PURE__ */ createContext({
|
|
29682
|
+
prefixCls: "",
|
|
29683
|
+
firstLevel: true,
|
|
29684
|
+
inlineCollapsed: false
|
|
29685
|
+
});
|
|
29686
|
+
var __rest$H = function(s2, e3) {
|
|
29687
|
+
var t2 = {};
|
|
29688
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
29689
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
29690
|
+
if (e3.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i])) t2[p2[i]] = s2[p2[i]];
|
|
29691
|
+
}
|
|
29692
|
+
return t2;
|
|
29693
|
+
};
|
|
29694
|
+
const MenuDivider = (props) => {
|
|
29695
|
+
const {
|
|
29696
|
+
prefixCls: customizePrefixCls,
|
|
29697
|
+
className,
|
|
29698
|
+
dashed
|
|
29699
|
+
} = props, restProps = __rest$H(props, ["prefixCls", "className", "dashed"]);
|
|
29700
|
+
const {
|
|
29701
|
+
getPrefixCls
|
|
29702
|
+
} = React.useContext(ConfigContext);
|
|
29703
|
+
const prefixCls = getPrefixCls("menu", customizePrefixCls);
|
|
29704
|
+
const classString = classNames({
|
|
29705
|
+
[`${prefixCls}-item-divider-dashed`]: !!dashed
|
|
29706
|
+
}, className);
|
|
29707
|
+
return /* @__PURE__ */ React.createElement(Divider$1, Object.assign({
|
|
29708
|
+
className: classString
|
|
29709
|
+
}, restProps));
|
|
29710
|
+
};
|
|
29711
|
+
const MenuItem$1 = (props) => {
|
|
29712
|
+
var _a2;
|
|
29713
|
+
const {
|
|
29714
|
+
className,
|
|
29715
|
+
children,
|
|
29716
|
+
icon: icon2,
|
|
29717
|
+
title,
|
|
29718
|
+
danger,
|
|
29719
|
+
extra
|
|
29720
|
+
} = props;
|
|
29721
|
+
const {
|
|
29722
|
+
prefixCls,
|
|
29723
|
+
firstLevel,
|
|
29724
|
+
direction,
|
|
29725
|
+
disableMenuItemTitleTooltip,
|
|
29726
|
+
inlineCollapsed: isInlineCollapsed
|
|
29727
|
+
} = React.useContext(MenuContext);
|
|
29728
|
+
const renderItemChildren = (inlineCollapsed) => {
|
|
29729
|
+
const label = children === null || children === void 0 ? void 0 : children[0];
|
|
29730
|
+
const wrapNode = /* @__PURE__ */ React.createElement("span", {
|
|
29731
|
+
className: classNames(`${prefixCls}-title-content`, {
|
|
29732
|
+
[`${prefixCls}-title-content-with-extra`]: !!extra || extra === 0
|
|
29733
|
+
})
|
|
29734
|
+
}, children);
|
|
29735
|
+
if (!icon2 || /* @__PURE__ */ React.isValidElement(children) && children.type === "span") {
|
|
29736
|
+
if (children && inlineCollapsed && firstLevel && typeof label === "string") {
|
|
29737
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
29738
|
+
className: `${prefixCls}-inline-collapsed-noicon`
|
|
29739
|
+
}, label.charAt(0));
|
|
29740
|
+
}
|
|
29741
|
+
}
|
|
29742
|
+
return wrapNode;
|
|
29743
|
+
};
|
|
29744
|
+
const {
|
|
29745
|
+
siderCollapsed
|
|
29746
|
+
} = React.useContext(SiderContext);
|
|
29747
|
+
let tooltipTitle = title;
|
|
29748
|
+
if (typeof title === "undefined") {
|
|
29749
|
+
tooltipTitle = firstLevel ? children : "";
|
|
29750
|
+
} else if (title === false) {
|
|
29751
|
+
tooltipTitle = "";
|
|
29752
|
+
}
|
|
29753
|
+
const tooltipProps = {
|
|
29754
|
+
title: tooltipTitle
|
|
29755
|
+
};
|
|
29756
|
+
if (!siderCollapsed && !isInlineCollapsed) {
|
|
29757
|
+
tooltipProps.title = null;
|
|
29758
|
+
tooltipProps.open = false;
|
|
29759
|
+
}
|
|
29760
|
+
const childrenLength = toArray$6(children).length;
|
|
29761
|
+
let returnNode = /* @__PURE__ */ React.createElement(MenuItem$3, Object.assign({}, omit(props, ["title", "icon", "danger"]), {
|
|
29762
|
+
className: classNames({
|
|
29763
|
+
[`${prefixCls}-item-danger`]: danger,
|
|
29764
|
+
[`${prefixCls}-item-only-child`]: (icon2 ? childrenLength + 1 : childrenLength) === 1
|
|
29765
|
+
}, className),
|
|
29766
|
+
title: typeof title === "string" ? title : void 0
|
|
29767
|
+
}), cloneElement(icon2, {
|
|
29768
|
+
className: classNames(/* @__PURE__ */ React.isValidElement(icon2) ? (_a2 = icon2.props) === null || _a2 === void 0 ? void 0 : _a2.className : void 0, `${prefixCls}-item-icon`)
|
|
29769
|
+
}), renderItemChildren(isInlineCollapsed));
|
|
29770
|
+
if (!disableMenuItemTitleTooltip) {
|
|
29771
|
+
returnNode = /* @__PURE__ */ React.createElement(Tooltip2, Object.assign({}, tooltipProps, {
|
|
29772
|
+
placement: direction === "rtl" ? "left" : "right",
|
|
29773
|
+
classNames: {
|
|
29774
|
+
root: `${prefixCls}-inline-collapsed-tooltip`
|
|
29775
|
+
}
|
|
29776
|
+
}), returnNode);
|
|
29777
|
+
}
|
|
29778
|
+
return returnNode;
|
|
29779
|
+
};
|
|
29780
|
+
var __rest$G = function(s2, e3) {
|
|
29781
|
+
var t2 = {};
|
|
29782
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
29783
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
29784
|
+
if (e3.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i])) t2[p2[i]] = s2[p2[i]];
|
|
29785
|
+
}
|
|
29786
|
+
return t2;
|
|
29787
|
+
};
|
|
29788
|
+
const OverrideContext = /* @__PURE__ */ React.createContext(null);
|
|
29789
|
+
const OverrideProvider = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
29790
|
+
const {
|
|
29791
|
+
children
|
|
29792
|
+
} = props, restProps = __rest$G(props, ["children"]);
|
|
29793
|
+
const override = React.useContext(OverrideContext);
|
|
29794
|
+
const context = React.useMemo(() => Object.assign(Object.assign({}, override), restProps), [
|
|
29795
|
+
override,
|
|
29796
|
+
restProps.prefixCls,
|
|
29797
|
+
// restProps.expandIcon, Not mark as deps since this is a ReactNode
|
|
29798
|
+
restProps.mode,
|
|
29799
|
+
restProps.selectable,
|
|
29800
|
+
restProps.rootClassName
|
|
29801
|
+
// restProps.validator, Not mark as deps since this is a function
|
|
29802
|
+
]);
|
|
29803
|
+
const canRef = supportNodeRef(children);
|
|
29804
|
+
const mergedRef = useComposeRef(ref, canRef ? getNodeRef(children) : null);
|
|
29805
|
+
return /* @__PURE__ */ React.createElement(OverrideContext.Provider, {
|
|
29806
|
+
value: context
|
|
29807
|
+
}, /* @__PURE__ */ React.createElement(ContextIsolator, {
|
|
29808
|
+
space: true
|
|
29809
|
+
}, canRef ? /* @__PURE__ */ React.cloneElement(children, {
|
|
29810
|
+
ref: mergedRef
|
|
29811
|
+
}) : children));
|
|
29812
|
+
});
|
|
29813
|
+
const getHorizontalStyle = (token2) => {
|
|
29814
|
+
const {
|
|
29815
|
+
componentCls,
|
|
29816
|
+
motionDurationSlow,
|
|
29817
|
+
horizontalLineHeight,
|
|
29818
|
+
colorSplit,
|
|
29819
|
+
lineWidth,
|
|
29820
|
+
lineType,
|
|
29821
|
+
itemPaddingInline
|
|
29822
|
+
} = token2;
|
|
29823
|
+
return {
|
|
29824
|
+
[`${componentCls}-horizontal`]: {
|
|
29825
|
+
lineHeight: horizontalLineHeight,
|
|
29826
|
+
border: 0,
|
|
29827
|
+
borderBottom: `${unit$1(lineWidth)} ${lineType} ${colorSplit}`,
|
|
29828
|
+
boxShadow: "none",
|
|
29829
|
+
"&::after": {
|
|
29830
|
+
display: "block",
|
|
29831
|
+
clear: "both",
|
|
29832
|
+
height: 0,
|
|
29833
|
+
content: '"\\20"'
|
|
29834
|
+
},
|
|
29835
|
+
// ======================= Item =======================
|
|
29836
|
+
[`${componentCls}-item, ${componentCls}-submenu`]: {
|
|
29837
|
+
position: "relative",
|
|
29838
|
+
display: "inline-block",
|
|
29839
|
+
verticalAlign: "bottom",
|
|
29840
|
+
paddingInline: itemPaddingInline
|
|
29841
|
+
},
|
|
29842
|
+
[`> ${componentCls}-item:hover,
|
|
29843
|
+
> ${componentCls}-item-active,
|
|
29844
|
+
> ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
|
|
29845
|
+
backgroundColor: "transparent"
|
|
29846
|
+
},
|
|
29847
|
+
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
29848
|
+
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(",")
|
|
29849
|
+
},
|
|
29850
|
+
// ===================== Sub Menu =====================
|
|
29851
|
+
[`${componentCls}-submenu-arrow`]: {
|
|
29852
|
+
display: "none"
|
|
29853
|
+
}
|
|
29854
|
+
}
|
|
29855
|
+
};
|
|
29856
|
+
};
|
|
29857
|
+
const getRTLStyle = ({
|
|
29858
|
+
componentCls,
|
|
29859
|
+
menuArrowOffset,
|
|
29860
|
+
calc
|
|
29861
|
+
}) => ({
|
|
29862
|
+
[`${componentCls}-rtl`]: {
|
|
29863
|
+
direction: "rtl"
|
|
29864
|
+
},
|
|
29865
|
+
[`${componentCls}-submenu-rtl`]: {
|
|
29866
|
+
transformOrigin: "100% 0"
|
|
29867
|
+
},
|
|
29868
|
+
// Vertical Arrow
|
|
29869
|
+
[`${componentCls}-rtl${componentCls}-vertical,
|
|
29870
|
+
${componentCls}-submenu-rtl ${componentCls}-vertical`]: {
|
|
29871
|
+
[`${componentCls}-submenu-arrow`]: {
|
|
29872
|
+
"&::before": {
|
|
29873
|
+
transform: `rotate(-45deg) translateY(${unit$1(calc(menuArrowOffset).mul(-1).equal())})`
|
|
29874
|
+
},
|
|
29875
|
+
"&::after": {
|
|
29876
|
+
transform: `rotate(45deg) translateY(${unit$1(menuArrowOffset)})`
|
|
29877
|
+
}
|
|
29878
|
+
}
|
|
29879
|
+
}
|
|
29880
|
+
});
|
|
29881
|
+
const accessibilityFocus = (token2) => genFocusOutline(token2);
|
|
29882
|
+
const getThemeStyle = (token2, themeSuffix) => {
|
|
29883
|
+
const {
|
|
29884
|
+
componentCls,
|
|
29885
|
+
itemColor,
|
|
29886
|
+
itemSelectedColor,
|
|
29887
|
+
subMenuItemSelectedColor,
|
|
29888
|
+
groupTitleColor,
|
|
29889
|
+
itemBg,
|
|
29890
|
+
subMenuItemBg,
|
|
29891
|
+
itemSelectedBg,
|
|
29892
|
+
activeBarHeight,
|
|
29893
|
+
activeBarWidth,
|
|
29894
|
+
activeBarBorderWidth,
|
|
29895
|
+
motionDurationSlow,
|
|
29896
|
+
motionEaseInOut,
|
|
29897
|
+
motionEaseOut,
|
|
29898
|
+
itemPaddingInline,
|
|
29899
|
+
motionDurationMid,
|
|
29900
|
+
itemHoverColor,
|
|
29901
|
+
lineType,
|
|
29902
|
+
colorSplit,
|
|
29903
|
+
// Disabled
|
|
29904
|
+
itemDisabledColor,
|
|
29905
|
+
// Danger
|
|
29906
|
+
dangerItemColor,
|
|
29907
|
+
dangerItemHoverColor,
|
|
29908
|
+
dangerItemSelectedColor,
|
|
29909
|
+
dangerItemActiveBg,
|
|
29910
|
+
dangerItemSelectedBg,
|
|
29911
|
+
// Bg
|
|
29912
|
+
popupBg,
|
|
29913
|
+
itemHoverBg,
|
|
29914
|
+
itemActiveBg,
|
|
29915
|
+
menuSubMenuBg,
|
|
29916
|
+
// Horizontal
|
|
29917
|
+
horizontalItemSelectedColor,
|
|
29918
|
+
horizontalItemSelectedBg,
|
|
29919
|
+
horizontalItemBorderRadius,
|
|
29920
|
+
horizontalItemHoverBg
|
|
29921
|
+
} = token2;
|
|
29922
|
+
return {
|
|
29923
|
+
[`${componentCls}-${themeSuffix}, ${componentCls}-${themeSuffix} > ${componentCls}`]: {
|
|
29924
|
+
color: itemColor,
|
|
29925
|
+
background: itemBg,
|
|
29926
|
+
[`&${componentCls}-root:focus-visible`]: Object.assign({}, accessibilityFocus(token2)),
|
|
29927
|
+
// ======================== Item ========================
|
|
29928
|
+
[`${componentCls}-item`]: {
|
|
29929
|
+
"&-group-title, &-extra": {
|
|
29930
|
+
color: groupTitleColor
|
|
29931
|
+
}
|
|
29932
|
+
},
|
|
29933
|
+
[`${componentCls}-submenu-selected > ${componentCls}-submenu-title`]: {
|
|
29934
|
+
color: subMenuItemSelectedColor
|
|
29935
|
+
},
|
|
29936
|
+
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
29937
|
+
color: itemColor,
|
|
29938
|
+
[`&:not(${componentCls}-item-disabled):focus-visible`]: Object.assign({}, accessibilityFocus(token2))
|
|
29939
|
+
},
|
|
29940
|
+
// Disabled
|
|
29941
|
+
[`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
|
|
29942
|
+
color: `${itemDisabledColor} !important`
|
|
29943
|
+
},
|
|
29944
|
+
// Hover
|
|
29945
|
+
[`${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
|
|
29946
|
+
[`&:hover, > ${componentCls}-submenu-title:hover`]: {
|
|
29947
|
+
color: itemHoverColor
|
|
29948
|
+
}
|
|
29949
|
+
},
|
|
29950
|
+
[`&:not(${componentCls}-horizontal)`]: {
|
|
29951
|
+
[`${componentCls}-item:not(${componentCls}-item-selected)`]: {
|
|
29952
|
+
"&:hover": {
|
|
29953
|
+
backgroundColor: itemHoverBg
|
|
29954
|
+
},
|
|
29955
|
+
"&:active": {
|
|
29956
|
+
backgroundColor: itemActiveBg
|
|
29957
|
+
}
|
|
29958
|
+
},
|
|
29959
|
+
[`${componentCls}-submenu-title`]: {
|
|
29960
|
+
"&:hover": {
|
|
29961
|
+
backgroundColor: itemHoverBg
|
|
29962
|
+
},
|
|
29963
|
+
"&:active": {
|
|
29964
|
+
backgroundColor: itemActiveBg
|
|
29965
|
+
}
|
|
29966
|
+
}
|
|
29967
|
+
},
|
|
29968
|
+
// Danger - only Item has
|
|
29969
|
+
[`${componentCls}-item-danger`]: {
|
|
29970
|
+
color: dangerItemColor,
|
|
29971
|
+
[`&${componentCls}-item:hover`]: {
|
|
29972
|
+
[`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
|
|
29973
|
+
color: dangerItemHoverColor
|
|
29974
|
+
}
|
|
29975
|
+
},
|
|
29976
|
+
[`&${componentCls}-item:active`]: {
|
|
29977
|
+
background: dangerItemActiveBg
|
|
29978
|
+
}
|
|
29979
|
+
},
|
|
29980
|
+
[`${componentCls}-item a`]: {
|
|
29981
|
+
"&, &:hover": {
|
|
29982
|
+
color: "inherit"
|
|
29983
|
+
}
|
|
29984
|
+
},
|
|
29985
|
+
[`${componentCls}-item-selected`]: {
|
|
29986
|
+
color: itemSelectedColor,
|
|
29987
|
+
// Danger
|
|
29988
|
+
[`&${componentCls}-item-danger`]: {
|
|
29989
|
+
color: dangerItemSelectedColor
|
|
29990
|
+
},
|
|
29991
|
+
"a, a:hover": {
|
|
29992
|
+
color: "inherit"
|
|
29993
|
+
}
|
|
29994
|
+
},
|
|
29995
|
+
[`& ${componentCls}-item-selected`]: {
|
|
29996
|
+
backgroundColor: itemSelectedBg,
|
|
29997
|
+
// Danger
|
|
29998
|
+
[`&${componentCls}-item-danger`]: {
|
|
29999
|
+
backgroundColor: dangerItemSelectedBg
|
|
30000
|
+
}
|
|
30001
|
+
},
|
|
30002
|
+
[`&${componentCls}-submenu > ${componentCls}`]: {
|
|
30003
|
+
backgroundColor: menuSubMenuBg
|
|
30004
|
+
},
|
|
30005
|
+
// ===== 设置浮层的颜色 =======
|
|
30006
|
+
// !dark 模式会被popupBg 会被rest 为 darkPopupBg
|
|
30007
|
+
[`&${componentCls}-popup > ${componentCls}`]: {
|
|
30008
|
+
backgroundColor: popupBg
|
|
30009
|
+
},
|
|
30010
|
+
[`&${componentCls}-submenu-popup > ${componentCls}`]: {
|
|
30011
|
+
backgroundColor: popupBg
|
|
30012
|
+
},
|
|
30013
|
+
// ===== 设置浮层的颜色 end =======
|
|
30014
|
+
// ====================== Horizontal ======================
|
|
30015
|
+
[`&${componentCls}-horizontal`]: Object.assign(Object.assign({}, themeSuffix === "dark" ? {
|
|
30016
|
+
borderBottom: 0
|
|
30017
|
+
} : {}), {
|
|
30018
|
+
[`> ${componentCls}-item, > ${componentCls}-submenu`]: {
|
|
30019
|
+
top: activeBarBorderWidth,
|
|
30020
|
+
marginTop: token2.calc(activeBarBorderWidth).mul(-1).equal(),
|
|
30021
|
+
marginBottom: 0,
|
|
30022
|
+
borderRadius: horizontalItemBorderRadius,
|
|
30023
|
+
"&::after": {
|
|
30024
|
+
position: "absolute",
|
|
30025
|
+
insetInline: itemPaddingInline,
|
|
30026
|
+
bottom: 0,
|
|
30027
|
+
borderBottom: `${unit$1(activeBarHeight)} solid transparent`,
|
|
30028
|
+
transition: `border-color ${motionDurationSlow} ${motionEaseInOut}`,
|
|
30029
|
+
content: '""'
|
|
30030
|
+
},
|
|
30031
|
+
"&:hover, &-active, &-open": {
|
|
30032
|
+
background: horizontalItemHoverBg,
|
|
30033
|
+
"&::after": {
|
|
30034
|
+
borderBottomWidth: activeBarHeight,
|
|
30035
|
+
borderBottomColor: horizontalItemSelectedColor
|
|
30036
|
+
}
|
|
30037
|
+
},
|
|
30038
|
+
"&-selected": {
|
|
30039
|
+
color: horizontalItemSelectedColor,
|
|
30040
|
+
backgroundColor: horizontalItemSelectedBg,
|
|
30041
|
+
"&:hover": {
|
|
30042
|
+
backgroundColor: horizontalItemSelectedBg
|
|
30043
|
+
},
|
|
30044
|
+
"&::after": {
|
|
30045
|
+
borderBottomWidth: activeBarHeight,
|
|
30046
|
+
borderBottomColor: horizontalItemSelectedColor
|
|
30047
|
+
}
|
|
30048
|
+
}
|
|
30049
|
+
}
|
|
30050
|
+
}),
|
|
30051
|
+
// ================== Inline & Vertical ===================
|
|
30052
|
+
//
|
|
30053
|
+
[`&${componentCls}-root`]: {
|
|
30054
|
+
[`&${componentCls}-inline, &${componentCls}-vertical`]: {
|
|
30055
|
+
borderInlineEnd: `${unit$1(activeBarBorderWidth)} ${lineType} ${colorSplit}`
|
|
30056
|
+
}
|
|
30057
|
+
},
|
|
30058
|
+
// ======================== Inline ========================
|
|
30059
|
+
[`&${componentCls}-inline`]: {
|
|
30060
|
+
// Sub
|
|
30061
|
+
[`${componentCls}-sub${componentCls}-inline`]: {
|
|
30062
|
+
background: subMenuItemBg
|
|
30063
|
+
},
|
|
30064
|
+
[`${componentCls}-item`]: {
|
|
30065
|
+
position: "relative",
|
|
30066
|
+
"&::after": {
|
|
30067
|
+
position: "absolute",
|
|
30068
|
+
insetBlock: 0,
|
|
30069
|
+
insetInlineEnd: 0,
|
|
30070
|
+
borderInlineEnd: `${unit$1(activeBarWidth)} solid ${itemSelectedColor}`,
|
|
30071
|
+
transform: "scaleY(0.0001)",
|
|
30072
|
+
opacity: 0,
|
|
30073
|
+
transition: [`transform ${motionDurationMid} ${motionEaseOut}`, `opacity ${motionDurationMid} ${motionEaseOut}`].join(","),
|
|
30074
|
+
content: '""'
|
|
30075
|
+
},
|
|
30076
|
+
// Danger
|
|
30077
|
+
[`&${componentCls}-item-danger`]: {
|
|
30078
|
+
"&::after": {
|
|
30079
|
+
borderInlineEndColor: dangerItemSelectedColor
|
|
30080
|
+
}
|
|
30081
|
+
}
|
|
30082
|
+
},
|
|
30083
|
+
[`${componentCls}-selected, ${componentCls}-item-selected`]: {
|
|
30084
|
+
"&::after": {
|
|
30085
|
+
transform: "scaleY(1)",
|
|
30086
|
+
opacity: 1,
|
|
30087
|
+
transition: [`transform ${motionDurationMid} ${motionEaseInOut}`, `opacity ${motionDurationMid} ${motionEaseInOut}`].join(",")
|
|
30088
|
+
}
|
|
30089
|
+
}
|
|
30090
|
+
}
|
|
30091
|
+
}
|
|
30092
|
+
};
|
|
30093
|
+
};
|
|
30094
|
+
const getVerticalInlineStyle = (token2) => {
|
|
30095
|
+
const {
|
|
30096
|
+
componentCls,
|
|
30097
|
+
itemHeight,
|
|
30098
|
+
itemMarginInline,
|
|
30099
|
+
padding,
|
|
30100
|
+
menuArrowSize,
|
|
30101
|
+
marginXS,
|
|
30102
|
+
itemMarginBlock,
|
|
30103
|
+
itemWidth,
|
|
30104
|
+
itemPaddingInline
|
|
30105
|
+
} = token2;
|
|
30106
|
+
const paddingWithArrow = token2.calc(menuArrowSize).add(padding).add(marginXS).equal();
|
|
30107
|
+
return {
|
|
30108
|
+
[`${componentCls}-item`]: {
|
|
30109
|
+
position: "relative",
|
|
30110
|
+
overflow: "hidden"
|
|
30111
|
+
},
|
|
30112
|
+
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
30113
|
+
height: itemHeight,
|
|
30114
|
+
lineHeight: unit$1(itemHeight),
|
|
30115
|
+
paddingInline: itemPaddingInline,
|
|
30116
|
+
overflow: "hidden",
|
|
30117
|
+
textOverflow: "ellipsis",
|
|
30118
|
+
marginInline: itemMarginInline,
|
|
30119
|
+
marginBlock: itemMarginBlock,
|
|
30120
|
+
width: itemWidth
|
|
30121
|
+
},
|
|
30122
|
+
[`> ${componentCls}-item,
|
|
30123
|
+
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
|
|
30124
|
+
height: itemHeight,
|
|
30125
|
+
lineHeight: unit$1(itemHeight)
|
|
30126
|
+
},
|
|
30127
|
+
[`${componentCls}-item-group-list ${componentCls}-submenu-title,
|
|
30128
|
+
${componentCls}-submenu-title`]: {
|
|
30129
|
+
paddingInlineEnd: paddingWithArrow
|
|
30130
|
+
}
|
|
30131
|
+
};
|
|
30132
|
+
};
|
|
30133
|
+
const getVerticalStyle = (token2) => {
|
|
30134
|
+
const {
|
|
30135
|
+
componentCls,
|
|
30136
|
+
iconCls,
|
|
30137
|
+
itemHeight,
|
|
30138
|
+
colorTextLightSolid,
|
|
30139
|
+
dropdownWidth,
|
|
30140
|
+
controlHeightLG,
|
|
30141
|
+
motionEaseOut,
|
|
30142
|
+
paddingXL,
|
|
30143
|
+
itemMarginInline,
|
|
30144
|
+
fontSizeLG,
|
|
30145
|
+
motionDurationFast,
|
|
30146
|
+
motionDurationSlow,
|
|
30147
|
+
paddingXS,
|
|
30148
|
+
boxShadowSecondary,
|
|
30149
|
+
collapsedWidth,
|
|
30150
|
+
collapsedIconSize
|
|
30151
|
+
} = token2;
|
|
30152
|
+
const inlineItemStyle = {
|
|
30153
|
+
height: itemHeight,
|
|
30154
|
+
lineHeight: unit$1(itemHeight),
|
|
30155
|
+
listStylePosition: "inside",
|
|
30156
|
+
listStyleType: "disc"
|
|
30157
|
+
};
|
|
30158
|
+
return [
|
|
30159
|
+
{
|
|
30160
|
+
[componentCls]: {
|
|
30161
|
+
"&-inline, &-vertical": Object.assign({
|
|
30162
|
+
[`&${componentCls}-root`]: {
|
|
30163
|
+
boxShadow: "none"
|
|
30164
|
+
}
|
|
30165
|
+
}, getVerticalInlineStyle(token2))
|
|
30166
|
+
},
|
|
30167
|
+
[`${componentCls}-submenu-popup`]: {
|
|
30168
|
+
[`${componentCls}-vertical`]: Object.assign(Object.assign({}, getVerticalInlineStyle(token2)), {
|
|
30169
|
+
boxShadow: boxShadowSecondary
|
|
30170
|
+
})
|
|
30171
|
+
}
|
|
30172
|
+
},
|
|
30173
|
+
// Vertical only
|
|
30174
|
+
{
|
|
30175
|
+
[`${componentCls}-submenu-popup ${componentCls}-vertical${componentCls}-sub`]: {
|
|
30176
|
+
minWidth: dropdownWidth,
|
|
30177
|
+
maxHeight: `calc(100vh - ${unit$1(token2.calc(controlHeightLG).mul(2.5).equal())})`,
|
|
30178
|
+
padding: "0",
|
|
30179
|
+
overflow: "hidden",
|
|
30180
|
+
borderInlineEnd: 0,
|
|
30181
|
+
// https://github.com/ant-design/ant-design/issues/22244
|
|
30182
|
+
// https://github.com/ant-design/ant-design/issues/26812
|
|
30183
|
+
"&:not([class*='-active'])": {
|
|
30184
|
+
overflowX: "hidden",
|
|
30185
|
+
overflowY: "auto"
|
|
30186
|
+
}
|
|
30187
|
+
}
|
|
30188
|
+
},
|
|
30189
|
+
// Inline Only
|
|
30190
|
+
{
|
|
30191
|
+
[`${componentCls}-inline`]: {
|
|
30192
|
+
width: "100%",
|
|
30193
|
+
// Motion enhance for first level
|
|
30194
|
+
[`&${componentCls}-root`]: {
|
|
30195
|
+
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
30196
|
+
display: "flex",
|
|
30197
|
+
alignItems: "center",
|
|
30198
|
+
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationFast} ${motionEaseOut}`].join(","),
|
|
30199
|
+
[`> ${componentCls}-title-content`]: {
|
|
30200
|
+
flex: "auto",
|
|
30201
|
+
minWidth: 0,
|
|
30202
|
+
overflow: "hidden",
|
|
30203
|
+
textOverflow: "ellipsis"
|
|
30204
|
+
},
|
|
30205
|
+
"> *": {
|
|
30206
|
+
flex: "none"
|
|
30207
|
+
}
|
|
30208
|
+
}
|
|
30209
|
+
},
|
|
30210
|
+
// >>>>> Sub
|
|
30211
|
+
[`${componentCls}-sub${componentCls}-inline`]: {
|
|
30212
|
+
padding: 0,
|
|
30213
|
+
border: 0,
|
|
30214
|
+
borderRadius: 0,
|
|
30215
|
+
boxShadow: "none",
|
|
30216
|
+
[`& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: inlineItemStyle,
|
|
30217
|
+
[`& ${componentCls}-item-group-title`]: {
|
|
30218
|
+
paddingInlineStart: paddingXL
|
|
30219
|
+
}
|
|
30220
|
+
},
|
|
30221
|
+
// >>>>> Item
|
|
30222
|
+
[`${componentCls}-item`]: inlineItemStyle
|
|
30223
|
+
}
|
|
30224
|
+
},
|
|
30225
|
+
// Inline Collapse Only
|
|
30226
|
+
{
|
|
30227
|
+
[`${componentCls}-inline-collapsed`]: {
|
|
30228
|
+
width: collapsedWidth,
|
|
30229
|
+
[`&${componentCls}-root`]: {
|
|
30230
|
+
[`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
|
|
30231
|
+
[`> ${componentCls}-inline-collapsed-noicon`]: {
|
|
30232
|
+
fontSize: fontSizeLG,
|
|
30233
|
+
textAlign: "center"
|
|
30234
|
+
}
|
|
30235
|
+
}
|
|
30236
|
+
},
|
|
30237
|
+
[`> ${componentCls}-item,
|
|
30238
|
+
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
|
|
30239
|
+
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
|
|
30240
|
+
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
|
|
30241
|
+
insetInlineStart: 0,
|
|
30242
|
+
paddingInline: `calc(50% - ${unit$1(token2.calc(collapsedIconSize).div(2).equal())} - ${unit$1(itemMarginInline)})`,
|
|
30243
|
+
textOverflow: "clip",
|
|
30244
|
+
[`
|
|
30245
|
+
${componentCls}-submenu-arrow,
|
|
30246
|
+
${componentCls}-submenu-expand-icon
|
|
30247
|
+
`]: {
|
|
30248
|
+
opacity: 0
|
|
30249
|
+
},
|
|
30250
|
+
[`${componentCls}-item-icon, ${iconCls}`]: {
|
|
30251
|
+
margin: 0,
|
|
30252
|
+
fontSize: collapsedIconSize,
|
|
30253
|
+
lineHeight: unit$1(itemHeight),
|
|
30254
|
+
"+ span": {
|
|
30255
|
+
display: "inline-block",
|
|
30256
|
+
opacity: 0
|
|
30257
|
+
}
|
|
30258
|
+
}
|
|
30259
|
+
},
|
|
30260
|
+
[`${componentCls}-item-icon, ${iconCls}`]: {
|
|
30261
|
+
display: "inline-block"
|
|
30262
|
+
},
|
|
30263
|
+
"&-tooltip": {
|
|
30264
|
+
pointerEvents: "none",
|
|
30265
|
+
[`${componentCls}-item-icon, ${iconCls}`]: {
|
|
30266
|
+
display: "none"
|
|
30267
|
+
},
|
|
30268
|
+
"a, a:hover": {
|
|
30269
|
+
color: colorTextLightSolid
|
|
30270
|
+
}
|
|
30271
|
+
},
|
|
30272
|
+
[`${componentCls}-item-group-title`]: Object.assign(Object.assign({}, textEllipsis), {
|
|
30273
|
+
paddingInline: paddingXS
|
|
30274
|
+
})
|
|
30275
|
+
}
|
|
30276
|
+
}
|
|
30277
|
+
];
|
|
30278
|
+
};
|
|
30279
|
+
const genMenuItemStyle = (token2) => {
|
|
30280
|
+
const {
|
|
30281
|
+
componentCls,
|
|
30282
|
+
motionDurationSlow,
|
|
30283
|
+
motionDurationMid,
|
|
30284
|
+
motionEaseInOut,
|
|
30285
|
+
motionEaseOut,
|
|
30286
|
+
iconCls,
|
|
30287
|
+
iconSize,
|
|
30288
|
+
iconMarginInlineEnd
|
|
30289
|
+
} = token2;
|
|
30290
|
+
return {
|
|
30291
|
+
// >>>>> Item
|
|
30292
|
+
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
30293
|
+
position: "relative",
|
|
30294
|
+
display: "block",
|
|
30295
|
+
margin: 0,
|
|
30296
|
+
whiteSpace: "nowrap",
|
|
30297
|
+
cursor: "pointer",
|
|
30298
|
+
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding calc(${motionDurationSlow} + 0.1s) ${motionEaseInOut}`].join(","),
|
|
30299
|
+
[`${componentCls}-item-icon, ${iconCls}`]: {
|
|
30300
|
+
minWidth: iconSize,
|
|
30301
|
+
fontSize: iconSize,
|
|
30302
|
+
transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(","),
|
|
30303
|
+
"+ span": {
|
|
30304
|
+
marginInlineStart: iconMarginInlineEnd,
|
|
30305
|
+
opacity: 1,
|
|
30306
|
+
transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(",")
|
|
30307
|
+
}
|
|
30308
|
+
},
|
|
30309
|
+
[`${componentCls}-item-icon`]: Object.assign({}, resetIcon()),
|
|
30310
|
+
[`&${componentCls}-item-only-child`]: {
|
|
30311
|
+
[`> ${iconCls}, > ${componentCls}-item-icon`]: {
|
|
30312
|
+
marginInlineEnd: 0
|
|
30313
|
+
}
|
|
30314
|
+
}
|
|
30315
|
+
},
|
|
30316
|
+
// Disabled state sets text to gray and nukes hover/tab effects
|
|
30317
|
+
[`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
|
|
30318
|
+
background: "none !important",
|
|
30319
|
+
cursor: "not-allowed",
|
|
30320
|
+
"&::after": {
|
|
30321
|
+
borderColor: "transparent !important"
|
|
30322
|
+
},
|
|
30323
|
+
a: {
|
|
30324
|
+
color: "inherit !important",
|
|
30325
|
+
cursor: "not-allowed",
|
|
30326
|
+
pointerEvents: "none"
|
|
30327
|
+
},
|
|
30328
|
+
[`> ${componentCls}-submenu-title`]: {
|
|
30329
|
+
color: "inherit !important",
|
|
30330
|
+
cursor: "not-allowed"
|
|
30331
|
+
}
|
|
30332
|
+
}
|
|
30333
|
+
};
|
|
30334
|
+
};
|
|
30335
|
+
const genSubMenuArrowStyle = (token2) => {
|
|
30336
|
+
const {
|
|
30337
|
+
componentCls,
|
|
30338
|
+
motionDurationSlow,
|
|
30339
|
+
motionEaseInOut,
|
|
30340
|
+
borderRadius,
|
|
30341
|
+
menuArrowSize,
|
|
30342
|
+
menuArrowOffset
|
|
30343
|
+
} = token2;
|
|
30344
|
+
return {
|
|
30345
|
+
[`${componentCls}-submenu`]: {
|
|
30346
|
+
"&-expand-icon, &-arrow": {
|
|
30347
|
+
position: "absolute",
|
|
30348
|
+
top: "50%",
|
|
30349
|
+
insetInlineEnd: token2.margin,
|
|
30350
|
+
width: menuArrowSize,
|
|
30351
|
+
color: "currentcolor",
|
|
30352
|
+
transform: "translateY(-50%)",
|
|
30353
|
+
transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`
|
|
30354
|
+
},
|
|
30355
|
+
"&-arrow": {
|
|
30356
|
+
// →
|
|
30357
|
+
"&::before, &::after": {
|
|
30358
|
+
position: "absolute",
|
|
30359
|
+
width: token2.calc(menuArrowSize).mul(0.6).equal(),
|
|
30360
|
+
height: token2.calc(menuArrowSize).mul(0.15).equal(),
|
|
30361
|
+
backgroundColor: "currentcolor",
|
|
30362
|
+
borderRadius,
|
|
30363
|
+
transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(","),
|
|
30364
|
+
content: '""'
|
|
30365
|
+
},
|
|
30366
|
+
"&::before": {
|
|
30367
|
+
transform: `rotate(45deg) translateY(${unit$1(token2.calc(menuArrowOffset).mul(-1).equal())})`
|
|
30368
|
+
},
|
|
30369
|
+
"&::after": {
|
|
30370
|
+
transform: `rotate(-45deg) translateY(${unit$1(menuArrowOffset)})`
|
|
30371
|
+
}
|
|
30372
|
+
}
|
|
30373
|
+
}
|
|
30374
|
+
};
|
|
30375
|
+
};
|
|
30376
|
+
const getBaseStyle = (token2) => {
|
|
30377
|
+
const {
|
|
30378
|
+
antCls,
|
|
30379
|
+
componentCls,
|
|
30380
|
+
fontSize,
|
|
30381
|
+
motionDurationSlow,
|
|
30382
|
+
motionDurationMid,
|
|
30383
|
+
motionEaseInOut,
|
|
30384
|
+
paddingXS,
|
|
30385
|
+
padding,
|
|
30386
|
+
colorSplit,
|
|
30387
|
+
lineWidth,
|
|
30388
|
+
zIndexPopup,
|
|
30389
|
+
borderRadiusLG,
|
|
30390
|
+
subMenuItemBorderRadius,
|
|
30391
|
+
menuArrowSize,
|
|
30392
|
+
menuArrowOffset,
|
|
30393
|
+
lineType,
|
|
30394
|
+
groupTitleLineHeight,
|
|
30395
|
+
groupTitleFontSize
|
|
30396
|
+
} = token2;
|
|
30397
|
+
return [
|
|
30398
|
+
// Misc
|
|
30399
|
+
{
|
|
30400
|
+
"": {
|
|
30401
|
+
[componentCls]: Object.assign(Object.assign({}, clearFix()), {
|
|
30402
|
+
// Hidden
|
|
30403
|
+
"&-hidden": {
|
|
30404
|
+
display: "none"
|
|
30405
|
+
}
|
|
30406
|
+
})
|
|
30407
|
+
},
|
|
30408
|
+
[`${componentCls}-submenu-hidden`]: {
|
|
30409
|
+
display: "none"
|
|
30410
|
+
}
|
|
30411
|
+
},
|
|
30412
|
+
{
|
|
30413
|
+
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token2)), clearFix()), {
|
|
30414
|
+
marginBottom: 0,
|
|
30415
|
+
paddingInlineStart: 0,
|
|
30416
|
+
// Override default ul/ol
|
|
30417
|
+
fontSize,
|
|
30418
|
+
lineHeight: 0,
|
|
30419
|
+
listStyle: "none",
|
|
30420
|
+
outline: "none",
|
|
30421
|
+
// Magic cubic here but smooth transition
|
|
30422
|
+
transition: `width ${motionDurationSlow} cubic-bezier(0.2, 0, 0, 1) 0s`,
|
|
30423
|
+
"ul, ol": {
|
|
30424
|
+
margin: 0,
|
|
30425
|
+
padding: 0,
|
|
30426
|
+
listStyle: "none"
|
|
30427
|
+
},
|
|
30428
|
+
// Overflow ellipsis
|
|
30429
|
+
"&-overflow": {
|
|
30430
|
+
display: "flex",
|
|
30431
|
+
[`${componentCls}-item`]: {
|
|
30432
|
+
flex: "none"
|
|
30433
|
+
}
|
|
30434
|
+
},
|
|
30435
|
+
[`${componentCls}-item, ${componentCls}-submenu, ${componentCls}-submenu-title`]: {
|
|
30436
|
+
borderRadius: token2.itemBorderRadius
|
|
30437
|
+
},
|
|
30438
|
+
[`${componentCls}-item-group-title`]: {
|
|
30439
|
+
padding: `${unit$1(paddingXS)} ${unit$1(padding)}`,
|
|
30440
|
+
fontSize: groupTitleFontSize,
|
|
30441
|
+
lineHeight: groupTitleLineHeight,
|
|
30442
|
+
transition: `all ${motionDurationSlow}`
|
|
30443
|
+
},
|
|
30444
|
+
[`&-horizontal ${componentCls}-submenu`]: {
|
|
30445
|
+
transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`].join(",")
|
|
30446
|
+
},
|
|
30447
|
+
[`${componentCls}-submenu, ${componentCls}-submenu-inline`]: {
|
|
30448
|
+
transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationMid} ${motionEaseInOut}`].join(",")
|
|
30449
|
+
},
|
|
30450
|
+
[`${componentCls}-submenu ${componentCls}-sub`]: {
|
|
30451
|
+
cursor: "initial",
|
|
30452
|
+
transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(",")
|
|
30453
|
+
},
|
|
30454
|
+
[`${componentCls}-title-content`]: {
|
|
30455
|
+
transition: `color ${motionDurationSlow}`,
|
|
30456
|
+
"&-with-extra": {
|
|
30457
|
+
display: "inline-flex",
|
|
30458
|
+
alignItems: "center",
|
|
30459
|
+
width: "100%"
|
|
30460
|
+
},
|
|
30461
|
+
// https://github.com/ant-design/ant-design/issues/41143
|
|
30462
|
+
[`> ${antCls}-typography-ellipsis-single-line`]: {
|
|
30463
|
+
display: "inline",
|
|
30464
|
+
verticalAlign: "unset"
|
|
30465
|
+
},
|
|
30466
|
+
[`${componentCls}-item-extra`]: {
|
|
30467
|
+
marginInlineStart: "auto",
|
|
30468
|
+
paddingInlineStart: token2.padding
|
|
30469
|
+
}
|
|
30470
|
+
},
|
|
30471
|
+
[`${componentCls}-item a`]: {
|
|
30472
|
+
"&::before": {
|
|
30473
|
+
position: "absolute",
|
|
30474
|
+
inset: 0,
|
|
30475
|
+
backgroundColor: "transparent",
|
|
30476
|
+
content: '""'
|
|
30477
|
+
}
|
|
30478
|
+
},
|
|
30479
|
+
// Removed a Badge related style seems it's safe
|
|
30480
|
+
// https://github.com/ant-design/ant-design/issues/19809
|
|
30481
|
+
// >>>>> Divider
|
|
30482
|
+
[`${componentCls}-item-divider`]: {
|
|
30483
|
+
overflow: "hidden",
|
|
30484
|
+
lineHeight: 0,
|
|
30485
|
+
borderColor: colorSplit,
|
|
30486
|
+
borderStyle: lineType,
|
|
30487
|
+
borderWidth: 0,
|
|
30488
|
+
borderTopWidth: lineWidth,
|
|
30489
|
+
marginBlock: lineWidth,
|
|
30490
|
+
padding: 0,
|
|
30491
|
+
"&-dashed": {
|
|
30492
|
+
borderStyle: "dashed"
|
|
30493
|
+
}
|
|
30494
|
+
}
|
|
30495
|
+
}), genMenuItemStyle(token2)), {
|
|
30496
|
+
[`${componentCls}-item-group`]: {
|
|
30497
|
+
[`${componentCls}-item-group-list`]: {
|
|
30498
|
+
margin: 0,
|
|
30499
|
+
padding: 0,
|
|
30500
|
+
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
30501
|
+
paddingInline: `${unit$1(token2.calc(fontSize).mul(2).equal())} ${unit$1(padding)}`
|
|
30502
|
+
}
|
|
30503
|
+
}
|
|
30504
|
+
},
|
|
30505
|
+
// ======================= Sub Menu =======================
|
|
30506
|
+
"&-submenu": {
|
|
30507
|
+
"&-popup": {
|
|
30508
|
+
position: "absolute",
|
|
30509
|
+
zIndex: zIndexPopup,
|
|
30510
|
+
borderRadius: borderRadiusLG,
|
|
30511
|
+
boxShadow: "none",
|
|
30512
|
+
transformOrigin: "0 0",
|
|
30513
|
+
[`&${componentCls}-submenu`]: {
|
|
30514
|
+
background: "transparent"
|
|
30515
|
+
},
|
|
30516
|
+
// https://github.com/ant-design/ant-design/issues/13955
|
|
30517
|
+
"&::before": {
|
|
30518
|
+
position: "absolute",
|
|
30519
|
+
inset: 0,
|
|
30520
|
+
zIndex: -1,
|
|
30521
|
+
width: "100%",
|
|
30522
|
+
height: "100%",
|
|
30523
|
+
opacity: 0,
|
|
30524
|
+
content: '""'
|
|
30525
|
+
},
|
|
30526
|
+
[`> ${componentCls}`]: Object.assign(Object.assign(Object.assign({
|
|
30527
|
+
borderRadius: borderRadiusLG
|
|
30528
|
+
}, genMenuItemStyle(token2)), genSubMenuArrowStyle(token2)), {
|
|
30529
|
+
[`${componentCls}-item, ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
|
|
30530
|
+
borderRadius: subMenuItemBorderRadius
|
|
30531
|
+
},
|
|
30532
|
+
[`${componentCls}-submenu-title::after`]: {
|
|
30533
|
+
transition: `transform ${motionDurationSlow} ${motionEaseInOut}`
|
|
30534
|
+
}
|
|
30535
|
+
})
|
|
30536
|
+
},
|
|
30537
|
+
[`
|
|
30538
|
+
&-placement-leftTop,
|
|
30539
|
+
&-placement-bottomRight,
|
|
30540
|
+
`]: {
|
|
30541
|
+
transformOrigin: "100% 0"
|
|
30542
|
+
},
|
|
30543
|
+
[`
|
|
30544
|
+
&-placement-leftBottom,
|
|
30545
|
+
&-placement-topRight,
|
|
30546
|
+
`]: {
|
|
30547
|
+
transformOrigin: "100% 100%"
|
|
30548
|
+
},
|
|
30549
|
+
[`
|
|
30550
|
+
&-placement-rightBottom,
|
|
30551
|
+
&-placement-topLeft,
|
|
30552
|
+
`]: {
|
|
30553
|
+
transformOrigin: "0 100%"
|
|
30554
|
+
},
|
|
30555
|
+
[`
|
|
30556
|
+
&-placement-bottomLeft,
|
|
30557
|
+
&-placement-rightTop,
|
|
30558
|
+
`]: {
|
|
30559
|
+
transformOrigin: "0 0"
|
|
30560
|
+
},
|
|
30561
|
+
[`
|
|
30562
|
+
&-placement-leftTop,
|
|
30563
|
+
&-placement-leftBottom
|
|
30564
|
+
`]: {
|
|
30565
|
+
paddingInlineEnd: token2.paddingXS
|
|
30566
|
+
},
|
|
30567
|
+
[`
|
|
30568
|
+
&-placement-rightTop,
|
|
30569
|
+
&-placement-rightBottom
|
|
30570
|
+
`]: {
|
|
30571
|
+
paddingInlineStart: token2.paddingXS
|
|
30572
|
+
},
|
|
30573
|
+
[`
|
|
30574
|
+
&-placement-topRight,
|
|
30575
|
+
&-placement-topLeft
|
|
30576
|
+
`]: {
|
|
30577
|
+
paddingBottom: token2.paddingXS
|
|
30578
|
+
},
|
|
30579
|
+
[`
|
|
30580
|
+
&-placement-bottomRight,
|
|
30581
|
+
&-placement-bottomLeft
|
|
30582
|
+
`]: {
|
|
30583
|
+
paddingTop: token2.paddingXS
|
|
30584
|
+
}
|
|
30585
|
+
}
|
|
30586
|
+
}), genSubMenuArrowStyle(token2)), {
|
|
30587
|
+
[`&-inline-collapsed ${componentCls}-submenu-arrow,
|
|
30588
|
+
&-inline ${componentCls}-submenu-arrow`]: {
|
|
30589
|
+
// ↓
|
|
30590
|
+
"&::before": {
|
|
30591
|
+
transform: `rotate(-45deg) translateX(${unit$1(menuArrowOffset)})`
|
|
30592
|
+
},
|
|
30593
|
+
"&::after": {
|
|
30594
|
+
transform: `rotate(45deg) translateX(${unit$1(token2.calc(menuArrowOffset).mul(-1).equal())})`
|
|
30595
|
+
}
|
|
30596
|
+
},
|
|
30597
|
+
[`${componentCls}-submenu-open${componentCls}-submenu-inline > ${componentCls}-submenu-title > ${componentCls}-submenu-arrow`]: {
|
|
30598
|
+
// ↑
|
|
30599
|
+
transform: `translateY(${unit$1(token2.calc(menuArrowSize).mul(0.2).mul(-1).equal())})`,
|
|
30600
|
+
"&::after": {
|
|
30601
|
+
transform: `rotate(-45deg) translateX(${unit$1(token2.calc(menuArrowOffset).mul(-1).equal())})`
|
|
30602
|
+
},
|
|
30603
|
+
"&::before": {
|
|
30604
|
+
transform: `rotate(45deg) translateX(${unit$1(menuArrowOffset)})`
|
|
30605
|
+
}
|
|
30606
|
+
}
|
|
30607
|
+
})
|
|
30608
|
+
},
|
|
30609
|
+
// Integration with header element so menu items have the same height
|
|
30610
|
+
{
|
|
30611
|
+
[`${antCls}-layout-header`]: {
|
|
30612
|
+
[componentCls]: {
|
|
30613
|
+
lineHeight: "inherit"
|
|
30614
|
+
}
|
|
30615
|
+
}
|
|
30616
|
+
}
|
|
30617
|
+
];
|
|
30618
|
+
};
|
|
30619
|
+
const prepareComponentToken$d = (token2) => {
|
|
30620
|
+
var _a2, _b, _c;
|
|
30621
|
+
const {
|
|
30622
|
+
colorPrimary,
|
|
30623
|
+
colorError,
|
|
30624
|
+
colorTextDisabled,
|
|
30625
|
+
colorErrorBg,
|
|
30626
|
+
colorText,
|
|
30627
|
+
colorTextDescription,
|
|
30628
|
+
colorBgContainer,
|
|
30629
|
+
colorFillAlter,
|
|
30630
|
+
colorFillContent,
|
|
30631
|
+
lineWidth,
|
|
30632
|
+
lineWidthBold,
|
|
30633
|
+
controlItemBgActive,
|
|
30634
|
+
colorBgTextHover,
|
|
30635
|
+
controlHeightLG,
|
|
30636
|
+
lineHeight,
|
|
30637
|
+
colorBgElevated,
|
|
30638
|
+
marginXXS,
|
|
30639
|
+
padding,
|
|
30640
|
+
fontSize,
|
|
30641
|
+
controlHeightSM,
|
|
30642
|
+
fontSizeLG,
|
|
30643
|
+
colorTextLightSolid,
|
|
30644
|
+
colorErrorHover
|
|
30645
|
+
} = token2;
|
|
30646
|
+
const activeBarWidth = (_a2 = token2.activeBarWidth) !== null && _a2 !== void 0 ? _a2 : 0;
|
|
30647
|
+
const activeBarBorderWidth = (_b = token2.activeBarBorderWidth) !== null && _b !== void 0 ? _b : lineWidth;
|
|
30648
|
+
const itemMarginInline = (_c = token2.itemMarginInline) !== null && _c !== void 0 ? _c : token2.marginXXS;
|
|
30649
|
+
const colorTextDark = new FastColor(colorTextLightSolid).setA(0.65).toRgbString();
|
|
30650
|
+
return {
|
|
30651
|
+
dropdownWidth: 160,
|
|
30652
|
+
zIndexPopup: token2.zIndexPopupBase + 50,
|
|
30653
|
+
radiusItem: token2.borderRadiusLG,
|
|
30654
|
+
itemBorderRadius: token2.borderRadiusLG,
|
|
30655
|
+
radiusSubMenuItem: token2.borderRadiusSM,
|
|
30656
|
+
subMenuItemBorderRadius: token2.borderRadiusSM,
|
|
30657
|
+
colorItemText: colorText,
|
|
30658
|
+
itemColor: colorText,
|
|
30659
|
+
colorItemTextHover: colorText,
|
|
30660
|
+
itemHoverColor: colorText,
|
|
30661
|
+
colorItemTextHoverHorizontal: colorPrimary,
|
|
30662
|
+
horizontalItemHoverColor: colorPrimary,
|
|
30663
|
+
colorGroupTitle: colorTextDescription,
|
|
30664
|
+
groupTitleColor: colorTextDescription,
|
|
30665
|
+
colorItemTextSelected: colorPrimary,
|
|
30666
|
+
itemSelectedColor: colorPrimary,
|
|
30667
|
+
subMenuItemSelectedColor: colorPrimary,
|
|
30668
|
+
colorItemTextSelectedHorizontal: colorPrimary,
|
|
30669
|
+
horizontalItemSelectedColor: colorPrimary,
|
|
30670
|
+
colorItemBg: colorBgContainer,
|
|
30671
|
+
itemBg: colorBgContainer,
|
|
30672
|
+
colorItemBgHover: colorBgTextHover,
|
|
30673
|
+
itemHoverBg: colorBgTextHover,
|
|
30674
|
+
colorItemBgActive: colorFillContent,
|
|
30675
|
+
itemActiveBg: controlItemBgActive,
|
|
30676
|
+
colorSubItemBg: colorFillAlter,
|
|
30677
|
+
subMenuItemBg: colorFillAlter,
|
|
30678
|
+
colorItemBgSelected: controlItemBgActive,
|
|
30679
|
+
itemSelectedBg: controlItemBgActive,
|
|
30680
|
+
colorItemBgSelectedHorizontal: "transparent",
|
|
30681
|
+
horizontalItemSelectedBg: "transparent",
|
|
30682
|
+
colorActiveBarWidth: 0,
|
|
30683
|
+
activeBarWidth,
|
|
30684
|
+
colorActiveBarHeight: lineWidthBold,
|
|
30685
|
+
activeBarHeight: lineWidthBold,
|
|
30686
|
+
colorActiveBarBorderSize: lineWidth,
|
|
30687
|
+
activeBarBorderWidth,
|
|
30688
|
+
// Disabled
|
|
30689
|
+
colorItemTextDisabled: colorTextDisabled,
|
|
30690
|
+
itemDisabledColor: colorTextDisabled,
|
|
30691
|
+
// Danger
|
|
30692
|
+
colorDangerItemText: colorError,
|
|
30693
|
+
dangerItemColor: colorError,
|
|
30694
|
+
colorDangerItemTextHover: colorError,
|
|
30695
|
+
dangerItemHoverColor: colorError,
|
|
30696
|
+
colorDangerItemTextSelected: colorError,
|
|
30697
|
+
dangerItemSelectedColor: colorError,
|
|
30698
|
+
colorDangerItemBgActive: colorErrorBg,
|
|
30699
|
+
dangerItemActiveBg: colorErrorBg,
|
|
30700
|
+
colorDangerItemBgSelected: colorErrorBg,
|
|
30701
|
+
dangerItemSelectedBg: colorErrorBg,
|
|
30702
|
+
itemMarginInline,
|
|
30703
|
+
horizontalItemBorderRadius: 0,
|
|
30704
|
+
horizontalItemHoverBg: "transparent",
|
|
30705
|
+
itemHeight: controlHeightLG,
|
|
30706
|
+
groupTitleLineHeight: lineHeight,
|
|
30707
|
+
collapsedWidth: controlHeightLG * 2,
|
|
30708
|
+
popupBg: colorBgElevated,
|
|
30709
|
+
itemMarginBlock: marginXXS,
|
|
30710
|
+
itemPaddingInline: padding,
|
|
30711
|
+
horizontalLineHeight: `${controlHeightLG * 1.15}px`,
|
|
30712
|
+
iconSize: fontSize,
|
|
30713
|
+
iconMarginInlineEnd: controlHeightSM - fontSize,
|
|
30714
|
+
collapsedIconSize: fontSizeLG,
|
|
30715
|
+
groupTitleFontSize: fontSize,
|
|
30716
|
+
// Disabled
|
|
30717
|
+
darkItemDisabledColor: new FastColor(colorTextLightSolid).setA(0.25).toRgbString(),
|
|
30718
|
+
// Dark
|
|
30719
|
+
darkItemColor: colorTextDark,
|
|
30720
|
+
darkDangerItemColor: colorError,
|
|
30721
|
+
darkItemBg: "#001529",
|
|
30722
|
+
darkPopupBg: "#001529",
|
|
30723
|
+
darkSubMenuItemBg: "#000c17",
|
|
30724
|
+
darkItemSelectedColor: colorTextLightSolid,
|
|
30725
|
+
darkItemSelectedBg: colorPrimary,
|
|
30726
|
+
darkDangerItemSelectedBg: colorError,
|
|
30727
|
+
darkItemHoverBg: "transparent",
|
|
30728
|
+
darkGroupTitleColor: colorTextDark,
|
|
30729
|
+
darkItemHoverColor: colorTextLightSolid,
|
|
30730
|
+
darkDangerItemHoverColor: colorErrorHover,
|
|
30731
|
+
darkDangerItemSelectedColor: colorTextLightSolid,
|
|
30732
|
+
darkDangerItemActiveBg: colorError,
|
|
30733
|
+
// internal
|
|
30734
|
+
itemWidth: activeBarWidth ? `calc(100% + ${activeBarBorderWidth}px)` : `calc(100% - ${itemMarginInline * 2}px)`
|
|
30735
|
+
};
|
|
30736
|
+
};
|
|
30737
|
+
const useStyle$j = (prefixCls, rootCls = prefixCls, injectStyle = true) => {
|
|
30738
|
+
const useStyle2 = genStyleHooks("Menu", (token2) => {
|
|
30739
|
+
const {
|
|
30740
|
+
colorBgElevated,
|
|
30741
|
+
controlHeightLG,
|
|
30742
|
+
fontSize,
|
|
30743
|
+
darkItemColor,
|
|
30744
|
+
darkDangerItemColor,
|
|
30745
|
+
darkItemBg,
|
|
30746
|
+
darkSubMenuItemBg,
|
|
30747
|
+
darkItemSelectedColor,
|
|
30748
|
+
darkItemSelectedBg,
|
|
30749
|
+
darkDangerItemSelectedBg,
|
|
30750
|
+
darkItemHoverBg,
|
|
30751
|
+
darkGroupTitleColor,
|
|
30752
|
+
darkItemHoverColor,
|
|
30753
|
+
darkItemDisabledColor,
|
|
30754
|
+
darkDangerItemHoverColor,
|
|
30755
|
+
darkDangerItemSelectedColor,
|
|
30756
|
+
darkDangerItemActiveBg,
|
|
30757
|
+
popupBg,
|
|
30758
|
+
darkPopupBg
|
|
30759
|
+
} = token2;
|
|
30760
|
+
const menuArrowSize = token2.calc(fontSize).div(7).mul(5).equal();
|
|
30761
|
+
const menuToken = merge$1(token2, {
|
|
30762
|
+
menuArrowSize,
|
|
30763
|
+
menuHorizontalHeight: token2.calc(controlHeightLG).mul(1.15).equal(),
|
|
30764
|
+
menuArrowOffset: token2.calc(menuArrowSize).mul(0.25).equal(),
|
|
30765
|
+
menuSubMenuBg: colorBgElevated,
|
|
30766
|
+
calc: token2.calc,
|
|
30767
|
+
popupBg
|
|
30768
|
+
});
|
|
30769
|
+
const menuDarkToken = merge$1(menuToken, {
|
|
30770
|
+
itemColor: darkItemColor,
|
|
30771
|
+
itemHoverColor: darkItemHoverColor,
|
|
30772
|
+
groupTitleColor: darkGroupTitleColor,
|
|
30773
|
+
itemSelectedColor: darkItemSelectedColor,
|
|
30774
|
+
subMenuItemSelectedColor: darkItemSelectedColor,
|
|
30775
|
+
itemBg: darkItemBg,
|
|
30776
|
+
popupBg: darkPopupBg,
|
|
30777
|
+
subMenuItemBg: darkSubMenuItemBg,
|
|
30778
|
+
itemActiveBg: "transparent",
|
|
30779
|
+
itemSelectedBg: darkItemSelectedBg,
|
|
30780
|
+
activeBarHeight: 0,
|
|
30781
|
+
activeBarBorderWidth: 0,
|
|
30782
|
+
itemHoverBg: darkItemHoverBg,
|
|
30783
|
+
// Disabled
|
|
30784
|
+
itemDisabledColor: darkItemDisabledColor,
|
|
30785
|
+
// Danger
|
|
30786
|
+
dangerItemColor: darkDangerItemColor,
|
|
30787
|
+
dangerItemHoverColor: darkDangerItemHoverColor,
|
|
30788
|
+
dangerItemSelectedColor: darkDangerItemSelectedColor,
|
|
30789
|
+
dangerItemActiveBg: darkDangerItemActiveBg,
|
|
30790
|
+
dangerItemSelectedBg: darkDangerItemSelectedBg,
|
|
30791
|
+
menuSubMenuBg: darkSubMenuItemBg,
|
|
30792
|
+
// Horizontal
|
|
30793
|
+
horizontalItemSelectedColor: darkItemSelectedColor,
|
|
30794
|
+
horizontalItemSelectedBg: darkItemSelectedBg
|
|
30795
|
+
});
|
|
30796
|
+
return [
|
|
30797
|
+
// Basic
|
|
30798
|
+
getBaseStyle(menuToken),
|
|
30799
|
+
// Horizontal
|
|
30800
|
+
getHorizontalStyle(menuToken),
|
|
30801
|
+
// Hard code for some light style
|
|
30802
|
+
// Vertical
|
|
30803
|
+
getVerticalStyle(menuToken),
|
|
30804
|
+
// Hard code for some light style
|
|
30805
|
+
// Theme
|
|
30806
|
+
getThemeStyle(menuToken, "light"),
|
|
30807
|
+
getThemeStyle(menuDarkToken, "dark"),
|
|
30808
|
+
// RTL
|
|
30809
|
+
getRTLStyle(menuToken),
|
|
30810
|
+
// Motion
|
|
30811
|
+
genCollapseMotion(menuToken),
|
|
30812
|
+
initSlideMotion(menuToken, "slide-up"),
|
|
30813
|
+
initSlideMotion(menuToken, "slide-down"),
|
|
30814
|
+
initZoomMotion(menuToken, "zoom-big")
|
|
30815
|
+
];
|
|
30816
|
+
}, prepareComponentToken$d, {
|
|
30817
|
+
deprecatedTokens: [["colorGroupTitle", "groupTitleColor"], ["radiusItem", "itemBorderRadius"], ["radiusSubMenuItem", "subMenuItemBorderRadius"], ["colorItemText", "itemColor"], ["colorItemTextHover", "itemHoverColor"], ["colorItemTextHoverHorizontal", "horizontalItemHoverColor"], ["colorItemTextSelected", "itemSelectedColor"], ["colorItemTextSelectedHorizontal", "horizontalItemSelectedColor"], ["colorItemTextDisabled", "itemDisabledColor"], ["colorDangerItemText", "dangerItemColor"], ["colorDangerItemTextHover", "dangerItemHoverColor"], ["colorDangerItemTextSelected", "dangerItemSelectedColor"], ["colorDangerItemBgActive", "dangerItemActiveBg"], ["colorDangerItemBgSelected", "dangerItemSelectedBg"], ["colorItemBg", "itemBg"], ["colorItemBgHover", "itemHoverBg"], ["colorSubItemBg", "subMenuItemBg"], ["colorItemBgActive", "itemActiveBg"], ["colorItemBgSelectedHorizontal", "horizontalItemSelectedBg"], ["colorActiveBarWidth", "activeBarWidth"], ["colorActiveBarHeight", "activeBarHeight"], ["colorActiveBarBorderSize", "activeBarBorderWidth"], ["colorItemBgSelected", "itemSelectedBg"]],
|
|
30818
|
+
// Dropdown will handle menu style self. We do not need to handle this.
|
|
30819
|
+
injectStyle,
|
|
30820
|
+
unitless: {
|
|
30821
|
+
groupTitleLineHeight: true
|
|
30822
|
+
}
|
|
30823
|
+
});
|
|
30824
|
+
return useStyle2(prefixCls, rootCls);
|
|
30825
|
+
};
|
|
30826
|
+
const SubMenu = (props) => {
|
|
30827
|
+
var _a2;
|
|
30828
|
+
const {
|
|
30829
|
+
popupClassName,
|
|
30830
|
+
icon: icon2,
|
|
30831
|
+
title,
|
|
30832
|
+
theme: customTheme
|
|
30833
|
+
} = props;
|
|
30834
|
+
const context = React.useContext(MenuContext);
|
|
30835
|
+
const {
|
|
30836
|
+
prefixCls,
|
|
30837
|
+
inlineCollapsed,
|
|
30838
|
+
theme: contextTheme
|
|
30839
|
+
} = context;
|
|
30840
|
+
const parentPath = useFullPath();
|
|
30841
|
+
let titleNode;
|
|
30842
|
+
if (!icon2) {
|
|
30843
|
+
titleNode = inlineCollapsed && !parentPath.length && title && typeof title === "string" ? /* @__PURE__ */ React.createElement("div", {
|
|
30844
|
+
className: `${prefixCls}-inline-collapsed-noicon`
|
|
30845
|
+
}, title.charAt(0)) : /* @__PURE__ */ React.createElement("span", {
|
|
30846
|
+
className: `${prefixCls}-title-content`
|
|
30847
|
+
}, title);
|
|
30848
|
+
} else {
|
|
30849
|
+
const titleIsSpan = /* @__PURE__ */ React.isValidElement(title) && title.type === "span";
|
|
30850
|
+
titleNode = /* @__PURE__ */ React.createElement(React.Fragment, null, cloneElement(icon2, {
|
|
30851
|
+
className: classNames(/* @__PURE__ */ React.isValidElement(icon2) ? (_a2 = icon2.props) === null || _a2 === void 0 ? void 0 : _a2.className : void 0, `${prefixCls}-item-icon`)
|
|
30852
|
+
}), titleIsSpan ? title : /* @__PURE__ */ React.createElement("span", {
|
|
30853
|
+
className: `${prefixCls}-title-content`
|
|
30854
|
+
}, title));
|
|
30855
|
+
}
|
|
30856
|
+
const contextValue = React.useMemo(() => Object.assign(Object.assign({}, context), {
|
|
30857
|
+
firstLevel: false
|
|
30858
|
+
}), [context]);
|
|
30859
|
+
const [zIndex] = useZIndex("Menu");
|
|
30860
|
+
return /* @__PURE__ */ React.createElement(MenuContext.Provider, {
|
|
30861
|
+
value: contextValue
|
|
30862
|
+
}, /* @__PURE__ */ React.createElement(SubMenu$1, Object.assign({}, omit(props, ["icon"]), {
|
|
30863
|
+
title: titleNode,
|
|
30864
|
+
popupClassName: classNames(prefixCls, popupClassName, `${prefixCls}-${customTheme || contextTheme}`),
|
|
30865
|
+
popupStyle: Object.assign({
|
|
30866
|
+
zIndex
|
|
30867
|
+
}, props.popupStyle)
|
|
30868
|
+
})));
|
|
30869
|
+
};
|
|
30870
|
+
var __rest$F = function(s2, e3) {
|
|
30871
|
+
var t2 = {};
|
|
30872
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
30873
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
30874
|
+
if (e3.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i])) t2[p2[i]] = s2[p2[i]];
|
|
30875
|
+
}
|
|
30876
|
+
return t2;
|
|
30877
|
+
};
|
|
30878
|
+
function isEmptyIcon(icon2) {
|
|
30879
|
+
return icon2 === null || icon2 === false;
|
|
30880
|
+
}
|
|
30881
|
+
const MENU_COMPONENTS = {
|
|
30882
|
+
item: MenuItem$1,
|
|
30883
|
+
submenu: SubMenu,
|
|
30884
|
+
divider: MenuDivider
|
|
30885
|
+
};
|
|
30886
|
+
const InternalMenu = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
30887
|
+
var _a2;
|
|
30888
|
+
const override = React.useContext(OverrideContext);
|
|
30889
|
+
const overrideObj = override || {};
|
|
30890
|
+
const {
|
|
30891
|
+
getPrefixCls,
|
|
30892
|
+
getPopupContainer,
|
|
30893
|
+
direction,
|
|
30894
|
+
menu
|
|
30895
|
+
} = React.useContext(ConfigContext);
|
|
30896
|
+
const rootPrefixCls = getPrefixCls();
|
|
30897
|
+
const {
|
|
30898
|
+
prefixCls: customizePrefixCls,
|
|
30899
|
+
className,
|
|
30900
|
+
style: style2,
|
|
30901
|
+
theme: theme2 = "light",
|
|
30902
|
+
expandIcon,
|
|
30903
|
+
_internalDisableMenuItemTitleTooltip,
|
|
30904
|
+
inlineCollapsed,
|
|
30905
|
+
siderCollapsed,
|
|
30906
|
+
rootClassName,
|
|
30907
|
+
mode,
|
|
30908
|
+
selectable,
|
|
30909
|
+
onClick,
|
|
30910
|
+
overflowedIndicatorPopupClassName
|
|
30911
|
+
} = props, restProps = __rest$F(props, ["prefixCls", "className", "style", "theme", "expandIcon", "_internalDisableMenuItemTitleTooltip", "inlineCollapsed", "siderCollapsed", "rootClassName", "mode", "selectable", "onClick", "overflowedIndicatorPopupClassName"]);
|
|
30912
|
+
const passedProps = omit(restProps, ["collapsedWidth"]);
|
|
30913
|
+
if (process.env.NODE_ENV !== "production") {
|
|
30914
|
+
const warning3 = devUseWarning("Menu");
|
|
30915
|
+
process.env.NODE_ENV !== "production" ? warning3(!("inlineCollapsed" in props && mode !== "inline"), "usage", "`inlineCollapsed` should only be used when `mode` is inline.") : void 0;
|
|
30916
|
+
warning3.deprecated("items" in props && !props.children, "children", "items");
|
|
30917
|
+
}
|
|
30918
|
+
(_a2 = overrideObj.validator) === null || _a2 === void 0 ? void 0 : _a2.call(overrideObj, {
|
|
30919
|
+
mode
|
|
30920
|
+
});
|
|
30921
|
+
const onItemClick = useEvent((...args) => {
|
|
30922
|
+
var _a3;
|
|
30923
|
+
onClick === null || onClick === void 0 ? void 0 : onClick.apply(void 0, args);
|
|
30924
|
+
(_a3 = overrideObj.onClick) === null || _a3 === void 0 ? void 0 : _a3.call(overrideObj);
|
|
30925
|
+
});
|
|
30926
|
+
const mergedMode = overrideObj.mode || mode;
|
|
30927
|
+
const mergedSelectable = selectable !== null && selectable !== void 0 ? selectable : overrideObj.selectable;
|
|
30928
|
+
const mergedInlineCollapsed = inlineCollapsed !== null && inlineCollapsed !== void 0 ? inlineCollapsed : siderCollapsed;
|
|
30929
|
+
const defaultMotions = {
|
|
30930
|
+
horizontal: {
|
|
30931
|
+
motionName: `${rootPrefixCls}-slide-up`
|
|
30932
|
+
},
|
|
30933
|
+
inline: initCollapseMotion(rootPrefixCls),
|
|
30934
|
+
other: {
|
|
30935
|
+
motionName: `${rootPrefixCls}-zoom-big`
|
|
30936
|
+
}
|
|
30937
|
+
};
|
|
30938
|
+
const prefixCls = getPrefixCls("menu", customizePrefixCls || overrideObj.prefixCls);
|
|
30939
|
+
const rootCls = useCSSVarCls(prefixCls);
|
|
30940
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$j(prefixCls, rootCls, !override);
|
|
30941
|
+
const menuClassName = classNames(`${prefixCls}-${theme2}`, menu === null || menu === void 0 ? void 0 : menu.className, className);
|
|
30942
|
+
const mergedExpandIcon = React.useMemo(() => {
|
|
30943
|
+
var _a3, _b;
|
|
30944
|
+
if (typeof expandIcon === "function" || isEmptyIcon(expandIcon)) {
|
|
30945
|
+
return expandIcon || null;
|
|
30946
|
+
}
|
|
30947
|
+
if (typeof overrideObj.expandIcon === "function" || isEmptyIcon(overrideObj.expandIcon)) {
|
|
30948
|
+
return overrideObj.expandIcon || null;
|
|
30949
|
+
}
|
|
30950
|
+
if (typeof (menu === null || menu === void 0 ? void 0 : menu.expandIcon) === "function" || isEmptyIcon(menu === null || menu === void 0 ? void 0 : menu.expandIcon)) {
|
|
30951
|
+
return (menu === null || menu === void 0 ? void 0 : menu.expandIcon) || null;
|
|
30952
|
+
}
|
|
30953
|
+
const mergedIcon = (_a3 = expandIcon !== null && expandIcon !== void 0 ? expandIcon : overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon) !== null && _a3 !== void 0 ? _a3 : menu === null || menu === void 0 ? void 0 : menu.expandIcon;
|
|
30954
|
+
return cloneElement(mergedIcon, {
|
|
30955
|
+
className: classNames(`${prefixCls}-submenu-expand-icon`, /* @__PURE__ */ React.isValidElement(mergedIcon) ? (_b = mergedIcon.props) === null || _b === void 0 ? void 0 : _b.className : void 0)
|
|
30956
|
+
});
|
|
30957
|
+
}, [expandIcon, overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon, menu === null || menu === void 0 ? void 0 : menu.expandIcon, prefixCls]);
|
|
30958
|
+
const contextValue = React.useMemo(() => ({
|
|
30959
|
+
prefixCls,
|
|
30960
|
+
inlineCollapsed: mergedInlineCollapsed || false,
|
|
30961
|
+
direction,
|
|
30962
|
+
firstLevel: true,
|
|
30963
|
+
theme: theme2,
|
|
30964
|
+
mode: mergedMode,
|
|
30965
|
+
disableMenuItemTitleTooltip: _internalDisableMenuItemTitleTooltip
|
|
30966
|
+
}), [prefixCls, mergedInlineCollapsed, direction, _internalDisableMenuItemTitleTooltip, theme2]);
|
|
30967
|
+
return wrapCSSVar(/* @__PURE__ */ React.createElement(OverrideContext.Provider, {
|
|
30968
|
+
value: null
|
|
30969
|
+
}, /* @__PURE__ */ React.createElement(MenuContext.Provider, {
|
|
30970
|
+
value: contextValue
|
|
30971
|
+
}, /* @__PURE__ */ React.createElement(ExportMenu, Object.assign({
|
|
30972
|
+
getPopupContainer,
|
|
30973
|
+
overflowedIndicator: /* @__PURE__ */ React.createElement(RefIcon$r, null),
|
|
30974
|
+
overflowedIndicatorPopupClassName: classNames(prefixCls, `${prefixCls}-${theme2}`, overflowedIndicatorPopupClassName),
|
|
30975
|
+
mode: mergedMode,
|
|
30976
|
+
selectable: mergedSelectable,
|
|
30977
|
+
onClick: onItemClick
|
|
30978
|
+
}, passedProps, {
|
|
30979
|
+
inlineCollapsed: mergedInlineCollapsed,
|
|
30980
|
+
style: Object.assign(Object.assign({}, menu === null || menu === void 0 ? void 0 : menu.style), style2),
|
|
30981
|
+
className: menuClassName,
|
|
30982
|
+
prefixCls,
|
|
30983
|
+
direction,
|
|
30984
|
+
defaultMotions,
|
|
30985
|
+
expandIcon: mergedExpandIcon,
|
|
30986
|
+
ref,
|
|
30987
|
+
rootClassName: classNames(rootClassName, hashId, overrideObj.rootClassName, cssVarCls, rootCls),
|
|
30988
|
+
_internalComponents: MENU_COMPONENTS
|
|
30989
|
+
})))));
|
|
30990
|
+
});
|
|
30991
|
+
const Menu$1 = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
30992
|
+
const menuRef = useRef(null);
|
|
30993
|
+
const context = React.useContext(SiderContext);
|
|
30994
|
+
useImperativeHandle(ref, () => ({
|
|
30995
|
+
menu: menuRef.current,
|
|
30996
|
+
focus: (options) => {
|
|
30997
|
+
var _a2;
|
|
30998
|
+
(_a2 = menuRef.current) === null || _a2 === void 0 ? void 0 : _a2.focus(options);
|
|
30999
|
+
}
|
|
31000
|
+
}));
|
|
31001
|
+
return /* @__PURE__ */ React.createElement(InternalMenu, Object.assign({
|
|
31002
|
+
ref: menuRef
|
|
31003
|
+
}, props, context));
|
|
31004
|
+
});
|
|
31005
|
+
Menu$1.Item = MenuItem$1;
|
|
31006
|
+
Menu$1.SubMenu = SubMenu;
|
|
31007
|
+
Menu$1.Divider = MenuDivider;
|
|
31008
|
+
Menu$1.ItemGroup = MenuItemGroup;
|
|
31009
|
+
if (process.env.NODE_ENV !== "production") {
|
|
31010
|
+
Menu$1.displayName = "Menu";
|
|
31011
|
+
}
|
|
31012
|
+
const genStatusStyle = (token2) => {
|
|
31013
|
+
const {
|
|
31014
|
+
componentCls,
|
|
31015
|
+
menuCls,
|
|
31016
|
+
colorError,
|
|
31017
|
+
colorTextLightSolid
|
|
31018
|
+
} = token2;
|
|
31019
|
+
const itemCls = `${menuCls}-item`;
|
|
31020
|
+
return {
|
|
31021
|
+
[`${componentCls}, ${componentCls}-menu-submenu`]: {
|
|
31022
|
+
[`${menuCls} ${itemCls}`]: {
|
|
31023
|
+
[`&${itemCls}-danger:not(${itemCls}-disabled)`]: {
|
|
31024
|
+
color: colorError,
|
|
31025
|
+
"&:hover": {
|
|
31026
|
+
color: colorTextLightSolid,
|
|
31027
|
+
backgroundColor: colorError
|
|
31028
|
+
}
|
|
31029
|
+
}
|
|
31030
|
+
}
|
|
31031
|
+
}
|
|
31032
|
+
};
|
|
31033
|
+
};
|
|
31034
|
+
const genBaseStyle$1 = (token2) => {
|
|
31035
|
+
const {
|
|
31036
|
+
componentCls,
|
|
31037
|
+
menuCls,
|
|
31038
|
+
zIndexPopup,
|
|
31039
|
+
dropdownArrowDistance,
|
|
31040
|
+
sizePopupArrow,
|
|
31041
|
+
antCls,
|
|
31042
|
+
iconCls,
|
|
31043
|
+
motionDurationMid,
|
|
31044
|
+
paddingBlock,
|
|
31045
|
+
fontSize,
|
|
31046
|
+
dropdownEdgeChildPadding,
|
|
31047
|
+
colorTextDisabled,
|
|
31048
|
+
fontSizeIcon,
|
|
31049
|
+
controlPaddingHorizontal,
|
|
31050
|
+
colorBgElevated
|
|
31051
|
+
} = token2;
|
|
31052
|
+
return [
|
|
31053
|
+
{
|
|
31054
|
+
[componentCls]: {
|
|
31055
|
+
position: "absolute",
|
|
31056
|
+
top: -9999,
|
|
31057
|
+
left: {
|
|
31058
|
+
_skip_check_: true,
|
|
31059
|
+
value: -9999
|
|
31060
|
+
},
|
|
31061
|
+
zIndex: zIndexPopup,
|
|
31062
|
+
display: "block",
|
|
31063
|
+
// A placeholder out of dropdown visible range to avoid close when user moving
|
|
31064
|
+
"&::before": {
|
|
31065
|
+
position: "absolute",
|
|
31066
|
+
insetBlock: token2.calc(sizePopupArrow).div(2).sub(dropdownArrowDistance).equal(),
|
|
31067
|
+
// insetInlineStart: -7, // FIXME: Seems not work for hidden element
|
|
31068
|
+
zIndex: -9999,
|
|
31069
|
+
opacity: 1e-4,
|
|
31070
|
+
content: '""'
|
|
31071
|
+
},
|
|
31072
|
+
// Makes vertical dropdowns have a scrollbar once they become taller than the viewport.
|
|
31073
|
+
"&-menu-vertical": {
|
|
31074
|
+
maxHeight: "100vh",
|
|
31075
|
+
overflowY: "auto"
|
|
31076
|
+
},
|
|
31077
|
+
[`&-trigger${antCls}-btn`]: {
|
|
31078
|
+
[`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {
|
|
31079
|
+
fontSize: fontSizeIcon
|
|
31080
|
+
}
|
|
31081
|
+
},
|
|
31082
|
+
[`${componentCls}-wrap`]: {
|
|
31083
|
+
position: "relative",
|
|
31084
|
+
[`${antCls}-btn > ${iconCls}-down`]: {
|
|
31085
|
+
fontSize: fontSizeIcon
|
|
31086
|
+
},
|
|
31087
|
+
[`${iconCls}-down::before`]: {
|
|
31088
|
+
transition: `transform ${motionDurationMid}`
|
|
31089
|
+
}
|
|
31090
|
+
},
|
|
31091
|
+
[`${componentCls}-wrap-open`]: {
|
|
31092
|
+
[`${iconCls}-down::before`]: {
|
|
31093
|
+
transform: `rotate(180deg)`
|
|
31094
|
+
}
|
|
31095
|
+
},
|
|
31096
|
+
[`
|
|
31097
|
+
&-hidden,
|
|
31098
|
+
&-menu-hidden,
|
|
31099
|
+
&-menu-submenu-hidden
|
|
31100
|
+
`]: {
|
|
31101
|
+
display: "none"
|
|
31102
|
+
},
|
|
31103
|
+
// =============================================================
|
|
31104
|
+
// == Motion ==
|
|
31105
|
+
// =============================================================
|
|
31106
|
+
// When position is not enough for dropdown, the placement will revert.
|
|
31107
|
+
// We will handle this with revert motion name.
|
|
31108
|
+
[`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,
|
|
31109
|
+
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,
|
|
31110
|
+
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,
|
|
31111
|
+
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,
|
|
31112
|
+
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,
|
|
31113
|
+
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {
|
|
31114
|
+
animationName: slideUpIn
|
|
31115
|
+
},
|
|
31116
|
+
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,
|
|
31117
|
+
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,
|
|
31118
|
+
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,
|
|
31119
|
+
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,
|
|
31120
|
+
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,
|
|
31121
|
+
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {
|
|
31122
|
+
animationName: slideDownIn
|
|
31123
|
+
},
|
|
31124
|
+
[`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,
|
|
31125
|
+
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottom,
|
|
31126
|
+
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomRight`]: {
|
|
31127
|
+
animationName: slideUpOut
|
|
31128
|
+
},
|
|
31129
|
+
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topLeft,
|
|
31130
|
+
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-top,
|
|
31131
|
+
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topRight`]: {
|
|
31132
|
+
animationName: slideDownOut
|
|
31133
|
+
}
|
|
31134
|
+
}
|
|
31135
|
+
},
|
|
31136
|
+
// =============================================================
|
|
31137
|
+
// == Arrow style ==
|
|
31138
|
+
// =============================================================
|
|
31139
|
+
getArrowStyle(token2, colorBgElevated, {
|
|
31140
|
+
arrowPlacement: {
|
|
31141
|
+
top: true,
|
|
31142
|
+
bottom: true
|
|
31143
|
+
}
|
|
31144
|
+
}),
|
|
31145
|
+
{
|
|
31146
|
+
// =============================================================
|
|
31147
|
+
// == Menu ==
|
|
31148
|
+
// =============================================================
|
|
31149
|
+
[`${componentCls} ${menuCls}`]: {
|
|
31150
|
+
position: "relative",
|
|
31151
|
+
margin: 0
|
|
31152
|
+
},
|
|
31153
|
+
[`${menuCls}-submenu-popup`]: {
|
|
31154
|
+
position: "absolute",
|
|
31155
|
+
zIndex: zIndexPopup,
|
|
31156
|
+
background: "transparent",
|
|
31157
|
+
boxShadow: "none",
|
|
31158
|
+
transformOrigin: "0 0",
|
|
31159
|
+
"ul, li": {
|
|
31160
|
+
listStyle: "none",
|
|
31161
|
+
margin: 0
|
|
31162
|
+
}
|
|
31163
|
+
},
|
|
31164
|
+
[`${componentCls}, ${componentCls}-menu-submenu`]: Object.assign(Object.assign({}, resetComponent(token2)), {
|
|
31165
|
+
[menuCls]: Object.assign(Object.assign({
|
|
31166
|
+
padding: dropdownEdgeChildPadding,
|
|
31167
|
+
listStyleType: "none",
|
|
31168
|
+
backgroundColor: colorBgElevated,
|
|
31169
|
+
backgroundClip: "padding-box",
|
|
31170
|
+
borderRadius: token2.borderRadiusLG,
|
|
31171
|
+
outline: "none",
|
|
31172
|
+
boxShadow: token2.boxShadowSecondary
|
|
31173
|
+
}, genFocusStyle(token2)), {
|
|
31174
|
+
"&:empty": {
|
|
31175
|
+
padding: 0,
|
|
31176
|
+
boxShadow: "none"
|
|
31177
|
+
},
|
|
31178
|
+
[`${menuCls}-item-group-title`]: {
|
|
31179
|
+
padding: `${unit$1(paddingBlock)} ${unit$1(controlPaddingHorizontal)}`,
|
|
31180
|
+
color: token2.colorTextDescription,
|
|
31181
|
+
transition: `all ${motionDurationMid}`
|
|
31182
|
+
},
|
|
31183
|
+
// ======================= Item Content =======================
|
|
31184
|
+
[`${menuCls}-item`]: {
|
|
31185
|
+
position: "relative",
|
|
31186
|
+
display: "flex",
|
|
31187
|
+
alignItems: "center"
|
|
31188
|
+
},
|
|
31189
|
+
[`${menuCls}-item-icon`]: {
|
|
31190
|
+
minWidth: fontSize,
|
|
31191
|
+
marginInlineEnd: token2.marginXS,
|
|
31192
|
+
fontSize: token2.fontSizeSM
|
|
31193
|
+
},
|
|
31194
|
+
[`${menuCls}-title-content`]: {
|
|
31195
|
+
flex: "auto",
|
|
31196
|
+
"&-with-extra": {
|
|
31197
|
+
display: "inline-flex",
|
|
31198
|
+
alignItems: "center",
|
|
31199
|
+
width: "100%"
|
|
31200
|
+
},
|
|
31201
|
+
"> a": {
|
|
31202
|
+
color: "inherit",
|
|
31203
|
+
transition: `all ${motionDurationMid}`,
|
|
31204
|
+
"&:hover": {
|
|
31205
|
+
color: "inherit"
|
|
31206
|
+
},
|
|
31207
|
+
"&::after": {
|
|
31208
|
+
position: "absolute",
|
|
31209
|
+
inset: 0,
|
|
31210
|
+
content: '""'
|
|
31211
|
+
}
|
|
31212
|
+
},
|
|
31213
|
+
[`${menuCls}-item-extra`]: {
|
|
31214
|
+
paddingInlineStart: token2.padding,
|
|
31215
|
+
marginInlineStart: "auto",
|
|
31216
|
+
fontSize: token2.fontSizeSM,
|
|
31217
|
+
color: token2.colorTextDescription
|
|
31218
|
+
}
|
|
31219
|
+
},
|
|
31220
|
+
// =========================== Item ===========================
|
|
31221
|
+
[`${menuCls}-item, ${menuCls}-submenu-title`]: Object.assign(Object.assign({
|
|
31222
|
+
display: "flex",
|
|
31223
|
+
margin: 0,
|
|
31224
|
+
padding: `${unit$1(paddingBlock)} ${unit$1(controlPaddingHorizontal)}`,
|
|
31225
|
+
color: token2.colorText,
|
|
31226
|
+
fontWeight: "normal",
|
|
31227
|
+
fontSize,
|
|
31228
|
+
lineHeight: token2.lineHeight,
|
|
31229
|
+
cursor: "pointer",
|
|
31230
|
+
transition: `all ${motionDurationMid}`,
|
|
31231
|
+
borderRadius: token2.borderRadiusSM,
|
|
31232
|
+
"&:hover, &-active": {
|
|
31233
|
+
backgroundColor: token2.controlItemBgHover
|
|
31234
|
+
}
|
|
31235
|
+
}, genFocusStyle(token2)), {
|
|
31236
|
+
"&-selected": {
|
|
31237
|
+
color: token2.colorPrimary,
|
|
31238
|
+
backgroundColor: token2.controlItemBgActive,
|
|
31239
|
+
"&:hover, &-active": {
|
|
31240
|
+
backgroundColor: token2.controlItemBgActiveHover
|
|
31241
|
+
}
|
|
31242
|
+
},
|
|
31243
|
+
"&-disabled": {
|
|
31244
|
+
color: colorTextDisabled,
|
|
31245
|
+
cursor: "not-allowed",
|
|
31246
|
+
"&:hover": {
|
|
31247
|
+
color: colorTextDisabled,
|
|
31248
|
+
backgroundColor: colorBgElevated,
|
|
31249
|
+
cursor: "not-allowed"
|
|
31250
|
+
},
|
|
31251
|
+
a: {
|
|
31252
|
+
pointerEvents: "none"
|
|
31253
|
+
}
|
|
31254
|
+
},
|
|
31255
|
+
"&-divider": {
|
|
31256
|
+
height: 1,
|
|
31257
|
+
// By design
|
|
31258
|
+
margin: `${unit$1(token2.marginXXS)} 0`,
|
|
31259
|
+
overflow: "hidden",
|
|
31260
|
+
lineHeight: 0,
|
|
31261
|
+
backgroundColor: token2.colorSplit
|
|
31262
|
+
},
|
|
31263
|
+
[`${componentCls}-menu-submenu-expand-icon`]: {
|
|
31264
|
+
position: "absolute",
|
|
31265
|
+
insetInlineEnd: token2.paddingXS,
|
|
31266
|
+
[`${componentCls}-menu-submenu-arrow-icon`]: {
|
|
31267
|
+
marginInlineEnd: "0 !important",
|
|
31268
|
+
color: token2.colorIcon,
|
|
31269
|
+
fontSize: fontSizeIcon,
|
|
31270
|
+
fontStyle: "normal"
|
|
31271
|
+
}
|
|
31272
|
+
}
|
|
31273
|
+
}),
|
|
31274
|
+
[`${menuCls}-item-group-list`]: {
|
|
31275
|
+
margin: `0 ${unit$1(token2.marginXS)}`,
|
|
31276
|
+
padding: 0,
|
|
31277
|
+
listStyle: "none"
|
|
31278
|
+
},
|
|
31279
|
+
[`${menuCls}-submenu-title`]: {
|
|
31280
|
+
paddingInlineEnd: token2.calc(controlPaddingHorizontal).add(token2.fontSizeSM).equal()
|
|
31281
|
+
},
|
|
31282
|
+
[`${menuCls}-submenu-vertical`]: {
|
|
31283
|
+
position: "relative"
|
|
31284
|
+
},
|
|
31285
|
+
[`${menuCls}-submenu${menuCls}-submenu-disabled ${componentCls}-menu-submenu-title`]: {
|
|
31286
|
+
[`&, ${componentCls}-menu-submenu-arrow-icon`]: {
|
|
31287
|
+
color: colorTextDisabled,
|
|
31288
|
+
backgroundColor: colorBgElevated,
|
|
31289
|
+
cursor: "not-allowed"
|
|
31290
|
+
}
|
|
31291
|
+
},
|
|
31292
|
+
// https://github.com/ant-design/ant-design/issues/19264
|
|
31293
|
+
[`${menuCls}-submenu-selected ${componentCls}-menu-submenu-title`]: {
|
|
31294
|
+
color: token2.colorPrimary
|
|
31295
|
+
}
|
|
31296
|
+
})
|
|
31297
|
+
})
|
|
31298
|
+
},
|
|
31299
|
+
// Follow code may reuse in other components
|
|
31300
|
+
[initSlideMotion(token2, "slide-up"), initSlideMotion(token2, "slide-down"), initMoveMotion(token2, "move-up"), initMoveMotion(token2, "move-down"), initZoomMotion(token2, "zoom-big")]
|
|
31301
|
+
];
|
|
31302
|
+
};
|
|
31303
|
+
const prepareComponentToken$c = (token2) => Object.assign(Object.assign({
|
|
31304
|
+
zIndexPopup: token2.zIndexPopupBase + 50,
|
|
31305
|
+
paddingBlock: (token2.controlHeight - token2.fontSize * token2.lineHeight) / 2
|
|
31306
|
+
}, getArrowOffsetToken({
|
|
31307
|
+
contentRadius: token2.borderRadiusLG,
|
|
31308
|
+
limitVerticalRadius: true
|
|
31309
|
+
})), getArrowToken(token2));
|
|
31310
|
+
const useStyle$i = genStyleHooks("Dropdown", (token2) => {
|
|
31311
|
+
const {
|
|
31312
|
+
marginXXS,
|
|
31313
|
+
sizePopupArrow,
|
|
31314
|
+
paddingXXS,
|
|
31315
|
+
componentCls
|
|
31316
|
+
} = token2;
|
|
31317
|
+
const dropdownToken = merge$1(token2, {
|
|
31318
|
+
menuCls: `${componentCls}-menu`,
|
|
31319
|
+
dropdownArrowDistance: token2.calc(sizePopupArrow).div(2).add(marginXXS).equal(),
|
|
31320
|
+
dropdownEdgeChildPadding: paddingXXS
|
|
31321
|
+
});
|
|
31322
|
+
return [genBaseStyle$1(dropdownToken), genStatusStyle(dropdownToken)];
|
|
31323
|
+
}, prepareComponentToken$c, {
|
|
31324
|
+
resetStyle: false
|
|
31325
|
+
});
|
|
31326
|
+
const Dropdown$1 = (props) => {
|
|
31327
|
+
var _a2;
|
|
31328
|
+
const {
|
|
31329
|
+
menu,
|
|
31330
|
+
arrow,
|
|
31331
|
+
prefixCls: customizePrefixCls,
|
|
31332
|
+
children,
|
|
31333
|
+
trigger,
|
|
31334
|
+
disabled: disabled2,
|
|
31335
|
+
dropdownRender,
|
|
31336
|
+
popupRender,
|
|
31337
|
+
getPopupContainer,
|
|
31338
|
+
overlayClassName,
|
|
31339
|
+
rootClassName,
|
|
31340
|
+
overlayStyle,
|
|
31341
|
+
open,
|
|
31342
|
+
onOpenChange,
|
|
31343
|
+
// Deprecated
|
|
31344
|
+
visible,
|
|
31345
|
+
onVisibleChange,
|
|
31346
|
+
mouseEnterDelay = 0.15,
|
|
31347
|
+
mouseLeaveDelay = 0.1,
|
|
31348
|
+
autoAdjustOverflow: autoAdjustOverflow2 = true,
|
|
31349
|
+
placement = "",
|
|
31350
|
+
overlay,
|
|
31351
|
+
transitionName,
|
|
31352
|
+
destroyOnHidden,
|
|
31353
|
+
destroyPopupOnHide
|
|
31354
|
+
} = props;
|
|
31355
|
+
const {
|
|
31356
|
+
getPopupContainer: getContextPopupContainer,
|
|
31357
|
+
getPrefixCls,
|
|
31358
|
+
direction,
|
|
31359
|
+
dropdown
|
|
31360
|
+
} = React.useContext(ConfigContext);
|
|
31361
|
+
const mergedPopupRender = popupRender || dropdownRender;
|
|
31362
|
+
const warning3 = devUseWarning("Dropdown");
|
|
31363
|
+
if (process.env.NODE_ENV !== "production") {
|
|
31364
|
+
const deprecatedProps = {
|
|
31365
|
+
visible: "open",
|
|
31366
|
+
onVisibleChange: "onOpenChange",
|
|
31367
|
+
overlay: "menu",
|
|
31368
|
+
dropdownRender: "popupRender",
|
|
31369
|
+
destroyPopupOnHide: "destroyOnHidden"
|
|
31370
|
+
};
|
|
31371
|
+
Object.entries(deprecatedProps).forEach(([deprecatedName, newName]) => {
|
|
31372
|
+
warning3.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
31373
|
+
});
|
|
31374
|
+
if (placement.includes("Center")) {
|
|
31375
|
+
warning3.deprecated(!placement.includes("Center"), `placement: ${placement}`, `placement: ${placement.slice(0, placement.indexOf("Center"))}`);
|
|
31376
|
+
}
|
|
31377
|
+
}
|
|
31378
|
+
const memoTransitionName = React.useMemo(() => {
|
|
31379
|
+
const rootPrefixCls = getPrefixCls();
|
|
31380
|
+
if (transitionName !== void 0) {
|
|
31381
|
+
return transitionName;
|
|
31382
|
+
}
|
|
31383
|
+
if (placement.includes("top")) {
|
|
31384
|
+
return `${rootPrefixCls}-slide-down`;
|
|
31385
|
+
}
|
|
31386
|
+
return `${rootPrefixCls}-slide-up`;
|
|
31387
|
+
}, [getPrefixCls, placement, transitionName]);
|
|
31388
|
+
const memoPlacement = React.useMemo(() => {
|
|
31389
|
+
if (!placement) {
|
|
31390
|
+
return direction === "rtl" ? "bottomRight" : "bottomLeft";
|
|
31391
|
+
}
|
|
31392
|
+
if (placement.includes("Center")) {
|
|
31393
|
+
return placement.slice(0, placement.indexOf("Center"));
|
|
31394
|
+
}
|
|
31395
|
+
return placement;
|
|
31396
|
+
}, [placement, direction]);
|
|
31397
|
+
const prefixCls = getPrefixCls("dropdown", customizePrefixCls);
|
|
31398
|
+
const rootCls = useCSSVarCls(prefixCls);
|
|
31399
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$i(prefixCls, rootCls);
|
|
31400
|
+
const [, token2] = useToken();
|
|
31401
|
+
const child = React.Children.only(isPrimitive(children) ? /* @__PURE__ */ React.createElement("span", null, children) : children);
|
|
31402
|
+
const popupTrigger = cloneElement(child, {
|
|
31403
|
+
className: classNames(`${prefixCls}-trigger`, {
|
|
31404
|
+
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
31405
|
+
}, child.props.className),
|
|
31406
|
+
disabled: (_a2 = child.props.disabled) !== null && _a2 !== void 0 ? _a2 : disabled2
|
|
31407
|
+
});
|
|
31408
|
+
const triggerActions = disabled2 ? [] : trigger;
|
|
31409
|
+
const alignPoint = !!(triggerActions === null || triggerActions === void 0 ? void 0 : triggerActions.includes("contextMenu"));
|
|
31410
|
+
const [mergedOpen, setOpen] = useMergedState(false, {
|
|
31411
|
+
value: open !== null && open !== void 0 ? open : visible
|
|
31412
|
+
});
|
|
31413
|
+
const onInnerOpenChange = useEvent((nextOpen) => {
|
|
31414
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen, {
|
|
31415
|
+
source: "trigger"
|
|
31416
|
+
});
|
|
31417
|
+
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(nextOpen);
|
|
31418
|
+
setOpen(nextOpen);
|
|
31419
|
+
});
|
|
31420
|
+
const overlayClassNameCustomized = classNames(overlayClassName, rootClassName, hashId, cssVarCls, rootCls, dropdown === null || dropdown === void 0 ? void 0 : dropdown.className, {
|
|
31421
|
+
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
31422
|
+
});
|
|
31423
|
+
const builtinPlacements = getPlacements({
|
|
31424
|
+
arrowPointAtCenter: typeof arrow === "object" && arrow.pointAtCenter,
|
|
31425
|
+
autoAdjustOverflow: autoAdjustOverflow2,
|
|
31426
|
+
offset: token2.marginXXS,
|
|
31427
|
+
arrowWidth: arrow ? token2.sizePopupArrow : 0,
|
|
31428
|
+
borderRadius: token2.borderRadius
|
|
31429
|
+
});
|
|
31430
|
+
const onMenuClick = useEvent(() => {
|
|
31431
|
+
if ((menu === null || menu === void 0 ? void 0 : menu.selectable) && (menu === null || menu === void 0 ? void 0 : menu.multiple)) {
|
|
31432
|
+
return;
|
|
31433
|
+
}
|
|
31434
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false, {
|
|
31435
|
+
source: "menu"
|
|
31436
|
+
});
|
|
31437
|
+
setOpen(false);
|
|
31438
|
+
});
|
|
31439
|
+
const renderOverlay = () => {
|
|
31440
|
+
let overlayNode;
|
|
31441
|
+
if (menu === null || menu === void 0 ? void 0 : menu.items) {
|
|
31442
|
+
overlayNode = /* @__PURE__ */ React.createElement(Menu$1, Object.assign({}, menu));
|
|
31443
|
+
} else if (typeof overlay === "function") {
|
|
31444
|
+
overlayNode = overlay();
|
|
31445
|
+
} else {
|
|
31446
|
+
overlayNode = overlay;
|
|
31447
|
+
}
|
|
31448
|
+
if (mergedPopupRender) {
|
|
31449
|
+
overlayNode = mergedPopupRender(overlayNode);
|
|
31450
|
+
}
|
|
31451
|
+
overlayNode = React.Children.only(typeof overlayNode === "string" ? /* @__PURE__ */ React.createElement("span", null, overlayNode) : overlayNode);
|
|
31452
|
+
return /* @__PURE__ */ React.createElement(OverrideProvider, {
|
|
31453
|
+
prefixCls: `${prefixCls}-menu`,
|
|
31454
|
+
rootClassName: classNames(cssVarCls, rootCls),
|
|
31455
|
+
expandIcon: /* @__PURE__ */ React.createElement("span", {
|
|
31456
|
+
className: `${prefixCls}-menu-submenu-arrow`
|
|
31457
|
+
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$t, {
|
|
31458
|
+
className: `${prefixCls}-menu-submenu-arrow-icon`
|
|
31459
|
+
}) : /* @__PURE__ */ React.createElement(RefIcon$x, {
|
|
31460
|
+
className: `${prefixCls}-menu-submenu-arrow-icon`
|
|
31461
|
+
})),
|
|
31462
|
+
mode: "vertical",
|
|
31463
|
+
selectable: false,
|
|
31464
|
+
onClick: onMenuClick,
|
|
31465
|
+
validator: ({
|
|
31466
|
+
mode
|
|
31467
|
+
}) => {
|
|
31468
|
+
process.env.NODE_ENV !== "production" ? warning3(!mode || mode === "vertical", "usage", `mode="${mode}" is not supported for Dropdown's Menu.`) : void 0;
|
|
31469
|
+
}
|
|
31470
|
+
}, overlayNode);
|
|
31471
|
+
};
|
|
31472
|
+
const [zIndex, contextZIndex] = useZIndex("Dropdown", overlayStyle === null || overlayStyle === void 0 ? void 0 : overlayStyle.zIndex);
|
|
31473
|
+
let renderNode = /* @__PURE__ */ React.createElement(Dropdown$3, Object.assign({
|
|
31474
|
+
alignPoint
|
|
31475
|
+
}, omit(props, ["rootClassName"]), {
|
|
31476
|
+
mouseEnterDelay,
|
|
31477
|
+
mouseLeaveDelay,
|
|
31478
|
+
visible: mergedOpen,
|
|
31479
|
+
builtinPlacements,
|
|
31480
|
+
arrow: !!arrow,
|
|
31481
|
+
overlayClassName: overlayClassNameCustomized,
|
|
31482
|
+
prefixCls,
|
|
31483
|
+
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
31484
|
+
transitionName: memoTransitionName,
|
|
31485
|
+
trigger: triggerActions,
|
|
31486
|
+
overlay: renderOverlay,
|
|
31487
|
+
placement: memoPlacement,
|
|
31488
|
+
onVisibleChange: onInnerOpenChange,
|
|
31489
|
+
overlayStyle: Object.assign(Object.assign(Object.assign({}, dropdown === null || dropdown === void 0 ? void 0 : dropdown.style), overlayStyle), {
|
|
31490
|
+
zIndex
|
|
31491
|
+
}),
|
|
31492
|
+
autoDestroy: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyPopupOnHide
|
|
31493
|
+
}), popupTrigger);
|
|
31494
|
+
if (zIndex) {
|
|
31495
|
+
renderNode = /* @__PURE__ */ React.createElement(zIndexContext.Provider, {
|
|
31496
|
+
value: contextZIndex
|
|
31497
|
+
}, renderNode);
|
|
31498
|
+
}
|
|
31499
|
+
return wrapCSSVar(renderNode);
|
|
31500
|
+
};
|
|
31501
|
+
const PurePanel$2 = genPurePanel(Dropdown$1, "align", void 0, "dropdown", (prefixCls) => prefixCls);
|
|
31502
|
+
const WrapPurePanel = (props) => /* @__PURE__ */ React.createElement(PurePanel$2, Object.assign({}, props), /* @__PURE__ */ React.createElement("span", null));
|
|
31503
|
+
Dropdown$1._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel;
|
|
31504
|
+
if (process.env.NODE_ENV !== "production") {
|
|
31505
|
+
Dropdown$1.displayName = "Dropdown";
|
|
31506
|
+
}
|
|
29291
31507
|
var dayjs_min$1 = { exports: {} };
|
|
29292
31508
|
var dayjs_min = dayjs_min$1.exports;
|
|
29293
31509
|
var hasRequiredDayjs_min;
|
|
@@ -34844,7 +37060,7 @@ const useStyle$h = genStyleHooks("Radio", (token2) => {
|
|
|
34844
37060
|
dotSize: true
|
|
34845
37061
|
}
|
|
34846
37062
|
});
|
|
34847
|
-
var __rest$
|
|
37063
|
+
var __rest$E = function(s2, e3) {
|
|
34848
37064
|
var t2 = {};
|
|
34849
37065
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
34850
37066
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -34882,7 +37098,7 @@ const InternalRadio = (props, ref) => {
|
|
|
34882
37098
|
children,
|
|
34883
37099
|
style: style2,
|
|
34884
37100
|
title
|
|
34885
|
-
} = props, restProps = __rest$
|
|
37101
|
+
} = props, restProps = __rest$E(props, ["prefixCls", "className", "rootClassName", "children", "style", "title"]);
|
|
34886
37102
|
const radioPrefixCls = getPrefixCls("radio", customizePrefixCls);
|
|
34887
37103
|
const isButtonType = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === "button";
|
|
34888
37104
|
const prefixCls = isButtonType ? `${radioPrefixCls}-button` : radioPrefixCls;
|
|
@@ -34965,7 +37181,7 @@ function getStatus(errors, warnings, meta2, defaultValidateStatus, hasFeedback,
|
|
|
34965
37181
|
}
|
|
34966
37182
|
return status;
|
|
34967
37183
|
}
|
|
34968
|
-
var __rest$
|
|
37184
|
+
var __rest$D = function(s2, e3) {
|
|
34969
37185
|
var t2 = {};
|
|
34970
37186
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
34971
37187
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -35005,7 +37221,7 @@ function useForm(form) {
|
|
|
35005
37221
|
scrollToField: (name2, options = {}) => {
|
|
35006
37222
|
const {
|
|
35007
37223
|
focus
|
|
35008
|
-
} = options, restOpt = __rest$
|
|
37224
|
+
} = options, restOpt = __rest$D(options, ["focus"]);
|
|
35009
37225
|
const node2 = getFieldDOMNode(name2, wrapForm);
|
|
35010
37226
|
if (node2) {
|
|
35011
37227
|
e(node2, Object.assign({
|
|
@@ -35138,7 +37354,7 @@ const RadioGroup = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
35138
37354
|
}, childrenToRender)));
|
|
35139
37355
|
});
|
|
35140
37356
|
const Group$1 = /* @__PURE__ */ React.memo(RadioGroup);
|
|
35141
|
-
var __rest$
|
|
37357
|
+
var __rest$C = function(s2, e3) {
|
|
35142
37358
|
var t2 = {};
|
|
35143
37359
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
35144
37360
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -35152,7 +37368,7 @@ const RadioButton = (props, ref) => {
|
|
|
35152
37368
|
} = React.useContext(ConfigContext);
|
|
35153
37369
|
const {
|
|
35154
37370
|
prefixCls: customizePrefixCls
|
|
35155
|
-
} = props, radioProps = __rest$
|
|
37371
|
+
} = props, radioProps = __rest$C(props, ["prefixCls"]);
|
|
35156
37372
|
const prefixCls = getPrefixCls("radio", customizePrefixCls);
|
|
35157
37373
|
return /* @__PURE__ */ React.createElement(RadioOptionTypeContextProvider, {
|
|
35158
37374
|
value: "button"
|
|
@@ -37811,7 +40027,7 @@ var OperationNode = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
37811
40027
|
}, tabs.map(function(tab) {
|
|
37812
40028
|
var closable = tab.closable, disabled2 = tab.disabled, closeIcon = tab.closeIcon, key = tab.key, label = tab.label;
|
|
37813
40029
|
var removable = getRemovable(closable, closeIcon, editable2, disabled2);
|
|
37814
|
-
return /* @__PURE__ */ React.createElement(MenuItem$
|
|
40030
|
+
return /* @__PURE__ */ React.createElement(MenuItem$3, {
|
|
37815
40031
|
key,
|
|
37816
40032
|
id: "".concat(popupId, "-").concat(key),
|
|
37817
40033
|
role: "option",
|
|
@@ -37891,7 +40107,7 @@ var OperationNode = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
37891
40107
|
moreStyle.order = 1;
|
|
37892
40108
|
}
|
|
37893
40109
|
var overlayClassName = classNames(_defineProperty$3({}, "".concat(dropdownPrefix, "-rtl"), rtl));
|
|
37894
|
-
var moreNode = mobile ? null : /* @__PURE__ */ React.createElement(Dropdown$
|
|
40110
|
+
var moreNode = mobile ? null : /* @__PURE__ */ React.createElement(Dropdown$3, _extends$1({
|
|
37895
40111
|
prefixCls: dropdownPrefix,
|
|
37896
40112
|
overlay: menu,
|
|
37897
40113
|
visible: tabs.length ? open : false,
|
|
@@ -38690,7 +40906,7 @@ function useAnimateConfig(prefixCls, animated = {
|
|
|
38690
40906
|
}
|
|
38691
40907
|
return mergedAnimated;
|
|
38692
40908
|
}
|
|
38693
|
-
var __rest$
|
|
40909
|
+
var __rest$B = function(s2, e3) {
|
|
38694
40910
|
var t2 = {};
|
|
38695
40911
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
38696
40912
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -38724,7 +40940,7 @@ function useLegacyItems(items, children) {
|
|
|
38724
40940
|
} = node2;
|
|
38725
40941
|
const _a2 = props || {}, {
|
|
38726
40942
|
tab
|
|
38727
|
-
} = _a2, restProps = __rest$
|
|
40943
|
+
} = _a2, restProps = __rest$B(_a2, ["tab"]);
|
|
38728
40944
|
const item = Object.assign(Object.assign({
|
|
38729
40945
|
key: String(key)
|
|
38730
40946
|
}, restProps), {
|
|
@@ -39636,7 +41852,7 @@ const TabPane = () => null;
|
|
|
39636
41852
|
if (process.env.NODE_ENV !== "production") {
|
|
39637
41853
|
TabPane.displayName = "DeprecatedTabPane";
|
|
39638
41854
|
}
|
|
39639
|
-
var __rest$
|
|
41855
|
+
var __rest$A = function(s2, e3) {
|
|
39640
41856
|
var t2 = {};
|
|
39641
41857
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
39642
41858
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -39667,7 +41883,7 @@ const InternalTabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
39667
41883
|
indicator,
|
|
39668
41884
|
destroyInactiveTabPane,
|
|
39669
41885
|
destroyOnHidden
|
|
39670
|
-
} = props, otherProps = __rest$
|
|
41886
|
+
} = props, otherProps = __rest$A(props, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator", "destroyInactiveTabPane", "destroyOnHidden"]);
|
|
39671
41887
|
const {
|
|
39672
41888
|
prefixCls: customizePrefixCls
|
|
39673
41889
|
} = otherProps;
|
|
@@ -39693,7 +41909,7 @@ const InternalTabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
39693
41909
|
}) => {
|
|
39694
41910
|
onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === "add" ? event : key, editType);
|
|
39695
41911
|
},
|
|
39696
|
-
removeIcon: (_a2 = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a2 !== void 0 ? _a2 : /* @__PURE__ */ React.createElement(RefIcon$
|
|
41912
|
+
removeIcon: (_a2 = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a2 !== void 0 ? _a2 : /* @__PURE__ */ React.createElement(RefIcon$B, null),
|
|
39697
41913
|
addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /* @__PURE__ */ React.createElement(RefIcon$q, null),
|
|
39698
41914
|
showAdd: hideAdd !== true
|
|
39699
41915
|
};
|
|
@@ -39744,7 +41960,7 @@ Tabs.TabPane = TabPane;
|
|
|
39744
41960
|
if (process.env.NODE_ENV !== "production") {
|
|
39745
41961
|
Tabs.displayName = "Tabs";
|
|
39746
41962
|
}
|
|
39747
|
-
var __rest$
|
|
41963
|
+
var __rest$z = function(s2, e3) {
|
|
39748
41964
|
var t2 = {};
|
|
39749
41965
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
39750
41966
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -39757,7 +41973,7 @@ const Grid = (_a2) => {
|
|
|
39757
41973
|
prefixCls,
|
|
39758
41974
|
className,
|
|
39759
41975
|
hoverable = true
|
|
39760
|
-
} = _a2, props = __rest$
|
|
41976
|
+
} = _a2, props = __rest$z(_a2, ["prefixCls", "className", "hoverable"]);
|
|
39761
41977
|
const {
|
|
39762
41978
|
getPrefixCls
|
|
39763
41979
|
} = React.useContext(ConfigContext);
|
|
@@ -40108,7 +42324,7 @@ const useStyle$d = genStyleHooks("Card", (token2) => {
|
|
|
40108
42324
|
genCardSizeStyle(cardToken)
|
|
40109
42325
|
];
|
|
40110
42326
|
}, prepareComponentToken$8);
|
|
40111
|
-
var __rest$
|
|
42327
|
+
var __rest$y = function(s2, e3) {
|
|
40112
42328
|
var t2 = {};
|
|
40113
42329
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
40114
42330
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -40161,7 +42377,7 @@ const Card$1 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
40161
42377
|
tabProps = {},
|
|
40162
42378
|
classNames: customClassNames,
|
|
40163
42379
|
styles: customStyles
|
|
40164
|
-
} = props, others = __rest$
|
|
42380
|
+
} = props, others = __rest$y(props, ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "variant", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"]);
|
|
40165
42381
|
const {
|
|
40166
42382
|
getPrefixCls,
|
|
40167
42383
|
direction,
|
|
@@ -40221,7 +42437,7 @@ const Card$1 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
40221
42437
|
items: tabList.map((_a2) => {
|
|
40222
42438
|
var {
|
|
40223
42439
|
tab
|
|
40224
|
-
} = _a2, item = __rest$
|
|
42440
|
+
} = _a2, item = __rest$y(_a2, ["tab"]);
|
|
40225
42441
|
return Object.assign({
|
|
40226
42442
|
label: tab
|
|
40227
42443
|
}, item);
|
|
@@ -40281,7 +42497,7 @@ const Card$1 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
40281
42497
|
style: mergedStyle
|
|
40282
42498
|
}), head, coverDom, body, actionDom));
|
|
40283
42499
|
});
|
|
40284
|
-
var __rest$
|
|
42500
|
+
var __rest$x = function(s2, e3) {
|
|
40285
42501
|
var t2 = {};
|
|
40286
42502
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
40287
42503
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -40296,7 +42512,7 @@ const Meta = (props) => {
|
|
|
40296
42512
|
avatar,
|
|
40297
42513
|
title,
|
|
40298
42514
|
description
|
|
40299
|
-
} = props, others = __rest$
|
|
42515
|
+
} = props, others = __rest$x(props, ["prefixCls", "className", "avatar", "title", "description"]);
|
|
40300
42516
|
const {
|
|
40301
42517
|
getPrefixCls
|
|
40302
42518
|
} = React.useContext(ConfigContext);
|
|
@@ -40548,7 +42764,7 @@ const useStyle$c = genStyleHooks("Checkbox", (token2, {
|
|
|
40548
42764
|
prefixCls
|
|
40549
42765
|
}) => [getStyle(prefixCls, token2)]);
|
|
40550
42766
|
const GroupContext = /* @__PURE__ */ React__default.createContext(null);
|
|
40551
|
-
var __rest$
|
|
42767
|
+
var __rest$w = function(s2, e3) {
|
|
40552
42768
|
var t2 = {};
|
|
40553
42769
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
40554
42770
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -40569,7 +42785,7 @@ const InternalCheckbox = (props, ref) => {
|
|
|
40569
42785
|
onMouseLeave,
|
|
40570
42786
|
skipGroup = false,
|
|
40571
42787
|
disabled: disabled2
|
|
40572
|
-
} = props, restProps = __rest$
|
|
42788
|
+
} = props, restProps = __rest$w(props, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]);
|
|
40573
42789
|
const {
|
|
40574
42790
|
getPrefixCls,
|
|
40575
42791
|
direction,
|
|
@@ -40660,7 +42876,7 @@ const Checkbox$1 = /* @__PURE__ */ React.forwardRef(InternalCheckbox);
|
|
|
40660
42876
|
if (process.env.NODE_ENV !== "production") {
|
|
40661
42877
|
Checkbox$1.displayName = "Checkbox";
|
|
40662
42878
|
}
|
|
40663
|
-
var __rest$
|
|
42879
|
+
var __rest$v = function(s2, e3) {
|
|
40664
42880
|
var t2 = {};
|
|
40665
42881
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
40666
42882
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -40678,7 +42894,7 @@ const CheckboxGroup = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
40678
42894
|
rootClassName,
|
|
40679
42895
|
style: style2,
|
|
40680
42896
|
onChange: onChange2
|
|
40681
|
-
} = props, restProps = __rest$
|
|
42897
|
+
} = props, restProps = __rest$v(props, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]);
|
|
40682
42898
|
const {
|
|
40683
42899
|
getPrefixCls,
|
|
40684
42900
|
direction
|
|
@@ -40768,7 +42984,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
40768
42984
|
Checkbox.displayName = "Checkbox";
|
|
40769
42985
|
}
|
|
40770
42986
|
const RowContext = /* @__PURE__ */ createContext({});
|
|
40771
|
-
var __rest$
|
|
42987
|
+
var __rest$u = function(s2, e3) {
|
|
40772
42988
|
var t2 = {};
|
|
40773
42989
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
40774
42990
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -40809,7 +43025,7 @@ const Col = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
40809
43025
|
children,
|
|
40810
43026
|
flex,
|
|
40811
43027
|
style: style2
|
|
40812
|
-
} = props, others = __rest$
|
|
43028
|
+
} = props, others = __rest$u(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]);
|
|
40813
43029
|
const prefixCls = getPrefixCls("col", customizePrefixCls);
|
|
40814
43030
|
const [wrapCSSVar, hashId, cssVarCls] = useColStyle(prefixCls);
|
|
40815
43031
|
const sizeStyle = {};
|
|
@@ -40890,7 +43106,7 @@ function useGutter(gutter2, screens) {
|
|
|
40890
43106
|
});
|
|
40891
43107
|
return results;
|
|
40892
43108
|
}
|
|
40893
|
-
var __rest$
|
|
43109
|
+
var __rest$t = function(s2, e3) {
|
|
40894
43110
|
var t2 = {};
|
|
40895
43111
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
40896
43112
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -40934,7 +43150,7 @@ const Row = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
40934
43150
|
children,
|
|
40935
43151
|
gutter: gutter2 = 0,
|
|
40936
43152
|
wrap
|
|
40937
|
-
} = props, others = __rest$
|
|
43153
|
+
} = props, others = __rest$t(props, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]);
|
|
40938
43154
|
const {
|
|
40939
43155
|
getPrefixCls,
|
|
40940
43156
|
direction
|
|
@@ -41148,7 +43364,7 @@ const useStyle$b = genStyleHooks("Divider", (token2) => {
|
|
|
41148
43364
|
orientationMargin: true
|
|
41149
43365
|
}
|
|
41150
43366
|
});
|
|
41151
|
-
var __rest$
|
|
43367
|
+
var __rest$s = function(s2, e3) {
|
|
41152
43368
|
var t2 = {};
|
|
41153
43369
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
41154
43370
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -41180,7 +43396,7 @@ const Divider = (props) => {
|
|
|
41180
43396
|
plain,
|
|
41181
43397
|
style: style2,
|
|
41182
43398
|
size: customSize
|
|
41183
|
-
} = props, restProps = __rest$
|
|
43399
|
+
} = props, restProps = __rest$s(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "variant", "plain", "style", "size"]);
|
|
41184
43400
|
const prefixCls = getPrefixCls("divider", customizePrefixCls);
|
|
41185
43401
|
const [wrapCSSVar, hashId, cssVarCls] = useStyle$b(prefixCls);
|
|
41186
43402
|
const sizeFullName = useSize(customSize);
|
|
@@ -41607,7 +43823,7 @@ const getAllowClear = (allowClear) => {
|
|
|
41607
43823
|
mergedAllowClear = allowClear;
|
|
41608
43824
|
} else if (allowClear) {
|
|
41609
43825
|
mergedAllowClear = {
|
|
41610
|
-
clearIcon: /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
43826
|
+
clearIcon: /* @__PURE__ */ React__default.createElement(RefIcon$C, null)
|
|
41611
43827
|
};
|
|
41612
43828
|
}
|
|
41613
43829
|
return mergedAllowClear;
|
|
@@ -41637,7 +43853,7 @@ function useRemovePasswordTimeout(inputRef, triggerOnMount) {
|
|
|
41637
43853
|
function hasPrefixSuffix(props) {
|
|
41638
43854
|
return !!(props.prefix || props.suffix || props.allowClear || props.showCount);
|
|
41639
43855
|
}
|
|
41640
|
-
var __rest$
|
|
43856
|
+
var __rest$r = function(s2, e3) {
|
|
41641
43857
|
var t2 = {};
|
|
41642
43858
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
41643
43859
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -41666,7 +43882,7 @@ const Input$1 = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
41666
43882
|
classNames: classNames$1,
|
|
41667
43883
|
variant: customVariant,
|
|
41668
43884
|
_skipAddonWarning
|
|
41669
|
-
} = props, rest = __rest$
|
|
43885
|
+
} = props, rest = __rest$r(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant", "_skipAddonWarning"]);
|
|
41670
43886
|
if (process.env.NODE_ENV !== "production") {
|
|
41671
43887
|
const {
|
|
41672
43888
|
deprecated
|
|
@@ -41938,7 +44154,7 @@ function useComponents(components) {
|
|
|
41938
44154
|
button: PickerButton
|
|
41939
44155
|
}, components), [components]);
|
|
41940
44156
|
}
|
|
41941
|
-
var __rest$
|
|
44157
|
+
var __rest$q = function(s2, e3) {
|
|
41942
44158
|
var t2 = {};
|
|
41943
44159
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
41944
44160
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -41970,7 +44186,7 @@ const generateRangePicker = (generateConfig2) => {
|
|
|
41970
44186
|
styles: styles2,
|
|
41971
44187
|
classNames: classNames$1,
|
|
41972
44188
|
suffixIcon
|
|
41973
|
-
} = props, restProps = __rest$
|
|
44189
|
+
} = props, restProps = __rest$q(props, ["prefixCls", "getPopupContainer", "components", "className", "style", "placement", "size", "disabled", "bordered", "placeholder", "popupStyle", "popupClassName", "dropdownClassName", "status", "rootClassName", "variant", "picker", "styles", "classNames", "suffixIcon"]);
|
|
41974
44190
|
const pickerType = picker === TIME ? "timePicker" : "datePicker";
|
|
41975
44191
|
const innerRef = React.useRef(null);
|
|
41976
44192
|
const {
|
|
@@ -42080,7 +44296,7 @@ const generateRangePicker = (generateConfig2) => {
|
|
|
42080
44296
|
}
|
|
42081
44297
|
return RangePicker2;
|
|
42082
44298
|
};
|
|
42083
|
-
var __rest$
|
|
44299
|
+
var __rest$p = function(s2, e3) {
|
|
42084
44300
|
var t2 = {};
|
|
42085
44301
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
42086
44302
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -42114,7 +44330,7 @@ const generatePicker$1 = (generateConfig2) => {
|
|
|
42114
44330
|
styles: styles2,
|
|
42115
44331
|
classNames: classNames$1,
|
|
42116
44332
|
suffixIcon
|
|
42117
|
-
} = props, restProps = __rest$
|
|
44333
|
+
} = props, restProps = __rest$p(props, ["prefixCls", "getPopupContainer", "components", "style", "className", "rootClassName", "size", "bordered", "placement", "placeholder", "popupStyle", "popupClassName", "dropdownClassName", "disabled", "status", "variant", "onCalendarChange", "styles", "classNames", "suffixIcon"]);
|
|
42118
44334
|
const {
|
|
42119
44335
|
getPrefixCls,
|
|
42120
44336
|
direction,
|
|
@@ -42918,7 +45134,7 @@ const useStyle$a = genStyleHooks("Drawer", (token2) => {
|
|
|
42918
45134
|
const drawerToken = merge$1(token2, {});
|
|
42919
45135
|
return [genDrawerStyle(drawerToken), genMotionStyle(drawerToken)];
|
|
42920
45136
|
}, prepareComponentToken$6);
|
|
42921
|
-
var __rest$
|
|
45137
|
+
var __rest$o = function(s2, e3) {
|
|
42922
45138
|
var t2 = {};
|
|
42923
45139
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
42924
45140
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -42955,7 +45171,7 @@ const Drawer2 = (props) => {
|
|
|
42955
45171
|
contentWrapperStyle,
|
|
42956
45172
|
destroyOnClose,
|
|
42957
45173
|
destroyOnHidden
|
|
42958
|
-
} = props, rest = __rest$
|
|
45174
|
+
} = props, rest = __rest$o(props, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "panelRef", "style", "className", "aria-labelledby", "visible", "afterVisibleChange", "maskStyle", "drawerStyle", "contentWrapperStyle", "destroyOnClose", "destroyOnHidden"]);
|
|
42959
45175
|
const id2 = useId$1();
|
|
42960
45176
|
const ariaId = rest.title ? id2 : void 0;
|
|
42961
45177
|
const {
|
|
@@ -43058,7 +45274,7 @@ const PurePanel = (props) => {
|
|
|
43058
45274
|
style: style2,
|
|
43059
45275
|
className,
|
|
43060
45276
|
placement = "right"
|
|
43061
|
-
} = props, restProps = __rest$
|
|
45277
|
+
} = props, restProps = __rest$o(props, ["prefixCls", "style", "className", "placement"]);
|
|
43062
45278
|
const {
|
|
43063
45279
|
getPrefixCls
|
|
43064
45280
|
} = React.useContext(ConfigContext);
|
|
@@ -43140,7 +45356,7 @@ const genSpaceAddonStyle = (token2) => {
|
|
|
43140
45356
|
};
|
|
43141
45357
|
};
|
|
43142
45358
|
const useStyle$9 = genStyleHooks(["Space", "Addon"], (token2) => [genSpaceAddonStyle(token2)]);
|
|
43143
|
-
var __rest$
|
|
45359
|
+
var __rest$n = function(s2, e3) {
|
|
43144
45360
|
var t2 = {};
|
|
43145
45361
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
43146
45362
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -43154,7 +45370,7 @@ const SpaceAddon = /* @__PURE__ */ React__default.forwardRef((props, ref) => {
|
|
|
43154
45370
|
children,
|
|
43155
45371
|
style: style2,
|
|
43156
45372
|
prefixCls: customizePrefixCls
|
|
43157
|
-
} = props, restProps = __rest$
|
|
45373
|
+
} = props, restProps = __rest$n(props, ["className", "children", "style", "prefixCls"]);
|
|
43158
45374
|
const {
|
|
43159
45375
|
getPrefixCls,
|
|
43160
45376
|
direction: directionConfig
|
|
@@ -43276,7 +45492,7 @@ const useStyle$8 = genStyleHooks("Space", (token2) => {
|
|
|
43276
45492
|
// https://github.com/ant-design/ant-design/issues/40315
|
|
43277
45493
|
resetStyle: false
|
|
43278
45494
|
});
|
|
43279
|
-
var __rest$
|
|
45495
|
+
var __rest$m = function(s2, e3) {
|
|
43280
45496
|
var t2 = {};
|
|
43281
45497
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
43282
45498
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
@@ -43308,7 +45524,7 @@ const InternalSpace = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
43308
45524
|
wrap = false,
|
|
43309
45525
|
classNames: customClassNames,
|
|
43310
45526
|
styles: styles2
|
|
43311
|
-
} = props, otherProps = __rest$
|
|
45527
|
+
} = props, otherProps = __rest$m(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]);
|
|
43312
45528
|
const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];
|
|
43313
45529
|
const isPresetVerticalSize = isPresetSize(verticalSize);
|
|
43314
45530
|
const isPresetHorizontalSize = isPresetSize(horizontalSize);
|
|
@@ -43371,6 +45587,116 @@ Space.Addon = SpaceAddon;
|
|
|
43371
45587
|
if (process.env.NODE_ENV !== "production") {
|
|
43372
45588
|
Space.displayName = "Space";
|
|
43373
45589
|
}
|
|
45590
|
+
var __rest$l = function(s2, e3) {
|
|
45591
|
+
var t2 = {};
|
|
45592
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0) t2[p2] = s2[p2];
|
|
45593
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
45594
|
+
if (e3.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i])) t2[p2[i]] = s2[p2[i]];
|
|
45595
|
+
}
|
|
45596
|
+
return t2;
|
|
45597
|
+
};
|
|
45598
|
+
const DropdownButton = (props) => {
|
|
45599
|
+
const {
|
|
45600
|
+
getPopupContainer: getContextPopupContainer,
|
|
45601
|
+
getPrefixCls,
|
|
45602
|
+
direction
|
|
45603
|
+
} = React.useContext(ConfigContext);
|
|
45604
|
+
const {
|
|
45605
|
+
prefixCls: customizePrefixCls,
|
|
45606
|
+
type: type4 = "default",
|
|
45607
|
+
danger,
|
|
45608
|
+
disabled: disabled2,
|
|
45609
|
+
loading,
|
|
45610
|
+
onClick,
|
|
45611
|
+
htmlType,
|
|
45612
|
+
children,
|
|
45613
|
+
className,
|
|
45614
|
+
menu,
|
|
45615
|
+
arrow,
|
|
45616
|
+
autoFocus,
|
|
45617
|
+
overlay,
|
|
45618
|
+
trigger,
|
|
45619
|
+
align,
|
|
45620
|
+
open,
|
|
45621
|
+
onOpenChange,
|
|
45622
|
+
placement,
|
|
45623
|
+
getPopupContainer,
|
|
45624
|
+
href,
|
|
45625
|
+
icon: icon2 = /* @__PURE__ */ React.createElement(RefIcon$r, null),
|
|
45626
|
+
title,
|
|
45627
|
+
buttonsRender = (buttons) => buttons,
|
|
45628
|
+
mouseEnterDelay,
|
|
45629
|
+
mouseLeaveDelay,
|
|
45630
|
+
overlayClassName,
|
|
45631
|
+
overlayStyle,
|
|
45632
|
+
destroyOnHidden,
|
|
45633
|
+
destroyPopupOnHide,
|
|
45634
|
+
dropdownRender,
|
|
45635
|
+
popupRender
|
|
45636
|
+
} = props, restProps = __rest$l(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyOnHidden", "destroyPopupOnHide", "dropdownRender", "popupRender"]);
|
|
45637
|
+
const prefixCls = getPrefixCls("dropdown", customizePrefixCls);
|
|
45638
|
+
const buttonPrefixCls = `${prefixCls}-button`;
|
|
45639
|
+
const mergedPopupRender = popupRender || dropdownRender;
|
|
45640
|
+
const dropdownProps = {
|
|
45641
|
+
menu,
|
|
45642
|
+
arrow,
|
|
45643
|
+
autoFocus,
|
|
45644
|
+
align,
|
|
45645
|
+
disabled: disabled2,
|
|
45646
|
+
trigger: disabled2 ? [] : trigger,
|
|
45647
|
+
onOpenChange,
|
|
45648
|
+
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
45649
|
+
mouseEnterDelay,
|
|
45650
|
+
mouseLeaveDelay,
|
|
45651
|
+
overlayClassName,
|
|
45652
|
+
overlayStyle,
|
|
45653
|
+
destroyOnHidden,
|
|
45654
|
+
popupRender: mergedPopupRender
|
|
45655
|
+
};
|
|
45656
|
+
const {
|
|
45657
|
+
compactSize,
|
|
45658
|
+
compactItemClassnames
|
|
45659
|
+
} = useCompactItemContext(prefixCls, direction);
|
|
45660
|
+
const classes = classNames(buttonPrefixCls, compactItemClassnames, className);
|
|
45661
|
+
if ("destroyPopupOnHide" in props) {
|
|
45662
|
+
dropdownProps.destroyPopupOnHide = destroyPopupOnHide;
|
|
45663
|
+
}
|
|
45664
|
+
if ("overlay" in props) {
|
|
45665
|
+
dropdownProps.overlay = overlay;
|
|
45666
|
+
}
|
|
45667
|
+
if ("open" in props) {
|
|
45668
|
+
dropdownProps.open = open;
|
|
45669
|
+
}
|
|
45670
|
+
if ("placement" in props) {
|
|
45671
|
+
dropdownProps.placement = placement;
|
|
45672
|
+
} else {
|
|
45673
|
+
dropdownProps.placement = direction === "rtl" ? "bottomLeft" : "bottomRight";
|
|
45674
|
+
}
|
|
45675
|
+
const leftButton = /* @__PURE__ */ React.createElement(Button$1, {
|
|
45676
|
+
type: type4,
|
|
45677
|
+
danger,
|
|
45678
|
+
disabled: disabled2,
|
|
45679
|
+
loading,
|
|
45680
|
+
onClick,
|
|
45681
|
+
htmlType,
|
|
45682
|
+
href,
|
|
45683
|
+
title
|
|
45684
|
+
}, children);
|
|
45685
|
+
const rightButton = /* @__PURE__ */ React.createElement(Button$1, {
|
|
45686
|
+
type: type4,
|
|
45687
|
+
danger,
|
|
45688
|
+
icon: icon2
|
|
45689
|
+
});
|
|
45690
|
+
const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);
|
|
45691
|
+
return /* @__PURE__ */ React.createElement(Space.Compact, Object.assign({
|
|
45692
|
+
className: classes,
|
|
45693
|
+
size: compactSize,
|
|
45694
|
+
block: true
|
|
45695
|
+
}, restProps), leftButtonToRender, /* @__PURE__ */ React.createElement(Dropdown$1, Object.assign({}, dropdownProps), rightButtonToRender));
|
|
45696
|
+
};
|
|
45697
|
+
DropdownButton.__ANT_BUTTON = true;
|
|
45698
|
+
const Dropdown = Dropdown$1;
|
|
45699
|
+
Dropdown.Button = DropdownButton;
|
|
43374
45700
|
const flexWrapValues = ["wrap", "nowrap", "wrap-reverse"];
|
|
43375
45701
|
const justifyContentValues = ["flex-start", "flex-end", "start", "end", "center", "space-between", "space-around", "space-evenly", "stretch", "normal", "left", "right"];
|
|
43376
45702
|
const alignItemsValues = ["center", "start", "end", "flex-start", "flex-end", "self-start", "self-end", "baseline", "normal", "stretch"];
|
|
@@ -44619,10 +46945,10 @@ const FormItemLabel = ({
|
|
|
44619
46945
|
}, labelChildren));
|
|
44620
46946
|
};
|
|
44621
46947
|
const iconMap = {
|
|
44622
|
-
success: RefIcon$
|
|
44623
|
-
warning: RefIcon$
|
|
44624
|
-
error: RefIcon$
|
|
44625
|
-
validating: RefIcon$
|
|
46948
|
+
success: RefIcon$D,
|
|
46949
|
+
warning: RefIcon$A,
|
|
46950
|
+
error: RefIcon$C,
|
|
46951
|
+
validating: RefIcon$y
|
|
44626
46952
|
};
|
|
44627
46953
|
function StatusProvider({
|
|
44628
46954
|
children,
|
|
@@ -45639,7 +47965,7 @@ const Search = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
45639
47965
|
customOnPressEnter === null || customOnPressEnter === void 0 ? void 0 : customOnPressEnter(e3);
|
|
45640
47966
|
onSearch(e3);
|
|
45641
47967
|
};
|
|
45642
|
-
const searchIcon = typeof enterButton === "boolean" ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
47968
|
+
const searchIcon = typeof enterButton === "boolean" ? /* @__PURE__ */ React.createElement(RefIcon$u, null) : null;
|
|
45643
47969
|
const btnClassName = `${prefixCls}-button`;
|
|
45644
47970
|
let button;
|
|
45645
47971
|
const enterButtonAsElement = enterButton || {};
|
|
@@ -47553,12 +49879,12 @@ const Pagination2 = (props) => {
|
|
|
47553
49879
|
className: `${prefixCls}-item-link`,
|
|
47554
49880
|
type: "button",
|
|
47555
49881
|
tabIndex: -1
|
|
47556
|
-
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
49882
|
+
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$x, null) : /* @__PURE__ */ React.createElement(RefIcon$t, null));
|
|
47557
49883
|
const nextIcon = /* @__PURE__ */ React.createElement("button", {
|
|
47558
49884
|
className: `${prefixCls}-item-link`,
|
|
47559
49885
|
type: "button",
|
|
47560
49886
|
tabIndex: -1
|
|
47561
|
-
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
49887
|
+
}, direction === "rtl" ? /* @__PURE__ */ React.createElement(RefIcon$t, null) : /* @__PURE__ */ React.createElement(RefIcon$x, null));
|
|
47562
49888
|
const jumpPrevIcon = (
|
|
47563
49889
|
// biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
|
|
47564
49890
|
/* @__PURE__ */ React.createElement("a", {
|
|
@@ -48018,7 +50344,7 @@ const InternalSwitch = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
48018
50344
|
const prefixCls = getPrefixCls("switch", customizePrefixCls);
|
|
48019
50345
|
const loadingIcon = /* @__PURE__ */ React.createElement("div", {
|
|
48020
50346
|
className: `${prefixCls}-handle`
|
|
48021
|
-
}, loading && /* @__PURE__ */ React.createElement(RefIcon$
|
|
50347
|
+
}, loading && /* @__PURE__ */ React.createElement(RefIcon$y, {
|
|
48022
50348
|
className: `${prefixCls}-loading-icon`
|
|
48023
50349
|
}));
|
|
48024
50350
|
const [wrapCSSVar, hashId, cssVarCls] = useStyle$2(prefixCls);
|
|
@@ -49154,7 +51480,7 @@ const CopyBtn = ({
|
|
|
49154
51480
|
onClick: onCopy,
|
|
49155
51481
|
"aria-label": ariaLabel,
|
|
49156
51482
|
tabIndex
|
|
49157
|
-
}, copied ? getNode(iconNodes[1], /* @__PURE__ */ React.createElement(RefIcon$
|
|
51483
|
+
}, copied ? getNode(iconNodes[1], /* @__PURE__ */ React.createElement(RefIcon$w, null), true) : getNode(iconNodes[0], btnLoading ? /* @__PURE__ */ React.createElement(RefIcon$y, null) : /* @__PURE__ */ React.createElement(RefIcon$d, null), true)));
|
|
49158
51484
|
};
|
|
49159
51485
|
const MeasureText = /* @__PURE__ */ React.forwardRef(({
|
|
49160
51486
|
style: style2,
|
|
@@ -56854,12 +59180,28 @@ const QuickSettingsHeader = ({
|
|
|
56854
59180
|
"aria-label": String(t2("filter_fields_by_name_or_value")),
|
|
56855
59181
|
onChange: (event) => onFieldTitleFilterChange(event.target.value),
|
|
56856
59182
|
allowClear: {
|
|
56857
|
-
clearIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
59183
|
+
clearIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$C, { "aria-label": String(t2("clear_field_filter")) })
|
|
56858
59184
|
}
|
|
56859
59185
|
}
|
|
56860
59186
|
)
|
|
56861
59187
|
] });
|
|
56862
59188
|
};
|
|
59189
|
+
const AI_BULK_APPROVAL_MODE_STORAGE_KEY = "recrate.aiBulkApprovalMode";
|
|
59190
|
+
const isAiBulkApprovalMode = (value) => value === "entity" || value === "global" || value === "entity-review-next";
|
|
59191
|
+
const readStoredAiBulkApprovalMode = () => {
|
|
59192
|
+
try {
|
|
59193
|
+
const storedMode = localStorage.getItem(AI_BULK_APPROVAL_MODE_STORAGE_KEY);
|
|
59194
|
+
return isAiBulkApprovalMode(storedMode) ? storedMode : "entity";
|
|
59195
|
+
} catch {
|
|
59196
|
+
return "entity";
|
|
59197
|
+
}
|
|
59198
|
+
};
|
|
59199
|
+
const writeStoredAiBulkApprovalMode = (mode) => {
|
|
59200
|
+
try {
|
|
59201
|
+
localStorage.setItem(AI_BULK_APPROVAL_MODE_STORAGE_KEY, mode);
|
|
59202
|
+
} catch {
|
|
59203
|
+
}
|
|
59204
|
+
};
|
|
56863
59205
|
const AiApprovalStepperHeader = ({
|
|
56864
59206
|
activeIndex,
|
|
56865
59207
|
pendingCount,
|
|
@@ -56876,7 +59218,86 @@ const AiApprovalStepperHeader = ({
|
|
|
56876
59218
|
onReviewNextEntity
|
|
56877
59219
|
}) => {
|
|
56878
59220
|
const { t: t2 } = useTranslation();
|
|
59221
|
+
const [bulkApprovalMode, setBulkApprovalMode] = useState(readStoredAiBulkApprovalMode);
|
|
56879
59222
|
if (!pendingCount && !remainingEntityCount) return null;
|
|
59223
|
+
const updateBulkApprovalMode = (mode) => {
|
|
59224
|
+
setBulkApprovalMode(mode);
|
|
59225
|
+
writeStoredAiBulkApprovalMode(mode);
|
|
59226
|
+
};
|
|
59227
|
+
const getBulkActionLabel = (decision, mode) => {
|
|
59228
|
+
if (decision === "accept") {
|
|
59229
|
+
if (mode === "global") return t2("ai_accept_all");
|
|
59230
|
+
if (mode === "entity-review-next") return t2("ai_accept_and_review");
|
|
59231
|
+
return t2("ai_accept");
|
|
59232
|
+
}
|
|
59233
|
+
if (mode === "global") return t2("ai_reject_all");
|
|
59234
|
+
if (mode === "entity-review-next") return t2("ai_reject_and_review");
|
|
59235
|
+
return t2("ai_reject");
|
|
59236
|
+
};
|
|
59237
|
+
const getBulkActionTooltip = (decision, mode) => {
|
|
59238
|
+
if (decision === "accept") {
|
|
59239
|
+
if (mode === "global") return t2("ai_accept_all_global_tooltip");
|
|
59240
|
+
if (mode === "entity-review-next") return t2("ai_accept_and_review_tooltip");
|
|
59241
|
+
return t2("ai_accept_all_tooltip");
|
|
59242
|
+
}
|
|
59243
|
+
if (mode === "global") return t2("ai_reject_all_global_tooltip");
|
|
59244
|
+
if (mode === "entity-review-next") return t2("ai_reject_and_review_tooltip");
|
|
59245
|
+
return t2("ai_reject_all_tooltip");
|
|
59246
|
+
};
|
|
59247
|
+
const buildBulkActionItems = (decision) => [
|
|
59248
|
+
{
|
|
59249
|
+
key: "entity",
|
|
59250
|
+
label: getBulkActionLabel(decision, "entity")
|
|
59251
|
+
},
|
|
59252
|
+
{
|
|
59253
|
+
key: "global",
|
|
59254
|
+
label: getBulkActionLabel(decision, "global")
|
|
59255
|
+
},
|
|
59256
|
+
{
|
|
59257
|
+
key: "entity-review-next",
|
|
59258
|
+
label: getBulkActionLabel(decision, "entity-review-next")
|
|
59259
|
+
}
|
|
59260
|
+
];
|
|
59261
|
+
const renderBulkAction = (decision, onAction) => {
|
|
59262
|
+
const className = decision === "accept" ? "recrate-ai-bulk-action recrate-ai-bulk-accept" : "recrate-ai-bulk-action recrate-ai-bulk-reject";
|
|
59263
|
+
const menu = {
|
|
59264
|
+
selectedKeys: [bulkApprovalMode],
|
|
59265
|
+
items: buildBulkActionItems(decision),
|
|
59266
|
+
onClick: ({ key, domEvent }) => {
|
|
59267
|
+
domEvent.stopPropagation();
|
|
59268
|
+
if (!isAiBulkApprovalMode(key)) return;
|
|
59269
|
+
updateBulkApprovalMode(key);
|
|
59270
|
+
}
|
|
59271
|
+
};
|
|
59272
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: getBulkActionTooltip(decision, bulkApprovalMode), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
59273
|
+
Button$1,
|
|
59274
|
+
{
|
|
59275
|
+
className,
|
|
59276
|
+
onClick: () => onAction(bulkApprovalMode),
|
|
59277
|
+
children: [
|
|
59278
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: getBulkActionLabel(decision, bulkApprovalMode) }),
|
|
59279
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59280
|
+
Dropdown,
|
|
59281
|
+
{
|
|
59282
|
+
menu,
|
|
59283
|
+
trigger: ["click"],
|
|
59284
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59285
|
+
"span",
|
|
59286
|
+
{
|
|
59287
|
+
className: "recrate-ai-bulk-action-menu-trigger",
|
|
59288
|
+
onClick: (event) => event.stopPropagation(),
|
|
59289
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
59290
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
59291
|
+
onKeyDown: (event) => event.stopPropagation(),
|
|
59292
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$v, { className: "recrate-ai-bulk-action-icon" })
|
|
59293
|
+
}
|
|
59294
|
+
)
|
|
59295
|
+
}
|
|
59296
|
+
)
|
|
59297
|
+
]
|
|
59298
|
+
}
|
|
59299
|
+
) });
|
|
59300
|
+
};
|
|
56880
59301
|
if (!pendingCount) {
|
|
56881
59302
|
const entityLabel = t2("ai_entity", { count: remainingEntityCount });
|
|
56882
59303
|
const remainingMessage = t2("ai_remaining_review_message", {
|
|
@@ -56918,22 +59339,8 @@ const AiApprovalStepperHeader = ({
|
|
|
56918
59339
|
}
|
|
56919
59340
|
) }),
|
|
56920
59341
|
!readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
56921
|
-
|
|
56922
|
-
|
|
56923
|
-
{
|
|
56924
|
-
className: "recrate-ai-bulk-action recrate-ai-bulk-accept",
|
|
56925
|
-
onClick: onAcceptAll,
|
|
56926
|
-
children: t2("ai_accept_all")
|
|
56927
|
-
}
|
|
56928
|
-
) }),
|
|
56929
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_reject_all_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
56930
|
-
Button$1,
|
|
56931
|
-
{
|
|
56932
|
-
className: "recrate-ai-bulk-action recrate-ai-bulk-reject",
|
|
56933
|
-
onClick: onRejectAll,
|
|
56934
|
-
children: t2("ai_reject_all")
|
|
56935
|
-
}
|
|
56936
|
-
) })
|
|
59342
|
+
renderBulkAction("accept", onAcceptAll),
|
|
59343
|
+
renderBulkAction("reject", onRejectAll)
|
|
56937
59344
|
] }),
|
|
56938
59345
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "recrate-ai-stepper", "aria-label": String(t2("ai_pending_field_navigation_aria")), children: [
|
|
56939
59346
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip2, { title: t2("ai_previous_pending_field"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -56953,7 +59360,7 @@ const AiApprovalStepperHeader = ({
|
|
|
56953
59360
|
{
|
|
56954
59361
|
type: "text",
|
|
56955
59362
|
size: "small",
|
|
56956
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
59363
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$v, {}),
|
|
56957
59364
|
"aria-label": String(t2("ai_next_pending_field_aria")),
|
|
56958
59365
|
disabled: !canGoNext,
|
|
56959
59366
|
onClick: onNext
|
|
@@ -57199,7 +59606,7 @@ const ProfileTabRail = ({
|
|
|
57199
59606
|
shape: "circle",
|
|
57200
59607
|
size: "small",
|
|
57201
59608
|
className: "recrate-tab-rail-scroll-button recrate-tab-rail-scroll-button-down",
|
|
57202
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
59609
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$v, {}),
|
|
57203
59610
|
"aria-label": "Scroll profile tabs down",
|
|
57204
59611
|
onClick: () => onScrollTabRail == null ? void 0 : onScrollTabRail("down")
|
|
57205
59612
|
}
|
|
@@ -62848,7 +65255,7 @@ const Text$2 = ({
|
|
|
62848
65255
|
color: "green",
|
|
62849
65256
|
size: "middle",
|
|
62850
65257
|
danger: !isValidTextValue,
|
|
62851
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
65258
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$w, {})
|
|
62852
65259
|
}
|
|
62853
65260
|
)
|
|
62854
65261
|
] }),
|
|
@@ -70992,7 +73399,7 @@ const NumberComponent = ({
|
|
|
70992
73399
|
color: "green",
|
|
70993
73400
|
size: "middle",
|
|
70994
73401
|
disabled: !isValidNumber || !isValidConstraints,
|
|
70995
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
73402
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$w, {})
|
|
70996
73403
|
}
|
|
70997
73404
|
)
|
|
70998
73405
|
] }),
|
|
@@ -71131,7 +73538,7 @@ const Url = ({
|
|
|
71131
73538
|
color: "green",
|
|
71132
73539
|
size: "middle",
|
|
71133
73540
|
danger: !isValidUrl,
|
|
71134
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
73541
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$w, {})
|
|
71135
73542
|
}
|
|
71136
73543
|
)
|
|
71137
73544
|
] }),
|
|
@@ -82653,7 +85060,7 @@ const AiEntityDiffView = ({
|
|
|
82653
85060
|
type: "text",
|
|
82654
85061
|
size: "small",
|
|
82655
85062
|
className: "recrate-ai-entity-diff-close",
|
|
82656
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
85063
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$B, {}),
|
|
82657
85064
|
"aria-label": String(t2("ai_hide_entity_diff_aria")),
|
|
82658
85065
|
onClick: (event) => {
|
|
82659
85066
|
event.stopPropagation();
|
|
@@ -83707,7 +86114,7 @@ const AddControl = ({
|
|
|
83707
86114
|
type: "primary",
|
|
83708
86115
|
size: "middle",
|
|
83709
86116
|
className: "focus:outline-none focus:border-2 focus:border-green-600",
|
|
83710
|
-
icon: !selectedType || selectedType !== type4 ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$q, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
86117
|
+
icon: !selectedType || selectedType !== type4 ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$q, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$B, {}),
|
|
83711
86118
|
children: [
|
|
83712
86119
|
" ",
|
|
83713
86120
|
getTypeLabelFromProfile(type4)
|
|
@@ -83721,7 +86128,7 @@ const AddControl = ({
|
|
|
83721
86128
|
type: "primary",
|
|
83722
86129
|
size: "middle",
|
|
83723
86130
|
className: "focus:outline-none focus:border-2 focus:border-green-600",
|
|
83724
|
-
icon: !selectedType || selectedType !== "bulkAdd" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
86131
|
+
icon: !selectedType || selectedType !== "bulkAdd" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$B, {}),
|
|
83725
86132
|
children: " Bulk Add"
|
|
83726
86133
|
}
|
|
83727
86134
|
) })
|
|
@@ -85772,7 +88179,7 @@ const DialogAddProperty = ({
|
|
|
85772
88179
|
item.label ? /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "recrate-add-property-row-name", children: item.label }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "recrate-add-property-row-name", children: item.name }),
|
|
85773
88180
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$a, {}),
|
|
85774
88181
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { className: "recrate-add-property-row-type", children: renderPropertyType(item.type) }),
|
|
85775
|
-
isSelected && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$
|
|
88182
|
+
isSelected && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$w, { className: "recrate-add-property-row-check" })
|
|
85776
88183
|
] }),
|
|
85777
88184
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", className: "recrate-add-property-row-help", children: item.help })
|
|
85778
88185
|
] })
|
|
@@ -113016,6 +115423,7 @@ const useEntityMutationHandlers = ({
|
|
|
113016
115423
|
if (isURL(data.value) && ((_a2 = state.configuration) == null ? void 0 : _a2.enableUrlMarkup)) {
|
|
113017
115424
|
handleCreateEntity({
|
|
113018
115425
|
property: data.property,
|
|
115426
|
+
propertyId: data.propertyId,
|
|
113019
115427
|
json: {
|
|
113020
115428
|
"@id": data.value,
|
|
113021
115429
|
"@type": "URL",
|
|
@@ -114977,7 +117385,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
114977
117385
|
onReject: () => handleRejectAiProperty(approvalRecord)
|
|
114978
117386
|
};
|
|
114979
117387
|
};
|
|
114980
|
-
const
|
|
117388
|
+
const handleAcceptCurrentEntityAiApprovals = () => {
|
|
114981
117389
|
var _a3;
|
|
114982
117390
|
(_a3 = approvalContext == null ? void 0 : approvalContext.markApprovalEntityApproved) == null ? void 0 : _a3.call(approvalContext, {
|
|
114983
117391
|
entityId: entity["@id"],
|
|
@@ -114992,29 +117400,34 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
114992
117400
|
value: editedEntity
|
|
114993
117401
|
});
|
|
114994
117402
|
};
|
|
117403
|
+
const restoreEditedEntityApprovalValues = (entityId) => {
|
|
117404
|
+
const targetEntity = crateManager.getEntity({
|
|
117405
|
+
id: entityId,
|
|
117406
|
+
link: false,
|
|
117407
|
+
materialise: false
|
|
117408
|
+
});
|
|
117409
|
+
if (!targetEntity) return void 0;
|
|
117410
|
+
const approvalRecords = getPendingEntityApprovalRecords(
|
|
117411
|
+
approvalContext == null ? void 0 : approvalContext.roCrateApproval,
|
|
117412
|
+
entityId
|
|
117413
|
+
).filter((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) !== "@reverse");
|
|
117414
|
+
const restoredValues = approvalRecords.reduce((acc, approvalRecord) => {
|
|
117415
|
+
if (approvalRecord == null ? void 0 : approvalRecord.propertyName) {
|
|
117416
|
+
acc[approvalRecord.propertyName] = approvalRecord.previousValue;
|
|
117417
|
+
}
|
|
117418
|
+
return acc;
|
|
117419
|
+
}, {});
|
|
117420
|
+
approvalRecords.filter((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) !== "@id").forEach((approvalRecord) => restoreEntityApprovalValue(targetEntity, approvalRecord));
|
|
117421
|
+
approvalRecords.filter((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) === "@id").forEach((approvalRecord) => restoreEntityApprovalValue(targetEntity, approvalRecord));
|
|
117422
|
+
return restoredValues;
|
|
117423
|
+
};
|
|
114995
117424
|
const handleRejectAiEntityEdit = (editedEntity) => {
|
|
114996
117425
|
var _a3;
|
|
114997
117426
|
try {
|
|
114998
117427
|
const entityId = editedEntity == null ? void 0 : editedEntity["@id"];
|
|
114999
117428
|
if (!entityId) return;
|
|
115000
|
-
const
|
|
115001
|
-
|
|
115002
|
-
link: false,
|
|
115003
|
-
materialise: false
|
|
115004
|
-
});
|
|
115005
|
-
if (!targetEntity) return;
|
|
115006
|
-
const approvalRecords = getPendingEntityApprovalRecords(
|
|
115007
|
-
approvalContext == null ? void 0 : approvalContext.roCrateApproval,
|
|
115008
|
-
entityId
|
|
115009
|
-
).filter((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) !== "@reverse");
|
|
115010
|
-
const restoredValues = approvalRecords.reduce((acc, approvalRecord) => {
|
|
115011
|
-
if (approvalRecord == null ? void 0 : approvalRecord.propertyName) {
|
|
115012
|
-
acc[approvalRecord.propertyName] = approvalRecord.previousValue;
|
|
115013
|
-
}
|
|
115014
|
-
return acc;
|
|
115015
|
-
}, {});
|
|
115016
|
-
approvalRecords.filter((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) !== "@id").forEach((approvalRecord) => restoreEntityApprovalValue(targetEntity, approvalRecord));
|
|
115017
|
-
approvalRecords.filter((approvalRecord) => (approvalRecord == null ? void 0 : approvalRecord.propertyName) === "@id").forEach((approvalRecord) => restoreEntityApprovalValue(targetEntity, approvalRecord));
|
|
117429
|
+
const restoredValues = restoreEditedEntityApprovalValues(entityId);
|
|
117430
|
+
if (!restoredValues) return;
|
|
115018
117431
|
if (entityIdsMatch(entityId, entity == null ? void 0 : entity["@id"])) {
|
|
115019
117432
|
refresh();
|
|
115020
117433
|
}
|
|
@@ -115029,7 +117442,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
115029
117442
|
onError();
|
|
115030
117443
|
}
|
|
115031
117444
|
};
|
|
115032
|
-
const
|
|
117445
|
+
const handleRejectCurrentEntityAiApprovals = () => {
|
|
115033
117446
|
var _a3;
|
|
115034
117447
|
try {
|
|
115035
117448
|
const restoredValues = pendingAiApprovals.reduce((acc, approvalRecord) => {
|
|
@@ -115128,23 +117541,27 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
115128
117541
|
onLoadEntity({ id: "./" });
|
|
115129
117542
|
}
|
|
115130
117543
|
};
|
|
117544
|
+
const restoreAiDeletedEntity = (deletedEntity) => {
|
|
117545
|
+
const approvalRecords = getPendingDeletedEntityApprovalRecords(deletedEntity);
|
|
117546
|
+
const restoredEntity = buildRestoredDeletedEntity(deletedEntity, approvalRecords);
|
|
117547
|
+
crateManager.addEntity(restoredEntity);
|
|
117548
|
+
restoreDeletedEntityReverseConnections(restoredEntity["@id"], approvalRecords);
|
|
117549
|
+
const sourceApprovalRecord = getDeletedEntitySourceApproval(deletedEntity);
|
|
117550
|
+
if (sourceApprovalRecord) {
|
|
117551
|
+
const sourceEntity = crateManager.getEntity({
|
|
117552
|
+
id: deletedEntity.__aiDeleteSourceEntityId,
|
|
117553
|
+
link: false,
|
|
117554
|
+
materialise: false
|
|
117555
|
+
});
|
|
117556
|
+
if (sourceEntity) {
|
|
117557
|
+
restoreEntityApprovalValue(sourceEntity, sourceApprovalRecord);
|
|
117558
|
+
}
|
|
117559
|
+
}
|
|
117560
|
+
return restoredEntity;
|
|
117561
|
+
};
|
|
115131
117562
|
const handleRestoreAiDeletedEntity = (deletedEntity = contextEntity, navigateToRestored = false) => {
|
|
115132
117563
|
try {
|
|
115133
|
-
const
|
|
115134
|
-
const restoredEntity = buildRestoredDeletedEntity(deletedEntity, approvalRecords);
|
|
115135
|
-
crateManager.addEntity(restoredEntity);
|
|
115136
|
-
restoreDeletedEntityReverseConnections(restoredEntity["@id"], approvalRecords);
|
|
115137
|
-
const sourceApprovalRecord = getDeletedEntitySourceApproval(deletedEntity);
|
|
115138
|
-
if (sourceApprovalRecord) {
|
|
115139
|
-
const sourceEntity = crateManager.getEntity({
|
|
115140
|
-
id: deletedEntity.__aiDeleteSourceEntityId,
|
|
115141
|
-
link: false,
|
|
115142
|
-
materialise: false
|
|
115143
|
-
});
|
|
115144
|
-
if (sourceEntity) {
|
|
115145
|
-
restoreEntityApprovalValue(sourceEntity, sourceApprovalRecord);
|
|
115146
|
-
}
|
|
115147
|
-
}
|
|
117564
|
+
const restoredEntity = restoreAiDeletedEntity(deletedEntity);
|
|
115148
117565
|
const nextEntityId = navigateToRestored ? restoredEntity["@id"] : entity["@id"];
|
|
115149
117566
|
const nextEntity = crateManager.getEntity({
|
|
115150
117567
|
id: nextEntityId,
|
|
@@ -115162,6 +117579,67 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
115162
117579
|
onError();
|
|
115163
117580
|
}
|
|
115164
117581
|
};
|
|
117582
|
+
const handleAcceptAllAiApprovals = (mode) => {
|
|
117583
|
+
var _a3;
|
|
117584
|
+
if (mode === "global") {
|
|
117585
|
+
(_a3 = approvalContext == null ? void 0 : approvalContext.markApprovalCrateApproved) == null ? void 0 : _a3.call(approvalContext, {
|
|
117586
|
+
decision: "accept"
|
|
117587
|
+
});
|
|
117588
|
+
return;
|
|
117589
|
+
}
|
|
117590
|
+
handleAcceptCurrentEntityAiApprovals();
|
|
117591
|
+
if (mode === "entity-review-next") {
|
|
117592
|
+
handleReviewNextAiApprovalEntity();
|
|
117593
|
+
}
|
|
117594
|
+
};
|
|
117595
|
+
const handleRejectGlobalAiApprovals = () => {
|
|
117596
|
+
var _a3;
|
|
117597
|
+
try {
|
|
117598
|
+
const restoredValues = {};
|
|
117599
|
+
const pendingEntities = getPendingApprovalEntities(approvalContext == null ? void 0 : approvalContext.roCrateApproval);
|
|
117600
|
+
pendingContextApprovalItems.forEach((approvalItem) => {
|
|
117601
|
+
var _a4;
|
|
117602
|
+
const previousContext = (_a4 = approvalItem.approvalRecord) == null ? void 0 : _a4.previousValue;
|
|
117603
|
+
if (!propertyValueHasContent(previousContext)) return;
|
|
117604
|
+
crateManager.setContext(previousContext);
|
|
117605
|
+
restoredValues["@context"] = previousContext;
|
|
117606
|
+
});
|
|
117607
|
+
pendingEntities.forEach((entityApproval) => {
|
|
117608
|
+
const entityId = entityApproval == null ? void 0 : entityApproval["@id"];
|
|
117609
|
+
if (!entityId) return;
|
|
117610
|
+
if (isPendingEntityDeleteApproval(entityApproval)) {
|
|
117611
|
+
const deletedEntity = getDeletedEntityFromApproval(entityApproval);
|
|
117612
|
+
if (deletedEntity) {
|
|
117613
|
+
restoredValues[entityId] = restoreAiDeletedEntity(deletedEntity);
|
|
117614
|
+
}
|
|
117615
|
+
return;
|
|
117616
|
+
}
|
|
117617
|
+
const restoredEntityValues = restoreEditedEntityApprovalValues(entityId);
|
|
117618
|
+
if (restoredEntityValues) {
|
|
117619
|
+
restoredValues[entityId] = restoredEntityValues;
|
|
117620
|
+
}
|
|
117621
|
+
});
|
|
117622
|
+
refresh();
|
|
117623
|
+
saveCratePreservingView();
|
|
117624
|
+
(_a3 = approvalContext == null ? void 0 : approvalContext.markApprovalCrateApproved) == null ? void 0 : _a3.call(approvalContext, {
|
|
117625
|
+
decision: "reject",
|
|
117626
|
+
value: restoredValues
|
|
117627
|
+
});
|
|
117628
|
+
} catch (error2) {
|
|
117629
|
+
console.error(error2);
|
|
117630
|
+
onError();
|
|
117631
|
+
}
|
|
117632
|
+
};
|
|
117633
|
+
const handleRejectAllAiApprovals = (mode) => {
|
|
117634
|
+
if (mode === "global") {
|
|
117635
|
+
handleRejectGlobalAiApprovals();
|
|
117636
|
+
return;
|
|
117637
|
+
}
|
|
117638
|
+
handleRejectCurrentEntityAiApprovals();
|
|
117639
|
+
if (mode === "entity-review-next") {
|
|
117640
|
+
handleReviewNextAiApprovalEntity();
|
|
117641
|
+
}
|
|
117642
|
+
};
|
|
115165
117643
|
const hasFieldValue = (value) => {
|
|
115166
117644
|
if (Array.isArray(value)) {
|
|
115167
117645
|
return value.some(hasFieldValue);
|
|
@@ -117010,7 +119488,7 @@ class CrateManager {
|
|
|
117010
119488
|
return this.warnings;
|
|
117011
119489
|
}
|
|
117012
119490
|
__updateContext({ name: name2, id: id2 }) {
|
|
117013
|
-
if (id2 &&
|
|
119491
|
+
if (id2 && this.localContext[name2] !== id2) {
|
|
117014
119492
|
this.contextDefinitions[id2] = true;
|
|
117015
119493
|
this.localContext[name2] = id2;
|
|
117016
119494
|
}
|
|
@@ -122806,9 +125284,17 @@ const en = {
|
|
|
122806
125284
|
ai_review_next_entity_tooltip: "Review the next entity with pending AI changes",
|
|
122807
125285
|
ai_no_other_entities_need_review: "No other entities need AI review",
|
|
122808
125286
|
ai_accept_all_tooltip: "Accept every pending AI change in this entity",
|
|
125287
|
+
ai_accept: "Accept",
|
|
125288
|
+
ai_accept_all_global_tooltip: "Accept every pending AI change across the crate",
|
|
122809
125289
|
ai_accept_all: "Accept all",
|
|
125290
|
+
ai_accept_and_review_tooltip: "Accept every pending AI change in this entity, then review the next entity",
|
|
125291
|
+
ai_accept_and_review: "Accept and review",
|
|
122810
125292
|
ai_reject_all_tooltip: "Restore previous values for every pending AI change in this entity",
|
|
125293
|
+
ai_reject: "Reject",
|
|
125294
|
+
ai_reject_all_global_tooltip: "Restore previous values for every pending AI change across the crate",
|
|
122811
125295
|
ai_reject_all: "Reject all",
|
|
125296
|
+
ai_reject_and_review_tooltip: "Restore previous values for every pending AI change in this entity, then review the next entity",
|
|
125297
|
+
ai_reject_and_review: "Reject and review",
|
|
122812
125298
|
ai_pending_field_navigation_aria: "Pending AI field navigation",
|
|
122813
125299
|
ai_previous_pending_field: "Previous pending field",
|
|
122814
125300
|
ai_previous_pending_field_aria: "Previous pending AI field",
|
|
@@ -123979,7 +126465,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
|
|
|
123979
126465
|
}) : null
|
|
123980
126466
|
);
|
|
123981
126467
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
123982
|
-
const version = "0.1.
|
|
126468
|
+
const version = "0.1.38";
|
|
123983
126469
|
const pkg = {
|
|
123984
126470
|
version
|
|
123985
126471
|
};
|
|
@@ -124096,6 +126582,61 @@ const markEntityApprovalRecordsApproved = (approvalState, entityId, decision) =>
|
|
|
124096
126582
|
}
|
|
124097
126583
|
return { nextApprovalState: approvalState, approvalRecords, changed };
|
|
124098
126584
|
};
|
|
126585
|
+
const markAllApprovalRecordsApproved = (approvalState, decision) => {
|
|
126586
|
+
const approvalRecords = [];
|
|
126587
|
+
let changed = false;
|
|
126588
|
+
const shouldRemove = decision === "reject" || decision === "manual-edit";
|
|
126589
|
+
const hasApprovalRecords = (entityApproval) => Array.isArray(entityApproval == null ? void 0 : entityApproval.approval) && entityApproval.approval.length > 0;
|
|
126590
|
+
const updateEntityApproval = (entityApproval) => {
|
|
126591
|
+
if (!entityApproval || !Array.isArray(entityApproval.approval)) {
|
|
126592
|
+
return entityApproval;
|
|
126593
|
+
}
|
|
126594
|
+
let entityChanged = false;
|
|
126595
|
+
const nextApprovalRecords = entityApproval.approval.flatMap((approvalRecord) => {
|
|
126596
|
+
if ((approvalRecord == null ? void 0 : approvalRecord.approved) === true || (approvalRecord == null ? void 0 : approvalRecord.approved) === "true") {
|
|
126597
|
+
return [approvalRecord];
|
|
126598
|
+
}
|
|
126599
|
+
if (shouldRemove) {
|
|
126600
|
+
approvalRecords.push(approvalRecord);
|
|
126601
|
+
entityChanged = true;
|
|
126602
|
+
return [];
|
|
126603
|
+
}
|
|
126604
|
+
const nextApprovalRecord = { ...approvalRecord, approved: true };
|
|
126605
|
+
approvalRecords.push(nextApprovalRecord);
|
|
126606
|
+
entityChanged = true;
|
|
126607
|
+
return [nextApprovalRecord];
|
|
126608
|
+
});
|
|
126609
|
+
if (!entityChanged) return entityApproval;
|
|
126610
|
+
changed = true;
|
|
126611
|
+
return {
|
|
126612
|
+
...entityApproval,
|
|
126613
|
+
approval: nextApprovalRecords
|
|
126614
|
+
};
|
|
126615
|
+
};
|
|
126616
|
+
if (Array.isArray(approvalState)) {
|
|
126617
|
+
const nextApprovalState = approvalState.map(updateEntityApproval).filter(hasApprovalRecords);
|
|
126618
|
+
return { nextApprovalState, approvalRecords, changed };
|
|
126619
|
+
}
|
|
126620
|
+
if (approvalState && typeof approvalState === "object") {
|
|
126621
|
+
if (Array.isArray(approvalState.approval)) {
|
|
126622
|
+
const nextApprovalState = updateEntityApproval(approvalState);
|
|
126623
|
+
return {
|
|
126624
|
+
nextApprovalState: hasApprovalRecords(nextApprovalState) ? nextApprovalState : void 0,
|
|
126625
|
+
approvalRecords,
|
|
126626
|
+
changed
|
|
126627
|
+
};
|
|
126628
|
+
}
|
|
126629
|
+
if (Array.isArray(approvalState.items)) {
|
|
126630
|
+
const nextItems = approvalState.items.map(updateEntityApproval).filter(hasApprovalRecords);
|
|
126631
|
+
return {
|
|
126632
|
+
nextApprovalState: changed ? { ...approvalState, items: nextItems } : approvalState,
|
|
126633
|
+
approvalRecords,
|
|
126634
|
+
changed
|
|
126635
|
+
};
|
|
126636
|
+
}
|
|
126637
|
+
}
|
|
126638
|
+
return { nextApprovalState: approvalState, approvalRecords, changed };
|
|
126639
|
+
};
|
|
124099
126640
|
const ProfileManagerContext = React__default.createContext(null);
|
|
124100
126641
|
const CrateManagerContext = React__default.createContext(null);
|
|
124101
126642
|
const RoCrateApprovalContext = React__default.createContext(null);
|
|
@@ -124231,12 +126772,30 @@ function RecrateCrateBuilderInner(props) {
|
|
|
124231
126772
|
value
|
|
124232
126773
|
});
|
|
124233
126774
|
}, [approvalState, onSaveRoCrateApproval]);
|
|
126775
|
+
const markApprovalCrateApproved = useCallback((params) => {
|
|
126776
|
+
const { decision, value } = params;
|
|
126777
|
+
const { nextApprovalState, approvalRecords, changed } = markAllApprovalRecordsApproved(
|
|
126778
|
+
approvalState,
|
|
126779
|
+
decision
|
|
126780
|
+
);
|
|
126781
|
+
if (!changed && approvalRecords.length === 0) return;
|
|
126782
|
+
setApprovalState(nextApprovalState);
|
|
126783
|
+
onSaveRoCrateApproval == null ? void 0 : onSaveRoCrateApproval({
|
|
126784
|
+
roCrateApproval: nextApprovalState,
|
|
126785
|
+
entityId: "*",
|
|
126786
|
+
propertyName: "*",
|
|
126787
|
+
decision,
|
|
126788
|
+
approvalRecords,
|
|
126789
|
+
value
|
|
126790
|
+
});
|
|
126791
|
+
}, [approvalState, onSaveRoCrateApproval]);
|
|
124234
126792
|
const approvalContextValue = useMemo$1(() => ({
|
|
124235
126793
|
roCrateApproval: approvalState,
|
|
124236
126794
|
markApprovalPropertyApproved,
|
|
124237
126795
|
markApprovalEntityApproved,
|
|
124238
|
-
markApprovalEntityAndPropertyApproved
|
|
124239
|
-
|
|
126796
|
+
markApprovalEntityAndPropertyApproved,
|
|
126797
|
+
markApprovalCrateApproved
|
|
126798
|
+
}), [approvalState, markApprovalCrateApproved, markApprovalEntityAndPropertyApproved, markApprovalEntityApproved, markApprovalPropertyApproved]);
|
|
124240
126799
|
const configuration = useMemo$1(() => {
|
|
124241
126800
|
const profileActionsEnabled = enableProfileActions ?? hasProfileActionHandler;
|
|
124242
126801
|
const config2 = {
|