@harbor-design/proform 1.4.18 → 1.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,17 +1,3 @@
1
- # ProForm
1
+ # 废弃
2
2
 
3
- 动态表单迭代中...
4
-
5
- # Documents
6
-
7
- 文档持续更新中...
8
-
9
- https://yiwwhl.github.io/oasis/docs/harbor-design/pro-form/get-started/introduction.html
10
-
11
- # Issues
12
-
13
- https://github.com/yiwwhl/harbor-design/issues
14
-
15
- # Stackblitz
16
-
17
- https://stackblitz.com/edit/proform?embed=1&file=src%2FApp.tsx
3
+ Harbor Design ProForm 已放弃维护,请关注 [ProForm](https://www.npmjs.com/package/@techlodge/proform) 选择性替代。
package/dist/index.js CHANGED
@@ -17,9 +17,9 @@ var ft = Object.prototype, ct = ft.toString;
17
17
  function dt(r) {
18
18
  return ct.call(r);
19
19
  }
20
- var ht = "[object Null]", pt = "[object Undefined]", Ue = V ? V.toStringTag : void 0;
20
+ var pt = "[object Null]", ht = "[object Undefined]", Ue = V ? V.toStringTag : void 0;
21
21
  function De(r) {
22
- return r == null ? r === void 0 ? pt : ht : Ue && Ue in Object(r) ? ut(r) : dt(r);
22
+ return r == null ? r === void 0 ? ht : pt : Ue && Ue in Object(r) ? ut(r) : dt(r);
23
23
  }
24
24
  function mt(r) {
25
25
  return r != null && typeof r == "object";
@@ -48,12 +48,12 @@ function W(r) {
48
48
  var e = typeof r;
49
49
  return r != null && (e == "object" || e == "function");
50
50
  }
51
- var yt = "[object AsyncFunction]", _t = "[object Function]", Pt = "[object GeneratorFunction]", It = "[object Proxy]";
51
+ var yt = "[object AsyncFunction]", Pt = "[object Function]", _t = "[object GeneratorFunction]", It = "[object Proxy]";
52
52
  function G(r) {
53
53
  if (!W(r))
54
54
  return !1;
55
55
  var e = De(r);
56
- return e == _t || e == Pt || e == yt || e == It;
56
+ return e == Pt || e == _t || e == yt || e == It;
57
57
  }
58
58
  var Q = re["__core-js_shared__"], ze = function() {
59
59
  var r = /[^.]+$/.exec(Q && Q.keys && Q.keys.IE_PROTO || "");
@@ -76,8 +76,8 @@ function Et(r) {
76
76
  }
77
77
  return "";
78
78
  }
79
- var Ot = /[\\^$.*+?()[\]{}|]/g, wt = /^\[object .+?Constructor\]$/, jt = Function.prototype, xt = Object.prototype, Rt = jt.toString, $t = xt.hasOwnProperty, Mt = RegExp(
80
- "^" + Rt.call($t).replace(Ot, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
79
+ var Ot = /[\\^$.*+?()[\]{}|]/g, wt = /^\[object .+?Constructor\]$/, jt = Function.prototype, xt = Object.prototype, $t = jt.toString, Rt = xt.hasOwnProperty, Mt = RegExp(
80
+ "^" + $t.call(Rt).replace(Ot, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
81
81
  );
82
82
  function Vt(r) {
83
83
  if (!W(r) || Ct(r))
@@ -221,11 +221,11 @@ function Y(r, e) {
221
221
  var t = r.__data__;
222
222
  return dr(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
223
223
  }
224
- function hr(r) {
224
+ function pr(r) {
225
225
  var e = Y(this, r).delete(r);
226
226
  return this.size -= e ? 1 : 0, e;
227
227
  }
228
- function pr(r) {
228
+ function hr(r) {
229
229
  return Y(this, r).get(r);
230
230
  }
231
231
  function mr(r) {
@@ -243,8 +243,8 @@ function x(r) {
243
243
  }
244
244
  }
245
245
  x.prototype.clear = cr;
246
- x.prototype.delete = hr;
247
- x.prototype.get = pr;
246
+ x.prototype.delete = pr;
247
+ x.prototype.get = hr;
248
248
  x.prototype.has = mr;
249
249
  x.prototype.set = gr;
250
250
  var vr = "Expected a function";
@@ -268,10 +268,10 @@ function yr(r) {
268
268
  }), t = e.cache;
269
269
  return e;
270
270
  }
271
- var _r = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Pr = /\\(\\)?/g, Ir = yr(function(r) {
271
+ var Pr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _r = /\\(\\)?/g, Ir = yr(function(r) {
272
272
  var e = [];
273
- return r.charCodeAt(0) === 46 && e.push(""), r.replace(_r, function(t, i, s, n) {
274
- e.push(s ? n.replace(Pr, "$1") : i || t);
273
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(Pr, function(t, i, s, n) {
274
+ e.push(s ? n.replace(_r, "$1") : i || t);
275
275
  }), e;
276
276
  });
277
277
  function Cr(r) {
@@ -306,14 +306,14 @@ function Er(r, e, t, i) {
306
306
  if (f === "__proto__" || f === "constructor" || f === "prototype")
307
307
  return r;
308
308
  if (s != a) {
309
- var h = u[f];
310
- c = i ? i(h, f, u) : void 0, c === void 0 && (c = W(h) ? h : Tt(e[s + 1]) ? [] : {});
309
+ var p = u[f];
310
+ c = i ? i(p, f, u) : void 0, c === void 0 && (c = W(p) ? p : Tt(e[s + 1]) ? [] : {});
311
311
  }
312
312
  Dt(u, f, c), u = u[f];
313
313
  }
314
314
  return r;
315
315
  }
316
- function _(r, e, t) {
316
+ function P(r, e, t) {
317
317
  return r == null ? r : Er(r, e, t);
318
318
  }
319
319
  class o {
@@ -496,10 +496,10 @@ class Or {
496
496
  S(() => {
497
497
  Object.keys(e).forEach((t) => {
498
498
  z(e[t]) ? K(() => {
499
- _(this.runtimeCore.shared, t, e[t].value), this.shareHistory.get(t) !== e[t].value && (this.shareHistory.set(t, e[t].value), this.runtimeCore.processor.schemaEffect.triggerEffects());
499
+ P(this.runtimeCore.shared, t, e[t].value), this.shareHistory.get(t) !== e[t].value && (this.shareHistory.set(t, e[t].value), this.runtimeCore.processor.schemaEffect.triggerEffects());
500
500
  }) : L(e[t]) ? K(() => {
501
- _(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
502
- }) : (_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
501
+ P(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
502
+ }) : (P(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
503
503
  });
504
504
  });
505
505
  }
@@ -639,12 +639,12 @@ class wr {
639
639
  }).fill(!1);
640
640
  this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
641
641
  function a(u) {
642
- const f = u.index, c = u.key, h = u.keyIndex;
642
+ const f = u.index, c = u.key, p = u.keyIndex;
643
643
  if (o.isUndefined(u.stable) || o.isNull(u.stable))
644
644
  return;
645
- const p = s.parseStable(u.stable), y = i == null ? void 0 : i.index, w = i == null ? void 0 : i.key;
646
- let g = p;
647
- if (o.isProcessInprogress(g) || (n[h] = !0), i) {
645
+ const h = s.parseStable(u.stable), y = i == null ? void 0 : i.index, w = i == null ? void 0 : i.key;
646
+ let g = h;
647
+ if (o.isProcessInprogress(g) || (n[p] = !0), i) {
648
648
  const b = s.processedSchemas.value[y][w][f][c];
649
649
  b && o.isObject(b) && c !== "component" && (g = v(b, g)), s.processedSchemas.value[y][w][f][c] = g, s.stableUpdater(
650
650
  n,
@@ -709,17 +709,17 @@ class wr {
709
709
  () => {
710
710
  /\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
711
711
  t[s],
712
- (h) => {
713
- if (!h)
714
- return f(h);
715
- this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
712
+ (p) => {
713
+ if (!p)
714
+ return f(p);
715
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
716
716
  this.defaultValueInprogressMap.values()
717
- ).every((p) => {
717
+ ).every((h) => {
718
718
  var y;
719
- return !((y = p == null ? void 0 : p.includes) != null && y.call(p, "undefined"));
720
- }) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
719
+ return !((y = h == null ? void 0 : h.includes) != null && y.call(h, "undefined"));
720
+ }) ? (f(p), this.defaultValueEffect.clearEffects(), S(() => {
721
721
  c();
722
- })) : f(h);
722
+ })) : f(p);
723
723
  },
724
724
  {
725
725
  rootIndex: e.index,
@@ -727,15 +727,15 @@ class wr {
727
727
  }
728
728
  ) : this.fieldParser(
729
729
  t[s],
730
- (h) => {
731
- this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
730
+ (p) => {
731
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
732
732
  this.defaultValueInprogressMap.values()
733
- ).every((p) => {
733
+ ).every((h) => {
734
734
  var y;
735
- return !((y = p == null ? void 0 : p.includes) != null && y.call(p, "undefined"));
736
- }) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
735
+ return !((y = h == null ? void 0 : h.includes) != null && y.call(h, "undefined"));
736
+ }) ? (f(p), this.defaultValueEffect.clearEffects(), S(() => {
737
737
  c();
738
- })) : f(h);
738
+ })) : f(p);
739
739
  },
740
740
  {
741
741
  rootIndex: e.index,
@@ -839,7 +839,7 @@ class wr {
839
839
  });
840
840
  }
841
841
  setModel(e, t, i) {
842
- o.isFunction(t) ? _(e, t(), i) : v(e, {
842
+ o.isFunction(t) ? P(e, t(), i) : v(e, {
843
843
  [t]: i
844
844
  });
845
845
  }
@@ -861,7 +861,7 @@ class wr {
861
861
  });
862
862
  }
863
863
  }
864
- class R {
864
+ class $ {
865
865
  static getFormContainer({ ui: e } = {}) {
866
866
  return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
867
867
  }
@@ -918,7 +918,7 @@ class jr {
918
918
  function xr(r) {
919
919
  return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !it(r);
920
920
  }
921
- class Rr {
921
+ class $r {
922
922
  constructor(e) {
923
923
  l(this, "schemas", D([]));
924
924
  l(this, "model", D({}));
@@ -944,9 +944,10 @@ class Rr {
944
944
  }));
945
945
  l(this, "shared", J({}));
946
946
  l(this, "shareHistory", /* @__PURE__ */ new Map());
947
+ l(this, "specialFormIdPrefix", "");
947
948
  this.setup = e, this.processor = new wr(this);
948
949
  const t = this.setup(this);
949
- this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new jr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), z(t.schemas) ? O(
950
+ this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new jr(this.ui), this.specialFormIdPrefix = t.specialFormIdPrefix ?? "", Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), z(t.schemas) ? O(
950
951
  // @ts-expect-error
951
952
  () => t.schemas.value,
952
953
  () => {
@@ -971,63 +972,64 @@ class Rr {
971
972
  S(() => {
972
973
  Object.keys(t).forEach((i) => {
973
974
  z(t[i]) ? K(() => {
974
- _(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
975
+ P(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
975
976
  }) : L(t[i]) ? K(() => {
976
- _(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
977
- }) : (_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
977
+ P(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
978
+ }) : (P(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
978
979
  });
979
980
  });
980
981
  }
981
982
  };
982
983
  }
983
984
  runtimeItemProcessor(e, t, i = this.model.value, s) {
984
- var le, ue, fe, ce, de, he, pe, me, ge, ve, be, ye, _e, Pe, Ie, Ce, Se, Fe, Ee, Oe, we, je, xe, Re, $e, Me;
985
+ var le, ue, fe, ce, de, pe, he, me, ge, ve, be, ye, Pe, _e, Ie, Ce, Se, Fe, Ee, Oe, we, je, xe, $e, Re, Me;
985
986
  const n = M(e.component);
986
987
  if (!n)
987
988
  return;
988
- (ue = (le = e.native) == null ? void 0 : le.props) != null && ue.Form && v(this.globalNativeFormOverride.props.Form, (ce = (fe = e.native) == null ? void 0 : fe.props) == null ? void 0 : ce.Form), (he = (de = e.native) == null ? void 0 : de.slots) != null && he.FormItem && v(this.globalNativeFormOverride.slots.FormItem, (me = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem);
989
+ (ue = (le = e.native) == null ? void 0 : le.props) != null && ue.Form && v(this.globalNativeFormOverride.props.Form, (ce = (fe = e.native) == null ? void 0 : fe.props) == null ? void 0 : ce.Form), (pe = (de = e.native) == null ? void 0 : de.slots) != null && pe.FormItem && v(this.globalNativeFormOverride.slots.FormItem, (me = (he = e.native) == null ? void 0 : he.slots) == null ? void 0 : me.FormItem);
989
990
  const a = v(I((ve = (ge = this.native) == null ? void 0 : ge.slots) == null ? void 0 : ve.FormItem) ?? {}, (ye = (be = e.native) == null ? void 0 : be.slots) == null ? void 0 : ye.FormItem), u = {
990
991
  display: "grid",
991
992
  gridColumn: "1 / -1",
992
993
  ...e.grid
993
994
  };
994
995
  let f = {
995
- ...(Pe = (_e = e.native) == null ? void 0 : _e.props) == null ? void 0 : Pe.FormItem
996
+ ...(_e = (Pe = e.native) == null ? void 0 : Pe.props) == null ? void 0 : _e.FormItem
996
997
  };
997
998
  G((Se = (Ce = (Ie = e.native) == null ? void 0 : Ie.props) == null ? void 0 : Ce.FormItem) == null ? void 0 : Se.tooltip) && (f = {
998
999
  ...(Ee = (Fe = e.native) == null ? void 0 : Fe.props) == null ? void 0 : Ee.FormItem,
999
1000
  tooltip: (je = (we = (Oe = e.native) == null ? void 0 : Oe.props) == null ? void 0 : we.FormItem) == null ? void 0 : je.tooltip()
1000
1001
  });
1001
- const c = v(I((Re = (xe = this.native) == null ? void 0 : xe.props) == null ? void 0 : Re.FormItem) ?? {}, f), h = this.runtimeAdapter.getRuntimeField({
1002
+ const c = v(I(($e = (xe = this.native) == null ? void 0 : xe.props) == null ? void 0 : $e.FormItem) ?? {}, f), p = this.runtimeAdapter.getRuntimeField({
1002
1003
  schema: e,
1003
1004
  parentSchema: s,
1004
1005
  index: t
1005
- }), p = n.name, y = e.componentProps ?? {}, w = C.placeholderPresetByComponentName;
1006
+ }), h = n.name, y = e.componentProps ?? {}, w = C.placeholderPresetByComponentName;
1006
1007
  let g = G(e.placeholder) ? e.placeholder() : e.placeholder, b = e.show;
1007
1008
  b === void 0 && (b = !0);
1008
1009
  let F = (G(e.label) ? e.label() : e.label) ?? "", E;
1009
- if (e.runtime ? E = e.runtime : E = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(E) && (F = k(($e = E == null ? void 0 : E.customizeListItemLabel) == null ? void 0 : $e.call(E, e.label ?? "", t + 1), "")), !g) {
1010
+ if (e.runtime ? E = e.runtime : E = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(E) && (F = k((Re = E == null ? void 0 : E.customizeListItemLabel) == null ? void 0 : Re.call(E, e.label ?? "", t + 1), "")), !g) {
1010
1011
  let U = "请输入";
1011
- o.isUndefined(p) ? g = `${U}${F}` : /* @ts-expect-error */ w[p.toLowerCase()] ? (U = // @ts-expect-error
1012
- w[p.toLowerCase()], g = `${U}${F}`) : (Object.keys(w).forEach((Ve) => {
1013
- p.toLowerCase().includes(Ve.toLowerCase()) && (U = w[Ve]);
1012
+ o.isUndefined(h) ? g = `${U}${F}` : /* @ts-expect-error */ w[h.toLowerCase()] ? (U = // @ts-expect-error
1013
+ w[h.toLowerCase()], g = `${U}${F}`) : (Object.keys(w).forEach((Ve) => {
1014
+ h.toLowerCase().includes(Ve.toLowerCase()) && (U = w[Ve]);
1014
1015
  }), g = `${U}${F}`);
1015
1016
  }
1016
1017
  const Xe = this.runtimeAdapter.getRuntimeRequired({
1017
1018
  ...e,
1018
1019
  label: F
1019
- }), Ye = R.getItemContainer(this), Ze = R.getFormItemContainer(this), Je = this, Qe = e.componentSlots, P = (Me = d.presets.uiPresets[this.ui]) == null ? void 0 : Me.display;
1020
+ }), Ye = $.getItemContainer(this), Ze = $.getFormItemContainer(this), Je = this, Qe = e.componentSlots, _ = (Me = d.presets.uiPresets[this.ui]) == null ? void 0 : Me.display;
1020
1021
  let Z;
1021
- return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ? Z = `${F}${P == null ? void 0 : P.labelPrefix}` : Z = `${F}:`, m("div", {
1022
+ return !o.isUndefined(_ == null ? void 0 : _.labelPrefix) && !o.isNull(_ == null ? void 0 : _.labelPrefix) ? Z = `${F}${_ == null ? void 0 : _.labelPrefix}` : Z = `${F}:`, m("div", {
1022
1023
  style: u
1023
1024
  }, [m(Ye, {
1024
1025
  show: b,
1025
- schema: e
1026
+ schema: e,
1027
+ id: t ? `${this.specialFormIdPrefix}${e.field}-${t}` : `${this.specialFormIdPrefix}${e.field}`
1026
1028
  }, {
1027
1029
  default() {
1028
1030
  return b && m(Ze, T(c, {
1029
1031
  label: `${F ? Z : ""}`
1030
- }, h, Xe), {
1032
+ }, p, Xe), {
1031
1033
  default() {
1032
1034
  return Je.runtimeAdapter.formComponentRenderer({
1033
1035
  Component: n,
@@ -1049,7 +1051,7 @@ class Rr {
1049
1051
  display: "grid",
1050
1052
  gridColumn: "1 / -1",
1051
1053
  ...e.grid
1052
- }, s = R.getGroupContainer(this);
1054
+ }, s = $.getGroupContainer(this);
1053
1055
  let n = e.show;
1054
1056
  return n === void 0 && (n = !0), m("div", {
1055
1057
  style: i
@@ -1075,7 +1077,7 @@ class Rr {
1075
1077
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1076
1078
  let s = e.show;
1077
1079
  s === void 0 && (s = !0);
1078
- const n = R.getListContainer(this), a = R.getListItemContainer(this);
1080
+ const n = $.getListContainer(this), a = $.getListItemContainer(this);
1079
1081
  return m("div", {
1080
1082
  style: t
1081
1083
  }, [s && m(n, {
@@ -1089,11 +1091,11 @@ class Rr {
1089
1091
  delete({
1090
1092
  container: c
1091
1093
  } = {}) {
1092
- var p;
1093
- const h = c ?? m("button", null, null);
1094
- return et(m(h, {
1094
+ var h;
1095
+ const p = c ?? m("button", null, null);
1096
+ return et(m(p, {
1095
1097
  onClick: () => i.deleteListItem(e, f)
1096
- }, null), [[tt, ((p = i.model.value[e.field]) == null ? void 0 : p.length) > 1]]);
1098
+ }, null), [[tt, ((h = i.model.value[e.field]) == null ? void 0 : h.length) > 1]]);
1097
1099
  }
1098
1100
  }));
1099
1101
  },
@@ -1111,13 +1113,13 @@ class Rr {
1111
1113
  return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
1112
1114
  }
1113
1115
  exec() {
1114
- var u, f, c, h;
1116
+ var u, f, c, p;
1115
1117
  const e = {
1116
1118
  display: "grid",
1117
1119
  gridColumn: "1 / -1",
1118
1120
  gridAutoColumns: "1fr",
1119
1121
  ...this.grid
1120
- }, 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 = R.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1122
+ }, 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((p = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : p.Form) ?? {}), n = $.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1121
1123
  return m(n, T(i, {
1122
1124
  ref: this.formRef
1123
1125
  }, {
@@ -1150,7 +1152,7 @@ function A({
1150
1152
  }) {
1151
1153
  return r ? `${r.field}.${t}.${e.field}` : e.field;
1152
1154
  }
1153
- const $r = {
1155
+ const Rr = {
1154
1156
  ArcoVue: {
1155
1157
  getRuntimeField(r) {
1156
1158
  const e = A(r);
@@ -1194,7 +1196,7 @@ const $r = {
1194
1196
  return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
1195
1197
  modelValue: a,
1196
1198
  "onUpdate:modelValue": (u) => {
1197
- o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
1199
+ o.isFunction(t.field) ? P(e, t.field(), u) : e[t.field] = u;
1198
1200
  },
1199
1201
  placeholder: i
1200
1202
  }, n), {
@@ -1255,7 +1257,7 @@ const $r = {
1255
1257
  return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
1256
1258
  modelValue: a,
1257
1259
  "onUpdate:modelValue": (u) => {
1258
- o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
1260
+ o.isFunction(t.field) ? P(e, t.field(), u) : e[t.field] = u;
1259
1261
  },
1260
1262
  placeholder: i
1261
1263
  }, n), {
@@ -1322,7 +1324,7 @@ const $r = {
1322
1324
  return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
1323
1325
  value: a,
1324
1326
  "onUpdate:value": (u) => {
1325
- o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
1327
+ o.isFunction(t.field) ? P(e, t.field(), u) : e[t.field] = u;
1326
1328
  },
1327
1329
  placeholder: i
1328
1330
  }, n), {
@@ -1339,7 +1341,7 @@ const $r = {
1339
1341
  (t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
1340
1342
  }
1341
1343
  }
1342
- }, $ = class $ {
1344
+ }, R = class R {
1343
1345
  static getPlaceholderPrefixPresetByComponentName() {
1344
1346
  const e = {
1345
1347
  请选择: ["select", "tree"],
@@ -1352,7 +1354,7 @@ const $r = {
1352
1354
  return t;
1353
1355
  }
1354
1356
  };
1355
- l($, "schemaPreset", {
1357
+ l(R, "schemaPreset", {
1356
1358
  type: {
1357
1359
  defaultValue: "item"
1358
1360
  },
@@ -1398,17 +1400,17 @@ l($, "schemaPreset", {
1398
1400
  runtime: {
1399
1401
  default: void 0
1400
1402
  }
1401
- }), l($, "componentPropsPreset", {
1403
+ }), l(R, "componentPropsPreset", {
1402
1404
  options: {
1403
1405
  defaultValue: []
1404
1406
  }
1405
1407
  }), // 基于基本功能提出基本预设
1406
- l($, "placeholderPresetByComponentName", $.getPlaceholderPrefixPresetByComponentName());
1407
- let te = $;
1408
+ l(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
1409
+ let te = R;
1408
1410
  const C = {
1409
1411
  ...te,
1410
1412
  adapters: {
1411
- ...$r
1413
+ ...Rr
1412
1414
  }
1413
1415
  }, Nr = /* @__PURE__ */ st({
1414
1416
  props: {
@@ -1418,7 +1420,7 @@ const C = {
1418
1420
  }
1419
1421
  },
1420
1422
  setup(r) {
1421
- const e = new Rr(r.setup);
1423
+ const e = new $r(r.setup);
1422
1424
  return () => e.exec();
1423
1425
  }
1424
1426
  });
@@ -28,6 +28,7 @@ export default class RuntimeCore {
28
28
  runtimeAdapter: RuntimeAdpter;
29
29
  shared: AnyObject;
30
30
  shareHistory: Map<any, any>;
31
+ specialFormIdPrefix: string;
31
32
  constructor(setup: Setup);
32
33
  getRuntimeMeta(): {
33
34
  model: AnyObject;
@@ -108,6 +108,7 @@ export interface FormCustomization {
108
108
  native?: NativeCustomizationOptions;
109
109
  runtime?: Runtime;
110
110
  schemas: Ref<ProxyedSchema[]> | ProxyedSchema[];
111
+ specialFormIdPrefix?: any;
111
112
  }
112
113
  export type NativeCustomizationOptions = {
113
114
  props?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.4.18",
3
+ "version": "1.4.20",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",