@harbor-design/proform 1.3.20 → 1.3.21
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 +25 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Te = Object.defineProperty;
|
|
2
2
|
var ze = (r, e, t) => e in r ? Te(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var u = (r, e, t) => (ze(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import { ref as z, readonly as Pe, nextTick as j, isRef as
|
|
4
|
+
import { ref as z, readonly as Pe, nextTick as j, isRef as I, watch as g, isReactive as S, toRaw as R, reactive as K, createVNode as b, mergeProps as U, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as He } from "vue";
|
|
5
5
|
class o {
|
|
6
6
|
static typeChecker(e) {
|
|
7
7
|
return {}.toString.call(e);
|
|
@@ -145,7 +145,7 @@ class Ke {
|
|
|
145
145
|
j(() => {
|
|
146
146
|
this.runtimeCore.hydrateEffect.trackEffect(
|
|
147
147
|
() => {
|
|
148
|
-
|
|
148
|
+
I(e) ? g(
|
|
149
149
|
() => e.value,
|
|
150
150
|
() => {
|
|
151
151
|
h(this.runtimeCore.model.value, e.value);
|
|
@@ -154,7 +154,7 @@ class Ke {
|
|
|
154
154
|
deep: !0,
|
|
155
155
|
immediate: !0
|
|
156
156
|
}
|
|
157
|
-
) :
|
|
157
|
+
) : S(e) ? g(
|
|
158
158
|
() => e,
|
|
159
159
|
() => {
|
|
160
160
|
h(this.runtimeCore.model.value, e);
|
|
@@ -173,7 +173,7 @@ class Ke {
|
|
|
173
173
|
}
|
|
174
174
|
share(e) {
|
|
175
175
|
j(() => {
|
|
176
|
-
|
|
176
|
+
I(e) ? g(
|
|
177
177
|
() => e.value,
|
|
178
178
|
() => {
|
|
179
179
|
h(this.runtimeCore.shared, e.value);
|
|
@@ -182,7 +182,7 @@ class Ke {
|
|
|
182
182
|
deep: !0,
|
|
183
183
|
immediate: !0
|
|
184
184
|
}
|
|
185
|
-
) :
|
|
185
|
+
) : S(e) ? g(
|
|
186
186
|
() => e,
|
|
187
187
|
() => {
|
|
188
188
|
h(this.runtimeCore.shared, e);
|
|
@@ -192,7 +192,7 @@ class Ke {
|
|
|
192
192
|
immediate: !0
|
|
193
193
|
}
|
|
194
194
|
) : Object.keys(e).forEach((t) => {
|
|
195
|
-
|
|
195
|
+
console.log(t, I(t), S(t)), I(e[t]) ? g(
|
|
196
196
|
() => e[t].value,
|
|
197
197
|
() => {
|
|
198
198
|
h(this.runtimeCore.shared, {
|
|
@@ -203,7 +203,7 @@ class Ke {
|
|
|
203
203
|
deep: !0,
|
|
204
204
|
immediate: !0
|
|
205
205
|
}
|
|
206
|
-
) :
|
|
206
|
+
) : S(e[t]) ? g(
|
|
207
207
|
() => e[t],
|
|
208
208
|
() => {
|
|
209
209
|
h(this.runtimeCore.shared, {
|
|
@@ -665,11 +665,11 @@ class mr {
|
|
|
665
665
|
const f = l.index, d = l.key, p = l.keyIndex;
|
|
666
666
|
if (o.isUndefined(l.stable))
|
|
667
667
|
return;
|
|
668
|
-
const m = s.parseStable(l.stable), y = i == null ? void 0 : i.index,
|
|
668
|
+
const m = s.parseStable(l.stable), y = i == null ? void 0 : i.index, O = i == null ? void 0 : i.key;
|
|
669
669
|
let _ = m;
|
|
670
670
|
if (o.isProcessInprogress(_) || (n[p] = !0), i) {
|
|
671
|
-
const v = s.processedSchemas.value[y][
|
|
672
|
-
v && o.isObject(v) && d !== "component" && (_ = h(v, _)), s.processedSchemas.value[y][
|
|
671
|
+
const v = s.processedSchemas.value[y][O][f][d];
|
|
672
|
+
v && o.isObject(v) && d !== "component" && (_ = h(v, _)), s.processedSchemas.value[y][O][f][d] = _, s.stableUpdater(n);
|
|
673
673
|
} else {
|
|
674
674
|
const v = s.processedSchemas.value[f][d];
|
|
675
675
|
v && o.isObject(v) && d !== "component" && (_ = h(v, _)), s.processedSchemas.value[f][d] = _, s.stableUpdater(n);
|
|
@@ -807,7 +807,7 @@ class mr {
|
|
|
807
807
|
e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
|
|
808
808
|
}
|
|
809
809
|
else
|
|
810
|
-
|
|
810
|
+
I(e) ? g(
|
|
811
811
|
() => e.value,
|
|
812
812
|
() => {
|
|
813
813
|
o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
|
|
@@ -821,7 +821,7 @@ class mr {
|
|
|
821
821
|
immediate: !0,
|
|
822
822
|
deep: !0
|
|
823
823
|
}
|
|
824
|
-
) :
|
|
824
|
+
) : S(e) ? g(
|
|
825
825
|
() => e,
|
|
826
826
|
() => {
|
|
827
827
|
o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
@@ -951,7 +951,7 @@ class vr {
|
|
|
951
951
|
u(this, "shared", K({}));
|
|
952
952
|
this.setup = e, this.processor = new mr(this);
|
|
953
953
|
const t = this.setup(this);
|
|
954
|
-
if (this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()),
|
|
954
|
+
if (this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), I(t.schemas))
|
|
955
955
|
g(
|
|
956
956
|
// @ts-expect-error
|
|
957
957
|
() => t.schemas.value,
|
|
@@ -962,7 +962,7 @@ class vr {
|
|
|
962
962
|
deep: !0
|
|
963
963
|
}
|
|
964
964
|
);
|
|
965
|
-
else if (
|
|
965
|
+
else if (S(t.schemas)) {
|
|
966
966
|
const i = g(() => t.schemas, () => {
|
|
967
967
|
this.processor.parseSchemas(t.schemas), j(() => {
|
|
968
968
|
i();
|
|
@@ -980,25 +980,25 @@ class vr {
|
|
|
980
980
|
shared: this.shared,
|
|
981
981
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
982
982
|
share: (t) => {
|
|
983
|
-
|
|
983
|
+
I(t) ? g(() => t.value, () => {
|
|
984
984
|
h(this.shared, t.value);
|
|
985
985
|
}, {
|
|
986
986
|
deep: !0,
|
|
987
987
|
immediate: !0
|
|
988
|
-
}) :
|
|
988
|
+
}) : S(t) ? g(() => t, () => {
|
|
989
989
|
h(this.shared, t);
|
|
990
990
|
}, {
|
|
991
991
|
deep: !0,
|
|
992
992
|
immediate: !0
|
|
993
993
|
}) : Object.keys(t).forEach((i) => {
|
|
994
|
-
console.log(i,
|
|
994
|
+
console.log(i, I(i), S(i)), I(t[i]) ? g(() => t[i].value, () => {
|
|
995
995
|
h(this.shared, {
|
|
996
996
|
[i]: t[i].value
|
|
997
997
|
});
|
|
998
998
|
}, {
|
|
999
999
|
deep: !0,
|
|
1000
1000
|
immediate: !0
|
|
1001
|
-
}) :
|
|
1001
|
+
}) : S(t[i]) ? g(() => t[i], () => {
|
|
1002
1002
|
h(this.shared, {
|
|
1003
1003
|
[i]: t[i]
|
|
1004
1004
|
});
|
|
@@ -1027,15 +1027,15 @@ class vr {
|
|
|
1027
1027
|
parentSchema: s,
|
|
1028
1028
|
index: t
|
|
1029
1029
|
}), p = n.name, m = e.componentProps ?? {}, y = C.placeholderPresetByComponentName;
|
|
1030
|
-
let
|
|
1030
|
+
let O = e.placeholder, _ = e.show;
|
|
1031
1031
|
_ === void 0 && (_ = !0);
|
|
1032
|
-
let v = e.label ?? "",
|
|
1033
|
-
if (e.runtime ?
|
|
1032
|
+
let v = e.label ?? "", F;
|
|
1033
|
+
if (e.runtime ? F = e.runtime : F = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(F) && (v = Y((ye = F == null ? void 0 : F.customizeListItemLabel) == null ? void 0 : ye.call(F, e.label ?? "", t + 1), "")), !O) {
|
|
1034
1034
|
let N = "请输入";
|
|
1035
|
-
o.isUndefined(p) ?
|
|
1036
|
-
y[p.toLowerCase()],
|
|
1035
|
+
o.isUndefined(p) ? O = `${N}${v}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (N = // @ts-expect-error
|
|
1036
|
+
y[p.toLowerCase()], O = `${N}${v}`) : (Object.keys(y).forEach((_e) => {
|
|
1037
1037
|
p.toLowerCase().includes(_e.toLowerCase()) && (N = y[_e]);
|
|
1038
|
-
}),
|
|
1038
|
+
}), O = `${N}${v}`);
|
|
1039
1039
|
}
|
|
1040
1040
|
const $e = this.runtimeAdapter.getRuntimeRequired({
|
|
1041
1041
|
...e,
|
|
@@ -1055,7 +1055,7 @@ class vr {
|
|
|
1055
1055
|
Component: n,
|
|
1056
1056
|
schema: e,
|
|
1057
1057
|
baseModel: i,
|
|
1058
|
-
placeholder:
|
|
1058
|
+
placeholder: O,
|
|
1059
1059
|
componentSlots: Ue,
|
|
1060
1060
|
props: m
|
|
1061
1061
|
});
|