@harbor-design/proform 1.3.5 → 1.3.6

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.
Files changed (2) hide show
  1. package/dist/index.js +243 -243
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -72,49 +72,49 @@ class o {
72
72
  function h(t, ...e) {
73
73
  return e.forEach((r) => {
74
74
  if (Array.isArray(r))
75
- Array.isArray(t) || (t = []), r.forEach((i, s) => {
76
- typeof i == "object" && i !== null ? t[s] = h(Array.isArray(i) ? [] : {}, i) : t[s] = i;
75
+ Array.isArray(t) || (t = []), r.forEach((s, i) => {
76
+ typeof s == "object" && s !== null ? t[i] = h(Array.isArray(s) ? [] : {}, s) : t[i] = s;
77
77
  });
78
78
  else
79
- for (const i in r)
80
- r.hasOwnProperty(i) && (typeof r[i] == "object" && r[i] !== null ? t[i] = h(t[i] || {}, r[i]) : t[i] = r[i]);
79
+ for (const s in r)
80
+ r.hasOwnProperty(s) && (typeof r[s] == "object" && r[s] !== null ? t[s] = h(t[s] || {}, r[s]) : t[s] = r[s]);
81
81
  }), t;
82
82
  }
83
83
  function C(t) {
84
84
  const e = /* @__PURE__ */ new WeakMap();
85
- function r(i) {
86
- if (i === null || typeof i != "object")
87
- return i;
88
- if (i instanceof Date)
89
- return new Date(i);
90
- if (i instanceof RegExp)
91
- return new RegExp(i);
92
- if (i instanceof Map) {
85
+ function r(s) {
86
+ if (s === null || typeof s != "object")
87
+ return s;
88
+ if (s instanceof Date)
89
+ return new Date(s);
90
+ if (s instanceof RegExp)
91
+ return new RegExp(s);
92
+ if (s instanceof Map) {
93
93
  const n = /* @__PURE__ */ new Map();
94
- for (const [a, l] of i)
94
+ for (const [a, l] of s)
95
95
  n.set(r(a), r(l));
96
96
  return n;
97
97
  }
98
- if (i instanceof Set) {
98
+ if (s instanceof Set) {
99
99
  const n = /* @__PURE__ */ new Set();
100
- for (const a of i)
100
+ for (const a of s)
101
101
  n.add(r(a));
102
102
  return n;
103
103
  }
104
- if (e.has(i))
105
- return e.get(i);
106
- if (Array.isArray(i)) {
104
+ if (e.has(s))
105
+ return e.get(s);
106
+ if (Array.isArray(s)) {
107
107
  const n = [];
108
- e.set(i, n);
109
- for (let a = 0; a < i.length; a++)
110
- n[a] = r(i[a]);
108
+ e.set(s, n);
109
+ for (let a = 0; a < s.length; a++)
110
+ n[a] = r(s[a]);
111
111
  return n;
112
112
  }
113
- const s = Object.create(Object.getPrototypeOf(i));
114
- e.set(i, s);
115
- for (const n in i)
116
- i.hasOwnProperty(n) && (s[n] = r(i[n]));
117
- return s;
113
+ const i = Object.create(Object.getPrototypeOf(s));
114
+ e.set(s, i);
115
+ for (const n in s)
116
+ s.hasOwnProperty(n) && (i[n] = r(s[n]));
117
+ return i;
118
118
  }
119
119
  return r(t);
120
120
  }
@@ -137,8 +137,8 @@ class ke {
137
137
  return this.runtimeCore = e, this.readonlyReactiveModel.value = _e(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
- var i;
141
- const e = (i = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = I.adapters[f.getUI(this.runtimeCore.ui)];
140
+ var s;
141
+ const e = (s = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : s.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) {
@@ -207,8 +207,8 @@ class ke {
207
207
  P(() => {
208
208
  const r = _(
209
209
  () => this.readonlyReactiveModel.value,
210
- (i) => {
211
- e(i, {
210
+ (s) => {
211
+ e(s, {
212
212
  stopSubscribe() {
213
213
  P(() => {
214
214
  r();
@@ -247,43 +247,43 @@ class X {
247
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);
248
248
  }
249
249
  }
250
- var He = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self, Z = He || Ke || Function("return this")(), x = Z.Symbol, Ee = Object.prototype, Xe = Ee.hasOwnProperty, Ye = Ee.toString, V = x ? x.toStringTag : void 0;
250
+ var He = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self, Z = He || Ke || Function("return this")(), x = Z.Symbol, je = Object.prototype, Xe = je.hasOwnProperty, Ye = je.toString, V = x ? x.toStringTag : void 0;
251
251
  function Ze(t) {
252
252
  var e = Xe.call(t, V), r = t[V];
253
253
  try {
254
254
  t[V] = void 0;
255
- var i = !0;
255
+ var s = !0;
256
256
  } catch {
257
257
  }
258
- var s = Ye.call(t);
259
- return i && (e ? t[V] = r : delete t[V]), s;
258
+ var i = Ye.call(t);
259
+ return s && (e ? t[V] = r : delete t[V]), i;
260
260
  }
261
261
  var Je = Object.prototype, Qe = Je.toString;
262
262
  function Ae(t) {
263
263
  return Qe.call(t);
264
264
  }
265
265
  var et = "[object Null]", tt = "[object Undefined]", Ce = x ? x.toStringTag : void 0;
266
- function Me(t) {
266
+ function Ee(t) {
267
267
  return t == null ? t === void 0 ? tt : et : Ce && Ce in Object(t) ? Ze(t) : Ae(t);
268
268
  }
269
269
  function rt(t) {
270
270
  return t != null && typeof t == "object";
271
271
  }
272
- var it = "[object Symbol]";
272
+ var st = "[object Symbol]";
273
273
  function J(t) {
274
- return typeof t == "symbol" || rt(t) && Me(t) == it;
274
+ return typeof t == "symbol" || rt(t) && Ee(t) == st;
275
275
  }
276
- function st(t, e) {
277
- for (var r = -1, i = t == null ? 0 : t.length, s = Array(i); ++r < i; )
278
- s[r] = e(t[r], r, t);
279
- return s;
276
+ function it(t, e) {
277
+ for (var r = -1, s = t == null ? 0 : t.length, i = Array(s); ++r < s; )
278
+ i[r] = e(t[r], r, t);
279
+ return i;
280
280
  }
281
281
  var Q = Array.isArray, nt = 1 / 0, Ie = x ? x.prototype : void 0, Se = Ie ? Ie.toString : void 0;
282
282
  function we(t) {
283
283
  if (typeof t == "string")
284
284
  return t;
285
285
  if (Q(t))
286
- return st(t, we) + "";
286
+ return it(t, we) + "";
287
287
  if (J(t))
288
288
  return Se ? Se.call(t) : "";
289
289
  var e = t + "";
@@ -297,7 +297,7 @@ var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object Gener
297
297
  function ct(t) {
298
298
  if (!G(t))
299
299
  return !1;
300
- var e = Me(t);
300
+ var e = Ee(t);
301
301
  return e == at || e == lt || e == ot || e == ut;
302
302
  }
303
303
  var k = Z["__core-js_shared__"], Oe = function() {
@@ -337,19 +337,19 @@ function A(t, e) {
337
337
  var r = It(t, e);
338
338
  return Ct(r) ? r : void 0;
339
339
  }
340
- var je = function() {
340
+ var Me = function() {
341
341
  try {
342
342
  var t = A(Object, "defineProperty");
343
343
  return t({}, "", {}), t;
344
344
  } catch {
345
345
  }
346
346
  }(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
347
- function jt(t, e) {
347
+ function Mt(t, e) {
348
348
  var r = typeof t;
349
349
  return e = e ?? St, !!e && (r == "number" || r != "symbol" && Ot.test(t)) && t > -1 && t % 1 == 0 && t < e;
350
350
  }
351
- function Et(t, e, r) {
352
- e == "__proto__" && je ? je(t, e, {
351
+ function jt(t, e, r) {
352
+ e == "__proto__" && Me ? Me(t, e, {
353
353
  configurable: !0,
354
354
  enumerable: !0,
355
355
  value: r,
@@ -359,10 +359,10 @@ function Et(t, e, r) {
359
359
  function Fe(t, e) {
360
360
  return t === e || t !== t && e !== e;
361
361
  }
362
- var Mt = Object.prototype, wt = Mt.hasOwnProperty;
362
+ var Et = Object.prototype, wt = Et.hasOwnProperty;
363
363
  function Ft(t, e, r) {
364
- var i = t[e];
365
- (!(wt.call(t, e) && Fe(i, r)) || r === void 0 && !(e in t)) && Et(t, e, r);
364
+ var s = t[e];
365
+ (!(wt.call(t, e) && Fe(s, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
366
366
  }
367
367
  var xt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
368
368
  function $t(t, e) {
@@ -398,18 +398,18 @@ function Bt(t, e) {
398
398
  var r = this.__data__;
399
399
  return this.size += this.has(t) ? 0 : 1, r[t] = U && e === void 0 ? Wt : e, this;
400
400
  }
401
- function j(t) {
401
+ function M(t) {
402
402
  var e = -1, r = t == null ? 0 : t.length;
403
403
  for (this.clear(); ++e < r; ) {
404
- var i = t[e];
405
- this.set(i[0], i[1]);
404
+ var s = t[e];
405
+ this.set(s[0], s[1]);
406
406
  }
407
407
  }
408
- j.prototype.clear = Vt;
409
- j.prototype.delete = Nt;
410
- j.prototype.get = zt;
411
- j.prototype.has = Gt;
412
- j.prototype.set = Bt;
408
+ M.prototype.clear = Vt;
409
+ M.prototype.delete = Nt;
410
+ M.prototype.get = zt;
411
+ M.prototype.has = Gt;
412
+ M.prototype.set = Bt;
413
413
  function kt() {
414
414
  this.__data__ = [], this.size = 0;
415
415
  }
@@ -424,8 +424,8 @@ function Xt(t) {
424
424
  var e = this.__data__, r = W(e, t);
425
425
  if (r < 0)
426
426
  return !1;
427
- var i = e.length - 1;
428
- return r == i ? e.pop() : Kt.call(e, r, 1), --this.size, !0;
427
+ var s = e.length - 1;
428
+ return r == s ? e.pop() : Kt.call(e, r, 1), --this.size, !0;
429
429
  }
430
430
  function Yt(t) {
431
431
  var e = this.__data__, r = W(e, t);
@@ -435,14 +435,14 @@ function Zt(t) {
435
435
  return W(this.__data__, t) > -1;
436
436
  }
437
437
  function Jt(t, e) {
438
- var r = this.__data__, i = W(r, t);
439
- return i < 0 ? (++this.size, r.push([t, e])) : r[i][1] = e, this;
438
+ var r = this.__data__, s = W(r, t);
439
+ return s < 0 ? (++this.size, r.push([t, e])) : r[s][1] = e, this;
440
440
  }
441
441
  function R(t) {
442
442
  var e = -1, r = t == null ? 0 : t.length;
443
443
  for (this.clear(); ++e < r; ) {
444
- var i = t[e];
445
- this.set(i[0], i[1]);
444
+ var s = t[e];
445
+ this.set(s[0], s[1]);
446
446
  }
447
447
  }
448
448
  R.prototype.clear = kt;
@@ -453,9 +453,9 @@ R.prototype.set = Jt;
453
453
  var Qt = A(Z, "Map");
454
454
  function At() {
455
455
  this.size = 0, this.__data__ = {
456
- hash: new j(),
456
+ hash: new M(),
457
457
  map: new (Qt || R)(),
458
- string: new j()
458
+ string: new M()
459
459
  };
460
460
  }
461
461
  function er(t) {
@@ -473,50 +473,50 @@ function tr(t) {
473
473
  function rr(t) {
474
474
  return B(this, t).get(t);
475
475
  }
476
- function ir(t) {
476
+ function sr(t) {
477
477
  return B(this, t).has(t);
478
478
  }
479
- function sr(t, e) {
480
- var r = B(this, t), i = r.size;
481
- return r.set(t, e), this.size += r.size == i ? 0 : 1, this;
479
+ function ir(t, e) {
480
+ var r = B(this, t), s = r.size;
481
+ return r.set(t, e), this.size += r.size == s ? 0 : 1, this;
482
482
  }
483
- function E(t) {
483
+ function j(t) {
484
484
  var e = -1, r = t == null ? 0 : t.length;
485
485
  for (this.clear(); ++e < r; ) {
486
- var i = t[e];
487
- this.set(i[0], i[1]);
486
+ var s = t[e];
487
+ this.set(s[0], s[1]);
488
488
  }
489
489
  }
490
- E.prototype.clear = At;
491
- E.prototype.delete = tr;
492
- E.prototype.get = rr;
493
- E.prototype.has = ir;
494
- E.prototype.set = sr;
490
+ j.prototype.clear = At;
491
+ j.prototype.delete = tr;
492
+ j.prototype.get = rr;
493
+ j.prototype.has = sr;
494
+ j.prototype.set = ir;
495
495
  var nr = "Expected a function";
496
496
  function ee(t, e) {
497
497
  if (typeof t != "function" || e != null && typeof e != "function")
498
498
  throw new TypeError(nr);
499
499
  var r = function() {
500
- var i = arguments, s = e ? e.apply(this, i) : i[0], n = r.cache;
501
- if (n.has(s))
502
- return n.get(s);
503
- var a = t.apply(this, i);
504
- return r.cache = n.set(s, a) || n, a;
500
+ var s = arguments, i = e ? e.apply(this, s) : s[0], n = r.cache;
501
+ if (n.has(i))
502
+ return n.get(i);
503
+ var a = t.apply(this, s);
504
+ return r.cache = n.set(i, a) || n, a;
505
505
  };
506
- return r.cache = new (ee.Cache || E)(), r;
506
+ return r.cache = new (ee.Cache || j)(), r;
507
507
  }
508
- ee.Cache = E;
508
+ ee.Cache = j;
509
509
  var or = 500;
510
510
  function ar(t) {
511
- var e = ee(t, function(i) {
512
- return r.size === or && r.clear(), i;
511
+ var e = ee(t, function(s) {
512
+ return r.size === or && r.clear(), s;
513
513
  }), r = e.cache;
514
514
  return e;
515
515
  }
516
516
  var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, cr = ar(function(t) {
517
517
  var e = [];
518
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, i, s, n) {
519
- e.push(s ? n.replace(ur, "$1") : i || r);
518
+ return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, s, i, n) {
519
+ e.push(i ? n.replace(ur, "$1") : s || r);
520
520
  }), e;
521
521
  });
522
522
  function fr(t) {
@@ -534,25 +534,25 @@ function Re(t) {
534
534
  }
535
535
  function pr(t, e) {
536
536
  e = xe(e, t);
537
- for (var r = 0, i = e.length; t != null && r < i; )
537
+ for (var r = 0, s = e.length; t != null && r < s; )
538
538
  t = t[Re(e[r++])];
539
- return r && r == i ? t : void 0;
539
+ return r && r == s ? t : void 0;
540
540
  }
541
541
  function L(t, e, r) {
542
- var i = t == null ? void 0 : pr(t, e);
543
- return i === void 0 ? r : i;
542
+ var s = t == null ? void 0 : pr(t, e);
543
+ return s === void 0 ? r : s;
544
544
  }
545
- function hr(t, e, r, i) {
545
+ function hr(t, e, r, s) {
546
546
  if (!G(t))
547
547
  return t;
548
548
  e = xe(e, t);
549
- for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
550
- var c = Re(e[s]), d = r;
549
+ for (var i = -1, n = e.length, a = n - 1, l = t; l != null && ++i < n; ) {
550
+ var c = Re(e[i]), d = r;
551
551
  if (c === "__proto__" || c === "constructor" || c === "prototype")
552
552
  return t;
553
- if (s != a) {
553
+ if (i != a) {
554
554
  var p = l[c];
555
- d = i ? i(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : jt(e[s + 1]) ? [] : {});
555
+ d = s ? s(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : Mt(e[i + 1]) ? [] : {});
556
556
  }
557
557
  Ft(l, c, d), l = l[c];
558
558
  }
@@ -594,28 +594,28 @@ class mr {
594
594
  }
595
595
  // 核心处理过程,接收一个初始的代理数据结构,由其衍生的有 parseSchema
596
596
  parse(e, r) {
597
- e.forEach((i, s) => {
598
- this.parseItem(i, s, r);
597
+ e.forEach((s, i) => {
598
+ this.parseItem(s, i, r);
599
599
  });
600
600
  }
601
601
  // 初始化空数据结构,避免后续复杂的 if else
602
602
  initSchemas(e) {
603
603
  return e.map((r) => {
604
- const i = {};
605
- return r.children && (i.children = this.initSchemas(r.children)), i;
604
+ const s = {};
605
+ return r.children && (s.children = this.initSchemas(r.children)), s;
606
606
  });
607
607
  }
608
608
  countFunctionDefaultValues(e) {
609
609
  let r = 0;
610
- const i = /* @__PURE__ */ new Set();
611
- function s(n) {
612
- if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
613
- i.add(n);
610
+ const s = /* @__PURE__ */ new Set();
611
+ function i(n) {
612
+ if (!s.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
613
+ s.add(n);
614
614
  for (const a in n)
615
- n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, s(n[a]));
615
+ n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, i(n[a]));
616
616
  }
617
617
  }
618
- return s(e), r;
618
+ return i(e), r;
619
619
  }
620
620
  // 派生过程,用于外部应用
621
621
  parseSchemas(e, r) {
@@ -641,74 +641,74 @@ class mr {
641
641
  }
642
642
  }
643
643
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
644
- parseItem(e, r, i) {
645
- const s = this, n = Array.from({
644
+ parseItem(e, r, s) {
645
+ const i = this, n = Array.from({
646
646
  length: Object.keys(e).filter((l) => l !== "children").length
647
647
  }).fill(!1);
648
- this.objectParser({ data: e, index: r, updater: a, parentMeta: i });
648
+ this.objectParser({ data: e, index: r, updater: a, parentMeta: s });
649
649
  function a(l) {
650
650
  const c = l.index, d = l.key, p = l.keyIndex;
651
651
  if (o.isUndefined(l.stable))
652
652
  return;
653
- const m = s.parseStable(l.stable), b = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
653
+ const m = i.parseStable(l.stable), b = s == null ? void 0 : s.index, S = s == null ? void 0 : s.key;
654
654
  let v = m;
655
- if (o.isProcessInprogress(v) || (n[p] = !0), i) {
656
- const y = s.processedSchemas.value[b][S][c][d];
657
- y && o.isObject(y) && d !== "component" && (v = h(y, v)), s.processedSchemas.value[b][S][c][d] = v, s.stableUpdater(n);
655
+ if (o.isProcessInprogress(v) || (n[p] = !0), s) {
656
+ const y = i.processedSchemas.value[b][S][c][d];
657
+ y && o.isObject(y) && d !== "component" && (v = h(y, v)), i.processedSchemas.value[b][S][c][d] = v, i.stableUpdater(n);
658
658
  } else {
659
- const y = s.processedSchemas.value[c][d];
660
- y && o.isObject(y) && d !== "component" && (v = h(y, v)), s.processedSchemas.value[c][d] = v, s.stableUpdater(n);
659
+ const y = i.processedSchemas.value[c][d];
660
+ y && o.isObject(y) && d !== "component" && (v = h(y, v)), i.processedSchemas.value[c][d] = v, i.stableUpdater(n);
661
661
  }
662
662
  }
663
663
  }
664
664
  // 只做基本的对象 parser
665
665
  objectParser(e) {
666
666
  const r = e.data;
667
- Object.keys(r).forEach((s, n) => {
667
+ Object.keys(r).forEach((i, n) => {
668
668
  var a, l;
669
- if (s === "children")
670
- this.parseSchemas(r[s], {
669
+ if (i === "children")
670
+ this.parseSchemas(r[i], {
671
671
  ...e,
672
- key: s,
672
+ key: i,
673
673
  keyIndex: n
674
674
  });
675
675
  else {
676
676
  const c = (d) => {
677
677
  e.updater({
678
678
  ...e,
679
- key: s,
679
+ key: i,
680
680
  keyIndex: n,
681
681
  stable: d
682
682
  });
683
683
  };
684
- o.isFunction(r[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
684
+ o.isFunction(r[i]) ? i !== "defaultValue" ? this.schemaEffect.trackEffect(
685
685
  () => {
686
- if (s === "component") {
687
- const d = r[s](this.getRuntimeMeta());
686
+ if (i === "component") {
687
+ const d = r[i](this.getRuntimeMeta());
688
688
  this.promiseFieldParser(d, c, !1, {
689
689
  rootIndex: e.index,
690
690
  parentMeta: e.parentMeta
691
691
  });
692
692
  } else
693
- this.fieldParser(r[s], c, {
693
+ this.fieldParser(r[i], c, {
694
694
  rootIndex: e.index,
695
695
  parentMeta: e.parentMeta
696
696
  });
697
697
  },
698
698
  {
699
699
  lazy: !1,
700
- identifier: `${(a = e.parentMeta) == null ? void 0 : a.key}${(l = e.parentMeta) == null ? void 0 : l.index}${e.index}${s}${n}`
700
+ identifier: `${(a = e.parentMeta) == null ? void 0 : a.key}${(l = e.parentMeta) == null ? void 0 : l.index}${e.index}${i}${n}`
701
701
  }
702
702
  ) : this.defaultValueEffect.trackEffect(
703
703
  () => {
704
704
  const d = this.schemaEffect.trackEffect(
705
705
  () => {
706
- /\{\s*model\s*\}/.test(r[s].toString()) ? this.fieldParser(
707
- r[s],
706
+ /\{\s*model\s*\}/.test(r[i].toString()) ? this.fieldParser(
707
+ r[i],
708
708
  (p) => {
709
709
  if (!p)
710
710
  return c(p);
711
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
711
+ this.defaultValueInprogressMap.set(r[i], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
712
712
  this.defaultValueInprogressMap.values()
713
713
  ).every((m) => {
714
714
  var b;
@@ -722,9 +722,9 @@ class mr {
722
722
  parentMeta: e.parentMeta
723
723
  }
724
724
  ) : this.fieldParser(
725
- r[s],
725
+ r[i],
726
726
  (p) => {
727
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
727
+ this.defaultValueInprogressMap.set(r[i], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
728
728
  this.defaultValueInprogressMap.values()
729
729
  ).every((m) => {
730
730
  var b;
@@ -747,33 +747,33 @@ class mr {
747
747
  {
748
748
  lazy: !1
749
749
  }
750
- ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s], c, !1, {
750
+ ) : i === "component" || i === "slots" || i === "runtime" ? this.promiseFieldParser(r[i], c, !1, {
751
751
  rootIndex: e.index,
752
752
  parentMeta: e.parentMeta
753
- }) : this.fieldParser(r[s], c, {
753
+ }) : this.fieldParser(r[i], c, {
754
754
  rootIndex: e.index,
755
755
  parentMeta: e.parentMeta
756
756
  });
757
757
  }
758
758
  });
759
759
  }
760
- promiseFieldParser(e, r, i, s) {
760
+ promiseFieldParser(e, r, s, i) {
761
761
  o.isPromise(e) ? e.then((n) => {
762
- o.isString(n) && (n = K(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
762
+ o.isString(n) && (n = K(n, "")), s && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
763
763
  data: n,
764
764
  updater: r,
765
- index: s.rootIndex,
766
- parentMeta: s.parentMeta
765
+ index: i.rootIndex,
766
+ parentMeta: i.parentMeta
767
767
  }) : r(n);
768
- }) : (o.isString(e) && (e = K(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
768
+ }) : (o.isString(e) && (e = K(e, "")), s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
769
769
  data: e,
770
770
  updater: r,
771
- index: s.rootIndex,
772
- parentMeta: s.parentMeta
771
+ index: i.rootIndex,
772
+ parentMeta: i.parentMeta
773
773
  }) : r(e));
774
774
  }
775
775
  // 对任意对象中单个字段的 parse: 做基本处理
776
- fieldParser(e, r, i, s = !0) {
776
+ fieldParser(e, r, s, i = !0) {
777
777
  if (o.isFunction(e))
778
778
  if (e.name.startsWith("__proform_raw_"))
779
779
  r(
@@ -786,20 +786,20 @@ class mr {
786
786
  r(e);
787
787
  else if (e.__proform_cached_result) {
788
788
  const n = e.__proform_cached_result;
789
- this.promiseFieldParser(n, r, s, i);
789
+ this.promiseFieldParser(n, r, i, s);
790
790
  } else {
791
791
  const n = e(this.getRuntimeMeta());
792
- e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, s, i);
792
+ e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, i, s);
793
793
  }
794
794
  else
795
795
  T(e) ? _(
796
796
  () => e.value,
797
797
  () => {
798
- o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
798
+ o.isUndefined(e.value) || (i && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
799
799
  data: e.value,
800
800
  updater: r,
801
- index: i.rootIndex,
802
- parentMeta: i.parentMeta
801
+ index: s.rootIndex,
802
+ parentMeta: s.parentMeta
803
803
  }) : r(e.value));
804
804
  },
805
805
  {
@@ -809,22 +809,22 @@ class mr {
809
809
  ) : q(e) ? _(
810
810
  () => e,
811
811
  () => {
812
- this.reactiveWatchMap.get(e) || (this.reactiveWatchMap.set(e, !0), !o.isArrayEmpty(e) && !o.isObjectEmpty(e) && (o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
812
+ this.reactiveWatchMap.get(e) || (this.reactiveWatchMap.set(e, !0), !o.isArrayEmpty(e) && !o.isObjectEmpty(e) && (o.isUndefined(e) || (i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
813
813
  data: e,
814
814
  updater: r,
815
- index: i.rootIndex,
816
- parentMeta: i.parentMeta
815
+ index: s.rootIndex,
816
+ parentMeta: s.parentMeta
817
817
  }) : r(e))));
818
818
  },
819
819
  {
820
820
  immediate: !0,
821
821
  deep: !0
822
822
  }
823
- ) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
823
+ ) : i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
824
824
  data: e,
825
825
  updater: r,
826
- index: i.rootIndex,
827
- parentMeta: i.parentMeta
826
+ index: s.rootIndex,
827
+ parentMeta: s.parentMeta
828
828
  }) : r(e);
829
829
  }
830
830
  modelProcessor(e) {
@@ -832,14 +832,14 @@ class mr {
832
832
  (r) => this.createModel(r, this.processedModel.value)
833
833
  ), 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());
834
834
  }
835
- setModel(e, r, i) {
836
- o.isFunction(r) ? D(e, r(), i) : e[r] = i;
835
+ setModel(e, r, s) {
836
+ o.isFunction(r) ? D(e, r(), s) : e[r] = s;
837
837
  }
838
838
  createModel(e, r) {
839
- if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((i) => {
840
- this.createModel(i, r[e.field][0]);
841
- })), o.isGroupSchema(e) && e.children.forEach((i) => {
842
- this.createModel(i, r);
839
+ if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((s) => {
840
+ this.createModel(s, r[e.field][0]);
841
+ })), o.isGroupSchema(e) && e.children.forEach((s) => {
842
+ this.createModel(s, r);
843
843
  }), o.isItemSchema(e))
844
844
  if ("defaultValue" in e)
845
845
  this.setModel(r, e.field, e.defaultValue);
@@ -852,7 +852,7 @@ class mr {
852
852
  }
853
853
  }
854
854
  }
855
- class M {
855
+ class E {
856
856
  static getFormContainer({ ui: e } = {}) {
857
857
  return f.presets.uiPresets[e ?? f.presets.ui].container.Form;
858
858
  }
@@ -881,29 +881,29 @@ class gr {
881
881
  return (r = f.presets.uiPresets[this.ui]) == null ? void 0 : r.native;
882
882
  }
883
883
  getRuntimeField(e) {
884
- var s;
885
- const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
886
- return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
884
+ var i;
885
+ const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
886
+ return (r == null ? void 0 : r.getRuntimeField(e)) ?? (s == null ? void 0 : s.getRuntimeField(e));
887
887
  }
888
888
  getRuntimeRequired(e) {
889
- var s;
890
- const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
891
- return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
889
+ var i;
890
+ const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
891
+ return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (s == null ? void 0 : s.getRuntimeRequired(e));
892
892
  }
893
893
  getFormModelPropName() {
894
- var i;
895
- const e = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = I.adapters[f.getUI(this.ui)];
894
+ var s;
895
+ const e = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, r = I.adapters[f.getUI(this.ui)];
896
896
  return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
897
897
  }
898
898
  formComponentRenderer(e) {
899
- var s;
900
- const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
901
- return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
899
+ var i;
900
+ const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
901
+ return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (s == null ? void 0 : s.formComponentRenderer(e));
902
902
  }
903
903
  clearValidate(e) {
904
- var s;
905
- const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
906
- return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
904
+ var i;
905
+ const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
906
+ return (r == null ? void 0 : r.clearValidate(e)) ?? (s == null ? void 0 : s.clearValidate(e));
907
907
  }
908
908
  }
909
909
  function yr(t) {
@@ -940,13 +940,13 @@ class br {
940
940
  // @ts-expect-error
941
941
  () => r.schemas.value,
942
942
  () => {
943
- this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.parseSchemas(r.schemas.value);
943
+ this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.processedModel.value = this.processor.stableModel, this.processor.parseSchemas(r.schemas.value);
944
944
  },
945
945
  {
946
946
  deep: !0
947
947
  }
948
948
  ) : q(r.schemas) ? _(() => r.schemas, () => {
949
- this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.parseSchemas(r.schemas);
949
+ this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.processedModel.value = this.processor.stableModel, this.processor.parseSchemas(r.schemas);
950
950
  }, {
951
951
  deep: !0
952
952
  }) : this.processor.parseSchemas(r.schemas);
@@ -959,18 +959,18 @@ class br {
959
959
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
960
960
  share: (r) => {
961
961
  if (T(r)) {
962
- const i = _(() => r.value, () => {
962
+ const s = _(() => r.value, () => {
963
963
  h(this.shared, r.value), P(() => {
964
- i();
964
+ s();
965
965
  });
966
966
  }, {
967
967
  deep: !0,
968
968
  immediate: !0
969
969
  });
970
970
  } else if (q(r)) {
971
- const i = _(() => r, () => {
971
+ const s = _(() => r, () => {
972
972
  h(this.shared, r), P(() => {
973
- i();
973
+ s();
974
974
  });
975
975
  }, {
976
976
  deep: !0,
@@ -981,25 +981,25 @@ class br {
981
981
  }
982
982
  };
983
983
  }
984
- runtimeItemProcessor(e, r, i = this.model.value, s) {
985
- var re, ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ge, ye, be;
984
+ runtimeItemProcessor(e, r, s = this.model.value, i) {
985
+ var re, se, ie, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ge, ye, be;
986
986
  const n = F(e.component);
987
987
  if (!n)
988
988
  return;
989
- (ie = (re = e.native) == null ? void 0 : re.props) != null && ie.Form && h(this.globalNativeFormOverride.props.Form, (ne = (se = e.native) == null ? void 0 : se.props) == null ? void 0 : ne.Form), (ae = (oe = e.native) == null ? void 0 : oe.slots) != null && ae.Form && h(this.globalNativeFormOverride.slots.Form, (ue = (le = e.native) == null ? void 0 : le.slots) == null ? void 0 : ue.Form);
989
+ (se = (re = e.native) == null ? void 0 : re.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (ne = (ie = e.native) == null ? void 0 : ie.props) == null ? void 0 : ne.Form), (ae = (oe = e.native) == null ? void 0 : oe.slots) != null && ae.Form && h(this.globalNativeFormOverride.slots.Form, (ue = (le = e.native) == null ? void 0 : le.slots) == null ? void 0 : ue.Form);
990
990
  const a = h(C((fe = (ce = this.native) == null ? void 0 : ce.slots) == null ? void 0 : fe.FormItem) ?? {}, (pe = (de = e.native) == null ? void 0 : de.slots) == null ? void 0 : pe.FormItem), l = {
991
991
  display: "grid",
992
992
  gridColumn: "1 / -1",
993
993
  ...e.grid
994
994
  }, c = h(C((me = (he = this.native) == null ? void 0 : he.props) == null ? void 0 : me.FormItem) ?? {}, (ye = (ge = e.native) == null ? void 0 : ge.props) == null ? void 0 : ye.FormItem), d = this.runtimeAdapter.getRuntimeField({
995
995
  schema: e,
996
- parentSchema: s,
996
+ parentSchema: i,
997
997
  index: r
998
998
  }), p = n.name, m = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
999
999
  let S = e.placeholder, v = e.show;
1000
1000
  v === void 0 && (v = !0);
1001
1001
  let y = e.label ?? "", O;
1002
- if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (y = K((be = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : be.call(O, e.label ?? "", r + 1), "")), !S) {
1002
+ if (e.runtime ? O = e.runtime : O = (i == null ? void 0 : i.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (y = K((be = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : be.call(O, e.label ?? "", r + 1), "")), !S) {
1003
1003
  let $ = "请输入";
1004
1004
  o.isUndefined(p) ? S = `${$}${y}` : /* @ts-expect-error */ b[p.toLowerCase()] ? ($ = // @ts-expect-error
1005
1005
  b[p.toLowerCase()], S = `${$}${y}`) : (Object.keys(b).forEach((ve) => {
@@ -1009,7 +1009,7 @@ class br {
1009
1009
  const $e = this.runtimeAdapter.getRuntimeRequired({
1010
1010
  ...e,
1011
1011
  label: y
1012
- }), Ve = M.getItemContainer(this), Ne = M.getFormItemContainer(this), Te = this, qe = e.componentSlots;
1012
+ }), Ve = E.getItemContainer(this), Ne = E.getFormItemContainer(this), Te = this, qe = e.componentSlots;
1013
1013
  return g("div", {
1014
1014
  style: l
1015
1015
  }, [g(Ve, {
@@ -1023,7 +1023,7 @@ class br {
1023
1023
  return Te.runtimeAdapter.formComponentRenderer({
1024
1024
  Component: n,
1025
1025
  schema: e,
1026
- baseModel: i,
1026
+ baseModel: s,
1027
1027
  placeholder: S,
1028
1028
  componentSlots: qe,
1029
1029
  props: m
@@ -1036,28 +1036,28 @@ class br {
1036
1036
  }
1037
1037
  runtimeGroupProcessor(e) {
1038
1038
  let r;
1039
- const i = {
1039
+ const s = {
1040
1040
  display: "grid",
1041
1041
  gridColumn: "1 / -1",
1042
1042
  ...e.grid
1043
- }, s = M.getGroupContainer(this);
1043
+ }, i = E.getGroupContainer(this);
1044
1044
  let n = e.show;
1045
1045
  return n === void 0 && (n = !0), g("div", {
1046
- style: i
1047
- }, [n && g(s, {
1046
+ style: s
1047
+ }, [n && g(i, {
1048
1048
  schema: e
1049
1049
  }, yr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1050
1050
  default: () => [r]
1051
1051
  })]);
1052
1052
  }
1053
1053
  addListItem(e) {
1054
- var r, i;
1054
+ var r, s;
1055
1055
  if (!((r = this.processor.stableModel[e.field]) != null && r[0]))
1056
1056
  return Promise.reject({
1057
1057
  code: "0001",
1058
1058
  message: "异步默认值数据正在处理中,请您耐心等待... "
1059
1059
  });
1060
- (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);
1060
+ (s = this.processor.stableModel[e.field]) != null && s[0] && this.model.value[e.field].push(C(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1061
1061
  }
1062
1062
  deleteListItem(e, r) {
1063
1063
  this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
@@ -1067,20 +1067,20 @@ class br {
1067
1067
  display: "grid",
1068
1068
  gridColumn: "1 / -1",
1069
1069
  ...e.grid
1070
- }, i = this;
1071
- i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1072
- let s = e.show;
1073
- s === void 0 && (s = !0);
1074
- const n = M.getListContainer(this), a = M.getListItemContainer(this);
1070
+ }, s = this;
1071
+ s.model.value[e.field] || (s.model.value[e.field] = [{}]);
1072
+ let i = e.show;
1073
+ i === void 0 && (i = !0);
1074
+ const n = E.getListContainer(this), a = E.getListItemContainer(this);
1075
1075
  return g("div", {
1076
1076
  style: r
1077
- }, [s && g(n, {
1077
+ }, [i && g(n, {
1078
1078
  schema: e
1079
1079
  }, {
1080
1080
  default() {
1081
- return i.model.value[e.field].map((l, c) => g(a, null, {
1081
+ return s.model.value[e.field].map((l, c) => g(a, null, {
1082
1082
  default() {
1083
- return e.children.map((d) => i.runtimeItemProcessor(d, c, l, e));
1083
+ return e.children.map((d) => s.runtimeItemProcessor(d, c, l, e));
1084
1084
  },
1085
1085
  delete({
1086
1086
  container: d
@@ -1088,8 +1088,8 @@ class br {
1088
1088
  var m;
1089
1089
  const p = d ?? g("button", null, null);
1090
1090
  return Le(g(p, {
1091
- onClick: () => i.deleteListItem(e, c)
1092
- }, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
1091
+ onClick: () => s.deleteListItem(e, c)
1092
+ }, null), [[De, ((m = s.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
1093
1093
  }
1094
1094
  }));
1095
1095
  },
@@ -1098,7 +1098,7 @@ class br {
1098
1098
  } = {}) {
1099
1099
  const c = l ?? g("button", null, [Ge("添加")]);
1100
1100
  return g(c, {
1101
- onClick: () => i.addListItem(e)
1101
+ onClick: () => s.addListItem(e)
1102
1102
  }, null);
1103
1103
  }
1104
1104
  })]);
@@ -1113,8 +1113,8 @@ class br {
1113
1113
  gridColumn: "1 / -1",
1114
1114
  gridAutoColumns: "1fr",
1115
1115
  ...this.grid
1116
- }, 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 = M.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1117
- return g(n, N(i, {
1116
+ }, r = this, s = h(this.globalNativeFormOverride.props.Form, C((c = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : c.Form) ?? {}), i = h(this.globalNativeFormOverride.slots.Form, C((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = E.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1117
+ return g(n, N(s, {
1118
1118
  ref: this.formRef
1119
1119
  }, {
1120
1120
  [a]: this.model.value
@@ -1124,18 +1124,18 @@ class br {
1124
1124
  style: e
1125
1125
  }, [r.runtimeProcessor(r.schemas.value)]);
1126
1126
  },
1127
- ...s
1127
+ ...i
1128
1128
  });
1129
1129
  }
1130
1130
  }
1131
1131
  class f {
1132
1132
  static getPreset(e) {
1133
- var r, i, s;
1134
- 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];
1133
+ var r, s, i;
1134
+ return (s = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && s.extend ? this.presets.uiPresets[(i = this.presets.uiPresets[e]) == null ? void 0 : i.extend] : this.presets.uiPresets[e];
1135
1135
  }
1136
1136
  static getUI(e) {
1137
- var r, i, s;
1138
- 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;
1137
+ var r, s, i;
1138
+ return (s = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && s.extend ? (i = this.presets.uiPresets[e]) == null ? void 0 : i.extend : e;
1139
1139
  }
1140
1140
  }
1141
1141
  u(f, "presets");
@@ -1165,14 +1165,14 @@ const vr = {
1165
1165
  message: `${t.label}是必填项`
1166
1166
  });
1167
1167
  else {
1168
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1168
+ const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1169
1169
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1170
1170
  required: !0,
1171
1171
  message: `${t.label}是必填项`
1172
1172
  });
1173
1173
  }
1174
1174
  else if (t.rules) {
1175
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1175
+ const r = (e = t.rules) == null ? void 0 : e.findIndex((s) => !!s.required);
1176
1176
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1177
1177
  required: !0,
1178
1178
  message: `${t.label}是必填项`
@@ -1189,8 +1189,8 @@ const vr = {
1189
1189
  Component: t,
1190
1190
  baseModel: e,
1191
1191
  schema: r,
1192
- placeholder: i,
1193
- componentSlots: s,
1192
+ placeholder: s,
1193
+ componentSlots: i,
1194
1194
  props: n
1195
1195
  }) {
1196
1196
  let a;
@@ -1199,14 +1199,14 @@ const vr = {
1199
1199
  "onUpdate:modelValue": (l) => {
1200
1200
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1201
1201
  },
1202
- placeholder: i
1202
+ placeholder: s
1203
1203
  }, n), {
1204
- ...s
1204
+ ...i
1205
1205
  });
1206
1206
  },
1207
1207
  validateForm(t) {
1208
1208
  return new Promise((e, r) => {
1209
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1209
+ t.runtimeCore.formRef.value.validate((s) => s ? r(s) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1210
1210
  });
1211
1211
  },
1212
1212
  clearValidate(t) {
@@ -1232,14 +1232,14 @@ const vr = {
1232
1232
  message: `${t.label}是必填项`
1233
1233
  });
1234
1234
  else {
1235
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1235
+ const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1236
1236
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1237
1237
  required: !0,
1238
1238
  message: `${t.label}是必填项`
1239
1239
  });
1240
1240
  }
1241
1241
  else if (t.rules) {
1242
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1242
+ const r = (e = t.rules) == null ? void 0 : e.findIndex((s) => !!s.required);
1243
1243
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1244
1244
  required: !0,
1245
1245
  message: `${t.label}是必填项`
@@ -1257,8 +1257,8 @@ const vr = {
1257
1257
  Component: t,
1258
1258
  baseModel: e,
1259
1259
  schema: r,
1260
- placeholder: i,
1261
- componentSlots: s,
1260
+ placeholder: s,
1261
+ componentSlots: i,
1262
1262
  props: n
1263
1263
  }) {
1264
1264
  let a;
@@ -1267,18 +1267,18 @@ const vr = {
1267
1267
  "onUpdate:modelValue": (l) => {
1268
1268
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1269
1269
  },
1270
- placeholder: i
1270
+ placeholder: s
1271
1271
  }, n), {
1272
- ...s
1272
+ ...i
1273
1273
  });
1274
1274
  },
1275
1275
  validateForm(t) {
1276
1276
  return new Promise((e, r) => {
1277
1277
  t.runtimeCore.formRef.value.validate().then(({
1278
- valid: i,
1279
- errors: s
1278
+ valid: s,
1279
+ errors: i
1280
1280
  }) => {
1281
- i ? e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))) : r(s);
1281
+ s ? e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))) : r(i);
1282
1282
  });
1283
1283
  });
1284
1284
  },
@@ -1306,7 +1306,7 @@ const vr = {
1306
1306
  trigger: ["input", "blur"]
1307
1307
  });
1308
1308
  else {
1309
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1309
+ const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1310
1310
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1311
1311
  required: !0,
1312
1312
  message: `${t.label}是必填项`,
@@ -1314,7 +1314,7 @@ const vr = {
1314
1314
  });
1315
1315
  }
1316
1316
  else if (t.rules) {
1317
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1317
+ const r = (e = t.rules) == null ? void 0 : e.findIndex((s) => !!s.required);
1318
1318
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1319
1319
  required: !0,
1320
1320
  message: `${t.label}是必填项`,
@@ -1332,8 +1332,8 @@ const vr = {
1332
1332
  Component: t,
1333
1333
  baseModel: e,
1334
1334
  schema: r,
1335
- placeholder: i,
1336
- componentSlots: s,
1335
+ placeholder: s,
1336
+ componentSlots: i,
1337
1337
  props: n
1338
1338
  }) {
1339
1339
  let a;
@@ -1342,14 +1342,14 @@ const vr = {
1342
1342
  "onUpdate:value": (l) => {
1343
1343
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1344
1344
  },
1345
- placeholder: i
1345
+ placeholder: s
1346
1346
  }, n), {
1347
- ...s
1347
+ ...i
1348
1348
  });
1349
1349
  },
1350
1350
  validateForm(t) {
1351
1351
  return new Promise((e, r) => {
1352
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1352
+ t.runtimeCore.formRef.value.validate((s) => s ? r(s) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1353
1353
  });
1354
1354
  },
1355
1355
  clearValidate(t) {
@@ -1363,9 +1363,9 @@ const vr = {
1363
1363
  请选择: ["select", "tree"],
1364
1364
  请输入: ["input"]
1365
1365
  }, r = {};
1366
- for (const i in e)
1367
- e[i].forEach((s) => {
1368
- r[s] = i;
1366
+ for (const s in e)
1367
+ e[s].forEach((i) => {
1368
+ r[i] = s;
1369
1369
  });
1370
1370
  return r;
1371
1371
  }
@@ -1471,13 +1471,13 @@ function te(t, e) {
1471
1471
  function Or(t) {
1472
1472
  return te(t, "native");
1473
1473
  }
1474
- function jr(t) {
1474
+ function Mr(t) {
1475
1475
  return t.__proform_raw_object = !0, t;
1476
1476
  }
1477
- function Er(t) {
1477
+ function jr(t) {
1478
1478
  return te(t, "onetime");
1479
1479
  }
1480
- function Mr(t) {
1480
+ function Er(t) {
1481
1481
  function e() {
1482
1482
  return t;
1483
1483
  }
@@ -1489,9 +1489,9 @@ function Mr(t) {
1489
1489
  export {
1490
1490
  Cr as ProForm,
1491
1491
  Or as markNativeFunction,
1492
- jr as markNativeObject,
1493
- Er as markOnetimeFunction,
1494
- Mr as markStructuredPathParsing,
1492
+ Mr as markNativeObject,
1493
+ jr as markOnetimeFunction,
1494
+ Er as markStructuredPathParsing,
1495
1495
  Ir as useForm,
1496
1496
  Sr as useFormPresetConfigurer,
1497
1497
  te as useModifiers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",