@harbor-design/proform 1.2.22 → 1.2.23
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 +17 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -118,7 +118,7 @@ function g(r) {
|
|
|
118
118
|
}
|
|
119
119
|
return t(r);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function _(r, e) {
|
|
122
122
|
return r.replace(/undefined/g, e);
|
|
123
123
|
}
|
|
124
124
|
class be {
|
|
@@ -230,7 +230,7 @@ class be {
|
|
|
230
230
|
), this.readonlyReactiveModel.value = se(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
class
|
|
233
|
+
class x {
|
|
234
234
|
constructor() {
|
|
235
235
|
a(this, "effects", /* @__PURE__ */ new Set());
|
|
236
236
|
}
|
|
@@ -258,8 +258,8 @@ class ve {
|
|
|
258
258
|
a(this, "componentPropsPreset", C.componentPropsPreset);
|
|
259
259
|
a(this, "stableUpdaterProcessProgress");
|
|
260
260
|
a(this, "stableUpdaterTimes", 0);
|
|
261
|
-
a(this, "schemaEffect", new
|
|
262
|
-
a(this, "defaultValueEffect", new
|
|
261
|
+
a(this, "schemaEffect", new x());
|
|
262
|
+
a(this, "defaultValueEffect", new x());
|
|
263
263
|
a(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
264
264
|
a(this, "baseDefaultValueFunctionsLength");
|
|
265
265
|
a(this, "isModelInitialized", !0);
|
|
@@ -406,11 +406,11 @@ class ve {
|
|
|
406
406
|
}
|
|
407
407
|
promiseFieldParser(e, t, s) {
|
|
408
408
|
l.isPromise(e) ? e.then((i) => {
|
|
409
|
-
l.isString(i) && (i =
|
|
409
|
+
l.isString(i) && (i = _(i, "")), s && l.isObject(i) && !l.isNativeObject(i) ? this.objectParser({
|
|
410
410
|
data: i,
|
|
411
411
|
updater: t
|
|
412
412
|
}) : t(i);
|
|
413
|
-
}) : (l.isString(e) && (e =
|
|
413
|
+
}) : (l.isString(e) && (e = _(e, "")), s && l.isObject(e) && !l.isNativeObject(e) ? this.objectParser({
|
|
414
414
|
data: e,
|
|
415
415
|
updater: t
|
|
416
416
|
}) : t(e));
|
|
@@ -425,9 +425,12 @@ class ve {
|
|
|
425
425
|
...this.getRuntimeMeta()
|
|
426
426
|
})
|
|
427
427
|
);
|
|
428
|
-
else {
|
|
429
|
-
const i = e
|
|
428
|
+
else if (e.__proform_async_result) {
|
|
429
|
+
const i = e.__proform_async_result;
|
|
430
430
|
this.promiseFieldParser(i, t, s);
|
|
431
|
+
} else {
|
|
432
|
+
const i = e(this.getRuntimeMeta());
|
|
433
|
+
e.__proform_async_result = i, this.promiseFieldParser(i, t, s);
|
|
431
434
|
}
|
|
432
435
|
else
|
|
433
436
|
q(e) ? v(
|
|
@@ -539,7 +542,7 @@ class ge {
|
|
|
539
542
|
list: this.runtimeListProcessor.bind(this)
|
|
540
543
|
});
|
|
541
544
|
a(this, "formRef", N(null));
|
|
542
|
-
a(this, "hydrateEffect", new
|
|
545
|
+
a(this, "hydrateEffect", new x());
|
|
543
546
|
a(this, "native", re({}));
|
|
544
547
|
a(this, "grid", {});
|
|
545
548
|
a(this, "runtime", {});
|
|
@@ -613,11 +616,11 @@ class ge {
|
|
|
613
616
|
};
|
|
614
617
|
}
|
|
615
618
|
runtimeItemProcessor(e, t, s = this.model.value, i) {
|
|
616
|
-
var
|
|
619
|
+
var $, z, k, B, D, T, G, W, K, H, J, Q, X, Y, Z, A, ee;
|
|
617
620
|
const o = S(e.component);
|
|
618
621
|
if (!o)
|
|
619
622
|
return;
|
|
620
|
-
(z = (
|
|
623
|
+
(z = ($ = e.native) == null ? void 0 : $.props) != null && z.Form && h(this.globalNativeFormOverride.props.Form, (B = (k = e.native) == null ? void 0 : k.props) == null ? void 0 : B.Form), (T = (D = e.native) == null ? void 0 : D.slots) != null && T.Form && h(this.globalNativeFormOverride.slots.Form, (W = (G = e.native) == null ? void 0 : G.slots) == null ? void 0 : W.Form);
|
|
621
624
|
const n = h(g((H = (K = this.native) == null ? void 0 : K.slots) == null ? void 0 : H.FormItem) ?? {}, (Q = (J = e.native) == null ? void 0 : J.slots) == null ? void 0 : Q.FormItem), f = {
|
|
622
625
|
display: "grid",
|
|
623
626
|
gridColumn: "1 / -1",
|
|
@@ -630,7 +633,7 @@ class ge {
|
|
|
630
633
|
let I = e.placeholder, b = e.show;
|
|
631
634
|
b === void 0 && (b = !0);
|
|
632
635
|
let m = e.label ?? "", E;
|
|
633
|
-
if (e.runtime ? E = e.runtime : E = (i == null ? void 0 : i.runtime) ?? this.runtime, !l.isUndefined(t) && !l.isObjectEmpty(E) && (m =
|
|
636
|
+
if (e.runtime ? E = e.runtime : E = (i == null ? void 0 : i.runtime) ?? this.runtime, !l.isUndefined(t) && !l.isObjectEmpty(E) && (m = _((ee = E == null ? void 0 : E.customizeListItemLabel) == null ? void 0 : ee.call(E, e.label ?? "", t + 1), "")), !I) {
|
|
634
637
|
let w = "请输入";
|
|
635
638
|
l.isUndefined(y) ? I = `${w}${m}` : /* @ts-expect-error */ F[y.toLowerCase()] ? (w = // @ts-expect-error
|
|
636
639
|
F[y.toLowerCase()], I = `${w}${m}`) : (Object.keys(F).forEach((te) => {
|
|
@@ -1032,9 +1035,9 @@ a(R, "schemaPreset", {
|
|
|
1032
1035
|
}
|
|
1033
1036
|
}), // 基于基本功能提出基本预设
|
|
1034
1037
|
a(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
|
|
1035
|
-
let
|
|
1038
|
+
let L = R;
|
|
1036
1039
|
const C = {
|
|
1037
|
-
|
|
1040
|
+
...L,
|
|
1038
1041
|
adapters: {
|
|
1039
1042
|
...Ce
|
|
1040
1043
|
}
|