@harbor-design/proform 1.3.13 → 1.3.15
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/index.js +588 -562
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Te = Object.defineProperty;
|
|
2
|
-
var ze = (
|
|
3
|
-
var u = (
|
|
4
|
-
import { ref as z, readonly as Pe, nextTick as
|
|
2
|
+
var ze = (r, e, t) => e in r ? Te(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var u = (r, e, t) => (ze(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { ref as z, readonly as Pe, nextTick as O, isRef as F, watch as v, isReactive as j, toRaw as R, reactive as K, createVNode as b, mergeProps as U, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as He } from "vue";
|
|
5
5
|
class o {
|
|
6
6
|
static typeChecker(e) {
|
|
7
7
|
return {}.toString.call(e);
|
|
@@ -50,17 +50,17 @@ class o {
|
|
|
50
50
|
return !1;
|
|
51
51
|
if (this.isObjectEmpty(e))
|
|
52
52
|
return !0;
|
|
53
|
-
for (const
|
|
54
|
-
if (
|
|
53
|
+
for (const t in e) {
|
|
54
|
+
if (t === "componentProps")
|
|
55
55
|
return !1;
|
|
56
|
-
if (e.hasOwnProperty(
|
|
56
|
+
if (e.hasOwnProperty(t) && this.isProcessInprogress(e[t]))
|
|
57
57
|
return !0;
|
|
58
58
|
}
|
|
59
59
|
} else if (this.isArray(e)) {
|
|
60
60
|
if (this.isArrayEmpty(e))
|
|
61
61
|
return !0;
|
|
62
|
-
for (const
|
|
63
|
-
if (this.isProcessInprogress(
|
|
62
|
+
for (const t of e)
|
|
63
|
+
if (this.isProcessInprogress(t))
|
|
64
64
|
return !0;
|
|
65
65
|
}
|
|
66
66
|
return !1;
|
|
@@ -69,20 +69,20 @@ class o {
|
|
|
69
69
|
return !!e.__proform_raw_object;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function h(
|
|
73
|
-
return e.forEach((
|
|
74
|
-
if (Array.isArray(
|
|
75
|
-
Array.isArray(
|
|
76
|
-
typeof i == "object" && i !== null ?
|
|
72
|
+
function h(r, ...e) {
|
|
73
|
+
return e.forEach((t) => {
|
|
74
|
+
if (Array.isArray(t))
|
|
75
|
+
Array.isArray(r) || (r = []), t.forEach((i, s) => {
|
|
76
|
+
typeof i == "object" && i !== null ? r[s] = h(Array.isArray(i) ? [] : {}, i) : r[s] = i;
|
|
77
77
|
});
|
|
78
78
|
else
|
|
79
|
-
for (const i in
|
|
80
|
-
|
|
81
|
-
}),
|
|
79
|
+
for (const i in t)
|
|
80
|
+
t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = h(r[i] || {}, t[i]) : r[i] = t[i]);
|
|
81
|
+
}), r;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function P(r) {
|
|
84
84
|
const e = /* @__PURE__ */ new WeakMap();
|
|
85
|
-
function
|
|
85
|
+
function t(i) {
|
|
86
86
|
if (i === null || typeof i != "object")
|
|
87
87
|
return i;
|
|
88
88
|
if (i instanceof Date)
|
|
@@ -92,13 +92,13 @@ function I(t) {
|
|
|
92
92
|
if (i instanceof Map) {
|
|
93
93
|
const n = /* @__PURE__ */ new Map();
|
|
94
94
|
for (const [a, l] of i)
|
|
95
|
-
n.set(
|
|
95
|
+
n.set(t(a), t(l));
|
|
96
96
|
return n;
|
|
97
97
|
}
|
|
98
98
|
if (i instanceof Set) {
|
|
99
99
|
const n = /* @__PURE__ */ new Set();
|
|
100
100
|
for (const a of i)
|
|
101
|
-
n.add(
|
|
101
|
+
n.add(t(a));
|
|
102
102
|
return n;
|
|
103
103
|
}
|
|
104
104
|
if (e.has(i))
|
|
@@ -107,21 +107,21 @@ function I(t) {
|
|
|
107
107
|
const n = [];
|
|
108
108
|
e.set(i, n);
|
|
109
109
|
for (let a = 0; a < i.length; a++)
|
|
110
|
-
n[a] =
|
|
110
|
+
n[a] = t(i[a]);
|
|
111
111
|
return n;
|
|
112
112
|
}
|
|
113
113
|
const s = Object.create(Object.getPrototypeOf(i));
|
|
114
114
|
e.set(i, s);
|
|
115
115
|
for (const n in i)
|
|
116
|
-
i.hasOwnProperty(n) && (s[n] =
|
|
116
|
+
i.hasOwnProperty(n) && (s[n] = t(i[n]));
|
|
117
117
|
return s;
|
|
118
118
|
}
|
|
119
|
-
return r
|
|
119
|
+
return t(r);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
return
|
|
121
|
+
function Y(r, e) {
|
|
122
|
+
return r.replace(/undefined/g, e);
|
|
123
123
|
}
|
|
124
|
-
class
|
|
124
|
+
class Ke {
|
|
125
125
|
constructor(e) {
|
|
126
126
|
u(this, "runtimeCore");
|
|
127
127
|
u(this, "readonlyReactiveModel", z({}));
|
|
@@ -129,8 +129,8 @@ class He {
|
|
|
129
129
|
}
|
|
130
130
|
// happy path, 后续可以完善更多的 fallback 处理,fallback 处理是为了不卡住异步时的首次渲染做的优化
|
|
131
131
|
cleanFallbackFields(e) {
|
|
132
|
-
return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((
|
|
133
|
-
this.cleanFallbackFields(
|
|
132
|
+
return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((t) => {
|
|
133
|
+
this.cleanFallbackFields(t);
|
|
134
134
|
})), e;
|
|
135
135
|
}
|
|
136
136
|
setup(e) {
|
|
@@ -138,14 +138,14 @@ class He {
|
|
|
138
138
|
}
|
|
139
139
|
submit() {
|
|
140
140
|
var i;
|
|
141
|
-
const e = (i =
|
|
142
|
-
return (e == null ? void 0 : e.validateForm(this)) ?? (
|
|
141
|
+
const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.runtimeCore.ui)];
|
|
142
|
+
return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
|
|
143
143
|
}
|
|
144
144
|
hydrate(e) {
|
|
145
|
-
|
|
145
|
+
O(() => {
|
|
146
146
|
this.runtimeCore.hydrateEffect.trackEffect(
|
|
147
147
|
() => {
|
|
148
|
-
|
|
148
|
+
F(e) ? v(
|
|
149
149
|
() => e.value,
|
|
150
150
|
() => {
|
|
151
151
|
h(this.runtimeCore.model.value, e.value);
|
|
@@ -154,7 +154,7 @@ class He {
|
|
|
154
154
|
deep: !0,
|
|
155
155
|
immediate: !0
|
|
156
156
|
}
|
|
157
|
-
) :
|
|
157
|
+
) : j(e) ? v(
|
|
158
158
|
() => e,
|
|
159
159
|
() => {
|
|
160
160
|
h(this.runtimeCore.model.value, e);
|
|
@@ -172,46 +172,63 @@ class He {
|
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
share(e) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
O(() => {
|
|
176
|
+
F(e) ? v(
|
|
177
|
+
() => e.value,
|
|
178
|
+
() => {
|
|
179
|
+
h(this.runtimeCore.shared, e.value);
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
deep: !0,
|
|
183
|
+
immediate: !0
|
|
184
|
+
}
|
|
185
|
+
) : j(e) ? v(
|
|
186
|
+
() => e,
|
|
187
|
+
() => {
|
|
188
|
+
h(this.runtimeCore.shared, e);
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
deep: !0,
|
|
192
|
+
immediate: !0
|
|
193
|
+
}
|
|
194
|
+
) : Object.keys(e).forEach((t) => {
|
|
195
|
+
F(e[t]) ? v(
|
|
196
|
+
() => e[t].value,
|
|
179
197
|
() => {
|
|
180
|
-
h(this.runtimeCore.shared,
|
|
181
|
-
|
|
198
|
+
h(this.runtimeCore.shared, {
|
|
199
|
+
[t]: e[t].value
|
|
182
200
|
});
|
|
183
201
|
},
|
|
184
202
|
{
|
|
185
203
|
deep: !0,
|
|
186
204
|
immediate: !0
|
|
187
205
|
}
|
|
188
|
-
)
|
|
189
|
-
|
|
190
|
-
const r = _(
|
|
191
|
-
() => e,
|
|
206
|
+
) : j(e[t]) ? v(
|
|
207
|
+
() => e[t],
|
|
192
208
|
() => {
|
|
193
|
-
h(this.runtimeCore.shared,
|
|
194
|
-
|
|
209
|
+
h(this.runtimeCore.shared, {
|
|
210
|
+
[t]: e[t]
|
|
195
211
|
});
|
|
196
212
|
},
|
|
197
213
|
{
|
|
198
214
|
deep: !0,
|
|
199
215
|
immediate: !0
|
|
200
216
|
}
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
|
|
217
|
+
) : h(this.runtimeCore.shared, {
|
|
218
|
+
[t]: e[t]
|
|
219
|
+
});
|
|
220
|
+
});
|
|
204
221
|
});
|
|
205
222
|
}
|
|
206
223
|
subscribeModel(e) {
|
|
207
|
-
|
|
208
|
-
const
|
|
224
|
+
O(() => {
|
|
225
|
+
const t = v(
|
|
209
226
|
() => this.readonlyReactiveModel.value,
|
|
210
227
|
(i) => {
|
|
211
228
|
e(i, {
|
|
212
229
|
stopSubscribe() {
|
|
213
|
-
|
|
214
|
-
|
|
230
|
+
O(() => {
|
|
231
|
+
t();
|
|
215
232
|
});
|
|
216
233
|
}
|
|
217
234
|
});
|
|
@@ -225,12 +242,12 @@ class He {
|
|
|
225
242
|
}
|
|
226
243
|
resetModel() {
|
|
227
244
|
var e;
|
|
228
|
-
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value =
|
|
245
|
+
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = P(
|
|
229
246
|
this.runtimeCore.processor.stableModel
|
|
230
247
|
), this.readonlyReactiveModel.value = Pe(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
231
248
|
}
|
|
232
249
|
}
|
|
233
|
-
class
|
|
250
|
+
class Z {
|
|
234
251
|
constructor() {
|
|
235
252
|
u(this, "effects", /* @__PURE__ */ new Set());
|
|
236
253
|
u(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
@@ -243,325 +260,325 @@ class Y {
|
|
|
243
260
|
triggerEffects() {
|
|
244
261
|
Array.from(this.effects).forEach((e) => e());
|
|
245
262
|
}
|
|
246
|
-
trackEffect(e,
|
|
263
|
+
trackEffect(e, t = {
|
|
247
264
|
lazy: !0
|
|
248
265
|
}) {
|
|
249
|
-
return !
|
|
266
|
+
return !t.lazy && e(), t.identifier ? this.identifierMap.get(t.identifier) || (this.effects.add(e), this.identifierMap.set(t.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
|
|
250
267
|
}
|
|
251
268
|
}
|
|
252
|
-
var We = typeof global == "object" && global && global.Object === Object && global,
|
|
253
|
-
function
|
|
254
|
-
var e =
|
|
269
|
+
var We = typeof global == "object" && global && global.Object === Object && global, Xe = typeof self == "object" && self && self.Object === Object && self, Q = We || Xe || Function("return this")(), $ = Q.Symbol, je = Object.prototype, Ye = je.hasOwnProperty, Ze = je.toString, q = $ ? $.toStringTag : void 0;
|
|
270
|
+
function Je(r) {
|
|
271
|
+
var e = Ye.call(r, q), t = r[q];
|
|
255
272
|
try {
|
|
256
|
-
|
|
273
|
+
r[q] = void 0;
|
|
257
274
|
var i = !0;
|
|
258
275
|
} catch {
|
|
259
276
|
}
|
|
260
|
-
var s =
|
|
261
|
-
return i && (e ?
|
|
277
|
+
var s = Ze.call(r);
|
|
278
|
+
return i && (e ? r[q] = t : delete r[q]), s;
|
|
262
279
|
}
|
|
263
|
-
var
|
|
264
|
-
function Ae(
|
|
265
|
-
return
|
|
280
|
+
var Qe = Object.prototype, ke = Qe.toString;
|
|
281
|
+
function Ae(r) {
|
|
282
|
+
return ke.call(r);
|
|
266
283
|
}
|
|
267
|
-
var et = "[object Null]", tt = "[object Undefined]",
|
|
268
|
-
function we(
|
|
269
|
-
return
|
|
284
|
+
var et = "[object Null]", tt = "[object Undefined]", Ce = $ ? $.toStringTag : void 0;
|
|
285
|
+
function we(r) {
|
|
286
|
+
return r == null ? r === void 0 ? tt : et : Ce && Ce in Object(r) ? Je(r) : Ae(r);
|
|
270
287
|
}
|
|
271
|
-
function rt(
|
|
272
|
-
return
|
|
288
|
+
function rt(r) {
|
|
289
|
+
return r != null && typeof r == "object";
|
|
273
290
|
}
|
|
274
291
|
var it = "[object Symbol]";
|
|
275
|
-
function
|
|
276
|
-
return typeof
|
|
292
|
+
function k(r) {
|
|
293
|
+
return typeof r == "symbol" || rt(r) && we(r) == it;
|
|
277
294
|
}
|
|
278
|
-
function st(
|
|
279
|
-
for (var
|
|
280
|
-
s[
|
|
295
|
+
function st(r, e) {
|
|
296
|
+
for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
|
|
297
|
+
s[t] = e(r[t], t, r);
|
|
281
298
|
return s;
|
|
282
299
|
}
|
|
283
|
-
var A = Array.isArray, nt = 1 / 0,
|
|
284
|
-
function Me(
|
|
285
|
-
if (typeof
|
|
286
|
-
return
|
|
287
|
-
if (A(
|
|
288
|
-
return st(
|
|
289
|
-
if (
|
|
290
|
-
return Se ? Se.call(
|
|
291
|
-
var e =
|
|
292
|
-
return e == "0" && 1 /
|
|
300
|
+
var A = Array.isArray, nt = 1 / 0, Ie = $ ? $.prototype : void 0, Se = Ie ? Ie.toString : void 0;
|
|
301
|
+
function Me(r) {
|
|
302
|
+
if (typeof r == "string")
|
|
303
|
+
return r;
|
|
304
|
+
if (A(r))
|
|
305
|
+
return st(r, Me) + "";
|
|
306
|
+
if (k(r))
|
|
307
|
+
return Se ? Se.call(r) : "";
|
|
308
|
+
var e = r + "";
|
|
309
|
+
return e == "0" && 1 / r == -nt ? "-0" : e;
|
|
293
310
|
}
|
|
294
|
-
function G(
|
|
295
|
-
var e = typeof
|
|
296
|
-
return
|
|
311
|
+
function G(r) {
|
|
312
|
+
var e = typeof r;
|
|
313
|
+
return r != null && (e == "object" || e == "function");
|
|
297
314
|
}
|
|
298
315
|
var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object GeneratorFunction]", ut = "[object Proxy]";
|
|
299
|
-
function
|
|
300
|
-
if (!G(
|
|
316
|
+
function ft(r) {
|
|
317
|
+
if (!G(r))
|
|
301
318
|
return !1;
|
|
302
|
-
var e = we(
|
|
319
|
+
var e = we(r);
|
|
303
320
|
return e == at || e == lt || e == ot || e == ut;
|
|
304
321
|
}
|
|
305
|
-
var W =
|
|
306
|
-
var
|
|
307
|
-
return
|
|
322
|
+
var W = Q["__core-js_shared__"], Oe = function() {
|
|
323
|
+
var r = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
|
|
324
|
+
return r ? "Symbol(src)_1." + r : "";
|
|
308
325
|
}();
|
|
309
|
-
function
|
|
310
|
-
return !!Oe && Oe in
|
|
326
|
+
function ct(r) {
|
|
327
|
+
return !!Oe && Oe in r;
|
|
311
328
|
}
|
|
312
329
|
var dt = Function.prototype, pt = dt.toString;
|
|
313
|
-
function ht(
|
|
314
|
-
if (
|
|
330
|
+
function ht(r) {
|
|
331
|
+
if (r != null) {
|
|
315
332
|
try {
|
|
316
|
-
return pt.call(
|
|
333
|
+
return pt.call(r);
|
|
317
334
|
} catch {
|
|
318
335
|
}
|
|
319
336
|
try {
|
|
320
|
-
return
|
|
337
|
+
return r + "";
|
|
321
338
|
} catch {
|
|
322
339
|
}
|
|
323
340
|
}
|
|
324
341
|
return "";
|
|
325
342
|
}
|
|
326
|
-
var mt = /[\\^$.*+?()[\]{}|]/g,
|
|
327
|
-
"^" +
|
|
343
|
+
var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, vt = Function.prototype, gt = Object.prototype, yt = vt.toString, _t = gt.hasOwnProperty, Pt = RegExp(
|
|
344
|
+
"^" + yt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
328
345
|
);
|
|
329
|
-
function
|
|
330
|
-
if (!G(
|
|
346
|
+
function Ct(r) {
|
|
347
|
+
if (!G(r) || ct(r))
|
|
331
348
|
return !1;
|
|
332
|
-
var e =
|
|
333
|
-
return e.test(ht(
|
|
349
|
+
var e = ft(r) ? Pt : bt;
|
|
350
|
+
return e.test(ht(r));
|
|
334
351
|
}
|
|
335
|
-
function
|
|
336
|
-
return
|
|
352
|
+
function It(r, e) {
|
|
353
|
+
return r == null ? void 0 : r[e];
|
|
337
354
|
}
|
|
338
|
-
function ee(
|
|
339
|
-
var
|
|
340
|
-
return
|
|
355
|
+
function ee(r, e) {
|
|
356
|
+
var t = It(r, e);
|
|
357
|
+
return Ct(t) ? t : void 0;
|
|
341
358
|
}
|
|
342
359
|
var Fe = function() {
|
|
343
360
|
try {
|
|
344
|
-
var
|
|
345
|
-
return
|
|
361
|
+
var r = ee(Object, "defineProperty");
|
|
362
|
+
return r({}, "", {}), r;
|
|
346
363
|
} catch {
|
|
347
364
|
}
|
|
348
365
|
}(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
|
|
349
|
-
function Ft(
|
|
350
|
-
var
|
|
351
|
-
return e = e ?? St, !!e && (
|
|
366
|
+
function Ft(r, e) {
|
|
367
|
+
var t = typeof r;
|
|
368
|
+
return e = e ?? St, !!e && (t == "number" || t != "symbol" && Ot.test(r)) && r > -1 && r % 1 == 0 && r < e;
|
|
352
369
|
}
|
|
353
|
-
function jt(
|
|
354
|
-
e == "__proto__" && Fe ? Fe(
|
|
370
|
+
function jt(r, e, t) {
|
|
371
|
+
e == "__proto__" && Fe ? Fe(r, e, {
|
|
355
372
|
configurable: !0,
|
|
356
373
|
enumerable: !0,
|
|
357
|
-
value:
|
|
374
|
+
value: t,
|
|
358
375
|
writable: !0
|
|
359
|
-
}) :
|
|
376
|
+
}) : r[e] = t;
|
|
360
377
|
}
|
|
361
|
-
function xe(
|
|
362
|
-
return
|
|
378
|
+
function xe(r, e) {
|
|
379
|
+
return r === e || r !== r && e !== e;
|
|
363
380
|
}
|
|
364
381
|
var wt = Object.prototype, Mt = wt.hasOwnProperty;
|
|
365
|
-
function xt(
|
|
366
|
-
var i =
|
|
367
|
-
(!(Mt.call(
|
|
382
|
+
function xt(r, e, t) {
|
|
383
|
+
var i = r[e];
|
|
384
|
+
(!(Mt.call(r, e) && xe(i, t)) || t === void 0 && !(e in r)) && jt(r, e, t);
|
|
368
385
|
}
|
|
369
386
|
var Et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
|
|
370
|
-
function $t(
|
|
371
|
-
if (A(
|
|
387
|
+
function $t(r, e) {
|
|
388
|
+
if (A(r))
|
|
372
389
|
return !1;
|
|
373
|
-
var
|
|
374
|
-
return
|
|
390
|
+
var t = typeof r;
|
|
391
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || k(r) ? !0 : Rt.test(r) || !Et.test(r) || e != null && r in Object(e);
|
|
375
392
|
}
|
|
376
393
|
var T = ee(Object, "create");
|
|
377
394
|
function Vt() {
|
|
378
395
|
this.__data__ = T ? T(null) : {}, this.size = 0;
|
|
379
396
|
}
|
|
380
|
-
function Nt(
|
|
381
|
-
var e = this.has(
|
|
397
|
+
function Nt(r) {
|
|
398
|
+
var e = this.has(r) && delete this.__data__[r];
|
|
382
399
|
return this.size -= e ? 1 : 0, e;
|
|
383
400
|
}
|
|
384
401
|
var qt = "__lodash_hash_undefined__", Ut = Object.prototype, Tt = Ut.hasOwnProperty;
|
|
385
|
-
function zt(
|
|
402
|
+
function zt(r) {
|
|
386
403
|
var e = this.__data__;
|
|
387
404
|
if (T) {
|
|
388
|
-
var
|
|
389
|
-
return
|
|
405
|
+
var t = e[r];
|
|
406
|
+
return t === qt ? void 0 : t;
|
|
390
407
|
}
|
|
391
|
-
return Tt.call(e,
|
|
408
|
+
return Tt.call(e, r) ? e[r] : void 0;
|
|
392
409
|
}
|
|
393
410
|
var Lt = Object.prototype, Dt = Lt.hasOwnProperty;
|
|
394
|
-
function Gt(
|
|
411
|
+
function Gt(r) {
|
|
395
412
|
var e = this.__data__;
|
|
396
|
-
return T ? e[
|
|
413
|
+
return T ? e[r] !== void 0 : Dt.call(e, r);
|
|
397
414
|
}
|
|
398
415
|
var Bt = "__lodash_hash_undefined__";
|
|
399
|
-
function
|
|
400
|
-
var
|
|
401
|
-
return this.size += this.has(
|
|
402
|
-
}
|
|
403
|
-
function
|
|
404
|
-
var e = -1,
|
|
405
|
-
for (this.clear(); ++e <
|
|
406
|
-
var i =
|
|
416
|
+
function Ht(r, e) {
|
|
417
|
+
var t = this.__data__;
|
|
418
|
+
return this.size += this.has(r) ? 0 : 1, t[r] = T && e === void 0 ? Bt : e, this;
|
|
419
|
+
}
|
|
420
|
+
function w(r) {
|
|
421
|
+
var e = -1, t = r == null ? 0 : r.length;
|
|
422
|
+
for (this.clear(); ++e < t; ) {
|
|
423
|
+
var i = r[e];
|
|
407
424
|
this.set(i[0], i[1]);
|
|
408
425
|
}
|
|
409
426
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
function
|
|
427
|
+
w.prototype.clear = Vt;
|
|
428
|
+
w.prototype.delete = Nt;
|
|
429
|
+
w.prototype.get = zt;
|
|
430
|
+
w.prototype.has = Gt;
|
|
431
|
+
w.prototype.set = Ht;
|
|
432
|
+
function Kt() {
|
|
416
433
|
this.__data__ = [], this.size = 0;
|
|
417
434
|
}
|
|
418
|
-
function B(
|
|
419
|
-
for (var
|
|
420
|
-
if (xe(t
|
|
421
|
-
return
|
|
435
|
+
function B(r, e) {
|
|
436
|
+
for (var t = r.length; t--; )
|
|
437
|
+
if (xe(r[t][0], e))
|
|
438
|
+
return t;
|
|
422
439
|
return -1;
|
|
423
440
|
}
|
|
424
|
-
var Wt = Array.prototype,
|
|
425
|
-
function
|
|
426
|
-
var e = this.__data__,
|
|
427
|
-
if (
|
|
441
|
+
var Wt = Array.prototype, Xt = Wt.splice;
|
|
442
|
+
function Yt(r) {
|
|
443
|
+
var e = this.__data__, t = B(e, r);
|
|
444
|
+
if (t < 0)
|
|
428
445
|
return !1;
|
|
429
446
|
var i = e.length - 1;
|
|
430
|
-
return
|
|
447
|
+
return t == i ? e.pop() : Xt.call(e, t, 1), --this.size, !0;
|
|
431
448
|
}
|
|
432
|
-
function
|
|
433
|
-
var e = this.__data__,
|
|
434
|
-
return
|
|
449
|
+
function Zt(r) {
|
|
450
|
+
var e = this.__data__, t = B(e, r);
|
|
451
|
+
return t < 0 ? void 0 : e[t][1];
|
|
435
452
|
}
|
|
436
|
-
function
|
|
437
|
-
return B(this.__data__,
|
|
453
|
+
function Jt(r) {
|
|
454
|
+
return B(this.__data__, r) > -1;
|
|
438
455
|
}
|
|
439
|
-
function
|
|
440
|
-
var
|
|
441
|
-
return i < 0 ? (++this.size,
|
|
456
|
+
function Qt(r, e) {
|
|
457
|
+
var t = this.__data__, i = B(t, r);
|
|
458
|
+
return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
|
|
442
459
|
}
|
|
443
|
-
function
|
|
444
|
-
var e = -1,
|
|
445
|
-
for (this.clear(); ++e <
|
|
446
|
-
var i =
|
|
460
|
+
function V(r) {
|
|
461
|
+
var e = -1, t = r == null ? 0 : r.length;
|
|
462
|
+
for (this.clear(); ++e < t; ) {
|
|
463
|
+
var i = r[e];
|
|
447
464
|
this.set(i[0], i[1]);
|
|
448
465
|
}
|
|
449
466
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var
|
|
467
|
+
V.prototype.clear = Kt;
|
|
468
|
+
V.prototype.delete = Yt;
|
|
469
|
+
V.prototype.get = Zt;
|
|
470
|
+
V.prototype.has = Jt;
|
|
471
|
+
V.prototype.set = Qt;
|
|
472
|
+
var kt = ee(Q, "Map");
|
|
456
473
|
function At() {
|
|
457
474
|
this.size = 0, this.__data__ = {
|
|
458
|
-
hash: new
|
|
459
|
-
map: new (
|
|
460
|
-
string: new
|
|
475
|
+
hash: new w(),
|
|
476
|
+
map: new (kt || V)(),
|
|
477
|
+
string: new w()
|
|
461
478
|
};
|
|
462
479
|
}
|
|
463
|
-
function er(
|
|
464
|
-
var e = typeof
|
|
465
|
-
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ?
|
|
480
|
+
function er(r) {
|
|
481
|
+
var e = typeof r;
|
|
482
|
+
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
|
|
466
483
|
}
|
|
467
|
-
function
|
|
468
|
-
var
|
|
469
|
-
return er(e) ?
|
|
484
|
+
function H(r, e) {
|
|
485
|
+
var t = r.__data__;
|
|
486
|
+
return er(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
|
|
470
487
|
}
|
|
471
|
-
function tr(
|
|
472
|
-
var e =
|
|
488
|
+
function tr(r) {
|
|
489
|
+
var e = H(this, r).delete(r);
|
|
473
490
|
return this.size -= e ? 1 : 0, e;
|
|
474
491
|
}
|
|
475
|
-
function rr(
|
|
476
|
-
return
|
|
492
|
+
function rr(r) {
|
|
493
|
+
return H(this, r).get(r);
|
|
477
494
|
}
|
|
478
|
-
function ir(
|
|
479
|
-
return
|
|
495
|
+
function ir(r) {
|
|
496
|
+
return H(this, r).has(r);
|
|
480
497
|
}
|
|
481
|
-
function sr(
|
|
482
|
-
var
|
|
483
|
-
return
|
|
498
|
+
function sr(r, e) {
|
|
499
|
+
var t = H(this, r), i = t.size;
|
|
500
|
+
return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
|
|
484
501
|
}
|
|
485
|
-
function
|
|
486
|
-
var e = -1,
|
|
487
|
-
for (this.clear(); ++e <
|
|
488
|
-
var i =
|
|
502
|
+
function M(r) {
|
|
503
|
+
var e = -1, t = r == null ? 0 : r.length;
|
|
504
|
+
for (this.clear(); ++e < t; ) {
|
|
505
|
+
var i = r[e];
|
|
489
506
|
this.set(i[0], i[1]);
|
|
490
507
|
}
|
|
491
508
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
509
|
+
M.prototype.clear = At;
|
|
510
|
+
M.prototype.delete = tr;
|
|
511
|
+
M.prototype.get = rr;
|
|
512
|
+
M.prototype.has = ir;
|
|
513
|
+
M.prototype.set = sr;
|
|
497
514
|
var nr = "Expected a function";
|
|
498
|
-
function te(
|
|
499
|
-
if (typeof
|
|
515
|
+
function te(r, e) {
|
|
516
|
+
if (typeof r != "function" || e != null && typeof e != "function")
|
|
500
517
|
throw new TypeError(nr);
|
|
501
|
-
var
|
|
502
|
-
var i = arguments, s = e ? e.apply(this, i) : i[0], n =
|
|
518
|
+
var t = function() {
|
|
519
|
+
var i = arguments, s = e ? e.apply(this, i) : i[0], n = t.cache;
|
|
503
520
|
if (n.has(s))
|
|
504
521
|
return n.get(s);
|
|
505
|
-
var a =
|
|
506
|
-
return
|
|
522
|
+
var a = r.apply(this, i);
|
|
523
|
+
return t.cache = n.set(s, a) || n, a;
|
|
507
524
|
};
|
|
508
|
-
return
|
|
525
|
+
return t.cache = new (te.Cache || M)(), t;
|
|
509
526
|
}
|
|
510
|
-
te.Cache =
|
|
527
|
+
te.Cache = M;
|
|
511
528
|
var or = 500;
|
|
512
|
-
function ar(
|
|
513
|
-
var e = te(
|
|
514
|
-
return
|
|
515
|
-
}),
|
|
529
|
+
function ar(r) {
|
|
530
|
+
var e = te(r, function(i) {
|
|
531
|
+
return t.size === or && t.clear(), i;
|
|
532
|
+
}), t = e.cache;
|
|
516
533
|
return e;
|
|
517
534
|
}
|
|
518
|
-
var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g,
|
|
535
|
+
var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(r) {
|
|
519
536
|
var e = [];
|
|
520
|
-
return
|
|
521
|
-
e.push(s ? n.replace(ur, "$1") : i ||
|
|
537
|
+
return r.charCodeAt(0) === 46 && e.push(""), r.replace(lr, function(t, i, s, n) {
|
|
538
|
+
e.push(s ? n.replace(ur, "$1") : i || t);
|
|
522
539
|
}), e;
|
|
523
540
|
});
|
|
524
|
-
function
|
|
525
|
-
return
|
|
541
|
+
function cr(r) {
|
|
542
|
+
return r == null ? "" : Me(r);
|
|
526
543
|
}
|
|
527
|
-
function Ee(
|
|
528
|
-
return A(
|
|
544
|
+
function Ee(r, e) {
|
|
545
|
+
return A(r) ? r : $t(r, e) ? [r] : fr(cr(r));
|
|
529
546
|
}
|
|
530
547
|
var dr = 1 / 0;
|
|
531
|
-
function Re(
|
|
532
|
-
if (typeof
|
|
533
|
-
return
|
|
534
|
-
var e =
|
|
535
|
-
return e == "0" && 1 /
|
|
548
|
+
function Re(r) {
|
|
549
|
+
if (typeof r == "string" || k(r))
|
|
550
|
+
return r;
|
|
551
|
+
var e = r + "";
|
|
552
|
+
return e == "0" && 1 / r == -dr ? "-0" : e;
|
|
536
553
|
}
|
|
537
|
-
function pr(
|
|
538
|
-
e = Ee(e,
|
|
539
|
-
for (var
|
|
540
|
-
|
|
541
|
-
return
|
|
554
|
+
function pr(r, e) {
|
|
555
|
+
e = Ee(e, r);
|
|
556
|
+
for (var t = 0, i = e.length; r != null && t < i; )
|
|
557
|
+
r = r[Re(e[t++])];
|
|
558
|
+
return t && t == i ? r : void 0;
|
|
542
559
|
}
|
|
543
|
-
function L(
|
|
544
|
-
var i =
|
|
545
|
-
return i === void 0 ?
|
|
560
|
+
function L(r, e, t) {
|
|
561
|
+
var i = r == null ? void 0 : pr(r, e);
|
|
562
|
+
return i === void 0 ? t : i;
|
|
546
563
|
}
|
|
547
|
-
function hr(
|
|
548
|
-
if (!G(
|
|
549
|
-
return
|
|
550
|
-
e = Ee(e,
|
|
551
|
-
for (var s = -1, n = e.length, a = n - 1, l =
|
|
552
|
-
var
|
|
553
|
-
if (
|
|
554
|
-
return
|
|
564
|
+
function hr(r, e, t, i) {
|
|
565
|
+
if (!G(r))
|
|
566
|
+
return r;
|
|
567
|
+
e = Ee(e, r);
|
|
568
|
+
for (var s = -1, n = e.length, a = n - 1, l = r; l != null && ++s < n; ) {
|
|
569
|
+
var f = Re(e[s]), d = t;
|
|
570
|
+
if (f === "__proto__" || f === "constructor" || f === "prototype")
|
|
571
|
+
return r;
|
|
555
572
|
if (s != a) {
|
|
556
|
-
var p = l[
|
|
557
|
-
d = i ? i(p,
|
|
573
|
+
var p = l[f];
|
|
574
|
+
d = i ? i(p, f, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
|
|
558
575
|
}
|
|
559
|
-
xt(l,
|
|
576
|
+
xt(l, f, d), l = l[f];
|
|
560
577
|
}
|
|
561
|
-
return
|
|
578
|
+
return r;
|
|
562
579
|
}
|
|
563
|
-
function D(
|
|
564
|
-
return
|
|
580
|
+
function D(r, e, t) {
|
|
581
|
+
return r == null ? r : hr(r, e, t);
|
|
565
582
|
}
|
|
566
583
|
class mr {
|
|
567
584
|
constructor(e) {
|
|
@@ -575,12 +592,12 @@ class mr {
|
|
|
575
592
|
u(this, "componentPropsPreset", C.componentPropsPreset);
|
|
576
593
|
u(this, "stableUpdaterProcessProgress");
|
|
577
594
|
u(this, "stableUpdaterTimes", 0);
|
|
578
|
-
u(this, "schemaEffect", new
|
|
579
|
-
u(this, "defaultValueEffect", new
|
|
595
|
+
u(this, "schemaEffect", new Z());
|
|
596
|
+
u(this, "defaultValueEffect", new Z());
|
|
580
597
|
u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
581
598
|
u(this, "baseDefaultValueFunctionsLength");
|
|
582
599
|
u(this, "isModelInitialized", !0);
|
|
583
|
-
this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e),
|
|
600
|
+
this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), v(
|
|
584
601
|
() => this.processedModel.value,
|
|
585
602
|
() => {
|
|
586
603
|
this.schemaEffect.triggerEffects();
|
|
@@ -591,87 +608,87 @@ class mr {
|
|
|
591
608
|
);
|
|
592
609
|
}
|
|
593
610
|
// 核心处理过程,接收一个初始的代理数据结构,由其衍生的有 parseSchema
|
|
594
|
-
parse(e,
|
|
611
|
+
parse(e, t) {
|
|
595
612
|
e.forEach((i, s) => {
|
|
596
|
-
this.parseItem(i, s,
|
|
613
|
+
this.parseItem(i, s, t);
|
|
597
614
|
});
|
|
598
615
|
}
|
|
599
616
|
// 初始化空数据结构,避免后续复杂的 if else
|
|
600
617
|
initSchemas(e) {
|
|
601
|
-
return e.map((
|
|
618
|
+
return e.map((t) => {
|
|
602
619
|
const i = {};
|
|
603
|
-
return
|
|
620
|
+
return t.children && (i.children = this.initSchemas(t.children)), i;
|
|
604
621
|
});
|
|
605
622
|
}
|
|
606
623
|
countFunctionDefaultValues(e) {
|
|
607
|
-
let
|
|
624
|
+
let t = 0;
|
|
608
625
|
const i = /* @__PURE__ */ new Set();
|
|
609
626
|
function s(n) {
|
|
610
627
|
if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
|
|
611
628
|
i.add(n);
|
|
612
629
|
for (const a in n)
|
|
613
|
-
n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") &&
|
|
630
|
+
n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && t++, s(n[a]));
|
|
614
631
|
}
|
|
615
632
|
}
|
|
616
|
-
return s(e),
|
|
633
|
+
return s(e), t;
|
|
617
634
|
}
|
|
618
635
|
// 派生过程,用于外部应用
|
|
619
|
-
parseSchemas(e,
|
|
636
|
+
parseSchemas(e, t) {
|
|
620
637
|
o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
|
|
621
|
-
|
|
622
|
-
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e,
|
|
638
|
+
P(e)
|
|
639
|
+
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
|
|
623
640
|
}
|
|
624
641
|
parseStable(e) {
|
|
625
|
-
const
|
|
642
|
+
const t = {};
|
|
626
643
|
if (!o.isUndefined(e.stable))
|
|
627
|
-
|
|
644
|
+
t[e.key] = this.parseStable(e.stable);
|
|
628
645
|
else
|
|
629
646
|
return e;
|
|
630
|
-
return
|
|
647
|
+
return t;
|
|
631
648
|
}
|
|
632
649
|
// 对于稳定初始化更新的抽象
|
|
633
650
|
stableUpdater(e = []) {
|
|
634
651
|
if (e.every(Boolean)) {
|
|
635
|
-
const
|
|
636
|
-
!o.isProcessInprogress(
|
|
637
|
-
length:
|
|
638
|
-
}).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(
|
|
652
|
+
const t = R(this.processedSchemas.value);
|
|
653
|
+
!o.isProcessInprogress(t) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
|
|
654
|
+
length: t.length
|
|
655
|
+
}).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(t));
|
|
639
656
|
}
|
|
640
657
|
}
|
|
641
658
|
// 核心单 schema 处理过程,接收一个对象键值对的数据结构
|
|
642
|
-
parseItem(e,
|
|
659
|
+
parseItem(e, t, i) {
|
|
643
660
|
const s = this, n = Array.from({
|
|
644
661
|
length: Object.keys(e).filter((l) => l !== "children").length
|
|
645
662
|
}).fill(!1);
|
|
646
|
-
this.objectParser({ data: e, index:
|
|
663
|
+
this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
|
|
647
664
|
function a(l) {
|
|
648
|
-
const
|
|
665
|
+
const f = l.index, d = l.key, p = l.keyIndex;
|
|
649
666
|
if (o.isUndefined(l.stable))
|
|
650
667
|
return;
|
|
651
|
-
const m = s.parseStable(l.stable),
|
|
652
|
-
let
|
|
653
|
-
if (o.isProcessInprogress(
|
|
654
|
-
const
|
|
655
|
-
|
|
668
|
+
const m = s.parseStable(l.stable), y = i == null ? void 0 : i.index, I = i == null ? void 0 : i.key;
|
|
669
|
+
let _ = m;
|
|
670
|
+
if (o.isProcessInprogress(_) || (n[p] = !0), i) {
|
|
671
|
+
const g = s.processedSchemas.value[y][I][f][d];
|
|
672
|
+
g && o.isObject(g) && d !== "component" && (_ = h(g, _)), s.processedSchemas.value[y][I][f][d] = _, s.stableUpdater(n);
|
|
656
673
|
} else {
|
|
657
|
-
const
|
|
658
|
-
|
|
674
|
+
const g = s.processedSchemas.value[f][d];
|
|
675
|
+
g && o.isObject(g) && d !== "component" && (_ = h(g, _)), s.processedSchemas.value[f][d] = _, s.stableUpdater(n);
|
|
659
676
|
}
|
|
660
677
|
}
|
|
661
678
|
}
|
|
662
679
|
// 只做基本的对象 parser
|
|
663
680
|
objectParser(e) {
|
|
664
|
-
const
|
|
665
|
-
Object.keys(
|
|
681
|
+
const t = e.data;
|
|
682
|
+
Object.keys(t).forEach((s, n) => {
|
|
666
683
|
var a, l;
|
|
667
684
|
if (s === "children")
|
|
668
|
-
this.parseSchemas(
|
|
685
|
+
this.parseSchemas(t[s], {
|
|
669
686
|
...e,
|
|
670
687
|
key: s,
|
|
671
688
|
keyIndex: n
|
|
672
689
|
});
|
|
673
690
|
else {
|
|
674
|
-
const
|
|
691
|
+
const f = (d) => {
|
|
675
692
|
e.updater({
|
|
676
693
|
...e,
|
|
677
694
|
key: s,
|
|
@@ -679,16 +696,16 @@ class mr {
|
|
|
679
696
|
stable: d
|
|
680
697
|
});
|
|
681
698
|
};
|
|
682
|
-
o.isFunction(
|
|
699
|
+
o.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
|
|
683
700
|
() => {
|
|
684
701
|
if (s === "component") {
|
|
685
|
-
const d =
|
|
686
|
-
this.promiseFieldParser(d,
|
|
702
|
+
const d = t[s](this.getRuntimeMeta());
|
|
703
|
+
this.promiseFieldParser(d, f, !1, {
|
|
687
704
|
rootIndex: e.index,
|
|
688
705
|
parentMeta: e.parentMeta
|
|
689
706
|
});
|
|
690
707
|
} else
|
|
691
|
-
this.fieldParser(
|
|
708
|
+
this.fieldParser(t[s], f, {
|
|
692
709
|
rootIndex: e.index,
|
|
693
710
|
parentMeta: e.parentMeta
|
|
694
711
|
});
|
|
@@ -701,35 +718,35 @@ class mr {
|
|
|
701
718
|
() => {
|
|
702
719
|
const d = this.schemaEffect.trackEffect(
|
|
703
720
|
() => {
|
|
704
|
-
/\{\s*model\s*\}/.test(
|
|
705
|
-
|
|
721
|
+
/\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
|
|
722
|
+
t[s],
|
|
706
723
|
(p) => {
|
|
707
724
|
if (!p)
|
|
708
|
-
return
|
|
709
|
-
this.defaultValueInprogressMap.set(
|
|
725
|
+
return f(p);
|
|
726
|
+
this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
710
727
|
this.defaultValueInprogressMap.values()
|
|
711
728
|
).every((m) => {
|
|
712
|
-
var
|
|
713
|
-
return !((
|
|
714
|
-
}) ? (
|
|
729
|
+
var y;
|
|
730
|
+
return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
|
|
731
|
+
}) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
|
|
715
732
|
d();
|
|
716
|
-
})) :
|
|
733
|
+
})) : f(p);
|
|
717
734
|
},
|
|
718
735
|
{
|
|
719
736
|
rootIndex: e.index,
|
|
720
737
|
parentMeta: e.parentMeta
|
|
721
738
|
}
|
|
722
739
|
) : this.fieldParser(
|
|
723
|
-
|
|
740
|
+
t[s],
|
|
724
741
|
(p) => {
|
|
725
|
-
this.defaultValueInprogressMap.set(
|
|
742
|
+
this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
726
743
|
this.defaultValueInprogressMap.values()
|
|
727
744
|
).every((m) => {
|
|
728
|
-
var
|
|
729
|
-
return !((
|
|
730
|
-
}) ? (
|
|
745
|
+
var y;
|
|
746
|
+
return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
|
|
747
|
+
}) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
|
|
731
748
|
d();
|
|
732
|
-
})) :
|
|
749
|
+
})) : f(p);
|
|
733
750
|
},
|
|
734
751
|
{
|
|
735
752
|
rootIndex: e.index,
|
|
@@ -745,74 +762,74 @@ class mr {
|
|
|
745
762
|
{
|
|
746
763
|
lazy: !1
|
|
747
764
|
}
|
|
748
|
-
) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(
|
|
765
|
+
) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(t[s], f, !1, {
|
|
749
766
|
rootIndex: e.index,
|
|
750
767
|
parentMeta: e.parentMeta
|
|
751
|
-
}) : this.fieldParser(
|
|
768
|
+
}) : this.fieldParser(t[s], f, {
|
|
752
769
|
rootIndex: e.index,
|
|
753
770
|
parentMeta: e.parentMeta
|
|
754
771
|
});
|
|
755
772
|
}
|
|
756
773
|
});
|
|
757
774
|
}
|
|
758
|
-
promiseFieldParser(e,
|
|
775
|
+
promiseFieldParser(e, t, i, s) {
|
|
759
776
|
o.isPromise(e) ? e.then((n) => {
|
|
760
|
-
o.isString(n) && (n =
|
|
777
|
+
o.isString(n) && (n = Y(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
761
778
|
data: n,
|
|
762
|
-
updater:
|
|
779
|
+
updater: t,
|
|
763
780
|
index: s.rootIndex,
|
|
764
781
|
parentMeta: s.parentMeta
|
|
765
|
-
}) :
|
|
766
|
-
}) : (o.isString(e) && (e =
|
|
782
|
+
}) : t(n);
|
|
783
|
+
}) : (o.isString(e) && (e = Y(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
767
784
|
data: e,
|
|
768
|
-
updater:
|
|
785
|
+
updater: t,
|
|
769
786
|
index: s.rootIndex,
|
|
770
787
|
parentMeta: s.parentMeta
|
|
771
|
-
}) :
|
|
788
|
+
}) : t(e));
|
|
772
789
|
}
|
|
773
790
|
// 对任意对象中单个字段的 parse: 做基本处理
|
|
774
|
-
fieldParser(e,
|
|
791
|
+
fieldParser(e, t, i, s = !0) {
|
|
775
792
|
if (o.isFunction(e))
|
|
776
793
|
if (e.name.startsWith("__proform_raw_"))
|
|
777
|
-
|
|
794
|
+
t(
|
|
778
795
|
(...n) => e({
|
|
779
796
|
rawArgs: n,
|
|
780
797
|
...this.getRuntimeMeta()
|
|
781
798
|
})
|
|
782
799
|
);
|
|
783
800
|
else if (e.name.startsWith("__proform_structured_path_parsing_mark_"))
|
|
784
|
-
|
|
801
|
+
t(e);
|
|
785
802
|
else if (e.__proform_cached_result) {
|
|
786
803
|
const n = e.__proform_cached_result;
|
|
787
|
-
this.promiseFieldParser(n,
|
|
804
|
+
this.promiseFieldParser(n, t, s, i);
|
|
788
805
|
} else {
|
|
789
806
|
const n = e(this.getRuntimeMeta());
|
|
790
|
-
e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n,
|
|
807
|
+
e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
|
|
791
808
|
}
|
|
792
809
|
else
|
|
793
|
-
|
|
810
|
+
F(e) ? v(
|
|
794
811
|
() => e.value,
|
|
795
812
|
() => {
|
|
796
813
|
o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
|
|
797
814
|
data: e.value,
|
|
798
|
-
updater:
|
|
815
|
+
updater: t,
|
|
799
816
|
index: i.rootIndex,
|
|
800
817
|
parentMeta: i.parentMeta
|
|
801
|
-
}) :
|
|
818
|
+
}) : t(e.value));
|
|
802
819
|
},
|
|
803
820
|
{
|
|
804
821
|
immediate: !0,
|
|
805
822
|
deep: !0
|
|
806
823
|
}
|
|
807
|
-
) :
|
|
824
|
+
) : j(e) ? v(
|
|
808
825
|
() => e,
|
|
809
826
|
() => {
|
|
810
827
|
o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
811
828
|
data: e,
|
|
812
|
-
updater:
|
|
829
|
+
updater: t,
|
|
813
830
|
index: i.rootIndex,
|
|
814
831
|
parentMeta: i.parentMeta
|
|
815
|
-
}) :
|
|
832
|
+
}) : t(e));
|
|
816
833
|
},
|
|
817
834
|
{
|
|
818
835
|
immediate: !0,
|
|
@@ -820,92 +837,92 @@ class mr {
|
|
|
820
837
|
}
|
|
821
838
|
) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
822
839
|
data: e,
|
|
823
|
-
updater:
|
|
840
|
+
updater: t,
|
|
824
841
|
index: i.rootIndex,
|
|
825
842
|
parentMeta: i.parentMeta
|
|
826
|
-
}) :
|
|
843
|
+
}) : t(e);
|
|
827
844
|
}
|
|
828
845
|
modelProcessor(e) {
|
|
829
846
|
e.map(
|
|
830
|
-
(
|
|
831
|
-
), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel =
|
|
847
|
+
(t) => this.createModel(t, this.processedModel.value)
|
|
848
|
+
), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel = P(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
|
|
832
849
|
}
|
|
833
|
-
setModel(e,
|
|
834
|
-
o.isFunction(
|
|
850
|
+
setModel(e, t, i) {
|
|
851
|
+
o.isFunction(t) ? D(e, t(), i) : e[t] = i;
|
|
835
852
|
}
|
|
836
|
-
createModel(e,
|
|
837
|
-
if (o.isListSchema(e) && (
|
|
838
|
-
this.createModel(i,
|
|
853
|
+
createModel(e, t) {
|
|
854
|
+
if (o.isListSchema(e) && (t[e.field] || this.setModel(t, e.field, [{}]), e.children.forEach((i) => {
|
|
855
|
+
this.createModel(i, t[e.field][0]);
|
|
839
856
|
})), o.isGroupSchema(e) && e.children.forEach((i) => {
|
|
840
|
-
this.createModel(i,
|
|
857
|
+
this.createModel(i, t);
|
|
841
858
|
}), o.isItemSchema(e))
|
|
842
859
|
if ("defaultValue" in e)
|
|
843
|
-
this.setModel(
|
|
860
|
+
this.setModel(t, e.field, e.defaultValue);
|
|
844
861
|
else {
|
|
845
|
-
if (o.isFunction(e.field) && L(
|
|
862
|
+
if (o.isFunction(e.field) && L(t, e.field()))
|
|
846
863
|
return;
|
|
847
|
-
if (o.isString(e.field) &&
|
|
864
|
+
if (o.isString(e.field) && t[e.field])
|
|
848
865
|
return;
|
|
849
|
-
this.setModel(
|
|
866
|
+
this.setModel(t, e.field, void 0);
|
|
850
867
|
}
|
|
851
868
|
}
|
|
852
869
|
}
|
|
853
|
-
class
|
|
870
|
+
class x {
|
|
854
871
|
static getFormContainer({ ui: e } = {}) {
|
|
855
|
-
return
|
|
872
|
+
return c.presets.uiPresets[e ?? c.presets.ui].container.Form;
|
|
856
873
|
}
|
|
857
874
|
static getFormItemContainer({ ui: e } = {}) {
|
|
858
|
-
return
|
|
875
|
+
return c.presets.uiPresets[e ?? c.presets.ui].container.FormItem;
|
|
859
876
|
}
|
|
860
877
|
static getItemContainer({ ui: e } = {}) {
|
|
861
|
-
return
|
|
878
|
+
return c.presets.uiPresets[e ?? c.presets.ui].container.Item;
|
|
862
879
|
}
|
|
863
880
|
static getGroupContainer({ ui: e } = {}) {
|
|
864
|
-
return
|
|
881
|
+
return c.presets.uiPresets[e ?? c.presets.ui].container.Group;
|
|
865
882
|
}
|
|
866
883
|
static getListContainer({ ui: e } = {}) {
|
|
867
|
-
return
|
|
884
|
+
return c.presets.uiPresets[e ?? c.presets.ui].container.List;
|
|
868
885
|
}
|
|
869
886
|
static getListItemContainer({ ui: e } = {}) {
|
|
870
|
-
return
|
|
887
|
+
return c.presets.uiPresets[e ?? c.presets.ui].container.ListItem;
|
|
871
888
|
}
|
|
872
889
|
}
|
|
873
|
-
class
|
|
890
|
+
class br {
|
|
874
891
|
constructor(e) {
|
|
875
892
|
this.ui = e;
|
|
876
893
|
}
|
|
877
894
|
getRuntimeNative() {
|
|
878
|
-
var
|
|
879
|
-
return (
|
|
895
|
+
var t;
|
|
896
|
+
return (t = c.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
|
|
880
897
|
}
|
|
881
898
|
getRuntimeField(e) {
|
|
882
899
|
var s;
|
|
883
|
-
const
|
|
884
|
-
return (
|
|
900
|
+
const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
|
|
901
|
+
return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
|
|
885
902
|
}
|
|
886
903
|
getRuntimeRequired(e) {
|
|
887
904
|
var s;
|
|
888
|
-
const
|
|
889
|
-
return (
|
|
905
|
+
const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
|
|
906
|
+
return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
|
|
890
907
|
}
|
|
891
908
|
getFormModelPropName() {
|
|
892
909
|
var i;
|
|
893
|
-
const e = (i =
|
|
894
|
-
return (e == null ? void 0 : e.getFormModelPropName()) ?? (
|
|
910
|
+
const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.ui)];
|
|
911
|
+
return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
|
|
895
912
|
}
|
|
896
913
|
formComponentRenderer(e) {
|
|
897
914
|
var s;
|
|
898
|
-
const
|
|
899
|
-
return (
|
|
915
|
+
const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
|
|
916
|
+
return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
|
|
900
917
|
}
|
|
901
918
|
clearValidate(e) {
|
|
902
919
|
var s;
|
|
903
|
-
const
|
|
904
|
-
return (
|
|
920
|
+
const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
|
|
921
|
+
return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
|
|
905
922
|
}
|
|
906
923
|
}
|
|
907
|
-
function
|
|
908
|
-
return typeof
|
|
924
|
+
function vr(r) {
|
|
925
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Be(r);
|
|
909
926
|
}
|
|
910
927
|
class gr {
|
|
911
928
|
constructor(e) {
|
|
@@ -917,11 +934,11 @@ class gr {
|
|
|
917
934
|
list: this.runtimeListProcessor.bind(this)
|
|
918
935
|
});
|
|
919
936
|
u(this, "formRef", z(null));
|
|
920
|
-
u(this, "hydrateEffect", new
|
|
921
|
-
u(this, "native",
|
|
937
|
+
u(this, "hydrateEffect", new Z());
|
|
938
|
+
u(this, "native", K({}));
|
|
922
939
|
u(this, "grid", {});
|
|
923
940
|
u(this, "runtime", {});
|
|
924
|
-
u(this, "globalNativeFormOverride",
|
|
941
|
+
u(this, "globalNativeFormOverride", K({
|
|
925
942
|
props: {
|
|
926
943
|
Form: {},
|
|
927
944
|
FormItem: {}
|
|
@@ -931,105 +948,114 @@ class gr {
|
|
|
931
948
|
FormItem: {}
|
|
932
949
|
}
|
|
933
950
|
}));
|
|
934
|
-
u(this, "shared",
|
|
951
|
+
u(this, "shared", K({}));
|
|
935
952
|
this.setup = e, this.processor = new mr(this);
|
|
936
|
-
const
|
|
937
|
-
if (this.ui =
|
|
938
|
-
|
|
953
|
+
const t = this.setup(this);
|
|
954
|
+
if (this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), F(t.schemas))
|
|
955
|
+
v(
|
|
939
956
|
// @ts-expect-error
|
|
940
|
-
() =>
|
|
957
|
+
() => t.schemas.value,
|
|
941
958
|
() => {
|
|
942
|
-
this.processor.parseSchemas(
|
|
959
|
+
this.processor.parseSchemas(t.schemas.value);
|
|
943
960
|
},
|
|
944
961
|
{
|
|
945
962
|
deep: !0
|
|
946
963
|
}
|
|
947
964
|
);
|
|
948
|
-
else if (
|
|
949
|
-
const i =
|
|
950
|
-
this.processor.parseSchemas(
|
|
965
|
+
else if (j(t.schemas)) {
|
|
966
|
+
const i = v(() => t.schemas, () => {
|
|
967
|
+
this.processor.parseSchemas(t.schemas), O(() => {
|
|
951
968
|
i();
|
|
952
969
|
});
|
|
953
970
|
}, {
|
|
954
971
|
deep: !0
|
|
955
972
|
});
|
|
956
973
|
} else
|
|
957
|
-
this.processor.parseSchemas(
|
|
974
|
+
this.processor.parseSchemas(t.schemas);
|
|
958
975
|
}
|
|
959
976
|
getRuntimeMeta() {
|
|
960
977
|
return {
|
|
961
|
-
model:
|
|
978
|
+
model: R(P(this.model.value)),
|
|
962
979
|
reactiveModel: this.model.value,
|
|
963
980
|
shared: this.shared,
|
|
964
981
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
965
|
-
share: (
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
982
|
+
share: (t) => {
|
|
983
|
+
F(t) ? v(() => t.value, () => {
|
|
984
|
+
h(this.shared, t.value);
|
|
985
|
+
}, {
|
|
986
|
+
deep: !0,
|
|
987
|
+
immediate: !0
|
|
988
|
+
}) : j(t) ? v(() => t, () => {
|
|
989
|
+
h(this.shared, t);
|
|
990
|
+
}, {
|
|
991
|
+
deep: !0,
|
|
992
|
+
immediate: !0
|
|
993
|
+
}) : Object.keys(t).forEach((i) => {
|
|
994
|
+
F(t[i]) ? v(() => t[i].value, () => {
|
|
995
|
+
h(this.shared, {
|
|
996
|
+
[i]: t[i].value
|
|
970
997
|
});
|
|
971
998
|
}, {
|
|
972
999
|
deep: !0,
|
|
973
1000
|
immediate: !0
|
|
974
|
-
})
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
h(this.shared, r), P(() => {
|
|
978
|
-
i();
|
|
1001
|
+
}) : j(t[i]) ? v(() => t[i], () => {
|
|
1002
|
+
h(this.shared, {
|
|
1003
|
+
[i]: t[i]
|
|
979
1004
|
});
|
|
980
1005
|
}, {
|
|
981
1006
|
deep: !0,
|
|
982
1007
|
immediate: !0
|
|
1008
|
+
}) : h(this.shared, {
|
|
1009
|
+
[i]: t[i]
|
|
983
1010
|
});
|
|
984
|
-
}
|
|
985
|
-
h(this.shared, r);
|
|
1011
|
+
});
|
|
986
1012
|
}
|
|
987
1013
|
};
|
|
988
1014
|
}
|
|
989
|
-
runtimeItemProcessor(e,
|
|
990
|
-
var ie, se, ne, oe, ae, le, ue,
|
|
991
|
-
const n =
|
|
1015
|
+
runtimeItemProcessor(e, t, i = this.model.value, s) {
|
|
1016
|
+
var ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, be, ve, ge, ye;
|
|
1017
|
+
const n = R(e.component);
|
|
992
1018
|
if (!n)
|
|
993
1019
|
return;
|
|
994
|
-
(se = (ie = e.native) == null ? void 0 : ie.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (oe = (ne = e.native) == null ? void 0 : ne.props) == null ? void 0 : oe.Form), (le = (ae = e.native) == null ? void 0 : ae.slots) != null && le.Form && h(this.globalNativeFormOverride.slots.Form, (
|
|
995
|
-
const a = h(
|
|
1020
|
+
(se = (ie = e.native) == null ? void 0 : ie.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (oe = (ne = e.native) == null ? void 0 : ne.props) == null ? void 0 : oe.Form), (le = (ae = e.native) == null ? void 0 : ae.slots) != null && le.Form && h(this.globalNativeFormOverride.slots.Form, (fe = (ue = e.native) == null ? void 0 : ue.slots) == null ? void 0 : fe.Form);
|
|
1021
|
+
const a = h(P((de = (ce = this.native) == null ? void 0 : ce.slots) == null ? void 0 : de.FormItem) ?? {}, (he = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : he.FormItem), l = {
|
|
996
1022
|
display: "grid",
|
|
997
1023
|
gridColumn: "1 / -1",
|
|
998
1024
|
...e.grid
|
|
999
|
-
},
|
|
1025
|
+
}, f = h(P((be = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : be.FormItem) ?? {}, (ge = (ve = e.native) == null ? void 0 : ve.props) == null ? void 0 : ge.FormItem), d = this.runtimeAdapter.getRuntimeField({
|
|
1000
1026
|
schema: e,
|
|
1001
1027
|
parentSchema: s,
|
|
1002
|
-
index:
|
|
1003
|
-
}), p = n.name, m = e.componentProps ?? {},
|
|
1004
|
-
let
|
|
1005
|
-
|
|
1006
|
-
let
|
|
1007
|
-
if (e.runtime ?
|
|
1008
|
-
let
|
|
1009
|
-
o.isUndefined(p) ?
|
|
1010
|
-
|
|
1011
|
-
p.toLowerCase().includes(_e.toLowerCase()) && (
|
|
1012
|
-
}),
|
|
1028
|
+
index: t
|
|
1029
|
+
}), p = n.name, m = e.componentProps ?? {}, y = C.placeholderPresetByComponentName;
|
|
1030
|
+
let I = e.placeholder, _ = e.show;
|
|
1031
|
+
_ === void 0 && (_ = !0);
|
|
1032
|
+
let g = e.label ?? "", S;
|
|
1033
|
+
if (e.runtime ? S = e.runtime : S = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(S) && (g = Y((ye = S == null ? void 0 : S.customizeListItemLabel) == null ? void 0 : ye.call(S, e.label ?? "", t + 1), "")), !I) {
|
|
1034
|
+
let N = "请输入";
|
|
1035
|
+
o.isUndefined(p) ? I = `${N}${g}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (N = // @ts-expect-error
|
|
1036
|
+
y[p.toLowerCase()], I = `${N}${g}`) : (Object.keys(y).forEach((_e) => {
|
|
1037
|
+
p.toLowerCase().includes(_e.toLowerCase()) && (N = y[_e]);
|
|
1038
|
+
}), I = `${N}${g}`);
|
|
1013
1039
|
}
|
|
1014
1040
|
const $e = this.runtimeAdapter.getRuntimeRequired({
|
|
1015
1041
|
...e,
|
|
1016
|
-
label:
|
|
1017
|
-
}), Ve =
|
|
1018
|
-
return
|
|
1042
|
+
label: g
|
|
1043
|
+
}), Ve = x.getItemContainer(this), Ne = x.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
|
|
1044
|
+
return b("div", {
|
|
1019
1045
|
style: l
|
|
1020
|
-
}, [
|
|
1021
|
-
show:
|
|
1046
|
+
}, [b(Ve, {
|
|
1047
|
+
show: _
|
|
1022
1048
|
}, {
|
|
1023
1049
|
default() {
|
|
1024
|
-
return
|
|
1025
|
-
label: `${
|
|
1050
|
+
return _ && b(Ne, U(f, {
|
|
1051
|
+
label: `${g ? `${g}:` : ""}`
|
|
1026
1052
|
}, d, $e), {
|
|
1027
1053
|
default() {
|
|
1028
1054
|
return qe.runtimeAdapter.formComponentRenderer({
|
|
1029
1055
|
Component: n,
|
|
1030
1056
|
schema: e,
|
|
1031
1057
|
baseModel: i,
|
|
1032
|
-
placeholder:
|
|
1058
|
+
placeholder: I,
|
|
1033
1059
|
componentSlots: Ue,
|
|
1034
1060
|
props: m
|
|
1035
1061
|
});
|
|
@@ -1040,35 +1066,35 @@ class gr {
|
|
|
1040
1066
|
})]);
|
|
1041
1067
|
}
|
|
1042
1068
|
runtimeGroupProcessor(e) {
|
|
1043
|
-
let
|
|
1069
|
+
let t;
|
|
1044
1070
|
const i = {
|
|
1045
1071
|
display: "grid",
|
|
1046
1072
|
gridColumn: "1 / -1",
|
|
1047
1073
|
...e.grid
|
|
1048
|
-
}, s =
|
|
1074
|
+
}, s = x.getGroupContainer(this);
|
|
1049
1075
|
let n = e.show;
|
|
1050
|
-
return n === void 0 && (n = !0),
|
|
1076
|
+
return n === void 0 && (n = !0), b("div", {
|
|
1051
1077
|
style: i
|
|
1052
|
-
}, [n &&
|
|
1078
|
+
}, [n && b(s, {
|
|
1053
1079
|
schema: e
|
|
1054
|
-
},
|
|
1055
|
-
default: () => [
|
|
1080
|
+
}, vr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
|
|
1081
|
+
default: () => [t]
|
|
1056
1082
|
})]);
|
|
1057
1083
|
}
|
|
1058
1084
|
addListItem(e) {
|
|
1059
|
-
var
|
|
1060
|
-
if (!((
|
|
1085
|
+
var t, i;
|
|
1086
|
+
if (!((t = this.processor.stableModel[e.field]) != null && t[0]))
|
|
1061
1087
|
return Promise.reject({
|
|
1062
1088
|
code: "0001",
|
|
1063
1089
|
message: "异步默认值数据正在处理中,请您耐心等待... "
|
|
1064
1090
|
});
|
|
1065
|
-
(i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(
|
|
1091
|
+
(i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(P(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
|
|
1066
1092
|
}
|
|
1067
|
-
deleteListItem(e,
|
|
1068
|
-
this.model.value[e.field].splice(
|
|
1093
|
+
deleteListItem(e, t) {
|
|
1094
|
+
this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
|
|
1069
1095
|
}
|
|
1070
1096
|
runtimeListProcessor(e) {
|
|
1071
|
-
const
|
|
1097
|
+
const t = {
|
|
1072
1098
|
display: "grid",
|
|
1073
1099
|
gridColumn: "1 / -1",
|
|
1074
1100
|
...e.grid
|
|
@@ -1076,24 +1102,24 @@ class gr {
|
|
|
1076
1102
|
i.model.value[e.field] || (i.model.value[e.field] = [{}]);
|
|
1077
1103
|
let s = e.show;
|
|
1078
1104
|
s === void 0 && (s = !0);
|
|
1079
|
-
const n =
|
|
1080
|
-
return
|
|
1081
|
-
style:
|
|
1082
|
-
}, [s &&
|
|
1105
|
+
const n = x.getListContainer(this), a = x.getListItemContainer(this);
|
|
1106
|
+
return b("div", {
|
|
1107
|
+
style: t
|
|
1108
|
+
}, [s && b(n, {
|
|
1083
1109
|
schema: e
|
|
1084
1110
|
}, {
|
|
1085
1111
|
default() {
|
|
1086
|
-
return i.model.value[e.field].map((l,
|
|
1112
|
+
return i.model.value[e.field].map((l, f) => b(a, null, {
|
|
1087
1113
|
default() {
|
|
1088
|
-
return e.children.map((d) => i.runtimeItemProcessor(d,
|
|
1114
|
+
return e.children.map((d) => i.runtimeItemProcessor(d, f, l, e));
|
|
1089
1115
|
},
|
|
1090
1116
|
delete({
|
|
1091
1117
|
container: d
|
|
1092
1118
|
} = {}) {
|
|
1093
1119
|
var m;
|
|
1094
|
-
const p = d ??
|
|
1095
|
-
return Le(
|
|
1096
|
-
onClick: () => i.deleteListItem(e,
|
|
1120
|
+
const p = d ?? b("button", null, null);
|
|
1121
|
+
return Le(b(p, {
|
|
1122
|
+
onClick: () => i.deleteListItem(e, f)
|
|
1097
1123
|
}, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
|
|
1098
1124
|
}
|
|
1099
1125
|
}));
|
|
@@ -1101,281 +1127,281 @@ class gr {
|
|
|
1101
1127
|
add({
|
|
1102
1128
|
container: l
|
|
1103
1129
|
} = {}) {
|
|
1104
|
-
const
|
|
1105
|
-
return
|
|
1130
|
+
const f = l ?? b("button", null, [Ge("添加")]);
|
|
1131
|
+
return b(f, {
|
|
1106
1132
|
onClick: () => i.addListItem(e)
|
|
1107
1133
|
}, null);
|
|
1108
1134
|
}
|
|
1109
1135
|
})]);
|
|
1110
1136
|
}
|
|
1111
1137
|
runtimeProcessor(e) {
|
|
1112
|
-
return e.map((
|
|
1138
|
+
return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
|
|
1113
1139
|
}
|
|
1114
1140
|
exec() {
|
|
1115
|
-
var l,
|
|
1141
|
+
var l, f, d, p;
|
|
1116
1142
|
const e = {
|
|
1117
1143
|
display: "grid",
|
|
1118
1144
|
gridColumn: "1 / -1",
|
|
1119
1145
|
gridAutoColumns: "1fr",
|
|
1120
1146
|
...this.grid
|
|
1121
|
-
},
|
|
1122
|
-
return
|
|
1147
|
+
}, t = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
|
|
1148
|
+
return b(n, U(i, {
|
|
1123
1149
|
ref: this.formRef
|
|
1124
1150
|
}, {
|
|
1125
1151
|
[a]: this.model.value
|
|
1126
1152
|
}), {
|
|
1127
1153
|
default() {
|
|
1128
|
-
return
|
|
1154
|
+
return b("div", {
|
|
1129
1155
|
style: e
|
|
1130
|
-
}, [
|
|
1156
|
+
}, [t.runtimeProcessor(t.schemas.value)]);
|
|
1131
1157
|
},
|
|
1132
1158
|
...s
|
|
1133
1159
|
});
|
|
1134
1160
|
}
|
|
1135
1161
|
}
|
|
1136
|
-
class
|
|
1162
|
+
class c {
|
|
1137
1163
|
static getPreset(e) {
|
|
1138
|
-
var
|
|
1139
|
-
return (i = (
|
|
1164
|
+
var t, i, s;
|
|
1165
|
+
return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
|
|
1140
1166
|
}
|
|
1141
1167
|
static getUI(e) {
|
|
1142
|
-
var
|
|
1143
|
-
return (i = (
|
|
1168
|
+
var t, i, s;
|
|
1169
|
+
return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
|
|
1144
1170
|
}
|
|
1145
1171
|
}
|
|
1146
|
-
u(
|
|
1147
|
-
function
|
|
1148
|
-
parentSchema:
|
|
1172
|
+
u(c, "presets");
|
|
1173
|
+
function X({
|
|
1174
|
+
parentSchema: r,
|
|
1149
1175
|
schema: e,
|
|
1150
|
-
index:
|
|
1176
|
+
index: t
|
|
1151
1177
|
}) {
|
|
1152
|
-
return
|
|
1178
|
+
return r ? `${r.field}.${t}.${e.field}` : e.field;
|
|
1153
1179
|
}
|
|
1154
|
-
const
|
|
1180
|
+
const yr = {
|
|
1155
1181
|
ArcoVue: {
|
|
1156
|
-
getRuntimeField(
|
|
1157
|
-
const e =
|
|
1182
|
+
getRuntimeField(r) {
|
|
1183
|
+
const e = X(r);
|
|
1158
1184
|
return o.isFunction(e) ? {
|
|
1159
1185
|
field: e()
|
|
1160
1186
|
} : {
|
|
1161
1187
|
field: e
|
|
1162
1188
|
};
|
|
1163
1189
|
},
|
|
1164
|
-
getRuntimeRequired(
|
|
1190
|
+
getRuntimeRequired(r) {
|
|
1165
1191
|
var e;
|
|
1166
|
-
if (
|
|
1167
|
-
if (!
|
|
1168
|
-
|
|
1192
|
+
if (r.required)
|
|
1193
|
+
if (!r.rules)
|
|
1194
|
+
r.rules = [], r.rules.push({
|
|
1169
1195
|
required: !0,
|
|
1170
|
-
message: `${
|
|
1196
|
+
message: `${r.label}是必填项`
|
|
1171
1197
|
});
|
|
1172
1198
|
else {
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1199
|
+
const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
|
|
1200
|
+
t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
|
|
1175
1201
|
required: !0,
|
|
1176
|
-
message: `${
|
|
1202
|
+
message: `${r.label}是必填项`
|
|
1177
1203
|
});
|
|
1178
1204
|
}
|
|
1179
|
-
else if (
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1205
|
+
else if (r.rules) {
|
|
1206
|
+
const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
|
|
1207
|
+
t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
|
|
1182
1208
|
required: !0,
|
|
1183
|
-
message: `${
|
|
1209
|
+
message: `${r.label}是必填项`
|
|
1184
1210
|
});
|
|
1185
1211
|
}
|
|
1186
1212
|
return {
|
|
1187
|
-
rules:
|
|
1213
|
+
rules: r.rules
|
|
1188
1214
|
};
|
|
1189
1215
|
},
|
|
1190
1216
|
getFormModelPropName() {
|
|
1191
1217
|
return "model";
|
|
1192
1218
|
},
|
|
1193
1219
|
formComponentRenderer({
|
|
1194
|
-
Component:
|
|
1220
|
+
Component: r,
|
|
1195
1221
|
baseModel: e,
|
|
1196
|
-
schema:
|
|
1222
|
+
schema: t,
|
|
1197
1223
|
placeholder: i,
|
|
1198
1224
|
componentSlots: s,
|
|
1199
1225
|
props: n
|
|
1200
1226
|
}) {
|
|
1201
1227
|
let a;
|
|
1202
|
-
return o.isFunction(
|
|
1228
|
+
return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
|
|
1203
1229
|
modelValue: a,
|
|
1204
1230
|
"onUpdate:modelValue": (l) => {
|
|
1205
|
-
o.isFunction(
|
|
1231
|
+
o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
|
|
1206
1232
|
},
|
|
1207
1233
|
placeholder: i
|
|
1208
1234
|
}, n), {
|
|
1209
1235
|
...s
|
|
1210
1236
|
});
|
|
1211
1237
|
},
|
|
1212
|
-
validateForm(
|
|
1213
|
-
return new Promise((e,
|
|
1214
|
-
|
|
1238
|
+
validateForm(r) {
|
|
1239
|
+
return new Promise((e, t) => {
|
|
1240
|
+
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
|
|
1215
1241
|
});
|
|
1216
1242
|
},
|
|
1217
|
-
clearValidate(
|
|
1218
|
-
var e,
|
|
1219
|
-
(
|
|
1243
|
+
clearValidate(r) {
|
|
1244
|
+
var e, t;
|
|
1245
|
+
(t = (e = r.formRef.value) == null ? void 0 : e.clearValidate) == null || t.call(e);
|
|
1220
1246
|
}
|
|
1221
1247
|
},
|
|
1222
1248
|
NutUI: {
|
|
1223
|
-
getRuntimeField(
|
|
1224
|
-
const e =
|
|
1249
|
+
getRuntimeField(r) {
|
|
1250
|
+
const e = X(r);
|
|
1225
1251
|
return o.isFunction(e) ? {
|
|
1226
1252
|
prop: e()
|
|
1227
1253
|
} : {
|
|
1228
1254
|
prop: e
|
|
1229
1255
|
};
|
|
1230
1256
|
},
|
|
1231
|
-
getRuntimeRequired(
|
|
1257
|
+
getRuntimeRequired(r) {
|
|
1232
1258
|
var e;
|
|
1233
|
-
if (
|
|
1234
|
-
if (!
|
|
1235
|
-
|
|
1259
|
+
if (r.required)
|
|
1260
|
+
if (!r.rules)
|
|
1261
|
+
r.rules = [], r.rules.push({
|
|
1236
1262
|
required: !0,
|
|
1237
|
-
message: `${
|
|
1263
|
+
message: `${r.label}是必填项`
|
|
1238
1264
|
});
|
|
1239
1265
|
else {
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1266
|
+
const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
|
|
1267
|
+
t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
|
|
1242
1268
|
required: !0,
|
|
1243
|
-
message: `${
|
|
1269
|
+
message: `${r.label}是必填项`
|
|
1244
1270
|
});
|
|
1245
1271
|
}
|
|
1246
|
-
else if (
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1272
|
+
else if (r.rules) {
|
|
1273
|
+
const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
|
|
1274
|
+
t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
|
|
1249
1275
|
required: !0,
|
|
1250
|
-
message: `${
|
|
1276
|
+
message: `${r.label}是必填项`
|
|
1251
1277
|
});
|
|
1252
1278
|
}
|
|
1253
1279
|
return {
|
|
1254
|
-
rules:
|
|
1255
|
-
required:
|
|
1280
|
+
rules: r.rules,
|
|
1281
|
+
required: r.required
|
|
1256
1282
|
};
|
|
1257
1283
|
},
|
|
1258
1284
|
getFormModelPropName() {
|
|
1259
1285
|
return "modelValue";
|
|
1260
1286
|
},
|
|
1261
1287
|
formComponentRenderer({
|
|
1262
|
-
Component:
|
|
1288
|
+
Component: r,
|
|
1263
1289
|
baseModel: e,
|
|
1264
|
-
schema:
|
|
1290
|
+
schema: t,
|
|
1265
1291
|
placeholder: i,
|
|
1266
1292
|
componentSlots: s,
|
|
1267
1293
|
props: n
|
|
1268
1294
|
}) {
|
|
1269
1295
|
let a;
|
|
1270
|
-
return o.isFunction(
|
|
1296
|
+
return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
|
|
1271
1297
|
modelValue: a,
|
|
1272
1298
|
"onUpdate:modelValue": (l) => {
|
|
1273
|
-
o.isFunction(
|
|
1299
|
+
o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
|
|
1274
1300
|
},
|
|
1275
1301
|
placeholder: i
|
|
1276
1302
|
}, n), {
|
|
1277
1303
|
...s
|
|
1278
1304
|
});
|
|
1279
1305
|
},
|
|
1280
|
-
validateForm(
|
|
1281
|
-
return new Promise((e,
|
|
1282
|
-
|
|
1306
|
+
validateForm(r) {
|
|
1307
|
+
return new Promise((e, t) => {
|
|
1308
|
+
r.runtimeCore.formRef.value.validate().then(({
|
|
1283
1309
|
valid: i,
|
|
1284
1310
|
errors: s
|
|
1285
1311
|
}) => {
|
|
1286
|
-
i ? e(
|
|
1312
|
+
i ? e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))) : t(s);
|
|
1287
1313
|
});
|
|
1288
1314
|
});
|
|
1289
1315
|
},
|
|
1290
|
-
clearValidate(
|
|
1291
|
-
var e,
|
|
1292
|
-
(
|
|
1316
|
+
clearValidate(r) {
|
|
1317
|
+
var e, t;
|
|
1318
|
+
(t = (e = r.formRef.value) == null ? void 0 : e.reset) == null || t.call(e);
|
|
1293
1319
|
}
|
|
1294
1320
|
},
|
|
1295
1321
|
NaiveUI: {
|
|
1296
|
-
getRuntimeField(
|
|
1297
|
-
const e =
|
|
1322
|
+
getRuntimeField(r) {
|
|
1323
|
+
const e = X(r);
|
|
1298
1324
|
return o.isFunction(e) ? {
|
|
1299
1325
|
path: e()
|
|
1300
1326
|
} : {
|
|
1301
1327
|
path: e
|
|
1302
1328
|
};
|
|
1303
1329
|
},
|
|
1304
|
-
getRuntimeRequired(
|
|
1330
|
+
getRuntimeRequired(r) {
|
|
1305
1331
|
var e;
|
|
1306
|
-
if (
|
|
1307
|
-
if (!
|
|
1308
|
-
|
|
1332
|
+
if (r.required)
|
|
1333
|
+
if (!r.rules)
|
|
1334
|
+
r.rules = [], r.rules.push({
|
|
1309
1335
|
required: !0,
|
|
1310
|
-
message: `${
|
|
1336
|
+
message: `${r.label}是必填项`,
|
|
1311
1337
|
trigger: ["input", "blur"]
|
|
1312
1338
|
});
|
|
1313
1339
|
else {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1340
|
+
const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
|
|
1341
|
+
t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
|
|
1316
1342
|
required: !0,
|
|
1317
|
-
message: `${
|
|
1343
|
+
message: `${r.label}是必填项`,
|
|
1318
1344
|
trigger: ["input", "blur"]
|
|
1319
1345
|
});
|
|
1320
1346
|
}
|
|
1321
|
-
else if (
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1347
|
+
else if (r.rules) {
|
|
1348
|
+
const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
|
|
1349
|
+
t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
|
|
1324
1350
|
required: !0,
|
|
1325
|
-
message: `${
|
|
1351
|
+
message: `${r.label}是必填项`,
|
|
1326
1352
|
trigger: ["input", "blur"]
|
|
1327
1353
|
});
|
|
1328
1354
|
}
|
|
1329
1355
|
return {
|
|
1330
|
-
rule:
|
|
1356
|
+
rule: r.rules
|
|
1331
1357
|
};
|
|
1332
1358
|
},
|
|
1333
1359
|
getFormModelPropName() {
|
|
1334
1360
|
return "model";
|
|
1335
1361
|
},
|
|
1336
1362
|
formComponentRenderer({
|
|
1337
|
-
Component:
|
|
1363
|
+
Component: r,
|
|
1338
1364
|
baseModel: e,
|
|
1339
|
-
schema:
|
|
1365
|
+
schema: t,
|
|
1340
1366
|
placeholder: i,
|
|
1341
1367
|
componentSlots: s,
|
|
1342
1368
|
props: n
|
|
1343
1369
|
}) {
|
|
1344
1370
|
let a;
|
|
1345
|
-
return o.isFunction(
|
|
1371
|
+
return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
|
|
1346
1372
|
value: a,
|
|
1347
1373
|
"onUpdate:value": (l) => {
|
|
1348
|
-
o.isFunction(
|
|
1374
|
+
o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
|
|
1349
1375
|
},
|
|
1350
1376
|
placeholder: i
|
|
1351
1377
|
}, n), {
|
|
1352
1378
|
...s
|
|
1353
1379
|
});
|
|
1354
1380
|
},
|
|
1355
|
-
validateForm(
|
|
1356
|
-
return new Promise((e,
|
|
1357
|
-
|
|
1381
|
+
validateForm(r) {
|
|
1382
|
+
return new Promise((e, t) => {
|
|
1383
|
+
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
|
|
1358
1384
|
});
|
|
1359
1385
|
},
|
|
1360
|
-
clearValidate(
|
|
1361
|
-
var e,
|
|
1362
|
-
(
|
|
1386
|
+
clearValidate(r) {
|
|
1387
|
+
var e, t;
|
|
1388
|
+
(t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
|
|
1363
1389
|
}
|
|
1364
1390
|
}
|
|
1365
|
-
},
|
|
1391
|
+
}, E = class E {
|
|
1366
1392
|
static getPlaceholderPrefixPresetByComponentName() {
|
|
1367
1393
|
const e = {
|
|
1368
1394
|
请选择: ["select", "tree"],
|
|
1369
1395
|
请输入: ["input"]
|
|
1370
|
-
},
|
|
1396
|
+
}, t = {};
|
|
1371
1397
|
for (const i in e)
|
|
1372
1398
|
e[i].forEach((s) => {
|
|
1373
|
-
|
|
1399
|
+
t[s] = i;
|
|
1374
1400
|
});
|
|
1375
|
-
return
|
|
1401
|
+
return t;
|
|
1376
1402
|
}
|
|
1377
1403
|
};
|
|
1378
|
-
u(
|
|
1404
|
+
u(E, "schemaPreset", {
|
|
1379
1405
|
type: {
|
|
1380
1406
|
defaultValue: "item"
|
|
1381
1407
|
},
|
|
@@ -1421,32 +1447,32 @@ u(M, "schemaPreset", {
|
|
|
1421
1447
|
runtime: {
|
|
1422
1448
|
default: void 0
|
|
1423
1449
|
}
|
|
1424
|
-
}), u(
|
|
1450
|
+
}), u(E, "componentPropsPreset", {
|
|
1425
1451
|
options: {
|
|
1426
1452
|
defaultValue: []
|
|
1427
1453
|
}
|
|
1428
1454
|
}), // 基于基本功能提出基本预设
|
|
1429
|
-
u(
|
|
1430
|
-
let
|
|
1455
|
+
u(E, "placeholderPresetByComponentName", E.getPlaceholderPrefixPresetByComponentName());
|
|
1456
|
+
let J = E;
|
|
1431
1457
|
const C = {
|
|
1432
|
-
...
|
|
1458
|
+
...J,
|
|
1433
1459
|
adapters: {
|
|
1434
|
-
...
|
|
1460
|
+
...yr
|
|
1435
1461
|
}
|
|
1436
|
-
},
|
|
1462
|
+
}, Cr = /* @__PURE__ */ He({
|
|
1437
1463
|
props: {
|
|
1438
1464
|
setup: {
|
|
1439
1465
|
type: Function,
|
|
1440
1466
|
required: !0
|
|
1441
1467
|
}
|
|
1442
1468
|
},
|
|
1443
|
-
setup(
|
|
1444
|
-
const e = new gr(
|
|
1469
|
+
setup(r) {
|
|
1470
|
+
const e = new gr(r.setup);
|
|
1445
1471
|
return () => e.exec();
|
|
1446
1472
|
}
|
|
1447
1473
|
});
|
|
1448
|
-
function
|
|
1449
|
-
const e = new
|
|
1474
|
+
function Ir(r) {
|
|
1475
|
+
const e = new Ke(r);
|
|
1450
1476
|
return [
|
|
1451
1477
|
e.setup.bind(e),
|
|
1452
1478
|
{
|
|
@@ -1458,33 +1484,33 @@ function Cr(t) {
|
|
|
1458
1484
|
}
|
|
1459
1485
|
];
|
|
1460
1486
|
}
|
|
1461
|
-
function Sr(
|
|
1462
|
-
|
|
1487
|
+
function Sr(r) {
|
|
1488
|
+
c.presets = r;
|
|
1463
1489
|
}
|
|
1464
|
-
function re(
|
|
1465
|
-
return e === "native" && Object.defineProperty(
|
|
1466
|
-
value: `__proform_raw_${
|
|
1490
|
+
function re(r, e) {
|
|
1491
|
+
return e === "native" && Object.defineProperty(r, "name", {
|
|
1492
|
+
value: `__proform_raw_${r.name}`,
|
|
1467
1493
|
writable: !0
|
|
1468
|
-
}), e === "structured_path_parsing_mark" && Object.defineProperty(
|
|
1469
|
-
value: `__proform_structured_path_parsing_mark_${
|
|
1494
|
+
}), e === "structured_path_parsing_mark" && Object.defineProperty(r, "name", {
|
|
1495
|
+
value: `__proform_structured_path_parsing_mark_${r.name}`,
|
|
1470
1496
|
writable: !0
|
|
1471
|
-
}), e === "onetime" && Object.defineProperty(
|
|
1472
|
-
value: `__proform_onetime_${
|
|
1497
|
+
}), e === "onetime" && Object.defineProperty(r, "name", {
|
|
1498
|
+
value: `__proform_onetime_${r.name}`,
|
|
1473
1499
|
writable: !0
|
|
1474
|
-
}),
|
|
1500
|
+
}), r;
|
|
1475
1501
|
}
|
|
1476
|
-
function Or(
|
|
1477
|
-
return re(
|
|
1502
|
+
function Or(r) {
|
|
1503
|
+
return re(r, "native");
|
|
1478
1504
|
}
|
|
1479
|
-
function Fr(
|
|
1480
|
-
return
|
|
1505
|
+
function Fr(r) {
|
|
1506
|
+
return r.__proform_raw_object = !0, r;
|
|
1481
1507
|
}
|
|
1482
|
-
function jr(
|
|
1483
|
-
return re(
|
|
1508
|
+
function jr(r) {
|
|
1509
|
+
return re(r, "onetime");
|
|
1484
1510
|
}
|
|
1485
|
-
function wr(
|
|
1511
|
+
function wr(r) {
|
|
1486
1512
|
function e() {
|
|
1487
|
-
return
|
|
1513
|
+
return r;
|
|
1488
1514
|
}
|
|
1489
1515
|
return re(
|
|
1490
1516
|
e,
|
|
@@ -1492,12 +1518,12 @@ function wr(t) {
|
|
|
1492
1518
|
);
|
|
1493
1519
|
}
|
|
1494
1520
|
export {
|
|
1495
|
-
|
|
1521
|
+
Cr as ProForm,
|
|
1496
1522
|
Or as markNativeFunction,
|
|
1497
1523
|
Fr as markNativeObject,
|
|
1498
1524
|
jr as markOnetimeFunction,
|
|
1499
1525
|
wr as markStructuredPathParsing,
|
|
1500
|
-
|
|
1526
|
+
Ir as useForm,
|
|
1501
1527
|
Sr as useFormPresetConfigurer,
|
|
1502
1528
|
re as useModifiers
|
|
1503
1529
|
};
|