@farris/ui-vue 1.7.0-beta.3 → 1.7.0-beta.4
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/components/avatar/index.esm.js +10 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +178 -176
- package/components/calendar/index.umd.cjs +2 -2
- package/components/collection-property-editor/index.esm.js +48 -46
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +319 -300
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +2287 -1161
- package/components/comment/index.umd.cjs +7 -7
- package/components/component/index.esm.js +3 -1
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +926 -901
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +898 -899
- package/components/data-view/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +3 -1
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +239 -221
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +11 -9
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/expression-editor/index.esm.js +1299 -1279
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +731 -678
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +1792 -1772
- package/components/filter-condition-editor/index.umd.cjs +4 -4
- package/components/image/index.esm.js +246 -240
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +9 -7
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +1 -1
- package/components/list-view/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +2009 -886
- package/components/locale/index.umd.cjs +6 -6
- package/components/number-range/index.esm.js +190 -181
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +734 -714
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +60 -49
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +2461 -2500
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +238 -238
- package/components/schema-selector/index.umd.cjs +4 -4
- package/components/section/index.esm.js +217 -302
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +1793 -1773
- package/components/sort-condition-editor/index.umd.cjs +4 -4
- package/components/transfer/index.esm.js +155 -155
- package/components/transfer/index.umd.cjs +3 -3
- package/designer/data-grid/index.esm.js +895 -867
- package/designer/data-grid/index.umd.cjs +5 -5
- package/designer/data-view/index.esm.js +145 -144
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/drawer/index.esm.js +73 -71
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +87 -65
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +14 -3
- package/designer/farris-designer.all.umd.cjs +3 -3
- package/designer/input-group/index.esm.js +34 -14
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1 -1
- package/designer/list-view/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +15 -2
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +129 -119
- package/designer/section/index.umd.cjs +1 -1
- package/designer/time-picker/index.esm.js +140 -131
- package/designer/time-picker/index.umd.cjs +1 -1
- package/farris.all.esm.js +13578 -12394
- package/farris.all.umd.cjs +26 -26
- package/index.css +1 -1
- package/locales/data-grid/ui/en.json +2 -1
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +12 -10
- package/locales/designer/zh-CHS.json +19 -17
- package/locales/designer/zh-CHT.json +19 -17
- package/locales/ui/en.json +4 -2
- package/locales/ui/zh-CHS.json +11 -9
- package/locales/ui/zh-CHT.json +11 -9
- package/package.json +1 -1
- package/package.zip +0 -0
- package/types/combo-list/src/composition/types.d.ts +1 -0
- package/types/condition/src/composition/condition-value/number-spinner-value.d.ts +1 -1
- package/types/condition/src/composition/use-field-config.d.ts +1 -1
- package/types/condition/src/condition.props.d.ts +1 -1
- package/types/data-view/designer/property-config/use-command-option.d.ts +12 -0
- package/types/image/src/property-config/image.property-config.d.ts +5 -5
- package/types/locale/src/lib/locale.service.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +7 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +0 -20
- package/types/section/src/designer/section.design.props.d.ts +17 -0
- package/types/section/src/section.props.d.ts +0 -25
|
@@ -4,13 +4,13 @@ var A = (i, t, e) => Ae(i, typeof t != "symbol" ? t + "" : t, e);
|
|
|
4
4
|
import { ref as U, computed as L, defineComponent as _, watch as Q, createVNode as Y, nextTick as Fe, inject as X, onMounted as Ee } from "vue";
|
|
5
5
|
import { isPlainObject as $, cloneDeep as z } from "lodash-es";
|
|
6
6
|
import { resolveAppearance as we } from "../dynamic-resolver/index.esm.js";
|
|
7
|
-
import { getCustomClass as ee, FormSchemaEntityField$Type as K, FormSchemaEntityFieldType$Type as Ie, withInstall as
|
|
8
|
-
import { DgControl as f, canvasChanged as G, refreshCanvas as
|
|
7
|
+
import { getCustomClass as ee, FormSchemaEntityField$Type as K, FormSchemaEntityFieldType$Type as Ie, withInstall as xe } from "../common/index.esm.js";
|
|
8
|
+
import { DgControl as f, canvasChanged as G, refreshCanvas as Me, useDesignerComponent as Se } from "../designer-canvas/index.esm.js";
|
|
9
9
|
function te(i, t) {
|
|
10
10
|
let e;
|
|
11
11
|
function n(s) {
|
|
12
|
-
const { properties: m, title: h, ignore: a } = s,
|
|
13
|
-
if (h && (!
|
|
12
|
+
const { properties: m, title: h, ignore: a } = s, u = a && Array.isArray(a), y = Object.keys(m).reduce((v, C) => ((!u || !a.find((E) => E === C)) && (v[C] = m[C].type === "object" && m[C].properties ? n(m[C]) : z(m[C].default)), v), {});
|
|
13
|
+
if (h && (!u || !a.find((v) => v === "id"))) {
|
|
14
14
|
const v = h.toLowerCase().replace(/-/g, "_");
|
|
15
15
|
y.id = `${v}_${Math.random().toString().slice(2, 6)}`;
|
|
16
16
|
}
|
|
@@ -19,12 +19,12 @@ function te(i, t) {
|
|
|
19
19
|
function r(s) {
|
|
20
20
|
const { properties: m, title: h, required: a } = s;
|
|
21
21
|
if (a && Array.isArray(a)) {
|
|
22
|
-
const
|
|
22
|
+
const u = a.reduce((y, v) => (y[v] = m[v].type === "object" && m[v].properties ? n(m[v]) : z(m[v].default), y), {});
|
|
23
23
|
if (h && a.find((y) => y === "id")) {
|
|
24
24
|
const y = h.toLowerCase().replace(/-/g, "_");
|
|
25
|
-
|
|
25
|
+
u.id = `${y}_${Math.random().toString().slice(2, 6)}`;
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return u;
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
30
|
type: h
|
|
@@ -33,110 +33,110 @@ function te(i, t) {
|
|
|
33
33
|
function o(s, m = {}, h) {
|
|
34
34
|
const a = i[s];
|
|
35
35
|
if (a) {
|
|
36
|
-
let
|
|
36
|
+
let u = r(a);
|
|
37
37
|
const y = t[s];
|
|
38
|
-
return
|
|
38
|
+
return u = y ? y({ getSchemaByType: o }, u, m, h) : u, e != null && e.appendIdentifyForNewControl && e.appendIdentifyForNewControl(u), u;
|
|
39
39
|
}
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
function l(s, m) {
|
|
43
43
|
const h = n(m);
|
|
44
|
-
return Object.keys(h).reduce((a,
|
|
44
|
+
return Object.keys(h).reduce((a, u) => (Object.prototype.hasOwnProperty.call(s, u) && (a[u] && $(a[u]) && $(s[u] || !s[u]) ? Object.assign(a[u], s[u] || {}) : a[u] = s[u]), a), h), h;
|
|
45
45
|
}
|
|
46
46
|
function g(s, m) {
|
|
47
|
-
return Object.keys(s).filter((a) => s[a] != null).reduce((a,
|
|
48
|
-
if (m.has(
|
|
49
|
-
const y = m.get(
|
|
47
|
+
return Object.keys(s).filter((a) => s[a] != null).reduce((a, u) => {
|
|
48
|
+
if (m.has(u)) {
|
|
49
|
+
const y = m.get(u);
|
|
50
50
|
if (typeof y == "string")
|
|
51
|
-
a[y] = s[
|
|
51
|
+
a[y] = s[u];
|
|
52
52
|
else {
|
|
53
|
-
const v = y(
|
|
53
|
+
const v = y(u, s[u], s);
|
|
54
54
|
Object.assign(a, v);
|
|
55
55
|
}
|
|
56
56
|
} else
|
|
57
|
-
a[
|
|
57
|
+
a[u] = s[u];
|
|
58
58
|
return a;
|
|
59
59
|
}, {});
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function d(s, m, h = /* @__PURE__ */ new Map()) {
|
|
62
62
|
const a = l(s, m);
|
|
63
63
|
return g(a, h);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function p(s) {
|
|
66
66
|
var h;
|
|
67
67
|
const m = s.type;
|
|
68
68
|
if (m) {
|
|
69
69
|
const a = i[m];
|
|
70
70
|
if (!a)
|
|
71
71
|
return s;
|
|
72
|
-
const
|
|
72
|
+
const u = l(s, a), y = ((h = s.editor) == null ? void 0 : h.type) || "";
|
|
73
73
|
if (y) {
|
|
74
74
|
const v = i[y], C = l(s.editor, v);
|
|
75
|
-
|
|
75
|
+
u.editor = C;
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return u;
|
|
78
78
|
}
|
|
79
79
|
return s;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function c(s) {
|
|
82
82
|
e = s;
|
|
83
83
|
}
|
|
84
|
-
return { getSchemaByType: o, resolveSchemaWithDefaultValue:
|
|
84
|
+
return { getSchemaByType: o, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: d, mappingSchemaToProps: g, setDesignerContext: c };
|
|
85
85
|
}
|
|
86
86
|
const ie = {}, ne = {}, { resolveSchemaWithDefaultValue: Pe, resolveSchemaToProps: Te, mappingSchemaToProps: ke } = te(ie, ne);
|
|
87
87
|
function Ve(i = {}) {
|
|
88
|
-
function t(
|
|
88
|
+
function t(p, c, s, m) {
|
|
89
89
|
if (typeof s == "number")
|
|
90
|
-
return m[
|
|
90
|
+
return m[p].length === s;
|
|
91
91
|
if (typeof s == "object") {
|
|
92
92
|
const h = Object.keys(s)[0], a = s[h];
|
|
93
93
|
if (h === "not")
|
|
94
|
-
return Number(m[
|
|
94
|
+
return Number(m[p].length) !== Number(a);
|
|
95
95
|
if (h === "moreThan")
|
|
96
|
-
return Number(m[
|
|
96
|
+
return Number(m[p].length) >= Number(a);
|
|
97
97
|
if (h === "lessThan")
|
|
98
|
-
return Number(m[
|
|
98
|
+
return Number(m[p].length) <= Number(a);
|
|
99
99
|
}
|
|
100
100
|
return !1;
|
|
101
101
|
}
|
|
102
|
-
function e(
|
|
103
|
-
return m[
|
|
102
|
+
function e(p, c, s, m) {
|
|
103
|
+
return m[p] && m[p].propertyValue && String(m[p].propertyValue.value) === String(s);
|
|
104
104
|
}
|
|
105
105
|
const n = /* @__PURE__ */ new Map([
|
|
106
106
|
["length", t],
|
|
107
107
|
["getProperty", e]
|
|
108
108
|
]);
|
|
109
|
-
Object.keys(i).reduce((
|
|
110
|
-
function r(
|
|
111
|
-
const s =
|
|
112
|
-
return typeof
|
|
109
|
+
Object.keys(i).reduce((p, c) => (p.set(c, i[c]), p), n);
|
|
110
|
+
function r(p, c) {
|
|
111
|
+
const s = p;
|
|
112
|
+
return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: p, value: !!c }] : typeof c == "object" ? Object.keys(c).map((m) => {
|
|
113
113
|
if (m === "length")
|
|
114
|
-
return { target: s, operator: "length", param: null, value:
|
|
115
|
-
const h = m, a =
|
|
114
|
+
return { target: s, operator: "length", param: null, value: c[m] };
|
|
115
|
+
const h = m, a = c[m];
|
|
116
116
|
return { target: s, operator: "getProperty", param: h, value: a };
|
|
117
117
|
}) : [];
|
|
118
118
|
}
|
|
119
|
-
function o(
|
|
120
|
-
return Object.keys(
|
|
121
|
-
const h = r(m,
|
|
119
|
+
function o(p) {
|
|
120
|
+
return Object.keys(p).reduce((s, m) => {
|
|
121
|
+
const h = r(m, p[m]);
|
|
122
122
|
return s.push(...h), s;
|
|
123
123
|
}, []);
|
|
124
124
|
}
|
|
125
|
-
function l(
|
|
126
|
-
if (n.has(
|
|
127
|
-
const s = n.get(
|
|
128
|
-
return s && s(
|
|
125
|
+
function l(p, c) {
|
|
126
|
+
if (n.has(p.operator)) {
|
|
127
|
+
const s = n.get(p.operator);
|
|
128
|
+
return s && s(p.target, p.param, p.value, c) || !1;
|
|
129
129
|
}
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
|
-
function g(
|
|
133
|
-
return o(
|
|
132
|
+
function g(p, c) {
|
|
133
|
+
return o(p).reduce((h, a) => h && l(a, c), !0);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const s = Object.keys(
|
|
135
|
+
function d(p, c) {
|
|
136
|
+
const s = Object.keys(p), m = s.includes("allOf"), h = s.includes("anyOf"), a = m || h, v = (a ? p[a ? m ? "allOf" : "anyOf" : "allOf"] : [p]).map((E) => g(E, c));
|
|
137
137
|
return m ? !v.includes(!1) : v.includes(!0);
|
|
138
138
|
}
|
|
139
|
-
return { parseValueSchema:
|
|
139
|
+
return { parseValueSchema: d };
|
|
140
140
|
}
|
|
141
141
|
const Oe = {
|
|
142
142
|
convertTo: (i, t, e, n) => {
|
|
@@ -287,6 +287,8 @@ const Oe = {
|
|
|
287
287
|
}
|
|
288
288
|
if (t === "commands")
|
|
289
289
|
return i.command.enableType === "custom" ? i.command.commands : [];
|
|
290
|
+
if (t === "formatter")
|
|
291
|
+
return i.command.formatter;
|
|
290
292
|
}
|
|
291
293
|
return "";
|
|
292
294
|
}
|
|
@@ -420,7 +422,7 @@ const Oe = {
|
|
|
420
422
|
</span>` : i.columnTemplate = `
|
|
421
423
|
<span class="f-pretend-link f-cursor-pointer">
|
|
422
424
|
{{rowData.${i.field}}}
|
|
423
|
-
</span>`), t === "columnTemplateType" && e === "default" && (i.columnTemplate = ""));
|
|
425
|
+
</span>`), t === "columnTemplateType" && e === "default" && (i.columnTemplate = ""), t === "columnTemplateType" && e === "custom" && (i.columnTemplate = ""));
|
|
424
426
|
},
|
|
425
427
|
convertFrom: (i, t, e) => t === "columnTemplate" ? i.columnTemplate : t === "columnTemplateType" ? i.columnTemplateType ? i.columnTemplateType || "default" : i.columnTemplate && !i.onClickLinkCommand ? "custom" : i.columnTemplate && i.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
426
428
|
};
|
|
@@ -473,29 +475,29 @@ function re(i, t, e) {
|
|
|
473
475
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
474
476
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
475
477
|
]), o = Ve();
|
|
476
|
-
function l(a,
|
|
477
|
-
return () => o.parseValueSchema(a,
|
|
478
|
+
function l(a, u) {
|
|
479
|
+
return () => o.parseValueSchema(a, u);
|
|
478
480
|
}
|
|
479
|
-
function g(a,
|
|
480
|
-
return a.includes("visible") &&
|
|
481
|
+
function g(a, u, y) {
|
|
482
|
+
return a.includes("visible") && u.visible !== void 0 ? typeof u.visible == "boolean" ? () => !!u.visible : u.visible === void 0 ? !0 : l(u.visible, y) : () => !0;
|
|
481
483
|
}
|
|
482
|
-
function
|
|
483
|
-
return a.includes("readonly") &&
|
|
484
|
+
function d(a, u, y) {
|
|
485
|
+
return a.includes("readonly") && u.readonly !== void 0 ? typeof u.readonly == "boolean" ? () => !!u.readonly : l(u.readonly, y) : () => !1;
|
|
484
486
|
}
|
|
485
|
-
function
|
|
486
|
-
const y = a.$converter ||
|
|
487
|
+
function p(a, u) {
|
|
488
|
+
const y = a.$converter || u;
|
|
487
489
|
return typeof y == "string" && y && n.has(y) ? n.get(y) || null : y || null;
|
|
488
490
|
}
|
|
489
|
-
function
|
|
491
|
+
function c(a, u, y, v, C, E = "", I = "") {
|
|
490
492
|
return Object.keys(a).map((F) => {
|
|
491
|
-
const
|
|
493
|
+
const M = U(1), S = F, b = a[F], x = Object.keys(b), N = b.title, V = b.type, O = r.get(V) || { type: "input-group", enableClear: !1 }, k = b.editor ? Object.assign({}, O, b.editor) : Object.assign({}, O), H = g(x, b, u), R = d(x, b, u);
|
|
492
494
|
k.readonly = k.readonly === void 0 ? R() : k.readonly;
|
|
493
|
-
const J = b.type === "cascade" ?
|
|
494
|
-
let P =
|
|
495
|
+
const J = b.type === "cascade" ? c(b.properties, u, y, v, C, E, I) : [], me = !0;
|
|
496
|
+
let P = p(b, I);
|
|
495
497
|
const fe = L({
|
|
496
498
|
get() {
|
|
497
|
-
if (
|
|
498
|
-
if (["class", "style"].find((be) => be ===
|
|
499
|
+
if (M.value) {
|
|
500
|
+
if (["class", "style"].find((be) => be === S) && !P && (P = n.get("/converter/appearance.converter") || null), P && P.convertFrom)
|
|
499
501
|
return P.convertFrom(y, F, C, E);
|
|
500
502
|
const T = y[F];
|
|
501
503
|
return Object.prototype.hasOwnProperty.call(b, "defaultValue") && (T === void 0 || typeof T == "string" && T === "") ? b.type === "boolean" ? b.defaultValue : b.defaultValue || "" : T;
|
|
@@ -503,45 +505,45 @@ function re(i, t, e) {
|
|
|
503
505
|
return null;
|
|
504
506
|
},
|
|
505
507
|
set(T) {
|
|
506
|
-
|
|
508
|
+
M.value += 1, P && P.convertTo ? (P.convertTo(v, F, T, C, E), P.convertTo(y, F, T, C, E)) : (v[F] = T, y[F] = T);
|
|
507
509
|
}
|
|
508
|
-
}), { refreshPanelAfterChanged: ge, description: he, isExpand: ye, parentPropertyID: ve } = b, Z = { propertyID:
|
|
509
|
-
return
|
|
510
|
+
}), { refreshPanelAfterChanged: ge, description: he, isExpand: ye, parentPropertyID: ve } = b, Z = { propertyID: S, propertyName: N, propertyType: V, propertyValue: fe, editor: k, visible: H, readonly: R, cascadeConfig: J, hideCascadeTitle: me, refreshPanelAfterChanged: ge, description: he, isExpand: ye, parentPropertyID: ve };
|
|
511
|
+
return u[S] = Z, Z;
|
|
510
512
|
});
|
|
511
513
|
}
|
|
512
|
-
function s(a,
|
|
514
|
+
function s(a, u, y = {}) {
|
|
513
515
|
const v = {}, C = i[a];
|
|
514
516
|
return C && C.categories ? Object.keys(C.categories).map((I) => {
|
|
515
|
-
const w = C.categories[I], F = w == null ? void 0 : w.title,
|
|
516
|
-
return { categoryId: I, categoryName: F, properties:
|
|
517
|
+
const w = C.categories[I], F = w == null ? void 0 : w.title, M = c(w.properties || {}, v, {}, y, u);
|
|
518
|
+
return { categoryId: I, categoryName: F, properties: M };
|
|
517
519
|
}) : [];
|
|
518
520
|
}
|
|
519
|
-
function m(a,
|
|
520
|
-
const E =
|
|
521
|
+
function m(a, u, y, v, C = "") {
|
|
522
|
+
const E = u.$ref.schema, I = u.$ref.converter, w = y[E], F = w.type, M = e(w), S = {}, b = i[F];
|
|
521
523
|
if (b && b.categories) {
|
|
522
|
-
const
|
|
523
|
-
I && Object.keys(
|
|
524
|
-
|
|
524
|
+
const x = b.categories[a], N = x == null ? void 0 : x.title;
|
|
525
|
+
I && Object.keys(x.properties).forEach((k) => {
|
|
526
|
+
x.properties[k].$converter = I;
|
|
525
527
|
});
|
|
526
|
-
const V = (
|
|
528
|
+
const V = (x == null ? void 0 : x.properties) || {}, O = c(V, S, M, w, v, C);
|
|
527
529
|
return { categoryId: a, categoryName: N, properties: O };
|
|
528
530
|
}
|
|
529
531
|
return { categoryId: a, categoryName: "", properties: [] };
|
|
530
532
|
}
|
|
531
|
-
function h(a,
|
|
533
|
+
function h(a, u, y, v, C) {
|
|
532
534
|
const E = a.type, I = e(a), w = {};
|
|
533
535
|
let F = C || i[E];
|
|
534
536
|
if (F && Object.keys(F).length === 0 && y && y.getPropConfig && (F = y.getPropConfig(v)), F && F.categories) {
|
|
535
|
-
const
|
|
536
|
-
return Object.keys(F.categories).map((
|
|
537
|
-
const b = F.categories[
|
|
537
|
+
const M = [];
|
|
538
|
+
return Object.keys(F.categories).map((S) => {
|
|
539
|
+
const b = F.categories[S];
|
|
538
540
|
if (b.$ref) {
|
|
539
|
-
|
|
541
|
+
M.push(m(S, b, a, u, v));
|
|
540
542
|
return;
|
|
541
543
|
}
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
}),
|
|
544
|
+
const x = b == null ? void 0 : b.title, N = b == null ? void 0 : b.tabId, V = b == null ? void 0 : b.tabName, O = b == null ? void 0 : b.hide, k = b == null ? void 0 : b.hideTitle, H = c(b.properties || {}, w, I, a, u, v, b.$converter), { setPropertyRelates: R } = b, J = b == null ? void 0 : b.parentPropertyID;
|
|
545
|
+
M.push({ categoryId: S, categoryName: x, tabId: N, tabName: V, hide: O, properties: H, hideTitle: k, setPropertyRelates: R, parentPropertyID: J });
|
|
546
|
+
}), M;
|
|
545
547
|
}
|
|
546
548
|
return [];
|
|
547
549
|
}
|
|
@@ -555,12 +557,12 @@ const oe = {}, se = {};
|
|
|
555
557
|
re(oe, se, Pe);
|
|
556
558
|
const le = {}, ae = {}, { resolveSchemaWithDefaultValue: it } = te(le, ae), de = {}, ce = {};
|
|
557
559
|
re(de, ce, it);
|
|
558
|
-
function nt(i, t, e = /* @__PURE__ */ new Map(), n = (l, g,
|
|
560
|
+
function nt(i, t, e = /* @__PURE__ */ new Map(), n = (l, g, d, p) => g, r = {}, o = (l) => l) {
|
|
559
561
|
return ie[t.title] = t, ne[t.title] = n, oe[t.title] = r, se[t.title] = o, le[t.title] = t, ae[t.title] = n, de[t.title] = r, ce[t.title] = o, (l = {}, g = !0) => {
|
|
560
562
|
if (!g)
|
|
561
563
|
return ke(l, e);
|
|
562
|
-
const
|
|
563
|
-
return Object.assign(
|
|
564
|
+
const d = Te(l, t, e), p = Object.keys(i).reduce((c, s) => (c[s] = i[s].default, c), {});
|
|
565
|
+
return Object.assign(p, d);
|
|
564
566
|
};
|
|
565
567
|
}
|
|
566
568
|
function rt(i, t, e) {
|
|
@@ -679,52 +681,47 @@ const ot = /* @__PURE__ */ new Map([
|
|
|
679
681
|
}, i.customClass)), r = L(() => {
|
|
680
682
|
const d = {};
|
|
681
683
|
return i.width && i.width > 0 && (d.width = i.width + "px"), i.height && i.height > 0 && (d.height = i.height + "px"), d;
|
|
682
|
-
}), o = i.errorSrc ? i.errorSrc : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABWCAYAAAE1c8GoAAAAAXNSR0IArs4c6QAACEZJREFUeAHtnIt23DQQhgkkodzKrVxKaJqkSd7/eUoJp7QNDRBaaAulLSnzOTs+Y62klWzLu954zlEsS6PRr9+yNJK12XjnUo5n10WXuyikKle67y4y6ea7BagtWqNbwDU4d7/ppFSNctIat4tqmIMYK2DbUsdtAWutVjB4qrQNSfBlGr1m9L3Z7YfN5PAdNbwv4XZYpc55SywZjm1sbSIUcZWjtbjKIaN1eszajVpLIm6fsXlq5ANJfEBGCIYqooPyHSJqeVvieyQEhAd4rJb3AkqNZFVuJIZueNxAOQgpdEm3hhe+bZkV1ZyEymnPD+VH0/Xp+JTs42zVqpjxVgYtyphxq+eLa8ueSeYvPoU2xtWo2vtEIoTXEn7SRK4+43TPIwkuItco5a1syQ06jFA/kIEhLfRY4t+S2JfYN65XwwAEOaLoL+/6+ftUje+LPTjrS/4UQ2eW874M13a0t3R+YWqLl5GKCftAnfxOt/9RupTxCllR48q5ywGv881Z4qlcn7sKKfch5GoYG9+lGHJ0qi4eMm4HoBOnYPJtiBZGuM7dM4Q8Bd3CIaOt8cqDEQTRCtoYvyVG7cQdrCDXOF4dvpcr3gpyjONYf+FaNfdzFfiMo+Qq0qu+N4ZC0UY517jNJE4+L8RByJonvbZh+3mdaAocmnhOlOVGY4LOKZyk69KSVChVqbjxyoFJRZOhd7caGqXAjoSPMgouW/UewHclXJsh+UeuZ7P4ql0Ydb5RULxCCpq0B5qxgtdXgulTCRXeop28ZONHC9yOtqkEMV/YnZ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PShCsjjM0MF2s/ZGiDQ9eSQ0qozmWl8+lw6T/AHqqHL4tk6mUtwAJM5YZEnkj4TROGvK4z4Xx14Qe2vreYr1wEvCkm9sHmkXUknMOFtySktI0FGoG5BS+pOPEpoATHKISeDNF8rM0VthaOJPCrck57FluArQPh7L9wFDZ130ZUg4LreiiB75GsI3r/rjt2wvl/HiUOLjH+s/nGx/SHEuzP+OS2vYyVcCY8TomVFs5lH0h4LQHiuXaSsRHu/nu/To3PKMxEvC+BIQbi+S8iraQE4cz6LNs79wbTIrYEcPGWvV/OtsRtCUyqjPG0M0v6IhwifAdBWVywyGgr9KxdCbl7623rSy2nHhFuJMQn/8+croRTMT9hCnkIPAQCryDuVmqvh2BcPMbQVRY6Gm8egh+/8PtsW8IpR0WphOAbMwYiv0v4o4rN/6EBOxJwz8YmdDwCK1d2SL1CA489OfTI+550iIPoPl5xXC56PVeEn30x/q+LMNzAb0NSezjeAU9vzkDDWt4Nb8deXpFRaXu5WkT4UP7uqJjsApan4BtSuticykYYwMuYZEAGJsIHJJuqJsKXQLjvpxEDw7gy1b2kh+MLF//ScWUoDTcUjk/VV+Ta1yZ+uMqrm/MCsiW8VcItFawmOcvN/gh+uk9HkicJMEBPfiMBklnis2qv5X8shM3uwwEEhgAAAABJRU5ErkJggg==", l = U(i.modelValue || i.src);
|
|
683
685
|
Q(() => i.src, (d) => {
|
|
684
686
|
l.value = d;
|
|
685
687
|
}), Q(() => i.modelValue, (d) => {
|
|
686
688
|
e.value = d, l.value = d || i.src || o;
|
|
687
689
|
});
|
|
688
|
-
function g(
|
|
689
|
-
d ? l.value = d : l.value = i.src || o;
|
|
690
|
-
}
|
|
691
|
-
function c() {
|
|
690
|
+
function g() {
|
|
692
691
|
l.value = o;
|
|
693
692
|
}
|
|
694
|
-
return
|
|
695
|
-
updateSrc: g
|
|
696
|
-
}), () => i.visible ? Y("div", {
|
|
693
|
+
return () => i.visible ? Y("div", {
|
|
697
694
|
class: n.value
|
|
698
695
|
}, [Y("img", {
|
|
699
696
|
alt: i.alt,
|
|
700
697
|
title: i.title,
|
|
701
698
|
style: r.value,
|
|
702
699
|
src: l.value,
|
|
703
|
-
onError:
|
|
700
|
+
onError: g
|
|
704
701
|
}, null)]) : null;
|
|
705
702
|
}
|
|
706
703
|
});
|
|
707
704
|
function ht(i) {
|
|
708
705
|
const { formSchemaUtils: t, formStateMachineUtils: e } = i;
|
|
709
|
-
function n(
|
|
706
|
+
function n(d, p = "") {
|
|
710
707
|
return {
|
|
711
|
-
path:
|
|
712
|
-
field:
|
|
713
|
-
fullPath:
|
|
708
|
+
path: p + d.code,
|
|
709
|
+
field: d.id,
|
|
710
|
+
fullPath: d.code
|
|
714
711
|
};
|
|
715
712
|
}
|
|
716
|
-
function r(
|
|
717
|
-
return t.getViewModelById(
|
|
713
|
+
function r(d, p = "") {
|
|
714
|
+
return t.getViewModelById(d).states.map((s) => n(s, p));
|
|
718
715
|
}
|
|
719
|
-
function o(
|
|
720
|
-
const
|
|
721
|
-
if (
|
|
722
|
-
return
|
|
723
|
-
const s = r(
|
|
724
|
-
return [...
|
|
716
|
+
function o(d) {
|
|
717
|
+
const p = t.getRootViewModelId(), c = r(d);
|
|
718
|
+
if (d === p)
|
|
719
|
+
return c;
|
|
720
|
+
const s = r(p, "root-component.");
|
|
721
|
+
return [...c, ...s];
|
|
725
722
|
}
|
|
726
|
-
function l(
|
|
727
|
-
return
|
|
723
|
+
function l(d) {
|
|
724
|
+
return d.binding && d.binding.path || d.id || "";
|
|
728
725
|
}
|
|
729
726
|
function g() {
|
|
730
727
|
return e && e.getRenderStates() || [];
|
|
@@ -785,12 +782,12 @@ class pe {
|
|
|
785
782
|
return g && g.value || "";
|
|
786
783
|
},
|
|
787
784
|
convertTo: (n, r, o, l, g) => {
|
|
788
|
-
var
|
|
785
|
+
var d;
|
|
789
786
|
if (r === "dataPicking" && (o != null && o.target)) {
|
|
790
|
-
const
|
|
791
|
-
((
|
|
792
|
-
(s) => s.id ===
|
|
793
|
-
)) ? n.dictPickingExpressionId =
|
|
787
|
+
const p = `${o.target}_dataPicking`;
|
|
788
|
+
((d = o.rules) == null ? void 0 : d.some(
|
|
789
|
+
(s) => s.id === p && s.value
|
|
790
|
+
)) ? n.dictPickingExpressionId = p : delete n.dictPickingExpressionId;
|
|
794
791
|
}
|
|
795
792
|
l.updateExpression(o);
|
|
796
793
|
}
|
|
@@ -850,10 +847,10 @@ class pe {
|
|
|
850
847
|
buildChildEntityTreeData(t = null, e) {
|
|
851
848
|
const n = [];
|
|
852
849
|
return t == null || t.forEach((r) => {
|
|
853
|
-
var
|
|
850
|
+
var d, p;
|
|
854
851
|
const o = this.createTreeNode(r, e);
|
|
855
852
|
o.type = "entity";
|
|
856
|
-
const l = this.buildEntityFieldsTreeData((
|
|
853
|
+
const l = this.buildEntityFieldsTreeData((d = r.type) == null ? void 0 : d.fields, [...e, r.label]), g = this.buildChildEntityTreeData((p = r.type) == null ? void 0 : p.entities, [...e, r.label]);
|
|
857
854
|
g != null && g.length && (l == null || l.push(...g)), n.push({
|
|
858
855
|
data: o,
|
|
859
856
|
children: l || [],
|
|
@@ -903,12 +900,12 @@ class pe {
|
|
|
903
900
|
return o.messageType != null && (g.messageType = o.messageType), g;
|
|
904
901
|
}
|
|
905
902
|
buildRule(t, e, n, r) {
|
|
906
|
-
const { expression: o, message: l, messageType: g } = e,
|
|
903
|
+
const { expression: o, message: l, messageType: g } = e, d = {
|
|
907
904
|
id: `${t}_${n}`,
|
|
908
905
|
type: n,
|
|
909
906
|
value: o
|
|
910
907
|
};
|
|
911
|
-
return (n === "validate" || n === "dataPicking" || n === "required") && (
|
|
908
|
+
return (n === "validate" || n === "dataPicking" || n === "required") && (d.message = l), n === "dataPicking" && (d.messageType = g), n === "validate" && r && (d.elementId = r), d;
|
|
912
909
|
}
|
|
913
910
|
getExpressionData() {
|
|
914
911
|
const { expressions: t } = this.formSchemaService.getFormSchema().module;
|
|
@@ -916,34 +913,34 @@ class pe {
|
|
|
916
913
|
}
|
|
917
914
|
updateExpression(t, e, n, r) {
|
|
918
915
|
const o = e === "Field" ? t.binding.field : t.id, l = this.buildRule(o, n, r, t.type === "form-group" ? t.id : "");
|
|
919
|
-
let
|
|
920
|
-
const
|
|
921
|
-
if (
|
|
922
|
-
const
|
|
923
|
-
if (
|
|
924
|
-
|
|
916
|
+
let d = this.getExpressionData().find((c) => c.targetType === e && c.target === o);
|
|
917
|
+
const p = (c) => c.value.trim() === "";
|
|
918
|
+
if (d) {
|
|
919
|
+
const c = d.rules.find((s) => s.id === l.id);
|
|
920
|
+
if (c)
|
|
921
|
+
p(l) ? d.rules = d.rules.filter((s) => s.id !== l.id) : (Object.assign(c, l), r === "validate" && t.type === "form-group" && (c.elementId = t.id));
|
|
925
922
|
else {
|
|
926
|
-
if (
|
|
923
|
+
if (p(l))
|
|
927
924
|
return null;
|
|
928
|
-
|
|
925
|
+
d.rules = d.rules || [], d.rules.push(l);
|
|
929
926
|
}
|
|
930
927
|
} else {
|
|
931
|
-
if (
|
|
928
|
+
if (p(l))
|
|
932
929
|
return null;
|
|
933
|
-
|
|
930
|
+
d = {
|
|
934
931
|
target: `${o}`,
|
|
935
932
|
rules: [l],
|
|
936
933
|
targetType: e
|
|
937
934
|
};
|
|
938
935
|
}
|
|
939
|
-
return
|
|
936
|
+
return d;
|
|
940
937
|
}
|
|
941
938
|
getExpressionEditorOptions(t, e, n, r) {
|
|
942
939
|
return n.reduce((o, l) => {
|
|
943
|
-
var
|
|
944
|
-
const g = e === "Field" ? (
|
|
940
|
+
var d, p;
|
|
941
|
+
const g = e === "Field" ? (d = t == null ? void 0 : t.binding) == null ? void 0 : d.field : t.id;
|
|
945
942
|
return o[l] = {
|
|
946
|
-
hide: e === "Field" ? !!((
|
|
943
|
+
hide: e === "Field" ? !!((p = t == null ? void 0 : t.binding) != null && p.field) : !1,
|
|
947
944
|
description: "",
|
|
948
945
|
title: this.expressionNames[l],
|
|
949
946
|
type: "string",
|
|
@@ -956,10 +953,10 @@ class pe {
|
|
|
956
953
|
showMessage: l === "validate" || l === "dataPicking" || l === "required",
|
|
957
954
|
showMessageType: l === "dataPicking",
|
|
958
955
|
beforeOpen: () => this.onBeforeOpenExpression(t, l, e),
|
|
959
|
-
onSubmitModal: (
|
|
960
|
-
const s = this.updateExpression(t, e,
|
|
956
|
+
onSubmitModal: (c) => {
|
|
957
|
+
const s = this.updateExpression(t, e, c, l);
|
|
961
958
|
if (r) {
|
|
962
|
-
const m = this.buildRule(g,
|
|
959
|
+
const m = this.buildRule(g, c, l);
|
|
963
960
|
r(m);
|
|
964
961
|
}
|
|
965
962
|
return s;
|
|
@@ -1115,7 +1112,7 @@ class yt {
|
|
|
1115
1112
|
* @returns
|
|
1116
1113
|
*/
|
|
1117
1114
|
getPropertyEditorParams(t, e = [], n = "visible", r = {}, o = {}, l = "") {
|
|
1118
|
-
const { getVariables: g, getControlName:
|
|
1115
|
+
const { getVariables: g, getControlName: d, getStateMachines: p } = ht(this.designerHostService), c = this.getRealTargetType(t), s = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], m = {
|
|
1119
1116
|
type: "property-editor",
|
|
1120
1117
|
propertyTypes: s
|
|
1121
1118
|
};
|
|
@@ -1128,14 +1125,14 @@ class yt {
|
|
|
1128
1125
|
}, r);
|
|
1129
1126
|
break;
|
|
1130
1127
|
case "Expression":
|
|
1131
|
-
m.expressionConfig = this.getExpressionOptions(t,
|
|
1128
|
+
m.expressionConfig = this.getExpressionOptions(t, c, l || n);
|
|
1132
1129
|
break;
|
|
1133
1130
|
case "StateMachine":
|
|
1134
|
-
m.stateMachines =
|
|
1131
|
+
m.stateMachines = p();
|
|
1135
1132
|
break;
|
|
1136
1133
|
case "Variable":
|
|
1137
1134
|
Object.assign(m, {
|
|
1138
|
-
controlName:
|
|
1135
|
+
controlName: d(t),
|
|
1139
1136
|
newVariablePrefix: "is",
|
|
1140
1137
|
newVariableType: "Boolean",
|
|
1141
1138
|
variables: g(this.viewModelId),
|
|
@@ -1171,22 +1168,22 @@ class yt {
|
|
|
1171
1168
|
title: "行为",
|
|
1172
1169
|
description: ""
|
|
1173
1170
|
}, l = this.getVisibleProperty(t, e);
|
|
1174
|
-
for (const
|
|
1175
|
-
l[
|
|
1171
|
+
for (const d in n)
|
|
1172
|
+
l[d] = Object.assign(l[d] || {}, n[d]);
|
|
1176
1173
|
const g = this;
|
|
1177
1174
|
return {
|
|
1178
1175
|
...o,
|
|
1179
1176
|
properties: { ...l },
|
|
1180
|
-
setPropertyRelates(
|
|
1181
|
-
if (
|
|
1182
|
-
switch (
|
|
1177
|
+
setPropertyRelates(d, p) {
|
|
1178
|
+
if (d) {
|
|
1179
|
+
switch (d.propertyID) {
|
|
1183
1180
|
case "disabled":
|
|
1184
1181
|
case "readonly":
|
|
1185
1182
|
case "visible":
|
|
1186
|
-
g.afterMutilEditorChanged(t,
|
|
1183
|
+
g.afterMutilEditorChanged(t, d);
|
|
1187
1184
|
break;
|
|
1188
1185
|
}
|
|
1189
|
-
r && r(
|
|
1186
|
+
r && r(d, p);
|
|
1190
1187
|
}
|
|
1191
1188
|
}
|
|
1192
1189
|
};
|
|
@@ -1210,7 +1207,7 @@ class yt {
|
|
|
1210
1207
|
if (!n)
|
|
1211
1208
|
return;
|
|
1212
1209
|
const r = n.contents.findIndex((l) => l.id === t), o = z(n.contents[r]);
|
|
1213
|
-
n.contents.splice(r, 1), n.contents.splice(r, 0, o),
|
|
1210
|
+
n.contents.splice(r, 1), n.contents.splice(r, 0, o), Me();
|
|
1214
1211
|
}
|
|
1215
1212
|
/**
|
|
1216
1213
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1240,16 +1237,16 @@ class yt {
|
|
|
1240
1237
|
const e = t.propertyValue;
|
|
1241
1238
|
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
1242
1239
|
return;
|
|
1243
|
-
const { expressionId: o, expressionInfo: l } = e, { targetId: g, targetType:
|
|
1240
|
+
const { expressionId: o, expressionInfo: l } = e, { targetId: g, targetType: d, expressionType: p, value: c, message: s } = l, m = this.formSchemaUtils.getModule();
|
|
1244
1241
|
m.expressions = m.expressions || [];
|
|
1245
1242
|
const { expressions: h } = m;
|
|
1246
1243
|
let a = h.find((y) => y.target === g);
|
|
1247
|
-
a || (a = { target: g, rules: [], targetType:
|
|
1248
|
-
const
|
|
1249
|
-
if (
|
|
1250
|
-
|
|
1244
|
+
a || (a = { target: g, rules: [], targetType: d }, h.push(a));
|
|
1245
|
+
const u = a.rules.find((y) => y.type === p);
|
|
1246
|
+
if (u)
|
|
1247
|
+
u.value = c, u.message = s;
|
|
1251
1248
|
else {
|
|
1252
|
-
const y = { id: o, type:
|
|
1249
|
+
const y = { id: o, type: p, value: c, message: s };
|
|
1253
1250
|
a.rules.push(y);
|
|
1254
1251
|
}
|
|
1255
1252
|
delete e.expressionInfo;
|
|
@@ -1264,8 +1261,8 @@ class yt {
|
|
|
1264
1261
|
const n = t.propertyValue;
|
|
1265
1262
|
if (n && n.type === "Expression")
|
|
1266
1263
|
return;
|
|
1267
|
-
const o = t.propertyID, l = this.formSchemaUtils.getExpressions(), g = e.binding ? e.binding.field : e.id,
|
|
1268
|
-
!
|
|
1264
|
+
const o = t.propertyID, l = this.formSchemaUtils.getExpressions(), g = e.binding ? e.binding.field : e.id, d = l.find((p) => p.target === g);
|
|
1265
|
+
!d || !d.rules || (d.rules = d.rules.filter((p) => p.type !== o));
|
|
1269
1266
|
}
|
|
1270
1267
|
getExpressionOptions(t, e, n) {
|
|
1271
1268
|
return new pe(this.formSchemaUtils).getExpressionOptions(t, e, n);
|
|
@@ -1415,42 +1412,42 @@ function bt(i) {
|
|
|
1415
1412
|
let t, e;
|
|
1416
1413
|
const n = /* @__PURE__ */ new Map();
|
|
1417
1414
|
let r = [];
|
|
1418
|
-
function o(
|
|
1419
|
-
const h =
|
|
1415
|
+
function o(c, s) {
|
|
1416
|
+
const h = c.split(" ").filter((C) => C.startsWith("col-"));
|
|
1420
1417
|
if (h.length === 0) {
|
|
1421
1418
|
s.isSupportedClass = !1;
|
|
1422
1419
|
return;
|
|
1423
1420
|
}
|
|
1424
|
-
let a = h.find((C) => /^col-([1-9]|10|11|12)$/.test(C)),
|
|
1425
|
-
a = a || "col-12", s.columnInSM = parseInt(a.replace("col-", ""), 10), s.displayWidthInSM = s.columnInSM / 12, s.displayWidthInSM !== 1 && (s.isSupportedClass = !1),
|
|
1421
|
+
let a = h.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), u = h.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), y = h.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = h.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
1422
|
+
a = a || "col-12", s.columnInSM = parseInt(a.replace("col-", ""), 10), s.displayWidthInSM = s.columnInSM / 12, s.displayWidthInSM !== 1 && (s.isSupportedClass = !1), u = u || "col-md-" + s.columnInSM, s.columnInMD = parseInt(u.replace("col-md-", ""), 10), s.displayWidthInMD = s.columnInMD / 6, [1, 2].includes(s.displayWidthInMD) || (s.isSupportedClass = !1), y = y || "col-xl-" + s.columnInMD, s.columnInLG = parseInt(y.replace("col-xl-", ""), 10), s.displayWidthInLG = s.columnInLG / 3, [1, 2, 3, 4].includes(s.displayWidthInLG) || (s.isSupportedClass = !1), v = v || "col-el-" + s.columnInLG, s.columnInEL = parseInt(v.replace("col-el-", ""), 10), s.displayWidthInEL = s.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(s.displayWidthInEL) || (s.isSupportedClass = !1);
|
|
1426
1423
|
}
|
|
1427
|
-
function l(
|
|
1424
|
+
function l(c, s, m, h = !1) {
|
|
1428
1425
|
let a = !1;
|
|
1429
|
-
|
|
1430
|
-
if (
|
|
1431
|
-
m += 1, l(
|
|
1426
|
+
c.contents.forEach((u) => {
|
|
1427
|
+
if (u.type === "fieldset") {
|
|
1428
|
+
m += 1, l(u, s, m, !0), a = !0;
|
|
1432
1429
|
return;
|
|
1433
1430
|
}
|
|
1434
1431
|
a && (m += 1, a = !1);
|
|
1435
|
-
const y =
|
|
1436
|
-
y ? o(y, v) : v.isSupportedClass = !1, v.label =
|
|
1432
|
+
const y = u.appearance && u.appearance.class, v = new vt();
|
|
1433
|
+
y ? o(y, v) : v.isSupportedClass = !1, v.label = u.label || u.id, v.id = u.id, v.group = m, h && (v.fieldSetId = c.id), e === u.id && (t = m), n.set(u.id, u), s.push(v);
|
|
1437
1434
|
});
|
|
1438
1435
|
}
|
|
1439
|
-
function g(
|
|
1440
|
-
const s = i.getComponentById(
|
|
1436
|
+
function g(c) {
|
|
1437
|
+
const s = i.getComponentById(c);
|
|
1441
1438
|
if (!s || !s.componentType || !s.componentType.startsWith("form"))
|
|
1442
1439
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1443
1440
|
const m = i.selectNode(s, (h) => h.type === f["response-form"].type);
|
|
1444
1441
|
return !m || !m.contents || m.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: m };
|
|
1445
1442
|
}
|
|
1446
|
-
function c
|
|
1447
|
-
s = s ||
|
|
1443
|
+
function d(c, s) {
|
|
1444
|
+
s = s || c.id;
|
|
1448
1445
|
const { result: m, message: h, formNode: a } = g(s);
|
|
1449
1446
|
if (!m)
|
|
1450
1447
|
return { result: m, message: h };
|
|
1451
|
-
e =
|
|
1452
|
-
const
|
|
1453
|
-
l(a, r,
|
|
1448
|
+
e = c.id, r = [], n.clear();
|
|
1449
|
+
const u = a.contents[0].type === f.fieldset.type ? 0 : 1;
|
|
1450
|
+
l(a, r, u);
|
|
1454
1451
|
const y = r.find((C) => !C.isSupportedClass);
|
|
1455
1452
|
return {
|
|
1456
1453
|
defaultState: {
|
|
@@ -1460,21 +1457,21 @@ function bt(i) {
|
|
|
1460
1457
|
importData: r
|
|
1461
1458
|
};
|
|
1462
1459
|
}
|
|
1463
|
-
function
|
|
1460
|
+
function p(c, s) {
|
|
1464
1461
|
s = s;
|
|
1465
1462
|
const { result: m, formNode: h } = g(s);
|
|
1466
1463
|
if (!m)
|
|
1467
1464
|
return "";
|
|
1468
1465
|
const a = [];
|
|
1469
|
-
return
|
|
1466
|
+
return c.forEach((u) => {
|
|
1470
1467
|
var C;
|
|
1471
|
-
const y = n.get(
|
|
1468
|
+
const y = n.get(u.id), v = y.appearance && y.appearance.class;
|
|
1472
1469
|
if (v) {
|
|
1473
|
-
const I = v.split(" ").filter((
|
|
1470
|
+
const I = v.split(" ").filter((x) => !x.startsWith("col-")), w = "col-" + u.columnInSM, F = "col-md-" + u.columnInMD, M = "col-xl-" + u.columnInLG, S = "col-el-" + u.columnInEL, b = [w, F, M, S].concat(I);
|
|
1474
1471
|
y.appearance.class = b.join(" ");
|
|
1475
1472
|
}
|
|
1476
|
-
if (
|
|
1477
|
-
const E = h.contents.find((w) => w.id ===
|
|
1473
|
+
if (u.fieldSetId) {
|
|
1474
|
+
const E = h.contents.find((w) => w.id === u.fieldSetId), I = a.find((w) => w.id === u.fieldSetId);
|
|
1478
1475
|
I ? (C = I.contents) == null || C.push(y) : (a.push(E), E.contents = [y]);
|
|
1479
1476
|
} else
|
|
1480
1477
|
a.push(y);
|
|
@@ -1482,8 +1479,8 @@ function bt(i) {
|
|
|
1482
1479
|
}
|
|
1483
1480
|
return {
|
|
1484
1481
|
checkCanFindFormNode: g,
|
|
1485
|
-
checkCanOpenLayoutEditor:
|
|
1486
|
-
changeFormControlsByResponseLayoutConfig:
|
|
1482
|
+
checkCanOpenLayoutEditor: d,
|
|
1483
|
+
changeFormControlsByResponseLayoutConfig: p,
|
|
1487
1484
|
getResonseFormLayoutConfig: l
|
|
1488
1485
|
};
|
|
1489
1486
|
}
|
|
@@ -1511,10 +1508,10 @@ class Ct extends yt {
|
|
|
1511
1508
|
return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(e, n, "Grid"), this.getGridFieldEdtiorProperties ? this.propertyConfig.categories.editor = this.getGridFieldEdtiorProperties(e) : this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig.categories.expressons = this.getExpressionConfig(e, "Field"), this.propertyConfig.categories;
|
|
1512
1509
|
}
|
|
1513
1510
|
getBasicProperties(e, n, r = "Card") {
|
|
1514
|
-
var
|
|
1511
|
+
var p;
|
|
1515
1512
|
const o = this;
|
|
1516
1513
|
this.setDesignViewModelField(e);
|
|
1517
|
-
const { canChangeControlType: l, editorTypeList: g } = this.getAvailableEditorType(e),
|
|
1514
|
+
const { canChangeControlType: l, editorTypeList: g } = this.getAvailableEditorType(e), d = {
|
|
1518
1515
|
description: "Basic Information",
|
|
1519
1516
|
title: "基本信息",
|
|
1520
1517
|
properties: {
|
|
@@ -1552,7 +1549,7 @@ class Ct extends yt {
|
|
|
1552
1549
|
editor: {
|
|
1553
1550
|
data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
|
|
1554
1551
|
},
|
|
1555
|
-
defaultValue: ((
|
|
1552
|
+
defaultValue: ((p = e.editor) == null ? void 0 : p.type) === "image" ? "none" : "visible"
|
|
1556
1553
|
},
|
|
1557
1554
|
binding: {
|
|
1558
1555
|
description: "绑定的表单字段",
|
|
@@ -1573,25 +1570,25 @@ class Ct extends yt {
|
|
|
1573
1570
|
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
|
|
1574
1571
|
}
|
|
1575
1572
|
},
|
|
1576
|
-
setPropertyRelates(
|
|
1577
|
-
if (
|
|
1578
|
-
switch (
|
|
1573
|
+
setPropertyRelates(c, s, m) {
|
|
1574
|
+
if (c)
|
|
1575
|
+
switch (c && c.propertyID) {
|
|
1579
1576
|
case "type": {
|
|
1580
|
-
o.changeControlType(e,
|
|
1577
|
+
o.changeControlType(e, c, n);
|
|
1581
1578
|
break;
|
|
1582
1579
|
}
|
|
1583
1580
|
case "label": {
|
|
1584
|
-
|
|
1581
|
+
c.needRefreshControlTree = !0;
|
|
1585
1582
|
break;
|
|
1586
1583
|
}
|
|
1587
1584
|
case "binding": {
|
|
1588
|
-
o.changeBindingField(e,
|
|
1585
|
+
o.changeBindingField(e, c, m);
|
|
1589
1586
|
break;
|
|
1590
1587
|
}
|
|
1591
1588
|
}
|
|
1592
1589
|
}
|
|
1593
1590
|
};
|
|
1594
|
-
return r.toLocaleLowerCase() !== "card" && delete
|
|
1591
|
+
return r.toLocaleLowerCase() !== "card" && delete d.properties.showLabelType, d;
|
|
1595
1592
|
}
|
|
1596
1593
|
/**
|
|
1597
1594
|
* 校验控件是否支持切换类型
|
|
@@ -1695,27 +1692,27 @@ class Ct extends yt {
|
|
|
1695
1692
|
const o = n.propertyValue, l = r && r.parent && r.parent.schema;
|
|
1696
1693
|
if (!l)
|
|
1697
1694
|
return;
|
|
1698
|
-
const g = l.contents.findIndex((
|
|
1695
|
+
const g = l.contents.findIndex((c) => c.id === e.id);
|
|
1699
1696
|
if (g === -1)
|
|
1700
1697
|
return;
|
|
1701
|
-
const
|
|
1702
|
-
let
|
|
1698
|
+
const d = l.contents[g];
|
|
1699
|
+
let p;
|
|
1703
1700
|
if (this.designViewModelField) {
|
|
1704
1701
|
const m = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((a) => a.id === this.designViewModelField.id).fieldSchema || {};
|
|
1705
|
-
m.editor || (m.editor = {}), m.editor.$type = o, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, m, !1),
|
|
1702
|
+
m.editor || (m.editor = {}), m.editor.$type = o, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, m, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o);
|
|
1706
1703
|
}
|
|
1707
|
-
|
|
1708
|
-
id:
|
|
1709
|
-
appearance:
|
|
1710
|
-
size:
|
|
1711
|
-
label:
|
|
1712
|
-
binding:
|
|
1713
|
-
}), Object.prototype.hasOwnProperty.call(
|
|
1714
|
-
Object.prototype.hasOwnProperty.call(
|
|
1715
|
-
}), r != null && r.updateContextSchema ? r.updateContextSchema(
|
|
1716
|
-
(
|
|
1704
|
+
p || (p = this.controlCreatorUtils.createFormGroupWithoutField(o)), Object.assign(p, {
|
|
1705
|
+
id: d.id,
|
|
1706
|
+
appearance: d.appearance,
|
|
1707
|
+
size: d.size,
|
|
1708
|
+
label: d.label,
|
|
1709
|
+
binding: d.binding
|
|
1710
|
+
}), Object.prototype.hasOwnProperty.call(d, "visible") && Object.assign(p, { visible: d.visible }), d.editor && ["readonly", "required", "placeholder"].map((c) => {
|
|
1711
|
+
Object.prototype.hasOwnProperty.call(d.editor, c) && (p.editor[c] = d.editor[c]);
|
|
1712
|
+
}), r != null && r.updateContextSchema ? r.updateContextSchema(p) : (r.schema = Object.assign(d, p), Object.assign(e, p)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1713
|
+
(c) => c.classList.remove("dgComponentSelected")
|
|
1717
1714
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
1718
|
-
(
|
|
1715
|
+
(c) => c.classList.remove("dgComponentFocused")
|
|
1719
1716
|
), G.value++, Fe(() => {
|
|
1720
1717
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
1721
1718
|
});
|
|
@@ -1728,17 +1725,17 @@ class Ct extends yt {
|
|
|
1728
1725
|
type: "input-group",
|
|
1729
1726
|
$converter: "/converter/property-editor.converter",
|
|
1730
1727
|
parentPropertyID: "editor"
|
|
1731
|
-
}, n), g = (m = e.binding) != null && m.field ? [] : ["Const", "Variable", "StateMachine"],
|
|
1728
|
+
}, n), g = (m = e.binding) != null && m.field ? [] : ["Const", "Variable", "StateMachine"], d = this.getPropertyEditorParams(e, g, "readonly"), p = this.getPropertyEditorParams(e, g, "required"), c = {
|
|
1732
1729
|
readonly: {
|
|
1733
1730
|
description: "",
|
|
1734
1731
|
title: "只读",
|
|
1735
|
-
editor:
|
|
1732
|
+
editor: d
|
|
1736
1733
|
},
|
|
1737
1734
|
required: {
|
|
1738
1735
|
description: "",
|
|
1739
1736
|
title: "必填",
|
|
1740
1737
|
type: "boolean",
|
|
1741
|
-
editor:
|
|
1738
|
+
editor: p,
|
|
1742
1739
|
visible: !!((h = e.binding) != null && h.field)
|
|
1743
1740
|
},
|
|
1744
1741
|
placeholder: {
|
|
@@ -1748,12 +1745,12 @@ class Ct extends yt {
|
|
|
1748
1745
|
}
|
|
1749
1746
|
};
|
|
1750
1747
|
for (const a in r)
|
|
1751
|
-
|
|
1748
|
+
c[a] = Object.assign(c[a] || {}, r[a]);
|
|
1752
1749
|
const s = this;
|
|
1753
1750
|
return {
|
|
1754
1751
|
...l,
|
|
1755
|
-
properties: { ...
|
|
1756
|
-
setPropertyRelates(a,
|
|
1752
|
+
properties: { ...c },
|
|
1753
|
+
setPropertyRelates(a, u) {
|
|
1757
1754
|
if (a) {
|
|
1758
1755
|
switch (a.propertyID) {
|
|
1759
1756
|
case "readonly":
|
|
@@ -1761,7 +1758,7 @@ class Ct extends yt {
|
|
|
1761
1758
|
s.afterMutilEditorChanged(e, a);
|
|
1762
1759
|
break;
|
|
1763
1760
|
}
|
|
1764
|
-
o && o.bind(s)(a, e,
|
|
1761
|
+
o && o.bind(s)(a, e, u);
|
|
1765
1762
|
}
|
|
1766
1763
|
}
|
|
1767
1764
|
};
|
|
@@ -1774,16 +1771,16 @@ class Ct extends yt {
|
|
|
1774
1771
|
*/
|
|
1775
1772
|
updateUnifiedLayoutAfterControlChanged(e, n, r) {
|
|
1776
1773
|
const o = e.split(" ");
|
|
1777
|
-
let l = o.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), g = o.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)),
|
|
1778
|
-
l = l || "col-12", g = g || "col-md-" + l.replace("col-", ""),
|
|
1779
|
-
const
|
|
1774
|
+
let l = o.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), g = o.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), d = o.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), p = o.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
1775
|
+
l = l || "col-12", g = g || "col-md-" + l.replace("col-", ""), d = d || "col-xl-" + g.replace("col-md-", ""), p = p || "col-el-" + d.replace("col-xl-", "");
|
|
1776
|
+
const c = {
|
|
1780
1777
|
id: n,
|
|
1781
1778
|
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
1782
1779
|
columnInMD: parseInt(g.replace("col-md-", ""), 10),
|
|
1783
|
-
columnInLG: parseInt(
|
|
1784
|
-
columnInEL: parseInt(
|
|
1780
|
+
columnInLG: parseInt(d.replace("col-xl-", ""), 10),
|
|
1781
|
+
columnInEL: parseInt(p.replace("col-el-", ""), 10)
|
|
1785
1782
|
};
|
|
1786
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(r,
|
|
1783
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, c);
|
|
1787
1784
|
}
|
|
1788
1785
|
/**
|
|
1789
1786
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1796,12 +1793,12 @@ class Ct extends yt {
|
|
|
1796
1793
|
return;
|
|
1797
1794
|
const o = [];
|
|
1798
1795
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, o, 1), n) {
|
|
1799
|
-
const a = o.find((
|
|
1796
|
+
const a = o.find((u) => u.id === n.id);
|
|
1800
1797
|
Object.assign(a || {}, n);
|
|
1801
1798
|
}
|
|
1802
|
-
const l = o.map((a) => a.columnInSM), g = o.map((a) => a.columnInMD),
|
|
1799
|
+
const l = o.map((a) => a.columnInSM), g = o.map((a) => a.columnInMD), d = o.map((a) => a.columnInLG), p = o.map((a) => a.columnInEL), c = this.checkIsUniqueColumn(l) ? l[0] : null, s = this.checkIsUniqueColumn(g) ? g[0] : null, m = this.checkIsUniqueColumn(d) ? d[0] : null, h = this.checkIsUniqueColumn(p) ? p[0] : null;
|
|
1803
1800
|
Object.assign(r.unifiedLayout, {
|
|
1804
|
-
uniqueColClassInSM:
|
|
1801
|
+
uniqueColClassInSM: c,
|
|
1805
1802
|
uniqueColClassInMD: s,
|
|
1806
1803
|
uniqueColClassInLG: m,
|
|
1807
1804
|
uniqueColClassInEL: h
|
|
@@ -1875,12 +1872,21 @@ class Ct extends yt {
|
|
|
1875
1872
|
getEventPropertyConfig(e, n = "card", r, o) {
|
|
1876
1873
|
const l = this;
|
|
1877
1874
|
let g = [];
|
|
1878
|
-
r && (g = g.concat(r)),
|
|
1879
|
-
|
|
1875
|
+
if (r && (g = g.concat(r)), g.length === 0)
|
|
1876
|
+
return {
|
|
1877
|
+
title: "事件",
|
|
1878
|
+
hideTitle: !0,
|
|
1879
|
+
properties: {},
|
|
1880
|
+
tabId: "commands",
|
|
1881
|
+
tabName: "交互",
|
|
1882
|
+
hide: !0
|
|
1883
|
+
};
|
|
1884
|
+
this.appendFieldValueChangeEvents(e, g);
|
|
1885
|
+
const d = l.eventsEditorUtils.formProperties(e, l.viewModelId, g);
|
|
1880
1886
|
return {
|
|
1881
1887
|
title: "事件",
|
|
1882
1888
|
hideTitle: !0,
|
|
1883
|
-
properties: l.createBaseEventProperty(
|
|
1889
|
+
properties: l.createBaseEventProperty(d),
|
|
1884
1890
|
tabId: "commands",
|
|
1885
1891
|
tabName: "交互",
|
|
1886
1892
|
setPropertyRelates(s, m) {
|
|
@@ -1947,11 +1953,6 @@ class At extends Ct {
|
|
|
1947
1953
|
title: "服务器根目录",
|
|
1948
1954
|
type: "string"
|
|
1949
1955
|
},
|
|
1950
|
-
src: {
|
|
1951
|
-
description: "设置图片地址",
|
|
1952
|
-
title: "图片地址",
|
|
1953
|
-
type: "string"
|
|
1954
|
-
},
|
|
1955
1956
|
width: {
|
|
1956
1957
|
description: "",
|
|
1957
1958
|
title: "图像宽度",
|
|
@@ -1974,13 +1975,18 @@ class At extends Ct {
|
|
|
1974
1975
|
needValid: !0
|
|
1975
1976
|
}
|
|
1976
1977
|
},
|
|
1978
|
+
src: {
|
|
1979
|
+
description: "设置图片初始地址,可以是绝对路径或者是图片base64转码后的字符串。比如/platform/xxx/xxx.png或者是data:image/png;base64,xxx。",
|
|
1980
|
+
title: "图片地址",
|
|
1981
|
+
type: "string"
|
|
1982
|
+
},
|
|
1977
1983
|
errorSrc: {
|
|
1978
|
-
description: "
|
|
1979
|
-
title: "
|
|
1984
|
+
description: "加载图像错误的替代图片,可以是绝对路径或者是图片base64转码后的字符串。比如/platform/xxx/xxx.png或者是data:image/png;base64,xxx。",
|
|
1985
|
+
title: "加载图像错误的替代图片地址",
|
|
1980
1986
|
type: "string"
|
|
1981
1987
|
},
|
|
1982
1988
|
alt: {
|
|
1983
|
-
description: "
|
|
1989
|
+
description: "图像最终错误图片未能正确显示时,会显示设置的替代文本。",
|
|
1984
1990
|
title: "替代文本",
|
|
1985
1991
|
type: "string"
|
|
1986
1992
|
},
|
|
@@ -2007,24 +2013,24 @@ const Et = /* @__PURE__ */ _({
|
|
|
2007
2013
|
props: gt,
|
|
2008
2014
|
emits: ["change", "update:modelValue"],
|
|
2009
2015
|
setup(i, t) {
|
|
2010
|
-
const e = U(), n = X("designer-host-service"), r = X("design-item-context"), o = Ft(r, n), l =
|
|
2016
|
+
const e = U(), n = X("designer-host-service"), r = X("design-item-context"), o = Ft(r, n), l = Se(e, r, o);
|
|
2011
2017
|
Ee(() => {
|
|
2012
2018
|
e.value.componentInstance = l;
|
|
2013
2019
|
}), t.expose(l.value);
|
|
2014
2020
|
const g = L(() => ee({
|
|
2015
2021
|
"f-imgcontainer-in-form": !0
|
|
2016
|
-
}, i.customClass)),
|
|
2017
|
-
const
|
|
2018
|
-
return i.width && i.width > 0 && (
|
|
2019
|
-
}),
|
|
2022
|
+
}, i.customClass)), d = L(() => {
|
|
2023
|
+
const c = {};
|
|
2024
|
+
return i.width && i.width > 0 && (c.width = i.width + "px"), i.height && i.height > 0 ? c.height = i.height + "px" : c.height = "100px", c;
|
|
2025
|
+
}), p = "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/x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1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OkhlaWdodAA1MTKPjVOBAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADUxMhx8A9wAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTU0Njk3NjYwMobft/wAAAASdEVYdFRodW1iOjpTaXplADI1ODIxQl184icAAABadEVYdFRodW1iOjpVUkkAZmlsZTovLy9kYXRhL3d3d3Jvb3Qvd3d3LmVhc3lpY29uLm5ldC9jZG4taW1nLmVhc3lpY29uLmNuL2ZpbGVzLzExOC8xMTgzNzA3LnBuZ2fPs9sAAAAASUVORK5CYII=";
|
|
2020
2026
|
return () => Y("div", {
|
|
2021
2027
|
class: g.value,
|
|
2022
2028
|
ref: e
|
|
2023
2029
|
}, [Y("img", {
|
|
2024
2030
|
alt: i.alt,
|
|
2025
2031
|
title: i.title,
|
|
2026
|
-
style:
|
|
2027
|
-
src:
|
|
2032
|
+
style: d.value,
|
|
2033
|
+
src: p
|
|
2028
2034
|
}, null)]);
|
|
2029
2035
|
}
|
|
2030
2036
|
});
|
|
@@ -2034,7 +2040,7 @@ q.register = (i, t, e, n) => {
|
|
|
2034
2040
|
q.registerDesigner = (i, t, e) => {
|
|
2035
2041
|
i.image = Et, t.image = ue;
|
|
2036
2042
|
};
|
|
2037
|
-
const Tt =
|
|
2043
|
+
const Tt = xe(q);
|
|
2038
2044
|
export {
|
|
2039
2045
|
q as FImage,
|
|
2040
2046
|
Tt as default,
|