@harbor-design/proform 1.4.15 → 1.4.16
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 +118 -118
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Ge = Object.defineProperty;
|
|
2
2
|
var Be = (r, e, t) => e in r ? Ge(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var l = (r, e, t) => (Be(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import { ref as H, readonly as
|
|
5
|
-
var Je = typeof global == "object" && global && global.Object === Object && global, Qe = typeof self == "object" && self && self.Object === Object && self,
|
|
4
|
+
import { ref as H, readonly as Oe, nextTick as S, isRef as T, watch as w, isReactive as z, watchEffect as B, toRaw as $, reactive as Z, createVNode as m, mergeProps as q, withDirectives as Ke, vShow as We, createTextVNode as Xe, isVNode as Ye, defineComponent as Ze } from "vue";
|
|
5
|
+
var Je = typeof global == "object" && global && global.Object === Object && global, Qe = typeof self == "object" && self && self.Object === Object && self, te = Je || Qe || Function("return this")(), M = te.Symbol, $e = Object.prototype, Ae = $e.hasOwnProperty, ke = $e.toString, U = M ? M.toStringTag : void 0;
|
|
6
6
|
function et(r) {
|
|
7
7
|
var e = Ae.call(r, U), t = r[U];
|
|
8
8
|
try {
|
|
@@ -17,53 +17,53 @@ var tt = Object.prototype, rt = tt.toString;
|
|
|
17
17
|
function it(r) {
|
|
18
18
|
return rt.call(r);
|
|
19
19
|
}
|
|
20
|
-
var st = "[object Null]", nt = "[object Undefined]",
|
|
21
|
-
function
|
|
22
|
-
return r == null ? r === void 0 ? nt : st :
|
|
20
|
+
var st = "[object Null]", nt = "[object Undefined]", we = M ? M.toStringTag : void 0;
|
|
21
|
+
function Me(r) {
|
|
22
|
+
return r == null ? r === void 0 ? nt : st : we && we in Object(r) ? et(r) : it(r);
|
|
23
23
|
}
|
|
24
24
|
function ot(r) {
|
|
25
25
|
return r != null && typeof r == "object";
|
|
26
26
|
}
|
|
27
27
|
var at = "[object Symbol]";
|
|
28
|
-
function
|
|
29
|
-
return typeof r == "symbol" || ot(r) &&
|
|
28
|
+
function re(r) {
|
|
29
|
+
return typeof r == "symbol" || ot(r) && Me(r) == at;
|
|
30
30
|
}
|
|
31
31
|
function lt(r, e) {
|
|
32
32
|
for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
|
|
33
33
|
s[t] = e(r[t], t, r);
|
|
34
34
|
return s;
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
function
|
|
36
|
+
var ie = Array.isArray, ut = 1 / 0, Fe = M ? M.prototype : void 0, je = Fe ? Fe.toString : void 0;
|
|
37
|
+
function Ve(r) {
|
|
38
38
|
if (typeof r == "string")
|
|
39
39
|
return r;
|
|
40
|
+
if (ie(r))
|
|
41
|
+
return lt(r, Ve) + "";
|
|
40
42
|
if (re(r))
|
|
41
|
-
return
|
|
42
|
-
if (te(r))
|
|
43
|
-
return Fe ? Fe.call(r) : "";
|
|
43
|
+
return je ? je.call(r) : "";
|
|
44
44
|
var e = r + "";
|
|
45
45
|
return e == "0" && 1 / r == -ut ? "-0" : e;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function K(r) {
|
|
48
48
|
var e = typeof r;
|
|
49
49
|
return r != null && (e == "object" || e == "function");
|
|
50
50
|
}
|
|
51
51
|
var ft = "[object AsyncFunction]", ct = "[object Function]", dt = "[object GeneratorFunction]", ht = "[object Proxy]";
|
|
52
|
-
function
|
|
53
|
-
if (!
|
|
52
|
+
function D(r) {
|
|
53
|
+
if (!K(r))
|
|
54
54
|
return !1;
|
|
55
|
-
var e =
|
|
55
|
+
var e = Me(r);
|
|
56
56
|
return e == ct || e == dt || e == ft || e == ht;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
var r = /[^.]+$/.exec(
|
|
58
|
+
var J = te["__core-js_shared__"], xe = function() {
|
|
59
|
+
var r = /[^.]+$/.exec(J && J.keys && J.keys.IE_PROTO || "");
|
|
60
60
|
return r ? "Symbol(src)_1." + r : "";
|
|
61
61
|
}();
|
|
62
62
|
function pt(r) {
|
|
63
|
-
return !!
|
|
63
|
+
return !!xe && xe in r;
|
|
64
64
|
}
|
|
65
65
|
var mt = Function.prototype, gt = mt.toString;
|
|
66
|
-
function
|
|
66
|
+
function vt(r) {
|
|
67
67
|
if (r != null) {
|
|
68
68
|
try {
|
|
69
69
|
return gt.call(r);
|
|
@@ -76,25 +76,25 @@ function bt(r) {
|
|
|
76
76
|
}
|
|
77
77
|
return "";
|
|
78
78
|
}
|
|
79
|
-
var
|
|
80
|
-
"^" + Ct.call(It).replace(
|
|
79
|
+
var bt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, _t = Function.prototype, Pt = Object.prototype, Ct = _t.toString, It = Pt.hasOwnProperty, St = RegExp(
|
|
80
|
+
"^" + Ct.call(It).replace(bt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
81
81
|
);
|
|
82
82
|
function Et(r) {
|
|
83
|
-
if (!
|
|
83
|
+
if (!K(r) || pt(r))
|
|
84
84
|
return !1;
|
|
85
|
-
var e =
|
|
86
|
-
return e.test(
|
|
85
|
+
var e = D(r) ? St : yt;
|
|
86
|
+
return e.test(vt(r));
|
|
87
87
|
}
|
|
88
88
|
function Ot(r, e) {
|
|
89
89
|
return r == null ? void 0 : r[e];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function se(r, e) {
|
|
92
92
|
var t = Ot(r, e);
|
|
93
93
|
return Et(t) ? t : void 0;
|
|
94
94
|
}
|
|
95
|
-
var
|
|
95
|
+
var Re = function() {
|
|
96
96
|
try {
|
|
97
|
-
var r =
|
|
97
|
+
var r = se(Object, "defineProperty");
|
|
98
98
|
return r({}, "", {}), r;
|
|
99
99
|
} catch {
|
|
100
100
|
}
|
|
@@ -104,7 +104,7 @@ function jt(r, e) {
|
|
|
104
104
|
return e = e ?? wt, !!e && (t == "number" || t != "symbol" && Ft.test(r)) && r > -1 && r % 1 == 0 && r < e;
|
|
105
105
|
}
|
|
106
106
|
function xt(r, e, t) {
|
|
107
|
-
e == "__proto__" &&
|
|
107
|
+
e == "__proto__" && Re ? Re(r, e, {
|
|
108
108
|
configurable: !0,
|
|
109
109
|
enumerable: !0,
|
|
110
110
|
value: t,
|
|
@@ -121,12 +121,12 @@ function Mt(r, e, t) {
|
|
|
121
121
|
}
|
|
122
122
|
var Vt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Nt = /^\w*$/;
|
|
123
123
|
function Ut(r, e) {
|
|
124
|
-
if (
|
|
124
|
+
if (ie(r))
|
|
125
125
|
return !1;
|
|
126
126
|
var t = typeof r;
|
|
127
|
-
return t == "number" || t == "symbol" || t == "boolean" || r == null ||
|
|
127
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || re(r) ? !0 : Nt.test(r) || !Vt.test(r) || e != null && r in Object(e);
|
|
128
128
|
}
|
|
129
|
-
var L =
|
|
129
|
+
var L = se(Object, "create");
|
|
130
130
|
function qt() {
|
|
131
131
|
this.__data__ = L ? L(null) : {}, this.size = 0;
|
|
132
132
|
}
|
|
@@ -168,7 +168,7 @@ F.prototype.set = Xt;
|
|
|
168
168
|
function Yt() {
|
|
169
169
|
this.__data__ = [], this.size = 0;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function W(r, e) {
|
|
172
172
|
for (var t = r.length; t--; )
|
|
173
173
|
if (Ne(r[t][0], e))
|
|
174
174
|
return t;
|
|
@@ -176,21 +176,21 @@ function K(r, e) {
|
|
|
176
176
|
}
|
|
177
177
|
var Zt = Array.prototype, Jt = Zt.splice;
|
|
178
178
|
function Qt(r) {
|
|
179
|
-
var e = this.__data__, t =
|
|
179
|
+
var e = this.__data__, t = W(e, r);
|
|
180
180
|
if (t < 0)
|
|
181
181
|
return !1;
|
|
182
182
|
var i = e.length - 1;
|
|
183
183
|
return t == i ? e.pop() : Jt.call(e, t, 1), --this.size, !0;
|
|
184
184
|
}
|
|
185
185
|
function At(r) {
|
|
186
|
-
var e = this.__data__, t =
|
|
186
|
+
var e = this.__data__, t = W(e, r);
|
|
187
187
|
return t < 0 ? void 0 : e[t][1];
|
|
188
188
|
}
|
|
189
189
|
function kt(r) {
|
|
190
|
-
return
|
|
190
|
+
return W(this.__data__, r) > -1;
|
|
191
191
|
}
|
|
192
192
|
function er(r, e) {
|
|
193
|
-
var t = this.__data__, i =
|
|
193
|
+
var t = this.__data__, i = W(t, r);
|
|
194
194
|
return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
|
|
195
195
|
}
|
|
196
196
|
function V(r) {
|
|
@@ -205,7 +205,7 @@ V.prototype.delete = Qt;
|
|
|
205
205
|
V.prototype.get = At;
|
|
206
206
|
V.prototype.has = kt;
|
|
207
207
|
V.prototype.set = er;
|
|
208
|
-
var tr =
|
|
208
|
+
var tr = se(te, "Map");
|
|
209
209
|
function rr() {
|
|
210
210
|
this.size = 0, this.__data__ = {
|
|
211
211
|
hash: new F(),
|
|
@@ -217,22 +217,22 @@ function ir(r) {
|
|
|
217
217
|
var e = typeof r;
|
|
218
218
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function X(r, e) {
|
|
221
221
|
var t = r.__data__;
|
|
222
222
|
return ir(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
|
|
223
223
|
}
|
|
224
224
|
function sr(r) {
|
|
225
|
-
var e =
|
|
225
|
+
var e = X(this, r).delete(r);
|
|
226
226
|
return this.size -= e ? 1 : 0, e;
|
|
227
227
|
}
|
|
228
228
|
function nr(r) {
|
|
229
|
-
return
|
|
229
|
+
return X(this, r).get(r);
|
|
230
230
|
}
|
|
231
231
|
function or(r) {
|
|
232
|
-
return
|
|
232
|
+
return X(this, r).has(r);
|
|
233
233
|
}
|
|
234
234
|
function ar(r, e) {
|
|
235
|
-
var t =
|
|
235
|
+
var t = X(this, r), i = t.size;
|
|
236
236
|
return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
|
|
237
237
|
}
|
|
238
238
|
function j(r) {
|
|
@@ -248,7 +248,7 @@ j.prototype.get = nr;
|
|
|
248
248
|
j.prototype.has = or;
|
|
249
249
|
j.prototype.set = ar;
|
|
250
250
|
var lr = "Expected a function";
|
|
251
|
-
function
|
|
251
|
+
function ne(r, e) {
|
|
252
252
|
if (typeof r != "function" || e != null && typeof e != "function")
|
|
253
253
|
throw new TypeError(lr);
|
|
254
254
|
var t = function() {
|
|
@@ -258,12 +258,12 @@ function se(r, e) {
|
|
|
258
258
|
var a = r.apply(this, i);
|
|
259
259
|
return t.cache = n.set(s, a) || n, a;
|
|
260
260
|
};
|
|
261
|
-
return t.cache = new (
|
|
261
|
+
return t.cache = new (ne.Cache || j)(), t;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
ne.Cache = j;
|
|
264
264
|
var ur = 500;
|
|
265
265
|
function fr(r) {
|
|
266
|
-
var e =
|
|
266
|
+
var e = ne(r, function(i) {
|
|
267
267
|
return t.size === ur && t.clear(), i;
|
|
268
268
|
}), t = e.cache;
|
|
269
269
|
return e;
|
|
@@ -275,14 +275,14 @@ var cr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=
|
|
|
275
275
|
}), e;
|
|
276
276
|
});
|
|
277
277
|
function pr(r) {
|
|
278
|
-
return r == null ? "" :
|
|
278
|
+
return r == null ? "" : Ve(r);
|
|
279
279
|
}
|
|
280
280
|
function Ue(r, e) {
|
|
281
|
-
return
|
|
281
|
+
return ie(r) ? r : Ut(r, e) ? [r] : hr(pr(r));
|
|
282
282
|
}
|
|
283
283
|
var mr = 1 / 0;
|
|
284
284
|
function qe(r) {
|
|
285
|
-
if (typeof r == "string" ||
|
|
285
|
+
if (typeof r == "string" || re(r))
|
|
286
286
|
return r;
|
|
287
287
|
var e = r + "";
|
|
288
288
|
return e == "0" && 1 / r == -mr ? "-0" : e;
|
|
@@ -293,12 +293,12 @@ function gr(r, e) {
|
|
|
293
293
|
r = r[qe(e[t++])];
|
|
294
294
|
return t && t == i ? r : void 0;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function G(r, e, t) {
|
|
297
297
|
var i = r == null ? void 0 : gr(r, e);
|
|
298
298
|
return i === void 0 ? t : i;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
if (!
|
|
300
|
+
function vr(r, e, t, i) {
|
|
301
|
+
if (!K(r))
|
|
302
302
|
return r;
|
|
303
303
|
e = Ue(e, r);
|
|
304
304
|
for (var s = -1, n = e.length, a = n - 1, u = r; u != null && ++s < n; ) {
|
|
@@ -307,14 +307,14 @@ function br(r, e, t, i) {
|
|
|
307
307
|
return r;
|
|
308
308
|
if (s != a) {
|
|
309
309
|
var h = u[f];
|
|
310
|
-
c = i ? i(h, f, u) : void 0, c === void 0 && (c =
|
|
310
|
+
c = i ? i(h, f, u) : void 0, c === void 0 && (c = K(h) ? h : jt(e[s + 1]) ? [] : {});
|
|
311
311
|
}
|
|
312
312
|
Mt(u, f, c), u = u[f];
|
|
313
313
|
}
|
|
314
314
|
return r;
|
|
315
315
|
}
|
|
316
316
|
function _(r, e, t) {
|
|
317
|
-
return r == null ? r :
|
|
317
|
+
return r == null ? r : vr(r, e, t);
|
|
318
318
|
}
|
|
319
319
|
class o {
|
|
320
320
|
static typeChecker(e) {
|
|
@@ -391,13 +391,13 @@ class o {
|
|
|
391
391
|
return !!e.__proform_raw_object;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function b(r, ...e) {
|
|
395
395
|
return e.forEach((t) => {
|
|
396
396
|
if (Array.isArray(t))
|
|
397
397
|
r = [...t];
|
|
398
398
|
else
|
|
399
399
|
for (const i in t)
|
|
400
|
-
t.hasOwnProperty(i) && t[i] !== void 0 && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] =
|
|
400
|
+
t.hasOwnProperty(i) && t[i] !== void 0 && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] = b(r[i] || {}, t[i]) : r[i] = t[i]);
|
|
401
401
|
}), r;
|
|
402
402
|
}
|
|
403
403
|
function C(r) {
|
|
@@ -438,10 +438,10 @@ function C(r) {
|
|
|
438
438
|
}
|
|
439
439
|
return t(r);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function A(r, e) {
|
|
442
442
|
return r.replace(/undefined/g, e);
|
|
443
443
|
}
|
|
444
|
-
class
|
|
444
|
+
class br {
|
|
445
445
|
constructor(e) {
|
|
446
446
|
l(this, "runtimeCore");
|
|
447
447
|
l(this, "readonlyReactiveModel", H({}));
|
|
@@ -455,7 +455,7 @@ class vr {
|
|
|
455
455
|
})), e;
|
|
456
456
|
}
|
|
457
457
|
setup(e) {
|
|
458
|
-
return this.runtimeCore = e, this.readonlyReactiveModel.value =
|
|
458
|
+
return this.runtimeCore = e, this.readonlyReactiveModel.value = Oe(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;
|
|
459
459
|
}
|
|
460
460
|
submit() {
|
|
461
461
|
var i;
|
|
@@ -469,7 +469,7 @@ class vr {
|
|
|
469
469
|
T(e) ? w(
|
|
470
470
|
() => e.value,
|
|
471
471
|
() => {
|
|
472
|
-
|
|
472
|
+
b(this.runtimeCore.model.value, e.value);
|
|
473
473
|
},
|
|
474
474
|
{
|
|
475
475
|
deep: !0,
|
|
@@ -478,13 +478,13 @@ class vr {
|
|
|
478
478
|
) : z(e) ? w(
|
|
479
479
|
() => e,
|
|
480
480
|
() => {
|
|
481
|
-
|
|
481
|
+
b(this.runtimeCore.model.value, e);
|
|
482
482
|
},
|
|
483
483
|
{
|
|
484
484
|
deep: !0,
|
|
485
485
|
immediate: !0
|
|
486
486
|
}
|
|
487
|
-
) :
|
|
487
|
+
) : b(this.runtimeCore.model.value, e);
|
|
488
488
|
},
|
|
489
489
|
{
|
|
490
490
|
lazy: !1
|
|
@@ -495,9 +495,9 @@ class vr {
|
|
|
495
495
|
share(e) {
|
|
496
496
|
S(() => {
|
|
497
497
|
Object.keys(e).forEach((t) => {
|
|
498
|
-
T(e[t]) ?
|
|
498
|
+
T(e[t]) ? B(() => {
|
|
499
499
|
_(this.runtimeCore.shared, t, e[t].value), this.shareHistory.get(t) !== e[t].value && (this.shareHistory.set(t, e[t].value), this.runtimeCore.processor.schemaEffect.triggerEffects());
|
|
500
|
-
}) : z(e[t]) ?
|
|
500
|
+
}) : z(e[t]) ? B(() => {
|
|
501
501
|
_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
|
|
502
502
|
}) : (_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
|
|
503
503
|
});
|
|
@@ -528,10 +528,10 @@ class vr {
|
|
|
528
528
|
var e;
|
|
529
529
|
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = C(
|
|
530
530
|
this.runtimeCore.processor.stableModel
|
|
531
|
-
), this.readonlyReactiveModel.value =
|
|
531
|
+
), this.readonlyReactiveModel.value = Oe(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
class
|
|
534
|
+
class k {
|
|
535
535
|
constructor() {
|
|
536
536
|
l(this, "effects", /* @__PURE__ */ new Set());
|
|
537
537
|
l(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
@@ -562,8 +562,8 @@ class yr {
|
|
|
562
562
|
l(this, "componentPropsPreset", I.componentPropsPreset);
|
|
563
563
|
l(this, "stableUpdaterProcessProgress");
|
|
564
564
|
l(this, "stableUpdaterTimes", 0);
|
|
565
|
-
l(this, "schemaEffect", new
|
|
566
|
-
l(this, "defaultValueEffect", new
|
|
565
|
+
l(this, "schemaEffect", new k());
|
|
566
|
+
l(this, "defaultValueEffect", new k());
|
|
567
567
|
l(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
568
568
|
l(this, "baseDefaultValueFunctionsLength");
|
|
569
569
|
l(this, "isModelInitialized", !0);
|
|
@@ -642,11 +642,11 @@ class yr {
|
|
|
642
642
|
const f = u.index, c = u.key, h = u.keyIndex;
|
|
643
643
|
if (o.isUndefined(u.stable) || o.isNull(u.stable))
|
|
644
644
|
return;
|
|
645
|
-
const p = s.parseStable(u.stable),
|
|
645
|
+
const p = s.parseStable(u.stable), v = i == null ? void 0 : i.index, E = i == null ? void 0 : i.key;
|
|
646
646
|
let y = p;
|
|
647
647
|
if (o.isProcessInprogress(y) || (n[h] = !0), i) {
|
|
648
|
-
const g = s.processedSchemas.value[
|
|
649
|
-
g && o.isObject(g) && c !== "component" && (y =
|
|
648
|
+
const g = s.processedSchemas.value[v][E][f][c];
|
|
649
|
+
g && o.isObject(g) && c !== "component" && (y = b(g, y)), s.processedSchemas.value[v][E][f][c] = y, s.stableUpdater(
|
|
650
650
|
n,
|
|
651
651
|
i,
|
|
652
652
|
t,
|
|
@@ -655,7 +655,7 @@ class yr {
|
|
|
655
655
|
);
|
|
656
656
|
} else {
|
|
657
657
|
const g = s.processedSchemas.value[f][c];
|
|
658
|
-
g && o.isObject(g) && c !== "component" && (y =
|
|
658
|
+
g && o.isObject(g) && c !== "component" && (y = b(g, y)), s.processedSchemas.value[f][c] = y, s.stableUpdater(
|
|
659
659
|
n,
|
|
660
660
|
i,
|
|
661
661
|
t,
|
|
@@ -715,8 +715,8 @@ class yr {
|
|
|
715
715
|
this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
716
716
|
this.defaultValueInprogressMap.values()
|
|
717
717
|
).every((p) => {
|
|
718
|
-
var
|
|
719
|
-
return !((
|
|
718
|
+
var v;
|
|
719
|
+
return !((v = p == null ? void 0 : p.includes) != null && v.call(p, "undefined"));
|
|
720
720
|
}) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
|
|
721
721
|
c();
|
|
722
722
|
})) : f(h);
|
|
@@ -731,8 +731,8 @@ class yr {
|
|
|
731
731
|
this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
732
732
|
this.defaultValueInprogressMap.values()
|
|
733
733
|
).every((p) => {
|
|
734
|
-
var
|
|
735
|
-
return !((
|
|
734
|
+
var v;
|
|
735
|
+
return !((v = p == null ? void 0 : p.includes) != null && v.call(p, "undefined"));
|
|
736
736
|
}) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
|
|
737
737
|
c();
|
|
738
738
|
})) : f(h);
|
|
@@ -763,13 +763,13 @@ class yr {
|
|
|
763
763
|
}
|
|
764
764
|
promiseFieldParser(e, t, i, s) {
|
|
765
765
|
o.isPromise(e) ? e.then((n) => {
|
|
766
|
-
o.isString(n) && (n =
|
|
766
|
+
o.isString(n) && (n = A(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
767
767
|
data: n,
|
|
768
768
|
updater: t,
|
|
769
769
|
index: s.rootIndex,
|
|
770
770
|
parentMeta: s.parentMeta
|
|
771
771
|
}) : t(n);
|
|
772
|
-
}) : (o.isString(e) && (e =
|
|
772
|
+
}) : (o.isString(e) && (e = A(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
773
773
|
data: e,
|
|
774
774
|
updater: t,
|
|
775
775
|
index: s.rootIndex,
|
|
@@ -839,7 +839,7 @@ class yr {
|
|
|
839
839
|
});
|
|
840
840
|
}
|
|
841
841
|
setModel(e, t, i) {
|
|
842
|
-
o.isFunction(t) ? _(e, t(), i) :
|
|
842
|
+
o.isFunction(t) ? _(e, t(), i) : b(e, {
|
|
843
843
|
[t]: i
|
|
844
844
|
});
|
|
845
845
|
}
|
|
@@ -852,7 +852,7 @@ class yr {
|
|
|
852
852
|
if ("defaultValue" in e && !t[e.field])
|
|
853
853
|
this.setModel(t, e.field, e.defaultValue);
|
|
854
854
|
else {
|
|
855
|
-
if (o.isFunction(e.field) &&
|
|
855
|
+
if (o.isFunction(e.field) && G(t, e.field()))
|
|
856
856
|
return;
|
|
857
857
|
if (o.isString(e.field) && t[e.field])
|
|
858
858
|
return;
|
|
@@ -928,11 +928,11 @@ class Cr {
|
|
|
928
928
|
list: this.runtimeListProcessor.bind(this)
|
|
929
929
|
});
|
|
930
930
|
l(this, "formRef", H(null));
|
|
931
|
-
l(this, "hydrateEffect", new
|
|
932
|
-
l(this, "native",
|
|
931
|
+
l(this, "hydrateEffect", new k());
|
|
932
|
+
l(this, "native", Z({}));
|
|
933
933
|
l(this, "grid", {});
|
|
934
934
|
l(this, "runtime", {});
|
|
935
|
-
l(this, "globalNativeFormOverride",
|
|
935
|
+
l(this, "globalNativeFormOverride", Z({
|
|
936
936
|
props: {
|
|
937
937
|
Form: {},
|
|
938
938
|
FormItem: {}
|
|
@@ -942,7 +942,7 @@ class Cr {
|
|
|
942
942
|
FormItem: {}
|
|
943
943
|
}
|
|
944
944
|
}));
|
|
945
|
-
l(this, "shared",
|
|
945
|
+
l(this, "shared", Z({}));
|
|
946
946
|
l(this, "shareHistory", /* @__PURE__ */ new Map());
|
|
947
947
|
this.setup = e, this.processor = new yr(this);
|
|
948
948
|
const t = this.setup(this);
|
|
@@ -970,9 +970,9 @@ class Cr {
|
|
|
970
970
|
share: (t) => {
|
|
971
971
|
S(() => {
|
|
972
972
|
Object.keys(t).forEach((i) => {
|
|
973
|
-
T(t[i]) ?
|
|
973
|
+
T(t[i]) ? B(() => {
|
|
974
974
|
_(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
|
|
975
|
-
}) : z(t[i]) ?
|
|
975
|
+
}) : z(t[i]) ? B(() => {
|
|
976
976
|
_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
|
|
977
977
|
}) : (_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
|
|
978
978
|
});
|
|
@@ -981,43 +981,43 @@ class Cr {
|
|
|
981
981
|
};
|
|
982
982
|
}
|
|
983
983
|
runtimeItemProcessor(e, t, i = this.model.value, s) {
|
|
984
|
-
var
|
|
984
|
+
var ae, le, ue, fe, ce, de, he, pe, me, ge, ve, be, ye, _e, Pe, Ce, Ie, Se;
|
|
985
985
|
const n = $(e.component);
|
|
986
986
|
if (!n)
|
|
987
987
|
return;
|
|
988
|
-
(
|
|
989
|
-
const a =
|
|
988
|
+
e.native = D(e.native) ? e.native() : e.native, (le = (ae = e.native) == null ? void 0 : ae.props) != null && le.Form && b(this.globalNativeFormOverride.props.Form, (fe = (ue = e.native) == null ? void 0 : ue.props) == null ? void 0 : fe.Form), (de = (ce = e.native) == null ? void 0 : ce.slots) != null && de.Form && b(this.globalNativeFormOverride.slots.Form, (pe = (he = e.native) == null ? void 0 : he.slots) == null ? void 0 : pe.Form);
|
|
989
|
+
const a = b(C((ge = (me = this.native) == null ? void 0 : me.slots) == null ? void 0 : ge.FormItem) ?? {}, (be = (ve = e.native) == null ? void 0 : ve.slots) == null ? void 0 : be.FormItem), u = {
|
|
990
990
|
display: "grid",
|
|
991
991
|
gridColumn: "1 / -1",
|
|
992
992
|
...e.grid
|
|
993
|
-
}, f =
|
|
993
|
+
}, f = b(C((_e = (ye = this.native) == null ? void 0 : ye.props) == null ? void 0 : _e.FormItem) ?? {}, (Ce = (Pe = e.native) == null ? void 0 : Pe.props) == null ? void 0 : Ce.FormItem), c = this.runtimeAdapter.getRuntimeField({
|
|
994
994
|
schema: e,
|
|
995
995
|
parentSchema: s,
|
|
996
996
|
index: t
|
|
997
|
-
}), h = n.name, p = e.componentProps ?? {},
|
|
998
|
-
let E = e.placeholder, y = e.show;
|
|
997
|
+
}), h = n.name, p = e.componentProps ?? {}, v = I.placeholderPresetByComponentName;
|
|
998
|
+
let E = D(e.placeholder) ? e.placeholder() : e.placeholder, y = e.show;
|
|
999
999
|
y === void 0 && (y = !0);
|
|
1000
|
-
let g = (
|
|
1001
|
-
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g =
|
|
1000
|
+
let g = (D(e.label) ? e.label() : e.label) ?? "", O;
|
|
1001
|
+
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g = A((Ie = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : Ie.call(O, e.label ?? "", t + 1), "")), !E) {
|
|
1002
1002
|
let N = "请输入";
|
|
1003
|
-
o.isUndefined(h) ? E = `${N}${g}` : /* @ts-expect-error */
|
|
1004
|
-
|
|
1005
|
-
h.toLowerCase().includes(
|
|
1003
|
+
o.isUndefined(h) ? E = `${N}${g}` : /* @ts-expect-error */ v[h.toLowerCase()] ? (N = // @ts-expect-error
|
|
1004
|
+
v[h.toLowerCase()], E = `${N}${g}`) : (Object.keys(v).forEach((Ee) => {
|
|
1005
|
+
h.toLowerCase().includes(Ee.toLowerCase()) && (N = v[Ee]);
|
|
1006
1006
|
}), E = `${N}${g}`);
|
|
1007
1007
|
}
|
|
1008
1008
|
const Te = this.runtimeAdapter.getRuntimeRequired({
|
|
1009
1009
|
...e,
|
|
1010
1010
|
label: g
|
|
1011
|
-
}), ze = x.getItemContainer(this), Le = x.getFormItemContainer(this), He = this, De = e.componentSlots, P = (
|
|
1012
|
-
let
|
|
1013
|
-
return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ?
|
|
1011
|
+
}), ze = x.getItemContainer(this), Le = x.getFormItemContainer(this), He = this, De = e.componentSlots, P = (Se = d.presets.uiPresets[this.ui]) == null ? void 0 : Se.display;
|
|
1012
|
+
let Y;
|
|
1013
|
+
return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ? Y = `${g}${P == null ? void 0 : P.labelPrefix}` : Y = `${g}:`, m("div", {
|
|
1014
1014
|
style: u
|
|
1015
1015
|
}, [m(ze, {
|
|
1016
1016
|
show: y
|
|
1017
1017
|
}, {
|
|
1018
1018
|
default() {
|
|
1019
1019
|
return y && m(Le, q(f, {
|
|
1020
|
-
label: `${g ?
|
|
1020
|
+
label: `${g ? Y : ""}`
|
|
1021
1021
|
}, c, Te), {
|
|
1022
1022
|
default() {
|
|
1023
1023
|
return He.runtimeAdapter.formComponentRenderer({
|
|
@@ -1108,7 +1108,7 @@ class Cr {
|
|
|
1108
1108
|
gridColumn: "1 / -1",
|
|
1109
1109
|
gridAutoColumns: "1fr",
|
|
1110
1110
|
...this.grid
|
|
1111
|
-
}, t = this, i =
|
|
1111
|
+
}, t = this, i = b(this.globalNativeFormOverride.props.Form, C((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = b(this.globalNativeFormOverride.slots.Form, C((h = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : h.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
|
|
1112
1112
|
return m(n, q(i, {
|
|
1113
1113
|
ref: this.formRef
|
|
1114
1114
|
}, {
|
|
@@ -1134,7 +1134,7 @@ class d {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
1136
|
l(d, "presets");
|
|
1137
|
-
function
|
|
1137
|
+
function Q({
|
|
1138
1138
|
parentSchema: r,
|
|
1139
1139
|
schema: e,
|
|
1140
1140
|
index: t
|
|
@@ -1144,7 +1144,7 @@ function J({
|
|
|
1144
1144
|
const Ir = {
|
|
1145
1145
|
ArcoVue: {
|
|
1146
1146
|
getRuntimeField(r) {
|
|
1147
|
-
const e =
|
|
1147
|
+
const e = Q(r);
|
|
1148
1148
|
return o.isFunction(e) ? {
|
|
1149
1149
|
field: e()
|
|
1150
1150
|
} : {
|
|
@@ -1182,7 +1182,7 @@ const Ir = {
|
|
|
1182
1182
|
props: n
|
|
1183
1183
|
}) {
|
|
1184
1184
|
let a;
|
|
1185
|
-
return o.isFunction(t.field) ? a =
|
|
1185
|
+
return o.isFunction(t.field) ? a = G(e, t.field()) : a = e[t.field], m(r, q({
|
|
1186
1186
|
modelValue: a,
|
|
1187
1187
|
"onUpdate:modelValue": (u) => {
|
|
1188
1188
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1204,7 +1204,7 @@ const Ir = {
|
|
|
1204
1204
|
},
|
|
1205
1205
|
NutUI: {
|
|
1206
1206
|
getRuntimeField(r) {
|
|
1207
|
-
const e =
|
|
1207
|
+
const e = Q(r);
|
|
1208
1208
|
return o.isFunction(e) ? {
|
|
1209
1209
|
prop: e()
|
|
1210
1210
|
} : {
|
|
@@ -1243,7 +1243,7 @@ const Ir = {
|
|
|
1243
1243
|
props: n
|
|
1244
1244
|
}) {
|
|
1245
1245
|
let a;
|
|
1246
|
-
return o.isFunction(t.field) ? a =
|
|
1246
|
+
return o.isFunction(t.field) ? a = G(e, t.field()) : a = e[t.field], m(r, q({
|
|
1247
1247
|
modelValue: a,
|
|
1248
1248
|
"onUpdate:modelValue": (u) => {
|
|
1249
1249
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1270,7 +1270,7 @@ const Ir = {
|
|
|
1270
1270
|
},
|
|
1271
1271
|
NaiveUI: {
|
|
1272
1272
|
getRuntimeField(r) {
|
|
1273
|
-
const e =
|
|
1273
|
+
const e = Q(r);
|
|
1274
1274
|
return o.isFunction(e) ? {
|
|
1275
1275
|
path: e()
|
|
1276
1276
|
} : {
|
|
@@ -1310,7 +1310,7 @@ const Ir = {
|
|
|
1310
1310
|
props: n
|
|
1311
1311
|
}) {
|
|
1312
1312
|
let a;
|
|
1313
|
-
return o.isFunction(t.field) ? a =
|
|
1313
|
+
return o.isFunction(t.field) ? a = G(e, t.field()) : a = e[t.field], m(r, q({
|
|
1314
1314
|
value: a,
|
|
1315
1315
|
"onUpdate:value": (u) => {
|
|
1316
1316
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1395,9 +1395,9 @@ l(R, "schemaPreset", {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
}), // 基于基本功能提出基本预设
|
|
1397
1397
|
l(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
|
|
1398
|
-
let
|
|
1398
|
+
let ee = R;
|
|
1399
1399
|
const I = {
|
|
1400
|
-
...
|
|
1400
|
+
...ee,
|
|
1401
1401
|
adapters: {
|
|
1402
1402
|
...Ir
|
|
1403
1403
|
}
|
|
@@ -1414,7 +1414,7 @@ const I = {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
});
|
|
1416
1416
|
function wr(r) {
|
|
1417
|
-
const e = new
|
|
1417
|
+
const e = new br(r);
|
|
1418
1418
|
return [
|
|
1419
1419
|
e.setup.bind(e),
|
|
1420
1420
|
{
|
|
@@ -1429,7 +1429,7 @@ function wr(r) {
|
|
|
1429
1429
|
function Fr(r) {
|
|
1430
1430
|
d.presets = r;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function oe(r, e) {
|
|
1433
1433
|
return e === "native" && Object.defineProperty(r, "name", {
|
|
1434
1434
|
value: `__proform_raw_${r.name}`,
|
|
1435
1435
|
writable: !0
|
|
@@ -1442,19 +1442,19 @@ function ne(r, e) {
|
|
|
1442
1442
|
}), r;
|
|
1443
1443
|
}
|
|
1444
1444
|
function jr(r) {
|
|
1445
|
-
return
|
|
1445
|
+
return oe(r, "native");
|
|
1446
1446
|
}
|
|
1447
1447
|
function xr(r) {
|
|
1448
1448
|
return r.__proform_raw_object = !0, r;
|
|
1449
1449
|
}
|
|
1450
1450
|
function Rr(r) {
|
|
1451
|
-
return
|
|
1451
|
+
return oe(r, "onetime");
|
|
1452
1452
|
}
|
|
1453
1453
|
function $r(r) {
|
|
1454
1454
|
function e() {
|
|
1455
1455
|
return r;
|
|
1456
1456
|
}
|
|
1457
|
-
return
|
|
1457
|
+
return oe(
|
|
1458
1458
|
e,
|
|
1459
1459
|
"structured_path_parsing_mark"
|
|
1460
1460
|
);
|
|
@@ -1467,5 +1467,5 @@ export {
|
|
|
1467
1467
|
$r as markStructuredPathParsing,
|
|
1468
1468
|
wr as useForm,
|
|
1469
1469
|
Fr as useFormPresetConfigurer,
|
|
1470
|
-
|
|
1470
|
+
oe as useModifiers
|
|
1471
1471
|
};
|