@harbor-design/proform 1.4.10 → 1.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +90 -109
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  var De = Object.defineProperty;
2
2
  var Ge = (r, e, t) => e in r ? De(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var l = (r, e, t) => (Ge(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { ref as H, readonly as Ee, nextTick as S, isRef as T, watch as w, isReactive as z, watchEffect as G, toRaw as $, reactive as Y, createVNode as m, mergeProps as U, withDirectives as Be, vShow as Ke, createTextVNode as We, isVNode as Xe, defineComponent as Ye } from "vue";
5
- var Ze = typeof global == "object" && global && global.Object === Object && global, Je = typeof self == "object" && self && self.Object === Object && self, ee = Ze || Je || Function("return this")(), M = ee.Symbol, Re = Object.prototype, Qe = Re.hasOwnProperty, Ae = Re.toString, q = M ? M.toStringTag : void 0;
4
+ import { ref as H, readonly as Ee, nextTick as S, isRef as T, watch as w, isReactive as z, watchEffect as G, toRaw as $, reactive as Y, createVNode as m, mergeProps as q, withDirectives as Be, vShow as Ke, createTextVNode as We, isVNode as Xe, defineComponent as Ye } from "vue";
5
+ var Ze = typeof global == "object" && global && global.Object === Object && global, Je = typeof self == "object" && self && self.Object === Object && self, ee = Ze || Je || Function("return this")(), M = ee.Symbol, Re = Object.prototype, Qe = Re.hasOwnProperty, Ae = Re.toString, U = M ? M.toStringTag : void 0;
6
6
  function ke(r) {
7
- var e = Qe.call(r, q), t = r[q];
7
+ var e = Qe.call(r, U), t = r[U];
8
8
  try {
9
- r[q] = void 0;
9
+ r[U] = void 0;
10
10
  var i = !0;
11
11
  } catch {
12
12
  }
13
13
  var s = Ae.call(r);
14
- return i && (e ? r[q] = t : delete r[q]), s;
14
+ return i && (e ? r[U] = t : delete r[U]), s;
15
15
  }
16
16
  var et = Object.prototype, tt = et.toString;
17
17
  function rt(r) {
@@ -33,14 +33,14 @@ function at(r, e) {
33
33
  s[t] = e(r[t], t, r);
34
34
  return s;
35
35
  }
36
- var re = Array.isArray, lt = 1 / 0, we = M ? M.prototype : void 0, xe = we ? we.toString : void 0;
36
+ var re = Array.isArray, lt = 1 / 0, we = M ? M.prototype : void 0, Fe = we ? we.toString : void 0;
37
37
  function Me(r) {
38
38
  if (typeof r == "string")
39
39
  return r;
40
40
  if (re(r))
41
41
  return at(r, Me) + "";
42
42
  if (te(r))
43
- return xe ? xe.call(r) : "";
43
+ return Fe ? Fe.call(r) : "";
44
44
  var e = r + "";
45
45
  return e == "0" && 1 / r == -lt ? "-0" : e;
46
46
  }
@@ -55,12 +55,12 @@ function ht(r) {
55
55
  var e = $e(r);
56
56
  return e == ft || e == ct || e == ut || e == dt;
57
57
  }
58
- var Z = ee["__core-js_shared__"], Fe = function() {
58
+ var Z = ee["__core-js_shared__"], je = function() {
59
59
  var r = /[^.]+$/.exec(Z && Z.keys && Z.keys.IE_PROTO || "");
60
60
  return r ? "Symbol(src)_1." + r : "";
61
61
  }();
62
62
  function pt(r) {
63
- return !!Fe && Fe in r;
63
+ return !!je && je in r;
64
64
  }
65
65
  var mt = Function.prototype, gt = mt.toString;
66
66
  function bt(r) {
@@ -76,8 +76,8 @@ function bt(r) {
76
76
  }
77
77
  return "";
78
78
  }
79
- var vt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, _t = Function.prototype, Pt = Object.prototype, It = _t.toString, Ct = Pt.hasOwnProperty, St = RegExp(
80
- "^" + It.call(Ct).replace(vt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
79
+ var vt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, _t = Function.prototype, Pt = Object.prototype, Ct = _t.toString, It = Pt.hasOwnProperty, St = RegExp(
80
+ "^" + Ct.call(It).replace(vt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
81
81
  );
82
82
  function Et(r) {
83
83
  if (!B(r) || pt(r))
@@ -92,19 +92,19 @@ function ie(r, e) {
92
92
  var t = Ot(r, e);
93
93
  return Et(t) ? t : void 0;
94
94
  }
95
- var je = function() {
95
+ var xe = function() {
96
96
  try {
97
97
  var r = ie(Object, "defineProperty");
98
98
  return r({}, "", {}), r;
99
99
  } catch {
100
100
  }
101
- }(), wt = 9007199254740991, xt = /^(?:0|[1-9]\d*)$/;
102
- function Ft(r, e) {
101
+ }(), wt = 9007199254740991, Ft = /^(?:0|[1-9]\d*)$/;
102
+ function jt(r, e) {
103
103
  var t = typeof r;
104
- return e = e ?? wt, !!e && (t == "number" || t != "symbol" && xt.test(r)) && r > -1 && r % 1 == 0 && r < e;
104
+ return e = e ?? wt, !!e && (t == "number" || t != "symbol" && Ft.test(r)) && r > -1 && r % 1 == 0 && r < e;
105
105
  }
106
- function jt(r, e, t) {
107
- e == "__proto__" && je ? je(r, e, {
106
+ function xt(r, e, t) {
107
+ e == "__proto__" && xe ? xe(r, e, {
108
108
  configurable: !0,
109
109
  enumerable: !0,
110
110
  value: t,
@@ -117,17 +117,17 @@ function Ve(r, e) {
117
117
  var Rt = Object.prototype, $t = Rt.hasOwnProperty;
118
118
  function Mt(r, e, t) {
119
119
  var i = r[e];
120
- (!($t.call(r, e) && Ve(i, t)) || t === void 0 && !(e in r)) && jt(r, e, t);
120
+ (!($t.call(r, e) && Ve(i, t)) || t === void 0 && !(e in r)) && xt(r, e, t);
121
121
  }
122
122
  var Vt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Nt = /^\w*$/;
123
- function qt(r, e) {
123
+ function Ut(r, e) {
124
124
  if (re(r))
125
125
  return !1;
126
126
  var t = typeof r;
127
127
  return t == "number" || t == "symbol" || t == "boolean" || r == null || te(r) ? !0 : Nt.test(r) || !Vt.test(r) || e != null && r in Object(e);
128
128
  }
129
129
  var L = ie(Object, "create");
130
- function Ut() {
130
+ function qt() {
131
131
  this.__data__ = L ? L(null) : {}, this.size = 0;
132
132
  }
133
133
  function Tt(r) {
@@ -153,18 +153,18 @@ function Xt(r, e) {
153
153
  var t = this.__data__;
154
154
  return this.size += this.has(r) ? 0 : 1, t[r] = L && e === void 0 ? Wt : e, this;
155
155
  }
156
- function x(r) {
156
+ function F(r) {
157
157
  var e = -1, t = r == null ? 0 : r.length;
158
158
  for (this.clear(); ++e < t; ) {
159
159
  var i = r[e];
160
160
  this.set(i[0], i[1]);
161
161
  }
162
162
  }
163
- x.prototype.clear = Ut;
164
- x.prototype.delete = Tt;
165
- x.prototype.get = Dt;
166
- x.prototype.has = Kt;
167
- x.prototype.set = Xt;
163
+ F.prototype.clear = qt;
164
+ F.prototype.delete = Tt;
165
+ F.prototype.get = Dt;
166
+ F.prototype.has = Kt;
167
+ F.prototype.set = Xt;
168
168
  function Yt() {
169
169
  this.__data__ = [], this.size = 0;
170
170
  }
@@ -208,9 +208,9 @@ V.prototype.set = er;
208
208
  var tr = ie(ee, "Map");
209
209
  function rr() {
210
210
  this.size = 0, this.__data__ = {
211
- hash: new x(),
211
+ hash: new F(),
212
212
  map: new (tr || V)(),
213
- string: new x()
213
+ string: new F()
214
214
  };
215
215
  }
216
216
  function ir(r) {
@@ -235,18 +235,18 @@ function ar(r, e) {
235
235
  var t = W(this, r), i = t.size;
236
236
  return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
237
237
  }
238
- function F(r) {
238
+ function j(r) {
239
239
  var e = -1, t = r == null ? 0 : r.length;
240
240
  for (this.clear(); ++e < t; ) {
241
241
  var i = r[e];
242
242
  this.set(i[0], i[1]);
243
243
  }
244
244
  }
245
- F.prototype.clear = rr;
246
- F.prototype.delete = sr;
247
- F.prototype.get = nr;
248
- F.prototype.has = or;
249
- F.prototype.set = ar;
245
+ j.prototype.clear = rr;
246
+ j.prototype.delete = sr;
247
+ j.prototype.get = nr;
248
+ j.prototype.has = or;
249
+ j.prototype.set = ar;
250
250
  var lr = "Expected a function";
251
251
  function se(r, e) {
252
252
  if (typeof r != "function" || e != null && typeof e != "function")
@@ -258,9 +258,9 @@ function se(r, e) {
258
258
  var a = r.apply(this, i);
259
259
  return t.cache = n.set(s, a) || n, a;
260
260
  };
261
- return t.cache = new (se.Cache || F)(), t;
261
+ return t.cache = new (se.Cache || j)(), t;
262
262
  }
263
- se.Cache = F;
263
+ se.Cache = j;
264
264
  var ur = 500;
265
265
  function fr(r) {
266
266
  var e = se(r, function(i) {
@@ -278,10 +278,10 @@ function pr(r) {
278
278
  return r == null ? "" : Me(r);
279
279
  }
280
280
  function Ne(r, e) {
281
- return re(r) ? r : qt(r, e) ? [r] : hr(pr(r));
281
+ return re(r) ? r : Ut(r, e) ? [r] : hr(pr(r));
282
282
  }
283
283
  var mr = 1 / 0;
284
- function qe(r) {
284
+ function Ue(r) {
285
285
  if (typeof r == "string" || te(r))
286
286
  return r;
287
287
  var e = r + "";
@@ -290,7 +290,7 @@ function qe(r) {
290
290
  function gr(r, e) {
291
291
  e = Ne(e, r);
292
292
  for (var t = 0, i = e.length; r != null && t < i; )
293
- r = r[qe(e[t++])];
293
+ r = r[Ue(e[t++])];
294
294
  return t && t == i ? r : void 0;
295
295
  }
296
296
  function D(r, e, t) {
@@ -302,12 +302,12 @@ function br(r, e, t, i) {
302
302
  return r;
303
303
  e = Ne(e, r);
304
304
  for (var s = -1, n = e.length, a = n - 1, u = r; u != null && ++s < n; ) {
305
- var f = qe(e[s]), c = t;
305
+ var f = Ue(e[s]), c = t;
306
306
  if (f === "__proto__" || f === "constructor" || f === "prototype")
307
307
  return r;
308
308
  if (s != a) {
309
309
  var h = u[f];
310
- c = i ? i(h, f, u) : void 0, c === void 0 && (c = B(h) ? h : Ft(e[s + 1]) ? [] : {});
310
+ c = i ? i(h, f, u) : void 0, c === void 0 && (c = B(h) ? h : jt(e[s + 1]) ? [] : {});
311
311
  }
312
312
  Mt(u, f, c), u = u[f];
313
313
  }
@@ -397,10 +397,10 @@ function v(r, ...e) {
397
397
  r = [...t];
398
398
  else
399
399
  for (const i in t)
400
- t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] = v(r[i] || {}, t[i]) : r[i] = t[i]);
400
+ t.hasOwnProperty(i) && t[i] !== void 0 && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] = v(r[i] || {}, t[i]) : r[i] = t[i]);
401
401
  }), r;
402
402
  }
403
- function I(r) {
403
+ function C(r) {
404
404
  const e = /* @__PURE__ */ new WeakMap();
405
405
  function t(i) {
406
406
  if (i === null || typeof i != "object")
@@ -459,7 +459,7 @@ class vr {
459
459
  }
460
460
  submit() {
461
461
  var i;
462
- const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.runtimeCore.ui)];
462
+ const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = I.adapters[d.getUI(this.runtimeCore.ui)];
463
463
  return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
464
464
  }
465
465
  hydrate(e) {
@@ -525,7 +525,7 @@ class vr {
525
525
  }
526
526
  resetModel() {
527
527
  var e;
528
- (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
528
+ (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = C(
529
529
  this.runtimeCore.processor.stableModel
530
530
  ), this.readonlyReactiveModel.value = Ee(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
531
531
  }
@@ -557,8 +557,8 @@ class yr {
557
557
  l(this, "getRuntimeMeta");
558
558
  l(this, "stableSchemas", []);
559
559
  l(this, "stableModel", {});
560
- l(this, "schemaPreset", C.schemaPreset);
561
- l(this, "componentPropsPreset", C.componentPropsPreset);
560
+ l(this, "schemaPreset", I.schemaPreset);
561
+ l(this, "componentPropsPreset", I.componentPropsPreset);
562
562
  l(this, "stableUpdaterProcessProgress");
563
563
  l(this, "stableUpdaterTimes", 0);
564
564
  l(this, "schemaEffect", new A());
@@ -606,7 +606,7 @@ class yr {
606
606
  // 派生过程,用于外部应用
607
607
  parseSchemas(e, t) {
608
608
  o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
609
- I(e)
609
+ C(e)
610
610
  ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
611
611
  }
612
612
  parseStable(e) {
@@ -834,7 +834,7 @@ class yr {
834
834
  e.map((t) => {
835
835
  this.createModel(t, this.processedModel.value);
836
836
  }), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && S(() => {
837
- this.stableModel = I(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
837
+ this.stableModel = C(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
838
838
  });
839
839
  }
840
840
  setModel(e, t, i) {
@@ -860,7 +860,7 @@ class yr {
860
860
  });
861
861
  }
862
862
  }
863
- class j {
863
+ class x {
864
864
  static getFormContainer({ ui: e } = {}) {
865
865
  return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
866
866
  }
@@ -890,34 +890,34 @@ class _r {
890
890
  }
891
891
  getRuntimeField(e) {
892
892
  var s;
893
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
893
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
894
894
  return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
895
895
  }
896
896
  getRuntimeRequired(e) {
897
897
  var s;
898
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
898
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
899
899
  return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
900
900
  }
901
901
  getFormModelPropName() {
902
902
  var i;
903
- const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.ui)];
903
+ const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = I.adapters[d.getUI(this.ui)];
904
904
  return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
905
905
  }
906
906
  formComponentRenderer(e) {
907
907
  var s;
908
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
908
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
909
909
  return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
910
910
  }
911
911
  clearValidate(e) {
912
912
  var s;
913
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
913
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
914
914
  return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
915
915
  }
916
916
  }
917
917
  function Pr(r) {
918
918
  return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Xe(r);
919
919
  }
920
- class Ir {
920
+ class Cr {
921
921
  constructor(e) {
922
922
  l(this, "schemas", H([]));
923
923
  l(this, "model", H({}));
@@ -962,7 +962,7 @@ class Ir {
962
962
  }
963
963
  getRuntimeMeta() {
964
964
  return {
965
- model: $(I(this.model.value)),
965
+ model: $(C(this.model.value)),
966
966
  reactiveModel: this.model.value,
967
967
  shared: this.shared,
968
968
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
@@ -980,34 +980,34 @@ class Ir {
980
980
  };
981
981
  }
982
982
  runtimeItemProcessor(e, t, i = this.model.value, s) {
983
- var oe, ae, le, ue, fe, ce, de, he, pe, me, ge, be, ve, ye, _e, Pe, Ie, Ce;
983
+ var oe, ae, le, ue, fe, ce, de, he, pe, me, ge, be, ve, ye, _e, Pe, Ce, Ie;
984
984
  const n = $(e.component);
985
985
  if (!n)
986
986
  return;
987
987
  (ae = (oe = e.native) == null ? void 0 : oe.props) != null && ae.Form && v(this.globalNativeFormOverride.props.Form, (ue = (le = e.native) == null ? void 0 : le.props) == null ? void 0 : ue.Form), (ce = (fe = e.native) == null ? void 0 : fe.slots) != null && ce.Form && v(this.globalNativeFormOverride.slots.Form, (he = (de = e.native) == null ? void 0 : de.slots) == null ? void 0 : he.Form);
988
- const a = v(I((me = (pe = this.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem) ?? {}, (be = (ge = e.native) == null ? void 0 : ge.slots) == null ? void 0 : be.FormItem), u = {
988
+ const a = v(C((me = (pe = this.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem) ?? {}, (be = (ge = e.native) == null ? void 0 : ge.slots) == null ? void 0 : be.FormItem), u = {
989
989
  display: "grid",
990
990
  gridColumn: "1 / -1",
991
991
  ...e.grid
992
- }, f = v(I((ye = (ve = this.native) == null ? void 0 : ve.props) == null ? void 0 : ye.FormItem) ?? {}, (Pe = (_e = e.native) == null ? void 0 : _e.props) == null ? void 0 : Pe.FormItem), c = this.runtimeAdapter.getRuntimeField({
992
+ }, f = v(C((ye = (ve = this.native) == null ? void 0 : ve.props) == null ? void 0 : ye.FormItem) ?? {}, (Pe = (_e = e.native) == null ? void 0 : _e.props) == null ? void 0 : Pe.FormItem), c = this.runtimeAdapter.getRuntimeField({
993
993
  schema: e,
994
994
  parentSchema: s,
995
995
  index: t
996
- }), h = n.name, p = e.componentProps ?? {}, b = C.placeholderPresetByComponentName;
996
+ }), h = n.name, p = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
997
997
  let E = e.placeholder, y = e.show;
998
998
  y === void 0 && (y = !0);
999
999
  let g = e.label ?? "", O;
1000
- if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g = Q((Ie = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : Ie.call(O, e.label ?? "", t + 1), "")), !E) {
1000
+ if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g = Q((Ce = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : Ce.call(O, e.label ?? "", t + 1), "")), !E) {
1001
1001
  let N = "请输入";
1002
1002
  o.isUndefined(h) ? E = `${N}${g}` : /* @ts-expect-error */ b[h.toLowerCase()] ? (N = // @ts-expect-error
1003
1003
  b[h.toLowerCase()], E = `${N}${g}`) : (Object.keys(b).forEach((Se) => {
1004
1004
  h.toLowerCase().includes(Se.toLowerCase()) && (N = b[Se]);
1005
1005
  }), E = `${N}${g}`);
1006
1006
  }
1007
- const Ue = this.runtimeAdapter.getRuntimeRequired({
1007
+ const qe = this.runtimeAdapter.getRuntimeRequired({
1008
1008
  ...e,
1009
1009
  label: g
1010
- }), Te = j.getItemContainer(this), ze = j.getFormItemContainer(this), Le = this, He = e.componentSlots, P = (Ce = d.presets.uiPresets[this.ui]) == null ? void 0 : Ce.display;
1010
+ }), Te = x.getItemContainer(this), ze = x.getFormItemContainer(this), Le = this, He = e.componentSlots, P = (Ie = d.presets.uiPresets[this.ui]) == null ? void 0 : Ie.display;
1011
1011
  let X;
1012
1012
  return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ? X = `${g}${P == null ? void 0 : P.labelPrefix}` : X = `${g}:`, m("div", {
1013
1013
  style: u
@@ -1015,9 +1015,9 @@ class Ir {
1015
1015
  show: y
1016
1016
  }, {
1017
1017
  default() {
1018
- return y && m(ze, U(f, {
1018
+ return y && m(ze, q(f, {
1019
1019
  label: `${g ? X : ""}`
1020
- }, c, Ue), {
1020
+ }, c, qe), {
1021
1021
  default() {
1022
1022
  return Le.runtimeAdapter.formComponentRenderer({
1023
1023
  Component: n,
@@ -1039,7 +1039,7 @@ class Ir {
1039
1039
  display: "grid",
1040
1040
  gridColumn: "1 / -1",
1041
1041
  ...e.grid
1042
- }, s = j.getGroupContainer(this);
1042
+ }, s = x.getGroupContainer(this);
1043
1043
  let n = e.show;
1044
1044
  return n === void 0 && (n = !0), m("div", {
1045
1045
  style: i
@@ -1051,7 +1051,7 @@ class Ir {
1051
1051
  }
1052
1052
  addListItem(e) {
1053
1053
  var t;
1054
- console.log("this", this.processor.stableModel, e.field), (t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(I(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1054
+ console.log("this", this.processor.stableModel, e.field), (t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(C(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1055
1055
  }
1056
1056
  deleteListItem(e, t) {
1057
1057
  this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
@@ -1065,7 +1065,7 @@ class Ir {
1065
1065
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1066
1066
  let s = e.show;
1067
1067
  s === void 0 && (s = !0);
1068
- const n = j.getListContainer(this), a = j.getListItemContainer(this);
1068
+ const n = x.getListContainer(this), a = x.getListItemContainer(this);
1069
1069
  return m("div", {
1070
1070
  style: t
1071
1071
  }, [s && m(n, {
@@ -1107,8 +1107,8 @@ class Ir {
1107
1107
  gridColumn: "1 / -1",
1108
1108
  gridAutoColumns: "1fr",
1109
1109
  ...this.grid
1110
- }, t = this, i = v(this.globalNativeFormOverride.props.Form, I((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = v(this.globalNativeFormOverride.slots.Form, I((h = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : h.Form) ?? {}), n = j.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1111
- return m(n, U(i, {
1110
+ }, t = this, i = v(this.globalNativeFormOverride.props.Form, C((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = v(this.globalNativeFormOverride.slots.Form, C((h = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : h.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1111
+ return m(n, q(i, {
1112
1112
  ref: this.formRef
1113
1113
  }, {
1114
1114
  [a]: this.model.value
@@ -1140,7 +1140,7 @@ function J({
1140
1140
  }) {
1141
1141
  return r ? `${r.field}.${t}.${e.field}` : e.field;
1142
1142
  }
1143
- const Cr = {
1143
+ const Ir = {
1144
1144
  ArcoVue: {
1145
1145
  getRuntimeField(r) {
1146
1146
  const e = J(r);
@@ -1151,7 +1151,6 @@ const Cr = {
1151
1151
  };
1152
1152
  },
1153
1153
  getRuntimeRequired(r) {
1154
- var t;
1155
1154
  let e = `${r.label}是必填项`;
1156
1155
  if (r.required)
1157
1156
  if (o.isString(r.required) && (e = r.required), !r.rules)
@@ -1160,17 +1159,12 @@ const Cr = {
1160
1159
  message: e
1161
1160
  });
1162
1161
  else {
1163
- const i = r.rules.findIndex((s) => !o.isUndefined(s.required));
1164
- i !== -1 ? (r.rules[i].required = !0, r.rules[i].message = e) : r.rules.unshift({
1162
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1163
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = e) : r.rules.unshift({
1165
1164
  required: !0,
1166
1165
  message: e
1167
1166
  });
1168
1167
  }
1169
- else
1170
- r.rules && ((t = r.rules) == null ? void 0 : t.findIndex((s) => !!s.required)) === -1 && r.rules.unshift({
1171
- required: !0,
1172
- message: e
1173
- });
1174
1168
  return {
1175
1169
  rules: r.rules
1176
1170
  };
@@ -1187,7 +1181,7 @@ const Cr = {
1187
1181
  props: n
1188
1182
  }) {
1189
1183
  let a;
1190
- return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
1184
+ return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, q({
1191
1185
  modelValue: a,
1192
1186
  "onUpdate:modelValue": (u) => {
1193
1187
  o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
@@ -1217,7 +1211,6 @@ const Cr = {
1217
1211
  };
1218
1212
  },
1219
1213
  getRuntimeRequired(r) {
1220
- var t;
1221
1214
  let e = `${r.label}是必填项`;
1222
1215
  if (r.required)
1223
1216
  if (o.isString(r.required) && (e = r.required), !r.rules)
@@ -1226,17 +1219,12 @@ const Cr = {
1226
1219
  message: e
1227
1220
  });
1228
1221
  else {
1229
- const i = r.rules.findIndex((s) => !o.isUndefined(s.required));
1230
- i !== -1 ? (r.rules[i].required = !0, r.rules[i].message = e) : r.rules.unshift({
1222
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1223
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = e) : r.rules.unshift({
1231
1224
  required: !0,
1232
1225
  message: e
1233
1226
  });
1234
1227
  }
1235
- else
1236
- r.rules && ((t = r.rules) == null ? void 0 : t.findIndex((s) => !!s.required)) === -1 && r.rules.unshift({
1237
- required: !0,
1238
- message: e
1239
- });
1240
1228
  return {
1241
1229
  rules: r.rules,
1242
1230
  required: r.required
@@ -1254,7 +1242,7 @@ const Cr = {
1254
1242
  props: n
1255
1243
  }) {
1256
1244
  let a;
1257
- return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
1245
+ return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, q({
1258
1246
  modelValue: a,
1259
1247
  "onUpdate:modelValue": (u) => {
1260
1248
  o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
@@ -1289,7 +1277,6 @@ const Cr = {
1289
1277
  };
1290
1278
  },
1291
1279
  getRuntimeRequired(r) {
1292
- var t;
1293
1280
  let e = `${r.label}是必填项`;
1294
1281
  if (r.required)
1295
1282
  if (o.isString(r.required) && (e = r.required), !r.rules)
@@ -1299,19 +1286,13 @@ const Cr = {
1299
1286
  trigger: ["input", "blur"]
1300
1287
  });
1301
1288
  else {
1302
- const i = r.rules.findIndex((s) => !o.isUndefined(s.required));
1303
- i !== -1 ? (r.rules[i].required = !0, r.rules[i].message = e) : r.rules.unshift({
1289
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1290
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = e) : r.rules.unshift({
1304
1291
  required: !0,
1305
1292
  message: e,
1306
1293
  trigger: ["input", "blur"]
1307
1294
  });
1308
1295
  }
1309
- else
1310
- r.rules && ((t = r.rules) == null ? void 0 : t.findIndex((s) => !!s.required)) === -1 && r.rules.unshift({
1311
- required: !0,
1312
- message: e,
1313
- trigger: ["input", "blur"]
1314
- });
1315
1296
  return {
1316
1297
  rule: r.rules
1317
1298
  };
@@ -1328,7 +1309,7 @@ const Cr = {
1328
1309
  props: n
1329
1310
  }) {
1330
1311
  let a;
1331
- return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
1312
+ return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, q({
1332
1313
  value: a,
1333
1314
  "onUpdate:value": (u) => {
1334
1315
  o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
@@ -1414,10 +1395,10 @@ l(R, "schemaPreset", {
1414
1395
  }), // 基于基本功能提出基本预设
1415
1396
  l(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
1416
1397
  let k = R;
1417
- const C = {
1398
+ const I = {
1418
1399
  ...k,
1419
1400
  adapters: {
1420
- ...Cr
1401
+ ...Ir
1421
1402
  }
1422
1403
  }, Or = /* @__PURE__ */ Ye({
1423
1404
  props: {
@@ -1427,7 +1408,7 @@ const C = {
1427
1408
  }
1428
1409
  },
1429
1410
  setup(r) {
1430
- const e = new Ir(r.setup);
1411
+ const e = new Cr(r.setup);
1431
1412
  return () => e.exec();
1432
1413
  }
1433
1414
  });
@@ -1444,7 +1425,7 @@ function wr(r) {
1444
1425
  }
1445
1426
  ];
1446
1427
  }
1447
- function xr(r) {
1428
+ function Fr(r) {
1448
1429
  d.presets = r;
1449
1430
  }
1450
1431
  function ne(r, e) {
@@ -1459,10 +1440,10 @@ function ne(r, e) {
1459
1440
  writable: !0
1460
1441
  }), r;
1461
1442
  }
1462
- function Fr(r) {
1443
+ function jr(r) {
1463
1444
  return ne(r, "native");
1464
1445
  }
1465
- function jr(r) {
1446
+ function xr(r) {
1466
1447
  return r.__proform_raw_object = !0, r;
1467
1448
  }
1468
1449
  function Rr(r) {
@@ -1479,11 +1460,11 @@ function $r(r) {
1479
1460
  }
1480
1461
  export {
1481
1462
  Or as ProForm,
1482
- Fr as markNativeFunction,
1483
- jr as markNativeObject,
1463
+ jr as markNativeFunction,
1464
+ xr as markNativeObject,
1484
1465
  Rr as markOnetimeFunction,
1485
1466
  $r as markStructuredPathParsing,
1486
1467
  wr as useForm,
1487
- xr as useFormPresetConfigurer,
1468
+ Fr as useFormPresetConfigurer,
1488
1469
  ne as useModifiers
1489
1470
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",