@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
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 +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var A = (i, t, e) =>
|
|
4
|
-
import { ref as B, computed as R, defineComponent as
|
|
5
|
-
import { isPlainObject as K, cloneDeep as
|
|
6
|
-
import { resolveAppearance as
|
|
7
|
-
import { getCustomClass as
|
|
8
|
-
import { DgControl as f, canvasChanged as j, refreshCanvas as
|
|
9
|
-
function
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var Fe = (i, t, e) => t in i ? Ae(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var A = (i, t, e) => Fe(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ref as B, computed as R, defineComponent as te, watch as X, createVNode as Y, nextTick as we, inject as $, onMounted as Ee } from "vue";
|
|
5
|
+
import { isPlainObject as K, cloneDeep as Z } from "lodash-es";
|
|
6
|
+
import { resolveAppearance as xe } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
import { getCustomClass as ie, FormSchemaEntityField$Type as _, FormSchemaEntityFieldType$Type as Se, withInstall as Ie } from "../common/index.esm.js";
|
|
8
|
+
import { DgControl as f, canvasChanged as j, refreshCanvas as Me, useDesignerComponent as Pe } from "../designer-canvas/index.esm.js";
|
|
9
|
+
function ne(i, t) {
|
|
10
10
|
let e;
|
|
11
11
|
function n(o) {
|
|
12
|
-
const { properties: m, title: h, ignore: a } = o,
|
|
13
|
-
if (h && (!
|
|
12
|
+
const { properties: m, title: h, ignore: a } = o, u = a && Array.isArray(a), y = Object.keys(m).reduce((v, b) => ((!u || !a.find((E) => E === b)) && (v[b] = m[b].type === "object" && m[b].properties ? n(m[b]) : Z(m[b].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 ie(i, t) {
|
|
|
19
19
|
function r(o) {
|
|
20
20
|
const { properties: m, title: h, required: a } = o;
|
|
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,124 +33,124 @@ function ie(i, t) {
|
|
|
33
33
|
function s(o, m = {}, h) {
|
|
34
34
|
const a = i[o];
|
|
35
35
|
if (a) {
|
|
36
|
-
let
|
|
36
|
+
let u = r(a);
|
|
37
37
|
const y = t[o];
|
|
38
|
-
return
|
|
38
|
+
return u = y ? y({ getSchemaByType: s }, u, m, h) : u, e != null && e.appendIdentifyForNewControl && e.appendIdentifyForNewControl(u), u;
|
|
39
39
|
}
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
function l(o, 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(o, u) && (a[u] && K(a[u]) && K(o[u] || !o[u]) ? Object.assign(a[u], o[u] || {}) : a[u] = o[u]), a), h), h;
|
|
45
45
|
}
|
|
46
46
|
function g(o, m) {
|
|
47
|
-
return Object.keys(o).filter((a) => o[a] != null).reduce((a,
|
|
48
|
-
if (m.has(
|
|
49
|
-
const y = m.get(
|
|
47
|
+
return Object.keys(o).filter((a) => o[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] = o[
|
|
51
|
+
a[y] = o[u];
|
|
52
52
|
else {
|
|
53
|
-
const v = y(
|
|
53
|
+
const v = y(u, o[u], o);
|
|
54
54
|
Object.assign(a, v);
|
|
55
55
|
}
|
|
56
56
|
} else
|
|
57
|
-
a[
|
|
57
|
+
a[u] = o[u];
|
|
58
58
|
return a;
|
|
59
59
|
}, {});
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function c(o, m, h = /* @__PURE__ */ new Map()) {
|
|
62
62
|
const a = l(o, m);
|
|
63
63
|
return g(a, h);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function p(o) {
|
|
66
66
|
var h;
|
|
67
67
|
const m = o.type;
|
|
68
68
|
if (m) {
|
|
69
69
|
const a = i[m];
|
|
70
70
|
if (!a)
|
|
71
71
|
return o;
|
|
72
|
-
const
|
|
72
|
+
const u = l(o, a), y = ((h = o.editor) == null ? void 0 : h.type) || "";
|
|
73
73
|
if (y) {
|
|
74
74
|
const v = i[y], b = l(o.editor, v);
|
|
75
|
-
|
|
75
|
+
u.editor = b;
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return u;
|
|
78
78
|
}
|
|
79
79
|
return o;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function d(o) {
|
|
82
82
|
e = o;
|
|
83
83
|
}
|
|
84
|
-
return { getSchemaByType: s, resolveSchemaWithDefaultValue:
|
|
84
|
+
return { getSchemaByType: s, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: c, mappingSchemaToProps: g, setDesignerContext: d };
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
88
|
-
function t(
|
|
86
|
+
const re = {}, oe = {}, { resolveSchemaWithDefaultValue: Te, resolveSchemaToProps: ke, mappingSchemaToProps: Ve } = ne(re, oe);
|
|
87
|
+
function Oe(i = {}) {
|
|
88
|
+
function t(p, d, o, m) {
|
|
89
89
|
if (typeof o == "number")
|
|
90
|
-
return m[
|
|
90
|
+
return m[p].length === o;
|
|
91
91
|
if (typeof o == "object") {
|
|
92
92
|
const h = Object.keys(o)[0], a = o[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, d, o, m) {
|
|
103
|
+
return m[p] && m[p].propertyValue && String(m[p].propertyValue.value) === String(o);
|
|
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 o =
|
|
112
|
-
return typeof
|
|
109
|
+
Object.keys(i).reduce((p, d) => (p.set(d, i[d]), p), n);
|
|
110
|
+
function r(p, d) {
|
|
111
|
+
const o = p;
|
|
112
|
+
return typeof d == "number" ? [{ target: o, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: o, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
|
|
113
113
|
if (m === "length")
|
|
114
|
-
return { target: o, operator: "length", param: null, value:
|
|
115
|
-
const h = m, a =
|
|
114
|
+
return { target: o, operator: "length", param: null, value: d[m] };
|
|
115
|
+
const h = m, a = d[m];
|
|
116
116
|
return { target: o, operator: "getProperty", param: h, value: a };
|
|
117
117
|
}) : [];
|
|
118
118
|
}
|
|
119
|
-
function s(
|
|
120
|
-
return Object.keys(
|
|
121
|
-
const h = r(m,
|
|
119
|
+
function s(p) {
|
|
120
|
+
return Object.keys(p).reduce((o, m) => {
|
|
121
|
+
const h = r(m, p[m]);
|
|
122
122
|
return o.push(...h), o;
|
|
123
123
|
}, []);
|
|
124
124
|
}
|
|
125
|
-
function l(
|
|
126
|
-
if (n.has(
|
|
127
|
-
const o = n.get(
|
|
128
|
-
return o && o(
|
|
125
|
+
function l(p, d) {
|
|
126
|
+
if (n.has(p.operator)) {
|
|
127
|
+
const o = n.get(p.operator);
|
|
128
|
+
return o && o(p.target, p.param, p.value, d) || !1;
|
|
129
129
|
}
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
|
-
function g(
|
|
133
|
-
return s(
|
|
132
|
+
function g(p, d) {
|
|
133
|
+
return s(p).reduce((h, a) => h && l(a, d), !0);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const o = Object.keys(
|
|
135
|
+
function c(p, d) {
|
|
136
|
+
const o = Object.keys(p), m = o.includes("allOf"), h = o.includes("anyOf"), a = m || h, v = (a ? p[a ? m ? "allOf" : "anyOf" : "allOf"] : [p]).map((E) => g(E, d));
|
|
137
137
|
return m ? !v.includes(!1) : v.includes(!0);
|
|
138
138
|
}
|
|
139
|
-
return { parseValueSchema:
|
|
139
|
+
return { parseValueSchema: c };
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const Be = {
|
|
142
142
|
convertTo: (i, t, e, n) => {
|
|
143
143
|
i.appearance || (i.appearance = {}), i.appearance[t] = e;
|
|
144
144
|
},
|
|
145
145
|
convertFrom: (i, t, e) => i.appearance ? i.appearance[t] : i[t]
|
|
146
|
-
}, Be = {
|
|
147
|
-
convertFrom: (i, t, e) => i.buttons && i.buttons.length ? `共 ${i.buttons.length} 项` : "无"
|
|
148
146
|
}, Ne = {
|
|
147
|
+
convertFrom: (i, t, e) => i.buttons && i.buttons.length ? `共 ${i.buttons.length} 项` : "无"
|
|
148
|
+
}, Le = {
|
|
149
149
|
convertTo: (i, t, e, n) => {
|
|
150
150
|
i.editor && (i.editor[t] = e);
|
|
151
151
|
},
|
|
152
152
|
convertFrom: (i, t, e) => i.editor && Object.prototype.hasOwnProperty.call(i.editor, t) ? i.editor[t] : i[t]
|
|
153
|
-
},
|
|
153
|
+
}, Re = {
|
|
154
154
|
button: { type: "button", name: "按钮" },
|
|
155
155
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
156
156
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -204,19 +204,24 @@ const Oe = {
|
|
|
204
204
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
205
205
|
comment: { type: "comment", name: "评论区" },
|
|
206
206
|
"rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
|
|
207
|
-
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
208
|
-
|
|
207
|
+
calendar: { type: "calendar", name: "日历", icon: "date-picker" },
|
|
208
|
+
wizard: { type: "wizard", name: "向导", icon: "wizard" },
|
|
209
|
+
"wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" },
|
|
210
|
+
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" },
|
|
211
|
+
step: { type: "step", name: "步骤条", icon: "step" },
|
|
212
|
+
"dynamic-form": { type: "dynamic-form", name: "动态表单" }
|
|
213
|
+
}, Ge = {
|
|
209
214
|
convertFrom: (i, t, e) => {
|
|
210
215
|
var r;
|
|
211
216
|
const n = i.editor && i.editor[t] ? i.editor[t] : i[t];
|
|
212
|
-
return ((r =
|
|
217
|
+
return ((r = Re[n]) == null ? void 0 : r.name) || n;
|
|
213
218
|
}
|
|
214
|
-
},
|
|
219
|
+
}, je = {
|
|
215
220
|
convertTo: (i, t, e, n) => {
|
|
216
221
|
i[t] = i[t];
|
|
217
222
|
},
|
|
218
223
|
convertFrom: (i, t, e) => i.editor ? e.getRealEditorType(i.editor.type) : ""
|
|
219
|
-
},
|
|
224
|
+
}, Ue = {
|
|
220
225
|
convertTo: (i, t, e, n) => {
|
|
221
226
|
(i.type === "data-grid-column" || i.type === "tree-grid-column") && (i.formatter ? i.formatter[t] = e : i.formatter = {
|
|
222
227
|
[t]: e
|
|
@@ -244,10 +249,12 @@ const Oe = {
|
|
|
244
249
|
return i.formatter.customFormat;
|
|
245
250
|
if (t === "type")
|
|
246
251
|
return i.formatter.type || "none";
|
|
252
|
+
if (t === "customFormat")
|
|
253
|
+
return i.formmater.customFormat;
|
|
247
254
|
}
|
|
248
255
|
return "none";
|
|
249
256
|
}
|
|
250
|
-
},
|
|
257
|
+
}, Ye = {
|
|
251
258
|
convertTo: (i, t, e, n) => {
|
|
252
259
|
i.command ? i.command[t] = e : i.command = {
|
|
253
260
|
[t]: e
|
|
@@ -265,29 +272,17 @@ const Oe = {
|
|
|
265
272
|
]), t === "enableType" && e === "custom" && (i.command.enable = !0, i.command.commands = [
|
|
266
273
|
{
|
|
267
274
|
value: "add",
|
|
268
|
-
text:
|
|
269
|
-
en: "add",
|
|
270
|
-
"zh-CHS": "增加",
|
|
271
|
-
"zh-CHT": "增加"
|
|
272
|
-
},
|
|
275
|
+
text: "增加",
|
|
273
276
|
type: "link"
|
|
274
277
|
},
|
|
275
278
|
{
|
|
276
279
|
value: "edit",
|
|
277
|
-
text:
|
|
278
|
-
en: "edit",
|
|
279
|
-
"zh-CHS": "编辑",
|
|
280
|
-
"zh-CHT": "編輯"
|
|
281
|
-
},
|
|
280
|
+
text: "编辑",
|
|
282
281
|
type: "danger"
|
|
283
282
|
},
|
|
284
283
|
{
|
|
285
284
|
value: "remove",
|
|
286
|
-
text:
|
|
287
|
-
en: "remove",
|
|
288
|
-
"zh-CHS": "删除",
|
|
289
|
-
"zh-CHT": "刪除"
|
|
290
|
-
},
|
|
285
|
+
text: "删除",
|
|
291
286
|
type: "remove"
|
|
292
287
|
}
|
|
293
288
|
]), t === "enableType" && e === "unable" && (i.command.enable = !1);
|
|
@@ -305,10 +300,12 @@ const Oe = {
|
|
|
305
300
|
return i.command.formatter;
|
|
306
301
|
if (t === "count")
|
|
307
302
|
return i.command.count;
|
|
303
|
+
if (t === "columnWidth")
|
|
304
|
+
return i.command.columnWidth || 150;
|
|
308
305
|
}
|
|
309
306
|
return "";
|
|
310
307
|
}
|
|
311
|
-
},
|
|
308
|
+
}, ze = {
|
|
312
309
|
convertTo: (i, t, e, n) => {
|
|
313
310
|
i.column ? i.column[t] = e : i.column = {
|
|
314
311
|
[t]: e
|
|
@@ -332,7 +329,10 @@ const Oe = {
|
|
|
332
329
|
groupFields: []
|
|
333
330
|
});
|
|
334
331
|
},
|
|
335
|
-
convertFrom: (i, t, e) =>
|
|
332
|
+
convertFrom: (i, t, e) => {
|
|
333
|
+
var n;
|
|
334
|
+
return t === "customSummaryStyle" ? i.summary.customSummaryStyle : t === "position" ? ((n = i.summary) == null ? void 0 : n[t]) || "bottom" : i.summary && t === "enable" ? i.summary.enable : i.type === "data-grid-column" ? i.enableSummary === void 0 ? !1 : i.enableSummary : "";
|
|
335
|
+
}
|
|
336
336
|
}, We = {
|
|
337
337
|
convertTo: (i, t, e, n) => {
|
|
338
338
|
i.group ? i.group[t] = e : i.group = {
|
|
@@ -359,12 +359,12 @@ const Oe = {
|
|
|
359
359
|
i.binding || (i.binding = {}), i.binding.type = "Form", i.binding.path = n.bindingField, i.binding.field = n.id, i.binding.fullPath = n.path, i.path = n.bindingPath;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
},
|
|
362
|
+
}, Je = {
|
|
363
363
|
convertTo: (i, t, e, n) => {
|
|
364
|
-
i.pagination || (i.pagination = {}), i.pagination[t] = e;
|
|
364
|
+
i.pagination || (i.pagination = {}), t === "sizeLimits" ? i.pagination.sizeLimits = e.split(",") : i.pagination[t] = e;
|
|
365
365
|
},
|
|
366
|
-
convertFrom: (i, t, e) => i.pagination ? i.pagination[t] : i[t]
|
|
367
|
-
},
|
|
366
|
+
convertFrom: (i, t, e) => i.pagination ? t === "sizeLimits" ? i.pagination.sizeLimits.join(",") : i.pagination[t] : i[t]
|
|
367
|
+
}, Ze = {
|
|
368
368
|
convertTo: (i, t, e, n) => {
|
|
369
369
|
i.rowNumber || (i.rowNumber = {}), i.rowNumber[t] = e;
|
|
370
370
|
},
|
|
@@ -377,24 +377,24 @@ const Oe = {
|
|
|
377
377
|
var n, r;
|
|
378
378
|
return t === "showCheckbox" ? (n = i.selection) != null && n.multiSelect ? !0 : (r = i.selection) == null ? void 0 : r.showCheckbox : i.selection ? i.selection[t] : i[t];
|
|
379
379
|
}
|
|
380
|
-
}, Ze = {
|
|
381
|
-
convertFrom: (i, t, e) => i[t] && i[t].length ? `共 ${i[t].length} 项` : ""
|
|
382
380
|
}, Qe = {
|
|
381
|
+
convertFrom: (i, t, e) => i[t] && i[t].length ? `共 ${i[t].length} 项` : ""
|
|
382
|
+
}, Xe = {
|
|
383
383
|
convertFrom: (i, t) => i[t] || "",
|
|
384
384
|
convertTo: (i, t, e) => {
|
|
385
385
|
i[t] = e;
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, $e = {
|
|
388
388
|
convertTo: (i, t, e, n) => {
|
|
389
389
|
i.size || (i.size = {}), i.size[t] = e;
|
|
390
390
|
},
|
|
391
391
|
convertFrom: (i, t, e) => i.size ? i.size[t] : i[t]
|
|
392
|
-
},
|
|
392
|
+
}, Ke = {
|
|
393
393
|
convertFrom: (i, t, e) => {
|
|
394
394
|
var n, r;
|
|
395
395
|
return (n = i.formatter) != null && n.data && t === "formatterEnumData" && !i.formatterEnumData ? (r = i.formatter) == null ? void 0 : r.data : i.formatterEnumData;
|
|
396
396
|
}
|
|
397
|
-
},
|
|
397
|
+
}, _e = {
|
|
398
398
|
convertTo: (i, t, e, n) => {
|
|
399
399
|
i.sort || (i.sort = {}), i.sort[t] = e;
|
|
400
400
|
},
|
|
@@ -405,7 +405,7 @@ const Oe = {
|
|
|
405
405
|
if (t === "multiSort")
|
|
406
406
|
return !!((r = i.sort) != null && r.multiSort);
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, et = {
|
|
409
409
|
convertTo: (i, t, e, n) => {
|
|
410
410
|
i.filter || (i.filter = {}), i.filter[t] = e;
|
|
411
411
|
},
|
|
@@ -414,7 +414,7 @@ const Oe = {
|
|
|
414
414
|
if (t === "mode")
|
|
415
415
|
return ((n = i.filter) == null ? void 0 : n.mode) || "client";
|
|
416
416
|
}
|
|
417
|
-
},
|
|
417
|
+
}, tt = {
|
|
418
418
|
convertTo: (i, t, e, n) => {
|
|
419
419
|
i.rowOption ? i.rowOption[t] = e : i.rowOption = {
|
|
420
420
|
[t]: e
|
|
@@ -426,10 +426,12 @@ const Oe = {
|
|
|
426
426
|
return i.rowOption.customRowStyle;
|
|
427
427
|
if (t === "customCellStyle")
|
|
428
428
|
return i.rowOption.customCellStyle;
|
|
429
|
+
if (t === "height")
|
|
430
|
+
return i.rowOption.height;
|
|
429
431
|
}
|
|
430
432
|
return "";
|
|
431
433
|
}
|
|
432
|
-
},
|
|
434
|
+
}, it = {
|
|
433
435
|
convertTo: (i, t, e, n) => {
|
|
434
436
|
(i.type === "data-grid-column" || i.type === "tree-grid-column") && (i[t] = e, t === "columnTemplateType" && e === "hyperlink" && (i.onClickLinkCommand ? i.columnTemplate = `
|
|
435
437
|
<span class="f-pretend-link f-cursor-pointer"
|
|
@@ -442,30 +444,30 @@ const Oe = {
|
|
|
442
444
|
},
|
|
443
445
|
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" : ""
|
|
444
446
|
};
|
|
445
|
-
function
|
|
447
|
+
function se(i, t, e) {
|
|
446
448
|
const n = /* @__PURE__ */ new Map([
|
|
447
|
-
["/converter/appearance.converter",
|
|
448
|
-
["/converter/buttons.converter",
|
|
449
|
-
["/converter/property-editor.converter",
|
|
450
|
-
["/converter/items-count.converter",
|
|
451
|
-
["/converter/type.converter",
|
|
452
|
-
["/converter/change-editor.converter",
|
|
453
|
-
["/converter/change-formatter.converter",
|
|
454
|
-
["/converter/column-command.converter",
|
|
455
|
-
["/converter/column-option.converter",
|
|
449
|
+
["/converter/appearance.converter", Be],
|
|
450
|
+
["/converter/buttons.converter", Ne],
|
|
451
|
+
["/converter/property-editor.converter", Le],
|
|
452
|
+
["/converter/items-count.converter", Qe],
|
|
453
|
+
["/converter/type.converter", Ge],
|
|
454
|
+
["/converter/change-editor.converter", je],
|
|
455
|
+
["/converter/change-formatter.converter", Ue],
|
|
456
|
+
["/converter/column-command.converter", Ye],
|
|
457
|
+
["/converter/column-option.converter", ze],
|
|
456
458
|
["/converter/summary.converter", qe],
|
|
457
459
|
["/converter/group.converter", We],
|
|
458
|
-
["/converter/form-group-label.converter",
|
|
460
|
+
["/converter/form-group-label.converter", Xe],
|
|
459
461
|
["/converter/field-selector.converter", He],
|
|
460
|
-
["/converter/pagination.converter",
|
|
461
|
-
["/converter/row-number.converter",
|
|
462
|
+
["/converter/pagination.converter", Je],
|
|
463
|
+
["/converter/row-number.converter", Ze],
|
|
462
464
|
["/converter/grid-selection.converter", De],
|
|
463
|
-
["/converter/size.converter",
|
|
464
|
-
["/converter/change-formatter-enum.converter",
|
|
465
|
-
["/converter/grid-sort.converter",
|
|
466
|
-
["/converter/grid-filter.converter",
|
|
467
|
-
["/converter/row-option.converter",
|
|
468
|
-
["/converter/change-formatter-type.converter",
|
|
465
|
+
["/converter/size.converter", $e],
|
|
466
|
+
["/converter/change-formatter-enum.converter", Ke],
|
|
467
|
+
["/converter/grid-sort.converter", _e],
|
|
468
|
+
["/converter/grid-filter.converter", et],
|
|
469
|
+
["/converter/row-option.converter", tt],
|
|
470
|
+
["/converter/change-formatter-type.converter", it]
|
|
469
471
|
]), r = /* @__PURE__ */ new Map([
|
|
470
472
|
["string", { type: "input-group", enableClear: !1 }],
|
|
471
473
|
["boolean", {
|
|
@@ -490,76 +492,76 @@ function oe(i, t, e) {
|
|
|
490
492
|
["array", { type: "button-edit" }],
|
|
491
493
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
492
494
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
493
|
-
]), s =
|
|
494
|
-
function l(a,
|
|
495
|
-
return () => s.parseValueSchema(a,
|
|
495
|
+
]), s = Oe();
|
|
496
|
+
function l(a, u) {
|
|
497
|
+
return () => s.parseValueSchema(a, u);
|
|
496
498
|
}
|
|
497
|
-
function g(a,
|
|
498
|
-
return a.includes("visible") &&
|
|
499
|
+
function g(a, u, y) {
|
|
500
|
+
return a.includes("visible") && u.visible !== void 0 ? typeof u.visible == "boolean" ? () => !!u.visible : u.visible === void 0 ? !0 : l(u.visible, y) : () => !0;
|
|
499
501
|
}
|
|
500
|
-
function
|
|
501
|
-
return a.includes("readonly") &&
|
|
502
|
+
function c(a, u, y) {
|
|
503
|
+
return a.includes("readonly") && u.readonly !== void 0 ? typeof u.readonly == "boolean" ? () => !!u.readonly : l(u.readonly, y) : () => !1;
|
|
502
504
|
}
|
|
503
|
-
function
|
|
504
|
-
const y = a.$converter ||
|
|
505
|
+
function p(a, u) {
|
|
506
|
+
const y = a.$converter || u;
|
|
505
507
|
return typeof y == "string" && y && n.has(y) ? n.get(y) || null : y || null;
|
|
506
508
|
}
|
|
507
|
-
function
|
|
508
|
-
return Object.keys(a).map((
|
|
509
|
-
const M = B(1),
|
|
509
|
+
function d(a, u, y, v, b, E = "", S = "") {
|
|
510
|
+
return Object.keys(a).map((w) => {
|
|
511
|
+
const M = B(1), I = w, F = a[w], C = Object.keys(F), L = F.title, V = F.type, O = r.get(V) || { type: "input-group", enableClear: !1 }, k = F.editor ? Object.assign({}, O, F.editor) : Object.assign({}, O), W = g(C, F, u), G = c(C, F, u);
|
|
510
512
|
k.readonly = k.readonly === void 0 ? G() : k.readonly;
|
|
511
|
-
const
|
|
512
|
-
let P =
|
|
513
|
-
const
|
|
513
|
+
const H = F.type === "cascade" ? d(F.properties, u, y, v, b, E, S) : [], J = !0;
|
|
514
|
+
let P = p(F, S);
|
|
515
|
+
const ge = R({
|
|
514
516
|
get() {
|
|
515
517
|
if (M.value) {
|
|
516
|
-
if (["class", "style"].find((
|
|
517
|
-
return P.convertFrom(y,
|
|
518
|
-
const T = y[
|
|
518
|
+
if (["class", "style"].find((Ce) => Ce === I) && !P && (P = n.get("/converter/appearance.converter") || null), P && P.convertFrom)
|
|
519
|
+
return P.convertFrom(y, w, b, E);
|
|
520
|
+
const T = y[w];
|
|
519
521
|
return Object.prototype.hasOwnProperty.call(F, "defaultValue") && (T === void 0 || typeof T == "string" && T === "") ? F.type === "boolean" ? F.defaultValue : F.defaultValue || "" : T;
|
|
520
522
|
}
|
|
521
523
|
return null;
|
|
522
524
|
},
|
|
523
525
|
set(T) {
|
|
524
|
-
M.value += 1, P && P.convertTo ? (P.convertTo(v,
|
|
526
|
+
M.value += 1, P && P.convertTo ? (P.convertTo(v, w, T, b, E), P.convertTo(y, w, T, b, E)) : (v[w] = T, y[w] = T);
|
|
525
527
|
}
|
|
526
|
-
}), { refreshPanelAfterChanged:
|
|
527
|
-
return
|
|
528
|
+
}), { refreshPanelAfterChanged: he, description: ye, isExpand: ve, parentPropertyID: be } = F, Q = { propertyID: I, propertyName: L, propertyType: V, propertyValue: ge, editor: k, visible: W, readonly: G, cascadeConfig: H, hideCascadeTitle: J, refreshPanelAfterChanged: he, description: ye, isExpand: ve, parentPropertyID: be };
|
|
529
|
+
return u[I] = Q, Q;
|
|
528
530
|
});
|
|
529
531
|
}
|
|
530
|
-
function o(a,
|
|
532
|
+
function o(a, u, y = {}) {
|
|
531
533
|
const v = {}, b = i[a];
|
|
532
|
-
return b && b.categories ? Object.keys(b.categories).map((
|
|
533
|
-
const x = b.categories[
|
|
534
|
-
return { categoryId:
|
|
534
|
+
return b && b.categories ? Object.keys(b.categories).map((S) => {
|
|
535
|
+
const x = b.categories[S], w = x == null ? void 0 : x.title, M = d(x.properties || {}, v, {}, y, u);
|
|
536
|
+
return { categoryId: S, categoryName: w, properties: M };
|
|
535
537
|
}) : [];
|
|
536
538
|
}
|
|
537
|
-
function m(a,
|
|
538
|
-
const
|
|
539
|
+
function m(a, u, y, v, b = "") {
|
|
540
|
+
const E = u.$ref.schema, S = u.$ref.converter, x = y[E], w = x.type, M = e(x), I = {}, F = i[w];
|
|
539
541
|
if (F && F.categories) {
|
|
540
542
|
const C = F.categories[a], L = C == null ? void 0 : C.title;
|
|
541
|
-
|
|
542
|
-
C.properties[k].$converter =
|
|
543
|
+
S && Object.keys(C.properties).forEach((k) => {
|
|
544
|
+
C.properties[k].$converter = S;
|
|
543
545
|
});
|
|
544
|
-
const V = (C == null ? void 0 : C.properties) || {}, O =
|
|
546
|
+
const V = (C == null ? void 0 : C.properties) || {}, O = d(V, I, M, x, v, b);
|
|
545
547
|
return { categoryId: a, categoryName: L, properties: O };
|
|
546
548
|
}
|
|
547
549
|
return { categoryId: a, categoryName: "", properties: [] };
|
|
548
550
|
}
|
|
549
|
-
function h(a,
|
|
550
|
-
const
|
|
551
|
-
let
|
|
552
|
-
if (!(
|
|
553
|
-
const
|
|
554
|
-
return Object.keys(
|
|
555
|
-
const C =
|
|
551
|
+
function h(a, u, y, v, b) {
|
|
552
|
+
const E = a.type, S = e(a), x = {};
|
|
553
|
+
let w = b || i[E];
|
|
554
|
+
if (!(w && Object.keys(w).length > 0) && y && y.getPropConfig && (w = y.getPropConfig(v)), w && w.categories) {
|
|
555
|
+
const I = [];
|
|
556
|
+
return Object.keys(w.categories).map((F) => {
|
|
557
|
+
const C = w.categories[F];
|
|
556
558
|
if (C.$ref) {
|
|
557
|
-
|
|
559
|
+
I.push(m(F, C, a, u, v));
|
|
558
560
|
return;
|
|
559
561
|
}
|
|
560
|
-
const L = C == null ? void 0 : C.title, V = C == null ? void 0 : C.tabId, O = C == null ? void 0 : C.tabName, k = C == null ? void 0 : C.hide,
|
|
561
|
-
|
|
562
|
-
}),
|
|
562
|
+
const L = C == null ? void 0 : C.title, V = C == null ? void 0 : C.tabId, O = C == null ? void 0 : C.tabName, k = C == null ? void 0 : C.hide, W = C == null ? void 0 : C.hideTitle, G = d(C.properties || {}, x, S, a, u, v, C.$converter), { setPropertyRelates: H } = C, J = C == null ? void 0 : C.parentPropertyID;
|
|
563
|
+
I.push({ categoryId: F, categoryName: L, tabId: V, tabName: O, hide: k, properties: G, hideTitle: W, setPropertyRelates: H, parentPropertyID: J });
|
|
564
|
+
}), I;
|
|
563
565
|
}
|
|
564
566
|
return [];
|
|
565
567
|
}
|
|
@@ -569,24 +571,24 @@ function oe(i, t, e) {
|
|
|
569
571
|
propertyConverterMap: n
|
|
570
572
|
};
|
|
571
573
|
}
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
|
|
576
|
-
function
|
|
577
|
-
return
|
|
574
|
+
const le = {}, ae = {};
|
|
575
|
+
se(le, ae, Te);
|
|
576
|
+
const de = {}, ce = {}, { resolveSchemaWithDefaultValue: nt } = ne(de, ce), ue = {}, pe = {};
|
|
577
|
+
se(ue, pe, nt);
|
|
578
|
+
function rt(i, t, e = /* @__PURE__ */ new Map(), n = (l, g, c, p) => g, r = {}, s = (l) => l) {
|
|
579
|
+
return re[t.title] = t, oe[t.title] = n, le[t.title] = r, ae[t.title] = s, de[t.title] = t, ce[t.title] = n, ue[t.title] = r, pe[t.title] = s, (l = {}, g = !0) => {
|
|
578
580
|
if (!g)
|
|
579
|
-
return
|
|
580
|
-
const
|
|
581
|
-
return Object.assign(
|
|
581
|
+
return Ve(l, e);
|
|
582
|
+
const c = ke(l, t, e), p = Object.keys(i).reduce((d, o) => (d[o] = i[o].default, d), {});
|
|
583
|
+
return Object.assign(p, c);
|
|
582
584
|
};
|
|
583
585
|
}
|
|
584
|
-
function
|
|
586
|
+
function ot(i, t, e) {
|
|
585
587
|
return t;
|
|
586
588
|
}
|
|
587
|
-
const
|
|
588
|
-
["appearance",
|
|
589
|
-
]),
|
|
589
|
+
const st = /* @__PURE__ */ new Map([
|
|
590
|
+
["appearance", xe]
|
|
591
|
+
]), lt = "https://json-schema.org/draft/2020-12/schema", at = "https://farris-design.gitee.io/image.schema.json", dt = "image", ct = "A Farris Component", ut = "object", pt = {
|
|
590
592
|
id: {
|
|
591
593
|
description: "The unique identifier for image",
|
|
592
594
|
type: "string"
|
|
@@ -652,24 +654,24 @@ const ot = /* @__PURE__ */ new Map([
|
|
|
652
654
|
description: "",
|
|
653
655
|
type: "Number"
|
|
654
656
|
}
|
|
655
|
-
},
|
|
657
|
+
}, mt = [
|
|
656
658
|
"id",
|
|
657
659
|
"type"
|
|
658
|
-
],
|
|
660
|
+
], ft = [
|
|
659
661
|
"id",
|
|
660
662
|
"appearance",
|
|
661
663
|
"binding",
|
|
662
664
|
"visible"
|
|
663
|
-
],
|
|
664
|
-
$schema:
|
|
665
|
-
$id:
|
|
666
|
-
title:
|
|
667
|
-
description:
|
|
668
|
-
type:
|
|
669
|
-
properties:
|
|
670
|
-
required:
|
|
671
|
-
ignore:
|
|
672
|
-
},
|
|
665
|
+
], gt = {
|
|
666
|
+
$schema: lt,
|
|
667
|
+
$id: at,
|
|
668
|
+
title: dt,
|
|
669
|
+
description: ct,
|
|
670
|
+
type: ut,
|
|
671
|
+
properties: pt,
|
|
672
|
+
required: mt,
|
|
673
|
+
ignore: ft
|
|
674
|
+
}, D = {
|
|
673
675
|
// 绑定特殊字段,辅助构造src,指定服务器端图像Id
|
|
674
676
|
modelValue: { type: String, default: "" },
|
|
675
677
|
// 指定直接路径
|
|
@@ -685,29 +687,29 @@ const ot = /* @__PURE__ */ new Map([
|
|
|
685
687
|
// 是否只读
|
|
686
688
|
readonly: { type: Boolean, default: !1 },
|
|
687
689
|
visible: { type: Boolean, default: !0 }
|
|
688
|
-
},
|
|
690
|
+
}, me = rt(D, gt, st, ot), ht = Object.assign({}, D, {
|
|
689
691
|
componentId: { type: String, default: "" }
|
|
690
|
-
}),
|
|
692
|
+
}), z = /* @__PURE__ */ te({
|
|
691
693
|
name: "FImage",
|
|
692
|
-
props:
|
|
694
|
+
props: D,
|
|
693
695
|
emits: ["change", "update:modelValue"],
|
|
694
696
|
setup(i, t) {
|
|
695
|
-
const e = B(i.modelValue), n = R(() =>
|
|
697
|
+
const e = B(i.modelValue), n = R(() => ie({
|
|
696
698
|
"f-imgcontainer-in-form": !0
|
|
697
699
|
}, i.customClass)), r = R(() => {
|
|
698
700
|
const o = {};
|
|
699
701
|
return i.width && i.width > 0 && (o.width = i.width + "px"), i.height && i.height > 0 && (o.height = i.height + "px"), o;
|
|
700
|
-
}), s = B(i.alt ? i.alt : void 0), l = B(i.title ? i.title : void 0), g = i.errorSrc ? i.errorSrc : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABWCAYAAAE1c8GoAAAAAXNSR0IArs4c6QAACEZJREFUeAHtnIt23DQQhgkkodzKrVxKaJqkSd7/eUoJp7QNDRBaaAulLSnzOTs+Y62klWzLu954zlEsS6PRr9+yNJK12XjnUo5n10WXuyikKle67y4y6ea7BagtWqNbwDU4d7/ppFSNctIat4tqmIMYK2DbUsdtAWutVjB4qrQNSfBlGr1m9L3Z7YfN5PAdNbwv4XZYpc55SywZjm1sbSIUcZWjtbjKIaN1eszajVpLIm6fsXlq5ANJfEBGCIYqooPyHSJqeVvieyQEhAd4rJb3AkqNZFVuJIZueNxAOQgpdEm3hhe+bZkV1ZyEymnPD+VH0/Xp+JTs42zVqpjxVgYtyphxq+eLa8ueSeYvPoU2xtWo2vtEIoTXEn7SRK4+43TPIwkuItco5a1sy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sW8IpR0WphOAbMwYiv0v4o4rN/6EBOxJwz8YmdDwCK1d2SL1CA489OfTI+550iIPoPl5xXC56PVeEn30x/q+LMNzAb0NSezjeAU9vzkDDWt4Nb8deXpFRaXu5WkT4UP7uqJjsApan4BtSuticykYYwMuYZEAGJsIHJJuqJsKXQLjvpxEDw7gy1b2kh+MLF//ScWUoDTcUjk/VV+Ta1yZ+uMqrm/MCsiW8VcItFawmOcvN/gh+uk9HkicJMEBPfiMBklnis2qv5X8shM3uwwEEhgAAAABJRU5ErkJggg==",
|
|
701
|
-
function
|
|
702
|
+
}), s = B(i.alt ? i.alt : void 0), l = B(i.title ? i.title : void 0), g = 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+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gh+uk9HkicJMEBPfiMBklnis2qv5X8shM3uwwEEhgAAAABJRU5ErkJggg==", c = B(i.modelValue || i.src);
|
|
703
|
+
function p() {
|
|
702
704
|
i.title && (l.value = i.title);
|
|
703
705
|
}
|
|
704
706
|
X(() => i.src, (o) => {
|
|
705
|
-
|
|
707
|
+
p(), c.value = o;
|
|
706
708
|
}), X(() => i.modelValue, (o) => {
|
|
707
|
-
|
|
709
|
+
p(), e.value = o, c.value = o || i.src || g;
|
|
708
710
|
});
|
|
709
|
-
function
|
|
710
|
-
|
|
711
|
+
function d() {
|
|
712
|
+
c.value === g && (l.value = void 0), c.value = g;
|
|
711
713
|
}
|
|
712
714
|
return () => i.visible ? Y("div", {
|
|
713
715
|
class: n.value
|
|
@@ -715,40 +717,40 @@ const ot = /* @__PURE__ */ new Map([
|
|
|
715
717
|
alt: s.value,
|
|
716
718
|
title: l.value,
|
|
717
719
|
style: r.value,
|
|
718
|
-
src:
|
|
719
|
-
onError:
|
|
720
|
+
src: c.value,
|
|
721
|
+
onError: d
|
|
720
722
|
}, null)]) : null;
|
|
721
723
|
}
|
|
722
724
|
});
|
|
723
|
-
function
|
|
725
|
+
function yt(i) {
|
|
724
726
|
const { formSchemaUtils: t, formStateMachineUtils: e } = i;
|
|
725
|
-
function n(
|
|
727
|
+
function n(c, p = "") {
|
|
726
728
|
return {
|
|
727
|
-
path:
|
|
728
|
-
field:
|
|
729
|
-
fullPath:
|
|
729
|
+
path: p + c.code,
|
|
730
|
+
field: c.id,
|
|
731
|
+
fullPath: c.code
|
|
730
732
|
};
|
|
731
733
|
}
|
|
732
|
-
function r(
|
|
733
|
-
const
|
|
734
|
-
return
|
|
734
|
+
function r(c, p = "") {
|
|
735
|
+
const d = t.getViewModelById(c);
|
|
736
|
+
return d ? d.states.map((o) => n(o, p)) : [];
|
|
735
737
|
}
|
|
736
|
-
function s(
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
return
|
|
740
|
-
const o = r(
|
|
741
|
-
return [...
|
|
738
|
+
function s(c) {
|
|
739
|
+
const p = t.getRootViewModelId(), d = r(c);
|
|
740
|
+
if (c === p)
|
|
741
|
+
return d;
|
|
742
|
+
const o = r(p, "root-component.");
|
|
743
|
+
return [...d, ...o];
|
|
742
744
|
}
|
|
743
|
-
function l(
|
|
744
|
-
return
|
|
745
|
+
function l(c) {
|
|
746
|
+
return c.binding && c.binding.path || c.id || "";
|
|
745
747
|
}
|
|
746
748
|
function g() {
|
|
747
749
|
return e && e.getRenderStates() || [];
|
|
748
750
|
}
|
|
749
751
|
return { getVariables: s, getControlName: l, getStateMachines: g };
|
|
750
752
|
}
|
|
751
|
-
class
|
|
753
|
+
class fe {
|
|
752
754
|
constructor(t) {
|
|
753
755
|
A(this, "sessionVariables", [
|
|
754
756
|
{
|
|
@@ -802,12 +804,12 @@ class me {
|
|
|
802
804
|
return g && g.value || "";
|
|
803
805
|
},
|
|
804
806
|
convertTo: (n, r, s, l, g) => {
|
|
805
|
-
var
|
|
807
|
+
var c;
|
|
806
808
|
if (r === "dataPicking" && (s != null && s.target)) {
|
|
807
|
-
const
|
|
808
|
-
((
|
|
809
|
-
(o) => o.id ===
|
|
810
|
-
)) ? n.dictPickingExpressionId =
|
|
809
|
+
const p = `${s.target}_dataPicking`;
|
|
810
|
+
((c = s.rules) == null ? void 0 : c.some(
|
|
811
|
+
(o) => o.id === p && o.value
|
|
812
|
+
)) ? n.dictPickingExpressionId = p : delete n.dictPickingExpressionId;
|
|
811
813
|
}
|
|
812
814
|
l.updateExpression(s);
|
|
813
815
|
}
|
|
@@ -867,10 +869,10 @@ class me {
|
|
|
867
869
|
buildChildEntityTreeData(t = null, e) {
|
|
868
870
|
const n = [];
|
|
869
871
|
return t == null || t.forEach((r) => {
|
|
870
|
-
var
|
|
872
|
+
var c, p;
|
|
871
873
|
const s = this.createTreeNode(r, e);
|
|
872
874
|
s.type = "entity";
|
|
873
|
-
const l = this.buildEntityFieldsTreeData((
|
|
875
|
+
const l = this.buildEntityFieldsTreeData((c = r.type) == null ? void 0 : c.fields, [...e, r.label]), g = this.buildChildEntityTreeData((p = r.type) == null ? void 0 : p.entities, [...e, r.label]);
|
|
874
876
|
g != null && g.length && (l == null || l.push(...g)), n.push({
|
|
875
877
|
data: s,
|
|
876
878
|
children: l || [],
|
|
@@ -920,12 +922,12 @@ class me {
|
|
|
920
922
|
return s.messageType != null && (g.messageType = s.messageType), g;
|
|
921
923
|
}
|
|
922
924
|
buildRule(t, e, n, r) {
|
|
923
|
-
const { expression: s, message: l, messageType: g } = e,
|
|
925
|
+
const { expression: s, message: l, messageType: g } = e, c = {
|
|
924
926
|
id: `${t}_${n}`,
|
|
925
927
|
type: n,
|
|
926
928
|
value: s
|
|
927
929
|
};
|
|
928
|
-
return (n === "validate" || n === "dataPicking" || n === "required") && (
|
|
930
|
+
return (n === "validate" || n === "dataPicking" || n === "required") && (c.message = l), n === "dataPicking" && (c.messageType = g), n === "validate" && r && (c.elementId = r), c;
|
|
929
931
|
}
|
|
930
932
|
getExpressionData() {
|
|
931
933
|
const { expressions: t } = this.formSchemaService.getFormSchema().module;
|
|
@@ -933,34 +935,34 @@ class me {
|
|
|
933
935
|
}
|
|
934
936
|
updateExpression(t, e, n, r) {
|
|
935
937
|
const s = e === "Field" ? t.binding.field : t.id, l = this.buildRule(s, n, r, t.type === "form-group" ? t.id : "");
|
|
936
|
-
let
|
|
937
|
-
const
|
|
938
|
-
if (
|
|
939
|
-
const
|
|
940
|
-
if (
|
|
941
|
-
|
|
938
|
+
let c = this.getExpressionData().find((d) => d.targetType === e && d.target === s);
|
|
939
|
+
const p = (d) => d.value.trim() === "";
|
|
940
|
+
if (c) {
|
|
941
|
+
const d = c.rules.find((o) => o.id === l.id);
|
|
942
|
+
if (d)
|
|
943
|
+
p(l) ? c.rules = c.rules.filter((o) => o.id !== l.id) : (Object.assign(d, l), r === "validate" && t.type === "form-group" && (d.elementId = t.id));
|
|
942
944
|
else {
|
|
943
|
-
if (
|
|
945
|
+
if (p(l))
|
|
944
946
|
return null;
|
|
945
|
-
|
|
947
|
+
c.rules = c.rules || [], c.rules.push(l);
|
|
946
948
|
}
|
|
947
949
|
} else {
|
|
948
|
-
if (
|
|
950
|
+
if (p(l))
|
|
949
951
|
return null;
|
|
950
|
-
|
|
952
|
+
c = {
|
|
951
953
|
target: `${s}`,
|
|
952
954
|
rules: [l],
|
|
953
955
|
targetType: e
|
|
954
956
|
};
|
|
955
957
|
}
|
|
956
|
-
return
|
|
958
|
+
return c;
|
|
957
959
|
}
|
|
958
960
|
getExpressionEditorOptions(t, e, n, r) {
|
|
959
961
|
return n.reduce((s, l) => {
|
|
960
|
-
var
|
|
961
|
-
const g = e === "Field" ? (
|
|
962
|
+
var c, p;
|
|
963
|
+
const g = e === "Field" ? (c = t == null ? void 0 : t.binding) == null ? void 0 : c.field : t.id;
|
|
962
964
|
return s[l] = {
|
|
963
|
-
hide: e === "Field" ? !!((
|
|
965
|
+
hide: e === "Field" ? !!((p = t == null ? void 0 : t.binding) != null && p.field) : !1,
|
|
964
966
|
description: "",
|
|
965
967
|
title: this.expressionNames[l],
|
|
966
968
|
type: "string",
|
|
@@ -973,10 +975,10 @@ class me {
|
|
|
973
975
|
showMessage: l === "validate" || l === "dataPicking" || l === "required",
|
|
974
976
|
showMessageType: l === "dataPicking",
|
|
975
977
|
beforeOpen: () => this.onBeforeOpenExpression(t, l, e),
|
|
976
|
-
onSubmitModal: (
|
|
977
|
-
const o = this.updateExpression(t, e,
|
|
978
|
+
onSubmitModal: (d) => {
|
|
979
|
+
const o = this.updateExpression(t, e, d, l);
|
|
978
980
|
if (r) {
|
|
979
|
-
const m = this.buildRule(g,
|
|
981
|
+
const m = this.buildRule(g, d, l);
|
|
980
982
|
r(m);
|
|
981
983
|
}
|
|
982
984
|
return o;
|
|
@@ -1015,7 +1017,7 @@ class me {
|
|
|
1015
1017
|
};
|
|
1016
1018
|
}
|
|
1017
1019
|
}
|
|
1018
|
-
class
|
|
1020
|
+
class vt {
|
|
1019
1021
|
constructor(t, e) {
|
|
1020
1022
|
A(this, "componentId");
|
|
1021
1023
|
A(this, "viewModelId");
|
|
@@ -1132,7 +1134,7 @@ class yt {
|
|
|
1132
1134
|
* @returns
|
|
1133
1135
|
*/
|
|
1134
1136
|
getPropertyEditorParams(t, e = [], n = "visible", r = {}, s = {}, l = "") {
|
|
1135
|
-
const { getVariables: g, getControlName:
|
|
1137
|
+
const { getVariables: g, getControlName: c, getStateMachines: p } = yt(this.designerHostService), d = this.getRealTargetType(t), o = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], m = {
|
|
1136
1138
|
type: "property-editor",
|
|
1137
1139
|
propertyTypes: o
|
|
1138
1140
|
};
|
|
@@ -1145,14 +1147,14 @@ class yt {
|
|
|
1145
1147
|
}, r);
|
|
1146
1148
|
break;
|
|
1147
1149
|
case "Expression":
|
|
1148
|
-
m.expressionConfig = this.getExpressionOptions(t,
|
|
1150
|
+
m.expressionConfig = this.getExpressionOptions(t, d, l || n);
|
|
1149
1151
|
break;
|
|
1150
1152
|
case "StateMachine":
|
|
1151
|
-
m.stateMachines =
|
|
1153
|
+
m.stateMachines = p();
|
|
1152
1154
|
break;
|
|
1153
1155
|
case "Variable":
|
|
1154
1156
|
Object.assign(m, {
|
|
1155
|
-
controlName:
|
|
1157
|
+
controlName: c(t),
|
|
1156
1158
|
newVariablePrefix: "is",
|
|
1157
1159
|
newVariableType: "Boolean",
|
|
1158
1160
|
variables: g(this.viewModelId),
|
|
@@ -1188,22 +1190,22 @@ class yt {
|
|
|
1188
1190
|
title: "行为",
|
|
1189
1191
|
description: ""
|
|
1190
1192
|
}, l = this.getVisibleProperty(t, e);
|
|
1191
|
-
for (const
|
|
1192
|
-
l[
|
|
1193
|
+
for (const c in n)
|
|
1194
|
+
l[c] = Object.assign(l[c] || {}, n[c]);
|
|
1193
1195
|
const g = this;
|
|
1194
1196
|
return {
|
|
1195
1197
|
...s,
|
|
1196
1198
|
properties: { ...l },
|
|
1197
|
-
setPropertyRelates(
|
|
1198
|
-
if (
|
|
1199
|
-
switch (
|
|
1199
|
+
setPropertyRelates(c, p) {
|
|
1200
|
+
if (c) {
|
|
1201
|
+
switch (c.propertyID) {
|
|
1200
1202
|
case "disabled":
|
|
1201
1203
|
case "readonly":
|
|
1202
1204
|
case "visible":
|
|
1203
|
-
g.afterMutilEditorChanged(t,
|
|
1205
|
+
g.afterMutilEditorChanged(t, c);
|
|
1204
1206
|
break;
|
|
1205
1207
|
}
|
|
1206
|
-
r && r(
|
|
1208
|
+
r && r(c, p);
|
|
1207
1209
|
}
|
|
1208
1210
|
}
|
|
1209
1211
|
};
|
|
@@ -1226,8 +1228,8 @@ class yt {
|
|
|
1226
1228
|
const n = e && e.parent && e.parent.schema;
|
|
1227
1229
|
if (!n)
|
|
1228
1230
|
return;
|
|
1229
|
-
const r = n.contents.findIndex((l) => l.id === t), s =
|
|
1230
|
-
n.contents.splice(r, 1), n.contents.splice(r, 0, s),
|
|
1231
|
+
const r = n.contents.findIndex((l) => l.id === t), s = Z(n.contents[r]);
|
|
1232
|
+
n.contents.splice(r, 1), n.contents.splice(r, 0, s), Me();
|
|
1231
1233
|
}
|
|
1232
1234
|
/**
|
|
1233
1235
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1257,16 +1259,16 @@ class yt {
|
|
|
1257
1259
|
const e = t.propertyValue;
|
|
1258
1260
|
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
1259
1261
|
return;
|
|
1260
|
-
const { expressionId: s, expressionInfo: l } = e, { targetId: g, targetType:
|
|
1262
|
+
const { expressionId: s, expressionInfo: l } = e, { targetId: g, targetType: c, expressionType: p, value: d, message: o } = l, m = this.formSchemaUtils.getModule();
|
|
1261
1263
|
m.expressions = m.expressions || [];
|
|
1262
1264
|
const { expressions: h } = m;
|
|
1263
1265
|
let a = h.find((y) => y.target === g);
|
|
1264
|
-
a || (a = { target: g, rules: [], targetType:
|
|
1265
|
-
const
|
|
1266
|
-
if (
|
|
1267
|
-
|
|
1266
|
+
a || (a = { target: g, rules: [], targetType: c }, h.push(a));
|
|
1267
|
+
const u = a.rules.find((y) => y.type === p);
|
|
1268
|
+
if (u)
|
|
1269
|
+
u.value = d, u.message = o;
|
|
1268
1270
|
else {
|
|
1269
|
-
const y = { id: s, type:
|
|
1271
|
+
const y = { id: s, type: p, value: d, message: o };
|
|
1270
1272
|
a.rules.push(y);
|
|
1271
1273
|
}
|
|
1272
1274
|
delete e.expressionInfo;
|
|
@@ -1281,11 +1283,11 @@ class yt {
|
|
|
1281
1283
|
const n = t.propertyValue;
|
|
1282
1284
|
if (n && n.type === "Expression")
|
|
1283
1285
|
return;
|
|
1284
|
-
const s = t.propertyID, l = this.formSchemaUtils.getExpressions(), g = e.binding ? e.binding.field : e.id,
|
|
1285
|
-
!
|
|
1286
|
+
const s = t.propertyID, l = this.formSchemaUtils.getExpressions(), g = e.binding ? e.binding.field : e.id, c = l.find((p) => p.target === g);
|
|
1287
|
+
!c || !c.rules || (c.rules = c.rules.filter((p) => p.type !== s));
|
|
1286
1288
|
}
|
|
1287
1289
|
getExpressionOptions(t, e, n) {
|
|
1288
|
-
return new
|
|
1290
|
+
return new fe(this.formSchemaUtils).getExpressionOptions(t, e, n);
|
|
1289
1291
|
}
|
|
1290
1292
|
getRealTargetType(t) {
|
|
1291
1293
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
|
|
@@ -1396,9 +1398,9 @@ A(N, "fieldControlTypeMapping", {
|
|
|
1396
1398
|
{ key: f["radio-group"].type, value: f["radio-group"].name }
|
|
1397
1399
|
]
|
|
1398
1400
|
});
|
|
1399
|
-
let
|
|
1401
|
+
let q = N;
|
|
1400
1402
|
var U = /* @__PURE__ */ ((i) => (i.Form = "Form", i.Variable = "Variable", i))(U || {});
|
|
1401
|
-
class
|
|
1403
|
+
class ee {
|
|
1402
1404
|
constructor() {
|
|
1403
1405
|
/** 控件标题 */
|
|
1404
1406
|
A(this, "label", "");
|
|
@@ -1432,42 +1434,49 @@ function bt(i) {
|
|
|
1432
1434
|
let t, e;
|
|
1433
1435
|
const n = /* @__PURE__ */ new Map();
|
|
1434
1436
|
let r = [];
|
|
1435
|
-
function s(
|
|
1436
|
-
const h =
|
|
1437
|
+
function s(d, o) {
|
|
1438
|
+
const h = ((d == null ? void 0 : d.split(" ")) || []).filter((b) => b.startsWith("col-"));
|
|
1437
1439
|
if (h.length === 0) {
|
|
1438
1440
|
o.isSupportedClass = !1;
|
|
1439
1441
|
return;
|
|
1440
1442
|
}
|
|
1441
|
-
let a = h.find((b) => /^col-([1-9]|10|11|12)$/.test(b)),
|
|
1442
|
-
a = a || "col-12", o.columnInSM = parseInt(a.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1),
|
|
1443
|
+
let a = h.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), u = h.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), y = h.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), v = h.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b));
|
|
1444
|
+
a = a || "col-12", o.columnInSM = parseInt(a.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), u = u || "col-md-" + o.columnInSM, o.columnInMD = parseInt(u.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), y = y || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(y.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
1443
1445
|
}
|
|
1444
|
-
function l(
|
|
1446
|
+
function l(d, o, m, h = !1) {
|
|
1445
1447
|
let a = !1;
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1448
|
+
if (!d.contents || d.contents.length === 0) {
|
|
1449
|
+
const u = new ee();
|
|
1450
|
+
s(d.layout, u), o.push(u);
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
d.contents.forEach((u) => {
|
|
1454
|
+
if (u.type === "fieldset") {
|
|
1455
|
+
m += 1, l(u, o, m, !0), a = !0;
|
|
1449
1456
|
return;
|
|
1450
1457
|
}
|
|
1458
|
+
if (u.type === "dynamic-form")
|
|
1459
|
+
return;
|
|
1451
1460
|
a && (m += 1, a = !1);
|
|
1452
|
-
const y =
|
|
1453
|
-
y ? s(y, v) : v.isSupportedClass = !1, v.label =
|
|
1461
|
+
const y = u.appearance && u.appearance.class, v = new ee();
|
|
1462
|
+
y ? s(y, v) : v.isSupportedClass = !1, v.label = u.label || u.id, v.id = u.id, v.group = m, h && (v.fieldSetId = d.id), e === u.id && (t = m), n.set(u.id, u), o.push(v);
|
|
1454
1463
|
});
|
|
1455
1464
|
}
|
|
1456
|
-
function g(
|
|
1457
|
-
const o = i.getComponentById(
|
|
1465
|
+
function g(d) {
|
|
1466
|
+
const o = i.getComponentById(d);
|
|
1458
1467
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1459
1468
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1460
1469
|
const m = i.selectNode(o, (h) => h.type === f["response-form"].type);
|
|
1461
1470
|
return !m || !m.contents || m.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: m };
|
|
1462
1471
|
}
|
|
1463
|
-
function d
|
|
1464
|
-
o = o ||
|
|
1472
|
+
function c(d, o) {
|
|
1473
|
+
o = o || d.id;
|
|
1465
1474
|
const { result: m, message: h, formNode: a } = g(o);
|
|
1466
1475
|
if (!m)
|
|
1467
1476
|
return { result: m, message: h };
|
|
1468
|
-
e =
|
|
1469
|
-
const
|
|
1470
|
-
l(a, r,
|
|
1477
|
+
e = d.id, r = [], n.clear();
|
|
1478
|
+
const u = a.contents[0].type === f.fieldset.type ? 0 : 1;
|
|
1479
|
+
l(a, r, u);
|
|
1471
1480
|
const y = r.find((b) => !b.isSupportedClass);
|
|
1472
1481
|
return {
|
|
1473
1482
|
defaultState: {
|
|
@@ -1477,34 +1486,34 @@ function bt(i) {
|
|
|
1477
1486
|
importData: r
|
|
1478
1487
|
};
|
|
1479
1488
|
}
|
|
1480
|
-
function
|
|
1489
|
+
function p(d, o) {
|
|
1481
1490
|
o = o;
|
|
1482
1491
|
const { result: m, formNode: h } = g(o);
|
|
1483
1492
|
if (!m)
|
|
1484
1493
|
return "";
|
|
1485
1494
|
const a = [];
|
|
1486
|
-
return
|
|
1495
|
+
return d.forEach((u) => {
|
|
1487
1496
|
var b;
|
|
1488
|
-
const y = n.get(
|
|
1497
|
+
const y = n.get(u.id), v = y.appearance && y.appearance.class;
|
|
1489
1498
|
if (v) {
|
|
1490
|
-
const
|
|
1499
|
+
const S = v.split(" ").filter((C) => !C.startsWith("col-")), x = "col-" + u.columnInSM, w = "col-md-" + u.columnInMD, M = "col-xl-" + u.columnInLG, I = "col-el-" + u.columnInEL, F = [x, w, M, I].concat(S);
|
|
1491
1500
|
y.appearance.class = F.join(" ");
|
|
1492
1501
|
}
|
|
1493
|
-
if (
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1502
|
+
if (u.fieldSetId) {
|
|
1503
|
+
const E = h.contents.find((x) => x.id === u.fieldSetId), S = a.find((x) => x.id === u.fieldSetId);
|
|
1504
|
+
S ? (b = S.contents) == null || b.push(y) : (a.push(E), E.contents = [y]);
|
|
1496
1505
|
} else
|
|
1497
1506
|
a.push(y);
|
|
1498
1507
|
}), h.contents = a, h.id;
|
|
1499
1508
|
}
|
|
1500
1509
|
return {
|
|
1501
1510
|
checkCanFindFormNode: g,
|
|
1502
|
-
checkCanOpenLayoutEditor:
|
|
1503
|
-
changeFormControlsByResponseLayoutConfig:
|
|
1511
|
+
checkCanOpenLayoutEditor: c,
|
|
1512
|
+
changeFormControlsByResponseLayoutConfig: p,
|
|
1504
1513
|
getResonseFormLayoutConfig: l
|
|
1505
1514
|
};
|
|
1506
1515
|
}
|
|
1507
|
-
class Ct extends
|
|
1516
|
+
class Ct extends vt {
|
|
1508
1517
|
constructor(e, n) {
|
|
1509
1518
|
super(e, n);
|
|
1510
1519
|
A(this, "responseLayoutEditorFunction");
|
|
@@ -1528,10 +1537,10 @@ class Ct extends yt {
|
|
|
1528
1537
|
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;
|
|
1529
1538
|
}
|
|
1530
1539
|
getBasicProperties(e, n, r = "Card") {
|
|
1531
|
-
var
|
|
1540
|
+
var p;
|
|
1532
1541
|
const s = this;
|
|
1533
1542
|
this.setDesignViewModelField(e);
|
|
1534
|
-
const { canChangeControlType: l, editorTypeList: g } = this.getAvailableEditorType(e),
|
|
1543
|
+
const { canChangeControlType: l, editorTypeList: g } = this.getAvailableEditorType(e), c = {
|
|
1535
1544
|
description: "Basic Information",
|
|
1536
1545
|
title: "基本信息",
|
|
1537
1546
|
properties: {
|
|
@@ -1569,7 +1578,7 @@ class Ct extends yt {
|
|
|
1569
1578
|
editor: {
|
|
1570
1579
|
data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
|
|
1571
1580
|
},
|
|
1572
|
-
defaultValue: ((
|
|
1581
|
+
defaultValue: ((p = e.editor) == null ? void 0 : p.type) === "image" ? "none" : "visible"
|
|
1573
1582
|
},
|
|
1574
1583
|
binding: {
|
|
1575
1584
|
description: "绑定的表单字段",
|
|
@@ -1590,25 +1599,25 @@ class Ct extends yt {
|
|
|
1590
1599
|
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
|
|
1591
1600
|
}
|
|
1592
1601
|
},
|
|
1593
|
-
setPropertyRelates(
|
|
1594
|
-
if (
|
|
1595
|
-
switch (
|
|
1602
|
+
setPropertyRelates(d, o, m) {
|
|
1603
|
+
if (d)
|
|
1604
|
+
switch (d && d.propertyID) {
|
|
1596
1605
|
case "type": {
|
|
1597
|
-
s.changeControlType(e,
|
|
1606
|
+
s.changeControlType(e, d, n);
|
|
1598
1607
|
break;
|
|
1599
1608
|
}
|
|
1600
1609
|
case "label": {
|
|
1601
|
-
|
|
1610
|
+
d.needRefreshControlTree = !0;
|
|
1602
1611
|
break;
|
|
1603
1612
|
}
|
|
1604
1613
|
case "binding": {
|
|
1605
|
-
s.changeBindingField(e,
|
|
1614
|
+
s.changeBindingField(e, d, m);
|
|
1606
1615
|
break;
|
|
1607
1616
|
}
|
|
1608
1617
|
}
|
|
1609
1618
|
}
|
|
1610
1619
|
};
|
|
1611
|
-
return r.toLocaleLowerCase() !== "card" && delete
|
|
1620
|
+
return r.toLocaleLowerCase() !== "card" && delete c.properties.showLabelType, c;
|
|
1612
1621
|
}
|
|
1613
1622
|
/**
|
|
1614
1623
|
* 校验控件是否支持切换类型
|
|
@@ -1639,7 +1648,7 @@ class Ct extends yt {
|
|
|
1639
1648
|
}]
|
|
1640
1649
|
};
|
|
1641
1650
|
let r = [];
|
|
1642
|
-
return this.designViewModelField && this.designViewModelField.$type === _.SimpleField ? r =
|
|
1651
|
+
return this.designViewModelField && this.designViewModelField.$type === _.SimpleField ? r = q.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (r = q.getEditorTypesByMDataType(this.bindingVarible.type, !!((l = this.designViewModelField) != null && l.multiLanguage))), { canChangeControlType: n, editorTypeList: r };
|
|
1643
1652
|
}
|
|
1644
1653
|
changeBindingField(e, n, r) {
|
|
1645
1654
|
n.needRefreshEntityTree = !0;
|
|
@@ -1712,28 +1721,28 @@ class Ct extends yt {
|
|
|
1712
1721
|
const s = n.propertyValue, l = r && r.parent && r.parent.schema;
|
|
1713
1722
|
if (!l)
|
|
1714
1723
|
return;
|
|
1715
|
-
const g = l.contents.findIndex((
|
|
1724
|
+
const g = l.contents.findIndex((d) => d.id === e.id);
|
|
1716
1725
|
if (g === -1)
|
|
1717
1726
|
return;
|
|
1718
|
-
const
|
|
1719
|
-
let
|
|
1727
|
+
const c = l.contents[g];
|
|
1728
|
+
let p;
|
|
1720
1729
|
if (this.designViewModelField) {
|
|
1721
1730
|
const m = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((a) => a.id === this.designViewModelField.id).fieldSchema || {};
|
|
1722
|
-
m.editor || (m.editor = {}), m.editor.$type = s, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, m, !1),
|
|
1731
|
+
m.editor || (m.editor = {}), m.editor.$type = s, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, m, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s);
|
|
1723
1732
|
}
|
|
1724
|
-
|
|
1725
|
-
id:
|
|
1726
|
-
appearance:
|
|
1727
|
-
size:
|
|
1728
|
-
label:
|
|
1729
|
-
binding:
|
|
1730
|
-
}), Object.prototype.hasOwnProperty.call(
|
|
1731
|
-
Object.prototype.hasOwnProperty.call(
|
|
1732
|
-
}), r != null && r.updateContextSchema ? r.updateContextSchema(
|
|
1733
|
-
(
|
|
1733
|
+
p || (p = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(p, {
|
|
1734
|
+
id: c.id,
|
|
1735
|
+
appearance: c.appearance,
|
|
1736
|
+
size: c.size,
|
|
1737
|
+
label: c.label,
|
|
1738
|
+
binding: c.binding
|
|
1739
|
+
}), Object.prototype.hasOwnProperty.call(c, "visible") && Object.assign(p, { visible: c.visible }), c.editor && ["readonly", "required", "placeholder"].map((d) => {
|
|
1740
|
+
Object.prototype.hasOwnProperty.call(c.editor, d) && (p.editor[d] = c.editor[d]);
|
|
1741
|
+
}), r != null && r.updateContextSchema ? r.updateContextSchema(p) : (r.schema = Object.assign(c, p), Object.assign(e, p)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1742
|
+
(d) => d.classList.remove("dgComponentSelected")
|
|
1734
1743
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
1735
|
-
(
|
|
1736
|
-
), j.value++,
|
|
1744
|
+
(d) => d.classList.remove("dgComponentFocused")
|
|
1745
|
+
), j.value++, we(() => {
|
|
1737
1746
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
1738
1747
|
});
|
|
1739
1748
|
}
|
|
@@ -1745,17 +1754,17 @@ class Ct extends yt {
|
|
|
1745
1754
|
type: "input-group",
|
|
1746
1755
|
$converter: "/converter/property-editor.converter",
|
|
1747
1756
|
parentPropertyID: "editor"
|
|
1748
|
-
}, n), g = (m = e.binding) != null && m.field ? [] : ["Const", "Variable", "StateMachine"],
|
|
1757
|
+
}, n), g = (m = e.binding) != null && m.field ? [] : ["Const", "Variable", "StateMachine"], c = this.getPropertyEditorParams(e, g, "readonly"), p = this.getPropertyEditorParams(e, g, "required"), d = {
|
|
1749
1758
|
readonly: {
|
|
1750
1759
|
description: "",
|
|
1751
1760
|
title: "只读",
|
|
1752
|
-
editor:
|
|
1761
|
+
editor: c
|
|
1753
1762
|
},
|
|
1754
1763
|
required: {
|
|
1755
1764
|
description: "",
|
|
1756
1765
|
title: "必填",
|
|
1757
1766
|
type: "boolean",
|
|
1758
|
-
editor:
|
|
1767
|
+
editor: p,
|
|
1759
1768
|
visible: !!((h = e.binding) != null && h.field)
|
|
1760
1769
|
},
|
|
1761
1770
|
placeholder: {
|
|
@@ -1765,12 +1774,12 @@ class Ct extends yt {
|
|
|
1765
1774
|
}
|
|
1766
1775
|
};
|
|
1767
1776
|
for (const a in r)
|
|
1768
|
-
|
|
1777
|
+
d[a] = Object.assign(d[a] || {}, r[a]);
|
|
1769
1778
|
const o = this;
|
|
1770
1779
|
return {
|
|
1771
1780
|
...l,
|
|
1772
|
-
properties: { ...
|
|
1773
|
-
setPropertyRelates(a,
|
|
1781
|
+
properties: { ...d },
|
|
1782
|
+
setPropertyRelates(a, u) {
|
|
1774
1783
|
if (a) {
|
|
1775
1784
|
switch (a.propertyID) {
|
|
1776
1785
|
case "readonly":
|
|
@@ -1778,7 +1787,7 @@ class Ct extends yt {
|
|
|
1778
1787
|
o.afterMutilEditorChanged(e, a);
|
|
1779
1788
|
break;
|
|
1780
1789
|
}
|
|
1781
|
-
s && s.bind(o)(a, e,
|
|
1790
|
+
s && s.bind(o)(a, e, u);
|
|
1782
1791
|
}
|
|
1783
1792
|
}
|
|
1784
1793
|
};
|
|
@@ -1791,16 +1800,16 @@ class Ct extends yt {
|
|
|
1791
1800
|
*/
|
|
1792
1801
|
updateUnifiedLayoutAfterControlChanged(e, n, r) {
|
|
1793
1802
|
const s = e.split(" ");
|
|
1794
|
-
let l = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), g = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)),
|
|
1795
|
-
l = l || "col-12", g = g || "col-md-" + l.replace("col-", ""),
|
|
1796
|
-
const
|
|
1803
|
+
let l = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), g = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), c = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), p = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1804
|
+
l = l || "col-12", g = g || "col-md-" + l.replace("col-", ""), c = c || "col-xl-" + g.replace("col-md-", ""), p = p || "col-el-" + c.replace("col-xl-", "");
|
|
1805
|
+
const d = {
|
|
1797
1806
|
id: n,
|
|
1798
1807
|
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
1799
1808
|
columnInMD: parseInt(g.replace("col-md-", ""), 10),
|
|
1800
|
-
columnInLG: parseInt(
|
|
1801
|
-
columnInEL: parseInt(
|
|
1809
|
+
columnInLG: parseInt(c.replace("col-xl-", ""), 10),
|
|
1810
|
+
columnInEL: parseInt(p.replace("col-el-", ""), 10)
|
|
1802
1811
|
};
|
|
1803
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(r,
|
|
1812
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, d);
|
|
1804
1813
|
}
|
|
1805
1814
|
/**
|
|
1806
1815
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1813,12 +1822,12 @@ class Ct extends yt {
|
|
|
1813
1822
|
return;
|
|
1814
1823
|
const s = [];
|
|
1815
1824
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, s, 1), n) {
|
|
1816
|
-
const a = s.find((
|
|
1825
|
+
const a = s.find((u) => u.id === n.id);
|
|
1817
1826
|
Object.assign(a || {}, n);
|
|
1818
1827
|
}
|
|
1819
|
-
const l = s.map((a) => a.columnInSM), g = s.map((a) => a.columnInMD),
|
|
1828
|
+
const l = s.map((a) => a.columnInSM), g = s.map((a) => a.columnInMD), c = s.map((a) => a.columnInLG), p = s.map((a) => a.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(g) ? g[0] : null, m = this.checkIsUniqueColumn(c) ? c[0] : null, h = this.checkIsUniqueColumn(p) ? p[0] : null;
|
|
1820
1829
|
Object.assign(r.unifiedLayout, {
|
|
1821
|
-
uniqueColClassInSM:
|
|
1830
|
+
uniqueColClassInSM: d,
|
|
1822
1831
|
uniqueColClassInMD: o,
|
|
1823
1832
|
uniqueColClassInLG: m,
|
|
1824
1833
|
uniqueColClassInEL: h
|
|
@@ -1862,7 +1871,7 @@ class Ct extends yt {
|
|
|
1862
1871
|
* @param propertyData 下拉框控件属性值
|
|
1863
1872
|
*/
|
|
1864
1873
|
checkEnumDataReadonly(e) {
|
|
1865
|
-
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type ===
|
|
1874
|
+
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === Se.EnumType);
|
|
1866
1875
|
}
|
|
1867
1876
|
/**
|
|
1868
1877
|
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
@@ -1902,11 +1911,11 @@ class Ct extends yt {
|
|
|
1902
1911
|
hide: !0
|
|
1903
1912
|
};
|
|
1904
1913
|
this.appendFieldValueChangeEvents(e, g);
|
|
1905
|
-
const
|
|
1914
|
+
const c = l.eventsEditorUtils.formProperties(e, l.viewModelId, g);
|
|
1906
1915
|
return {
|
|
1907
1916
|
title: "事件",
|
|
1908
1917
|
hideTitle: !0,
|
|
1909
|
-
properties: l.createBaseEventProperty(
|
|
1918
|
+
properties: l.createBaseEventProperty(c),
|
|
1910
1919
|
tabId: "commands",
|
|
1911
1920
|
tabName: "交互",
|
|
1912
1921
|
setPropertyRelates(o, m) {
|
|
@@ -1918,7 +1927,7 @@ class Ct extends yt {
|
|
|
1918
1927
|
};
|
|
1919
1928
|
}
|
|
1920
1929
|
getExpressionConfig(e, n, r = ["compute", "dependency", "validate"], s) {
|
|
1921
|
-
return new
|
|
1930
|
+
return new fe(this.formSchemaUtils).getExpressionConfig(
|
|
1922
1931
|
e,
|
|
1923
1932
|
n,
|
|
1924
1933
|
r,
|
|
@@ -2028,43 +2037,43 @@ function Ft(i, t) {
|
|
|
2028
2037
|
getPropsConfig: n
|
|
2029
2038
|
};
|
|
2030
2039
|
}
|
|
2031
|
-
const
|
|
2040
|
+
const wt = /* @__PURE__ */ te({
|
|
2032
2041
|
name: "FImageDesign",
|
|
2033
|
-
props:
|
|
2042
|
+
props: ht,
|
|
2034
2043
|
emits: ["change", "update:modelValue"],
|
|
2035
2044
|
setup(i, t) {
|
|
2036
|
-
const e = B(), n = $("designer-host-service"), r = $("design-item-context"), s = Ft(r, n), l =
|
|
2045
|
+
const e = B(), n = $("designer-host-service"), r = $("design-item-context"), s = Ft(r, n), l = Pe(e, r, s);
|
|
2037
2046
|
Ee(() => {
|
|
2038
2047
|
e.value.componentInstance = l;
|
|
2039
2048
|
}), t.expose(l.value);
|
|
2040
|
-
const g = R(() =>
|
|
2049
|
+
const g = R(() => ie({
|
|
2041
2050
|
"f-imgcontainer-in-form": !0
|
|
2042
|
-
}, i.customClass)),
|
|
2043
|
-
const
|
|
2044
|
-
return i.width && i.width > 0 && (
|
|
2045
|
-
}),
|
|
2051
|
+
}, i.customClass)), c = R(() => {
|
|
2052
|
+
const d = {};
|
|
2053
|
+
return i.width && i.width > 0 && (d.width = i.width + "px"), i.height && i.height > 0 ? d.height = i.height + "px" : d.height = "100px", d;
|
|
2054
|
+
}), p = "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5AIaBxkjOE3ZQAAAC55JREFUeNrtndlvHFkVh79bS6+2E9tJZjIBJhMGECAkFolFIIEYIYF4QCPe5xWJPwEED/N3IPGARkg8sEiAQEIg4GlAQuwSmZmEJHbsuPeluqpruYeHbhsn6W4v1d3VTt1PsmS7qqvr1vnVueeee24VGAwGg8FgMBhyh5q1sdlsHv2utSYIAsIwRESyPm/DBJRSFAoFisUitm0f/X9ra2v6Z6ZtaDabXL58mWazycbGRqnf738wCIL3a60vi4iVdWMNExHbtjvFYvF2tVr9d7/f96vVKr7vTxXBRAEcGn9/f59yufzSYDD4lud5r3qed1lrbWNYWSzL0pVKpbO2tvbLSqXyuu/7tzc3N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", {
|
|
2050
2059
|
alt: i.alt,
|
|
2051
2060
|
title: i.title,
|
|
2052
|
-
style:
|
|
2053
|
-
src:
|
|
2061
|
+
style: c.value,
|
|
2062
|
+
src: p
|
|
2054
2063
|
}, null)]);
|
|
2055
2064
|
}
|
|
2056
2065
|
});
|
|
2057
|
-
|
|
2058
|
-
i.image =
|
|
2066
|
+
z.register = (i, t, e, n) => {
|
|
2067
|
+
i.image = z, t.image = me;
|
|
2059
2068
|
};
|
|
2060
|
-
|
|
2061
|
-
i.image =
|
|
2069
|
+
z.registerDesigner = (i, t, e) => {
|
|
2070
|
+
i.image = wt, t.image = me;
|
|
2062
2071
|
};
|
|
2063
|
-
const Tt = Ie(
|
|
2072
|
+
const Tt = Ie(z);
|
|
2064
2073
|
export {
|
|
2065
|
-
|
|
2074
|
+
z as FImage,
|
|
2066
2075
|
Tt as default,
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2076
|
+
ht as imageDesignProps,
|
|
2077
|
+
D as imageProps,
|
|
2078
|
+
me as propsResolver
|
|
2070
2079
|
};
|