@morghulis/core 1.0.55 → 1.0.57
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.
|
@@ -6989,7 +6989,7 @@ class cr {
|
|
|
6989
6989
|
}
|
|
6990
6990
|
parse(t) {
|
|
6991
6991
|
const { domain: n, prop: o, not_null: l, tool: s } = this.field, a = t[o];
|
|
6992
|
-
return a == null ? l ? this.parseNull() : this.parseDefault(a) : me.DOMAINS.linkage.includes(n) ? this.parseLinkage(t) : me.DOMAINS.multiple.includes(n) ? this.parseMultiple(t) : ["boolean", "switch"].includes(s) ? this.parseBoolean(a) : ["number"].includes(s) ? this.
|
|
6992
|
+
return a == null ? l ? this.parseNull() : this.parseDefault(a) : me.DOMAINS.linkage.includes(n) ? this.parseLinkage(t) : me.DOMAINS.multiple.includes(n) ? this.parseMultiple(t) : ["boolean", "switch"].includes(s) ? this.parseBoolean(a) : ["number"].includes(s) ? this._parseNumber(a) : ["date"].includes(s) ? n === "DateTimeField" ? this.parseDateTime(a) : this.parseDate(a) : ["time"].includes(s) ? this.parseTime(a) : ["timerange"].includes(s) ? this.parseTimeRange(a) : ["daterange"].includes(s) ? this.parseDateRange(a) : ["dates"].includes(s) ? this.parseDates(a) : ["set"].includes(s) ? this.parseSet(a) : ["color"].includes(s) ? this.parseColor(a) : ["file"].includes(s) ? this.parseFile(a) : this.parseDefault(a);
|
|
6993
6993
|
}
|
|
6994
6994
|
parseNull() {
|
|
6995
6995
|
return {
|
|
@@ -7012,7 +7012,7 @@ class cr {
|
|
|
7012
7012
|
const s = [!0, "是", 1, "1", "TRUE", "true", "True", "yes", "YES", "Yes"], a = [!1, "否", 0, "0", "FALSE", "false", "False", "no", "NO", "No"];
|
|
7013
7013
|
return s.includes(t) ? (t = !0, n = "是") : a.includes(t) ? (t = !1, n = "否") : (o = Dn(t), o ? n = t ? "是" : "否" : l = "非布尔型"), { value: t, content: n, valid: o, message: l };
|
|
7014
7014
|
}
|
|
7015
|
-
|
|
7015
|
+
_parseNumber(t) {
|
|
7016
7016
|
if (t == null) return this.parseDefault(t);
|
|
7017
7017
|
const { domain: n, format: { precision: o } } = this.field;
|
|
7018
7018
|
let [l, s, a] = [t, !0, ""];
|
|
@@ -7021,6 +7021,7 @@ class cr {
|
|
|
7021
7021
|
else {
|
|
7022
7022
|
const r = Number(t);
|
|
7023
7023
|
if (s = no(r) && !isNaN(r), s) {
|
|
7024
|
+
t = n === "FloatField" ? parseFloat(t) : parseInt(t);
|
|
7024
7025
|
const i = n === "FloatField" ? o || 2 : 0;
|
|
7025
7026
|
l = r.toFixed(i);
|
|
7026
7027
|
} else
|
|
@@ -7072,18 +7073,18 @@ class cr {
|
|
|
7072
7073
|
}
|
|
7073
7074
|
parseSet(t) {
|
|
7074
7075
|
const { format: { set: n, multiple: o } } = this.field;
|
|
7075
|
-
let [l, s, a] = [t, !0, ""];
|
|
7076
|
+
let [l, s, a, r] = [t, t, !0, ""];
|
|
7076
7077
|
if (o) {
|
|
7077
|
-
const
|
|
7078
|
-
|
|
7079
|
-
const
|
|
7080
|
-
|
|
7081
|
-
}),
|
|
7078
|
+
const i = t.split(";"), u = [], c = [], d = [];
|
|
7079
|
+
i.forEach((_) => {
|
|
7080
|
+
const g = n[_];
|
|
7081
|
+
a = a && !!g, g ? (d.push(_), u.push(g)) : c.push(_);
|
|
7082
|
+
}), a ? (l = d.join(";"), s = u.join(";")) : (l = null, s = t, r = `"${c.join(";")}"不是合法值`);
|
|
7082
7083
|
} else {
|
|
7083
|
-
const
|
|
7084
|
-
|
|
7084
|
+
const i = n[t];
|
|
7085
|
+
a = !!i, s = i || t, a || (r = `"${t}"不是合法值`), l = i ? l : null;
|
|
7085
7086
|
}
|
|
7086
|
-
return { value:
|
|
7087
|
+
return { value: l, content: s, valid: a, message: r };
|
|
7087
7088
|
}
|
|
7088
7089
|
parseFile(t) {
|
|
7089
7090
|
let [n, o] = [!0, ""];
|
|
@@ -13601,7 +13602,7 @@ const Or = /* @__PURE__ */ I({
|
|
|
13601
13602
|
tag: e.row.payload ? "del" : "b"
|
|
13602
13603
|
}, {
|
|
13603
13604
|
default: f(() => [
|
|
13604
|
-
S(z(n.value
|
|
13605
|
+
S(z(n.value?.content), 1)
|
|
13605
13606
|
]),
|
|
13606
13607
|
_: 1
|
|
13607
13608
|
}, 8, ["type", "tag"]);
|
|
@@ -13836,10 +13837,10 @@ const Or = /* @__PURE__ */ I({
|
|
|
13836
13837
|
_: 2
|
|
13837
13838
|
}, 1024)
|
|
13838
13839
|
]),
|
|
13839
|
-
default: f(({ row:
|
|
13840
|
+
default: f(({ row: R }) => [
|
|
13840
13841
|
m(q_, {
|
|
13841
13842
|
field: A,
|
|
13842
|
-
row:
|
|
13843
|
+
row: R
|
|
13843
13844
|
}, null, 8, ["field", "row"])
|
|
13844
13845
|
]),
|
|
13845
13846
|
_: 2
|
|
@@ -13930,7 +13931,7 @@ const Or = /* @__PURE__ */ I({
|
|
|
13930
13931
|
});
|
|
13931
13932
|
};
|
|
13932
13933
|
}
|
|
13933
|
-
}), Y_ = /* @__PURE__ */ lt(K_, [["__scopeId", "data-v-
|
|
13934
|
+
}), Y_ = /* @__PURE__ */ lt(K_, [["__scopeId", "data-v-943a09d8"]]);
|
|
13934
13935
|
function W_(e) {
|
|
13935
13936
|
const t = ie(e) ? e : x(e), n = x({
|
|
13936
13937
|
hasId: !1,
|