@harbor-design/proform 1.1.35 → 1.1.37
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 +27 -24
- 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
|
|
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(),
|
|
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(),
|
|
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),
|
|
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[
|
|
309
|
-
m && l.isObject(m) && d !== "component" && (y = h(m, y)), i.processedSchemas.value[
|
|
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);
|
|
@@ -351,13 +351,13 @@ class de {
|
|
|
351
351
|
return n(u);
|
|
352
352
|
this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
353
353
|
this.defaultValueInprogressMap.values()
|
|
354
|
-
).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(),
|
|
354
|
+
).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), E(() => {
|
|
355
355
|
c();
|
|
356
356
|
})) : n(u);
|
|
357
357
|
}) : this.fieldParser(t[i], (u) => {
|
|
358
358
|
this.defaultValueInprogressMap.set(t[i], u), !l.isProcessInprogress(u) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
359
359
|
this.defaultValueInprogressMap.values()
|
|
360
|
-
).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(),
|
|
360
|
+
).every((d) => !d.includes("undefined")) ? (n(u), this.defaultValueEffect.clearEffects(), E(() => {
|
|
361
361
|
c();
|
|
362
362
|
})) : n(u);
|
|
363
363
|
});
|
|
@@ -512,17 +512,20 @@ class me {
|
|
|
512
512
|
a(this, "shared", {});
|
|
513
513
|
this.setup = e, this.processor = new de(this);
|
|
514
514
|
const t = this.setup(this);
|
|
515
|
-
if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new he(this.ui), q(t.schemas))
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
515
|
+
if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new he(this.ui), q(t.schemas))
|
|
516
|
+
v(
|
|
517
|
+
// @ts-expect-error
|
|
518
|
+
() => t.schemas.value,
|
|
519
|
+
() => {
|
|
520
|
+
this.processor.parseSchemas(t.schemas.value);
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
deep: !0
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
else if (N(t.schemas)) {
|
|
524
527
|
const s = v(() => t.schemas, () => {
|
|
525
|
-
this.processor.parseSchemas(t.schemas),
|
|
528
|
+
this.processor.parseSchemas(t.schemas), E(() => {
|
|
526
529
|
s();
|
|
527
530
|
});
|
|
528
531
|
}, {
|
|
@@ -539,7 +542,7 @@ class me {
|
|
|
539
542
|
share: (t) => {
|
|
540
543
|
if (q(t)) {
|
|
541
544
|
const s = v(() => t.value, () => {
|
|
542
|
-
h(this.shared, t.value), this.processor.schemaEffect.triggerEffects(),
|
|
545
|
+
h(this.shared, t.value), this.processor.schemaEffect.triggerEffects(), E(() => {
|
|
543
546
|
s();
|
|
544
547
|
});
|
|
545
548
|
}, {
|
|
@@ -548,7 +551,7 @@ class me {
|
|
|
548
551
|
});
|
|
549
552
|
} else if (N(t)) {
|
|
550
553
|
const s = v(() => t, () => {
|
|
551
|
-
h(this.shared, t), this.processor.schemaEffect.triggerEffects(),
|
|
554
|
+
h(this.shared, t), this.processor.schemaEffect.triggerEffects(), E(() => {
|
|
552
555
|
s();
|
|
553
556
|
});
|
|
554
557
|
}, {
|
|
@@ -574,16 +577,16 @@ class me {
|
|
|
574
577
|
schema: e,
|
|
575
578
|
parentSchema: i,
|
|
576
579
|
index: t
|
|
577
|
-
}), b = o.name, V = e.componentProps ?? {},
|
|
580
|
+
}), b = o.name, V = e.componentProps ?? {}, I = P.placeholderPresetByComponentName;
|
|
578
581
|
let g = e.placeholder, y = e.show;
|
|
579
582
|
y === void 0 && (y = !0), y || delete s[e.field];
|
|
580
583
|
let m = e.label ?? "";
|
|
581
584
|
const j = (i == null ? void 0 : i.runtime) ?? this.runtime;
|
|
582
585
|
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) {
|
|
583
586
|
let R = "请输入";
|
|
584
|
-
l.isUndefined(b) ? g = `${R}${m}` : /* @ts-expect-error */
|
|
585
|
-
|
|
586
|
-
b.toLowerCase().includes(Y.toLowerCase()) && (R =
|
|
587
|
+
l.isUndefined(b) ? g = `${R}${m}` : /* @ts-expect-error */ I[b.toLowerCase()] ? (R = // @ts-expect-error
|
|
588
|
+
I[b.toLowerCase()], g = `${R}${m}`) : (Object.keys(I).forEach((Y) => {
|
|
589
|
+
b.toLowerCase().includes(Y.toLowerCase()) && (R = I[Y]);
|
|
587
590
|
}), g = `${R}${m}`);
|
|
588
591
|
}
|
|
589
592
|
const Z = this.runtimeAdapter.getRuntimeRequired({
|