@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
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { getCustomClass as L, withInstall as
|
|
3
|
-
import { isPlainObject as
|
|
4
|
-
import { resolveAppearance as
|
|
5
|
-
import { DgControl as
|
|
6
|
-
import
|
|
7
|
-
import { LocaleService as
|
|
8
|
-
function
|
|
1
|
+
import { ref as j, computed as F, createVNode as h, defineComponent as ue, watch as de, onMounted as fe } from "vue";
|
|
2
|
+
import { getCustomClass as L, withInstall as me } from "../common/index.esm.js";
|
|
3
|
+
import { isPlainObject as I, cloneDeep as q } from "lodash-es";
|
|
4
|
+
import { resolveAppearance as pe } from "../dynamic-resolver/index.esm.js";
|
|
5
|
+
import { DgControl as _ } from "../designer-canvas/index.esm.js";
|
|
6
|
+
import ve from "../response-toolbar/index.esm.js";
|
|
7
|
+
import { LocaleService as G } from "../locale/index.esm.js";
|
|
8
|
+
function W(e, t) {
|
|
9
9
|
let n;
|
|
10
10
|
function r(i) {
|
|
11
|
-
const { properties: l, title:
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
s.id = `${
|
|
11
|
+
const { properties: l, title: p, ignore: o } = i, a = o && Array.isArray(o), s = Object.keys(l).reduce((b, g) => ((!a || !o.find((w) => w === g)) && (b[g] = l[g].type === "object" && l[g].properties ? r(l[g]) : q(l[g].default)), b), {});
|
|
12
|
+
if (p && (!a || !o.find((b) => b === "id"))) {
|
|
13
|
+
const b = p.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
s.id = `${b}_${Math.random().toString().slice(2, 6)}`;
|
|
15
15
|
}
|
|
16
16
|
return s;
|
|
17
17
|
}
|
|
18
18
|
function c(i) {
|
|
19
|
-
const { properties: l, title:
|
|
19
|
+
const { properties: l, title: p, required: o } = i;
|
|
20
20
|
if (o && Array.isArray(o)) {
|
|
21
|
-
const a = o.reduce((s,
|
|
22
|
-
if (
|
|
23
|
-
const s =
|
|
21
|
+
const a = o.reduce((s, b) => (s[b] = l[b].type === "object" && l[b].properties ? r(l[b]) : q(l[b].default), s), {});
|
|
22
|
+
if (p && o.find((s) => s === "id")) {
|
|
23
|
+
const s = p.toLowerCase().replace(/-/g, "_");
|
|
24
24
|
a.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
25
25
|
}
|
|
26
26
|
return a;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
type:
|
|
29
|
+
type: p
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function v(i, l = {}, p) {
|
|
33
33
|
const o = e[i];
|
|
34
34
|
if (o) {
|
|
35
35
|
let a = c(o);
|
|
36
36
|
const s = t[i];
|
|
37
|
-
return a = s ? s({ getSchemaByType:
|
|
37
|
+
return a = s ? s({ getSchemaByType: v }, a, l, p) : a, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(a), a;
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
41
|
function f(i, l) {
|
|
42
|
-
const
|
|
43
|
-
return Object.keys(
|
|
42
|
+
const p = r(l);
|
|
43
|
+
return Object.keys(p).reduce((o, a) => (Object.prototype.hasOwnProperty.call(i, a) && (o[a] && I(o[a]) && I(i[a] || !i[a]) ? Object.assign(o[a], i[a] || {}) : o[a] = i[a]), o), p), p;
|
|
44
44
|
}
|
|
45
45
|
function y(i, l) {
|
|
46
46
|
return Object.keys(i).filter((o) => i[o] != null).reduce((o, a) => {
|
|
@@ -49,107 +49,107 @@ function Q(e, t) {
|
|
|
49
49
|
if (typeof s == "string")
|
|
50
50
|
o[s] = i[a];
|
|
51
51
|
else {
|
|
52
|
-
const
|
|
53
|
-
Object.assign(o,
|
|
52
|
+
const b = s(a, i[a], i);
|
|
53
|
+
Object.assign(o, b);
|
|
54
54
|
}
|
|
55
55
|
} else
|
|
56
56
|
o[a] = i[a];
|
|
57
57
|
return o;
|
|
58
58
|
}, {});
|
|
59
59
|
}
|
|
60
|
-
function S(i, l,
|
|
60
|
+
function S(i, l, p = /* @__PURE__ */ new Map()) {
|
|
61
61
|
const o = f(i, l);
|
|
62
|
-
return y(o,
|
|
62
|
+
return y(o, p);
|
|
63
63
|
}
|
|
64
64
|
function u(i) {
|
|
65
|
-
var
|
|
65
|
+
var p;
|
|
66
66
|
const l = i.type;
|
|
67
67
|
if (l) {
|
|
68
68
|
const o = e[l];
|
|
69
69
|
if (!o)
|
|
70
70
|
return i;
|
|
71
|
-
const a = f(i, o), s = ((
|
|
71
|
+
const a = f(i, o), s = ((p = i.editor) == null ? void 0 : p.type) || "";
|
|
72
72
|
if (s) {
|
|
73
|
-
const
|
|
73
|
+
const b = e[s], g = f(i.editor, b);
|
|
74
74
|
a.editor = g;
|
|
75
75
|
}
|
|
76
76
|
return a;
|
|
77
77
|
}
|
|
78
78
|
return i;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function m(i) {
|
|
81
81
|
n = i;
|
|
82
82
|
}
|
|
83
|
-
return { getSchemaByType:
|
|
83
|
+
return { getSchemaByType: v, resolveSchemaWithDefaultValue: u, resolveSchemaToProps: S, mappingSchemaToProps: y, setDesignerContext: m };
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
function
|
|
87
|
-
function t(u,
|
|
85
|
+
const Z = {}, J = {}, { resolveSchemaWithDefaultValue: be, resolveSchemaToProps: ge, mappingSchemaToProps: ye } = W(Z, J);
|
|
86
|
+
function Ce(e = {}) {
|
|
87
|
+
function t(u, m, i, l) {
|
|
88
88
|
if (typeof i == "number")
|
|
89
89
|
return l[u].length === i;
|
|
90
90
|
if (typeof i == "object") {
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
91
|
+
const p = Object.keys(i)[0], o = i[p];
|
|
92
|
+
if (p === "not")
|
|
93
93
|
return Number(l[u].length) !== Number(o);
|
|
94
|
-
if (
|
|
94
|
+
if (p === "moreThan")
|
|
95
95
|
return Number(l[u].length) >= Number(o);
|
|
96
|
-
if (
|
|
96
|
+
if (p === "lessThan")
|
|
97
97
|
return Number(l[u].length) <= Number(o);
|
|
98
98
|
}
|
|
99
99
|
return !1;
|
|
100
100
|
}
|
|
101
|
-
function n(u,
|
|
101
|
+
function n(u, m, i, l) {
|
|
102
102
|
return l[u] && l[u].propertyValue && String(l[u].propertyValue.value) === String(i);
|
|
103
103
|
}
|
|
104
104
|
const r = /* @__PURE__ */ new Map([
|
|
105
105
|
["length", t],
|
|
106
106
|
["getProperty", n]
|
|
107
107
|
]);
|
|
108
|
-
Object.keys(e).reduce((u,
|
|
109
|
-
function c(u,
|
|
108
|
+
Object.keys(e).reduce((u, m) => (u.set(m, e[m]), u), r);
|
|
109
|
+
function c(u, m) {
|
|
110
110
|
const i = u;
|
|
111
|
-
return typeof
|
|
111
|
+
return typeof m == "number" ? [{ target: i, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: i, operator: "getProperty", param: u, value: !!m }] : typeof m == "object" ? Object.keys(m).map((l) => {
|
|
112
112
|
if (l === "length")
|
|
113
|
-
return { target: i, operator: "length", param: null, value:
|
|
114
|
-
const
|
|
115
|
-
return { target: i, operator: "getProperty", param:
|
|
113
|
+
return { target: i, operator: "length", param: null, value: m[l] };
|
|
114
|
+
const p = l, o = m[l];
|
|
115
|
+
return { target: i, operator: "getProperty", param: p, value: o };
|
|
116
116
|
}) : [];
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function v(u) {
|
|
119
119
|
return Object.keys(u).reduce((i, l) => {
|
|
120
|
-
const
|
|
121
|
-
return i.push(...
|
|
120
|
+
const p = c(l, u[l]);
|
|
121
|
+
return i.push(...p), i;
|
|
122
122
|
}, []);
|
|
123
123
|
}
|
|
124
|
-
function f(u,
|
|
124
|
+
function f(u, m) {
|
|
125
125
|
if (r.has(u.operator)) {
|
|
126
126
|
const i = r.get(u.operator);
|
|
127
|
-
return i && i(u.target, u.param, u.value,
|
|
127
|
+
return i && i(u.target, u.param, u.value, m) || !1;
|
|
128
128
|
}
|
|
129
129
|
return !1;
|
|
130
130
|
}
|
|
131
|
-
function y(u,
|
|
132
|
-
return
|
|
131
|
+
function y(u, m) {
|
|
132
|
+
return v(u).reduce((p, o) => p && f(o, m), !0);
|
|
133
133
|
}
|
|
134
|
-
function S(u,
|
|
135
|
-
const i = Object.keys(u), l = i.includes("allOf"),
|
|
136
|
-
return l ? !
|
|
134
|
+
function S(u, m) {
|
|
135
|
+
const i = Object.keys(u), l = i.includes("allOf"), p = i.includes("anyOf"), o = l || p, b = (o ? u[o ? l ? "allOf" : "anyOf" : "allOf"] : [u]).map((w) => y(w, m));
|
|
136
|
+
return l ? !b.includes(!1) : b.includes(!0);
|
|
137
137
|
}
|
|
138
138
|
return { parseValueSchema: S };
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const Se = {
|
|
141
141
|
convertTo: (e, t, n, r) => {
|
|
142
142
|
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
143
143
|
},
|
|
144
144
|
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
145
|
-
},
|
|
145
|
+
}, Te = {
|
|
146
146
|
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
147
|
-
},
|
|
147
|
+
}, he = {
|
|
148
148
|
convertTo: (e, t, n, r) => {
|
|
149
149
|
e.editor && (e.editor[t] = n);
|
|
150
150
|
},
|
|
151
151
|
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
152
|
-
},
|
|
152
|
+
}, xe = {
|
|
153
153
|
button: { type: "button", name: "按钮" },
|
|
154
154
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
155
155
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -202,18 +202,18 @@ const Fe = {
|
|
|
202
202
|
comment: { type: "comment", name: "评论区" },
|
|
203
203
|
"rich-text-editor": { type: "rich-text-editor", name: "富文本编辑器", icon: "rich-text-box" },
|
|
204
204
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
205
|
-
},
|
|
205
|
+
}, Fe = {
|
|
206
206
|
convertFrom: (e, t, n) => {
|
|
207
207
|
var c;
|
|
208
208
|
const r = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
209
|
-
return ((c =
|
|
209
|
+
return ((c = xe[r]) == null ? void 0 : c.name) || r;
|
|
210
210
|
}
|
|
211
|
-
},
|
|
211
|
+
}, we = {
|
|
212
212
|
convertTo: (e, t, n, r) => {
|
|
213
213
|
e[t] = e[t];
|
|
214
214
|
},
|
|
215
215
|
convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
|
|
216
|
-
},
|
|
216
|
+
}, ke = {
|
|
217
217
|
convertTo: (e, t, n, r) => {
|
|
218
218
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
|
|
219
219
|
[t]: n
|
|
@@ -244,7 +244,7 @@ const Fe = {
|
|
|
244
244
|
}
|
|
245
245
|
return "none";
|
|
246
246
|
}
|
|
247
|
-
},
|
|
247
|
+
}, Pe = {
|
|
248
248
|
convertTo: (e, t, n, r) => {
|
|
249
249
|
e.command ? e.command[t] = n : e.command = {
|
|
250
250
|
[t]: n
|
|
@@ -281,15 +281,17 @@ const Fe = {
|
|
|
281
281
|
var r, c;
|
|
282
282
|
if (e.command) {
|
|
283
283
|
if (t === "enableType") {
|
|
284
|
-
const
|
|
285
|
-
return e.command.enable ?
|
|
284
|
+
const v = (c = (r = e.command) == null ? void 0 : r.commands) == null ? void 0 : c.find((f) => f.command === "edit" && f.type === "primary");
|
|
285
|
+
return e.command.enable ? v ? "default" : "custom" : "unable";
|
|
286
286
|
}
|
|
287
287
|
if (t === "commands")
|
|
288
288
|
return e.command.enableType === "custom" ? e.command.commands : [];
|
|
289
|
+
if (t === "formatter")
|
|
290
|
+
return e.command.formatter;
|
|
289
291
|
}
|
|
290
292
|
return "";
|
|
291
293
|
}
|
|
292
|
-
},
|
|
294
|
+
}, Oe = {
|
|
293
295
|
convertTo: (e, t, n, r) => {
|
|
294
296
|
e.column ? e.column[t] = n : e.column = {
|
|
295
297
|
[t]: n
|
|
@@ -304,7 +306,7 @@ const Fe = {
|
|
|
304
306
|
}
|
|
305
307
|
return "";
|
|
306
308
|
}
|
|
307
|
-
},
|
|
309
|
+
}, Me = {
|
|
308
310
|
convertTo: (e, t, n, r) => {
|
|
309
311
|
e.summary ? e.summary[t] = n : e.summary = {
|
|
310
312
|
[t]: n
|
|
@@ -314,7 +316,7 @@ const Fe = {
|
|
|
314
316
|
});
|
|
315
317
|
},
|
|
316
318
|
convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
317
|
-
},
|
|
319
|
+
}, Ee = {
|
|
318
320
|
convertTo: (e, t, n, r) => {
|
|
319
321
|
e.group ? e.group[t] = n : e.group = {
|
|
320
322
|
[t]: n
|
|
@@ -332,7 +334,7 @@ const Fe = {
|
|
|
332
334
|
return e.group.showSummary;
|
|
333
335
|
}
|
|
334
336
|
}
|
|
335
|
-
},
|
|
337
|
+
}, Re = {
|
|
336
338
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
337
339
|
convertTo: (e, t, n) => {
|
|
338
340
|
if (n && n.length > 0) {
|
|
@@ -340,17 +342,17 @@ const Fe = {
|
|
|
340
342
|
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = r.bindingField, e.binding.field = r.id, e.binding.fullPath = r.path, e.path = r.bindingPath;
|
|
341
343
|
}
|
|
342
344
|
}
|
|
343
|
-
},
|
|
345
|
+
}, je = {
|
|
344
346
|
convertTo: (e, t, n, r) => {
|
|
345
347
|
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
346
348
|
},
|
|
347
349
|
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
348
|
-
},
|
|
350
|
+
}, De = {
|
|
349
351
|
convertTo: (e, t, n, r) => {
|
|
350
352
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
351
353
|
},
|
|
352
354
|
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
353
|
-
},
|
|
355
|
+
}, Ae = {
|
|
354
356
|
convertTo: (e, t, n, r) => {
|
|
355
357
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
356
358
|
},
|
|
@@ -358,24 +360,24 @@ const Fe = {
|
|
|
358
360
|
var r, c;
|
|
359
361
|
return t === "showCheckbox" ? (r = e.selection) != null && r.multiSelect ? !0 : (c = e.selection) == null ? void 0 : c.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
360
362
|
}
|
|
361
|
-
},
|
|
363
|
+
}, Ne = {
|
|
362
364
|
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
363
|
-
},
|
|
365
|
+
}, Be = {
|
|
364
366
|
convertFrom: (e, t) => e[t] || "",
|
|
365
367
|
convertTo: (e, t, n) => {
|
|
366
368
|
e[t] = n;
|
|
367
369
|
}
|
|
368
|
-
},
|
|
370
|
+
}, $e = {
|
|
369
371
|
convertTo: (e, t, n, r) => {
|
|
370
372
|
e.size || (e.size = {}), e.size[t] = n;
|
|
371
373
|
},
|
|
372
374
|
convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
|
|
373
|
-
},
|
|
375
|
+
}, He = {
|
|
374
376
|
convertFrom: (e, t, n) => {
|
|
375
377
|
var r, c;
|
|
376
378
|
return (r = e.formatter) != null && r.data && t === "formatterEnumData" && !e.formatterEnumData ? (c = e.formatter) == null ? void 0 : c.data : e.formatterEnumData;
|
|
377
379
|
}
|
|
378
|
-
},
|
|
380
|
+
}, Le = {
|
|
379
381
|
convertTo: (e, t, n, r) => {
|
|
380
382
|
e.sort || (e.sort = {}), e.sort[t] = n;
|
|
381
383
|
},
|
|
@@ -386,7 +388,7 @@ const Fe = {
|
|
|
386
388
|
if (t === "multiSort")
|
|
387
389
|
return !!((c = e.sort) != null && c.multiSort);
|
|
388
390
|
}
|
|
389
|
-
},
|
|
391
|
+
}, ze = {
|
|
390
392
|
convertTo: (e, t, n, r) => {
|
|
391
393
|
e.filter || (e.filter = {}), e.filter[t] = n;
|
|
392
394
|
},
|
|
@@ -395,7 +397,7 @@ const Fe = {
|
|
|
395
397
|
if (t === "mode")
|
|
396
398
|
return ((r = e.filter) == null ? void 0 : r.mode) || "client";
|
|
397
399
|
}
|
|
398
|
-
},
|
|
400
|
+
}, Ie = {
|
|
399
401
|
convertTo: (e, t, n, r) => {
|
|
400
402
|
e.rowOption ? e.rowOption[t] = n : e.rowOption = {
|
|
401
403
|
[t]: n
|
|
@@ -410,7 +412,7 @@ const Fe = {
|
|
|
410
412
|
}
|
|
411
413
|
return "";
|
|
412
414
|
}
|
|
413
|
-
},
|
|
415
|
+
}, qe = {
|
|
414
416
|
convertTo: (e, t, n, r) => {
|
|
415
417
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = n, t === "columnTemplateType" && n === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
416
418
|
<span class="f-pretend-link f-cursor-pointer"
|
|
@@ -419,34 +421,34 @@ const Fe = {
|
|
|
419
421
|
</span>` : e.columnTemplate = `
|
|
420
422
|
<span class="f-pretend-link f-cursor-pointer">
|
|
421
423
|
{{rowData.${e.field}}}
|
|
422
|
-
</span>`), t === "columnTemplateType" && n === "default" && (e.columnTemplate = ""));
|
|
424
|
+
</span>`), t === "columnTemplateType" && n === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && n === "custom" && (e.columnTemplate = ""));
|
|
423
425
|
},
|
|
424
426
|
convertFrom: (e, t, n) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
425
427
|
};
|
|
426
|
-
function
|
|
428
|
+
function Q(e, t, n) {
|
|
427
429
|
const r = /* @__PURE__ */ new Map([
|
|
428
|
-
["/converter/appearance.converter",
|
|
429
|
-
["/converter/buttons.converter",
|
|
430
|
-
["/converter/property-editor.converter",
|
|
431
|
-
["/converter/items-count.converter",
|
|
432
|
-
["/converter/type.converter",
|
|
433
|
-
["/converter/change-editor.converter",
|
|
434
|
-
["/converter/change-formatter.converter",
|
|
435
|
-
["/converter/column-command.converter",
|
|
436
|
-
["/converter/column-option.converter",
|
|
437
|
-
["/converter/summary.converter",
|
|
438
|
-
["/converter/group.converter",
|
|
439
|
-
["/converter/form-group-label.converter",
|
|
440
|
-
["/converter/field-selector.converter",
|
|
441
|
-
["/converter/pagination.converter",
|
|
442
|
-
["/converter/row-number.converter",
|
|
443
|
-
["/converter/grid-selection.converter",
|
|
444
|
-
["/converter/size.converter",
|
|
445
|
-
["/converter/change-formatter-enum.converter",
|
|
446
|
-
["/converter/grid-sort.converter",
|
|
447
|
-
["/converter/grid-filter.converter",
|
|
448
|
-
["/converter/row-option.converter",
|
|
449
|
-
["/converter/change-formatter-type.converter",
|
|
430
|
+
["/converter/appearance.converter", Se],
|
|
431
|
+
["/converter/buttons.converter", Te],
|
|
432
|
+
["/converter/property-editor.converter", he],
|
|
433
|
+
["/converter/items-count.converter", Ne],
|
|
434
|
+
["/converter/type.converter", Fe],
|
|
435
|
+
["/converter/change-editor.converter", we],
|
|
436
|
+
["/converter/change-formatter.converter", ke],
|
|
437
|
+
["/converter/column-command.converter", Pe],
|
|
438
|
+
["/converter/column-option.converter", Oe],
|
|
439
|
+
["/converter/summary.converter", Me],
|
|
440
|
+
["/converter/group.converter", Ee],
|
|
441
|
+
["/converter/form-group-label.converter", Be],
|
|
442
|
+
["/converter/field-selector.converter", Re],
|
|
443
|
+
["/converter/pagination.converter", je],
|
|
444
|
+
["/converter/row-number.converter", De],
|
|
445
|
+
["/converter/grid-selection.converter", Ae],
|
|
446
|
+
["/converter/size.converter", $e],
|
|
447
|
+
["/converter/change-formatter-enum.converter", He],
|
|
448
|
+
["/converter/grid-sort.converter", Le],
|
|
449
|
+
["/converter/grid-filter.converter", ze],
|
|
450
|
+
["/converter/row-option.converter", Ie],
|
|
451
|
+
["/converter/change-formatter-type.converter", qe]
|
|
450
452
|
]), c = /* @__PURE__ */ new Map([
|
|
451
453
|
["string", { type: "input-group", enableClear: !1 }],
|
|
452
454
|
["boolean", {
|
|
@@ -471,9 +473,9 @@ function Y(e, t, n) {
|
|
|
471
473
|
["array", { type: "button-edit" }],
|
|
472
474
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
473
475
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
474
|
-
]),
|
|
476
|
+
]), v = Ce();
|
|
475
477
|
function f(o, a) {
|
|
476
|
-
return () =>
|
|
478
|
+
return () => v.parseValueSchema(o, a);
|
|
477
479
|
}
|
|
478
480
|
function y(o, a, s) {
|
|
479
481
|
return o.includes("visible") && a.visible !== void 0 ? typeof a.visible == "boolean" ? () => !!a.visible : a.visible === void 0 ? !0 : f(a.visible, s) : () => !0;
|
|
@@ -485,84 +487,84 @@ function Y(e, t, n) {
|
|
|
485
487
|
const s = o.$converter || a;
|
|
486
488
|
return typeof s == "string" && s && r.has(s) ? r.get(s) || null : s || null;
|
|
487
489
|
}
|
|
488
|
-
function
|
|
490
|
+
function m(o, a, s, b, g, w = "", T = "") {
|
|
489
491
|
return Object.keys(o).map((C) => {
|
|
490
|
-
const k =
|
|
492
|
+
const k = j(1), O = C, d = o[C], P = Object.keys(d), N = d.title, D = d.type, A = c.get(D) || { type: "input-group", enableClear: !1 }, R = d.editor ? Object.assign({}, A, d.editor) : Object.assign({}, A), $ = y(P, d, a), B = S(P, d, a);
|
|
491
493
|
R.readonly = R.readonly === void 0 ? B() : R.readonly;
|
|
492
|
-
const
|
|
494
|
+
const H = d.type === "cascade" ? m(d.properties, a, s, b, g, w, T) : [], re = !0;
|
|
493
495
|
let M = u(d, T);
|
|
494
|
-
const
|
|
496
|
+
const oe = F({
|
|
495
497
|
get() {
|
|
496
498
|
if (k.value) {
|
|
497
|
-
if (["class", "style"].find((
|
|
499
|
+
if (["class", "style"].find((ce) => ce === O) && !M && (M = r.get("/converter/appearance.converter") || null), M && M.convertFrom)
|
|
498
500
|
return M.convertFrom(s, C, g, w);
|
|
499
|
-
const
|
|
500
|
-
return Object.prototype.hasOwnProperty.call(d, "defaultValue") && (
|
|
501
|
+
const E = s[C];
|
|
502
|
+
return Object.prototype.hasOwnProperty.call(d, "defaultValue") && (E === void 0 || typeof E == "string" && E === "") ? d.type === "boolean" ? d.defaultValue : d.defaultValue || "" : E;
|
|
501
503
|
}
|
|
502
504
|
return null;
|
|
503
505
|
},
|
|
504
|
-
set(
|
|
505
|
-
k.value += 1, M && M.convertTo ? (M.convertTo(
|
|
506
|
+
set(E) {
|
|
507
|
+
k.value += 1, M && M.convertTo ? (M.convertTo(b, C, E, g, w), M.convertTo(s, C, E, g, w)) : (b[C] = E, s[C] = E);
|
|
506
508
|
}
|
|
507
|
-
}), { refreshPanelAfterChanged:
|
|
508
|
-
return a[O] =
|
|
509
|
+
}), { refreshPanelAfterChanged: ie, description: ae, isExpand: le, parentPropertyID: se } = d, z = { propertyID: O, propertyName: N, propertyType: D, propertyValue: oe, editor: R, visible: $, readonly: B, cascadeConfig: H, hideCascadeTitle: re, refreshPanelAfterChanged: ie, description: ae, isExpand: le, parentPropertyID: se };
|
|
510
|
+
return a[O] = z, z;
|
|
509
511
|
});
|
|
510
512
|
}
|
|
511
513
|
function i(o, a, s = {}) {
|
|
512
|
-
const
|
|
514
|
+
const b = {}, g = e[o];
|
|
513
515
|
return g && g.categories ? Object.keys(g.categories).map((T) => {
|
|
514
|
-
const x = g.categories[T], C = x == null ? void 0 : x.title, k =
|
|
516
|
+
const x = g.categories[T], C = x == null ? void 0 : x.title, k = m(x.properties || {}, b, {}, s, a);
|
|
515
517
|
return { categoryId: T, categoryName: C, properties: k };
|
|
516
518
|
}) : [];
|
|
517
519
|
}
|
|
518
|
-
function l(o, a, s,
|
|
520
|
+
function l(o, a, s, b, g = "") {
|
|
519
521
|
const w = a.$ref.schema, T = a.$ref.converter, x = s[w], C = x.type, k = n(x), O = {}, d = e[C];
|
|
520
522
|
if (d && d.categories) {
|
|
521
|
-
const P = d.categories[o],
|
|
523
|
+
const P = d.categories[o], N = P == null ? void 0 : P.title;
|
|
522
524
|
T && Object.keys(P.properties).forEach((R) => {
|
|
523
525
|
P.properties[R].$converter = T;
|
|
524
526
|
});
|
|
525
|
-
const
|
|
526
|
-
return { categoryId: o, categoryName:
|
|
527
|
+
const D = (P == null ? void 0 : P.properties) || {}, A = m(D, O, k, x, b, g);
|
|
528
|
+
return { categoryId: o, categoryName: N, properties: A };
|
|
527
529
|
}
|
|
528
530
|
return { categoryId: o, categoryName: "", properties: [] };
|
|
529
531
|
}
|
|
530
|
-
function
|
|
532
|
+
function p(o, a, s, b, g) {
|
|
531
533
|
const w = o.type, T = n(o), x = {};
|
|
532
534
|
let C = g || e[w];
|
|
533
|
-
if (C && Object.keys(C).length === 0 && s && s.getPropConfig && (C = s.getPropConfig(
|
|
535
|
+
if (C && Object.keys(C).length === 0 && s && s.getPropConfig && (C = s.getPropConfig(b)), C && C.categories) {
|
|
534
536
|
const k = [];
|
|
535
537
|
return Object.keys(C.categories).map((O) => {
|
|
536
538
|
const d = C.categories[O];
|
|
537
539
|
if (d.$ref) {
|
|
538
|
-
k.push(l(O, d, o, a,
|
|
540
|
+
k.push(l(O, d, o, a, b));
|
|
539
541
|
return;
|
|
540
542
|
}
|
|
541
|
-
const P = d == null ? void 0 : d.title,
|
|
542
|
-
k.push({ categoryId: O, categoryName: P, tabId:
|
|
543
|
+
const P = d == null ? void 0 : d.title, N = d == null ? void 0 : d.tabId, D = d == null ? void 0 : d.tabName, A = d == null ? void 0 : d.hide, R = d == null ? void 0 : d.hideTitle, $ = m(d.properties || {}, x, T, o, a, b, d.$converter), { setPropertyRelates: B } = d, H = d == null ? void 0 : d.parentPropertyID;
|
|
544
|
+
k.push({ categoryId: O, categoryName: P, tabId: N, tabName: D, hide: A, properties: $, hideTitle: R, setPropertyRelates: B, parentPropertyID: H });
|
|
543
545
|
}), k;
|
|
544
546
|
}
|
|
545
547
|
return [];
|
|
546
548
|
}
|
|
547
549
|
return {
|
|
548
|
-
getPropertyConfigBySchema:
|
|
550
|
+
getPropertyConfigBySchema: p,
|
|
549
551
|
getPropertyConfigByType: i,
|
|
550
552
|
propertyConverterMap: r
|
|
551
553
|
};
|
|
552
554
|
}
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
const
|
|
556
|
-
|
|
557
|
-
function
|
|
558
|
-
return
|
|
555
|
+
const U = {}, X = {};
|
|
556
|
+
Q(U, X, be);
|
|
557
|
+
const Y = {}, V = {}, { resolveSchemaWithDefaultValue: _e } = W(Y, V), K = {}, ee = {};
|
|
558
|
+
Q(K, ee, _e);
|
|
559
|
+
function Ge(e, t, n = /* @__PURE__ */ new Map(), r = (f, y, S, u) => y, c = {}, v = (f) => f) {
|
|
560
|
+
return Z[t.title] = t, J[t.title] = r, U[t.title] = c, X[t.title] = v, Y[t.title] = t, V[t.title] = r, K[t.title] = c, ee[t.title] = v, (f = {}, y = !0) => {
|
|
559
561
|
if (!y)
|
|
560
|
-
return
|
|
561
|
-
const S =
|
|
562
|
+
return ye(f, n);
|
|
563
|
+
const S = ge(f, t, n), u = Object.keys(e).reduce((m, i) => (m[i] = e[i].default, m), {});
|
|
562
564
|
return Object.assign(u, S);
|
|
563
565
|
};
|
|
564
566
|
}
|
|
565
|
-
function
|
|
567
|
+
function We(e, t) {
|
|
566
568
|
if (!e || e.length < 1)
|
|
567
569
|
return null;
|
|
568
570
|
for (const n of e) {
|
|
@@ -576,23 +578,23 @@ function Qe(e, t) {
|
|
|
576
578
|
}
|
|
577
579
|
return null;
|
|
578
580
|
}
|
|
579
|
-
function
|
|
581
|
+
function Ze() {
|
|
580
582
|
function e(t, n) {
|
|
581
583
|
var y;
|
|
582
584
|
const r = (y = t.toolbar) == null ? void 0 : y.buttons;
|
|
583
585
|
if (!r || r.length < 1)
|
|
584
586
|
return null;
|
|
585
|
-
const [c,
|
|
587
|
+
const [c, v] = n.payloads, f = We(r, v);
|
|
586
588
|
return f ? f.onClick || f.click : null;
|
|
587
589
|
}
|
|
588
590
|
return {
|
|
589
591
|
resolve: e
|
|
590
592
|
};
|
|
591
593
|
}
|
|
592
|
-
function
|
|
594
|
+
function Je(e, t, n) {
|
|
593
595
|
return t ? { enableAccordion: n.accordionMode } : { enableAccordion: "" };
|
|
594
596
|
}
|
|
595
|
-
function
|
|
597
|
+
function Qe(e, t) {
|
|
596
598
|
var n;
|
|
597
599
|
return {
|
|
598
600
|
buttons: t.buttons,
|
|
@@ -601,20 +603,20 @@ function Ye(e, t) {
|
|
|
601
603
|
buttonsVisible: t.visible
|
|
602
604
|
};
|
|
603
605
|
}
|
|
604
|
-
const
|
|
605
|
-
["appearance",
|
|
606
|
+
const Ue = /* @__PURE__ */ new Map([
|
|
607
|
+
["appearance", pe],
|
|
606
608
|
["expanded", "expandStatus"],
|
|
607
|
-
["enableAccordion",
|
|
608
|
-
["toolbar",
|
|
609
|
+
["enableAccordion", Je],
|
|
610
|
+
["toolbar", Qe]
|
|
609
611
|
]);
|
|
610
|
-
function
|
|
611
|
-
var
|
|
612
|
+
function Xe(e, t) {
|
|
613
|
+
var v, f;
|
|
612
614
|
if (!(t != null && t.schema))
|
|
613
615
|
return;
|
|
614
|
-
const n = ((f = (
|
|
616
|
+
const n = ((f = (v = t.schema) == null ? void 0 : v.appearance) == null ? void 0 : f.class) || "", r = t.elementRef, c = window.getComputedStyle(r);
|
|
615
617
|
c && c.display === "flex" && !n.includes("f-page-child-fill") && (e.appearance.class += " d-block");
|
|
616
618
|
}
|
|
617
|
-
function
|
|
619
|
+
function Ye(e, t) {
|
|
618
620
|
var S;
|
|
619
621
|
const n = Math.random().toString().slice(2, 6), r = t.parentComponentInstance, c = e.getSchemaByType("section");
|
|
620
622
|
Object.assign(c, {
|
|
@@ -624,8 +626,8 @@ function Ke(e, t) {
|
|
|
624
626
|
},
|
|
625
627
|
mainTitle: t.mainTitle || c.mainTitle || "标题"
|
|
626
628
|
});
|
|
627
|
-
const
|
|
628
|
-
Object.assign(
|
|
629
|
+
const v = e.getSchemaByType("content-container");
|
|
630
|
+
Object.assign(v, {
|
|
629
631
|
id: `container-${n}`,
|
|
630
632
|
appearance: {
|
|
631
633
|
class: "f-struct-wrapper"
|
|
@@ -634,19 +636,19 @@ function Ke(e, t) {
|
|
|
634
636
|
});
|
|
635
637
|
const f = r.schema, y = ((S = f.appearance) == null ? void 0 : S.class) || "";
|
|
636
638
|
switch (f && f.type) {
|
|
637
|
-
case
|
|
638
|
-
c.appearance.class = "f-section-in-main", y.includes("f-page-child-fill") && (
|
|
639
|
+
case _["splitter-pane"].type: {
|
|
640
|
+
c.appearance.class = "f-section-in-main", y.includes("f-page-child-fill") && (v.appearance.class += " f-struct-wrapper-child", c.fill = !0);
|
|
639
641
|
break;
|
|
640
642
|
}
|
|
641
|
-
case
|
|
642
|
-
f.isLikeCardContainer && y.includes("f-struct-like-card-child-fill") && (
|
|
643
|
+
case _["content-container"].type:
|
|
644
|
+
f.isLikeCardContainer && y.includes("f-struct-like-card-child-fill") && (v.appearance.class += " f-struct-wrapper-child", c.fill = !0), Xe(v, r);
|
|
643
645
|
}
|
|
644
|
-
return
|
|
646
|
+
return v;
|
|
645
647
|
}
|
|
646
|
-
function
|
|
647
|
-
return n.parentComponentInstance ?
|
|
648
|
+
function Ve(e, t, n) {
|
|
649
|
+
return n.parentComponentInstance ? Ye(e, n) : t;
|
|
648
650
|
}
|
|
649
|
-
const
|
|
651
|
+
const Ke = "https://json-schema.org/draft/2020-12/schema", et = "https://farris-design.gitee.io/section.schema.json", tt = "section", nt = "A Farris Container Component", rt = "object", ot = {
|
|
650
652
|
id: {
|
|
651
653
|
description: "The unique identifier for a Section",
|
|
652
654
|
type: "string"
|
|
@@ -826,88 +828,19 @@ const et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-
|
|
|
826
828
|
type: "function",
|
|
827
829
|
default: null
|
|
828
830
|
}
|
|
829
|
-
},
|
|
831
|
+
}, it = [
|
|
830
832
|
"id",
|
|
831
833
|
"type",
|
|
832
834
|
"contents"
|
|
833
|
-
],
|
|
834
|
-
$schema:
|
|
835
|
-
$id:
|
|
836
|
-
title:
|
|
837
|
-
description:
|
|
838
|
-
type:
|
|
839
|
-
properties:
|
|
840
|
-
required:
|
|
841
|
-
},
|
|
842
|
-
id: {
|
|
843
|
-
description: "The unique identifier for a Section Toolbar",
|
|
844
|
-
type: "string"
|
|
845
|
-
},
|
|
846
|
-
type: {
|
|
847
|
-
description: "The type string of Section Toolbar",
|
|
848
|
-
type: "string",
|
|
849
|
-
default: "section-toolbar"
|
|
850
|
-
},
|
|
851
|
-
appearance: {
|
|
852
|
-
description: "",
|
|
853
|
-
type: "object",
|
|
854
|
-
properties: {
|
|
855
|
-
class: {
|
|
856
|
-
type: "string",
|
|
857
|
-
default: ""
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
},
|
|
861
|
-
alignment: {
|
|
862
|
-
description: "The alignment of Section Toolbar Button.",
|
|
863
|
-
type: "string",
|
|
864
|
-
default: "right"
|
|
865
|
-
},
|
|
866
|
-
buttons: {
|
|
867
|
-
description: "The items of Section Toolbar.",
|
|
868
|
-
type: "array",
|
|
869
|
-
default: []
|
|
870
|
-
},
|
|
871
|
-
buttonSize: {
|
|
872
|
-
type: "string",
|
|
873
|
-
default: ""
|
|
874
|
-
},
|
|
875
|
-
visible: {
|
|
876
|
-
description: "",
|
|
877
|
-
type: "boolean",
|
|
878
|
-
default: !0
|
|
879
|
-
}
|
|
880
|
-
}, pt = [
|
|
881
|
-
"id",
|
|
882
|
-
"type",
|
|
883
|
-
"buttons"
|
|
884
|
-
], mt = {
|
|
885
|
-
onClick: "点击事件"
|
|
886
|
-
}, bt = {
|
|
887
|
-
$schema: lt,
|
|
888
|
-
$id: st,
|
|
889
|
-
title: ct,
|
|
890
|
-
description: ut,
|
|
891
|
-
type: dt,
|
|
892
|
-
properties: ft,
|
|
893
|
-
required: pt,
|
|
894
|
-
events: mt
|
|
895
|
-
}, vt = {
|
|
896
|
-
id: { type: String, default: "" },
|
|
897
|
-
/** 组件自定义样式 */
|
|
898
|
-
customClass: { type: String, default: "" },
|
|
899
|
-
alignment: { Type: String, default: "right" },
|
|
900
|
-
items: {
|
|
901
|
-
Type: Array,
|
|
902
|
-
default: []
|
|
903
|
-
},
|
|
904
|
-
/** 控制是否可见 */
|
|
905
|
-
visible: { type: Boolean, default: !0 }
|
|
906
|
-
};
|
|
907
|
-
function gt(e, t, n) {
|
|
908
|
-
return t;
|
|
909
|
-
}
|
|
910
|
-
const I = {
|
|
835
|
+
], at = {
|
|
836
|
+
$schema: Ke,
|
|
837
|
+
$id: et,
|
|
838
|
+
title: tt,
|
|
839
|
+
description: nt,
|
|
840
|
+
type: rt,
|
|
841
|
+
properties: ot,
|
|
842
|
+
required: it
|
|
843
|
+
}, te = {
|
|
911
844
|
/** 设置内容区域样式 */
|
|
912
845
|
contentClass: { type: String, default: "" },
|
|
913
846
|
/** 自定义样式 */
|
|
@@ -966,23 +899,8 @@ const I = {
|
|
|
966
899
|
// toolbarPosition: { type: String, default: '' },
|
|
967
900
|
// toolbarButtons: { type: Array<object>, default: [] },
|
|
968
901
|
// toolbar: { type: Object as PropType<ToolbarConfig>, default: {} }
|
|
969
|
-
},
|
|
970
|
-
|
|
971
|
-
I,
|
|
972
|
-
{
|
|
973
|
-
componentId: { type: String, default: "" },
|
|
974
|
-
headerTitleHtml: { type: String, default: "" },
|
|
975
|
-
headerHtml: { type: String, default: "" },
|
|
976
|
-
headerContentHtml: { type: String, default: "" },
|
|
977
|
-
toolbarHtml: { type: String, default: "" }
|
|
978
|
-
}
|
|
979
|
-
), Rt = z(
|
|
980
|
-
vt,
|
|
981
|
-
bt,
|
|
982
|
-
q,
|
|
983
|
-
gt
|
|
984
|
-
), Et = z(yt, ie, q, oe);
|
|
985
|
-
function Ct(e, t, n) {
|
|
902
|
+
}, gt = Ge(te, at, Ue, Ve), yt = Ze();
|
|
903
|
+
function lt(e, t, n) {
|
|
986
904
|
let r;
|
|
987
905
|
function c(S = 1) {
|
|
988
906
|
const u = [
|
|
@@ -995,14 +913,14 @@ function Ct(e, t, n) {
|
|
|
995
913
|
"body>.popover.show",
|
|
996
914
|
"body>filter-row-panel>.f-datagrid-filter-panel",
|
|
997
915
|
"body>.f-section-maximize"
|
|
998
|
-
],
|
|
999
|
-
const { display:
|
|
1000
|
-
return
|
|
916
|
+
], m = Array.from(document.body.querySelectorAll(u.join(","))).filter((l) => l).map((l) => {
|
|
917
|
+
const { display: p, zIndex: o } = window.getComputedStyle(l);
|
|
918
|
+
return p === "none" ? 0 : parseInt(o, 10);
|
|
1001
919
|
}).filter((l) => l);
|
|
1002
|
-
let i = Math.max(...
|
|
920
|
+
let i = Math.max(...m);
|
|
1003
921
|
return i < 1040 && (i = 1040), i + S;
|
|
1004
922
|
}
|
|
1005
|
-
function
|
|
923
|
+
function v() {
|
|
1006
924
|
r = e.value.nextElementSibling;
|
|
1007
925
|
const S = document && document.querySelector("body");
|
|
1008
926
|
S && (S.appendChild(e.value), e.value.style.zIndex = c());
|
|
@@ -1014,17 +932,17 @@ function Ct(e, t, n) {
|
|
|
1014
932
|
) : t.value.appendChild(e.value), e.value.style.zIndex = null;
|
|
1015
933
|
}
|
|
1016
934
|
function y() {
|
|
1017
|
-
!e || !t.value || (n.value = !n.value, n.value ?
|
|
935
|
+
!e || !t.value || (n.value = !n.value, n.value ? v() : f());
|
|
1018
936
|
}
|
|
1019
937
|
return { onClickMaxMinIcon: y };
|
|
1020
938
|
}
|
|
1021
|
-
function
|
|
1022
|
-
const n =
|
|
1023
|
-
function f(u,
|
|
1024
|
-
t.emit("click", u,
|
|
939
|
+
function ne(e, t) {
|
|
940
|
+
const n = j(e.buttons), r = F(() => e.buttonPosition === "inHead" ? "right" : "left"), c = F(() => "f-section-toolbar col-6" + (e.buttonPosition === "inHead" ? " f-toolbar f-section-header--toolbar" : " f-section-content--toolbar") + (e.buttonsClass ? " " + e.buttonsClass : "")), v = F(() => e.buttons && e.buttons.length > 0 && e.buttonPosition === "inHead");
|
|
941
|
+
function f(u, m) {
|
|
942
|
+
t.emit("click", u, m);
|
|
1025
943
|
}
|
|
1026
944
|
function y() {
|
|
1027
|
-
return
|
|
945
|
+
return v.value && h(ve, {
|
|
1028
946
|
customClass: c.value,
|
|
1029
947
|
items: n.value,
|
|
1030
948
|
onClick: f,
|
|
@@ -1042,19 +960,19 @@ function ae(e, t) {
|
|
|
1042
960
|
}
|
|
1043
961
|
return () => e.toolbarRenderFunction ? S() : y();
|
|
1044
962
|
}
|
|
1045
|
-
function
|
|
963
|
+
function st(e, t, n, r, c, v) {
|
|
1046
964
|
const f = {
|
|
1047
|
-
collapseLabel:
|
|
1048
|
-
expandLabel:
|
|
1049
|
-
}, y = F(() => e.buttonPosition), S =
|
|
965
|
+
collapseLabel: G.getRealPropertyValue(e.collapseLabel, "收起", "section.collapseLabel"),
|
|
966
|
+
expandLabel: G.getRealPropertyValue(e.expandLabel, "展开", "section.expandLabel")
|
|
967
|
+
}, y = F(() => e.buttonPosition), S = ne(e, t), {
|
|
1050
968
|
onClickMaxMinIcon: u
|
|
1051
|
-
} =
|
|
969
|
+
} = lt(r, c, v), m = F(() => e.enableMaximize), i = F(() => e.enableAccordion !== ""), l = F(() => {
|
|
1052
970
|
const T = {
|
|
1053
971
|
"f-section-header": !0
|
|
1054
972
|
};
|
|
1055
973
|
return t.slots.header && e.headerClass.split(" ").reduce((C, k) => (C[k] = !0, C), T), T;
|
|
1056
974
|
});
|
|
1057
|
-
function
|
|
975
|
+
function p(T) {
|
|
1058
976
|
T.stopPropagation(), e.enableAccordion !== "" && (n.value = !n.value);
|
|
1059
977
|
}
|
|
1060
978
|
function o() {
|
|
@@ -1065,17 +983,17 @@ function St(e, t, n, r, c, b) {
|
|
|
1065
983
|
"f-state-expand": n.value
|
|
1066
984
|
})), x = F(() => ({
|
|
1067
985
|
"f-icon": !0,
|
|
1068
|
-
"f-icon-maximize": !
|
|
1069
|
-
"f-icon-minimize":
|
|
986
|
+
"f-icon-maximize": !v.value,
|
|
987
|
+
"f-icon-minimize": v.value
|
|
1070
988
|
}));
|
|
1071
989
|
return h("div", {
|
|
1072
990
|
class: "f-max-accordion"
|
|
1073
|
-
}, [
|
|
991
|
+
}, [m.value ? h("span", {
|
|
1074
992
|
class: x.value,
|
|
1075
993
|
onClick: u
|
|
1076
994
|
}, null) : "", i.value ? h("button", {
|
|
1077
995
|
class: T.value,
|
|
1078
|
-
onClick:
|
|
996
|
+
onClick: p
|
|
1079
997
|
}, [h("span", null, [n.value ? f.collapseLabel : f.expandLabel])]) : ""]);
|
|
1080
998
|
}
|
|
1081
999
|
function a() {
|
|
@@ -1098,13 +1016,13 @@ function St(e, t, n, r, c, b) {
|
|
|
1098
1016
|
class: T.value
|
|
1099
1017
|
}, [e.headerContentRenderFunction()]) : null;
|
|
1100
1018
|
}
|
|
1101
|
-
function
|
|
1019
|
+
function b() {
|
|
1102
1020
|
return t.slots.headerTitle ? t.slots.headerTitle() : e.headerTitleRenderFunction ? e.headerTitleRenderFunction() : a();
|
|
1103
1021
|
}
|
|
1104
1022
|
function g() {
|
|
1105
1023
|
return h("div", {
|
|
1106
1024
|
class: l.value
|
|
1107
|
-
}, [
|
|
1025
|
+
}, [b(), s(), y.value === "inHead" && S(), (m.value || i.value) && o()]);
|
|
1108
1026
|
}
|
|
1109
1027
|
function w() {
|
|
1110
1028
|
return t.slots.header ? h("div", {
|
|
@@ -1115,39 +1033,39 @@ function St(e, t, n, r, c, b) {
|
|
|
1115
1033
|
}
|
|
1116
1034
|
return () => e.showHeader && w();
|
|
1117
1035
|
}
|
|
1118
|
-
const
|
|
1036
|
+
const ct = /* @__PURE__ */ ue({
|
|
1119
1037
|
name: "FSection",
|
|
1120
|
-
props:
|
|
1038
|
+
props: te,
|
|
1121
1039
|
emits: ["click"],
|
|
1122
1040
|
setup(e, t) {
|
|
1123
|
-
const n =
|
|
1041
|
+
const n = j(), r = j(), c = j(e.customClass), v = F(() => e.enableAccordion), f = j(e.expandStatus), y = F(() => e.buttonPosition), S = j(!1), u = st(e, t, f, n, r, S), m = ne(e, t), i = F(() => {
|
|
1124
1042
|
const s = {
|
|
1125
1043
|
"f-section": !0,
|
|
1126
|
-
"f-section-accordion":
|
|
1127
|
-
"f-state-collapse": (
|
|
1128
|
-
"f-section-custom-accordion":
|
|
1044
|
+
"f-section-accordion": v.value === "default",
|
|
1045
|
+
"f-state-collapse": (v.value === "default" || v.value === "custom") && !f.value,
|
|
1046
|
+
"f-section-custom-accordion": v.value === "custom",
|
|
1129
1047
|
"f-section-fill": e.fill,
|
|
1130
1048
|
"f-section-maximize": S.value
|
|
1131
1049
|
};
|
|
1132
1050
|
return L(s, c.value);
|
|
1133
1051
|
}), l = F(() => L({
|
|
1134
1052
|
"f-section-content": !0
|
|
1135
|
-
}, e.contentClass)),
|
|
1053
|
+
}, e.contentClass)), p = F(() => L({
|
|
1136
1054
|
"f-section-extend": !0
|
|
1137
1055
|
}, e.extendClass));
|
|
1138
1056
|
function o() {
|
|
1139
1057
|
return t.slots.extend && h("div", {
|
|
1140
|
-
class:
|
|
1058
|
+
class: p.value
|
|
1141
1059
|
}, [t.slots.extend()]);
|
|
1142
1060
|
}
|
|
1143
1061
|
function a() {
|
|
1144
1062
|
return h("div", {
|
|
1145
1063
|
class: l.value
|
|
1146
|
-
}, [y.value === "inContent" &&
|
|
1064
|
+
}, [y.value === "inContent" && m(), t.slots.default && t.slots.default()]);
|
|
1147
1065
|
}
|
|
1148
|
-
return
|
|
1149
|
-
s !==
|
|
1150
|
-
}),
|
|
1066
|
+
return de(() => e.expandStatus, (s, b) => {
|
|
1067
|
+
s !== b && (f.value = s);
|
|
1068
|
+
}), fe(() => {
|
|
1151
1069
|
n.value && n.value && (r.value = n.value.parentElement);
|
|
1152
1070
|
}), () => e.visible ? h("div", {
|
|
1153
1071
|
class: i.value,
|
|
@@ -1155,7 +1073,7 @@ const Tt = /* @__PURE__ */ me({
|
|
|
1155
1073
|
style: e.customStyle
|
|
1156
1074
|
}, [u(), o(), a()]) : null;
|
|
1157
1075
|
}
|
|
1158
|
-
}),
|
|
1076
|
+
}), Ct = {
|
|
1159
1077
|
id: { type: String, default: "" },
|
|
1160
1078
|
items: { type: Object, default: {} },
|
|
1161
1079
|
class: { type: String, default: "" },
|
|
@@ -1171,15 +1089,12 @@ const Tt = /* @__PURE__ */ me({
|
|
|
1171
1089
|
isDP: { type: Boolean, default: !1 },
|
|
1172
1090
|
// 是否下拉项
|
|
1173
1091
|
isDPItem: { type: Boolean, default: !1 }
|
|
1174
|
-
},
|
|
1092
|
+
}, St = me(ct);
|
|
1175
1093
|
export {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
I as sectionProps,
|
|
1183
|
-
$t as sectionToolbarItemProps,
|
|
1184
|
-
Rt as sectionToolbarPropsResolver
|
|
1094
|
+
ct as Section,
|
|
1095
|
+
St as default,
|
|
1096
|
+
yt as eventHandlerResolver,
|
|
1097
|
+
gt as propsResolver,
|
|
1098
|
+
te as sectionProps,
|
|
1099
|
+
Ct as sectionToolbarItemProps
|
|
1185
1100
|
};
|