@harbor-design/proform 1.3.32 → 1.3.33
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 +246 -244
- 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 Pe, nextTick 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,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 C(t) {
|
|
84
84
|
const e = /* @__PURE__ */ new WeakMap();
|
|
85
85
|
function r(i) {
|
|
86
86
|
if (i === null || typeof i != "object")
|
|
@@ -118,10 +118,10 @@ function P(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
|
-
class
|
|
124
|
+
class He {
|
|
125
125
|
constructor(e) {
|
|
126
126
|
u(this, "runtimeCore");
|
|
127
127
|
u(this, "readonlyReactiveModel", z({}));
|
|
@@ -138,17 +138,17 @@ class Ke {
|
|
|
138
138
|
}
|
|
139
139
|
submit() {
|
|
140
140
|
var i;
|
|
141
|
-
const e = (i =
|
|
141
|
+
const e = (i = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = I.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) {
|
|
145
|
-
|
|
145
|
+
P(() => {
|
|
146
146
|
this.runtimeCore.hydrateEffect.trackEffect(
|
|
147
147
|
() => {
|
|
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 Ke {
|
|
|
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
|
|
@@ -172,44 +172,45 @@ class Ke {
|
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
share(e) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
() => e
|
|
175
|
+
P(() => {
|
|
176
|
+
if (q(e)) {
|
|
177
|
+
const r = _(
|
|
178
|
+
() => e.value,
|
|
179
179
|
() => {
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
h(this.runtimeCore.shared, e.value), this.runtimeCore.processor.schemaEffect.triggerEffects(), P(() => {
|
|
181
|
+
r();
|
|
182
182
|
});
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
deep: !0,
|
|
186
186
|
immediate: !0
|
|
187
187
|
}
|
|
188
|
-
)
|
|
189
|
-
|
|
188
|
+
);
|
|
189
|
+
} else if (U(e)) {
|
|
190
|
+
const r = _(
|
|
191
|
+
() => e,
|
|
190
192
|
() => {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
h(this.runtimeCore.shared, e), this.runtimeCore.processor.schemaEffect.triggerEffects(), P(() => {
|
|
194
|
+
r();
|
|
193
195
|
});
|
|
194
196
|
},
|
|
195
197
|
{
|
|
196
198
|
deep: !0,
|
|
197
199
|
immediate: !0
|
|
198
200
|
}
|
|
199
|
-
)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
});
|
|
201
|
+
);
|
|
202
|
+
} else
|
|
203
|
+
h(this.runtimeCore.shared, e), this.runtimeCore.processor.schemaEffect.triggerEffects();
|
|
203
204
|
});
|
|
204
205
|
}
|
|
205
206
|
subscribeModel(e) {
|
|
206
|
-
|
|
207
|
+
P(() => {
|
|
207
208
|
const r = _(
|
|
208
209
|
() => this.readonlyReactiveModel.value,
|
|
209
210
|
(i) => {
|
|
210
211
|
e(i, {
|
|
211
212
|
stopSubscribe() {
|
|
212
|
-
|
|
213
|
+
P(() => {
|
|
213
214
|
r();
|
|
214
215
|
});
|
|
215
216
|
}
|
|
@@ -224,12 +225,12 @@ class Ke {
|
|
|
224
225
|
}
|
|
225
226
|
resetModel() {
|
|
226
227
|
var e;
|
|
227
|
-
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value =
|
|
228
|
+
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = C(
|
|
228
229
|
this.runtimeCore.processor.stableModel
|
|
229
230
|
), this.readonlyReactiveModel.value = Pe(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
230
231
|
}
|
|
231
232
|
}
|
|
232
|
-
class
|
|
233
|
+
class Y {
|
|
233
234
|
constructor() {
|
|
234
235
|
u(this, "effects", /* @__PURE__ */ new Set());
|
|
235
236
|
u(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
@@ -248,30 +249,30 @@ class Z {
|
|
|
248
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);
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
|
-
var We = typeof global == "object" && global && global.Object === Object && global,
|
|
252
|
-
function
|
|
253
|
-
var e =
|
|
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")(), x = J.Symbol, je = Object.prototype, Xe = je.hasOwnProperty, Ye = je.toString, V = x ? x.toStringTag : void 0;
|
|
253
|
+
function Ze(t) {
|
|
254
|
+
var e = Xe.call(t, V), r = t[V];
|
|
254
255
|
try {
|
|
255
256
|
t[V] = void 0;
|
|
256
257
|
var i = !0;
|
|
257
258
|
} catch {
|
|
258
259
|
}
|
|
259
|
-
var s =
|
|
260
|
+
var s = Ye.call(t);
|
|
260
261
|
return i && (e ? t[V] = r : delete t[V]), s;
|
|
261
262
|
}
|
|
262
|
-
var
|
|
263
|
+
var Je = Object.prototype, Qe = Je.toString;
|
|
263
264
|
function Ae(t) {
|
|
264
|
-
return
|
|
265
|
+
return Qe.call(t);
|
|
265
266
|
}
|
|
266
|
-
var et = "[object Null]", tt = "[object Undefined]",
|
|
267
|
+
var et = "[object Null]", tt = "[object Undefined]", Ce = x ? x.toStringTag : void 0;
|
|
267
268
|
function we(t) {
|
|
268
|
-
return t == null ? t === void 0 ? tt : et :
|
|
269
|
+
return t == null ? t === void 0 ? tt : et : Ce && Ce in Object(t) ? Ze(t) : Ae(t);
|
|
269
270
|
}
|
|
270
271
|
function rt(t) {
|
|
271
272
|
return t != null && typeof t == "object";
|
|
272
273
|
}
|
|
273
274
|
var it = "[object Symbol]";
|
|
274
|
-
function
|
|
275
|
+
function Q(t) {
|
|
275
276
|
return typeof t == "symbol" || rt(t) && we(t) == it;
|
|
276
277
|
}
|
|
277
278
|
function st(t, e) {
|
|
@@ -279,14 +280,14 @@ function st(t, e) {
|
|
|
279
280
|
s[r] = e(t[r], r, t);
|
|
280
281
|
return s;
|
|
281
282
|
}
|
|
282
|
-
var A = Array.isArray, nt = 1 / 0,
|
|
283
|
+
var A = Array.isArray, nt = 1 / 0, Ie = x ? x.prototype : void 0, Se = Ie ? Ie.toString : void 0;
|
|
283
284
|
function Me(t) {
|
|
284
285
|
if (typeof t == "string")
|
|
285
286
|
return t;
|
|
286
287
|
if (A(t))
|
|
287
288
|
return st(t, Me) + "";
|
|
288
|
-
if (
|
|
289
|
-
return
|
|
289
|
+
if (Q(t))
|
|
290
|
+
return Se ? Se.call(t) : "";
|
|
290
291
|
var e = t + "";
|
|
291
292
|
return e == "0" && 1 / t == -nt ? "-0" : e;
|
|
292
293
|
}
|
|
@@ -295,18 +296,18 @@ function G(t) {
|
|
|
295
296
|
return t != null && (e == "object" || e == "function");
|
|
296
297
|
}
|
|
297
298
|
var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object GeneratorFunction]", ut = "[object Proxy]";
|
|
298
|
-
function
|
|
299
|
+
function ct(t) {
|
|
299
300
|
if (!G(t))
|
|
300
301
|
return !1;
|
|
301
302
|
var e = we(t);
|
|
302
303
|
return e == at || e == lt || e == ot || e == ut;
|
|
303
304
|
}
|
|
304
|
-
var W =
|
|
305
|
+
var W = J["__core-js_shared__"], Oe = function() {
|
|
305
306
|
var t = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
|
|
306
307
|
return t ? "Symbol(src)_1." + t : "";
|
|
307
308
|
}();
|
|
308
|
-
function
|
|
309
|
-
return !!
|
|
309
|
+
function ft(t) {
|
|
310
|
+
return !!Oe && Oe in t;
|
|
310
311
|
}
|
|
311
312
|
var dt = Function.prototype, pt = dt.toString;
|
|
312
313
|
function ht(t) {
|
|
@@ -322,55 +323,55 @@ function ht(t) {
|
|
|
322
323
|
}
|
|
323
324
|
return "";
|
|
324
325
|
}
|
|
325
|
-
var mt = /[\\^$.*+?()[\]{}|]/g,
|
|
326
|
-
"^" +
|
|
326
|
+
var mt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, gt = Function.prototype, bt = Object.prototype, vt = gt.toString, _t = bt.hasOwnProperty, Pt = RegExp(
|
|
327
|
+
"^" + vt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
327
328
|
);
|
|
328
|
-
function
|
|
329
|
-
if (!G(t) ||
|
|
329
|
+
function Ct(t) {
|
|
330
|
+
if (!G(t) || ft(t))
|
|
330
331
|
return !1;
|
|
331
|
-
var e =
|
|
332
|
+
var e = ct(t) ? Pt : yt;
|
|
332
333
|
return e.test(ht(t));
|
|
333
334
|
}
|
|
334
|
-
function
|
|
335
|
+
function It(t, e) {
|
|
335
336
|
return t == null ? void 0 : t[e];
|
|
336
337
|
}
|
|
337
338
|
function ee(t, e) {
|
|
338
|
-
var r =
|
|
339
|
-
return
|
|
339
|
+
var r = It(t, e);
|
|
340
|
+
return Ct(r) ? r : void 0;
|
|
340
341
|
}
|
|
341
|
-
var
|
|
342
|
+
var Fe = function() {
|
|
342
343
|
try {
|
|
343
344
|
var t = ee(Object, "defineProperty");
|
|
344
345
|
return t({}, "", {}), t;
|
|
345
346
|
} catch {
|
|
346
347
|
}
|
|
347
|
-
}(),
|
|
348
|
-
function
|
|
348
|
+
}(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
|
|
349
|
+
function Ft(t, e) {
|
|
349
350
|
var r = typeof t;
|
|
350
|
-
return e = e ??
|
|
351
|
+
return e = e ?? St, !!e && (r == "number" || r != "symbol" && Ot.test(t)) && t > -1 && t % 1 == 0 && t < e;
|
|
351
352
|
}
|
|
352
|
-
function
|
|
353
|
-
e == "__proto__" &&
|
|
353
|
+
function jt(t, e, r) {
|
|
354
|
+
e == "__proto__" && Fe ? Fe(t, e, {
|
|
354
355
|
configurable: !0,
|
|
355
356
|
enumerable: !0,
|
|
356
357
|
value: r,
|
|
357
358
|
writable: !0
|
|
358
359
|
}) : t[e] = r;
|
|
359
360
|
}
|
|
360
|
-
function
|
|
361
|
+
function Ee(t, e) {
|
|
361
362
|
return t === e || t !== t && e !== e;
|
|
362
363
|
}
|
|
363
364
|
var wt = Object.prototype, Mt = wt.hasOwnProperty;
|
|
364
|
-
function
|
|
365
|
+
function Et(t, e, r) {
|
|
365
366
|
var i = t[e];
|
|
366
|
-
(!(Mt.call(t, e) &&
|
|
367
|
+
(!(Mt.call(t, e) && Ee(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
|
|
367
368
|
}
|
|
368
|
-
var
|
|
369
|
+
var xt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
|
|
369
370
|
function $t(t, e) {
|
|
370
371
|
if (A(t))
|
|
371
372
|
return !1;
|
|
372
373
|
var r = typeof t;
|
|
373
|
-
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) || !xt.test(t) || e != null && t in Object(e);
|
|
374
375
|
}
|
|
375
376
|
var T = ee(Object, "create");
|
|
376
377
|
function Vt() {
|
|
@@ -395,47 +396,47 @@ function Gt(t) {
|
|
|
395
396
|
return T ? e[t] !== void 0 : Dt.call(e, t);
|
|
396
397
|
}
|
|
397
398
|
var Bt = "__lodash_hash_undefined__";
|
|
398
|
-
function
|
|
399
|
+
function kt(t, e) {
|
|
399
400
|
var r = this.__data__;
|
|
400
401
|
return this.size += this.has(t) ? 0 : 1, r[t] = T && e === void 0 ? Bt : e, this;
|
|
401
402
|
}
|
|
402
|
-
function
|
|
403
|
+
function F(t) {
|
|
403
404
|
var e = -1, r = t == null ? 0 : t.length;
|
|
404
405
|
for (this.clear(); ++e < r; ) {
|
|
405
406
|
var i = t[e];
|
|
406
407
|
this.set(i[0], i[1]);
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
function
|
|
410
|
+
F.prototype.clear = Vt;
|
|
411
|
+
F.prototype.delete = Nt;
|
|
412
|
+
F.prototype.get = zt;
|
|
413
|
+
F.prototype.has = Gt;
|
|
414
|
+
F.prototype.set = kt;
|
|
415
|
+
function Ht() {
|
|
415
416
|
this.__data__ = [], this.size = 0;
|
|
416
417
|
}
|
|
417
418
|
function B(t, e) {
|
|
418
419
|
for (var r = t.length; r--; )
|
|
419
|
-
if (
|
|
420
|
+
if (Ee(t[r][0], e))
|
|
420
421
|
return r;
|
|
421
422
|
return -1;
|
|
422
423
|
}
|
|
423
|
-
var Wt = Array.prototype,
|
|
424
|
-
function
|
|
424
|
+
var Wt = Array.prototype, Kt = Wt.splice;
|
|
425
|
+
function Xt(t) {
|
|
425
426
|
var e = this.__data__, r = B(e, t);
|
|
426
427
|
if (r < 0)
|
|
427
428
|
return !1;
|
|
428
429
|
var i = e.length - 1;
|
|
429
|
-
return r == i ? e.pop() :
|
|
430
|
+
return r == i ? e.pop() : Kt.call(e, r, 1), --this.size, !0;
|
|
430
431
|
}
|
|
431
|
-
function
|
|
432
|
+
function Yt(t) {
|
|
432
433
|
var e = this.__data__, r = B(e, t);
|
|
433
434
|
return r < 0 ? void 0 : e[r][1];
|
|
434
435
|
}
|
|
435
|
-
function
|
|
436
|
+
function Zt(t) {
|
|
436
437
|
return B(this.__data__, t) > -1;
|
|
437
438
|
}
|
|
438
|
-
function
|
|
439
|
+
function Jt(t, e) {
|
|
439
440
|
var r = this.__data__, i = B(r, t);
|
|
440
441
|
return i < 0 ? (++this.size, r.push([t, e])) : r[i][1] = e, this;
|
|
441
442
|
}
|
|
@@ -446,53 +447,53 @@ function R(t) {
|
|
|
446
447
|
this.set(i[0], i[1]);
|
|
447
448
|
}
|
|
448
449
|
}
|
|
449
|
-
R.prototype.clear =
|
|
450
|
-
R.prototype.delete =
|
|
451
|
-
R.prototype.get =
|
|
452
|
-
R.prototype.has =
|
|
453
|
-
R.prototype.set =
|
|
454
|
-
var
|
|
450
|
+
R.prototype.clear = Ht;
|
|
451
|
+
R.prototype.delete = Xt;
|
|
452
|
+
R.prototype.get = Yt;
|
|
453
|
+
R.prototype.has = Zt;
|
|
454
|
+
R.prototype.set = Jt;
|
|
455
|
+
var Qt = ee(J, "Map");
|
|
455
456
|
function At() {
|
|
456
457
|
this.size = 0, this.__data__ = {
|
|
457
|
-
hash: new
|
|
458
|
-
map: new (
|
|
459
|
-
string: new
|
|
458
|
+
hash: new F(),
|
|
459
|
+
map: new (Qt || R)(),
|
|
460
|
+
string: new F()
|
|
460
461
|
};
|
|
461
462
|
}
|
|
462
463
|
function er(t) {
|
|
463
464
|
var e = typeof t;
|
|
464
465
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
465
466
|
}
|
|
466
|
-
function
|
|
467
|
+
function k(t, e) {
|
|
467
468
|
var r = t.__data__;
|
|
468
469
|
return er(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
|
|
469
470
|
}
|
|
470
471
|
function tr(t) {
|
|
471
|
-
var e =
|
|
472
|
+
var e = k(this, t).delete(t);
|
|
472
473
|
return this.size -= e ? 1 : 0, e;
|
|
473
474
|
}
|
|
474
475
|
function rr(t) {
|
|
475
|
-
return
|
|
476
|
+
return k(this, t).get(t);
|
|
476
477
|
}
|
|
477
478
|
function ir(t) {
|
|
478
|
-
return
|
|
479
|
+
return k(this, t).has(t);
|
|
479
480
|
}
|
|
480
481
|
function sr(t, e) {
|
|
481
|
-
var r =
|
|
482
|
+
var r = k(this, t), i = r.size;
|
|
482
483
|
return r.set(t, e), this.size += r.size == i ? 0 : 1, this;
|
|
483
484
|
}
|
|
484
|
-
function
|
|
485
|
+
function j(t) {
|
|
485
486
|
var e = -1, r = t == null ? 0 : t.length;
|
|
486
487
|
for (this.clear(); ++e < r; ) {
|
|
487
488
|
var i = t[e];
|
|
488
489
|
this.set(i[0], i[1]);
|
|
489
490
|
}
|
|
490
491
|
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
j.prototype.clear = At;
|
|
493
|
+
j.prototype.delete = tr;
|
|
494
|
+
j.prototype.get = rr;
|
|
495
|
+
j.prototype.has = ir;
|
|
496
|
+
j.prototype.set = sr;
|
|
496
497
|
var nr = "Expected a function";
|
|
497
498
|
function te(t, e) {
|
|
498
499
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
@@ -504,9 +505,9 @@ function te(t, e) {
|
|
|
504
505
|
var a = t.apply(this, i);
|
|
505
506
|
return r.cache = n.set(s, a) || n, a;
|
|
506
507
|
};
|
|
507
|
-
return r.cache = new (te.Cache ||
|
|
508
|
+
return r.cache = new (te.Cache || j)(), r;
|
|
508
509
|
}
|
|
509
|
-
te.Cache =
|
|
510
|
+
te.Cache = j;
|
|
510
511
|
var or = 500;
|
|
511
512
|
function ar(t) {
|
|
512
513
|
var e = te(t, function(i) {
|
|
@@ -514,27 +515,27 @@ function ar(t) {
|
|
|
514
515
|
}), r = e.cache;
|
|
515
516
|
return e;
|
|
516
517
|
}
|
|
517
|
-
var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g,
|
|
518
|
+
var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, cr = ar(function(t) {
|
|
518
519
|
var e = [];
|
|
519
520
|
return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, i, s, n) {
|
|
520
521
|
e.push(s ? n.replace(ur, "$1") : i || r);
|
|
521
522
|
}), e;
|
|
522
523
|
});
|
|
523
|
-
function
|
|
524
|
+
function fr(t) {
|
|
524
525
|
return t == null ? "" : Me(t);
|
|
525
526
|
}
|
|
526
|
-
function
|
|
527
|
-
return A(t) ? t : $t(t, e) ? [t] : fr(
|
|
527
|
+
function xe(t, e) {
|
|
528
|
+
return A(t) ? t : $t(t, e) ? [t] : cr(fr(t));
|
|
528
529
|
}
|
|
529
530
|
var dr = 1 / 0;
|
|
530
531
|
function Re(t) {
|
|
531
|
-
if (typeof t == "string" ||
|
|
532
|
+
if (typeof t == "string" || Q(t))
|
|
532
533
|
return t;
|
|
533
534
|
var e = t + "";
|
|
534
535
|
return e == "0" && 1 / t == -dr ? "-0" : e;
|
|
535
536
|
}
|
|
536
537
|
function pr(t, e) {
|
|
537
|
-
e =
|
|
538
|
+
e = xe(e, t);
|
|
538
539
|
for (var r = 0, i = e.length; t != null && r < i; )
|
|
539
540
|
t = t[Re(e[r++])];
|
|
540
541
|
return r && r == i ? t : void 0;
|
|
@@ -546,16 +547,16 @@ function L(t, e, r) {
|
|
|
546
547
|
function hr(t, e, r, i) {
|
|
547
548
|
if (!G(t))
|
|
548
549
|
return t;
|
|
549
|
-
e =
|
|
550
|
+
e = xe(e, t);
|
|
550
551
|
for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
552
|
+
var c = Re(e[s]), d = r;
|
|
553
|
+
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
553
554
|
return t;
|
|
554
555
|
if (s != a) {
|
|
555
|
-
var p = l[
|
|
556
|
-
d = i ? i(p,
|
|
556
|
+
var p = l[c];
|
|
557
|
+
d = i ? i(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
|
|
557
558
|
}
|
|
558
|
-
|
|
559
|
+
Et(l, c, d), l = l[c];
|
|
559
560
|
}
|
|
560
561
|
return t;
|
|
561
562
|
}
|
|
@@ -574,8 +575,8 @@ class mr {
|
|
|
574
575
|
u(this, "componentPropsPreset", I.componentPropsPreset);
|
|
575
576
|
u(this, "stableUpdaterProcessProgress");
|
|
576
577
|
u(this, "stableUpdaterTimes", 0);
|
|
577
|
-
u(this, "schemaEffect", new
|
|
578
|
-
u(this, "defaultValueEffect", new
|
|
578
|
+
u(this, "schemaEffect", new Y());
|
|
579
|
+
u(this, "defaultValueEffect", new Y());
|
|
579
580
|
u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
580
581
|
u(this, "baseDefaultValueFunctionsLength");
|
|
581
582
|
u(this, "isModelInitialized", !0);
|
|
@@ -617,7 +618,7 @@ class mr {
|
|
|
617
618
|
// 派生过程,用于外部应用
|
|
618
619
|
parseSchemas(e, r) {
|
|
619
620
|
o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
|
|
620
|
-
|
|
621
|
+
C(e)
|
|
621
622
|
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, r);
|
|
622
623
|
}
|
|
623
624
|
parseStable(e) {
|
|
@@ -631,7 +632,7 @@ class mr {
|
|
|
631
632
|
// 对于稳定初始化更新的抽象
|
|
632
633
|
stableUpdater(e = []) {
|
|
633
634
|
if (e.every(Boolean)) {
|
|
634
|
-
const r =
|
|
635
|
+
const r = E(this.processedSchemas.value);
|
|
635
636
|
!o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
|
|
636
637
|
length: r.length
|
|
637
638
|
}).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
|
|
@@ -644,17 +645,17 @@ class mr {
|
|
|
644
645
|
}).fill(!1);
|
|
645
646
|
this.objectParser({ data: e, index: r, updater: a, parentMeta: i });
|
|
646
647
|
function a(l) {
|
|
647
|
-
const
|
|
648
|
+
const c = l.index, d = l.key, p = l.keyIndex;
|
|
648
649
|
if (o.isUndefined(l.stable))
|
|
649
650
|
return;
|
|
650
|
-
const
|
|
651
|
-
let
|
|
652
|
-
if (o.isProcessInprogress(
|
|
653
|
-
const g = s.processedSchemas.value[
|
|
654
|
-
g && o.isObject(g) && d !== "component" && (
|
|
651
|
+
const m = s.parseStable(l.stable), b = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
|
|
652
|
+
let v = m;
|
|
653
|
+
if (o.isProcessInprogress(v) || (n[p] = !0), i) {
|
|
654
|
+
const g = s.processedSchemas.value[b][S][c][d];
|
|
655
|
+
g && o.isObject(g) && d !== "component" && (v = h(g, v)), s.processedSchemas.value[b][S][c][d] = v, s.stableUpdater(n);
|
|
655
656
|
} else {
|
|
656
|
-
const g = s.processedSchemas.value[
|
|
657
|
-
g && o.isObject(g) && d !== "component" && (
|
|
657
|
+
const g = s.processedSchemas.value[c][d];
|
|
658
|
+
g && o.isObject(g) && d !== "component" && (v = h(g, v)), s.processedSchemas.value[c][d] = v, s.stableUpdater(n);
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
661
|
}
|
|
@@ -670,7 +671,7 @@ class mr {
|
|
|
670
671
|
keyIndex: n
|
|
671
672
|
});
|
|
672
673
|
else {
|
|
673
|
-
const
|
|
674
|
+
const c = (d) => {
|
|
674
675
|
e.updater({
|
|
675
676
|
...e,
|
|
676
677
|
key: s,
|
|
@@ -682,12 +683,12 @@ class mr {
|
|
|
682
683
|
() => {
|
|
683
684
|
if (s === "component") {
|
|
684
685
|
const d = r[s](this.getRuntimeMeta());
|
|
685
|
-
this.promiseFieldParser(d,
|
|
686
|
+
this.promiseFieldParser(d, c, !1, {
|
|
686
687
|
rootIndex: e.index,
|
|
687
688
|
parentMeta: e.parentMeta
|
|
688
689
|
});
|
|
689
690
|
} else
|
|
690
|
-
this.fieldParser(r[s],
|
|
691
|
+
this.fieldParser(r[s], c, {
|
|
691
692
|
rootIndex: e.index,
|
|
692
693
|
parentMeta: e.parentMeta
|
|
693
694
|
});
|
|
@@ -704,15 +705,15 @@ class mr {
|
|
|
704
705
|
r[s],
|
|
705
706
|
(p) => {
|
|
706
707
|
if (!p)
|
|
707
|
-
return
|
|
708
|
+
return c(p);
|
|
708
709
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
709
710
|
this.defaultValueInprogressMap.values()
|
|
710
|
-
).every((
|
|
711
|
-
var
|
|
712
|
-
return !((
|
|
713
|
-
}) ? (
|
|
711
|
+
).every((m) => {
|
|
712
|
+
var b;
|
|
713
|
+
return !((b = m == null ? void 0 : m.includes) != null && b.call(m, "undefined"));
|
|
714
|
+
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
714
715
|
d();
|
|
715
|
-
})) :
|
|
716
|
+
})) : c(p);
|
|
716
717
|
},
|
|
717
718
|
{
|
|
718
719
|
rootIndex: e.index,
|
|
@@ -723,12 +724,12 @@ class mr {
|
|
|
723
724
|
(p) => {
|
|
724
725
|
this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
725
726
|
this.defaultValueInprogressMap.values()
|
|
726
|
-
).every((
|
|
727
|
-
var
|
|
728
|
-
return !((
|
|
729
|
-
}) ? (
|
|
727
|
+
).every((m) => {
|
|
728
|
+
var b;
|
|
729
|
+
return !((b = m == null ? void 0 : m.includes) != null && b.call(m, "undefined"));
|
|
730
|
+
}) ? (c(p), this.defaultValueEffect.clearEffects(), P(() => {
|
|
730
731
|
d();
|
|
731
|
-
})) :
|
|
732
|
+
})) : c(p);
|
|
732
733
|
},
|
|
733
734
|
{
|
|
734
735
|
rootIndex: e.index,
|
|
@@ -744,10 +745,10 @@ class mr {
|
|
|
744
745
|
{
|
|
745
746
|
lazy: !1
|
|
746
747
|
}
|
|
747
|
-
) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s],
|
|
748
|
+
) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s], c, !1, {
|
|
748
749
|
rootIndex: e.index,
|
|
749
750
|
parentMeta: e.parentMeta
|
|
750
|
-
}) : this.fieldParser(r[s],
|
|
751
|
+
}) : this.fieldParser(r[s], c, {
|
|
751
752
|
rootIndex: e.index,
|
|
752
753
|
parentMeta: e.parentMeta
|
|
753
754
|
});
|
|
@@ -756,13 +757,13 @@ class mr {
|
|
|
756
757
|
}
|
|
757
758
|
promiseFieldParser(e, r, i, s) {
|
|
758
759
|
o.isPromise(e) ? e.then((n) => {
|
|
759
|
-
o.isString(n) && (n =
|
|
760
|
+
o.isString(n) && (n = X(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
760
761
|
data: n,
|
|
761
762
|
updater: r,
|
|
762
763
|
index: s.rootIndex,
|
|
763
764
|
parentMeta: s.parentMeta
|
|
764
765
|
}) : r(n);
|
|
765
|
-
}) : (o.isString(e) && (e =
|
|
766
|
+
}) : (o.isString(e) && (e = X(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
766
767
|
data: e,
|
|
767
768
|
updater: r,
|
|
768
769
|
index: s.rootIndex,
|
|
@@ -827,7 +828,7 @@ class mr {
|
|
|
827
828
|
modelProcessor(e) {
|
|
828
829
|
e.map(
|
|
829
830
|
(r) => this.createModel(r, this.processedModel.value)
|
|
830
|
-
), 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 = C(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
|
|
831
832
|
}
|
|
832
833
|
setModel(e, r, i) {
|
|
833
834
|
o.isFunction(r) ? D(e, r(), i) : e[r] = i;
|
|
@@ -851,62 +852,62 @@ class mr {
|
|
|
851
852
|
}
|
|
852
853
|
class w {
|
|
853
854
|
static getFormContainer({ ui: e } = {}) {
|
|
854
|
-
return
|
|
855
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.Form;
|
|
855
856
|
}
|
|
856
857
|
static getFormItemContainer({ ui: e } = {}) {
|
|
857
|
-
return
|
|
858
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.FormItem;
|
|
858
859
|
}
|
|
859
860
|
static getItemContainer({ ui: e } = {}) {
|
|
860
|
-
return
|
|
861
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.Item;
|
|
861
862
|
}
|
|
862
863
|
static getGroupContainer({ ui: e } = {}) {
|
|
863
|
-
return
|
|
864
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.Group;
|
|
864
865
|
}
|
|
865
866
|
static getListContainer({ ui: e } = {}) {
|
|
866
|
-
return
|
|
867
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.List;
|
|
867
868
|
}
|
|
868
869
|
static getListItemContainer({ ui: e } = {}) {
|
|
869
|
-
return
|
|
870
|
+
return f.presets.uiPresets[e ?? f.presets.ui].container.ListItem;
|
|
870
871
|
}
|
|
871
872
|
}
|
|
872
|
-
class
|
|
873
|
+
class yr {
|
|
873
874
|
constructor(e) {
|
|
874
875
|
this.ui = e;
|
|
875
876
|
}
|
|
876
877
|
getRuntimeNative() {
|
|
877
878
|
var r;
|
|
878
|
-
return (r =
|
|
879
|
+
return (r = f.presets.uiPresets[this.ui]) == null ? void 0 : r.native;
|
|
879
880
|
}
|
|
880
881
|
getRuntimeField(e) {
|
|
881
882
|
var s;
|
|
882
|
-
const r = (s =
|
|
883
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
|
|
883
884
|
return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
|
|
884
885
|
}
|
|
885
886
|
getRuntimeRequired(e) {
|
|
886
887
|
var s;
|
|
887
|
-
const r = (s =
|
|
888
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
|
|
888
889
|
return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
|
|
889
890
|
}
|
|
890
891
|
getFormModelPropName() {
|
|
891
892
|
var i;
|
|
892
|
-
const e = (i =
|
|
893
|
+
const e = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = I.adapters[f.getUI(this.ui)];
|
|
893
894
|
return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
|
|
894
895
|
}
|
|
895
896
|
formComponentRenderer(e) {
|
|
896
897
|
var s;
|
|
897
|
-
const r = (s =
|
|
898
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
|
|
898
899
|
return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
|
|
899
900
|
}
|
|
900
901
|
clearValidate(e) {
|
|
901
902
|
var s;
|
|
902
|
-
const r = (s =
|
|
903
|
+
const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
|
|
903
904
|
return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
|
|
904
905
|
}
|
|
905
906
|
}
|
|
906
907
|
function gr(t) {
|
|
907
908
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
|
|
908
909
|
}
|
|
909
|
-
class
|
|
910
|
+
class br {
|
|
910
911
|
constructor(e) {
|
|
911
912
|
u(this, "schemas", z([]));
|
|
912
913
|
u(this, "model", z({}));
|
|
@@ -916,11 +917,11 @@ class vr {
|
|
|
916
917
|
list: this.runtimeListProcessor.bind(this)
|
|
917
918
|
});
|
|
918
919
|
u(this, "formRef", z(null));
|
|
919
|
-
u(this, "hydrateEffect", new
|
|
920
|
-
u(this, "native",
|
|
920
|
+
u(this, "hydrateEffect", new Y());
|
|
921
|
+
u(this, "native", H({}));
|
|
921
922
|
u(this, "grid", {});
|
|
922
923
|
u(this, "runtime", {});
|
|
923
|
-
u(this, "globalNativeFormOverride",
|
|
924
|
+
u(this, "globalNativeFormOverride", H({
|
|
924
925
|
props: {
|
|
925
926
|
Form: {},
|
|
926
927
|
FormItem: {}
|
|
@@ -930,10 +931,10 @@ class vr {
|
|
|
930
931
|
FormItem: {}
|
|
931
932
|
}
|
|
932
933
|
}));
|
|
933
|
-
u(this, "shared",
|
|
934
|
+
u(this, "shared", H({}));
|
|
934
935
|
this.setup = e, this.processor = new mr(this);
|
|
935
936
|
const r = this.setup(this);
|
|
936
|
-
if (this.ui = r.ui ??
|
|
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))
|
|
937
938
|
_(
|
|
938
939
|
// @ts-expect-error
|
|
939
940
|
() => r.schemas.value,
|
|
@@ -946,7 +947,7 @@ class vr {
|
|
|
946
947
|
);
|
|
947
948
|
else if (U(r.schemas)) {
|
|
948
949
|
const i = _(() => r.schemas, () => {
|
|
949
|
-
this.processor.parseSchemas(r.schemas),
|
|
950
|
+
this.processor.parseSchemas(r.schemas), P(() => {
|
|
950
951
|
i();
|
|
951
952
|
});
|
|
952
953
|
}, {
|
|
@@ -957,69 +958,70 @@ class vr {
|
|
|
957
958
|
}
|
|
958
959
|
getRuntimeMeta() {
|
|
959
960
|
return {
|
|
960
|
-
model:
|
|
961
|
+
model: E(C(this.model.value)),
|
|
961
962
|
reactiveModel: this.model.value,
|
|
962
963
|
shared: this.shared,
|
|
963
964
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
964
965
|
share: (r) => {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
966
|
+
if (q(r)) {
|
|
967
|
+
const i = _(() => r.value, () => {
|
|
968
|
+
h(this.shared, r.value), P(() => {
|
|
969
|
+
i();
|
|
969
970
|
});
|
|
970
971
|
}, {
|
|
971
972
|
deep: !0,
|
|
972
973
|
immediate: !0
|
|
973
|
-
})
|
|
974
|
-
|
|
975
|
-
|
|
974
|
+
});
|
|
975
|
+
} else if (U(r)) {
|
|
976
|
+
const i = _(() => r, () => {
|
|
977
|
+
h(this.shared, r), P(() => {
|
|
978
|
+
i();
|
|
976
979
|
});
|
|
977
980
|
}, {
|
|
978
981
|
deep: !0,
|
|
979
982
|
immediate: !0
|
|
980
|
-
}) : b(this.shared, {
|
|
981
|
-
[i]: r[i]
|
|
982
983
|
});
|
|
983
|
-
}
|
|
984
|
+
} else
|
|
985
|
+
h(this.shared, r);
|
|
984
986
|
}
|
|
985
987
|
};
|
|
986
988
|
}
|
|
987
989
|
runtimeItemProcessor(e, r, i = this.model.value, s) {
|
|
988
|
-
var ie, se, ne, oe, ae, le, ue,
|
|
989
|
-
const n =
|
|
990
|
+
var ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ye, ge, be, ve;
|
|
991
|
+
const n = E(e.component);
|
|
990
992
|
if (!n)
|
|
991
993
|
return;
|
|
992
|
-
(se = (ie = e.native) == null ? void 0 : ie.props) != null && se.Form &&
|
|
993
|
-
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(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 = {
|
|
994
996
|
display: "grid",
|
|
995
997
|
gridColumn: "1 / -1",
|
|
996
998
|
...e.grid
|
|
997
|
-
},
|
|
999
|
+
}, 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({
|
|
998
1000
|
schema: e,
|
|
999
1001
|
parentSchema: s,
|
|
1000
1002
|
index: r
|
|
1001
|
-
}), p = n.name,
|
|
1002
|
-
let
|
|
1003
|
-
|
|
1003
|
+
}), p = n.name, m = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
|
|
1004
|
+
let S = e.placeholder, v = e.show;
|
|
1005
|
+
v === void 0 && (v = !0);
|
|
1004
1006
|
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 =
|
|
1007
|
+
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) {
|
|
1006
1008
|
let $ = "请输入";
|
|
1007
|
-
o.isUndefined(p) ?
|
|
1008
|
-
|
|
1009
|
-
p.toLowerCase().includes(_e.toLowerCase()) && ($ =
|
|
1010
|
-
}),
|
|
1009
|
+
o.isUndefined(p) ? S = `${$}${g}` : /* @ts-expect-error */ b[p.toLowerCase()] ? ($ = // @ts-expect-error
|
|
1010
|
+
b[p.toLowerCase()], S = `${$}${g}`) : (Object.keys(b).forEach((_e) => {
|
|
1011
|
+
p.toLowerCase().includes(_e.toLowerCase()) && ($ = b[_e]);
|
|
1012
|
+
}), S = `${$}${g}`);
|
|
1011
1013
|
}
|
|
1012
1014
|
const $e = this.runtimeAdapter.getRuntimeRequired({
|
|
1013
1015
|
...e,
|
|
1014
1016
|
label: g
|
|
1015
1017
|
}), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
|
|
1016
|
-
return
|
|
1018
|
+
return y("div", {
|
|
1017
1019
|
style: l
|
|
1018
|
-
}, [
|
|
1019
|
-
show:
|
|
1020
|
+
}, [y(Ve, {
|
|
1021
|
+
show: v
|
|
1020
1022
|
}, {
|
|
1021
1023
|
default() {
|
|
1022
|
-
return
|
|
1024
|
+
return v && y(Ne, N(c, {
|
|
1023
1025
|
label: `${g ? `${g}:` : ""}`
|
|
1024
1026
|
}, d, $e), {
|
|
1025
1027
|
default() {
|
|
@@ -1027,9 +1029,9 @@ class vr {
|
|
|
1027
1029
|
Component: n,
|
|
1028
1030
|
schema: e,
|
|
1029
1031
|
baseModel: i,
|
|
1030
|
-
placeholder:
|
|
1032
|
+
placeholder: S,
|
|
1031
1033
|
componentSlots: Ue,
|
|
1032
|
-
props:
|
|
1034
|
+
props: m
|
|
1033
1035
|
});
|
|
1034
1036
|
},
|
|
1035
1037
|
...a
|
|
@@ -1045,9 +1047,9 @@ class vr {
|
|
|
1045
1047
|
...e.grid
|
|
1046
1048
|
}, s = w.getGroupContainer(this);
|
|
1047
1049
|
let n = e.show;
|
|
1048
|
-
return n === void 0 && (n = !0),
|
|
1050
|
+
return n === void 0 && (n = !0), y("div", {
|
|
1049
1051
|
style: i
|
|
1050
|
-
}, [n &&
|
|
1052
|
+
}, [n && y(s, {
|
|
1051
1053
|
schema: e
|
|
1052
1054
|
}, gr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
|
|
1053
1055
|
default: () => [r]
|
|
@@ -1060,7 +1062,7 @@ class vr {
|
|
|
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(C(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);
|
|
@@ -1075,32 +1077,32 @@ class vr {
|
|
|
1075
1077
|
let s = e.show;
|
|
1076
1078
|
s === void 0 && (s = !0);
|
|
1077
1079
|
const n = w.getListContainer(this), a = w.getListItemContainer(this);
|
|
1078
|
-
return
|
|
1080
|
+
return y("div", {
|
|
1079
1081
|
style: r
|
|
1080
|
-
}, [s &&
|
|
1082
|
+
}, [s && y(n, {
|
|
1081
1083
|
schema: e
|
|
1082
1084
|
}, {
|
|
1083
1085
|
default() {
|
|
1084
|
-
return i.model.value[e.field].map((l,
|
|
1086
|
+
return i.model.value[e.field].map((l, c) => y(a, null, {
|
|
1085
1087
|
default() {
|
|
1086
|
-
return e.children.map((d) => i.runtimeItemProcessor(d,
|
|
1088
|
+
return e.children.map((d) => i.runtimeItemProcessor(d, c, l, e));
|
|
1087
1089
|
},
|
|
1088
1090
|
delete({
|
|
1089
1091
|
container: d
|
|
1090
1092
|
} = {}) {
|
|
1091
|
-
var
|
|
1092
|
-
const p = d ??
|
|
1093
|
-
return Le(
|
|
1094
|
-
onClick: () => i.deleteListItem(e,
|
|
1095
|
-
}, null), [[De, ((
|
|
1093
|
+
var m;
|
|
1094
|
+
const p = d ?? y("button", null, null);
|
|
1095
|
+
return Le(y(p, {
|
|
1096
|
+
onClick: () => i.deleteListItem(e, c)
|
|
1097
|
+
}, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
|
|
1096
1098
|
}
|
|
1097
1099
|
}));
|
|
1098
1100
|
},
|
|
1099
1101
|
add({
|
|
1100
1102
|
container: l
|
|
1101
1103
|
} = {}) {
|
|
1102
|
-
const
|
|
1103
|
-
return
|
|
1104
|
+
const c = l ?? y("button", null, [Ge("添加")]);
|
|
1105
|
+
return y(c, {
|
|
1104
1106
|
onClick: () => i.addListItem(e)
|
|
1105
1107
|
}, null);
|
|
1106
1108
|
}
|
|
@@ -1110,20 +1112,20 @@ class vr {
|
|
|
1110
1112
|
return e.map((r) => (r.type || (r.type = "item"), this.processorBySchemaType[r.type](r)));
|
|
1111
1113
|
}
|
|
1112
1114
|
exec() {
|
|
1113
|
-
var l,
|
|
1115
|
+
var l, c, d, p;
|
|
1114
1116
|
const e = {
|
|
1115
1117
|
display: "grid",
|
|
1116
1118
|
gridColumn: "1 / -1",
|
|
1117
1119
|
gridAutoColumns: "1fr",
|
|
1118
1120
|
...this.grid
|
|
1119
|
-
}, r = this, i =
|
|
1120
|
-
return
|
|
1121
|
+
}, 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();
|
|
1122
|
+
return y(n, N(i, {
|
|
1121
1123
|
ref: this.formRef
|
|
1122
1124
|
}, {
|
|
1123
1125
|
[a]: this.model.value
|
|
1124
1126
|
}), {
|
|
1125
1127
|
default() {
|
|
1126
|
-
return
|
|
1128
|
+
return y("div", {
|
|
1127
1129
|
style: e
|
|
1128
1130
|
}, [r.runtimeProcessor(r.schemas.value)]);
|
|
1129
1131
|
},
|
|
@@ -1131,7 +1133,7 @@ class vr {
|
|
|
1131
1133
|
});
|
|
1132
1134
|
}
|
|
1133
1135
|
}
|
|
1134
|
-
class
|
|
1136
|
+
class f {
|
|
1135
1137
|
static getPreset(e) {
|
|
1136
1138
|
var r, i, s;
|
|
1137
1139
|
return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
|
|
@@ -1141,18 +1143,18 @@ class c {
|
|
|
1141
1143
|
return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
|
|
1142
1144
|
}
|
|
1143
1145
|
}
|
|
1144
|
-
u(
|
|
1145
|
-
function
|
|
1146
|
+
u(f, "presets");
|
|
1147
|
+
function K({
|
|
1146
1148
|
parentSchema: t,
|
|
1147
1149
|
schema: e,
|
|
1148
1150
|
index: r
|
|
1149
1151
|
}) {
|
|
1150
1152
|
return t ? `${t.field}.${r}.${e.field}` : e.field;
|
|
1151
1153
|
}
|
|
1152
|
-
const
|
|
1154
|
+
const vr = {
|
|
1153
1155
|
ArcoVue: {
|
|
1154
1156
|
getRuntimeField(t) {
|
|
1155
|
-
const e =
|
|
1157
|
+
const e = K(t);
|
|
1156
1158
|
return o.isFunction(e) ? {
|
|
1157
1159
|
field: e()
|
|
1158
1160
|
} : {
|
|
@@ -1197,7 +1199,7 @@ const yr = {
|
|
|
1197
1199
|
props: n
|
|
1198
1200
|
}) {
|
|
1199
1201
|
let a;
|
|
1200
|
-
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({
|
|
1201
1203
|
modelValue: a,
|
|
1202
1204
|
"onUpdate:modelValue": (l) => {
|
|
1203
1205
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1209,7 +1211,7 @@ const yr = {
|
|
|
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(E(t.runtimeCore.processor.processedModel.value))));
|
|
1213
1215
|
});
|
|
1214
1216
|
},
|
|
1215
1217
|
clearValidate(t) {
|
|
@@ -1219,7 +1221,7 @@ const yr = {
|
|
|
1219
1221
|
},
|
|
1220
1222
|
NutUI: {
|
|
1221
1223
|
getRuntimeField(t) {
|
|
1222
|
-
const e =
|
|
1224
|
+
const e = K(t);
|
|
1223
1225
|
return o.isFunction(e) ? {
|
|
1224
1226
|
prop: e()
|
|
1225
1227
|
} : {
|
|
@@ -1265,7 +1267,7 @@ const yr = {
|
|
|
1265
1267
|
props: n
|
|
1266
1268
|
}) {
|
|
1267
1269
|
let a;
|
|
1268
|
-
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({
|
|
1269
1271
|
modelValue: a,
|
|
1270
1272
|
"onUpdate:modelValue": (l) => {
|
|
1271
1273
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1281,7 +1283,7 @@ const yr = {
|
|
|
1281
1283
|
valid: i,
|
|
1282
1284
|
errors: s
|
|
1283
1285
|
}) => {
|
|
1284
|
-
i ? e(t.cleanFallbackFields(
|
|
1286
|
+
i ? e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))) : r(s);
|
|
1285
1287
|
});
|
|
1286
1288
|
});
|
|
1287
1289
|
},
|
|
@@ -1292,7 +1294,7 @@ const yr = {
|
|
|
1292
1294
|
},
|
|
1293
1295
|
NaiveUI: {
|
|
1294
1296
|
getRuntimeField(t) {
|
|
1295
|
-
const e =
|
|
1297
|
+
const e = K(t);
|
|
1296
1298
|
return o.isFunction(e) ? {
|
|
1297
1299
|
path: e()
|
|
1298
1300
|
} : {
|
|
@@ -1340,7 +1342,7 @@ const yr = {
|
|
|
1340
1342
|
props: n
|
|
1341
1343
|
}) {
|
|
1342
1344
|
let a;
|
|
1343
|
-
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({
|
|
1344
1346
|
value: a,
|
|
1345
1347
|
"onUpdate:value": (l) => {
|
|
1346
1348
|
o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
|
|
@@ -1352,7 +1354,7 @@ const yr = {
|
|
|
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(E(t.runtimeCore.processor.processedModel.value))));
|
|
1356
1358
|
});
|
|
1357
1359
|
},
|
|
1358
1360
|
clearValidate(t) {
|
|
@@ -1425,13 +1427,13 @@ u(M, "schemaPreset", {
|
|
|
1425
1427
|
}
|
|
1426
1428
|
}), // 基于基本功能提出基本预设
|
|
1427
1429
|
u(M, "placeholderPresetByComponentName", M.getPlaceholderPrefixPresetByComponentName());
|
|
1428
|
-
let
|
|
1430
|
+
let Z = M;
|
|
1429
1431
|
const I = {
|
|
1430
|
-
...
|
|
1432
|
+
...Z,
|
|
1431
1433
|
adapters: {
|
|
1432
|
-
...
|
|
1434
|
+
...vr
|
|
1433
1435
|
}
|
|
1434
|
-
},
|
|
1436
|
+
}, Cr = /* @__PURE__ */ ke({
|
|
1435
1437
|
props: {
|
|
1436
1438
|
setup: {
|
|
1437
1439
|
type: Function,
|
|
@@ -1439,12 +1441,12 @@ const I = {
|
|
|
1439
1441
|
}
|
|
1440
1442
|
},
|
|
1441
1443
|
setup(t) {
|
|
1442
|
-
const e = new
|
|
1444
|
+
const e = new br(t.setup);
|
|
1443
1445
|
return () => e.exec();
|
|
1444
1446
|
}
|
|
1445
1447
|
});
|
|
1446
|
-
function
|
|
1447
|
-
const e = new
|
|
1448
|
+
function Ir(t) {
|
|
1449
|
+
const e = new He(t);
|
|
1448
1450
|
return [
|
|
1449
1451
|
e.setup.bind(e),
|
|
1450
1452
|
{
|
|
@@ -1456,8 +1458,8 @@ function Cr(t) {
|
|
|
1456
1458
|
}
|
|
1457
1459
|
];
|
|
1458
1460
|
}
|
|
1459
|
-
function
|
|
1460
|
-
|
|
1461
|
+
function Sr(t) {
|
|
1462
|
+
f.presets = t;
|
|
1461
1463
|
}
|
|
1462
1464
|
function re(t, e) {
|
|
1463
1465
|
return e === "native" && Object.defineProperty(t, "name", {
|
|
@@ -1471,13 +1473,13 @@ function re(t, e) {
|
|
|
1471
1473
|
writable: !0
|
|
1472
1474
|
}), t;
|
|
1473
1475
|
}
|
|
1474
|
-
function
|
|
1476
|
+
function Or(t) {
|
|
1475
1477
|
return re(t, "native");
|
|
1476
1478
|
}
|
|
1477
|
-
function
|
|
1479
|
+
function Fr(t) {
|
|
1478
1480
|
return t.__proform_raw_object = !0, t;
|
|
1479
1481
|
}
|
|
1480
|
-
function
|
|
1482
|
+
function jr(t) {
|
|
1481
1483
|
return re(t, "onetime");
|
|
1482
1484
|
}
|
|
1483
1485
|
function wr(t) {
|
|
@@ -1490,12 +1492,12 @@ function wr(t) {
|
|
|
1490
1492
|
);
|
|
1491
1493
|
}
|
|
1492
1494
|
export {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1495
|
+
Cr as ProForm,
|
|
1496
|
+
Or as markNativeFunction,
|
|
1497
|
+
Fr as markNativeObject,
|
|
1498
|
+
jr as markOnetimeFunction,
|
|
1497
1499
|
wr as markStructuredPathParsing,
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
+
Ir as useForm,
|
|
1501
|
+
Sr as useFormPresetConfigurer,
|
|
1500
1502
|
re as useModifiers
|
|
1501
1503
|
};
|