@harbor-design/proform 1.1.36 → 1.1.38

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 +43 -40
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var re = Object.defineProperty;
2
2
  var ie = (r, e, t) => e in r ? re(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var a = (r, e, t) => (ie(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { isRef as q, watch as v, isReactive as N, nextTick as I, toRaw as F, ref as M, reactive as oe, createVNode as p, mergeProps as O, withDirectives as ne, vShow as le, createTextVNode as ae, isVNode as ue, defineComponent as ce } from "vue";
4
+ import { isRef as q, watch as v, isReactive as N, nextTick as E, toRaw as F, ref as M, reactive as oe, createVNode as p, mergeProps as O, withDirectives as ne, vShow as le, 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);
@@ -175,7 +175,7 @@ class fe {
175
175
  const t = v(
176
176
  () => e.value,
177
177
  () => {
178
- h(this.runtimeCore.shared, e.value), this.runtimeCore.processor.schemaEffect.triggerEffects(), I(() => {
178
+ h(this.runtimeCore.shared, e.value), this.runtimeCore.processor.schemaEffect.triggerEffects(), E(() => {
179
179
  t();
180
180
  });
181
181
  },
@@ -188,7 +188,7 @@ class fe {
188
188
  const t = v(
189
189
  () => e,
190
190
  () => {
191
- h(this.runtimeCore.shared, e), this.runtimeCore.processor.schemaEffect.triggerEffects(), I(() => {
191
+ h(this.runtimeCore.shared, e), this.runtimeCore.processor.schemaEffect.triggerEffects(), E(() => {
192
192
  t();
193
193
  });
194
194
  },
@@ -302,11 +302,11 @@ class de {
302
302
  const u = c.index, d = c.key, b = c.keyIndex;
303
303
  if (l.isUndefined(c.stable))
304
304
  return;
305
- const V = i.parseStable(c.stable), E = s == null ? void 0 : s.index, g = s == null ? void 0 : s.key;
305
+ const V = i.parseStable(c.stable), I = s == null ? void 0 : s.index, g = s == null ? void 0 : s.key;
306
306
  let y = V;
307
307
  if (l.isProcessInprogress(y) || (o[b] = !0), s) {
308
- const m = i.processedSchemas.value[E][g][u][d];
309
- m && l.isObject(m) && d !== "component" && (y = h(m, y)), i.processedSchemas.value[E][g][u][d] = y, i.stableUpdater(o);
308
+ const m = i.processedSchemas.value[I][g][u][d];
309
+ m && l.isObject(m) && d !== "component" && (y = h(m, y)), i.processedSchemas.value[I][g][u][d] = y, i.stableUpdater(o);
310
310
  } else {
311
311
  const m = i.processedSchemas.value[u][d];
312
312
  m && l.isObject(m) && d !== "component" && (y = h(m, y)), i.processedSchemas.value[u][d] = y, i.stableUpdater(o);
@@ -345,23 +345,28 @@ class de {
345
345
  }
346
346
  ) : this.defaultValueEffect.trackEffect(
347
347
  () => {
348
- const c = this.schemaEffect.trackEffect(() => {
349
- /\{\s*model\s*\}/.test(t[i].toString()) ? this.fieldParser(t[i], (u) => {
350
- if (!u)
351
- return n(u);
352
- this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
353
- this.defaultValueInprogressMap.values()
354
- ).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), I(() => {
355
- c();
356
- })) : n(u);
357
- }) : this.fieldParser(t[i], (u) => {
358
- this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
359
- this.defaultValueInprogressMap.values()
360
- ).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), I(() => {
361
- c();
362
- })) : n(u);
363
- });
364
- });
348
+ const c = this.schemaEffect.trackEffect(
349
+ () => {
350
+ /\{\s*model\s*\}/.test(t[i].toString()) ? this.fieldParser(t[i], (u) => {
351
+ if (!u)
352
+ return n(u);
353
+ this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
354
+ this.defaultValueInprogressMap.values()
355
+ ).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), E(() => {
356
+ c();
357
+ })) : n(u);
358
+ }) : this.fieldParser(t[i], (u) => {
359
+ this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
360
+ this.defaultValueInprogressMap.values()
361
+ ).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), E(() => {
362
+ c();
363
+ })) : n(u);
364
+ });
365
+ },
366
+ {
367
+ lazy: !1
368
+ }
369
+ );
365
370
  },
366
371
  {
367
372
  lazy: !1
@@ -512,22 +517,20 @@ class me {
512
517
  a(this, "shared", {});
513
518
  this.setup = e, this.processor = new de(this);
514
519
  const t = this.setup(this);
515
- if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new he(this.ui), q(t.schemas)) {
516
- const s = v(
520
+ if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new he(this.ui), q(t.schemas))
521
+ v(
517
522
  // @ts-expect-error
518
523
  () => t.schemas.value,
519
524
  () => {
520
- this.processor.parseSchemas(t.schemas.value), I(() => {
521
- s();
522
- });
525
+ this.processor.parseSchemas(t.schemas.value);
523
526
  },
524
527
  {
525
528
  deep: !0
526
529
  }
527
530
  );
528
- } else if (N(t.schemas)) {
531
+ else if (N(t.schemas)) {
529
532
  const s = v(() => t.schemas, () => {
530
- this.processor.parseSchemas(t.schemas), I(() => {
533
+ this.processor.parseSchemas(t.schemas), E(() => {
531
534
  s();
532
535
  });
533
536
  }, {
@@ -544,7 +547,7 @@ class me {
544
547
  share: (t) => {
545
548
  if (q(t)) {
546
549
  const s = v(() => t.value, () => {
547
- h(this.shared, t.value), this.processor.schemaEffect.triggerEffects(), I(() => {
550
+ h(this.shared, t.value), this.processor.schemaEffect.triggerEffects(), E(() => {
548
551
  s();
549
552
  });
550
553
  }, {
@@ -553,7 +556,7 @@ class me {
553
556
  });
554
557
  } else if (N(t)) {
555
558
  const s = v(() => t, () => {
556
- h(this.shared, t), this.processor.schemaEffect.triggerEffects(), I(() => {
559
+ h(this.shared, t), this.processor.schemaEffect.triggerEffects(), E(() => {
557
560
  s();
558
561
  });
559
562
  }, {
@@ -566,11 +569,11 @@ class me {
566
569
  };
567
570
  }
568
571
  runtimeItemProcessor(e, t, s = this.model.value, i) {
569
- var x, z, $, B, D, G, T, W, K, H, J, Q, X;
572
+ var k, x, $, B, D, G, T, W, K, H, J, Q, X;
570
573
  const o = F(e.component);
571
574
  if (!o)
572
575
  return;
573
- h(this.globalNativeFormOverride.props, (z = (x = e.native) == null ? void 0 : x.props) == null ? void 0 : z.Form), h(this.globalNativeFormOverride.slots, (B = ($ = e.native) == null ? void 0 : $.slots) == null ? void 0 : B.Form);
576
+ h(this.globalNativeFormOverride.props, (x = (k = e.native) == null ? void 0 : k.props) == null ? void 0 : x.Form), h(this.globalNativeFormOverride.slots, (B = ($ = e.native) == null ? void 0 : $.slots) == null ? void 0 : B.Form);
574
577
  const n = h(C((G = (D = this.native) == null ? void 0 : D.slots) == null ? void 0 : G.FormItem) ?? {}, (W = (T = e.native) == null ? void 0 : T.slots) == null ? void 0 : W.FormItem), c = {
575
578
  display: "grid",
576
579
  gridColumn: "1 / -1",
@@ -579,16 +582,16 @@ class me {
579
582
  schema: e,
580
583
  parentSchema: i,
581
584
  index: t
582
- }), b = o.name, V = e.componentProps ?? {}, E = P.placeholderPresetByComponentName;
585
+ }), b = o.name, V = e.componentProps ?? {}, I = P.placeholderPresetByComponentName;
583
586
  let g = e.placeholder, y = e.show;
584
587
  y === void 0 && (y = !0), y || delete s[e.field];
585
588
  let m = e.label ?? "";
586
589
  const j = (i == null ? void 0 : i.runtime) ?? this.runtime;
587
590
  if (!l.isUndefined(t) && !l.isObjectEmpty(j) && (m = L((X = j == null ? void 0 : j.customizeItemLabel) == null ? void 0 : X.call(j, e.label ?? "", t + 1), "")), !g) {
588
591
  let R = "请输入";
589
- l.isUndefined(b) ? g = `${R}${m}` : /* @ts-expect-error */ E[b.toLowerCase()] ? (R = // @ts-expect-error
590
- E[b.toLowerCase()], g = `${R}${m}`) : (Object.keys(E).forEach((Y) => {
591
- b.toLowerCase().includes(Y.toLowerCase()) && (R = E[Y]);
592
+ l.isUndefined(b) ? g = `${R}${m}` : /* @ts-expect-error */ I[b.toLowerCase()] ? (R = // @ts-expect-error
593
+ I[b.toLowerCase()], g = `${R}${m}`) : (Object.keys(I).forEach((Y) => {
594
+ b.toLowerCase().includes(Y.toLowerCase()) && (R = I[Y]);
592
595
  }), g = `${R}${m}`);
593
596
  }
594
597
  const Z = this.runtimeAdapter.getRuntimeRequired({
@@ -955,9 +958,9 @@ a(S, "schemaPreset", {
955
958
  }
956
959
  }), // 基于基本功能提出基本预设
957
960
  a(S, "placeholderPresetByComponentName", S.getPlaceholderPrefixPresetByComponentName());
958
- let k = S;
961
+ let z = S;
959
962
  const P = {
960
- ...k,
963
+ ...z,
961
964
  adapters: {
962
965
  ...ye
963
966
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.1.36",
3
+ "version": "1.1.38",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",