@notificationapi/react 0.0.9 → 0.0.10
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/BellOutlined.js +18 -15
- package/dist/assets/Inbox.js +2376 -2270
- package/dist/assets/Notification.js +1960 -1340
- package/dist/assets/Preferences.js +564 -533
- package/dist/assets/PurePanel.js +24 -23
- package/dist/assets/button.js +275 -265
- package/dist/assets/colors.js +19298 -7652
- package/dist/assets/index.js +48 -47
- package/dist/assets/index2.js +94 -92
- package/dist/assets/index3.js +2990 -2647
- package/dist/components/Notifications/Inbox.d.ts +0 -1
- package/dist/components/Notifications/InboxHeader.d.ts +2 -3
- package/dist/components/Notifications/InboxHeader.js +14 -13
- package/dist/components/Notifications/Notification.d.ts +2 -3
- package/dist/components/Notifications/NotificationCounter.d.ts +1 -1
- package/dist/components/Notifications/NotificationFeed.d.ts +0 -1
- package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
- package/dist/components/Notifications/NotificationPopup.d.ts +0 -1
- package/dist/components/Notifications/UnreadBadge.d.ts +1 -1
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +2 -3
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +2 -3
- package/dist/components/Preferences/NotificationPreferencesPopup.js +682 -646
- package/dist/components/Preferences/PreferenceGroup.d.ts +1 -2
- package/dist/components/Preferences/Preferences.d.ts +1 -2
- package/dist/components/Provider/index.d.ts +2 -2
- package/dist/components/Provider/index.js +80 -80
- package/package.json +1 -1
|
@@ -1,596 +1,607 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { P as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { jsx as ye } from "react/jsx-runtime";
|
|
2
|
+
import { P as yn } from "../../assets/Preferences.js";
|
|
3
|
+
import { _ as D, q as U, s as hn, t as xn, c as w, d as I, v as En, w as ce, f as De, x as he, y as xe, z as $n, A as On, B as _e, E as Nn, K as He, g as Sn, u as S, r as wn, n as Pn, m as In, a as oe, j as de, o as Tn, F as Rn, C as Le, h as Mn, G as jn, H as Bn, I as Ae, J as zn } from "../../assets/colors.js";
|
|
4
4
|
import * as l from "react";
|
|
5
|
-
import v, { useContext as
|
|
6
|
-
import { I as
|
|
7
|
-
import { B as
|
|
8
|
-
import { R as
|
|
9
|
-
import { p as
|
|
10
|
-
var
|
|
11
|
-
return /* @__PURE__ */ l.createElement(
|
|
12
|
-
ref:
|
|
13
|
-
icon:
|
|
5
|
+
import v, { useContext as Y, useRef as V, useMemo as Fn, useEffect as Ee } from "react";
|
|
6
|
+
import { I as ue, k as Dn, K as $e, l as _n, m as fe, n as Hn, i as Ln, p as Ve, q as An, N as Vn, r as Wn, z as qn, d as te, s as Gn, C as Un, t as Xn, v as Kn } from "../../assets/index3.js";
|
|
7
|
+
import { B as me, c as We } from "../../assets/button.js";
|
|
8
|
+
import { R as ge, w as Qn } from "../../assets/PurePanel.js";
|
|
9
|
+
import { p as Ce } from "../../assets/BellOutlined.js";
|
|
10
|
+
var Zn = { 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" }, Yn = function(n, t) {
|
|
11
|
+
return /* @__PURE__ */ l.createElement(ue, D({}, n, {
|
|
12
|
+
ref: t,
|
|
13
|
+
icon: Zn
|
|
14
14
|
}));
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
}, qe = /* @__PURE__ */ l.forwardRef(Yn);
|
|
16
|
+
process.env.NODE_ENV !== "production" && (qe.displayName = "CheckCircleFilled");
|
|
17
|
+
var Jn = { 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" }, kn = function(n, t) {
|
|
18
|
+
return /* @__PURE__ */ l.createElement(ue, D({}, n, {
|
|
19
|
+
ref: t,
|
|
20
|
+
icon: Jn
|
|
19
21
|
}));
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
}, Ge = /* @__PURE__ */ l.forwardRef(kn);
|
|
23
|
+
process.env.NODE_ENV !== "production" && (Ge.displayName = "ExclamationCircleFilled");
|
|
24
|
+
var et = { 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" }, nt = function(n, t) {
|
|
25
|
+
return /* @__PURE__ */ l.createElement(ue, D({}, n, {
|
|
26
|
+
ref: t,
|
|
27
|
+
icon: et
|
|
24
28
|
}));
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
}, Ue = /* @__PURE__ */ l.forwardRef(nt);
|
|
30
|
+
process.env.NODE_ENV !== "production" && (Ue.displayName = "InfoCircleFilled");
|
|
31
|
+
function tt() {
|
|
32
|
+
const [e, n] = l.useState([]), t = l.useCallback((o) => (n((a) => [].concat(U(a), [o])), () => {
|
|
33
|
+
n((a) => a.filter((r) => r !== o));
|
|
29
34
|
}), []);
|
|
30
|
-
return [e,
|
|
35
|
+
return [e, t];
|
|
31
36
|
}
|
|
32
37
|
function ie(e) {
|
|
33
38
|
return !!(e && e.then);
|
|
34
39
|
}
|
|
35
|
-
const
|
|
40
|
+
const Xe = (e) => {
|
|
36
41
|
const {
|
|
37
|
-
type:
|
|
38
|
-
children:
|
|
39
|
-
prefixCls:
|
|
42
|
+
type: n,
|
|
43
|
+
children: t,
|
|
44
|
+
prefixCls: o,
|
|
40
45
|
buttonProps: a,
|
|
41
46
|
close: r,
|
|
42
47
|
autoFocus: u,
|
|
43
48
|
emitEvent: d,
|
|
44
|
-
isSilent:
|
|
45
|
-
quitOnNullishReturnValue:
|
|
49
|
+
isSilent: s,
|
|
50
|
+
quitOnNullishReturnValue: c,
|
|
46
51
|
actionFn: i
|
|
47
|
-
} = e, f = l.useRef(!1), b = l.useRef(null), [g, x] =
|
|
52
|
+
} = e, f = l.useRef(!1), b = l.useRef(null), [g, x] = hn(!1), C = function() {
|
|
48
53
|
r == null || r.apply(void 0, arguments);
|
|
49
54
|
};
|
|
50
55
|
l.useEffect(() => {
|
|
51
56
|
let m = null;
|
|
52
57
|
return u && (m = setTimeout(() => {
|
|
53
|
-
var
|
|
54
|
-
(
|
|
58
|
+
var y;
|
|
59
|
+
(y = b.current) === null || y === void 0 || y.focus();
|
|
55
60
|
})), () => {
|
|
56
61
|
m && clearTimeout(m);
|
|
57
62
|
};
|
|
58
63
|
}, []);
|
|
59
|
-
const
|
|
64
|
+
const E = (m) => {
|
|
60
65
|
ie(m) && (x(!0), m.then(function() {
|
|
61
66
|
x(!1, !0), C.apply(void 0, arguments), f.current = !1;
|
|
62
|
-
}, (
|
|
63
|
-
if (x(!1, !0), f.current = !1, !(
|
|
64
|
-
return Promise.reject(
|
|
67
|
+
}, (y) => {
|
|
68
|
+
if (x(!1, !0), f.current = !1, !(s != null && s()))
|
|
69
|
+
return Promise.reject(y);
|
|
65
70
|
}));
|
|
66
|
-
},
|
|
71
|
+
}, p = (m) => {
|
|
67
72
|
if (f.current)
|
|
68
73
|
return;
|
|
69
74
|
if (f.current = !0, !i) {
|
|
70
75
|
C();
|
|
71
76
|
return;
|
|
72
77
|
}
|
|
73
|
-
let
|
|
78
|
+
let y;
|
|
74
79
|
if (d) {
|
|
75
|
-
if (
|
|
80
|
+
if (y = i(m), c && !ie(y)) {
|
|
76
81
|
f.current = !1, C(m);
|
|
77
82
|
return;
|
|
78
83
|
}
|
|
79
84
|
} else if (i.length)
|
|
80
|
-
|
|
81
|
-
else if (
|
|
85
|
+
y = i(r), f.current = !1;
|
|
86
|
+
else if (y = i(), !ie(y)) {
|
|
82
87
|
C();
|
|
83
88
|
return;
|
|
84
89
|
}
|
|
85
|
-
|
|
90
|
+
E(y);
|
|
86
91
|
};
|
|
87
|
-
return /* @__PURE__ */ l.createElement(
|
|
88
|
-
onClick:
|
|
92
|
+
return /* @__PURE__ */ l.createElement(me, Object.assign({}, We(n), {
|
|
93
|
+
onClick: p,
|
|
89
94
|
loading: g,
|
|
90
|
-
prefixCls:
|
|
95
|
+
prefixCls: o
|
|
91
96
|
}, a, {
|
|
92
97
|
ref: b
|
|
93
|
-
}),
|
|
94
|
-
},
|
|
95
|
-
Provider:
|
|
96
|
-
} =
|
|
98
|
+
}), t);
|
|
99
|
+
}, J = /* @__PURE__ */ v.createContext({}), {
|
|
100
|
+
Provider: Ke
|
|
101
|
+
} = J, Oe = () => {
|
|
97
102
|
const {
|
|
98
103
|
autoFocusButton: e,
|
|
99
|
-
cancelButtonProps:
|
|
100
|
-
cancelTextLocale:
|
|
101
|
-
isSilent:
|
|
104
|
+
cancelButtonProps: n,
|
|
105
|
+
cancelTextLocale: t,
|
|
106
|
+
isSilent: o,
|
|
102
107
|
mergedOkCancel: a,
|
|
103
108
|
rootPrefixCls: r,
|
|
104
109
|
close: u,
|
|
105
110
|
onCancel: d,
|
|
106
|
-
onConfirm:
|
|
107
|
-
} =
|
|
108
|
-
return a ? /* @__PURE__ */ v.createElement(
|
|
109
|
-
isSilent:
|
|
111
|
+
onConfirm: s
|
|
112
|
+
} = Y(J);
|
|
113
|
+
return a ? /* @__PURE__ */ v.createElement(Xe, {
|
|
114
|
+
isSilent: o,
|
|
110
115
|
actionFn: d,
|
|
111
116
|
close: function() {
|
|
112
|
-
u == null || u.apply(void 0, arguments),
|
|
117
|
+
u == null || u.apply(void 0, arguments), s == null || s(!1);
|
|
113
118
|
},
|
|
114
119
|
autoFocus: e === "cancel",
|
|
115
|
-
buttonProps:
|
|
120
|
+
buttonProps: n,
|
|
116
121
|
prefixCls: `${r}-btn`
|
|
117
|
-
},
|
|
118
|
-
},
|
|
122
|
+
}, t) : null;
|
|
123
|
+
}, Ne = () => {
|
|
119
124
|
const {
|
|
120
125
|
autoFocusButton: e,
|
|
121
|
-
close:
|
|
122
|
-
isSilent:
|
|
123
|
-
okButtonProps:
|
|
126
|
+
close: n,
|
|
127
|
+
isSilent: t,
|
|
128
|
+
okButtonProps: o,
|
|
124
129
|
rootPrefixCls: a,
|
|
125
130
|
okTextLocale: r,
|
|
126
131
|
okType: u,
|
|
127
132
|
onConfirm: d,
|
|
128
|
-
onOk:
|
|
129
|
-
} =
|
|
130
|
-
return /* @__PURE__ */ v.createElement(
|
|
131
|
-
isSilent:
|
|
133
|
+
onOk: s
|
|
134
|
+
} = Y(J);
|
|
135
|
+
return /* @__PURE__ */ v.createElement(Xe, {
|
|
136
|
+
isSilent: t,
|
|
132
137
|
type: u || "primary",
|
|
133
|
-
actionFn:
|
|
138
|
+
actionFn: s,
|
|
134
139
|
close: function() {
|
|
135
|
-
|
|
140
|
+
n == null || n.apply(void 0, arguments), d == null || d(!0);
|
|
136
141
|
},
|
|
137
142
|
autoFocus: e === "ok",
|
|
138
|
-
buttonProps:
|
|
143
|
+
buttonProps: o,
|
|
139
144
|
prefixCls: `${a}-btn`
|
|
140
145
|
}, r);
|
|
141
146
|
};
|
|
142
|
-
var
|
|
143
|
-
function
|
|
144
|
-
var
|
|
145
|
-
return !
|
|
147
|
+
var Qe = /* @__PURE__ */ l.createContext({});
|
|
148
|
+
function Se(e, n, t) {
|
|
149
|
+
var o = n;
|
|
150
|
+
return !o && t && (o = "".concat(e, "-").concat(t)), o;
|
|
146
151
|
}
|
|
147
|
-
function
|
|
148
|
-
var
|
|
149
|
-
if (typeof
|
|
152
|
+
function we(e, n) {
|
|
153
|
+
var t = e["page".concat(n ? "Y" : "X", "Offset")], o = "scroll".concat(n ? "Top" : "Left");
|
|
154
|
+
if (typeof t != "number") {
|
|
150
155
|
var a = e.document;
|
|
151
|
-
|
|
156
|
+
t = a.documentElement[o], typeof t != "number" && (t = a.body[o]);
|
|
152
157
|
}
|
|
153
|
-
return
|
|
158
|
+
return t;
|
|
154
159
|
}
|
|
155
|
-
function
|
|
156
|
-
var
|
|
157
|
-
left:
|
|
158
|
-
top:
|
|
159
|
-
},
|
|
160
|
-
return
|
|
160
|
+
function ot(e) {
|
|
161
|
+
var n = e.getBoundingClientRect(), t = {
|
|
162
|
+
left: n.left,
|
|
163
|
+
top: n.top
|
|
164
|
+
}, o = e.ownerDocument, a = o.defaultView || o.parentWindow;
|
|
165
|
+
return t.left += we(a), t.top += we(a, !0), t;
|
|
161
166
|
}
|
|
162
|
-
const
|
|
163
|
-
var
|
|
164
|
-
return
|
|
165
|
-
}, function(e,
|
|
166
|
-
var
|
|
167
|
-
return !
|
|
167
|
+
const at = /* @__PURE__ */ l.memo(function(e) {
|
|
168
|
+
var n = e.children;
|
|
169
|
+
return n;
|
|
170
|
+
}, function(e, n) {
|
|
171
|
+
var t = n.shouldUpdate;
|
|
172
|
+
return !t;
|
|
168
173
|
});
|
|
169
|
-
var
|
|
174
|
+
var Pe = {
|
|
170
175
|
width: 0,
|
|
171
176
|
height: 0,
|
|
172
177
|
overflow: "hidden",
|
|
173
178
|
outline: "none"
|
|
174
|
-
},
|
|
179
|
+
}, rt = {
|
|
175
180
|
outline: "none"
|
|
176
|
-
},
|
|
177
|
-
var
|
|
178
|
-
v.useImperativeHandle(
|
|
181
|
+
}, ve = /* @__PURE__ */ v.forwardRef(function(e, n) {
|
|
182
|
+
var t = e.prefixCls, o = e.className, a = e.style, r = e.title, u = e.ariaId, d = e.footer, s = e.closable, c = e.closeIcon, i = e.onClose, f = e.children, b = e.bodyStyle, g = e.bodyProps, x = e.modalRender, C = e.onMouseDown, E = e.onMouseUp, p = e.holderRef, m = e.visible, y = e.forceRender, h = e.width, P = e.height, O = e.classNames, $ = e.styles, H = v.useContext(Qe), W = H.panel, q = xn(p, W), _ = V(), L = V(), j = V();
|
|
183
|
+
v.useImperativeHandle(n, function() {
|
|
179
184
|
return {
|
|
180
185
|
focus: function() {
|
|
181
|
-
var
|
|
182
|
-
(
|
|
186
|
+
var F;
|
|
187
|
+
(F = j.current) === null || F === void 0 || F.focus();
|
|
183
188
|
},
|
|
184
|
-
changeActive: function(
|
|
185
|
-
var
|
|
186
|
-
|
|
189
|
+
changeActive: function(F) {
|
|
190
|
+
var Z = document, ee = Z.activeElement;
|
|
191
|
+
F && ee === L.current ? _.current.focus() : !F && ee === _.current && L.current.focus();
|
|
187
192
|
}
|
|
188
193
|
};
|
|
189
194
|
});
|
|
190
195
|
var T = {};
|
|
191
|
-
h !== void 0 && (T.width = h),
|
|
192
|
-
var
|
|
193
|
-
d && (
|
|
194
|
-
className: w("".concat(
|
|
195
|
-
style: I({},
|
|
196
|
+
h !== void 0 && (T.width = h), P !== void 0 && (T.height = P);
|
|
197
|
+
var z;
|
|
198
|
+
d && (z = /* @__PURE__ */ v.createElement("div", {
|
|
199
|
+
className: w("".concat(t, "-footer"), O == null ? void 0 : O.footer),
|
|
200
|
+
style: I({}, $ == null ? void 0 : $.footer)
|
|
196
201
|
}, d));
|
|
197
202
|
var A;
|
|
198
203
|
r && (A = /* @__PURE__ */ v.createElement("div", {
|
|
199
|
-
className: w("".concat(
|
|
200
|
-
style: I({},
|
|
204
|
+
className: w("".concat(t, "-header"), O == null ? void 0 : O.header),
|
|
205
|
+
style: I({}, $ == null ? void 0 : $.header)
|
|
201
206
|
}, /* @__PURE__ */ v.createElement("div", {
|
|
202
|
-
className: "".concat(
|
|
207
|
+
className: "".concat(t, "-title"),
|
|
203
208
|
id: u
|
|
204
209
|
}, r)));
|
|
205
|
-
var
|
|
206
|
-
return
|
|
207
|
-
closeIcon:
|
|
208
|
-
className: "".concat(
|
|
210
|
+
var G = Fn(function() {
|
|
211
|
+
return En(s) === "object" && s !== null ? s : s ? {
|
|
212
|
+
closeIcon: c ?? /* @__PURE__ */ v.createElement("span", {
|
|
213
|
+
className: "".concat(t, "-close-x")
|
|
209
214
|
})
|
|
210
215
|
} : {};
|
|
211
|
-
}, [
|
|
212
|
-
|
|
216
|
+
}, [s, c]), Q = Ce(G, !0), X;
|
|
217
|
+
s && (X = /* @__PURE__ */ v.createElement("button", D({
|
|
213
218
|
type: "button",
|
|
214
219
|
onClick: i,
|
|
215
220
|
"aria-label": "Close"
|
|
216
221
|
}, Q, {
|
|
217
|
-
className: "".concat(
|
|
218
|
-
}),
|
|
222
|
+
className: "".concat(t, "-close")
|
|
223
|
+
}), G.closeIcon));
|
|
219
224
|
var R = /* @__PURE__ */ v.createElement("div", {
|
|
220
|
-
className: w("".concat(
|
|
221
|
-
style:
|
|
222
|
-
}, X, A, /* @__PURE__ */ v.createElement("div",
|
|
223
|
-
className: w("".concat(
|
|
224
|
-
style: I(I({}, b),
|
|
225
|
-
}, g), f),
|
|
225
|
+
className: w("".concat(t, "-content"), O == null ? void 0 : O.content),
|
|
226
|
+
style: $ == null ? void 0 : $.content
|
|
227
|
+
}, X, A, /* @__PURE__ */ v.createElement("div", D({
|
|
228
|
+
className: w("".concat(t, "-body"), O == null ? void 0 : O.body),
|
|
229
|
+
style: I(I({}, b), $ == null ? void 0 : $.body)
|
|
230
|
+
}, g), f), z);
|
|
226
231
|
return /* @__PURE__ */ v.createElement("div", {
|
|
227
232
|
key: "dialog-element",
|
|
228
233
|
role: "dialog",
|
|
229
234
|
"aria-labelledby": r ? u : null,
|
|
230
235
|
"aria-modal": "true",
|
|
231
|
-
ref:
|
|
236
|
+
ref: q,
|
|
232
237
|
style: I(I({}, a), T),
|
|
233
|
-
className: w(
|
|
238
|
+
className: w(t, o),
|
|
234
239
|
onMouseDown: C,
|
|
235
|
-
onMouseUp:
|
|
240
|
+
onMouseUp: E
|
|
236
241
|
}, /* @__PURE__ */ v.createElement("div", {
|
|
237
242
|
tabIndex: 0,
|
|
238
|
-
ref:
|
|
239
|
-
style:
|
|
243
|
+
ref: _,
|
|
244
|
+
style: Pe,
|
|
240
245
|
"aria-hidden": "true"
|
|
241
246
|
}), /* @__PURE__ */ v.createElement("div", {
|
|
242
|
-
ref:
|
|
247
|
+
ref: j,
|
|
243
248
|
tabIndex: -1,
|
|
244
|
-
style:
|
|
245
|
-
}, /* @__PURE__ */ v.createElement(
|
|
246
|
-
shouldUpdate: m ||
|
|
249
|
+
style: rt
|
|
250
|
+
}, /* @__PURE__ */ v.createElement(at, {
|
|
251
|
+
shouldUpdate: m || y
|
|
247
252
|
}, x ? x(R) : R)), /* @__PURE__ */ v.createElement("div", {
|
|
248
253
|
tabIndex: 0,
|
|
249
|
-
ref:
|
|
250
|
-
style:
|
|
254
|
+
ref: L,
|
|
255
|
+
style: Pe,
|
|
251
256
|
"aria-hidden": "true"
|
|
252
257
|
}));
|
|
253
|
-
})
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
});
|
|
259
|
+
process.env.NODE_ENV !== "production" && (ve.displayName = "Panel");
|
|
260
|
+
var Ze = /* @__PURE__ */ l.forwardRef(function(e, n) {
|
|
261
|
+
var t = e.prefixCls, o = e.title, a = e.style, r = e.className, u = e.visible, d = e.forceRender, s = e.destroyOnClose, c = e.motionName, i = e.ariaId, f = e.onVisibleChanged, b = e.mousePosition, g = V(), x = l.useState(), C = ce(x, 2), E = C[0], p = C[1], m = {};
|
|
262
|
+
E && (m.transformOrigin = E);
|
|
263
|
+
function y() {
|
|
264
|
+
var h = ot(g.current);
|
|
265
|
+
p(b ? "".concat(b.x - h.left, "px ").concat(b.y - h.top, "px") : "");
|
|
259
266
|
}
|
|
260
|
-
return /* @__PURE__ */ l.createElement(
|
|
267
|
+
return /* @__PURE__ */ l.createElement(De, {
|
|
261
268
|
visible: u,
|
|
262
269
|
onVisibleChanged: f,
|
|
263
|
-
onAppearPrepare:
|
|
264
|
-
onEnterPrepare:
|
|
270
|
+
onAppearPrepare: y,
|
|
271
|
+
onEnterPrepare: y,
|
|
265
272
|
forceRender: d,
|
|
266
|
-
motionName:
|
|
267
|
-
removeOnLeave:
|
|
273
|
+
motionName: c,
|
|
274
|
+
removeOnLeave: s,
|
|
268
275
|
ref: g
|
|
269
|
-
}, function(h,
|
|
270
|
-
var O = h.className,
|
|
271
|
-
return /* @__PURE__ */ l.createElement(
|
|
272
|
-
ref:
|
|
273
|
-
title:
|
|
276
|
+
}, function(h, P) {
|
|
277
|
+
var O = h.className, $ = h.style;
|
|
278
|
+
return /* @__PURE__ */ l.createElement(ve, D({}, e, {
|
|
279
|
+
ref: n,
|
|
280
|
+
title: o,
|
|
274
281
|
ariaId: i,
|
|
275
|
-
prefixCls:
|
|
276
|
-
holderRef:
|
|
277
|
-
style: I(I(I({},
|
|
282
|
+
prefixCls: t,
|
|
283
|
+
holderRef: P,
|
|
284
|
+
style: I(I(I({}, $), a), m),
|
|
278
285
|
className: w(r, O)
|
|
279
286
|
}));
|
|
280
287
|
});
|
|
281
288
|
});
|
|
282
|
-
|
|
283
|
-
function
|
|
284
|
-
var
|
|
285
|
-
return /* @__PURE__ */ l.createElement(
|
|
289
|
+
Ze.displayName = "Content";
|
|
290
|
+
function lt(e) {
|
|
291
|
+
var n = e.prefixCls, t = e.style, o = e.visible, a = e.maskProps, r = e.motionName, u = e.className;
|
|
292
|
+
return /* @__PURE__ */ l.createElement(De, {
|
|
286
293
|
key: "mask",
|
|
287
|
-
visible:
|
|
294
|
+
visible: o,
|
|
288
295
|
motionName: r,
|
|
289
|
-
leavedClassName: "".concat(
|
|
290
|
-
}, function(d,
|
|
291
|
-
var
|
|
292
|
-
return /* @__PURE__ */ l.createElement("div",
|
|
293
|
-
ref:
|
|
294
|
-
style: I(I({}, i),
|
|
295
|
-
className: w("".concat(
|
|
296
|
+
leavedClassName: "".concat(n, "-mask-hidden")
|
|
297
|
+
}, function(d, s) {
|
|
298
|
+
var c = d.className, i = d.style;
|
|
299
|
+
return /* @__PURE__ */ l.createElement("div", D({
|
|
300
|
+
ref: s,
|
|
301
|
+
style: I(I({}, i), t),
|
|
302
|
+
className: w("".concat(n, "-mask"), c, u)
|
|
296
303
|
}, a));
|
|
297
304
|
});
|
|
298
305
|
}
|
|
299
|
-
function
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
-
|
|
306
|
+
function it(e) {
|
|
307
|
+
var n = e.prefixCls, t = n === void 0 ? "rc-dialog" : n, o = e.zIndex, a = e.visible, r = a === void 0 ? !1 : a, u = e.keyboard, d = u === void 0 ? !0 : u, s = e.focusTriggerAfterClose, c = s === void 0 ? !0 : s, i = e.wrapStyle, f = e.wrapClassName, b = e.wrapProps, g = e.onClose, x = e.afterOpenChange, C = e.afterClose, E = e.transitionName, p = e.animation, m = e.closable, y = m === void 0 ? !0 : m, h = e.mask, P = h === void 0 ? !0 : h, O = e.maskTransitionName, $ = e.maskAnimation, H = e.maskClosable, W = H === void 0 ? !0 : H, q = e.maskStyle, _ = e.maskProps, L = e.rootClassName, j = e.classNames, T = e.styles;
|
|
308
|
+
process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(N) {
|
|
309
|
+
he(!(N in e), "".concat(N, " is deprecated, please use styles instead."));
|
|
310
|
+
}), "wrapClassName" in e && he(!1, "wrapClassName is deprecated, please use classNames instead."));
|
|
311
|
+
var z = V(), A = V(), G = V(), Q = l.useState(r), X = ce(Q, 2), R = X[0], M = X[1], F = Dn();
|
|
312
|
+
function Z() {
|
|
313
|
+
xe(A.current, document.activeElement) || (z.current = document.activeElement);
|
|
303
314
|
}
|
|
304
|
-
function
|
|
305
|
-
if (!
|
|
306
|
-
var
|
|
307
|
-
(
|
|
315
|
+
function ee() {
|
|
316
|
+
if (!xe(A.current, document.activeElement)) {
|
|
317
|
+
var N;
|
|
318
|
+
(N = G.current) === null || N === void 0 || N.focus();
|
|
308
319
|
}
|
|
309
320
|
}
|
|
310
|
-
function
|
|
311
|
-
if (
|
|
312
|
-
|
|
321
|
+
function Cn(N) {
|
|
322
|
+
if (N)
|
|
323
|
+
ee();
|
|
313
324
|
else {
|
|
314
|
-
if (
|
|
325
|
+
if (M(!1), P && z.current && c) {
|
|
315
326
|
try {
|
|
316
|
-
|
|
327
|
+
z.current.focus({
|
|
317
328
|
preventScroll: !0
|
|
318
329
|
});
|
|
319
330
|
} catch {
|
|
320
331
|
}
|
|
321
|
-
|
|
332
|
+
z.current = null;
|
|
322
333
|
}
|
|
323
334
|
R && (C == null || C());
|
|
324
335
|
}
|
|
325
|
-
x == null || x(
|
|
336
|
+
x == null || x(N);
|
|
326
337
|
}
|
|
327
|
-
function ae(
|
|
328
|
-
g == null || g(
|
|
338
|
+
function ae(N) {
|
|
339
|
+
g == null || g(N);
|
|
329
340
|
}
|
|
330
|
-
var
|
|
331
|
-
clearTimeout(re.current),
|
|
332
|
-
},
|
|
341
|
+
var ne = V(!1), re = V(), vn = function() {
|
|
342
|
+
clearTimeout(re.current), ne.current = !0;
|
|
343
|
+
}, bn = function() {
|
|
333
344
|
re.current = setTimeout(function() {
|
|
334
|
-
|
|
345
|
+
ne.current = !1;
|
|
335
346
|
});
|
|
336
|
-
},
|
|
337
|
-
W && (
|
|
338
|
-
|
|
347
|
+
}, pe = null;
|
|
348
|
+
W && (pe = function(le) {
|
|
349
|
+
ne.current ? ne.current = !1 : A.current === le.target && ae(le);
|
|
339
350
|
});
|
|
340
|
-
function
|
|
341
|
-
if (d &&
|
|
342
|
-
|
|
351
|
+
function pn(N) {
|
|
352
|
+
if (d && N.keyCode === $e.ESC) {
|
|
353
|
+
N.stopPropagation(), ae(N);
|
|
343
354
|
return;
|
|
344
355
|
}
|
|
345
|
-
r &&
|
|
356
|
+
r && N.keyCode === $e.TAB && G.current.changeActive(!N.shiftKey);
|
|
346
357
|
}
|
|
347
|
-
return
|
|
348
|
-
r && (
|
|
349
|
-
}, [r]),
|
|
358
|
+
return Ee(function() {
|
|
359
|
+
r && (M(!0), Z());
|
|
360
|
+
}, [r]), Ee(function() {
|
|
350
361
|
return function() {
|
|
351
362
|
clearTimeout(re.current);
|
|
352
363
|
};
|
|
353
|
-
}, []), /* @__PURE__ */ l.createElement("div",
|
|
354
|
-
className: w("".concat(
|
|
355
|
-
},
|
|
364
|
+
}, []), /* @__PURE__ */ l.createElement("div", D({
|
|
365
|
+
className: w("".concat(t, "-root"), L)
|
|
366
|
+
}, Ce(e, {
|
|
356
367
|
data: !0
|
|
357
|
-
})), /* @__PURE__ */ l.createElement(
|
|
358
|
-
prefixCls:
|
|
359
|
-
visible:
|
|
360
|
-
motionName:
|
|
368
|
+
})), /* @__PURE__ */ l.createElement(lt, {
|
|
369
|
+
prefixCls: t,
|
|
370
|
+
visible: P && r,
|
|
371
|
+
motionName: Se(t, O, $),
|
|
361
372
|
style: I(I({
|
|
362
|
-
zIndex:
|
|
363
|
-
},
|
|
364
|
-
maskProps:
|
|
365
|
-
className:
|
|
366
|
-
}), /* @__PURE__ */ l.createElement("div",
|
|
373
|
+
zIndex: o
|
|
374
|
+
}, q), T == null ? void 0 : T.mask),
|
|
375
|
+
maskProps: _,
|
|
376
|
+
className: j == null ? void 0 : j.mask
|
|
377
|
+
}), /* @__PURE__ */ l.createElement("div", D({
|
|
367
378
|
tabIndex: -1,
|
|
368
|
-
onKeyDown:
|
|
369
|
-
className: w("".concat(
|
|
379
|
+
onKeyDown: pn,
|
|
380
|
+
className: w("".concat(t, "-wrap"), f, j == null ? void 0 : j.wrapper),
|
|
370
381
|
ref: A,
|
|
371
|
-
onClick:
|
|
382
|
+
onClick: pe,
|
|
372
383
|
style: I(I(I({
|
|
373
|
-
zIndex:
|
|
384
|
+
zIndex: o
|
|
374
385
|
}, i), T == null ? void 0 : T.wrapper), {}, {
|
|
375
386
|
display: R ? null : "none"
|
|
376
387
|
})
|
|
377
|
-
}, b), /* @__PURE__ */ l.createElement(
|
|
378
|
-
onMouseDown:
|
|
379
|
-
onMouseUp:
|
|
380
|
-
ref:
|
|
381
|
-
closable:
|
|
382
|
-
ariaId:
|
|
383
|
-
prefixCls:
|
|
388
|
+
}, b), /* @__PURE__ */ l.createElement(Ze, D({}, e, {
|
|
389
|
+
onMouseDown: vn,
|
|
390
|
+
onMouseUp: bn,
|
|
391
|
+
ref: G,
|
|
392
|
+
closable: y,
|
|
393
|
+
ariaId: F,
|
|
394
|
+
prefixCls: t,
|
|
384
395
|
visible: r && R,
|
|
385
396
|
onClose: ae,
|
|
386
|
-
onVisibleChanged:
|
|
387
|
-
motionName:
|
|
397
|
+
onVisibleChanged: Cn,
|
|
398
|
+
motionName: Se(t, E, p)
|
|
388
399
|
}))));
|
|
389
400
|
}
|
|
390
|
-
var
|
|
391
|
-
var
|
|
401
|
+
var Ye = function(n) {
|
|
402
|
+
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 = ce(c, 2), f = i[0], b = i[1], g = l.useMemo(function() {
|
|
392
403
|
return {
|
|
393
|
-
panel:
|
|
404
|
+
panel: s
|
|
394
405
|
};
|
|
395
|
-
}, [
|
|
406
|
+
}, [s]);
|
|
396
407
|
return l.useEffect(function() {
|
|
397
|
-
|
|
398
|
-
}, [
|
|
408
|
+
t && b(!0);
|
|
409
|
+
}, [t]), !a && u && !f ? null : /* @__PURE__ */ l.createElement(Qe.Provider, {
|
|
399
410
|
value: g
|
|
400
|
-
}, /* @__PURE__ */ l.createElement(
|
|
401
|
-
open:
|
|
411
|
+
}, /* @__PURE__ */ l.createElement(_n, {
|
|
412
|
+
open: t || a || f,
|
|
402
413
|
autoDestroy: !1,
|
|
403
|
-
getContainer:
|
|
404
|
-
autoLock:
|
|
405
|
-
}, /* @__PURE__ */ l.createElement(
|
|
414
|
+
getContainer: o,
|
|
415
|
+
autoLock: t || f
|
|
416
|
+
}, /* @__PURE__ */ l.createElement(it, D({}, n, {
|
|
406
417
|
destroyOnClose: u,
|
|
407
418
|
afterClose: function() {
|
|
408
419
|
d == null || d(), b(!1);
|
|
409
420
|
}
|
|
410
421
|
}))));
|
|
411
422
|
};
|
|
412
|
-
|
|
413
|
-
function
|
|
423
|
+
Ye.displayName = "Dialog";
|
|
424
|
+
function Ie(e) {
|
|
414
425
|
if (e)
|
|
415
426
|
return {
|
|
416
427
|
closable: e.closable,
|
|
417
428
|
closeIcon: e.closeIcon
|
|
418
429
|
};
|
|
419
430
|
}
|
|
420
|
-
function
|
|
431
|
+
function Te(e) {
|
|
421
432
|
const {
|
|
422
|
-
closable:
|
|
423
|
-
closeIcon:
|
|
433
|
+
closable: n,
|
|
434
|
+
closeIcon: t
|
|
424
435
|
} = e || {};
|
|
425
436
|
return v.useMemo(() => {
|
|
426
437
|
if (
|
|
427
438
|
// If `closable`, whatever rest be should be true
|
|
428
|
-
!
|
|
439
|
+
!n && (n === !1 || t === !1 || t === null)
|
|
429
440
|
)
|
|
430
441
|
return !1;
|
|
431
|
-
if (
|
|
442
|
+
if (n === void 0 && t === void 0)
|
|
432
443
|
return null;
|
|
433
|
-
let
|
|
434
|
-
closeIcon: typeof
|
|
444
|
+
let o = {
|
|
445
|
+
closeIcon: typeof t != "boolean" && t !== null ? t : void 0
|
|
435
446
|
};
|
|
436
|
-
return
|
|
437
|
-
}, [
|
|
447
|
+
return n && typeof n == "object" && (o = Object.assign(Object.assign({}, o), n)), o;
|
|
448
|
+
}, [n, t]);
|
|
438
449
|
}
|
|
439
|
-
function
|
|
450
|
+
function Re() {
|
|
440
451
|
const e = {};
|
|
441
|
-
for (var
|
|
442
|
-
o
|
|
443
|
-
return
|
|
452
|
+
for (var n = arguments.length, t = new Array(n), o = 0; o < n; o++)
|
|
453
|
+
t[o] = arguments[o];
|
|
454
|
+
return t.forEach((a) => {
|
|
444
455
|
a && Object.keys(a).forEach((r) => {
|
|
445
456
|
a[r] !== void 0 && (e[r] = a[r]);
|
|
446
457
|
});
|
|
447
458
|
}), e;
|
|
448
459
|
}
|
|
449
|
-
const
|
|
450
|
-
function
|
|
451
|
-
let
|
|
452
|
-
const
|
|
453
|
-
closeIcon: /* @__PURE__ */ v.createElement(
|
|
454
|
-
},
|
|
460
|
+
const st = {};
|
|
461
|
+
function ct(e, n) {
|
|
462
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : st;
|
|
463
|
+
const o = Te(e), a = Te(n), r = v.useMemo(() => Object.assign({
|
|
464
|
+
closeIcon: /* @__PURE__ */ v.createElement(ge, null)
|
|
465
|
+
}, t), [t]), u = v.useMemo(() => o === !1 ? !1 : o ? Re(r, a, o) : a === !1 ? !1 : a ? Re(r, a) : r.closable ? r : !1, [o, a, r]);
|
|
455
466
|
return v.useMemo(() => {
|
|
456
467
|
if (u === !1)
|
|
457
468
|
return [!1, null];
|
|
458
469
|
const {
|
|
459
470
|
closeIconRender: d
|
|
460
471
|
} = r, {
|
|
461
|
-
closeIcon:
|
|
472
|
+
closeIcon: s
|
|
462
473
|
} = u;
|
|
463
|
-
let
|
|
464
|
-
if (
|
|
465
|
-
d && (
|
|
466
|
-
const i =
|
|
467
|
-
Object.keys(i).length && (
|
|
474
|
+
let c = s;
|
|
475
|
+
if (c != null) {
|
|
476
|
+
d && (c = d(s));
|
|
477
|
+
const i = Ce(u, !0);
|
|
478
|
+
Object.keys(i).length && (c = /* @__PURE__ */ v.isValidElement(c) ? /* @__PURE__ */ v.cloneElement(c, i) : /* @__PURE__ */ v.createElement("span", Object.assign({}, i), c));
|
|
468
479
|
}
|
|
469
|
-
return [!0,
|
|
480
|
+
return [!0, c];
|
|
470
481
|
}, [u, r]);
|
|
471
482
|
}
|
|
472
|
-
const
|
|
473
|
-
function
|
|
483
|
+
const dt = () => $n() && window.document.documentElement;
|
|
484
|
+
function Me() {
|
|
474
485
|
}
|
|
475
|
-
const
|
|
476
|
-
add:
|
|
477
|
-
remove:
|
|
486
|
+
const ut = /* @__PURE__ */ l.createContext({
|
|
487
|
+
add: Me,
|
|
488
|
+
remove: Me
|
|
478
489
|
});
|
|
479
|
-
function
|
|
480
|
-
const
|
|
481
|
-
return
|
|
490
|
+
function ft(e) {
|
|
491
|
+
const n = l.useContext(ut), t = l.useRef();
|
|
492
|
+
return On((a) => {
|
|
482
493
|
if (a) {
|
|
483
494
|
const r = e ? a.querySelector(e) : a;
|
|
484
|
-
|
|
495
|
+
n.add(r), t.current = r;
|
|
485
496
|
} else
|
|
486
|
-
|
|
497
|
+
n.remove(t.current);
|
|
487
498
|
});
|
|
488
499
|
}
|
|
489
|
-
const
|
|
500
|
+
const je = () => {
|
|
490
501
|
const {
|
|
491
502
|
cancelButtonProps: e,
|
|
492
|
-
cancelTextLocale:
|
|
493
|
-
onCancel:
|
|
494
|
-
} =
|
|
495
|
-
return /* @__PURE__ */ v.createElement(
|
|
496
|
-
onClick:
|
|
497
|
-
}, e),
|
|
498
|
-
},
|
|
503
|
+
cancelTextLocale: n,
|
|
504
|
+
onCancel: t
|
|
505
|
+
} = Y(J);
|
|
506
|
+
return /* @__PURE__ */ v.createElement(me, Object.assign({
|
|
507
|
+
onClick: t
|
|
508
|
+
}, e), n);
|
|
509
|
+
}, Be = () => {
|
|
499
510
|
const {
|
|
500
511
|
confirmLoading: e,
|
|
501
|
-
okButtonProps:
|
|
502
|
-
okType:
|
|
503
|
-
okTextLocale:
|
|
512
|
+
okButtonProps: n,
|
|
513
|
+
okType: t,
|
|
514
|
+
okTextLocale: o,
|
|
504
515
|
onOk: a
|
|
505
|
-
} =
|
|
506
|
-
return /* @__PURE__ */ v.createElement(
|
|
516
|
+
} = Y(J);
|
|
517
|
+
return /* @__PURE__ */ v.createElement(me, Object.assign({}, We(t), {
|
|
507
518
|
loading: e,
|
|
508
519
|
onClick: a
|
|
509
|
-
},
|
|
520
|
+
}, n), o);
|
|
510
521
|
};
|
|
511
|
-
function
|
|
522
|
+
function Je(e, n) {
|
|
512
523
|
return /* @__PURE__ */ v.createElement("span", {
|
|
513
524
|
className: `${e}-close-x`
|
|
514
|
-
},
|
|
525
|
+
}, n || /* @__PURE__ */ v.createElement(ge, {
|
|
515
526
|
className: `${e}-close-icon`
|
|
516
527
|
}));
|
|
517
528
|
}
|
|
518
|
-
const
|
|
529
|
+
const ke = (e) => {
|
|
519
530
|
const {
|
|
520
|
-
okText:
|
|
521
|
-
okType:
|
|
522
|
-
cancelText:
|
|
531
|
+
okText: n,
|
|
532
|
+
okType: t = "primary",
|
|
533
|
+
cancelText: o,
|
|
523
534
|
confirmLoading: a,
|
|
524
535
|
onOk: r,
|
|
525
536
|
onCancel: u,
|
|
526
537
|
okButtonProps: d,
|
|
527
|
-
cancelButtonProps:
|
|
528
|
-
footer:
|
|
529
|
-
} = e, [i] =
|
|
538
|
+
cancelButtonProps: s,
|
|
539
|
+
footer: c
|
|
540
|
+
} = e, [i] = fe("Modal", _e()), f = n || (i == null ? void 0 : i.okText), b = o || (i == null ? void 0 : i.cancelText), g = {
|
|
530
541
|
confirmLoading: a,
|
|
531
542
|
okButtonProps: d,
|
|
532
|
-
cancelButtonProps:
|
|
543
|
+
cancelButtonProps: s,
|
|
533
544
|
okTextLocale: f,
|
|
534
545
|
cancelTextLocale: b,
|
|
535
|
-
okType:
|
|
546
|
+
okType: t,
|
|
536
547
|
onOk: r,
|
|
537
548
|
onCancel: u
|
|
538
|
-
}, x = v.useMemo(() => g,
|
|
549
|
+
}, x = v.useMemo(() => g, U(Object.values(g)));
|
|
539
550
|
let C;
|
|
540
|
-
return typeof
|
|
541
|
-
OkBtn:
|
|
542
|
-
CancelBtn:
|
|
543
|
-
})), C = /* @__PURE__ */ v.createElement(
|
|
551
|
+
return typeof c == "function" || typeof c > "u" ? (C = /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(je, null), /* @__PURE__ */ v.createElement(Be, null)), typeof c == "function" && (C = c(C, {
|
|
552
|
+
OkBtn: Be,
|
|
553
|
+
CancelBtn: je
|
|
554
|
+
})), C = /* @__PURE__ */ v.createElement(Ke, {
|
|
544
555
|
value: x
|
|
545
|
-
}, C)) : C =
|
|
556
|
+
}, C)) : C = c, /* @__PURE__ */ v.createElement(Nn, {
|
|
546
557
|
disabled: !1
|
|
547
558
|
}, C);
|
|
548
|
-
},
|
|
559
|
+
}, mt = new He("antFadeIn", {
|
|
549
560
|
"0%": {
|
|
550
561
|
opacity: 0
|
|
551
562
|
},
|
|
552
563
|
"100%": {
|
|
553
564
|
opacity: 1
|
|
554
565
|
}
|
|
555
|
-
}),
|
|
566
|
+
}), gt = new He("antFadeOut", {
|
|
556
567
|
"0%": {
|
|
557
568
|
opacity: 1
|
|
558
569
|
},
|
|
559
570
|
"100%": {
|
|
560
571
|
opacity: 0
|
|
561
572
|
}
|
|
562
|
-
}),
|
|
563
|
-
let
|
|
573
|
+
}), Ct = function(e) {
|
|
574
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
564
575
|
const {
|
|
565
|
-
antCls:
|
|
566
|
-
} = e,
|
|
567
|
-
return [
|
|
576
|
+
antCls: t
|
|
577
|
+
} = e, o = `${t}-fade`, a = n ? "&" : "";
|
|
578
|
+
return [Hn(o, mt, gt, e.motionDurationMid, n), {
|
|
568
579
|
[`
|
|
569
|
-
${a}${
|
|
570
|
-
${a}${
|
|
580
|
+
${a}${o}-enter,
|
|
581
|
+
${a}${o}-appear
|
|
571
582
|
`]: {
|
|
572
583
|
opacity: 0,
|
|
573
584
|
animationTimingFunction: "linear"
|
|
574
585
|
},
|
|
575
|
-
[`${a}${
|
|
586
|
+
[`${a}${o}-leave`]: {
|
|
576
587
|
animationTimingFunction: "linear"
|
|
577
588
|
}
|
|
578
589
|
}];
|
|
579
590
|
};
|
|
580
|
-
function
|
|
591
|
+
function ze(e) {
|
|
581
592
|
return {
|
|
582
593
|
position: e,
|
|
583
594
|
inset: 0
|
|
584
595
|
};
|
|
585
596
|
}
|
|
586
|
-
const
|
|
597
|
+
const vt = (e) => {
|
|
587
598
|
const {
|
|
588
|
-
componentCls:
|
|
589
|
-
antCls:
|
|
599
|
+
componentCls: n,
|
|
600
|
+
antCls: t
|
|
590
601
|
} = e;
|
|
591
602
|
return [{
|
|
592
|
-
[`${
|
|
593
|
-
[`${
|
|
603
|
+
[`${n}-root`]: {
|
|
604
|
+
[`${n}${t}-zoom-enter, ${n}${t}-zoom-appear`]: {
|
|
594
605
|
// reset scale avoid mousePosition bug
|
|
595
606
|
transform: "none",
|
|
596
607
|
opacity: 0,
|
|
@@ -600,19 +611,19 @@ const un = (e) => {
|
|
|
600
611
|
},
|
|
601
612
|
// https://github.com/ant-design/ant-design/issues/37329
|
|
602
613
|
// https://github.com/ant-design/ant-design/issues/40272
|
|
603
|
-
[`${
|
|
614
|
+
[`${n}${t}-zoom-leave ${n}-content`]: {
|
|
604
615
|
pointerEvents: "none"
|
|
605
616
|
},
|
|
606
|
-
[`${
|
|
617
|
+
[`${n}-mask`]: Object.assign(Object.assign({}, ze("fixed")), {
|
|
607
618
|
zIndex: e.zIndexPopupBase,
|
|
608
619
|
height: "100%",
|
|
609
620
|
backgroundColor: e.colorBgMask,
|
|
610
621
|
pointerEvents: "none",
|
|
611
|
-
[`${
|
|
622
|
+
[`${n}-hidden`]: {
|
|
612
623
|
display: "none"
|
|
613
624
|
}
|
|
614
625
|
}),
|
|
615
|
-
[`${
|
|
626
|
+
[`${n}-wrap`]: Object.assign(Object.assign({}, ze("fixed")), {
|
|
616
627
|
zIndex: e.zIndexPopupBase,
|
|
617
628
|
overflow: "auto",
|
|
618
629
|
outline: 0,
|
|
@@ -620,20 +631,20 @@ const un = (e) => {
|
|
|
620
631
|
})
|
|
621
632
|
}
|
|
622
633
|
}, {
|
|
623
|
-
[`${
|
|
634
|
+
[`${n}-root`]: Ct(e)
|
|
624
635
|
}];
|
|
625
|
-
},
|
|
636
|
+
}, bt = (e) => {
|
|
626
637
|
const {
|
|
627
|
-
componentCls:
|
|
638
|
+
componentCls: n
|
|
628
639
|
} = e;
|
|
629
640
|
return [
|
|
630
641
|
// ======================== Root =========================
|
|
631
642
|
{
|
|
632
|
-
[`${
|
|
633
|
-
[`${
|
|
643
|
+
[`${n}-root`]: {
|
|
644
|
+
[`${n}-wrap-rtl`]: {
|
|
634
645
|
direction: "rtl"
|
|
635
646
|
},
|
|
636
|
-
[`${
|
|
647
|
+
[`${n}-centered`]: {
|
|
637
648
|
textAlign: "center",
|
|
638
649
|
"&::before": {
|
|
639
650
|
display: "inline-block",
|
|
@@ -642,7 +653,7 @@ const un = (e) => {
|
|
|
642
653
|
verticalAlign: "middle",
|
|
643
654
|
content: '""'
|
|
644
655
|
},
|
|
645
|
-
[
|
|
656
|
+
[n]: {
|
|
646
657
|
top: 0,
|
|
647
658
|
display: "inline-block",
|
|
648
659
|
paddingBottom: 0,
|
|
@@ -651,12 +662,12 @@ const un = (e) => {
|
|
|
651
662
|
}
|
|
652
663
|
},
|
|
653
664
|
[`@media (max-width: ${e.screenSMMax}px)`]: {
|
|
654
|
-
[
|
|
665
|
+
[n]: {
|
|
655
666
|
maxWidth: "calc(100vw - 16px)",
|
|
656
667
|
margin: `${S(e.marginXS)} auto`
|
|
657
668
|
},
|
|
658
|
-
[`${
|
|
659
|
-
[
|
|
669
|
+
[`${n}-centered`]: {
|
|
670
|
+
[n]: {
|
|
660
671
|
flex: 1
|
|
661
672
|
}
|
|
662
673
|
}
|
|
@@ -665,7 +676,7 @@ const un = (e) => {
|
|
|
665
676
|
},
|
|
666
677
|
// ======================== Modal ========================
|
|
667
678
|
{
|
|
668
|
-
[
|
|
679
|
+
[n]: Object.assign(Object.assign({}, wn(e)), {
|
|
669
680
|
pointerEvents: "none",
|
|
670
681
|
position: "relative",
|
|
671
682
|
top: 100,
|
|
@@ -673,7 +684,7 @@ const un = (e) => {
|
|
|
673
684
|
maxWidth: `calc(100vw - ${S(e.calc(e.margin).mul(2).equal())})`,
|
|
674
685
|
margin: "0 auto",
|
|
675
686
|
paddingBottom: e.paddingLG,
|
|
676
|
-
[`${
|
|
687
|
+
[`${n}-title`]: {
|
|
677
688
|
margin: 0,
|
|
678
689
|
color: e.titleColor,
|
|
679
690
|
fontWeight: e.fontWeightStrong,
|
|
@@ -681,7 +692,7 @@ const un = (e) => {
|
|
|
681
692
|
lineHeight: e.titleLineHeight,
|
|
682
693
|
wordWrap: "break-word"
|
|
683
694
|
},
|
|
684
|
-
[`${
|
|
695
|
+
[`${n}-content`]: {
|
|
685
696
|
position: "relative",
|
|
686
697
|
backgroundColor: e.contentBg,
|
|
687
698
|
backgroundClip: "padding-box",
|
|
@@ -691,7 +702,7 @@ const un = (e) => {
|
|
|
691
702
|
pointerEvents: "auto",
|
|
692
703
|
padding: e.contentPadding
|
|
693
704
|
},
|
|
694
|
-
[`${
|
|
705
|
+
[`${n}-close`]: Object.assign({
|
|
695
706
|
position: "absolute",
|
|
696
707
|
top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
|
|
697
708
|
insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
|
|
@@ -726,8 +737,8 @@ const un = (e) => {
|
|
|
726
737
|
"&:active": {
|
|
727
738
|
backgroundColor: e.colorBgTextActive
|
|
728
739
|
}
|
|
729
|
-
},
|
|
730
|
-
[`${
|
|
740
|
+
}, Pn(e)),
|
|
741
|
+
[`${n}-header`]: {
|
|
731
742
|
color: e.colorText,
|
|
732
743
|
background: e.headerBg,
|
|
733
744
|
borderRadius: `${S(e.borderRadiusLG)} ${S(e.borderRadiusLG)} 0 0`,
|
|
@@ -735,13 +746,13 @@ const un = (e) => {
|
|
|
735
746
|
padding: e.headerPadding,
|
|
736
747
|
borderBottom: e.headerBorderBottom
|
|
737
748
|
},
|
|
738
|
-
[`${
|
|
749
|
+
[`${n}-body`]: {
|
|
739
750
|
fontSize: e.fontSize,
|
|
740
751
|
lineHeight: e.lineHeight,
|
|
741
752
|
wordWrap: "break-word",
|
|
742
753
|
padding: e.bodyPadding
|
|
743
754
|
},
|
|
744
|
-
[`${
|
|
755
|
+
[`${n}-footer`]: {
|
|
745
756
|
textAlign: "end",
|
|
746
757
|
background: e.footerBg,
|
|
747
758
|
marginTop: e.footerMarginTop,
|
|
@@ -752,49 +763,49 @@ const un = (e) => {
|
|
|
752
763
|
marginInlineStart: e.marginXS
|
|
753
764
|
}
|
|
754
765
|
},
|
|
755
|
-
[`${
|
|
766
|
+
[`${n}-open`]: {
|
|
756
767
|
overflow: "hidden"
|
|
757
768
|
}
|
|
758
769
|
})
|
|
759
770
|
},
|
|
760
771
|
// ======================== Pure =========================
|
|
761
772
|
{
|
|
762
|
-
[`${
|
|
773
|
+
[`${n}-pure-panel`]: {
|
|
763
774
|
top: "auto",
|
|
764
775
|
padding: 0,
|
|
765
776
|
display: "flex",
|
|
766
777
|
flexDirection: "column",
|
|
767
|
-
[`${
|
|
768
|
-
${
|
|
769
|
-
${
|
|
778
|
+
[`${n}-content,
|
|
779
|
+
${n}-body,
|
|
780
|
+
${n}-confirm-body-wrapper`]: {
|
|
770
781
|
display: "flex",
|
|
771
782
|
flexDirection: "column",
|
|
772
783
|
flex: "auto"
|
|
773
784
|
},
|
|
774
|
-
[`${
|
|
785
|
+
[`${n}-confirm-body`]: {
|
|
775
786
|
marginBottom: "auto"
|
|
776
787
|
}
|
|
777
788
|
}
|
|
778
789
|
}
|
|
779
790
|
];
|
|
780
|
-
},
|
|
791
|
+
}, pt = (e) => {
|
|
781
792
|
const {
|
|
782
|
-
componentCls:
|
|
793
|
+
componentCls: n
|
|
783
794
|
} = e;
|
|
784
795
|
return {
|
|
785
|
-
[`${
|
|
786
|
-
[`${
|
|
796
|
+
[`${n}-root`]: {
|
|
797
|
+
[`${n}-wrap-rtl`]: {
|
|
787
798
|
direction: "rtl",
|
|
788
|
-
[`${
|
|
799
|
+
[`${n}-confirm-body`]: {
|
|
789
800
|
direction: "rtl"
|
|
790
801
|
}
|
|
791
802
|
}
|
|
792
803
|
}
|
|
793
804
|
};
|
|
794
|
-
},
|
|
795
|
-
const
|
|
796
|
-
return
|
|
797
|
-
modalHeaderHeight: e.calc(e.calc(
|
|
805
|
+
}, en = (e) => {
|
|
806
|
+
const n = e.padding, t = e.fontSizeHeading5, o = e.lineHeightHeading5;
|
|
807
|
+
return In(e, {
|
|
808
|
+
modalHeaderHeight: e.calc(e.calc(o).mul(t).equal()).add(e.calc(n).mul(2).equal()).equal(),
|
|
798
809
|
modalFooterBorderColorSplit: e.colorSplit,
|
|
799
810
|
modalFooterBorderStyle: e.lineType,
|
|
800
811
|
modalFooterBorderWidth: e.lineWidth,
|
|
@@ -804,7 +815,7 @@ const un = (e) => {
|
|
|
804
815
|
modalConfirmIconSize: e.fontHeight,
|
|
805
816
|
modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
|
|
806
817
|
});
|
|
807
|
-
},
|
|
818
|
+
}, nn = (e) => ({
|
|
808
819
|
footerBg: "transparent",
|
|
809
820
|
headerBg: e.colorBgElevated,
|
|
810
821
|
titleLineHeight: e.lineHeightHeading5,
|
|
@@ -824,120 +835,128 @@ const un = (e) => {
|
|
|
824
835
|
confirmBodyPadding: e.wireframe ? `${S(e.padding * 2)} ${S(e.padding * 2)} ${S(e.paddingLG)}` : 0,
|
|
825
836
|
confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
|
|
826
837
|
confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
|
|
827
|
-
}),
|
|
828
|
-
const
|
|
829
|
-
return [
|
|
830
|
-
},
|
|
838
|
+
}), tn = Sn("Modal", (e) => {
|
|
839
|
+
const n = en(e);
|
|
840
|
+
return [bt(n), pt(n), vt(n), Ln(n, "zoom")];
|
|
841
|
+
}, nn, {
|
|
831
842
|
unitless: {
|
|
832
843
|
titleLineHeight: !0
|
|
833
844
|
}
|
|
834
845
|
});
|
|
835
|
-
var
|
|
836
|
-
var
|
|
837
|
-
for (var
|
|
838
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
846
|
+
var yt = function(e, n) {
|
|
847
|
+
var t = {};
|
|
848
|
+
for (var o in e)
|
|
849
|
+
Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
839
850
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
840
|
-
for (var a = 0,
|
|
841
|
-
|
|
842
|
-
return
|
|
851
|
+
for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
852
|
+
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
853
|
+
return t;
|
|
843
854
|
};
|
|
844
|
-
let
|
|
845
|
-
const
|
|
846
|
-
|
|
855
|
+
let se;
|
|
856
|
+
const ht = (e) => {
|
|
857
|
+
se = {
|
|
847
858
|
x: e.pageX,
|
|
848
859
|
y: e.pageY
|
|
849
860
|
}, setTimeout(() => {
|
|
850
|
-
|
|
861
|
+
se = null;
|
|
851
862
|
}, 100);
|
|
852
863
|
};
|
|
853
|
-
|
|
854
|
-
const
|
|
855
|
-
var
|
|
864
|
+
dt() && document.documentElement.addEventListener("click", ht, !0);
|
|
865
|
+
const on = (e) => {
|
|
866
|
+
var n;
|
|
856
867
|
const {
|
|
857
|
-
getPopupContainer:
|
|
858
|
-
getPrefixCls:
|
|
868
|
+
getPopupContainer: t,
|
|
869
|
+
getPrefixCls: o,
|
|
859
870
|
direction: a,
|
|
860
871
|
modal: r
|
|
861
|
-
} = l.useContext(
|
|
872
|
+
} = l.useContext(oe), u = (R) => {
|
|
862
873
|
const {
|
|
863
|
-
onCancel:
|
|
874
|
+
onCancel: M
|
|
864
875
|
} = e;
|
|
865
|
-
|
|
876
|
+
M == null || M(R);
|
|
866
877
|
}, d = (R) => {
|
|
867
878
|
const {
|
|
868
|
-
onOk:
|
|
879
|
+
onOk: M
|
|
869
880
|
} = e;
|
|
870
|
-
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
|
|
881
|
+
M == null || M(R);
|
|
882
|
+
};
|
|
883
|
+
if (process.env.NODE_ENV !== "production") {
|
|
884
|
+
const R = de("Modal");
|
|
885
|
+
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((M) => {
|
|
886
|
+
let [F, Z] = M;
|
|
887
|
+
R.deprecated(!(F in e), F, Z);
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
const {
|
|
891
|
+
prefixCls: s,
|
|
892
|
+
className: c,
|
|
874
893
|
rootClassName: i,
|
|
875
894
|
open: f,
|
|
876
895
|
wrapClassName: b,
|
|
877
896
|
centered: g,
|
|
878
897
|
getContainer: x,
|
|
879
898
|
focusTriggerAfterClose: C = !0,
|
|
880
|
-
style:
|
|
899
|
+
style: E,
|
|
881
900
|
// Deprecated
|
|
882
|
-
visible:
|
|
901
|
+
visible: p,
|
|
883
902
|
width: m = 520,
|
|
884
|
-
footer:
|
|
903
|
+
footer: y,
|
|
885
904
|
classNames: h,
|
|
886
|
-
styles:
|
|
887
|
-
} = e, O =
|
|
888
|
-
[`${
|
|
889
|
-
[`${
|
|
890
|
-
}), T =
|
|
905
|
+
styles: P
|
|
906
|
+
} = e, O = yt(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles"]), $ = o("modal", s), H = o(), W = Ve($), [q, _, L] = tn($, W), j = w(b, {
|
|
907
|
+
[`${$}-centered`]: !!g,
|
|
908
|
+
[`${$}-wrap-rtl`]: a === "rtl"
|
|
909
|
+
}), T = y !== null && /* @__PURE__ */ l.createElement(ke, Object.assign({}, e, {
|
|
891
910
|
onOk: d,
|
|
892
911
|
onCancel: u
|
|
893
|
-
})), [
|
|
912
|
+
})), [z, A] = ct(Ie(e), Ie(r), {
|
|
894
913
|
closable: !0,
|
|
895
|
-
closeIcon: /* @__PURE__ */ l.createElement(
|
|
896
|
-
className: `${
|
|
914
|
+
closeIcon: /* @__PURE__ */ l.createElement(ge, {
|
|
915
|
+
className: `${$}-close-icon`
|
|
897
916
|
}),
|
|
898
|
-
closeIconRender: (R) =>
|
|
899
|
-
}),
|
|
900
|
-
return
|
|
917
|
+
closeIconRender: (R) => Je($, R)
|
|
918
|
+
}), G = ft(`.${$}-content`), [Q, X] = An("Modal", O.zIndex);
|
|
919
|
+
return q(/* @__PURE__ */ l.createElement(Vn, null, /* @__PURE__ */ l.createElement(Wn, {
|
|
901
920
|
status: !0,
|
|
902
921
|
override: !0
|
|
903
|
-
}, /* @__PURE__ */ l.createElement(
|
|
922
|
+
}, /* @__PURE__ */ l.createElement(qn.Provider, {
|
|
904
923
|
value: X
|
|
905
|
-
}, /* @__PURE__ */ l.createElement(
|
|
924
|
+
}, /* @__PURE__ */ l.createElement(Ye, Object.assign({
|
|
906
925
|
width: m
|
|
907
926
|
}, O, {
|
|
908
927
|
zIndex: Q,
|
|
909
|
-
getContainer: x === void 0 ?
|
|
910
|
-
prefixCls:
|
|
911
|
-
rootClassName: w(
|
|
928
|
+
getContainer: x === void 0 ? t : x,
|
|
929
|
+
prefixCls: $,
|
|
930
|
+
rootClassName: w(_, i, L, W),
|
|
912
931
|
footer: T,
|
|
913
|
-
visible: f ??
|
|
914
|
-
mousePosition: (
|
|
932
|
+
visible: f ?? p,
|
|
933
|
+
mousePosition: (n = O.mousePosition) !== null && n !== void 0 ? n : se,
|
|
915
934
|
onClose: u,
|
|
916
|
-
closable:
|
|
935
|
+
closable: z,
|
|
917
936
|
closeIcon: A,
|
|
918
937
|
focusTriggerAfterClose: C,
|
|
919
938
|
transitionName: te(H, "zoom", e.transitionName),
|
|
920
939
|
maskTransitionName: te(H, "fade", e.maskTransitionName),
|
|
921
|
-
className: w(
|
|
922
|
-
style: Object.assign(Object.assign({}, r == null ? void 0 : r.style),
|
|
940
|
+
className: w(_, c, r == null ? void 0 : r.className),
|
|
941
|
+
style: Object.assign(Object.assign({}, r == null ? void 0 : r.style), E),
|
|
923
942
|
classNames: Object.assign(Object.assign(Object.assign({}, r == null ? void 0 : r.classNames), h), {
|
|
924
|
-
wrapper: w(
|
|
943
|
+
wrapper: w(j, h == null ? void 0 : h.wrapper)
|
|
925
944
|
}),
|
|
926
|
-
styles: Object.assign(Object.assign({}, r == null ? void 0 : r.styles),
|
|
927
|
-
panelRef:
|
|
945
|
+
styles: Object.assign(Object.assign({}, r == null ? void 0 : r.styles), P),
|
|
946
|
+
panelRef: G
|
|
928
947
|
}))))));
|
|
929
|
-
},
|
|
948
|
+
}, xt = (e) => {
|
|
930
949
|
const {
|
|
931
|
-
componentCls:
|
|
932
|
-
titleFontSize:
|
|
933
|
-
titleLineHeight:
|
|
950
|
+
componentCls: n,
|
|
951
|
+
titleFontSize: t,
|
|
952
|
+
titleLineHeight: o,
|
|
934
953
|
modalConfirmIconSize: a,
|
|
935
954
|
fontSize: r,
|
|
936
955
|
lineHeight: u,
|
|
937
956
|
modalTitleHeight: d,
|
|
938
|
-
fontHeight:
|
|
939
|
-
confirmBodyPadding:
|
|
940
|
-
} = e, i = `${
|
|
957
|
+
fontHeight: s,
|
|
958
|
+
confirmBodyPadding: c
|
|
959
|
+
} = e, i = `${n}-confirm`;
|
|
941
960
|
return {
|
|
942
961
|
[i]: {
|
|
943
962
|
"&-rtl": {
|
|
@@ -946,9 +965,9 @@ const Ze = (e) => {
|
|
|
946
965
|
[`${e.antCls}-modal-header`]: {
|
|
947
966
|
display: "none"
|
|
948
967
|
},
|
|
949
|
-
[`${i}-body-wrapper`]: Object.assign({},
|
|
950
|
-
[`&${
|
|
951
|
-
padding:
|
|
968
|
+
[`${i}-body-wrapper`]: Object.assign({}, Rn()),
|
|
969
|
+
[`&${n} ${n}-body`]: {
|
|
970
|
+
padding: c
|
|
952
971
|
},
|
|
953
972
|
// ====================== Body ======================
|
|
954
973
|
[`${i}-body`]: {
|
|
@@ -959,7 +978,7 @@ const Ze = (e) => {
|
|
|
959
978
|
flex: "none",
|
|
960
979
|
fontSize: a,
|
|
961
980
|
marginInlineEnd: e.confirmIconMarginInlineEnd,
|
|
962
|
-
marginTop: e.calc(e.calc(
|
|
981
|
+
marginTop: e.calc(e.calc(s).sub(a).equal()).div(2).equal()
|
|
963
982
|
},
|
|
964
983
|
[`&-has-title > ${e.iconCls}`]: {
|
|
965
984
|
marginTop: e.calc(e.calc(d).sub(a).equal()).div(2).equal()
|
|
@@ -978,8 +997,8 @@ const Ze = (e) => {
|
|
|
978
997
|
[`${i}-title`]: {
|
|
979
998
|
color: e.colorTextHeading,
|
|
980
999
|
fontWeight: e.fontWeightStrong,
|
|
981
|
-
fontSize:
|
|
982
|
-
lineHeight:
|
|
1000
|
+
fontSize: t,
|
|
1001
|
+
lineHeight: o
|
|
983
1002
|
},
|
|
984
1003
|
[`${i}-content`]: {
|
|
985
1004
|
color: e.colorText,
|
|
@@ -1010,111 +1029,123 @@ const Ze = (e) => {
|
|
|
1010
1029
|
color: e.colorSuccess
|
|
1011
1030
|
}
|
|
1012
1031
|
};
|
|
1013
|
-
},
|
|
1014
|
-
const
|
|
1015
|
-
return [
|
|
1016
|
-
},
|
|
1032
|
+
}, Et = Tn(["Modal", "confirm"], (e) => {
|
|
1033
|
+
const n = en(e);
|
|
1034
|
+
return [xt(n)];
|
|
1035
|
+
}, nn, {
|
|
1017
1036
|
// confirm is weak than modal since no conflict here
|
|
1018
1037
|
order: -1e3
|
|
1019
1038
|
});
|
|
1020
|
-
var
|
|
1021
|
-
var
|
|
1022
|
-
for (var
|
|
1023
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
1039
|
+
var $t = function(e, n) {
|
|
1040
|
+
var t = {};
|
|
1041
|
+
for (var o in e)
|
|
1042
|
+
Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
1024
1043
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1025
|
-
for (var a = 0,
|
|
1026
|
-
|
|
1027
|
-
return
|
|
1044
|
+
for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1045
|
+
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
1046
|
+
return t;
|
|
1028
1047
|
};
|
|
1029
|
-
function
|
|
1048
|
+
function an(e) {
|
|
1030
1049
|
const {
|
|
1031
|
-
prefixCls:
|
|
1032
|
-
icon:
|
|
1033
|
-
okText:
|
|
1050
|
+
prefixCls: n,
|
|
1051
|
+
icon: t,
|
|
1052
|
+
okText: o,
|
|
1034
1053
|
cancelText: a,
|
|
1035
1054
|
confirmPrefixCls: r,
|
|
1036
1055
|
type: u,
|
|
1037
1056
|
okCancel: d,
|
|
1038
|
-
footer:
|
|
1057
|
+
footer: s,
|
|
1039
1058
|
// Legacy for static function usage
|
|
1040
|
-
locale:
|
|
1041
|
-
} = e, i =
|
|
1042
|
-
|
|
1043
|
-
|
|
1059
|
+
locale: c
|
|
1060
|
+
} = e, i = $t(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
|
|
1061
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1062
|
+
const $ = de("Modal");
|
|
1063
|
+
process.env.NODE_ENV !== "production" && $(!(typeof t == "string" && t.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${t}\` at https://ant.design/components/icon`);
|
|
1064
|
+
}
|
|
1065
|
+
let f = t;
|
|
1066
|
+
if (!t && t !== null)
|
|
1044
1067
|
switch (u) {
|
|
1045
1068
|
case "info":
|
|
1046
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1069
|
+
f = /* @__PURE__ */ l.createElement(Ue, null);
|
|
1047
1070
|
break;
|
|
1048
1071
|
case "success":
|
|
1049
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1072
|
+
f = /* @__PURE__ */ l.createElement(qe, null);
|
|
1050
1073
|
break;
|
|
1051
1074
|
case "error":
|
|
1052
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1075
|
+
f = /* @__PURE__ */ l.createElement(Gn, null);
|
|
1053
1076
|
break;
|
|
1054
1077
|
default:
|
|
1055
|
-
f = /* @__PURE__ */ l.createElement(
|
|
1078
|
+
f = /* @__PURE__ */ l.createElement(Ge, null);
|
|
1056
1079
|
}
|
|
1057
|
-
const b = d ?? u === "confirm", g = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [x] =
|
|
1080
|
+
const b = d ?? u === "confirm", g = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [x] = fe("Modal"), C = c || x, E = o || (b ? C == null ? void 0 : C.okText : C == null ? void 0 : C.justOkText), p = a || (C == null ? void 0 : C.cancelText), m = Object.assign({
|
|
1058
1081
|
autoFocusButton: g,
|
|
1059
|
-
cancelTextLocale:
|
|
1060
|
-
okTextLocale:
|
|
1082
|
+
cancelTextLocale: p,
|
|
1083
|
+
okTextLocale: E,
|
|
1061
1084
|
mergedOkCancel: b
|
|
1062
|
-
}, i),
|
|
1085
|
+
}, i), y = l.useMemo(() => m, U(Object.values(m))), h = /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(Oe, null), /* @__PURE__ */ l.createElement(Ne, null)), P = e.title !== void 0 && e.title !== null, O = `${r}-body`;
|
|
1063
1086
|
return /* @__PURE__ */ l.createElement("div", {
|
|
1064
1087
|
className: `${r}-body-wrapper`
|
|
1065
1088
|
}, /* @__PURE__ */ l.createElement("div", {
|
|
1066
1089
|
className: w(O, {
|
|
1067
|
-
[`${O}-has-title`]:
|
|
1090
|
+
[`${O}-has-title`]: P
|
|
1068
1091
|
})
|
|
1069
1092
|
}, f, /* @__PURE__ */ l.createElement("div", {
|
|
1070
1093
|
className: `${r}-paragraph`
|
|
1071
|
-
},
|
|
1094
|
+
}, P && /* @__PURE__ */ l.createElement("span", {
|
|
1072
1095
|
className: `${r}-title`
|
|
1073
1096
|
}, e.title), /* @__PURE__ */ l.createElement("div", {
|
|
1074
1097
|
className: `${r}-content`
|
|
1075
|
-
}, e.content))),
|
|
1076
|
-
value:
|
|
1098
|
+
}, e.content))), s === void 0 || typeof s == "function" ? /* @__PURE__ */ l.createElement(Ke, {
|
|
1099
|
+
value: y
|
|
1077
1100
|
}, /* @__PURE__ */ l.createElement("div", {
|
|
1078
1101
|
className: `${r}-btns`
|
|
1079
|
-
}, typeof
|
|
1080
|
-
OkBtn:
|
|
1081
|
-
CancelBtn:
|
|
1082
|
-
}) : h)) :
|
|
1083
|
-
prefixCls:
|
|
1102
|
+
}, typeof s == "function" ? s(h, {
|
|
1103
|
+
OkBtn: Ne,
|
|
1104
|
+
CancelBtn: Oe
|
|
1105
|
+
}) : h)) : s, /* @__PURE__ */ l.createElement(Et, {
|
|
1106
|
+
prefixCls: n
|
|
1084
1107
|
}));
|
|
1085
1108
|
}
|
|
1086
|
-
const
|
|
1109
|
+
const rn = (e) => {
|
|
1087
1110
|
const {
|
|
1088
|
-
close:
|
|
1089
|
-
zIndex:
|
|
1090
|
-
afterClose:
|
|
1111
|
+
close: n,
|
|
1112
|
+
zIndex: t,
|
|
1113
|
+
afterClose: o,
|
|
1091
1114
|
open: a,
|
|
1092
1115
|
keyboard: r,
|
|
1093
1116
|
centered: u,
|
|
1094
1117
|
getContainer: d,
|
|
1095
|
-
maskStyle:
|
|
1096
|
-
direction:
|
|
1118
|
+
maskStyle: s,
|
|
1119
|
+
direction: c,
|
|
1097
1120
|
prefixCls: i,
|
|
1098
1121
|
wrapClassName: f,
|
|
1099
1122
|
rootPrefixCls: b,
|
|
1100
1123
|
bodyStyle: g,
|
|
1101
1124
|
closable: x = !1,
|
|
1102
1125
|
closeIcon: C,
|
|
1103
|
-
modalRender:
|
|
1104
|
-
focusTriggerAfterClose:
|
|
1126
|
+
modalRender: E,
|
|
1127
|
+
focusTriggerAfterClose: p,
|
|
1105
1128
|
onConfirm: m,
|
|
1106
|
-
styles:
|
|
1107
|
-
} = e
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1129
|
+
styles: y
|
|
1130
|
+
} = e;
|
|
1131
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1132
|
+
const L = de("Modal");
|
|
1133
|
+
[["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((j) => {
|
|
1134
|
+
let [T, z] = j;
|
|
1135
|
+
L.deprecated(!(T in e), T, z);
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
const h = `${i}-confirm`, P = e.width || 416, O = e.style || {}, $ = e.mask === void 0 ? !0 : e.mask, H = e.maskClosable === void 0 ? !1 : e.maskClosable, W = w(h, `${h}-${e.type}`, {
|
|
1139
|
+
[`${h}-rtl`]: c === "rtl"
|
|
1140
|
+
}, e.className), [, q] = Mn(), _ = l.useMemo(() => t !== void 0 ? t : q.zIndexPopupBase + Un, [t, q]);
|
|
1141
|
+
return /* @__PURE__ */ l.createElement(on, {
|
|
1111
1142
|
prefixCls: i,
|
|
1112
1143
|
className: W,
|
|
1113
1144
|
wrapClassName: w({
|
|
1114
1145
|
[`${h}-centered`]: !!e.centered
|
|
1115
1146
|
}, f),
|
|
1116
1147
|
onCancel: () => {
|
|
1117
|
-
|
|
1148
|
+
n == null || n({
|
|
1118
1149
|
triggerCancel: !0
|
|
1119
1150
|
}), m == null || m(!1);
|
|
1120
1151
|
},
|
|
@@ -1123,343 +1154,348 @@ const pn = (e) => {
|
|
|
1123
1154
|
footer: null,
|
|
1124
1155
|
transitionName: te(b || "", "zoom", e.transitionName),
|
|
1125
1156
|
maskTransitionName: te(b || "", "fade", e.maskTransitionName),
|
|
1126
|
-
mask:
|
|
1157
|
+
mask: $,
|
|
1127
1158
|
maskClosable: H,
|
|
1128
1159
|
style: O,
|
|
1129
1160
|
styles: Object.assign({
|
|
1130
1161
|
body: g,
|
|
1131
|
-
mask:
|
|
1132
|
-
},
|
|
1133
|
-
width:
|
|
1134
|
-
zIndex:
|
|
1135
|
-
afterClose:
|
|
1162
|
+
mask: s
|
|
1163
|
+
}, y),
|
|
1164
|
+
width: P,
|
|
1165
|
+
zIndex: _,
|
|
1166
|
+
afterClose: o,
|
|
1136
1167
|
keyboard: r,
|
|
1137
1168
|
centered: u,
|
|
1138
1169
|
getContainer: d,
|
|
1139
1170
|
closable: x,
|
|
1140
1171
|
closeIcon: C,
|
|
1141
|
-
modalRender:
|
|
1142
|
-
focusTriggerAfterClose:
|
|
1143
|
-
}, /* @__PURE__ */ l.createElement(
|
|
1172
|
+
modalRender: E,
|
|
1173
|
+
focusTriggerAfterClose: p
|
|
1174
|
+
}, /* @__PURE__ */ l.createElement(an, Object.assign({}, e, {
|
|
1144
1175
|
confirmPrefixCls: h
|
|
1145
1176
|
})));
|
|
1146
|
-
},
|
|
1177
|
+
}, be = (e) => {
|
|
1147
1178
|
const {
|
|
1148
|
-
rootPrefixCls:
|
|
1149
|
-
iconPrefixCls:
|
|
1150
|
-
direction:
|
|
1179
|
+
rootPrefixCls: n,
|
|
1180
|
+
iconPrefixCls: t,
|
|
1181
|
+
direction: o,
|
|
1151
1182
|
theme: a
|
|
1152
1183
|
} = e;
|
|
1153
|
-
return /* @__PURE__ */ l.createElement(
|
|
1154
|
-
prefixCls:
|
|
1155
|
-
iconPrefixCls:
|
|
1156
|
-
direction:
|
|
1184
|
+
return /* @__PURE__ */ l.createElement(Le, {
|
|
1185
|
+
prefixCls: n,
|
|
1186
|
+
iconPrefixCls: t,
|
|
1187
|
+
direction: o,
|
|
1157
1188
|
theme: a
|
|
1158
|
-
}, /* @__PURE__ */ l.createElement(
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1189
|
+
}, /* @__PURE__ */ l.createElement(rn, Object.assign({}, e)));
|
|
1190
|
+
};
|
|
1191
|
+
process.env.NODE_ENV !== "production" && (rn.displayName = "ConfirmDialog", be.displayName = "ConfirmDialogWrapper");
|
|
1192
|
+
const K = [];
|
|
1193
|
+
let ln = "";
|
|
1194
|
+
function sn() {
|
|
1195
|
+
return ln;
|
|
1163
1196
|
}
|
|
1164
|
-
const
|
|
1165
|
-
var
|
|
1197
|
+
const Ot = (e) => {
|
|
1198
|
+
var n, t;
|
|
1166
1199
|
const {
|
|
1167
|
-
prefixCls:
|
|
1200
|
+
prefixCls: o,
|
|
1168
1201
|
getContainer: a,
|
|
1169
1202
|
direction: r
|
|
1170
|
-
} = e, u =
|
|
1203
|
+
} = e, u = _e(), d = Y(oe), s = sn() || d.getPrefixCls(), c = o || `${s}-modal`;
|
|
1171
1204
|
let i = a;
|
|
1172
|
-
return i === !1 && (i = void 0), /* @__PURE__ */ v.createElement(
|
|
1173
|
-
rootPrefixCls:
|
|
1174
|
-
prefixCls:
|
|
1205
|
+
return i === !1 && (i = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && Ae(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ v.createElement(be, Object.assign({}, e, {
|
|
1206
|
+
rootPrefixCls: s,
|
|
1207
|
+
prefixCls: c,
|
|
1175
1208
|
iconPrefixCls: d.iconPrefixCls,
|
|
1176
1209
|
theme: d.theme,
|
|
1177
1210
|
direction: r ?? d.direction,
|
|
1178
|
-
locale: (
|
|
1211
|
+
locale: (t = (n = d.locale) === null || n === void 0 ? void 0 : n.Modal) !== null && t !== void 0 ? t : u,
|
|
1179
1212
|
getContainer: i
|
|
1180
1213
|
}));
|
|
1181
1214
|
};
|
|
1182
|
-
function
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1215
|
+
function k(e) {
|
|
1216
|
+
const n = jn();
|
|
1217
|
+
process.env.NODE_ENV !== "production" && !n.holderRender && Bn("Modal");
|
|
1218
|
+
const t = document.createDocumentFragment();
|
|
1219
|
+
let o = Object.assign(Object.assign({}, e), {
|
|
1185
1220
|
close: d,
|
|
1186
1221
|
open: !0
|
|
1187
1222
|
}), a;
|
|
1188
1223
|
function r() {
|
|
1189
|
-
for (var
|
|
1224
|
+
for (var c = arguments.length, i = new Array(c), f = 0; f < c; f++)
|
|
1190
1225
|
i[f] = arguments[f];
|
|
1191
1226
|
const b = i.some((g) => g && g.triggerCancel);
|
|
1192
1227
|
e.onCancel && b && e.onCancel.apply(e, [() => {
|
|
1193
|
-
}].concat(
|
|
1228
|
+
}].concat(U(i.slice(1))));
|
|
1194
1229
|
for (let g = 0; g < K.length; g++)
|
|
1195
1230
|
if (K[g] === d) {
|
|
1196
1231
|
K.splice(g, 1);
|
|
1197
1232
|
break;
|
|
1198
1233
|
}
|
|
1199
|
-
|
|
1234
|
+
Xn(t);
|
|
1200
1235
|
}
|
|
1201
|
-
function u(
|
|
1236
|
+
function u(c) {
|
|
1202
1237
|
clearTimeout(a), a = setTimeout(() => {
|
|
1203
|
-
const i =
|
|
1204
|
-
|
|
1238
|
+
const i = n.getPrefixCls(void 0, sn()), f = n.getIconPrefixCls(), b = n.getTheme(), g = /* @__PURE__ */ v.createElement(Ot, Object.assign({}, c));
|
|
1239
|
+
Kn(/* @__PURE__ */ v.createElement(Le, {
|
|
1205
1240
|
prefixCls: i,
|
|
1206
1241
|
iconPrefixCls: f,
|
|
1207
1242
|
theme: b
|
|
1208
|
-
},
|
|
1243
|
+
}, n.holderRender ? n.holderRender(g) : g), t);
|
|
1209
1244
|
});
|
|
1210
1245
|
}
|
|
1211
1246
|
function d() {
|
|
1212
|
-
for (var
|
|
1247
|
+
for (var c = arguments.length, i = new Array(c), f = 0; f < c; f++)
|
|
1213
1248
|
i[f] = arguments[f];
|
|
1214
|
-
|
|
1249
|
+
o = Object.assign(Object.assign({}, o), {
|
|
1215
1250
|
open: !1,
|
|
1216
1251
|
afterClose: () => {
|
|
1217
1252
|
typeof e.afterClose == "function" && e.afterClose(), r.apply(this, i);
|
|
1218
1253
|
}
|
|
1219
|
-
}),
|
|
1254
|
+
}), o.visible && delete o.visible, u(o);
|
|
1220
1255
|
}
|
|
1221
|
-
function c
|
|
1222
|
-
typeof
|
|
1256
|
+
function s(c) {
|
|
1257
|
+
typeof c == "function" ? o = c(o) : o = Object.assign(Object.assign({}, o), c), u(o);
|
|
1223
1258
|
}
|
|
1224
|
-
return u(
|
|
1259
|
+
return u(o), K.push(d), {
|
|
1225
1260
|
destroy: d,
|
|
1226
|
-
update:
|
|
1261
|
+
update: s
|
|
1227
1262
|
};
|
|
1228
1263
|
}
|
|
1229
|
-
function
|
|
1264
|
+
function cn(e) {
|
|
1230
1265
|
return Object.assign(Object.assign({}, e), {
|
|
1231
1266
|
type: "warning"
|
|
1232
1267
|
});
|
|
1233
1268
|
}
|
|
1234
|
-
function
|
|
1269
|
+
function dn(e) {
|
|
1235
1270
|
return Object.assign(Object.assign({}, e), {
|
|
1236
1271
|
type: "info"
|
|
1237
1272
|
});
|
|
1238
1273
|
}
|
|
1239
|
-
function
|
|
1274
|
+
function un(e) {
|
|
1240
1275
|
return Object.assign(Object.assign({}, e), {
|
|
1241
1276
|
type: "success"
|
|
1242
1277
|
});
|
|
1243
1278
|
}
|
|
1244
|
-
function
|
|
1279
|
+
function fn(e) {
|
|
1245
1280
|
return Object.assign(Object.assign({}, e), {
|
|
1246
1281
|
type: "error"
|
|
1247
1282
|
});
|
|
1248
1283
|
}
|
|
1249
|
-
function
|
|
1284
|
+
function mn(e) {
|
|
1250
1285
|
return Object.assign(Object.assign({}, e), {
|
|
1251
1286
|
type: "confirm"
|
|
1252
1287
|
});
|
|
1253
1288
|
}
|
|
1254
|
-
function
|
|
1289
|
+
function Nt(e) {
|
|
1255
1290
|
let {
|
|
1256
|
-
rootPrefixCls:
|
|
1291
|
+
rootPrefixCls: n
|
|
1257
1292
|
} = e;
|
|
1258
|
-
|
|
1293
|
+
process.env.NODE_ENV !== "production" && Ae(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), ln = n;
|
|
1259
1294
|
}
|
|
1260
|
-
var
|
|
1261
|
-
var
|
|
1262
|
-
for (var
|
|
1263
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
1295
|
+
var St = function(e, n) {
|
|
1296
|
+
var t = {};
|
|
1297
|
+
for (var o in e)
|
|
1298
|
+
Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
1264
1299
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1265
|
-
for (var a = 0,
|
|
1266
|
-
|
|
1267
|
-
return
|
|
1300
|
+
for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1301
|
+
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
1302
|
+
return t;
|
|
1268
1303
|
};
|
|
1269
|
-
const
|
|
1270
|
-
var
|
|
1271
|
-
afterClose:
|
|
1304
|
+
const wt = (e, n) => {
|
|
1305
|
+
var t, {
|
|
1306
|
+
afterClose: o,
|
|
1272
1307
|
config: a
|
|
1273
|
-
} = e, r =
|
|
1274
|
-
const [u, d] = l.useState(!0), [
|
|
1308
|
+
} = e, r = St(e, ["afterClose", "config"]);
|
|
1309
|
+
const [u, d] = l.useState(!0), [s, c] = l.useState(a), {
|
|
1275
1310
|
direction: i,
|
|
1276
1311
|
getPrefixCls: f
|
|
1277
|
-
} = l.useContext(
|
|
1312
|
+
} = l.useContext(oe), b = f("modal"), g = f(), x = () => {
|
|
1278
1313
|
var m;
|
|
1279
|
-
|
|
1314
|
+
o(), (m = s.afterClose) === null || m === void 0 || m.call(s);
|
|
1280
1315
|
}, C = function() {
|
|
1281
1316
|
d(!1);
|
|
1282
|
-
for (var m = arguments.length,
|
|
1283
|
-
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
}].concat(
|
|
1317
|
+
for (var m = arguments.length, y = new Array(m), h = 0; h < m; h++)
|
|
1318
|
+
y[h] = arguments[h];
|
|
1319
|
+
const P = y.some((O) => O && O.triggerCancel);
|
|
1320
|
+
s.onCancel && P && s.onCancel.apply(s, [() => {
|
|
1321
|
+
}].concat(U(y.slice(1))));
|
|
1287
1322
|
};
|
|
1288
|
-
l.useImperativeHandle(
|
|
1323
|
+
l.useImperativeHandle(n, () => ({
|
|
1289
1324
|
destroy: C,
|
|
1290
1325
|
update: (m) => {
|
|
1291
|
-
|
|
1326
|
+
c((y) => Object.assign(Object.assign({}, y), m));
|
|
1292
1327
|
}
|
|
1293
1328
|
}));
|
|
1294
|
-
const
|
|
1295
|
-
return /* @__PURE__ */ l.createElement(
|
|
1329
|
+
const E = (t = s.okCancel) !== null && t !== void 0 ? t : s.type === "confirm", [p] = fe("Modal", zn.Modal);
|
|
1330
|
+
return /* @__PURE__ */ l.createElement(be, Object.assign({
|
|
1296
1331
|
prefixCls: b,
|
|
1297
1332
|
rootPrefixCls: g
|
|
1298
|
-
},
|
|
1333
|
+
}, s, {
|
|
1299
1334
|
close: C,
|
|
1300
1335
|
open: u,
|
|
1301
1336
|
afterClose: x,
|
|
1302
|
-
okText:
|
|
1303
|
-
direction:
|
|
1304
|
-
cancelText:
|
|
1337
|
+
okText: s.okText || (E ? p == null ? void 0 : p.okText : p == null ? void 0 : p.justOkText),
|
|
1338
|
+
direction: s.direction || i,
|
|
1339
|
+
cancelText: s.cancelText || (p == null ? void 0 : p.cancelText)
|
|
1305
1340
|
}, r));
|
|
1306
|
-
},
|
|
1307
|
-
let
|
|
1308
|
-
const
|
|
1309
|
-
const [
|
|
1310
|
-
return l.useImperativeHandle(
|
|
1311
|
-
patchElement:
|
|
1312
|
-
}), []), /* @__PURE__ */ l.createElement(l.Fragment, null,
|
|
1341
|
+
}, Pt = /* @__PURE__ */ l.forwardRef(wt);
|
|
1342
|
+
let Fe = 0;
|
|
1343
|
+
const It = /* @__PURE__ */ l.memo(/* @__PURE__ */ l.forwardRef((e, n) => {
|
|
1344
|
+
const [t, o] = tt();
|
|
1345
|
+
return l.useImperativeHandle(n, () => ({
|
|
1346
|
+
patchElement: o
|
|
1347
|
+
}), []), /* @__PURE__ */ l.createElement(l.Fragment, null, t);
|
|
1313
1348
|
}));
|
|
1314
|
-
function
|
|
1315
|
-
const e = l.useRef(null), [
|
|
1349
|
+
function Tt() {
|
|
1350
|
+
const e = l.useRef(null), [n, t] = l.useState([]);
|
|
1316
1351
|
l.useEffect(() => {
|
|
1317
|
-
|
|
1352
|
+
n.length && (U(n).forEach((u) => {
|
|
1318
1353
|
u();
|
|
1319
|
-
}),
|
|
1320
|
-
}, [
|
|
1321
|
-
const
|
|
1322
|
-
var
|
|
1323
|
-
|
|
1324
|
-
const
|
|
1354
|
+
}), t([]));
|
|
1355
|
+
}, [n]);
|
|
1356
|
+
const o = l.useCallback((r) => function(d) {
|
|
1357
|
+
var s;
|
|
1358
|
+
Fe += 1;
|
|
1359
|
+
const c = /* @__PURE__ */ l.createRef();
|
|
1325
1360
|
let i;
|
|
1326
|
-
const f = new Promise((
|
|
1327
|
-
i =
|
|
1361
|
+
const f = new Promise((E) => {
|
|
1362
|
+
i = E;
|
|
1328
1363
|
});
|
|
1329
1364
|
let b = !1, g;
|
|
1330
|
-
const x = /* @__PURE__ */ l.createElement(
|
|
1331
|
-
key: `modal-${
|
|
1365
|
+
const x = /* @__PURE__ */ l.createElement(Pt, {
|
|
1366
|
+
key: `modal-${Fe}`,
|
|
1332
1367
|
config: r(d),
|
|
1333
|
-
ref:
|
|
1368
|
+
ref: c,
|
|
1334
1369
|
afterClose: () => {
|
|
1335
1370
|
g == null || g();
|
|
1336
1371
|
},
|
|
1337
1372
|
isSilent: () => b,
|
|
1338
|
-
onConfirm: (
|
|
1339
|
-
i(
|
|
1373
|
+
onConfirm: (E) => {
|
|
1374
|
+
i(E);
|
|
1340
1375
|
}
|
|
1341
1376
|
});
|
|
1342
|
-
return g = (
|
|
1377
|
+
return g = (s = e.current) === null || s === void 0 ? void 0 : s.patchElement(x), g && K.push(g), {
|
|
1343
1378
|
destroy: () => {
|
|
1344
|
-
function
|
|
1345
|
-
var
|
|
1346
|
-
(
|
|
1379
|
+
function E() {
|
|
1380
|
+
var p;
|
|
1381
|
+
(p = c.current) === null || p === void 0 || p.destroy();
|
|
1347
1382
|
}
|
|
1348
|
-
|
|
1383
|
+
c.current ? E() : t((p) => [].concat(U(p), [E]));
|
|
1349
1384
|
},
|
|
1350
|
-
update: (
|
|
1351
|
-
function
|
|
1385
|
+
update: (E) => {
|
|
1386
|
+
function p() {
|
|
1352
1387
|
var m;
|
|
1353
|
-
(m =
|
|
1388
|
+
(m = c.current) === null || m === void 0 || m.update(E);
|
|
1354
1389
|
}
|
|
1355
|
-
|
|
1390
|
+
c.current ? p() : t((m) => [].concat(U(m), [p]));
|
|
1356
1391
|
},
|
|
1357
|
-
then: (
|
|
1392
|
+
then: (E) => (b = !0, f.then(E))
|
|
1358
1393
|
};
|
|
1359
1394
|
}, []);
|
|
1360
1395
|
return [l.useMemo(() => ({
|
|
1361
|
-
info:
|
|
1362
|
-
success:
|
|
1363
|
-
error:
|
|
1364
|
-
warning:
|
|
1365
|
-
confirm:
|
|
1366
|
-
}), []), /* @__PURE__ */ l.createElement(
|
|
1396
|
+
info: o(dn),
|
|
1397
|
+
success: o(un),
|
|
1398
|
+
error: o(fn),
|
|
1399
|
+
warning: o(cn),
|
|
1400
|
+
confirm: o(mn)
|
|
1401
|
+
}), []), /* @__PURE__ */ l.createElement(It, {
|
|
1367
1402
|
key: "modal-holder",
|
|
1368
1403
|
ref: e
|
|
1369
1404
|
})];
|
|
1370
1405
|
}
|
|
1371
|
-
var
|
|
1372
|
-
var
|
|
1373
|
-
for (var
|
|
1374
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
1406
|
+
var Rt = function(e, n) {
|
|
1407
|
+
var t = {};
|
|
1408
|
+
for (var o in e)
|
|
1409
|
+
Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
1375
1410
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1376
|
-
for (var a = 0,
|
|
1377
|
-
|
|
1378
|
-
return
|
|
1411
|
+
for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
1412
|
+
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
1413
|
+
return t;
|
|
1379
1414
|
};
|
|
1380
|
-
const
|
|
1415
|
+
const Mt = (e) => {
|
|
1381
1416
|
const {
|
|
1382
|
-
prefixCls:
|
|
1383
|
-
className:
|
|
1384
|
-
closeIcon:
|
|
1417
|
+
prefixCls: n,
|
|
1418
|
+
className: t,
|
|
1419
|
+
closeIcon: o,
|
|
1385
1420
|
closable: a,
|
|
1386
1421
|
type: r,
|
|
1387
1422
|
title: u,
|
|
1388
1423
|
children: d,
|
|
1389
|
-
footer:
|
|
1390
|
-
} = e,
|
|
1424
|
+
footer: s
|
|
1425
|
+
} = e, c = Rt(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
|
|
1391
1426
|
getPrefixCls: i
|
|
1392
|
-
} = l.useContext(
|
|
1427
|
+
} = l.useContext(oe), f = i(), b = n || i("modal"), g = Ve(f), [x, C, E] = tn(b, g), p = `${b}-confirm`;
|
|
1393
1428
|
let m = {};
|
|
1394
1429
|
return r ? m = {
|
|
1395
1430
|
closable: a ?? !1,
|
|
1396
1431
|
title: "",
|
|
1397
1432
|
footer: "",
|
|
1398
|
-
children: /* @__PURE__ */ l.createElement(
|
|
1433
|
+
children: /* @__PURE__ */ l.createElement(an, Object.assign({}, e, {
|
|
1399
1434
|
prefixCls: b,
|
|
1400
|
-
confirmPrefixCls:
|
|
1435
|
+
confirmPrefixCls: p,
|
|
1401
1436
|
rootPrefixCls: f,
|
|
1402
1437
|
content: d
|
|
1403
1438
|
}))
|
|
1404
1439
|
} : m = {
|
|
1405
1440
|
closable: a ?? !0,
|
|
1406
1441
|
title: u,
|
|
1407
|
-
footer:
|
|
1442
|
+
footer: s !== null && /* @__PURE__ */ l.createElement(ke, Object.assign({}, e)),
|
|
1408
1443
|
children: d
|
|
1409
|
-
}, x(/* @__PURE__ */ l.createElement(
|
|
1444
|
+
}, x(/* @__PURE__ */ l.createElement(ve, Object.assign({
|
|
1410
1445
|
prefixCls: b,
|
|
1411
|
-
className: w(C, `${b}-pure-panel`, r &&
|
|
1412
|
-
},
|
|
1413
|
-
closeIcon:
|
|
1446
|
+
className: w(C, `${b}-pure-panel`, r && p, r && `${p}-${r}`, t, E, g)
|
|
1447
|
+
}, c, {
|
|
1448
|
+
closeIcon: Je(b, o),
|
|
1414
1449
|
closable: a
|
|
1415
1450
|
}, m)));
|
|
1416
|
-
},
|
|
1417
|
-
function
|
|
1418
|
-
return
|
|
1451
|
+
}, jt = Qn(Mt);
|
|
1452
|
+
function gn(e) {
|
|
1453
|
+
return k(cn(e));
|
|
1419
1454
|
}
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
return
|
|
1455
|
+
const B = on;
|
|
1456
|
+
B.useModal = Tt;
|
|
1457
|
+
B.info = function(n) {
|
|
1458
|
+
return k(dn(n));
|
|
1424
1459
|
};
|
|
1425
|
-
|
|
1426
|
-
return
|
|
1460
|
+
B.success = function(n) {
|
|
1461
|
+
return k(un(n));
|
|
1427
1462
|
};
|
|
1428
|
-
|
|
1429
|
-
return
|
|
1463
|
+
B.error = function(n) {
|
|
1464
|
+
return k(fn(n));
|
|
1430
1465
|
};
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
return
|
|
1466
|
+
B.warning = gn;
|
|
1467
|
+
B.warn = gn;
|
|
1468
|
+
B.confirm = function(n) {
|
|
1469
|
+
return k(mn(n));
|
|
1435
1470
|
};
|
|
1436
|
-
|
|
1471
|
+
B.destroyAll = function() {
|
|
1437
1472
|
for (; K.length; ) {
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1473
|
+
const n = K.pop();
|
|
1474
|
+
n && n();
|
|
1440
1475
|
}
|
|
1441
1476
|
};
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1477
|
+
B.config = Nt;
|
|
1478
|
+
B._InternalPanelDoNotUseOrYouWillBeFired = jt;
|
|
1479
|
+
process.env.NODE_ENV !== "production" && (B.displayName = "Modal");
|
|
1480
|
+
function Vt(e) {
|
|
1481
|
+
const n = {
|
|
1446
1482
|
open: e.open === void 0 ? !0 : e.open,
|
|
1447
1483
|
onClose: e.onClose || (() => {
|
|
1448
1484
|
})
|
|
1449
1485
|
};
|
|
1450
|
-
return /* @__PURE__ */
|
|
1451
|
-
|
|
1486
|
+
return /* @__PURE__ */ ye(
|
|
1487
|
+
B,
|
|
1452
1488
|
{
|
|
1453
1489
|
title: "Notification Preferences",
|
|
1454
|
-
open:
|
|
1490
|
+
open: n.open,
|
|
1455
1491
|
onCancel: () => {
|
|
1456
|
-
|
|
1492
|
+
n.onClose();
|
|
1457
1493
|
},
|
|
1458
1494
|
footer: null,
|
|
1459
|
-
children: /* @__PURE__ */
|
|
1495
|
+
children: /* @__PURE__ */ ye(yn, {})
|
|
1460
1496
|
}
|
|
1461
1497
|
);
|
|
1462
1498
|
}
|
|
1463
1499
|
export {
|
|
1464
|
-
|
|
1500
|
+
Vt as NotificationPreferencesPopup
|
|
1465
1501
|
};
|