@harbor-design/proform 1.3.11 → 1.3.12
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 +101 -119
- 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 E, 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,15 +69,15 @@ 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
83
|
function C(t) {
|
|
@@ -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,7 +134,7 @@ 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;
|
|
@@ -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), this.runtimeCore.processor.schemaEffect.triggerEffects(), 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), this.runtimeCore.processor.schemaEffect.triggerEffects(), 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), this.runtimeCore.processor.schemaEffect.triggerEffects();
|
|
213
204
|
});
|
|
214
205
|
}
|
|
215
206
|
subscribeModel(e) {
|
|
@@ -236,10 +227,10 @@ class He {
|
|
|
236
227
|
var e;
|
|
237
228
|
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = C(
|
|
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());
|
|
245
236
|
u(this, "identifierMap", /* @__PURE__ */ new Map());
|
|
@@ -256,7 +247,7 @@ class X {
|
|
|
256
247
|
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
248
|
}
|
|
258
249
|
}
|
|
259
|
-
var We = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self,
|
|
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")(), x = J.Symbol, je = Object.prototype, Xe = je.hasOwnProperty, Ye = je.toString, V = x ? x.toStringTag : void 0;
|
|
260
251
|
function Ze(t) {
|
|
261
252
|
var e = Xe.call(t, V), r = t[V];
|
|
262
253
|
try {
|
|
@@ -279,7 +270,7 @@ function rt(t) {
|
|
|
279
270
|
return t != null && typeof t == "object";
|
|
280
271
|
}
|
|
281
272
|
var it = "[object Symbol]";
|
|
282
|
-
function
|
|
273
|
+
function Q(t) {
|
|
283
274
|
return typeof t == "symbol" || rt(t) && we(t) == it;
|
|
284
275
|
}
|
|
285
276
|
function st(t, e) {
|
|
@@ -287,13 +278,13 @@ function st(t, e) {
|
|
|
287
278
|
s[r] = e(t[r], r, t);
|
|
288
279
|
return s;
|
|
289
280
|
}
|
|
290
|
-
var
|
|
281
|
+
var A = Array.isArray, nt = 1 / 0, Ie = x ? x.prototype : void 0, Se = Ie ? Ie.toString : void 0;
|
|
291
282
|
function Me(t) {
|
|
292
283
|
if (typeof t == "string")
|
|
293
284
|
return t;
|
|
294
|
-
if (
|
|
285
|
+
if (A(t))
|
|
295
286
|
return st(t, Me) + "";
|
|
296
|
-
if (
|
|
287
|
+
if (Q(t))
|
|
297
288
|
return Se ? Se.call(t) : "";
|
|
298
289
|
var e = t + "";
|
|
299
290
|
return e == "0" && 1 / t == -nt ? "-0" : e;
|
|
@@ -309,8 +300,8 @@ function ct(t) {
|
|
|
309
300
|
var e = we(t);
|
|
310
301
|
return e == at || e == lt || e == ot || e == ut;
|
|
311
302
|
}
|
|
312
|
-
var
|
|
313
|
-
var t = /[^.]+$/.exec(
|
|
303
|
+
var W = J["__core-js_shared__"], Oe = function() {
|
|
304
|
+
var t = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
|
|
314
305
|
return t ? "Symbol(src)_1." + t : "";
|
|
315
306
|
}();
|
|
316
307
|
function ft(t) {
|
|
@@ -342,13 +333,13 @@ function Ct(t) {
|
|
|
342
333
|
function It(t, e) {
|
|
343
334
|
return t == null ? void 0 : t[e];
|
|
344
335
|
}
|
|
345
|
-
function
|
|
336
|
+
function ee(t, e) {
|
|
346
337
|
var r = It(t, e);
|
|
347
338
|
return Ct(r) ? r : void 0;
|
|
348
339
|
}
|
|
349
340
|
var Fe = function() {
|
|
350
341
|
try {
|
|
351
|
-
var t =
|
|
342
|
+
var t = ee(Object, "defineProperty");
|
|
352
343
|
return t({}, "", {}), t;
|
|
353
344
|
} catch {
|
|
354
345
|
}
|
|
@@ -375,12 +366,12 @@ function Et(t, e, r) {
|
|
|
375
366
|
}
|
|
376
367
|
var xt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
|
|
377
368
|
function $t(t, e) {
|
|
378
|
-
if (
|
|
369
|
+
if (A(t))
|
|
379
370
|
return !1;
|
|
380
371
|
var r = typeof t;
|
|
381
|
-
return r == "number" || r == "symbol" || r == "boolean" || t == null ||
|
|
372
|
+
return r == "number" || r == "symbol" || r == "boolean" || t == null || Q(t) ? !0 : Rt.test(t) || !xt.test(t) || e != null && t in Object(e);
|
|
382
373
|
}
|
|
383
|
-
var T =
|
|
374
|
+
var T = ee(Object, "create");
|
|
384
375
|
function Vt() {
|
|
385
376
|
this.__data__ = T ? T(null) : {}, this.size = 0;
|
|
386
377
|
}
|
|
@@ -459,7 +450,7 @@ R.prototype.delete = Xt;
|
|
|
459
450
|
R.prototype.get = Yt;
|
|
460
451
|
R.prototype.has = Zt;
|
|
461
452
|
R.prototype.set = Jt;
|
|
462
|
-
var Qt =
|
|
453
|
+
var Qt = ee(J, "Map");
|
|
463
454
|
function At() {
|
|
464
455
|
this.size = 0, this.__data__ = {
|
|
465
456
|
hash: new F(),
|
|
@@ -502,7 +493,7 @@ j.prototype.get = rr;
|
|
|
502
493
|
j.prototype.has = ir;
|
|
503
494
|
j.prototype.set = sr;
|
|
504
495
|
var nr = "Expected a function";
|
|
505
|
-
function
|
|
496
|
+
function te(t, e) {
|
|
506
497
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
507
498
|
throw new TypeError(nr);
|
|
508
499
|
var r = function() {
|
|
@@ -512,12 +503,12 @@ function ee(t, e) {
|
|
|
512
503
|
var a = t.apply(this, i);
|
|
513
504
|
return r.cache = n.set(s, a) || n, a;
|
|
514
505
|
};
|
|
515
|
-
return r.cache = new (
|
|
506
|
+
return r.cache = new (te.Cache || j)(), r;
|
|
516
507
|
}
|
|
517
|
-
|
|
508
|
+
te.Cache = j;
|
|
518
509
|
var or = 500;
|
|
519
510
|
function ar(t) {
|
|
520
|
-
var e =
|
|
511
|
+
var e = te(t, function(i) {
|
|
521
512
|
return r.size === or && r.clear(), i;
|
|
522
513
|
}), r = e.cache;
|
|
523
514
|
return e;
|
|
@@ -532,11 +523,11 @@ function fr(t) {
|
|
|
532
523
|
return t == null ? "" : Me(t);
|
|
533
524
|
}
|
|
534
525
|
function xe(t, e) {
|
|
535
|
-
return
|
|
526
|
+
return A(t) ? t : $t(t, e) ? [t] : cr(fr(t));
|
|
536
527
|
}
|
|
537
528
|
var dr = 1 / 0;
|
|
538
529
|
function Re(t) {
|
|
539
|
-
if (typeof t == "string" ||
|
|
530
|
+
if (typeof t == "string" || Q(t))
|
|
540
531
|
return t;
|
|
541
532
|
var e = t + "";
|
|
542
533
|
return e == "0" && 1 / t == -dr ? "-0" : e;
|
|
@@ -582,8 +573,8 @@ class mr {
|
|
|
582
573
|
u(this, "componentPropsPreset", I.componentPropsPreset);
|
|
583
574
|
u(this, "stableUpdaterProcessProgress");
|
|
584
575
|
u(this, "stableUpdaterTimes", 0);
|
|
585
|
-
u(this, "schemaEffect", new
|
|
586
|
-
u(this, "defaultValueEffect", new
|
|
576
|
+
u(this, "schemaEffect", new Y());
|
|
577
|
+
u(this, "defaultValueEffect", new Y());
|
|
587
578
|
u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
588
579
|
u(this, "baseDefaultValueFunctionsLength");
|
|
589
580
|
u(this, "isModelInitialized", !0);
|
|
@@ -655,14 +646,14 @@ class mr {
|
|
|
655
646
|
const c = l.index, d = l.key, p = l.keyIndex;
|
|
656
647
|
if (o.isUndefined(l.stable))
|
|
657
648
|
return;
|
|
658
|
-
const
|
|
659
|
-
let v =
|
|
649
|
+
const m = s.parseStable(l.stable), b = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
|
|
650
|
+
let v = m;
|
|
660
651
|
if (o.isProcessInprogress(v) || (n[p] = !0), i) {
|
|
661
|
-
const
|
|
662
|
-
|
|
652
|
+
const g = s.processedSchemas.value[b][S][c][d];
|
|
653
|
+
g && o.isObject(g) && d !== "component" && (v = h(g, v)), s.processedSchemas.value[b][S][c][d] = v, s.stableUpdater(n);
|
|
663
654
|
} else {
|
|
664
|
-
const
|
|
665
|
-
|
|
655
|
+
const g = s.processedSchemas.value[c][d];
|
|
656
|
+
g && o.isObject(g) && d !== "component" && (v = h(g, v)), s.processedSchemas.value[c][d] = v, s.stableUpdater(n);
|
|
666
657
|
}
|
|
667
658
|
}
|
|
668
659
|
}
|
|
@@ -715,9 +706,9 @@ class mr {
|
|
|
715
706
|
return c(p);
|
|
716
707
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
717
708
|
this.defaultValueInprogressMap.values()
|
|
718
|
-
).every((
|
|
719
|
-
var
|
|
720
|
-
return !((
|
|
709
|
+
).every((m) => {
|
|
710
|
+
var b;
|
|
711
|
+
return !((b = m == null ? void 0 : m.includes) != null && b.call(m, "undefined"));
|
|
721
712
|
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
722
713
|
d();
|
|
723
714
|
})) : c(p);
|
|
@@ -731,9 +722,9 @@ class mr {
|
|
|
731
722
|
(p) => {
|
|
732
723
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
733
724
|
this.defaultValueInprogressMap.values()
|
|
734
|
-
).every((
|
|
735
|
-
var
|
|
736
|
-
return !((
|
|
725
|
+
).every((m) => {
|
|
726
|
+
var b;
|
|
727
|
+
return !((b = m == null ? void 0 : m.includes) != null && b.call(m, "undefined"));
|
|
737
728
|
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
738
729
|
d();
|
|
739
730
|
})) : c(p);
|
|
@@ -764,13 +755,13 @@ class mr {
|
|
|
764
755
|
}
|
|
765
756
|
promiseFieldParser(e, r, i, s) {
|
|
766
757
|
o.isPromise(e) ? e.then((n) => {
|
|
767
|
-
o.isString(n) && (n =
|
|
758
|
+
o.isString(n) && (n = X(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
768
759
|
data: n,
|
|
769
760
|
updater: r,
|
|
770
761
|
index: s.rootIndex,
|
|
771
762
|
parentMeta: s.parentMeta
|
|
772
763
|
}) : r(n);
|
|
773
|
-
}) : (o.isString(e) && (e =
|
|
764
|
+
}) : (o.isString(e) && (e = X(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
774
765
|
data: e,
|
|
775
766
|
updater: r,
|
|
776
767
|
index: s.rootIndex,
|
|
@@ -924,11 +915,11 @@ class br {
|
|
|
924
915
|
list: this.runtimeListProcessor.bind(this)
|
|
925
916
|
});
|
|
926
917
|
u(this, "formRef", z(null));
|
|
927
|
-
u(this, "hydrateEffect", new
|
|
928
|
-
u(this, "native",
|
|
918
|
+
u(this, "hydrateEffect", new Y());
|
|
919
|
+
u(this, "native", H({}));
|
|
929
920
|
u(this, "grid", {});
|
|
930
921
|
u(this, "runtime", {});
|
|
931
|
-
u(this, "globalNativeFormOverride",
|
|
922
|
+
u(this, "globalNativeFormOverride", H({
|
|
932
923
|
props: {
|
|
933
924
|
Form: {},
|
|
934
925
|
FormItem: {}
|
|
@@ -938,7 +929,7 @@ class br {
|
|
|
938
929
|
FormItem: {}
|
|
939
930
|
}
|
|
940
931
|
}));
|
|
941
|
-
u(this, "shared", {});
|
|
932
|
+
u(this, "shared", H({}));
|
|
942
933
|
this.setup = e, this.processor = new mr(this);
|
|
943
934
|
const r = this.setup(this);
|
|
944
935
|
if (this.ui = r.ui ?? f.presets.ui, this.runtimeAdapter = new yr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), q(r.schemas))
|
|
@@ -972,10 +963,7 @@ class br {
|
|
|
972
963
|
share: (r) => {
|
|
973
964
|
if (q(r)) {
|
|
974
965
|
const i = _(() => r.value, () => {
|
|
975
|
-
this.shared
|
|
976
|
-
...this.shared,
|
|
977
|
-
...r.value
|
|
978
|
-
}, P(() => {
|
|
966
|
+
h(this.shared, r.value), P(() => {
|
|
979
967
|
i();
|
|
980
968
|
});
|
|
981
969
|
}, {
|
|
@@ -984,10 +972,7 @@ class br {
|
|
|
984
972
|
});
|
|
985
973
|
} else if (U(r)) {
|
|
986
974
|
const i = _(() => r, () => {
|
|
987
|
-
this.shared
|
|
988
|
-
...this.shared,
|
|
989
|
-
...r
|
|
990
|
-
}, P(() => {
|
|
975
|
+
h(this.shared, r), P(() => {
|
|
991
976
|
i();
|
|
992
977
|
});
|
|
993
978
|
}, {
|
|
@@ -995,50 +980,47 @@ class br {
|
|
|
995
980
|
immediate: !0
|
|
996
981
|
});
|
|
997
982
|
} else
|
|
998
|
-
this.shared
|
|
999
|
-
...this.shared,
|
|
1000
|
-
...r
|
|
1001
|
-
};
|
|
983
|
+
h(this.shared, r);
|
|
1002
984
|
}
|
|
1003
985
|
};
|
|
1004
986
|
}
|
|
1005
987
|
runtimeItemProcessor(e, r, i = this.model.value, s) {
|
|
1006
|
-
var
|
|
988
|
+
var ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ye, ge, be, ve;
|
|
1007
989
|
const n = E(e.component);
|
|
1008
990
|
if (!n)
|
|
1009
991
|
return;
|
|
1010
|
-
(
|
|
1011
|
-
const a =
|
|
992
|
+
(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(C((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
994
|
display: "grid",
|
|
1013
995
|
gridColumn: "1 / -1",
|
|
1014
996
|
...e.grid
|
|
1015
|
-
}, c =
|
|
997
|
+
}, c = h(C((ye = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : ye.FormItem) ?? {}, (be = (ge = e.native) == null ? void 0 : ge.props) == null ? void 0 : be.FormItem), d = this.runtimeAdapter.getRuntimeField({
|
|
1016
998
|
schema: e,
|
|
1017
999
|
parentSchema: s,
|
|
1018
1000
|
index: r
|
|
1019
|
-
}), p = n.name,
|
|
1001
|
+
}), p = n.name, m = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
|
|
1020
1002
|
let S = e.placeholder, v = e.show;
|
|
1021
1003
|
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) && (
|
|
1004
|
+
let g = e.label ?? "", O;
|
|
1005
|
+
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (g = X((ve = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : ve.call(O, e.label ?? "", r + 1), "")), !S) {
|
|
1024
1006
|
let $ = "请输入";
|
|
1025
|
-
o.isUndefined(p) ? S = `${$}${
|
|
1026
|
-
|
|
1027
|
-
p.toLowerCase().includes(
|
|
1028
|
-
}), S = `${$}${
|
|
1007
|
+
o.isUndefined(p) ? S = `${$}${g}` : /* @ts-expect-error */ b[p.toLowerCase()] ? ($ = // @ts-expect-error
|
|
1008
|
+
b[p.toLowerCase()], S = `${$}${g}`) : (Object.keys(b).forEach((_e) => {
|
|
1009
|
+
p.toLowerCase().includes(_e.toLowerCase()) && ($ = b[_e]);
|
|
1010
|
+
}), S = `${$}${g}`);
|
|
1029
1011
|
}
|
|
1030
1012
|
const $e = this.runtimeAdapter.getRuntimeRequired({
|
|
1031
1013
|
...e,
|
|
1032
|
-
label:
|
|
1014
|
+
label: g
|
|
1033
1015
|
}), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
|
|
1034
|
-
return
|
|
1016
|
+
return y("div", {
|
|
1035
1017
|
style: l
|
|
1036
|
-
}, [
|
|
1018
|
+
}, [y(Ve, {
|
|
1037
1019
|
show: v
|
|
1038
1020
|
}, {
|
|
1039
1021
|
default() {
|
|
1040
|
-
return v &&
|
|
1041
|
-
label: `${
|
|
1022
|
+
return v && y(Ne, N(c, {
|
|
1023
|
+
label: `${g ? `${g}:` : ""}`
|
|
1042
1024
|
}, d, $e), {
|
|
1043
1025
|
default() {
|
|
1044
1026
|
return qe.runtimeAdapter.formComponentRenderer({
|
|
@@ -1047,7 +1029,7 @@ class br {
|
|
|
1047
1029
|
baseModel: i,
|
|
1048
1030
|
placeholder: S,
|
|
1049
1031
|
componentSlots: Ue,
|
|
1050
|
-
props:
|
|
1032
|
+
props: m
|
|
1051
1033
|
});
|
|
1052
1034
|
},
|
|
1053
1035
|
...a
|
|
@@ -1063,9 +1045,9 @@ class br {
|
|
|
1063
1045
|
...e.grid
|
|
1064
1046
|
}, s = w.getGroupContainer(this);
|
|
1065
1047
|
let n = e.show;
|
|
1066
|
-
return n === void 0 && (n = !0),
|
|
1048
|
+
return n === void 0 && (n = !0), y("div", {
|
|
1067
1049
|
style: i
|
|
1068
|
-
}, [n &&
|
|
1050
|
+
}, [n && y(s, {
|
|
1069
1051
|
schema: e
|
|
1070
1052
|
}, gr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
|
|
1071
1053
|
default: () => [r]
|
|
@@ -1093,32 +1075,32 @@ class br {
|
|
|
1093
1075
|
let s = e.show;
|
|
1094
1076
|
s === void 0 && (s = !0);
|
|
1095
1077
|
const n = w.getListContainer(this), a = w.getListItemContainer(this);
|
|
1096
|
-
return
|
|
1078
|
+
return y("div", {
|
|
1097
1079
|
style: r
|
|
1098
|
-
}, [s &&
|
|
1080
|
+
}, [s && y(n, {
|
|
1099
1081
|
schema: e
|
|
1100
1082
|
}, {
|
|
1101
1083
|
default() {
|
|
1102
|
-
return i.model.value[e.field].map((l, c) =>
|
|
1084
|
+
return i.model.value[e.field].map((l, c) => y(a, null, {
|
|
1103
1085
|
default() {
|
|
1104
1086
|
return e.children.map((d) => i.runtimeItemProcessor(d, c, l, e));
|
|
1105
1087
|
},
|
|
1106
1088
|
delete({
|
|
1107
1089
|
container: d
|
|
1108
1090
|
} = {}) {
|
|
1109
|
-
var
|
|
1110
|
-
const p = d ??
|
|
1111
|
-
return Le(
|
|
1091
|
+
var m;
|
|
1092
|
+
const p = d ?? y("button", null, null);
|
|
1093
|
+
return Le(y(p, {
|
|
1112
1094
|
onClick: () => i.deleteListItem(e, c)
|
|
1113
|
-
}, null), [[De, ((
|
|
1095
|
+
}, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
|
|
1114
1096
|
}
|
|
1115
1097
|
}));
|
|
1116
1098
|
},
|
|
1117
1099
|
add({
|
|
1118
1100
|
container: l
|
|
1119
1101
|
} = {}) {
|
|
1120
|
-
const c = l ??
|
|
1121
|
-
return
|
|
1102
|
+
const c = l ?? y("button", null, [Ge("添加")]);
|
|
1103
|
+
return y(c, {
|
|
1122
1104
|
onClick: () => i.addListItem(e)
|
|
1123
1105
|
}, null);
|
|
1124
1106
|
}
|
|
@@ -1134,14 +1116,14 @@ class br {
|
|
|
1134
1116
|
gridColumn: "1 / -1",
|
|
1135
1117
|
gridAutoColumns: "1fr",
|
|
1136
1118
|
...this.grid
|
|
1137
|
-
}, r = this, i =
|
|
1138
|
-
return
|
|
1119
|
+
}, r = this, i = h(this.globalNativeFormOverride.props.Form, C((c = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : c.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, C((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = w.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
|
|
1120
|
+
return y(n, N(i, {
|
|
1139
1121
|
ref: this.formRef
|
|
1140
1122
|
}, {
|
|
1141
1123
|
[a]: this.model.value
|
|
1142
1124
|
}), {
|
|
1143
1125
|
default() {
|
|
1144
|
-
return
|
|
1126
|
+
return y("div", {
|
|
1145
1127
|
style: e
|
|
1146
1128
|
}, [r.runtimeProcessor(r.schemas.value)]);
|
|
1147
1129
|
},
|
|
@@ -1160,7 +1142,7 @@ class f {
|
|
|
1160
1142
|
}
|
|
1161
1143
|
}
|
|
1162
1144
|
u(f, "presets");
|
|
1163
|
-
function
|
|
1145
|
+
function K({
|
|
1164
1146
|
parentSchema: t,
|
|
1165
1147
|
schema: e,
|
|
1166
1148
|
index: r
|
|
@@ -1170,7 +1152,7 @@ function W({
|
|
|
1170
1152
|
const vr = {
|
|
1171
1153
|
ArcoVue: {
|
|
1172
1154
|
getRuntimeField(t) {
|
|
1173
|
-
const e =
|
|
1155
|
+
const e = K(t);
|
|
1174
1156
|
return o.isFunction(e) ? {
|
|
1175
1157
|
field: e()
|
|
1176
1158
|
} : {
|
|
@@ -1215,7 +1197,7 @@ const vr = {
|
|
|
1215
1197
|
props: n
|
|
1216
1198
|
}) {
|
|
1217
1199
|
let a;
|
|
1218
|
-
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field],
|
|
1200
|
+
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
|
|
1219
1201
|
modelValue: a,
|
|
1220
1202
|
"onUpdate:modelValue": (l) => {
|
|
1221
1203
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1237,7 +1219,7 @@ const vr = {
|
|
|
1237
1219
|
},
|
|
1238
1220
|
NutUI: {
|
|
1239
1221
|
getRuntimeField(t) {
|
|
1240
|
-
const e =
|
|
1222
|
+
const e = K(t);
|
|
1241
1223
|
return o.isFunction(e) ? {
|
|
1242
1224
|
prop: e()
|
|
1243
1225
|
} : {
|
|
@@ -1283,7 +1265,7 @@ const vr = {
|
|
|
1283
1265
|
props: n
|
|
1284
1266
|
}) {
|
|
1285
1267
|
let a;
|
|
1286
|
-
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field],
|
|
1268
|
+
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
|
|
1287
1269
|
modelValue: a,
|
|
1288
1270
|
"onUpdate:modelValue": (l) => {
|
|
1289
1271
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1310,7 +1292,7 @@ const vr = {
|
|
|
1310
1292
|
},
|
|
1311
1293
|
NaiveUI: {
|
|
1312
1294
|
getRuntimeField(t) {
|
|
1313
|
-
const e =
|
|
1295
|
+
const e = K(t);
|
|
1314
1296
|
return o.isFunction(e) ? {
|
|
1315
1297
|
path: e()
|
|
1316
1298
|
} : {
|
|
@@ -1358,7 +1340,7 @@ const vr = {
|
|
|
1358
1340
|
props: n
|
|
1359
1341
|
}) {
|
|
1360
1342
|
let a;
|
|
1361
|
-
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field],
|
|
1343
|
+
return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
|
|
1362
1344
|
value: a,
|
|
1363
1345
|
"onUpdate:value": (l) => {
|
|
1364
1346
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1443,9 +1425,9 @@ u(M, "schemaPreset", {
|
|
|
1443
1425
|
}
|
|
1444
1426
|
}), // 基于基本功能提出基本预设
|
|
1445
1427
|
u(M, "placeholderPresetByComponentName", M.getPlaceholderPrefixPresetByComponentName());
|
|
1446
|
-
let
|
|
1428
|
+
let Z = M;
|
|
1447
1429
|
const I = {
|
|
1448
|
-
...
|
|
1430
|
+
...Z,
|
|
1449
1431
|
adapters: {
|
|
1450
1432
|
...vr
|
|
1451
1433
|
}
|
|
@@ -1477,7 +1459,7 @@ function Ir(t) {
|
|
|
1477
1459
|
function Sr(t) {
|
|
1478
1460
|
f.presets = t;
|
|
1479
1461
|
}
|
|
1480
|
-
function
|
|
1462
|
+
function re(t, e) {
|
|
1481
1463
|
return e === "native" && Object.defineProperty(t, "name", {
|
|
1482
1464
|
value: `__proform_raw_${t.name}`,
|
|
1483
1465
|
writable: !0
|
|
@@ -1490,19 +1472,19 @@ function te(t, e) {
|
|
|
1490
1472
|
}), t;
|
|
1491
1473
|
}
|
|
1492
1474
|
function Or(t) {
|
|
1493
|
-
return
|
|
1475
|
+
return re(t, "native");
|
|
1494
1476
|
}
|
|
1495
1477
|
function Fr(t) {
|
|
1496
1478
|
return t.__proform_raw_object = !0, t;
|
|
1497
1479
|
}
|
|
1498
1480
|
function jr(t) {
|
|
1499
|
-
return
|
|
1481
|
+
return re(t, "onetime");
|
|
1500
1482
|
}
|
|
1501
1483
|
function wr(t) {
|
|
1502
1484
|
function e() {
|
|
1503
1485
|
return t;
|
|
1504
1486
|
}
|
|
1505
|
-
return
|
|
1487
|
+
return re(
|
|
1506
1488
|
e,
|
|
1507
1489
|
"structured_path_parsing_mark"
|
|
1508
1490
|
);
|
|
@@ -1515,5 +1497,5 @@ export {
|
|
|
1515
1497
|
wr as markStructuredPathParsing,
|
|
1516
1498
|
Ir as useForm,
|
|
1517
1499
|
Sr as useFormPresetConfigurer,
|
|
1518
|
-
|
|
1500
|
+
re as useModifiers
|
|
1519
1501
|
};
|