@harbor-design/proform 1.3.12 → 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
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 Pe, nextTick as P, isRef as q, watch as _, isReactive as U, toRaw 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);
|
|
@@ -80,7 +80,7 @@ function h(t, ...e) {
|
|
|
80
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")
|
|
@@ -138,7 +138,7 @@ class He {
|
|
|
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) {
|
|
@@ -177,7 +177,7 @@ class He {
|
|
|
177
177
|
const r = _(
|
|
178
178
|
() => e.value,
|
|
179
179
|
() => {
|
|
180
|
-
h(this.runtimeCore.shared, e.value),
|
|
180
|
+
h(this.runtimeCore.shared, e.value), P(() => {
|
|
181
181
|
r();
|
|
182
182
|
});
|
|
183
183
|
},
|
|
@@ -190,7 +190,7 @@ class He {
|
|
|
190
190
|
const r = _(
|
|
191
191
|
() => e,
|
|
192
192
|
() => {
|
|
193
|
-
h(this.runtimeCore.shared, e),
|
|
193
|
+
h(this.runtimeCore.shared, e), P(() => {
|
|
194
194
|
r();
|
|
195
195
|
});
|
|
196
196
|
},
|
|
@@ -200,7 +200,7 @@ class He {
|
|
|
200
200
|
}
|
|
201
201
|
);
|
|
202
202
|
} else
|
|
203
|
-
h(this.runtimeCore.shared, e)
|
|
203
|
+
h(this.runtimeCore.shared, e);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
subscribeModel(e) {
|
|
@@ -225,7 +225,7 @@ class He {
|
|
|
225
225
|
}
|
|
226
226
|
resetModel() {
|
|
227
227
|
var e;
|
|
228
|
-
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value =
|
|
228
|
+
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
|
|
229
229
|
this.runtimeCore.processor.stableModel
|
|
230
230
|
), this.readonlyReactiveModel.value = Pe(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
231
231
|
}
|
|
@@ -233,7 +233,9 @@ class He {
|
|
|
233
233
|
class Y {
|
|
234
234
|
constructor() {
|
|
235
235
|
u(this, "effects", /* @__PURE__ */ new Set());
|
|
236
|
+
u(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
236
237
|
u(this, "identifierMap", /* @__PURE__ */ new Map());
|
|
238
|
+
u(this, "timer");
|
|
237
239
|
}
|
|
238
240
|
clearEffects() {
|
|
239
241
|
this.effects.clear();
|
|
@@ -247,7 +249,7 @@ class Y {
|
|
|
247
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);
|
|
248
250
|
}
|
|
249
251
|
}
|
|
250
|
-
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")(),
|
|
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;
|
|
251
253
|
function Ze(t) {
|
|
252
254
|
var e = Xe.call(t, V), r = t[V];
|
|
253
255
|
try {
|
|
@@ -262,9 +264,9 @@ var Je = Object.prototype, Qe = Je.toString;
|
|
|
262
264
|
function Ae(t) {
|
|
263
265
|
return Qe.call(t);
|
|
264
266
|
}
|
|
265
|
-
var et = "[object Null]", tt = "[object Undefined]",
|
|
267
|
+
var et = "[object Null]", tt = "[object Undefined]", Ie = E ? E.toStringTag : void 0;
|
|
266
268
|
function we(t) {
|
|
267
|
-
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);
|
|
268
270
|
}
|
|
269
271
|
function rt(t) {
|
|
270
272
|
return t != null && typeof t == "object";
|
|
@@ -278,7 +280,7 @@ function st(t, e) {
|
|
|
278
280
|
s[r] = e(t[r], r, t);
|
|
279
281
|
return s;
|
|
280
282
|
}
|
|
281
|
-
var A = Array.isArray, nt = 1 / 0,
|
|
283
|
+
var A = Array.isArray, nt = 1 / 0, Ce = E ? E.prototype : void 0, Se = Ce ? Ce.toString : void 0;
|
|
282
284
|
function Me(t) {
|
|
283
285
|
if (typeof t == "string")
|
|
284
286
|
return t;
|
|
@@ -321,21 +323,21 @@ function ht(t) {
|
|
|
321
323
|
}
|
|
322
324
|
return "";
|
|
323
325
|
}
|
|
324
|
-
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(
|
|
325
327
|
"^" + vt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
326
328
|
);
|
|
327
|
-
function
|
|
329
|
+
function It(t) {
|
|
328
330
|
if (!G(t) || ft(t))
|
|
329
331
|
return !1;
|
|
330
332
|
var e = ct(t) ? Pt : yt;
|
|
331
333
|
return e.test(ht(t));
|
|
332
334
|
}
|
|
333
|
-
function
|
|
335
|
+
function Ct(t, e) {
|
|
334
336
|
return t == null ? void 0 : t[e];
|
|
335
337
|
}
|
|
336
338
|
function ee(t, e) {
|
|
337
|
-
var r =
|
|
338
|
-
return
|
|
339
|
+
var r = Ct(t, e);
|
|
340
|
+
return It(r) ? r : void 0;
|
|
339
341
|
}
|
|
340
342
|
var Fe = function() {
|
|
341
343
|
try {
|
|
@@ -356,20 +358,20 @@ function jt(t, e, r) {
|
|
|
356
358
|
writable: !0
|
|
357
359
|
}) : t[e] = r;
|
|
358
360
|
}
|
|
359
|
-
function
|
|
361
|
+
function xe(t, e) {
|
|
360
362
|
return t === e || t !== t && e !== e;
|
|
361
363
|
}
|
|
362
364
|
var wt = Object.prototype, Mt = wt.hasOwnProperty;
|
|
363
|
-
function
|
|
365
|
+
function xt(t, e, r) {
|
|
364
366
|
var i = t[e];
|
|
365
|
-
(!(Mt.call(t, e) &&
|
|
367
|
+
(!(Mt.call(t, e) && xe(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
|
|
366
368
|
}
|
|
367
|
-
var
|
|
369
|
+
var Et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
|
|
368
370
|
function $t(t, e) {
|
|
369
371
|
if (A(t))
|
|
370
372
|
return !1;
|
|
371
373
|
var r = typeof t;
|
|
372
|
-
return r == "number" || r == "symbol" || r == "boolean" || t == null || Q(t) ? !0 : Rt.test(t) || !
|
|
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);
|
|
373
375
|
}
|
|
374
376
|
var T = ee(Object, "create");
|
|
375
377
|
function Vt() {
|
|
@@ -415,7 +417,7 @@ function Ht() {
|
|
|
415
417
|
}
|
|
416
418
|
function B(t, e) {
|
|
417
419
|
for (var r = t.length; r--; )
|
|
418
|
-
if (
|
|
420
|
+
if (xe(t[r][0], e))
|
|
419
421
|
return r;
|
|
420
422
|
return -1;
|
|
421
423
|
}
|
|
@@ -522,7 +524,7 @@ var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=
|
|
|
522
524
|
function fr(t) {
|
|
523
525
|
return t == null ? "" : Me(t);
|
|
524
526
|
}
|
|
525
|
-
function
|
|
527
|
+
function Ee(t, e) {
|
|
526
528
|
return A(t) ? t : $t(t, e) ? [t] : cr(fr(t));
|
|
527
529
|
}
|
|
528
530
|
var dr = 1 / 0;
|
|
@@ -533,7 +535,7 @@ function Re(t) {
|
|
|
533
535
|
return e == "0" && 1 / t == -dr ? "-0" : e;
|
|
534
536
|
}
|
|
535
537
|
function pr(t, e) {
|
|
536
|
-
e =
|
|
538
|
+
e = Ee(e, t);
|
|
537
539
|
for (var r = 0, i = e.length; t != null && r < i; )
|
|
538
540
|
t = t[Re(e[r++])];
|
|
539
541
|
return r && r == i ? t : void 0;
|
|
@@ -545,7 +547,7 @@ function L(t, e, r) {
|
|
|
545
547
|
function hr(t, e, r, i) {
|
|
546
548
|
if (!G(t))
|
|
547
549
|
return t;
|
|
548
|
-
e =
|
|
550
|
+
e = Ee(e, t);
|
|
549
551
|
for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
|
|
550
552
|
var c = Re(e[s]), d = r;
|
|
551
553
|
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
@@ -554,7 +556,7 @@ function hr(t, e, r, i) {
|
|
|
554
556
|
var p = l[c];
|
|
555
557
|
d = i ? i(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
|
|
556
558
|
}
|
|
557
|
-
|
|
559
|
+
xt(l, c, d), l = l[c];
|
|
558
560
|
}
|
|
559
561
|
return t;
|
|
560
562
|
}
|
|
@@ -569,8 +571,8 @@ class mr {
|
|
|
569
571
|
u(this, "getRuntimeMeta");
|
|
570
572
|
u(this, "stableSchemas", []);
|
|
571
573
|
u(this, "stableModel", {});
|
|
572
|
-
u(this, "schemaPreset",
|
|
573
|
-
u(this, "componentPropsPreset",
|
|
574
|
+
u(this, "schemaPreset", C.schemaPreset);
|
|
575
|
+
u(this, "componentPropsPreset", C.componentPropsPreset);
|
|
574
576
|
u(this, "stableUpdaterProcessProgress");
|
|
575
577
|
u(this, "stableUpdaterTimes", 0);
|
|
576
578
|
u(this, "schemaEffect", new Y());
|
|
@@ -616,7 +618,7 @@ class mr {
|
|
|
616
618
|
// 派生过程,用于外部应用
|
|
617
619
|
parseSchemas(e, r) {
|
|
618
620
|
o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
|
|
619
|
-
|
|
621
|
+
I(e)
|
|
620
622
|
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, r);
|
|
621
623
|
}
|
|
622
624
|
parseStable(e) {
|
|
@@ -630,7 +632,7 @@ class mr {
|
|
|
630
632
|
// 对于稳定初始化更新的抽象
|
|
631
633
|
stableUpdater(e = []) {
|
|
632
634
|
if (e.every(Boolean)) {
|
|
633
|
-
const r =
|
|
635
|
+
const r = x(this.processedSchemas.value);
|
|
634
636
|
!o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
|
|
635
637
|
length: r.length
|
|
636
638
|
}).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
|
|
@@ -646,14 +648,14 @@ class mr {
|
|
|
646
648
|
const c = l.index, d = l.key, p = l.keyIndex;
|
|
647
649
|
if (o.isUndefined(l.stable))
|
|
648
650
|
return;
|
|
649
|
-
const m = s.parseStable(l.stable),
|
|
651
|
+
const m = s.parseStable(l.stable), g = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
|
|
650
652
|
let v = m;
|
|
651
653
|
if (o.isProcessInprogress(v) || (n[p] = !0), i) {
|
|
652
|
-
const
|
|
653
|
-
|
|
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);
|
|
654
656
|
} else {
|
|
655
|
-
const
|
|
656
|
-
|
|
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);
|
|
657
659
|
}
|
|
658
660
|
}
|
|
659
661
|
}
|
|
@@ -707,8 +709,8 @@ class mr {
|
|
|
707
709
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
708
710
|
this.defaultValueInprogressMap.values()
|
|
709
711
|
).every((m) => {
|
|
710
|
-
var
|
|
711
|
-
return !((
|
|
712
|
+
var g;
|
|
713
|
+
return !((g = m == null ? void 0 : m.includes) != null && g.call(m, "undefined"));
|
|
712
714
|
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
713
715
|
d();
|
|
714
716
|
})) : c(p);
|
|
@@ -723,8 +725,8 @@ class mr {
|
|
|
723
725
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
724
726
|
this.defaultValueInprogressMap.values()
|
|
725
727
|
).every((m) => {
|
|
726
|
-
var
|
|
727
|
-
return !((
|
|
728
|
+
var g;
|
|
729
|
+
return !((g = m == null ? void 0 : m.includes) != null && g.call(m, "undefined"));
|
|
728
730
|
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
729
731
|
d();
|
|
730
732
|
})) : c(p);
|
|
@@ -826,7 +828,7 @@ class mr {
|
|
|
826
828
|
modelProcessor(e) {
|
|
827
829
|
e.map(
|
|
828
830
|
(r) => this.createModel(r, this.processedModel.value)
|
|
829
|
-
), 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());
|
|
830
832
|
}
|
|
831
833
|
setModel(e, r, i) {
|
|
832
834
|
o.isFunction(r) ? D(e, r(), i) : e[r] = i;
|
|
@@ -878,34 +880,34 @@ class yr {
|
|
|
878
880
|
}
|
|
879
881
|
getRuntimeField(e) {
|
|
880
882
|
var s;
|
|
881
|
-
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)];
|
|
882
884
|
return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
|
|
883
885
|
}
|
|
884
886
|
getRuntimeRequired(e) {
|
|
885
887
|
var s;
|
|
886
|
-
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)];
|
|
887
889
|
return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
|
|
888
890
|
}
|
|
889
891
|
getFormModelPropName() {
|
|
890
892
|
var i;
|
|
891
|
-
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)];
|
|
892
894
|
return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
|
|
893
895
|
}
|
|
894
896
|
formComponentRenderer(e) {
|
|
895
897
|
var s;
|
|
896
|
-
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)];
|
|
897
899
|
return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
|
|
898
900
|
}
|
|
899
901
|
clearValidate(e) {
|
|
900
902
|
var s;
|
|
901
|
-
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)];
|
|
902
904
|
return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
|
|
903
905
|
}
|
|
904
906
|
}
|
|
905
|
-
function
|
|
907
|
+
function br(t) {
|
|
906
908
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
|
|
907
909
|
}
|
|
908
|
-
class
|
|
910
|
+
class gr {
|
|
909
911
|
constructor(e) {
|
|
910
912
|
u(this, "schemas", z([]));
|
|
911
913
|
u(this, "model", z({}));
|
|
@@ -956,7 +958,7 @@ class br {
|
|
|
956
958
|
}
|
|
957
959
|
getRuntimeMeta() {
|
|
958
960
|
return {
|
|
959
|
-
model:
|
|
961
|
+
model: x(I(this.model.value)),
|
|
960
962
|
reactiveModel: this.model.value,
|
|
961
963
|
shared: this.shared,
|
|
962
964
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
@@ -985,33 +987,33 @@ class br {
|
|
|
985
987
|
};
|
|
986
988
|
}
|
|
987
989
|
runtimeItemProcessor(e, r, i = this.model.value, s) {
|
|
988
|
-
var ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ye,
|
|
989
|
-
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);
|
|
990
992
|
if (!n)
|
|
991
993
|
return;
|
|
992
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);
|
|
993
|
-
const a = h(
|
|
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 = {
|
|
994
996
|
display: "grid",
|
|
995
997
|
gridColumn: "1 / -1",
|
|
996
998
|
...e.grid
|
|
997
|
-
}, c = h(
|
|
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({
|
|
998
1000
|
schema: e,
|
|
999
1001
|
parentSchema: s,
|
|
1000
1002
|
index: r
|
|
1001
|
-
}), p = n.name, m = e.componentProps ?? {},
|
|
1003
|
+
}), p = n.name, m = e.componentProps ?? {}, g = C.placeholderPresetByComponentName;
|
|
1002
1004
|
let S = e.placeholder, v = e.show;
|
|
1003
1005
|
v === void 0 && (v = !0);
|
|
1004
|
-
let
|
|
1005
|
-
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) {
|
|
1006
1008
|
let $ = "请输入";
|
|
1007
|
-
o.isUndefined(p) ? S = `${$}${
|
|
1008
|
-
|
|
1009
|
-
p.toLowerCase().includes(_e.toLowerCase()) && ($ =
|
|
1010
|
-
}), 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}`);
|
|
1011
1013
|
}
|
|
1012
1014
|
const $e = this.runtimeAdapter.getRuntimeRequired({
|
|
1013
1015
|
...e,
|
|
1014
|
-
label:
|
|
1016
|
+
label: b
|
|
1015
1017
|
}), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
|
|
1016
1018
|
return y("div", {
|
|
1017
1019
|
style: l
|
|
@@ -1020,7 +1022,7 @@ class br {
|
|
|
1020
1022
|
}, {
|
|
1021
1023
|
default() {
|
|
1022
1024
|
return v && y(Ne, N(c, {
|
|
1023
|
-
label: `${
|
|
1025
|
+
label: `${b ? `${b}:` : ""}`
|
|
1024
1026
|
}, d, $e), {
|
|
1025
1027
|
default() {
|
|
1026
1028
|
return qe.runtimeAdapter.formComponentRenderer({
|
|
@@ -1049,7 +1051,7 @@ class br {
|
|
|
1049
1051
|
style: i
|
|
1050
1052
|
}, [n && y(s, {
|
|
1051
1053
|
schema: e
|
|
1052
|
-
},
|
|
1054
|
+
}, br(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
|
|
1053
1055
|
default: () => [r]
|
|
1054
1056
|
})]);
|
|
1055
1057
|
}
|
|
@@ -1060,7 +1062,7 @@ class br {
|
|
|
1060
1062
|
code: "0001",
|
|
1061
1063
|
message: "异步默认值数据正在处理中,请您耐心等待... "
|
|
1062
1064
|
});
|
|
1063
|
-
(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);
|
|
1064
1066
|
}
|
|
1065
1067
|
deleteListItem(e, r) {
|
|
1066
1068
|
this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
|
|
@@ -1116,7 +1118,7 @@ class br {
|
|
|
1116
1118
|
gridColumn: "1 / -1",
|
|
1117
1119
|
gridAutoColumns: "1fr",
|
|
1118
1120
|
...this.grid
|
|
1119
|
-
}, r = this, i = h(this.globalNativeFormOverride.props.Form,
|
|
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();
|
|
1120
1122
|
return y(n, N(i, {
|
|
1121
1123
|
ref: this.formRef
|
|
1122
1124
|
}, {
|
|
@@ -1209,7 +1211,7 @@ const vr = {
|
|
|
1209
1211
|
},
|
|
1210
1212
|
validateForm(t) {
|
|
1211
1213
|
return new Promise((e, r) => {
|
|
1212
|
-
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))));
|
|
1213
1215
|
});
|
|
1214
1216
|
},
|
|
1215
1217
|
clearValidate(t) {
|
|
@@ -1281,7 +1283,7 @@ const vr = {
|
|
|
1281
1283
|
valid: i,
|
|
1282
1284
|
errors: s
|
|
1283
1285
|
}) => {
|
|
1284
|
-
i ? e(t.cleanFallbackFields(
|
|
1286
|
+
i ? e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))) : r(s);
|
|
1285
1287
|
});
|
|
1286
1288
|
});
|
|
1287
1289
|
},
|
|
@@ -1352,7 +1354,7 @@ const vr = {
|
|
|
1352
1354
|
},
|
|
1353
1355
|
validateForm(t) {
|
|
1354
1356
|
return new Promise((e, r) => {
|
|
1355
|
-
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))));
|
|
1356
1358
|
});
|
|
1357
1359
|
},
|
|
1358
1360
|
clearValidate(t) {
|
|
@@ -1426,12 +1428,12 @@ u(M, "schemaPreset", {
|
|
|
1426
1428
|
}), // 基于基本功能提出基本预设
|
|
1427
1429
|
u(M, "placeholderPresetByComponentName", M.getPlaceholderPrefixPresetByComponentName());
|
|
1428
1430
|
let Z = M;
|
|
1429
|
-
const
|
|
1431
|
+
const C = {
|
|
1430
1432
|
...Z,
|
|
1431
1433
|
adapters: {
|
|
1432
1434
|
...vr
|
|
1433
1435
|
}
|
|
1434
|
-
},
|
|
1436
|
+
}, Ir = /* @__PURE__ */ ke({
|
|
1435
1437
|
props: {
|
|
1436
1438
|
setup: {
|
|
1437
1439
|
type: Function,
|
|
@@ -1439,11 +1441,11 @@ const I = {
|
|
|
1439
1441
|
}
|
|
1440
1442
|
},
|
|
1441
1443
|
setup(t) {
|
|
1442
|
-
const e = new
|
|
1444
|
+
const e = new gr(t.setup);
|
|
1443
1445
|
return () => e.exec();
|
|
1444
1446
|
}
|
|
1445
1447
|
});
|
|
1446
|
-
function
|
|
1448
|
+
function Cr(t) {
|
|
1447
1449
|
const e = new He(t);
|
|
1448
1450
|
return [
|
|
1449
1451
|
e.setup.bind(e),
|
|
@@ -1490,12 +1492,12 @@ function wr(t) {
|
|
|
1490
1492
|
);
|
|
1491
1493
|
}
|
|
1492
1494
|
export {
|
|
1493
|
-
|
|
1495
|
+
Ir as ProForm,
|
|
1494
1496
|
Or as markNativeFunction,
|
|
1495
1497
|
Fr as markNativeObject,
|
|
1496
1498
|
jr as markOnetimeFunction,
|
|
1497
1499
|
wr as markStructuredPathParsing,
|
|
1498
|
-
|
|
1500
|
+
Cr as useForm,
|
|
1499
1501
|
Sr as useFormPresetConfigurer,
|
|
1500
1502
|
re as useModifiers
|
|
1501
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;
|