@harbor-design/proform 1.1.26 → 1.1.28

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 +30 -28
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -63,15 +63,15 @@ class l {
63
63
  return !1;
64
64
  }
65
65
  }
66
- function m(r, ...e) {
66
+ function y(r, ...e) {
67
67
  return e.forEach((t) => {
68
68
  if (Array.isArray(t))
69
69
  Array.isArray(r) || (r = []), t.forEach((s, i) => {
70
- typeof s == "object" && s !== null ? r[i] = m(Array.isArray(s) ? [] : {}, s) : r[i] = s;
70
+ typeof s == "object" && s !== null ? r[i] = y(Array.isArray(s) ? [] : {}, s) : r[i] = s;
71
71
  });
72
72
  else
73
73
  for (const s in t)
74
- t.hasOwnProperty(s) && (typeof t[s] == "object" && t[s] !== null ? r[s] = m(r[s] || {}, t[s]) : r[s] = t[s]);
74
+ t.hasOwnProperty(s) && (typeof t[s] == "object" && t[s] !== null ? r[s] = y(r[s] || {}, t[s]) : r[s] = t[s]);
75
75
  }), r;
76
76
  }
77
77
  function g(r) {
@@ -145,7 +145,7 @@ class fe {
145
145
  x(e) ? I(
146
146
  () => e.value,
147
147
  () => {
148
- m(this.runtimeCore.model.value, e.value);
148
+ y(this.runtimeCore.model.value, e.value);
149
149
  },
150
150
  {
151
151
  deep: !0,
@@ -154,13 +154,13 @@ class fe {
154
154
  ) : z(e) ? I(
155
155
  () => e,
156
156
  () => {
157
- m(this.runtimeCore.model.value, e);
157
+ y(this.runtimeCore.model.value, e);
158
158
  },
159
159
  {
160
160
  deep: !0,
161
161
  immediate: !0
162
162
  }
163
- ) : m(this.runtimeCore.model.value, e);
163
+ ) : y(this.runtimeCore.model.value, e);
164
164
  },
165
165
  {
166
166
  lazy: !0
@@ -266,17 +266,17 @@ class de {
266
266
  }).fill(!1);
267
267
  this.objectParser({ data: e, index: t, updater: n });
268
268
  function n(u) {
269
- const c = u.index, d = u.key, y = u.keyIndex;
269
+ const c = u.index, d = u.key, P = u.keyIndex;
270
270
  if (l.isUndefined(u.stable))
271
271
  return;
272
272
  const O = i.parseStable(u.stable), C = s == null ? void 0 : s.index, v = s == null ? void 0 : s.key;
273
- let P = O;
274
- if (l.isProcessInprogress(P) || (o[y] = !0), s) {
273
+ let m = O;
274
+ if (l.isProcessInprogress(m) || (o[P] = !0), s) {
275
275
  const h = i.processedSchemas.value[C][v][c][d];
276
- h && l.isObject(h) && d !== "component" && (P = m(h, P)), i.processedSchemas.value[C][v][c][d] = P, i.stableUpdater(o);
276
+ h && l.isObject(h) && d !== "component" && (m = y(h, m)), i.processedSchemas.value[C][v][c][d] = m, i.stableUpdater(o);
277
277
  } else {
278
278
  const h = i.processedSchemas.value[c][d];
279
- h && l.isObject(h) && d !== "component" && (P = m(h, P)), i.processedSchemas.value[c][d] = P, i.stableUpdater(o);
279
+ h && l.isObject(h) && d !== "component" && (m = y(h, m)), i.processedSchemas.value[c][d] = m, i.stableUpdater(o);
280
280
  }
281
281
  }
282
282
  }
@@ -508,25 +508,25 @@ class me {
508
508
  const o = j(e.component);
509
509
  if (!o)
510
510
  return;
511
- m(this.globalNativeFormOverride.props, ($ = (k = e.native) == null ? void 0 : k.props) == null ? void 0 : $.Form), m(this.globalNativeFormOverride.slots, (B = (_ = e.native) == null ? void 0 : _.slots) == null ? void 0 : B.Form);
512
- const n = m(g((G = (D = this.native) == null ? void 0 : D.slots) == null ? void 0 : G.FormItem) ?? {}, (K = (T = e.native) == null ? void 0 : T.slots) == null ? void 0 : K.FormItem), u = {
511
+ y(this.globalNativeFormOverride.props, ($ = (k = e.native) == null ? void 0 : k.props) == null ? void 0 : $.Form), y(this.globalNativeFormOverride.slots, (B = (_ = e.native) == null ? void 0 : _.slots) == null ? void 0 : B.Form);
512
+ const n = y(g((G = (D = this.native) == null ? void 0 : D.slots) == null ? void 0 : G.FormItem) ?? {}, (K = (T = e.native) == null ? void 0 : T.slots) == null ? void 0 : K.FormItem), u = {
513
513
  display: "grid",
514
514
  gridColumn: "1 / -1",
515
515
  ...e.grid
516
- }, c = m(g((H = (W = this.native) == null ? void 0 : W.props) == null ? void 0 : H.FormItem) ?? {}, (Q = (J = e.native) == null ? void 0 : J.props) == null ? void 0 : Q.FormItem), d = this.runtimeAdapter.getRuntimeField({
516
+ }, c = y(g((H = (W = this.native) == null ? void 0 : W.props) == null ? void 0 : H.FormItem) ?? {}, (Q = (J = e.native) == null ? void 0 : J.props) == null ? void 0 : Q.FormItem), d = this.runtimeAdapter.getRuntimeField({
517
517
  schema: e,
518
518
  parentSchema: i,
519
519
  index: t
520
- }), y = o.name, O = e.componentProps ?? {}, C = b.placeholderPresetByComponentName;
521
- let v = e.placeholder, P = e.show;
522
- P === void 0 && (P = !0), P || delete s[e.field];
520
+ }), P = o.name, O = e.componentProps ?? {}, C = b.placeholderPresetByComponentName;
521
+ let v = e.placeholder, m = e.show;
522
+ m === void 0 && (m = !0), m || delete s[e.field];
523
523
  let h = e.label ?? "";
524
524
  const V = (i == null ? void 0 : i.runtime) ?? this.runtime;
525
525
  if (!l.isUndefined(t) && !l.isObjectEmpty(V) && (h = U((X = V == null ? void 0 : V.customizeItemLabel) == null ? void 0 : X.call(V, e.label ?? "", t + 1), "")), !v) {
526
526
  let E = "请输入";
527
- l.isUndefined(y) ? v = `${E}${h}` : /* @ts-expect-error */ C[y.toLowerCase()] ? (E = // @ts-expect-error
528
- C[y.toLowerCase()], v = `${E}${h}`) : (Object.keys(C).forEach((Y) => {
529
- y.toLowerCase().includes(Y.toLowerCase()) && (E = C[Y]);
527
+ l.isUndefined(P) ? v = `${E}${h}` : /* @ts-expect-error */ C[P.toLowerCase()] ? (E = // @ts-expect-error
528
+ C[P.toLowerCase()], v = `${E}${h}`) : (Object.keys(C).forEach((Y) => {
529
+ P.toLowerCase().includes(Y.toLowerCase()) && (E = C[Y]);
530
530
  }), v = `${E}${h}`);
531
531
  }
532
532
  const ee = this.runtimeAdapter.getRuntimeRequired({
@@ -535,9 +535,11 @@ class me {
535
535
  }), te = F.getItemContainer(this), se = F.getFormItemContainer(this), re = this, ie = e.componentSlots;
536
536
  return p("div", {
537
537
  style: u
538
- }, [Z(p(te, null, {
538
+ }, [p(te, {
539
+ show: m
540
+ }, {
539
541
  default() {
540
- return p(se, R(c, {
542
+ return Z(p(se, R(c, {
541
543
  label: `${h ? `${h}:` : ""}`
542
544
  }, d, ee), {
543
545
  default() {
@@ -551,9 +553,9 @@ class me {
551
553
  });
552
554
  },
553
555
  ...n
554
- });
556
+ }), [[A, m]]);
555
557
  }
556
- }), [[A, P]])]);
558
+ })]);
557
559
  }
558
560
  runtimeGroupProcessor(e) {
559
561
  let t;
@@ -603,11 +605,11 @@ class me {
603
605
  delete({
604
606
  container: c
605
607
  } = {}) {
606
- var y;
608
+ var P;
607
609
  const d = c ?? p("button", null, null);
608
610
  return Z(p(d, {
609
611
  onClick: () => s.deleteListItem(e, u)
610
- }, null), [[A, ((y = s.model.value[e.field]) == null ? void 0 : y.length) > 1]]);
612
+ }, null), [[A, ((P = s.model.value[e.field]) == null ? void 0 : P.length) > 1]]);
611
613
  }
612
614
  }));
613
615
  },
@@ -625,13 +627,13 @@ class me {
625
627
  return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
626
628
  }
627
629
  exec() {
628
- var u, c, d, y;
630
+ var u, c, d, P;
629
631
  const e = {
630
632
  display: "grid",
631
633
  gridColumn: "1 / -1",
632
634
  gridAutoColumns: "1fr",
633
635
  ...this.grid
634
- }, t = this, s = m(g((c = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : c.Form) ?? {}, this.globalNativeFormOverride.props), i = m(g((y = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : y.Form) ?? {}, this.globalNativeFormOverride.slots), o = F.getFormContainer(this), n = this.runtimeAdapter.getFormModelPropName();
636
+ }, t = this, s = y(g((c = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : c.Form) ?? {}, this.globalNativeFormOverride.props), i = y(g((P = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : P.Form) ?? {}, this.globalNativeFormOverride.slots), o = F.getFormContainer(this), n = this.runtimeAdapter.getFormModelPropName();
635
637
  return p(o, R(s, {
636
638
  ref: this.formRef
637
639
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.1.26",
3
+ "version": "1.1.28",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",