@harbor-design/proform 1.3.11 → 1.3.13
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 +145 -161
- package/dist/types/src/services/Effect/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Te = Object.defineProperty;
|
|
2
2
|
var ze = (t, e, r) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var u = (t, e, r) => (ze(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
-
import { ref as z, readonly as
|
|
4
|
+
import { ref as z, readonly as Pe, nextTick as P, isRef as q, watch as _, isReactive as U, toRaw as x, reactive as H, createVNode as y, mergeProps as N, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as ke } from "vue";
|
|
5
5
|
class o {
|
|
6
6
|
static typeChecker(e) {
|
|
7
7
|
return {}.toString.call(e);
|
|
@@ -69,18 +69,18 @@ class o {
|
|
|
69
69
|
return !!e.__proform_raw_object;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function h(t, ...e) {
|
|
73
73
|
return e.forEach((r) => {
|
|
74
74
|
if (Array.isArray(r))
|
|
75
75
|
Array.isArray(t) || (t = []), r.forEach((i, s) => {
|
|
76
|
-
typeof i == "object" && i !== null ? t[s] =
|
|
76
|
+
typeof i == "object" && i !== null ? t[s] = h(Array.isArray(i) ? [] : {}, i) : t[s] = i;
|
|
77
77
|
});
|
|
78
78
|
else
|
|
79
79
|
for (const i in r)
|
|
80
|
-
r.hasOwnProperty(i) && (typeof r[i] == "object" && r[i] !== null ? t[i] =
|
|
80
|
+
r.hasOwnProperty(i) && (typeof r[i] == "object" && r[i] !== null ? t[i] = h(t[i] || {}, r[i]) : t[i] = r[i]);
|
|
81
81
|
}), t;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function I(t) {
|
|
84
84
|
const e = /* @__PURE__ */ new WeakMap();
|
|
85
85
|
function r(i) {
|
|
86
86
|
if (i === null || typeof i != "object")
|
|
@@ -118,7 +118,7 @@ function C(t) {
|
|
|
118
118
|
}
|
|
119
119
|
return r(t);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function X(t, e) {
|
|
122
122
|
return t.replace(/undefined/g, e);
|
|
123
123
|
}
|
|
124
124
|
class He {
|
|
@@ -134,11 +134,11 @@ class He {
|
|
|
134
134
|
})), e;
|
|
135
135
|
}
|
|
136
136
|
setup(e) {
|
|
137
|
-
return this.runtimeCore = e, this.readonlyReactiveModel.value =
|
|
137
|
+
return this.runtimeCore = e, this.readonlyReactiveModel.value = Pe(e.model.value), Object.assign(this.runtimeCore.native, this.formCustomization.native), Object.assign(this.runtimeCore.grid, this.formCustomization.grid), Object.assign(this.runtimeCore.runtime, this.formCustomization.runtime), this.formCustomization.ui && (this.runtimeCore.ui = this.formCustomization.ui), this.formCustomization;
|
|
138
138
|
}
|
|
139
139
|
submit() {
|
|
140
140
|
var i;
|
|
141
|
-
const e = (i = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r =
|
|
141
|
+
const e = (i = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = C.adapters[f.getUI(this.runtimeCore.ui)];
|
|
142
142
|
return (e == null ? void 0 : e.validateForm(this)) ?? (r == null ? void 0 : r.validateForm(this));
|
|
143
143
|
}
|
|
144
144
|
hydrate(e) {
|
|
@@ -148,7 +148,7 @@ class He {
|
|
|
148
148
|
q(e) ? _(
|
|
149
149
|
() => e.value,
|
|
150
150
|
() => {
|
|
151
|
-
|
|
151
|
+
h(this.runtimeCore.model.value, e.value);
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
deep: !0,
|
|
@@ -157,13 +157,13 @@ class He {
|
|
|
157
157
|
) : U(e) ? _(
|
|
158
158
|
() => e,
|
|
159
159
|
() => {
|
|
160
|
-
|
|
160
|
+
h(this.runtimeCore.model.value, e);
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
deep: !0,
|
|
164
164
|
immediate: !0
|
|
165
165
|
}
|
|
166
|
-
) :
|
|
166
|
+
) : h(this.runtimeCore.model.value, e);
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
lazy: !1
|
|
@@ -177,10 +177,7 @@ class He {
|
|
|
177
177
|
const r = _(
|
|
178
178
|
() => e.value,
|
|
179
179
|
() => {
|
|
180
|
-
this.runtimeCore.shared
|
|
181
|
-
...this.runtimeCore.shared,
|
|
182
|
-
...e.value
|
|
183
|
-
}, this.runtimeCore.processor.schemaEffect.triggerEffects(), P(() => {
|
|
180
|
+
h(this.runtimeCore.shared, e.value), P(() => {
|
|
184
181
|
r();
|
|
185
182
|
});
|
|
186
183
|
},
|
|
@@ -193,10 +190,7 @@ class He {
|
|
|
193
190
|
const r = _(
|
|
194
191
|
() => e,
|
|
195
192
|
() => {
|
|
196
|
-
this.runtimeCore.shared
|
|
197
|
-
...this.runtimeCore.shared,
|
|
198
|
-
...e
|
|
199
|
-
}, this.runtimeCore.processor.schemaEffect.triggerEffects(), P(() => {
|
|
193
|
+
h(this.runtimeCore.shared, e), P(() => {
|
|
200
194
|
r();
|
|
201
195
|
});
|
|
202
196
|
},
|
|
@@ -206,10 +200,7 @@ class He {
|
|
|
206
200
|
}
|
|
207
201
|
);
|
|
208
202
|
} else
|
|
209
|
-
this.runtimeCore.shared
|
|
210
|
-
...this.runtimeCore.shared,
|
|
211
|
-
...e
|
|
212
|
-
}, this.runtimeCore.processor.schemaEffect.triggerEffects();
|
|
203
|
+
h(this.runtimeCore.shared, e);
|
|
213
204
|
});
|
|
214
205
|
}
|
|
215
206
|
subscribeModel(e) {
|
|
@@ -234,15 +225,17 @@ class He {
|
|
|
234
225
|
}
|
|
235
226
|
resetModel() {
|
|
236
227
|
var e;
|
|
237
|
-
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value =
|
|
228
|
+
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
|
|
238
229
|
this.runtimeCore.processor.stableModel
|
|
239
|
-
), this.readonlyReactiveModel.value =
|
|
230
|
+
), this.readonlyReactiveModel.value = Pe(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
240
231
|
}
|
|
241
232
|
}
|
|
242
|
-
class
|
|
233
|
+
class Y {
|
|
243
234
|
constructor() {
|
|
244
235
|
u(this, "effects", /* @__PURE__ */ new Set());
|
|
236
|
+
u(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
245
237
|
u(this, "identifierMap", /* @__PURE__ */ new Map());
|
|
238
|
+
u(this, "timer");
|
|
246
239
|
}
|
|
247
240
|
clearEffects() {
|
|
248
241
|
this.effects.clear();
|
|
@@ -256,7 +249,7 @@ class X {
|
|
|
256
249
|
return !r.lazy && e(), r.identifier ? this.identifierMap.get(r.identifier) || (this.effects.add(e), this.identifierMap.set(r.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
|
|
257
250
|
}
|
|
258
251
|
}
|
|
259
|
-
var We = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self,
|
|
252
|
+
var We = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self, J = We || Ke || Function("return this")(), E = J.Symbol, je = Object.prototype, Xe = je.hasOwnProperty, Ye = je.toString, V = E ? E.toStringTag : void 0;
|
|
260
253
|
function Ze(t) {
|
|
261
254
|
var e = Xe.call(t, V), r = t[V];
|
|
262
255
|
try {
|
|
@@ -271,15 +264,15 @@ var Je = Object.prototype, Qe = Je.toString;
|
|
|
271
264
|
function Ae(t) {
|
|
272
265
|
return Qe.call(t);
|
|
273
266
|
}
|
|
274
|
-
var et = "[object Null]", tt = "[object Undefined]",
|
|
267
|
+
var et = "[object Null]", tt = "[object Undefined]", Ie = E ? E.toStringTag : void 0;
|
|
275
268
|
function we(t) {
|
|
276
|
-
return t == null ? t === void 0 ? tt : et :
|
|
269
|
+
return t == null ? t === void 0 ? tt : et : Ie && Ie in Object(t) ? Ze(t) : Ae(t);
|
|
277
270
|
}
|
|
278
271
|
function rt(t) {
|
|
279
272
|
return t != null && typeof t == "object";
|
|
280
273
|
}
|
|
281
274
|
var it = "[object Symbol]";
|
|
282
|
-
function
|
|
275
|
+
function Q(t) {
|
|
283
276
|
return typeof t == "symbol" || rt(t) && we(t) == it;
|
|
284
277
|
}
|
|
285
278
|
function st(t, e) {
|
|
@@ -287,13 +280,13 @@ function st(t, e) {
|
|
|
287
280
|
s[r] = e(t[r], r, t);
|
|
288
281
|
return s;
|
|
289
282
|
}
|
|
290
|
-
var
|
|
283
|
+
var A = Array.isArray, nt = 1 / 0, Ce = E ? E.prototype : void 0, Se = Ce ? Ce.toString : void 0;
|
|
291
284
|
function Me(t) {
|
|
292
285
|
if (typeof t == "string")
|
|
293
286
|
return t;
|
|
294
|
-
if (
|
|
287
|
+
if (A(t))
|
|
295
288
|
return st(t, Me) + "";
|
|
296
|
-
if (
|
|
289
|
+
if (Q(t))
|
|
297
290
|
return Se ? Se.call(t) : "";
|
|
298
291
|
var e = t + "";
|
|
299
292
|
return e == "0" && 1 / t == -nt ? "-0" : e;
|
|
@@ -309,8 +302,8 @@ function ct(t) {
|
|
|
309
302
|
var e = we(t);
|
|
310
303
|
return e == at || e == lt || e == ot || e == ut;
|
|
311
304
|
}
|
|
312
|
-
var
|
|
313
|
-
var t = /[^.]+$/.exec(
|
|
305
|
+
var W = J["__core-js_shared__"], Oe = function() {
|
|
306
|
+
var t = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
|
|
314
307
|
return t ? "Symbol(src)_1." + t : "";
|
|
315
308
|
}();
|
|
316
309
|
function ft(t) {
|
|
@@ -330,25 +323,25 @@ function ht(t) {
|
|
|
330
323
|
}
|
|
331
324
|
return "";
|
|
332
325
|
}
|
|
333
|
-
var mt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/,
|
|
326
|
+
var mt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, bt = Function.prototype, gt = Object.prototype, vt = bt.toString, _t = gt.hasOwnProperty, Pt = RegExp(
|
|
334
327
|
"^" + vt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
335
328
|
);
|
|
336
|
-
function
|
|
329
|
+
function It(t) {
|
|
337
330
|
if (!G(t) || ft(t))
|
|
338
331
|
return !1;
|
|
339
332
|
var e = ct(t) ? Pt : yt;
|
|
340
333
|
return e.test(ht(t));
|
|
341
334
|
}
|
|
342
|
-
function
|
|
335
|
+
function Ct(t, e) {
|
|
343
336
|
return t == null ? void 0 : t[e];
|
|
344
337
|
}
|
|
345
|
-
function
|
|
346
|
-
var r =
|
|
347
|
-
return
|
|
338
|
+
function ee(t, e) {
|
|
339
|
+
var r = Ct(t, e);
|
|
340
|
+
return It(r) ? r : void 0;
|
|
348
341
|
}
|
|
349
342
|
var Fe = function() {
|
|
350
343
|
try {
|
|
351
|
-
var t =
|
|
344
|
+
var t = ee(Object, "defineProperty");
|
|
352
345
|
return t({}, "", {}), t;
|
|
353
346
|
} catch {
|
|
354
347
|
}
|
|
@@ -365,22 +358,22 @@ function jt(t, e, r) {
|
|
|
365
358
|
writable: !0
|
|
366
359
|
}) : t[e] = r;
|
|
367
360
|
}
|
|
368
|
-
function
|
|
361
|
+
function xe(t, e) {
|
|
369
362
|
return t === e || t !== t && e !== e;
|
|
370
363
|
}
|
|
371
364
|
var wt = Object.prototype, Mt = wt.hasOwnProperty;
|
|
372
|
-
function
|
|
365
|
+
function xt(t, e, r) {
|
|
373
366
|
var i = t[e];
|
|
374
|
-
(!(Mt.call(t, e) &&
|
|
367
|
+
(!(Mt.call(t, e) && xe(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
|
|
375
368
|
}
|
|
376
|
-
var
|
|
369
|
+
var Et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
|
|
377
370
|
function $t(t, e) {
|
|
378
|
-
if (
|
|
371
|
+
if (A(t))
|
|
379
372
|
return !1;
|
|
380
373
|
var r = typeof t;
|
|
381
|
-
return r == "number" || r == "symbol" || r == "boolean" || t == null ||
|
|
374
|
+
return r == "number" || r == "symbol" || r == "boolean" || t == null || Q(t) ? !0 : Rt.test(t) || !Et.test(t) || e != null && t in Object(e);
|
|
382
375
|
}
|
|
383
|
-
var T =
|
|
376
|
+
var T = ee(Object, "create");
|
|
384
377
|
function Vt() {
|
|
385
378
|
this.__data__ = T ? T(null) : {}, this.size = 0;
|
|
386
379
|
}
|
|
@@ -424,7 +417,7 @@ function Ht() {
|
|
|
424
417
|
}
|
|
425
418
|
function B(t, e) {
|
|
426
419
|
for (var r = t.length; r--; )
|
|
427
|
-
if (
|
|
420
|
+
if (xe(t[r][0], e))
|
|
428
421
|
return r;
|
|
429
422
|
return -1;
|
|
430
423
|
}
|
|
@@ -459,7 +452,7 @@ R.prototype.delete = Xt;
|
|
|
459
452
|
R.prototype.get = Yt;
|
|
460
453
|
R.prototype.has = Zt;
|
|
461
454
|
R.prototype.set = Jt;
|
|
462
|
-
var Qt =
|
|
455
|
+
var Qt = ee(J, "Map");
|
|
463
456
|
function At() {
|
|
464
457
|
this.size = 0, this.__data__ = {
|
|
465
458
|
hash: new F(),
|
|
@@ -502,7 +495,7 @@ j.prototype.get = rr;
|
|
|
502
495
|
j.prototype.has = ir;
|
|
503
496
|
j.prototype.set = sr;
|
|
504
497
|
var nr = "Expected a function";
|
|
505
|
-
function
|
|
498
|
+
function te(t, e) {
|
|
506
499
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
507
500
|
throw new TypeError(nr);
|
|
508
501
|
var r = function() {
|
|
@@ -512,12 +505,12 @@ function ee(t, e) {
|
|
|
512
505
|
var a = t.apply(this, i);
|
|
513
506
|
return r.cache = n.set(s, a) || n, a;
|
|
514
507
|
};
|
|
515
|
-
return r.cache = new (
|
|
508
|
+
return r.cache = new (te.Cache || j)(), r;
|
|
516
509
|
}
|
|
517
|
-
|
|
510
|
+
te.Cache = j;
|
|
518
511
|
var or = 500;
|
|
519
512
|
function ar(t) {
|
|
520
|
-
var e =
|
|
513
|
+
var e = te(t, function(i) {
|
|
521
514
|
return r.size === or && r.clear(), i;
|
|
522
515
|
}), r = e.cache;
|
|
523
516
|
return e;
|
|
@@ -531,18 +524,18 @@ var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=
|
|
|
531
524
|
function fr(t) {
|
|
532
525
|
return t == null ? "" : Me(t);
|
|
533
526
|
}
|
|
534
|
-
function
|
|
535
|
-
return
|
|
527
|
+
function Ee(t, e) {
|
|
528
|
+
return A(t) ? t : $t(t, e) ? [t] : cr(fr(t));
|
|
536
529
|
}
|
|
537
530
|
var dr = 1 / 0;
|
|
538
531
|
function Re(t) {
|
|
539
|
-
if (typeof t == "string" ||
|
|
532
|
+
if (typeof t == "string" || Q(t))
|
|
540
533
|
return t;
|
|
541
534
|
var e = t + "";
|
|
542
535
|
return e == "0" && 1 / t == -dr ? "-0" : e;
|
|
543
536
|
}
|
|
544
537
|
function pr(t, e) {
|
|
545
|
-
e =
|
|
538
|
+
e = Ee(e, t);
|
|
546
539
|
for (var r = 0, i = e.length; t != null && r < i; )
|
|
547
540
|
t = t[Re(e[r++])];
|
|
548
541
|
return r && r == i ? t : void 0;
|
|
@@ -554,7 +547,7 @@ function L(t, e, r) {
|
|
|
554
547
|
function hr(t, e, r, i) {
|
|
555
548
|
if (!G(t))
|
|
556
549
|
return t;
|
|
557
|
-
e =
|
|
550
|
+
e = Ee(e, t);
|
|
558
551
|
for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
|
|
559
552
|
var c = Re(e[s]), d = r;
|
|
560
553
|
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
@@ -563,7 +556,7 @@ function hr(t, e, r, i) {
|
|
|
563
556
|
var p = l[c];
|
|
564
557
|
d = i ? i(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
|
|
565
558
|
}
|
|
566
|
-
|
|
559
|
+
xt(l, c, d), l = l[c];
|
|
567
560
|
}
|
|
568
561
|
return t;
|
|
569
562
|
}
|
|
@@ -578,12 +571,12 @@ class mr {
|
|
|
578
571
|
u(this, "getRuntimeMeta");
|
|
579
572
|
u(this, "stableSchemas", []);
|
|
580
573
|
u(this, "stableModel", {});
|
|
581
|
-
u(this, "schemaPreset",
|
|
582
|
-
u(this, "componentPropsPreset",
|
|
574
|
+
u(this, "schemaPreset", C.schemaPreset);
|
|
575
|
+
u(this, "componentPropsPreset", C.componentPropsPreset);
|
|
583
576
|
u(this, "stableUpdaterProcessProgress");
|
|
584
577
|
u(this, "stableUpdaterTimes", 0);
|
|
585
|
-
u(this, "schemaEffect", new
|
|
586
|
-
u(this, "defaultValueEffect", new
|
|
578
|
+
u(this, "schemaEffect", new Y());
|
|
579
|
+
u(this, "defaultValueEffect", new Y());
|
|
587
580
|
u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
588
581
|
u(this, "baseDefaultValueFunctionsLength");
|
|
589
582
|
u(this, "isModelInitialized", !0);
|
|
@@ -625,7 +618,7 @@ class mr {
|
|
|
625
618
|
// 派生过程,用于外部应用
|
|
626
619
|
parseSchemas(e, r) {
|
|
627
620
|
o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
|
|
628
|
-
|
|
621
|
+
I(e)
|
|
629
622
|
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, r);
|
|
630
623
|
}
|
|
631
624
|
parseStable(e) {
|
|
@@ -639,7 +632,7 @@ class mr {
|
|
|
639
632
|
// 对于稳定初始化更新的抽象
|
|
640
633
|
stableUpdater(e = []) {
|
|
641
634
|
if (e.every(Boolean)) {
|
|
642
|
-
const r =
|
|
635
|
+
const r = x(this.processedSchemas.value);
|
|
643
636
|
!o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
|
|
644
637
|
length: r.length
|
|
645
638
|
}).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
|
|
@@ -655,14 +648,14 @@ class mr {
|
|
|
655
648
|
const c = l.index, d = l.key, p = l.keyIndex;
|
|
656
649
|
if (o.isUndefined(l.stable))
|
|
657
650
|
return;
|
|
658
|
-
const
|
|
659
|
-
let v =
|
|
651
|
+
const m = s.parseStable(l.stable), g = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
|
|
652
|
+
let v = m;
|
|
660
653
|
if (o.isProcessInprogress(v) || (n[p] = !0), i) {
|
|
661
|
-
const
|
|
662
|
-
|
|
654
|
+
const b = s.processedSchemas.value[g][S][c][d];
|
|
655
|
+
b && o.isObject(b) && d !== "component" && (v = h(b, v)), s.processedSchemas.value[g][S][c][d] = v, s.stableUpdater(n);
|
|
663
656
|
} else {
|
|
664
|
-
const
|
|
665
|
-
|
|
657
|
+
const b = s.processedSchemas.value[c][d];
|
|
658
|
+
b && o.isObject(b) && d !== "component" && (v = h(b, v)), s.processedSchemas.value[c][d] = v, s.stableUpdater(n);
|
|
666
659
|
}
|
|
667
660
|
}
|
|
668
661
|
}
|
|
@@ -715,9 +708,9 @@ class mr {
|
|
|
715
708
|
return c(p);
|
|
716
709
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
717
710
|
this.defaultValueInprogressMap.values()
|
|
718
|
-
).every((
|
|
711
|
+
).every((m) => {
|
|
719
712
|
var g;
|
|
720
|
-
return !((g =
|
|
713
|
+
return !((g = m == null ? void 0 : m.includes) != null && g.call(m, "undefined"));
|
|
721
714
|
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
722
715
|
d();
|
|
723
716
|
})) : c(p);
|
|
@@ -731,9 +724,9 @@ class mr {
|
|
|
731
724
|
(p) => {
|
|
732
725
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
733
726
|
this.defaultValueInprogressMap.values()
|
|
734
|
-
).every((
|
|
727
|
+
).every((m) => {
|
|
735
728
|
var g;
|
|
736
|
-
return !((g =
|
|
729
|
+
return !((g = m == null ? void 0 : m.includes) != null && g.call(m, "undefined"));
|
|
737
730
|
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
738
731
|
d();
|
|
739
732
|
})) : c(p);
|
|
@@ -764,13 +757,13 @@ class mr {
|
|
|
764
757
|
}
|
|
765
758
|
promiseFieldParser(e, r, i, s) {
|
|
766
759
|
o.isPromise(e) ? e.then((n) => {
|
|
767
|
-
o.isString(n) && (n =
|
|
760
|
+
o.isString(n) && (n = X(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
768
761
|
data: n,
|
|
769
762
|
updater: r,
|
|
770
763
|
index: s.rootIndex,
|
|
771
764
|
parentMeta: s.parentMeta
|
|
772
765
|
}) : r(n);
|
|
773
|
-
}) : (o.isString(e) && (e =
|
|
766
|
+
}) : (o.isString(e) && (e = X(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
774
767
|
data: e,
|
|
775
768
|
updater: r,
|
|
776
769
|
index: s.rootIndex,
|
|
@@ -835,7 +828,7 @@ class mr {
|
|
|
835
828
|
modelProcessor(e) {
|
|
836
829
|
e.map(
|
|
837
830
|
(r) => this.createModel(r, this.processedModel.value)
|
|
838
|
-
), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel =
|
|
831
|
+
), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel = I(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
|
|
839
832
|
}
|
|
840
833
|
setModel(e, r, i) {
|
|
841
834
|
o.isFunction(r) ? D(e, r(), i) : e[r] = i;
|
|
@@ -887,34 +880,34 @@ class yr {
|
|
|
887
880
|
}
|
|
888
881
|
getRuntimeField(e) {
|
|
889
882
|
var s;
|
|
890
|
-
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
883
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[f.getUI(this.ui)];
|
|
891
884
|
return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
|
|
892
885
|
}
|
|
893
886
|
getRuntimeRequired(e) {
|
|
894
887
|
var s;
|
|
895
|
-
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
888
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[f.getUI(this.ui)];
|
|
896
889
|
return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
|
|
897
890
|
}
|
|
898
891
|
getFormModelPropName() {
|
|
899
892
|
var i;
|
|
900
|
-
const e = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r =
|
|
893
|
+
const e = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = C.adapters[f.getUI(this.ui)];
|
|
901
894
|
return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
|
|
902
895
|
}
|
|
903
896
|
formComponentRenderer(e) {
|
|
904
897
|
var s;
|
|
905
|
-
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
898
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[f.getUI(this.ui)];
|
|
906
899
|
return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
|
|
907
900
|
}
|
|
908
901
|
clearValidate(e) {
|
|
909
902
|
var s;
|
|
910
|
-
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
903
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[f.getUI(this.ui)];
|
|
911
904
|
return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
|
|
912
905
|
}
|
|
913
906
|
}
|
|
914
|
-
function
|
|
907
|
+
function br(t) {
|
|
915
908
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
|
|
916
909
|
}
|
|
917
|
-
class
|
|
910
|
+
class gr {
|
|
918
911
|
constructor(e) {
|
|
919
912
|
u(this, "schemas", z([]));
|
|
920
913
|
u(this, "model", z({}));
|
|
@@ -924,11 +917,11 @@ class br {
|
|
|
924
917
|
list: this.runtimeListProcessor.bind(this)
|
|
925
918
|
});
|
|
926
919
|
u(this, "formRef", z(null));
|
|
927
|
-
u(this, "hydrateEffect", new
|
|
928
|
-
u(this, "native",
|
|
920
|
+
u(this, "hydrateEffect", new Y());
|
|
921
|
+
u(this, "native", H({}));
|
|
929
922
|
u(this, "grid", {});
|
|
930
923
|
u(this, "runtime", {});
|
|
931
|
-
u(this, "globalNativeFormOverride",
|
|
924
|
+
u(this, "globalNativeFormOverride", H({
|
|
932
925
|
props: {
|
|
933
926
|
Form: {},
|
|
934
927
|
FormItem: {}
|
|
@@ -938,7 +931,7 @@ class br {
|
|
|
938
931
|
FormItem: {}
|
|
939
932
|
}
|
|
940
933
|
}));
|
|
941
|
-
u(this, "shared", {});
|
|
934
|
+
u(this, "shared", H({}));
|
|
942
935
|
this.setup = e, this.processor = new mr(this);
|
|
943
936
|
const r = this.setup(this);
|
|
944
937
|
if (this.ui = r.ui ?? f.presets.ui, this.runtimeAdapter = new yr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), q(r.schemas))
|
|
@@ -965,17 +958,14 @@ class br {
|
|
|
965
958
|
}
|
|
966
959
|
getRuntimeMeta() {
|
|
967
960
|
return {
|
|
968
|
-
model:
|
|
961
|
+
model: x(I(this.model.value)),
|
|
969
962
|
reactiveModel: this.model.value,
|
|
970
963
|
shared: this.shared,
|
|
971
964
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
972
965
|
share: (r) => {
|
|
973
966
|
if (q(r)) {
|
|
974
967
|
const i = _(() => r.value, () => {
|
|
975
|
-
this.shared
|
|
976
|
-
...this.shared,
|
|
977
|
-
...r.value
|
|
978
|
-
}, P(() => {
|
|
968
|
+
h(this.shared, r.value), P(() => {
|
|
979
969
|
i();
|
|
980
970
|
});
|
|
981
971
|
}, {
|
|
@@ -984,10 +974,7 @@ class br {
|
|
|
984
974
|
});
|
|
985
975
|
} else if (U(r)) {
|
|
986
976
|
const i = _(() => r, () => {
|
|
987
|
-
this.shared
|
|
988
|
-
...this.shared,
|
|
989
|
-
...r
|
|
990
|
-
}, P(() => {
|
|
977
|
+
h(this.shared, r), P(() => {
|
|
991
978
|
i();
|
|
992
979
|
});
|
|
993
980
|
}, {
|
|
@@ -995,50 +982,47 @@ class br {
|
|
|
995
982
|
immediate: !0
|
|
996
983
|
});
|
|
997
984
|
} else
|
|
998
|
-
this.shared
|
|
999
|
-
...this.shared,
|
|
1000
|
-
...r
|
|
1001
|
-
};
|
|
985
|
+
h(this.shared, r);
|
|
1002
986
|
}
|
|
1003
987
|
};
|
|
1004
988
|
}
|
|
1005
989
|
runtimeItemProcessor(e, r, i = this.model.value, s) {
|
|
1006
|
-
var
|
|
1007
|
-
const n =
|
|
990
|
+
var ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ye, be, ge, ve;
|
|
991
|
+
const n = x(e.component);
|
|
1008
992
|
if (!n)
|
|
1009
993
|
return;
|
|
1010
|
-
(
|
|
1011
|
-
const a =
|
|
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, (ce = (ue = e.native) == null ? void 0 : ue.slots) == null ? void 0 : ce.Form);
|
|
995
|
+
const a = h(I((de = (fe = this.native) == null ? void 0 : fe.slots) == null ? void 0 : de.FormItem) ?? {}, (he = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : he.FormItem), l = {
|
|
1012
996
|
display: "grid",
|
|
1013
997
|
gridColumn: "1 / -1",
|
|
1014
998
|
...e.grid
|
|
1015
|
-
}, c =
|
|
999
|
+
}, c = h(I((ye = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : ye.FormItem) ?? {}, (ge = (be = e.native) == null ? void 0 : be.props) == null ? void 0 : ge.FormItem), d = this.runtimeAdapter.getRuntimeField({
|
|
1016
1000
|
schema: e,
|
|
1017
1001
|
parentSchema: s,
|
|
1018
1002
|
index: r
|
|
1019
|
-
}), p = n.name,
|
|
1003
|
+
}), p = n.name, m = e.componentProps ?? {}, g = C.placeholderPresetByComponentName;
|
|
1020
1004
|
let S = e.placeholder, v = e.show;
|
|
1021
1005
|
v === void 0 && (v = !0);
|
|
1022
|
-
let
|
|
1023
|
-
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (
|
|
1006
|
+
let b = e.label ?? "", O;
|
|
1007
|
+
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (b = X((ve = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : ve.call(O, e.label ?? "", r + 1), "")), !S) {
|
|
1024
1008
|
let $ = "请输入";
|
|
1025
|
-
o.isUndefined(p) ? S = `${$}${
|
|
1026
|
-
g[p.toLowerCase()], S = `${$}${
|
|
1027
|
-
p.toLowerCase().includes(
|
|
1028
|
-
}), S = `${$}${
|
|
1009
|
+
o.isUndefined(p) ? S = `${$}${b}` : /* @ts-expect-error */ g[p.toLowerCase()] ? ($ = // @ts-expect-error
|
|
1010
|
+
g[p.toLowerCase()], S = `${$}${b}`) : (Object.keys(g).forEach((_e) => {
|
|
1011
|
+
p.toLowerCase().includes(_e.toLowerCase()) && ($ = g[_e]);
|
|
1012
|
+
}), S = `${$}${b}`);
|
|
1029
1013
|
}
|
|
1030
1014
|
const $e = this.runtimeAdapter.getRuntimeRequired({
|
|
1031
1015
|
...e,
|
|
1032
|
-
label:
|
|
1016
|
+
label: b
|
|
1033
1017
|
}), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
|
|
1034
|
-
return
|
|
1018
|
+
return y("div", {
|
|
1035
1019
|
style: l
|
|
1036
|
-
}, [
|
|
1020
|
+
}, [y(Ve, {
|
|
1037
1021
|
show: v
|
|
1038
1022
|
}, {
|
|
1039
1023
|
default() {
|
|
1040
|
-
return v &&
|
|
1041
|
-
label: `${
|
|
1024
|
+
return v && y(Ne, N(c, {
|
|
1025
|
+
label: `${b ? `${b}:` : ""}`
|
|
1042
1026
|
}, d, $e), {
|
|
1043
1027
|
default() {
|
|
1044
1028
|
return qe.runtimeAdapter.formComponentRenderer({
|
|
@@ -1047,7 +1031,7 @@ class br {
|
|
|
1047
1031
|
baseModel: i,
|
|
1048
1032
|
placeholder: S,
|
|
1049
1033
|
componentSlots: Ue,
|
|
1050
|
-
props:
|
|
1034
|
+
props: m
|
|
1051
1035
|
});
|
|
1052
1036
|
},
|
|
1053
1037
|
...a
|
|
@@ -1063,11 +1047,11 @@ class br {
|
|
|
1063
1047
|
...e.grid
|
|
1064
1048
|
}, s = w.getGroupContainer(this);
|
|
1065
1049
|
let n = e.show;
|
|
1066
|
-
return n === void 0 && (n = !0),
|
|
1050
|
+
return n === void 0 && (n = !0), y("div", {
|
|
1067
1051
|
style: i
|
|
1068
|
-
}, [n &&
|
|
1052
|
+
}, [n && y(s, {
|
|
1069
1053
|
schema: e
|
|
1070
|
-
},
|
|
1054
|
+
}, br(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
|
|
1071
1055
|
default: () => [r]
|
|
1072
1056
|
})]);
|
|
1073
1057
|
}
|
|
@@ -1078,7 +1062,7 @@ class br {
|
|
|
1078
1062
|
code: "0001",
|
|
1079
1063
|
message: "异步默认值数据正在处理中,请您耐心等待... "
|
|
1080
1064
|
});
|
|
1081
|
-
(i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(
|
|
1065
|
+
(i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(I(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
|
|
1082
1066
|
}
|
|
1083
1067
|
deleteListItem(e, r) {
|
|
1084
1068
|
this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
|
|
@@ -1093,32 +1077,32 @@ class br {
|
|
|
1093
1077
|
let s = e.show;
|
|
1094
1078
|
s === void 0 && (s = !0);
|
|
1095
1079
|
const n = w.getListContainer(this), a = w.getListItemContainer(this);
|
|
1096
|
-
return
|
|
1080
|
+
return y("div", {
|
|
1097
1081
|
style: r
|
|
1098
|
-
}, [s &&
|
|
1082
|
+
}, [s && y(n, {
|
|
1099
1083
|
schema: e
|
|
1100
1084
|
}, {
|
|
1101
1085
|
default() {
|
|
1102
|
-
return i.model.value[e.field].map((l, c) =>
|
|
1086
|
+
return i.model.value[e.field].map((l, c) => y(a, null, {
|
|
1103
1087
|
default() {
|
|
1104
1088
|
return e.children.map((d) => i.runtimeItemProcessor(d, c, l, e));
|
|
1105
1089
|
},
|
|
1106
1090
|
delete({
|
|
1107
1091
|
container: d
|
|
1108
1092
|
} = {}) {
|
|
1109
|
-
var
|
|
1110
|
-
const p = d ??
|
|
1111
|
-
return Le(
|
|
1093
|
+
var m;
|
|
1094
|
+
const p = d ?? y("button", null, null);
|
|
1095
|
+
return Le(y(p, {
|
|
1112
1096
|
onClick: () => i.deleteListItem(e, c)
|
|
1113
|
-
}, null), [[De, ((
|
|
1097
|
+
}, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
|
|
1114
1098
|
}
|
|
1115
1099
|
}));
|
|
1116
1100
|
},
|
|
1117
1101
|
add({
|
|
1118
1102
|
container: l
|
|
1119
1103
|
} = {}) {
|
|
1120
|
-
const c = l ??
|
|
1121
|
-
return
|
|
1104
|
+
const c = l ?? y("button", null, [Ge("添加")]);
|
|
1105
|
+
return y(c, {
|
|
1122
1106
|
onClick: () => i.addListItem(e)
|
|
1123
1107
|
}, null);
|
|
1124
1108
|
}
|
|
@@ -1134,14 +1118,14 @@ class br {
|
|
|
1134
1118
|
gridColumn: "1 / -1",
|
|
1135
1119
|
gridAutoColumns: "1fr",
|
|
1136
1120
|
...this.grid
|
|
1137
|
-
}, r = this, i =
|
|
1138
|
-
return
|
|
1121
|
+
}, r = this, i = h(this.globalNativeFormOverride.props.Form, I((c = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : c.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, I((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = w.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
|
|
1122
|
+
return y(n, N(i, {
|
|
1139
1123
|
ref: this.formRef
|
|
1140
1124
|
}, {
|
|
1141
1125
|
[a]: this.model.value
|
|
1142
1126
|
}), {
|
|
1143
1127
|
default() {
|
|
1144
|
-
return
|
|
1128
|
+
return y("div", {
|
|
1145
1129
|
style: e
|
|
1146
1130
|
}, [r.runtimeProcessor(r.schemas.value)]);
|
|
1147
1131
|
},
|
|
@@ -1160,7 +1144,7 @@ class f {
|
|
|
1160
1144
|
}
|
|
1161
1145
|
}
|
|
1162
1146
|
u(f, "presets");
|
|
1163
|
-
function
|
|
1147
|
+
function K({
|
|
1164
1148
|
parentSchema: t,
|
|
1165
1149
|
schema: e,
|
|
1166
1150
|
index: r
|
|
@@ -1170,7 +1154,7 @@ function W({
|
|
|
1170
1154
|
const vr = {
|
|
1171
1155
|
ArcoVue: {
|
|
1172
1156
|
getRuntimeField(t) {
|
|
1173
|
-
const e =
|
|
1157
|
+
const e = K(t);
|
|
1174
1158
|
return o.isFunction(e) ? {
|
|
1175
1159
|
field: e()
|
|
1176
1160
|
} : {
|
|
@@ -1215,7 +1199,7 @@ const vr = {
|
|
|
1215
1199
|
props: n
|
|
1216
1200
|
}) {
|
|
1217
1201
|
let a;
|
|
1218
|
-
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field],
|
|
1202
|
+
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
|
|
1219
1203
|
modelValue: a,
|
|
1220
1204
|
"onUpdate:modelValue": (l) => {
|
|
1221
1205
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1227,7 +1211,7 @@ const vr = {
|
|
|
1227
1211
|
},
|
|
1228
1212
|
validateForm(t) {
|
|
1229
1213
|
return new Promise((e, r) => {
|
|
1230
|
-
t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(
|
|
1214
|
+
t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))));
|
|
1231
1215
|
});
|
|
1232
1216
|
},
|
|
1233
1217
|
clearValidate(t) {
|
|
@@ -1237,7 +1221,7 @@ const vr = {
|
|
|
1237
1221
|
},
|
|
1238
1222
|
NutUI: {
|
|
1239
1223
|
getRuntimeField(t) {
|
|
1240
|
-
const e =
|
|
1224
|
+
const e = K(t);
|
|
1241
1225
|
return o.isFunction(e) ? {
|
|
1242
1226
|
prop: e()
|
|
1243
1227
|
} : {
|
|
@@ -1283,7 +1267,7 @@ const vr = {
|
|
|
1283
1267
|
props: n
|
|
1284
1268
|
}) {
|
|
1285
1269
|
let a;
|
|
1286
|
-
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field],
|
|
1270
|
+
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
|
|
1287
1271
|
modelValue: a,
|
|
1288
1272
|
"onUpdate:modelValue": (l) => {
|
|
1289
1273
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1299,7 +1283,7 @@ const vr = {
|
|
|
1299
1283
|
valid: i,
|
|
1300
1284
|
errors: s
|
|
1301
1285
|
}) => {
|
|
1302
|
-
i ? e(t.cleanFallbackFields(
|
|
1286
|
+
i ? e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))) : r(s);
|
|
1303
1287
|
});
|
|
1304
1288
|
});
|
|
1305
1289
|
},
|
|
@@ -1310,7 +1294,7 @@ const vr = {
|
|
|
1310
1294
|
},
|
|
1311
1295
|
NaiveUI: {
|
|
1312
1296
|
getRuntimeField(t) {
|
|
1313
|
-
const e =
|
|
1297
|
+
const e = K(t);
|
|
1314
1298
|
return o.isFunction(e) ? {
|
|
1315
1299
|
path: e()
|
|
1316
1300
|
} : {
|
|
@@ -1358,7 +1342,7 @@ const vr = {
|
|
|
1358
1342
|
props: n
|
|
1359
1343
|
}) {
|
|
1360
1344
|
let a;
|
|
1361
|
-
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field],
|
|
1345
|
+
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
|
|
1362
1346
|
value: a,
|
|
1363
1347
|
"onUpdate:value": (l) => {
|
|
1364
1348
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1370,7 +1354,7 @@ const vr = {
|
|
|
1370
1354
|
},
|
|
1371
1355
|
validateForm(t) {
|
|
1372
1356
|
return new Promise((e, r) => {
|
|
1373
|
-
t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(
|
|
1357
|
+
t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))));
|
|
1374
1358
|
});
|
|
1375
1359
|
},
|
|
1376
1360
|
clearValidate(t) {
|
|
@@ -1443,13 +1427,13 @@ u(M, "schemaPreset", {
|
|
|
1443
1427
|
}
|
|
1444
1428
|
}), // 基于基本功能提出基本预设
|
|
1445
1429
|
u(M, "placeholderPresetByComponentName", M.getPlaceholderPrefixPresetByComponentName());
|
|
1446
|
-
let
|
|
1447
|
-
const
|
|
1448
|
-
...
|
|
1430
|
+
let Z = M;
|
|
1431
|
+
const C = {
|
|
1432
|
+
...Z,
|
|
1449
1433
|
adapters: {
|
|
1450
1434
|
...vr
|
|
1451
1435
|
}
|
|
1452
|
-
},
|
|
1436
|
+
}, Ir = /* @__PURE__ */ ke({
|
|
1453
1437
|
props: {
|
|
1454
1438
|
setup: {
|
|
1455
1439
|
type: Function,
|
|
@@ -1457,11 +1441,11 @@ const I = {
|
|
|
1457
1441
|
}
|
|
1458
1442
|
},
|
|
1459
1443
|
setup(t) {
|
|
1460
|
-
const e = new
|
|
1444
|
+
const e = new gr(t.setup);
|
|
1461
1445
|
return () => e.exec();
|
|
1462
1446
|
}
|
|
1463
1447
|
});
|
|
1464
|
-
function
|
|
1448
|
+
function Cr(t) {
|
|
1465
1449
|
const e = new He(t);
|
|
1466
1450
|
return [
|
|
1467
1451
|
e.setup.bind(e),
|
|
@@ -1477,7 +1461,7 @@ function Ir(t) {
|
|
|
1477
1461
|
function Sr(t) {
|
|
1478
1462
|
f.presets = t;
|
|
1479
1463
|
}
|
|
1480
|
-
function
|
|
1464
|
+
function re(t, e) {
|
|
1481
1465
|
return e === "native" && Object.defineProperty(t, "name", {
|
|
1482
1466
|
value: `__proform_raw_${t.name}`,
|
|
1483
1467
|
writable: !0
|
|
@@ -1490,30 +1474,30 @@ function te(t, e) {
|
|
|
1490
1474
|
}), t;
|
|
1491
1475
|
}
|
|
1492
1476
|
function Or(t) {
|
|
1493
|
-
return
|
|
1477
|
+
return re(t, "native");
|
|
1494
1478
|
}
|
|
1495
1479
|
function Fr(t) {
|
|
1496
1480
|
return t.__proform_raw_object = !0, t;
|
|
1497
1481
|
}
|
|
1498
1482
|
function jr(t) {
|
|
1499
|
-
return
|
|
1483
|
+
return re(t, "onetime");
|
|
1500
1484
|
}
|
|
1501
1485
|
function wr(t) {
|
|
1502
1486
|
function e() {
|
|
1503
1487
|
return t;
|
|
1504
1488
|
}
|
|
1505
|
-
return
|
|
1489
|
+
return re(
|
|
1506
1490
|
e,
|
|
1507
1491
|
"structured_path_parsing_mark"
|
|
1508
1492
|
);
|
|
1509
1493
|
}
|
|
1510
1494
|
export {
|
|
1511
|
-
|
|
1495
|
+
Ir as ProForm,
|
|
1512
1496
|
Or as markNativeFunction,
|
|
1513
1497
|
Fr as markNativeObject,
|
|
1514
1498
|
jr as markOnetimeFunction,
|
|
1515
1499
|
wr as markStructuredPathParsing,
|
|
1516
|
-
|
|
1500
|
+
Cr as useForm,
|
|
1517
1501
|
Sr as useFormPresetConfigurer,
|
|
1518
|
-
|
|
1502
|
+
re as useModifiers
|
|
1519
1503
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { AnyFunction } from "../../types";
|
|
2
3
|
import { TrackEffectMeta } from "../../types/effectTypes";
|
|
3
4
|
export default class Effect {
|
|
4
5
|
effects: Set<Function>;
|
|
6
|
+
tempClonedEffects: Set<Function>;
|
|
5
7
|
identifierMap: Map<any, any>;
|
|
8
|
+
timer: NodeJS.Timeout;
|
|
6
9
|
constructor();
|
|
7
10
|
clearEffects(): void;
|
|
8
11
|
triggerEffects(): void;
|