gasp-components 1.0.10 → 1.0.11
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/UploadOutlined-9WKjHsqa.js +878 -0
- package/dist/components/ag-grid-table/index.js +57877 -38314
- package/dist/components/button/index.js +18 -18
- package/dist/components/checklist/checklist-item.js +3 -3
- package/dist/components/checklist/index.js +5 -5
- package/dist/components/date-picker/index.js +9 -5022
- package/dist/components/dragger/index.js +28 -28
- package/dist/components/dropdown/index.js +10 -11
- package/dist/components/form/index.js +8 -9
- package/dist/components/form-item/index.js +10 -10
- package/dist/components/input/index.js +8 -8
- package/dist/components/modal/index.js +18 -20
- package/dist/components/password-input/index.js +2 -2
- package/dist/components/progress/index.js +16 -18
- package/dist/components/progress-circle/index.js +3 -3
- package/dist/components/radio-button/index.js +8 -8
- package/dist/components/result-popup/index.js +13 -14
- package/dist/components/select/index.js +1 -1
- package/dist/components/side-menu/index.js +2 -2
- package/dist/components/side-menu/menu-item.js +4 -6
- package/dist/components/steps/index.js +9 -9
- package/dist/components/table/index.js +16 -9298
- package/dist/components/tabs/index.js +10 -10
- package/dist/components/tabs/tab.js +7 -8
- package/dist/components/tag/index.js +9 -258
- package/dist/components/timeline-horizontal/index.js +7 -7
- package/dist/components/upload/index.js +62 -77
- package/dist/index-WlPrqxgY.js +87 -0
- package/dist/main.js +69 -457
- package/package.json +1 -1
- package/dist/CheckCircleFilled-xt-0R96Z.js +0 -16
- package/dist/CheckOutlined-EgxCAgj_.js +0 -16
- package/dist/CloseCircleFilled-bIgIULWb.js +0 -16
- package/dist/CloseOutlined-Q3kC3EZS.js +0 -16
- package/dist/Compact-fdEKV_mF.js +0 -180
- package/dist/ExclamationCircleFilled-XzDBEGmA.js +0 -16
- package/dist/KeyCode-qFRXB1-n.js +0 -517
- package/dist/LoadingOutlined-6Ipqn0og.js +0 -16
- package/dist/Overflow-JFdXKgCr.js +0 -231
- package/dist/PurePanel-hLGnXbul.js +0 -60
- package/dist/SearchOutlined-rJTFGXUi.js +0 -16
- package/dist/TextArea-n3dknzTq.js +0 -716
- package/dist/UploadOutlined-D8jfLEgv.js +0 -27
- package/dist/asyncToGenerator-t4sKr8R4.js +0 -340
- package/dist/button-LN5ZDad8.js +0 -819
- package/dist/collapse-ilv4Tji1.js +0 -20
- package/dist/colors-opGg9oSz.js +0 -25
- package/dist/compact-item-jjuVmDBH.js +0 -61
- package/dist/context-h3WSVDPz.js +0 -2087
- package/dist/createFormattedComponent-FcpICAm8.js +0 -3260
- package/dist/index--6VfGMUo.js +0 -402
- package/dist/index-0mpuHoS5.js +0 -996
- package/dist/index-1KQbTQJ2.js +0 -4405
- package/dist/index-5Uo03BMk.js +0 -681
- package/dist/index-BFgxz47K.js +0 -89
- package/dist/index-D3LMPWyJ.js +0 -1437
- package/dist/index-DVS_nWxv.js +0 -3026
- package/dist/index-ELHBhuK9.js +0 -100
- package/dist/index-Fn8q8B3V.js +0 -107
- package/dist/index-GgkQrebz.js +0 -950
- package/dist/index-L-MzVDcK.js +0 -616
- package/dist/index-M3WnMjiA.js +0 -230
- package/dist/index-NQd_zMf0.js +0 -69
- package/dist/index-ZT64Ec6u.js +0 -267
- package/dist/index-aawDqn9q.js +0 -3337
- package/dist/index-k04G4nlS.js +0 -1416
- package/dist/index-s3u4YBl4.js +0 -8
- package/dist/index-vtDVJV8q.js +0 -19571
- package/dist/isVisible-Qi9l15Ty.js +0 -232
- package/dist/motion-0ToOu81j.js +0 -226
- package/dist/motion-NQme0FJ_.js +0 -32
- package/dist/omit-ylWA0ZLZ.js +0 -10
- package/dist/pickAttrs-zaQzRTqh.js +0 -42
- package/dist/progress-a1_pwKVT.js +0 -722
- package/dist/reactNode-R20zZQk1.js +0 -18
- package/dist/responsiveObserver-V1_1G14X.js +0 -71
- package/dist/roundedArrow-p1Pmd9av.js +0 -64
- package/dist/row-sPFiFm0C.js +0 -230
- package/dist/slide-mFXPRHku.js +0 -265
- package/dist/styleChecker-pZ3k2IiY.js +0 -37
- package/dist/useCSSVarCls-GwZT_WiF.js +0 -9
- package/dist/useClosable-4G12n4Bp.js +0 -15
- package/dist/useLocale-eThlLZJw.js +0 -16
- package/dist/useMergedState-qUafLuUa.js +0 -23
- package/dist/useVariants-s0IcneBD.js +0 -25
- package/dist/zoom-Ps8y0jNW.js +0 -174
package/dist/index-D3LMPWyJ.js
DELETED
|
@@ -1,1437 +0,0 @@
|
|
|
1
|
-
import { C as fe, h as nt, r as De, d as ie, m as rt, i as B, F as ot, ac as lt, D as pe, a1 as it, ad as at, ae as st, S as ct, y as Ne, G as dt, B as ut, e as mt, l as ft, z as pt, a as gt, s as ht, af as bt } from "./index-1KQbTQJ2.js";
|
|
2
|
-
import { c as K } from "./index-NQd_zMf0.js";
|
|
3
|
-
import * as l from "react";
|
|
4
|
-
import { useMemo as xe, useEffect as yt, useContext as We, useRef as ye } from "react";
|
|
5
|
-
import { i as Me } from "./motion-NQme0FJ_.js";
|
|
6
|
-
import { a as $e, u as Ct, V as vt, b as He, c as J, R as xt, F as ue, d as Ae, C as $t, L as Et, W as wt, e as St, f as It } from "./context-h3WSVDPz.js";
|
|
7
|
-
import { z as ze } from "./zoom-Ps8y0jNW.js";
|
|
8
|
-
import { g as Ft } from "./collapse-ilv4Tji1.js";
|
|
9
|
-
import { u as Ee } from "./useCSSVarCls-GwZT_WiF.js";
|
|
10
|
-
import { b as Ot, t as Nt } from "./Compact-fdEKV_mF.js";
|
|
11
|
-
import { i as Mt, c as Pt } from "./reactNode-R20zZQk1.js";
|
|
12
|
-
import { A as Vt, i as jt } from "./isVisible-Qi9l15Ty.js";
|
|
13
|
-
import { o as _t } from "./omit-ylWA0ZLZ.js";
|
|
14
|
-
import { a as Rt, u as Lt, R as Tt } from "./row-sPFiFm0C.js";
|
|
15
|
-
import { T as Dt } from "./index-5Uo03BMk.js";
|
|
16
|
-
import { u as Wt } from "./useLocale-eThlLZJw.js";
|
|
17
|
-
import { C as Ht } from "./CheckCircleFilled-xt-0R96Z.js";
|
|
18
|
-
import { C as At } from "./CloseCircleFilled-bIgIULWb.js";
|
|
19
|
-
import { E as zt } from "./ExclamationCircleFilled-XzDBEGmA.js";
|
|
20
|
-
import { L as qt } from "./LoadingOutlined-6Ipqn0og.js";
|
|
21
|
-
const Pe = (e) => typeof e == "object" && e != null && e.nodeType === 1, Ve = (e, t) => (!t || e !== "hidden") && e !== "visible" && e !== "clip", Ce = (e, t) => {
|
|
22
|
-
if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
|
|
23
|
-
const r = getComputedStyle(e, null);
|
|
24
|
-
return Ve(r.overflowY, t) || Ve(r.overflowX, t) || ((n) => {
|
|
25
|
-
const o = ((i) => {
|
|
26
|
-
if (!i.ownerDocument || !i.ownerDocument.defaultView)
|
|
27
|
-
return null;
|
|
28
|
-
try {
|
|
29
|
-
return i.ownerDocument.defaultView.frameElement;
|
|
30
|
-
} catch {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
})(n);
|
|
34
|
-
return !!o && (o.clientHeight < n.scrollHeight || o.clientWidth < n.scrollWidth);
|
|
35
|
-
})(e);
|
|
36
|
-
}
|
|
37
|
-
return !1;
|
|
38
|
-
}, ce = (e, t, r, n, o, i, a, s) => i < e && a > t || i > e && a < t ? 0 : i <= e && s <= r || a >= t && s >= r ? i - e - n : a > t && s < r || i < e && s > r ? a - t + o : 0, Bt = (e) => {
|
|
39
|
-
const t = e.parentElement;
|
|
40
|
-
return t ?? (e.getRootNode().host || null);
|
|
41
|
-
}, je = (e, t) => {
|
|
42
|
-
var r, n, o, i;
|
|
43
|
-
if (typeof document > "u")
|
|
44
|
-
return [];
|
|
45
|
-
const { scrollMode: a, block: s, inline: d, boundary: m, skipOverflowHiddenElements: y } = t, p = typeof m == "function" ? m : (R) => R !== m;
|
|
46
|
-
if (!Pe(e))
|
|
47
|
-
throw new TypeError("Invalid target");
|
|
48
|
-
const P = document.scrollingElement || document.documentElement, S = [];
|
|
49
|
-
let C = e;
|
|
50
|
-
for (; Pe(C) && p(C); ) {
|
|
51
|
-
if (C = Bt(C), C === P) {
|
|
52
|
-
S.push(C);
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
C != null && C === document.body && Ce(C) && !Ce(document.documentElement) || C != null && Ce(C, y) && S.push(C);
|
|
56
|
-
}
|
|
57
|
-
const O = (n = (r = window.visualViewport) == null ? void 0 : r.width) != null ? n : innerWidth, N = (i = (o = window.visualViewport) == null ? void 0 : o.height) != null ? i : innerHeight, { scrollX: u, scrollY: c } = window, { height: f, width: g, top: h, right: $, bottom: I, left: v } = e.getBoundingClientRect(), { top: b, right: V, bottom: W, left: k } = ((R) => {
|
|
58
|
-
const x = window.getComputedStyle(R);
|
|
59
|
-
return { top: parseFloat(x.scrollMarginTop) || 0, right: parseFloat(x.scrollMarginRight) || 0, bottom: parseFloat(x.scrollMarginBottom) || 0, left: parseFloat(x.scrollMarginLeft) || 0 };
|
|
60
|
-
})(e);
|
|
61
|
-
let F = s === "start" || s === "nearest" ? h - b : s === "end" ? I + W : h + f / 2 - b + W, w = d === "center" ? v + g / 2 - k + V : d === "end" ? $ + V : v - k;
|
|
62
|
-
const L = [];
|
|
63
|
-
for (let R = 0; R < S.length; R++) {
|
|
64
|
-
const x = S[R], { height: H, width: ee, top: te, right: A, bottom: z, left: X } = x.getBoundingClientRect();
|
|
65
|
-
if (a === "if-needed" && h >= 0 && v >= 0 && I <= N && $ <= O && h >= te && I <= z && v >= X && $ <= A)
|
|
66
|
-
return L;
|
|
67
|
-
const Y = getComputedStyle(x), Q = parseInt(Y.borderLeftWidth, 10), T = parseInt(Y.borderTopWidth, 10), E = parseInt(Y.borderRightWidth, 10), j = parseInt(Y.borderBottomWidth, 10);
|
|
68
|
-
let M = 0, D = 0;
|
|
69
|
-
const q = "offsetWidth" in x ? x.offsetWidth - x.clientWidth - Q - E : 0, G = "offsetHeight" in x ? x.offsetHeight - x.clientHeight - T - j : 0, ne = "offsetWidth" in x ? x.offsetWidth === 0 ? 0 : ee / x.offsetWidth : 0, U = "offsetHeight" in x ? x.offsetHeight === 0 ? 0 : H / x.offsetHeight : 0;
|
|
70
|
-
if (P === x)
|
|
71
|
-
M = s === "start" ? F : s === "end" ? F - N : s === "nearest" ? ce(c, c + N, N, T, j, c + F, c + F + f, f) : F - N / 2, D = d === "start" ? w : d === "center" ? w - O / 2 : d === "end" ? w - O : ce(u, u + O, O, Q, E, u + w, u + w + g, g), M = Math.max(0, M + c), D = Math.max(0, D + u);
|
|
72
|
-
else {
|
|
73
|
-
M = s === "start" ? F - te - T : s === "end" ? F - z + j + G : s === "nearest" ? ce(te, z, H, T, j + G, F, F + f, f) : F - (te + H / 2) + G / 2, D = d === "start" ? w - X - Q : d === "center" ? w - (X + ee / 2) + q / 2 : d === "end" ? w - A + E + q : ce(X, A, ee, Q, E + q, w, w + g, g);
|
|
74
|
-
const { scrollLeft: _, scrollTop: re } = x;
|
|
75
|
-
M = U === 0 ? 0 : Math.max(0, Math.min(re + M / U, x.scrollHeight - H / U + G)), D = ne === 0 ? 0 : Math.max(0, Math.min(_ + D / ne, x.scrollWidth - ee / ne + q)), F += re - M, w += _ - D;
|
|
76
|
-
}
|
|
77
|
-
L.push({ el: x, top: M, left: D });
|
|
78
|
-
}
|
|
79
|
-
return L;
|
|
80
|
-
}, kt = (e) => e === !1 ? { block: "end", inline: "nearest" } : ((t) => t === Object(t) && Object.keys(t).length !== 0)(e) ? e : { block: "start", inline: "nearest" };
|
|
81
|
-
function Xt(e, t) {
|
|
82
|
-
if (!e.isConnected || !((o) => {
|
|
83
|
-
let i = o;
|
|
84
|
-
for (; i && i.parentNode; ) {
|
|
85
|
-
if (i.parentNode === document)
|
|
86
|
-
return !0;
|
|
87
|
-
i = i.parentNode instanceof ShadowRoot ? i.parentNode.host : i.parentNode;
|
|
88
|
-
}
|
|
89
|
-
return !1;
|
|
90
|
-
})(e))
|
|
91
|
-
return;
|
|
92
|
-
const r = ((o) => {
|
|
93
|
-
const i = window.getComputedStyle(o);
|
|
94
|
-
return { top: parseFloat(i.scrollMarginTop) || 0, right: parseFloat(i.scrollMarginRight) || 0, bottom: parseFloat(i.scrollMarginBottom) || 0, left: parseFloat(i.scrollMarginLeft) || 0 };
|
|
95
|
-
})(e);
|
|
96
|
-
if (((o) => typeof o == "object" && typeof o.behavior == "function")(t))
|
|
97
|
-
return t.behavior(je(e, t));
|
|
98
|
-
const n = typeof t == "boolean" || t == null ? void 0 : t.behavior;
|
|
99
|
-
for (const { el: o, top: i, left: a } of je(e, kt(t))) {
|
|
100
|
-
const s = i - r.top + r.bottom, d = a - r.left + r.right;
|
|
101
|
-
o.scroll({ top: s, left: d, behavior: n });
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
var Gt = function(e, t) {
|
|
105
|
-
var r = {};
|
|
106
|
-
for (var n in e)
|
|
107
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
108
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
109
|
-
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
110
|
-
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
111
|
-
return r;
|
|
112
|
-
};
|
|
113
|
-
function Kt(e) {
|
|
114
|
-
return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
|
|
115
|
-
}
|
|
116
|
-
const Yt = ["xs", "sm", "md", "lg", "xl", "xxl"], qe = /* @__PURE__ */ l.forwardRef((e, t) => {
|
|
117
|
-
const {
|
|
118
|
-
getPrefixCls: r,
|
|
119
|
-
direction: n
|
|
120
|
-
} = l.useContext(fe), {
|
|
121
|
-
gutter: o,
|
|
122
|
-
wrap: i
|
|
123
|
-
} = l.useContext(Rt), {
|
|
124
|
-
prefixCls: a,
|
|
125
|
-
span: s,
|
|
126
|
-
order: d,
|
|
127
|
-
offset: m,
|
|
128
|
-
push: y,
|
|
129
|
-
pull: p,
|
|
130
|
-
className: P,
|
|
131
|
-
children: S,
|
|
132
|
-
flex: C,
|
|
133
|
-
style: O
|
|
134
|
-
} = e, N = Gt(e, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]), u = r("col", a), [c, f, g] = Lt(u);
|
|
135
|
-
let h = {};
|
|
136
|
-
Yt.forEach((v) => {
|
|
137
|
-
let b = {};
|
|
138
|
-
const V = e[v];
|
|
139
|
-
typeof V == "number" ? b.span = V : typeof V == "object" && (b = V || {}), delete N[v], h = Object.assign(Object.assign({}, h), {
|
|
140
|
-
[`${u}-${v}-${b.span}`]: b.span !== void 0,
|
|
141
|
-
[`${u}-${v}-order-${b.order}`]: b.order || b.order === 0,
|
|
142
|
-
[`${u}-${v}-offset-${b.offset}`]: b.offset || b.offset === 0,
|
|
143
|
-
[`${u}-${v}-push-${b.push}`]: b.push || b.push === 0,
|
|
144
|
-
[`${u}-${v}-pull-${b.pull}`]: b.pull || b.pull === 0,
|
|
145
|
-
[`${u}-${v}-flex-${b.flex}`]: b.flex || b.flex === "auto",
|
|
146
|
-
[`${u}-rtl`]: n === "rtl"
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
const $ = K(u, {
|
|
150
|
-
[`${u}-${s}`]: s !== void 0,
|
|
151
|
-
[`${u}-order-${d}`]: d,
|
|
152
|
-
[`${u}-offset-${m}`]: m,
|
|
153
|
-
[`${u}-push-${y}`]: y,
|
|
154
|
-
[`${u}-pull-${p}`]: p
|
|
155
|
-
}, P, h, f, g), I = {};
|
|
156
|
-
if (o && o[0] > 0) {
|
|
157
|
-
const v = o[0] / 2;
|
|
158
|
-
I.paddingLeft = v, I.paddingRight = v;
|
|
159
|
-
}
|
|
160
|
-
return C && (I.flex = Kt(C), i === !1 && !I.minWidth && (I.minWidth = 0)), c(/* @__PURE__ */ l.createElement("div", Object.assign({}, N, {
|
|
161
|
-
style: Object.assign(Object.assign({}, I), O),
|
|
162
|
-
className: $,
|
|
163
|
-
ref: t
|
|
164
|
-
}), S));
|
|
165
|
-
});
|
|
166
|
-
process.env.NODE_ENV !== "production" && (qe.displayName = "Col");
|
|
167
|
-
const Be = qe;
|
|
168
|
-
function me(e) {
|
|
169
|
-
const [t, r] = l.useState(e);
|
|
170
|
-
return l.useEffect(() => {
|
|
171
|
-
const n = setTimeout(() => {
|
|
172
|
-
r(e);
|
|
173
|
-
}, e.length ? 0 : 10);
|
|
174
|
-
return () => {
|
|
175
|
-
clearTimeout(n);
|
|
176
|
-
};
|
|
177
|
-
}, [e]), t;
|
|
178
|
-
}
|
|
179
|
-
const Qt = (e) => {
|
|
180
|
-
const {
|
|
181
|
-
componentCls: t
|
|
182
|
-
} = e, r = `${t}-show-help`, n = `${t}-show-help-item`;
|
|
183
|
-
return {
|
|
184
|
-
[r]: {
|
|
185
|
-
// Explain holder
|
|
186
|
-
transition: `opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
187
|
-
"&-appear, &-enter": {
|
|
188
|
-
opacity: 0,
|
|
189
|
-
"&-active": {
|
|
190
|
-
opacity: 1
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"&-leave": {
|
|
194
|
-
opacity: 1,
|
|
195
|
-
"&-active": {
|
|
196
|
-
opacity: 0
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
// Explain
|
|
200
|
-
[n]: {
|
|
201
|
-
overflow: "hidden",
|
|
202
|
-
transition: `height ${e.motionDurationSlow} ${e.motionEaseInOut},
|
|
203
|
-
opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
|
|
204
|
-
transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,
|
|
205
|
-
[`&${n}-appear, &${n}-enter`]: {
|
|
206
|
-
transform: "translateY(-5px)",
|
|
207
|
-
opacity: 0,
|
|
208
|
-
"&-active": {
|
|
209
|
-
transform: "translateY(0)",
|
|
210
|
-
opacity: 1
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
[`&${n}-leave-active`]: {
|
|
214
|
-
transform: "translateY(-5px)"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}, Ut = Qt, Jt = (e) => ({
|
|
220
|
-
legend: {
|
|
221
|
-
display: "block",
|
|
222
|
-
width: "100%",
|
|
223
|
-
marginBottom: e.marginLG,
|
|
224
|
-
padding: 0,
|
|
225
|
-
color: e.colorTextDescription,
|
|
226
|
-
fontSize: e.fontSizeLG,
|
|
227
|
-
lineHeight: "inherit",
|
|
228
|
-
border: 0,
|
|
229
|
-
borderBottom: `${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
230
|
-
},
|
|
231
|
-
'input[type="search"]': {
|
|
232
|
-
boxSizing: "border-box"
|
|
233
|
-
},
|
|
234
|
-
// Position radios and checkboxes better
|
|
235
|
-
'input[type="radio"], input[type="checkbox"]': {
|
|
236
|
-
lineHeight: "normal"
|
|
237
|
-
},
|
|
238
|
-
'input[type="file"]': {
|
|
239
|
-
display: "block"
|
|
240
|
-
},
|
|
241
|
-
// Make range inputs behave like textual form controls
|
|
242
|
-
'input[type="range"]': {
|
|
243
|
-
display: "block",
|
|
244
|
-
width: "100%"
|
|
245
|
-
},
|
|
246
|
-
// Make multiple select elements height not fixed
|
|
247
|
-
"select[multiple], select[size]": {
|
|
248
|
-
height: "auto"
|
|
249
|
-
},
|
|
250
|
-
// Focus for file, radio, and checkbox
|
|
251
|
-
"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
|
|
252
|
-
outline: 0,
|
|
253
|
-
boxShadow: `0 0 0 ${ie(e.controlOutlineWidth)} ${e.controlOutline}`
|
|
254
|
-
},
|
|
255
|
-
// Adjust output element
|
|
256
|
-
output: {
|
|
257
|
-
display: "block",
|
|
258
|
-
paddingTop: 15,
|
|
259
|
-
color: e.colorText,
|
|
260
|
-
fontSize: e.fontSize,
|
|
261
|
-
lineHeight: e.lineHeight
|
|
262
|
-
}
|
|
263
|
-
}), _e = (e, t) => {
|
|
264
|
-
const {
|
|
265
|
-
formItemCls: r
|
|
266
|
-
} = e;
|
|
267
|
-
return {
|
|
268
|
-
[r]: {
|
|
269
|
-
[`${r}-label > label`]: {
|
|
270
|
-
height: t
|
|
271
|
-
},
|
|
272
|
-
[`${r}-control-input`]: {
|
|
273
|
-
minHeight: t
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
}, Zt = (e) => {
|
|
278
|
-
const {
|
|
279
|
-
componentCls: t
|
|
280
|
-
} = e;
|
|
281
|
-
return {
|
|
282
|
-
[e.componentCls]: Object.assign(Object.assign(Object.assign({}, De(e)), Jt(e)), {
|
|
283
|
-
[`${t}-text`]: {
|
|
284
|
-
display: "inline-block",
|
|
285
|
-
paddingInlineEnd: e.paddingSM
|
|
286
|
-
},
|
|
287
|
-
// ================================================================
|
|
288
|
-
// = Size =
|
|
289
|
-
// ================================================================
|
|
290
|
-
"&-small": Object.assign({}, _e(e, e.controlHeightSM)),
|
|
291
|
-
"&-large": Object.assign({}, _e(e, e.controlHeightLG))
|
|
292
|
-
})
|
|
293
|
-
};
|
|
294
|
-
}, en = (e) => {
|
|
295
|
-
const {
|
|
296
|
-
formItemCls: t,
|
|
297
|
-
iconCls: r,
|
|
298
|
-
componentCls: n,
|
|
299
|
-
rootPrefixCls: o,
|
|
300
|
-
labelRequiredMarkColor: i,
|
|
301
|
-
labelColor: a,
|
|
302
|
-
labelFontSize: s,
|
|
303
|
-
labelHeight: d,
|
|
304
|
-
labelColonMarginInlineStart: m,
|
|
305
|
-
labelColonMarginInlineEnd: y,
|
|
306
|
-
itemMarginBottom: p
|
|
307
|
-
} = e;
|
|
308
|
-
return {
|
|
309
|
-
[t]: Object.assign(Object.assign({}, De(e)), {
|
|
310
|
-
marginBottom: p,
|
|
311
|
-
verticalAlign: "top",
|
|
312
|
-
"&-with-help": {
|
|
313
|
-
transition: "none"
|
|
314
|
-
},
|
|
315
|
-
[`&-hidden,
|
|
316
|
-
&-hidden.${o}-row`]: {
|
|
317
|
-
// https://github.com/ant-design/ant-design/issues/26141
|
|
318
|
-
display: "none"
|
|
319
|
-
},
|
|
320
|
-
"&-has-warning": {
|
|
321
|
-
[`${t}-split`]: {
|
|
322
|
-
color: e.colorError
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
"&-has-error": {
|
|
326
|
-
[`${t}-split`]: {
|
|
327
|
-
color: e.colorWarning
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
// ==============================================================
|
|
331
|
-
// = Label =
|
|
332
|
-
// ==============================================================
|
|
333
|
-
[`${t}-label`]: {
|
|
334
|
-
flexGrow: 0,
|
|
335
|
-
overflow: "hidden",
|
|
336
|
-
whiteSpace: "nowrap",
|
|
337
|
-
textAlign: "end",
|
|
338
|
-
verticalAlign: "middle",
|
|
339
|
-
"&-left": {
|
|
340
|
-
textAlign: "start"
|
|
341
|
-
},
|
|
342
|
-
"&-wrap": {
|
|
343
|
-
overflow: "unset",
|
|
344
|
-
lineHeight: e.lineHeight,
|
|
345
|
-
whiteSpace: "unset"
|
|
346
|
-
},
|
|
347
|
-
"> label": {
|
|
348
|
-
position: "relative",
|
|
349
|
-
display: "inline-flex",
|
|
350
|
-
alignItems: "center",
|
|
351
|
-
maxWidth: "100%",
|
|
352
|
-
height: d,
|
|
353
|
-
color: a,
|
|
354
|
-
fontSize: s,
|
|
355
|
-
[`> ${r}`]: {
|
|
356
|
-
fontSize: e.fontSize,
|
|
357
|
-
verticalAlign: "top"
|
|
358
|
-
},
|
|
359
|
-
// Required mark
|
|
360
|
-
[`&${t}-required:not(${t}-required-mark-optional)::before`]: {
|
|
361
|
-
display: "inline-block",
|
|
362
|
-
marginInlineEnd: e.marginXXS,
|
|
363
|
-
color: i,
|
|
364
|
-
fontSize: e.fontSize,
|
|
365
|
-
fontFamily: "SimSun, sans-serif",
|
|
366
|
-
lineHeight: 1,
|
|
367
|
-
content: '"*"',
|
|
368
|
-
[`${n}-hide-required-mark &`]: {
|
|
369
|
-
display: "none"
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
// Optional mark
|
|
373
|
-
[`${t}-optional`]: {
|
|
374
|
-
display: "inline-block",
|
|
375
|
-
marginInlineStart: e.marginXXS,
|
|
376
|
-
color: e.colorTextDescription,
|
|
377
|
-
[`${n}-hide-required-mark &`]: {
|
|
378
|
-
display: "none"
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
// Optional mark
|
|
382
|
-
[`${t}-tooltip`]: {
|
|
383
|
-
color: e.colorTextDescription,
|
|
384
|
-
cursor: "help",
|
|
385
|
-
writingMode: "horizontal-tb",
|
|
386
|
-
marginInlineStart: e.marginXXS
|
|
387
|
-
},
|
|
388
|
-
"&::after": {
|
|
389
|
-
content: '":"',
|
|
390
|
-
position: "relative",
|
|
391
|
-
marginBlock: 0,
|
|
392
|
-
marginInlineStart: m,
|
|
393
|
-
marginInlineEnd: y
|
|
394
|
-
},
|
|
395
|
-
[`&${t}-no-colon::after`]: {
|
|
396
|
-
content: '"\\a0"'
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
|
-
// ==============================================================
|
|
401
|
-
// = Input =
|
|
402
|
-
// ==============================================================
|
|
403
|
-
[`${t}-control`]: {
|
|
404
|
-
"--ant-display": "flex",
|
|
405
|
-
flexDirection: "column",
|
|
406
|
-
flexGrow: 1,
|
|
407
|
-
[`&:first-child:not([class^="'${o}-col-'"]):not([class*="' ${o}-col-'"])`]: {
|
|
408
|
-
width: "100%"
|
|
409
|
-
},
|
|
410
|
-
"&-input": {
|
|
411
|
-
position: "relative",
|
|
412
|
-
display: "flex",
|
|
413
|
-
alignItems: "center",
|
|
414
|
-
minHeight: e.controlHeight,
|
|
415
|
-
"&-content": {
|
|
416
|
-
flex: "auto",
|
|
417
|
-
maxWidth: "100%"
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
// ==============================================================
|
|
422
|
-
// = Explain =
|
|
423
|
-
// ==============================================================
|
|
424
|
-
[t]: {
|
|
425
|
-
"&-explain, &-extra": {
|
|
426
|
-
clear: "both",
|
|
427
|
-
color: e.colorTextDescription,
|
|
428
|
-
fontSize: e.fontSize,
|
|
429
|
-
lineHeight: e.lineHeight
|
|
430
|
-
},
|
|
431
|
-
"&-explain-connected": {
|
|
432
|
-
width: "100%"
|
|
433
|
-
},
|
|
434
|
-
"&-extra": {
|
|
435
|
-
minHeight: e.controlHeightSM,
|
|
436
|
-
transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
|
|
437
|
-
// sync input color transition
|
|
438
|
-
},
|
|
439
|
-
"&-explain": {
|
|
440
|
-
"&-error": {
|
|
441
|
-
color: e.colorError
|
|
442
|
-
},
|
|
443
|
-
"&-warning": {
|
|
444
|
-
color: e.colorWarning
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
[`&-with-help ${t}-explain`]: {
|
|
449
|
-
height: "auto",
|
|
450
|
-
opacity: 1
|
|
451
|
-
},
|
|
452
|
-
// ==============================================================
|
|
453
|
-
// = Feedback Icon =
|
|
454
|
-
// ==============================================================
|
|
455
|
-
[`${t}-feedback-icon`]: {
|
|
456
|
-
fontSize: e.fontSize,
|
|
457
|
-
textAlign: "center",
|
|
458
|
-
visibility: "visible",
|
|
459
|
-
animationName: ze,
|
|
460
|
-
animationDuration: e.motionDurationMid,
|
|
461
|
-
animationTimingFunction: e.motionEaseOutBack,
|
|
462
|
-
pointerEvents: "none",
|
|
463
|
-
"&-success": {
|
|
464
|
-
color: e.colorSuccess
|
|
465
|
-
},
|
|
466
|
-
"&-error": {
|
|
467
|
-
color: e.colorError
|
|
468
|
-
},
|
|
469
|
-
"&-warning": {
|
|
470
|
-
color: e.colorWarning
|
|
471
|
-
},
|
|
472
|
-
"&-validating": {
|
|
473
|
-
color: e.colorPrimary
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
})
|
|
477
|
-
};
|
|
478
|
-
}, tn = (e) => {
|
|
479
|
-
const {
|
|
480
|
-
componentCls: t,
|
|
481
|
-
formItemCls: r
|
|
482
|
-
} = e;
|
|
483
|
-
return {
|
|
484
|
-
[`${t}-horizontal`]: {
|
|
485
|
-
[`${r}-label`]: {
|
|
486
|
-
flexGrow: 0
|
|
487
|
-
},
|
|
488
|
-
[`${r}-control`]: {
|
|
489
|
-
flex: "1 1 0",
|
|
490
|
-
// https://github.com/ant-design/ant-design/issues/32777
|
|
491
|
-
// https://github.com/ant-design/ant-design/issues/33773
|
|
492
|
-
minWidth: 0
|
|
493
|
-
},
|
|
494
|
-
// Do not change this to `ant-col-24`! `-24` match all the responsive rules
|
|
495
|
-
// https://github.com/ant-design/ant-design/issues/32980
|
|
496
|
-
// https://github.com/ant-design/ant-design/issues/34903
|
|
497
|
-
// https://github.com/ant-design/ant-design/issues/44538
|
|
498
|
-
[`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]: {
|
|
499
|
-
[`& + ${r}-control`]: {
|
|
500
|
-
minWidth: "unset"
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
}, nn = (e) => {
|
|
506
|
-
const {
|
|
507
|
-
componentCls: t,
|
|
508
|
-
formItemCls: r
|
|
509
|
-
} = e;
|
|
510
|
-
return {
|
|
511
|
-
[`${t}-inline`]: {
|
|
512
|
-
display: "flex",
|
|
513
|
-
flexWrap: "wrap",
|
|
514
|
-
[r]: {
|
|
515
|
-
flex: "none",
|
|
516
|
-
marginInlineEnd: e.margin,
|
|
517
|
-
marginBottom: 0,
|
|
518
|
-
"&-row": {
|
|
519
|
-
flexWrap: "nowrap"
|
|
520
|
-
},
|
|
521
|
-
[`> ${r}-label,
|
|
522
|
-
> ${r}-control`]: {
|
|
523
|
-
display: "inline-block",
|
|
524
|
-
verticalAlign: "top"
|
|
525
|
-
},
|
|
526
|
-
[`> ${r}-label`]: {
|
|
527
|
-
flex: "none"
|
|
528
|
-
},
|
|
529
|
-
[`${t}-text`]: {
|
|
530
|
-
display: "inline-block"
|
|
531
|
-
},
|
|
532
|
-
[`${r}-has-feedback`]: {
|
|
533
|
-
display: "inline-block"
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
}, le = (e) => ({
|
|
539
|
-
padding: e.verticalLabelPadding,
|
|
540
|
-
margin: e.verticalLabelMargin,
|
|
541
|
-
whiteSpace: "initial",
|
|
542
|
-
textAlign: "start",
|
|
543
|
-
"> label": {
|
|
544
|
-
margin: 0,
|
|
545
|
-
"&::after": {
|
|
546
|
-
// https://github.com/ant-design/ant-design/issues/43538
|
|
547
|
-
visibility: "hidden"
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}), rn = (e) => {
|
|
551
|
-
const {
|
|
552
|
-
componentCls: t,
|
|
553
|
-
formItemCls: r,
|
|
554
|
-
rootPrefixCls: n
|
|
555
|
-
} = e;
|
|
556
|
-
return {
|
|
557
|
-
[`${r} ${r}-label`]: le(e),
|
|
558
|
-
// ref: https://github.com/ant-design/ant-design/issues/45122
|
|
559
|
-
[`${t}:not(${t}-inline)`]: {
|
|
560
|
-
[r]: {
|
|
561
|
-
flexWrap: "wrap",
|
|
562
|
-
[`${r}-label, ${r}-control`]: {
|
|
563
|
-
// When developer pass `xs: { span }`,
|
|
564
|
-
// It should follow the `xs` screen config
|
|
565
|
-
// ref: https://github.com/ant-design/ant-design/issues/44386
|
|
566
|
-
[`&:not([class*=" ${n}-col-xs"])`]: {
|
|
567
|
-
flex: "0 0 100%",
|
|
568
|
-
maxWidth: "100%"
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
};
|
|
574
|
-
}, on = (e) => {
|
|
575
|
-
const {
|
|
576
|
-
componentCls: t,
|
|
577
|
-
formItemCls: r,
|
|
578
|
-
rootPrefixCls: n
|
|
579
|
-
} = e;
|
|
580
|
-
return {
|
|
581
|
-
[`${t}-vertical`]: {
|
|
582
|
-
[r]: {
|
|
583
|
-
"&-row": {
|
|
584
|
-
flexDirection: "column"
|
|
585
|
-
},
|
|
586
|
-
"&-label > label": {
|
|
587
|
-
height: "auto"
|
|
588
|
-
},
|
|
589
|
-
[`${t}-item-control`]: {
|
|
590
|
-
width: "100%"
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
},
|
|
594
|
-
[`${t}-vertical ${r}-label,
|
|
595
|
-
.${n}-col-24${r}-label,
|
|
596
|
-
.${n}-col-xl-24${r}-label`]: le(e),
|
|
597
|
-
[`@media (max-width: ${ie(e.screenXSMax)})`]: [rn(e), {
|
|
598
|
-
[t]: {
|
|
599
|
-
[`.${n}-col-xs-24${r}-label`]: le(e)
|
|
600
|
-
}
|
|
601
|
-
}],
|
|
602
|
-
[`@media (max-width: ${ie(e.screenSMMax)})`]: {
|
|
603
|
-
[t]: {
|
|
604
|
-
[`.${n}-col-sm-24${r}-label`]: le(e)
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
[`@media (max-width: ${ie(e.screenMDMax)})`]: {
|
|
608
|
-
[t]: {
|
|
609
|
-
[`.${n}-col-md-24${r}-label`]: le(e)
|
|
610
|
-
}
|
|
611
|
-
},
|
|
612
|
-
[`@media (max-width: ${ie(e.screenLGMax)})`]: {
|
|
613
|
-
[t]: {
|
|
614
|
-
[`.${n}-col-lg-24${r}-label`]: le(e)
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
};
|
|
618
|
-
}, ln = (e) => ({
|
|
619
|
-
labelRequiredMarkColor: e.colorError,
|
|
620
|
-
labelColor: e.colorTextHeading,
|
|
621
|
-
labelFontSize: e.fontSize,
|
|
622
|
-
labelHeight: e.controlHeight,
|
|
623
|
-
labelColonMarginInlineStart: e.marginXXS / 2,
|
|
624
|
-
labelColonMarginInlineEnd: e.marginXS,
|
|
625
|
-
itemMarginBottom: e.marginLG,
|
|
626
|
-
verticalLabelPadding: `0 0 ${e.paddingXS}px`,
|
|
627
|
-
verticalLabelMargin: 0
|
|
628
|
-
}), ke = (e, t) => rt(e, {
|
|
629
|
-
formItemCls: `${e.componentCls}-item`,
|
|
630
|
-
rootPrefixCls: t
|
|
631
|
-
}), we = nt("Form", (e, t) => {
|
|
632
|
-
let {
|
|
633
|
-
rootPrefixCls: r
|
|
634
|
-
} = t;
|
|
635
|
-
const n = ke(e, r);
|
|
636
|
-
return [Zt(n), en(n), Ut(n), tn(n), nn(n), on(n), Ft(n), ze];
|
|
637
|
-
}, ln, {
|
|
638
|
-
// Let From style before the Grid
|
|
639
|
-
// ref https://github.com/ant-design/ant-design/issues/44386
|
|
640
|
-
order: -1e3
|
|
641
|
-
}), Re = [];
|
|
642
|
-
function ve(e, t, r) {
|
|
643
|
-
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
644
|
-
return {
|
|
645
|
-
key: typeof e == "string" ? e : `${t}-${n}`,
|
|
646
|
-
error: e,
|
|
647
|
-
errorStatus: r
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
const an = (e) => {
|
|
651
|
-
let {
|
|
652
|
-
help: t,
|
|
653
|
-
helpStatus: r,
|
|
654
|
-
errors: n = Re,
|
|
655
|
-
warnings: o = Re,
|
|
656
|
-
className: i,
|
|
657
|
-
fieldId: a,
|
|
658
|
-
onVisibleChanged: s
|
|
659
|
-
} = e;
|
|
660
|
-
const {
|
|
661
|
-
prefixCls: d
|
|
662
|
-
} = l.useContext($e), m = `${d}-item-explain`, y = Ee(d), [p, P, S] = we(d, y), C = xe(() => Me(d), [d]), O = me(n), N = me(o), u = l.useMemo(() => t != null ? [ve(t, "help", r)] : [].concat(B(O.map((f, g) => ve(f, "error", "error", g))), B(N.map((f, g) => ve(f, "warning", "warning", g)))), [t, r, O, N]), c = {};
|
|
663
|
-
return a && (c.id = `${a}_help`), p(/* @__PURE__ */ l.createElement(ot, {
|
|
664
|
-
motionDeadline: C.motionDeadline,
|
|
665
|
-
motionName: `${d}-show-help`,
|
|
666
|
-
visible: !!u.length,
|
|
667
|
-
onVisibleChanged: s
|
|
668
|
-
}, (f) => {
|
|
669
|
-
const {
|
|
670
|
-
className: g,
|
|
671
|
-
style: h
|
|
672
|
-
} = f;
|
|
673
|
-
return /* @__PURE__ */ l.createElement("div", Object.assign({}, c, {
|
|
674
|
-
className: K(m, g, S, y, i, P),
|
|
675
|
-
style: h,
|
|
676
|
-
role: "alert"
|
|
677
|
-
}), /* @__PURE__ */ l.createElement(lt, Object.assign({
|
|
678
|
-
keys: u
|
|
679
|
-
}, Me(d), {
|
|
680
|
-
motionName: `${d}-show-help-item`,
|
|
681
|
-
component: !1
|
|
682
|
-
}), ($) => {
|
|
683
|
-
const {
|
|
684
|
-
key: I,
|
|
685
|
-
error: v,
|
|
686
|
-
errorStatus: b,
|
|
687
|
-
className: V,
|
|
688
|
-
style: W
|
|
689
|
-
} = $;
|
|
690
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
691
|
-
key: I,
|
|
692
|
-
className: K(V, {
|
|
693
|
-
[`${m}-${b}`]: b
|
|
694
|
-
}),
|
|
695
|
-
style: W
|
|
696
|
-
}, v);
|
|
697
|
-
}));
|
|
698
|
-
}));
|
|
699
|
-
}, Xe = an, sn = ["parentNode"], cn = "form_item";
|
|
700
|
-
function ae(e) {
|
|
701
|
-
return e === void 0 || e === !1 ? [] : Array.isArray(e) ? e : [e];
|
|
702
|
-
}
|
|
703
|
-
function Ge(e, t) {
|
|
704
|
-
if (!e.length)
|
|
705
|
-
return;
|
|
706
|
-
const r = e.join("_");
|
|
707
|
-
return t ? `${t}_${r}` : sn.includes(r) ? `${cn}_${r}` : r;
|
|
708
|
-
}
|
|
709
|
-
function Ke(e, t, r, n, o, i) {
|
|
710
|
-
let a = n;
|
|
711
|
-
return i !== void 0 ? a = i : r.validating ? a = "validating" : e.length ? a = "error" : t.length ? a = "warning" : (r.touched || o && r.validated) && (a = "success"), a;
|
|
712
|
-
}
|
|
713
|
-
function Le(e) {
|
|
714
|
-
return ae(e).join("_");
|
|
715
|
-
}
|
|
716
|
-
function Ye(e) {
|
|
717
|
-
const [t] = Ct(), r = l.useRef({}), n = l.useMemo(() => e ?? Object.assign(Object.assign({}, t), {
|
|
718
|
-
__INTERNAL__: {
|
|
719
|
-
itemRef: (o) => (i) => {
|
|
720
|
-
const a = Le(o);
|
|
721
|
-
i ? r.current[a] = i : delete r.current[a];
|
|
722
|
-
}
|
|
723
|
-
},
|
|
724
|
-
scrollToField: function(o) {
|
|
725
|
-
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
726
|
-
const a = ae(o), s = Ge(a, n.__INTERNAL__.name), d = s ? document.getElementById(s) : null;
|
|
727
|
-
d && Xt(d, Object.assign({
|
|
728
|
-
scrollMode: "if-needed",
|
|
729
|
-
block: "nearest"
|
|
730
|
-
}, i));
|
|
731
|
-
},
|
|
732
|
-
getFieldInstance: (o) => {
|
|
733
|
-
const i = Le(o);
|
|
734
|
-
return r.current[i];
|
|
735
|
-
}
|
|
736
|
-
}), [e, t]);
|
|
737
|
-
return [n];
|
|
738
|
-
}
|
|
739
|
-
const de = {};
|
|
740
|
-
function dn(e) {
|
|
741
|
-
let {
|
|
742
|
-
name: t
|
|
743
|
-
} = e;
|
|
744
|
-
const r = pe("Form");
|
|
745
|
-
yt(() => {
|
|
746
|
-
if (t)
|
|
747
|
-
return de[t] = (de[t] || 0) + 1, process.env.NODE_ENV !== "production" && r(de[t] <= 1, "usage", "There exist multiple Form with same `name`."), () => {
|
|
748
|
-
de[t] -= 1;
|
|
749
|
-
};
|
|
750
|
-
}, [t]);
|
|
751
|
-
}
|
|
752
|
-
var un = function(e, t) {
|
|
753
|
-
var r = {};
|
|
754
|
-
for (var n in e)
|
|
755
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
756
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
757
|
-
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
758
|
-
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
759
|
-
return r;
|
|
760
|
-
};
|
|
761
|
-
const mn = (e, t) => {
|
|
762
|
-
const r = l.useContext(it), {
|
|
763
|
-
getPrefixCls: n,
|
|
764
|
-
direction: o,
|
|
765
|
-
form: i
|
|
766
|
-
} = l.useContext(fe), {
|
|
767
|
-
prefixCls: a,
|
|
768
|
-
className: s,
|
|
769
|
-
rootClassName: d,
|
|
770
|
-
size: m,
|
|
771
|
-
disabled: y = r,
|
|
772
|
-
form: p,
|
|
773
|
-
colon: P,
|
|
774
|
-
labelAlign: S,
|
|
775
|
-
labelWrap: C,
|
|
776
|
-
labelCol: O,
|
|
777
|
-
wrapperCol: N,
|
|
778
|
-
hideRequiredMark: u,
|
|
779
|
-
layout: c = "horizontal",
|
|
780
|
-
scrollToFirstError: f,
|
|
781
|
-
requiredMark: g,
|
|
782
|
-
onFinishFailed: h,
|
|
783
|
-
name: $,
|
|
784
|
-
style: I,
|
|
785
|
-
feedbackIcons: v,
|
|
786
|
-
variant: b
|
|
787
|
-
} = e, V = un(e, ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons", "variant"]), W = Ot(m), k = l.useContext(at);
|
|
788
|
-
process.env.NODE_ENV !== "production" && dn(e);
|
|
789
|
-
const F = xe(() => g !== void 0 ? g : u ? !1 : i && i.requiredMark !== void 0 ? i.requiredMark : !0, [u, g, i]), w = P ?? (i == null ? void 0 : i.colon), L = n("form", a), R = Ee(L), [x, H, ee] = we(L, R), te = K(L, `${L}-${c}`, {
|
|
790
|
-
[`${L}-hide-required-mark`]: F === !1,
|
|
791
|
-
[`${L}-rtl`]: o === "rtl",
|
|
792
|
-
[`${L}-${W}`]: W
|
|
793
|
-
}, ee, R, H, i == null ? void 0 : i.className, s, d), [A] = Ye(p), {
|
|
794
|
-
__INTERNAL__: z
|
|
795
|
-
} = A;
|
|
796
|
-
z.name = $;
|
|
797
|
-
const X = xe(() => ({
|
|
798
|
-
name: $,
|
|
799
|
-
labelAlign: S,
|
|
800
|
-
labelCol: O,
|
|
801
|
-
labelWrap: C,
|
|
802
|
-
wrapperCol: N,
|
|
803
|
-
vertical: c === "vertical",
|
|
804
|
-
colon: w,
|
|
805
|
-
requiredMark: F,
|
|
806
|
-
itemRef: z.itemRef,
|
|
807
|
-
form: A,
|
|
808
|
-
feedbackIcons: v
|
|
809
|
-
}), [$, S, O, N, c, w, F, A, v]);
|
|
810
|
-
l.useImperativeHandle(t, () => A);
|
|
811
|
-
const Y = (T, E) => {
|
|
812
|
-
if (T) {
|
|
813
|
-
let j = {
|
|
814
|
-
block: "nearest"
|
|
815
|
-
};
|
|
816
|
-
typeof T == "object" && (j = T), A.scrollToField(E, j);
|
|
817
|
-
}
|
|
818
|
-
}, Q = (T) => {
|
|
819
|
-
if (h == null || h(T), T.errorFields.length) {
|
|
820
|
-
const E = T.errorFields[0].name;
|
|
821
|
-
if (f !== void 0) {
|
|
822
|
-
Y(f, E);
|
|
823
|
-
return;
|
|
824
|
-
}
|
|
825
|
-
i && i.scrollToFirstError !== void 0 && Y(i.scrollToFirstError, E);
|
|
826
|
-
}
|
|
827
|
-
};
|
|
828
|
-
return x(/* @__PURE__ */ l.createElement(vt.Provider, {
|
|
829
|
-
value: b
|
|
830
|
-
}, /* @__PURE__ */ l.createElement(st, {
|
|
831
|
-
disabled: y
|
|
832
|
-
}, /* @__PURE__ */ l.createElement(ct.Provider, {
|
|
833
|
-
value: W
|
|
834
|
-
}, /* @__PURE__ */ l.createElement(He, {
|
|
835
|
-
// This is not list in API, we pass with spread
|
|
836
|
-
validateMessages: k
|
|
837
|
-
}, /* @__PURE__ */ l.createElement(J.Provider, {
|
|
838
|
-
value: X
|
|
839
|
-
}, /* @__PURE__ */ l.createElement(xt, Object.assign({
|
|
840
|
-
id: $
|
|
841
|
-
}, V, {
|
|
842
|
-
name: $,
|
|
843
|
-
onFinishFailed: Q,
|
|
844
|
-
form: A,
|
|
845
|
-
style: Object.assign(Object.assign({}, i == null ? void 0 : i.style), I),
|
|
846
|
-
className: te
|
|
847
|
-
}))))))));
|
|
848
|
-
}, Qe = /* @__PURE__ */ l.forwardRef(mn);
|
|
849
|
-
process.env.NODE_ENV !== "production" && (Qe.displayName = "Form");
|
|
850
|
-
const fn = Qe;
|
|
851
|
-
function pn(e) {
|
|
852
|
-
if (typeof e == "function")
|
|
853
|
-
return e;
|
|
854
|
-
const t = Nt(e);
|
|
855
|
-
return t.length <= 1 ? t[0] : t;
|
|
856
|
-
}
|
|
857
|
-
const Ue = () => {
|
|
858
|
-
const {
|
|
859
|
-
status: e,
|
|
860
|
-
errors: t = [],
|
|
861
|
-
warnings: r = []
|
|
862
|
-
} = We(ue);
|
|
863
|
-
if (process.env.NODE_ENV !== "production") {
|
|
864
|
-
const n = pe("Form.Item");
|
|
865
|
-
process.env.NODE_ENV !== "production" && n(e !== void 0, "usage", "Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus");
|
|
866
|
-
}
|
|
867
|
-
return {
|
|
868
|
-
status: e,
|
|
869
|
-
errors: t,
|
|
870
|
-
warnings: r
|
|
871
|
-
};
|
|
872
|
-
};
|
|
873
|
-
Ue.Context = ue;
|
|
874
|
-
const gn = Ue;
|
|
875
|
-
function hn(e) {
|
|
876
|
-
const [t, r] = l.useState(e), n = ye(null), o = ye([]), i = ye(!1);
|
|
877
|
-
l.useEffect(() => (i.current = !1, () => {
|
|
878
|
-
i.current = !0, Ne.cancel(n.current), n.current = null;
|
|
879
|
-
}), []);
|
|
880
|
-
function a(s) {
|
|
881
|
-
i.current || (n.current === null && (o.current = [], n.current = Ne(() => {
|
|
882
|
-
n.current = null, r((d) => {
|
|
883
|
-
let m = d;
|
|
884
|
-
return o.current.forEach((y) => {
|
|
885
|
-
m = y(m);
|
|
886
|
-
}), m;
|
|
887
|
-
});
|
|
888
|
-
})), o.current.push(s));
|
|
889
|
-
}
|
|
890
|
-
return [t, a];
|
|
891
|
-
}
|
|
892
|
-
function bn() {
|
|
893
|
-
const {
|
|
894
|
-
itemRef: e
|
|
895
|
-
} = l.useContext(J), t = l.useRef({});
|
|
896
|
-
function r(n, o) {
|
|
897
|
-
const i = o && typeof o == "object" && o.ref, a = n.join("_");
|
|
898
|
-
return (t.current.name !== a || t.current.originRef !== i) && (t.current.name = a, t.current.originRef = i, t.current.ref = dt(e(n), i)), t.current.ref;
|
|
899
|
-
}
|
|
900
|
-
return r;
|
|
901
|
-
}
|
|
902
|
-
const yn = (e) => {
|
|
903
|
-
const {
|
|
904
|
-
formItemCls: t
|
|
905
|
-
} = e;
|
|
906
|
-
return {
|
|
907
|
-
"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)": {
|
|
908
|
-
// Fallback for IE, safe to remove we not support it anymore
|
|
909
|
-
[`${t}-control`]: {
|
|
910
|
-
display: "flex"
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
}, Cn = ut(["Form", "item-item"], (e, t) => {
|
|
915
|
-
let {
|
|
916
|
-
rootPrefixCls: r
|
|
917
|
-
} = t;
|
|
918
|
-
const n = ke(e, r);
|
|
919
|
-
return [yn(n)];
|
|
920
|
-
}), vn = (e) => {
|
|
921
|
-
const {
|
|
922
|
-
prefixCls: t,
|
|
923
|
-
status: r,
|
|
924
|
-
wrapperCol: n,
|
|
925
|
-
children: o,
|
|
926
|
-
errors: i,
|
|
927
|
-
warnings: a,
|
|
928
|
-
_internalItemRender: s,
|
|
929
|
-
extra: d,
|
|
930
|
-
help: m,
|
|
931
|
-
fieldId: y,
|
|
932
|
-
marginBottom: p,
|
|
933
|
-
onErrorVisibleChanged: P
|
|
934
|
-
} = e, S = `${t}-item`, C = l.useContext(J), O = n || C.wrapperCol || {}, N = K(`${S}-control`, O.className), u = l.useMemo(() => Object.assign({}, C), [C]);
|
|
935
|
-
delete u.labelCol, delete u.wrapperCol;
|
|
936
|
-
const c = /* @__PURE__ */ l.createElement("div", {
|
|
937
|
-
className: `${S}-control-input`
|
|
938
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
939
|
-
className: `${S}-control-input-content`
|
|
940
|
-
}, o)), f = l.useMemo(() => ({
|
|
941
|
-
prefixCls: t,
|
|
942
|
-
status: r
|
|
943
|
-
}), [t, r]), g = p !== null || i.length || a.length ? /* @__PURE__ */ l.createElement("div", {
|
|
944
|
-
style: {
|
|
945
|
-
display: "flex",
|
|
946
|
-
flexWrap: "nowrap"
|
|
947
|
-
}
|
|
948
|
-
}, /* @__PURE__ */ l.createElement($e.Provider, {
|
|
949
|
-
value: f
|
|
950
|
-
}, /* @__PURE__ */ l.createElement(Xe, {
|
|
951
|
-
fieldId: y,
|
|
952
|
-
errors: i,
|
|
953
|
-
warnings: a,
|
|
954
|
-
help: m,
|
|
955
|
-
helpStatus: r,
|
|
956
|
-
className: `${S}-explain-connected`,
|
|
957
|
-
onVisibleChanged: P
|
|
958
|
-
})), !!p && /* @__PURE__ */ l.createElement("div", {
|
|
959
|
-
style: {
|
|
960
|
-
width: 0,
|
|
961
|
-
height: p
|
|
962
|
-
}
|
|
963
|
-
})) : null, h = {};
|
|
964
|
-
y && (h.id = `${y}_extra`);
|
|
965
|
-
const $ = d ? /* @__PURE__ */ l.createElement("div", Object.assign({}, h, {
|
|
966
|
-
className: `${S}-extra`
|
|
967
|
-
}), d) : null, I = s && s.mark === "pro_table_render" && s.render ? s.render(e, {
|
|
968
|
-
input: c,
|
|
969
|
-
errorList: g,
|
|
970
|
-
extra: $
|
|
971
|
-
}) : /* @__PURE__ */ l.createElement(l.Fragment, null, c, g, $);
|
|
972
|
-
return /* @__PURE__ */ l.createElement(J.Provider, {
|
|
973
|
-
value: u
|
|
974
|
-
}, /* @__PURE__ */ l.createElement(Be, Object.assign({}, O, {
|
|
975
|
-
className: N
|
|
976
|
-
}), I), /* @__PURE__ */ l.createElement(Cn, {
|
|
977
|
-
prefixCls: t
|
|
978
|
-
}));
|
|
979
|
-
}, xn = vn;
|
|
980
|
-
var $n = { 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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
|
|
981
|
-
const En = $n;
|
|
982
|
-
var Je = function(t, r) {
|
|
983
|
-
return /* @__PURE__ */ l.createElement(Vt, mt({}, t, {
|
|
984
|
-
ref: r,
|
|
985
|
-
icon: En
|
|
986
|
-
}));
|
|
987
|
-
};
|
|
988
|
-
process.env.NODE_ENV !== "production" && (Je.displayName = "QuestionCircleOutlined");
|
|
989
|
-
const wn = /* @__PURE__ */ l.forwardRef(Je);
|
|
990
|
-
var Sn = function(e, t) {
|
|
991
|
-
var r = {};
|
|
992
|
-
for (var n in e)
|
|
993
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
994
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
995
|
-
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
996
|
-
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
997
|
-
return r;
|
|
998
|
-
};
|
|
999
|
-
function In(e) {
|
|
1000
|
-
return e ? typeof e == "object" && !/* @__PURE__ */ l.isValidElement(e) ? e : {
|
|
1001
|
-
title: e
|
|
1002
|
-
} : null;
|
|
1003
|
-
}
|
|
1004
|
-
const Fn = (e) => {
|
|
1005
|
-
let {
|
|
1006
|
-
prefixCls: t,
|
|
1007
|
-
label: r,
|
|
1008
|
-
htmlFor: n,
|
|
1009
|
-
labelCol: o,
|
|
1010
|
-
labelAlign: i,
|
|
1011
|
-
colon: a,
|
|
1012
|
-
required: s,
|
|
1013
|
-
requiredMark: d,
|
|
1014
|
-
tooltip: m
|
|
1015
|
-
} = e;
|
|
1016
|
-
var y;
|
|
1017
|
-
const [p] = Wt("Form"), {
|
|
1018
|
-
vertical: P,
|
|
1019
|
-
labelAlign: S,
|
|
1020
|
-
labelCol: C,
|
|
1021
|
-
labelWrap: O,
|
|
1022
|
-
colon: N
|
|
1023
|
-
} = l.useContext(J);
|
|
1024
|
-
if (!r)
|
|
1025
|
-
return null;
|
|
1026
|
-
const u = o || C || {}, c = i || S, f = `${t}-item-label`, g = K(f, c === "left" && `${f}-left`, u.className, {
|
|
1027
|
-
[`${f}-wrap`]: !!O
|
|
1028
|
-
});
|
|
1029
|
-
let h = r;
|
|
1030
|
-
const $ = a === !0 || N !== !1 && a !== !1;
|
|
1031
|
-
$ && !P && typeof r == "string" && r.trim() !== "" && (h = r.replace(/[:|:]\s*$/, ""));
|
|
1032
|
-
const v = In(m);
|
|
1033
|
-
if (v) {
|
|
1034
|
-
const {
|
|
1035
|
-
icon: k = /* @__PURE__ */ l.createElement(wn, null)
|
|
1036
|
-
} = v, F = Sn(v, ["icon"]), w = /* @__PURE__ */ l.createElement(Dt, Object.assign({}, F), /* @__PURE__ */ l.cloneElement(k, {
|
|
1037
|
-
className: `${t}-item-tooltip`,
|
|
1038
|
-
title: "",
|
|
1039
|
-
onClick: (L) => {
|
|
1040
|
-
L.preventDefault();
|
|
1041
|
-
},
|
|
1042
|
-
tabIndex: null
|
|
1043
|
-
}));
|
|
1044
|
-
h = /* @__PURE__ */ l.createElement(l.Fragment, null, h, w);
|
|
1045
|
-
}
|
|
1046
|
-
const b = d === "optional", V = typeof d == "function";
|
|
1047
|
-
V ? h = d(h, {
|
|
1048
|
-
required: !!s
|
|
1049
|
-
}) : b && !s && (h = /* @__PURE__ */ l.createElement(l.Fragment, null, h, /* @__PURE__ */ l.createElement("span", {
|
|
1050
|
-
className: `${t}-item-optional`,
|
|
1051
|
-
title: ""
|
|
1052
|
-
}, (p == null ? void 0 : p.optional) || ((y = ft.Form) === null || y === void 0 ? void 0 : y.optional))));
|
|
1053
|
-
const W = K({
|
|
1054
|
-
[`${t}-item-required`]: s,
|
|
1055
|
-
[`${t}-item-required-mark-optional`]: b || V,
|
|
1056
|
-
[`${t}-item-no-colon`]: !$
|
|
1057
|
-
});
|
|
1058
|
-
return /* @__PURE__ */ l.createElement(Be, Object.assign({}, u, {
|
|
1059
|
-
className: g
|
|
1060
|
-
}), /* @__PURE__ */ l.createElement("label", {
|
|
1061
|
-
htmlFor: n,
|
|
1062
|
-
className: W,
|
|
1063
|
-
title: typeof r == "string" ? r : ""
|
|
1064
|
-
}, h));
|
|
1065
|
-
}, On = Fn, Nn = {
|
|
1066
|
-
success: Ht,
|
|
1067
|
-
warning: zt,
|
|
1068
|
-
error: At,
|
|
1069
|
-
validating: qt
|
|
1070
|
-
};
|
|
1071
|
-
function Ze(e) {
|
|
1072
|
-
let {
|
|
1073
|
-
children: t,
|
|
1074
|
-
errors: r,
|
|
1075
|
-
warnings: n,
|
|
1076
|
-
hasFeedback: o,
|
|
1077
|
-
validateStatus: i,
|
|
1078
|
-
prefixCls: a,
|
|
1079
|
-
meta: s,
|
|
1080
|
-
noStyle: d
|
|
1081
|
-
} = e;
|
|
1082
|
-
const m = `${a}-item`, {
|
|
1083
|
-
feedbackIcons: y
|
|
1084
|
-
} = l.useContext(J), p = Ke(r, n, s, null, !!o, i), {
|
|
1085
|
-
isFormItemInput: P,
|
|
1086
|
-
status: S,
|
|
1087
|
-
hasFeedback: C,
|
|
1088
|
-
feedbackIcon: O
|
|
1089
|
-
} = l.useContext(ue), N = l.useMemo(() => {
|
|
1090
|
-
var u;
|
|
1091
|
-
let c;
|
|
1092
|
-
if (o) {
|
|
1093
|
-
const g = o !== !0 && o.icons || y, h = p && ((u = g == null ? void 0 : g({
|
|
1094
|
-
status: p,
|
|
1095
|
-
errors: r,
|
|
1096
|
-
warnings: n
|
|
1097
|
-
})) === null || u === void 0 ? void 0 : u[p]), $ = p && Nn[p];
|
|
1098
|
-
c = h !== !1 && $ ? /* @__PURE__ */ l.createElement("span", {
|
|
1099
|
-
className: K(`${m}-feedback-icon`, `${m}-feedback-icon-${p}`)
|
|
1100
|
-
}, h || /* @__PURE__ */ l.createElement($, null)) : null;
|
|
1101
|
-
}
|
|
1102
|
-
const f = {
|
|
1103
|
-
status: p || "",
|
|
1104
|
-
errors: r,
|
|
1105
|
-
warnings: n,
|
|
1106
|
-
hasFeedback: !!o,
|
|
1107
|
-
feedbackIcon: c,
|
|
1108
|
-
isFormItemInput: !0
|
|
1109
|
-
};
|
|
1110
|
-
return d && (f.status = (p ?? S) || "", f.isFormItemInput = P, f.hasFeedback = !!(o ?? C), f.feedbackIcon = o !== void 0 ? f.feedbackIcon : O), f;
|
|
1111
|
-
}, [p, o, d, P, S]);
|
|
1112
|
-
return /* @__PURE__ */ l.createElement(ue.Provider, {
|
|
1113
|
-
value: N
|
|
1114
|
-
}, t);
|
|
1115
|
-
}
|
|
1116
|
-
var Mn = function(e, t) {
|
|
1117
|
-
var r = {};
|
|
1118
|
-
for (var n in e)
|
|
1119
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
1120
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1121
|
-
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
1122
|
-
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
1123
|
-
return r;
|
|
1124
|
-
};
|
|
1125
|
-
function Pn(e) {
|
|
1126
|
-
const {
|
|
1127
|
-
prefixCls: t,
|
|
1128
|
-
className: r,
|
|
1129
|
-
rootClassName: n,
|
|
1130
|
-
style: o,
|
|
1131
|
-
help: i,
|
|
1132
|
-
errors: a,
|
|
1133
|
-
warnings: s,
|
|
1134
|
-
validateStatus: d,
|
|
1135
|
-
meta: m,
|
|
1136
|
-
hasFeedback: y,
|
|
1137
|
-
hidden: p,
|
|
1138
|
-
children: P,
|
|
1139
|
-
fieldId: S,
|
|
1140
|
-
required: C,
|
|
1141
|
-
isRequired: O,
|
|
1142
|
-
onSubItemMetaChange: N
|
|
1143
|
-
} = e, u = Mn(e, ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange"]), c = `${t}-item`, {
|
|
1144
|
-
requiredMark: f
|
|
1145
|
-
} = l.useContext(J), g = l.useRef(null), h = me(a), $ = me(s), I = i != null, v = !!(I || a.length || s.length), b = !!g.current && jt(g.current), [V, W] = l.useState(null);
|
|
1146
|
-
pt(() => {
|
|
1147
|
-
if (v && g.current) {
|
|
1148
|
-
const R = getComputedStyle(g.current);
|
|
1149
|
-
W(parseInt(R.marginBottom, 10));
|
|
1150
|
-
}
|
|
1151
|
-
}, [v, b]);
|
|
1152
|
-
const k = (R) => {
|
|
1153
|
-
R || W(null);
|
|
1154
|
-
}, w = function() {
|
|
1155
|
-
let R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1156
|
-
const x = R ? h : m.errors, H = R ? $ : m.warnings;
|
|
1157
|
-
return Ke(x, H, m, "", !!y, d);
|
|
1158
|
-
}(), L = K(c, r, n, {
|
|
1159
|
-
[`${c}-with-help`]: I || h.length || $.length,
|
|
1160
|
-
// Status
|
|
1161
|
-
[`${c}-has-feedback`]: w && y,
|
|
1162
|
-
[`${c}-has-success`]: w === "success",
|
|
1163
|
-
[`${c}-has-warning`]: w === "warning",
|
|
1164
|
-
[`${c}-has-error`]: w === "error",
|
|
1165
|
-
[`${c}-is-validating`]: w === "validating",
|
|
1166
|
-
[`${c}-hidden`]: p
|
|
1167
|
-
});
|
|
1168
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
1169
|
-
className: L,
|
|
1170
|
-
style: o,
|
|
1171
|
-
ref: g
|
|
1172
|
-
}, /* @__PURE__ */ l.createElement(Tt, Object.assign({
|
|
1173
|
-
className: `${c}-row`
|
|
1174
|
-
}, _t(u, [
|
|
1175
|
-
"_internalItemRender",
|
|
1176
|
-
"colon",
|
|
1177
|
-
"dependencies",
|
|
1178
|
-
"extra",
|
|
1179
|
-
"fieldKey",
|
|
1180
|
-
"getValueFromEvent",
|
|
1181
|
-
"getValueProps",
|
|
1182
|
-
"htmlFor",
|
|
1183
|
-
"id",
|
|
1184
|
-
// It is deprecated because `htmlFor` is its replacement.
|
|
1185
|
-
"initialValue",
|
|
1186
|
-
"isListField",
|
|
1187
|
-
"label",
|
|
1188
|
-
"labelAlign",
|
|
1189
|
-
"labelCol",
|
|
1190
|
-
"labelWrap",
|
|
1191
|
-
"messageVariables",
|
|
1192
|
-
"name",
|
|
1193
|
-
"normalize",
|
|
1194
|
-
"noStyle",
|
|
1195
|
-
"preserve",
|
|
1196
|
-
"requiredMark",
|
|
1197
|
-
"rules",
|
|
1198
|
-
"shouldUpdate",
|
|
1199
|
-
"trigger",
|
|
1200
|
-
"tooltip",
|
|
1201
|
-
"validateFirst",
|
|
1202
|
-
"validateTrigger",
|
|
1203
|
-
"valuePropName",
|
|
1204
|
-
"wrapperCol",
|
|
1205
|
-
"validateDebounce"
|
|
1206
|
-
])), /* @__PURE__ */ l.createElement(On, Object.assign({
|
|
1207
|
-
htmlFor: S
|
|
1208
|
-
}, e, {
|
|
1209
|
-
requiredMark: f,
|
|
1210
|
-
required: C ?? O,
|
|
1211
|
-
prefixCls: t
|
|
1212
|
-
})), /* @__PURE__ */ l.createElement(xn, Object.assign({}, e, m, {
|
|
1213
|
-
errors: h,
|
|
1214
|
-
warnings: $,
|
|
1215
|
-
prefixCls: t,
|
|
1216
|
-
status: w,
|
|
1217
|
-
help: i,
|
|
1218
|
-
marginBottom: V,
|
|
1219
|
-
onErrorVisibleChanged: k
|
|
1220
|
-
}), /* @__PURE__ */ l.createElement(Ae.Provider, {
|
|
1221
|
-
value: N
|
|
1222
|
-
}, /* @__PURE__ */ l.createElement(Ze, {
|
|
1223
|
-
prefixCls: t,
|
|
1224
|
-
meta: m,
|
|
1225
|
-
errors: m.errors,
|
|
1226
|
-
warnings: m.warnings,
|
|
1227
|
-
hasFeedback: y,
|
|
1228
|
-
// Already calculated
|
|
1229
|
-
validateStatus: w
|
|
1230
|
-
}, P)))), !!V && /* @__PURE__ */ l.createElement("div", {
|
|
1231
|
-
className: `${c}-margin-offset`,
|
|
1232
|
-
style: {
|
|
1233
|
-
marginBottom: -V
|
|
1234
|
-
}
|
|
1235
|
-
}));
|
|
1236
|
-
}
|
|
1237
|
-
const Vn = "__SPLIT__";
|
|
1238
|
-
function jn(e, t) {
|
|
1239
|
-
const r = Object.keys(e), n = Object.keys(t);
|
|
1240
|
-
return r.length === n.length && r.every((o) => {
|
|
1241
|
-
const i = e[o], a = t[o];
|
|
1242
|
-
return i === a || typeof i == "function" || typeof a == "function";
|
|
1243
|
-
});
|
|
1244
|
-
}
|
|
1245
|
-
const _n = /* @__PURE__ */ l.memo((e) => {
|
|
1246
|
-
let {
|
|
1247
|
-
children: t
|
|
1248
|
-
} = e;
|
|
1249
|
-
return t;
|
|
1250
|
-
}, (e, t) => jn(e.control, t.control) && e.update === t.update && e.childProps.length === t.childProps.length && e.childProps.every((r, n) => r === t.childProps[n]));
|
|
1251
|
-
function Te() {
|
|
1252
|
-
return {
|
|
1253
|
-
errors: [],
|
|
1254
|
-
warnings: [],
|
|
1255
|
-
touched: !1,
|
|
1256
|
-
validating: !1,
|
|
1257
|
-
name: [],
|
|
1258
|
-
validated: !1
|
|
1259
|
-
};
|
|
1260
|
-
}
|
|
1261
|
-
function Rn(e) {
|
|
1262
|
-
const {
|
|
1263
|
-
name: t,
|
|
1264
|
-
noStyle: r,
|
|
1265
|
-
className: n,
|
|
1266
|
-
dependencies: o,
|
|
1267
|
-
prefixCls: i,
|
|
1268
|
-
shouldUpdate: a,
|
|
1269
|
-
rules: s,
|
|
1270
|
-
children: d,
|
|
1271
|
-
required: m,
|
|
1272
|
-
label: y,
|
|
1273
|
-
messageVariables: p,
|
|
1274
|
-
trigger: P = "onChange",
|
|
1275
|
-
validateTrigger: S,
|
|
1276
|
-
hidden: C,
|
|
1277
|
-
help: O
|
|
1278
|
-
} = e, {
|
|
1279
|
-
getPrefixCls: N
|
|
1280
|
-
} = l.useContext(fe), {
|
|
1281
|
-
name: u
|
|
1282
|
-
} = l.useContext(J), c = pn(d), f = typeof c == "function", g = l.useContext(Ae), {
|
|
1283
|
-
validateTrigger: h
|
|
1284
|
-
} = l.useContext($t), $ = S !== void 0 ? S : h, I = t != null, v = N("form", i), b = Ee(v), [V, W, k] = we(v, b), F = pe("Form.Item");
|
|
1285
|
-
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && F(t !== null, "usage", "`null` is passed as `name` property");
|
|
1286
|
-
const w = l.useContext(Et), L = l.useRef(), [R, x] = hn({}), [H, ee] = gt(() => Te()), te = (E) => {
|
|
1287
|
-
const j = w == null ? void 0 : w.getKey(E.name);
|
|
1288
|
-
if (ee(E.destroy ? Te() : E, !0), r && O !== !1 && g) {
|
|
1289
|
-
let M = E.name;
|
|
1290
|
-
if (E.destroy)
|
|
1291
|
-
M = L.current || M;
|
|
1292
|
-
else if (j !== void 0) {
|
|
1293
|
-
const [D, q] = j;
|
|
1294
|
-
M = [D].concat(B(q)), L.current = M;
|
|
1295
|
-
}
|
|
1296
|
-
g(E, M);
|
|
1297
|
-
}
|
|
1298
|
-
}, A = (E, j) => {
|
|
1299
|
-
x((M) => {
|
|
1300
|
-
const D = Object.assign({}, M), G = [].concat(B(E.name.slice(0, -1)), B(j)).join(Vn);
|
|
1301
|
-
return E.destroy ? delete D[G] : D[G] = E, D;
|
|
1302
|
-
});
|
|
1303
|
-
}, [z, X] = l.useMemo(() => {
|
|
1304
|
-
const E = B(H.errors), j = B(H.warnings);
|
|
1305
|
-
return Object.values(R).forEach((M) => {
|
|
1306
|
-
E.push.apply(E, B(M.errors || [])), j.push.apply(j, B(M.warnings || []));
|
|
1307
|
-
}), [E, j];
|
|
1308
|
-
}, [R, H.errors, H.warnings]), Y = bn();
|
|
1309
|
-
function Q(E, j, M) {
|
|
1310
|
-
return r && !C ? /* @__PURE__ */ l.createElement(Ze, {
|
|
1311
|
-
prefixCls: v,
|
|
1312
|
-
hasFeedback: e.hasFeedback,
|
|
1313
|
-
validateStatus: e.validateStatus,
|
|
1314
|
-
meta: H,
|
|
1315
|
-
errors: z,
|
|
1316
|
-
warnings: X,
|
|
1317
|
-
noStyle: !0
|
|
1318
|
-
}, E) : /* @__PURE__ */ l.createElement(Pn, Object.assign({
|
|
1319
|
-
key: "row"
|
|
1320
|
-
}, e, {
|
|
1321
|
-
className: K(n, k, b, W),
|
|
1322
|
-
prefixCls: v,
|
|
1323
|
-
fieldId: j,
|
|
1324
|
-
isRequired: M,
|
|
1325
|
-
errors: z,
|
|
1326
|
-
warnings: X,
|
|
1327
|
-
meta: H,
|
|
1328
|
-
onSubItemMetaChange: A
|
|
1329
|
-
}), E);
|
|
1330
|
-
}
|
|
1331
|
-
if (!I && !f && !o)
|
|
1332
|
-
return V(Q(c));
|
|
1333
|
-
let T = {};
|
|
1334
|
-
return typeof y == "string" ? T.label = y : t && (T.label = String(t)), p && (T = Object.assign(Object.assign({}, T), p)), V(/* @__PURE__ */ l.createElement(wt, Object.assign({}, e, {
|
|
1335
|
-
messageVariables: T,
|
|
1336
|
-
trigger: P,
|
|
1337
|
-
validateTrigger: $,
|
|
1338
|
-
onMetaChange: te
|
|
1339
|
-
}), (E, j, M) => {
|
|
1340
|
-
const D = ae(t).length && j ? j.name : [], q = Ge(D, u), G = m !== void 0 ? m : !!(s && s.some((_) => {
|
|
1341
|
-
if (_ && typeof _ == "object" && _.required && !_.warningOnly)
|
|
1342
|
-
return !0;
|
|
1343
|
-
if (typeof _ == "function") {
|
|
1344
|
-
const re = _(M);
|
|
1345
|
-
return re && re.required && !re.warningOnly;
|
|
1346
|
-
}
|
|
1347
|
-
return !1;
|
|
1348
|
-
})), ne = Object.assign({}, E);
|
|
1349
|
-
let U = null;
|
|
1350
|
-
if (process.env.NODE_ENV !== "production" && F(!(a && o), "usage", "`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps."), Array.isArray(c) && I)
|
|
1351
|
-
process.env.NODE_ENV !== "production" && F(!1, "usage", "A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item."), U = c;
|
|
1352
|
-
else if (f && (!(a || o) || I))
|
|
1353
|
-
process.env.NODE_ENV !== "production" && F(!!(a || o), "usage", "A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`."), process.env.NODE_ENV !== "production" && F(!I, "usage", "A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.");
|
|
1354
|
-
else if (o && !f && !I)
|
|
1355
|
-
process.env.NODE_ENV !== "production" && F(!1, "usage", "Must set `name` or use a render function when `dependencies` is set.");
|
|
1356
|
-
else if (Mt(c)) {
|
|
1357
|
-
process.env.NODE_ENV !== "production" && F(c.props.defaultValue === void 0, "usage", "`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");
|
|
1358
|
-
const _ = Object.assign(Object.assign({}, c.props), ne);
|
|
1359
|
-
if (_.id || (_.id = q), O || z.length > 0 || X.length > 0 || e.extra) {
|
|
1360
|
-
const oe = [];
|
|
1361
|
-
(O || z.length > 0) && oe.push(`${q}_help`), e.extra && oe.push(`${q}_extra`), _["aria-describedby"] = oe.join(" ");
|
|
1362
|
-
}
|
|
1363
|
-
z.length > 0 && (_["aria-invalid"] = "true"), G && (_["aria-required"] = "true"), ht(c) && (_.ref = Y(D, c)), new Set([].concat(B(ae(P)), B(ae($)))).forEach((oe) => {
|
|
1364
|
-
_[oe] = function() {
|
|
1365
|
-
for (var Se, Ie, ge, Fe, he, Oe = arguments.length, be = new Array(Oe), se = 0; se < Oe; se++)
|
|
1366
|
-
be[se] = arguments[se];
|
|
1367
|
-
(ge = ne[oe]) === null || ge === void 0 || (Se = ge).call.apply(Se, [ne].concat(be)), (he = (Fe = c.props)[oe]) === null || he === void 0 || (Ie = he).call.apply(Ie, [Fe].concat(be));
|
|
1368
|
-
};
|
|
1369
|
-
});
|
|
1370
|
-
const tt = [_["aria-required"], _["aria-invalid"], _["aria-describedby"]];
|
|
1371
|
-
U = /* @__PURE__ */ l.createElement(_n, {
|
|
1372
|
-
control: ne,
|
|
1373
|
-
update: c,
|
|
1374
|
-
childProps: tt
|
|
1375
|
-
}, Pt(c, _));
|
|
1376
|
-
} else
|
|
1377
|
-
f && (a || o) && !I ? U = c(M) : (process.env.NODE_ENV !== "production" && F(!D.length, "usage", "`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."), U = c);
|
|
1378
|
-
return Q(U, q, G);
|
|
1379
|
-
}));
|
|
1380
|
-
}
|
|
1381
|
-
const et = Rn;
|
|
1382
|
-
et.useStatus = gn;
|
|
1383
|
-
const Ln = et;
|
|
1384
|
-
var Tn = function(e, t) {
|
|
1385
|
-
var r = {};
|
|
1386
|
-
for (var n in e)
|
|
1387
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
1388
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1389
|
-
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
1390
|
-
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
1391
|
-
return r;
|
|
1392
|
-
};
|
|
1393
|
-
const Dn = (e) => {
|
|
1394
|
-
var {
|
|
1395
|
-
prefixCls: t,
|
|
1396
|
-
children: r
|
|
1397
|
-
} = e, n = Tn(e, ["prefixCls", "children"]);
|
|
1398
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1399
|
-
const s = pe("Form.List");
|
|
1400
|
-
process.env.NODE_ENV !== "production" && s(typeof n.name == "number" || (Array.isArray(n.name) ? !!n.name.length : !!n.name), "usage", "Miss `name` prop.");
|
|
1401
|
-
}
|
|
1402
|
-
const {
|
|
1403
|
-
getPrefixCls: o
|
|
1404
|
-
} = l.useContext(fe), i = o("form", t), a = l.useMemo(() => ({
|
|
1405
|
-
prefixCls: i,
|
|
1406
|
-
status: "error"
|
|
1407
|
-
}), [i]);
|
|
1408
|
-
return /* @__PURE__ */ l.createElement(St, Object.assign({}, n), (s, d, m) => /* @__PURE__ */ l.createElement($e.Provider, {
|
|
1409
|
-
value: a
|
|
1410
|
-
}, r(s.map((y) => Object.assign(Object.assign({}, y), {
|
|
1411
|
-
fieldKey: y.key
|
|
1412
|
-
})), d, {
|
|
1413
|
-
errors: m.errors,
|
|
1414
|
-
warnings: m.warnings
|
|
1415
|
-
})));
|
|
1416
|
-
}, Wn = Dn;
|
|
1417
|
-
function Hn() {
|
|
1418
|
-
const {
|
|
1419
|
-
form: e
|
|
1420
|
-
} = We(J);
|
|
1421
|
-
return e;
|
|
1422
|
-
}
|
|
1423
|
-
const Z = fn;
|
|
1424
|
-
Z.Item = Ln;
|
|
1425
|
-
Z.List = Wn;
|
|
1426
|
-
Z.ErrorList = Xe;
|
|
1427
|
-
Z.useForm = Ye;
|
|
1428
|
-
Z.useFormInstance = Hn;
|
|
1429
|
-
Z.useWatch = It;
|
|
1430
|
-
Z.Provider = He;
|
|
1431
|
-
Z.create = () => {
|
|
1432
|
-
process.env.NODE_ENV !== "production" && bt(!1, "Form", "antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.");
|
|
1433
|
-
};
|
|
1434
|
-
const ir = Z;
|
|
1435
|
-
export {
|
|
1436
|
-
ir as A
|
|
1437
|
-
};
|