@notificationapi/react 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AntdIcon.js +4 -4
- package/dist/assets/Notification.js +3094 -2713
- package/dist/assets/PurePanel.js +2 -2
- package/dist/assets/RightOutlined.js +1 -1
- package/dist/assets/button.js +1394 -577
- package/dist/assets/channelUtils.js +1 -1
- package/dist/assets/colors.js +14798 -14301
- package/dist/assets/index.js +156 -158
- package/dist/assets/index2.js +212 -221
- package/dist/assets/index3.js +8307 -724
- package/dist/assets/pickAttrs.js +1 -1
- package/dist/assets/presets.js +810 -0
- package/dist/components/Notifications/Inbox.js +3520 -3323
- package/dist/components/Notifications/InboxHeader.d.ts +1 -2
- package/dist/components/Notifications/InboxHeader.js +2 -2
- package/dist/components/Notifications/Notification.js +1 -1
- package/dist/components/Notifications/NotificationFeed.js +1 -2
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -2
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +1 -2
- package/dist/components/Preferences/NotificationPreferencesPopup.js +1423 -857
- package/dist/components/Preferences/PreferenceInput.d.ts +1 -1
- package/dist/components/Preferences/PreferenceInput.js +843 -812
- package/dist/components/Preferences/Preferences.d.ts +1 -2
- package/dist/components/Preferences/Preferences.js +331 -328
- package/dist/components/Preferences/channelUtils.js +1 -1
- package/dist/components/Provider/index.js +77 -80
- package/package.json +5 -5
- package/dist/assets/index4.js +0 -8408
|
@@ -1,609 +1,1155 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Preferences as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { jsx as Te } from "react/jsx-runtime";
|
|
2
|
+
import { Preferences as Mt } from "./Preferences.js";
|
|
3
|
+
import { _ as G, K as ye, x as Bt, y as zt, d as Ze, g as Ye, m as Je, u as P, a as _, t as Ft, z as et, A as Ht, r as kt, k as At, e as xe, w as Dt, B as Lt, C as tt, l as _t, E as Vt, F as Wt, G as nt, H as qt } from "../../assets/colors.js";
|
|
4
4
|
import * as l from "react";
|
|
5
|
-
import
|
|
6
|
-
import { p as
|
|
7
|
-
import { a as D, c as
|
|
8
|
-
import { I as
|
|
9
|
-
import { B as
|
|
10
|
-
import { R as
|
|
11
|
-
import { p as
|
|
12
|
-
var
|
|
13
|
-
return /* @__PURE__ */ l.createElement(
|
|
14
|
-
ref:
|
|
15
|
-
icon:
|
|
5
|
+
import h, { useContext as ne, useRef as X, useMemo as Gt, useEffect as Me } from "react";
|
|
6
|
+
import { p as Ut, q as Xt, K as Be, r as Kt, o as $e, s as Ee, i as Qt, h as ot, v as Zt, w as Yt, z as Jt, d as ie, x as en, y as tn, A as nn, B as on } from "../../assets/index3.js";
|
|
7
|
+
import { a as D, c as E, _ as j, b as ze, e as Se, i as Fe, j as He, k as an } from "../../assets/presets.js";
|
|
8
|
+
import { I as Oe } from "../../assets/AntdIcon.js";
|
|
9
|
+
import { B as Ne, c as at } from "../../assets/button.js";
|
|
10
|
+
import { R as we, w as ln } from "../../assets/PurePanel.js";
|
|
11
|
+
import { p as Pe } from "../../assets/pickAttrs.js";
|
|
12
|
+
var rn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" }, sn = function(t, n) {
|
|
13
|
+
return /* @__PURE__ */ l.createElement(Oe, D({}, t, {
|
|
14
|
+
ref: n,
|
|
15
|
+
icon: rn
|
|
16
16
|
}));
|
|
17
|
-
},
|
|
18
|
-
process.env.NODE_ENV !== "production" && (
|
|
19
|
-
var
|
|
20
|
-
return /* @__PURE__ */ l.createElement(
|
|
21
|
-
ref:
|
|
22
|
-
icon:
|
|
17
|
+
}, lt = /* @__PURE__ */ l.forwardRef(sn);
|
|
18
|
+
process.env.NODE_ENV !== "production" && (lt.displayName = "CheckCircleFilled");
|
|
19
|
+
var cn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" }, dn = function(t, n) {
|
|
20
|
+
return /* @__PURE__ */ l.createElement(Oe, D({}, t, {
|
|
21
|
+
ref: n,
|
|
22
|
+
icon: cn
|
|
23
23
|
}));
|
|
24
|
-
},
|
|
25
|
-
process.env.NODE_ENV !== "production" && (
|
|
26
|
-
var
|
|
27
|
-
return /* @__PURE__ */ l.createElement(
|
|
28
|
-
ref:
|
|
29
|
-
icon:
|
|
24
|
+
}, rt = /* @__PURE__ */ l.forwardRef(dn);
|
|
25
|
+
process.env.NODE_ENV !== "production" && (rt.displayName = "ExclamationCircleFilled");
|
|
26
|
+
var un = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, fn = function(t, n) {
|
|
27
|
+
return /* @__PURE__ */ l.createElement(Oe, D({}, t, {
|
|
28
|
+
ref: n,
|
|
29
|
+
icon: un
|
|
30
30
|
}));
|
|
31
|
-
},
|
|
32
|
-
process.env.NODE_ENV !== "production" && (
|
|
33
|
-
function
|
|
34
|
-
const [e,
|
|
35
|
-
|
|
31
|
+
}, it = /* @__PURE__ */ l.forwardRef(fn);
|
|
32
|
+
process.env.NODE_ENV !== "production" && (it.displayName = "InfoCircleFilled");
|
|
33
|
+
function mn() {
|
|
34
|
+
const [e, t] = l.useState([]), n = l.useCallback((o) => (t((a) => [].concat(G(a), [o])), () => {
|
|
35
|
+
t((a) => a.filter((r) => r !== o));
|
|
36
36
|
}), []);
|
|
37
|
-
return [e,
|
|
37
|
+
return [e, n];
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const gn = new ye("antFadeIn", {
|
|
40
|
+
"0%": {
|
|
41
|
+
opacity: 0
|
|
42
|
+
},
|
|
43
|
+
"100%": {
|
|
44
|
+
opacity: 1
|
|
45
|
+
}
|
|
46
|
+
}), Cn = new ye("antFadeOut", {
|
|
47
|
+
"0%": {
|
|
48
|
+
opacity: 1
|
|
49
|
+
},
|
|
50
|
+
"100%": {
|
|
51
|
+
opacity: 0
|
|
52
|
+
}
|
|
53
|
+
}), vn = function(e) {
|
|
54
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
55
|
+
const {
|
|
56
|
+
antCls: n
|
|
57
|
+
} = e, o = `${n}-fade`, a = t ? "&" : "";
|
|
58
|
+
return [Ut(o, gn, Cn, e.motionDurationMid, t), {
|
|
59
|
+
[`
|
|
60
|
+
${a}${o}-enter,
|
|
61
|
+
${a}${o}-appear
|
|
62
|
+
`]: {
|
|
63
|
+
opacity: 0,
|
|
64
|
+
animationTimingFunction: "linear"
|
|
65
|
+
},
|
|
66
|
+
[`${a}${o}-leave`]: {
|
|
67
|
+
animationTimingFunction: "linear"
|
|
68
|
+
}
|
|
69
|
+
}];
|
|
70
|
+
};
|
|
71
|
+
function ge(e) {
|
|
72
|
+
return !!(e != null && e.then);
|
|
41
73
|
}
|
|
42
|
-
const
|
|
74
|
+
const st = (e) => {
|
|
43
75
|
const {
|
|
44
|
-
type:
|
|
45
|
-
children:
|
|
76
|
+
type: t,
|
|
77
|
+
children: n,
|
|
46
78
|
prefixCls: o,
|
|
47
79
|
buttonProps: a,
|
|
48
80
|
close: r,
|
|
49
|
-
autoFocus:
|
|
50
|
-
emitEvent:
|
|
51
|
-
isSilent:
|
|
52
|
-
quitOnNullishReturnValue:
|
|
53
|
-
actionFn:
|
|
54
|
-
} = e, f = l.useRef(!1),
|
|
81
|
+
autoFocus: d,
|
|
82
|
+
emitEvent: c,
|
|
83
|
+
isSilent: i,
|
|
84
|
+
quitOnNullishReturnValue: u,
|
|
85
|
+
actionFn: s
|
|
86
|
+
} = e, f = l.useRef(!1), g = l.useRef(null), [v, b] = Bt(!1), m = function() {
|
|
55
87
|
r == null || r.apply(void 0, arguments);
|
|
56
88
|
};
|
|
57
89
|
l.useEffect(() => {
|
|
58
|
-
let
|
|
59
|
-
return
|
|
90
|
+
let C = null;
|
|
91
|
+
return d && (C = setTimeout(() => {
|
|
60
92
|
var y;
|
|
61
|
-
(y =
|
|
93
|
+
(y = g.current) === null || y === void 0 || y.focus();
|
|
62
94
|
})), () => {
|
|
63
|
-
|
|
95
|
+
C && clearTimeout(C);
|
|
64
96
|
};
|
|
65
97
|
}, []);
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
98
|
+
const x = (C) => {
|
|
99
|
+
ge(C) && (b(!0), C.then(function() {
|
|
100
|
+
b(!1, !0), m.apply(void 0, arguments), f.current = !1;
|
|
69
101
|
}, (y) => {
|
|
70
|
-
if (
|
|
102
|
+
if (b(!1, !0), f.current = !1, !(i != null && i()))
|
|
71
103
|
return Promise.reject(y);
|
|
72
104
|
}));
|
|
73
|
-
}, p = (
|
|
105
|
+
}, p = (C) => {
|
|
74
106
|
if (f.current)
|
|
75
107
|
return;
|
|
76
|
-
if (f.current = !0, !
|
|
77
|
-
|
|
108
|
+
if (f.current = !0, !s) {
|
|
109
|
+
m();
|
|
78
110
|
return;
|
|
79
111
|
}
|
|
80
112
|
let y;
|
|
81
|
-
if (
|
|
82
|
-
if (y =
|
|
83
|
-
f.current = !1, C
|
|
113
|
+
if (c) {
|
|
114
|
+
if (y = s(C), u && !ge(y)) {
|
|
115
|
+
f.current = !1, m(C);
|
|
84
116
|
return;
|
|
85
117
|
}
|
|
86
|
-
} else if (
|
|
87
|
-
y =
|
|
88
|
-
else if (y =
|
|
89
|
-
|
|
118
|
+
} else if (s.length)
|
|
119
|
+
y = s(r), f.current = !1;
|
|
120
|
+
else if (y = s(), !ge(y)) {
|
|
121
|
+
m();
|
|
90
122
|
return;
|
|
91
123
|
}
|
|
92
|
-
|
|
124
|
+
x(y);
|
|
93
125
|
};
|
|
94
|
-
return /* @__PURE__ */ l.createElement(
|
|
126
|
+
return /* @__PURE__ */ l.createElement(Ne, Object.assign({}, at(t), {
|
|
95
127
|
onClick: p,
|
|
96
|
-
loading:
|
|
128
|
+
loading: v,
|
|
97
129
|
prefixCls: o
|
|
98
130
|
}, a, {
|
|
99
|
-
ref:
|
|
100
|
-
}),
|
|
101
|
-
},
|
|
102
|
-
Provider:
|
|
103
|
-
} =
|
|
131
|
+
ref: g
|
|
132
|
+
}), n);
|
|
133
|
+
}, oe = /* @__PURE__ */ h.createContext({}), {
|
|
134
|
+
Provider: ct
|
|
135
|
+
} = oe, ke = () => {
|
|
104
136
|
const {
|
|
105
137
|
autoFocusButton: e,
|
|
106
|
-
cancelButtonProps:
|
|
107
|
-
cancelTextLocale:
|
|
138
|
+
cancelButtonProps: t,
|
|
139
|
+
cancelTextLocale: n,
|
|
108
140
|
isSilent: o,
|
|
109
141
|
mergedOkCancel: a,
|
|
110
142
|
rootPrefixCls: r,
|
|
111
|
-
close:
|
|
112
|
-
onCancel:
|
|
113
|
-
onConfirm:
|
|
114
|
-
} =
|
|
115
|
-
return a ? /* @__PURE__ */
|
|
143
|
+
close: d,
|
|
144
|
+
onCancel: c,
|
|
145
|
+
onConfirm: i
|
|
146
|
+
} = ne(oe);
|
|
147
|
+
return a ? /* @__PURE__ */ h.createElement(st, {
|
|
116
148
|
isSilent: o,
|
|
117
|
-
actionFn:
|
|
149
|
+
actionFn: c,
|
|
118
150
|
close: function() {
|
|
119
|
-
|
|
151
|
+
d == null || d.apply(void 0, arguments), i == null || i(!1);
|
|
120
152
|
},
|
|
121
153
|
autoFocus: e === "cancel",
|
|
122
|
-
buttonProps:
|
|
154
|
+
buttonProps: t,
|
|
123
155
|
prefixCls: `${r}-btn`
|
|
124
|
-
},
|
|
125
|
-
},
|
|
156
|
+
}, n) : null;
|
|
157
|
+
}, Ae = () => {
|
|
126
158
|
const {
|
|
127
159
|
autoFocusButton: e,
|
|
128
|
-
close:
|
|
129
|
-
isSilent:
|
|
160
|
+
close: t,
|
|
161
|
+
isSilent: n,
|
|
130
162
|
okButtonProps: o,
|
|
131
163
|
rootPrefixCls: a,
|
|
132
164
|
okTextLocale: r,
|
|
133
|
-
okType:
|
|
134
|
-
onConfirm:
|
|
135
|
-
onOk:
|
|
136
|
-
} =
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
isSilent:
|
|
139
|
-
type:
|
|
140
|
-
actionFn:
|
|
165
|
+
okType: d,
|
|
166
|
+
onConfirm: c,
|
|
167
|
+
onOk: i
|
|
168
|
+
} = ne(oe);
|
|
169
|
+
return /* @__PURE__ */ h.createElement(st, {
|
|
170
|
+
isSilent: n,
|
|
171
|
+
type: d || "primary",
|
|
172
|
+
actionFn: i,
|
|
141
173
|
close: function() {
|
|
142
|
-
|
|
174
|
+
t == null || t.apply(void 0, arguments), c == null || c(!0);
|
|
143
175
|
},
|
|
144
176
|
autoFocus: e === "ok",
|
|
145
177
|
buttonProps: o,
|
|
146
178
|
prefixCls: `${a}-btn`
|
|
147
179
|
}, r);
|
|
148
180
|
};
|
|
149
|
-
var
|
|
150
|
-
function
|
|
151
|
-
var o =
|
|
152
|
-
return !o &&
|
|
181
|
+
var dt = /* @__PURE__ */ l.createContext({});
|
|
182
|
+
function De(e, t, n) {
|
|
183
|
+
var o = t;
|
|
184
|
+
return !o && n && (o = "".concat(e, "-").concat(n)), o;
|
|
153
185
|
}
|
|
154
|
-
function
|
|
155
|
-
var
|
|
156
|
-
if (typeof
|
|
186
|
+
function Le(e, t) {
|
|
187
|
+
var n = e["page".concat(t ? "Y" : "X", "Offset")], o = "scroll".concat(t ? "Top" : "Left");
|
|
188
|
+
if (typeof n != "number") {
|
|
157
189
|
var a = e.document;
|
|
158
|
-
|
|
190
|
+
n = a.documentElement[o], typeof n != "number" && (n = a.body[o]);
|
|
159
191
|
}
|
|
160
|
-
return
|
|
192
|
+
return n;
|
|
161
193
|
}
|
|
162
|
-
function
|
|
163
|
-
var
|
|
164
|
-
left:
|
|
165
|
-
top:
|
|
194
|
+
function bn(e) {
|
|
195
|
+
var t = e.getBoundingClientRect(), n = {
|
|
196
|
+
left: t.left,
|
|
197
|
+
top: t.top
|
|
166
198
|
}, o = e.ownerDocument, a = o.defaultView || o.parentWindow;
|
|
167
|
-
return
|
|
199
|
+
return n.left += Le(a), n.top += Le(a, !0), n;
|
|
168
200
|
}
|
|
169
|
-
const
|
|
170
|
-
var
|
|
171
|
-
return
|
|
172
|
-
}, function(e,
|
|
173
|
-
var
|
|
174
|
-
return !
|
|
201
|
+
const pn = /* @__PURE__ */ l.memo(function(e) {
|
|
202
|
+
var t = e.children;
|
|
203
|
+
return t;
|
|
204
|
+
}, function(e, t) {
|
|
205
|
+
var n = t.shouldUpdate;
|
|
206
|
+
return !n;
|
|
175
207
|
});
|
|
176
|
-
var
|
|
208
|
+
var hn = {
|
|
177
209
|
width: 0,
|
|
178
210
|
height: 0,
|
|
179
211
|
overflow: "hidden",
|
|
180
212
|
outline: "none"
|
|
181
|
-
},
|
|
213
|
+
}, yn = {
|
|
182
214
|
outline: "none"
|
|
183
|
-
},
|
|
184
|
-
var
|
|
185
|
-
|
|
215
|
+
}, Ie = /* @__PURE__ */ h.forwardRef(function(e, t) {
|
|
216
|
+
var n = e.prefixCls, o = e.className, a = e.style, r = e.title, d = e.ariaId, c = e.footer, i = e.closable, u = e.closeIcon, s = e.onClose, f = e.children, g = e.bodyStyle, v = e.bodyProps, b = e.modalRender, m = e.onMouseDown, x = e.onMouseUp, p = e.holderRef, C = e.visible, y = e.forceRender, $ = e.width, N = e.height, O = e.classNames, S = e.styles, R = h.useContext(dt), w = R.panel, z = zt(p, w), T = X(), V = X();
|
|
217
|
+
h.useImperativeHandle(t, function() {
|
|
186
218
|
return {
|
|
187
219
|
focus: function() {
|
|
188
|
-
var
|
|
189
|
-
(
|
|
220
|
+
var k;
|
|
221
|
+
(k = T.current) === null || k === void 0 || k.focus({
|
|
222
|
+
preventScroll: !0
|
|
223
|
+
});
|
|
190
224
|
},
|
|
191
|
-
changeActive: function(
|
|
192
|
-
var
|
|
193
|
-
|
|
225
|
+
changeActive: function(k) {
|
|
226
|
+
var A = document, M = A.activeElement;
|
|
227
|
+
k && M === V.current ? T.current.focus({
|
|
228
|
+
preventScroll: !0
|
|
229
|
+
}) : !k && M === T.current && V.current.focus({
|
|
230
|
+
preventScroll: !0
|
|
231
|
+
});
|
|
194
232
|
}
|
|
195
233
|
};
|
|
196
234
|
});
|
|
197
|
-
var
|
|
198
|
-
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
className:
|
|
207
|
-
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var G = Bn(function() {
|
|
213
|
-
return Xn(s) === "object" && s !== null ? s : s ? {
|
|
214
|
-
closeIcon: c ?? /* @__PURE__ */ v.createElement("span", {
|
|
215
|
-
className: "".concat(t, "-close-x")
|
|
235
|
+
var L = {};
|
|
236
|
+
$ !== void 0 && (L.width = $), N !== void 0 && (L.height = N);
|
|
237
|
+
var B = c ? /* @__PURE__ */ h.createElement("div", {
|
|
238
|
+
className: E("".concat(n, "-footer"), O == null ? void 0 : O.footer),
|
|
239
|
+
style: j({}, S == null ? void 0 : S.footer)
|
|
240
|
+
}, c) : null, F = r ? /* @__PURE__ */ h.createElement("div", {
|
|
241
|
+
className: E("".concat(n, "-header"), O == null ? void 0 : O.header),
|
|
242
|
+
style: j({}, S == null ? void 0 : S.header)
|
|
243
|
+
}, /* @__PURE__ */ h.createElement("div", {
|
|
244
|
+
className: "".concat(n, "-title"),
|
|
245
|
+
id: d
|
|
246
|
+
}, r)) : null, W = Gt(function() {
|
|
247
|
+
return ze(i) === "object" && i !== null ? i : i ? {
|
|
248
|
+
closeIcon: u ?? /* @__PURE__ */ h.createElement("span", {
|
|
249
|
+
className: "".concat(n, "-close-x")
|
|
216
250
|
})
|
|
217
251
|
} : {};
|
|
218
|
-
}, [
|
|
219
|
-
s && (X = /* @__PURE__ */ v.createElement("button", D({
|
|
252
|
+
}, [i, u, n]), q = Pe(W, !0), U = ze(i) === "object" && i.disabled, te = i ? /* @__PURE__ */ h.createElement("button", D({
|
|
220
253
|
type: "button",
|
|
221
|
-
onClick:
|
|
254
|
+
onClick: s,
|
|
222
255
|
"aria-label": "Close"
|
|
223
|
-
},
|
|
224
|
-
className: "".concat(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
className:
|
|
228
|
-
style:
|
|
229
|
-
},
|
|
230
|
-
className:
|
|
231
|
-
style:
|
|
232
|
-
},
|
|
233
|
-
return /* @__PURE__ */
|
|
256
|
+
}, q, {
|
|
257
|
+
className: "".concat(n, "-close"),
|
|
258
|
+
disabled: U
|
|
259
|
+
}), W.closeIcon) : null, K = /* @__PURE__ */ h.createElement("div", {
|
|
260
|
+
className: E("".concat(n, "-content"), O == null ? void 0 : O.content),
|
|
261
|
+
style: S == null ? void 0 : S.content
|
|
262
|
+
}, te, F, /* @__PURE__ */ h.createElement("div", D({
|
|
263
|
+
className: E("".concat(n, "-body"), O == null ? void 0 : O.body),
|
|
264
|
+
style: j(j({}, g), S == null ? void 0 : S.body)
|
|
265
|
+
}, v), f), B);
|
|
266
|
+
return /* @__PURE__ */ h.createElement("div", {
|
|
234
267
|
key: "dialog-element",
|
|
235
268
|
role: "dialog",
|
|
236
|
-
"aria-labelledby": r ?
|
|
269
|
+
"aria-labelledby": r ? d : null,
|
|
237
270
|
"aria-modal": "true",
|
|
238
|
-
ref:
|
|
239
|
-
style:
|
|
240
|
-
className:
|
|
241
|
-
onMouseDown:
|
|
242
|
-
onMouseUp:
|
|
243
|
-
}, /* @__PURE__ */
|
|
271
|
+
ref: z,
|
|
272
|
+
style: j(j({}, a), L),
|
|
273
|
+
className: E(n, o),
|
|
274
|
+
onMouseDown: m,
|
|
275
|
+
onMouseUp: x
|
|
276
|
+
}, /* @__PURE__ */ h.createElement("div", {
|
|
277
|
+
ref: T,
|
|
244
278
|
tabIndex: 0,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}), /* @__PURE__ */
|
|
249
|
-
ref: j,
|
|
250
|
-
tabIndex: -1,
|
|
251
|
-
style: rt
|
|
252
|
-
}, /* @__PURE__ */ v.createElement(at, {
|
|
253
|
-
shouldUpdate: m || y
|
|
254
|
-
}, h ? h(R) : R)), /* @__PURE__ */ v.createElement("div", {
|
|
279
|
+
style: yn
|
|
280
|
+
}, /* @__PURE__ */ h.createElement(pn, {
|
|
281
|
+
shouldUpdate: C || y
|
|
282
|
+
}, b ? b(K) : K)), /* @__PURE__ */ h.createElement("div", {
|
|
255
283
|
tabIndex: 0,
|
|
256
|
-
ref:
|
|
257
|
-
style:
|
|
258
|
-
"aria-hidden": "true"
|
|
284
|
+
ref: V,
|
|
285
|
+
style: hn
|
|
259
286
|
}));
|
|
260
287
|
});
|
|
261
|
-
process.env.NODE_ENV !== "production" && (
|
|
262
|
-
var
|
|
263
|
-
var
|
|
264
|
-
|
|
288
|
+
process.env.NODE_ENV !== "production" && (Ie.displayName = "Panel");
|
|
289
|
+
var ut = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
290
|
+
var n = e.prefixCls, o = e.title, a = e.style, r = e.className, d = e.visible, c = e.forceRender, i = e.destroyOnClose, u = e.motionName, s = e.ariaId, f = e.onVisibleChanged, g = e.mousePosition, v = X(), b = l.useState(), m = Se(b, 2), x = m[0], p = m[1], C = {};
|
|
291
|
+
x && (C.transformOrigin = x);
|
|
265
292
|
function y() {
|
|
266
|
-
var
|
|
267
|
-
p(
|
|
293
|
+
var $ = bn(v.current);
|
|
294
|
+
p(g && (g.x || g.y) ? "".concat(g.x - $.left, "px ").concat(g.y - $.top, "px") : "");
|
|
268
295
|
}
|
|
269
|
-
return /* @__PURE__ */ l.createElement(
|
|
270
|
-
visible:
|
|
296
|
+
return /* @__PURE__ */ l.createElement(Ze, {
|
|
297
|
+
visible: d,
|
|
271
298
|
onVisibleChanged: f,
|
|
272
299
|
onAppearPrepare: y,
|
|
273
300
|
onEnterPrepare: y,
|
|
274
|
-
forceRender:
|
|
275
|
-
motionName:
|
|
276
|
-
removeOnLeave:
|
|
277
|
-
ref:
|
|
278
|
-
}, function(
|
|
279
|
-
var O =
|
|
280
|
-
return /* @__PURE__ */ l.createElement(
|
|
281
|
-
ref:
|
|
301
|
+
forceRender: c,
|
|
302
|
+
motionName: u,
|
|
303
|
+
removeOnLeave: i,
|
|
304
|
+
ref: v
|
|
305
|
+
}, function($, N) {
|
|
306
|
+
var O = $.className, S = $.style;
|
|
307
|
+
return /* @__PURE__ */ l.createElement(Ie, D({}, e, {
|
|
308
|
+
ref: t,
|
|
282
309
|
title: o,
|
|
283
|
-
ariaId:
|
|
284
|
-
prefixCls:
|
|
285
|
-
holderRef:
|
|
286
|
-
style:
|
|
287
|
-
className:
|
|
310
|
+
ariaId: s,
|
|
311
|
+
prefixCls: n,
|
|
312
|
+
holderRef: N,
|
|
313
|
+
style: j(j(j({}, S), a), C),
|
|
314
|
+
className: E(r, O)
|
|
288
315
|
}));
|
|
289
316
|
});
|
|
290
317
|
});
|
|
291
|
-
|
|
292
|
-
function
|
|
293
|
-
var n =
|
|
294
|
-
return /* @__PURE__ */ l.createElement(
|
|
318
|
+
ut.displayName = "Content";
|
|
319
|
+
var xn = function(t) {
|
|
320
|
+
var n = t.prefixCls, o = t.style, a = t.visible, r = t.maskProps, d = t.motionName, c = t.className;
|
|
321
|
+
return /* @__PURE__ */ l.createElement(Ze, {
|
|
295
322
|
key: "mask",
|
|
296
|
-
visible:
|
|
297
|
-
motionName:
|
|
323
|
+
visible: a,
|
|
324
|
+
motionName: d,
|
|
298
325
|
leavedClassName: "".concat(n, "-mask-hidden")
|
|
299
|
-
}, function(
|
|
300
|
-
var
|
|
326
|
+
}, function(i, u) {
|
|
327
|
+
var s = i.className, f = i.style;
|
|
301
328
|
return /* @__PURE__ */ l.createElement("div", D({
|
|
302
|
-
ref:
|
|
303
|
-
style:
|
|
304
|
-
className:
|
|
305
|
-
},
|
|
329
|
+
ref: u,
|
|
330
|
+
style: j(j({}, f), o),
|
|
331
|
+
className: E("".concat(n, "-mask"), s, c)
|
|
332
|
+
}, r));
|
|
306
333
|
});
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
$e(L.current, document.activeElement) || (z.current = document.activeElement);
|
|
334
|
+
}, $n = function(t) {
|
|
335
|
+
var n = t.prefixCls, o = n === void 0 ? "rc-dialog" : n, a = t.zIndex, r = t.visible, d = r === void 0 ? !1 : r, c = t.keyboard, i = c === void 0 ? !0 : c, u = t.focusTriggerAfterClose, s = u === void 0 ? !0 : u, f = t.wrapStyle, g = t.wrapClassName, v = t.wrapProps, b = t.onClose, m = t.afterOpenChange, x = t.afterClose, p = t.transitionName, C = t.animation, y = t.closable, $ = y === void 0 ? !0 : y, N = t.mask, O = N === void 0 ? !0 : N, S = t.maskTransitionName, R = t.maskAnimation, w = t.maskClosable, z = w === void 0 ? !0 : w, T = t.maskStyle, V = t.maskProps, L = t.rootClassName, B = t.classNames, F = t.styles;
|
|
336
|
+
process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(I) {
|
|
337
|
+
Fe(!(I in t), "".concat(I, " is deprecated, please use styles instead."));
|
|
338
|
+
}), "wrapClassName" in t && Fe(!1, "wrapClassName is deprecated, please use classNames instead."));
|
|
339
|
+
var W = X(), q = X(), U = X(), te = l.useState(d), K = Se(te, 2), Q = K[0], k = K[1], A = Xt();
|
|
340
|
+
function M() {
|
|
341
|
+
He(q.current, document.activeElement) || (W.current = document.activeElement);
|
|
316
342
|
}
|
|
317
|
-
function
|
|
318
|
-
if (
|
|
319
|
-
var
|
|
320
|
-
(
|
|
343
|
+
function le() {
|
|
344
|
+
if (!He(q.current, document.activeElement)) {
|
|
345
|
+
var I;
|
|
346
|
+
(I = U.current) === null || I === void 0 || I.focus();
|
|
321
347
|
}
|
|
322
348
|
}
|
|
323
|
-
function
|
|
324
|
-
if (
|
|
325
|
-
|
|
349
|
+
function de(I) {
|
|
350
|
+
if (I)
|
|
351
|
+
le();
|
|
326
352
|
else {
|
|
327
|
-
if (
|
|
353
|
+
if (k(!1), O && W.current && s) {
|
|
328
354
|
try {
|
|
329
|
-
|
|
355
|
+
W.current.focus({
|
|
330
356
|
preventScroll: !0
|
|
331
357
|
});
|
|
332
358
|
} catch {
|
|
333
359
|
}
|
|
334
|
-
|
|
360
|
+
W.current = null;
|
|
335
361
|
}
|
|
336
|
-
|
|
362
|
+
Q && (x == null || x());
|
|
337
363
|
}
|
|
338
|
-
|
|
364
|
+
m == null || m(I);
|
|
339
365
|
}
|
|
340
|
-
function
|
|
341
|
-
|
|
366
|
+
function ue(I) {
|
|
367
|
+
b == null || b(I);
|
|
342
368
|
}
|
|
343
|
-
var
|
|
344
|
-
clearTimeout(
|
|
345
|
-
},
|
|
346
|
-
|
|
347
|
-
|
|
369
|
+
var re = X(!1), fe = X(), It = function() {
|
|
370
|
+
clearTimeout(fe.current), re.current = !0;
|
|
371
|
+
}, jt = function() {
|
|
372
|
+
fe.current = setTimeout(function() {
|
|
373
|
+
re.current = !1;
|
|
348
374
|
});
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
|
|
375
|
+
}, Re = null;
|
|
376
|
+
z && (Re = function(me) {
|
|
377
|
+
re.current ? re.current = !1 : q.current === me.target && ue(me);
|
|
352
378
|
});
|
|
353
|
-
function
|
|
354
|
-
if (
|
|
355
|
-
|
|
379
|
+
function Rt(I) {
|
|
380
|
+
if (i && I.keyCode === Be.ESC) {
|
|
381
|
+
I.stopPropagation(), ue(I);
|
|
356
382
|
return;
|
|
357
383
|
}
|
|
358
|
-
|
|
384
|
+
d && I.keyCode === Be.TAB && U.current.changeActive(!I.shiftKey);
|
|
359
385
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}, [
|
|
386
|
+
Me(function() {
|
|
387
|
+
d && (k(!0), M());
|
|
388
|
+
}, [d]), Me(function() {
|
|
363
389
|
return function() {
|
|
364
|
-
clearTimeout(
|
|
390
|
+
clearTimeout(fe.current);
|
|
365
391
|
};
|
|
366
|
-
}, [])
|
|
367
|
-
|
|
368
|
-
|
|
392
|
+
}, []);
|
|
393
|
+
var Tt = j(j(j({
|
|
394
|
+
zIndex: a
|
|
395
|
+
}, f), F == null ? void 0 : F.wrapper), {}, {
|
|
396
|
+
display: Q ? null : "none"
|
|
397
|
+
});
|
|
398
|
+
return /* @__PURE__ */ l.createElement("div", D({
|
|
399
|
+
className: E("".concat(o, "-root"), L)
|
|
400
|
+
}, Pe(t, {
|
|
369
401
|
data: !0
|
|
370
|
-
})), /* @__PURE__ */ l.createElement(
|
|
371
|
-
prefixCls:
|
|
372
|
-
visible:
|
|
373
|
-
motionName:
|
|
374
|
-
style:
|
|
375
|
-
zIndex:
|
|
376
|
-
},
|
|
377
|
-
maskProps:
|
|
378
|
-
className:
|
|
402
|
+
})), /* @__PURE__ */ l.createElement(xn, {
|
|
403
|
+
prefixCls: o,
|
|
404
|
+
visible: O && d,
|
|
405
|
+
motionName: De(o, S, R),
|
|
406
|
+
style: j(j({
|
|
407
|
+
zIndex: a
|
|
408
|
+
}, T), F == null ? void 0 : F.mask),
|
|
409
|
+
maskProps: V,
|
|
410
|
+
className: B == null ? void 0 : B.mask
|
|
379
411
|
}), /* @__PURE__ */ l.createElement("div", D({
|
|
380
412
|
tabIndex: -1,
|
|
381
|
-
onKeyDown:
|
|
382
|
-
className:
|
|
383
|
-
ref:
|
|
384
|
-
onClick:
|
|
385
|
-
style:
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
visible: r && R,
|
|
398
|
-
onClose: ae,
|
|
399
|
-
onVisibleChanged: Cn,
|
|
400
|
-
motionName: Se(t, E, p)
|
|
413
|
+
onKeyDown: Rt,
|
|
414
|
+
className: E("".concat(o, "-wrap"), g, B == null ? void 0 : B.wrapper),
|
|
415
|
+
ref: q,
|
|
416
|
+
onClick: Re,
|
|
417
|
+
style: Tt
|
|
418
|
+
}, v), /* @__PURE__ */ l.createElement(ut, D({}, t, {
|
|
419
|
+
onMouseDown: It,
|
|
420
|
+
onMouseUp: jt,
|
|
421
|
+
ref: U,
|
|
422
|
+
closable: $,
|
|
423
|
+
ariaId: A,
|
|
424
|
+
prefixCls: o,
|
|
425
|
+
visible: d && Q,
|
|
426
|
+
onClose: ue,
|
|
427
|
+
onVisibleChanged: de,
|
|
428
|
+
motionName: De(o, p, C)
|
|
401
429
|
}))));
|
|
402
|
-
}
|
|
403
|
-
var
|
|
404
|
-
var t = n.visible, o = n.getContainer, a = n.forceRender, r = n.destroyOnClose, u = r === void 0 ? !1 : r, d = n.afterClose, s = n.panelRef, c = l.useState(t), i = ue(c, 2), f = i[0], b = i[1], g = l.useMemo(function() {
|
|
430
|
+
}, ft = function(t) {
|
|
431
|
+
var n = t.visible, o = t.getContainer, a = t.forceRender, r = t.destroyOnClose, d = r === void 0 ? !1 : r, c = t.afterClose, i = t.panelRef, u = l.useState(n), s = Se(u, 2), f = s[0], g = s[1], v = l.useMemo(function() {
|
|
405
432
|
return {
|
|
406
|
-
panel:
|
|
433
|
+
panel: i
|
|
407
434
|
};
|
|
408
|
-
}, [
|
|
435
|
+
}, [i]);
|
|
409
436
|
return l.useEffect(function() {
|
|
410
|
-
|
|
411
|
-
}, [
|
|
412
|
-
value:
|
|
413
|
-
}, /* @__PURE__ */ l.createElement(
|
|
414
|
-
open:
|
|
437
|
+
n && g(!0);
|
|
438
|
+
}, [n]), !a && d && !f ? null : /* @__PURE__ */ l.createElement(dt.Provider, {
|
|
439
|
+
value: v
|
|
440
|
+
}, /* @__PURE__ */ l.createElement(Kt, {
|
|
441
|
+
open: n || a || f,
|
|
415
442
|
autoDestroy: !1,
|
|
416
443
|
getContainer: o,
|
|
417
|
-
autoLock:
|
|
418
|
-
}, /* @__PURE__ */ l.createElement(
|
|
419
|
-
destroyOnClose:
|
|
444
|
+
autoLock: n || f
|
|
445
|
+
}, /* @__PURE__ */ l.createElement($n, D({}, t, {
|
|
446
|
+
destroyOnClose: d,
|
|
420
447
|
afterClose: function() {
|
|
421
|
-
|
|
448
|
+
c == null || c(), g(!1);
|
|
422
449
|
}
|
|
423
450
|
}))));
|
|
424
451
|
};
|
|
425
|
-
|
|
426
|
-
function
|
|
452
|
+
ft.displayName = "Dialog";
|
|
453
|
+
function _e(e) {
|
|
427
454
|
if (e)
|
|
428
455
|
return {
|
|
429
456
|
closable: e.closable,
|
|
430
457
|
closeIcon: e.closeIcon
|
|
431
458
|
};
|
|
432
459
|
}
|
|
433
|
-
function
|
|
460
|
+
function Ve(e) {
|
|
434
461
|
const {
|
|
435
|
-
closable:
|
|
436
|
-
closeIcon:
|
|
462
|
+
closable: t,
|
|
463
|
+
closeIcon: n
|
|
437
464
|
} = e || {};
|
|
438
|
-
return
|
|
465
|
+
return h.useMemo(() => {
|
|
439
466
|
if (
|
|
440
467
|
// If `closable`, whatever rest be should be true
|
|
441
|
-
!
|
|
468
|
+
!t && (t === !1 || n === !1 || n === null)
|
|
442
469
|
)
|
|
443
470
|
return !1;
|
|
444
|
-
if (
|
|
471
|
+
if (t === void 0 && n === void 0)
|
|
445
472
|
return null;
|
|
446
473
|
let o = {
|
|
447
|
-
closeIcon: typeof
|
|
474
|
+
closeIcon: typeof n != "boolean" && n !== null ? n : void 0
|
|
448
475
|
};
|
|
449
|
-
return
|
|
450
|
-
}, [
|
|
476
|
+
return t && typeof t == "object" && (o = Object.assign(Object.assign({}, o), t)), o;
|
|
477
|
+
}, [t, n]);
|
|
451
478
|
}
|
|
452
|
-
function
|
|
479
|
+
function We() {
|
|
453
480
|
const e = {};
|
|
454
|
-
for (var
|
|
455
|
-
|
|
456
|
-
return
|
|
481
|
+
for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
|
|
482
|
+
n[o] = arguments[o];
|
|
483
|
+
return n.forEach((a) => {
|
|
457
484
|
a && Object.keys(a).forEach((r) => {
|
|
458
485
|
a[r] !== void 0 && (e[r] = a[r]);
|
|
459
486
|
});
|
|
460
487
|
}), e;
|
|
461
488
|
}
|
|
462
|
-
const
|
|
463
|
-
function
|
|
464
|
-
let
|
|
465
|
-
const o =
|
|
466
|
-
closeIcon: /* @__PURE__ */
|
|
467
|
-
},
|
|
468
|
-
return
|
|
469
|
-
if (
|
|
470
|
-
return [!1, null];
|
|
489
|
+
const En = {};
|
|
490
|
+
function Sn(e, t) {
|
|
491
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : En;
|
|
492
|
+
const o = Ve(e), a = Ve(t), r = typeof o != "boolean" ? !!(o != null && o.disabled) : !1, d = h.useMemo(() => Object.assign({
|
|
493
|
+
closeIcon: /* @__PURE__ */ h.createElement(we, null)
|
|
494
|
+
}, n), [n]), c = h.useMemo(() => o === !1 ? !1 : o ? We(d, a, o) : a === !1 ? !1 : a ? We(d, a) : d.closable ? d : !1, [o, a, d]);
|
|
495
|
+
return h.useMemo(() => {
|
|
496
|
+
if (c === !1)
|
|
497
|
+
return [!1, null, r];
|
|
471
498
|
const {
|
|
472
|
-
closeIconRender:
|
|
473
|
-
} =
|
|
474
|
-
closeIcon:
|
|
475
|
-
} =
|
|
476
|
-
let
|
|
477
|
-
if (
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
Object.keys(
|
|
499
|
+
closeIconRender: i
|
|
500
|
+
} = d, {
|
|
501
|
+
closeIcon: u
|
|
502
|
+
} = c;
|
|
503
|
+
let s = u;
|
|
504
|
+
if (s != null) {
|
|
505
|
+
i && (s = i(u));
|
|
506
|
+
const f = Pe(c, !0);
|
|
507
|
+
Object.keys(f).length && (s = /* @__PURE__ */ h.isValidElement(s) ? /* @__PURE__ */ h.cloneElement(s, f) : /* @__PURE__ */ h.createElement("span", Object.assign({}, f), s));
|
|
508
|
+
}
|
|
509
|
+
return [!0, s, r];
|
|
510
|
+
}, [c, d]);
|
|
511
|
+
}
|
|
512
|
+
const On = () => an() && window.document.documentElement, se = (e) => {
|
|
513
|
+
const {
|
|
514
|
+
prefixCls: t,
|
|
515
|
+
className: n,
|
|
516
|
+
style: o,
|
|
517
|
+
size: a,
|
|
518
|
+
shape: r
|
|
519
|
+
} = e, d = E({
|
|
520
|
+
[`${t}-lg`]: a === "large",
|
|
521
|
+
[`${t}-sm`]: a === "small"
|
|
522
|
+
}), c = E({
|
|
523
|
+
[`${t}-circle`]: r === "circle",
|
|
524
|
+
[`${t}-square`]: r === "square",
|
|
525
|
+
[`${t}-round`]: r === "round"
|
|
526
|
+
}), i = l.useMemo(() => typeof a == "number" ? {
|
|
527
|
+
width: a,
|
|
528
|
+
height: a,
|
|
529
|
+
lineHeight: `${a}px`
|
|
530
|
+
} : {}, [a]);
|
|
531
|
+
return /* @__PURE__ */ l.createElement("span", {
|
|
532
|
+
className: E(t, d, c, n),
|
|
533
|
+
style: Object.assign(Object.assign({}, i), o)
|
|
534
|
+
});
|
|
535
|
+
}, Nn = new ye("ant-skeleton-loading", {
|
|
536
|
+
"0%": {
|
|
537
|
+
backgroundPosition: "100% 50%"
|
|
538
|
+
},
|
|
539
|
+
"100%": {
|
|
540
|
+
backgroundPosition: "0 50%"
|
|
541
|
+
}
|
|
542
|
+
}), ce = (e) => ({
|
|
543
|
+
height: e,
|
|
544
|
+
lineHeight: P(e)
|
|
545
|
+
}), J = (e) => Object.assign({
|
|
546
|
+
width: e
|
|
547
|
+
}, ce(e)), wn = (e) => ({
|
|
548
|
+
background: e.skeletonLoadingBackground,
|
|
549
|
+
backgroundSize: "400% 100%",
|
|
550
|
+
animationName: Nn,
|
|
551
|
+
animationDuration: e.skeletonLoadingMotionDuration,
|
|
552
|
+
animationTimingFunction: "ease",
|
|
553
|
+
animationIterationCount: "infinite"
|
|
554
|
+
}), Ce = (e, t) => Object.assign({
|
|
555
|
+
width: t(e).mul(5).equal(),
|
|
556
|
+
minWidth: t(e).mul(5).equal()
|
|
557
|
+
}, ce(e)), Pn = (e) => {
|
|
558
|
+
const {
|
|
559
|
+
skeletonAvatarCls: t,
|
|
560
|
+
gradientFromColor: n,
|
|
561
|
+
controlHeight: o,
|
|
562
|
+
controlHeightLG: a,
|
|
563
|
+
controlHeightSM: r
|
|
564
|
+
} = e;
|
|
565
|
+
return {
|
|
566
|
+
[t]: Object.assign({
|
|
567
|
+
display: "inline-block",
|
|
568
|
+
verticalAlign: "top",
|
|
569
|
+
background: n
|
|
570
|
+
}, J(o)),
|
|
571
|
+
[`${t}${t}-circle`]: {
|
|
572
|
+
borderRadius: "50%"
|
|
573
|
+
},
|
|
574
|
+
[`${t}${t}-lg`]: Object.assign({}, J(a)),
|
|
575
|
+
[`${t}${t}-sm`]: Object.assign({}, J(r))
|
|
576
|
+
};
|
|
577
|
+
}, In = (e) => {
|
|
578
|
+
const {
|
|
579
|
+
controlHeight: t,
|
|
580
|
+
borderRadiusSM: n,
|
|
581
|
+
skeletonInputCls: o,
|
|
582
|
+
controlHeightLG: a,
|
|
583
|
+
controlHeightSM: r,
|
|
584
|
+
gradientFromColor: d,
|
|
585
|
+
calc: c
|
|
586
|
+
} = e;
|
|
587
|
+
return {
|
|
588
|
+
[o]: Object.assign({
|
|
589
|
+
display: "inline-block",
|
|
590
|
+
verticalAlign: "top",
|
|
591
|
+
background: d,
|
|
592
|
+
borderRadius: n
|
|
593
|
+
}, Ce(t, c)),
|
|
594
|
+
[`${o}-lg`]: Object.assign({}, Ce(a, c)),
|
|
595
|
+
[`${o}-sm`]: Object.assign({}, Ce(r, c))
|
|
596
|
+
};
|
|
597
|
+
}, qe = (e) => Object.assign({
|
|
598
|
+
width: e
|
|
599
|
+
}, ce(e)), jn = (e) => {
|
|
600
|
+
const {
|
|
601
|
+
skeletonImageCls: t,
|
|
602
|
+
imageSizeBase: n,
|
|
603
|
+
gradientFromColor: o,
|
|
604
|
+
borderRadiusSM: a,
|
|
605
|
+
calc: r
|
|
606
|
+
} = e;
|
|
607
|
+
return {
|
|
608
|
+
[t]: Object.assign(Object.assign({
|
|
609
|
+
display: "inline-flex",
|
|
610
|
+
alignItems: "center",
|
|
611
|
+
justifyContent: "center",
|
|
612
|
+
verticalAlign: "middle",
|
|
613
|
+
background: o,
|
|
614
|
+
borderRadius: a
|
|
615
|
+
}, qe(r(n).mul(2).equal())), {
|
|
616
|
+
[`${t}-path`]: {
|
|
617
|
+
fill: "#bfbfbf"
|
|
618
|
+
},
|
|
619
|
+
[`${t}-svg`]: Object.assign(Object.assign({}, qe(n)), {
|
|
620
|
+
maxWidth: r(n).mul(4).equal(),
|
|
621
|
+
maxHeight: r(n).mul(4).equal()
|
|
622
|
+
}),
|
|
623
|
+
[`${t}-svg${t}-svg-circle`]: {
|
|
624
|
+
borderRadius: "50%"
|
|
625
|
+
}
|
|
626
|
+
}),
|
|
627
|
+
[`${t}${t}-circle`]: {
|
|
628
|
+
borderRadius: "50%"
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
}, ve = (e, t, n) => {
|
|
632
|
+
const {
|
|
633
|
+
skeletonButtonCls: o
|
|
634
|
+
} = e;
|
|
635
|
+
return {
|
|
636
|
+
[`${n}${o}-circle`]: {
|
|
637
|
+
width: t,
|
|
638
|
+
minWidth: t,
|
|
639
|
+
borderRadius: "50%"
|
|
640
|
+
},
|
|
641
|
+
[`${n}${o}-round`]: {
|
|
642
|
+
borderRadius: t
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
}, be = (e, t) => Object.assign({
|
|
646
|
+
width: t(e).mul(2).equal(),
|
|
647
|
+
minWidth: t(e).mul(2).equal()
|
|
648
|
+
}, ce(e)), Rn = (e) => {
|
|
649
|
+
const {
|
|
650
|
+
borderRadiusSM: t,
|
|
651
|
+
skeletonButtonCls: n,
|
|
652
|
+
controlHeight: o,
|
|
653
|
+
controlHeightLG: a,
|
|
654
|
+
controlHeightSM: r,
|
|
655
|
+
gradientFromColor: d,
|
|
656
|
+
calc: c
|
|
657
|
+
} = e;
|
|
658
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
659
|
+
[n]: Object.assign({
|
|
660
|
+
display: "inline-block",
|
|
661
|
+
verticalAlign: "top",
|
|
662
|
+
background: d,
|
|
663
|
+
borderRadius: t,
|
|
664
|
+
width: c(o).mul(2).equal(),
|
|
665
|
+
minWidth: c(o).mul(2).equal()
|
|
666
|
+
}, be(o, c))
|
|
667
|
+
}, ve(e, o, n)), {
|
|
668
|
+
[`${n}-lg`]: Object.assign({}, be(a, c))
|
|
669
|
+
}), ve(e, a, `${n}-lg`)), {
|
|
670
|
+
[`${n}-sm`]: Object.assign({}, be(r, c))
|
|
671
|
+
}), ve(e, r, `${n}-sm`));
|
|
672
|
+
}, Tn = (e) => {
|
|
673
|
+
const {
|
|
674
|
+
componentCls: t,
|
|
675
|
+
skeletonAvatarCls: n,
|
|
676
|
+
skeletonTitleCls: o,
|
|
677
|
+
skeletonParagraphCls: a,
|
|
678
|
+
skeletonButtonCls: r,
|
|
679
|
+
skeletonInputCls: d,
|
|
680
|
+
skeletonImageCls: c,
|
|
681
|
+
controlHeight: i,
|
|
682
|
+
controlHeightLG: u,
|
|
683
|
+
controlHeightSM: s,
|
|
684
|
+
gradientFromColor: f,
|
|
685
|
+
padding: g,
|
|
686
|
+
marginSM: v,
|
|
687
|
+
borderRadius: b,
|
|
688
|
+
titleHeight: m,
|
|
689
|
+
blockRadius: x,
|
|
690
|
+
paragraphLiHeight: p,
|
|
691
|
+
controlHeightXS: C,
|
|
692
|
+
paragraphMarginTop: y
|
|
693
|
+
} = e;
|
|
694
|
+
return {
|
|
695
|
+
[t]: {
|
|
696
|
+
display: "table",
|
|
697
|
+
width: "100%",
|
|
698
|
+
[`${t}-header`]: {
|
|
699
|
+
display: "table-cell",
|
|
700
|
+
paddingInlineEnd: g,
|
|
701
|
+
verticalAlign: "top",
|
|
702
|
+
// Avatar
|
|
703
|
+
[n]: Object.assign({
|
|
704
|
+
display: "inline-block",
|
|
705
|
+
verticalAlign: "top",
|
|
706
|
+
background: f
|
|
707
|
+
}, J(i)),
|
|
708
|
+
[`${n}-circle`]: {
|
|
709
|
+
borderRadius: "50%"
|
|
710
|
+
},
|
|
711
|
+
[`${n}-lg`]: Object.assign({}, J(u)),
|
|
712
|
+
[`${n}-sm`]: Object.assign({}, J(s))
|
|
713
|
+
},
|
|
714
|
+
[`${t}-content`]: {
|
|
715
|
+
display: "table-cell",
|
|
716
|
+
width: "100%",
|
|
717
|
+
verticalAlign: "top",
|
|
718
|
+
// Title
|
|
719
|
+
[o]: {
|
|
720
|
+
width: "100%",
|
|
721
|
+
height: m,
|
|
722
|
+
background: f,
|
|
723
|
+
borderRadius: x,
|
|
724
|
+
[`+ ${a}`]: {
|
|
725
|
+
marginBlockStart: s
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
// paragraph
|
|
729
|
+
[a]: {
|
|
730
|
+
padding: 0,
|
|
731
|
+
"> li": {
|
|
732
|
+
width: "100%",
|
|
733
|
+
height: p,
|
|
734
|
+
listStyle: "none",
|
|
735
|
+
background: f,
|
|
736
|
+
borderRadius: x,
|
|
737
|
+
"+ li": {
|
|
738
|
+
marginBlockStart: C
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
|
|
743
|
+
width: "61%"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
[`&-round ${t}-content`]: {
|
|
747
|
+
[`${o}, ${a} > li`]: {
|
|
748
|
+
borderRadius: b
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
[`${t}-with-avatar ${t}-content`]: {
|
|
753
|
+
// Title
|
|
754
|
+
[o]: {
|
|
755
|
+
marginBlockStart: v,
|
|
756
|
+
[`+ ${a}`]: {
|
|
757
|
+
marginBlockStart: y
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
// Skeleton element
|
|
762
|
+
[`${t}${t}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
|
|
763
|
+
display: "inline-block",
|
|
764
|
+
width: "auto"
|
|
765
|
+
}, Rn(e)), Pn(e)), In(e)), jn(e)),
|
|
766
|
+
// Skeleton Block Button, Input
|
|
767
|
+
[`${t}${t}-block`]: {
|
|
768
|
+
width: "100%",
|
|
769
|
+
[r]: {
|
|
770
|
+
width: "100%"
|
|
771
|
+
},
|
|
772
|
+
[d]: {
|
|
773
|
+
width: "100%"
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
// With active animation
|
|
777
|
+
[`${t}${t}-active`]: {
|
|
778
|
+
[`
|
|
779
|
+
${o},
|
|
780
|
+
${a} > li,
|
|
781
|
+
${n},
|
|
782
|
+
${r},
|
|
783
|
+
${d},
|
|
784
|
+
${c}
|
|
785
|
+
`]: Object.assign({}, wn(e))
|
|
481
786
|
}
|
|
482
|
-
|
|
483
|
-
|
|
787
|
+
};
|
|
788
|
+
}, Mn = (e) => {
|
|
789
|
+
const {
|
|
790
|
+
colorFillContent: t,
|
|
791
|
+
colorFill: n
|
|
792
|
+
} = e, o = t, a = n;
|
|
793
|
+
return {
|
|
794
|
+
color: o,
|
|
795
|
+
colorGradientEnd: a,
|
|
796
|
+
gradientFromColor: o,
|
|
797
|
+
gradientToColor: a,
|
|
798
|
+
titleHeight: e.controlHeight / 2,
|
|
799
|
+
blockRadius: e.borderRadiusSM,
|
|
800
|
+
paragraphMarginTop: e.marginLG + e.marginXXS,
|
|
801
|
+
paragraphLiHeight: e.controlHeight / 2
|
|
802
|
+
};
|
|
803
|
+
}, ee = Ye("Skeleton", (e) => {
|
|
804
|
+
const {
|
|
805
|
+
componentCls: t,
|
|
806
|
+
calc: n
|
|
807
|
+
} = e, o = Je(e, {
|
|
808
|
+
skeletonAvatarCls: `${t}-avatar`,
|
|
809
|
+
skeletonTitleCls: `${t}-title`,
|
|
810
|
+
skeletonParagraphCls: `${t}-paragraph`,
|
|
811
|
+
skeletonButtonCls: `${t}-button`,
|
|
812
|
+
skeletonInputCls: `${t}-input`,
|
|
813
|
+
skeletonImageCls: `${t}-image`,
|
|
814
|
+
imageSizeBase: n(e.controlHeight).mul(1.5).equal(),
|
|
815
|
+
borderRadius: 100,
|
|
816
|
+
// Large number to make capsule shape
|
|
817
|
+
skeletonLoadingBackground: `linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,
|
|
818
|
+
skeletonLoadingMotionDuration: "1.4s"
|
|
819
|
+
});
|
|
820
|
+
return [Tn(o)];
|
|
821
|
+
}, Mn, {
|
|
822
|
+
deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
|
|
823
|
+
}), Bn = (e) => {
|
|
824
|
+
const {
|
|
825
|
+
prefixCls: t,
|
|
826
|
+
className: n,
|
|
827
|
+
rootClassName: o,
|
|
828
|
+
active: a,
|
|
829
|
+
shape: r = "circle",
|
|
830
|
+
size: d = "default"
|
|
831
|
+
} = e, {
|
|
832
|
+
getPrefixCls: c
|
|
833
|
+
} = l.useContext(_), i = c("skeleton", t), [u, s, f] = ee(i), g = $e(e, ["prefixCls", "className"]), v = E(i, `${i}-element`, {
|
|
834
|
+
[`${i}-active`]: a
|
|
835
|
+
}, n, o, s, f);
|
|
836
|
+
return u(/* @__PURE__ */ l.createElement("div", {
|
|
837
|
+
className: v
|
|
838
|
+
}, /* @__PURE__ */ l.createElement(se, Object.assign({
|
|
839
|
+
prefixCls: `${i}-avatar`,
|
|
840
|
+
shape: r,
|
|
841
|
+
size: d
|
|
842
|
+
}, g))));
|
|
843
|
+
}, zn = (e) => {
|
|
844
|
+
const {
|
|
845
|
+
prefixCls: t,
|
|
846
|
+
className: n,
|
|
847
|
+
rootClassName: o,
|
|
848
|
+
active: a,
|
|
849
|
+
block: r = !1,
|
|
850
|
+
size: d = "default"
|
|
851
|
+
} = e, {
|
|
852
|
+
getPrefixCls: c
|
|
853
|
+
} = l.useContext(_), i = c("skeleton", t), [u, s, f] = ee(i), g = $e(e, ["prefixCls"]), v = E(i, `${i}-element`, {
|
|
854
|
+
[`${i}-active`]: a,
|
|
855
|
+
[`${i}-block`]: r
|
|
856
|
+
}, n, o, s, f);
|
|
857
|
+
return u(/* @__PURE__ */ l.createElement("div", {
|
|
858
|
+
className: v
|
|
859
|
+
}, /* @__PURE__ */ l.createElement(se, Object.assign({
|
|
860
|
+
prefixCls: `${i}-button`,
|
|
861
|
+
size: d
|
|
862
|
+
}, g))));
|
|
863
|
+
}, Fn = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", Hn = (e) => {
|
|
864
|
+
const {
|
|
865
|
+
prefixCls: t,
|
|
866
|
+
className: n,
|
|
867
|
+
rootClassName: o,
|
|
868
|
+
style: a,
|
|
869
|
+
active: r
|
|
870
|
+
} = e, {
|
|
871
|
+
getPrefixCls: d
|
|
872
|
+
} = l.useContext(_), c = d("skeleton", t), [i, u, s] = ee(c), f = E(c, `${c}-element`, {
|
|
873
|
+
[`${c}-active`]: r
|
|
874
|
+
}, n, o, u, s);
|
|
875
|
+
return i(/* @__PURE__ */ l.createElement("div", {
|
|
876
|
+
className: f
|
|
877
|
+
}, /* @__PURE__ */ l.createElement("div", {
|
|
878
|
+
className: E(`${c}-image`, n),
|
|
879
|
+
style: a
|
|
880
|
+
}, /* @__PURE__ */ l.createElement("svg", {
|
|
881
|
+
viewBox: "0 0 1098 1024",
|
|
882
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
883
|
+
className: `${c}-image-svg`
|
|
884
|
+
}, /* @__PURE__ */ l.createElement("title", null, "Image placeholder"), /* @__PURE__ */ l.createElement("path", {
|
|
885
|
+
d: Fn,
|
|
886
|
+
className: `${c}-image-path`
|
|
887
|
+
})))));
|
|
888
|
+
}, kn = (e) => {
|
|
889
|
+
const {
|
|
890
|
+
prefixCls: t,
|
|
891
|
+
className: n,
|
|
892
|
+
rootClassName: o,
|
|
893
|
+
active: a,
|
|
894
|
+
block: r,
|
|
895
|
+
size: d = "default"
|
|
896
|
+
} = e, {
|
|
897
|
+
getPrefixCls: c
|
|
898
|
+
} = l.useContext(_), i = c("skeleton", t), [u, s, f] = ee(i), g = $e(e, ["prefixCls"]), v = E(i, `${i}-element`, {
|
|
899
|
+
[`${i}-active`]: a,
|
|
900
|
+
[`${i}-block`]: r
|
|
901
|
+
}, n, o, s, f);
|
|
902
|
+
return u(/* @__PURE__ */ l.createElement("div", {
|
|
903
|
+
className: v
|
|
904
|
+
}, /* @__PURE__ */ l.createElement(se, Object.assign({
|
|
905
|
+
prefixCls: `${i}-input`,
|
|
906
|
+
size: d
|
|
907
|
+
}, g))));
|
|
908
|
+
}, An = (e) => {
|
|
909
|
+
const {
|
|
910
|
+
prefixCls: t,
|
|
911
|
+
className: n,
|
|
912
|
+
rootClassName: o,
|
|
913
|
+
style: a,
|
|
914
|
+
active: r,
|
|
915
|
+
children: d
|
|
916
|
+
} = e, {
|
|
917
|
+
getPrefixCls: c
|
|
918
|
+
} = l.useContext(_), i = c("skeleton", t), [u, s, f] = ee(i), g = E(i, `${i}-element`, {
|
|
919
|
+
[`${i}-active`]: r
|
|
920
|
+
}, s, n, o, f);
|
|
921
|
+
return u(/* @__PURE__ */ l.createElement("div", {
|
|
922
|
+
className: g
|
|
923
|
+
}, /* @__PURE__ */ l.createElement("div", {
|
|
924
|
+
className: E(`${i}-image`, n),
|
|
925
|
+
style: a
|
|
926
|
+
}, d)));
|
|
927
|
+
}, Dn = (e, t) => {
|
|
928
|
+
const {
|
|
929
|
+
width: n,
|
|
930
|
+
rows: o = 2
|
|
931
|
+
} = t;
|
|
932
|
+
if (Array.isArray(n))
|
|
933
|
+
return n[e];
|
|
934
|
+
if (o - 1 === e)
|
|
935
|
+
return n;
|
|
936
|
+
}, Ln = (e) => {
|
|
937
|
+
const {
|
|
938
|
+
prefixCls: t,
|
|
939
|
+
className: n,
|
|
940
|
+
style: o,
|
|
941
|
+
rows: a
|
|
942
|
+
} = e, r = G(new Array(a)).map((d, c) => (
|
|
943
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
944
|
+
/* @__PURE__ */ l.createElement("li", {
|
|
945
|
+
key: c,
|
|
946
|
+
style: {
|
|
947
|
+
width: Dn(c, e)
|
|
948
|
+
}
|
|
949
|
+
})
|
|
950
|
+
));
|
|
951
|
+
return /* @__PURE__ */ l.createElement("ul", {
|
|
952
|
+
className: E(t, n),
|
|
953
|
+
style: o
|
|
954
|
+
}, r);
|
|
955
|
+
}, _n = (e) => {
|
|
956
|
+
let {
|
|
957
|
+
prefixCls: t,
|
|
958
|
+
className: n,
|
|
959
|
+
width: o,
|
|
960
|
+
style: a
|
|
961
|
+
} = e;
|
|
962
|
+
return (
|
|
963
|
+
// biome-ignore lint/a11y/useHeadingContent: HOC here
|
|
964
|
+
/* @__PURE__ */ l.createElement("h3", {
|
|
965
|
+
className: E(t, n),
|
|
966
|
+
style: Object.assign({
|
|
967
|
+
width: o
|
|
968
|
+
}, a)
|
|
969
|
+
})
|
|
970
|
+
);
|
|
971
|
+
};
|
|
972
|
+
function pe(e) {
|
|
973
|
+
return e && typeof e == "object" ? e : {};
|
|
484
974
|
}
|
|
485
|
-
|
|
486
|
-
|
|
975
|
+
function Vn(e, t) {
|
|
976
|
+
return e && !t ? {
|
|
977
|
+
size: "large",
|
|
978
|
+
shape: "square"
|
|
979
|
+
} : {
|
|
980
|
+
size: "large",
|
|
981
|
+
shape: "circle"
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
function Wn(e, t) {
|
|
985
|
+
return !e && t ? {
|
|
986
|
+
width: "38%"
|
|
987
|
+
} : e && t ? {
|
|
988
|
+
width: "50%"
|
|
989
|
+
} : {};
|
|
990
|
+
}
|
|
991
|
+
function qn(e, t) {
|
|
992
|
+
const n = {};
|
|
993
|
+
return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
|
|
994
|
+
}
|
|
995
|
+
const Y = (e) => {
|
|
996
|
+
const {
|
|
997
|
+
prefixCls: t,
|
|
998
|
+
loading: n,
|
|
999
|
+
className: o,
|
|
1000
|
+
rootClassName: a,
|
|
1001
|
+
style: r,
|
|
1002
|
+
children: d,
|
|
1003
|
+
avatar: c = !1,
|
|
1004
|
+
title: i = !0,
|
|
1005
|
+
paragraph: u = !0,
|
|
1006
|
+
active: s,
|
|
1007
|
+
round: f
|
|
1008
|
+
} = e, {
|
|
1009
|
+
getPrefixCls: g,
|
|
1010
|
+
direction: v,
|
|
1011
|
+
skeleton: b
|
|
1012
|
+
} = l.useContext(_), m = g("skeleton", t), [x, p, C] = ee(m);
|
|
1013
|
+
if (n || !("loading" in e)) {
|
|
1014
|
+
const y = !!c, $ = !!i, N = !!u;
|
|
1015
|
+
let O;
|
|
1016
|
+
if (y) {
|
|
1017
|
+
const w = Object.assign(Object.assign({
|
|
1018
|
+
prefixCls: `${m}-avatar`
|
|
1019
|
+
}, Vn($, N)), pe(c));
|
|
1020
|
+
O = /* @__PURE__ */ l.createElement("div", {
|
|
1021
|
+
className: `${m}-header`
|
|
1022
|
+
}, /* @__PURE__ */ l.createElement(se, Object.assign({}, w)));
|
|
1023
|
+
}
|
|
1024
|
+
let S;
|
|
1025
|
+
if ($ || N) {
|
|
1026
|
+
let w;
|
|
1027
|
+
if ($) {
|
|
1028
|
+
const T = Object.assign(Object.assign({
|
|
1029
|
+
prefixCls: `${m}-title`
|
|
1030
|
+
}, Wn(y, N)), pe(i));
|
|
1031
|
+
w = /* @__PURE__ */ l.createElement(_n, Object.assign({}, T));
|
|
1032
|
+
}
|
|
1033
|
+
let z;
|
|
1034
|
+
if (N) {
|
|
1035
|
+
const T = Object.assign(Object.assign({
|
|
1036
|
+
prefixCls: `${m}-paragraph`
|
|
1037
|
+
}, qn(y, $)), pe(u));
|
|
1038
|
+
z = /* @__PURE__ */ l.createElement(Ln, Object.assign({}, T));
|
|
1039
|
+
}
|
|
1040
|
+
S = /* @__PURE__ */ l.createElement("div", {
|
|
1041
|
+
className: `${m}-content`
|
|
1042
|
+
}, w, z);
|
|
1043
|
+
}
|
|
1044
|
+
const R = E(m, {
|
|
1045
|
+
[`${m}-with-avatar`]: y,
|
|
1046
|
+
[`${m}-active`]: s,
|
|
1047
|
+
[`${m}-rtl`]: v === "rtl",
|
|
1048
|
+
[`${m}-round`]: f
|
|
1049
|
+
}, b == null ? void 0 : b.className, o, a, p, C);
|
|
1050
|
+
return x(/* @__PURE__ */ l.createElement("div", {
|
|
1051
|
+
className: R,
|
|
1052
|
+
style: Object.assign(Object.assign({}, b == null ? void 0 : b.style), r)
|
|
1053
|
+
}, O, S));
|
|
1054
|
+
}
|
|
1055
|
+
return d ?? null;
|
|
1056
|
+
};
|
|
1057
|
+
Y.Button = zn;
|
|
1058
|
+
Y.Avatar = Bn;
|
|
1059
|
+
Y.Input = kn;
|
|
1060
|
+
Y.Image = Hn;
|
|
1061
|
+
Y.Node = An;
|
|
1062
|
+
process.env.NODE_ENV !== "production" && (Y.displayName = "Skeleton");
|
|
1063
|
+
function Ge() {
|
|
487
1064
|
}
|
|
488
|
-
const
|
|
489
|
-
add:
|
|
490
|
-
remove:
|
|
1065
|
+
const Gn = /* @__PURE__ */ l.createContext({
|
|
1066
|
+
add: Ge,
|
|
1067
|
+
remove: Ge
|
|
491
1068
|
});
|
|
492
|
-
function
|
|
493
|
-
const
|
|
494
|
-
return
|
|
1069
|
+
function Un(e) {
|
|
1070
|
+
const t = l.useContext(Gn), n = l.useRef();
|
|
1071
|
+
return Ft((a) => {
|
|
495
1072
|
if (a) {
|
|
496
1073
|
const r = e ? a.querySelector(e) : a;
|
|
497
|
-
|
|
1074
|
+
t.add(r), n.current = r;
|
|
498
1075
|
} else
|
|
499
|
-
|
|
1076
|
+
t.remove(n.current);
|
|
500
1077
|
});
|
|
501
1078
|
}
|
|
502
|
-
const
|
|
1079
|
+
const Ue = () => {
|
|
503
1080
|
const {
|
|
504
1081
|
cancelButtonProps: e,
|
|
505
|
-
cancelTextLocale:
|
|
506
|
-
onCancel:
|
|
507
|
-
} =
|
|
508
|
-
return /* @__PURE__ */
|
|
509
|
-
onClick:
|
|
510
|
-
}, e),
|
|
511
|
-
},
|
|
1082
|
+
cancelTextLocale: t,
|
|
1083
|
+
onCancel: n
|
|
1084
|
+
} = ne(oe);
|
|
1085
|
+
return /* @__PURE__ */ h.createElement(Ne, Object.assign({
|
|
1086
|
+
onClick: n
|
|
1087
|
+
}, e), t);
|
|
1088
|
+
}, Xe = () => {
|
|
512
1089
|
const {
|
|
513
1090
|
confirmLoading: e,
|
|
514
|
-
okButtonProps:
|
|
515
|
-
okType:
|
|
1091
|
+
okButtonProps: t,
|
|
1092
|
+
okType: n,
|
|
516
1093
|
okTextLocale: o,
|
|
517
1094
|
onOk: a
|
|
518
|
-
} =
|
|
519
|
-
return /* @__PURE__ */
|
|
1095
|
+
} = ne(oe);
|
|
1096
|
+
return /* @__PURE__ */ h.createElement(Ne, Object.assign({}, at(n), {
|
|
520
1097
|
loading: e,
|
|
521
1098
|
onClick: a
|
|
522
|
-
},
|
|
1099
|
+
}, t), o);
|
|
523
1100
|
};
|
|
524
|
-
function
|
|
525
|
-
return /* @__PURE__ */
|
|
1101
|
+
function mt(e, t) {
|
|
1102
|
+
return /* @__PURE__ */ h.createElement("span", {
|
|
526
1103
|
className: `${e}-close-x`
|
|
527
|
-
},
|
|
1104
|
+
}, t || /* @__PURE__ */ h.createElement(we, {
|
|
528
1105
|
className: `${e}-close-icon`
|
|
529
1106
|
}));
|
|
530
1107
|
}
|
|
531
|
-
const
|
|
1108
|
+
const gt = (e) => {
|
|
532
1109
|
const {
|
|
533
|
-
okText:
|
|
534
|
-
okType:
|
|
1110
|
+
okText: t,
|
|
1111
|
+
okType: n = "primary",
|
|
535
1112
|
cancelText: o,
|
|
536
1113
|
confirmLoading: a,
|
|
537
1114
|
onOk: r,
|
|
538
|
-
onCancel:
|
|
539
|
-
okButtonProps:
|
|
540
|
-
cancelButtonProps:
|
|
541
|
-
footer:
|
|
542
|
-
} = e, [
|
|
1115
|
+
onCancel: d,
|
|
1116
|
+
okButtonProps: c,
|
|
1117
|
+
cancelButtonProps: i,
|
|
1118
|
+
footer: u
|
|
1119
|
+
} = e, [s] = Ee("Modal", et()), f = t || (s == null ? void 0 : s.okText), g = o || (s == null ? void 0 : s.cancelText), v = {
|
|
543
1120
|
confirmLoading: a,
|
|
544
|
-
okButtonProps:
|
|
545
|
-
cancelButtonProps:
|
|
1121
|
+
okButtonProps: c,
|
|
1122
|
+
cancelButtonProps: i,
|
|
546
1123
|
okTextLocale: f,
|
|
547
|
-
cancelTextLocale:
|
|
548
|
-
okType:
|
|
1124
|
+
cancelTextLocale: g,
|
|
1125
|
+
okType: n,
|
|
549
1126
|
onOk: r,
|
|
550
|
-
onCancel:
|
|
551
|
-
},
|
|
552
|
-
let
|
|
553
|
-
return typeof
|
|
554
|
-
OkBtn:
|
|
555
|
-
CancelBtn:
|
|
556
|
-
})),
|
|
557
|
-
value:
|
|
558
|
-
},
|
|
1127
|
+
onCancel: d
|
|
1128
|
+
}, b = h.useMemo(() => v, G(Object.values(v)));
|
|
1129
|
+
let m;
|
|
1130
|
+
return typeof u == "function" || typeof u > "u" ? (m = /* @__PURE__ */ h.createElement(h.Fragment, null, /* @__PURE__ */ h.createElement(Ue, null), /* @__PURE__ */ h.createElement(Xe, null)), typeof u == "function" && (m = u(m, {
|
|
1131
|
+
OkBtn: Xe,
|
|
1132
|
+
CancelBtn: Ue
|
|
1133
|
+
})), m = /* @__PURE__ */ h.createElement(ct, {
|
|
1134
|
+
value: b
|
|
1135
|
+
}, m)) : m = u, /* @__PURE__ */ h.createElement(Ht, {
|
|
559
1136
|
disabled: !1
|
|
560
|
-
},
|
|
561
|
-
}, mt = new He("antFadeIn", {
|
|
562
|
-
"0%": {
|
|
563
|
-
opacity: 0
|
|
564
|
-
},
|
|
565
|
-
"100%": {
|
|
566
|
-
opacity: 1
|
|
567
|
-
}
|
|
568
|
-
}), gt = new He("antFadeOut", {
|
|
569
|
-
"0%": {
|
|
570
|
-
opacity: 1
|
|
571
|
-
},
|
|
572
|
-
"100%": {
|
|
573
|
-
opacity: 0
|
|
574
|
-
}
|
|
575
|
-
}), Ct = function(e) {
|
|
576
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
577
|
-
const {
|
|
578
|
-
antCls: t
|
|
579
|
-
} = e, o = `${t}-fade`, a = n ? "&" : "";
|
|
580
|
-
return [Dn(o, mt, gt, e.motionDurationMid, n), {
|
|
581
|
-
[`
|
|
582
|
-
${a}${o}-enter,
|
|
583
|
-
${a}${o}-appear
|
|
584
|
-
`]: {
|
|
585
|
-
opacity: 0,
|
|
586
|
-
animationTimingFunction: "linear"
|
|
587
|
-
},
|
|
588
|
-
[`${a}${o}-leave`]: {
|
|
589
|
-
animationTimingFunction: "linear"
|
|
590
|
-
}
|
|
591
|
-
}];
|
|
1137
|
+
}, m);
|
|
592
1138
|
};
|
|
593
|
-
function
|
|
1139
|
+
function Ke(e) {
|
|
594
1140
|
return {
|
|
595
1141
|
position: e,
|
|
596
1142
|
inset: 0
|
|
597
1143
|
};
|
|
598
1144
|
}
|
|
599
|
-
const
|
|
1145
|
+
const Xn = (e) => {
|
|
600
1146
|
const {
|
|
601
|
-
componentCls:
|
|
602
|
-
antCls:
|
|
1147
|
+
componentCls: t,
|
|
1148
|
+
antCls: n
|
|
603
1149
|
} = e;
|
|
604
1150
|
return [{
|
|
605
|
-
[`${
|
|
606
|
-
[`${
|
|
1151
|
+
[`${t}-root`]: {
|
|
1152
|
+
[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]: {
|
|
607
1153
|
// reset scale avoid mousePosition bug
|
|
608
1154
|
transform: "none",
|
|
609
1155
|
opacity: 0,
|
|
@@ -613,19 +1159,19 @@ const vt = (e) => {
|
|
|
613
1159
|
},
|
|
614
1160
|
// https://github.com/ant-design/ant-design/issues/37329
|
|
615
1161
|
// https://github.com/ant-design/ant-design/issues/40272
|
|
616
|
-
[`${
|
|
1162
|
+
[`${t}${n}-zoom-leave ${t}-content`]: {
|
|
617
1163
|
pointerEvents: "none"
|
|
618
1164
|
},
|
|
619
|
-
[`${
|
|
1165
|
+
[`${t}-mask`]: Object.assign(Object.assign({}, Ke("fixed")), {
|
|
620
1166
|
zIndex: e.zIndexPopupBase,
|
|
621
1167
|
height: "100%",
|
|
622
1168
|
backgroundColor: e.colorBgMask,
|
|
623
1169
|
pointerEvents: "none",
|
|
624
|
-
[`${
|
|
1170
|
+
[`${t}-hidden`]: {
|
|
625
1171
|
display: "none"
|
|
626
1172
|
}
|
|
627
1173
|
}),
|
|
628
|
-
[`${
|
|
1174
|
+
[`${t}-wrap`]: Object.assign(Object.assign({}, Ke("fixed")), {
|
|
629
1175
|
zIndex: e.zIndexPopupBase,
|
|
630
1176
|
overflow: "auto",
|
|
631
1177
|
outline: 0,
|
|
@@ -633,20 +1179,20 @@ const vt = (e) => {
|
|
|
633
1179
|
})
|
|
634
1180
|
}
|
|
635
1181
|
}, {
|
|
636
|
-
[`${
|
|
1182
|
+
[`${t}-root`]: vn(e)
|
|
637
1183
|
}];
|
|
638
|
-
},
|
|
1184
|
+
}, Kn = (e) => {
|
|
639
1185
|
const {
|
|
640
|
-
componentCls:
|
|
1186
|
+
componentCls: t
|
|
641
1187
|
} = e;
|
|
642
1188
|
return [
|
|
643
1189
|
// ======================== Root =========================
|
|
644
1190
|
{
|
|
645
|
-
[`${
|
|
646
|
-
[`${
|
|
1191
|
+
[`${t}-root`]: {
|
|
1192
|
+
[`${t}-wrap-rtl`]: {
|
|
647
1193
|
direction: "rtl"
|
|
648
1194
|
},
|
|
649
|
-
[`${
|
|
1195
|
+
[`${t}-centered`]: {
|
|
650
1196
|
textAlign: "center",
|
|
651
1197
|
"&::before": {
|
|
652
1198
|
display: "inline-block",
|
|
@@ -655,7 +1201,7 @@ const vt = (e) => {
|
|
|
655
1201
|
verticalAlign: "middle",
|
|
656
1202
|
content: '""'
|
|
657
1203
|
},
|
|
658
|
-
[
|
|
1204
|
+
[t]: {
|
|
659
1205
|
top: 0,
|
|
660
1206
|
display: "inline-block",
|
|
661
1207
|
paddingBottom: 0,
|
|
@@ -664,12 +1210,12 @@ const vt = (e) => {
|
|
|
664
1210
|
}
|
|
665
1211
|
},
|
|
666
1212
|
[`@media (max-width: ${e.screenSMMax}px)`]: {
|
|
667
|
-
[
|
|
1213
|
+
[t]: {
|
|
668
1214
|
maxWidth: "calc(100vw - 16px)",
|
|
669
|
-
margin: `${
|
|
1215
|
+
margin: `${P(e.marginXS)} auto`
|
|
670
1216
|
},
|
|
671
|
-
[`${
|
|
672
|
-
[
|
|
1217
|
+
[`${t}-centered`]: {
|
|
1218
|
+
[t]: {
|
|
673
1219
|
flex: 1
|
|
674
1220
|
}
|
|
675
1221
|
}
|
|
@@ -678,15 +1224,15 @@ const vt = (e) => {
|
|
|
678
1224
|
},
|
|
679
1225
|
// ======================== Modal ========================
|
|
680
1226
|
{
|
|
681
|
-
[
|
|
1227
|
+
[t]: Object.assign(Object.assign({}, kt(e)), {
|
|
682
1228
|
pointerEvents: "none",
|
|
683
1229
|
position: "relative",
|
|
684
1230
|
top: 100,
|
|
685
1231
|
width: "auto",
|
|
686
|
-
maxWidth: `calc(100vw - ${
|
|
1232
|
+
maxWidth: `calc(100vw - ${P(e.calc(e.margin).mul(2).equal())})`,
|
|
687
1233
|
margin: "0 auto",
|
|
688
1234
|
paddingBottom: e.paddingLG,
|
|
689
|
-
[`${
|
|
1235
|
+
[`${t}-title`]: {
|
|
690
1236
|
margin: 0,
|
|
691
1237
|
color: e.titleColor,
|
|
692
1238
|
fontWeight: e.fontWeightStrong,
|
|
@@ -694,7 +1240,7 @@ const vt = (e) => {
|
|
|
694
1240
|
lineHeight: e.titleLineHeight,
|
|
695
1241
|
wordWrap: "break-word"
|
|
696
1242
|
},
|
|
697
|
-
[`${
|
|
1243
|
+
[`${t}-content`]: {
|
|
698
1244
|
position: "relative",
|
|
699
1245
|
backgroundColor: e.contentBg,
|
|
700
1246
|
backgroundClip: "padding-box",
|
|
@@ -704,7 +1250,7 @@ const vt = (e) => {
|
|
|
704
1250
|
pointerEvents: "auto",
|
|
705
1251
|
padding: e.contentPadding
|
|
706
1252
|
},
|
|
707
|
-
[`${
|
|
1253
|
+
[`${t}-close`]: Object.assign({
|
|
708
1254
|
position: "absolute",
|
|
709
1255
|
top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
|
|
710
1256
|
insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
|
|
@@ -726,11 +1272,14 @@ const vt = (e) => {
|
|
|
726
1272
|
display: "flex",
|
|
727
1273
|
fontSize: e.fontSizeLG,
|
|
728
1274
|
fontStyle: "normal",
|
|
729
|
-
lineHeight:
|
|
1275
|
+
lineHeight: P(e.modalCloseBtnSize),
|
|
730
1276
|
justifyContent: "center",
|
|
731
1277
|
textTransform: "none",
|
|
732
1278
|
textRendering: "auto"
|
|
733
1279
|
},
|
|
1280
|
+
"&:disabled": {
|
|
1281
|
+
pointerEvents: "none"
|
|
1282
|
+
},
|
|
734
1283
|
"&:hover": {
|
|
735
1284
|
color: e.modalCloseIconHoverColor,
|
|
736
1285
|
backgroundColor: e.colorBgTextHover,
|
|
@@ -739,22 +1288,30 @@ const vt = (e) => {
|
|
|
739
1288
|
"&:active": {
|
|
740
1289
|
backgroundColor: e.colorBgTextActive
|
|
741
1290
|
}
|
|
742
|
-
},
|
|
743
|
-
[`${
|
|
1291
|
+
}, At(e)),
|
|
1292
|
+
[`${t}-header`]: {
|
|
744
1293
|
color: e.colorText,
|
|
745
1294
|
background: e.headerBg,
|
|
746
|
-
borderRadius: `${
|
|
1295
|
+
borderRadius: `${P(e.borderRadiusLG)} ${P(e.borderRadiusLG)} 0 0`,
|
|
747
1296
|
marginBottom: e.headerMarginBottom,
|
|
748
1297
|
padding: e.headerPadding,
|
|
749
1298
|
borderBottom: e.headerBorderBottom
|
|
750
1299
|
},
|
|
751
|
-
[`${
|
|
1300
|
+
[`${t}-body`]: {
|
|
752
1301
|
fontSize: e.fontSize,
|
|
753
1302
|
lineHeight: e.lineHeight,
|
|
754
1303
|
wordWrap: "break-word",
|
|
755
|
-
padding: e.bodyPadding
|
|
1304
|
+
padding: e.bodyPadding,
|
|
1305
|
+
[`${t}-body-skeleton`]: {
|
|
1306
|
+
width: "100%",
|
|
1307
|
+
height: "100%",
|
|
1308
|
+
display: "flex",
|
|
1309
|
+
justifyContent: "center",
|
|
1310
|
+
alignItems: "center",
|
|
1311
|
+
margin: `${P(e.margin)} auto`
|
|
1312
|
+
}
|
|
756
1313
|
},
|
|
757
|
-
[`${
|
|
1314
|
+
[`${t}-footer`]: {
|
|
758
1315
|
textAlign: "end",
|
|
759
1316
|
background: e.footerBg,
|
|
760
1317
|
marginTop: e.footerMarginTop,
|
|
@@ -765,49 +1322,49 @@ const vt = (e) => {
|
|
|
765
1322
|
marginInlineStart: e.marginXS
|
|
766
1323
|
}
|
|
767
1324
|
},
|
|
768
|
-
[`${
|
|
1325
|
+
[`${t}-open`]: {
|
|
769
1326
|
overflow: "hidden"
|
|
770
1327
|
}
|
|
771
1328
|
})
|
|
772
1329
|
},
|
|
773
1330
|
// ======================== Pure =========================
|
|
774
1331
|
{
|
|
775
|
-
[`${
|
|
1332
|
+
[`${t}-pure-panel`]: {
|
|
776
1333
|
top: "auto",
|
|
777
1334
|
padding: 0,
|
|
778
1335
|
display: "flex",
|
|
779
1336
|
flexDirection: "column",
|
|
780
|
-
[`${
|
|
781
|
-
${
|
|
782
|
-
${
|
|
1337
|
+
[`${t}-content,
|
|
1338
|
+
${t}-body,
|
|
1339
|
+
${t}-confirm-body-wrapper`]: {
|
|
783
1340
|
display: "flex",
|
|
784
1341
|
flexDirection: "column",
|
|
785
1342
|
flex: "auto"
|
|
786
1343
|
},
|
|
787
|
-
[`${
|
|
1344
|
+
[`${t}-confirm-body`]: {
|
|
788
1345
|
marginBottom: "auto"
|
|
789
1346
|
}
|
|
790
1347
|
}
|
|
791
1348
|
}
|
|
792
1349
|
];
|
|
793
|
-
},
|
|
1350
|
+
}, Qn = (e) => {
|
|
794
1351
|
const {
|
|
795
|
-
componentCls:
|
|
1352
|
+
componentCls: t
|
|
796
1353
|
} = e;
|
|
797
1354
|
return {
|
|
798
|
-
[`${
|
|
799
|
-
[`${
|
|
1355
|
+
[`${t}-root`]: {
|
|
1356
|
+
[`${t}-wrap-rtl`]: {
|
|
800
1357
|
direction: "rtl",
|
|
801
|
-
[`${
|
|
1358
|
+
[`${t}-confirm-body`]: {
|
|
802
1359
|
direction: "rtl"
|
|
803
1360
|
}
|
|
804
1361
|
}
|
|
805
1362
|
}
|
|
806
1363
|
};
|
|
807
|
-
},
|
|
808
|
-
const
|
|
809
|
-
return
|
|
810
|
-
modalHeaderHeight: e.calc(e.calc(o).mul(
|
|
1364
|
+
}, Ct = (e) => {
|
|
1365
|
+
const t = e.padding, n = e.fontSizeHeading5, o = e.lineHeightHeading5;
|
|
1366
|
+
return Je(e, {
|
|
1367
|
+
modalHeaderHeight: e.calc(e.calc(o).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),
|
|
811
1368
|
modalFooterBorderColorSplit: e.colorSplit,
|
|
812
1369
|
modalFooterBorderStyle: e.lineType,
|
|
813
1370
|
modalFooterBorderWidth: e.lineWidth,
|
|
@@ -817,7 +1374,7 @@ const vt = (e) => {
|
|
|
817
1374
|
modalConfirmIconSize: e.fontHeight,
|
|
818
1375
|
modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
|
|
819
1376
|
});
|
|
820
|
-
},
|
|
1377
|
+
}, vt = (e) => ({
|
|
821
1378
|
footerBg: "transparent",
|
|
822
1379
|
headerBg: e.colorBgElevated,
|
|
823
1380
|
titleLineHeight: e.lineHeightHeading5,
|
|
@@ -825,154 +1382,164 @@ const vt = (e) => {
|
|
|
825
1382
|
contentBg: e.colorBgElevated,
|
|
826
1383
|
titleColor: e.colorTextHeading,
|
|
827
1384
|
// internal
|
|
828
|
-
contentPadding: e.wireframe ? 0 : `${
|
|
829
|
-
headerPadding: e.wireframe ? `${
|
|
830
|
-
headerBorderBottom: e.wireframe ? `${
|
|
1385
|
+
contentPadding: e.wireframe ? 0 : `${P(e.paddingMD)} ${P(e.paddingContentHorizontalLG)}`,
|
|
1386
|
+
headerPadding: e.wireframe ? `${P(e.padding)} ${P(e.paddingLG)}` : 0,
|
|
1387
|
+
headerBorderBottom: e.wireframe ? `${P(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
|
|
831
1388
|
headerMarginBottom: e.wireframe ? 0 : e.marginXS,
|
|
832
1389
|
bodyPadding: e.wireframe ? e.paddingLG : 0,
|
|
833
|
-
footerPadding: e.wireframe ? `${
|
|
834
|
-
footerBorderTop: e.wireframe ? `${
|
|
835
|
-
footerBorderRadius: e.wireframe ? `0 0 ${
|
|
1390
|
+
footerPadding: e.wireframe ? `${P(e.paddingXS)} ${P(e.padding)}` : 0,
|
|
1391
|
+
footerBorderTop: e.wireframe ? `${P(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
|
|
1392
|
+
footerBorderRadius: e.wireframe ? `0 0 ${P(e.borderRadiusLG)} ${P(e.borderRadiusLG)}` : 0,
|
|
836
1393
|
footerMarginTop: e.wireframe ? 0 : e.marginSM,
|
|
837
|
-
confirmBodyPadding: e.wireframe ? `${
|
|
1394
|
+
confirmBodyPadding: e.wireframe ? `${P(e.padding * 2)} ${P(e.padding * 2)} ${P(e.paddingLG)}` : 0,
|
|
838
1395
|
confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
|
|
839
1396
|
confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
|
|
840
|
-
}),
|
|
841
|
-
const
|
|
842
|
-
return [
|
|
843
|
-
},
|
|
1397
|
+
}), bt = Ye("Modal", (e) => {
|
|
1398
|
+
const t = Ct(e);
|
|
1399
|
+
return [Kn(t), Qn(t), Xn(t), Qt(t, "zoom")];
|
|
1400
|
+
}, vt, {
|
|
844
1401
|
unitless: {
|
|
845
1402
|
titleLineHeight: !0
|
|
846
1403
|
}
|
|
847
1404
|
});
|
|
848
|
-
var
|
|
849
|
-
var
|
|
850
|
-
for (var o in e)
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
855
|
-
return t;
|
|
1405
|
+
var Zn = function(e, t) {
|
|
1406
|
+
var n = {};
|
|
1407
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
1408
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1409
|
+
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (n[o[a]] = e[o[a]]);
|
|
1410
|
+
return n;
|
|
856
1411
|
};
|
|
857
|
-
let
|
|
858
|
-
const
|
|
859
|
-
|
|
1412
|
+
let he;
|
|
1413
|
+
const Yn = (e) => {
|
|
1414
|
+
he = {
|
|
860
1415
|
x: e.pageX,
|
|
861
1416
|
y: e.pageY
|
|
862
1417
|
}, setTimeout(() => {
|
|
863
|
-
|
|
1418
|
+
he = null;
|
|
864
1419
|
}, 100);
|
|
865
1420
|
};
|
|
866
|
-
|
|
867
|
-
const
|
|
868
|
-
var
|
|
1421
|
+
On() && document.documentElement.addEventListener("click", Yn, !0);
|
|
1422
|
+
const pt = (e) => {
|
|
1423
|
+
var t;
|
|
869
1424
|
const {
|
|
870
|
-
getPopupContainer:
|
|
1425
|
+
getPopupContainer: n,
|
|
871
1426
|
getPrefixCls: o,
|
|
872
1427
|
direction: a,
|
|
873
1428
|
modal: r
|
|
874
|
-
} = l.useContext(
|
|
1429
|
+
} = l.useContext(_), d = (A) => {
|
|
875
1430
|
const {
|
|
876
1431
|
onCancel: M
|
|
877
1432
|
} = e;
|
|
878
|
-
M == null || M(
|
|
879
|
-
},
|
|
1433
|
+
M == null || M(A);
|
|
1434
|
+
}, c = (A) => {
|
|
880
1435
|
const {
|
|
881
1436
|
onOk: M
|
|
882
1437
|
} = e;
|
|
883
|
-
M == null || M(
|
|
1438
|
+
M == null || M(A);
|
|
884
1439
|
};
|
|
885
1440
|
if (process.env.NODE_ENV !== "production") {
|
|
886
|
-
const
|
|
1441
|
+
const A = xe("Modal");
|
|
887
1442
|
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((M) => {
|
|
888
|
-
let [
|
|
889
|
-
|
|
1443
|
+
let [le, de] = M;
|
|
1444
|
+
A.deprecated(!(le in e), le, de);
|
|
890
1445
|
});
|
|
891
1446
|
}
|
|
892
1447
|
const {
|
|
893
|
-
prefixCls:
|
|
894
|
-
className:
|
|
895
|
-
rootClassName:
|
|
1448
|
+
prefixCls: i,
|
|
1449
|
+
className: u,
|
|
1450
|
+
rootClassName: s,
|
|
896
1451
|
open: f,
|
|
897
|
-
wrapClassName:
|
|
898
|
-
centered:
|
|
899
|
-
getContainer:
|
|
900
|
-
focusTriggerAfterClose:
|
|
901
|
-
style:
|
|
1452
|
+
wrapClassName: g,
|
|
1453
|
+
centered: v,
|
|
1454
|
+
getContainer: b,
|
|
1455
|
+
focusTriggerAfterClose: m = !0,
|
|
1456
|
+
style: x,
|
|
902
1457
|
// Deprecated
|
|
903
1458
|
visible: p,
|
|
904
|
-
width:
|
|
1459
|
+
width: C = 520,
|
|
905
1460
|
footer: y,
|
|
906
|
-
classNames:
|
|
907
|
-
styles:
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1461
|
+
classNames: $,
|
|
1462
|
+
styles: N,
|
|
1463
|
+
children: O,
|
|
1464
|
+
loading: S
|
|
1465
|
+
} = e, R = Zn(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"]), w = o("modal", i), z = o(), T = ot(w), [V, L, B] = bt(w, T), F = E(g, {
|
|
1466
|
+
[`${w}-centered`]: !!v,
|
|
1467
|
+
[`${w}-wrap-rtl`]: a === "rtl"
|
|
1468
|
+
}), W = y !== null && !S ? /* @__PURE__ */ l.createElement(gt, Object.assign({}, e, {
|
|
1469
|
+
onOk: c,
|
|
1470
|
+
onCancel: d
|
|
1471
|
+
})) : null, [q, U, te] = Sn(_e(e), _e(r), {
|
|
915
1472
|
closable: !0,
|
|
916
|
-
closeIcon: /* @__PURE__ */ l.createElement(
|
|
917
|
-
className: `${
|
|
1473
|
+
closeIcon: /* @__PURE__ */ l.createElement(we, {
|
|
1474
|
+
className: `${w}-close-icon`
|
|
918
1475
|
}),
|
|
919
|
-
closeIconRender: (
|
|
920
|
-
}),
|
|
921
|
-
return
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
}, /* @__PURE__ */ l.createElement(
|
|
925
|
-
value:
|
|
926
|
-
}, /* @__PURE__ */ l.createElement(
|
|
927
|
-
width:
|
|
928
|
-
},
|
|
1476
|
+
closeIconRender: (A) => mt(w, A)
|
|
1477
|
+
}), K = Un(`.${w}-content`), [Q, k] = Zt("Modal", R.zIndex);
|
|
1478
|
+
return V(/* @__PURE__ */ l.createElement(Yt, {
|
|
1479
|
+
form: !0,
|
|
1480
|
+
space: !0
|
|
1481
|
+
}, /* @__PURE__ */ l.createElement(Jt.Provider, {
|
|
1482
|
+
value: k
|
|
1483
|
+
}, /* @__PURE__ */ l.createElement(ft, Object.assign({
|
|
1484
|
+
width: C
|
|
1485
|
+
}, R, {
|
|
929
1486
|
zIndex: Q,
|
|
930
|
-
getContainer:
|
|
931
|
-
prefixCls:
|
|
932
|
-
rootClassName:
|
|
933
|
-
footer:
|
|
1487
|
+
getContainer: b === void 0 ? n : b,
|
|
1488
|
+
prefixCls: w,
|
|
1489
|
+
rootClassName: E(L, s, B, T),
|
|
1490
|
+
footer: W,
|
|
934
1491
|
visible: f ?? p,
|
|
935
|
-
mousePosition: (
|
|
936
|
-
onClose:
|
|
937
|
-
closable:
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1492
|
+
mousePosition: (t = R.mousePosition) !== null && t !== void 0 ? t : he,
|
|
1493
|
+
onClose: d,
|
|
1494
|
+
closable: q && {
|
|
1495
|
+
disabled: te,
|
|
1496
|
+
closeIcon: U
|
|
1497
|
+
},
|
|
1498
|
+
closeIcon: U,
|
|
1499
|
+
focusTriggerAfterClose: m,
|
|
1500
|
+
transitionName: ie(z, "zoom", e.transitionName),
|
|
1501
|
+
maskTransitionName: ie(z, "fade", e.maskTransitionName),
|
|
1502
|
+
className: E(L, u, r == null ? void 0 : r.className),
|
|
1503
|
+
style: Object.assign(Object.assign({}, r == null ? void 0 : r.style), x),
|
|
1504
|
+
classNames: Object.assign(Object.assign(Object.assign({}, r == null ? void 0 : r.classNames), $), {
|
|
1505
|
+
wrapper: E(F, $ == null ? void 0 : $.wrapper)
|
|
946
1506
|
}),
|
|
947
|
-
styles: Object.assign(Object.assign({}, r == null ? void 0 : r.styles),
|
|
948
|
-
panelRef:
|
|
949
|
-
})
|
|
950
|
-
|
|
1507
|
+
styles: Object.assign(Object.assign({}, r == null ? void 0 : r.styles), N),
|
|
1508
|
+
panelRef: K
|
|
1509
|
+
}), S ? /* @__PURE__ */ l.createElement(Y, {
|
|
1510
|
+
active: !0,
|
|
1511
|
+
title: !1,
|
|
1512
|
+
paragraph: {
|
|
1513
|
+
rows: 4
|
|
1514
|
+
},
|
|
1515
|
+
className: `${w}-body-skeleton`
|
|
1516
|
+
}) : O))));
|
|
1517
|
+
}, Jn = (e) => {
|
|
951
1518
|
const {
|
|
952
|
-
componentCls:
|
|
953
|
-
titleFontSize:
|
|
1519
|
+
componentCls: t,
|
|
1520
|
+
titleFontSize: n,
|
|
954
1521
|
titleLineHeight: o,
|
|
955
1522
|
modalConfirmIconSize: a,
|
|
956
1523
|
fontSize: r,
|
|
957
|
-
lineHeight:
|
|
958
|
-
modalTitleHeight:
|
|
959
|
-
fontHeight:
|
|
960
|
-
confirmBodyPadding:
|
|
961
|
-
} = e,
|
|
1524
|
+
lineHeight: d,
|
|
1525
|
+
modalTitleHeight: c,
|
|
1526
|
+
fontHeight: i,
|
|
1527
|
+
confirmBodyPadding: u
|
|
1528
|
+
} = e, s = `${t}-confirm`;
|
|
962
1529
|
return {
|
|
963
|
-
[
|
|
1530
|
+
[s]: {
|
|
964
1531
|
"&-rtl": {
|
|
965
1532
|
direction: "rtl"
|
|
966
1533
|
},
|
|
967
1534
|
[`${e.antCls}-modal-header`]: {
|
|
968
1535
|
display: "none"
|
|
969
1536
|
},
|
|
970
|
-
[`${
|
|
971
|
-
[`&${
|
|
972
|
-
padding:
|
|
1537
|
+
[`${s}-body-wrapper`]: Object.assign({}, Lt()),
|
|
1538
|
+
[`&${t} ${t}-body`]: {
|
|
1539
|
+
padding: u
|
|
973
1540
|
},
|
|
974
1541
|
// ====================== Body ======================
|
|
975
|
-
[`${
|
|
1542
|
+
[`${s}-body`]: {
|
|
976
1543
|
display: "flex",
|
|
977
1544
|
flexWrap: "nowrap",
|
|
978
1545
|
alignItems: "start",
|
|
@@ -980,35 +1547,35 @@ const on = (e) => {
|
|
|
980
1547
|
flex: "none",
|
|
981
1548
|
fontSize: a,
|
|
982
1549
|
marginInlineEnd: e.confirmIconMarginInlineEnd,
|
|
983
|
-
marginTop: e.calc(e.calc(
|
|
1550
|
+
marginTop: e.calc(e.calc(i).sub(a).equal()).div(2).equal()
|
|
984
1551
|
},
|
|
985
1552
|
[`&-has-title > ${e.iconCls}`]: {
|
|
986
|
-
marginTop: e.calc(e.calc(
|
|
1553
|
+
marginTop: e.calc(e.calc(c).sub(a).equal()).div(2).equal()
|
|
987
1554
|
}
|
|
988
1555
|
},
|
|
989
|
-
[`${
|
|
1556
|
+
[`${s}-paragraph`]: {
|
|
990
1557
|
display: "flex",
|
|
991
1558
|
flexDirection: "column",
|
|
992
1559
|
flex: "auto",
|
|
993
1560
|
rowGap: e.marginXS
|
|
994
1561
|
},
|
|
995
1562
|
// https://github.com/ant-design/ant-design/issues/48159
|
|
996
|
-
[`${e.iconCls} + ${
|
|
997
|
-
maxWidth: `calc(100% - ${
|
|
1563
|
+
[`${e.iconCls} + ${s}-paragraph`]: {
|
|
1564
|
+
maxWidth: `calc(100% - ${P(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`
|
|
998
1565
|
},
|
|
999
|
-
[`${
|
|
1566
|
+
[`${s}-title`]: {
|
|
1000
1567
|
color: e.colorTextHeading,
|
|
1001
1568
|
fontWeight: e.fontWeightStrong,
|
|
1002
|
-
fontSize:
|
|
1569
|
+
fontSize: n,
|
|
1003
1570
|
lineHeight: o
|
|
1004
1571
|
},
|
|
1005
|
-
[`${
|
|
1572
|
+
[`${s}-content`]: {
|
|
1006
1573
|
color: e.colorText,
|
|
1007
1574
|
fontSize: r,
|
|
1008
|
-
lineHeight:
|
|
1575
|
+
lineHeight: d
|
|
1009
1576
|
},
|
|
1010
1577
|
// ===================== Footer =====================
|
|
1011
|
-
[`${
|
|
1578
|
+
[`${s}-btns`]: {
|
|
1012
1579
|
textAlign: "end",
|
|
1013
1580
|
marginTop: e.confirmBtnsMarginTop,
|
|
1014
1581
|
[`${e.antCls}-btn + ${e.antCls}-btn`]: {
|
|
@@ -1017,489 +1584,488 @@ const on = (e) => {
|
|
|
1017
1584
|
}
|
|
1018
1585
|
}
|
|
1019
1586
|
},
|
|
1020
|
-
[`${
|
|
1587
|
+
[`${s}-error ${s}-body > ${e.iconCls}`]: {
|
|
1021
1588
|
color: e.colorError
|
|
1022
1589
|
},
|
|
1023
|
-
[`${
|
|
1024
|
-
${
|
|
1590
|
+
[`${s}-warning ${s}-body > ${e.iconCls},
|
|
1591
|
+
${s}-confirm ${s}-body > ${e.iconCls}`]: {
|
|
1025
1592
|
color: e.colorWarning
|
|
1026
1593
|
},
|
|
1027
|
-
[`${
|
|
1594
|
+
[`${s}-info ${s}-body > ${e.iconCls}`]: {
|
|
1028
1595
|
color: e.colorInfo
|
|
1029
1596
|
},
|
|
1030
|
-
[`${
|
|
1597
|
+
[`${s}-success ${s}-body > ${e.iconCls}`]: {
|
|
1031
1598
|
color: e.colorSuccess
|
|
1032
1599
|
}
|
|
1033
1600
|
};
|
|
1034
|
-
},
|
|
1035
|
-
const
|
|
1036
|
-
return [
|
|
1037
|
-
},
|
|
1601
|
+
}, eo = Dt(["Modal", "confirm"], (e) => {
|
|
1602
|
+
const t = Ct(e);
|
|
1603
|
+
return [Jn(t)];
|
|
1604
|
+
}, vt, {
|
|
1038
1605
|
// confirm is weak than modal since no conflict here
|
|
1039
1606
|
order: -1e3
|
|
1040
1607
|
});
|
|
1041
|
-
var
|
|
1042
|
-
var
|
|
1043
|
-
for (var o in e)
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
1048
|
-
return t;
|
|
1608
|
+
var to = function(e, t) {
|
|
1609
|
+
var n = {};
|
|
1610
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
1611
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1612
|
+
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (n[o[a]] = e[o[a]]);
|
|
1613
|
+
return n;
|
|
1049
1614
|
};
|
|
1050
|
-
function
|
|
1615
|
+
function ht(e) {
|
|
1051
1616
|
const {
|
|
1052
|
-
prefixCls:
|
|
1053
|
-
icon:
|
|
1617
|
+
prefixCls: t,
|
|
1618
|
+
icon: n,
|
|
1054
1619
|
okText: o,
|
|
1055
1620
|
cancelText: a,
|
|
1056
1621
|
confirmPrefixCls: r,
|
|
1057
|
-
type:
|
|
1058
|
-
okCancel:
|
|
1059
|
-
footer:
|
|
1622
|
+
type: d,
|
|
1623
|
+
okCancel: c,
|
|
1624
|
+
footer: i,
|
|
1060
1625
|
// Legacy for static function usage
|
|
1061
|
-
locale:
|
|
1062
|
-
} = e,
|
|
1626
|
+
locale: u
|
|
1627
|
+
} = e, s = to(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
|
|
1063
1628
|
if (process.env.NODE_ENV !== "production") {
|
|
1064
|
-
const
|
|
1065
|
-
process.env.NODE_ENV !== "production" &&
|
|
1629
|
+
const S = xe("Modal");
|
|
1630
|
+
process.env.NODE_ENV !== "production" && S(!(typeof n == "string" && n.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`);
|
|
1066
1631
|
}
|
|
1067
|
-
let f =
|
|
1068
|
-
if (!
|
|
1069
|
-
switch (
|
|
1632
|
+
let f = n;
|
|
1633
|
+
if (!n && n !== null)
|
|
1634
|
+
switch (d) {
|
|
1070
1635
|
case "info":
|
|
1071
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1636
|
+
f = /* @__PURE__ */ l.createElement(it, null);
|
|
1072
1637
|
break;
|
|
1073
1638
|
case "success":
|
|
1074
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1639
|
+
f = /* @__PURE__ */ l.createElement(lt, null);
|
|
1075
1640
|
break;
|
|
1076
1641
|
case "error":
|
|
1077
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1642
|
+
f = /* @__PURE__ */ l.createElement(en, null);
|
|
1078
1643
|
break;
|
|
1079
1644
|
default:
|
|
1080
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1645
|
+
f = /* @__PURE__ */ l.createElement(rt, null);
|
|
1081
1646
|
}
|
|
1082
|
-
const
|
|
1083
|
-
autoFocusButton:
|
|
1647
|
+
const g = c ?? d === "confirm", v = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [b] = Ee("Modal"), m = u || b, x = o || (g ? m == null ? void 0 : m.okText : m == null ? void 0 : m.justOkText), p = a || (m == null ? void 0 : m.cancelText), C = Object.assign({
|
|
1648
|
+
autoFocusButton: v,
|
|
1084
1649
|
cancelTextLocale: p,
|
|
1085
|
-
okTextLocale:
|
|
1086
|
-
mergedOkCancel:
|
|
1087
|
-
},
|
|
1650
|
+
okTextLocale: x,
|
|
1651
|
+
mergedOkCancel: g
|
|
1652
|
+
}, s), y = l.useMemo(() => C, G(Object.values(C))), $ = /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(ke, null), /* @__PURE__ */ l.createElement(Ae, null)), N = e.title !== void 0 && e.title !== null, O = `${r}-body`;
|
|
1088
1653
|
return /* @__PURE__ */ l.createElement("div", {
|
|
1089
1654
|
className: `${r}-body-wrapper`
|
|
1090
1655
|
}, /* @__PURE__ */ l.createElement("div", {
|
|
1091
|
-
className:
|
|
1092
|
-
[`${O}-has-title`]:
|
|
1656
|
+
className: E(O, {
|
|
1657
|
+
[`${O}-has-title`]: N
|
|
1093
1658
|
})
|
|
1094
1659
|
}, f, /* @__PURE__ */ l.createElement("div", {
|
|
1095
1660
|
className: `${r}-paragraph`
|
|
1096
|
-
},
|
|
1661
|
+
}, N && /* @__PURE__ */ l.createElement("span", {
|
|
1097
1662
|
className: `${r}-title`
|
|
1098
1663
|
}, e.title), /* @__PURE__ */ l.createElement("div", {
|
|
1099
1664
|
className: `${r}-content`
|
|
1100
|
-
}, e.content))),
|
|
1665
|
+
}, e.content))), i === void 0 || typeof i == "function" ? /* @__PURE__ */ l.createElement(ct, {
|
|
1101
1666
|
value: y
|
|
1102
1667
|
}, /* @__PURE__ */ l.createElement("div", {
|
|
1103
1668
|
className: `${r}-btns`
|
|
1104
|
-
}, typeof
|
|
1105
|
-
OkBtn:
|
|
1106
|
-
CancelBtn:
|
|
1107
|
-
}) :
|
|
1108
|
-
prefixCls:
|
|
1669
|
+
}, typeof i == "function" ? i($, {
|
|
1670
|
+
OkBtn: Ae,
|
|
1671
|
+
CancelBtn: ke
|
|
1672
|
+
}) : $)) : i, /* @__PURE__ */ l.createElement(eo, {
|
|
1673
|
+
prefixCls: t
|
|
1109
1674
|
}));
|
|
1110
1675
|
}
|
|
1111
|
-
const
|
|
1676
|
+
const yt = (e) => {
|
|
1112
1677
|
const {
|
|
1113
|
-
close:
|
|
1114
|
-
zIndex:
|
|
1678
|
+
close: t,
|
|
1679
|
+
zIndex: n,
|
|
1115
1680
|
afterClose: o,
|
|
1116
1681
|
open: a,
|
|
1117
1682
|
keyboard: r,
|
|
1118
|
-
centered:
|
|
1119
|
-
getContainer:
|
|
1120
|
-
maskStyle:
|
|
1121
|
-
direction:
|
|
1122
|
-
prefixCls:
|
|
1683
|
+
centered: d,
|
|
1684
|
+
getContainer: c,
|
|
1685
|
+
maskStyle: i,
|
|
1686
|
+
direction: u,
|
|
1687
|
+
prefixCls: s,
|
|
1123
1688
|
wrapClassName: f,
|
|
1124
|
-
rootPrefixCls:
|
|
1125
|
-
bodyStyle:
|
|
1126
|
-
closable:
|
|
1127
|
-
closeIcon:
|
|
1128
|
-
modalRender:
|
|
1689
|
+
rootPrefixCls: g,
|
|
1690
|
+
bodyStyle: v,
|
|
1691
|
+
closable: b = !1,
|
|
1692
|
+
closeIcon: m,
|
|
1693
|
+
modalRender: x,
|
|
1129
1694
|
focusTriggerAfterClose: p,
|
|
1130
|
-
onConfirm:
|
|
1695
|
+
onConfirm: C,
|
|
1131
1696
|
styles: y
|
|
1132
1697
|
} = e;
|
|
1133
1698
|
if (process.env.NODE_ENV !== "production") {
|
|
1134
|
-
const
|
|
1135
|
-
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((
|
|
1136
|
-
let [
|
|
1137
|
-
|
|
1699
|
+
const V = xe("Modal");
|
|
1700
|
+
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((L) => {
|
|
1701
|
+
let [B, F] = L;
|
|
1702
|
+
V.deprecated(!(B in e), B, F);
|
|
1138
1703
|
});
|
|
1139
1704
|
}
|
|
1140
|
-
const
|
|
1141
|
-
[`${
|
|
1142
|
-
}, e.className), [,
|
|
1143
|
-
return /* @__PURE__ */ l.createElement(
|
|
1144
|
-
prefixCls:
|
|
1145
|
-
className:
|
|
1146
|
-
wrapClassName:
|
|
1147
|
-
[`${
|
|
1705
|
+
const $ = `${s}-confirm`, N = e.width || 416, O = e.style || {}, S = e.mask === void 0 ? !0 : e.mask, R = e.maskClosable === void 0 ? !1 : e.maskClosable, w = E($, `${$}-${e.type}`, {
|
|
1706
|
+
[`${$}-rtl`]: u === "rtl"
|
|
1707
|
+
}, e.className), [, z] = _t(), T = l.useMemo(() => n !== void 0 ? n : z.zIndexPopupBase + tn, [n, z]);
|
|
1708
|
+
return /* @__PURE__ */ l.createElement(pt, {
|
|
1709
|
+
prefixCls: s,
|
|
1710
|
+
className: w,
|
|
1711
|
+
wrapClassName: E({
|
|
1712
|
+
[`${$}-centered`]: !!e.centered
|
|
1148
1713
|
}, f),
|
|
1149
1714
|
onCancel: () => {
|
|
1150
|
-
|
|
1715
|
+
t == null || t({
|
|
1151
1716
|
triggerCancel: !0
|
|
1152
|
-
}),
|
|
1717
|
+
}), C == null || C(!1);
|
|
1153
1718
|
},
|
|
1154
1719
|
open: a,
|
|
1155
1720
|
title: "",
|
|
1156
1721
|
footer: null,
|
|
1157
|
-
transitionName:
|
|
1158
|
-
maskTransitionName:
|
|
1159
|
-
mask:
|
|
1160
|
-
maskClosable:
|
|
1722
|
+
transitionName: ie(g || "", "zoom", e.transitionName),
|
|
1723
|
+
maskTransitionName: ie(g || "", "fade", e.maskTransitionName),
|
|
1724
|
+
mask: S,
|
|
1725
|
+
maskClosable: R,
|
|
1161
1726
|
style: O,
|
|
1162
1727
|
styles: Object.assign({
|
|
1163
|
-
body:
|
|
1164
|
-
mask:
|
|
1728
|
+
body: v,
|
|
1729
|
+
mask: i
|
|
1165
1730
|
}, y),
|
|
1166
|
-
width:
|
|
1167
|
-
zIndex:
|
|
1731
|
+
width: N,
|
|
1732
|
+
zIndex: T,
|
|
1168
1733
|
afterClose: o,
|
|
1169
1734
|
keyboard: r,
|
|
1170
|
-
centered:
|
|
1171
|
-
getContainer:
|
|
1172
|
-
closable:
|
|
1173
|
-
closeIcon:
|
|
1174
|
-
modalRender:
|
|
1735
|
+
centered: d,
|
|
1736
|
+
getContainer: c,
|
|
1737
|
+
closable: b,
|
|
1738
|
+
closeIcon: m,
|
|
1739
|
+
modalRender: x,
|
|
1175
1740
|
focusTriggerAfterClose: p
|
|
1176
|
-
}, /* @__PURE__ */ l.createElement(
|
|
1177
|
-
confirmPrefixCls:
|
|
1741
|
+
}, /* @__PURE__ */ l.createElement(ht, Object.assign({}, e, {
|
|
1742
|
+
confirmPrefixCls: $
|
|
1178
1743
|
})));
|
|
1179
|
-
},
|
|
1744
|
+
}, je = (e) => {
|
|
1180
1745
|
const {
|
|
1181
|
-
rootPrefixCls:
|
|
1182
|
-
iconPrefixCls:
|
|
1746
|
+
rootPrefixCls: t,
|
|
1747
|
+
iconPrefixCls: n,
|
|
1183
1748
|
direction: o,
|
|
1184
1749
|
theme: a
|
|
1185
1750
|
} = e;
|
|
1186
|
-
return /* @__PURE__ */ l.createElement(
|
|
1187
|
-
prefixCls:
|
|
1188
|
-
iconPrefixCls:
|
|
1751
|
+
return /* @__PURE__ */ l.createElement(tt, {
|
|
1752
|
+
prefixCls: t,
|
|
1753
|
+
iconPrefixCls: n,
|
|
1189
1754
|
direction: o,
|
|
1190
1755
|
theme: a
|
|
1191
|
-
}, /* @__PURE__ */ l.createElement(
|
|
1756
|
+
}, /* @__PURE__ */ l.createElement(yt, Object.assign({}, e)));
|
|
1192
1757
|
};
|
|
1193
|
-
process.env.NODE_ENV !== "production" && (
|
|
1194
|
-
const
|
|
1195
|
-
let
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1758
|
+
process.env.NODE_ENV !== "production" && (yt.displayName = "ConfirmDialog", je.displayName = "ConfirmDialogWrapper");
|
|
1759
|
+
const Z = [];
|
|
1760
|
+
let xt = "";
|
|
1761
|
+
function $t() {
|
|
1762
|
+
return xt;
|
|
1198
1763
|
}
|
|
1199
|
-
const
|
|
1200
|
-
var
|
|
1764
|
+
const no = (e) => {
|
|
1765
|
+
var t, n;
|
|
1201
1766
|
const {
|
|
1202
1767
|
prefixCls: o,
|
|
1203
1768
|
getContainer: a,
|
|
1204
1769
|
direction: r
|
|
1205
|
-
} = e,
|
|
1206
|
-
let
|
|
1207
|
-
return
|
|
1208
|
-
rootPrefixCls:
|
|
1209
|
-
prefixCls:
|
|
1210
|
-
iconPrefixCls:
|
|
1211
|
-
theme:
|
|
1212
|
-
direction: r ??
|
|
1213
|
-
locale: (
|
|
1214
|
-
getContainer:
|
|
1770
|
+
} = e, d = et(), c = ne(_), i = $t() || c.getPrefixCls(), u = o || `${i}-modal`;
|
|
1771
|
+
let s = a;
|
|
1772
|
+
return s === !1 && (s = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && nt(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ h.createElement(je, Object.assign({}, e, {
|
|
1773
|
+
rootPrefixCls: i,
|
|
1774
|
+
prefixCls: u,
|
|
1775
|
+
iconPrefixCls: c.iconPrefixCls,
|
|
1776
|
+
theme: c.theme,
|
|
1777
|
+
direction: r ?? c.direction,
|
|
1778
|
+
locale: (n = (t = c.locale) === null || t === void 0 ? void 0 : t.Modal) !== null && n !== void 0 ? n : d,
|
|
1779
|
+
getContainer: s
|
|
1215
1780
|
}));
|
|
1216
1781
|
};
|
|
1217
|
-
function
|
|
1218
|
-
const
|
|
1219
|
-
process.env.NODE_ENV !== "production" && !
|
|
1220
|
-
const
|
|
1782
|
+
function ae(e) {
|
|
1783
|
+
const t = Wt();
|
|
1784
|
+
process.env.NODE_ENV !== "production" && !t.holderRender && Vt("Modal");
|
|
1785
|
+
const n = document.createDocumentFragment();
|
|
1221
1786
|
let o = Object.assign(Object.assign({}, e), {
|
|
1222
|
-
close:
|
|
1787
|
+
close: c,
|
|
1223
1788
|
open: !0
|
|
1224
1789
|
}), a;
|
|
1225
1790
|
function r() {
|
|
1226
|
-
for (var
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1791
|
+
for (var u, s = arguments.length, f = new Array(s), g = 0; g < s; g++)
|
|
1792
|
+
f[g] = arguments[g];
|
|
1793
|
+
if (f.some((m) => m == null ? void 0 : m.triggerCancel)) {
|
|
1794
|
+
var b;
|
|
1795
|
+
(u = e.onCancel) === null || u === void 0 || (b = u).call.apply(b, [e, () => {
|
|
1796
|
+
}].concat(G(f.slice(1))));
|
|
1797
|
+
}
|
|
1798
|
+
for (let m = 0; m < Z.length; m++)
|
|
1799
|
+
if (Z[m] === c) {
|
|
1800
|
+
Z.splice(m, 1);
|
|
1234
1801
|
break;
|
|
1235
1802
|
}
|
|
1236
|
-
|
|
1803
|
+
nn(n);
|
|
1237
1804
|
}
|
|
1238
|
-
function u
|
|
1805
|
+
function d(u) {
|
|
1239
1806
|
clearTimeout(a), a = setTimeout(() => {
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
prefixCls:
|
|
1807
|
+
const s = t.getPrefixCls(void 0, $t()), f = t.getIconPrefixCls(), g = t.getTheme(), v = /* @__PURE__ */ h.createElement(no, Object.assign({}, u));
|
|
1808
|
+
on(/* @__PURE__ */ h.createElement(tt, {
|
|
1809
|
+
prefixCls: s,
|
|
1243
1810
|
iconPrefixCls: f,
|
|
1244
|
-
theme:
|
|
1245
|
-
},
|
|
1811
|
+
theme: g
|
|
1812
|
+
}, t.holderRender ? t.holderRender(v) : v), n);
|
|
1246
1813
|
});
|
|
1247
1814
|
}
|
|
1248
|
-
function
|
|
1249
|
-
for (var
|
|
1250
|
-
|
|
1815
|
+
function c() {
|
|
1816
|
+
for (var u = arguments.length, s = new Array(u), f = 0; f < u; f++)
|
|
1817
|
+
s[f] = arguments[f];
|
|
1251
1818
|
o = Object.assign(Object.assign({}, o), {
|
|
1252
1819
|
open: !1,
|
|
1253
1820
|
afterClose: () => {
|
|
1254
|
-
typeof e.afterClose == "function" && e.afterClose(), r.apply(this,
|
|
1821
|
+
typeof e.afterClose == "function" && e.afterClose(), r.apply(this, s);
|
|
1255
1822
|
}
|
|
1256
|
-
}), o.visible && delete o.visible,
|
|
1823
|
+
}), o.visible && delete o.visible, d(o);
|
|
1257
1824
|
}
|
|
1258
|
-
function
|
|
1259
|
-
typeof
|
|
1825
|
+
function i(u) {
|
|
1826
|
+
typeof u == "function" ? o = u(o) : o = Object.assign(Object.assign({}, o), u), d(o);
|
|
1260
1827
|
}
|
|
1261
|
-
return
|
|
1262
|
-
destroy:
|
|
1263
|
-
update:
|
|
1828
|
+
return d(o), Z.push(c), {
|
|
1829
|
+
destroy: c,
|
|
1830
|
+
update: i
|
|
1264
1831
|
};
|
|
1265
1832
|
}
|
|
1266
|
-
function
|
|
1833
|
+
function Et(e) {
|
|
1267
1834
|
return Object.assign(Object.assign({}, e), {
|
|
1268
1835
|
type: "warning"
|
|
1269
1836
|
});
|
|
1270
1837
|
}
|
|
1271
|
-
function
|
|
1838
|
+
function St(e) {
|
|
1272
1839
|
return Object.assign(Object.assign({}, e), {
|
|
1273
1840
|
type: "info"
|
|
1274
1841
|
});
|
|
1275
1842
|
}
|
|
1276
|
-
function
|
|
1843
|
+
function Ot(e) {
|
|
1277
1844
|
return Object.assign(Object.assign({}, e), {
|
|
1278
1845
|
type: "success"
|
|
1279
1846
|
});
|
|
1280
1847
|
}
|
|
1281
|
-
function
|
|
1848
|
+
function Nt(e) {
|
|
1282
1849
|
return Object.assign(Object.assign({}, e), {
|
|
1283
1850
|
type: "error"
|
|
1284
1851
|
});
|
|
1285
1852
|
}
|
|
1286
|
-
function
|
|
1853
|
+
function wt(e) {
|
|
1287
1854
|
return Object.assign(Object.assign({}, e), {
|
|
1288
1855
|
type: "confirm"
|
|
1289
1856
|
});
|
|
1290
1857
|
}
|
|
1291
|
-
function
|
|
1858
|
+
function oo(e) {
|
|
1292
1859
|
let {
|
|
1293
|
-
rootPrefixCls:
|
|
1860
|
+
rootPrefixCls: t
|
|
1294
1861
|
} = e;
|
|
1295
|
-
process.env.NODE_ENV !== "production" &&
|
|
1862
|
+
process.env.NODE_ENV !== "production" && nt(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), xt = t;
|
|
1296
1863
|
}
|
|
1297
|
-
var
|
|
1298
|
-
var
|
|
1299
|
-
for (var o in e)
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
1304
|
-
return t;
|
|
1864
|
+
var ao = function(e, t) {
|
|
1865
|
+
var n = {};
|
|
1866
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
1867
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1868
|
+
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (n[o[a]] = e[o[a]]);
|
|
1869
|
+
return n;
|
|
1305
1870
|
};
|
|
1306
|
-
const
|
|
1307
|
-
var
|
|
1871
|
+
const lo = (e, t) => {
|
|
1872
|
+
var n, {
|
|
1308
1873
|
afterClose: o,
|
|
1309
1874
|
config: a
|
|
1310
|
-
} = e, r =
|
|
1311
|
-
const [
|
|
1312
|
-
direction:
|
|
1875
|
+
} = e, r = ao(e, ["afterClose", "config"]);
|
|
1876
|
+
const [d, c] = l.useState(!0), [i, u] = l.useState(a), {
|
|
1877
|
+
direction: s,
|
|
1313
1878
|
getPrefixCls: f
|
|
1314
|
-
} = l.useContext(
|
|
1315
|
-
var
|
|
1316
|
-
o(), (
|
|
1317
|
-
},
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1879
|
+
} = l.useContext(_), g = f("modal"), v = f(), b = () => {
|
|
1880
|
+
var C;
|
|
1881
|
+
o(), (C = i.afterClose) === null || C === void 0 || C.call(i);
|
|
1882
|
+
}, m = function() {
|
|
1883
|
+
var C;
|
|
1884
|
+
c(!1);
|
|
1885
|
+
for (var y = arguments.length, $ = new Array(y), N = 0; N < y; N++)
|
|
1886
|
+
$[N] = arguments[N];
|
|
1887
|
+
if ($.some((R) => R == null ? void 0 : R.triggerCancel)) {
|
|
1888
|
+
var S;
|
|
1889
|
+
(C = i.onCancel) === null || C === void 0 || (S = C).call.apply(S, [i, () => {
|
|
1890
|
+
}].concat(G($.slice(1))));
|
|
1891
|
+
}
|
|
1324
1892
|
};
|
|
1325
|
-
l.useImperativeHandle(
|
|
1326
|
-
destroy:
|
|
1327
|
-
update: (
|
|
1328
|
-
|
|
1893
|
+
l.useImperativeHandle(t, () => ({
|
|
1894
|
+
destroy: m,
|
|
1895
|
+
update: (C) => {
|
|
1896
|
+
u((y) => Object.assign(Object.assign({}, y), C));
|
|
1329
1897
|
}
|
|
1330
1898
|
}));
|
|
1331
|
-
const
|
|
1332
|
-
return /* @__PURE__ */ l.createElement(
|
|
1333
|
-
prefixCls:
|
|
1334
|
-
rootPrefixCls:
|
|
1335
|
-
},
|
|
1336
|
-
close:
|
|
1337
|
-
open:
|
|
1338
|
-
afterClose:
|
|
1339
|
-
okText:
|
|
1340
|
-
direction:
|
|
1341
|
-
cancelText:
|
|
1899
|
+
const x = (n = i.okCancel) !== null && n !== void 0 ? n : i.type === "confirm", [p] = Ee("Modal", qt.Modal);
|
|
1900
|
+
return /* @__PURE__ */ l.createElement(je, Object.assign({
|
|
1901
|
+
prefixCls: g,
|
|
1902
|
+
rootPrefixCls: v
|
|
1903
|
+
}, i, {
|
|
1904
|
+
close: m,
|
|
1905
|
+
open: d,
|
|
1906
|
+
afterClose: b,
|
|
1907
|
+
okText: i.okText || (x ? p == null ? void 0 : p.okText : p == null ? void 0 : p.justOkText),
|
|
1908
|
+
direction: i.direction || s,
|
|
1909
|
+
cancelText: i.cancelText || (p == null ? void 0 : p.cancelText)
|
|
1342
1910
|
}, r));
|
|
1343
|
-
},
|
|
1344
|
-
let
|
|
1345
|
-
const
|
|
1346
|
-
const [
|
|
1347
|
-
return l.useImperativeHandle(
|
|
1911
|
+
}, ro = /* @__PURE__ */ l.forwardRef(lo);
|
|
1912
|
+
let Qe = 0;
|
|
1913
|
+
const io = /* @__PURE__ */ l.memo(/* @__PURE__ */ l.forwardRef((e, t) => {
|
|
1914
|
+
const [n, o] = mn();
|
|
1915
|
+
return l.useImperativeHandle(t, () => ({
|
|
1348
1916
|
patchElement: o
|
|
1349
|
-
}), []), /* @__PURE__ */ l.createElement(l.Fragment, null,
|
|
1917
|
+
}), []), /* @__PURE__ */ l.createElement(l.Fragment, null, n);
|
|
1350
1918
|
}));
|
|
1351
|
-
function
|
|
1352
|
-
const e = l.useRef(null), [
|
|
1919
|
+
function so() {
|
|
1920
|
+
const e = l.useRef(null), [t, n] = l.useState([]);
|
|
1353
1921
|
l.useEffect(() => {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
}),
|
|
1357
|
-
}, [
|
|
1358
|
-
const o = l.useCallback((r) => function(
|
|
1359
|
-
var
|
|
1360
|
-
|
|
1361
|
-
const
|
|
1362
|
-
let
|
|
1363
|
-
const f = new Promise((
|
|
1364
|
-
|
|
1922
|
+
t.length && (G(t).forEach((d) => {
|
|
1923
|
+
d();
|
|
1924
|
+
}), n([]));
|
|
1925
|
+
}, [t]);
|
|
1926
|
+
const o = l.useCallback((r) => function(c) {
|
|
1927
|
+
var i;
|
|
1928
|
+
Qe += 1;
|
|
1929
|
+
const u = /* @__PURE__ */ l.createRef();
|
|
1930
|
+
let s;
|
|
1931
|
+
const f = new Promise((x) => {
|
|
1932
|
+
s = x;
|
|
1365
1933
|
});
|
|
1366
|
-
let
|
|
1367
|
-
const
|
|
1368
|
-
key: `modal-${
|
|
1369
|
-
config: r(
|
|
1370
|
-
ref:
|
|
1934
|
+
let g = !1, v;
|
|
1935
|
+
const b = /* @__PURE__ */ l.createElement(ro, {
|
|
1936
|
+
key: `modal-${Qe}`,
|
|
1937
|
+
config: r(c),
|
|
1938
|
+
ref: u,
|
|
1371
1939
|
afterClose: () => {
|
|
1372
|
-
|
|
1940
|
+
v == null || v();
|
|
1373
1941
|
},
|
|
1374
|
-
isSilent: () =>
|
|
1375
|
-
onConfirm: (
|
|
1376
|
-
|
|
1942
|
+
isSilent: () => g,
|
|
1943
|
+
onConfirm: (x) => {
|
|
1944
|
+
s(x);
|
|
1377
1945
|
}
|
|
1378
1946
|
});
|
|
1379
|
-
return
|
|
1947
|
+
return v = (i = e.current) === null || i === void 0 ? void 0 : i.patchElement(b), v && Z.push(v), {
|
|
1380
1948
|
destroy: () => {
|
|
1381
|
-
function
|
|
1949
|
+
function x() {
|
|
1382
1950
|
var p;
|
|
1383
|
-
(p =
|
|
1951
|
+
(p = u.current) === null || p === void 0 || p.destroy();
|
|
1384
1952
|
}
|
|
1385
|
-
|
|
1953
|
+
u.current ? x() : n((p) => [].concat(G(p), [x]));
|
|
1386
1954
|
},
|
|
1387
|
-
update: (
|
|
1955
|
+
update: (x) => {
|
|
1388
1956
|
function p() {
|
|
1389
|
-
var
|
|
1390
|
-
(
|
|
1957
|
+
var C;
|
|
1958
|
+
(C = u.current) === null || C === void 0 || C.update(x);
|
|
1391
1959
|
}
|
|
1392
|
-
|
|
1960
|
+
u.current ? p() : n((C) => [].concat(G(C), [p]));
|
|
1393
1961
|
},
|
|
1394
|
-
then: (
|
|
1962
|
+
then: (x) => (g = !0, f.then(x))
|
|
1395
1963
|
};
|
|
1396
1964
|
}, []);
|
|
1397
1965
|
return [l.useMemo(() => ({
|
|
1398
|
-
info: o(
|
|
1399
|
-
success: o(
|
|
1400
|
-
error: o(
|
|
1401
|
-
warning: o(
|
|
1402
|
-
confirm: o(
|
|
1403
|
-
}), []), /* @__PURE__ */ l.createElement(
|
|
1966
|
+
info: o(St),
|
|
1967
|
+
success: o(Ot),
|
|
1968
|
+
error: o(Nt),
|
|
1969
|
+
warning: o(Et),
|
|
1970
|
+
confirm: o(wt)
|
|
1971
|
+
}), []), /* @__PURE__ */ l.createElement(io, {
|
|
1404
1972
|
key: "modal-holder",
|
|
1405
1973
|
ref: e
|
|
1406
1974
|
})];
|
|
1407
1975
|
}
|
|
1408
|
-
var
|
|
1409
|
-
var
|
|
1410
|
-
for (var o in e)
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
1415
|
-
return t;
|
|
1976
|
+
var co = function(e, t) {
|
|
1977
|
+
var n = {};
|
|
1978
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
1979
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1980
|
+
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (n[o[a]] = e[o[a]]);
|
|
1981
|
+
return n;
|
|
1416
1982
|
};
|
|
1417
|
-
const
|
|
1983
|
+
const uo = (e) => {
|
|
1418
1984
|
const {
|
|
1419
|
-
prefixCls:
|
|
1420
|
-
className:
|
|
1985
|
+
prefixCls: t,
|
|
1986
|
+
className: n,
|
|
1421
1987
|
closeIcon: o,
|
|
1422
1988
|
closable: a,
|
|
1423
1989
|
type: r,
|
|
1424
|
-
title:
|
|
1425
|
-
children:
|
|
1426
|
-
footer:
|
|
1427
|
-
} = e,
|
|
1428
|
-
getPrefixCls:
|
|
1429
|
-
} = l.useContext(
|
|
1430
|
-
let
|
|
1431
|
-
return r ?
|
|
1990
|
+
title: d,
|
|
1991
|
+
children: c,
|
|
1992
|
+
footer: i
|
|
1993
|
+
} = e, u = co(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
|
|
1994
|
+
getPrefixCls: s
|
|
1995
|
+
} = l.useContext(_), f = s(), g = t || s("modal"), v = ot(f), [b, m, x] = bt(g, v), p = `${g}-confirm`;
|
|
1996
|
+
let C = {};
|
|
1997
|
+
return r ? C = {
|
|
1432
1998
|
closable: a ?? !1,
|
|
1433
1999
|
title: "",
|
|
1434
2000
|
footer: "",
|
|
1435
|
-
children: /* @__PURE__ */ l.createElement(
|
|
1436
|
-
prefixCls:
|
|
2001
|
+
children: /* @__PURE__ */ l.createElement(ht, Object.assign({}, e, {
|
|
2002
|
+
prefixCls: g,
|
|
1437
2003
|
confirmPrefixCls: p,
|
|
1438
2004
|
rootPrefixCls: f,
|
|
1439
|
-
content:
|
|
2005
|
+
content: c
|
|
1440
2006
|
}))
|
|
1441
|
-
} :
|
|
2007
|
+
} : C = {
|
|
1442
2008
|
closable: a ?? !0,
|
|
1443
|
-
title:
|
|
1444
|
-
footer:
|
|
1445
|
-
children:
|
|
1446
|
-
},
|
|
1447
|
-
prefixCls:
|
|
1448
|
-
className:
|
|
1449
|
-
},
|
|
1450
|
-
closeIcon:
|
|
2009
|
+
title: d,
|
|
2010
|
+
footer: i !== null && /* @__PURE__ */ l.createElement(gt, Object.assign({}, e)),
|
|
2011
|
+
children: c
|
|
2012
|
+
}, b(/* @__PURE__ */ l.createElement(Ie, Object.assign({
|
|
2013
|
+
prefixCls: g,
|
|
2014
|
+
className: E(m, `${g}-pure-panel`, r && p, r && `${p}-${r}`, n, x, v)
|
|
2015
|
+
}, u, {
|
|
2016
|
+
closeIcon: mt(g, o),
|
|
1451
2017
|
closable: a
|
|
1452
|
-
},
|
|
1453
|
-
},
|
|
1454
|
-
function
|
|
1455
|
-
return
|
|
2018
|
+
}, C)));
|
|
2019
|
+
}, fo = ln(uo);
|
|
2020
|
+
function Pt(e) {
|
|
2021
|
+
return ae(Et(e));
|
|
1456
2022
|
}
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
return
|
|
2023
|
+
const H = pt;
|
|
2024
|
+
H.useModal = so;
|
|
2025
|
+
H.info = function(t) {
|
|
2026
|
+
return ae(St(t));
|
|
1461
2027
|
};
|
|
1462
|
-
|
|
1463
|
-
return
|
|
2028
|
+
H.success = function(t) {
|
|
2029
|
+
return ae(Ot(t));
|
|
1464
2030
|
};
|
|
1465
|
-
|
|
1466
|
-
return
|
|
2031
|
+
H.error = function(t) {
|
|
2032
|
+
return ae(Nt(t));
|
|
1467
2033
|
};
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
return
|
|
2034
|
+
H.warning = Pt;
|
|
2035
|
+
H.warn = Pt;
|
|
2036
|
+
H.confirm = function(t) {
|
|
2037
|
+
return ae(wt(t));
|
|
1472
2038
|
};
|
|
1473
|
-
|
|
1474
|
-
for (;
|
|
1475
|
-
const
|
|
1476
|
-
|
|
2039
|
+
H.destroyAll = function() {
|
|
2040
|
+
for (; Z.length; ) {
|
|
2041
|
+
const t = Z.pop();
|
|
2042
|
+
t && t();
|
|
1477
2043
|
}
|
|
1478
2044
|
};
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
process.env.NODE_ENV !== "production" && (
|
|
1482
|
-
function
|
|
1483
|
-
const
|
|
2045
|
+
H.config = oo;
|
|
2046
|
+
H._InternalPanelDoNotUseOrYouWillBeFired = fo;
|
|
2047
|
+
process.env.NODE_ENV !== "production" && (H.displayName = "Modal");
|
|
2048
|
+
function Eo(e) {
|
|
2049
|
+
const t = {
|
|
1484
2050
|
open: e.open === void 0 ? !0 : e.open,
|
|
1485
2051
|
onClose: e.onClose || (() => {
|
|
1486
2052
|
}),
|
|
1487
2053
|
collapse: e.collapse === void 0 ? !1 : e.collapse
|
|
1488
2054
|
};
|
|
1489
|
-
return /* @__PURE__ */
|
|
1490
|
-
|
|
2055
|
+
return /* @__PURE__ */ Te(
|
|
2056
|
+
H,
|
|
1491
2057
|
{
|
|
1492
2058
|
title: "Notification Preferences",
|
|
1493
|
-
open:
|
|
2059
|
+
open: t.open,
|
|
1494
2060
|
onCancel: () => {
|
|
1495
|
-
|
|
2061
|
+
t.onClose();
|
|
1496
2062
|
},
|
|
1497
2063
|
footer: null,
|
|
1498
2064
|
zIndex: 9999,
|
|
1499
|
-
children: /* @__PURE__ */
|
|
2065
|
+
children: /* @__PURE__ */ Te(Mt, {})
|
|
1500
2066
|
}
|
|
1501
2067
|
);
|
|
1502
2068
|
}
|
|
1503
2069
|
export {
|
|
1504
|
-
|
|
2070
|
+
Eo as NotificationPreferencesPopup
|
|
1505
2071
|
};
|