@harbor-design/proform 1.1.36 → 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 +19 -21
- 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,22 +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
|
-
|
|
515
|
+
if (this.ui = t.ui ?? f.presets.ui, this.runtimeAdapter = new he(this.ui), q(t.schemas))
|
|
516
|
+
v(
|
|
517
517
|
// @ts-expect-error
|
|
518
518
|
() => t.schemas.value,
|
|
519
519
|
() => {
|
|
520
|
-
this.processor.parseSchemas(t.schemas.value)
|
|
521
|
-
s();
|
|
522
|
-
});
|
|
520
|
+
this.processor.parseSchemas(t.schemas.value);
|
|
523
521
|
},
|
|
524
522
|
{
|
|
525
523
|
deep: !0
|
|
526
524
|
}
|
|
527
525
|
);
|
|
528
|
-
|
|
526
|
+
else if (N(t.schemas)) {
|
|
529
527
|
const s = v(() => t.schemas, () => {
|
|
530
|
-
this.processor.parseSchemas(t.schemas),
|
|
528
|
+
this.processor.parseSchemas(t.schemas), E(() => {
|
|
531
529
|
s();
|
|
532
530
|
});
|
|
533
531
|
}, {
|
|
@@ -544,7 +542,7 @@ class me {
|
|
|
544
542
|
share: (t) => {
|
|
545
543
|
if (q(t)) {
|
|
546
544
|
const s = v(() => t.value, () => {
|
|
547
|
-
h(this.shared, t.value), this.processor.schemaEffect.triggerEffects(),
|
|
545
|
+
h(this.shared, t.value), this.processor.schemaEffect.triggerEffects(), E(() => {
|
|
548
546
|
s();
|
|
549
547
|
});
|
|
550
548
|
}, {
|
|
@@ -553,7 +551,7 @@ class me {
|
|
|
553
551
|
});
|
|
554
552
|
} else if (N(t)) {
|
|
555
553
|
const s = v(() => t, () => {
|
|
556
|
-
h(this.shared, t), this.processor.schemaEffect.triggerEffects(),
|
|
554
|
+
h(this.shared, t), this.processor.schemaEffect.triggerEffects(), E(() => {
|
|
557
555
|
s();
|
|
558
556
|
});
|
|
559
557
|
}, {
|
|
@@ -579,16 +577,16 @@ class me {
|
|
|
579
577
|
schema: e,
|
|
580
578
|
parentSchema: i,
|
|
581
579
|
index: t
|
|
582
|
-
}), b = o.name, V = e.componentProps ?? {},
|
|
580
|
+
}), b = o.name, V = e.componentProps ?? {}, I = P.placeholderPresetByComponentName;
|
|
583
581
|
let g = e.placeholder, y = e.show;
|
|
584
582
|
y === void 0 && (y = !0), y || delete s[e.field];
|
|
585
583
|
let m = e.label ?? "";
|
|
586
584
|
const j = (i == null ? void 0 : i.runtime) ?? this.runtime;
|
|
587
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) {
|
|
588
586
|
let R = "请输入";
|
|
589
|
-
l.isUndefined(b) ? g = `${R}${m}` : /* @ts-expect-error */
|
|
590
|
-
|
|
591
|
-
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]);
|
|
592
590
|
}), g = `${R}${m}`);
|
|
593
591
|
}
|
|
594
592
|
const Z = this.runtimeAdapter.getRuntimeRequired({
|