@zlooks.cn/password-auth-server 1.0.3 → 1.0.5
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/.hile-rsc/{build-mtsn68qv-a841a566/client-browser/chunks/chunk-CZF5VGOJ.js → build-mtwvmb9w-8d24cd70/client-browser/chunks/chunk-Q4E7K4YZ.js} +22 -70
- package/.hile-rsc/{build-mtsn68qv-a841a566/client-browser/src-plugin-page-frame-07c4de56a6-C2WHPDGD.js → build-mtwvmb9w-8d24cd70/client-browser/src-plugin-page-frame-07c4de56a6-3RB2NF7F.js} +1 -1
- package/.hile-rsc/{build-mtsn68qv-a841a566/client-browser/src-plugin-password-form-3bd63d69e5-G5UQAB5W.js → build-mtwvmb9w-8d24cd70/client-browser/src-plugin-password-form-3bd63d69e5-LHEMP4OP.js} +388 -134
- package/.hile-rsc/{build-mtsn68qv-a841a566/client-ssr/chunks/chunk-RMKQVF3F.js → build-mtwvmb9w-8d24cd70/client-ssr/chunks/chunk-IR7T4YHX.js} +21 -69
- package/.hile-rsc/{build-mtsn68qv-a841a566/client-ssr/src-plugin-page-frame-07c4de56a6-ICZZGKBP.js → build-mtwvmb9w-8d24cd70/client-ssr/src-plugin-page-frame-07c4de56a6-5ALGD76V.js} +1 -1
- package/.hile-rsc/{build-mtsn68qv-a841a566/client-ssr/src-plugin-password-form-3bd63d69e5-UV3K6EC6.js → build-mtwvmb9w-8d24cd70/client-ssr/src-plugin-password-form-3bd63d69e5-TF7ZOD75.js} +593 -339
- package/.hile-rsc/{build-mtsn68qv-a841a566 → build-mtwvmb9w-8d24cd70}/plugin.json +18 -18
- package/.hile-rsc/{build-mtsn68qv-a841a566 → build-mtwvmb9w-8d24cd70}/server-rsc/index.js +308 -156
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +37 -6
- package/dist/config/schema.js.map +1 -1
- package/dist/messages/auth-extension/begin.msg.js +6 -5
- package/dist/messages/auth-extension/begin.msg.js.map +1 -1
- package/dist/messages/auth-extension/complete.msg.js +6 -5
- package/dist/messages/auth-extension/complete.msg.js.map +1 -1
- package/dist/models/begin-authentication.model.d.ts +22 -0
- package/dist/models/begin-authentication.model.d.ts.map +1 -0
- package/dist/models/begin-authentication.model.js +13 -0
- package/dist/models/begin-authentication.model.js.map +1 -0
- package/dist/models/complete-authentication.model.d.ts +35 -0
- package/dist/models/complete-authentication.model.d.ts.map +1 -0
- package/dist/models/complete-authentication.model.js +13 -0
- package/dist/models/complete-authentication.model.js.map +1 -0
- package/dist/runtime/password-state-store.d.ts.map +1 -1
- package/dist/runtime/password-state-store.js +23 -10
- package/dist/runtime/password-state-store.js.map +1 -1
- package/package.json +26 -25
- /package/.hile-rsc/{build-mtsn68qv-a841a566 → build-mtwvmb9w-8d24cd70}/client-browser/src-plugin-page-frame-07c4de56a6-3F24AYCH.css +0 -0
- /package/.hile-rsc/{build-mtsn68qv-a841a566 → build-mtwvmb9w-8d24cd70}/client-browser/src-plugin-password-form-3bd63d69e5-TRYMJX4F.css +0 -0
- /package/.hile-rsc/{build-mtsn68qv-a841a566 → build-mtwvmb9w-8d24cd70}/styles/4b3193c4f2b317ffed425ccf401342a4bdd6ccfd5f9c42def3315e776f166975.css +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
RscLink,
|
|
4
|
-
USER_SESSION_COOKIE,
|
|
5
4
|
__commonJS,
|
|
6
5
|
__toCommonJS,
|
|
7
6
|
__toESM,
|
|
8
|
-
|
|
7
|
+
browserApiPath,
|
|
9
8
|
browserApiResponseSchema,
|
|
10
9
|
external_exports,
|
|
11
10
|
init_react,
|
|
@@ -75,7 +74,7 @@ import {
|
|
|
75
74
|
useRequest,
|
|
76
75
|
useRscNavigation,
|
|
77
76
|
useState
|
|
78
|
-
} from "./chunks/chunk-
|
|
77
|
+
} from "./chunks/chunk-IR7T4YHX.js";
|
|
79
78
|
|
|
80
79
|
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/lib/_util/getReactMajorVersionCanDelMe.js
|
|
81
80
|
var require_getReactMajorVersionCanDelMe = __commonJS({
|
|
@@ -3227,10 +3226,10 @@ var require_Alert = __commonJS({
|
|
|
3227
3226
|
};
|
|
3228
3227
|
var Alert = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
3229
3228
|
const {
|
|
3230
|
-
description,
|
|
3229
|
+
description: description2,
|
|
3231
3230
|
prefixCls: customizePrefixCls,
|
|
3232
3231
|
message,
|
|
3233
|
-
title,
|
|
3232
|
+
title: title2,
|
|
3234
3233
|
banner,
|
|
3235
3234
|
className,
|
|
3236
3235
|
rootClassName,
|
|
@@ -3249,7 +3248,7 @@ var require_Alert = __commonJS({
|
|
|
3249
3248
|
classNames,
|
|
3250
3249
|
...otherProps
|
|
3251
3250
|
} = props;
|
|
3252
|
-
const mergedTitle =
|
|
3251
|
+
const mergedTitle = title2 ?? message;
|
|
3253
3252
|
const [closed, setClosed] = React.useState(false);
|
|
3254
3253
|
if (process.env.NODE_ENV !== "production") {
|
|
3255
3254
|
const warning = (0, _warning.devUseWarning)("Alert");
|
|
@@ -3323,7 +3322,7 @@ var require_Alert = __commonJS({
|
|
|
3323
3322
|
props: mergedProps
|
|
3324
3323
|
});
|
|
3325
3324
|
const alertCls = (0, _clsx.clsx)(prefixCls, `${prefixCls}-${type}`, `${prefixCls}-${mergedVariant}`, {
|
|
3326
|
-
[`${prefixCls}-with-description`]: !!
|
|
3325
|
+
[`${prefixCls}-with-description`]: !!description2,
|
|
3327
3326
|
[`${prefixCls}-no-icon`]: !isShowIcon,
|
|
3328
3327
|
[`${prefixCls}-banner`]: !!banner,
|
|
3329
3328
|
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
@@ -3386,7 +3385,7 @@ var require_Alert = __commonJS({
|
|
|
3386
3385
|
}, isShowIcon ? /* @__PURE__ */ React.createElement(IconNode, {
|
|
3387
3386
|
className: (0, _clsx.clsx)(`${prefixCls}-icon`, mergedClassNames.icon),
|
|
3388
3387
|
style: mergedStyles.icon,
|
|
3389
|
-
description,
|
|
3388
|
+
description: description2,
|
|
3390
3389
|
icon: props.icon,
|
|
3391
3390
|
prefixCls,
|
|
3392
3391
|
type,
|
|
@@ -3400,10 +3399,10 @@ var require_Alert = __commonJS({
|
|
|
3400
3399
|
}, mergedTitle ? /* @__PURE__ */ React.createElement("div", {
|
|
3401
3400
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, mergedClassNames.title),
|
|
3402
3401
|
style: mergedStyles.title
|
|
3403
|
-
}, mergedTitle) : null,
|
|
3402
|
+
}, mergedTitle) : null, description2 ? /* @__PURE__ */ React.createElement("div", {
|
|
3404
3403
|
className: (0, _clsx.clsx)(`${prefixCls}-description`, mergedClassNames.description),
|
|
3405
3404
|
style: mergedStyles.description
|
|
3406
|
-
},
|
|
3405
|
+
}, description2) : null), action ? /* @__PURE__ */ React.createElement("div", {
|
|
3407
3406
|
className: (0, _clsx.clsx)(`${prefixCls}-actions`, mergedClassNames.actions),
|
|
3408
3407
|
style: mergedStyles.actions
|
|
3409
3408
|
}, action) : null, /* @__PURE__ */ React.createElement(CloseIconNode, {
|
|
@@ -3479,8 +3478,8 @@ var require_ErrorBoundary = __commonJS({
|
|
|
3479
3478
|
value: function render() {
|
|
3480
3479
|
const {
|
|
3481
3480
|
message,
|
|
3482
|
-
title,
|
|
3483
|
-
description,
|
|
3481
|
+
title: title2,
|
|
3482
|
+
description: description2,
|
|
3484
3483
|
id,
|
|
3485
3484
|
children
|
|
3486
3485
|
} = this.props;
|
|
@@ -3488,10 +3487,10 @@ var require_ErrorBoundary = __commonJS({
|
|
|
3488
3487
|
error,
|
|
3489
3488
|
info
|
|
3490
3489
|
} = this.state;
|
|
3491
|
-
const mergedTitle =
|
|
3490
|
+
const mergedTitle = title2 ?? message;
|
|
3492
3491
|
const componentStack = info?.componentStack || null;
|
|
3493
3492
|
const errorMessage = (0, _is.isNonNullable)(mergedTitle) ? mergedTitle : error?.toString();
|
|
3494
|
-
const errorDescription = (0, _is.isNonNullable)(
|
|
3493
|
+
const errorDescription = (0, _is.isNonNullable)(description2) ? description2 : componentStack;
|
|
3495
3494
|
if (error) {
|
|
3496
3495
|
return /* @__PURE__ */ React.createElement(_Alert.default, {
|
|
3497
3496
|
id,
|
|
@@ -5104,7 +5103,7 @@ var require_AnchorLink = __commonJS({
|
|
|
5104
5103
|
var AnchorLink = (props) => {
|
|
5105
5104
|
const {
|
|
5106
5105
|
href,
|
|
5107
|
-
title,
|
|
5106
|
+
title: title2,
|
|
5108
5107
|
prefixCls: customizePrefixCls,
|
|
5109
5108
|
children,
|
|
5110
5109
|
className,
|
|
@@ -5131,7 +5130,7 @@ var require_AnchorLink = __commonJS({
|
|
|
5131
5130
|
}, [href, targetOffset]);
|
|
5132
5131
|
const handleClick = (e) => {
|
|
5133
5132
|
onClick?.(e, {
|
|
5134
|
-
title,
|
|
5133
|
+
title: title2,
|
|
5135
5134
|
href
|
|
5136
5135
|
});
|
|
5137
5136
|
scrollTo?.(href, targetOffset);
|
|
@@ -5172,10 +5171,10 @@ var require_AnchorLink = __commonJS({
|
|
|
5172
5171
|
className: titleClassName,
|
|
5173
5172
|
style: mergedStyles?.itemTitle,
|
|
5174
5173
|
href,
|
|
5175
|
-
title: typeof
|
|
5174
|
+
title: typeof title2 === "string" ? title2 : void 0,
|
|
5176
5175
|
target,
|
|
5177
5176
|
onClick: handleClick
|
|
5178
|
-
},
|
|
5177
|
+
}, title2), direction !== "horizontal" ? children : null);
|
|
5179
5178
|
};
|
|
5180
5179
|
var _default = exports.default = AnchorLink;
|
|
5181
5180
|
}
|
|
@@ -12989,7 +12988,7 @@ var require_Skeleton = __commonJS({
|
|
|
12989
12988
|
styles,
|
|
12990
12989
|
children,
|
|
12991
12990
|
avatar = false,
|
|
12992
|
-
title = true,
|
|
12991
|
+
title: title2 = true,
|
|
12993
12992
|
paragraph = true,
|
|
12994
12993
|
active,
|
|
12995
12994
|
round
|
|
@@ -13007,7 +13006,7 @@ var require_Skeleton = __commonJS({
|
|
|
13007
13006
|
const mergedProps = {
|
|
13008
13007
|
...props,
|
|
13009
13008
|
avatar,
|
|
13010
|
-
title,
|
|
13009
|
+
title: title2,
|
|
13011
13010
|
paragraph
|
|
13012
13011
|
};
|
|
13013
13012
|
const contextStyleRoot = (0, _useMergeSemantic.useSemanticRootStyle)(contextStyle);
|
|
@@ -13021,7 +13020,7 @@ var require_Skeleton = __commonJS({
|
|
|
13021
13020
|
}));
|
|
13022
13021
|
if (loading || !("loading" in props)) {
|
|
13023
13022
|
const hasAvatar = !!avatar;
|
|
13024
|
-
const hasTitle = !!
|
|
13023
|
+
const hasTitle = !!title2;
|
|
13025
13024
|
const hasParagraph = !!paragraph;
|
|
13026
13025
|
let avatarNode;
|
|
13027
13026
|
if (hasAvatar) {
|
|
@@ -13047,7 +13046,7 @@ var require_Skeleton = __commonJS({
|
|
|
13047
13046
|
className: mergedClassNames.title,
|
|
13048
13047
|
prefixCls: `${prefixCls}-title`,
|
|
13049
13048
|
...getTitleBasicProps(hasAvatar, hasParagraph),
|
|
13050
|
-
...getComponentProps(
|
|
13049
|
+
...getComponentProps(title2),
|
|
13051
13050
|
style: mergedStyles.title
|
|
13052
13051
|
};
|
|
13053
13052
|
$title = /* @__PURE__ */ _react.default.createElement(_Title.default, {
|
|
@@ -14328,7 +14327,7 @@ var require_ConfirmDialog = __commonJS({
|
|
|
14328
14327
|
closable = false,
|
|
14329
14328
|
onConfirm,
|
|
14330
14329
|
styles,
|
|
14331
|
-
title,
|
|
14330
|
+
title: title2,
|
|
14332
14331
|
mask,
|
|
14333
14332
|
maskClosable,
|
|
14334
14333
|
okButtonProps,
|
|
@@ -14384,7 +14383,7 @@ var require_ConfirmDialog = __commonJS({
|
|
|
14384
14383
|
});
|
|
14385
14384
|
onConfirm?.(false);
|
|
14386
14385
|
},
|
|
14387
|
-
title,
|
|
14386
|
+
title: title2,
|
|
14388
14387
|
footer: null,
|
|
14389
14388
|
transitionName: (0, _motion.getTransitionName)(rootPrefixCls || "", "zoom", props.transitionName),
|
|
14390
14389
|
maskTransitionName: (0, _motion.getTransitionName)(rootPrefixCls || "", "fade", props.maskTransitionName),
|
|
@@ -14852,8 +14851,8 @@ var require_PurePanel2 = __commonJS({
|
|
|
14852
14851
|
icon,
|
|
14853
14852
|
type,
|
|
14854
14853
|
message,
|
|
14855
|
-
title,
|
|
14856
|
-
description,
|
|
14854
|
+
title: title2,
|
|
14855
|
+
description: description2,
|
|
14857
14856
|
btn,
|
|
14858
14857
|
actions,
|
|
14859
14858
|
closeIcon: _closeIcon,
|
|
@@ -14885,7 +14884,7 @@ var require_PurePanel2 = __commonJS({
|
|
|
14885
14884
|
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
14886
14885
|
});
|
|
14887
14886
|
}
|
|
14888
|
-
const mergedTitle =
|
|
14887
|
+
const mergedTitle = title2 ?? message;
|
|
14889
14888
|
const hasTitle = (0, _is.isReactRenderable)(mergedTitle);
|
|
14890
14889
|
const prefixCls = staticPrefixCls || getPrefixCls("notification");
|
|
14891
14890
|
const noticePrefixCls = `${prefixCls}-notice`;
|
|
@@ -14929,7 +14928,7 @@ var require_PurePanel2 = __commonJS({
|
|
|
14929
14928
|
closable: mergedClosable,
|
|
14930
14929
|
className: contextClassName,
|
|
14931
14930
|
title: hasTitle ? mergedTitle : null,
|
|
14932
|
-
description,
|
|
14931
|
+
description: description2,
|
|
14933
14932
|
icon: iconNode,
|
|
14934
14933
|
actions: mergedActions,
|
|
14935
14934
|
role,
|
|
@@ -15079,9 +15078,9 @@ var require_useNotification = __commonJS({
|
|
|
15079
15078
|
const contextClassName = notification?.className || {};
|
|
15080
15079
|
const noticePrefixCls = `${prefixCls}-notice`;
|
|
15081
15080
|
const {
|
|
15082
|
-
title,
|
|
15081
|
+
title: title2,
|
|
15083
15082
|
message,
|
|
15084
|
-
description,
|
|
15083
|
+
description: description2,
|
|
15085
15084
|
icon,
|
|
15086
15085
|
type,
|
|
15087
15086
|
btn,
|
|
@@ -15100,7 +15099,7 @@ var require_useNotification = __commonJS({
|
|
|
15100
15099
|
warning.deprecated(!(deprecatedName in config), deprecatedName, newName);
|
|
15101
15100
|
});
|
|
15102
15101
|
}
|
|
15103
|
-
const mergedTitle =
|
|
15102
|
+
const mergedTitle = title2 ?? message;
|
|
15104
15103
|
const hasTitle = (0, _is.isReactRenderable)(mergedTitle);
|
|
15105
15104
|
const mergedActions = actions ?? btn;
|
|
15106
15105
|
const realCloseIcon = (0, _PurePanel.getCloseIcon)(noticePrefixCls, (0, _util.getCloseIconConfig)(closeIcon, notificationConfig, notification));
|
|
@@ -15129,7 +15128,7 @@ var require_useNotification = __commonJS({
|
|
|
15129
15128
|
placement: notificationConfig?.placement ?? DEFAULT_PLACEMENT,
|
|
15130
15129
|
...restConfig,
|
|
15131
15130
|
title: hasTitle ? mergedTitle : null,
|
|
15132
|
-
description,
|
|
15131
|
+
description: description2,
|
|
15133
15132
|
icon: iconNode,
|
|
15134
15133
|
actions: mergedActions,
|
|
15135
15134
|
role,
|
|
@@ -16453,19 +16452,19 @@ var require_commonUtil = __commonJS({
|
|
|
16453
16452
|
function isComboNoValue(value) {
|
|
16454
16453
|
return !value && value !== 0;
|
|
16455
16454
|
}
|
|
16456
|
-
function isTitleType(
|
|
16457
|
-
return ["string", "number"].includes(typeof
|
|
16455
|
+
function isTitleType(title2) {
|
|
16456
|
+
return ["string", "number"].includes(typeof title2);
|
|
16458
16457
|
}
|
|
16459
16458
|
function getTitle(item) {
|
|
16460
|
-
let
|
|
16459
|
+
let title2 = void 0;
|
|
16461
16460
|
if (item) {
|
|
16462
16461
|
if (isTitleType(item.title)) {
|
|
16463
|
-
|
|
16462
|
+
title2 = item.title.toString();
|
|
16464
16463
|
} else if (isTitleType(item.label)) {
|
|
16465
|
-
|
|
16464
|
+
title2 = item.label.toString();
|
|
16466
16465
|
}
|
|
16467
16466
|
}
|
|
16468
|
-
return
|
|
16467
|
+
return title2;
|
|
16469
16468
|
}
|
|
16470
16469
|
}
|
|
16471
16470
|
});
|
|
@@ -20547,7 +20546,7 @@ var require_OptionList = __commonJS({
|
|
|
20547
20546
|
}
|
|
20548
20547
|
const {
|
|
20549
20548
|
disabled,
|
|
20550
|
-
title,
|
|
20549
|
+
title: title2,
|
|
20551
20550
|
children,
|
|
20552
20551
|
style,
|
|
20553
20552
|
className,
|
|
@@ -20567,8 +20566,8 @@ var require_OptionList = __commonJS({
|
|
|
20567
20566
|
const iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === "function" || selected;
|
|
20568
20567
|
const content = typeof mergedLabel === "number" ? mergedLabel : mergedLabel || value;
|
|
20569
20568
|
let optionTitle = isTitleType(content) ? content.toString() : void 0;
|
|
20570
|
-
if (
|
|
20571
|
-
optionTitle =
|
|
20569
|
+
if (title2 !== void 0) {
|
|
20570
|
+
optionTitle = title2;
|
|
20572
20571
|
}
|
|
20573
20572
|
return /* @__PURE__ */ React.createElement("div", _extends({}, (0, _util.pickAttrs)(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
|
|
20574
20573
|
"aria-selected": virtual ? void 0 : isAriaSelected(value),
|
|
@@ -21965,7 +21964,7 @@ var require_empty2 = __commonJS({
|
|
|
21965
21964
|
rootClassName,
|
|
21966
21965
|
prefixCls: customizePrefixCls,
|
|
21967
21966
|
image,
|
|
21968
|
-
description,
|
|
21967
|
+
description: description2,
|
|
21969
21968
|
children,
|
|
21970
21969
|
imageStyle,
|
|
21971
21970
|
style,
|
|
@@ -21990,7 +21989,7 @@ var require_empty2 = __commonJS({
|
|
|
21990
21989
|
props
|
|
21991
21990
|
});
|
|
21992
21991
|
const [locale] = (0, _locale.useLocale)("Empty");
|
|
21993
|
-
const des = typeof
|
|
21992
|
+
const des = typeof description2 !== "undefined" ? description2 : locale?.description;
|
|
21994
21993
|
const alt = typeof des === "string" ? des : "empty";
|
|
21995
21994
|
const mergedImage = image ?? contextImage ?? defaultEmptyImg;
|
|
21996
21995
|
let imageNode = null;
|
|
@@ -25261,7 +25260,7 @@ var require_PurePanel4 = __commonJS({
|
|
|
25261
25260
|
prefixCls: customizePrefixCls,
|
|
25262
25261
|
className,
|
|
25263
25262
|
placement = "top",
|
|
25264
|
-
title,
|
|
25263
|
+
title: title2,
|
|
25265
25264
|
color,
|
|
25266
25265
|
overlayInnerStyle,
|
|
25267
25266
|
classNames,
|
|
@@ -25304,7 +25303,7 @@ var require_PurePanel4 = __commonJS({
|
|
|
25304
25303
|
prefixCls,
|
|
25305
25304
|
classNames: mergedClassNames,
|
|
25306
25305
|
styles: mergedStyles
|
|
25307
|
-
},
|
|
25306
|
+
}, title2));
|
|
25308
25307
|
};
|
|
25309
25308
|
var _default = exports.default = PurePanel;
|
|
25310
25309
|
}
|
|
@@ -25354,7 +25353,7 @@ var require_tooltip = __commonJS({
|
|
|
25354
25353
|
arrow: tooltipArrow,
|
|
25355
25354
|
destroyTooltipOnHide,
|
|
25356
25355
|
destroyOnHidden,
|
|
25357
|
-
title,
|
|
25356
|
+
title: title2,
|
|
25358
25357
|
overlay,
|
|
25359
25358
|
trigger,
|
|
25360
25359
|
builtinPlacements,
|
|
@@ -25417,7 +25416,7 @@ var require_tooltip = __commonJS({
|
|
|
25417
25416
|
process.env.NODE_ENV !== "production" ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.") : void 0;
|
|
25418
25417
|
}
|
|
25419
25418
|
const [open, setOpen] = (0, _util.useControlledState)(props.defaultOpen ?? false, props.open);
|
|
25420
|
-
const noTitle = !
|
|
25419
|
+
const noTitle = !title2 && !overlay && title2 !== 0;
|
|
25421
25420
|
const onInternalOpenChange = (vis) => {
|
|
25422
25421
|
setOpen(noTitle ? false : vis);
|
|
25423
25422
|
if (!noTitle && onOpenChange) {
|
|
@@ -25435,11 +25434,11 @@ var require_tooltip = __commonJS({
|
|
|
25435
25434
|
});
|
|
25436
25435
|
}, [mergedArrow, builtinPlacements, token, mergedShowArrow, autoAdjustOverflow]);
|
|
25437
25436
|
const memoOverlay = React.useMemo(() => {
|
|
25438
|
-
if (
|
|
25439
|
-
return
|
|
25437
|
+
if (title2 === 0) {
|
|
25438
|
+
return title2;
|
|
25440
25439
|
}
|
|
25441
|
-
return overlay ||
|
|
25442
|
-
}, [overlay,
|
|
25440
|
+
return overlay || title2 || "";
|
|
25441
|
+
}, [overlay, title2]);
|
|
25443
25442
|
const memoOverlayWrapper = /* @__PURE__ */ React.createElement(_ContextIsolator.default, {
|
|
25444
25443
|
space: true,
|
|
25445
25444
|
form: true
|
|
@@ -25738,19 +25737,19 @@ var require_PurePanel5 = __commonJS({
|
|
|
25738
25737
|
var _style = _interopRequireDefault(require_style19());
|
|
25739
25738
|
var Overlay = (props) => {
|
|
25740
25739
|
const {
|
|
25741
|
-
title,
|
|
25740
|
+
title: title2,
|
|
25742
25741
|
content,
|
|
25743
25742
|
prefixCls,
|
|
25744
25743
|
classNames,
|
|
25745
25744
|
styles
|
|
25746
25745
|
} = props;
|
|
25747
|
-
if (!(0, _is.isReactRenderable)(
|
|
25746
|
+
if (!(0, _is.isReactRenderable)(title2) && !(0, _is.isReactRenderable)(content)) {
|
|
25748
25747
|
return null;
|
|
25749
25748
|
}
|
|
25750
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (0, _is.isReactRenderable)(
|
|
25749
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (0, _is.isReactRenderable)(title2) && /* @__PURE__ */ React.createElement("div", {
|
|
25751
25750
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, classNames?.title),
|
|
25752
25751
|
style: styles?.title
|
|
25753
|
-
},
|
|
25752
|
+
}, title2), (0, _is.isReactRenderable)(content) && /* @__PURE__ */ React.createElement("div", {
|
|
25754
25753
|
className: (0, _clsx.clsx)(`${prefixCls}-content`, classNames?.content),
|
|
25755
25754
|
style: styles?.content
|
|
25756
25755
|
}, content));
|
|
@@ -25763,13 +25762,13 @@ var require_PurePanel5 = __commonJS({
|
|
|
25763
25762
|
className,
|
|
25764
25763
|
style,
|
|
25765
25764
|
placement = "top",
|
|
25766
|
-
title,
|
|
25765
|
+
title: title2,
|
|
25767
25766
|
content,
|
|
25768
25767
|
children,
|
|
25769
25768
|
classNames,
|
|
25770
25769
|
styles
|
|
25771
25770
|
} = props;
|
|
25772
|
-
const titleNode = (0, _getRenderPropValue.getRenderPropValue)(
|
|
25771
|
+
const titleNode = (0, _getRenderPropValue.getRenderPropValue)(title2);
|
|
25773
25772
|
const contentNode = (0, _getRenderPropValue.getRenderPropValue)(content);
|
|
25774
25773
|
const mergedProps = {
|
|
25775
25774
|
...props,
|
|
@@ -25848,7 +25847,7 @@ var require_popover = __commonJS({
|
|
|
25848
25847
|
var InternalPopover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
25849
25848
|
const {
|
|
25850
25849
|
prefixCls: customizePrefixCls,
|
|
25851
|
-
title,
|
|
25850
|
+
title: title2,
|
|
25852
25851
|
content,
|
|
25853
25852
|
overlayClassName,
|
|
25854
25853
|
placement = "top",
|
|
@@ -25907,7 +25906,7 @@ var require_popover = __commonJS({
|
|
|
25907
25906
|
setOpen(value);
|
|
25908
25907
|
onOpenChange?.(value);
|
|
25909
25908
|
};
|
|
25910
|
-
const titleNode = (0, _getRenderPropValue.getRenderPropValue)(
|
|
25909
|
+
const titleNode = (0, _getRenderPropValue.getRenderPropValue)(title2);
|
|
25911
25910
|
const contentNode = (0, _getRenderPropValue.getRenderPropValue)(content);
|
|
25912
25911
|
return /* @__PURE__ */ React.createElement(_tooltip.default, {
|
|
25913
25912
|
unique: false,
|
|
@@ -26495,7 +26494,7 @@ var require_ScrollNumber = __commonJS({
|
|
|
26495
26494
|
className,
|
|
26496
26495
|
motionClassName,
|
|
26497
26496
|
style,
|
|
26498
|
-
title,
|
|
26497
|
+
title: title2,
|
|
26499
26498
|
show,
|
|
26500
26499
|
component: Component = "sup",
|
|
26501
26500
|
children,
|
|
@@ -26510,7 +26509,7 @@ var require_ScrollNumber = __commonJS({
|
|
|
26510
26509
|
"data-show": show,
|
|
26511
26510
|
style,
|
|
26512
26511
|
className: (0, _clsx.clsx)(prefixCls, className, motionClassName),
|
|
26513
|
-
title
|
|
26512
|
+
title: title2
|
|
26514
26513
|
};
|
|
26515
26514
|
let numberNodes = count;
|
|
26516
26515
|
if (count && Number(count) % 1 === 0) {
|
|
@@ -26919,7 +26918,7 @@ var require_Badge = __commonJS({
|
|
|
26919
26918
|
overflowCount = 99,
|
|
26920
26919
|
dot = false,
|
|
26921
26920
|
size = "medium",
|
|
26922
|
-
title,
|
|
26921
|
+
title: title2,
|
|
26923
26922
|
offset,
|
|
26924
26923
|
style,
|
|
26925
26924
|
className,
|
|
@@ -26998,7 +26997,7 @@ var require_Badge = __commonJS({
|
|
|
26998
26997
|
isDotRef.current = showAsDot;
|
|
26999
26998
|
}
|
|
27000
26999
|
const fallbackTitleNode = (0, _is.isString)(livingCount) || (0, _is.isNumber)(livingCount) ? livingCount : void 0;
|
|
27001
|
-
const titleNode =
|
|
27000
|
+
const titleNode = title2 === null || title2 === false ? void 0 : title2 ?? fallbackTitleNode;
|
|
27002
27001
|
const showStatusTextNode = !isHidden && (text === 0 ? showZero : !!text && text !== true);
|
|
27003
27002
|
const statusTextNode = !showStatusTextNode ? null : /* @__PURE__ */ React.createElement("span", {
|
|
27004
27003
|
className: `${prefixCls}-status-text`
|
|
@@ -28963,7 +28962,7 @@ var require_MenuItem = __commonJS({
|
|
|
28963
28962
|
var LegacyMenuItem = class extends React.Component {
|
|
28964
28963
|
render() {
|
|
28965
28964
|
const {
|
|
28966
|
-
title,
|
|
28965
|
+
title: title2,
|
|
28967
28966
|
attribute,
|
|
28968
28967
|
elementRef,
|
|
28969
28968
|
...restProps
|
|
@@ -28971,7 +28970,7 @@ var require_MenuItem = __commonJS({
|
|
|
28971
28970
|
const passedProps = (0, _util.omit)(restProps, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
|
|
28972
28971
|
(0, _util.warning)(!attribute, "`attribute` of Menu.Item is deprecated. Please pass attribute directly.");
|
|
28973
28972
|
return /* @__PURE__ */ React.createElement(_overflow.default.Item, _extends({}, attribute, {
|
|
28974
|
-
title: typeof
|
|
28973
|
+
title: typeof title2 === "string" ? title2 : void 0
|
|
28975
28974
|
}, passedProps, {
|
|
28976
28975
|
ref: elementRef
|
|
28977
28976
|
}));
|
|
@@ -29661,7 +29660,7 @@ var require_SubMenu = __commonJS({
|
|
|
29661
29660
|
className,
|
|
29662
29661
|
styles,
|
|
29663
29662
|
classNames: menuClassNames,
|
|
29664
|
-
title,
|
|
29663
|
+
title: title2,
|
|
29665
29664
|
eventKey,
|
|
29666
29665
|
warnKey,
|
|
29667
29666
|
disabled,
|
|
@@ -29800,7 +29799,7 @@ var require_SubMenu = __commonJS({
|
|
|
29800
29799
|
className: `${subMenuPrefixCls}-title`,
|
|
29801
29800
|
tabIndex: mergedDisabled ? null : -1,
|
|
29802
29801
|
ref: elementRef,
|
|
29803
|
-
title: typeof
|
|
29802
|
+
title: typeof title2 === "string" ? title2 : null,
|
|
29804
29803
|
"data-menu-id": overflowDisabled && domDataId ? null : domDataId,
|
|
29805
29804
|
"aria-expanded": open,
|
|
29806
29805
|
"aria-haspopup": true,
|
|
@@ -29808,7 +29807,7 @@ var require_SubMenu = __commonJS({
|
|
|
29808
29807
|
"aria-disabled": mergedDisabled,
|
|
29809
29808
|
onClick: onInternalTitleClick,
|
|
29810
29809
|
onFocus: onInternalFocus
|
|
29811
|
-
}, activeProps),
|
|
29810
|
+
}, activeProps), title2, expandIconNode);
|
|
29812
29811
|
const triggerModeRef = React.useRef(mode);
|
|
29813
29812
|
if (mode !== "inline" && connectedPath.length > 1) {
|
|
29814
29813
|
triggerModeRef.current = "vertical";
|
|
@@ -30021,7 +30020,7 @@ var require_MenuItemGroup = __commonJS({
|
|
|
30021
30020
|
var InternalMenuItemGroup = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
30022
30021
|
const {
|
|
30023
30022
|
className,
|
|
30024
|
-
title,
|
|
30023
|
+
title: title2,
|
|
30025
30024
|
eventKey,
|
|
30026
30025
|
children,
|
|
30027
30026
|
...restProps
|
|
@@ -30042,8 +30041,8 @@ var require_MenuItemGroup = __commonJS({
|
|
|
30042
30041
|
role: "presentation",
|
|
30043
30042
|
className: (0, _clsx.clsx)(`${groupPrefixCls}-title`, menuClassNames?.listTitle),
|
|
30044
30043
|
style: styles?.listTitle,
|
|
30045
|
-
title: typeof
|
|
30046
|
-
},
|
|
30044
|
+
title: typeof title2 === "string" ? title2 : void 0
|
|
30045
|
+
}, title2), /* @__PURE__ */ React.createElement("ul", {
|
|
30047
30046
|
role: "group",
|
|
30048
30047
|
className: (0, _clsx.clsx)(`${groupPrefixCls}-list`, menuClassNames?.list),
|
|
30049
30048
|
style: styles?.list
|
|
@@ -31351,7 +31350,7 @@ var require_MenuItem2 = __commonJS({
|
|
|
31351
31350
|
className,
|
|
31352
31351
|
children,
|
|
31353
31352
|
icon,
|
|
31354
|
-
title,
|
|
31353
|
+
title: title2,
|
|
31355
31354
|
danger,
|
|
31356
31355
|
extra
|
|
31357
31356
|
} = props;
|
|
@@ -31390,10 +31389,10 @@ var require_MenuItem2 = __commonJS({
|
|
|
31390
31389
|
}
|
|
31391
31390
|
return wrapNode;
|
|
31392
31391
|
};
|
|
31393
|
-
let tooltipTitle =
|
|
31394
|
-
if (typeof
|
|
31392
|
+
let tooltipTitle = title2;
|
|
31393
|
+
if (typeof title2 === "undefined") {
|
|
31395
31394
|
tooltipTitle = firstLevel ? children : "";
|
|
31396
|
-
} else if (
|
|
31395
|
+
} else if (title2 === false) {
|
|
31397
31396
|
tooltipTitle = "";
|
|
31398
31397
|
}
|
|
31399
31398
|
const tooltipConfig = tooltip === false ? void 0 : tooltip;
|
|
@@ -31423,7 +31422,7 @@ var require_MenuItem2 = __commonJS({
|
|
|
31423
31422
|
...firstLevel ? styles?.item : styles?.subMenu?.item,
|
|
31424
31423
|
...props.style
|
|
31425
31424
|
},
|
|
31426
|
-
title: typeof
|
|
31425
|
+
title: typeof title2 === "string" ? title2 : void 0,
|
|
31427
31426
|
itemData: props?.itemData ?? {
|
|
31428
31427
|
...props,
|
|
31429
31428
|
key: props.eventKey
|
|
@@ -32641,7 +32640,7 @@ var require_SubMenu2 = __commonJS({
|
|
|
32641
32640
|
const {
|
|
32642
32641
|
popupClassName,
|
|
32643
32642
|
icon,
|
|
32644
|
-
title,
|
|
32643
|
+
title: title2,
|
|
32645
32644
|
theme: customTheme
|
|
32646
32645
|
} = props;
|
|
32647
32646
|
const context = React.useContext(_MenuContext.default);
|
|
@@ -32655,22 +32654,22 @@ var require_SubMenu2 = __commonJS({
|
|
|
32655
32654
|
const parentPath = (0, _menu.useFullPath)();
|
|
32656
32655
|
let titleNode;
|
|
32657
32656
|
if (!icon) {
|
|
32658
|
-
titleNode = inlineCollapsed && !parentPath.length &&
|
|
32657
|
+
titleNode = inlineCollapsed && !parentPath.length && title2 && typeof title2 === "string" ? /* @__PURE__ */ React.createElement("div", {
|
|
32659
32658
|
className: `${prefixCls}-inline-collapsed-noicon`
|
|
32660
|
-
},
|
|
32659
|
+
}, title2.charAt(0)) : /* @__PURE__ */ React.createElement("span", {
|
|
32661
32660
|
className: `${prefixCls}-title-content`
|
|
32662
|
-
},
|
|
32661
|
+
}, title2);
|
|
32663
32662
|
} else {
|
|
32664
|
-
const titleIsSpan = /* @__PURE__ */ React.isValidElement(
|
|
32663
|
+
const titleIsSpan = /* @__PURE__ */ React.isValidElement(title2) && title2.type === "span";
|
|
32665
32664
|
titleNode = /* @__PURE__ */ React.createElement(React.Fragment, null, (0, _reactNode.cloneElement)(icon, (oriProps) => ({
|
|
32666
32665
|
className: (0, _clsx.clsx)(oriProps.className, `${prefixCls}-item-icon`, classNames?.itemIcon),
|
|
32667
32666
|
style: {
|
|
32668
32667
|
...oriProps.style,
|
|
32669
32668
|
...styles?.itemIcon
|
|
32670
32669
|
}
|
|
32671
|
-
})), titleIsSpan ?
|
|
32670
|
+
})), titleIsSpan ? title2 : /* @__PURE__ */ React.createElement("span", {
|
|
32672
32671
|
className: `${prefixCls}-title-content`
|
|
32673
|
-
},
|
|
32672
|
+
}, title2));
|
|
32674
32673
|
}
|
|
32675
32674
|
const contextValue = React.useMemo(() => ({
|
|
32676
32675
|
...context,
|
|
@@ -33701,12 +33700,12 @@ var require_BreadcrumbItem = __commonJS({
|
|
|
33701
33700
|
...menuProps,
|
|
33702
33701
|
items: items?.map(({
|
|
33703
33702
|
key,
|
|
33704
|
-
title,
|
|
33703
|
+
title: title2,
|
|
33705
33704
|
label,
|
|
33706
33705
|
path,
|
|
33707
33706
|
...itemProps
|
|
33708
33707
|
}, index) => {
|
|
33709
|
-
let mergedLabel = label ??
|
|
33708
|
+
let mergedLabel = label ?? title2;
|
|
33710
33709
|
if (path) {
|
|
33711
33710
|
mergedLabel = /* @__PURE__ */ React.createElement("a", {
|
|
33712
33711
|
href: `${href}${path}`
|
|
@@ -37445,7 +37444,7 @@ var require_PanelBody = __commonJS({
|
|
|
37445
37444
|
rangeStart = (0, _dateUtil.isSame)(generateConfig, locale, currentDate, hoverStart, type);
|
|
37446
37445
|
rangeEnd = (0, _dateUtil.isSame)(generateConfig, locale, currentDate, hoverEnd, type);
|
|
37447
37446
|
}
|
|
37448
|
-
const
|
|
37447
|
+
const title2 = titleFormat ? (0, _dateUtil.formatValue)(currentDate, {
|
|
37449
37448
|
locale,
|
|
37450
37449
|
format: titleFormat,
|
|
37451
37450
|
generateConfig
|
|
@@ -37455,7 +37454,7 @@ var require_PanelBody = __commonJS({
|
|
|
37455
37454
|
}, getCellText(currentDate));
|
|
37456
37455
|
rowNode.push(/* @__PURE__ */ React.createElement("td", {
|
|
37457
37456
|
key: col,
|
|
37458
|
-
title,
|
|
37457
|
+
title: title2,
|
|
37459
37458
|
className: (0, _clsx.clsx)(cellPrefixCls, classNames.item, {
|
|
37460
37459
|
[`${cellPrefixCls}-disabled`]: disabled,
|
|
37461
37460
|
[`${cellPrefixCls}-hover`]: (hoverValue || []).some((date) => (0, _dateUtil.isSame)(generateConfig, locale, currentDate, date, type)),
|
|
@@ -42326,7 +42325,7 @@ var require_lib23 = __commonJS({
|
|
|
42326
42325
|
disabled,
|
|
42327
42326
|
defaultChecked = false,
|
|
42328
42327
|
type = "checkbox",
|
|
42329
|
-
title,
|
|
42328
|
+
title: title2,
|
|
42330
42329
|
onChange,
|
|
42331
42330
|
...inputProps
|
|
42332
42331
|
} = props;
|
|
@@ -42371,7 +42370,7 @@ var require_lib23 = __commonJS({
|
|
|
42371
42370
|
};
|
|
42372
42371
|
return /* @__PURE__ */ React.createElement("span", {
|
|
42373
42372
|
className: classString,
|
|
42374
|
-
title,
|
|
42373
|
+
title: title2,
|
|
42375
42374
|
style,
|
|
42376
42375
|
ref: holderRef
|
|
42377
42376
|
}, /* @__PURE__ */ React.createElement("input", _extends({}, inputProps, {
|
|
@@ -43006,7 +43005,7 @@ var require_radio = __commonJS({
|
|
|
43006
43005
|
rootClassName,
|
|
43007
43006
|
children,
|
|
43008
43007
|
style,
|
|
43009
|
-
title,
|
|
43008
|
+
title: title2,
|
|
43010
43009
|
classNames,
|
|
43011
43010
|
styles,
|
|
43012
43011
|
checked,
|
|
@@ -43059,7 +43058,7 @@ var require_radio = __commonJS({
|
|
|
43059
43058
|
style: mergedStyles.root,
|
|
43060
43059
|
onMouseEnter: props.onMouseEnter,
|
|
43061
43060
|
onMouseLeave: props.onMouseLeave,
|
|
43062
|
-
title,
|
|
43061
|
+
title: title2,
|
|
43063
43062
|
onClick: onLabelClick
|
|
43064
43063
|
}, /* @__PURE__ */ React.createElement(_checkbox.default, {
|
|
43065
43064
|
...radioProps,
|
|
@@ -50275,7 +50274,7 @@ var require_Card = __commonJS({
|
|
|
50275
50274
|
extra,
|
|
50276
50275
|
headStyle = {},
|
|
50277
50276
|
bodyStyle = {},
|
|
50278
|
-
title,
|
|
50277
|
+
title: title2,
|
|
50279
50278
|
loading,
|
|
50280
50279
|
bordered,
|
|
50281
50280
|
variant: customVariant,
|
|
@@ -50360,7 +50359,7 @@ var require_Card = __commonJS({
|
|
|
50360
50359
|
...item
|
|
50361
50360
|
}))
|
|
50362
50361
|
}) : null;
|
|
50363
|
-
if (
|
|
50362
|
+
if (title2 || extra || tabs) {
|
|
50364
50363
|
const headClasses = (0, _clsx.clsx)(`${prefixCls}-head`, mergedClassNames.header);
|
|
50365
50364
|
const titleClasses = (0, _clsx.clsx)(`${prefixCls}-head-title`, mergedClassNames.title);
|
|
50366
50365
|
const extraClasses = (0, _clsx.clsx)(`${prefixCls}-extra`, mergedClassNames.extra);
|
|
@@ -50373,10 +50372,10 @@ var require_Card = __commonJS({
|
|
|
50373
50372
|
style: mergedHeadStyle
|
|
50374
50373
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
50375
50374
|
className: `${prefixCls}-head-wrapper`
|
|
50376
|
-
},
|
|
50375
|
+
}, title2 && /* @__PURE__ */ React.createElement("div", {
|
|
50377
50376
|
className: titleClasses,
|
|
50378
50377
|
style: mergedStyles.title
|
|
50379
|
-
},
|
|
50378
|
+
}, title2), extra && /* @__PURE__ */ React.createElement("div", {
|
|
50380
50379
|
className: extraClasses,
|
|
50381
50380
|
style: mergedStyles.extra
|
|
50382
50381
|
}, extra)), tabs);
|
|
@@ -50448,8 +50447,8 @@ var require_CardMeta = __commonJS({
|
|
|
50448
50447
|
prefixCls: customizePrefixCls,
|
|
50449
50448
|
className,
|
|
50450
50449
|
avatar,
|
|
50451
|
-
title,
|
|
50452
|
-
description,
|
|
50450
|
+
title: title2,
|
|
50451
|
+
description: description2,
|
|
50453
50452
|
style,
|
|
50454
50453
|
classNames: cardMetaClassNames,
|
|
50455
50454
|
styles,
|
|
@@ -50481,14 +50480,14 @@ var require_CardMeta = __commonJS({
|
|
|
50481
50480
|
className: avatarClassNames,
|
|
50482
50481
|
style: mergedStyles.avatar
|
|
50483
50482
|
}, avatar) : null;
|
|
50484
|
-
const titleDom =
|
|
50483
|
+
const titleDom = title2 ? /* @__PURE__ */ React.createElement("div", {
|
|
50485
50484
|
className: titleClassNames,
|
|
50486
50485
|
style: mergedStyles.title
|
|
50487
|
-
},
|
|
50488
|
-
const descriptionDom =
|
|
50486
|
+
}, title2) : null;
|
|
50487
|
+
const descriptionDom = description2 ? /* @__PURE__ */ React.createElement("div", {
|
|
50489
50488
|
className: descriptionClassNames,
|
|
50490
50489
|
style: mergedStyles.description
|
|
50491
|
-
},
|
|
50490
|
+
}, description2) : null;
|
|
50492
50491
|
const MetaDetail = titleDom || descriptionDom ? /* @__PURE__ */ React.createElement("div", {
|
|
50493
50492
|
className: sectionClassNames,
|
|
50494
50493
|
style: mergedStyles.section
|
|
@@ -53958,12 +53957,12 @@ var require_treeUtil2 = __commonJS({
|
|
|
53958
53957
|
}
|
|
53959
53958
|
function fillFieldNames(fieldNames) {
|
|
53960
53959
|
const {
|
|
53961
|
-
title,
|
|
53960
|
+
title: title2,
|
|
53962
53961
|
_title,
|
|
53963
53962
|
key,
|
|
53964
53963
|
children
|
|
53965
53964
|
} = fieldNames || {};
|
|
53966
|
-
const mergedTitle =
|
|
53965
|
+
const mergedTitle = title2 || "title";
|
|
53967
53966
|
return {
|
|
53968
53967
|
title: mergedTitle,
|
|
53969
53968
|
_title: _title || [mergedTitle],
|
|
@@ -54503,7 +54502,7 @@ var require_TreeNode = __commonJS({
|
|
|
54503
54502
|
}, [context.dropPosition, context.dropLevelOffset, context.indent, context.prefixCls, context.direction, context.draggable, context.dragOverNodeKey, context.dropIndicatorRender]);
|
|
54504
54503
|
const selectorNode = _react.default.useMemo(() => {
|
|
54505
54504
|
const {
|
|
54506
|
-
title = defaultTitle
|
|
54505
|
+
title: title2 = defaultTitle
|
|
54507
54506
|
} = props;
|
|
54508
54507
|
const wrapClass = `${context.prefixCls}-node-content-wrapper`;
|
|
54509
54508
|
let $icon;
|
|
@@ -54517,16 +54516,16 @@ var require_TreeNode = __commonJS({
|
|
|
54517
54516
|
$icon = iconNode;
|
|
54518
54517
|
}
|
|
54519
54518
|
let titleNode;
|
|
54520
|
-
if (typeof
|
|
54521
|
-
titleNode =
|
|
54519
|
+
if (typeof title2 === "function") {
|
|
54520
|
+
titleNode = title2(data);
|
|
54522
54521
|
} else if (context.titleRender) {
|
|
54523
54522
|
titleNode = context.titleRender(data);
|
|
54524
54523
|
} else {
|
|
54525
|
-
titleNode =
|
|
54524
|
+
titleNode = title2;
|
|
54526
54525
|
}
|
|
54527
54526
|
return /* @__PURE__ */ _react.default.createElement("span", {
|
|
54528
54527
|
ref: selectHandleRef,
|
|
54529
|
-
title: typeof
|
|
54528
|
+
title: typeof title2 === "string" ? title2 : "",
|
|
54530
54529
|
className: (0, _clsx.clsx)(wrapClass, `${wrapClass}-${nodeState || "normal"}`, {
|
|
54531
54530
|
[`${context.prefixCls}-node-selected`]: !isDisabled && (selected || dragNodeHighlight)
|
|
54532
54531
|
}),
|
|
@@ -54768,7 +54767,7 @@ var require_MotionTreeNode = __commonJS({
|
|
|
54768
54767
|
data: {
|
|
54769
54768
|
...restProps
|
|
54770
54769
|
},
|
|
54771
|
-
title,
|
|
54770
|
+
title: title2,
|
|
54772
54771
|
key,
|
|
54773
54772
|
isStart,
|
|
54774
54773
|
isEnd
|
|
@@ -54776,7 +54775,7 @@ var require_MotionTreeNode = __commonJS({
|
|
|
54776
54775
|
delete restProps.children;
|
|
54777
54776
|
const treeNodeProps = (0, _treeUtil.getTreeNodeProps)(key, treeNodeRequiredProps);
|
|
54778
54777
|
return /* @__PURE__ */ React.createElement(_TreeNode.default, _extends({}, restProps, treeNodeProps, {
|
|
54779
|
-
title,
|
|
54778
|
+
title: title2,
|
|
54780
54779
|
active,
|
|
54781
54780
|
data: treeNode.data,
|
|
54782
54781
|
key,
|
|
@@ -55087,7 +55086,7 @@ var require_NodeList = __commonJS({
|
|
|
55087
55086
|
data: {
|
|
55088
55087
|
...restProps
|
|
55089
55088
|
},
|
|
55090
|
-
title,
|
|
55089
|
+
title: title2,
|
|
55091
55090
|
key,
|
|
55092
55091
|
isStart,
|
|
55093
55092
|
isEnd
|
|
@@ -55097,7 +55096,7 @@ var require_NodeList = __commonJS({
|
|
|
55097
55096
|
delete restProps.children;
|
|
55098
55097
|
const treeNodeProps = (0, _treeUtil.getTreeNodeProps)(mergedKey, treeNodeRequiredProps);
|
|
55099
55098
|
return /* @__PURE__ */ React.createElement(_MotionTreeNode.default, _extends({}, restProps, treeNodeProps, {
|
|
55100
|
-
title,
|
|
55099
|
+
title: title2,
|
|
55101
55100
|
active: !!activeItem && key === activeItem.key,
|
|
55102
55101
|
pos,
|
|
55103
55102
|
data: treeNode.data,
|
|
@@ -57471,11 +57470,11 @@ var require_Column = __commonJS({
|
|
|
57471
57470
|
onSelect(fullPath, isMergedLeaf);
|
|
57472
57471
|
}
|
|
57473
57472
|
};
|
|
57474
|
-
let
|
|
57473
|
+
let title2;
|
|
57475
57474
|
if (typeof option.title === "string") {
|
|
57476
|
-
|
|
57475
|
+
title2 = option.title;
|
|
57477
57476
|
} else if (typeof label === "string") {
|
|
57478
|
-
|
|
57477
|
+
title2 = label;
|
|
57479
57478
|
}
|
|
57480
57479
|
return /* @__PURE__ */ React.createElement("li", _extends({
|
|
57481
57480
|
key: fullPathKey
|
|
@@ -57491,7 +57490,7 @@ var require_Column = __commonJS({
|
|
|
57491
57490
|
...styles?.popup?.listItem
|
|
57492
57491
|
},
|
|
57493
57492
|
role: "menuitemcheckbox",
|
|
57494
|
-
title,
|
|
57493
|
+
title: title2,
|
|
57495
57494
|
"aria-checked": checked,
|
|
57496
57495
|
"data-path-key": fullPathKey,
|
|
57497
57496
|
onClick: () => {
|
|
@@ -60666,7 +60665,7 @@ var require_lib28 = __commonJS({
|
|
|
60666
60665
|
disabled,
|
|
60667
60666
|
checked,
|
|
60668
60667
|
label,
|
|
60669
|
-
title,
|
|
60668
|
+
title: title2,
|
|
60670
60669
|
value,
|
|
60671
60670
|
name,
|
|
60672
60671
|
onChange,
|
|
@@ -60702,7 +60701,7 @@ var require_lib28 = __commonJS({
|
|
|
60702
60701
|
onKeyUp
|
|
60703
60702
|
}), /* @__PURE__ */ React.createElement("div", {
|
|
60704
60703
|
className: (0, _clsx.clsx)(`${prefixCls}-item-label`, segmentedClassNames?.label),
|
|
60705
|
-
title,
|
|
60704
|
+
title: title2,
|
|
60706
60705
|
style: styles?.label
|
|
60707
60706
|
}, label));
|
|
60708
60707
|
return itemRender(itemContent, {
|
|
@@ -69828,7 +69827,7 @@ var require_descriptions = __commonJS({
|
|
|
69828
69827
|
var Descriptions = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
69829
69828
|
const {
|
|
69830
69829
|
prefixCls: customizePrefixCls,
|
|
69831
|
-
title,
|
|
69830
|
+
title: title2,
|
|
69832
69831
|
extra,
|
|
69833
69832
|
column,
|
|
69834
69833
|
colon = true,
|
|
@@ -69912,13 +69911,13 @@ var require_descriptions = __commonJS({
|
|
|
69912
69911
|
}, className, rootClassName, hashId, cssVarCls),
|
|
69913
69912
|
style: mergedStyles.root,
|
|
69914
69913
|
...restProps
|
|
69915
|
-
}, (
|
|
69914
|
+
}, (title2 || extra) && /* @__PURE__ */ React.createElement("div", {
|
|
69916
69915
|
className: (0, _clsx.clsx)(`${prefixCls}-header`, mergedClassNames.header),
|
|
69917
69916
|
style: mergedStyles.header
|
|
69918
|
-
},
|
|
69917
|
+
}, title2 && /* @__PURE__ */ React.createElement("div", {
|
|
69919
69918
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, mergedClassNames.title),
|
|
69920
69919
|
style: mergedStyles.title
|
|
69921
|
-
},
|
|
69920
|
+
}, title2), extra && /* @__PURE__ */ React.createElement("div", {
|
|
69922
69921
|
className: (0, _clsx.clsx)(`${prefixCls}-extra`, mergedClassNames.extra),
|
|
69923
69922
|
style: mergedStyles.extra
|
|
69924
69923
|
}, extra)), /* @__PURE__ */ React.createElement("div", {
|
|
@@ -70702,7 +70701,7 @@ var require_DrawerPanel2 = __commonJS({
|
|
|
70702
70701
|
const {
|
|
70703
70702
|
prefixCls,
|
|
70704
70703
|
ariaId,
|
|
70705
|
-
title,
|
|
70704
|
+
title: title2,
|
|
70706
70705
|
footer,
|
|
70707
70706
|
extra,
|
|
70708
70707
|
closable,
|
|
@@ -70753,7 +70752,7 @@ var require_DrawerPanel2 = __commonJS({
|
|
|
70753
70752
|
disabled: closeBtnIsDisabled
|
|
70754
70753
|
});
|
|
70755
70754
|
const renderHeader = () => {
|
|
70756
|
-
if (!
|
|
70755
|
+
if (!title2 && !mergedClosable) {
|
|
70757
70756
|
return null;
|
|
70758
70757
|
}
|
|
70759
70758
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -70762,15 +70761,15 @@ var require_DrawerPanel2 = __commonJS({
|
|
|
70762
70761
|
...headerStyle
|
|
70763
70762
|
},
|
|
70764
70763
|
className: (0, _clsx.clsx)(`${prefixCls}-header`, mergedClassNames.header, {
|
|
70765
|
-
[`${prefixCls}-header-close-only`]: mergedClosable && !
|
|
70764
|
+
[`${prefixCls}-header-close-only`]: mergedClosable && !title2 && !extra
|
|
70766
70765
|
})
|
|
70767
70766
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
70768
70767
|
className: `${prefixCls}-header-title`
|
|
70769
|
-
}, closablePlacement === "start" && mergedCloseButton,
|
|
70768
|
+
}, closablePlacement === "start" && mergedCloseButton, title2 && /* @__PURE__ */ React.createElement("div", {
|
|
70770
70769
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, mergedClassNames.title),
|
|
70771
70770
|
style: mergedStyles.title,
|
|
70772
70771
|
id: ariaId
|
|
70773
|
-
},
|
|
70772
|
+
}, title2)), extra && /* @__PURE__ */ React.createElement("div", {
|
|
70774
70773
|
className: (0, _clsx.clsx)(`${prefixCls}-extra`, mergedClassNames.extra),
|
|
70775
70774
|
style: mergedStyles.extra
|
|
70776
70775
|
}, extra), closablePlacement === "end" && mergedCloseButton);
|
|
@@ -71814,7 +71813,7 @@ var require_dropdown_button = __commonJS({
|
|
|
71814
71813
|
getPopupContainer,
|
|
71815
71814
|
href,
|
|
71816
71815
|
icon = /* @__PURE__ */ React.createElement(_EllipsisOutlined.default, null),
|
|
71817
|
-
title,
|
|
71816
|
+
title: title2,
|
|
71818
71817
|
buttonsRender = (buttons) => buttons,
|
|
71819
71818
|
mouseEnterDelay,
|
|
71820
71819
|
mouseLeaveDelay,
|
|
@@ -71877,7 +71876,7 @@ var require_dropdown_button = __commonJS({
|
|
|
71877
71876
|
onClick,
|
|
71878
71877
|
htmlType,
|
|
71879
71878
|
href,
|
|
71880
|
-
title
|
|
71879
|
+
title: title2
|
|
71881
71880
|
}, children);
|
|
71882
71881
|
const rightButton = /* @__PURE__ */ React.createElement(_button.default, {
|
|
71883
71882
|
type,
|
|
@@ -72586,7 +72585,7 @@ var require_FloatButton = __commonJS({
|
|
|
72586
72585
|
type = "default",
|
|
72587
72586
|
shape = "circle",
|
|
72588
72587
|
icon,
|
|
72589
|
-
description,
|
|
72588
|
+
description: description2,
|
|
72590
72589
|
content,
|
|
72591
72590
|
tooltip,
|
|
72592
72591
|
badge = {},
|
|
@@ -72609,7 +72608,7 @@ var require_FloatButton = __commonJS({
|
|
|
72609
72608
|
} = groupContext || {};
|
|
72610
72609
|
const mergedShape = contextShape || shape;
|
|
72611
72610
|
const mergedIndividual = contextIndividual ?? true;
|
|
72612
|
-
const mergedContent = content ??
|
|
72611
|
+
const mergedContent = content ?? description2;
|
|
72613
72612
|
const mergedProps = {
|
|
72614
72613
|
...props,
|
|
72615
72614
|
type,
|
|
@@ -72640,7 +72639,7 @@ var require_FloatButton = __commonJS({
|
|
|
72640
72639
|
if (process.env.NODE_ENV !== "production") {
|
|
72641
72640
|
const warning = (0, _warning.devUseWarning)("FloatButton");
|
|
72642
72641
|
process.env.NODE_ENV !== "production" ? warning(!(mergedShape === "circle" && mergedContent), "usage", "supported only when `shape` is `square`. Due to narrow space for text, short sentence is recommended.") : void 0;
|
|
72643
|
-
warning.deprecated(!
|
|
72642
|
+
warning.deprecated(!description2, "description", "content");
|
|
72644
72643
|
}
|
|
72645
72644
|
let node = /* @__PURE__ */ _react.default.createElement(_Button.default, {
|
|
72646
72645
|
...restProps,
|
|
@@ -82193,7 +82192,7 @@ var require_spin = __commonJS({
|
|
|
82193
82192
|
rootClassName,
|
|
82194
82193
|
size,
|
|
82195
82194
|
tip,
|
|
82196
|
-
description,
|
|
82195
|
+
description: description2,
|
|
82197
82196
|
wrapperClassName,
|
|
82198
82197
|
style,
|
|
82199
82198
|
children,
|
|
@@ -82230,7 +82229,7 @@ var require_spin = __commonJS({
|
|
|
82230
82229
|
setSpinning(false);
|
|
82231
82230
|
}, [delay, customSpinning]);
|
|
82232
82231
|
const mergedSize = (0, _useSize.default)((ctx) => size ?? ctx);
|
|
82233
|
-
const mergedDescription =
|
|
82232
|
+
const mergedDescription = description2 ?? tip;
|
|
82234
82233
|
const mergedProps = {
|
|
82235
82234
|
...props,
|
|
82236
82235
|
size: mergedSize,
|
|
@@ -82347,8 +82346,8 @@ var require_Item5 = __commonJS({
|
|
|
82347
82346
|
prefixCls: customizePrefixCls,
|
|
82348
82347
|
className,
|
|
82349
82348
|
avatar,
|
|
82350
|
-
title,
|
|
82351
|
-
description,
|
|
82349
|
+
title: title2,
|
|
82350
|
+
description: description2,
|
|
82352
82351
|
...others
|
|
82353
82352
|
} = props;
|
|
82354
82353
|
const {
|
|
@@ -82362,18 +82361,18 @@ var require_Item5 = __commonJS({
|
|
|
82362
82361
|
}));
|
|
82363
82362
|
const content = /* @__PURE__ */ _react.default.createElement("div", {
|
|
82364
82363
|
className: `${prefixCls}-item-meta-content`
|
|
82365
|
-
},
|
|
82364
|
+
}, title2 && /* @__PURE__ */ _react.default.createElement("h4", {
|
|
82366
82365
|
className: `${prefixCls}-item-meta-title`
|
|
82367
|
-
},
|
|
82366
|
+
}, title2), description2 && /* @__PURE__ */ _react.default.createElement("div", {
|
|
82368
82367
|
className: `${prefixCls}-item-meta-description`
|
|
82369
|
-
},
|
|
82368
|
+
}, description2));
|
|
82370
82369
|
return /* @__PURE__ */ _react.default.createElement("div", {
|
|
82371
82370
|
ref: nativeElementRef,
|
|
82372
82371
|
...others,
|
|
82373
82372
|
className: classString
|
|
82374
82373
|
}, avatar && /* @__PURE__ */ _react.default.createElement("div", {
|
|
82375
82374
|
className: `${prefixCls}-item-meta-avatar`
|
|
82376
|
-
}, avatar), (
|
|
82375
|
+
}, avatar), (title2 || description2) && content);
|
|
82377
82376
|
});
|
|
82378
82377
|
var InternalItem = /* @__PURE__ */ _react.default.forwardRef((props, ref) => {
|
|
82379
82378
|
const {
|
|
@@ -86190,7 +86189,7 @@ var require_PurePanel7 = __commonJS({
|
|
|
86190
86189
|
closeIcon,
|
|
86191
86190
|
closable,
|
|
86192
86191
|
type,
|
|
86193
|
-
title,
|
|
86192
|
+
title: title2,
|
|
86194
86193
|
children,
|
|
86195
86194
|
footer,
|
|
86196
86195
|
style,
|
|
@@ -86234,7 +86233,7 @@ var require_PurePanel7 = __commonJS({
|
|
|
86234
86233
|
} else {
|
|
86235
86234
|
additionalProps = {
|
|
86236
86235
|
closable: closable ?? true,
|
|
86237
|
-
title,
|
|
86236
|
+
title: title2,
|
|
86238
86237
|
footer: footer !== null && /* @__PURE__ */ React.createElement(_shared.Footer, {
|
|
86239
86238
|
...props
|
|
86240
86239
|
}),
|
|
@@ -86344,11 +86343,11 @@ var require_PureList2 = __commonJS({
|
|
|
86344
86343
|
const configList = items.map((item) => {
|
|
86345
86344
|
const {
|
|
86346
86345
|
actions,
|
|
86347
|
-
description,
|
|
86346
|
+
description: description2,
|
|
86348
86347
|
duration,
|
|
86349
86348
|
key,
|
|
86350
86349
|
showProgress,
|
|
86351
|
-
title,
|
|
86350
|
+
title: title2,
|
|
86352
86351
|
type
|
|
86353
86352
|
} = item;
|
|
86354
86353
|
const typeIconCls = `${noticePrefixCls}-icon-${type}`;
|
|
@@ -86358,11 +86357,11 @@ var require_PureList2 = __commonJS({
|
|
|
86358
86357
|
closable: {
|
|
86359
86358
|
closeIcon: (0, _PurePanel.getCloseIcon)(noticePrefixCls)
|
|
86360
86359
|
},
|
|
86361
|
-
description,
|
|
86360
|
+
description: description2,
|
|
86362
86361
|
duration,
|
|
86363
86362
|
icon: _PurePanel.TypeIcon[type],
|
|
86364
86363
|
showProgress,
|
|
86365
|
-
title,
|
|
86364
|
+
title: title2,
|
|
86366
86365
|
className: `${noticePrefixCls}-${type}`,
|
|
86367
86366
|
classNames: {
|
|
86368
86367
|
icon: typeIconCls
|
|
@@ -86700,8 +86699,8 @@ var require_PurePanel8 = __commonJS({
|
|
|
86700
86699
|
prefixCls,
|
|
86701
86700
|
okButtonProps,
|
|
86702
86701
|
cancelButtonProps,
|
|
86703
|
-
title,
|
|
86704
|
-
description,
|
|
86702
|
+
title: title2,
|
|
86703
|
+
description: description2,
|
|
86705
86704
|
cancelText,
|
|
86706
86705
|
okText,
|
|
86707
86706
|
okType = "primary",
|
|
@@ -86718,8 +86717,8 @@ var require_PurePanel8 = __commonJS({
|
|
|
86718
86717
|
getPrefixCls
|
|
86719
86718
|
} = React.useContext(_configProvider.ConfigContext);
|
|
86720
86719
|
const [contextLocale] = (0, _locale.useLocale)("Popconfirm", _en_US.default.Popconfirm);
|
|
86721
|
-
const titleNode = (0, _getRenderPropValue.getRenderPropValue)(
|
|
86722
|
-
const descriptionNode = (0, _getRenderPropValue.getRenderPropValue)(
|
|
86720
|
+
const titleNode = (0, _getRenderPropValue.getRenderPropValue)(title2);
|
|
86721
|
+
const descriptionNode = (0, _getRenderPropValue.getRenderPropValue)(description2);
|
|
86723
86722
|
return /* @__PURE__ */ React.createElement("div", {
|
|
86724
86723
|
className: `${prefixCls}-inner-content`,
|
|
86725
86724
|
onClick: onPopupClick
|
|
@@ -89602,7 +89601,7 @@ var require_QRCodeSVG = __commonJS({
|
|
|
89602
89601
|
fgColor = _utils.DEFAULT_FRONT_COLOR,
|
|
89603
89602
|
includeMargin = _utils.DEFAULT_NEED_MARGIN,
|
|
89604
89603
|
minVersion = _utils.DEFAULT_MINVERSION,
|
|
89605
|
-
title,
|
|
89604
|
+
title: title2,
|
|
89606
89605
|
marginSize,
|
|
89607
89606
|
imageSettings,
|
|
89608
89607
|
boostLevel,
|
|
@@ -89647,7 +89646,7 @@ var require_QRCodeSVG = __commonJS({
|
|
|
89647
89646
|
viewBox: `0 0 ${numCells} ${numCells}`,
|
|
89648
89647
|
ref,
|
|
89649
89648
|
role: "img"
|
|
89650
|
-
}, otherProps), !!
|
|
89649
|
+
}, otherProps), !!title2 && /* @__PURE__ */ _react.default.createElement("title", null, title2), /* @__PURE__ */ _react.default.createElement("path", {
|
|
89651
89650
|
fill: bgColor,
|
|
89652
89651
|
d: `M0,0 h${numCells}v${numCells}H0z`,
|
|
89653
89652
|
shapeRendering: "crispEdges"
|
|
@@ -91713,7 +91712,7 @@ var require_result = __commonJS({
|
|
|
91713
91712
|
className: customizeClassName,
|
|
91714
91713
|
rootClassName,
|
|
91715
91714
|
subTitle,
|
|
91716
|
-
title,
|
|
91715
|
+
title: title2,
|
|
91717
91716
|
style,
|
|
91718
91717
|
children,
|
|
91719
91718
|
status = "info",
|
|
@@ -91773,10 +91772,10 @@ var require_result = __commonJS({
|
|
|
91773
91772
|
style: mergedStyles.icon,
|
|
91774
91773
|
status,
|
|
91775
91774
|
icon
|
|
91776
|
-
}), (0, _is.isReactRenderable)(
|
|
91775
|
+
}), (0, _is.isReactRenderable)(title2) && /* @__PURE__ */ React.createElement("div", {
|
|
91777
91776
|
className: titleClassNames,
|
|
91778
91777
|
style: mergedStyles.title
|
|
91779
|
-
},
|
|
91778
|
+
}, title2), (0, _is.isReactRenderable)(subTitle) && /* @__PURE__ */ React.createElement("div", {
|
|
91780
91779
|
className: subTitleClassNames,
|
|
91781
91780
|
style: mergedStyles.subTitle
|
|
91782
91781
|
}, subTitle), /* @__PURE__ */ React.createElement(Extra, {
|
|
@@ -93229,7 +93228,7 @@ var require_Statistic = __commonJS({
|
|
|
93229
93228
|
style,
|
|
93230
93229
|
valueStyle,
|
|
93231
93230
|
value = 0,
|
|
93232
|
-
title,
|
|
93231
|
+
title: title2,
|
|
93233
93232
|
valueRender,
|
|
93234
93233
|
prefix,
|
|
93235
93234
|
suffix,
|
|
@@ -93308,13 +93307,13 @@ var require_Statistic = __commonJS({
|
|
|
93308
93307
|
ref: internalRef,
|
|
93309
93308
|
onMouseEnter,
|
|
93310
93309
|
onMouseLeave
|
|
93311
|
-
},
|
|
93310
|
+
}, title2 && /* @__PURE__ */ React.createElement("div", {
|
|
93312
93311
|
className: headerClassNames,
|
|
93313
93312
|
style: mergedStyles.header
|
|
93314
93313
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
93315
93314
|
className: titleClassNames,
|
|
93316
93315
|
style: mergedStyles.title
|
|
93317
|
-
},
|
|
93316
|
+
}, title2)), /* @__PURE__ */ React.createElement(_skeleton.default, {
|
|
93318
93317
|
paragraph: false,
|
|
93319
93318
|
loading,
|
|
93320
93319
|
className: `${prefixCls}-skeleton`,
|
|
@@ -93800,10 +93799,10 @@ var require_Step = __commonJS({
|
|
|
93800
93799
|
} = React.useContext(_Context.StepsContext);
|
|
93801
93800
|
const {
|
|
93802
93801
|
onClick: onItemClick,
|
|
93803
|
-
title,
|
|
93802
|
+
title: title2,
|
|
93804
93803
|
subTitle,
|
|
93805
93804
|
content,
|
|
93806
|
-
description,
|
|
93805
|
+
description: description2,
|
|
93807
93806
|
disabled,
|
|
93808
93807
|
icon,
|
|
93809
93808
|
status,
|
|
@@ -93813,7 +93812,7 @@ var require_Step = __commonJS({
|
|
|
93813
93812
|
styles: itemStyles = {},
|
|
93814
93813
|
...restItemProps
|
|
93815
93814
|
} = data;
|
|
93816
|
-
const mergedContent = content ??
|
|
93815
|
+
const mergedContent = content ?? description2;
|
|
93817
93816
|
const renderInfo = {
|
|
93818
93817
|
item: {
|
|
93819
93818
|
...data,
|
|
@@ -93841,7 +93840,7 @@ var require_Step = __commonJS({
|
|
|
93841
93840
|
};
|
|
93842
93841
|
}
|
|
93843
93842
|
const mergedStatus = status || "wait";
|
|
93844
|
-
const hasTitle = hasContent(
|
|
93843
|
+
const hasTitle = hasContent(title2);
|
|
93845
93844
|
const hasSubTitle = hasContent(subTitle);
|
|
93846
93845
|
const classString = (0, _clsx.clsx)(itemCls, `${itemCls}-${mergedStatus}`, {
|
|
93847
93846
|
[`${itemCls}-custom`]: icon,
|
|
@@ -93887,7 +93886,7 @@ var require_Step = __commonJS({
|
|
|
93887
93886
|
...styles.itemTitle,
|
|
93888
93887
|
...itemStyles.title
|
|
93889
93888
|
}
|
|
93890
|
-
},
|
|
93889
|
+
}, title2), hasSubTitle && /* @__PURE__ */ React.createElement("div", {
|
|
93891
93890
|
title: typeof subTitle === "string" ? subTitle : void 0,
|
|
93892
93891
|
className: (0, _clsx.clsx)(`${itemCls}-subtitle`, classNames.itemSubtitle, itemClassNames.subtitle),
|
|
93893
93892
|
style: {
|
|
@@ -97101,18 +97100,18 @@ var require_Cell2 = __commonJS({
|
|
|
97101
97100
|
rowType,
|
|
97102
97101
|
children
|
|
97103
97102
|
}) => {
|
|
97104
|
-
let
|
|
97103
|
+
let title2;
|
|
97105
97104
|
const ellipsisConfig = ellipsis === true ? {
|
|
97106
97105
|
showTitle: true
|
|
97107
97106
|
} : ellipsis;
|
|
97108
97107
|
if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === "header")) {
|
|
97109
97108
|
if (typeof children === "string" || typeof children === "number") {
|
|
97110
|
-
|
|
97109
|
+
title2 = children.toString();
|
|
97111
97110
|
} else if (/* @__PURE__ */ React.isValidElement(children) && typeof children.props?.children === "string") {
|
|
97112
|
-
|
|
97111
|
+
title2 = children.props?.children;
|
|
97113
97112
|
}
|
|
97114
97113
|
}
|
|
97115
|
-
return
|
|
97114
|
+
return title2;
|
|
97116
97115
|
};
|
|
97117
97116
|
var Cell = (props) => {
|
|
97118
97117
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -97206,7 +97205,7 @@ var require_Cell2 = __commonJS({
|
|
|
97206
97205
|
if (mergedColSpan === 0 || mergedRowSpan === 0) {
|
|
97207
97206
|
return null;
|
|
97208
97207
|
}
|
|
97209
|
-
const
|
|
97208
|
+
const title2 = additionalProps.title ?? getTitleFromCellRenderChildren({
|
|
97210
97209
|
rowType,
|
|
97211
97210
|
ellipsis,
|
|
97212
97211
|
children: childNode
|
|
@@ -97249,7 +97248,7 @@ var require_Cell2 = __commonJS({
|
|
|
97249
97248
|
return /* @__PURE__ */ React.createElement(Component, _extends({}, legacyCellProps, additionalProps, {
|
|
97250
97249
|
className: mergedClassName,
|
|
97251
97250
|
style: mergedStyle,
|
|
97252
|
-
title,
|
|
97251
|
+
title: title2,
|
|
97253
97252
|
scope,
|
|
97254
97253
|
onMouseEnter: rowHoverable ? onMouseEnter : void 0,
|
|
97255
97254
|
onMouseLeave: rowHoverable ? onMouseLeave : void 0,
|
|
@@ -98164,7 +98163,7 @@ var require_MeasureCell = __commonJS({
|
|
|
98164
98163
|
const {
|
|
98165
98164
|
columnKey,
|
|
98166
98165
|
onColumnResize,
|
|
98167
|
-
title
|
|
98166
|
+
title: title2
|
|
98168
98167
|
} = props;
|
|
98169
98168
|
const cellRef = React.useRef(null);
|
|
98170
98169
|
(0, _util.useLayoutEffect)(() => {
|
|
@@ -98189,7 +98188,7 @@ var require_MeasureCell = __commonJS({
|
|
|
98189
98188
|
overflow: "hidden",
|
|
98190
98189
|
fontWeight: "bold"
|
|
98191
98190
|
}
|
|
98192
|
-
},
|
|
98191
|
+
}, title2 || "\xA0")));
|
|
98193
98192
|
};
|
|
98194
98193
|
var _default = exports.default = MeasureCell;
|
|
98195
98194
|
}
|
|
@@ -99961,7 +99960,7 @@ var require_Table = __commonJS({
|
|
|
99961
99960
|
tableLayout,
|
|
99962
99961
|
direction,
|
|
99963
99962
|
// Additional Part
|
|
99964
|
-
title,
|
|
99963
|
+
title: title2,
|
|
99965
99964
|
footer,
|
|
99966
99965
|
summary,
|
|
99967
99966
|
caption,
|
|
@@ -100410,10 +100409,10 @@ var require_Table = __commonJS({
|
|
|
100410
100409
|
style: tableStyle,
|
|
100411
100410
|
id,
|
|
100412
100411
|
ref: fullTableRef
|
|
100413
|
-
}, dataProps),
|
|
100412
|
+
}, dataProps), title2 && /* @__PURE__ */ React.createElement(_Panel.default, {
|
|
100414
100413
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, classNames?.title),
|
|
100415
100414
|
style: styles?.title
|
|
100416
|
-
},
|
|
100415
|
+
}, title2(mergedData)), /* @__PURE__ */ React.createElement("div", {
|
|
100417
100416
|
ref: scrollBodyContainerRef,
|
|
100418
100417
|
className: (0, _clsx.clsx)(`${prefixCls}-container`, classNames?.section),
|
|
100419
100418
|
style: styles?.section
|
|
@@ -101692,7 +101691,7 @@ var require_useSelection = __commonJS({
|
|
|
101692
101691
|
setSelectedKeys(keys, "all");
|
|
101693
101692
|
updatePrevSelectedIndex(null);
|
|
101694
101693
|
};
|
|
101695
|
-
let
|
|
101694
|
+
let title2;
|
|
101696
101695
|
let columnTitleCheckbox;
|
|
101697
101696
|
if (selectionType !== "radio") {
|
|
101698
101697
|
let customizeSelections;
|
|
@@ -101757,7 +101756,7 @@ var require_useSelection = __commonJS({
|
|
|
101757
101756
|
disabled: disabled ?? (flattedData.length === 0 || allDisabled),
|
|
101758
101757
|
skipGroup: true
|
|
101759
101758
|
});
|
|
101760
|
-
|
|
101759
|
+
title2 = !hideSelectAll && /* @__PURE__ */ React.createElement("div", {
|
|
101761
101760
|
className: `${prefixCls}-selection`
|
|
101762
101761
|
}, columnTitleCheckbox, customizeSelections);
|
|
101763
101762
|
}
|
|
@@ -101900,7 +101899,7 @@ var require_useSelection = __commonJS({
|
|
|
101900
101899
|
});
|
|
101901
101900
|
const renderColumnTitle = () => {
|
|
101902
101901
|
if (!rowSelection?.columnTitle) {
|
|
101903
|
-
return
|
|
101902
|
+
return title2;
|
|
101904
101903
|
}
|
|
101905
101904
|
if ((0, _is.isFunction)(rowSelection.columnTitle)) {
|
|
101906
101905
|
return rowSelection.columnTitle(columnTitleCheckbox);
|
|
@@ -102088,15 +102087,15 @@ var require_util24 = __commonJS({
|
|
|
102088
102087
|
function getColumnPos(index, pos) {
|
|
102089
102088
|
return pos ? `${pos}-${index}` : `${index}`;
|
|
102090
102089
|
}
|
|
102091
|
-
var renderColumnTitle = (
|
|
102092
|
-
if ((0, _is.isFunction)(
|
|
102093
|
-
return
|
|
102090
|
+
var renderColumnTitle = (title2, props) => {
|
|
102091
|
+
if ((0, _is.isFunction)(title2)) {
|
|
102092
|
+
return title2(props);
|
|
102094
102093
|
}
|
|
102095
|
-
return
|
|
102094
|
+
return title2;
|
|
102096
102095
|
};
|
|
102097
102096
|
exports.renderColumnTitle = renderColumnTitle;
|
|
102098
|
-
var safeColumnTitle = (
|
|
102099
|
-
const result = renderColumnTitle(
|
|
102097
|
+
var safeColumnTitle = (title2, props) => {
|
|
102098
|
+
const result = renderColumnTitle(title2, props);
|
|
102100
102099
|
if ((0, _is.isPlainObject)(result) || Array.isArray(result)) {
|
|
102101
102100
|
return "";
|
|
102102
102101
|
}
|
|
@@ -106929,7 +106928,7 @@ var require_InternalTable = __commonJS({
|
|
|
106929
106928
|
target: "full-header"
|
|
106930
106929
|
},
|
|
106931
106930
|
virtual,
|
|
106932
|
-
title,
|
|
106931
|
+
title: title2,
|
|
106933
106932
|
showHeader
|
|
106934
106933
|
} = props;
|
|
106935
106934
|
const warning = (0, _warning.devUseWarning)("Table");
|
|
@@ -107281,7 +107280,7 @@ var require_InternalTable = __commonJS({
|
|
|
107281
107280
|
[`${prefixCls}-small`]: mergedSize === "small",
|
|
107282
107281
|
[`${prefixCls}-bordered`]: bordered,
|
|
107283
107282
|
[`${prefixCls}-empty`]: rawData.length === 0,
|
|
107284
|
-
[`${prefixCls}-no-header`]: !
|
|
107283
|
+
[`${prefixCls}-no-header`]: !title2 && showHeader === false
|
|
107285
107284
|
}, cssVarCls, rootCls, hashId),
|
|
107286
107285
|
data: pageData,
|
|
107287
107286
|
rowKey: getRowKey,
|
|
@@ -108823,7 +108822,7 @@ var require_useItems5 = __commonJS({
|
|
|
108823
108822
|
const {
|
|
108824
108823
|
label,
|
|
108825
108824
|
children: children2,
|
|
108826
|
-
title,
|
|
108825
|
+
title: title2,
|
|
108827
108826
|
content,
|
|
108828
108827
|
color,
|
|
108829
108828
|
className,
|
|
@@ -108855,7 +108854,7 @@ var require_useItems5 = __commonJS({
|
|
|
108855
108854
|
}
|
|
108856
108855
|
return {
|
|
108857
108856
|
...restProps,
|
|
108858
|
-
title:
|
|
108857
|
+
title: title2 ?? label,
|
|
108859
108858
|
content: content ?? children2,
|
|
108860
108859
|
style: mergedStyle,
|
|
108861
108860
|
className: mergedClassName,
|
|
@@ -109480,8 +109479,8 @@ var require_DefaultPanel = __commonJS({
|
|
|
109480
109479
|
prefixCls,
|
|
109481
109480
|
current,
|
|
109482
109481
|
total,
|
|
109483
|
-
title,
|
|
109484
|
-
description,
|
|
109482
|
+
title: title2,
|
|
109483
|
+
description: description2,
|
|
109485
109484
|
onClose,
|
|
109486
109485
|
onPrev,
|
|
109487
109486
|
onNext,
|
|
@@ -109514,10 +109513,10 @@ var require_DefaultPanel = __commonJS({
|
|
|
109514
109513
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
109515
109514
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, tourClassNames?.title),
|
|
109516
109515
|
style: styles?.title
|
|
109517
|
-
},
|
|
109516
|
+
}, title2)), /* @__PURE__ */ React.createElement("div", {
|
|
109518
109517
|
className: (0, _clsx.clsx)(`${prefixCls}-description`, tourClassNames?.description),
|
|
109519
109518
|
style: styles?.description
|
|
109520
|
-
},
|
|
109519
|
+
}, description2), /* @__PURE__ */ React.createElement("div", {
|
|
109521
109520
|
className: (0, _clsx.clsx)(`${prefixCls}-footer`, tourClassNames?.footer),
|
|
109522
109521
|
style: styles?.footer
|
|
109523
109522
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -109964,13 +109963,13 @@ var require_panelRender = __commonJS({
|
|
|
109964
109963
|
const {
|
|
109965
109964
|
prefixCls,
|
|
109966
109965
|
total = 1,
|
|
109967
|
-
title,
|
|
109966
|
+
title: title2,
|
|
109968
109967
|
onClose,
|
|
109969
109968
|
onPrev,
|
|
109970
109969
|
onNext,
|
|
109971
109970
|
onFinish,
|
|
109972
109971
|
cover,
|
|
109973
|
-
description,
|
|
109972
|
+
description: description2,
|
|
109974
109973
|
nextButtonProps,
|
|
109975
109974
|
prevButtonProps,
|
|
109976
109975
|
type: stepType,
|
|
@@ -110005,17 +110004,17 @@ var require_panelRender = __commonJS({
|
|
|
110005
110004
|
}
|
|
110006
110005
|
nextButtonProps?.onClick?.();
|
|
110007
110006
|
};
|
|
110008
|
-
const headerNode = (0, _is.isReactRenderable)(
|
|
110007
|
+
const headerNode = (0, _is.isReactRenderable)(title2) ? /* @__PURE__ */ _react.default.createElement("div", {
|
|
110009
110008
|
className: (0, _clsx.clsx)(`${prefixCls}-header`, classNames.header),
|
|
110010
110009
|
style: styles.header
|
|
110011
110010
|
}, /* @__PURE__ */ _react.default.createElement("div", {
|
|
110012
110011
|
className: (0, _clsx.clsx)(`${prefixCls}-title`, classNames.title),
|
|
110013
110012
|
style: styles.title
|
|
110014
|
-
},
|
|
110015
|
-
const descriptionNode = (0, _is.isReactRenderable)(
|
|
110013
|
+
}, title2)) : null;
|
|
110014
|
+
const descriptionNode = (0, _is.isReactRenderable)(description2) ? /* @__PURE__ */ _react.default.createElement("div", {
|
|
110016
110015
|
className: (0, _clsx.clsx)(`${prefixCls}-description`, classNames.description),
|
|
110017
110016
|
style: styles.description
|
|
110018
|
-
},
|
|
110017
|
+
}, description2) : null;
|
|
110019
110018
|
const coverNode = (0, _is.isReactRenderable)(cover) ? /* @__PURE__ */ _react.default.createElement("div", {
|
|
110020
110019
|
className: (0, _clsx.clsx)(`${prefixCls}-cover`, classNames.cover),
|
|
110021
110020
|
style: styles.cover
|
|
@@ -110855,15 +110854,15 @@ var require_ListItem = __commonJS({
|
|
|
110855
110854
|
[`${prefixCls}-content-item-disabled`]: mergedDisabled,
|
|
110856
110855
|
[`${prefixCls}-content-item-checked`]: checked && !mergedDisabled
|
|
110857
110856
|
});
|
|
110858
|
-
let
|
|
110857
|
+
let title2;
|
|
110859
110858
|
if (typeof renderedText === "string" || (0, _is.isNumber)(renderedText)) {
|
|
110860
|
-
|
|
110859
|
+
title2 = String(renderedText);
|
|
110861
110860
|
}
|
|
110862
110861
|
const [contextLocale] = (0, _locale.useLocale)("Transfer", _en_US.default.Transfer);
|
|
110863
110862
|
const liProps = {
|
|
110864
110863
|
className: classes,
|
|
110865
110864
|
style: styles.item,
|
|
110866
|
-
title
|
|
110865
|
+
title: title2
|
|
110867
110866
|
};
|
|
110868
110867
|
const labelNode = /* @__PURE__ */ React.createElement("span", {
|
|
110869
110868
|
className: (0, _clsx.clsx)(`${prefixCls}-content-item-text`, classNames.itemContent),
|
|
@@ -113362,9 +113361,9 @@ var require_TreeSelect = __commonJS({
|
|
|
113362
113361
|
_title: titleList
|
|
113363
113362
|
} = mergedFieldNames;
|
|
113364
113363
|
for (let i = 0; i < titleList.length; i += 1) {
|
|
113365
|
-
const
|
|
113366
|
-
if (
|
|
113367
|
-
return
|
|
113364
|
+
const title2 = item[titleList[i]];
|
|
113365
|
+
if (title2 !== void 0) {
|
|
113366
|
+
return title2;
|
|
113368
113367
|
}
|
|
113369
113368
|
}
|
|
113370
113369
|
}
|
|
@@ -115478,7 +115477,7 @@ var require_Base = __commonJS({
|
|
|
115478
115477
|
copyable,
|
|
115479
115478
|
actions,
|
|
115480
115479
|
component,
|
|
115481
|
-
title,
|
|
115480
|
+
title: title2,
|
|
115482
115481
|
onMouseEnter,
|
|
115483
115482
|
onMouseLeave,
|
|
115484
115483
|
...restProps
|
|
@@ -115620,8 +115619,8 @@ var require_Base = __commonJS({
|
|
|
115620
115619
|
if (!enableEllipsis || cssEllipsis) {
|
|
115621
115620
|
return void 0;
|
|
115622
115621
|
}
|
|
115623
|
-
return [editConfig.text, children,
|
|
115624
|
-
}, [enableEllipsis, cssEllipsis,
|
|
115622
|
+
return [editConfig.text, children, title2, tooltipProps.title].find(_util2.isValidText);
|
|
115623
|
+
}, [enableEllipsis, cssEllipsis, title2, tooltipProps.title, isMergedEllipsis, editConfig.text]);
|
|
115625
115624
|
if (editing) {
|
|
115626
115625
|
return /* @__PURE__ */ React.createElement(_Editable.default, {
|
|
115627
115626
|
value: editConfig.text ?? (typeof children === "string" ? children : ""),
|
|
@@ -115761,7 +115760,7 @@ var require_Base = __commonJS({
|
|
|
115761
115760
|
direction,
|
|
115762
115761
|
onClick: triggerType.includes("text") ? onEditClick : void 0,
|
|
115763
115762
|
"aria-label": topAriaLabel?.toString(),
|
|
115764
|
-
title,
|
|
115763
|
+
title: title2,
|
|
115765
115764
|
...textProps
|
|
115766
115765
|
}, /* @__PURE__ */ React.createElement(_Ellipsis.default, {
|
|
115767
115766
|
enableMeasure: mergedEnableEllipsis && !cssEllipsis,
|
|
@@ -117946,12 +117945,12 @@ var require_UploadList = __commonJS({
|
|
|
117946
117945
|
}
|
|
117947
117946
|
return isLoading ? /* @__PURE__ */ React.createElement(_LoadingOutlined.default, null) : /* @__PURE__ */ React.createElement(_PaperClipOutlined.default, null);
|
|
117948
117947
|
};
|
|
117949
|
-
const actionIconRender = (customIcon, callback, prefixCls2,
|
|
117948
|
+
const actionIconRender = (customIcon, callback, prefixCls2, title2, acceptUploadDisabled) => {
|
|
117950
117949
|
const btnProps = {
|
|
117951
117950
|
type: "text",
|
|
117952
117951
|
size: "small",
|
|
117953
|
-
title,
|
|
117954
|
-
"aria-label":
|
|
117952
|
+
title: title2,
|
|
117953
|
+
"aria-label": title2 || void 0,
|
|
117955
117954
|
onClick: (e) => {
|
|
117956
117955
|
callback();
|
|
117957
117956
|
if (/* @__PURE__ */ React.isValidElement(customIcon)) {
|
|
@@ -119795,6 +119794,12 @@ var eventType = external_exports.string().max(256).regex(/^[a-z][a-z0-9]*(?:\.[a
|
|
|
119795
119794
|
var serviceNamespace = external_exports.string().max(256).regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9]*)+$/);
|
|
119796
119795
|
var aggregateType = external_exports.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
|
|
119797
119796
|
var aggregateId = external_exports.string().trim().min(1).max(256);
|
|
119797
|
+
var providerId = external_exports.string().max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/);
|
|
119798
|
+
var contractPackage = external_exports.string().max(128).regex(/^@zlooks\.cn\/[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
119799
|
+
var exportName = external_exports.string().max(128).regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/);
|
|
119800
|
+
var title = external_exports.string().trim().min(1).max(120);
|
|
119801
|
+
var description = external_exports.string().trim().min(1).max(1e3);
|
|
119802
|
+
var jsonValueSchema = external_exports.json();
|
|
119798
119803
|
var eventEnvelopeSchema = external_exports.strictObject({
|
|
119799
119804
|
protocol: external_exports.literal("zlooks.event"),
|
|
119800
119805
|
protocolVersion: external_exports.literal(1),
|
|
@@ -119806,42 +119811,130 @@ var eventEnvelopeSchema = external_exports.strictObject({
|
|
|
119806
119811
|
id: aggregateId
|
|
119807
119812
|
}).readonly(),
|
|
119808
119813
|
occurredAt: external_exports.iso.datetime({ offset: true }),
|
|
119809
|
-
data:
|
|
119814
|
+
data: jsonValueSchema
|
|
119810
119815
|
}).readonly();
|
|
119811
|
-
function
|
|
119816
|
+
function parseDomainEvent(input) {
|
|
119817
|
+
const envelope = eventEnvelopeSchema.parse(input);
|
|
119818
|
+
return Object.freeze({
|
|
119819
|
+
...envelope,
|
|
119820
|
+
aggregate: Object.freeze({ ...envelope.aggregate })
|
|
119821
|
+
});
|
|
119822
|
+
}
|
|
119823
|
+
function defineEvent(type, dataSchema5, options) {
|
|
119812
119824
|
const parsedType = eventType.parse(type);
|
|
119825
|
+
const producer = serviceNamespace.parse(options.producer);
|
|
119826
|
+
const parsedAggregateType = aggregateType.parse(options.aggregateType);
|
|
119827
|
+
const selectAggregateId = options.aggregateId;
|
|
119828
|
+
if (typeof selectAggregateId !== "function")
|
|
119829
|
+
throw new TypeError("Event aggregateId must be a function");
|
|
119813
119830
|
return Object.freeze({
|
|
119814
119831
|
type: parsedType,
|
|
119832
|
+
producer,
|
|
119833
|
+
aggregateType: parsedAggregateType,
|
|
119834
|
+
dataSchema: dataSchema5,
|
|
119815
119835
|
parse(value) {
|
|
119816
|
-
const envelope =
|
|
119836
|
+
const envelope = parseDomainEvent(value);
|
|
119817
119837
|
if (envelope.type !== parsedType) {
|
|
119818
119838
|
throw new TypeError(`Expected event type ${parsedType}`);
|
|
119819
119839
|
}
|
|
119840
|
+
if (envelope.producer !== producer) {
|
|
119841
|
+
throw new TypeError(`Expected event producer ${producer}`);
|
|
119842
|
+
}
|
|
119843
|
+
const data = dataSchema5.parse(envelope.data);
|
|
119844
|
+
jsonValueSchema.parse(data);
|
|
119845
|
+
const expectedAggregateId = aggregateId.parse(selectAggregateId(data));
|
|
119846
|
+
if (envelope.aggregate.type !== parsedAggregateType || envelope.aggregate.id !== expectedAggregateId) {
|
|
119847
|
+
throw new TypeError(`${parsedType} aggregate does not identify its event data`);
|
|
119848
|
+
}
|
|
119820
119849
|
return Object.freeze({
|
|
119821
119850
|
...envelope,
|
|
119822
119851
|
type: parsedType,
|
|
119823
119852
|
aggregate: Object.freeze({ ...envelope.aggregate }),
|
|
119824
|
-
data
|
|
119853
|
+
data
|
|
119825
119854
|
});
|
|
119826
119855
|
}
|
|
119827
119856
|
});
|
|
119828
119857
|
}
|
|
119858
|
+
function defineEventCatalog(input) {
|
|
119859
|
+
const parsedProviderId = providerId.parse(input.providerId);
|
|
119860
|
+
const parsedDisplayName = title.parse(input.displayName);
|
|
119861
|
+
const parsedContractPackage = contractPackage.parse(input.contractPackage);
|
|
119862
|
+
if (input.events.length === 0 || input.events.length > 256) {
|
|
119863
|
+
throw new TypeError("Event catalog must contain between 1 and 256 events");
|
|
119864
|
+
}
|
|
119865
|
+
const producer = input.events[0].definition.producer;
|
|
119866
|
+
const eventTypes = /* @__PURE__ */ new Set();
|
|
119867
|
+
const consumerExports = /* @__PURE__ */ new Set();
|
|
119868
|
+
const events = input.events.map((entry) => {
|
|
119869
|
+
if (entry.definition.producer !== producer) {
|
|
119870
|
+
throw new TypeError("Event catalog definitions must have one producer");
|
|
119871
|
+
}
|
|
119872
|
+
if (eventTypes.has(entry.definition.type)) {
|
|
119873
|
+
throw new TypeError("Event catalog event types must be unique");
|
|
119874
|
+
}
|
|
119875
|
+
const parsedConsumerExport = exportName.parse(entry.consumerExport);
|
|
119876
|
+
if (consumerExports.has(parsedConsumerExport)) {
|
|
119877
|
+
throw new TypeError("Event catalog Consumer exports must be unique");
|
|
119878
|
+
}
|
|
119879
|
+
eventTypes.add(entry.definition.type);
|
|
119880
|
+
consumerExports.add(parsedConsumerExport);
|
|
119881
|
+
const dataSchema5 = immutableJson(external_exports.toJSONSchema(entry.definition.dataSchema, {
|
|
119882
|
+
target: "draft-2020-12",
|
|
119883
|
+
unrepresentable: "any",
|
|
119884
|
+
io: "input"
|
|
119885
|
+
}));
|
|
119886
|
+
if (!isJsonObject(dataSchema5))
|
|
119887
|
+
throw new TypeError("Event data schema must serialize to a JSON object");
|
|
119888
|
+
return Object.freeze({
|
|
119889
|
+
type: entry.definition.type,
|
|
119890
|
+
title: title.parse(entry.title),
|
|
119891
|
+
description: description.parse(entry.description),
|
|
119892
|
+
producer,
|
|
119893
|
+
aggregateType: entry.definition.aggregateType,
|
|
119894
|
+
consumer: Object.freeze({
|
|
119895
|
+
packageName: parsedContractPackage,
|
|
119896
|
+
exportName: parsedConsumerExport
|
|
119897
|
+
}),
|
|
119898
|
+
dataSchema: dataSchema5
|
|
119899
|
+
});
|
|
119900
|
+
});
|
|
119901
|
+
return Object.freeze({
|
|
119902
|
+
protocol: "zlooks.event-catalog",
|
|
119903
|
+
protocolVersion: 1,
|
|
119904
|
+
providerId: parsedProviderId,
|
|
119905
|
+
displayName: parsedDisplayName,
|
|
119906
|
+
producer,
|
|
119907
|
+
contractPackage: parsedContractPackage,
|
|
119908
|
+
count: events.length,
|
|
119909
|
+
delivery: Object.freeze({ guarantee: "at-least-once", deduplicateBy: "eventId" }),
|
|
119910
|
+
events: Object.freeze(events)
|
|
119911
|
+
});
|
|
119912
|
+
}
|
|
119913
|
+
function immutableJson(value) {
|
|
119914
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
119915
|
+
return value;
|
|
119916
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
119917
|
+
return value;
|
|
119918
|
+
if (Array.isArray(value))
|
|
119919
|
+
return Object.freeze(value.map(immutableJson));
|
|
119920
|
+
if (isRecord(value)) {
|
|
119921
|
+
return Object.freeze(Object.fromEntries(Object.entries(value).filter(([, item]) => item !== void 0).map(([key, item]) => [key, immutableJson(item)])));
|
|
119922
|
+
}
|
|
119923
|
+
throw new TypeError("Event JSON Schema contains a non-JSON value");
|
|
119924
|
+
}
|
|
119925
|
+
function isJsonObject(value) {
|
|
119926
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
119927
|
+
}
|
|
119928
|
+
function isRecord(value) {
|
|
119929
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
119930
|
+
}
|
|
119829
119931
|
|
|
119830
119932
|
// ../user-shared/dist/events/definition.js
|
|
119831
119933
|
function defineUserEvent(type, aggregateType2, dataSchema5, aggregateId2) {
|
|
119832
|
-
|
|
119833
|
-
|
|
119834
|
-
|
|
119835
|
-
|
|
119836
|
-
const event = base.parse(input);
|
|
119837
|
-
if (event.producer !== USER_SERVICE_NAMESPACE) {
|
|
119838
|
-
throw new TypeError(`Expected event producer ${USER_SERVICE_NAMESPACE}`);
|
|
119839
|
-
}
|
|
119840
|
-
if (event.aggregate.type !== aggregateType2 || event.aggregate.id !== aggregateId2(event.data)) {
|
|
119841
|
-
throw new TypeError(`${type} aggregate does not identify its event data`);
|
|
119842
|
-
}
|
|
119843
|
-
return event;
|
|
119844
|
-
}
|
|
119934
|
+
return defineEvent(type, dataSchema5, {
|
|
119935
|
+
producer: USER_SERVICE_NAMESPACE,
|
|
119936
|
+
aggregateType: aggregateType2,
|
|
119937
|
+
aggregateId: aggregateId2
|
|
119845
119938
|
});
|
|
119846
119939
|
}
|
|
119847
119940
|
|
|
@@ -119926,55 +120019,53 @@ var dataSchema4 = external_exports.strictObject({
|
|
|
119926
120019
|
}).readonly();
|
|
119927
120020
|
var userSessionRevokedEvent = defineUserEvent(USER_SESSION_REVOKED_EVENT_TYPE, "session-family", dataSchema4, (data) => data.sessionFamily.id);
|
|
119928
120021
|
|
|
120022
|
+
// ../user-shared/dist/events/catalog.js
|
|
120023
|
+
var USER_EVENT_CATALOG = defineEventCatalog({
|
|
120024
|
+
providerId: "user",
|
|
120025
|
+
displayName: "\u7528\u6237\u670D\u52A1\u4E8B\u4EF6",
|
|
120026
|
+
contractPackage: "@zlooks.cn/user-shared",
|
|
120027
|
+
events: [
|
|
120028
|
+
{
|
|
120029
|
+
definition: userRegisteredEvent,
|
|
120030
|
+
title: "\u7528\u6237\u5DF2\u6CE8\u518C",
|
|
120031
|
+
description: "\u7528\u6237\u8D26\u6237\u5DF2\u7ECF\u5B8C\u6210\u6301\u4E45\u5316\u521B\u5EFA\u5E76\u5904\u4E8E\u53EF\u7528\u72B6\u6001\u3002",
|
|
120032
|
+
consumerExport: "consumeUserRegisteredEvent"
|
|
120033
|
+
},
|
|
120034
|
+
{
|
|
120035
|
+
definition: userEmailVerifiedEvent,
|
|
120036
|
+
title: "\u7528\u6237\u90AE\u7BB1\u5DF2\u9A8C\u8BC1",
|
|
120037
|
+
description: "\u7528\u6237\u90AE\u7BB1\u4ECE\u672A\u9A8C\u8BC1\u72B6\u6001\u771F\u5B9E\u8F6C\u6362\u4E3A\u5DF2\u9A8C\u8BC1\u72B6\u6001\u3002",
|
|
120038
|
+
consumerExport: "consumeUserEmailVerifiedEvent"
|
|
120039
|
+
},
|
|
120040
|
+
{
|
|
120041
|
+
definition: userProfileUpdatedEvent,
|
|
120042
|
+
title: "\u7528\u6237\u8D44\u6599\u5DF2\u66F4\u65B0",
|
|
120043
|
+
description: "\u7528\u6237\u516C\u5F00\u8D44\u6599\u5B57\u6BB5\u53D1\u751F\u771F\u5B9E\u53D8\u5316\u5E76\u643A\u5E26\u53D8\u66F4\u540E\u7684\u5B8C\u6574\u5B89\u5168\u5FEB\u7167\u3002",
|
|
120044
|
+
consumerExport: "consumeUserProfileUpdatedEvent"
|
|
120045
|
+
},
|
|
120046
|
+
{
|
|
120047
|
+
definition: userSessionCreatedEvent,
|
|
120048
|
+
title: "\u7528\u6237\u4F1A\u8BDD\u65CF\u5DF2\u521B\u5EFA",
|
|
120049
|
+
description: "\u767B\u5F55\u3001\u6CE8\u518C\u6216\u6062\u590D\u6D41\u7A0B\u5DF2\u7ECF\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u6D3B\u52A8\u4F1A\u8BDD\u65CF\u3002",
|
|
120050
|
+
consumerExport: "consumeUserSessionCreatedEvent"
|
|
120051
|
+
},
|
|
120052
|
+
{
|
|
120053
|
+
definition: userSessionRevokedEvent,
|
|
120054
|
+
title: "\u7528\u6237\u4F1A\u8BDD\u65CF\u5DF2\u64A4\u9500",
|
|
120055
|
+
description: "\u7528\u6237\u4F1A\u8BDD\u65CF\u4ECE\u6D3B\u52A8\u72B6\u6001\u771F\u5B9E\u8F6C\u6362\u4E3A\u5DF2\u64A4\u9500\u72B6\u6001\u3002",
|
|
120056
|
+
consumerExport: "consumeUserSessionRevokedEvent"
|
|
120057
|
+
}
|
|
120058
|
+
]
|
|
120059
|
+
});
|
|
120060
|
+
|
|
119929
120061
|
// ../user-shared/dist/index.js
|
|
119930
|
-
var USER_BROWSER_API_PUBLIC_ROUTES = Object.freeze([
|
|
119931
|
-
Object.freeze({
|
|
119932
|
-
exact: "/api/auth/methods",
|
|
119933
|
-
methods: Object.freeze(["GET"]),
|
|
119934
|
-
forwardCookieNames: Object.freeze([])
|
|
119935
|
-
}),
|
|
119936
|
-
Object.freeze({
|
|
119937
|
-
exact: "/api/user/shell",
|
|
119938
|
-
methods: Object.freeze(["GET"]),
|
|
119939
|
-
forwardCookieNames: Object.freeze([USER_SESSION_COOKIE])
|
|
119940
|
-
}),
|
|
119941
|
-
Object.freeze({
|
|
119942
|
-
exact: "/api/user",
|
|
119943
|
-
methods: Object.freeze(["GET", "PATCH"]),
|
|
119944
|
-
forwardCookieNames: Object.freeze([USER_SESSION_COOKIE])
|
|
119945
|
-
}),
|
|
119946
|
-
Object.freeze({
|
|
119947
|
-
exact: "/api/user/sessions",
|
|
119948
|
-
methods: Object.freeze(["GET"]),
|
|
119949
|
-
forwardCookieNames: Object.freeze([USER_SESSION_COOKIE])
|
|
119950
|
-
}),
|
|
119951
|
-
Object.freeze({
|
|
119952
|
-
exact: "/api/auth/transactions",
|
|
119953
|
-
methods: Object.freeze(["POST"]),
|
|
119954
|
-
forwardCookieNames: Object.freeze([])
|
|
119955
|
-
}),
|
|
119956
|
-
Object.freeze({
|
|
119957
|
-
prefix: "/api/auth/transactions/",
|
|
119958
|
-
methods: Object.freeze(["POST"]),
|
|
119959
|
-
forwardCookieNames: Object.freeze([])
|
|
119960
|
-
}),
|
|
119961
|
-
Object.freeze({
|
|
119962
|
-
exact: "/api/auth/logout",
|
|
119963
|
-
methods: Object.freeze(["POST"]),
|
|
119964
|
-
forwardCookieNames: Object.freeze([USER_SESSION_COOKIE])
|
|
119965
|
-
}),
|
|
119966
|
-
Object.freeze({
|
|
119967
|
-
exact: "/api/auth/session/refresh",
|
|
119968
|
-
methods: Object.freeze(["POST"]),
|
|
119969
|
-
forwardCookieNames: Object.freeze([USER_SESSION_COOKIE])
|
|
119970
|
-
}),
|
|
119971
|
-
Object.freeze({
|
|
119972
|
-
prefix: "/api/user/sessions/",
|
|
119973
|
-
methods: Object.freeze(["POST"]),
|
|
119974
|
-
forwardCookieNames: Object.freeze([USER_SESSION_COOKIE])
|
|
119975
|
-
})
|
|
119976
|
-
]);
|
|
119977
120062
|
var USER_ACCOUNT_HREF = "/user.account/account";
|
|
120063
|
+
var USER_BROWSER_AUTH_METHODS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/methods");
|
|
120064
|
+
var USER_BROWSER_AUTH_TRANSACTIONS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/transactions");
|
|
120065
|
+
var USER_BROWSER_LOGOUT_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/logout");
|
|
120066
|
+
var USER_BROWSER_SESSION_REFRESH_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/session/refresh");
|
|
120067
|
+
var USER_BROWSER_USER_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/user");
|
|
120068
|
+
var USER_BROWSER_USER_SESSIONS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/user/sessions");
|
|
119978
120069
|
var USER_BROWSER_API_ERROR_CODES = Object.freeze({
|
|
119979
120070
|
crossOriginRejected: 1001,
|
|
119980
120071
|
requestRejected: 1002,
|
|
@@ -120020,6 +120111,121 @@ var sessionCookieSchema = external_exports.discriminatedUnion("action", [
|
|
|
120020
120111
|
}),
|
|
120021
120112
|
external_exports.strictObject({ action: external_exports.literal("clear") })
|
|
120022
120113
|
]);
|
|
120114
|
+
var sessionTokenSchema = external_exports.string().min(1).max(4096);
|
|
120115
|
+
var authenticationMethodSchema = external_exports.strictObject({
|
|
120116
|
+
id: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
|
|
120117
|
+
label: external_exports.string().trim().min(1).max(80),
|
|
120118
|
+
capabilities: external_exports.strictObject({
|
|
120119
|
+
login: external_exports.boolean(),
|
|
120120
|
+
registration: external_exports.boolean()
|
|
120121
|
+
}),
|
|
120122
|
+
rsc: external_exports.strictObject({
|
|
120123
|
+
pluginId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
|
|
120124
|
+
slots: external_exports.strictObject({
|
|
120125
|
+
login: absolutePath.optional(),
|
|
120126
|
+
registration: absolutePath.optional()
|
|
120127
|
+
})
|
|
120128
|
+
})
|
|
120129
|
+
}).readonly();
|
|
120130
|
+
var userEmptyRequestSchema = external_exports.strictObject({}).readonly();
|
|
120131
|
+
var userAuthenticationCatalogResponseSchema = external_exports.strictObject({
|
|
120132
|
+
methods: external_exports.array(authenticationMethodSchema).max(64).readonly()
|
|
120133
|
+
}).readonly();
|
|
120134
|
+
var userAuthenticationBeginRequestSchema = external_exports.strictObject({
|
|
120135
|
+
methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
|
|
120136
|
+
intent: external_exports.enum(["login", "registration", "linking", "reauthentication", "recovery"]),
|
|
120137
|
+
loginHint: external_exports.string().trim().min(1).max(320).optional(),
|
|
120138
|
+
requestContext: external_exports.strictObject({ clientKey: external_exports.string().min(16).max(128) })
|
|
120139
|
+
}).readonly();
|
|
120140
|
+
var userAuthenticationBeginResponseSchema = external_exports.discriminatedUnion("status", [
|
|
120141
|
+
external_exports.strictObject({
|
|
120142
|
+
status: external_exports.literal("input-required"),
|
|
120143
|
+
transactionId: external_exports.uuid(),
|
|
120144
|
+
methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/)
|
|
120145
|
+
}),
|
|
120146
|
+
external_exports.strictObject({
|
|
120147
|
+
status: external_exports.literal("redirect-required"),
|
|
120148
|
+
transactionId: external_exports.uuid(),
|
|
120149
|
+
methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
|
|
120150
|
+
redirectUrl: external_exports.url().max(4096)
|
|
120151
|
+
}),
|
|
120152
|
+
external_exports.strictObject({
|
|
120153
|
+
status: external_exports.literal("pending"),
|
|
120154
|
+
transactionId: external_exports.uuid(),
|
|
120155
|
+
methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
|
|
120156
|
+
retryAfterMs: external_exports.number().int().min(250).max(6e4)
|
|
120157
|
+
})
|
|
120158
|
+
]).readonly();
|
|
120159
|
+
var userAuthenticationCompleteRequestSchema = external_exports.strictObject({
|
|
120160
|
+
input: external_exports.unknown()
|
|
120161
|
+
}).readonly();
|
|
120162
|
+
var userAuthenticationCompletionResponseSchema = external_exports.discriminatedUnion("status", [
|
|
120163
|
+
external_exports.strictObject({
|
|
120164
|
+
status: external_exports.literal("verified"),
|
|
120165
|
+
session: external_exports.strictObject({ token: sessionTokenSchema, expiresAt: external_exports.iso.datetime({ offset: true }) }),
|
|
120166
|
+
user: external_exports.unknown()
|
|
120167
|
+
}),
|
|
120168
|
+
external_exports.strictObject({ status: external_exports.literal("denied"), code: external_exports.string().min(1).max(128) }),
|
|
120169
|
+
external_exports.strictObject({
|
|
120170
|
+
status: external_exports.literal("pending"),
|
|
120171
|
+
retryAfterMs: external_exports.number().int().min(250).max(6e4)
|
|
120172
|
+
})
|
|
120173
|
+
]).readonly();
|
|
120174
|
+
var userAccountSchema = external_exports.strictObject({
|
|
120175
|
+
id: external_exports.string().min(1).max(128),
|
|
120176
|
+
displayName: external_exports.string().min(1).max(160).optional(),
|
|
120177
|
+
avatar: external_exports.url({ protocol: /^https?$/ }).max(2048).optional(),
|
|
120178
|
+
homepage: external_exports.url({ protocol: /^https?$/ }).max(2048).optional(),
|
|
120179
|
+
bio: external_exports.string().max(500).optional(),
|
|
120180
|
+
email: external_exports.email().max(320).optional(),
|
|
120181
|
+
emailVerified: external_exports.boolean()
|
|
120182
|
+
}).readonly();
|
|
120183
|
+
var userAccountReadResponseSchema = external_exports.strictObject({ user: userAccountSchema }).readonly();
|
|
120184
|
+
var userAccountUpdateRequestSchema = external_exports.strictObject({ input: external_exports.unknown() }).readonly();
|
|
120185
|
+
var userSessionSchema = external_exports.strictObject({
|
|
120186
|
+
id: external_exports.string().min(1).max(128),
|
|
120187
|
+
createdAt: external_exports.iso.datetime(),
|
|
120188
|
+
lastSeenAt: external_exports.iso.datetime(),
|
|
120189
|
+
expiresAt: external_exports.iso.datetime(),
|
|
120190
|
+
revoked: external_exports.boolean()
|
|
120191
|
+
}).readonly();
|
|
120192
|
+
var userAccountSessionsResponseSchema = external_exports.strictObject({
|
|
120193
|
+
sessions: external_exports.array(userSessionSchema).max(100).readonly()
|
|
120194
|
+
}).readonly();
|
|
120195
|
+
var userSessionRevokeResponseSchema = external_exports.strictObject({ revoked: external_exports.boolean() }).readonly();
|
|
120196
|
+
var userLogoutResponseSchema = external_exports.strictObject({ revoked: external_exports.boolean() }).readonly();
|
|
120197
|
+
var userRefreshSessionResponseSchema = external_exports.strictObject({
|
|
120198
|
+
session: external_exports.strictObject({
|
|
120199
|
+
token: sessionTokenSchema,
|
|
120200
|
+
expiresAt: external_exports.iso.datetime({ offset: true }),
|
|
120201
|
+
user: userAccountSchema
|
|
120202
|
+
})
|
|
120203
|
+
}).readonly();
|
|
120204
|
+
var userEventCatalogResponseSchema = external_exports.strictObject({
|
|
120205
|
+
protocol: external_exports.literal("zlooks.event-catalog"),
|
|
120206
|
+
protocolVersion: external_exports.literal(1),
|
|
120207
|
+
providerId: external_exports.literal("user"),
|
|
120208
|
+
displayName: external_exports.string().min(1).max(160),
|
|
120209
|
+
producer: external_exports.literal(USER_SERVICE_NAMESPACE),
|
|
120210
|
+
contractPackage: external_exports.literal("@zlooks.cn/user-shared"),
|
|
120211
|
+
count: external_exports.literal(5),
|
|
120212
|
+
delivery: external_exports.strictObject({
|
|
120213
|
+
guarantee: external_exports.literal("at-least-once"),
|
|
120214
|
+
deduplicateBy: external_exports.literal("eventId")
|
|
120215
|
+
}),
|
|
120216
|
+
events: external_exports.array(external_exports.strictObject({
|
|
120217
|
+
type: external_exports.string().min(1).max(256),
|
|
120218
|
+
title: external_exports.string().min(1).max(160),
|
|
120219
|
+
description: external_exports.string().min(1).max(1e3),
|
|
120220
|
+
producer: external_exports.literal(USER_SERVICE_NAMESPACE),
|
|
120221
|
+
aggregateType: external_exports.string().min(1).max(128),
|
|
120222
|
+
consumer: external_exports.strictObject({
|
|
120223
|
+
packageName: external_exports.literal("@zlooks.cn/user-shared"),
|
|
120224
|
+
exportName: external_exports.string().min(1).max(128)
|
|
120225
|
+
}),
|
|
120226
|
+
dataSchema: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
120227
|
+
})).length(5).readonly()
|
|
120228
|
+
}).readonly();
|
|
120023
120229
|
var userCurrentUserRequestSchema = external_exports.strictObject({}).readonly();
|
|
120024
120230
|
var userPublicProfileSchema = external_exports.strictObject({
|
|
120025
120231
|
id: external_exports.uuid(),
|
|
@@ -120040,7 +120246,9 @@ var userPublicProfilesRequestSchema = external_exports.strictObject({
|
|
|
120040
120246
|
userIds: external_exports.array(external_exports.uuid()).min(1).max(100).refine((userIds) => new Set(userIds).size === userIds.length, { message: "User IDs must be unique" }).readonly()
|
|
120041
120247
|
}).readonly();
|
|
120042
120248
|
var userPublicProfilesResponseSchema = external_exports.strictObject({
|
|
120043
|
-
users: external_exports.array(userPublicProfileSchema).max(100).refine((users) => new Set(users.map((user) => user.id)).size === users.length, {
|
|
120249
|
+
users: external_exports.array(userPublicProfileSchema).max(100).refine((users) => new Set(users.map((user) => user.id)).size === users.length, {
|
|
120250
|
+
message: "Public user profiles must be unique"
|
|
120251
|
+
}).readonly()
|
|
120044
120252
|
}).readonly();
|
|
120045
120253
|
var userBrowserApiRequestSchema = external_exports.strictObject({
|
|
120046
120254
|
method: external_exports.enum(["GET", "POST", "PATCH"]),
|
|
@@ -120049,24 +120257,6 @@ var userBrowserApiRequestSchema = external_exports.strictObject({
|
|
|
120049
120257
|
clientKey: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
120050
120258
|
body: external_exports.unknown().optional()
|
|
120051
120259
|
}).readonly();
|
|
120052
|
-
var userBrowserApiProviderRequestSchema = external_exports.strictObject({
|
|
120053
|
-
method: external_exports.enum(["GET", "POST", "PATCH"]),
|
|
120054
|
-
path: absolutePath,
|
|
120055
|
-
origin: external_exports.string().max(2048).optional(),
|
|
120056
|
-
clientKey: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
120057
|
-
body: external_exports.unknown().optional()
|
|
120058
|
-
}).readonly();
|
|
120059
|
-
var userBrowserApiProviderResponseSchema = browserApiDispatchResponseSchema.superRefine((response, context) => {
|
|
120060
|
-
for (const [index, effect] of (response.cookieEffects ?? []).entries()) {
|
|
120061
|
-
if (effect.name === USER_SESSION_COOKIE)
|
|
120062
|
-
continue;
|
|
120063
|
-
context.addIssue({
|
|
120064
|
-
code: "custom",
|
|
120065
|
-
message: "User Browser API may only mutate its declared session cookie",
|
|
120066
|
-
path: ["cookieEffects", index, "name"]
|
|
120067
|
-
});
|
|
120068
|
-
}
|
|
120069
|
-
}).readonly();
|
|
120070
120260
|
var userBrowserApiResponseSchema = external_exports.strictObject({
|
|
120071
120261
|
status: external_exports.number().int().min(200).max(599).refine((status) => status < 300 || status >= 400),
|
|
120072
120262
|
body: browserApiResponseSchema,
|
|
@@ -120094,6 +120284,9 @@ var userCredentialLifecycleEventSchema = external_exports.strictObject({
|
|
|
120094
120284
|
var userCredentialLifecycleResponseSchema = external_exports.strictObject({
|
|
120095
120285
|
acknowledged: external_exports.literal(true)
|
|
120096
120286
|
}).readonly();
|
|
120287
|
+
function userBrowserTransactionCompletePath(transactionId) {
|
|
120288
|
+
return `${USER_BROWSER_AUTH_TRANSACTIONS_PATH}/${encodeURIComponent(external_exports.string().trim().min(1).max(128).parse(transactionId))}/complete`;
|
|
120289
|
+
}
|
|
120097
120290
|
|
|
120098
120291
|
// src/plugin/password-form.tsx
|
|
120099
120292
|
var import_antd = __toESM(require_lib48(), 1);
|
|
@@ -120156,7 +120349,7 @@ function PasswordForm(props) {
|
|
|
120156
120349
|
if (countdown <= 0) return;
|
|
120157
120350
|
const timer = window.setInterval(() => setCountdown((value) => Math.max(0, value - 1)), 1e3);
|
|
120158
120351
|
return () => window.clearInterval(timer);
|
|
120159
|
-
}, [countdown
|
|
120352
|
+
}, [countdown]);
|
|
120160
120353
|
async function ensureTransaction() {
|
|
120161
120354
|
if (transactionId) return transactionId;
|
|
120162
120355
|
const created = await beginTransaction(request, props.intent);
|
|
@@ -120171,7 +120364,7 @@ function PasswordForm(props) {
|
|
|
120171
120364
|
const requestId = pendingSend.current?.email === email ? pendingSend.current.requestId : crypto.randomUUID();
|
|
120172
120365
|
pendingSend.current = { email, requestId };
|
|
120173
120366
|
const challenge = await request(
|
|
120174
|
-
|
|
120367
|
+
userBrowserTransactionCompletePath(currentTransactionId),
|
|
120175
120368
|
{
|
|
120176
120369
|
method: "POST",
|
|
120177
120370
|
headers: { "content-type": "application/json" },
|
|
@@ -120199,12 +120392,16 @@ function PasswordForm(props) {
|
|
|
120199
120392
|
code: values.code,
|
|
120200
120393
|
...needsPassword ? { password: values.password } : {}
|
|
120201
120394
|
} : { action: "password-login", email: values.email, password: values.password };
|
|
120202
|
-
await request(
|
|
120203
|
-
|
|
120204
|
-
|
|
120205
|
-
|
|
120206
|
-
|
|
120207
|
-
|
|
120395
|
+
await request(
|
|
120396
|
+
userBrowserTransactionCompletePath(currentTransactionId),
|
|
120397
|
+
{
|
|
120398
|
+
method: "POST",
|
|
120399
|
+
headers: { "content-type": "application/json" },
|
|
120400
|
+
credentials: "same-origin",
|
|
120401
|
+
body: JSON.stringify({ input })
|
|
120402
|
+
},
|
|
120403
|
+
{ errorMessage: "\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165\u540E\u91CD\u8BD5", parse: parseAuthenticationCompletion }
|
|
120404
|
+
);
|
|
120208
120405
|
if (props.intent === "registration") {
|
|
120209
120406
|
navigation.replace(USER_ACCOUNT_HREF);
|
|
120210
120407
|
return;
|
|
@@ -120246,7 +120443,10 @@ function PasswordForm(props) {
|
|
|
120246
120443
|
{
|
|
120247
120444
|
"aria-label": "\u9009\u62E9\u767B\u5F55\u65B9\u5F0F",
|
|
120248
120445
|
block: true,
|
|
120249
|
-
options: [
|
|
120446
|
+
options: [
|
|
120447
|
+
{ label: "\u5BC6\u7801\u767B\u5F55", value: "password" },
|
|
120448
|
+
{ label: "\u9A8C\u8BC1\u7801\u767B\u5F55", value: "code" }
|
|
120449
|
+
],
|
|
120250
120450
|
size: "large",
|
|
120251
120451
|
value: mode,
|
|
120252
120452
|
onChange: (value) => {
|
|
@@ -120259,7 +120459,18 @@ function PasswordForm(props) {
|
|
|
120259
120459
|
}
|
|
120260
120460
|
}
|
|
120261
120461
|
) }) : null,
|
|
120262
|
-
/* @__PURE__ */ jsx(import_antd.Form.Item, { label: "\u90AE\u7BB1", name: "email", rules: emailRules, children: /* @__PURE__ */ jsx(
|
|
120462
|
+
/* @__PURE__ */ jsx(import_antd.Form.Item, { label: "\u90AE\u7BB1", name: "email", rules: emailRules, children: /* @__PURE__ */ jsx(
|
|
120463
|
+
import_antd.Input,
|
|
120464
|
+
{
|
|
120465
|
+
autoComplete: "username",
|
|
120466
|
+
disabled: codeSent,
|
|
120467
|
+
inputMode: "email",
|
|
120468
|
+
maxLength: 320,
|
|
120469
|
+
placeholder: "name@example.com",
|
|
120470
|
+
size: "large",
|
|
120471
|
+
type: "email"
|
|
120472
|
+
}
|
|
120473
|
+
) }),
|
|
120263
120474
|
codeSent ? /* @__PURE__ */ jsx(
|
|
120264
120475
|
import_antd.Button,
|
|
120265
120476
|
{
|
|
@@ -120278,7 +120489,29 @@ function PasswordForm(props) {
|
|
|
120278
120489
|
}
|
|
120279
120490
|
) : null,
|
|
120280
120491
|
usesCode ? /* @__PURE__ */ jsx(import_antd.Form.Item, { label: "\u9A8C\u8BC1\u7801", required: true, children: /* @__PURE__ */ jsxs("div", { className: password_form_default.codeRow, children: [
|
|
120281
|
-
/* @__PURE__ */ jsx(
|
|
120492
|
+
/* @__PURE__ */ jsx(
|
|
120493
|
+
import_antd.Form.Item,
|
|
120494
|
+
{
|
|
120495
|
+
noStyle: true,
|
|
120496
|
+
name: "code",
|
|
120497
|
+
rules: [
|
|
120498
|
+
{ required: true, message: "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801" },
|
|
120499
|
+
{ len: 6, message: "\u9A8C\u8BC1\u7801\u5E94\u4E3A 6 \u4F4D\u6570\u5B57" },
|
|
120500
|
+
{ pattern: /^\d{6}$/, message: "\u9A8C\u8BC1\u7801\u5E94\u4E3A 6 \u4F4D\u6570\u5B57" }
|
|
120501
|
+
],
|
|
120502
|
+
children: /* @__PURE__ */ jsx(
|
|
120503
|
+
import_antd.Input,
|
|
120504
|
+
{
|
|
120505
|
+
"aria-label": "\u9A8C\u8BC1\u7801",
|
|
120506
|
+
autoComplete: "one-time-code",
|
|
120507
|
+
inputMode: "numeric",
|
|
120508
|
+
maxLength: 6,
|
|
120509
|
+
placeholder: "6 \u4F4D\u9A8C\u8BC1\u7801",
|
|
120510
|
+
size: "large"
|
|
120511
|
+
}
|
|
120512
|
+
)
|
|
120513
|
+
}
|
|
120514
|
+
),
|
|
120282
120515
|
/* @__PURE__ */ jsx(import_antd.Button, { disabled: countdown > 0 || submitting, loading: sending, onClick: sendCode, size: "large", children: countdown > 0 ? `${countdown} \u79D2\u540E\u91CD\u53D1` : codeSent ? "\u91CD\u65B0\u53D1\u9001" : "\u53D1\u9001\u9A8C\u8BC1\u7801" })
|
|
120283
120516
|
] }) }) : null,
|
|
120284
120517
|
needsPassword ? /* @__PURE__ */ jsx(
|
|
@@ -120299,7 +120532,18 @@ function PasswordForm(props) {
|
|
|
120299
120532
|
)
|
|
120300
120533
|
}
|
|
120301
120534
|
) : null,
|
|
120302
|
-
/* @__PURE__ */ jsx(
|
|
120535
|
+
/* @__PURE__ */ jsx(
|
|
120536
|
+
import_antd.Button,
|
|
120537
|
+
{
|
|
120538
|
+
block: true,
|
|
120539
|
+
htmlType: "submit",
|
|
120540
|
+
loading: submitting,
|
|
120541
|
+
size: "large",
|
|
120542
|
+
type: "primary",
|
|
120543
|
+
disabled: sending || usesCode && !codeSent,
|
|
120544
|
+
children: copy.submit
|
|
120545
|
+
}
|
|
120546
|
+
)
|
|
120303
120547
|
]
|
|
120304
120548
|
}
|
|
120305
120549
|
) }),
|
|
@@ -120313,14 +120557,16 @@ function PasswordForm(props) {
|
|
|
120313
120557
|
);
|
|
120314
120558
|
}
|
|
120315
120559
|
function AlternateLinks({ intent }) {
|
|
120316
|
-
if (intent === "registration")
|
|
120317
|
-
"
|
|
120318
|
-
|
|
120319
|
-
|
|
120320
|
-
|
|
120321
|
-
|
|
120322
|
-
/* @__PURE__ */
|
|
120323
|
-
|
|
120560
|
+
if (intent === "registration")
|
|
120561
|
+
return /* @__PURE__ */ jsxs("p", { className: password_form_default.alternate, children: [
|
|
120562
|
+
"\u5DF2\u7ECF\u6709\u8D26\u53F7\uFF1F",
|
|
120563
|
+
/* @__PURE__ */ jsx(RscLink, { href: "/auth.password/login", children: "\u8FD4\u56DE\u767B\u5F55" })
|
|
120564
|
+
] });
|
|
120565
|
+
if (intent === "recovery")
|
|
120566
|
+
return /* @__PURE__ */ jsxs("p", { className: password_form_default.alternate, children: [
|
|
120567
|
+
"\u60F3\u8D77\u5BC6\u7801\u4E86\uFF1F",
|
|
120568
|
+
/* @__PURE__ */ jsx(RscLink, { href: "/auth.password/login", children: "\u8FD4\u56DE\u767B\u5F55" })
|
|
120569
|
+
] });
|
|
120324
120570
|
return /* @__PURE__ */ jsxs("div", { className: password_form_default.alternateLinks, children: [
|
|
120325
120571
|
/* @__PURE__ */ jsxs("p", { children: [
|
|
120326
120572
|
/* @__PURE__ */ jsx("span", { children: "\u8FD8\u6CA1\u6709\u8D26\u6237\uFF1F" }),
|
|
@@ -120333,12 +120579,16 @@ function AlternateLinks({ intent }) {
|
|
|
120333
120579
|
] });
|
|
120334
120580
|
}
|
|
120335
120581
|
async function beginTransaction(request, intent) {
|
|
120336
|
-
return request(
|
|
120337
|
-
|
|
120338
|
-
|
|
120339
|
-
|
|
120340
|
-
|
|
120341
|
-
|
|
120582
|
+
return request(
|
|
120583
|
+
USER_BROWSER_AUTH_TRANSACTIONS_PATH,
|
|
120584
|
+
{
|
|
120585
|
+
method: "POST",
|
|
120586
|
+
headers: { "content-type": "application/json" },
|
|
120587
|
+
credentials: "same-origin",
|
|
120588
|
+
body: JSON.stringify({ methodId: "password", intent })
|
|
120589
|
+
},
|
|
120590
|
+
{ errorMessage: "\u6682\u65F6\u65E0\u6CD5\u7EE7\u7EED\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5", parse: parseTransactionId }
|
|
120591
|
+
);
|
|
120342
120592
|
}
|
|
120343
120593
|
function parseTransactionId(data) {
|
|
120344
120594
|
if (data === null || typeof data !== "object" || Array.isArray(data)) throw new Error("Invalid transaction response");
|
|
@@ -120356,31 +120606,35 @@ var emailRules = [
|
|
|
120356
120606
|
function passwordRules(requireMinimum) {
|
|
120357
120607
|
return [
|
|
120358
120608
|
{ required: true, message: "\u8BF7\u8F93\u5165\u5BC6\u7801" },
|
|
120359
|
-
...requireMinimum ? [
|
|
120360
|
-
|
|
120361
|
-
|
|
120362
|
-
|
|
120363
|
-
|
|
120609
|
+
...requireMinimum ? [
|
|
120610
|
+
{
|
|
120611
|
+
validator: async (_rule, value) => {
|
|
120612
|
+
if (!value) return;
|
|
120613
|
+
if (Array.from(value).length < 12) throw new Error("\u5BC6\u7801\u81F3\u5C11\u9700\u8981 12 \u4E2A\u5B57\u7B26");
|
|
120614
|
+
if (new TextEncoder().encode(value).byteLength > 128) throw new Error("\u5BC6\u7801\u8FC7\u957F\uFF0C\u8BF7\u7F29\u77ED\u540E\u91CD\u8BD5");
|
|
120615
|
+
}
|
|
120364
120616
|
}
|
|
120365
|
-
|
|
120617
|
+
] : [{ max: 128, message: "\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 128 \u4E2A\u5B57\u7B26" }]
|
|
120366
120618
|
];
|
|
120367
120619
|
}
|
|
120368
120620
|
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
120369
120621
|
function pageCopy(intent) {
|
|
120370
|
-
if (intent === "registration")
|
|
120371
|
-
|
|
120372
|
-
|
|
120373
|
-
|
|
120374
|
-
|
|
120375
|
-
|
|
120376
|
-
|
|
120377
|
-
|
|
120378
|
-
|
|
120379
|
-
|
|
120380
|
-
|
|
120381
|
-
|
|
120382
|
-
|
|
120383
|
-
|
|
120622
|
+
if (intent === "registration")
|
|
120623
|
+
return {
|
|
120624
|
+
introduction: "\u9A8C\u8BC1\u90AE\u7BB1\u5E76\u521B\u5EFA\u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u5B8C\u5584\u8D44\u6599\uFF0C\u6574\u7406\u5C5E\u4E8E\u4F60\u7684\u8BB0\u5F55\u3002",
|
|
120625
|
+
step: "ACCOUNT / REGISTER",
|
|
120626
|
+
title: "\u521B\u5EFA\u8D26\u6237",
|
|
120627
|
+
description: "\u4F7F\u7528\u90AE\u7BB1\u9A8C\u8BC1\u7801\u548C\u5BC6\u7801\u521B\u5EFA\u8D26\u53F7\u3002",
|
|
120628
|
+
submit: "\u521B\u5EFA\u8D26\u53F7"
|
|
120629
|
+
};
|
|
120630
|
+
if (intent === "recovery")
|
|
120631
|
+
return {
|
|
120632
|
+
introduction: "\u9A8C\u8BC1\u6CE8\u518C\u90AE\u7BB1\u540E\u8BBE\u7F6E\u65B0\u5BC6\u7801\uFF0C\u65E7\u8BBE\u5907\u4E0A\u7684\u767B\u5F55\u4F1A\u81EA\u52A8\u9000\u51FA\u3002",
|
|
120633
|
+
step: "ACCOUNT / RECOVERY",
|
|
120634
|
+
title: "\u627E\u56DE\u5BC6\u7801",
|
|
120635
|
+
description: "\u9A8C\u8BC1\u7801\u53EA\u4F1A\u53D1\u9001\u5230\u5DF2\u7ECF\u6CE8\u518C\u7684\u90AE\u7BB1\u3002",
|
|
120636
|
+
submit: "\u66F4\u65B0\u5BC6\u7801\u5E76\u767B\u5F55"
|
|
120637
|
+
};
|
|
120384
120638
|
return {
|
|
120385
120639
|
introduction: "\u767B\u5F55\u540E\u53EF\u4EE5\u7BA1\u7406\u4E2A\u4EBA\u8D44\u6599\u4E0E\u767B\u5F55\u4F1A\u8BDD\u3002",
|
|
120386
120640
|
step: "ACCOUNT / SIGN IN",
|