@harbor-design/proform 1.3.4 → 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 +269 -276
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Ue = Object.defineProperty;
2
2
  var ze = (t, e, r) => e in t ? Ue(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 _e, nextTick as P, isRef as T, watch as _, isReactive as q, toRaw as E, reactive as Pe, createVNode as g, mergeProps as N, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as We, defineComponent as Be } from "vue";
4
+ import { ref as z, readonly as _e, nextTick as P, isRef as T, watch as _, isReactive as q, toRaw as F, reactive as Pe, createVNode as g, mergeProps as N, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as We, defineComponent as Be } from "vue";
5
5
  class o {
6
6
  static typeChecker(e) {
7
7
  return {}.toString.call(e);
@@ -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, Me = Object.prototype, Xe = Me.hasOwnProperty, Ye = Me.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 we(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) && we(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
- function Fe(t) {
282
+ function we(t) {
283
283
  if (typeof t == "string")
284
284
  return t;
285
285
  if (Q(t))
286
- return st(t, Fe) + "";
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 = we(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,32 +337,32 @@ 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 Mt(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,
356
356
  writable: !0
357
357
  }) : t[e] = r;
358
358
  }
359
- function Ee(t, e) {
359
+ function Fe(t, e) {
360
360
  return t === e || t !== t && e !== e;
361
361
  }
362
- var wt = Object.prototype, Ft = wt.hasOwnProperty;
363
- function Et(t, e, r) {
364
- var i = t[e];
365
- (!(Ft.call(t, e) && Ee(i, r)) || r === void 0 && !(e in t)) && Mt(t, e, r);
362
+ var Et = Object.prototype, wt = Et.hasOwnProperty;
363
+ function Ft(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,24 +398,24 @@ 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
  }
416
416
  function W(t, e) {
417
417
  for (var r = t.length; r--; )
418
- if (Ee(t[r][0], e))
418
+ if (Fe(t[r][0], e))
419
419
  return r;
420
420
  return -1;
421
421
  }
@@ -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,54 +473,54 @@ 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 M(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
- M.prototype.clear = At;
491
- M.prototype.delete = tr;
492
- M.prototype.get = rr;
493
- M.prototype.has = ir;
494
- M.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 || M)(), r;
506
+ return r.cache = new (ee.Cache || j)(), r;
507
507
  }
508
- ee.Cache = M;
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) {
523
- return t == null ? "" : Fe(t);
523
+ return t == null ? "" : we(t);
524
524
  }
525
525
  function xe(t, e) {
526
526
  return Q(t) ? t : $t(t, e) ? [t] : cr(fr(t));
@@ -534,27 +534,27 @@ 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
- Et(l, c, d), l = l[c];
557
+ Ft(l, c, d), l = l[c];
558
558
  }
559
559
  return t;
560
560
  }
@@ -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) {
@@ -634,81 +634,81 @@ class mr {
634
634
  // 对于稳定初始化更新的抽象
635
635
  stableUpdater(e = []) {
636
636
  if (e.every(Boolean)) {
637
- const r = E(this.processedSchemas.value);
637
+ const r = F(this.processedSchemas.value);
638
638
  !o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
639
639
  length: r.length
640
640
  }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
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 w {
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) {
@@ -936,48 +936,41 @@ class br {
936
936
  u(this, "shared", {});
937
937
  this.setup = e, this.processor = new mr(this);
938
938
  const r = this.setup(this);
939
- if (this.ui = r.ui ?? f.presets.ui, this.runtimeAdapter = new gr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), T(r.schemas))
940
- _(
941
- // @ts-expect-error
942
- () => r.schemas.value,
943
- () => {
944
- this.processor.parseSchemas(r.schemas.value);
945
- },
946
- {
947
- deep: !0
948
- }
949
- );
950
- else if (q(r.schemas)) {
951
- const i = _(() => r.schemas, () => {
952
- this.processor.parseSchemas(r.schemas), P(() => {
953
- i();
954
- });
955
- }, {
939
+ this.ui = r.ui ?? f.presets.ui, this.runtimeAdapter = new gr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), T(r.schemas) ? _(
940
+ // @ts-expect-error
941
+ () => r.schemas.value,
942
+ () => {
943
+ this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.processedModel.value = this.processor.stableModel, this.processor.parseSchemas(r.schemas.value);
944
+ },
945
+ {
956
946
  deep: !0
957
- });
958
- } else
959
- this.processor.parseSchemas(r.schemas);
947
+ }
948
+ ) : q(r.schemas) ? _(() => r.schemas, () => {
949
+ this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.processedModel.value = this.processor.stableModel, this.processor.parseSchemas(r.schemas);
950
+ }, {
951
+ deep: !0
952
+ }) : this.processor.parseSchemas(r.schemas);
960
953
  }
961
954
  getRuntimeMeta() {
962
955
  return {
963
- model: E(C(this.model.value)),
956
+ model: F(C(this.model.value)),
964
957
  reactiveModel: this.model.value,
965
958
  shared: this.shared,
966
959
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
967
960
  share: (r) => {
968
961
  if (T(r)) {
969
- const i = _(() => r.value, () => {
962
+ const s = _(() => r.value, () => {
970
963
  h(this.shared, r.value), P(() => {
971
- i();
964
+ s();
972
965
  });
973
966
  }, {
974
967
  deep: !0,
975
968
  immediate: !0
976
969
  });
977
970
  } else if (q(r)) {
978
- const i = _(() => r, () => {
971
+ const s = _(() => r, () => {
979
972
  h(this.shared, r), P(() => {
980
- i();
973
+ s();
981
974
  });
982
975
  }, {
983
976
  deep: !0,
@@ -988,25 +981,25 @@ class br {
988
981
  }
989
982
  };
990
983
  }
991
- runtimeItemProcessor(e, r, i = this.model.value, s) {
992
- var re, ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ge, ye, be;
993
- const n = E(e.component);
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
+ const n = F(e.component);
994
987
  if (!n)
995
988
  return;
996
- (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);
997
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 = {
998
991
  display: "grid",
999
992
  gridColumn: "1 / -1",
1000
993
  ...e.grid
1001
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({
1002
995
  schema: e,
1003
- parentSchema: s,
996
+ parentSchema: i,
1004
997
  index: r
1005
998
  }), p = n.name, m = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
1006
999
  let S = e.placeholder, v = e.show;
1007
1000
  v === void 0 && (v = !0);
1008
1001
  let y = e.label ?? "", O;
1009
- 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) {
1010
1003
  let $ = "请输入";
1011
1004
  o.isUndefined(p) ? S = `${$}${y}` : /* @ts-expect-error */ b[p.toLowerCase()] ? ($ = // @ts-expect-error
1012
1005
  b[p.toLowerCase()], S = `${$}${y}`) : (Object.keys(b).forEach((ve) => {
@@ -1016,7 +1009,7 @@ class br {
1016
1009
  const $e = this.runtimeAdapter.getRuntimeRequired({
1017
1010
  ...e,
1018
1011
  label: y
1019
- }), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), Te = this, qe = e.componentSlots;
1012
+ }), Ve = E.getItemContainer(this), Ne = E.getFormItemContainer(this), Te = this, qe = e.componentSlots;
1020
1013
  return g("div", {
1021
1014
  style: l
1022
1015
  }, [g(Ve, {
@@ -1030,7 +1023,7 @@ class br {
1030
1023
  return Te.runtimeAdapter.formComponentRenderer({
1031
1024
  Component: n,
1032
1025
  schema: e,
1033
- baseModel: i,
1026
+ baseModel: s,
1034
1027
  placeholder: S,
1035
1028
  componentSlots: qe,
1036
1029
  props: m
@@ -1043,28 +1036,28 @@ class br {
1043
1036
  }
1044
1037
  runtimeGroupProcessor(e) {
1045
1038
  let r;
1046
- const i = {
1039
+ const s = {
1047
1040
  display: "grid",
1048
1041
  gridColumn: "1 / -1",
1049
1042
  ...e.grid
1050
- }, s = w.getGroupContainer(this);
1043
+ }, i = E.getGroupContainer(this);
1051
1044
  let n = e.show;
1052
1045
  return n === void 0 && (n = !0), g("div", {
1053
- style: i
1054
- }, [n && g(s, {
1046
+ style: s
1047
+ }, [n && g(i, {
1055
1048
  schema: e
1056
1049
  }, yr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1057
1050
  default: () => [r]
1058
1051
  })]);
1059
1052
  }
1060
1053
  addListItem(e) {
1061
- var r, i;
1054
+ var r, s;
1062
1055
  if (!((r = this.processor.stableModel[e.field]) != null && r[0]))
1063
1056
  return Promise.reject({
1064
1057
  code: "0001",
1065
1058
  message: "异步默认值数据正在处理中,请您耐心等待... "
1066
1059
  });
1067
- (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);
1068
1061
  }
1069
1062
  deleteListItem(e, r) {
1070
1063
  this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
@@ -1074,20 +1067,20 @@ class br {
1074
1067
  display: "grid",
1075
1068
  gridColumn: "1 / -1",
1076
1069
  ...e.grid
1077
- }, i = this;
1078
- i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1079
- let s = e.show;
1080
- s === void 0 && (s = !0);
1081
- const n = w.getListContainer(this), a = w.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);
1082
1075
  return g("div", {
1083
1076
  style: r
1084
- }, [s && g(n, {
1077
+ }, [i && g(n, {
1085
1078
  schema: e
1086
1079
  }, {
1087
1080
  default() {
1088
- 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, {
1089
1082
  default() {
1090
- return e.children.map((d) => i.runtimeItemProcessor(d, c, l, e));
1083
+ return e.children.map((d) => s.runtimeItemProcessor(d, c, l, e));
1091
1084
  },
1092
1085
  delete({
1093
1086
  container: d
@@ -1095,8 +1088,8 @@ class br {
1095
1088
  var m;
1096
1089
  const p = d ?? g("button", null, null);
1097
1090
  return Le(g(p, {
1098
- onClick: () => i.deleteListItem(e, c)
1099
- }, 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]]);
1100
1093
  }
1101
1094
  }));
1102
1095
  },
@@ -1105,7 +1098,7 @@ class br {
1105
1098
  } = {}) {
1106
1099
  const c = l ?? g("button", null, [Ge("添加")]);
1107
1100
  return g(c, {
1108
- onClick: () => i.addListItem(e)
1101
+ onClick: () => s.addListItem(e)
1109
1102
  }, null);
1110
1103
  }
1111
1104
  })]);
@@ -1120,8 +1113,8 @@ class br {
1120
1113
  gridColumn: "1 / -1",
1121
1114
  gridAutoColumns: "1fr",
1122
1115
  ...this.grid
1123
- }, 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();
1124
- 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, {
1125
1118
  ref: this.formRef
1126
1119
  }, {
1127
1120
  [a]: this.model.value
@@ -1131,18 +1124,18 @@ class br {
1131
1124
  style: e
1132
1125
  }, [r.runtimeProcessor(r.schemas.value)]);
1133
1126
  },
1134
- ...s
1127
+ ...i
1135
1128
  });
1136
1129
  }
1137
1130
  }
1138
1131
  class f {
1139
1132
  static getPreset(e) {
1140
- var r, i, s;
1141
- 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];
1142
1135
  }
1143
1136
  static getUI(e) {
1144
- var r, i, s;
1145
- 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;
1146
1139
  }
1147
1140
  }
1148
1141
  u(f, "presets");
@@ -1172,14 +1165,14 @@ const vr = {
1172
1165
  message: `${t.label}是必填项`
1173
1166
  });
1174
1167
  else {
1175
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1168
+ const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1176
1169
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1177
1170
  required: !0,
1178
1171
  message: `${t.label}是必填项`
1179
1172
  });
1180
1173
  }
1181
1174
  else if (t.rules) {
1182
- 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);
1183
1176
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1184
1177
  required: !0,
1185
1178
  message: `${t.label}是必填项`
@@ -1196,8 +1189,8 @@ const vr = {
1196
1189
  Component: t,
1197
1190
  baseModel: e,
1198
1191
  schema: r,
1199
- placeholder: i,
1200
- componentSlots: s,
1192
+ placeholder: s,
1193
+ componentSlots: i,
1201
1194
  props: n
1202
1195
  }) {
1203
1196
  let a;
@@ -1206,14 +1199,14 @@ const vr = {
1206
1199
  "onUpdate:modelValue": (l) => {
1207
1200
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1208
1201
  },
1209
- placeholder: i
1202
+ placeholder: s
1210
1203
  }, n), {
1211
- ...s
1204
+ ...i
1212
1205
  });
1213
1206
  },
1214
1207
  validateForm(t) {
1215
1208
  return new Promise((e, r) => {
1216
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1209
+ t.runtimeCore.formRef.value.validate((s) => s ? r(s) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1217
1210
  });
1218
1211
  },
1219
1212
  clearValidate(t) {
@@ -1239,14 +1232,14 @@ const vr = {
1239
1232
  message: `${t.label}是必填项`
1240
1233
  });
1241
1234
  else {
1242
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1235
+ const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1243
1236
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1244
1237
  required: !0,
1245
1238
  message: `${t.label}是必填项`
1246
1239
  });
1247
1240
  }
1248
1241
  else if (t.rules) {
1249
- 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);
1250
1243
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1251
1244
  required: !0,
1252
1245
  message: `${t.label}是必填项`
@@ -1264,8 +1257,8 @@ const vr = {
1264
1257
  Component: t,
1265
1258
  baseModel: e,
1266
1259
  schema: r,
1267
- placeholder: i,
1268
- componentSlots: s,
1260
+ placeholder: s,
1261
+ componentSlots: i,
1269
1262
  props: n
1270
1263
  }) {
1271
1264
  let a;
@@ -1274,18 +1267,18 @@ const vr = {
1274
1267
  "onUpdate:modelValue": (l) => {
1275
1268
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1276
1269
  },
1277
- placeholder: i
1270
+ placeholder: s
1278
1271
  }, n), {
1279
- ...s
1272
+ ...i
1280
1273
  });
1281
1274
  },
1282
1275
  validateForm(t) {
1283
1276
  return new Promise((e, r) => {
1284
1277
  t.runtimeCore.formRef.value.validate().then(({
1285
- valid: i,
1286
- errors: s
1278
+ valid: s,
1279
+ errors: i
1287
1280
  }) => {
1288
- i ? e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))) : r(s);
1281
+ s ? e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))) : r(i);
1289
1282
  });
1290
1283
  });
1291
1284
  },
@@ -1313,7 +1306,7 @@ const vr = {
1313
1306
  trigger: ["input", "blur"]
1314
1307
  });
1315
1308
  else {
1316
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1309
+ const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1317
1310
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1318
1311
  required: !0,
1319
1312
  message: `${t.label}是必填项`,
@@ -1321,7 +1314,7 @@ const vr = {
1321
1314
  });
1322
1315
  }
1323
1316
  else if (t.rules) {
1324
- 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);
1325
1318
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1326
1319
  required: !0,
1327
1320
  message: `${t.label}是必填项`,
@@ -1339,8 +1332,8 @@ const vr = {
1339
1332
  Component: t,
1340
1333
  baseModel: e,
1341
1334
  schema: r,
1342
- placeholder: i,
1343
- componentSlots: s,
1335
+ placeholder: s,
1336
+ componentSlots: i,
1344
1337
  props: n
1345
1338
  }) {
1346
1339
  let a;
@@ -1349,14 +1342,14 @@ const vr = {
1349
1342
  "onUpdate:value": (l) => {
1350
1343
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1351
1344
  },
1352
- placeholder: i
1345
+ placeholder: s
1353
1346
  }, n), {
1354
- ...s
1347
+ ...i
1355
1348
  });
1356
1349
  },
1357
1350
  validateForm(t) {
1358
1351
  return new Promise((e, r) => {
1359
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1352
+ t.runtimeCore.formRef.value.validate((s) => s ? r(s) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1360
1353
  });
1361
1354
  },
1362
1355
  clearValidate(t) {
@@ -1364,20 +1357,20 @@ const vr = {
1364
1357
  (r = (e = t.formRef.value) == null ? void 0 : e.restoreValidation) == null || r.call(e);
1365
1358
  }
1366
1359
  }
1367
- }, F = class F {
1360
+ }, w = class w {
1368
1361
  static getPlaceholderPrefixPresetByComponentName() {
1369
1362
  const e = {
1370
1363
  请选择: ["select", "tree"],
1371
1364
  请输入: ["input"]
1372
1365
  }, r = {};
1373
- for (const i in e)
1374
- e[i].forEach((s) => {
1375
- r[s] = i;
1366
+ for (const s in e)
1367
+ e[s].forEach((i) => {
1368
+ r[i] = s;
1376
1369
  });
1377
1370
  return r;
1378
1371
  }
1379
1372
  };
1380
- u(F, "schemaPreset", {
1373
+ u(w, "schemaPreset", {
1381
1374
  type: {
1382
1375
  defaultValue: "item"
1383
1376
  },
@@ -1423,13 +1416,13 @@ u(F, "schemaPreset", {
1423
1416
  runtime: {
1424
1417
  default: void 0
1425
1418
  }
1426
- }), u(F, "componentPropsPreset", {
1419
+ }), u(w, "componentPropsPreset", {
1427
1420
  options: {
1428
1421
  defaultValue: []
1429
1422
  }
1430
1423
  }), // 基于基本功能提出基本预设
1431
- u(F, "placeholderPresetByComponentName", F.getPlaceholderPrefixPresetByComponentName());
1432
- let Y = F;
1424
+ u(w, "placeholderPresetByComponentName", w.getPlaceholderPrefixPresetByComponentName());
1425
+ let Y = w;
1433
1426
  const I = {
1434
1427
  ...Y,
1435
1428
  adapters: {
@@ -1478,13 +1471,13 @@ function te(t, e) {
1478
1471
  function Or(t) {
1479
1472
  return te(t, "native");
1480
1473
  }
1481
- function jr(t) {
1474
+ function Mr(t) {
1482
1475
  return t.__proform_raw_object = !0, t;
1483
1476
  }
1484
- function Mr(t) {
1477
+ function jr(t) {
1485
1478
  return te(t, "onetime");
1486
1479
  }
1487
- function wr(t) {
1480
+ function Er(t) {
1488
1481
  function e() {
1489
1482
  return t;
1490
1483
  }
@@ -1496,9 +1489,9 @@ function wr(t) {
1496
1489
  export {
1497
1490
  Cr as ProForm,
1498
1491
  Or as markNativeFunction,
1499
- jr as markNativeObject,
1500
- Mr as markOnetimeFunction,
1501
- wr as markStructuredPathParsing,
1492
+ Mr as markNativeObject,
1493
+ jr as markOnetimeFunction,
1494
+ Er as markStructuredPathParsing,
1502
1495
  Ir as useForm,
1503
1496
  Sr as useFormPresetConfigurer,
1504
1497
  te as useModifiers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",