@harbor-design/proform 1.1.27 → 1.1.29

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/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 k, watch as I, isReactive as $, toRaw as w, nextTick as M, ref as U, reactive as le, createVNode as p, withDirectives as O, mergeProps as R, vShow as q, 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) {
@@ -85,8 +85,8 @@ function g(r) {
85
85
  return new RegExp(s);
86
86
  if (s instanceof Map) {
87
87
  const o = /* @__PURE__ */ new Map();
88
- for (const [n, u] of s)
89
- o.set(t(n), t(u));
88
+ for (const [n, c] of s)
89
+ o.set(t(n), t(c));
90
90
  return o;
91
91
  }
92
92
  if (s instanceof Set) {
@@ -112,7 +112,7 @@ function g(r) {
112
112
  }
113
113
  return t(r);
114
114
  }
115
- function U(r, e) {
115
+ function L(r, e) {
116
116
  return r.replace(/undefined/g, e);
117
117
  }
118
118
  class fe {
@@ -142,25 +142,25 @@ class fe {
142
142
  });
143
143
  this.runtimeCore.hydrateEffect.trackEffect(
144
144
  () => {
145
- x(e) ? I(
145
+ k(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,
152
152
  immediate: !0
153
153
  }
154
- ) : z(e) ? I(
154
+ ) : $(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
@@ -168,7 +168,7 @@ class fe {
168
168
  );
169
169
  }
170
170
  }
171
- class N {
171
+ class x {
172
172
  constructor() {
173
173
  a(this, "effects", /* @__PURE__ */ new Set());
174
174
  }
@@ -196,8 +196,8 @@ class de {
196
196
  a(this, "componentPropsPreset", b.componentPropsPreset);
197
197
  a(this, "stableUpdaterProcessProgress");
198
198
  a(this, "stableUpdaterTimes", 0);
199
- a(this, "schemaEffect", new N());
200
- a(this, "defaultValueEffect", new N());
199
+ a(this, "schemaEffect", new x());
200
+ a(this, "defaultValueEffect", new x());
201
201
  a(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
202
202
  a(this, "baseDefaultValueFunctionsLength");
203
203
  a(this, "isModelInitialized", !0);
@@ -253,7 +253,7 @@ class de {
253
253
  // 对于稳定初始化更新的抽象
254
254
  stableUpdater(e = []) {
255
255
  if (e.every(Boolean)) {
256
- const t = j(this.processedSchemas.value);
256
+ const t = w(this.processedSchemas.value);
257
257
  !l.isProcessInprogress(t) && l.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
258
258
  length: t.length
259
259
  }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(t));
@@ -262,21 +262,21 @@ class de {
262
262
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
263
263
  parseItem(e, t, s) {
264
264
  const i = this, o = Array.from({
265
- length: Object.keys(e).filter((u) => u !== "children").length
265
+ length: Object.keys(e).filter((c) => c !== "children").length
266
266
  }).fill(!1);
267
267
  this.objectParser({ data: e, index: t, updater: n });
268
- function n(u) {
269
- const c = u.index, d = u.key, y = u.keyIndex;
270
- if (l.isUndefined(u.stable))
268
+ function n(c) {
269
+ const u = c.index, d = c.key, P = c.keyIndex;
270
+ if (l.isUndefined(c.stable))
271
271
  return;
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) {
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);
272
+ const V = i.parseStable(c.stable), C = s == null ? void 0 : s.index, v = s == null ? void 0 : s.key;
273
+ let m = V;
274
+ if (l.isProcessInprogress(m) || (o[P] = !0), s) {
275
+ const h = i.processedSchemas.value[C][v][u][d];
276
+ h && l.isObject(h) && d !== "component" && (m = y(h, m)), i.processedSchemas.value[C][v][u][d] = m, i.stableUpdater(o);
277
277
  } else {
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);
278
+ const h = i.processedSchemas.value[u][d];
279
+ h && l.isObject(h) && d !== "component" && (m = y(h, m)), i.processedSchemas.value[u][d] = m, i.stableUpdater(o);
280
280
  }
281
281
  }
282
282
  }
@@ -291,19 +291,19 @@ class de {
291
291
  keyIndex: o
292
292
  });
293
293
  else {
294
- const n = (u) => {
294
+ const n = (c) => {
295
295
  e.updater({
296
296
  ...e,
297
297
  key: i,
298
298
  keyIndex: o,
299
- stable: u
299
+ stable: c
300
300
  });
301
301
  };
302
302
  l.isFunction(t[i]) ? i !== "defaultValue" ? this.schemaEffect.trackEffect(
303
303
  () => {
304
304
  if (i === "component") {
305
- const u = t[i](this.getRuntimeMeta());
306
- this.promiseFieldParser(u, n, !1);
305
+ const c = t[i](this.getRuntimeMeta());
306
+ this.promiseFieldParser(c, n, !1);
307
307
  } else
308
308
  this.fieldParser(t[i], n);
309
309
  },
@@ -312,21 +312,21 @@ class de {
312
312
  }
313
313
  ) : this.defaultValueEffect.trackEffect(
314
314
  () => {
315
- const u = this.schemaEffect.trackEffect(() => {
316
- /\{\s*model\s*\}/.test(t[i].toString()) ? this.fieldParser(t[i], (c) => {
317
- if (!c)
318
- return n(c);
319
- this.defaultValueInprogressMap.set(t[i], c), !l.isProcessInprogress(c) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
315
+ const c = this.schemaEffect.trackEffect(() => {
316
+ /\{\s*model\s*\}/.test(t[i].toString()) ? this.fieldParser(t[i], (u) => {
317
+ if (!u)
318
+ return n(u);
319
+ this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
320
320
  this.defaultValueInprogressMap.values()
321
- ).every((d) => !d.includes("undefined")) ? (n(c), this.defaultValueEffect.clearEffects(), w(() => {
322
- u();
323
- })) : n(c);
324
- }) : this.fieldParser(t[i], (c) => {
325
- this.defaultValueInprogressMap.set(t[i], c), !l.isProcessInprogress(c) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
321
+ ).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), M(() => {
322
+ c();
323
+ })) : n(u);
324
+ }) : this.fieldParser(t[i], (u) => {
325
+ this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
326
326
  this.defaultValueInprogressMap.values()
327
- ).every((d) => !d.includes("undefined")) ? (n(c), this.defaultValueEffect.clearEffects(), w(() => {
328
- u();
329
- })) : n(c);
327
+ ).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), M(() => {
328
+ c();
329
+ })) : n(u);
330
330
  });
331
331
  });
332
332
  },
@@ -339,11 +339,11 @@ class de {
339
339
  }
340
340
  promiseFieldParser(e, t, s) {
341
341
  l.isPromise(e) ? e.then((i) => {
342
- l.isString(i) && (i = U(i, "")), s && l.isObject(i) ? this.objectParser({
342
+ l.isString(i) && (i = L(i, "")), s && l.isObject(i) ? this.objectParser({
343
343
  data: i,
344
344
  updater: t
345
345
  }) : t(i);
346
- }) : (l.isString(e) && (e = U(e, "")), s && l.isObject(e) ? this.objectParser({
346
+ }) : (l.isString(e) && (e = L(e, "")), s && l.isObject(e) ? this.objectParser({
347
347
  data: e,
348
348
  updater: t
349
349
  }) : t(e));
@@ -363,7 +363,7 @@ class de {
363
363
  this.promiseFieldParser(i, t, s);
364
364
  }
365
365
  else
366
- x(e) ? I(
366
+ k(e) ? I(
367
367
  () => e.value,
368
368
  () => {
369
369
  l.isUndefined(e.value) || (s && l.isObject(e.value) ? this.objectParser({
@@ -375,7 +375,7 @@ class de {
375
375
  immediate: !0,
376
376
  deep: !0
377
377
  }
378
- ) : z(e) ? I(
378
+ ) : $(e) ? I(
379
379
  () => e,
380
380
  () => {
381
381
  l.isUndefined(e) || (s && l.isObject(e) ? this.objectParser({
@@ -405,7 +405,7 @@ class de {
405
405
  }), l.isItemSchema(e) && ("defaultValue" in e ? t[e.field] = e.defaultValue : t[e.field] || (t[e.field] = void 0));
406
406
  }
407
407
  }
408
- class F {
408
+ class S {
409
409
  static getFormContainer({ ui: e } = {}) {
410
410
  return f.presets.uiPresets[e ?? f.presets.ui].container.Form;
411
411
  }
@@ -460,16 +460,16 @@ function he(r) {
460
460
  }
461
461
  class me {
462
462
  constructor(e) {
463
- a(this, "schemas", q([]));
464
- a(this, "model", q({}));
463
+ a(this, "schemas", U([]));
464
+ a(this, "model", U({}));
465
465
  a(this, "processorBySchemaType", {
466
466
  item: this.runtimeItemProcessor.bind(this),
467
467
  group: this.runtimeGroupProcessor.bind(this),
468
468
  list: this.runtimeListProcessor.bind(this)
469
469
  });
470
- a(this, "formRef", q(null));
471
- a(this, "hydrateEffect", new N());
472
- a(this, "native", oe({}));
470
+ a(this, "formRef", U(null));
471
+ a(this, "hydrateEffect", new x());
472
+ a(this, "native", le({}));
473
473
  a(this, "grid", {});
474
474
  a(this, "runtime", {});
475
475
  a(this, "globalNativeFormOverride", {
@@ -478,17 +478,17 @@ class me {
478
478
  });
479
479
  this.setup = e, this.processor = new de(this);
480
480
  const t = this.setup(this);
481
- if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new pe(this.ui), x(t.schemas)) {
481
+ if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new pe(this.ui), k(t.schemas)) {
482
482
  const s = I(() => t.schemas, () => {
483
- this.processor.parseSchemas(t.schemas.value), w(() => {
483
+ this.processor.parseSchemas(t.schemas.value), M(() => {
484
484
  s();
485
485
  });
486
486
  }, {
487
487
  deep: !0
488
488
  });
489
- } else if (z(t.schemas)) {
489
+ } else if ($(t.schemas)) {
490
490
  const s = I(() => t.schemas, () => {
491
- this.processor.parseSchemas(t.schemas), w(() => {
491
+ this.processor.parseSchemas(t.schemas), M(() => {
492
492
  s();
493
493
  });
494
494
  }, {
@@ -499,61 +499,61 @@ class me {
499
499
  }
500
500
  getRuntimeMeta() {
501
501
  return {
502
- model: j(g(this.model.value)),
502
+ model: w(g(this.model.value)),
503
503
  reactiveModel: this.model.value
504
504
  };
505
505
  }
506
506
  runtimeItemProcessor(e, t, s = this.model.value, i) {
507
- var k, $, _, B, D, G, T, K, W, H, J, Q, X;
508
- const o = j(e.component);
507
+ var _, B, D, G, T, K, W, H, J, Q, X, Y, Z;
508
+ const o = w(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, (B = (_ = e.native) == null ? void 0 : _.props) == null ? void 0 : B.Form), y(this.globalNativeFormOverride.slots, (G = (D = e.native) == null ? void 0 : D.slots) == null ? void 0 : G.Form);
512
+ const n = y(g((K = (T = this.native) == null ? void 0 : T.slots) == null ? void 0 : K.FormItem) ?? {}, (H = (W = e.native) == null ? void 0 : W.slots) == null ? void 0 : H.FormItem), c = {
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
+ }, u = y(g((Q = (J = this.native) == null ? void 0 : J.props) == null ? void 0 : Q.FormItem) ?? {}, (Y = (X = e.native) == null ? void 0 : X.props) == null ? void 0 : Y.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, V = 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
- const V = (i == null ? void 0 : i.runtime) ?? this.runtime;
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) {
524
+ const F = (i == null ? void 0 : i.runtime) ?? this.runtime;
525
+ if (!l.isUndefined(t) && !l.isObjectEmpty(F) && (h = L((Z = F == null ? void 0 : F.customizeItemLabel) == null ? void 0 : Z.call(F, 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((A) => {
529
+ P.toLowerCase().includes(A.toLowerCase()) && (E = C[A]);
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 = S.getItemContainer(this), se = S.getFormItemContainer(this), re = this, ie = e.componentSlots;
536
536
  return p("div", {
537
- style: u
538
- }, [p(A, {
539
- show: P
537
+ style: c
538
+ }, [p(te, {
539
+ show: m
540
540
  }, {
541
541
  default() {
542
- return p(ee, R(c, {
542
+ return O(p(se, R(u, {
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,
552
- props: O
551
+ componentSlots: ie,
552
+ props: V
553
553
  });
554
554
  },
555
555
  ...n
556
- });
556
+ }), [[q, m]]);
557
557
  }
558
558
  })]);
559
559
  }
@@ -563,14 +563,15 @@ class me {
563
563
  display: "grid",
564
564
  gridColumn: "1 / -1",
565
565
  ...e.grid
566
- }, i = F.getGroupContainer(this);
567
- return p("div", {
566
+ }, i = S.getGroupContainer(this);
567
+ let o = e.show;
568
+ return o === void 0 && (o = !0), p("div", {
568
569
  style: s
569
- }, [p(i, {
570
+ }, [O(p(i, {
570
571
  schema: e
571
- }, he(t = e.children.map((o) => this.runtimeItemProcessor(o))) ? t : {
572
+ }, he(t = e.children.map((n) => this.runtimeItemProcessor(n))) ? t : {
572
573
  default: () => [t]
573
- })]);
574
+ }), [[q, o]])]);
574
575
  }
575
576
  addListItem(e) {
576
577
  var t, s;
@@ -591,49 +592,51 @@ class me {
591
592
  ...e.grid
592
593
  }, s = this;
593
594
  s.model.value[e.field] || (s.model.value[e.field] = [{}]);
594
- const i = F.getListContainer(this), o = F.getListItemContainer(this);
595
+ let i = e.show;
596
+ i === void 0 && (i = !0);
597
+ const o = S.getListContainer(this), n = S.getListItemContainer(this);
595
598
  return p("div", {
596
599
  style: t
597
- }, [p(i, {
600
+ }, [O(p(o, {
598
601
  schema: e
599
602
  }, {
600
603
  default() {
601
- return s.model.value[e.field].map((n, u) => p(o, null, {
604
+ return s.model.value[e.field].map((c, u) => p(n, null, {
602
605
  default() {
603
- return e.children.map((c) => s.runtimeItemProcessor(c, u, n, e));
606
+ return e.children.map((d) => s.runtimeItemProcessor(d, u, c, e));
604
607
  },
605
608
  delete({
606
- container: c
609
+ container: d
607
610
  } = {}) {
608
- var y;
609
- const d = c ?? p("button", null, null);
610
- return ne(p(d, {
611
+ var V;
612
+ const P = d ?? p("button", null, null);
613
+ return O(p(P, {
611
614
  onClick: () => s.deleteListItem(e, u)
612
- }, null), [[le, ((y = s.model.value[e.field]) == null ? void 0 : y.length) > 1]]);
615
+ }, null), [[q, ((V = s.model.value[e.field]) == null ? void 0 : V.length) > 1]]);
613
616
  }
614
617
  }));
615
618
  },
616
619
  add({
617
- container: n
620
+ container: c
618
621
  } = {}) {
619
- const u = n ?? p("button", null, [ae("添加")]);
622
+ const u = c ?? p("button", null, [ae("添加")]);
620
623
  return p(u, {
621
624
  onClick: () => s.addListItem(e)
622
625
  }, null);
623
626
  }
624
- })]);
627
+ }), [[q, i]])]);
625
628
  }
626
629
  runtimeProcessor(e) {
627
630
  return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
628
631
  }
629
632
  exec() {
630
- var u, c, d, y;
633
+ var c, u, d, P;
631
634
  const e = {
632
635
  display: "grid",
633
636
  gridColumn: "1 / -1",
634
637
  gridAutoColumns: "1fr",
635
638
  ...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();
639
+ }, t = this, s = y(g((u = (c = this.native) == null ? void 0 : c.props) == null ? void 0 : u.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 = S.getFormContainer(this), n = this.runtimeAdapter.getFormModelPropName();
637
640
  return p(o, R(s, {
638
641
  ref: this.formRef
639
642
  }, {
@@ -651,7 +654,7 @@ class me {
651
654
  class f {
652
655
  }
653
656
  a(f, "presets");
654
- function M({
657
+ function N({
655
658
  parentSchema: r,
656
659
  schema: e,
657
660
  index: t
@@ -662,7 +665,7 @@ const ye = {
662
665
  ArcoVue: {
663
666
  getRuntimeField(r) {
664
667
  return {
665
- field: M(r)
668
+ field: N(r)
666
669
  };
667
670
  },
668
671
  getRuntimeRequired(r) {
@@ -706,7 +709,7 @@ const ye = {
706
709
  },
707
710
  validateForm(r) {
708
711
  return new Promise((e, t) => {
709
- r.runtimeCore.formRef.value.validate((s) => s ? t(s) : e(r.cleanFallbackFields(j(r.runtimeCore.processor.processedModel.value))));
712
+ r.runtimeCore.formRef.value.validate((s) => s ? t(s) : e(r.cleanFallbackFields(w(r.runtimeCore.processor.processedModel.value))));
710
713
  });
711
714
  },
712
715
  clearValidate(r) {
@@ -716,7 +719,7 @@ const ye = {
716
719
  NutUI: {
717
720
  getRuntimeField(r) {
718
721
  return {
719
- prop: M(r)
722
+ prop: N(r)
720
723
  };
721
724
  },
722
725
  getRuntimeRequired(r) {
@@ -765,7 +768,7 @@ const ye = {
765
768
  valid: s,
766
769
  errors: i
767
770
  }) => {
768
- s ? e(r.cleanFallbackFields(j(r.runtimeCore.processor.processedModel.value))) : t(i);
771
+ s ? e(r.cleanFallbackFields(w(r.runtimeCore.processor.processedModel.value))) : t(i);
769
772
  });
770
773
  });
771
774
  },
@@ -776,7 +779,7 @@ const ye = {
776
779
  NaiveUI: {
777
780
  getRuntimeField(r) {
778
781
  return {
779
- path: M(r)
782
+ path: N(r)
780
783
  };
781
784
  },
782
785
  getRuntimeRequired(r) {
@@ -821,14 +824,14 @@ const ye = {
821
824
  },
822
825
  validateForm(r) {
823
826
  return new Promise((e, t) => {
824
- r.runtimeCore.formRef.value.validate((s) => s ? t(s) : e(r.cleanFallbackFields(j(r.runtimeCore.processor.processedModel.value))));
827
+ r.runtimeCore.formRef.value.validate((s) => s ? t(s) : e(r.cleanFallbackFields(w(r.runtimeCore.processor.processedModel.value))));
825
828
  });
826
829
  },
827
830
  clearValidate(r) {
828
831
  r.formRef.value.restoreValidation();
829
832
  }
830
833
  }
831
- }, S = class S {
834
+ }, j = class j {
832
835
  static getPlaceholderPrefixPresetByComponentName() {
833
836
  const e = {
834
837
  请选择: ["select", "tree"],
@@ -841,7 +844,7 @@ const ye = {
841
844
  return t;
842
845
  }
843
846
  };
844
- a(S, "schemaPreset", {
847
+ a(j, "schemaPreset", {
845
848
  type: {
846
849
  defaultValue: "item"
847
850
  },
@@ -884,15 +887,15 @@ a(S, "schemaPreset", {
884
887
  grid: {
885
888
  default: void 0
886
889
  }
887
- }), a(S, "componentPropsPreset", {
890
+ }), a(j, "componentPropsPreset", {
888
891
  options: {
889
892
  defaultValue: []
890
893
  }
891
894
  }), // 基于基本功能提出基本预设
892
- a(S, "placeholderPresetByComponentName", S.getPlaceholderPrefixPresetByComponentName());
893
- let L = S;
895
+ a(j, "placeholderPresetByComponentName", j.getPlaceholderPrefixPresetByComponentName());
896
+ let z = j;
894
897
  const b = {
895
- ...L,
898
+ ...z,
896
899
  adapters: {
897
900
  ...ye
898
901
  }
@@ -73,6 +73,7 @@ export interface GroupSchema {
73
73
  label?: string;
74
74
  children: ProxyedSchema[];
75
75
  grid?: GridStyle;
76
+ show?: boolean;
76
77
  }
77
78
  export interface ListSchema {
78
79
  type: "list";
@@ -81,6 +82,7 @@ export interface ListSchema {
81
82
  children: ProxyedSchema[];
82
83
  grid?: GridStyle;
83
84
  runtime?: Runtime;
85
+ show?: boolean;
84
86
  }
85
87
  export type Schema = ItemSchema | GroupSchema | ListSchema;
86
88
  export interface runtimeMeta {
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.29",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",