dynamicformdjx-react 0.0.1 → 0.0.3
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/README.md +84 -2
- package/dist/index.cjs +8 -8
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +811 -311
- package/dist/origin/DynamicCascadeInput.d.ts +17 -0
- package/dist/origin/DynamicInput.d.ts +14 -4
- package/dist/types/index.d.ts +33 -0
- package/dist/utils/tools.d.ts +10 -0
- package/package.json +25 -10
- package/dist/types/dyForm.d.ts +0 -44
package/dist/index.mjs
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
import './index.css';var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
for (
|
|
12
|
-
if (
|
|
13
|
-
return { $$typeof:
|
|
1
|
+
import Ye, { forwardRef as Ve, useState as Ue, useRef as Er, useImperativeHandle as Be, useEffect as He } from "react";
|
|
2
|
+
import './index.css';var de = { exports: {} }, oe = {};
|
|
3
|
+
var Le;
|
|
4
|
+
function _r() {
|
|
5
|
+
if (Le) return oe;
|
|
6
|
+
Le = 1;
|
|
7
|
+
var o = Ye, v = Symbol.for("react.element"), u = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
8
|
+
function R(D, E, N) {
|
|
9
|
+
var F, B = {}, J = null, K = null;
|
|
10
|
+
N !== void 0 && (J = "" + N), E.key !== void 0 && (J = "" + E.key), E.ref !== void 0 && (K = E.ref);
|
|
11
|
+
for (F in E) n.call(E, F) && !b.hasOwnProperty(F) && (B[F] = E[F]);
|
|
12
|
+
if (D && D.defaultProps) for (F in E = D.defaultProps, E) B[F] === void 0 && (B[F] = E[F]);
|
|
13
|
+
return { $$typeof: v, type: D, key: J, ref: K, props: B, _owner: l.current };
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return oe.Fragment = u, oe.jsx = R, oe.jsxs = R, oe;
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
var
|
|
22
|
-
function
|
|
17
|
+
var ie = {};
|
|
18
|
+
var Me;
|
|
19
|
+
function jr() {
|
|
20
|
+
return Me || (Me = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
21
|
+
var o = Ye, v = Symbol.for("react.element"), u = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), D = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), K = Symbol.for("react.offscreen"), z = Symbol.iterator, P = "@@iterator";
|
|
22
|
+
function M(e) {
|
|
23
23
|
if (e === null || typeof e != "object")
|
|
24
24
|
return null;
|
|
25
|
-
var r =
|
|
25
|
+
var r = z && e[z] || e[P];
|
|
26
26
|
return typeof r == "function" ? r : null;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function
|
|
28
|
+
var C = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
29
|
+
function h(e) {
|
|
30
30
|
{
|
|
31
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
32
|
-
t[
|
|
33
|
-
|
|
31
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
32
|
+
t[a - 1] = arguments[a];
|
|
33
|
+
m("error", e, t);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function m(e, r, t) {
|
|
37
37
|
{
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
return String(
|
|
38
|
+
var a = C.ReactDebugCurrentFrame, y = a.getStackAddendum();
|
|
39
|
+
y !== "" && (r += "%s", t = t.concat([y]));
|
|
40
|
+
var g = t.map(function(d) {
|
|
41
|
+
return String(d);
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
g.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, g);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
46
|
+
var _ = !1, G = !1, j = !1, i = !1, p = !1, O;
|
|
47
|
+
O = Symbol.for("react.module.reference");
|
|
48
|
+
function c(e) {
|
|
49
|
+
return !!(typeof e == "string" || typeof e == "function" || e === n || e === b || p || e === l || e === N || e === F || i || e === K || _ || G || j || typeof e == "object" && e !== null && (e.$$typeof === J || e.$$typeof === B || e.$$typeof === R || e.$$typeof === D || e.$$typeof === E || // This needs to include all possible module reference object
|
|
50
50
|
// types supported by any Flight configuration anywhere since
|
|
51
51
|
// we don't know which Flight build this will end up being used
|
|
52
52
|
// with.
|
|
53
|
-
e.$$typeof ===
|
|
53
|
+
e.$$typeof === O || e.getModuleId !== void 0));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
var
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
59
|
-
var
|
|
60
|
-
return
|
|
55
|
+
function X(e, r, t) {
|
|
56
|
+
var a = e.displayName;
|
|
57
|
+
if (a)
|
|
58
|
+
return a;
|
|
59
|
+
var y = r.displayName || r.name || "";
|
|
60
|
+
return y !== "" ? t + "(" + y + ")" : t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function re(e) {
|
|
63
63
|
return e.displayName || "Context";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function T(e) {
|
|
66
66
|
if (e == null)
|
|
67
67
|
return null;
|
|
68
|
-
if (typeof e.tag == "number" &&
|
|
68
|
+
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
69
69
|
return e.displayName || e.name || null;
|
|
70
70
|
if (typeof e == "string")
|
|
71
71
|
return e;
|
|
72
72
|
switch (e) {
|
|
73
|
-
case
|
|
73
|
+
case n:
|
|
74
74
|
return "Fragment";
|
|
75
|
-
case
|
|
75
|
+
case u:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case b:
|
|
78
78
|
return "Profiler";
|
|
79
|
-
case
|
|
79
|
+
case l:
|
|
80
80
|
return "StrictMode";
|
|
81
|
-
case
|
|
81
|
+
case N:
|
|
82
82
|
return "Suspense";
|
|
83
|
-
case
|
|
83
|
+
case F:
|
|
84
84
|
return "SuspenseList";
|
|
85
85
|
}
|
|
86
86
|
if (typeof e == "object")
|
|
87
87
|
switch (e.$$typeof) {
|
|
88
|
-
case
|
|
88
|
+
case D:
|
|
89
89
|
var r = e;
|
|
90
|
-
return
|
|
91
|
-
case
|
|
90
|
+
return re(r) + ".Consumer";
|
|
91
|
+
case R:
|
|
92
92
|
var t = e;
|
|
93
|
-
return
|
|
94
|
-
case
|
|
95
|
-
return
|
|
96
|
-
case
|
|
97
|
-
var
|
|
98
|
-
return
|
|
99
|
-
case
|
|
100
|
-
var
|
|
93
|
+
return re(t._context) + ".Provider";
|
|
94
|
+
case E:
|
|
95
|
+
return X(e, e.render, "ForwardRef");
|
|
96
|
+
case B:
|
|
97
|
+
var a = e.displayName || null;
|
|
98
|
+
return a !== null ? a : T(e.type) || "Memo";
|
|
99
|
+
case J: {
|
|
100
|
+
var y = e, g = y._payload, d = y._init;
|
|
101
101
|
try {
|
|
102
|
-
return
|
|
102
|
+
return T(d(g));
|
|
103
103
|
} catch {
|
|
104
104
|
return null;
|
|
105
105
|
}
|
|
@@ -107,18 +107,18 @@ function pr() {
|
|
|
107
107
|
}
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
110
|
+
var Y = Object.assign, Q = 0, $, I, k, x, A, H, V;
|
|
111
|
+
function te() {
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
function
|
|
113
|
+
te.__reactDisabledLog = !0;
|
|
114
|
+
function ze() {
|
|
115
115
|
{
|
|
116
|
-
if (
|
|
117
|
-
|
|
116
|
+
if (Q === 0) {
|
|
117
|
+
$ = console.log, I = console.info, k = console.warn, x = console.error, A = console.group, H = console.groupCollapsed, V = console.groupEnd;
|
|
118
118
|
var e = {
|
|
119
119
|
configurable: !0,
|
|
120
120
|
enumerable: !0,
|
|
121
|
-
value:
|
|
121
|
+
value: te,
|
|
122
122
|
writable: !0
|
|
123
123
|
};
|
|
124
124
|
Object.defineProperties(console, {
|
|
@@ -131,250 +131,250 @@ function pr() {
|
|
|
131
131
|
groupEnd: e
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
Q++;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Ge() {
|
|
138
138
|
{
|
|
139
|
-
if (
|
|
139
|
+
if (Q--, Q === 0) {
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
143
|
writable: !0
|
|
144
144
|
};
|
|
145
145
|
Object.defineProperties(console, {
|
|
146
|
-
log:
|
|
147
|
-
value:
|
|
146
|
+
log: Y({}, e, {
|
|
147
|
+
value: $
|
|
148
148
|
}),
|
|
149
|
-
info:
|
|
150
|
-
value:
|
|
149
|
+
info: Y({}, e, {
|
|
150
|
+
value: I
|
|
151
151
|
}),
|
|
152
|
-
warn:
|
|
153
|
-
value:
|
|
152
|
+
warn: Y({}, e, {
|
|
153
|
+
value: k
|
|
154
154
|
}),
|
|
155
|
-
error:
|
|
156
|
-
value:
|
|
155
|
+
error: Y({}, e, {
|
|
156
|
+
value: x
|
|
157
157
|
}),
|
|
158
|
-
group:
|
|
159
|
-
value:
|
|
158
|
+
group: Y({}, e, {
|
|
159
|
+
value: A
|
|
160
160
|
}),
|
|
161
|
-
groupCollapsed:
|
|
162
|
-
value:
|
|
161
|
+
groupCollapsed: Y({}, e, {
|
|
162
|
+
value: H
|
|
163
163
|
}),
|
|
164
|
-
groupEnd:
|
|
165
|
-
value:
|
|
164
|
+
groupEnd: Y({}, e, {
|
|
165
|
+
value: V
|
|
166
166
|
})
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
Q < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
172
|
+
var me = C.ReactCurrentDispatcher, ye;
|
|
173
|
+
function le(e, r, t) {
|
|
174
174
|
{
|
|
175
|
-
if (
|
|
175
|
+
if (ye === void 0)
|
|
176
176
|
try {
|
|
177
177
|
throw Error();
|
|
178
|
-
} catch (
|
|
179
|
-
var
|
|
180
|
-
|
|
178
|
+
} catch (y) {
|
|
179
|
+
var a = y.stack.trim().match(/\n( *(at )?)/);
|
|
180
|
+
ye = a && a[1] || "";
|
|
181
181
|
}
|
|
182
182
|
return `
|
|
183
|
-
` +
|
|
183
|
+
` + ye + e;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
var
|
|
186
|
+
var pe = !1, ue;
|
|
187
187
|
{
|
|
188
|
-
var
|
|
189
|
-
|
|
188
|
+
var Xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
189
|
+
ue = new Xe();
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
if (!e ||
|
|
191
|
+
function _e(e, r) {
|
|
192
|
+
if (!e || pe)
|
|
193
193
|
return "";
|
|
194
194
|
{
|
|
195
|
-
var t =
|
|
195
|
+
var t = ue.get(e);
|
|
196
196
|
if (t !== void 0)
|
|
197
197
|
return t;
|
|
198
198
|
}
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
var
|
|
199
|
+
var a;
|
|
200
|
+
pe = !0;
|
|
201
|
+
var y = Error.prepareStackTrace;
|
|
202
202
|
Error.prepareStackTrace = void 0;
|
|
203
|
-
var
|
|
204
|
-
|
|
203
|
+
var g;
|
|
204
|
+
g = me.current, me.current = null, ze();
|
|
205
205
|
try {
|
|
206
206
|
if (r) {
|
|
207
|
-
var
|
|
207
|
+
var d = function() {
|
|
208
208
|
throw Error();
|
|
209
209
|
};
|
|
210
|
-
if (Object.defineProperty(
|
|
210
|
+
if (Object.defineProperty(d.prototype, "props", {
|
|
211
211
|
set: function() {
|
|
212
212
|
throw Error();
|
|
213
213
|
}
|
|
214
214
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
215
215
|
try {
|
|
216
|
-
Reflect.construct(
|
|
217
|
-
} catch (
|
|
218
|
-
|
|
216
|
+
Reflect.construct(d, []);
|
|
217
|
+
} catch (U) {
|
|
218
|
+
a = U;
|
|
219
219
|
}
|
|
220
|
-
Reflect.construct(e, [],
|
|
220
|
+
Reflect.construct(e, [], d);
|
|
221
221
|
} else {
|
|
222
222
|
try {
|
|
223
|
-
|
|
224
|
-
} catch (
|
|
225
|
-
|
|
223
|
+
d.call();
|
|
224
|
+
} catch (U) {
|
|
225
|
+
a = U;
|
|
226
226
|
}
|
|
227
|
-
e.call(
|
|
227
|
+
e.call(d.prototype);
|
|
228
228
|
}
|
|
229
229
|
} else {
|
|
230
230
|
try {
|
|
231
231
|
throw Error();
|
|
232
|
-
} catch (
|
|
233
|
-
|
|
232
|
+
} catch (U) {
|
|
233
|
+
a = U;
|
|
234
234
|
}
|
|
235
235
|
e();
|
|
236
236
|
}
|
|
237
|
-
} catch (
|
|
238
|
-
if (
|
|
239
|
-
for (var
|
|
240
|
-
`),
|
|
241
|
-
`),
|
|
242
|
-
|
|
243
|
-
for (;
|
|
244
|
-
if (
|
|
245
|
-
if (
|
|
237
|
+
} catch (U) {
|
|
238
|
+
if (U && a && typeof U.stack == "string") {
|
|
239
|
+
for (var f = U.stack.split(`
|
|
240
|
+
`), W = a.stack.split(`
|
|
241
|
+
`), S = f.length - 1, w = W.length - 1; S >= 1 && w >= 0 && f[S] !== W[w]; )
|
|
242
|
+
w--;
|
|
243
|
+
for (; S >= 1 && w >= 0; S--, w--)
|
|
244
|
+
if (f[S] !== W[w]) {
|
|
245
|
+
if (S !== 1 || w !== 1)
|
|
246
246
|
do
|
|
247
|
-
if (
|
|
248
|
-
var
|
|
249
|
-
` +
|
|
250
|
-
return e.displayName &&
|
|
247
|
+
if (S--, w--, w < 0 || f[S] !== W[w]) {
|
|
248
|
+
var q = `
|
|
249
|
+
` + f[S].replace(" at new ", " at ");
|
|
250
|
+
return e.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", e.displayName)), typeof e == "function" && ue.set(e, q), q;
|
|
251
251
|
}
|
|
252
|
-
while (
|
|
252
|
+
while (S >= 1 && w >= 0);
|
|
253
253
|
break;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
} finally {
|
|
257
|
-
|
|
257
|
+
pe = !1, me.current = g, Ge(), Error.prepareStackTrace = y;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
return typeof e == "function" &&
|
|
259
|
+
var ae = e ? e.displayName || e.name : "", ee = ae ? le(ae) : "";
|
|
260
|
+
return typeof e == "function" && ue.set(e, ee), ee;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
return
|
|
262
|
+
function Ze(e, r, t) {
|
|
263
|
+
return _e(e, !1);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Qe(e) {
|
|
266
266
|
var r = e.prototype;
|
|
267
267
|
return !!(r && r.isReactComponent);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function ce(e, r, t) {
|
|
270
270
|
if (e == null)
|
|
271
271
|
return "";
|
|
272
272
|
if (typeof e == "function")
|
|
273
|
-
return
|
|
273
|
+
return _e(e, Qe(e));
|
|
274
274
|
if (typeof e == "string")
|
|
275
|
-
return
|
|
275
|
+
return le(e);
|
|
276
276
|
switch (e) {
|
|
277
|
-
case
|
|
278
|
-
return
|
|
279
|
-
case
|
|
280
|
-
return
|
|
277
|
+
case N:
|
|
278
|
+
return le("Suspense");
|
|
279
|
+
case F:
|
|
280
|
+
return le("SuspenseList");
|
|
281
281
|
}
|
|
282
282
|
if (typeof e == "object")
|
|
283
283
|
switch (e.$$typeof) {
|
|
284
|
-
case
|
|
285
|
-
return
|
|
286
|
-
case
|
|
287
|
-
return
|
|
288
|
-
case
|
|
289
|
-
var
|
|
284
|
+
case E:
|
|
285
|
+
return Ze(e.render);
|
|
286
|
+
case B:
|
|
287
|
+
return ce(e.type, r, t);
|
|
288
|
+
case J: {
|
|
289
|
+
var a = e, y = a._payload, g = a._init;
|
|
290
290
|
try {
|
|
291
|
-
return
|
|
291
|
+
return ce(g(y), r, t);
|
|
292
292
|
} catch {
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
return "";
|
|
297
297
|
}
|
|
298
|
-
var
|
|
299
|
-
function
|
|
298
|
+
var se = Object.prototype.hasOwnProperty, je = {}, Se = C.ReactDebugCurrentFrame;
|
|
299
|
+
function fe(e) {
|
|
300
300
|
if (e) {
|
|
301
|
-
var r = e._owner, t =
|
|
302
|
-
|
|
301
|
+
var r = e._owner, t = ce(e.type, e._source, r ? r.type : null);
|
|
302
|
+
Se.setExtraStackFrame(t);
|
|
303
303
|
} else
|
|
304
|
-
|
|
304
|
+
Se.setExtraStackFrame(null);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function er(e, r, t, a, y) {
|
|
307
307
|
{
|
|
308
|
-
var
|
|
309
|
-
for (var
|
|
310
|
-
if (
|
|
311
|
-
var
|
|
308
|
+
var g = Function.call.bind(se);
|
|
309
|
+
for (var d in e)
|
|
310
|
+
if (g(e, d)) {
|
|
311
|
+
var f = void 0;
|
|
312
312
|
try {
|
|
313
|
-
if (typeof e[
|
|
314
|
-
var
|
|
315
|
-
throw
|
|
313
|
+
if (typeof e[d] != "function") {
|
|
314
|
+
var W = Error((a || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
315
|
+
throw W.name = "Invariant Violation", W;
|
|
316
316
|
}
|
|
317
|
-
|
|
318
|
-
} catch (
|
|
319
|
-
|
|
317
|
+
f = e[d](r, d, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
318
|
+
} catch (S) {
|
|
319
|
+
f = S;
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
f && !(f instanceof Error) && (fe(y), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, d, typeof f), fe(null)), f instanceof Error && !(f.message in je) && (je[f.message] = !0, fe(y), h("Failed %s type: %s", t, f.message), fe(null));
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
var
|
|
326
|
-
function
|
|
327
|
-
return
|
|
325
|
+
var rr = Array.isArray;
|
|
326
|
+
function be(e) {
|
|
327
|
+
return rr(e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function tr(e) {
|
|
330
330
|
{
|
|
331
331
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
332
332
|
return t;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function nr(e) {
|
|
336
336
|
try {
|
|
337
|
-
return
|
|
337
|
+
return Ce(e), !1;
|
|
338
338
|
} catch {
|
|
339
339
|
return !0;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Ce(e) {
|
|
343
343
|
return "" + e;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
if (
|
|
347
|
-
return
|
|
345
|
+
function Te(e) {
|
|
346
|
+
if (nr(e))
|
|
347
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), Ce(e);
|
|
348
348
|
}
|
|
349
|
-
var
|
|
349
|
+
var ke = C.ReactCurrentOwner, ar = {
|
|
350
350
|
key: !0,
|
|
351
351
|
ref: !0,
|
|
352
352
|
__self: !0,
|
|
353
353
|
__source: !0
|
|
354
|
-
},
|
|
355
|
-
function
|
|
356
|
-
if (
|
|
354
|
+
}, we, Oe;
|
|
355
|
+
function sr(e) {
|
|
356
|
+
if (se.call(e, "ref")) {
|
|
357
357
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
358
358
|
if (r && r.isReactWarning)
|
|
359
359
|
return !1;
|
|
360
360
|
}
|
|
361
361
|
return e.ref !== void 0;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
if (
|
|
363
|
+
function or(e) {
|
|
364
|
+
if (se.call(e, "key")) {
|
|
365
365
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
366
366
|
if (r && r.isReactWarning)
|
|
367
367
|
return !1;
|
|
368
368
|
}
|
|
369
369
|
return e.key !== void 0;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
typeof e.ref == "string" &&
|
|
371
|
+
function ir(e, r) {
|
|
372
|
+
typeof e.ref == "string" && ke.current;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function lr(e, r) {
|
|
375
375
|
{
|
|
376
376
|
var t = function() {
|
|
377
|
-
|
|
377
|
+
we || (we = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
378
378
|
};
|
|
379
379
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
380
380
|
get: t,
|
|
@@ -382,10 +382,10 @@ function pr() {
|
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function ur(e, r) {
|
|
386
386
|
{
|
|
387
387
|
var t = function() {
|
|
388
|
-
|
|
388
|
+
Oe || (Oe = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
389
389
|
};
|
|
390
390
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
391
391
|
get: t,
|
|
@@ -393,70 +393,70 @@ function pr() {
|
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
var
|
|
396
|
+
var cr = function(e, r, t, a, y, g, d) {
|
|
397
|
+
var f = {
|
|
398
398
|
// This tag allows us to uniquely identify this as a React Element
|
|
399
|
-
$$typeof:
|
|
399
|
+
$$typeof: v,
|
|
400
400
|
// Built-in properties that belong on the element
|
|
401
401
|
type: e,
|
|
402
402
|
key: r,
|
|
403
403
|
ref: t,
|
|
404
|
-
props:
|
|
404
|
+
props: d,
|
|
405
405
|
// Record the component responsible for creating this element.
|
|
406
|
-
_owner:
|
|
406
|
+
_owner: g
|
|
407
407
|
};
|
|
408
|
-
return
|
|
408
|
+
return f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
409
409
|
configurable: !1,
|
|
410
410
|
enumerable: !1,
|
|
411
411
|
writable: !0,
|
|
412
412
|
value: !1
|
|
413
|
-
}), Object.defineProperty(
|
|
413
|
+
}), Object.defineProperty(f, "_self", {
|
|
414
414
|
configurable: !1,
|
|
415
415
|
enumerable: !1,
|
|
416
416
|
writable: !1,
|
|
417
|
-
value:
|
|
418
|
-
}), Object.defineProperty(
|
|
417
|
+
value: a
|
|
418
|
+
}), Object.defineProperty(f, "_source", {
|
|
419
419
|
configurable: !1,
|
|
420
420
|
enumerable: !1,
|
|
421
421
|
writable: !1,
|
|
422
|
-
value:
|
|
423
|
-
}), Object.freeze && (Object.freeze(
|
|
422
|
+
value: y
|
|
423
|
+
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
424
424
|
};
|
|
425
|
-
function
|
|
425
|
+
function fr(e, r, t, a, y) {
|
|
426
426
|
{
|
|
427
|
-
var
|
|
428
|
-
t !== void 0 && (
|
|
429
|
-
for (
|
|
430
|
-
|
|
427
|
+
var g, d = {}, f = null, W = null;
|
|
428
|
+
t !== void 0 && (Te(t), f = "" + t), or(r) && (Te(r.key), f = "" + r.key), sr(r) && (W = r.ref, ir(r, y));
|
|
429
|
+
for (g in r)
|
|
430
|
+
se.call(r, g) && !ar.hasOwnProperty(g) && (d[g] = r[g]);
|
|
431
431
|
if (e && e.defaultProps) {
|
|
432
|
-
var
|
|
433
|
-
for (
|
|
434
|
-
|
|
432
|
+
var S = e.defaultProps;
|
|
433
|
+
for (g in S)
|
|
434
|
+
d[g] === void 0 && (d[g] = S[g]);
|
|
435
435
|
}
|
|
436
|
-
if (
|
|
437
|
-
var
|
|
438
|
-
|
|
436
|
+
if (f || W) {
|
|
437
|
+
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
438
|
+
f && lr(d, w), W && ur(d, w);
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return cr(e, f, W, y, a, ke.current, d);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
443
|
+
var he = C.ReactCurrentOwner, Ae = C.ReactDebugCurrentFrame;
|
|
444
|
+
function ne(e) {
|
|
445
445
|
if (e) {
|
|
446
|
-
var r = e._owner, t =
|
|
447
|
-
|
|
446
|
+
var r = e._owner, t = ce(e.type, e._source, r ? r.type : null);
|
|
447
|
+
Ae.setExtraStackFrame(t);
|
|
448
448
|
} else
|
|
449
|
-
|
|
449
|
+
Ae.setExtraStackFrame(null);
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
function
|
|
454
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
451
|
+
var ge;
|
|
452
|
+
ge = !1;
|
|
453
|
+
function xe(e) {
|
|
454
|
+
return typeof e == "object" && e !== null && e.$$typeof === v;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Ne() {
|
|
457
457
|
{
|
|
458
|
-
if (
|
|
459
|
-
var e =
|
|
458
|
+
if (he.current) {
|
|
459
|
+
var e = T(he.current.type);
|
|
460
460
|
if (e)
|
|
461
461
|
return `
|
|
462
462
|
|
|
@@ -465,13 +465,13 @@ Check the render method of \`` + e + "`.";
|
|
|
465
465
|
return "";
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function dr(e) {
|
|
469
469
|
return "";
|
|
470
470
|
}
|
|
471
|
-
var
|
|
472
|
-
function
|
|
471
|
+
var Pe = {};
|
|
472
|
+
function vr(e) {
|
|
473
473
|
{
|
|
474
|
-
var r =
|
|
474
|
+
var r = Ne();
|
|
475
475
|
if (!r) {
|
|
476
476
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
477
477
|
t && (r = `
|
|
@@ -481,39 +481,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
481
481
|
return r;
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ie(e, r) {
|
|
485
485
|
{
|
|
486
486
|
if (!e._store || e._store.validated || e.key != null)
|
|
487
487
|
return;
|
|
488
488
|
e._store.validated = !0;
|
|
489
|
-
var t =
|
|
490
|
-
if (
|
|
489
|
+
var t = vr(r);
|
|
490
|
+
if (Pe[t])
|
|
491
491
|
return;
|
|
492
|
-
|
|
493
|
-
var
|
|
494
|
-
e && e._owner && e._owner !==
|
|
492
|
+
Pe[t] = !0;
|
|
493
|
+
var a = "";
|
|
494
|
+
e && e._owner && e._owner !== he.current && (a = " It was passed a child from " + T(e._owner.type) + "."), ne(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), ne(null);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Fe(e, r) {
|
|
498
498
|
{
|
|
499
499
|
if (typeof e != "object")
|
|
500
500
|
return;
|
|
501
|
-
if (
|
|
501
|
+
if (be(e))
|
|
502
502
|
for (var t = 0; t < e.length; t++) {
|
|
503
|
-
var
|
|
504
|
-
|
|
503
|
+
var a = e[t];
|
|
504
|
+
xe(a) && Ie(a, r);
|
|
505
505
|
}
|
|
506
|
-
else if (
|
|
506
|
+
else if (xe(e))
|
|
507
507
|
e._store && (e._store.validated = !0);
|
|
508
508
|
else if (e) {
|
|
509
|
-
var
|
|
510
|
-
if (typeof
|
|
511
|
-
for (var
|
|
512
|
-
|
|
509
|
+
var y = M(e);
|
|
510
|
+
if (typeof y == "function" && y !== e.entries)
|
|
511
|
+
for (var g = y.call(e), d; !(d = g.next()).done; )
|
|
512
|
+
xe(d.value) && Ie(d.value, r);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function mr(e) {
|
|
517
517
|
{
|
|
518
518
|
var r = e.type;
|
|
519
519
|
if (r == null || typeof r == "string")
|
|
@@ -521,102 +521,602 @@ Check the top-level render call using <` + t + ">.");
|
|
|
521
521
|
var t;
|
|
522
522
|
if (typeof r == "function")
|
|
523
523
|
t = r.propTypes;
|
|
524
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
524
|
+
else if (typeof r == "object" && (r.$$typeof === E || // Note: Memo only checks outer props here.
|
|
525
525
|
// Inner props are checked in the reconciler.
|
|
526
|
-
r.$$typeof ===
|
|
526
|
+
r.$$typeof === B))
|
|
527
527
|
t = r.propTypes;
|
|
528
528
|
else
|
|
529
529
|
return;
|
|
530
530
|
if (t) {
|
|
531
|
-
var
|
|
532
|
-
|
|
533
|
-
} else if (r.PropTypes !== void 0 && !
|
|
534
|
-
|
|
535
|
-
var
|
|
536
|
-
|
|
531
|
+
var a = T(r);
|
|
532
|
+
er(t, e.props, "prop", a, e);
|
|
533
|
+
} else if (r.PropTypes !== void 0 && !ge) {
|
|
534
|
+
ge = !0;
|
|
535
|
+
var y = T(r);
|
|
536
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown");
|
|
537
537
|
}
|
|
538
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
538
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function yr(e) {
|
|
542
542
|
{
|
|
543
543
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
544
|
-
var
|
|
545
|
-
if (
|
|
546
|
-
|
|
544
|
+
var a = r[t];
|
|
545
|
+
if (a !== "children" && a !== "key") {
|
|
546
|
+
ne(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), ne(null);
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
e.ref !== null && (
|
|
550
|
+
e.ref !== null && (ne(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), ne(null));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
var
|
|
554
|
-
function
|
|
553
|
+
var De = {};
|
|
554
|
+
function $e(e, r, t, a, y, g) {
|
|
555
555
|
{
|
|
556
|
-
var
|
|
557
|
-
if (!
|
|
558
|
-
var
|
|
559
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
560
|
-
var
|
|
561
|
-
|
|
562
|
-
var
|
|
563
|
-
e === null ?
|
|
556
|
+
var d = c(e);
|
|
557
|
+
if (!d) {
|
|
558
|
+
var f = "";
|
|
559
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
560
|
+
var W = dr();
|
|
561
|
+
W ? f += W : f += Ne();
|
|
562
|
+
var S;
|
|
563
|
+
e === null ? S = "null" : be(e) ? S = "array" : e !== void 0 && e.$$typeof === v ? (S = "<" + (T(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, f);
|
|
564
564
|
}
|
|
565
|
-
var
|
|
566
|
-
if (
|
|
567
|
-
return
|
|
568
|
-
if (
|
|
569
|
-
var
|
|
570
|
-
if (
|
|
571
|
-
if (
|
|
572
|
-
if (
|
|
573
|
-
for (var
|
|
574
|
-
|
|
575
|
-
Object.freeze && Object.freeze(
|
|
565
|
+
var w = fr(e, r, t, y, g);
|
|
566
|
+
if (w == null)
|
|
567
|
+
return w;
|
|
568
|
+
if (d) {
|
|
569
|
+
var q = r.children;
|
|
570
|
+
if (q !== void 0)
|
|
571
|
+
if (a)
|
|
572
|
+
if (be(q)) {
|
|
573
|
+
for (var ae = 0; ae < q.length; ae++)
|
|
574
|
+
Fe(q[ae], e);
|
|
575
|
+
Object.freeze && Object.freeze(q);
|
|
576
576
|
} else
|
|
577
|
-
|
|
577
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
578
578
|
else
|
|
579
|
-
|
|
579
|
+
Fe(q, e);
|
|
580
580
|
}
|
|
581
|
-
if (
|
|
582
|
-
var
|
|
583
|
-
return
|
|
584
|
-
}),
|
|
585
|
-
if (!
|
|
586
|
-
var
|
|
587
|
-
|
|
581
|
+
if (se.call(r, "key")) {
|
|
582
|
+
var ee = T(e), U = Object.keys(r).filter(function(Rr) {
|
|
583
|
+
return Rr !== "key";
|
|
584
|
+
}), Re = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
585
|
+
if (!De[ee + Re]) {
|
|
586
|
+
var xr = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
|
|
587
|
+
h(`A props object containing a "key" prop is being spread into JSX:
|
|
588
588
|
let props = %s;
|
|
589
589
|
<%s {...props} />
|
|
590
590
|
React keys must be passed directly to JSX without using spread:
|
|
591
591
|
let props = %s;
|
|
592
|
-
<%s key={someKey} {...props} />`,
|
|
592
|
+
<%s key={someKey} {...props} />`, Re, ee, xr, ee), De[ee + Re] = !0;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
return e ===
|
|
595
|
+
return e === n ? yr(w) : mr(w), w;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
598
|
+
function pr(e, r, t) {
|
|
599
|
+
return $e(e, r, t, !0);
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function br(e, r, t) {
|
|
602
|
+
return $e(e, r, t, !1);
|
|
603
603
|
}
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
})()),
|
|
604
|
+
var hr = br, gr = pr;
|
|
605
|
+
ie.Fragment = n, ie.jsx = hr, ie.jsxs = gr;
|
|
606
|
+
})()), ie;
|
|
607
|
+
}
|
|
608
|
+
var We;
|
|
609
|
+
function Sr() {
|
|
610
|
+
return We || (We = 1, process.env.NODE_ENV === "production" ? de.exports = _r() : de.exports = jr()), de.exports;
|
|
611
|
+
}
|
|
612
|
+
var s = Sr();
|
|
613
|
+
const ve = (o, v, u) => Object.keys(o).map((n, l) => {
|
|
614
|
+
const b = o[n], R = Array.isArray(b), D = R ? b.every((E) => typeof E == "number") : typeof b == "number";
|
|
615
|
+
return {
|
|
616
|
+
rId: v(l),
|
|
617
|
+
key: n,
|
|
618
|
+
value: R ? b.join(u) : b,
|
|
619
|
+
isArray: R || void 0,
|
|
620
|
+
isNumber: D || void 0
|
|
621
|
+
};
|
|
622
|
+
}), Ee = (o, v) => o.reduce((u, n) => (n.key.trim() && (u[n.key] = Je(n.value, n.isArray, n.isNumber, v)), u), {}), Je = (o, v, u, n = ",") => {
|
|
623
|
+
let l;
|
|
624
|
+
return v ? u ? l = String(o).split(n).map(Number).filter((b) => !Number.isNaN(b)) : l = String(o).split(n) : u ? l = parseFloat(o) : l = o.toString(), l;
|
|
625
|
+
}, qe = (o, v, u = ",") => {
|
|
626
|
+
const n = (l) => {
|
|
627
|
+
l = l.replace(/[^\d.-]/g, "");
|
|
628
|
+
let b = !1;
|
|
629
|
+
l.startsWith("-") && (b = !0), l = l.replace(/-/g, "");
|
|
630
|
+
const R = l.indexOf(".");
|
|
631
|
+
return R !== -1 && (l = l.slice(0, R + 1) + l.slice(R + 1).replace(/\./g, "")), (b ? "-" : "") + l;
|
|
632
|
+
};
|
|
633
|
+
return v ? o.split(u).map((l) => n(l)).join(u) : n(o);
|
|
634
|
+
}, Cr = (o) => `hsl(${o * 35 % 360}, 60%, 65%)`, Tr = (o, v) => o[v - 1] ?? Cr(v);
|
|
635
|
+
function Z(o, v, u) {
|
|
636
|
+
if (v.length === 0)
|
|
637
|
+
return u(o, -1);
|
|
638
|
+
const [n, ...l] = v, b = [...o];
|
|
639
|
+
if (l.length === 0)
|
|
640
|
+
return u(b, n);
|
|
641
|
+
const R = b[n];
|
|
642
|
+
if (!Array.isArray(R.value)) return b;
|
|
643
|
+
const D = Z(
|
|
644
|
+
R.value,
|
|
645
|
+
l,
|
|
646
|
+
u
|
|
647
|
+
);
|
|
648
|
+
return D.length === 0 ? b[n] = {
|
|
649
|
+
...R,
|
|
650
|
+
value: "",
|
|
651
|
+
isArray: void 0,
|
|
652
|
+
isNumber: void 0
|
|
653
|
+
} : b[n] = { ...R, value: D }, b;
|
|
654
|
+
}
|
|
655
|
+
function Ke(o) {
|
|
656
|
+
var v, u, n = "";
|
|
657
|
+
if (typeof o == "string" || typeof o == "number") n += o;
|
|
658
|
+
else if (typeof o == "object") if (Array.isArray(o)) {
|
|
659
|
+
var l = o.length;
|
|
660
|
+
for (v = 0; v < l; v++) o[v] && (u = Ke(o[v])) && (n && (n += " "), n += u);
|
|
661
|
+
} else for (u in o) o[u] && (n && (n += " "), n += u);
|
|
662
|
+
return n;
|
|
607
663
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
return
|
|
664
|
+
function L() {
|
|
665
|
+
for (var o, v, u = 0, n = "", l = arguments.length; u < l; u++) (o = arguments[u]) && (v = Ke(o)) && (n && (n += " "), n += v);
|
|
666
|
+
return n;
|
|
611
667
|
}
|
|
612
|
-
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
668
|
+
const wr = Ve((o, v) => {
|
|
669
|
+
const {
|
|
670
|
+
value: u,
|
|
671
|
+
size: n,
|
|
672
|
+
dyCls: l,
|
|
673
|
+
isController: b,
|
|
674
|
+
configs: R,
|
|
675
|
+
btnConfigs: D,
|
|
676
|
+
dyListConfigs: E,
|
|
677
|
+
randomFun: N = (m) => `${Date.now()}_${m ?? 0}`,
|
|
678
|
+
onReset: F,
|
|
679
|
+
onMerge: B,
|
|
680
|
+
onChange: J
|
|
681
|
+
} = o, K = {
|
|
682
|
+
resetTxt: "重置",
|
|
683
|
+
newTxt: "添加项",
|
|
684
|
+
mergeTxt: "合并",
|
|
685
|
+
...D
|
|
686
|
+
}, z = {
|
|
687
|
+
hideReset: !1,
|
|
688
|
+
maxHeight: "300px",
|
|
689
|
+
autoScroll: !0,
|
|
690
|
+
allowFilter: !0,
|
|
691
|
+
...R
|
|
692
|
+
}, P = {
|
|
693
|
+
arraySplitSymbol: ",",
|
|
694
|
+
...E
|
|
695
|
+
}, [M, C] = Ue(() => ve(u, N, P.arraySplitSymbol)), h = Er(null);
|
|
696
|
+
return Be(v, () => ({
|
|
697
|
+
getResult(m) {
|
|
698
|
+
return m === "ori" ? M : Ee(M, P.arraySplitSymbol);
|
|
699
|
+
},
|
|
700
|
+
onSet(m) {
|
|
701
|
+
C(ve(m ?? u, N, P.arraySplitSymbol));
|
|
702
|
+
}
|
|
703
|
+
})), He(() => {
|
|
704
|
+
b && J(Ee(M, P.arraySplitSymbol));
|
|
705
|
+
}, [M]), /* @__PURE__ */ s.jsxs("div", { className: l ?? `dynamicInput ${n}`, children: [
|
|
706
|
+
/* @__PURE__ */ s.jsx("div", { className: "dyFormList", ref: h, style: { maxHeight: z.maxHeight }, children: M.map((m, _, G) => /* @__PURE__ */ s.jsxs("div", { className: "dItem", children: [
|
|
707
|
+
/* @__PURE__ */ s.jsxs("div", { className: "input", children: [
|
|
708
|
+
/* @__PURE__ */ s.jsx("input", { value: m.key, className: "key nativeInput", onInput: (j) => {
|
|
709
|
+
const i = j.target.value;
|
|
710
|
+
C((p) => {
|
|
711
|
+
const O = [...p], c = O[_];
|
|
712
|
+
return O[_] = { ...c, key: i }, O;
|
|
713
|
+
});
|
|
714
|
+
} }),
|
|
715
|
+
":",
|
|
716
|
+
/* @__PURE__ */ s.jsxs("div", { className: "vInput", children: [
|
|
717
|
+
/* @__PURE__ */ s.jsxs("div", { className: "slot", children: [
|
|
718
|
+
/* @__PURE__ */ s.jsx(
|
|
719
|
+
"button",
|
|
720
|
+
{
|
|
721
|
+
className: L([
|
|
722
|
+
m.isArray ? "success" : "default",
|
|
723
|
+
"small",
|
|
724
|
+
"bt"
|
|
725
|
+
]),
|
|
726
|
+
onClick: () => {
|
|
727
|
+
C((j) => {
|
|
728
|
+
const i = [...j], p = i[_];
|
|
729
|
+
return i[_] = { ...p, isArray: !p.isArray }, i;
|
|
730
|
+
});
|
|
731
|
+
},
|
|
732
|
+
children: "Array"
|
|
733
|
+
}
|
|
734
|
+
),
|
|
735
|
+
" ",
|
|
736
|
+
/* @__PURE__ */ s.jsx(
|
|
737
|
+
"button",
|
|
738
|
+
{
|
|
739
|
+
className: L([
|
|
740
|
+
m.isNumber ? "success" : "default",
|
|
741
|
+
"small",
|
|
742
|
+
"bt"
|
|
743
|
+
]),
|
|
744
|
+
onClick: () => {
|
|
745
|
+
C((j) => {
|
|
746
|
+
const i = [...j], p = i[_];
|
|
747
|
+
return i[_] = { ...p, isNumber: !p.isNumber }, i;
|
|
748
|
+
});
|
|
749
|
+
},
|
|
750
|
+
children: "Number"
|
|
751
|
+
}
|
|
752
|
+
)
|
|
753
|
+
] }),
|
|
754
|
+
/* @__PURE__ */ s.jsx("input", { value: m.value, className: "value nativeV", onInput: (j) => {
|
|
755
|
+
const i = j.target.value;
|
|
756
|
+
let p = i;
|
|
757
|
+
m.isNumber && z.allowFilter && (p = qe(
|
|
758
|
+
i,
|
|
759
|
+
m.isArray,
|
|
760
|
+
P.arraySplitSymbol
|
|
761
|
+
)), C((O) => {
|
|
762
|
+
const c = [...O], X = c[_];
|
|
763
|
+
return c[_] = { ...X, value: p }, c;
|
|
764
|
+
});
|
|
765
|
+
} })
|
|
766
|
+
] })
|
|
767
|
+
] }),
|
|
768
|
+
/* @__PURE__ */ s.jsxs("div", { className: "btn", children: [
|
|
769
|
+
/* @__PURE__ */ s.jsx(
|
|
770
|
+
"button",
|
|
771
|
+
{
|
|
772
|
+
className: L([n, "success", "bt"]),
|
|
773
|
+
disabled: _ !== G.length - 1,
|
|
774
|
+
onClick: () => {
|
|
775
|
+
C((j) => [...j, { rId: N(), key: "", value: "" }]), z.autoScroll && setTimeout(() => {
|
|
776
|
+
const j = h.current;
|
|
777
|
+
j?.scrollTo({ top: j?.scrollHeight + 20, behavior: "smooth" });
|
|
778
|
+
});
|
|
779
|
+
},
|
|
780
|
+
children: "+"
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ s.jsx("button", { className: L([
|
|
784
|
+
"danger",
|
|
785
|
+
n,
|
|
786
|
+
"bt"
|
|
787
|
+
]), onClick: () => {
|
|
788
|
+
C((j) => j.filter((i) => i.rId !== m.rId));
|
|
789
|
+
}, children: "-" })
|
|
790
|
+
] })
|
|
791
|
+
] }, m.rId)) }),
|
|
792
|
+
/* @__PURE__ */ s.jsxs("div", { className: "control", children: [
|
|
793
|
+
!M.length && /* @__PURE__ */ s.jsx("button", { className: L([
|
|
794
|
+
"success",
|
|
795
|
+
n,
|
|
796
|
+
"bt"
|
|
797
|
+
]), onClick: () => {
|
|
798
|
+
C((m) => [...m, { rId: N(), key: "", value: "" }]);
|
|
799
|
+
}, children: K.newTxt }),
|
|
800
|
+
!b && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
801
|
+
!z.hideReset && /* @__PURE__ */ s.jsx("button", { className: L([
|
|
802
|
+
"default",
|
|
803
|
+
n,
|
|
804
|
+
"bt"
|
|
805
|
+
]), onClick: () => {
|
|
806
|
+
C(ve(u, N, P.arraySplitSymbol)), F?.();
|
|
807
|
+
}, children: K.resetTxt }),
|
|
808
|
+
/* @__PURE__ */ s.jsx("button", { className: L([
|
|
809
|
+
"info",
|
|
810
|
+
n,
|
|
811
|
+
"bt"
|
|
812
|
+
]), onClick: () => {
|
|
813
|
+
[...M].sort((G, j) => +G.rId - +j.rId);
|
|
814
|
+
const _ = Ee(M, P.arraySplitSymbol);
|
|
815
|
+
J(_), B?.(_, M), C(ve(_, N, P.arraySplitSymbol));
|
|
816
|
+
}, children: K.mergeTxt })
|
|
817
|
+
] })
|
|
818
|
+
] })
|
|
819
|
+
] });
|
|
820
|
+
}), Or = Ve((o, v) => {
|
|
821
|
+
const {
|
|
822
|
+
depth: u = 5,
|
|
823
|
+
value: n,
|
|
824
|
+
isController: l,
|
|
825
|
+
dyCls: b,
|
|
826
|
+
configs: R,
|
|
827
|
+
btnConfigs: D,
|
|
828
|
+
dyListConfigs: E,
|
|
829
|
+
randomFun: N = (i) => `${Date.now()}_${i ?? 0}`,
|
|
830
|
+
newChildTxt: F = (i) => `添加 '${i.key}' 子项`,
|
|
831
|
+
onReset: B,
|
|
832
|
+
onMerge: J,
|
|
833
|
+
onChange: K
|
|
834
|
+
} = o, z = {
|
|
835
|
+
resetTxt: "重置",
|
|
836
|
+
newTxt: "添加项",
|
|
837
|
+
mergeTxt: "合并",
|
|
838
|
+
...D
|
|
839
|
+
}, P = {
|
|
840
|
+
hideReset: !1,
|
|
841
|
+
maxHeight: "600px",
|
|
842
|
+
allowFilter: !0,
|
|
843
|
+
showBorder: !0,
|
|
844
|
+
showPad: !0,
|
|
845
|
+
retractLen: 0,
|
|
846
|
+
borderColors: [],
|
|
847
|
+
...R
|
|
848
|
+
}, M = {
|
|
849
|
+
arraySplitSymbol: ",",
|
|
850
|
+
...E
|
|
851
|
+
}, C = (i) => ["string", "number"].includes(i), [h, m] = Ue(() => _(n));
|
|
852
|
+
Be(v, () => ({
|
|
853
|
+
getResult(i) {
|
|
854
|
+
return i === "ori" ? h : G(h);
|
|
855
|
+
},
|
|
856
|
+
onSet(i) {
|
|
857
|
+
m(_(i ?? n));
|
|
858
|
+
}
|
|
859
|
+
}));
|
|
860
|
+
function _(i) {
|
|
861
|
+
return Object.keys(i).map((p, O) => {
|
|
862
|
+
let c = i[p];
|
|
863
|
+
const X = Array.isArray(c), re = X ? c.every((Y) => typeof Y == "number") : typeof c == "number", T = c === null;
|
|
864
|
+
return C(typeof c) && (c = i[p]), T && (c = ""), {
|
|
865
|
+
rId: N(O),
|
|
866
|
+
key: p,
|
|
867
|
+
value: Object.prototype.toString.call(c) === "[object Object]" ? _(i[p]) : X ? c.join(M.arraySplitSymbol) : c,
|
|
868
|
+
isArray: X || void 0,
|
|
869
|
+
isNumber: re || void 0
|
|
870
|
+
};
|
|
871
|
+
});
|
|
618
872
|
}
|
|
619
|
-
|
|
873
|
+
const G = (i) => i.reduce((p, O) => {
|
|
874
|
+
const c = O.value;
|
|
875
|
+
return O.key.trim().length && (p[O.key] = Array.isArray(c) ? G(c) : Je(O.value, O.isArray, O.isNumber, M.arraySplitSymbol)), p;
|
|
876
|
+
}, {}), j = (i, p = 1, O = []) => /* @__PURE__ */ s.jsx(
|
|
877
|
+
"div",
|
|
878
|
+
{
|
|
879
|
+
className: L([
|
|
880
|
+
`depth-${p}`,
|
|
881
|
+
P.showBorder ? "" : "no-border",
|
|
882
|
+
P.showPad ? "" : "no-pad"
|
|
883
|
+
]),
|
|
884
|
+
style: {
|
|
885
|
+
//@ts-ignore
|
|
886
|
+
"--depth": p,
|
|
887
|
+
["--c" + [p]]: Tr(P.borderColors, p)
|
|
888
|
+
},
|
|
889
|
+
children: i.map((c, X, re) => {
|
|
890
|
+
const T = [...O, X], Y = Array.isArray(c.value), Q = C(typeof c.value);
|
|
891
|
+
return /* @__PURE__ */ s.jsxs(
|
|
892
|
+
"div",
|
|
893
|
+
{
|
|
894
|
+
className: "dItem",
|
|
895
|
+
style: { marginLeft: p > 1 ? `${p * P.retractLen}px` : "0" },
|
|
896
|
+
children: [
|
|
897
|
+
/* @__PURE__ */ s.jsxs("div", { className: "input", children: [
|
|
898
|
+
!Y && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
899
|
+
/* @__PURE__ */ s.jsx(
|
|
900
|
+
"input",
|
|
901
|
+
{
|
|
902
|
+
value: c.key,
|
|
903
|
+
className: "key nativeInput",
|
|
904
|
+
onInput: ($) => {
|
|
905
|
+
const I = $.target.value;
|
|
906
|
+
m(
|
|
907
|
+
(k) => Z(k, T, (x, A) => {
|
|
908
|
+
const H = [...x], V = H[A];
|
|
909
|
+
return H[A] = { ...V, key: I }, H;
|
|
910
|
+
})
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
),
|
|
915
|
+
":"
|
|
916
|
+
] }),
|
|
917
|
+
/* @__PURE__ */ s.jsxs("div", { className: "vInput", children: [
|
|
918
|
+
/* @__PURE__ */ s.jsx("div", { className: "slot", children: Array.isArray(c.value) ? void 0 : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
919
|
+
/* @__PURE__ */ s.jsx(
|
|
920
|
+
"button",
|
|
921
|
+
{
|
|
922
|
+
className: L([
|
|
923
|
+
c.isArray ? "success" : "default",
|
|
924
|
+
"small",
|
|
925
|
+
"bt"
|
|
926
|
+
]),
|
|
927
|
+
onClick: () => {
|
|
928
|
+
m(
|
|
929
|
+
($) => Z($, T, (I, k) => {
|
|
930
|
+
const x = [...I], A = x[k];
|
|
931
|
+
return x[k] = {
|
|
932
|
+
...A,
|
|
933
|
+
isArray: !A.isArray
|
|
934
|
+
}, x;
|
|
935
|
+
})
|
|
936
|
+
);
|
|
937
|
+
},
|
|
938
|
+
children: "Array"
|
|
939
|
+
}
|
|
940
|
+
),
|
|
941
|
+
" ",
|
|
942
|
+
/* @__PURE__ */ s.jsx(
|
|
943
|
+
"button",
|
|
944
|
+
{
|
|
945
|
+
className: L([
|
|
946
|
+
c.isNumber ? "success" : "default",
|
|
947
|
+
"small",
|
|
948
|
+
"bt"
|
|
949
|
+
]),
|
|
950
|
+
onClick: () => {
|
|
951
|
+
m(
|
|
952
|
+
($) => Z($, T, (I, k) => {
|
|
953
|
+
const x = [...I], A = x[k];
|
|
954
|
+
return x[k] = {
|
|
955
|
+
...A,
|
|
956
|
+
isNumber: !A.isNumber
|
|
957
|
+
}, x;
|
|
958
|
+
})
|
|
959
|
+
);
|
|
960
|
+
},
|
|
961
|
+
children: "Number"
|
|
962
|
+
}
|
|
963
|
+
)
|
|
964
|
+
] }) }),
|
|
965
|
+
/* @__PURE__ */ s.jsx(
|
|
966
|
+
"input",
|
|
967
|
+
{
|
|
968
|
+
className: `value nativeV ${Y ? "isKey" : ""}`,
|
|
969
|
+
value: Q ? c.value : c.key,
|
|
970
|
+
onInput: ($) => {
|
|
971
|
+
const I = $.target.value;
|
|
972
|
+
if (Y) {
|
|
973
|
+
m(
|
|
974
|
+
(x) => Z(x, T, (A, H) => {
|
|
975
|
+
const V = [...A], te = V[H];
|
|
976
|
+
return V[H] = { ...te, key: I }, V;
|
|
977
|
+
})
|
|
978
|
+
);
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
let k = I;
|
|
982
|
+
P.allowFilter && c.isNumber && (k = qe(
|
|
983
|
+
I,
|
|
984
|
+
c.isArray,
|
|
985
|
+
M.arraySplitSymbol
|
|
986
|
+
)), m(
|
|
987
|
+
(x) => Z(x, T, (A, H) => {
|
|
988
|
+
const V = [...A], te = V[H];
|
|
989
|
+
return V[H] = { ...te, value: k }, V;
|
|
990
|
+
})
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
),
|
|
995
|
+
/* @__PURE__ */ s.jsx("div", { className: "surSlot", children: p < u ? !Y && /* @__PURE__ */ s.jsx(
|
|
996
|
+
"button",
|
|
997
|
+
{
|
|
998
|
+
className: L([
|
|
999
|
+
"success",
|
|
1000
|
+
"bt"
|
|
1001
|
+
]),
|
|
1002
|
+
onClick: () => {
|
|
1003
|
+
m(
|
|
1004
|
+
($) => Z($, T, (I, k) => {
|
|
1005
|
+
const x = [...I], A = x[k], V = [
|
|
1006
|
+
...Array.isArray(A.value) ? A.value : [],
|
|
1007
|
+
{ rId: N(), key: "", value: "" }
|
|
1008
|
+
];
|
|
1009
|
+
return x[k] = {
|
|
1010
|
+
...A,
|
|
1011
|
+
isArray: void 0,
|
|
1012
|
+
isNumber: void 0,
|
|
1013
|
+
value: V
|
|
1014
|
+
}, x;
|
|
1015
|
+
})
|
|
1016
|
+
);
|
|
1017
|
+
},
|
|
1018
|
+
children: F(c)
|
|
1019
|
+
}
|
|
1020
|
+
) : null })
|
|
1021
|
+
] })
|
|
1022
|
+
] }),
|
|
1023
|
+
/* @__PURE__ */ s.jsxs("div", { className: "btn", children: [
|
|
1024
|
+
/* @__PURE__ */ s.jsx(
|
|
1025
|
+
"button",
|
|
1026
|
+
{
|
|
1027
|
+
className: L(["success", "bt"]),
|
|
1028
|
+
disabled: X !== re.length - 1,
|
|
1029
|
+
onClick: () => {
|
|
1030
|
+
m(($) => Z($, T, (I, k) => {
|
|
1031
|
+
const x = [...I];
|
|
1032
|
+
return x.splice(k + 1, 0, {
|
|
1033
|
+
rId: N(),
|
|
1034
|
+
key: "",
|
|
1035
|
+
value: ""
|
|
1036
|
+
}), x;
|
|
1037
|
+
}));
|
|
1038
|
+
},
|
|
1039
|
+
children: "+"
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
/* @__PURE__ */ s.jsx(
|
|
1043
|
+
"button",
|
|
1044
|
+
{
|
|
1045
|
+
className: L([
|
|
1046
|
+
"danger",
|
|
1047
|
+
"bt"
|
|
1048
|
+
]),
|
|
1049
|
+
onClick: () => {
|
|
1050
|
+
m(
|
|
1051
|
+
($) => Z($, T, (I, k) => {
|
|
1052
|
+
const x = [...I];
|
|
1053
|
+
return x.splice(k, 1), x;
|
|
1054
|
+
})
|
|
1055
|
+
);
|
|
1056
|
+
},
|
|
1057
|
+
children: "-"
|
|
1058
|
+
}
|
|
1059
|
+
)
|
|
1060
|
+
] }),
|
|
1061
|
+
Array.isArray(c.value) && j(c.value, p + 1, T)
|
|
1062
|
+
]
|
|
1063
|
+
},
|
|
1064
|
+
c.rId
|
|
1065
|
+
);
|
|
1066
|
+
})
|
|
1067
|
+
}
|
|
1068
|
+
);
|
|
1069
|
+
return He(() => {
|
|
1070
|
+
l && K(G(h));
|
|
1071
|
+
}, [h]), /* @__PURE__ */ s.jsxs("div", { className: b ?? "dynamicCascadeInput", children: [
|
|
1072
|
+
/* @__PURE__ */ s.jsx("div", { className: "dyFormList", style: { maxHeight: P.maxHeight }, children: j(h) }),
|
|
1073
|
+
/* @__PURE__ */ s.jsxs("div", { className: "control", children: [
|
|
1074
|
+
!h.length && /* @__PURE__ */ s.jsx(
|
|
1075
|
+
"button",
|
|
1076
|
+
{
|
|
1077
|
+
className: L([
|
|
1078
|
+
"success",
|
|
1079
|
+
"bt"
|
|
1080
|
+
]),
|
|
1081
|
+
onClick: () => {
|
|
1082
|
+
m((i) => [...i, { rId: N(), key: "", value: "" }]);
|
|
1083
|
+
},
|
|
1084
|
+
children: z.newTxt
|
|
1085
|
+
}
|
|
1086
|
+
),
|
|
1087
|
+
!l && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1088
|
+
!P.hideReset && /* @__PURE__ */ s.jsx(
|
|
1089
|
+
"button",
|
|
1090
|
+
{
|
|
1091
|
+
className: L([
|
|
1092
|
+
"default",
|
|
1093
|
+
"bt"
|
|
1094
|
+
]),
|
|
1095
|
+
onClick: () => {
|
|
1096
|
+
m(_(n)), B?.();
|
|
1097
|
+
},
|
|
1098
|
+
children: z.resetTxt
|
|
1099
|
+
}
|
|
1100
|
+
),
|
|
1101
|
+
/* @__PURE__ */ s.jsx(
|
|
1102
|
+
"button",
|
|
1103
|
+
{
|
|
1104
|
+
className: L([
|
|
1105
|
+
"info",
|
|
1106
|
+
"bt"
|
|
1107
|
+
]),
|
|
1108
|
+
onClick: () => {
|
|
1109
|
+
const i = G(h);
|
|
1110
|
+
K(i), J?.(i, h), m(_(i));
|
|
1111
|
+
},
|
|
1112
|
+
children: z.mergeTxt
|
|
1113
|
+
}
|
|
1114
|
+
)
|
|
1115
|
+
] })
|
|
1116
|
+
] })
|
|
1117
|
+
] });
|
|
1118
|
+
});
|
|
620
1119
|
export {
|
|
621
|
-
|
|
1120
|
+
Or as DynamicCascadeInput,
|
|
1121
|
+
wr as DynamicInput
|
|
622
1122
|
};
|