@amateescu/portal-ui-components 0.0.28 → 0.0.30-beta
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/Box-ZFRI9JCw.js +102 -0
- package/dist/Button-CNfTnafe.js +676 -0
- package/dist/ButtonBase-DWpUn0eT.js +965 -0
- package/dist/CircularProgress-D6RyizwS.js +247 -0
- package/dist/{EllipsisOutlined-DZsCEqiL.js → EllipsisOutlined-CzFuvGH_.js} +3 -3
- package/dist/{PurePanel-iUNZWTe_.js → PurePanel-CxlAi3G7.js} +3 -3
- package/dist/{Skeleton-CfEiGUkR.js → Skeleton-dypyF9G2.js} +2 -2
- package/dist/{UserInfoDropdown-CoZutJAR.js → UserInfoDropdown-DPyds49a.js} +763 -769
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.js +1 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +1 -1
- package/dist/components/CustomButton/CustomButton.js +1 -1
- package/dist/components/CustomButton/CustomButton.stories.d.ts +1 -0
- package/dist/components/CustomButton/CustomButton.stories.js +21 -7
- package/dist/components/CustomFooter/CustomFooter.js +1 -1
- package/dist/components/CustomPagination/CustomPagination.js +484 -372
- package/dist/components/ErrorModal/ErrorModal.js +1 -1
- package/dist/components/ErrorModal/ErrorModal.stories.js +1 -1
- package/dist/components/InfoModal/InfoModal.js +1 -1
- package/dist/components/InfoModal/InfoModal.stories.js +1 -1
- package/dist/components/KpiCard/KpiCard.js +355 -351
- package/dist/components/LoadingAnimation/LoadingAnimation.js +6 -215
- package/dist/components/Login/Login.js +4638 -3844
- package/dist/components/Login/Login.stories.js +15693 -14785
- package/dist/components/SideMenu/SideMenu.js +1 -1
- package/dist/components/TotalDataGrid/TotalDataGrid.js +6 -6
- package/dist/components/UserInfoDropdown/UserInfoDropdown.js +1 -1
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{context-Crxhk7DD.js → context-Bk4VnwMB.js} +7 -7
- package/dist/createSimplePaletteValueFilter-rq2_biPF.js +3443 -0
- package/dist/createSvgIcon-jB7EUYpq.js +248 -0
- package/dist/{index-BxiDYyNJ.js → index-DLbr86ak.js} +511 -513
- package/dist/{index-DpDv68WZ.js → index-xh_JY2OQ.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +33 -0
- package/dist/useSlot-CT4096EK.js +188 -0
- package/package.json +31 -31
- package/dist/Box-C1OwXVV-.js +0 -68
- package/dist/Button-CIvE-fcO.js +0 -355
- package/dist/ButtonBase-BeQnmGXr.js +0 -966
- package/dist/assertThisInitialized-BUtkG-md.js +0 -13
- package/dist/createSvgIcon-Db107M0j.js +0 -250
- package/dist/generateUtilityClasses-DY-qyzNG.js +0 -3427
- package/dist/objectWithoutPropertiesLoose-DYizGgyG.js +0 -46
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { L as Nn, G as
|
|
2
|
-
import * as
|
|
3
|
-
import b, { useContext as
|
|
4
|
-
import { B as
|
|
5
|
-
import {
|
|
6
|
-
import { R as
|
|
7
|
-
const
|
|
8
|
-
const o =
|
|
9
|
-
var
|
|
10
|
-
const s = n ||
|
|
1
|
+
import { L as Nn, G as ve, I as se, e as I, l as G, H as Pn, K as qe, J as In, n as Mn, c as M, h as Ne, _ as be, q as Ue, M as Pe, N as Tn, O as Ie, j as Me, P as Rn, Q as jn, k as Bn, R as Dn, S as Xe, g as ye, m as Ke, u as O, y as Fn, B as Ln, a as ce, v as he, D as ke, t as ie, T as zn, F as _n, C as Qe, U as Hn, W as Wn, X as Vn, Y as Ze } from "./context-Bk4VnwMB.js";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import b, { useContext as ae, useRef as U, useMemo as An, useEffect as Te } from "react";
|
|
4
|
+
import { B as xe, c as Ye, i as Gn, u as qn, C as Un, z as Xn, a as Kn, g as kn, w as Qn } from "./PurePanel-CxlAi3G7.js";
|
|
5
|
+
import { _ as B } from "./objectWithoutPropertiesLoose-BTau6TOn.js";
|
|
6
|
+
import { R as $e, S as Zn } from "./Skeleton-dypyF9G2.js";
|
|
7
|
+
const Ee = (e, n) => {
|
|
8
|
+
const o = r.useContext(Nn), t = r.useMemo(() => {
|
|
9
|
+
var l;
|
|
10
|
+
const s = n || ve[e], d = (l = o == null ? void 0 : o[e]) !== null && l !== void 0 ? l : {};
|
|
11
11
|
return Object.assign(Object.assign({}, typeof s == "function" ? s() : s), d || {});
|
|
12
|
-
}, [e, n, o]), a =
|
|
13
|
-
const
|
|
14
|
-
return o != null && o.exist && !
|
|
12
|
+
}, [e, n, o]), a = r.useMemo(() => {
|
|
13
|
+
const l = o == null ? void 0 : o.locale;
|
|
14
|
+
return o != null && o.exist && !l ? ve.locale : l;
|
|
15
15
|
}, [o]);
|
|
16
16
|
return [t, a];
|
|
17
17
|
};
|
|
18
|
-
var
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
var Yn = { 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" }, Jn = function(n, o) {
|
|
19
|
+
return /* @__PURE__ */ r.createElement(se, B({}, n, {
|
|
20
20
|
ref: o,
|
|
21
|
-
icon:
|
|
21
|
+
icon: Yn
|
|
22
22
|
}));
|
|
23
|
-
},
|
|
24
|
-
process.env.NODE_ENV !== "production" && (
|
|
23
|
+
}, Je = /* @__PURE__ */ r.forwardRef(Jn);
|
|
24
|
+
process.env.NODE_ENV !== "production" && (Je.displayName = "CheckCircleFilled");
|
|
25
25
|
var et = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" }, nt = function(n, o) {
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ r.createElement(se, B({}, n, {
|
|
27
27
|
ref: o,
|
|
28
28
|
icon: et
|
|
29
29
|
}));
|
|
30
|
-
},
|
|
31
|
-
process.env.NODE_ENV !== "production" && (
|
|
30
|
+
}, en = /* @__PURE__ */ r.forwardRef(nt);
|
|
31
|
+
process.env.NODE_ENV !== "production" && (en.displayName = "CloseCircleFilled");
|
|
32
32
|
var tt = { 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" }, ot = function(n, o) {
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ r.createElement(se, B({}, n, {
|
|
34
34
|
ref: o,
|
|
35
35
|
icon: tt
|
|
36
36
|
}));
|
|
37
|
-
},
|
|
38
|
-
process.env.NODE_ENV !== "production" && (
|
|
37
|
+
}, nn = /* @__PURE__ */ r.forwardRef(ot);
|
|
38
|
+
process.env.NODE_ENV !== "production" && (nn.displayName = "ExclamationCircleFilled");
|
|
39
39
|
var at = { 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" }, rt = function(n, o) {
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ r.createElement(se, B({}, n, {
|
|
41
41
|
ref: o,
|
|
42
42
|
icon: at
|
|
43
43
|
}));
|
|
44
|
-
},
|
|
45
|
-
process.env.NODE_ENV !== "production" && (
|
|
44
|
+
}, tn = /* @__PURE__ */ r.forwardRef(rt);
|
|
45
|
+
process.env.NODE_ENV !== "production" && (tn.displayName = "InfoCircleFilled");
|
|
46
46
|
var lt = `accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
47
47
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
48
48
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
@@ -61,10 +61,10 @@ var lt = `accept acceptCharset accessKey action allowFullScreen allowTransparenc
|
|
|
61
61
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
62
62
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
63
63
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`, st = "".concat(lt, " ").concat(it).split(/[\s\n]+/), ct = "aria-", dt = "data-";
|
|
64
|
-
function
|
|
64
|
+
function Re(e, n) {
|
|
65
65
|
return e.indexOf(n) === 0;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Se(e) {
|
|
68
68
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o;
|
|
69
69
|
n === !1 ? o = {
|
|
70
70
|
aria: !0,
|
|
@@ -72,29 +72,29 @@ function he(e) {
|
|
|
72
72
|
attr: !0
|
|
73
73
|
} : n === !0 ? o = {
|
|
74
74
|
aria: !0
|
|
75
|
-
} : o =
|
|
75
|
+
} : o = I({}, n);
|
|
76
76
|
var t = {};
|
|
77
77
|
return Object.keys(e).forEach(function(a) {
|
|
78
78
|
// Aria
|
|
79
|
-
(o.aria && (a === "role" ||
|
|
80
|
-
o.data &&
|
|
79
|
+
(o.aria && (a === "role" || Re(a, ct)) || // Data
|
|
80
|
+
o.data && Re(a, dt) || // Attr
|
|
81
81
|
o.attr && st.includes(a)) && (t[a] = e[a]);
|
|
82
82
|
}), t;
|
|
83
83
|
}
|
|
84
84
|
function ut() {
|
|
85
|
-
const [e, n] =
|
|
86
|
-
n((a) => a.filter((
|
|
85
|
+
const [e, n] = r.useState([]), o = r.useCallback((t) => (n((a) => [].concat(G(a), [t])), () => {
|
|
86
|
+
n((a) => a.filter((l) => l !== t));
|
|
87
87
|
}), []);
|
|
88
88
|
return [e, o];
|
|
89
89
|
}
|
|
90
|
-
const ft = new
|
|
90
|
+
const ft = new qe("antFadeIn", {
|
|
91
91
|
"0%": {
|
|
92
92
|
opacity: 0
|
|
93
93
|
},
|
|
94
94
|
"100%": {
|
|
95
95
|
opacity: 1
|
|
96
96
|
}
|
|
97
|
-
}), mt = new
|
|
97
|
+
}), mt = new qe("antFadeOut", {
|
|
98
98
|
"0%": {
|
|
99
99
|
opacity: 1
|
|
100
100
|
},
|
|
@@ -119,85 +119,85 @@ const ft = new Ve("antFadeIn", {
|
|
|
119
119
|
}
|
|
120
120
|
}];
|
|
121
121
|
};
|
|
122
|
-
function
|
|
122
|
+
function ge(e) {
|
|
123
123
|
return !!(e != null && e.then);
|
|
124
124
|
}
|
|
125
|
-
const
|
|
125
|
+
const on = (e) => {
|
|
126
126
|
const {
|
|
127
127
|
type: n,
|
|
128
128
|
children: o,
|
|
129
129
|
prefixCls: t,
|
|
130
130
|
buttonProps: a,
|
|
131
|
-
close:
|
|
131
|
+
close: l,
|
|
132
132
|
autoFocus: s,
|
|
133
133
|
emitEvent: d,
|
|
134
134
|
isSilent: c,
|
|
135
|
-
quitOnNullishReturnValue:
|
|
135
|
+
quitOnNullishReturnValue: m,
|
|
136
136
|
actionFn: i
|
|
137
|
-
} = e, u =
|
|
138
|
-
|
|
137
|
+
} = e, u = r.useRef(!1), f = r.useRef(null), [C, x] = In(!1), g = function() {
|
|
138
|
+
l == null || l.apply(void 0, arguments);
|
|
139
139
|
};
|
|
140
|
-
|
|
141
|
-
let
|
|
142
|
-
return s && (
|
|
143
|
-
var
|
|
144
|
-
(
|
|
140
|
+
r.useEffect(() => {
|
|
141
|
+
let v = null;
|
|
142
|
+
return s && (v = setTimeout(() => {
|
|
143
|
+
var h;
|
|
144
|
+
(h = f.current) === null || h === void 0 || h.focus({
|
|
145
145
|
preventScroll: !0
|
|
146
146
|
});
|
|
147
147
|
})), () => {
|
|
148
|
-
|
|
148
|
+
v && clearTimeout(v);
|
|
149
149
|
};
|
|
150
150
|
}, []);
|
|
151
|
-
const p = (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, (
|
|
155
|
-
if (
|
|
156
|
-
return Promise.reject(
|
|
151
|
+
const p = (v) => {
|
|
152
|
+
ge(v) && (x(!0), v.then(function() {
|
|
153
|
+
x(!1, !0), g.apply(void 0, arguments), u.current = !1;
|
|
154
|
+
}, (h) => {
|
|
155
|
+
if (x(!1, !0), u.current = !1, !(c != null && c()))
|
|
156
|
+
return Promise.reject(h);
|
|
157
157
|
}));
|
|
158
|
-
}, y = (
|
|
158
|
+
}, y = (v) => {
|
|
159
159
|
if (u.current)
|
|
160
160
|
return;
|
|
161
161
|
if (u.current = !0, !i) {
|
|
162
|
-
|
|
162
|
+
g();
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
let
|
|
165
|
+
let h;
|
|
166
166
|
if (d) {
|
|
167
|
-
if (
|
|
168
|
-
u.current = !1, v
|
|
167
|
+
if (h = i(v), m && !ge(h)) {
|
|
168
|
+
u.current = !1, g(v);
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
} else if (i.length)
|
|
172
|
-
|
|
173
|
-
else if (
|
|
174
|
-
|
|
172
|
+
h = i(l), u.current = !1;
|
|
173
|
+
else if (h = i(), !ge(h)) {
|
|
174
|
+
g();
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
p(
|
|
177
|
+
p(h);
|
|
178
178
|
};
|
|
179
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ r.createElement(xe, Object.assign({}, Ye(n), {
|
|
180
180
|
onClick: y,
|
|
181
181
|
loading: C,
|
|
182
182
|
prefixCls: t
|
|
183
183
|
}, a, {
|
|
184
184
|
ref: f
|
|
185
185
|
}), o);
|
|
186
|
-
},
|
|
187
|
-
Provider:
|
|
188
|
-
} =
|
|
186
|
+
}, re = /* @__PURE__ */ b.createContext({}), {
|
|
187
|
+
Provider: an
|
|
188
|
+
} = re, je = () => {
|
|
189
189
|
const {
|
|
190
190
|
autoFocusButton: e,
|
|
191
191
|
cancelButtonProps: n,
|
|
192
192
|
cancelTextLocale: o,
|
|
193
193
|
isSilent: t,
|
|
194
194
|
mergedOkCancel: a,
|
|
195
|
-
rootPrefixCls:
|
|
195
|
+
rootPrefixCls: l,
|
|
196
196
|
close: s,
|
|
197
197
|
onCancel: d,
|
|
198
198
|
onConfirm: c
|
|
199
|
-
} =
|
|
200
|
-
return a ? /* @__PURE__ */ b.createElement(
|
|
199
|
+
} = ae(re);
|
|
200
|
+
return a ? /* @__PURE__ */ b.createElement(on, {
|
|
201
201
|
isSilent: t,
|
|
202
202
|
actionFn: d,
|
|
203
203
|
close: function() {
|
|
@@ -205,21 +205,21 @@ const en = (e) => {
|
|
|
205
205
|
},
|
|
206
206
|
autoFocus: e === "cancel",
|
|
207
207
|
buttonProps: n,
|
|
208
|
-
prefixCls: `${
|
|
208
|
+
prefixCls: `${l}-btn`
|
|
209
209
|
}, o) : null;
|
|
210
|
-
},
|
|
210
|
+
}, Be = () => {
|
|
211
211
|
const {
|
|
212
212
|
autoFocusButton: e,
|
|
213
213
|
close: n,
|
|
214
214
|
isSilent: o,
|
|
215
215
|
okButtonProps: t,
|
|
216
216
|
rootPrefixCls: a,
|
|
217
|
-
okTextLocale:
|
|
217
|
+
okTextLocale: l,
|
|
218
218
|
okType: s,
|
|
219
219
|
onConfirm: d,
|
|
220
220
|
onOk: c
|
|
221
|
-
} =
|
|
222
|
-
return /* @__PURE__ */ b.createElement(
|
|
221
|
+
} = ae(re);
|
|
222
|
+
return /* @__PURE__ */ b.createElement(on, {
|
|
223
223
|
isSilent: o,
|
|
224
224
|
type: s || "primary",
|
|
225
225
|
actionFn: c,
|
|
@@ -229,14 +229,14 @@ const en = (e) => {
|
|
|
229
229
|
autoFocus: e === "ok",
|
|
230
230
|
buttonProps: t,
|
|
231
231
|
prefixCls: `${a}-btn`
|
|
232
|
-
},
|
|
232
|
+
}, l);
|
|
233
233
|
};
|
|
234
|
-
var
|
|
235
|
-
function
|
|
234
|
+
var rn = /* @__PURE__ */ r.createContext({});
|
|
235
|
+
function De(e, n, o) {
|
|
236
236
|
var t = n;
|
|
237
237
|
return !t && o && (t = "".concat(e, "-").concat(o)), t;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Fe(e, n) {
|
|
240
240
|
var o = e["page".concat(n ? "Y" : "X", "Offset")], t = "scroll".concat(n ? "Top" : "Left");
|
|
241
241
|
if (typeof o != "number") {
|
|
242
242
|
var a = e.document;
|
|
@@ -249,9 +249,9 @@ function vt(e) {
|
|
|
249
249
|
left: n.left,
|
|
250
250
|
top: n.top
|
|
251
251
|
}, t = e.ownerDocument, a = t.defaultView || t.parentWindow;
|
|
252
|
-
return o.left +=
|
|
252
|
+
return o.left += Fe(a), o.top += Fe(a, !0), o;
|
|
253
253
|
}
|
|
254
|
-
const Ct = /* @__PURE__ */
|
|
254
|
+
const Ct = /* @__PURE__ */ r.memo(function(e) {
|
|
255
255
|
var n = e.children;
|
|
256
256
|
return n;
|
|
257
257
|
}, function(e, n) {
|
|
@@ -265,145 +265,145 @@ var pt = {
|
|
|
265
265
|
outline: "none"
|
|
266
266
|
}, bt = {
|
|
267
267
|
outline: "none"
|
|
268
|
-
},
|
|
269
|
-
var o = e.prefixCls, t = e.className, a = e.style,
|
|
268
|
+
}, Oe = /* @__PURE__ */ b.forwardRef(function(e, n) {
|
|
269
|
+
var o = e.prefixCls, t = e.className, a = e.style, l = e.title, s = e.ariaId, d = e.footer, c = e.closable, m = e.closeIcon, i = e.onClose, u = e.children, f = e.bodyStyle, C = e.bodyProps, x = e.modalRender, g = e.onMouseDown, p = e.onMouseUp, y = e.holderRef, v = e.visible, h = e.forceRender, S = e.width, w = e.height, $ = e.classNames, E = e.styles, z = b.useContext(rn), Z = z.panel, N = Mn(y, Z), H = U(), X = U();
|
|
270
270
|
b.useImperativeHandle(n, function() {
|
|
271
271
|
return {
|
|
272
272
|
focus: function() {
|
|
273
|
-
var
|
|
274
|
-
(
|
|
273
|
+
var R;
|
|
274
|
+
(R = H.current) === null || R === void 0 || R.focus({
|
|
275
275
|
preventScroll: !0
|
|
276
276
|
});
|
|
277
277
|
},
|
|
278
|
-
changeActive: function(
|
|
279
|
-
var
|
|
280
|
-
|
|
278
|
+
changeActive: function(R) {
|
|
279
|
+
var ne = document, Y = ne.activeElement;
|
|
280
|
+
R && Y === X.current ? H.current.focus({
|
|
281
281
|
preventScroll: !0
|
|
282
|
-
}) : !
|
|
282
|
+
}) : !R && Y === H.current && X.current.focus({
|
|
283
283
|
preventScroll: !0
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
});
|
|
288
|
-
var
|
|
289
|
-
S !== void 0 && (
|
|
290
|
-
var
|
|
288
|
+
var T = {};
|
|
289
|
+
S !== void 0 && (T.width = S), w !== void 0 && (T.height = w);
|
|
290
|
+
var D = d ? /* @__PURE__ */ b.createElement("div", {
|
|
291
291
|
className: M("".concat(o, "-footer"), $ == null ? void 0 : $.footer),
|
|
292
|
-
style:
|
|
293
|
-
}, d) : null,
|
|
292
|
+
style: I({}, E == null ? void 0 : E.footer)
|
|
293
|
+
}, d) : null, F = l ? /* @__PURE__ */ b.createElement("div", {
|
|
294
294
|
className: M("".concat(o, "-header"), $ == null ? void 0 : $.header),
|
|
295
|
-
style:
|
|
295
|
+
style: I({}, E == null ? void 0 : E.header)
|
|
296
296
|
}, /* @__PURE__ */ b.createElement("div", {
|
|
297
297
|
className: "".concat(o, "-title"),
|
|
298
298
|
id: s
|
|
299
|
-
},
|
|
300
|
-
return
|
|
301
|
-
closeIcon:
|
|
299
|
+
}, l)) : null, W = An(function() {
|
|
300
|
+
return Ne(c) === "object" && c !== null ? c : c ? {
|
|
301
|
+
closeIcon: m ?? /* @__PURE__ */ b.createElement("span", {
|
|
302
302
|
className: "".concat(o, "-close-x")
|
|
303
303
|
})
|
|
304
304
|
} : {};
|
|
305
|
-
}, [c,
|
|
305
|
+
}, [c, m, o]), V = Se(W, !0), K = Ne(c) === "object" && c.disabled, ee = c ? /* @__PURE__ */ b.createElement("button", B({
|
|
306
306
|
type: "button",
|
|
307
307
|
onClick: i,
|
|
308
308
|
"aria-label": "Close"
|
|
309
309
|
}, V, {
|
|
310
310
|
className: "".concat(o, "-close"),
|
|
311
|
-
disabled:
|
|
311
|
+
disabled: K
|
|
312
312
|
}), W.closeIcon) : null, k = /* @__PURE__ */ b.createElement("div", {
|
|
313
313
|
className: M("".concat(o, "-content"), $ == null ? void 0 : $.content),
|
|
314
314
|
style: E == null ? void 0 : E.content
|
|
315
|
-
},
|
|
315
|
+
}, ee, F, /* @__PURE__ */ b.createElement("div", B({
|
|
316
316
|
className: M("".concat(o, "-body"), $ == null ? void 0 : $.body),
|
|
317
|
-
style:
|
|
318
|
-
}, C), u),
|
|
317
|
+
style: I(I({}, f), E == null ? void 0 : E.body)
|
|
318
|
+
}, C), u), D);
|
|
319
319
|
return /* @__PURE__ */ b.createElement("div", {
|
|
320
320
|
key: "dialog-element",
|
|
321
321
|
role: "dialog",
|
|
322
|
-
"aria-labelledby":
|
|
322
|
+
"aria-labelledby": l ? s : null,
|
|
323
323
|
"aria-modal": "true",
|
|
324
|
-
ref:
|
|
325
|
-
style:
|
|
324
|
+
ref: N,
|
|
325
|
+
style: I(I({}, a), T),
|
|
326
326
|
className: M(o, t),
|
|
327
|
-
onMouseDown:
|
|
327
|
+
onMouseDown: g,
|
|
328
328
|
onMouseUp: p
|
|
329
329
|
}, /* @__PURE__ */ b.createElement("div", {
|
|
330
330
|
ref: H,
|
|
331
331
|
tabIndex: 0,
|
|
332
332
|
style: bt
|
|
333
333
|
}, /* @__PURE__ */ b.createElement(Ct, {
|
|
334
|
-
shouldUpdate:
|
|
335
|
-
},
|
|
334
|
+
shouldUpdate: v || h
|
|
335
|
+
}, x ? x(k) : k)), /* @__PURE__ */ b.createElement("div", {
|
|
336
336
|
tabIndex: 0,
|
|
337
|
-
ref:
|
|
337
|
+
ref: X,
|
|
338
338
|
style: pt
|
|
339
339
|
}));
|
|
340
340
|
});
|
|
341
|
-
process.env.NODE_ENV !== "production" && (
|
|
342
|
-
var
|
|
343
|
-
var o = e.prefixCls, t = e.title, a = e.style,
|
|
344
|
-
p && (
|
|
345
|
-
function
|
|
341
|
+
process.env.NODE_ENV !== "production" && (Oe.displayName = "Panel");
|
|
342
|
+
var ln = /* @__PURE__ */ r.forwardRef(function(e, n) {
|
|
343
|
+
var o = e.prefixCls, t = e.title, a = e.style, l = e.className, s = e.visible, d = e.forceRender, c = e.destroyOnClose, m = e.motionName, i = e.ariaId, u = e.onVisibleChanged, f = e.mousePosition, C = U(), x = r.useState(), g = be(x, 2), p = g[0], y = g[1], v = {};
|
|
344
|
+
p && (v.transformOrigin = p);
|
|
345
|
+
function h() {
|
|
346
346
|
var S = vt(C.current);
|
|
347
347
|
y(f && (f.x || f.y) ? "".concat(f.x - S.left, "px ").concat(f.y - S.top, "px") : "");
|
|
348
348
|
}
|
|
349
|
-
return /* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ r.createElement(Ue, {
|
|
350
350
|
visible: s,
|
|
351
351
|
onVisibleChanged: u,
|
|
352
|
-
onAppearPrepare:
|
|
353
|
-
onEnterPrepare:
|
|
352
|
+
onAppearPrepare: h,
|
|
353
|
+
onEnterPrepare: h,
|
|
354
354
|
forceRender: d,
|
|
355
|
-
motionName:
|
|
355
|
+
motionName: m,
|
|
356
356
|
removeOnLeave: c,
|
|
357
357
|
ref: C
|
|
358
|
-
}, function(S,
|
|
358
|
+
}, function(S, w) {
|
|
359
359
|
var $ = S.className, E = S.style;
|
|
360
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ r.createElement(Oe, B({}, e, {
|
|
361
361
|
ref: n,
|
|
362
362
|
title: t,
|
|
363
363
|
ariaId: i,
|
|
364
364
|
prefixCls: o,
|
|
365
|
-
holderRef:
|
|
366
|
-
style:
|
|
367
|
-
className: M(
|
|
365
|
+
holderRef: w,
|
|
366
|
+
style: I(I(I({}, E), a), v),
|
|
367
|
+
className: M(l, $)
|
|
368
368
|
}));
|
|
369
369
|
});
|
|
370
370
|
});
|
|
371
|
-
|
|
371
|
+
ln.displayName = "Content";
|
|
372
372
|
var yt = function(n) {
|
|
373
|
-
var o = n.prefixCls, t = n.style, a = n.visible,
|
|
374
|
-
return /* @__PURE__ */
|
|
373
|
+
var o = n.prefixCls, t = n.style, a = n.visible, l = n.maskProps, s = n.motionName, d = n.className;
|
|
374
|
+
return /* @__PURE__ */ r.createElement(Ue, {
|
|
375
375
|
key: "mask",
|
|
376
376
|
visible: a,
|
|
377
377
|
motionName: s,
|
|
378
378
|
leavedClassName: "".concat(o, "-mask-hidden")
|
|
379
|
-
}, function(c,
|
|
379
|
+
}, function(c, m) {
|
|
380
380
|
var i = c.className, u = c.style;
|
|
381
|
-
return /* @__PURE__ */
|
|
382
|
-
ref:
|
|
383
|
-
style:
|
|
381
|
+
return /* @__PURE__ */ r.createElement("div", B({
|
|
382
|
+
ref: m,
|
|
383
|
+
style: I(I({}, u), t),
|
|
384
384
|
className: M("".concat(o, "-mask"), i, d)
|
|
385
|
-
},
|
|
385
|
+
}, l));
|
|
386
386
|
});
|
|
387
387
|
}, ht = function(n) {
|
|
388
|
-
var o = n.prefixCls, t = o === void 0 ? "rc-dialog" : o, a = n.zIndex,
|
|
389
|
-
process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(
|
|
390
|
-
|
|
391
|
-
}), "wrapClassName" in n &&
|
|
392
|
-
var W =
|
|
393
|
-
function
|
|
394
|
-
|
|
388
|
+
var o = n.prefixCls, t = o === void 0 ? "rc-dialog" : o, a = n.zIndex, l = n.visible, s = l === void 0 ? !1 : l, d = n.keyboard, c = d === void 0 ? !0 : d, m = n.focusTriggerAfterClose, i = m === void 0 ? !0 : m, u = n.wrapStyle, f = n.wrapClassName, C = n.wrapProps, x = n.onClose, g = n.afterOpenChange, p = n.afterClose, y = n.transitionName, v = n.animation, h = n.closable, S = h === void 0 ? !0 : h, w = n.mask, $ = w === void 0 ? !0 : w, E = n.maskTransitionName, z = n.maskAnimation, Z = n.maskClosable, N = Z === void 0 ? !0 : Z, H = n.maskStyle, X = n.maskProps, T = n.rootClassName, D = n.classNames, F = n.styles;
|
|
389
|
+
process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(P) {
|
|
390
|
+
Pe(!(P in n), "".concat(P, " is deprecated, please use styles instead."));
|
|
391
|
+
}), "wrapClassName" in n && Pe(!1, "wrapClassName is deprecated, please use classNames instead."));
|
|
392
|
+
var W = U(), V = U(), K = U(), ee = r.useState(s), k = be(ee, 2), q = k[0], R = k[1], ne = Tn();
|
|
393
|
+
function Y() {
|
|
394
|
+
Ie(V.current, document.activeElement) || (W.current = document.activeElement);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
if (!
|
|
398
|
-
var
|
|
399
|
-
(
|
|
396
|
+
function de() {
|
|
397
|
+
if (!Ie(V.current, document.activeElement)) {
|
|
398
|
+
var P;
|
|
399
|
+
(P = K.current) === null || P === void 0 || P.focus();
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
if (
|
|
404
|
-
|
|
402
|
+
function ue(P) {
|
|
403
|
+
if (P)
|
|
404
|
+
de();
|
|
405
405
|
else {
|
|
406
|
-
if (
|
|
406
|
+
if (R(!1), $ && W.current && i) {
|
|
407
407
|
try {
|
|
408
408
|
W.current.focus({
|
|
409
409
|
preventScroll: !0
|
|
@@ -412,105 +412,105 @@ var yt = function(n) {
|
|
|
412
412
|
}
|
|
413
413
|
W.current = null;
|
|
414
414
|
}
|
|
415
|
-
|
|
415
|
+
q && (p == null || p());
|
|
416
416
|
}
|
|
417
|
-
|
|
417
|
+
g == null || g(P);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
419
|
+
function te(P) {
|
|
420
|
+
x == null || x(P);
|
|
421
421
|
}
|
|
422
|
-
var
|
|
423
|
-
clearTimeout(
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
|
|
422
|
+
var A = U(!1), oe = U(), j = function() {
|
|
423
|
+
clearTimeout(oe.current), A.current = !0;
|
|
424
|
+
}, J = function() {
|
|
425
|
+
oe.current = setTimeout(function() {
|
|
426
|
+
A.current = !1;
|
|
427
427
|
});
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
-
|
|
428
|
+
}, _ = null;
|
|
429
|
+
N && (_ = function(me) {
|
|
430
|
+
A.current ? A.current = !1 : V.current === me.target && te(me);
|
|
431
431
|
});
|
|
432
|
-
function
|
|
433
|
-
if (c &&
|
|
434
|
-
|
|
432
|
+
function fe(P) {
|
|
433
|
+
if (c && P.keyCode === Me.ESC) {
|
|
434
|
+
P.stopPropagation(), te(P);
|
|
435
435
|
return;
|
|
436
436
|
}
|
|
437
|
-
s &&
|
|
437
|
+
s && P.keyCode === Me.TAB && K.current.changeActive(!P.shiftKey);
|
|
438
438
|
}
|
|
439
|
-
|
|
440
|
-
s && (
|
|
441
|
-
}, [s]),
|
|
439
|
+
Te(function() {
|
|
440
|
+
s && (R(!0), Y());
|
|
441
|
+
}, [s]), Te(function() {
|
|
442
442
|
return function() {
|
|
443
|
-
clearTimeout(
|
|
443
|
+
clearTimeout(oe.current);
|
|
444
444
|
};
|
|
445
445
|
}, []);
|
|
446
|
-
var wn =
|
|
446
|
+
var wn = I(I(I({
|
|
447
447
|
zIndex: a
|
|
448
|
-
}, u),
|
|
449
|
-
display:
|
|
448
|
+
}, u), F == null ? void 0 : F.wrapper), {}, {
|
|
449
|
+
display: q ? null : "none"
|
|
450
450
|
});
|
|
451
|
-
return /* @__PURE__ */
|
|
452
|
-
className: M("".concat(t, "-root"),
|
|
453
|
-
},
|
|
451
|
+
return /* @__PURE__ */ r.createElement("div", B({
|
|
452
|
+
className: M("".concat(t, "-root"), T)
|
|
453
|
+
}, Se(n, {
|
|
454
454
|
data: !0
|
|
455
|
-
})), /* @__PURE__ */
|
|
455
|
+
})), /* @__PURE__ */ r.createElement(yt, {
|
|
456
456
|
prefixCls: t,
|
|
457
457
|
visible: $ && s,
|
|
458
|
-
motionName:
|
|
459
|
-
style:
|
|
458
|
+
motionName: De(t, E, z),
|
|
459
|
+
style: I(I({
|
|
460
460
|
zIndex: a
|
|
461
|
-
}, H),
|
|
462
|
-
maskProps:
|
|
463
|
-
className:
|
|
464
|
-
}), /* @__PURE__ */
|
|
461
|
+
}, H), F == null ? void 0 : F.mask),
|
|
462
|
+
maskProps: X,
|
|
463
|
+
className: D == null ? void 0 : D.mask
|
|
464
|
+
}), /* @__PURE__ */ r.createElement("div", B({
|
|
465
465
|
tabIndex: -1,
|
|
466
|
-
onKeyDown:
|
|
467
|
-
className: M("".concat(t, "-wrap"), f,
|
|
466
|
+
onKeyDown: fe,
|
|
467
|
+
className: M("".concat(t, "-wrap"), f, D == null ? void 0 : D.wrapper),
|
|
468
468
|
ref: V,
|
|
469
|
-
onClick:
|
|
469
|
+
onClick: _,
|
|
470
470
|
style: wn
|
|
471
|
-
}, C), /* @__PURE__ */
|
|
472
|
-
onMouseDown:
|
|
473
|
-
onMouseUp:
|
|
474
|
-
ref:
|
|
471
|
+
}, C), /* @__PURE__ */ r.createElement(ln, B({}, n, {
|
|
472
|
+
onMouseDown: j,
|
|
473
|
+
onMouseUp: J,
|
|
474
|
+
ref: K,
|
|
475
475
|
closable: S,
|
|
476
|
-
ariaId:
|
|
476
|
+
ariaId: ne,
|
|
477
477
|
prefixCls: t,
|
|
478
|
-
visible: s &&
|
|
479
|
-
onClose:
|
|
480
|
-
onVisibleChanged:
|
|
481
|
-
motionName:
|
|
478
|
+
visible: s && q,
|
|
479
|
+
onClose: te,
|
|
480
|
+
onVisibleChanged: ue,
|
|
481
|
+
motionName: De(t, y, v)
|
|
482
482
|
}))));
|
|
483
|
-
},
|
|
484
|
-
var o = n.visible, t = n.getContainer, a = n.forceRender,
|
|
483
|
+
}, sn = function(n) {
|
|
484
|
+
var o = n.visible, t = n.getContainer, a = n.forceRender, l = n.destroyOnClose, s = l === void 0 ? !1 : l, d = n.afterClose, c = n.panelRef, m = r.useState(o), i = be(m, 2), u = i[0], f = i[1], C = r.useMemo(function() {
|
|
485
485
|
return {
|
|
486
486
|
panel: c
|
|
487
487
|
};
|
|
488
488
|
}, [c]);
|
|
489
|
-
return
|
|
489
|
+
return r.useEffect(function() {
|
|
490
490
|
o && f(!0);
|
|
491
|
-
}, [o]), !a && s && !u ? null : /* @__PURE__ */
|
|
491
|
+
}, [o]), !a && s && !u ? null : /* @__PURE__ */ r.createElement(rn.Provider, {
|
|
492
492
|
value: C
|
|
493
|
-
}, /* @__PURE__ */
|
|
493
|
+
}, /* @__PURE__ */ r.createElement(Rn, {
|
|
494
494
|
open: o || a || u,
|
|
495
495
|
autoDestroy: !1,
|
|
496
496
|
getContainer: t,
|
|
497
497
|
autoLock: o || u
|
|
498
|
-
}, /* @__PURE__ */
|
|
498
|
+
}, /* @__PURE__ */ r.createElement(ht, B({}, n, {
|
|
499
499
|
destroyOnClose: s,
|
|
500
500
|
afterClose: function() {
|
|
501
501
|
d == null || d(), f(!1);
|
|
502
502
|
}
|
|
503
503
|
}))));
|
|
504
504
|
};
|
|
505
|
-
|
|
506
|
-
function
|
|
505
|
+
sn.displayName = "Dialog";
|
|
506
|
+
function Le(e) {
|
|
507
507
|
if (e)
|
|
508
508
|
return {
|
|
509
509
|
closable: e.closable,
|
|
510
510
|
closeIcon: e.closeIcon
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function ze(e) {
|
|
514
514
|
const {
|
|
515
515
|
closable: n,
|
|
516
516
|
closeIcon: o
|
|
@@ -529,115 +529,115 @@ function De(e) {
|
|
|
529
529
|
return n && typeof n == "object" && (t = Object.assign(Object.assign({}, t), n)), t;
|
|
530
530
|
}, [n, o]);
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function _e() {
|
|
533
533
|
const e = {};
|
|
534
534
|
for (var n = arguments.length, o = new Array(n), t = 0; t < n; t++)
|
|
535
535
|
o[t] = arguments[t];
|
|
536
536
|
return o.forEach((a) => {
|
|
537
|
-
a && Object.keys(a).forEach((
|
|
538
|
-
a[
|
|
537
|
+
a && Object.keys(a).forEach((l) => {
|
|
538
|
+
a[l] !== void 0 && (e[l] = a[l]);
|
|
539
539
|
});
|
|
540
540
|
}), e;
|
|
541
541
|
}
|
|
542
542
|
const xt = {};
|
|
543
543
|
function $t(e, n) {
|
|
544
544
|
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : xt;
|
|
545
|
-
const t =
|
|
546
|
-
closeIcon: /* @__PURE__ */ b.createElement(
|
|
547
|
-
}, o), [o]), d = b.useMemo(() => t === !1 ? !1 : t ?
|
|
545
|
+
const t = ze(e), a = ze(n), l = typeof t != "boolean" ? !!(t != null && t.disabled) : !1, s = b.useMemo(() => Object.assign({
|
|
546
|
+
closeIcon: /* @__PURE__ */ b.createElement($e, null)
|
|
547
|
+
}, o), [o]), d = b.useMemo(() => t === !1 ? !1 : t ? _e(s, a, t) : a === !1 ? !1 : a ? _e(s, a) : s.closable ? s : !1, [t, a, s]);
|
|
548
548
|
return b.useMemo(() => {
|
|
549
549
|
if (d === !1)
|
|
550
|
-
return [!1, null,
|
|
550
|
+
return [!1, null, l];
|
|
551
551
|
const {
|
|
552
552
|
closeIconRender: c
|
|
553
553
|
} = s, {
|
|
554
|
-
closeIcon:
|
|
554
|
+
closeIcon: m
|
|
555
555
|
} = d;
|
|
556
|
-
let i =
|
|
556
|
+
let i = m;
|
|
557
557
|
if (i != null) {
|
|
558
|
-
c && (i = c(
|
|
559
|
-
const u =
|
|
558
|
+
c && (i = c(m));
|
|
559
|
+
const u = Se(d, !0);
|
|
560
560
|
Object.keys(u).length && (i = /* @__PURE__ */ b.isValidElement(i) ? /* @__PURE__ */ b.cloneElement(i, u) : /* @__PURE__ */ b.createElement("span", Object.assign({}, u), i));
|
|
561
561
|
}
|
|
562
|
-
return [!0, i,
|
|
562
|
+
return [!0, i, l];
|
|
563
563
|
}, [d, s]);
|
|
564
564
|
}
|
|
565
565
|
const Et = () => jn() && window.document.documentElement;
|
|
566
|
-
function
|
|
566
|
+
function He() {
|
|
567
567
|
}
|
|
568
|
-
const St = /* @__PURE__ */
|
|
569
|
-
add:
|
|
570
|
-
remove:
|
|
568
|
+
const St = /* @__PURE__ */ r.createContext({
|
|
569
|
+
add: He,
|
|
570
|
+
remove: He
|
|
571
571
|
});
|
|
572
572
|
function Ot(e) {
|
|
573
|
-
const n =
|
|
573
|
+
const n = r.useContext(St), o = r.useRef(null);
|
|
574
574
|
return Bn((a) => {
|
|
575
575
|
if (a) {
|
|
576
|
-
const
|
|
577
|
-
n.add(
|
|
576
|
+
const l = e ? a.querySelector(e) : a;
|
|
577
|
+
n.add(l), o.current = l;
|
|
578
578
|
} else
|
|
579
579
|
n.remove(o.current);
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
|
-
const
|
|
582
|
+
const We = () => {
|
|
583
583
|
const {
|
|
584
584
|
cancelButtonProps: e,
|
|
585
585
|
cancelTextLocale: n,
|
|
586
586
|
onCancel: o
|
|
587
|
-
} =
|
|
588
|
-
return /* @__PURE__ */ b.createElement(
|
|
587
|
+
} = ae(re);
|
|
588
|
+
return /* @__PURE__ */ b.createElement(xe, Object.assign({
|
|
589
589
|
onClick: o
|
|
590
590
|
}, e), n);
|
|
591
|
-
},
|
|
591
|
+
}, Ve = () => {
|
|
592
592
|
const {
|
|
593
593
|
confirmLoading: e,
|
|
594
594
|
okButtonProps: n,
|
|
595
595
|
okType: o,
|
|
596
596
|
okTextLocale: t,
|
|
597
597
|
onOk: a
|
|
598
|
-
} =
|
|
599
|
-
return /* @__PURE__ */ b.createElement(
|
|
598
|
+
} = ae(re);
|
|
599
|
+
return /* @__PURE__ */ b.createElement(xe, Object.assign({}, Ye(o), {
|
|
600
600
|
loading: e,
|
|
601
601
|
onClick: a
|
|
602
602
|
}, n), t);
|
|
603
603
|
};
|
|
604
|
-
function
|
|
604
|
+
function cn(e, n) {
|
|
605
605
|
return /* @__PURE__ */ b.createElement("span", {
|
|
606
606
|
className: `${e}-close-x`
|
|
607
|
-
}, n || /* @__PURE__ */ b.createElement(
|
|
607
|
+
}, n || /* @__PURE__ */ b.createElement($e, {
|
|
608
608
|
className: `${e}-close-icon`
|
|
609
609
|
}));
|
|
610
610
|
}
|
|
611
|
-
const
|
|
611
|
+
const dn = (e) => {
|
|
612
612
|
const {
|
|
613
613
|
okText: n,
|
|
614
614
|
okType: o = "primary",
|
|
615
615
|
cancelText: t,
|
|
616
616
|
confirmLoading: a,
|
|
617
|
-
onOk:
|
|
617
|
+
onOk: l,
|
|
618
618
|
onCancel: s,
|
|
619
619
|
okButtonProps: d,
|
|
620
620
|
cancelButtonProps: c,
|
|
621
|
-
footer:
|
|
622
|
-
} = e, [i] =
|
|
621
|
+
footer: m
|
|
622
|
+
} = e, [i] = Ee("Modal", Xe()), u = n || (i == null ? void 0 : i.okText), f = t || (i == null ? void 0 : i.cancelText), C = {
|
|
623
623
|
confirmLoading: a,
|
|
624
624
|
okButtonProps: d,
|
|
625
625
|
cancelButtonProps: c,
|
|
626
626
|
okTextLocale: u,
|
|
627
627
|
cancelTextLocale: f,
|
|
628
628
|
okType: o,
|
|
629
|
-
onOk:
|
|
629
|
+
onOk: l,
|
|
630
630
|
onCancel: s
|
|
631
|
-
},
|
|
632
|
-
let
|
|
633
|
-
return typeof
|
|
634
|
-
OkBtn:
|
|
635
|
-
CancelBtn:
|
|
636
|
-
})),
|
|
637
|
-
value:
|
|
638
|
-
},
|
|
631
|
+
}, x = b.useMemo(() => C, G(Object.values(C)));
|
|
632
|
+
let g;
|
|
633
|
+
return typeof m == "function" || typeof m > "u" ? (g = /* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.createElement(We, null), /* @__PURE__ */ b.createElement(Ve, null)), typeof m == "function" && (g = m(g, {
|
|
634
|
+
OkBtn: Ve,
|
|
635
|
+
CancelBtn: We
|
|
636
|
+
})), g = /* @__PURE__ */ b.createElement(an, {
|
|
637
|
+
value: x
|
|
638
|
+
}, g)) : g = m, /* @__PURE__ */ b.createElement(Dn, {
|
|
639
639
|
disabled: !1
|
|
640
|
-
},
|
|
640
|
+
}, g);
|
|
641
641
|
}, wt = (e) => {
|
|
642
642
|
const {
|
|
643
643
|
componentCls: n
|
|
@@ -706,23 +706,23 @@ const ln = (e) => {
|
|
|
706
706
|
prefixCls: o,
|
|
707
707
|
componentCls: t,
|
|
708
708
|
gridColumns: a
|
|
709
|
-
} = e,
|
|
709
|
+
} = e, l = {};
|
|
710
710
|
for (let s = a; s >= 0; s--)
|
|
711
|
-
s === 0 ? (
|
|
711
|
+
s === 0 ? (l[`${t}${n}-${s}`] = {
|
|
712
712
|
display: "none"
|
|
713
|
-
},
|
|
713
|
+
}, l[`${t}-push-${s}`] = {
|
|
714
714
|
insetInlineStart: "auto"
|
|
715
|
-
},
|
|
715
|
+
}, l[`${t}-pull-${s}`] = {
|
|
716
716
|
insetInlineEnd: "auto"
|
|
717
|
-
},
|
|
717
|
+
}, l[`${t}${n}-push-${s}`] = {
|
|
718
718
|
insetInlineStart: "auto"
|
|
719
|
-
},
|
|
719
|
+
}, l[`${t}${n}-pull-${s}`] = {
|
|
720
720
|
insetInlineEnd: "auto"
|
|
721
|
-
},
|
|
721
|
+
}, l[`${t}${n}-offset-${s}`] = {
|
|
722
722
|
marginInlineStart: 0
|
|
723
|
-
},
|
|
723
|
+
}, l[`${t}${n}-order-${s}`] = {
|
|
724
724
|
order: 0
|
|
725
|
-
}) : (
|
|
725
|
+
}) : (l[`${t}${n}-${s}`] = [
|
|
726
726
|
// https://github.com/ant-design/ant-design/issues/44456
|
|
727
727
|
// Form set `display: flex` on Col which will override `display: block`.
|
|
728
728
|
// Let's get it from css variable to support override.
|
|
@@ -736,23 +736,23 @@ const ln = (e) => {
|
|
|
736
736
|
flex: `0 0 ${s / a * 100}%`,
|
|
737
737
|
maxWidth: `${s / a * 100}%`
|
|
738
738
|
}
|
|
739
|
-
],
|
|
739
|
+
], l[`${t}${n}-push-${s}`] = {
|
|
740
740
|
insetInlineStart: `${s / a * 100}%`
|
|
741
|
-
},
|
|
741
|
+
}, l[`${t}${n}-pull-${s}`] = {
|
|
742
742
|
insetInlineEnd: `${s / a * 100}%`
|
|
743
|
-
},
|
|
743
|
+
}, l[`${t}${n}-offset-${s}`] = {
|
|
744
744
|
marginInlineStart: `${s / a * 100}%`
|
|
745
|
-
},
|
|
745
|
+
}, l[`${t}${n}-order-${s}`] = {
|
|
746
746
|
order: s
|
|
747
747
|
});
|
|
748
|
-
return
|
|
748
|
+
return l[`${t}${n}-flex`] = {
|
|
749
749
|
flex: `var(--${o}${n}-flex)`
|
|
750
|
-
},
|
|
751
|
-
},
|
|
752
|
-
[`@media (min-width: ${O(n)})`]: Object.assign({},
|
|
753
|
-
}),
|
|
754
|
-
|
|
755
|
-
const
|
|
750
|
+
}, l;
|
|
751
|
+
}, Ce = (e, n) => Pt(e, n), It = (e, n, o) => ({
|
|
752
|
+
[`@media (min-width: ${O(n)})`]: Object.assign({}, Ce(e, o))
|
|
753
|
+
}), Mt = () => ({}), Tt = () => ({});
|
|
754
|
+
ye("Grid", wt, Mt);
|
|
755
|
+
const un = (e) => ({
|
|
756
756
|
xs: e.screenXSMin,
|
|
757
757
|
sm: e.screenSMMin,
|
|
758
758
|
md: e.screenMDMin,
|
|
@@ -760,14 +760,14 @@ const sn = (e) => ({
|
|
|
760
760
|
xl: e.screenXLMin,
|
|
761
761
|
xxl: e.screenXXLMin
|
|
762
762
|
});
|
|
763
|
-
|
|
764
|
-
const n =
|
|
763
|
+
ye("Grid", (e) => {
|
|
764
|
+
const n = Ke(e, {
|
|
765
765
|
gridColumns: 24
|
|
766
766
|
// Row is divided into 24 parts in Grid
|
|
767
|
-
}), o =
|
|
768
|
-
return delete o.xs, [Nt(n),
|
|
767
|
+
}), o = un(n);
|
|
768
|
+
return delete o.xs, [Nt(n), Ce(n, ""), Ce(n, "-xs"), Object.keys(o).map((t) => It(n, o[t], `-${t}`)).reduce((t, a) => Object.assign(Object.assign({}, t), a), {})];
|
|
769
769
|
}, Tt);
|
|
770
|
-
function
|
|
770
|
+
function Ae(e) {
|
|
771
771
|
return {
|
|
772
772
|
position: e,
|
|
773
773
|
inset: 0
|
|
@@ -793,7 +793,7 @@ const Rt = (e) => {
|
|
|
793
793
|
[`${n}${o}-zoom-leave ${n}-content`]: {
|
|
794
794
|
pointerEvents: "none"
|
|
795
795
|
},
|
|
796
|
-
[`${n}-mask`]: Object.assign(Object.assign({},
|
|
796
|
+
[`${n}-mask`]: Object.assign(Object.assign({}, Ae("fixed")), {
|
|
797
797
|
zIndex: e.zIndexPopupBase,
|
|
798
798
|
height: "100%",
|
|
799
799
|
backgroundColor: e.colorBgMask,
|
|
@@ -802,7 +802,7 @@ const Rt = (e) => {
|
|
|
802
802
|
display: "none"
|
|
803
803
|
}
|
|
804
804
|
}),
|
|
805
|
-
[`${n}-wrap`]: Object.assign(Object.assign({},
|
|
805
|
+
[`${n}-wrap`]: Object.assign(Object.assign({}, Ae("fixed")), {
|
|
806
806
|
zIndex: e.zIndexPopupBase,
|
|
807
807
|
overflow: "auto",
|
|
808
808
|
outline: 0,
|
|
@@ -995,7 +995,7 @@ const Rt = (e) => {
|
|
|
995
995
|
}, Dt = (e) => {
|
|
996
996
|
const {
|
|
997
997
|
componentCls: n
|
|
998
|
-
} = e, o =
|
|
998
|
+
} = e, o = un(e);
|
|
999
999
|
delete o.xs;
|
|
1000
1000
|
const t = Object.keys(o).map((a) => ({
|
|
1001
1001
|
[`@media (min-width: ${O(o[a])})`]: {
|
|
@@ -1009,9 +1009,9 @@ const Rt = (e) => {
|
|
|
1009
1009
|
}].concat(G(t))
|
|
1010
1010
|
}
|
|
1011
1011
|
};
|
|
1012
|
-
},
|
|
1012
|
+
}, fn = (e) => {
|
|
1013
1013
|
const n = e.padding, o = e.fontSizeHeading5, t = e.lineHeightHeading5;
|
|
1014
|
-
return
|
|
1014
|
+
return Ke(e, {
|
|
1015
1015
|
modalHeaderHeight: e.calc(e.calc(t).mul(o).equal()).add(e.calc(n).mul(2).equal()).equal(),
|
|
1016
1016
|
modalFooterBorderColorSplit: e.colorSplit,
|
|
1017
1017
|
modalFooterBorderStyle: e.lineType,
|
|
@@ -1022,7 +1022,7 @@ const Rt = (e) => {
|
|
|
1022
1022
|
modalConfirmIconSize: e.fontHeight,
|
|
1023
1023
|
modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
|
|
1024
1024
|
});
|
|
1025
|
-
},
|
|
1025
|
+
}, mn = (e) => ({
|
|
1026
1026
|
footerBg: "transparent",
|
|
1027
1027
|
headerBg: e.colorBgElevated,
|
|
1028
1028
|
titleLineHeight: e.lineHeightHeading5,
|
|
@@ -1042,10 +1042,10 @@ const Rt = (e) => {
|
|
|
1042
1042
|
confirmBodyPadding: e.wireframe ? `${O(e.padding * 2)} ${O(e.padding * 2)} ${O(e.paddingLG)}` : 0,
|
|
1043
1043
|
confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
|
|
1044
1044
|
confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
|
|
1045
|
-
}),
|
|
1046
|
-
const n =
|
|
1045
|
+
}), gn = ye("Modal", (e) => {
|
|
1046
|
+
const n = fn(e);
|
|
1047
1047
|
return [jt(n), Bt(n), Rt(n), Gn(n, "zoom"), Dt(n)];
|
|
1048
|
-
},
|
|
1048
|
+
}, mn, {
|
|
1049
1049
|
unitless: {
|
|
1050
1050
|
titleLineHeight: !0
|
|
1051
1051
|
}
|
|
@@ -1057,128 +1057,126 @@ var Ft = function(e, n) {
|
|
|
1057
1057
|
n.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (o[t[a]] = e[t[a]]);
|
|
1058
1058
|
return o;
|
|
1059
1059
|
};
|
|
1060
|
-
let
|
|
1060
|
+
let pe;
|
|
1061
1061
|
const Lt = (e) => {
|
|
1062
|
-
|
|
1062
|
+
pe = {
|
|
1063
1063
|
x: e.pageX,
|
|
1064
1064
|
y: e.pageY
|
|
1065
1065
|
}, setTimeout(() => {
|
|
1066
|
-
|
|
1066
|
+
pe = null;
|
|
1067
1067
|
}, 100);
|
|
1068
1068
|
};
|
|
1069
1069
|
Et() && document.documentElement.addEventListener("click", Lt, !0);
|
|
1070
|
-
const
|
|
1071
|
-
var n;
|
|
1070
|
+
const vn = (e) => {
|
|
1072
1071
|
const {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1072
|
+
prefixCls: n,
|
|
1073
|
+
className: o,
|
|
1074
|
+
rootClassName: t,
|
|
1075
|
+
open: a,
|
|
1076
|
+
wrapClassName: l,
|
|
1077
|
+
centered: s,
|
|
1078
|
+
getContainer: d,
|
|
1079
|
+
focusTriggerAfterClose: c = !0,
|
|
1080
|
+
style: m,
|
|
1081
|
+
// Deprecated
|
|
1082
|
+
visible: i,
|
|
1083
|
+
width: u = 520,
|
|
1084
|
+
footer: f,
|
|
1085
|
+
classNames: C,
|
|
1086
|
+
styles: x,
|
|
1087
|
+
children: g,
|
|
1088
|
+
loading: p,
|
|
1089
|
+
confirmLoading: y,
|
|
1090
|
+
zIndex: v,
|
|
1091
|
+
mousePosition: h,
|
|
1092
|
+
onOk: S,
|
|
1093
|
+
onCancel: w
|
|
1094
|
+
} = e, $ = Ft(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading", "confirmLoading", "zIndex", "mousePosition", "onOk", "onCancel"]), {
|
|
1095
|
+
getPopupContainer: E,
|
|
1096
|
+
getPrefixCls: z,
|
|
1097
|
+
direction: Z,
|
|
1098
|
+
modal: N
|
|
1099
|
+
} = r.useContext(ce), H = (j) => {
|
|
1100
|
+
y || w == null || w(j);
|
|
1101
|
+
}, X = (j) => {
|
|
1102
|
+
S == null || S(j);
|
|
1087
1103
|
};
|
|
1088
1104
|
if (process.env.NODE_ENV !== "production") {
|
|
1089
|
-
const
|
|
1090
|
-
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((
|
|
1091
|
-
let [
|
|
1092
|
-
|
|
1105
|
+
const j = he("Modal");
|
|
1106
|
+
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((J) => {
|
|
1107
|
+
let [_, fe] = J;
|
|
1108
|
+
j.deprecated(!(_ in e), _, fe);
|
|
1093
1109
|
});
|
|
1094
1110
|
}
|
|
1095
|
-
const {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
getContainer: h,
|
|
1103
|
-
focusTriggerAfterClose: v = !0,
|
|
1104
|
-
style: p,
|
|
1105
|
-
// Deprecated
|
|
1106
|
-
visible: y,
|
|
1107
|
-
width: m = 520,
|
|
1108
|
-
footer: x,
|
|
1109
|
-
classNames: S,
|
|
1110
|
-
styles: N,
|
|
1111
|
-
children: $,
|
|
1112
|
-
loading: E
|
|
1113
|
-
} = e, D = Ft(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"]), T = t("modal", c), Z = t(), H = Ue(T), [K, q, z] = un(T, H), _ = M(f, {
|
|
1114
|
-
[`${T}-centered`]: C ?? (r == null ? void 0 : r.centered),
|
|
1115
|
-
[`${T}-wrap-rtl`]: a === "rtl"
|
|
1116
|
-
}), W = x !== null && !E ? /* @__PURE__ */ l.createElement(ln, Object.assign({}, e, {
|
|
1117
|
-
onOk: d,
|
|
1118
|
-
onCancel: s
|
|
1119
|
-
})) : null, [V, U, J] = $t(Be(e), Be(r), {
|
|
1111
|
+
const T = z("modal", n), D = z(), F = ke(T), [W, V, K] = gn(T, F), ee = M(l, {
|
|
1112
|
+
[`${T}-centered`]: s ?? (N == null ? void 0 : N.centered),
|
|
1113
|
+
[`${T}-wrap-rtl`]: Z === "rtl"
|
|
1114
|
+
}), k = f !== null && !p ? /* @__PURE__ */ r.createElement(dn, Object.assign({}, e, {
|
|
1115
|
+
onOk: X,
|
|
1116
|
+
onCancel: H
|
|
1117
|
+
})) : null, [q, R, ne] = $t(Le(e), Le(N), {
|
|
1120
1118
|
closable: !0,
|
|
1121
|
-
closeIcon: /* @__PURE__ */
|
|
1119
|
+
closeIcon: /* @__PURE__ */ r.createElement($e, {
|
|
1122
1120
|
className: `${T}-close-icon`
|
|
1123
1121
|
}),
|
|
1124
|
-
closeIconRender: (
|
|
1125
|
-
}),
|
|
1126
|
-
const
|
|
1127
|
-
return A && Object.keys(A).forEach((
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
}),
|
|
1122
|
+
closeIconRender: (j) => cn(T, j)
|
|
1123
|
+
}), Y = Ot(`.${T}-content`), [de, ue] = qn("Modal", v), [te, A] = r.useMemo(() => u && typeof u == "object" ? [void 0, u] : [u, void 0], [u]), oe = r.useMemo(() => {
|
|
1124
|
+
const j = {};
|
|
1125
|
+
return A && Object.keys(A).forEach((J) => {
|
|
1126
|
+
const _ = A[J];
|
|
1127
|
+
_ !== void 0 && (j[`--${T}-${J}-width`] = typeof _ == "number" ? `${_}px` : _);
|
|
1128
|
+
}), j;
|
|
1131
1129
|
}, [A]);
|
|
1132
|
-
return
|
|
1130
|
+
return W(/* @__PURE__ */ r.createElement(Un, {
|
|
1133
1131
|
form: !0,
|
|
1134
1132
|
space: !0
|
|
1135
|
-
}, /* @__PURE__ */
|
|
1136
|
-
value:
|
|
1137
|
-
}, /* @__PURE__ */
|
|
1138
|
-
width:
|
|
1139
|
-
},
|
|
1140
|
-
zIndex:
|
|
1141
|
-
getContainer:
|
|
1133
|
+
}, /* @__PURE__ */ r.createElement(Xn.Provider, {
|
|
1134
|
+
value: ue
|
|
1135
|
+
}, /* @__PURE__ */ r.createElement(sn, Object.assign({
|
|
1136
|
+
width: te
|
|
1137
|
+
}, $, {
|
|
1138
|
+
zIndex: de,
|
|
1139
|
+
getContainer: d === void 0 ? E : d,
|
|
1142
1140
|
prefixCls: T,
|
|
1143
|
-
rootClassName: M(
|
|
1144
|
-
footer:
|
|
1145
|
-
visible:
|
|
1146
|
-
mousePosition:
|
|
1147
|
-
onClose:
|
|
1148
|
-
closable:
|
|
1149
|
-
disabled:
|
|
1150
|
-
closeIcon:
|
|
1141
|
+
rootClassName: M(V, t, K, F),
|
|
1142
|
+
footer: k,
|
|
1143
|
+
visible: a ?? i,
|
|
1144
|
+
mousePosition: h ?? pe,
|
|
1145
|
+
onClose: H,
|
|
1146
|
+
closable: q && {
|
|
1147
|
+
disabled: ne,
|
|
1148
|
+
closeIcon: R
|
|
1151
1149
|
},
|
|
1152
|
-
closeIcon:
|
|
1153
|
-
focusTriggerAfterClose:
|
|
1154
|
-
transitionName:
|
|
1155
|
-
maskTransitionName:
|
|
1156
|
-
className: M(
|
|
1157
|
-
style: Object.assign(Object.assign(Object.assign({},
|
|
1158
|
-
classNames: Object.assign(Object.assign(Object.assign({},
|
|
1159
|
-
wrapper: M(
|
|
1150
|
+
closeIcon: R,
|
|
1151
|
+
focusTriggerAfterClose: c,
|
|
1152
|
+
transitionName: ie(D, "zoom", e.transitionName),
|
|
1153
|
+
maskTransitionName: ie(D, "fade", e.maskTransitionName),
|
|
1154
|
+
className: M(V, o, N == null ? void 0 : N.className),
|
|
1155
|
+
style: Object.assign(Object.assign(Object.assign({}, N == null ? void 0 : N.style), m), oe),
|
|
1156
|
+
classNames: Object.assign(Object.assign(Object.assign({}, N == null ? void 0 : N.classNames), C), {
|
|
1157
|
+
wrapper: M(ee, C == null ? void 0 : C.wrapper)
|
|
1160
1158
|
}),
|
|
1161
|
-
styles: Object.assign(Object.assign({},
|
|
1162
|
-
panelRef:
|
|
1163
|
-
}),
|
|
1159
|
+
styles: Object.assign(Object.assign({}, N == null ? void 0 : N.styles), x),
|
|
1160
|
+
panelRef: Y
|
|
1161
|
+
}), p ? /* @__PURE__ */ r.createElement(Zn, {
|
|
1164
1162
|
active: !0,
|
|
1165
1163
|
title: !1,
|
|
1166
1164
|
paragraph: {
|
|
1167
1165
|
rows: 4
|
|
1168
1166
|
},
|
|
1169
1167
|
className: `${T}-body-skeleton`
|
|
1170
|
-
}) :
|
|
1168
|
+
}) : g))));
|
|
1171
1169
|
}, zt = (e) => {
|
|
1172
1170
|
const {
|
|
1173
1171
|
componentCls: n,
|
|
1174
1172
|
titleFontSize: o,
|
|
1175
1173
|
titleLineHeight: t,
|
|
1176
1174
|
modalConfirmIconSize: a,
|
|
1177
|
-
fontSize:
|
|
1175
|
+
fontSize: l,
|
|
1178
1176
|
lineHeight: s,
|
|
1179
1177
|
modalTitleHeight: d,
|
|
1180
1178
|
fontHeight: c,
|
|
1181
|
-
confirmBodyPadding:
|
|
1179
|
+
confirmBodyPadding: m
|
|
1182
1180
|
} = e, i = `${n}-confirm`;
|
|
1183
1181
|
return {
|
|
1184
1182
|
[i]: {
|
|
@@ -1190,7 +1188,7 @@ const fn = (e) => {
|
|
|
1190
1188
|
},
|
|
1191
1189
|
[`${i}-body-wrapper`]: Object.assign({}, _n()),
|
|
1192
1190
|
[`&${n} ${n}-body`]: {
|
|
1193
|
-
padding:
|
|
1191
|
+
padding: m
|
|
1194
1192
|
},
|
|
1195
1193
|
// ====================== Body ======================
|
|
1196
1194
|
[`${i}-body`]: {
|
|
@@ -1227,7 +1225,7 @@ const fn = (e) => {
|
|
|
1227
1225
|
},
|
|
1228
1226
|
[`${i}-content`]: {
|
|
1229
1227
|
color: e.colorText,
|
|
1230
|
-
fontSize:
|
|
1228
|
+
fontSize: l,
|
|
1231
1229
|
lineHeight: s
|
|
1232
1230
|
},
|
|
1233
1231
|
// ===================== Footer =====================
|
|
@@ -1255,9 +1253,9 @@ const fn = (e) => {
|
|
|
1255
1253
|
}
|
|
1256
1254
|
};
|
|
1257
1255
|
}, _t = zn(["Modal", "confirm"], (e) => {
|
|
1258
|
-
const n =
|
|
1256
|
+
const n = fn(e);
|
|
1259
1257
|
return [zt(n)];
|
|
1260
|
-
},
|
|
1258
|
+
}, mn, {
|
|
1261
1259
|
// confirm is weak than modal since no conflict here
|
|
1262
1260
|
order: -1e3
|
|
1263
1261
|
});
|
|
@@ -1268,92 +1266,92 @@ var Ht = function(e, n) {
|
|
|
1268
1266
|
n.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (o[t[a]] = e[t[a]]);
|
|
1269
1267
|
return o;
|
|
1270
1268
|
};
|
|
1271
|
-
function
|
|
1269
|
+
function Cn(e) {
|
|
1272
1270
|
const {
|
|
1273
1271
|
prefixCls: n,
|
|
1274
1272
|
icon: o,
|
|
1275
1273
|
okText: t,
|
|
1276
1274
|
cancelText: a,
|
|
1277
|
-
confirmPrefixCls:
|
|
1275
|
+
confirmPrefixCls: l,
|
|
1278
1276
|
type: s,
|
|
1279
1277
|
okCancel: d,
|
|
1280
1278
|
footer: c,
|
|
1281
1279
|
// Legacy for static function usage
|
|
1282
|
-
locale:
|
|
1280
|
+
locale: m
|
|
1283
1281
|
} = e, i = Ht(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
|
|
1284
1282
|
if (process.env.NODE_ENV !== "production") {
|
|
1285
|
-
const E =
|
|
1283
|
+
const E = he("Modal");
|
|
1286
1284
|
process.env.NODE_ENV !== "production" && E(!(typeof o == "string" && o.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${o}\` at https://ant.design/components/icon`);
|
|
1287
1285
|
}
|
|
1288
1286
|
let u = o;
|
|
1289
1287
|
if (!o && o !== null)
|
|
1290
1288
|
switch (s) {
|
|
1291
1289
|
case "info":
|
|
1292
|
-
u = /* @__PURE__ */
|
|
1290
|
+
u = /* @__PURE__ */ r.createElement(tn, null);
|
|
1293
1291
|
break;
|
|
1294
1292
|
case "success":
|
|
1295
|
-
u = /* @__PURE__ */
|
|
1293
|
+
u = /* @__PURE__ */ r.createElement(Je, null);
|
|
1296
1294
|
break;
|
|
1297
1295
|
case "error":
|
|
1298
|
-
u = /* @__PURE__ */
|
|
1296
|
+
u = /* @__PURE__ */ r.createElement(en, null);
|
|
1299
1297
|
break;
|
|
1300
1298
|
default:
|
|
1301
|
-
u = /* @__PURE__ */
|
|
1299
|
+
u = /* @__PURE__ */ r.createElement(nn, null);
|
|
1302
1300
|
}
|
|
1303
|
-
const f = d ?? s === "confirm", C = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [
|
|
1301
|
+
const f = d ?? s === "confirm", C = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [x] = Ee("Modal"), g = m || x, p = t || (f ? g == null ? void 0 : g.okText : g == null ? void 0 : g.justOkText), y = a || (g == null ? void 0 : g.cancelText), v = Object.assign({
|
|
1304
1302
|
autoFocusButton: C,
|
|
1305
1303
|
cancelTextLocale: y,
|
|
1306
1304
|
okTextLocale: p,
|
|
1307
1305
|
mergedOkCancel: f
|
|
1308
|
-
}, i),
|
|
1309
|
-
return /* @__PURE__ */
|
|
1310
|
-
className: `${
|
|
1311
|
-
}, /* @__PURE__ */
|
|
1306
|
+
}, i), h = r.useMemo(() => v, G(Object.values(v))), S = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(je, null), /* @__PURE__ */ r.createElement(Be, null)), w = e.title !== void 0 && e.title !== null, $ = `${l}-body`;
|
|
1307
|
+
return /* @__PURE__ */ r.createElement("div", {
|
|
1308
|
+
className: `${l}-body-wrapper`
|
|
1309
|
+
}, /* @__PURE__ */ r.createElement("div", {
|
|
1312
1310
|
className: M($, {
|
|
1313
|
-
[`${$}-has-title`]:
|
|
1311
|
+
[`${$}-has-title`]: w
|
|
1314
1312
|
})
|
|
1315
|
-
}, u, /* @__PURE__ */
|
|
1316
|
-
className: `${
|
|
1317
|
-
},
|
|
1318
|
-
className: `${
|
|
1319
|
-
}, e.title), /* @__PURE__ */
|
|
1320
|
-
className: `${
|
|
1321
|
-
}, e.content))), c === void 0 || typeof c == "function" ? /* @__PURE__ */
|
|
1322
|
-
value:
|
|
1323
|
-
}, /* @__PURE__ */
|
|
1324
|
-
className: `${
|
|
1313
|
+
}, u, /* @__PURE__ */ r.createElement("div", {
|
|
1314
|
+
className: `${l}-paragraph`
|
|
1315
|
+
}, w && /* @__PURE__ */ r.createElement("span", {
|
|
1316
|
+
className: `${l}-title`
|
|
1317
|
+
}, e.title), /* @__PURE__ */ r.createElement("div", {
|
|
1318
|
+
className: `${l}-content`
|
|
1319
|
+
}, e.content))), c === void 0 || typeof c == "function" ? /* @__PURE__ */ r.createElement(an, {
|
|
1320
|
+
value: h
|
|
1321
|
+
}, /* @__PURE__ */ r.createElement("div", {
|
|
1322
|
+
className: `${l}-btns`
|
|
1325
1323
|
}, typeof c == "function" ? c(S, {
|
|
1326
|
-
OkBtn:
|
|
1327
|
-
CancelBtn:
|
|
1328
|
-
}) : S)) : c, /* @__PURE__ */
|
|
1324
|
+
OkBtn: Be,
|
|
1325
|
+
CancelBtn: je
|
|
1326
|
+
}) : S)) : c, /* @__PURE__ */ r.createElement(_t, {
|
|
1329
1327
|
prefixCls: n
|
|
1330
1328
|
}));
|
|
1331
1329
|
}
|
|
1332
|
-
const
|
|
1330
|
+
const pn = (e) => {
|
|
1333
1331
|
const {
|
|
1334
1332
|
close: n,
|
|
1335
1333
|
zIndex: o,
|
|
1336
1334
|
maskStyle: t,
|
|
1337
1335
|
direction: a,
|
|
1338
|
-
prefixCls:
|
|
1336
|
+
prefixCls: l,
|
|
1339
1337
|
wrapClassName: s,
|
|
1340
1338
|
rootPrefixCls: d,
|
|
1341
1339
|
bodyStyle: c,
|
|
1342
|
-
closable:
|
|
1340
|
+
closable: m = !1,
|
|
1343
1341
|
onConfirm: i,
|
|
1344
1342
|
styles: u
|
|
1345
1343
|
} = e;
|
|
1346
1344
|
if (process.env.NODE_ENV !== "production") {
|
|
1347
|
-
const S =
|
|
1348
|
-
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((
|
|
1349
|
-
let [$, E] =
|
|
1345
|
+
const S = he("Modal");
|
|
1346
|
+
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((w) => {
|
|
1347
|
+
let [$, E] = w;
|
|
1350
1348
|
S.deprecated(!($ in e), $, E);
|
|
1351
1349
|
});
|
|
1352
1350
|
}
|
|
1353
|
-
const f = `${
|
|
1351
|
+
const f = `${l}-confirm`, C = e.width || 416, x = e.style || {}, g = e.mask === void 0 ? !0 : e.mask, p = e.maskClosable === void 0 ? !1 : e.maskClosable, y = M(f, `${f}-${e.type}`, {
|
|
1354
1352
|
[`${f}-rtl`]: a === "rtl"
|
|
1355
|
-
}, e.className), [,
|
|
1356
|
-
return /* @__PURE__ */
|
|
1353
|
+
}, e.className), [, v] = Hn(), h = r.useMemo(() => o !== void 0 ? o : v.zIndexPopupBase + Kn, [o, v]);
|
|
1354
|
+
return /* @__PURE__ */ r.createElement(vn, Object.assign({}, e, {
|
|
1357
1355
|
className: y,
|
|
1358
1356
|
wrapClassName: M({
|
|
1359
1357
|
[`${f}-centered`]: !!e.centered
|
|
@@ -1365,90 +1363,90 @@ const gn = (e) => {
|
|
|
1365
1363
|
},
|
|
1366
1364
|
title: "",
|
|
1367
1365
|
footer: null,
|
|
1368
|
-
transitionName:
|
|
1369
|
-
maskTransitionName:
|
|
1370
|
-
mask:
|
|
1366
|
+
transitionName: ie(d || "", "zoom", e.transitionName),
|
|
1367
|
+
maskTransitionName: ie(d || "", "fade", e.maskTransitionName),
|
|
1368
|
+
mask: g,
|
|
1371
1369
|
maskClosable: p,
|
|
1372
|
-
style:
|
|
1370
|
+
style: x,
|
|
1373
1371
|
styles: Object.assign({
|
|
1374
1372
|
body: c,
|
|
1375
1373
|
mask: t
|
|
1376
1374
|
}, u),
|
|
1377
1375
|
width: C,
|
|
1378
|
-
zIndex:
|
|
1379
|
-
closable:
|
|
1380
|
-
}), /* @__PURE__ */
|
|
1376
|
+
zIndex: h,
|
|
1377
|
+
closable: m
|
|
1378
|
+
}), /* @__PURE__ */ r.createElement(Cn, Object.assign({}, e, {
|
|
1381
1379
|
confirmPrefixCls: f
|
|
1382
1380
|
})));
|
|
1383
|
-
},
|
|
1381
|
+
}, we = (e) => {
|
|
1384
1382
|
const {
|
|
1385
1383
|
rootPrefixCls: n,
|
|
1386
1384
|
iconPrefixCls: o,
|
|
1387
1385
|
direction: t,
|
|
1388
1386
|
theme: a
|
|
1389
1387
|
} = e;
|
|
1390
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ r.createElement(Qe, {
|
|
1391
1389
|
prefixCls: n,
|
|
1392
1390
|
iconPrefixCls: o,
|
|
1393
1391
|
direction: t,
|
|
1394
1392
|
theme: a
|
|
1395
|
-
}, /* @__PURE__ */
|
|
1393
|
+
}, /* @__PURE__ */ r.createElement(pn, Object.assign({}, e)));
|
|
1396
1394
|
};
|
|
1397
|
-
process.env.NODE_ENV !== "production" && (
|
|
1398
|
-
const
|
|
1399
|
-
let
|
|
1400
|
-
function
|
|
1401
|
-
return
|
|
1395
|
+
process.env.NODE_ENV !== "production" && (pn.displayName = "ConfirmDialog", we.displayName = "ConfirmDialogWrapper");
|
|
1396
|
+
const Q = [];
|
|
1397
|
+
let bn = "";
|
|
1398
|
+
function yn() {
|
|
1399
|
+
return bn;
|
|
1402
1400
|
}
|
|
1403
1401
|
const Wt = (e) => {
|
|
1404
1402
|
var n, o;
|
|
1405
1403
|
const {
|
|
1406
1404
|
prefixCls: t,
|
|
1407
1405
|
getContainer: a,
|
|
1408
|
-
direction:
|
|
1409
|
-
} = e, s =
|
|
1406
|
+
direction: l
|
|
1407
|
+
} = e, s = Xe(), d = ae(ce), c = yn() || d.getPrefixCls(), m = t || `${c}-modal`;
|
|
1410
1408
|
let i = a;
|
|
1411
|
-
return i === !1 && (i = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" &&
|
|
1409
|
+
return i === !1 && (i = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && Ze(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ b.createElement(we, Object.assign({}, e, {
|
|
1412
1410
|
rootPrefixCls: c,
|
|
1413
|
-
prefixCls:
|
|
1411
|
+
prefixCls: m,
|
|
1414
1412
|
iconPrefixCls: d.iconPrefixCls,
|
|
1415
1413
|
theme: d.theme,
|
|
1416
|
-
direction:
|
|
1414
|
+
direction: l ?? d.direction,
|
|
1417
1415
|
locale: (o = (n = d.locale) === null || n === void 0 ? void 0 : n.Modal) !== null && o !== void 0 ? o : s,
|
|
1418
1416
|
getContainer: i
|
|
1419
1417
|
}));
|
|
1420
1418
|
};
|
|
1421
|
-
function
|
|
1419
|
+
function le(e) {
|
|
1422
1420
|
const n = Wn();
|
|
1423
1421
|
process.env.NODE_ENV !== "production" && !n.holderRender && Vn("Modal");
|
|
1424
1422
|
const o = document.createDocumentFragment();
|
|
1425
1423
|
let t = Object.assign(Object.assign({}, e), {
|
|
1426
1424
|
close: c,
|
|
1427
1425
|
open: !0
|
|
1428
|
-
}), a,
|
|
1426
|
+
}), a, l;
|
|
1429
1427
|
function s() {
|
|
1430
1428
|
for (var i, u = arguments.length, f = new Array(u), C = 0; C < u; C++)
|
|
1431
1429
|
f[C] = arguments[C];
|
|
1432
1430
|
if (f.some((p) => p == null ? void 0 : p.triggerCancel)) {
|
|
1433
|
-
var
|
|
1434
|
-
(i = e.onCancel) === null || i === void 0 || (
|
|
1431
|
+
var g;
|
|
1432
|
+
(i = e.onCancel) === null || i === void 0 || (g = i).call.apply(g, [e, () => {
|
|
1435
1433
|
}].concat(G(f.slice(1))));
|
|
1436
1434
|
}
|
|
1437
|
-
for (let p = 0; p <
|
|
1438
|
-
if (
|
|
1439
|
-
|
|
1435
|
+
for (let p = 0; p < Q.length; p++)
|
|
1436
|
+
if (Q[p] === c) {
|
|
1437
|
+
Q.splice(p, 1);
|
|
1440
1438
|
break;
|
|
1441
1439
|
}
|
|
1442
|
-
|
|
1440
|
+
l();
|
|
1443
1441
|
}
|
|
1444
1442
|
function d(i) {
|
|
1445
1443
|
clearTimeout(a), a = setTimeout(() => {
|
|
1446
|
-
const u = n.getPrefixCls(void 0,
|
|
1447
|
-
|
|
1444
|
+
const u = n.getPrefixCls(void 0, yn()), f = n.getIconPrefixCls(), C = n.getTheme(), x = /* @__PURE__ */ b.createElement(Wt, Object.assign({}, i));
|
|
1445
|
+
l = kn()(/* @__PURE__ */ b.createElement(Qe, {
|
|
1448
1446
|
prefixCls: u,
|
|
1449
1447
|
iconPrefixCls: f,
|
|
1450
1448
|
theme: C
|
|
1451
|
-
}, n.holderRender ? n.holderRender(
|
|
1449
|
+
}, n.holderRender ? n.holderRender(x) : x), o);
|
|
1452
1450
|
});
|
|
1453
1451
|
}
|
|
1454
1452
|
function c() {
|
|
@@ -1461,35 +1459,35 @@ function ae(e) {
|
|
|
1461
1459
|
}
|
|
1462
1460
|
}), t.visible && delete t.visible, d(t);
|
|
1463
1461
|
}
|
|
1464
|
-
function
|
|
1462
|
+
function m(i) {
|
|
1465
1463
|
typeof i == "function" ? t = i(t) : t = Object.assign(Object.assign({}, t), i), d(t);
|
|
1466
1464
|
}
|
|
1467
|
-
return d(t),
|
|
1465
|
+
return d(t), Q.push(c), {
|
|
1468
1466
|
destroy: c,
|
|
1469
|
-
update:
|
|
1467
|
+
update: m
|
|
1470
1468
|
};
|
|
1471
1469
|
}
|
|
1472
|
-
function
|
|
1470
|
+
function hn(e) {
|
|
1473
1471
|
return Object.assign(Object.assign({}, e), {
|
|
1474
1472
|
type: "warning"
|
|
1475
1473
|
});
|
|
1476
1474
|
}
|
|
1477
|
-
function
|
|
1475
|
+
function xn(e) {
|
|
1478
1476
|
return Object.assign(Object.assign({}, e), {
|
|
1479
1477
|
type: "info"
|
|
1480
1478
|
});
|
|
1481
1479
|
}
|
|
1482
|
-
function
|
|
1480
|
+
function $n(e) {
|
|
1483
1481
|
return Object.assign(Object.assign({}, e), {
|
|
1484
1482
|
type: "success"
|
|
1485
1483
|
});
|
|
1486
1484
|
}
|
|
1487
|
-
function
|
|
1485
|
+
function En(e) {
|
|
1488
1486
|
return Object.assign(Object.assign({}, e), {
|
|
1489
1487
|
type: "error"
|
|
1490
1488
|
});
|
|
1491
1489
|
}
|
|
1492
|
-
function
|
|
1490
|
+
function Sn(e) {
|
|
1493
1491
|
return Object.assign(Object.assign({}, e), {
|
|
1494
1492
|
type: "confirm"
|
|
1495
1493
|
});
|
|
@@ -1498,7 +1496,7 @@ function Vt(e) {
|
|
|
1498
1496
|
let {
|
|
1499
1497
|
rootPrefixCls: n
|
|
1500
1498
|
} = e;
|
|
1501
|
-
process.env.NODE_ENV !== "production" &&
|
|
1499
|
+
process.env.NODE_ENV !== "production" && Ze(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), bn = n;
|
|
1502
1500
|
}
|
|
1503
1501
|
var At = function(e, n) {
|
|
1504
1502
|
var o = {};
|
|
@@ -1511,70 +1509,70 @@ const Gt = (e, n) => {
|
|
|
1511
1509
|
var o, {
|
|
1512
1510
|
afterClose: t,
|
|
1513
1511
|
config: a
|
|
1514
|
-
} = e,
|
|
1515
|
-
const [s, d] =
|
|
1512
|
+
} = e, l = At(e, ["afterClose", "config"]);
|
|
1513
|
+
const [s, d] = r.useState(!0), [c, m] = r.useState(a), {
|
|
1516
1514
|
direction: i,
|
|
1517
1515
|
getPrefixCls: u
|
|
1518
|
-
} =
|
|
1519
|
-
var
|
|
1520
|
-
t(), (
|
|
1521
|
-
},
|
|
1522
|
-
var
|
|
1516
|
+
} = r.useContext(ce), f = u("modal"), C = u(), x = () => {
|
|
1517
|
+
var v;
|
|
1518
|
+
t(), (v = c.afterClose) === null || v === void 0 || v.call(c);
|
|
1519
|
+
}, g = function() {
|
|
1520
|
+
var v;
|
|
1523
1521
|
d(!1);
|
|
1524
|
-
for (var
|
|
1525
|
-
S[
|
|
1526
|
-
if (S.some((
|
|
1522
|
+
for (var h = arguments.length, S = new Array(h), w = 0; w < h; w++)
|
|
1523
|
+
S[w] = arguments[w];
|
|
1524
|
+
if (S.some((z) => z == null ? void 0 : z.triggerCancel)) {
|
|
1527
1525
|
var E;
|
|
1528
|
-
(
|
|
1526
|
+
(v = c.onCancel) === null || v === void 0 || (E = v).call.apply(E, [c, () => {
|
|
1529
1527
|
}].concat(G(S.slice(1))));
|
|
1530
1528
|
}
|
|
1531
1529
|
};
|
|
1532
|
-
|
|
1533
|
-
destroy:
|
|
1534
|
-
update: (
|
|
1535
|
-
|
|
1530
|
+
r.useImperativeHandle(n, () => ({
|
|
1531
|
+
destroy: g,
|
|
1532
|
+
update: (v) => {
|
|
1533
|
+
m((h) => Object.assign(Object.assign({}, h), v));
|
|
1536
1534
|
}
|
|
1537
1535
|
}));
|
|
1538
|
-
const p = (o = c.okCancel) !== null && o !== void 0 ? o : c.type === "confirm", [y] =
|
|
1539
|
-
return /* @__PURE__ */
|
|
1536
|
+
const p = (o = c.okCancel) !== null && o !== void 0 ? o : c.type === "confirm", [y] = Ee("Modal", ve.Modal);
|
|
1537
|
+
return /* @__PURE__ */ r.createElement(we, Object.assign({
|
|
1540
1538
|
prefixCls: f,
|
|
1541
1539
|
rootPrefixCls: C
|
|
1542
1540
|
}, c, {
|
|
1543
|
-
close:
|
|
1541
|
+
close: g,
|
|
1544
1542
|
open: s,
|
|
1545
|
-
afterClose:
|
|
1543
|
+
afterClose: x,
|
|
1546
1544
|
okText: c.okText || (p ? y == null ? void 0 : y.okText : y == null ? void 0 : y.justOkText),
|
|
1547
1545
|
direction: c.direction || i,
|
|
1548
1546
|
cancelText: c.cancelText || (y == null ? void 0 : y.cancelText)
|
|
1549
|
-
},
|
|
1550
|
-
}, qt = /* @__PURE__ */
|
|
1551
|
-
let
|
|
1552
|
-
const Ut = /* @__PURE__ */
|
|
1547
|
+
}, l));
|
|
1548
|
+
}, qt = /* @__PURE__ */ r.forwardRef(Gt);
|
|
1549
|
+
let Ge = 0;
|
|
1550
|
+
const Ut = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, n) => {
|
|
1553
1551
|
const [o, t] = ut();
|
|
1554
|
-
return
|
|
1552
|
+
return r.useImperativeHandle(n, () => ({
|
|
1555
1553
|
patchElement: t
|
|
1556
|
-
}), []), /* @__PURE__ */
|
|
1554
|
+
}), []), /* @__PURE__ */ r.createElement(r.Fragment, null, o);
|
|
1557
1555
|
}));
|
|
1558
1556
|
function Xt() {
|
|
1559
|
-
const e =
|
|
1560
|
-
|
|
1557
|
+
const e = r.useRef(null), [n, o] = r.useState([]);
|
|
1558
|
+
r.useEffect(() => {
|
|
1561
1559
|
n.length && (G(n).forEach((s) => {
|
|
1562
1560
|
s();
|
|
1563
1561
|
}), o([]));
|
|
1564
1562
|
}, [n]);
|
|
1565
|
-
const t =
|
|
1563
|
+
const t = r.useCallback((l) => function(d) {
|
|
1566
1564
|
var c;
|
|
1567
|
-
|
|
1568
|
-
const
|
|
1565
|
+
Ge += 1;
|
|
1566
|
+
const m = /* @__PURE__ */ r.createRef();
|
|
1569
1567
|
let i;
|
|
1570
1568
|
const u = new Promise((p) => {
|
|
1571
1569
|
i = p;
|
|
1572
1570
|
});
|
|
1573
1571
|
let f = !1, C;
|
|
1574
|
-
const
|
|
1575
|
-
key: `modal-${
|
|
1576
|
-
config:
|
|
1577
|
-
ref:
|
|
1572
|
+
const x = /* @__PURE__ */ r.createElement(qt, {
|
|
1573
|
+
key: `modal-${Ge}`,
|
|
1574
|
+
config: l(d),
|
|
1575
|
+
ref: m,
|
|
1578
1576
|
afterClose: () => {
|
|
1579
1577
|
C == null || C();
|
|
1580
1578
|
},
|
|
@@ -1583,31 +1581,31 @@ function Xt() {
|
|
|
1583
1581
|
i(p);
|
|
1584
1582
|
}
|
|
1585
1583
|
});
|
|
1586
|
-
return C = (c = e.current) === null || c === void 0 ? void 0 : c.patchElement(
|
|
1584
|
+
return C = (c = e.current) === null || c === void 0 ? void 0 : c.patchElement(x), C && Q.push(C), {
|
|
1587
1585
|
destroy: () => {
|
|
1588
1586
|
function p() {
|
|
1589
1587
|
var y;
|
|
1590
|
-
(y =
|
|
1588
|
+
(y = m.current) === null || y === void 0 || y.destroy();
|
|
1591
1589
|
}
|
|
1592
|
-
|
|
1590
|
+
m.current ? p() : o((y) => [].concat(G(y), [p]));
|
|
1593
1591
|
},
|
|
1594
1592
|
update: (p) => {
|
|
1595
1593
|
function y() {
|
|
1596
|
-
var
|
|
1597
|
-
(
|
|
1594
|
+
var v;
|
|
1595
|
+
(v = m.current) === null || v === void 0 || v.update(p);
|
|
1598
1596
|
}
|
|
1599
|
-
|
|
1597
|
+
m.current ? y() : o((v) => [].concat(G(v), [y]));
|
|
1600
1598
|
},
|
|
1601
1599
|
then: (p) => (f = !0, u.then(p))
|
|
1602
1600
|
};
|
|
1603
1601
|
}, []);
|
|
1604
|
-
return [
|
|
1605
|
-
info: t(
|
|
1606
|
-
success: t(
|
|
1607
|
-
error: t(
|
|
1608
|
-
warning: t(
|
|
1609
|
-
confirm: t(
|
|
1610
|
-
}), []), /* @__PURE__ */
|
|
1602
|
+
return [r.useMemo(() => ({
|
|
1603
|
+
info: t(xn),
|
|
1604
|
+
success: t($n),
|
|
1605
|
+
error: t(En),
|
|
1606
|
+
warning: t(hn),
|
|
1607
|
+
confirm: t(Sn)
|
|
1608
|
+
}), []), /* @__PURE__ */ r.createElement(Ut, {
|
|
1611
1609
|
key: "modal-holder",
|
|
1612
1610
|
ref: e
|
|
1613
1611
|
})];
|
|
@@ -1625,59 +1623,59 @@ const kt = (e) => {
|
|
|
1625
1623
|
className: o,
|
|
1626
1624
|
closeIcon: t,
|
|
1627
1625
|
closable: a,
|
|
1628
|
-
type:
|
|
1626
|
+
type: l,
|
|
1629
1627
|
title: s,
|
|
1630
1628
|
children: d,
|
|
1631
1629
|
footer: c
|
|
1632
|
-
} = e,
|
|
1630
|
+
} = e, m = Kt(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
|
|
1633
1631
|
getPrefixCls: i
|
|
1634
|
-
} =
|
|
1635
|
-
let
|
|
1636
|
-
return
|
|
1632
|
+
} = r.useContext(ce), u = i(), f = n || i("modal"), C = ke(u), [x, g, p] = gn(f, C), y = `${f}-confirm`;
|
|
1633
|
+
let v = {};
|
|
1634
|
+
return l ? v = {
|
|
1637
1635
|
closable: a ?? !1,
|
|
1638
1636
|
title: "",
|
|
1639
1637
|
footer: "",
|
|
1640
|
-
children: /* @__PURE__ */
|
|
1638
|
+
children: /* @__PURE__ */ r.createElement(Cn, Object.assign({}, e, {
|
|
1641
1639
|
prefixCls: f,
|
|
1642
1640
|
confirmPrefixCls: y,
|
|
1643
1641
|
rootPrefixCls: u,
|
|
1644
1642
|
content: d
|
|
1645
1643
|
}))
|
|
1646
|
-
} :
|
|
1644
|
+
} : v = {
|
|
1647
1645
|
closable: a ?? !0,
|
|
1648
1646
|
title: s,
|
|
1649
|
-
footer: c !== null && /* @__PURE__ */
|
|
1647
|
+
footer: c !== null && /* @__PURE__ */ r.createElement(dn, Object.assign({}, e)),
|
|
1650
1648
|
children: d
|
|
1651
|
-
},
|
|
1649
|
+
}, x(/* @__PURE__ */ r.createElement(Oe, Object.assign({
|
|
1652
1650
|
prefixCls: f,
|
|
1653
|
-
className: M(
|
|
1654
|
-
},
|
|
1655
|
-
closeIcon:
|
|
1651
|
+
className: M(g, `${f}-pure-panel`, l && y, l && `${y}-${l}`, o, p, C)
|
|
1652
|
+
}, m, {
|
|
1653
|
+
closeIcon: cn(f, t),
|
|
1656
1654
|
closable: a
|
|
1657
|
-
},
|
|
1655
|
+
}, v)));
|
|
1658
1656
|
}, Qt = Qn(kt);
|
|
1659
|
-
function
|
|
1660
|
-
return
|
|
1657
|
+
function On(e) {
|
|
1658
|
+
return le(hn(e));
|
|
1661
1659
|
}
|
|
1662
|
-
const L =
|
|
1660
|
+
const L = vn;
|
|
1663
1661
|
L.useModal = Xt;
|
|
1664
1662
|
L.info = function(n) {
|
|
1665
|
-
return
|
|
1663
|
+
return le(xn(n));
|
|
1666
1664
|
};
|
|
1667
1665
|
L.success = function(n) {
|
|
1668
|
-
return
|
|
1666
|
+
return le($n(n));
|
|
1669
1667
|
};
|
|
1670
1668
|
L.error = function(n) {
|
|
1671
|
-
return
|
|
1669
|
+
return le(En(n));
|
|
1672
1670
|
};
|
|
1673
|
-
L.warning =
|
|
1674
|
-
L.warn =
|
|
1671
|
+
L.warning = On;
|
|
1672
|
+
L.warn = On;
|
|
1675
1673
|
L.confirm = function(n) {
|
|
1676
|
-
return
|
|
1674
|
+
return le(Sn(n));
|
|
1677
1675
|
};
|
|
1678
1676
|
L.destroyAll = function() {
|
|
1679
|
-
for (;
|
|
1680
|
-
const n =
|
|
1677
|
+
for (; Q.length; ) {
|
|
1678
|
+
const n = Q.pop();
|
|
1681
1679
|
n && n();
|
|
1682
1680
|
}
|
|
1683
1681
|
};
|