@harbor-design/proform 1.1.27 → 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 +39 -39
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- var re = Object.defineProperty;
2
- var ie = (r, e, t) => e in r ? re(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var a = (r, e, t) => (ie(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { isRef as x, watch as I, isReactive as z, toRaw as j, nextTick as w, ref as q, reactive as oe, createVNode as p, mergeProps as R, withDirectives as ne, vShow as le, createTextVNode as ae, isVNode as ue, defineComponent as ce } from "vue";
1
+ var oe = Object.defineProperty;
2
+ var ne = (r, e, t) => e in r ? oe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var a = (r, e, t) => (ne(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { isRef as x, watch as I, isReactive as z, toRaw as j, nextTick as w, ref as q, reactive as le, createVNode as p, withDirectives as Z, mergeProps as R, vShow as A, createTextVNode as ae, isVNode as ue, defineComponent as ce } from "vue";
5
5
  class l {
6
6
  static typeChecker(e) {
7
7
  return {}.toString.call(e);
@@ -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
  }
@@ -469,7 +469,7 @@ class me {
469
469
  });
470
470
  a(this, "formRef", q(null));
471
471
  a(this, "hydrateEffect", new N());
472
- a(this, "native", oe({}));
472
+ a(this, "native", le({}));
473
473
  a(this, "grid", {});
474
474
  a(this, "runtime", {});
475
475
  a(this, "globalNativeFormOverride", {
@@ -508,52 +508,52 @@ 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
- const Z = this.runtimeAdapter.getRuntimeRequired({
532
+ const ee = this.runtimeAdapter.getRuntimeRequired({
533
533
  ...e,
534
534
  label: h
535
- }), A = F.getItemContainer(this), ee = F.getFormItemContainer(this), te = this, se = e.componentSlots;
535
+ }), te = F.getItemContainer(this), se = F.getFormItemContainer(this), re = this, ie = e.componentSlots;
536
536
  return p("div", {
537
537
  style: u
538
- }, [p(A, {
539
- show: P
538
+ }, [p(te, {
539
+ show: m
540
540
  }, {
541
541
  default() {
542
- return p(ee, R(c, {
542
+ return Z(p(se, R(c, {
543
543
  label: `${h ? `${h}:` : ""}`
544
- }, d, Z), {
544
+ }, d, ee), {
545
545
  default() {
546
- return te.runtimeAdapter.formComponentRenderer({
546
+ return re.runtimeAdapter.formComponentRenderer({
547
547
  Component: o,
548
548
  schema: e,
549
549
  baseModel: s,
550
550
  placeholder: v,
551
- componentSlots: se,
551
+ componentSlots: ie,
552
552
  props: O
553
553
  });
554
554
  },
555
555
  ...n
556
- });
556
+ }), [[A, m]]);
557
557
  }
558
558
  })]);
559
559
  }
@@ -605,11 +605,11 @@ class me {
605
605
  delete({
606
606
  container: c
607
607
  } = {}) {
608
- var y;
608
+ var P;
609
609
  const d = c ?? p("button", null, null);
610
- return ne(p(d, {
610
+ return Z(p(d, {
611
611
  onClick: () => s.deleteListItem(e, u)
612
- }, null), [[le, ((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]]);
613
613
  }
614
614
  }));
615
615
  },
@@ -627,13 +627,13 @@ class me {
627
627
  return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
628
628
  }
629
629
  exec() {
630
- var u, c, d, y;
630
+ var u, c, d, P;
631
631
  const e = {
632
632
  display: "grid",
633
633
  gridColumn: "1 / -1",
634
634
  gridAutoColumns: "1fr",
635
635
  ...this.grid
636
- }, 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();
637
637
  return p(o, R(s, {
638
638
  ref: this.formRef
639
639
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",