@farris/ui-vue 1.6.5-beta.8 → 1.6.6
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 +335 -335
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +6 -6
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +139 -134
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +300 -300
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -6
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +295 -295
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3407 -3338
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +833 -832
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +5 -5
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +173 -172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +637 -637
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +737 -732
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +728 -706
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +670 -665
- package/components/filter-condition-editor/index.umd.cjs +2 -2
- package/components/flow-canvas/index.esm.js +205 -205
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +77 -76
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +4 -2
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +42 -40
- package/components/list-view/index.umd.cjs +2 -2
- package/components/lookup/index.esm.js +118 -118
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +482 -483
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +424 -424
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +276 -276
- package/components/modal/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +161 -161
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +322 -316
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +541 -534
- package/components/order/index.umd.cjs +2 -2
- package/components/page-header/index.esm.js +1 -1
- package/components/page-header/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +58 -56
- package/components/popover/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +216 -216
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +489 -467
- package/components/query-solution/index.umd.cjs +3 -3
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +282 -282
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +875 -873
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +504 -496
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/search-box/index.esm.js +76 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +212 -212
- package/components/section/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +382 -377
- package/components/sort-condition-editor/index.umd.cjs +2 -2
- package/components/tabs/index.esm.js +584 -582
- package/components/tabs/index.umd.cjs +2 -2
- package/components/textarea/index.esm.js +362 -362
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +9799 -0
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/time-picker/package.json +8 -0
- package/components/time-picker/style.js +6 -0
- package/components/transfer/index.esm.js +81 -79
- package/components/transfer/index.umd.cjs +2 -2
- package/components/tree-grid/index.esm.js +100 -100
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2361 -2279
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/video/index.esm.js +220 -220
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +4856 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +254 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +381 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +15445 -0
- package/designer/data-grid/index.umd.cjs +23 -0
- package/designer/data-view/index.esm.js +854 -0
- package/designer/data-view/index.umd.cjs +38 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +525 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +22331 -0
- package/designer/farris-designer.all.umd.cjs +34 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +1099 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/list-view/index.css +1 -0
- package/designer/list-view/index.esm.js +4685 -0
- package/designer/list-view/index.umd.cjs +40 -0
- package/designer/radio-group/index.css +1 -0
- package/designer/radio-group/index.esm.js +6989 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +1099 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +13299 -13177
- package/farris.all.umd.cjs +25 -25
- package/locales/data-grid/ui/en.json +4 -3
- 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 +9 -7
- package/locales/designer/zh-CHS.json +4 -2
- package/locales/designer/zh-CHT.json +4 -2
- package/locales/ui/en.json +9 -7
- package/locales/ui/zh-CHS.json +4 -2
- package/locales/ui/zh-CHT.json +4 -2
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
|
@@ -12,18 +12,18 @@ import { useDesignerComponent as yt } from "../designer-canvas/index.esm.js";
|
|
|
12
12
|
import { InputBaseProperty as bt } from "../property-panel/index.esm.js";
|
|
13
13
|
function ye(e, t) {
|
|
14
14
|
let n;
|
|
15
|
-
function
|
|
16
|
-
const { properties:
|
|
15
|
+
function o(r) {
|
|
16
|
+
const { properties: i, title: c, ignore: a } = r, l = a && Array.isArray(a), s = Object.keys(i).reduce((h, u) => ((!l || !a.find((g) => g === u)) && (h[u] = i[u].type === "object" && i[u].properties ? o(i[u]) : de(i[u].default)), h), {});
|
|
17
17
|
if (c && (!l || !a.find((h) => h === "id"))) {
|
|
18
18
|
const h = c.toLowerCase().replace(/-/g, "_");
|
|
19
19
|
s.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
20
20
|
}
|
|
21
21
|
return s;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const { properties:
|
|
23
|
+
function f(r) {
|
|
24
|
+
const { properties: i, title: c, required: a } = r;
|
|
25
25
|
if (a && Array.isArray(a)) {
|
|
26
|
-
const l = a.reduce((s, h) => (s[h] =
|
|
26
|
+
const l = a.reduce((s, h) => (s[h] = i[h].type === "object" && i[h].properties ? o(i[h]) : de(i[h].default), s), {});
|
|
27
27
|
if (c && a.find((s) => s === "id")) {
|
|
28
28
|
const s = c.toLowerCase().replace(/-/g, "_");
|
|
29
29
|
l.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -34,23 +34,23 @@ function ye(e, t) {
|
|
|
34
34
|
type: c
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function v(r,
|
|
37
|
+
function v(r, i = {}, c) {
|
|
38
38
|
const a = e[r];
|
|
39
39
|
if (a) {
|
|
40
|
-
let l =
|
|
40
|
+
let l = f(a);
|
|
41
41
|
const s = t[r];
|
|
42
|
-
return l = s ? s({ getSchemaByType: v }, l,
|
|
42
|
+
return l = s ? s({ getSchemaByType: v }, l, i, c) : l, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(l), l;
|
|
43
43
|
}
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const c = i
|
|
46
|
+
function m(r, i) {
|
|
47
|
+
const c = o(i);
|
|
48
48
|
return Object.keys(c).reduce((a, l) => (Object.prototype.hasOwnProperty.call(r, l) && (a[l] && fe(a[l]) && fe(r[l] || !r[l]) ? Object.assign(a[l], r[l] || {}) : a[l] = r[l]), a), c), c;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function S(r, i) {
|
|
51
51
|
return Object.keys(r).filter((a) => r[a] != null).reduce((a, l) => {
|
|
52
|
-
if (
|
|
53
|
-
const s =
|
|
52
|
+
if (i.has(l)) {
|
|
53
|
+
const s = i.get(l);
|
|
54
54
|
if (typeof s == "string")
|
|
55
55
|
a[s] = r[l];
|
|
56
56
|
else {
|
|
@@ -62,20 +62,20 @@ function ye(e, t) {
|
|
|
62
62
|
return a;
|
|
63
63
|
}, {});
|
|
64
64
|
}
|
|
65
|
-
function k(r,
|
|
66
|
-
const a =
|
|
67
|
-
return
|
|
65
|
+
function k(r, i, c = /* @__PURE__ */ new Map()) {
|
|
66
|
+
const a = m(r, i);
|
|
67
|
+
return S(a, c);
|
|
68
68
|
}
|
|
69
69
|
function p(r) {
|
|
70
70
|
var c;
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const a = e[
|
|
71
|
+
const i = r.type;
|
|
72
|
+
if (i) {
|
|
73
|
+
const a = e[i];
|
|
74
74
|
if (!a)
|
|
75
75
|
return r;
|
|
76
|
-
const l =
|
|
76
|
+
const l = m(r, a), s = ((c = r.editor) == null ? void 0 : c.type) || "";
|
|
77
77
|
if (s) {
|
|
78
|
-
const h = e[s], u =
|
|
78
|
+
const h = e[s], u = m(r.editor, h);
|
|
79
79
|
l.editor = u;
|
|
80
80
|
}
|
|
81
81
|
return l;
|
|
@@ -85,72 +85,72 @@ function ye(e, t) {
|
|
|
85
85
|
function y(r) {
|
|
86
86
|
n = r;
|
|
87
87
|
}
|
|
88
|
-
return { getSchemaByType: v, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: k, mappingSchemaToProps:
|
|
88
|
+
return { getSchemaByType: v, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: k, mappingSchemaToProps: S, setDesignerContext: y };
|
|
89
89
|
}
|
|
90
90
|
const be = {}, Se = {}, { getSchemaByType: ro, resolveSchemaWithDefaultValue: St, resolveSchemaToProps: Ct, mappingSchemaToProps: wt, setDesignerContext: lo } = ye(be, Se);
|
|
91
91
|
function Ft(e = {}) {
|
|
92
|
-
function t(p, y, r,
|
|
92
|
+
function t(p, y, r, i) {
|
|
93
93
|
if (typeof r == "number")
|
|
94
|
-
return
|
|
94
|
+
return i[p].length === r;
|
|
95
95
|
if (typeof r == "object") {
|
|
96
96
|
const c = Object.keys(r)[0], a = r[c];
|
|
97
97
|
if (c === "not")
|
|
98
|
-
return Number(
|
|
98
|
+
return Number(i[p].length) !== Number(a);
|
|
99
99
|
if (c === "moreThan")
|
|
100
|
-
return Number(
|
|
100
|
+
return Number(i[p].length) >= Number(a);
|
|
101
101
|
if (c === "lessThan")
|
|
102
|
-
return Number(
|
|
102
|
+
return Number(i[p].length) <= Number(a);
|
|
103
103
|
}
|
|
104
104
|
return !1;
|
|
105
105
|
}
|
|
106
|
-
function n(p, y, r,
|
|
107
|
-
return
|
|
106
|
+
function n(p, y, r, i) {
|
|
107
|
+
return i[p] && i[p].propertyValue && String(i[p].propertyValue.value) === String(r);
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const o = /* @__PURE__ */ new Map([
|
|
110
110
|
["length", t],
|
|
111
111
|
["getProperty", n]
|
|
112
112
|
]);
|
|
113
|
-
Object.keys(e).reduce((p, y) => (p.set(y, e[y]), p),
|
|
114
|
-
function
|
|
113
|
+
Object.keys(e).reduce((p, y) => (p.set(y, e[y]), p), o);
|
|
114
|
+
function f(p, y) {
|
|
115
115
|
const r = p;
|
|
116
|
-
return typeof y == "number" ? [{ target: r, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: r, operator: "getProperty", param: p, value: !!y }] : typeof y == "object" ? Object.keys(y).map((
|
|
117
|
-
if (
|
|
118
|
-
return { target: r, operator: "length", param: null, value: y[
|
|
119
|
-
const c =
|
|
116
|
+
return typeof y == "number" ? [{ target: r, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: r, operator: "getProperty", param: p, value: !!y }] : typeof y == "object" ? Object.keys(y).map((i) => {
|
|
117
|
+
if (i === "length")
|
|
118
|
+
return { target: r, operator: "length", param: null, value: y[i] };
|
|
119
|
+
const c = i, a = y[i];
|
|
120
120
|
return { target: r, operator: "getProperty", param: c, value: a };
|
|
121
121
|
}) : [];
|
|
122
122
|
}
|
|
123
123
|
function v(p) {
|
|
124
|
-
return Object.keys(p).reduce((r,
|
|
125
|
-
const c =
|
|
124
|
+
return Object.keys(p).reduce((r, i) => {
|
|
125
|
+
const c = f(i, p[i]);
|
|
126
126
|
return r.push(...c), r;
|
|
127
127
|
}, []);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
const r =
|
|
129
|
+
function m(p, y) {
|
|
130
|
+
if (o.has(p.operator)) {
|
|
131
|
+
const r = o.get(p.operator);
|
|
132
132
|
return r && r(p.target, p.param, p.value, y) || !1;
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return v(p).reduce((c, a) => c &&
|
|
136
|
+
function S(p, y) {
|
|
137
|
+
return v(p).reduce((c, a) => c && m(a, y), !0);
|
|
138
138
|
}
|
|
139
139
|
function k(p, y) {
|
|
140
|
-
const r = Object.keys(p),
|
|
141
|
-
return
|
|
140
|
+
const r = Object.keys(p), i = r.includes("allOf"), c = r.includes("anyOf"), a = i || c, h = (a ? p[a ? i ? "allOf" : "anyOf" : "allOf"] : [p]).map((g) => S(g, y));
|
|
141
|
+
return i ? !h.includes(!1) : h.includes(!0);
|
|
142
142
|
}
|
|
143
143
|
return { parseValueSchema: k };
|
|
144
144
|
}
|
|
145
145
|
const Tt = {
|
|
146
|
-
convertTo: (e, t, n,
|
|
146
|
+
convertTo: (e, t, n, o) => {
|
|
147
147
|
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
148
148
|
},
|
|
149
149
|
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
150
150
|
}, kt = {
|
|
151
151
|
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
152
|
-
},
|
|
153
|
-
convertTo: (e, t, n,
|
|
152
|
+
}, Vt = {
|
|
153
|
+
convertTo: (e, t, n, o) => {
|
|
154
154
|
e.editor && (e.editor[t] = n);
|
|
155
155
|
},
|
|
156
156
|
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
@@ -201,19 +201,19 @@ const Tt = {
|
|
|
201
201
|
"list-view": { type: "list-view", name: "列表" },
|
|
202
202
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
203
203
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
204
|
-
},
|
|
204
|
+
}, Ot = {
|
|
205
205
|
convertFrom: (e, t, n) => {
|
|
206
|
-
var
|
|
207
|
-
const
|
|
208
|
-
return ((
|
|
206
|
+
var f;
|
|
207
|
+
const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
208
|
+
return ((f = Ce[o]) == null ? void 0 : f.name) || o;
|
|
209
209
|
}
|
|
210
210
|
}, Pt = {
|
|
211
|
-
convertTo: (e, t, n,
|
|
211
|
+
convertTo: (e, t, n, o) => {
|
|
212
212
|
e[t] = e[t];
|
|
213
213
|
},
|
|
214
214
|
convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
|
|
215
215
|
}, Bt = {
|
|
216
|
-
convertTo: (e, t, n,
|
|
216
|
+
convertTo: (e, t, n, o) => {
|
|
217
217
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
|
|
218
218
|
[t]: n
|
|
219
219
|
});
|
|
@@ -244,7 +244,7 @@ const Tt = {
|
|
|
244
244
|
return "none";
|
|
245
245
|
}
|
|
246
246
|
}, It = {
|
|
247
|
-
convertTo: (e, t, n,
|
|
247
|
+
convertTo: (e, t, n, o) => {
|
|
248
248
|
e.command ? e.command[t] = n : e.command = {
|
|
249
249
|
[t]: n
|
|
250
250
|
}, t === "enable" && n && (e.command.commands || (e.command.commands = [
|
|
@@ -262,7 +262,7 @@ const Tt = {
|
|
|
262
262
|
},
|
|
263
263
|
convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : ""
|
|
264
264
|
}, Mt = {
|
|
265
|
-
convertTo: (e, t, n,
|
|
265
|
+
convertTo: (e, t, n, o) => {
|
|
266
266
|
e.column ? e.column[t] = n : e.column = {
|
|
267
267
|
[t]: n
|
|
268
268
|
}, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
@@ -277,7 +277,7 @@ const Tt = {
|
|
|
277
277
|
return "";
|
|
278
278
|
}
|
|
279
279
|
}, Rt = {
|
|
280
|
-
convertTo: (e, t, n,
|
|
280
|
+
convertTo: (e, t, n, o) => {
|
|
281
281
|
e.summary ? e.summary[t] = n : e.summary = {
|
|
282
282
|
[t]: n
|
|
283
283
|
}, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
@@ -287,7 +287,7 @@ const Tt = {
|
|
|
287
287
|
},
|
|
288
288
|
convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
289
289
|
}, Et = {
|
|
290
|
-
convertTo: (e, t, n,
|
|
290
|
+
convertTo: (e, t, n, o) => {
|
|
291
291
|
e.group ? e.group[t] = n : e.group = {
|
|
292
292
|
[t]: n
|
|
293
293
|
}, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
@@ -304,31 +304,31 @@ const Tt = {
|
|
|
304
304
|
return e.group.showSummary;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, Dt = {
|
|
308
308
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
309
309
|
convertTo: (e, t, n) => {
|
|
310
310
|
if (n && n.length > 0) {
|
|
311
|
-
const
|
|
312
|
-
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path =
|
|
311
|
+
const o = n[0];
|
|
312
|
+
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = o.bindingField, e.binding.field = o.id, e.binding.fullPath = o.path, e.path = o.bindingPath;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
},
|
|
316
|
-
convertTo: (e, t, n,
|
|
315
|
+
}, jt = {
|
|
316
|
+
convertTo: (e, t, n, o) => {
|
|
317
317
|
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
318
318
|
},
|
|
319
319
|
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
320
320
|
}, Lt = {
|
|
321
|
-
convertTo: (e, t, n,
|
|
321
|
+
convertTo: (e, t, n, o) => {
|
|
322
322
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
323
323
|
},
|
|
324
324
|
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
325
325
|
}, $t = {
|
|
326
|
-
convertTo: (e, t, n,
|
|
326
|
+
convertTo: (e, t, n, o) => {
|
|
327
327
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
328
328
|
},
|
|
329
329
|
convertFrom: (e, t, n) => {
|
|
330
|
-
var
|
|
331
|
-
return t === "showCheckbox" ? (
|
|
330
|
+
var o, f;
|
|
331
|
+
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (f = e.selection) == null ? void 0 : f.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
332
332
|
}
|
|
333
333
|
}, At = {
|
|
334
334
|
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
@@ -338,37 +338,37 @@ const Tt = {
|
|
|
338
338
|
e[t] = n;
|
|
339
339
|
}
|
|
340
340
|
}, Ht = {
|
|
341
|
-
convertTo: (e, t, n,
|
|
341
|
+
convertTo: (e, t, n, o) => {
|
|
342
342
|
e.size || (e.size = {}), e.size[t] = n;
|
|
343
343
|
},
|
|
344
344
|
convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
|
|
345
345
|
}, Nt = {
|
|
346
346
|
convertFrom: (e, t, n) => {
|
|
347
|
-
var
|
|
348
|
-
return (
|
|
347
|
+
var o, f;
|
|
348
|
+
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (f = e.formatter) == null ? void 0 : f.data : e.formatterEnumData;
|
|
349
349
|
}
|
|
350
350
|
}, Gt = {
|
|
351
|
-
convertTo: (e, t, n,
|
|
351
|
+
convertTo: (e, t, n, o) => {
|
|
352
352
|
e.sort || (e.sort = {}), e.sort[t] = n;
|
|
353
353
|
},
|
|
354
354
|
convertFrom: (e, t, n) => {
|
|
355
|
-
var
|
|
355
|
+
var o, f;
|
|
356
356
|
if (t === "mode")
|
|
357
|
-
return ((
|
|
357
|
+
return ((o = e.sort) == null ? void 0 : o.mode) || "client";
|
|
358
358
|
if (t === "multiSort")
|
|
359
|
-
return !!((
|
|
359
|
+
return !!((f = e.sort) != null && f.multiSort);
|
|
360
360
|
}
|
|
361
361
|
}, _t = {
|
|
362
|
-
convertTo: (e, t, n,
|
|
362
|
+
convertTo: (e, t, n, o) => {
|
|
363
363
|
e.filter || (e.filter = {}), e.filter[t] = n;
|
|
364
364
|
},
|
|
365
365
|
convertFrom: (e, t, n) => {
|
|
366
|
-
var
|
|
366
|
+
var o;
|
|
367
367
|
if (t === "mode")
|
|
368
|
-
return ((
|
|
368
|
+
return ((o = e.filter) == null ? void 0 : o.mode) || "client";
|
|
369
369
|
}
|
|
370
370
|
}, zt = {
|
|
371
|
-
convertTo: (e, t, n,
|
|
371
|
+
convertTo: (e, t, n, o) => {
|
|
372
372
|
e.rowOption ? e.rowOption[t] = n : e.rowOption = {
|
|
373
373
|
[t]: n
|
|
374
374
|
};
|
|
@@ -384,12 +384,12 @@ const Tt = {
|
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
function we(e, t, n) {
|
|
387
|
-
const
|
|
387
|
+
const o = /* @__PURE__ */ new Map([
|
|
388
388
|
["/converter/appearance.converter", Tt],
|
|
389
389
|
["/converter/buttons.converter", kt],
|
|
390
|
-
["/converter/property-editor.converter",
|
|
390
|
+
["/converter/property-editor.converter", Vt],
|
|
391
391
|
["/converter/items-count.converter", At],
|
|
392
|
-
["/converter/type.converter",
|
|
392
|
+
["/converter/type.converter", Ot],
|
|
393
393
|
["/converter/change-editor.converter", Pt],
|
|
394
394
|
["/converter/change-formatter.converter", Bt],
|
|
395
395
|
["/converter/column-command.converter", It],
|
|
@@ -397,8 +397,8 @@ function we(e, t, n) {
|
|
|
397
397
|
["/converter/summary.converter", Rt],
|
|
398
398
|
["/converter/group.converter", Et],
|
|
399
399
|
["/converter/form-group-label.converter", xt],
|
|
400
|
-
["/converter/field-selector.converter",
|
|
401
|
-
["/converter/pagination.converter",
|
|
400
|
+
["/converter/field-selector.converter", Dt],
|
|
401
|
+
["/converter/pagination.converter", jt],
|
|
402
402
|
["/converter/row-number.converter", Lt],
|
|
403
403
|
["/converter/grid-selection.converter", $t],
|
|
404
404
|
["/converter/size.converter", Ht],
|
|
@@ -406,7 +406,7 @@ function we(e, t, n) {
|
|
|
406
406
|
["/converter/grid-sort.converter", Gt],
|
|
407
407
|
["/converter/grid-filter.converter", _t],
|
|
408
408
|
["/converter/row-option.converter", zt]
|
|
409
|
-
]),
|
|
409
|
+
]), f = /* @__PURE__ */ new Map([
|
|
410
410
|
["string", { type: "input-group", enableClear: !1 }],
|
|
411
411
|
["boolean", {
|
|
412
412
|
type: "combo-list",
|
|
@@ -431,74 +431,74 @@ function we(e, t, n) {
|
|
|
431
431
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
432
432
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
433
433
|
]), v = Ft();
|
|
434
|
-
function
|
|
434
|
+
function m(a, l) {
|
|
435
435
|
return () => v.parseValueSchema(a, l);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return a.includes("visible") && l.visible !== void 0 ? typeof l.visible == "boolean" ? () => !!l.visible : l.visible === void 0 ? !0 :
|
|
437
|
+
function S(a, l, s) {
|
|
438
|
+
return a.includes("visible") && l.visible !== void 0 ? typeof l.visible == "boolean" ? () => !!l.visible : l.visible === void 0 ? !0 : m(l.visible, s) : () => !0;
|
|
439
439
|
}
|
|
440
440
|
function k(a, l, s) {
|
|
441
|
-
return a.includes("readonly") && l.readonly !== void 0 ? typeof l.readonly == "boolean" ? () => !!l.readonly :
|
|
441
|
+
return a.includes("readonly") && l.readonly !== void 0 ? typeof l.readonly == "boolean" ? () => !!l.readonly : m(l.readonly, s) : () => !1;
|
|
442
442
|
}
|
|
443
443
|
function p(a, l) {
|
|
444
444
|
const s = a.$converter || l;
|
|
445
|
-
return typeof s == "string" && s &&
|
|
446
|
-
}
|
|
447
|
-
function y(a, l, s, h, u, g = "",
|
|
448
|
-
return Object.keys(a).map((
|
|
449
|
-
const P = F(1), R =
|
|
450
|
-
|
|
451
|
-
const j = d.type === "cascade" ? y(d.properties, l, s, h, u, g,
|
|
452
|
-
let x = p(d,
|
|
445
|
+
return typeof s == "string" && s && o.has(s) ? o.get(s) || null : s || null;
|
|
446
|
+
}
|
|
447
|
+
function y(a, l, s, h, u, g = "", I = "") {
|
|
448
|
+
return Object.keys(a).map((V) => {
|
|
449
|
+
const P = F(1), R = V, d = a[V], M = Object.keys(d), A = d.title, T = d.type, B = f.get(T) || { type: "input-group", enableClear: !1 }, b = d.editor ? Object.assign({}, B, d.editor) : Object.assign({}, B), w = S(M, d, l), O = k(M, d, l);
|
|
450
|
+
b.readonly = b.readonly === void 0 ? O() : b.readonly;
|
|
451
|
+
const j = d.type === "cascade" ? y(d.properties, l, s, h, u, g, I) : [], D = !0;
|
|
452
|
+
let x = p(d, I);
|
|
453
453
|
const H = L({
|
|
454
454
|
get() {
|
|
455
455
|
if (P.value) {
|
|
456
|
-
if (["class", "style"].find((te) => te === R) && !x && (x =
|
|
457
|
-
return x.convertFrom(s,
|
|
458
|
-
const N = s[
|
|
456
|
+
if (["class", "style"].find((te) => te === R) && !x && (x = o.get("/converter/appearance.converter") || null), x && x.convertFrom)
|
|
457
|
+
return x.convertFrom(s, V, u, g);
|
|
458
|
+
const N = s[V];
|
|
459
459
|
return Object.prototype.hasOwnProperty.call(d, "defaultValue") && (N === void 0 || typeof N == "string" && N === "") ? d.type === "boolean" ? d.defaultValue : d.defaultValue || "" : N;
|
|
460
460
|
}
|
|
461
461
|
return null;
|
|
462
462
|
},
|
|
463
463
|
set(N) {
|
|
464
|
-
P.value += 1, x && x.convertTo ? (x.convertTo(h,
|
|
464
|
+
P.value += 1, x && x.convertTo ? (x.convertTo(h, V, N, u, g), x.convertTo(s, V, N, u, g)) : (h[V] = N, s[V] = N);
|
|
465
465
|
}
|
|
466
|
-
}), { refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X } = d, Y = { propertyID: R, propertyName: A, propertyType: T, propertyValue: H, editor:
|
|
466
|
+
}), { refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X } = d, Y = { propertyID: R, propertyName: A, propertyType: T, propertyValue: H, editor: b, visible: w, readonly: O, cascadeConfig: j, hideCascadeTitle: D, refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X };
|
|
467
467
|
return l[R] = Y, Y;
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
function r(a, l, s = {}) {
|
|
471
471
|
const h = {}, u = e[a];
|
|
472
|
-
return u && u.categories ? Object.keys(u.categories).map((
|
|
473
|
-
const E = u.categories[
|
|
474
|
-
return { categoryId:
|
|
472
|
+
return u && u.categories ? Object.keys(u.categories).map((I) => {
|
|
473
|
+
const E = u.categories[I], V = E == null ? void 0 : E.title, P = y(E.properties || {}, h, {}, s, l);
|
|
474
|
+
return { categoryId: I, categoryName: V, properties: P };
|
|
475
475
|
}) : [];
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
const g = l.$ref.schema,
|
|
477
|
+
function i(a, l, s, h, u = "") {
|
|
478
|
+
const g = l.$ref.schema, I = l.$ref.converter, E = s[g], V = E.type, P = n(E), R = {}, d = e[V];
|
|
479
479
|
if (d && d.categories) {
|
|
480
480
|
const M = d.categories[a], A = M == null ? void 0 : M.title;
|
|
481
|
-
|
|
482
|
-
M.properties[
|
|
481
|
+
I && Object.keys(M.properties).forEach((b) => {
|
|
482
|
+
M.properties[b].$converter = I;
|
|
483
483
|
});
|
|
484
|
-
const T = (M == null ? void 0 : M.properties) || {},
|
|
485
|
-
return { categoryId: a, categoryName: A, properties:
|
|
484
|
+
const T = (M == null ? void 0 : M.properties) || {}, B = y(T, R, P, E, h, u);
|
|
485
|
+
return { categoryId: a, categoryName: A, properties: B };
|
|
486
486
|
}
|
|
487
487
|
return { categoryId: a, categoryName: "", properties: [] };
|
|
488
488
|
}
|
|
489
489
|
function c(a, l, s, h, u) {
|
|
490
|
-
const g = a.type,
|
|
491
|
-
let
|
|
492
|
-
if (
|
|
490
|
+
const g = a.type, I = n(a), E = {};
|
|
491
|
+
let V = u || e[g];
|
|
492
|
+
if (V && Object.keys(V).length === 0 && s && s.getPropConfig && (V = s.getPropConfig(h)), V && V.categories) {
|
|
493
493
|
const P = [];
|
|
494
|
-
return Object.keys(
|
|
495
|
-
const d =
|
|
494
|
+
return Object.keys(V.categories).map((R) => {
|
|
495
|
+
const d = V.categories[R];
|
|
496
496
|
if (d.$ref) {
|
|
497
|
-
P.push(
|
|
497
|
+
P.push(i(R, d, a, l, h));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
|
-
const M = d == null ? void 0 : d.title, A = d == null ? void 0 : d.tabId, T = d == null ? void 0 : d.tabName,
|
|
501
|
-
P.push({ categoryId: R, categoryName: M, tabId: A, tabName: T, hide:
|
|
500
|
+
const M = d == null ? void 0 : d.title, A = d == null ? void 0 : d.tabId, T = d == null ? void 0 : d.tabName, B = d == null ? void 0 : d.hide, b = d == null ? void 0 : d.hideTitle, w = y(d.properties || {}, E, I, a, l, h, d.$converter), { setPropertyRelates: O } = d, j = d == null ? void 0 : d.parentPropertyID;
|
|
501
|
+
P.push({ categoryId: R, categoryName: M, tabId: A, tabName: T, hide: B, properties: w, hideTitle: b, setPropertyRelates: O, parentPropertyID: j });
|
|
502
502
|
}), P;
|
|
503
503
|
}
|
|
504
504
|
return [];
|
|
@@ -506,18 +506,18 @@ function we(e, t, n) {
|
|
|
506
506
|
return {
|
|
507
507
|
getPropertyConfigBySchema: c,
|
|
508
508
|
getPropertyConfigByType: r,
|
|
509
|
-
propertyConverterMap:
|
|
509
|
+
propertyConverterMap: o
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
const Fe = {}, Te = {};
|
|
513
513
|
we(Fe, Te, St);
|
|
514
|
-
const ke = {},
|
|
515
|
-
we(
|
|
516
|
-
function Wt(e, t, n = /* @__PURE__ */ new Map(),
|
|
517
|
-
return be[t.title] = t, Se[t.title] =
|
|
518
|
-
if (!
|
|
519
|
-
return wt(
|
|
520
|
-
const k = Ct(
|
|
514
|
+
const ke = {}, Ve = {}, { getSchemaByType: ao, resolveSchemaWithDefaultValue: qt, resolveSchemaToProps: so, mappingSchemaToProps: co, setDesignerContext: uo } = ye(ke, Ve), Oe = {}, Pe = {};
|
|
515
|
+
we(Oe, Pe, qt);
|
|
516
|
+
function Wt(e, t, n = /* @__PURE__ */ new Map(), o = (m, S, k, p) => S, f = {}, v = (m) => m) {
|
|
517
|
+
return be[t.title] = t, Se[t.title] = o, Fe[t.title] = f, Te[t.title] = v, ke[t.title] = t, Ve[t.title] = o, Oe[t.title] = f, Pe[t.title] = v, (m = {}, S = !0) => {
|
|
518
|
+
if (!S)
|
|
519
|
+
return wt(m, n);
|
|
520
|
+
const k = Ct(m, t, n), p = Object.keys(e).reduce((y, r) => (y[r] = e[r].default, y), {});
|
|
521
521
|
return Object.assign(p, k);
|
|
522
522
|
};
|
|
523
523
|
}
|
|
@@ -795,39 +795,39 @@ const rn = "order", ln = "A Farris Component", an = "object", sn = {
|
|
|
795
795
|
};
|
|
796
796
|
function dn(e, t) {
|
|
797
797
|
function n(v) {
|
|
798
|
-
const
|
|
799
|
-
let
|
|
800
|
-
for (;
|
|
801
|
-
|
|
802
|
-
return
|
|
803
|
-
}
|
|
804
|
-
function
|
|
805
|
-
const
|
|
806
|
-
return n(
|
|
798
|
+
const m = [];
|
|
799
|
+
let S = v.nextNode();
|
|
800
|
+
for (; S; )
|
|
801
|
+
m.push(S), S = v.nextNode();
|
|
802
|
+
return m;
|
|
803
|
+
}
|
|
804
|
+
function o(v, m) {
|
|
805
|
+
const S = document.createTreeWalker(v, NodeFilter.SHOW_TEXT);
|
|
806
|
+
return n(S).map((r) => ({ textNode: r, text: (r.textContent || "").toLocaleLowerCase() })).map(({ textNode: r, text: i }) => {
|
|
807
807
|
const c = [];
|
|
808
808
|
let a = 0;
|
|
809
|
-
for (; a <
|
|
810
|
-
const l =
|
|
809
|
+
for (; a < i.length; ) {
|
|
810
|
+
const l = i.indexOf(m, a);
|
|
811
811
|
if (l === -1)
|
|
812
812
|
break;
|
|
813
|
-
c.push(l), a = l +
|
|
813
|
+
c.push(l), a = l + m.length;
|
|
814
814
|
}
|
|
815
815
|
return c.map((l) => {
|
|
816
816
|
const s = new Range();
|
|
817
|
-
return s.setStart(r, l), s.setEnd(r, l +
|
|
817
|
+
return s.setStart(r, l), s.setEnd(r, l + m.length), s;
|
|
818
818
|
});
|
|
819
819
|
}).flat();
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function f(v) {
|
|
822
822
|
if (!CSS.highlights || (CSS.highlights.clear(), !v || !t))
|
|
823
823
|
return;
|
|
824
|
-
const
|
|
825
|
-
CSS.highlights.set("search-result",
|
|
824
|
+
const m = o(t.value, v.toLocaleLowerCase()), S = new Highlight(...m);
|
|
825
|
+
CSS.highlights.set("search-result", S);
|
|
826
826
|
}
|
|
827
|
-
return { search:
|
|
827
|
+
return { search: f };
|
|
828
828
|
}
|
|
829
|
-
function pe(e, t, n,
|
|
830
|
-
const y = F(e.size), r = F(e.textField),
|
|
829
|
+
function pe(e, t, n, o, f, v, m, S, k, p) {
|
|
830
|
+
const y = F(e.size), r = F(e.textField), i = F(e.titleField), c = F(e.disableField), a = L(() => {
|
|
831
831
|
var d, M;
|
|
832
832
|
return ((d = e.selection) == null ? void 0 : d.multiSelect) && ((M = e.selection) == null ? void 0 : M.showCheckbox);
|
|
833
833
|
}), {
|
|
@@ -837,10 +837,10 @@ function pe(e, t, n, i, m, v, f, b, k, p) {
|
|
|
837
837
|
} = v, {
|
|
838
838
|
getKey: u,
|
|
839
839
|
listViewItemClass: g,
|
|
840
|
-
listViewItemStyle:
|
|
840
|
+
listViewItemStyle: I,
|
|
841
841
|
onCheckItem: E,
|
|
842
|
-
onClickItem:
|
|
843
|
-
} =
|
|
842
|
+
onClickItem: V
|
|
843
|
+
} = m, P = L(() => {
|
|
844
844
|
const d = {
|
|
845
845
|
"text-overflow": "ellipsis",
|
|
846
846
|
overflow: "hidden",
|
|
@@ -852,12 +852,12 @@ function pe(e, t, n, i, m, v, f, b, k, p) {
|
|
|
852
852
|
};
|
|
853
853
|
});
|
|
854
854
|
function R(d, M, A) {
|
|
855
|
-
return d.checked =
|
|
855
|
+
return d.checked = S.findIndexInSelectedItems(d) > -1, C("li", {
|
|
856
856
|
class: g(d, M),
|
|
857
857
|
id: u(d, M),
|
|
858
858
|
key: u(d, M),
|
|
859
|
-
style:
|
|
860
|
-
onClick: (T) =>
|
|
859
|
+
style: I(d, M),
|
|
860
|
+
onClick: (T) => V(d, M, T),
|
|
861
861
|
onMouseenter: (T) => l(T, d, M),
|
|
862
862
|
onMouseover: (T) => s(T, d, M),
|
|
863
863
|
onMouseout: (T) => h(T, d, M)
|
|
@@ -878,15 +878,15 @@ function pe(e, t, n, i, m, v, f, b, k, p) {
|
|
|
878
878
|
}, [C("div", {
|
|
879
879
|
class: e.itemContentClass,
|
|
880
880
|
style: P.value,
|
|
881
|
-
title: d.raw[
|
|
881
|
+
title: d.raw[i.value] || d.raw[r.value]
|
|
882
882
|
}, [d.raw[r.value]])])]);
|
|
883
883
|
}
|
|
884
884
|
return {
|
|
885
885
|
renderItem: R
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
function fn(e, t, n,
|
|
889
|
-
const y = F(e.multiSelect), r = F(e.disableField),
|
|
888
|
+
function fn(e, t, n, o, f, v, m, S, k, p) {
|
|
889
|
+
const y = F(e.multiSelect), r = F(e.disableField), i = F(e.textField), {
|
|
890
890
|
onMouseenterItem: c,
|
|
891
891
|
onMouseoverItem: a,
|
|
892
892
|
onMouseoutItem: l
|
|
@@ -895,8 +895,8 @@ function fn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
895
895
|
listViewItemClass: h,
|
|
896
896
|
listViewItemStyle: u,
|
|
897
897
|
onCheckItem: g,
|
|
898
|
-
onClickItem:
|
|
899
|
-
} =
|
|
898
|
+
onClickItem: I
|
|
899
|
+
} = m;
|
|
900
900
|
function E(P, R, d) {
|
|
901
901
|
return e.contentTemplate ? C(U, null, [e.contentTemplate({
|
|
902
902
|
item: P.raw,
|
|
@@ -908,15 +908,15 @@ function fn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
908
908
|
selectedItem: d
|
|
909
909
|
})]) : C("div", {
|
|
910
910
|
style: "margin: 10px 0;"
|
|
911
|
-
}, [P.raw[
|
|
911
|
+
}, [P.raw[i.value || "name"]]);
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function V(P, R, d) {
|
|
914
914
|
return C("li", {
|
|
915
915
|
class: h(P, R),
|
|
916
916
|
id: s(P, R),
|
|
917
917
|
key: s(P, R),
|
|
918
918
|
style: u(P, R),
|
|
919
|
-
onClick: (M) =>
|
|
919
|
+
onClick: (M) => I(P, R, M),
|
|
920
920
|
onMouseenter: (M) => c(M, P, R),
|
|
921
921
|
onMouseover: (M) => a(M, P, R),
|
|
922
922
|
onMouseout: (M) => l(M, P, R)
|
|
@@ -935,11 +935,11 @@ function fn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
935
935
|
}, [E(P, R, d)])]);
|
|
936
936
|
}
|
|
937
937
|
return {
|
|
938
|
-
renderItem:
|
|
938
|
+
renderItem: V
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
function mn(e, t, n,
|
|
942
|
-
const y = F(e.multiSelect), r = F(e.disableField),
|
|
941
|
+
function mn(e, t, n, o, f, v, m, S, k, p) {
|
|
942
|
+
const y = F(e.multiSelect), r = F(e.disableField), i = F(e.textField), {
|
|
943
943
|
onMouseenterItem: c,
|
|
944
944
|
onMouseoverItem: a,
|
|
945
945
|
onMouseoutItem: l
|
|
@@ -948,59 +948,61 @@ function mn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
948
948
|
listViewItemClass: h,
|
|
949
949
|
onCheckItem: u,
|
|
950
950
|
onClickItem: g
|
|
951
|
-
} =
|
|
952
|
-
dragstart:
|
|
951
|
+
} = m, {
|
|
952
|
+
dragstart: I,
|
|
953
953
|
dragenter: E,
|
|
954
|
-
dragover:
|
|
954
|
+
dragover: V,
|
|
955
955
|
dragend: P
|
|
956
|
-
} =
|
|
956
|
+
} = o, {
|
|
957
957
|
removeItem: R
|
|
958
958
|
} = k, d = L(() => ({
|
|
959
959
|
margin: y.value ? "10px 0" : "10px 0px 10px 14px"
|
|
960
960
|
}));
|
|
961
|
-
function M(w,
|
|
961
|
+
function M(w, O = "") {
|
|
962
962
|
const j = w.target;
|
|
963
|
-
j.title = j.scrollWidth > j.clientWidth ?
|
|
963
|
+
j.title = j.scrollWidth > j.clientWidth ? O : "";
|
|
964
964
|
}
|
|
965
965
|
function A(w) {
|
|
966
966
|
return C("div", {
|
|
967
967
|
style: d.value,
|
|
968
|
-
onMouseenter: (
|
|
969
|
-
}, [w.raw[
|
|
968
|
+
onMouseenter: (O) => M(O, w.raw[i.value || "name"])
|
|
969
|
+
}, [w.raw[i.value || "name"]]);
|
|
970
970
|
}
|
|
971
971
|
function T() {
|
|
972
972
|
return t.slots.itemContent ? t.slots.itemContent : A;
|
|
973
973
|
}
|
|
974
|
-
const
|
|
975
|
-
function
|
|
974
|
+
const B = T();
|
|
975
|
+
function b(w, O, j) {
|
|
976
976
|
return C("li", {
|
|
977
|
-
class: h(w,
|
|
978
|
-
id: s(w,
|
|
979
|
-
key: s(w,
|
|
980
|
-
onClick: (D) => g(w,
|
|
981
|
-
onMouseenter: (D) => c(D, w,
|
|
982
|
-
onMouseover: (D) => a(D, w,
|
|
983
|
-
onMouseout: (D) => l(D, w,
|
|
977
|
+
class: h(w, O),
|
|
978
|
+
id: s(w, O),
|
|
979
|
+
key: s(w, O),
|
|
980
|
+
onClick: (D) => g(w, O, D),
|
|
981
|
+
onMouseenter: (D) => c(D, w, O),
|
|
982
|
+
onMouseover: (D) => a(D, w, O),
|
|
983
|
+
onMouseout: (D) => l(D, w, O),
|
|
984
984
|
draggable: "true",
|
|
985
|
-
onDragstart: (D) =>
|
|
986
|
-
onDragenter: (D) => E(D,
|
|
985
|
+
onDragstart: (D) => I(D, w, O),
|
|
986
|
+
onDragenter: (D) => E(D, O),
|
|
987
987
|
onDragend: (D) => P(D, w),
|
|
988
|
-
onDragover: (D) =>
|
|
988
|
+
onDragover: (D) => V(D)
|
|
989
989
|
}, [y.value && C("div", {
|
|
990
990
|
class: "f-list-select",
|
|
991
991
|
onClick: (D) => D.stopPropagation()
|
|
992
992
|
}, [C(se, {
|
|
993
|
-
id: "list-" + s(w,
|
|
993
|
+
id: "list-" + s(w, O),
|
|
994
994
|
customClass: "listview-checkbox",
|
|
995
995
|
disabled: w[r.value] || !w.checked,
|
|
996
996
|
checked: w.checked,
|
|
997
997
|
"onUpdate:checked": (D) => w.checked = D,
|
|
998
|
-
onChange: (D) => u(w,
|
|
998
|
+
onChange: (D) => u(w, O, !D.checked)
|
|
999
999
|
}, null)]), C("div", {
|
|
1000
1000
|
class: "f-list-content"
|
|
1001
|
-
}, [
|
|
1001
|
+
}, [B(w)]), C("div", {
|
|
1002
1002
|
class: "f-list-remove",
|
|
1003
|
-
onClick: (D) =>
|
|
1003
|
+
onClick: (D) => {
|
|
1004
|
+
D.stopPropagation(), R(O);
|
|
1005
|
+
}
|
|
1004
1006
|
}, [C("div", {
|
|
1005
1007
|
class: "f-list-remove-icon"
|
|
1006
1008
|
}, [C("i", {
|
|
@@ -1012,18 +1014,18 @@ function mn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
1012
1014
|
}, null)])])]);
|
|
1013
1015
|
}
|
|
1014
1016
|
return {
|
|
1015
|
-
renderItem:
|
|
1017
|
+
renderItem: b
|
|
1016
1018
|
};
|
|
1017
1019
|
}
|
|
1018
|
-
function vn(e, t, n,
|
|
1020
|
+
function vn(e, t, n, o, f, v, m, S, k, p) {
|
|
1019
1021
|
var s;
|
|
1020
1022
|
const y = F(((s = e.group) == null ? void 0 : s.groupFields) || []), {
|
|
1021
1023
|
collpaseGroupIconClass: r
|
|
1022
|
-
} =
|
|
1023
|
-
toggleGroupRow:
|
|
1024
|
+
} = f, {
|
|
1025
|
+
toggleGroupRow: i
|
|
1024
1026
|
} = p;
|
|
1025
1027
|
function c(h, u) {
|
|
1026
|
-
u.collapse = !u.collapse, n.value =
|
|
1028
|
+
u.collapse = !u.collapse, n.value = i(u.collapse ? "collapse" : "expand", u, n.value);
|
|
1027
1029
|
}
|
|
1028
1030
|
function a(h, u, g) {
|
|
1029
1031
|
return t.slots.group ? C(U, null, [t.slots.content && t.slots.group({
|
|
@@ -1032,7 +1034,7 @@ function vn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
1032
1034
|
selectedItem: g
|
|
1033
1035
|
})]) : C("div", {
|
|
1034
1036
|
class: "f-navlookup-recentHeader",
|
|
1035
|
-
onClick: (
|
|
1037
|
+
onClick: (I) => c(I, h)
|
|
1036
1038
|
}, [C("div", {
|
|
1037
1039
|
class: "fv-grid-group-row-icon"
|
|
1038
1040
|
}, [C("span", {
|
|
@@ -1048,36 +1050,36 @@ function vn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
1048
1050
|
renderItem: l
|
|
1049
1051
|
};
|
|
1050
1052
|
}
|
|
1051
|
-
function pn(e, t, n,
|
|
1052
|
-
const { dataView:
|
|
1053
|
-
function
|
|
1054
|
-
if (
|
|
1055
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(
|
|
1053
|
+
function pn(e, t, n, o) {
|
|
1054
|
+
const { dataView: f } = n, { updateSelectedItems: v } = o;
|
|
1055
|
+
function m(S) {
|
|
1056
|
+
if (S > -1 && S < f.value.length) {
|
|
1057
|
+
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(f.value[S]))
|
|
1056
1058
|
return;
|
|
1057
|
-
const k =
|
|
1059
|
+
const k = f.value.splice(S, 1);
|
|
1058
1060
|
v(), t.emit("removeItem", k[0]);
|
|
1059
1061
|
}
|
|
1060
1062
|
}
|
|
1061
|
-
return { removeItem:
|
|
1063
|
+
return { removeItem: m };
|
|
1062
1064
|
}
|
|
1063
|
-
function gn(e, t, n,
|
|
1065
|
+
function gn(e, t, n, o, f, v, m, S, k, p) {
|
|
1064
1066
|
const {
|
|
1065
1067
|
t: y
|
|
1066
|
-
} = ae(), r = F(e.view),
|
|
1068
|
+
} = ae(), r = F(e.view), i = F(e.view === "CardView"), c = F({}), a = F(y("listView.emptyMessage")), l = pn(e, t, o, k), s = L(() => ({
|
|
1067
1069
|
"f-list-view-group": !0,
|
|
1068
1070
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
1069
|
-
"d-flex":
|
|
1070
|
-
"flex-wrap":
|
|
1071
|
+
"d-flex": i.value,
|
|
1072
|
+
"flex-wrap": i.value
|
|
1071
1073
|
})), h = L(() => !!n.value && n.value.length > 0), u = L(() => n.value.length === 0);
|
|
1072
1074
|
L(() => u.value && !t.slots.empty);
|
|
1073
1075
|
function g() {
|
|
1074
1076
|
return r.value === "SingleView" ? pe : r.value === "DraggableView" ? mn : (r.value === "ContentView" || r.value === "CardView") && (e.contentTemplate || t.slots.content) ? fn : pe;
|
|
1075
1077
|
}
|
|
1076
|
-
const
|
|
1078
|
+
const I = g(), {
|
|
1077
1079
|
renderItem: E
|
|
1078
|
-
} =
|
|
1079
|
-
renderItem:
|
|
1080
|
-
} = vn(e, t, n, p,
|
|
1080
|
+
} = I(e, t, n, p, f, v, k, m, l, S), {
|
|
1081
|
+
renderItem: V
|
|
1082
|
+
} = vn(e, t, n, p, f, v, k, m, l, S), P = [E, V];
|
|
1081
1083
|
function R() {
|
|
1082
1084
|
return n.value.filter((A) => A.visible !== !1).map((A, T) => P[A.type](A, T, c));
|
|
1083
1085
|
}
|
|
@@ -1100,31 +1102,31 @@ function gn(e, t, n, i, m, v, f, b, k, p) {
|
|
|
1100
1102
|
};
|
|
1101
1103
|
}
|
|
1102
1104
|
function hn(e, t, n) {
|
|
1103
|
-
function
|
|
1105
|
+
function o() {
|
|
1104
1106
|
return t.slots.header && C("div", {
|
|
1105
1107
|
class: "f-list-view-header"
|
|
1106
1108
|
}, [t.slots.header()]);
|
|
1107
1109
|
}
|
|
1108
1110
|
return {
|
|
1109
|
-
renderHeader:
|
|
1111
|
+
renderHeader: o
|
|
1110
1112
|
};
|
|
1111
1113
|
}
|
|
1112
1114
|
function ge(e, t, n) {
|
|
1113
|
-
const
|
|
1114
|
-
function k(
|
|
1115
|
+
const o = F(e.headerClass), f = F(e.placeholder), v = F(""), m = L(() => !v.value), S = L(() => !!v.value);
|
|
1116
|
+
function k(i) {
|
|
1115
1117
|
v.value = "";
|
|
1116
1118
|
}
|
|
1117
|
-
G(v, (
|
|
1118
|
-
e.enableHighlightSearch && n.search(
|
|
1119
|
+
G(v, (i) => {
|
|
1120
|
+
e.enableHighlightSearch && n.search(i), t.emit("afterSearch", i);
|
|
1119
1121
|
});
|
|
1120
1122
|
const p = L(() => {
|
|
1121
|
-
const
|
|
1123
|
+
const i = {
|
|
1122
1124
|
"form-group": !0,
|
|
1123
1125
|
"farris-form-group": !0
|
|
1124
1126
|
};
|
|
1125
|
-
return
|
|
1127
|
+
return o.value && o.value.split(" ").reduce((a, l) => (a[l] = !0, a), i), i;
|
|
1126
1128
|
});
|
|
1127
|
-
function y(
|
|
1129
|
+
function y(i) {
|
|
1128
1130
|
}
|
|
1129
1131
|
function r() {
|
|
1130
1132
|
return C("div", {
|
|
@@ -1140,19 +1142,19 @@ function ge(e, t, n) {
|
|
|
1140
1142
|
class: "input-group f-state-editable"
|
|
1141
1143
|
}, [Ge(C("input", {
|
|
1142
1144
|
class: "form-control f-utils-fill text-left",
|
|
1143
|
-
"onUpdate:modelValue": (
|
|
1145
|
+
"onUpdate:modelValue": (i) => v.value = i,
|
|
1144
1146
|
name: "input-group-value",
|
|
1145
1147
|
type: "text",
|
|
1146
|
-
placeholder:
|
|
1148
|
+
placeholder: f.value,
|
|
1147
1149
|
autocomplete: "off"
|
|
1148
1150
|
}, null), [[_e, v.value]]), C("div", {
|
|
1149
1151
|
class: "input-group-append"
|
|
1150
|
-
}, [
|
|
1152
|
+
}, [S.value && C("span", {
|
|
1151
1153
|
class: "input-group-text input-group-clear",
|
|
1152
|
-
onClick: (
|
|
1154
|
+
onClick: (i) => k()
|
|
1153
1155
|
}, [C("i", {
|
|
1154
1156
|
class: "f-icon f-icon-close-circle"
|
|
1155
|
-
}, null)]),
|
|
1157
|
+
}, null)]), m.value && C("span", {
|
|
1156
1158
|
class: "input-group-text"
|
|
1157
1159
|
}, [C("span", {
|
|
1158
1160
|
class: "f-icon f-icon-search"
|
|
@@ -1163,21 +1165,21 @@ function ge(e, t, n) {
|
|
|
1163
1165
|
};
|
|
1164
1166
|
}
|
|
1165
1167
|
function yn() {
|
|
1166
|
-
const e = F(""), t = F(-1), n = F(""),
|
|
1167
|
-
function v(r,
|
|
1168
|
-
|
|
1168
|
+
const e = F(""), t = F(-1), n = F(""), o = F(-1), f = F(!1);
|
|
1169
|
+
function v(r, i, c) {
|
|
1170
|
+
o.value = c;
|
|
1169
1171
|
}
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1172
|
+
function m(r, i, c) {
|
|
1173
|
+
f.value || (o.value = c);
|
|
1172
1174
|
}
|
|
1173
|
-
function
|
|
1174
|
-
|
|
1175
|
+
function S(r, i, c) {
|
|
1176
|
+
o.value = -1;
|
|
1175
1177
|
}
|
|
1176
1178
|
function k() {
|
|
1177
|
-
|
|
1179
|
+
f.value = !0;
|
|
1178
1180
|
}
|
|
1179
1181
|
function p() {
|
|
1180
|
-
|
|
1182
|
+
f.value = !1;
|
|
1181
1183
|
}
|
|
1182
1184
|
function y() {
|
|
1183
1185
|
t.value = -1, e.value = "";
|
|
@@ -1185,24 +1187,24 @@ function yn() {
|
|
|
1185
1187
|
return {
|
|
1186
1188
|
activeIndex: t,
|
|
1187
1189
|
focusedItemId: n,
|
|
1188
|
-
hoverIndex:
|
|
1190
|
+
hoverIndex: o,
|
|
1189
1191
|
clearActiveItem: y,
|
|
1190
1192
|
onMouseenterItem: v,
|
|
1191
|
-
onMouseoverItem:
|
|
1192
|
-
onMouseoutItem:
|
|
1193
|
+
onMouseoverItem: m,
|
|
1194
|
+
onMouseoutItem: S,
|
|
1193
1195
|
resumeHover: p,
|
|
1194
1196
|
suspendHover: k
|
|
1195
1197
|
};
|
|
1196
1198
|
}
|
|
1197
|
-
function bn(e, t, n,
|
|
1198
|
-
const
|
|
1199
|
+
function bn(e, t, n, o) {
|
|
1200
|
+
const f = F(e.idField), { dataView: v } = n, m = F(-1), S = F(!1), { activeIndex: k, focusedItemId: p, hoverIndex: y, resumeHover: r, suspendHover: i } = o;
|
|
1199
1201
|
let c, a = 0, l = 0;
|
|
1200
|
-
function s(
|
|
1201
|
-
const R =
|
|
1202
|
-
c.style.left = parseInt(c.style.left) + R + "px", c.style.top = parseInt(c.style.top) + d + "px", a =
|
|
1202
|
+
function s(V, P) {
|
|
1203
|
+
const R = V - a, d = P - l;
|
|
1204
|
+
c.style.left = parseInt(c.style.left) + R + "px", c.style.top = parseInt(c.style.top) + d + "px", a = V, l = P;
|
|
1203
1205
|
}
|
|
1204
|
-
function h(
|
|
1205
|
-
const { left: P, top: R } =
|
|
1206
|
+
function h(V) {
|
|
1207
|
+
const { left: P, top: R } = V.getBoundingClientRect(), d = V.cloneNode(!0);
|
|
1206
1208
|
return d.style.cssText = `
|
|
1207
1209
|
position:absolute;
|
|
1208
1210
|
left:${P}px;
|
|
@@ -1217,115 +1219,115 @@ function bn(e, t, n, i) {
|
|
|
1217
1219
|
align-items: center;
|
|
1218
1220
|
float: none;
|
|
1219
1221
|
text-align: initial;
|
|
1220
|
-
width:${getComputedStyle(
|
|
1221
|
-
height:${getComputedStyle(
|
|
1222
|
+
width:${getComputedStyle(V).width};
|
|
1223
|
+
height:${getComputedStyle(V).height};
|
|
1222
1224
|
`, d.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", d.children[0].children[0].style.cssText = `
|
|
1223
1225
|
margin: 10px 0px 10px 14px;
|
|
1224
1226
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
1225
1227
|
`, d.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", d.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(d), d;
|
|
1226
1228
|
}
|
|
1227
|
-
function u(
|
|
1228
|
-
if (
|
|
1229
|
-
if (c = h(
|
|
1229
|
+
function u(V, P, R) {
|
|
1230
|
+
if (V.stopPropagation(), i(), P) {
|
|
1231
|
+
if (c = h(V.target), V.dataTransfer) {
|
|
1230
1232
|
const d = new Image();
|
|
1231
|
-
d.src = "",
|
|
1233
|
+
d.src = "", V.dataTransfer.setDragImage(d, 0, 0);
|
|
1232
1234
|
}
|
|
1233
|
-
a =
|
|
1234
|
-
|
|
1235
|
+
a = V.pageX, l = V.pageY, setTimeout(() => {
|
|
1236
|
+
m.value = R, S.value = !0, P.moving = !0;
|
|
1235
1237
|
});
|
|
1236
1238
|
}
|
|
1237
1239
|
}
|
|
1238
|
-
function g(
|
|
1239
|
-
if (
|
|
1240
|
-
const R = v.value[
|
|
1241
|
-
d.splice(
|
|
1240
|
+
function g(V, P) {
|
|
1241
|
+
if (V.preventDefault(), m.value !== P) {
|
|
1242
|
+
const R = v.value[m.value], d = v.value;
|
|
1243
|
+
d.splice(m.value, 1), d.splice(P, 0, R), m.value = P, s(V.pageX, V.pageY);
|
|
1242
1244
|
}
|
|
1243
1245
|
}
|
|
1244
|
-
function
|
|
1245
|
-
|
|
1246
|
+
function I(V) {
|
|
1247
|
+
V.preventDefault(), V.dataTransfer && (V.dataTransfer.dropEffect = "move"), s(V.pageX, V.pageY);
|
|
1246
1248
|
}
|
|
1247
|
-
function E(
|
|
1249
|
+
function E(V, P) {
|
|
1248
1250
|
P && (P.moving = !1, c && (document.body.removeChild(c), c = null)), v.value.forEach((R, d) => {
|
|
1249
1251
|
R.__fv_index__ = d;
|
|
1250
|
-
}),
|
|
1252
|
+
}), S.value = !1, r(), y.value = P.raw.__fv_index__, k.value = P.raw.__fv_index__, p.value = P.raw[f.value], t.emit("change", v.value), t.emit("activeChange", [P.raw]);
|
|
1251
1253
|
}
|
|
1252
1254
|
return {
|
|
1253
1255
|
dragstart: u,
|
|
1254
1256
|
dragenter: g,
|
|
1255
|
-
dragover:
|
|
1257
|
+
dragover: I,
|
|
1256
1258
|
dragend: E,
|
|
1257
|
-
isDragging:
|
|
1259
|
+
isDragging: S
|
|
1258
1260
|
};
|
|
1259
1261
|
}
|
|
1260
|
-
function Sn(e, t, n,
|
|
1261
|
-
const
|
|
1262
|
+
function Sn(e, t, n, o, f, v) {
|
|
1263
|
+
const m = F(e.idField), S = F(e.disableField), k = F(e.draggable);
|
|
1262
1264
|
F(e.itemClass);
|
|
1263
|
-
const p = F(e.selection.multiSelect ?? !1), y = F(e.selection.multiSelectMode), { isDragging: r } =
|
|
1264
|
-
let
|
|
1265
|
-
return w.data ?
|
|
1265
|
+
const p = F(e.selection.multiSelect ?? !1), y = F(e.selection.multiSelectMode), { isDragging: r } = o, { activeIndex: i, focusedItemId: c, hoverIndex: a } = f, { clearSelection: l, getSelectedItems: s, toggleSelectItem: h, currentSelectedDataId: u } = v, g = F(s()), I = (b) => g.value.length === 0 ? !1 : g.value.some((w) => {
|
|
1266
|
+
let O = "";
|
|
1267
|
+
return w.data ? O = w.data[m.value] : O = w[m.value], O === b;
|
|
1266
1268
|
});
|
|
1267
1269
|
function E() {
|
|
1268
1270
|
g.value = s();
|
|
1269
1271
|
}
|
|
1270
|
-
function
|
|
1271
|
-
return
|
|
1272
|
+
function V(b, w) {
|
|
1273
|
+
return b.raw[m.value] != null ? b.raw[m.value] : "";
|
|
1272
1274
|
}
|
|
1273
|
-
function P(
|
|
1274
|
-
const
|
|
1275
|
+
function P(b, w) {
|
|
1276
|
+
const O = {
|
|
1275
1277
|
"f-list-view-group-item": !0,
|
|
1276
1278
|
"f-list-view-draggable-item": k.value,
|
|
1277
|
-
"f-un-click": !
|
|
1278
|
-
"f-un-select": !!
|
|
1279
|
+
"f-un-click": !b.checked,
|
|
1280
|
+
"f-un-select": !!b.raw[S.value],
|
|
1279
1281
|
"f-listview-active": (
|
|
1280
1282
|
// 多选
|
|
1281
|
-
p.value &&
|
|
1282
|
-
!p.value &&
|
|
1283
|
+
p.value && I(V(b)) || // 单选
|
|
1284
|
+
!p.value && b.raw[m.value] === u.value
|
|
1283
1285
|
),
|
|
1284
1286
|
"f-listview-hover": !r.value && w === a.value,
|
|
1285
|
-
moving: !!
|
|
1287
|
+
moving: !!b.moving
|
|
1286
1288
|
};
|
|
1287
1289
|
if (typeof e.itemClass == "string")
|
|
1288
|
-
return re(
|
|
1290
|
+
return re(O, e.itemClass);
|
|
1289
1291
|
if (typeof e.itemClass == "function") {
|
|
1290
|
-
const j = e.itemClass(
|
|
1291
|
-
return re(
|
|
1292
|
+
const j = e.itemClass(b);
|
|
1293
|
+
return re(O, j);
|
|
1292
1294
|
}
|
|
1293
|
-
return
|
|
1295
|
+
return O;
|
|
1294
1296
|
}
|
|
1295
|
-
function R(
|
|
1296
|
-
const
|
|
1297
|
+
function R(b, w) {
|
|
1298
|
+
const O = (
|
|
1297
1299
|
// 多选
|
|
1298
|
-
p.value &&
|
|
1299
|
-
!p.value &&
|
|
1300
|
+
p.value && I(V(b)) || // 单选
|
|
1301
|
+
!p.value && b.raw[m.value] === u.value
|
|
1300
1302
|
), j = {};
|
|
1301
|
-
if (
|
|
1303
|
+
if (O && (j.backgroundColor = "#dae9ff"), typeof e.itemStyle == "string")
|
|
1302
1304
|
return me(j, e.itemStyle);
|
|
1303
1305
|
if (typeof e.itemStyle == "function") {
|
|
1304
|
-
const D = e.itemStyle(
|
|
1306
|
+
const D = e.itemStyle(b);
|
|
1305
1307
|
return me(j, D);
|
|
1306
1308
|
}
|
|
1307
1309
|
return j;
|
|
1308
1310
|
}
|
|
1309
1311
|
const d = L(() => !p.value);
|
|
1310
|
-
function M(
|
|
1311
|
-
|
|
1312
|
+
function M(b, w, O) {
|
|
1313
|
+
b.checked = O, !b.raw[S.value] && (d.value && (c.value = b.raw[m.value]), h(b));
|
|
1312
1314
|
}
|
|
1313
1315
|
const A = L(() => p.value && y.value === "OnCheckClearByClick"), T = L(() => !p.value || p.value && (y.value === "OnCheckAndClick" || y.value === "OnClick"));
|
|
1314
|
-
function
|
|
1315
|
-
if (
|
|
1316
|
-
|
|
1316
|
+
function B(b, w, O) {
|
|
1317
|
+
if (b.raw[S.value]) {
|
|
1318
|
+
O == null || O.preventDefault(), O == null || O.stopPropagation();
|
|
1317
1319
|
return;
|
|
1318
1320
|
}
|
|
1319
|
-
c.value =
|
|
1321
|
+
c.value = b.raw[m.value], i.value = w, A.value && l(), T.value && (h(b), E()), t.emit("clickItem", { data: g.value, index: w, dataItem: b.raw }), t.emit("activeChange", g.value);
|
|
1320
1322
|
}
|
|
1321
1323
|
return {
|
|
1322
|
-
getKey:
|
|
1324
|
+
getKey: V,
|
|
1323
1325
|
selectedItems: g,
|
|
1324
1326
|
listViewItemClass: P,
|
|
1325
1327
|
listViewItemStyle: R,
|
|
1326
1328
|
updateSelectedItems: E,
|
|
1327
1329
|
onCheckItem: M,
|
|
1328
|
-
onClickItem:
|
|
1330
|
+
onClickItem: B
|
|
1329
1331
|
};
|
|
1330
1332
|
}
|
|
1331
1333
|
const Be = /* @__PURE__ */ q({
|
|
@@ -1333,30 +1335,30 @@ const Be = /* @__PURE__ */ q({
|
|
|
1333
1335
|
props: un,
|
|
1334
1336
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
1335
1337
|
setup(e, t) {
|
|
1336
|
-
const n = F(),
|
|
1338
|
+
const n = F(), o = F(!0), f = F(!1), v = F([]), m = 0, S = F(e.columns), k = Ue(e, t), p = Xe(e), y = Ye(e), r = Je(e, p), i = Qe(e, /* @__PURE__ */ new Map(), k, y, p), c = Ze(e, i, p, v, t), a = dn(e, n), l = Ke(e, i), s = L(() => i.dataView.value.length), h = et(e, t, c, p), u = tt(e, t, p, h, v), g = nt(e), I = ot(e, {}, g), E = it(e, i, u, y, p, g, I), V = rt(e, p, I, E), P = lt(e, p, I, E), R = at(e, S, i, s, m, E, V, P), {
|
|
1337
1339
|
getVisualData: d
|
|
1338
1340
|
} = R;
|
|
1339
|
-
v.value = d(0, s.value +
|
|
1341
|
+
v.value = d(0, s.value + m - 1);
|
|
1340
1342
|
const M = L(() => {
|
|
1341
1343
|
const $ = {
|
|
1342
1344
|
"f-list-view": !0,
|
|
1343
1345
|
"f-list-view-multiple": e.multiSelect
|
|
1344
1346
|
};
|
|
1345
1347
|
return e.size !== "default" && ($[`${e.size}-item`] = !0), re($, e.customClass);
|
|
1346
|
-
}), A = L(() => !!t.slots.footer ||
|
|
1348
|
+
}), A = L(() => !!t.slots.footer || o.value);
|
|
1347
1349
|
function T() {
|
|
1348
1350
|
return e.header === "SearchBar" ? ge : e.header === "ContentHeader" ? hn : ge;
|
|
1349
1351
|
}
|
|
1350
|
-
const
|
|
1351
|
-
renderHeader:
|
|
1352
|
-
} =
|
|
1352
|
+
const B = T(), {
|
|
1353
|
+
renderHeader: b
|
|
1354
|
+
} = B(e, t, a), w = yn(), O = bn(e, t, i, w), j = Sn(e, t, v, O, w, c), {
|
|
1353
1355
|
renderListArea: D
|
|
1354
|
-
} = gn(e, t, v,
|
|
1356
|
+
} = gn(e, t, v, i, r, w, c, R, j, O);
|
|
1355
1357
|
function x($) {
|
|
1356
1358
|
a.search($);
|
|
1357
1359
|
}
|
|
1358
1360
|
function H($) {
|
|
1359
|
-
$ && (
|
|
1361
|
+
$ && (i.load($), v.value = d(0, s.value + m - 1));
|
|
1360
1362
|
}
|
|
1361
1363
|
function _() {
|
|
1362
1364
|
c.clearSelection(), w.clearActiveItem();
|
|
@@ -1387,7 +1389,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
1387
1389
|
function Ee($) {
|
|
1388
1390
|
l.updatePagination($);
|
|
1389
1391
|
}
|
|
1390
|
-
function
|
|
1392
|
+
function De($) {
|
|
1391
1393
|
return v.value.filter((z) => $.includes(z.raw[e.idField]));
|
|
1392
1394
|
}
|
|
1393
1395
|
t.expose({
|
|
@@ -1401,10 +1403,10 @@ const Be = /* @__PURE__ */ q({
|
|
|
1401
1403
|
getCurrentRowId: Y,
|
|
1402
1404
|
clickRowItemById: te,
|
|
1403
1405
|
updatePagination: Ee,
|
|
1404
|
-
getVisibleDataByIds:
|
|
1406
|
+
getVisibleDataByIds: De,
|
|
1405
1407
|
selectRowById: Re
|
|
1406
1408
|
});
|
|
1407
|
-
function
|
|
1409
|
+
function je($) {
|
|
1408
1410
|
e.multiSelect && ($.preventDefault(), $.stopPropagation());
|
|
1409
1411
|
}
|
|
1410
1412
|
G(() => e.selectionValues, ($, z) => {
|
|
@@ -1417,18 +1419,18 @@ const Be = /* @__PURE__ */ q({
|
|
|
1417
1419
|
applyColumnSorter: qn,
|
|
1418
1420
|
columnContext: xe,
|
|
1419
1421
|
updateColumnRenderContext: Wn
|
|
1420
|
-
} = Ae, He = ut(e,
|
|
1421
|
-
return dt(e, t,
|
|
1422
|
+
} = Ae, He = ut(e, i, v, xe, R, s, m, $e, u);
|
|
1423
|
+
return dt(e, t, i, He, l, c), () => C("div", {
|
|
1422
1424
|
class: M.value,
|
|
1423
|
-
onClick:
|
|
1424
|
-
}, [
|
|
1425
|
+
onClick: je
|
|
1426
|
+
}, [b(), C("div", {
|
|
1425
1427
|
ref: n,
|
|
1426
1428
|
class: "f-list-view-content",
|
|
1427
1429
|
onMouseover: () => {
|
|
1428
|
-
|
|
1430
|
+
f.value = !0;
|
|
1429
1431
|
},
|
|
1430
1432
|
onMouseleave: () => {
|
|
1431
|
-
|
|
1433
|
+
f.value = !1;
|
|
1432
1434
|
}
|
|
1433
1435
|
}, [D()]), A.value && C("div", {
|
|
1434
1436
|
class: "f-list-view-footer"
|
|
@@ -1461,8 +1463,8 @@ const Be = /* @__PURE__ */ q({
|
|
|
1461
1463
|
customClass: { type: Object, default: {} }
|
|
1462
1464
|
};
|
|
1463
1465
|
function wn(e, t) {
|
|
1464
|
-
function n(
|
|
1465
|
-
|
|
1466
|
+
function n(o) {
|
|
1467
|
+
o.stopPropagation(), e.disabled || t.emit("click", o);
|
|
1466
1468
|
}
|
|
1467
1469
|
return {
|
|
1468
1470
|
onClickButton: n
|
|
@@ -1470,14 +1472,14 @@ function wn(e, t) {
|
|
|
1470
1472
|
}
|
|
1471
1473
|
function Fn(e) {
|
|
1472
1474
|
const t = L(() => {
|
|
1473
|
-
const
|
|
1475
|
+
const o = {
|
|
1474
1476
|
"f-icon": !0
|
|
1475
1477
|
};
|
|
1476
1478
|
if (e.icon) {
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1479
|
+
const f = e.icon.trim().split(" ");
|
|
1480
|
+
f && f.length && f.reduce((v, m) => (v[m] = !0, v), o);
|
|
1479
1481
|
}
|
|
1480
|
-
return
|
|
1482
|
+
return o;
|
|
1481
1483
|
}), n = L(() => !!(e.icon && e.icon.trim()));
|
|
1482
1484
|
return { iconClass: t, shouldShowIcon: n };
|
|
1483
1485
|
}
|
|
@@ -1489,29 +1491,29 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1489
1491
|
const {
|
|
1490
1492
|
onClickButton: n
|
|
1491
1493
|
} = wn(e, t), {
|
|
1492
|
-
iconClass:
|
|
1493
|
-
shouldShowIcon:
|
|
1494
|
+
iconClass: o,
|
|
1495
|
+
shouldShowIcon: f
|
|
1494
1496
|
} = Fn(e), v = L(() => {
|
|
1495
|
-
const
|
|
1497
|
+
const m = {
|
|
1496
1498
|
btn: !0,
|
|
1497
1499
|
"btn-lg": e.size === "large",
|
|
1498
1500
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
1499
1501
|
"btn-sm": e.size === "small",
|
|
1500
|
-
"btn-icontext":
|
|
1502
|
+
"btn-icontext": f.value
|
|
1501
1503
|
};
|
|
1502
|
-
return
|
|
1504
|
+
return m[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((S, k) => (S[k] = e.customClass[k], S), m), m;
|
|
1503
1505
|
});
|
|
1504
1506
|
return () => C("button", {
|
|
1505
1507
|
class: v.value,
|
|
1506
1508
|
disabled: e.disabled,
|
|
1507
|
-
onClick: (
|
|
1508
|
-
}, [
|
|
1509
|
-
class:
|
|
1509
|
+
onClick: (m) => n(m)
|
|
1510
|
+
}, [f.value && C("i", {
|
|
1511
|
+
class: o.value
|
|
1510
1512
|
}, null), t.slots.default && t.slots.default()]);
|
|
1511
1513
|
}
|
|
1512
1514
|
}), Tn = /* @__PURE__ */ new Map([
|
|
1513
1515
|
["appearance", mt]
|
|
1514
|
-
]), kn = "https://json-schema.org/draft/2020-12/schema",
|
|
1516
|
+
]), kn = "https://json-schema.org/draft/2020-12/schema", Vn = "https://farris-design.gitee.io/combo-list.schema.json", On = "combo-list", Pn = "A Farris Input Component", Bn = "object", In = {
|
|
1515
1517
|
id: {
|
|
1516
1518
|
description: "The unique identifier for a combo list",
|
|
1517
1519
|
type: "string"
|
|
@@ -1704,15 +1706,15 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1704
1706
|
"visible"
|
|
1705
1707
|
], En = {
|
|
1706
1708
|
$schema: kn,
|
|
1707
|
-
$id:
|
|
1708
|
-
title:
|
|
1709
|
+
$id: Vn,
|
|
1710
|
+
title: On,
|
|
1709
1711
|
description: Pn,
|
|
1710
1712
|
type: Bn,
|
|
1711
1713
|
properties: In,
|
|
1712
1714
|
required: Mn,
|
|
1713
1715
|
ignore: Rn
|
|
1714
1716
|
};
|
|
1715
|
-
function
|
|
1717
|
+
function Dn(e, t, n) {
|
|
1716
1718
|
return t;
|
|
1717
1719
|
}
|
|
1718
1720
|
const ue = {
|
|
@@ -1883,9 +1885,9 @@ const ue = {
|
|
|
1883
1885
|
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
1884
1886
|
minPanelWidth: { type: Number, default: 160 },
|
|
1885
1887
|
popupOnClick: { type: Boolean, default: !0 }
|
|
1886
|
-
},
|
|
1888
|
+
}, jn = Object.assign({}, ue, {
|
|
1887
1889
|
readonly: {}
|
|
1888
|
-
}), Me = vt(ue, En, Tn,
|
|
1890
|
+
}), Me = vt(ue, En, Tn, Dn), Ln = {
|
|
1889
1891
|
dataSource: { type: Array, default: [] },
|
|
1890
1892
|
enableSearch: { type: Boolean, default: !1 },
|
|
1891
1893
|
idField: { type: String, default: "id" },
|
|
@@ -1911,7 +1913,7 @@ const ue = {
|
|
|
1911
1913
|
props: Ln,
|
|
1912
1914
|
emits: ["selectionChange"],
|
|
1913
1915
|
setup(e, t) {
|
|
1914
|
-
const n = F(),
|
|
1916
|
+
const n = F(), o = F(e.dataSource), f = F([]), v = F(e.separator), m = F(e.width), S = F(e.maxHeight), k = F(String(e.selectedValues).split(v.value)), p = L(() => e.multiSelect), y = L(() => ({
|
|
1915
1917
|
enableSelectRow: !0,
|
|
1916
1918
|
multiSelect: e.multiSelect,
|
|
1917
1919
|
multiSelectMode: "OnCheckAndClick",
|
|
@@ -1920,17 +1922,17 @@ const ue = {
|
|
|
1920
1922
|
showSelection: !0
|
|
1921
1923
|
}));
|
|
1922
1924
|
G(e.dataSource, () => {
|
|
1923
|
-
|
|
1925
|
+
o.value = e.dataSource;
|
|
1924
1926
|
}), L(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
1925
1927
|
const r = L(() => {
|
|
1926
1928
|
const s = {};
|
|
1927
|
-
return
|
|
1929
|
+
return m.value !== void 0 && (s.width = `${m.value}px`), S.value !== void 0 && S.value > 0 && (s.maxHeight = `${S.value}px`), s;
|
|
1928
1930
|
});
|
|
1929
|
-
function
|
|
1931
|
+
function i(s) {
|
|
1930
1932
|
n.value.search(s);
|
|
1931
1933
|
}
|
|
1932
1934
|
function c(s) {
|
|
1933
|
-
|
|
1935
|
+
f.value = s.map((h) => Object.assign({}, h)), k.value = s.map((h) => h[e.idField]), t.emit("selectionChange", f.value);
|
|
1934
1936
|
}
|
|
1935
1937
|
function a(s) {
|
|
1936
1938
|
if (e.enableHighlightSearch)
|
|
@@ -1939,7 +1941,7 @@ const ue = {
|
|
|
1939
1941
|
const {
|
|
1940
1942
|
searchOption: u
|
|
1941
1943
|
} = e;
|
|
1942
|
-
typeof u == "function" ? h =
|
|
1944
|
+
typeof u == "function" ? h = o.value.filter((g) => u(s, g)) : h = o.value.filter((g) => g[e.valueField].indexOf(s) > -1 || g[e.textField].indexOf(s) > -1), n.value.updateDataSource(h);
|
|
1943
1945
|
}
|
|
1944
1946
|
G([() => e.selectedValues], ([s]) => {
|
|
1945
1947
|
e.multiSelect ? k.value = s.split(v.value) : k.value = [s];
|
|
@@ -1953,12 +1955,12 @@ const ue = {
|
|
|
1953
1955
|
const u = (s = k.value) == null ? void 0 : s[0];
|
|
1954
1956
|
let g = u;
|
|
1955
1957
|
if (!ze(u)) {
|
|
1956
|
-
const
|
|
1957
|
-
E === "number" &&
|
|
1958
|
+
const I = typeof u, E = typeof ((h = o.value[0]) == null ? void 0 : h[e.valueField || e.idField]);
|
|
1959
|
+
E === "number" && I !== E && (g = Number(u)), E === "boolean" && I !== E && (g = u === "true" ? !0 : u === "false" ? !1 : u), l(g);
|
|
1958
1960
|
}
|
|
1959
1961
|
}
|
|
1960
1962
|
}), t.expose({
|
|
1961
|
-
search:
|
|
1963
|
+
search: i,
|
|
1962
1964
|
activeRowById: l
|
|
1963
1965
|
}), () => C("div", {
|
|
1964
1966
|
class: "f-combo-list-container",
|
|
@@ -1970,7 +1972,7 @@ const ue = {
|
|
|
1970
1972
|
itemContentClass: "text-truncate",
|
|
1971
1973
|
header: "ContentHeader",
|
|
1972
1974
|
headerClass: "f-combo-list-search-box",
|
|
1973
|
-
data:
|
|
1975
|
+
data: o.value,
|
|
1974
1976
|
idField: e.idField,
|
|
1975
1977
|
textField: e.textField,
|
|
1976
1978
|
titleField: e.titleField,
|
|
@@ -1984,58 +1986,58 @@ const ue = {
|
|
|
1984
1986
|
}
|
|
1985
1987
|
});
|
|
1986
1988
|
function An(e) {
|
|
1987
|
-
const { t } = ae(), n = F(""),
|
|
1988
|
-
function
|
|
1989
|
-
const c = e.multiSelect ? String(
|
|
1990
|
-
return
|
|
1991
|
-
const g = c.indexOf(h[e.valueField]),
|
|
1992
|
-
return g -
|
|
1989
|
+
const { t } = ae(), n = F(""), o = F(e.modelValue), f = F(e.data || []), v = F(e.editable);
|
|
1990
|
+
function m(i) {
|
|
1991
|
+
const c = e.multiSelect ? String(i).split(e.separator) : [String(i)], a = c.map((h) => [h, !0]), l = new Map(a);
|
|
1992
|
+
return f.value.filter((h) => l.has(String(h[e.valueField]))).sort((h, u) => {
|
|
1993
|
+
const g = c.indexOf(h[e.valueField]), I = c.indexOf(u[e.valueField]);
|
|
1994
|
+
return g - I;
|
|
1993
1995
|
});
|
|
1994
1996
|
}
|
|
1995
|
-
function
|
|
1996
|
-
const c =
|
|
1997
|
-
n.value = v.value ? c ||
|
|
1997
|
+
function S(i) {
|
|
1998
|
+
const c = m(i).map((a) => a[e.textField]).join(e.separator);
|
|
1999
|
+
n.value = v.value ? c || i : c;
|
|
1998
2000
|
}
|
|
1999
|
-
function k(
|
|
2001
|
+
function k(i) {
|
|
2000
2002
|
if (e.multiSelect) {
|
|
2001
|
-
const c =
|
|
2002
|
-
return
|
|
2003
|
+
const c = i.split(e.separator).map((l) => [l, !0]), a = new Map(c);
|
|
2004
|
+
return f.value.filter((l) => a.has(l[e.textField]));
|
|
2003
2005
|
}
|
|
2004
|
-
return
|
|
2006
|
+
return f.value.filter((c) => "" + c[e.textField] === i);
|
|
2005
2007
|
}
|
|
2006
|
-
function p(
|
|
2008
|
+
function p(i) {
|
|
2007
2009
|
const c = {};
|
|
2008
|
-
return c[e.idField] =
|
|
2010
|
+
return c[e.idField] = i, c[e.textField] = i, [c];
|
|
2009
2011
|
}
|
|
2010
|
-
function y(
|
|
2011
|
-
let c = k(
|
|
2012
|
+
function y(i) {
|
|
2013
|
+
let c = k(i);
|
|
2012
2014
|
const a = c && c.length > 0;
|
|
2013
|
-
return v.value && !a && (c = p(
|
|
2015
|
+
return v.value && !a && (c = p(i)), c;
|
|
2014
2016
|
}
|
|
2015
2017
|
function r() {
|
|
2016
|
-
const { url:
|
|
2018
|
+
const { url: i, method: c = "GET", headers: a = { "Content-Type": "application/json;charset=utf-8;" }, body: l = null } = e.remote, s = c.toLowerCase() === "get" ? { method: c, headers: a } : { method: c, headers: a, body: l };
|
|
2017
2019
|
let h = !1;
|
|
2018
|
-
fetch(new Request(
|
|
2019
|
-
var
|
|
2020
|
+
fetch(new Request(i, s)).then((u) => {
|
|
2021
|
+
var I, E;
|
|
2020
2022
|
if (u.status === 200)
|
|
2021
|
-
return h = !!((E = (
|
|
2023
|
+
return h = !!((E = (I = u.headers) == null ? void 0 : I.get("content-type")) != null && E.includes("application/json")), h ? u.text() : u.json();
|
|
2022
2024
|
throw u.status === 405 ? new Error(t("comboList.remoteError")) : new Error(u.statusText);
|
|
2023
2025
|
}).then((u) => {
|
|
2024
|
-
u.length && (
|
|
2026
|
+
u.length && (f.value = h ? JSON.parse(u) : u);
|
|
2025
2027
|
}).catch((u) => {
|
|
2026
2028
|
console.warn(u);
|
|
2027
2029
|
});
|
|
2028
2030
|
}
|
|
2029
2031
|
return e.remote && r(), G(() => e.data, () => {
|
|
2030
|
-
|
|
2031
|
-
}), G([
|
|
2032
|
+
f.value = e.data;
|
|
2033
|
+
}), G([f], ([i]) => {
|
|
2032
2034
|
if (e.modelValue != null) {
|
|
2033
|
-
const c =
|
|
2035
|
+
const c = i.find((a) => a[e.valueField] === e.modelValue);
|
|
2034
2036
|
c && (n.value = c[e.textField]);
|
|
2035
2037
|
}
|
|
2036
|
-
}), G(() => e.modelValue, (
|
|
2037
|
-
|
|
2038
|
-
}),
|
|
2038
|
+
}), G(() => e.modelValue, (i) => {
|
|
2039
|
+
o.value = i, S(i);
|
|
2040
|
+
}), S(e.modelValue), { dataSource: f, displayText: n, editable: v, modelValue: o, getItemsByDisplayText: k, getItemsByValue: m, getSelectedItemsByDisplayText: y };
|
|
2039
2041
|
}
|
|
2040
2042
|
const Q = /* @__PURE__ */ q({
|
|
2041
2043
|
name: "FComboList",
|
|
@@ -2044,65 +2046,67 @@ const Q = /* @__PURE__ */ q({
|
|
|
2044
2046
|
setup(e, t) {
|
|
2045
2047
|
const {
|
|
2046
2048
|
t: n
|
|
2047
|
-
} = ae(),
|
|
2049
|
+
} = ae(), o = F(), f = F(), v = F(e.disabled || e.readonly), m = F(e.enableClear), S = F(e.enableSearch), k = F(e.readonly), {
|
|
2048
2050
|
dataSource: p,
|
|
2049
2051
|
displayText: y,
|
|
2050
2052
|
editable: r,
|
|
2051
|
-
modelValue:
|
|
2053
|
+
modelValue: i,
|
|
2052
2054
|
getSelectedItemsByDisplayText: c,
|
|
2053
2055
|
getItemsByDisplayText: a,
|
|
2054
2056
|
getItemsByValue: l
|
|
2055
2057
|
} = An(e), s = F(e.dropDownIcon);
|
|
2056
2058
|
s.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (s.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
2057
|
-
const h = L(() => e.multiSelect), u = L(() =>
|
|
2059
|
+
const h = L(() => e.multiSelect), u = L(() => f.value ? f.value.elementRef.getBoundingClientRect().width : 0);
|
|
2058
2060
|
function g() {
|
|
2059
|
-
!h.value &&
|
|
2061
|
+
!h.value && f.value && f.value.hidePopup();
|
|
2060
2062
|
}
|
|
2061
|
-
function B
|
|
2062
|
-
y.value =
|
|
2063
|
-
let
|
|
2064
|
-
|
|
2063
|
+
function I(B) {
|
|
2064
|
+
y.value = B.map((w) => w[e.textField]).join(e.separator);
|
|
2065
|
+
let b = "";
|
|
2066
|
+
B.length === 1 ? b = B[0][e.valueField] : b = B.map((w) => w[e.valueField]).join(e.separator), i.value !== b && (i.value = b, t.emit("update:modelValue", i.value), t.emit("change", B, i.value));
|
|
2065
2067
|
}
|
|
2066
2068
|
function E() {
|
|
2067
|
-
const
|
|
2068
|
-
B
|
|
2069
|
+
const B = l(i.value);
|
|
2070
|
+
I(B);
|
|
2069
2071
|
}
|
|
2070
|
-
function
|
|
2072
|
+
function V() {
|
|
2071
2073
|
k.value || y.value;
|
|
2072
2074
|
}
|
|
2073
|
-
function P(
|
|
2074
|
-
var
|
|
2075
|
-
|
|
2075
|
+
function P(B) {
|
|
2076
|
+
var b;
|
|
2077
|
+
i.value = "", (b = o.value) == null || b.activeRowById(""), t.emit("update:modelValue", ""), t.emit("change", [], ""), t.emit("clear");
|
|
2076
2078
|
}
|
|
2077
|
-
function R(
|
|
2078
|
-
var
|
|
2079
|
-
e.enableSearch && e.enableHighlightSearch && ((
|
|
2079
|
+
function R(B) {
|
|
2080
|
+
var b, w;
|
|
2081
|
+
e.enableSearch && e.enableHighlightSearch && ((b = o.value) == null || b.search(B)), (w = o.value) == null || w.activeRowById(B), t.emit("change", [i.value], i.value);
|
|
2080
2082
|
}
|
|
2081
|
-
function d(
|
|
2083
|
+
function d(B) {
|
|
2082
2084
|
if (e.multiSelect) {
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
+
const b = a(B);
|
|
2086
|
+
e.viewType;
|
|
2087
|
+
const O = b.map((j) => j[e.idField || e.valueField]).join(e.separator);
|
|
2088
|
+
i.value !== O && (i.value = O, t.emit("update:modelValue", i.value), t.emit("change", b, i.value));
|
|
2085
2089
|
}
|
|
2086
2090
|
}
|
|
2087
2091
|
function M() {
|
|
2088
2092
|
return y.value;
|
|
2089
2093
|
}
|
|
2090
|
-
function A(
|
|
2094
|
+
function A(B) {
|
|
2091
2095
|
const {
|
|
2092
|
-
value:
|
|
2093
|
-
} =
|
|
2094
|
-
R(
|
|
2096
|
+
value: b
|
|
2097
|
+
} = B.target;
|
|
2098
|
+
R(b), t.emit("input", b);
|
|
2095
2099
|
}
|
|
2096
2100
|
function T() {
|
|
2097
|
-
|
|
2101
|
+
f.value.hidePopup();
|
|
2098
2102
|
}
|
|
2099
2103
|
return t.expose({
|
|
2100
2104
|
getDisplayText: M,
|
|
2101
2105
|
hidePopup: T
|
|
2102
|
-
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
2103
|
-
v.value =
|
|
2106
|
+
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, b, w, O, j]) => {
|
|
2107
|
+
v.value = B, r.value = b, m.value = w, S.value = O, k.value = j;
|
|
2104
2108
|
}), () => C(ft, {
|
|
2105
|
-
ref:
|
|
2109
|
+
ref: f,
|
|
2106
2110
|
id: e.id,
|
|
2107
2111
|
disable: v.value,
|
|
2108
2112
|
readonly: k.value,
|
|
@@ -2110,18 +2114,18 @@ const Q = /* @__PURE__ */ q({
|
|
|
2110
2114
|
editable: r.value,
|
|
2111
2115
|
buttonContent: s.value,
|
|
2112
2116
|
placeholder: e.placeholder === "请选择" ? n("comboList.placeholder") : e.placeholder,
|
|
2113
|
-
enableClear:
|
|
2117
|
+
enableClear: m.value,
|
|
2114
2118
|
maxLength: e.maxLength,
|
|
2115
2119
|
tabIndex: e.tabIndex,
|
|
2116
2120
|
enableTitle: e.enableTitle,
|
|
2117
2121
|
multiSelect: e.multiSelect,
|
|
2118
2122
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
2119
2123
|
modelValue: y.value,
|
|
2120
|
-
"onUpdate:modelValue": (
|
|
2124
|
+
"onUpdate:modelValue": (B) => y.value = B,
|
|
2121
2125
|
focusOnCreated: e.focusOnCreated,
|
|
2122
2126
|
selectOnCreated: e.selectOnCreated,
|
|
2123
2127
|
onClear: P,
|
|
2124
|
-
onClick:
|
|
2128
|
+
onClick: V,
|
|
2125
2129
|
onChange: d,
|
|
2126
2130
|
onBlur: E,
|
|
2127
2131
|
onInput: A,
|
|
@@ -2133,21 +2137,21 @@ const Q = /* @__PURE__ */ q({
|
|
|
2133
2137
|
limitContentBySpace: !0
|
|
2134
2138
|
}, {
|
|
2135
2139
|
default: () => [C($n, {
|
|
2136
|
-
ref:
|
|
2140
|
+
ref: o,
|
|
2137
2141
|
idField: e.idField,
|
|
2138
2142
|
valueField: e.valueField,
|
|
2139
2143
|
textField: e.textField,
|
|
2140
2144
|
titleField: e.titleField,
|
|
2141
2145
|
dataSource: p.value,
|
|
2142
|
-
selectedValues:
|
|
2146
|
+
selectedValues: i.value,
|
|
2143
2147
|
separator: e.separator,
|
|
2144
2148
|
multiSelect: e.multiSelect,
|
|
2145
|
-
enableSearch:
|
|
2149
|
+
enableSearch: S.value,
|
|
2146
2150
|
maxHeight: e.maxHeight,
|
|
2147
2151
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
2148
2152
|
width: e.fitEditor ? u.value : void 0,
|
|
2149
|
-
onSelectionChange: (
|
|
2150
|
-
B
|
|
2153
|
+
onSelectionChange: (B) => {
|
|
2154
|
+
I(B), g();
|
|
2151
2155
|
}
|
|
2152
2156
|
}, null)]
|
|
2153
2157
|
});
|
|
@@ -2163,7 +2167,7 @@ class xn extends bt {
|
|
|
2163
2167
|
super(t, n);
|
|
2164
2168
|
}
|
|
2165
2169
|
getCommonEditorProperties(t) {
|
|
2166
|
-
var n,
|
|
2170
|
+
var n, o, f;
|
|
2167
2171
|
return {
|
|
2168
2172
|
viewType: {
|
|
2169
2173
|
visible: !!((n = t.editor) != null && n.multiSelect),
|
|
@@ -2179,7 +2183,7 @@ class xn extends bt {
|
|
|
2179
2183
|
refreshPanelAfterChanged: !0
|
|
2180
2184
|
},
|
|
2181
2185
|
separator: {
|
|
2182
|
-
visible: !!((
|
|
2186
|
+
visible: !!((o = t.editor) != null && o.multiSelect) && ((f = t.editor) == null ? void 0 : f.viewType) === "text",
|
|
2183
2187
|
description: "下拉列表启用多选且数据展示类型为文本时的分隔符",
|
|
2184
2188
|
title: "分隔符",
|
|
2185
2189
|
type: "enum",
|
|
@@ -2197,23 +2201,24 @@ class xn extends bt {
|
|
|
2197
2201
|
title: "允许编辑",
|
|
2198
2202
|
type: "boolean",
|
|
2199
2203
|
refreshPanelAfterChanged: !0,
|
|
2200
|
-
readonly:
|
|
2201
|
-
|
|
2202
|
-
enableHighlightSearch: {
|
|
2203
|
-
visible: !!((b = t.editor) != null && b.editable),
|
|
2204
|
-
description: "编辑状态下启用高亮搜索",
|
|
2205
|
-
title: "启用高亮搜索",
|
|
2206
|
-
type: "boolean"
|
|
2204
|
+
readonly: !0
|
|
2205
|
+
// readonly: !!propertyData.editor?.multiSelect && (propertyData.editor?.viewType === 'tag' || !propertyData.editor!.viewType)
|
|
2207
2206
|
}
|
|
2207
|
+
// enableHighlightSearch: {
|
|
2208
|
+
// visible: !!propertyData.editor?.editable,
|
|
2209
|
+
// description: "编辑状态下启用高亮搜索",
|
|
2210
|
+
// title: "启用高亮搜索",
|
|
2211
|
+
// type: "boolean"
|
|
2212
|
+
// },
|
|
2208
2213
|
};
|
|
2209
2214
|
}
|
|
2210
2215
|
getEditorProperties(t) {
|
|
2211
|
-
var v,
|
|
2216
|
+
var v, m;
|
|
2212
2217
|
const n = this;
|
|
2213
|
-
let
|
|
2218
|
+
let o = "";
|
|
2214
2219
|
if (((v = t == null ? void 0 : t.binding) == null ? void 0 : v.type) === "Form") {
|
|
2215
|
-
const
|
|
2216
|
-
(
|
|
2220
|
+
const S = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
2221
|
+
(m = S == null ? void 0 : S.schemaField) != null && m.type && (o = S.schemaField.type.$type);
|
|
2217
2222
|
}
|
|
2218
2223
|
return n.getComponentConfig(t, { type: "combo-list" }, {
|
|
2219
2224
|
// enableSearch: {
|
|
@@ -2271,7 +2276,7 @@ class xn extends bt {
|
|
|
2271
2276
|
// },
|
|
2272
2277
|
// },
|
|
2273
2278
|
body: {
|
|
2274
|
-
visible:
|
|
2279
|
+
visible: !1,
|
|
2275
2280
|
$converter: he,
|
|
2276
2281
|
description: "",
|
|
2277
2282
|
title: "服务端API参数",
|
|
@@ -2292,7 +2297,7 @@ class xn extends bt {
|
|
|
2292
2297
|
multiSelect: {
|
|
2293
2298
|
description: "",
|
|
2294
2299
|
title: "启用多选",
|
|
2295
|
-
visible: !
|
|
2300
|
+
visible: !o || o === "StringType",
|
|
2296
2301
|
type: "boolean",
|
|
2297
2302
|
refreshPanelAfterChanged: !0
|
|
2298
2303
|
},
|
|
@@ -2303,37 +2308,38 @@ class xn extends bt {
|
|
|
2303
2308
|
editor: {
|
|
2304
2309
|
nullable: !0,
|
|
2305
2310
|
min: 0,
|
|
2306
|
-
useThousands: !1
|
|
2311
|
+
useThousands: !1,
|
|
2312
|
+
needValid: !0
|
|
2307
2313
|
}
|
|
2308
2314
|
},
|
|
2309
2315
|
...this.getCommonEditorProperties(t)
|
|
2310
|
-
}, (
|
|
2311
|
-
if (!
|
|
2316
|
+
}, (S, k) => {
|
|
2317
|
+
if (!S || !k.editor)
|
|
2312
2318
|
return;
|
|
2313
2319
|
const p = this;
|
|
2314
|
-
switch (
|
|
2320
|
+
switch (S.propertyID) {
|
|
2315
2321
|
case "dataSourceType": {
|
|
2316
|
-
|
|
2322
|
+
S.propertyValue === "static" ? (k.editor.valueField = "value", k.editor.textField = "name", k.editor.remote = null) : S.propertyValue === "dynamic" && (k.editor.remote = { method: "GET" }, k.editor.valueField = "value", k.editor.textField = "name");
|
|
2317
2323
|
break;
|
|
2318
2324
|
}
|
|
2319
2325
|
case "data": {
|
|
2320
|
-
!p.checkEnumDataReadonly(k) && k.formatter && (k.formatter.data = [...
|
|
2326
|
+
!p.checkEnumDataReadonly(k) && k.formatter && (k.formatter.data = [...S.propertyValue]);
|
|
2321
2327
|
break;
|
|
2322
2328
|
}
|
|
2323
2329
|
case "viewType":
|
|
2324
|
-
|
|
2330
|
+
S.propertyValue === "tag" && (k.editor.editable = !1);
|
|
2325
2331
|
}
|
|
2326
2332
|
});
|
|
2327
2333
|
}
|
|
2328
2334
|
getGridFieldEdtiorProperties(t, n) {
|
|
2329
|
-
var
|
|
2330
|
-
const
|
|
2331
|
-
let
|
|
2332
|
-
if (((
|
|
2335
|
+
var m, S, k, p;
|
|
2336
|
+
const o = this;
|
|
2337
|
+
let f = "";
|
|
2338
|
+
if (((m = t == null ? void 0 : t.binding) == null ? void 0 : m.type) === "Form") {
|
|
2333
2339
|
const y = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
2334
|
-
(
|
|
2340
|
+
(S = y == null ? void 0 : y.schemaField) != null && S.type && (f = y.schemaField.type.$type);
|
|
2335
2341
|
}
|
|
2336
|
-
return
|
|
2342
|
+
return o.getComponentConfig(t, { type: "combo-list" }, {
|
|
2337
2343
|
// editable: {
|
|
2338
2344
|
// description: "",
|
|
2339
2345
|
// title: "允许编辑",
|
|
@@ -2350,7 +2356,7 @@ class xn extends bt {
|
|
|
2350
2356
|
title: "数据",
|
|
2351
2357
|
type: "array",
|
|
2352
2358
|
visible: !0,
|
|
2353
|
-
...
|
|
2359
|
+
...o.getItemCollectionEditor(t, (k = t.editor) == null ? void 0 : k.valueField, (p = t.editor) == null ? void 0 : p.textField),
|
|
2354
2360
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2355
2361
|
refreshPanelAfterChanged: !0
|
|
2356
2362
|
},
|
|
@@ -2369,7 +2375,7 @@ class xn extends bt {
|
|
|
2369
2375
|
multiSelect: {
|
|
2370
2376
|
description: "",
|
|
2371
2377
|
title: "启用多选",
|
|
2372
|
-
visible:
|
|
2378
|
+
visible: f === "StringType",
|
|
2373
2379
|
type: "boolean",
|
|
2374
2380
|
refreshPanelAfterChanged: !0
|
|
2375
2381
|
},
|
|
@@ -2380,37 +2386,38 @@ class xn extends bt {
|
|
|
2380
2386
|
editor: {
|
|
2381
2387
|
nullable: !0,
|
|
2382
2388
|
min: 0,
|
|
2383
|
-
useThousands: !1
|
|
2389
|
+
useThousands: !1,
|
|
2390
|
+
needValid: !0
|
|
2384
2391
|
}
|
|
2385
2392
|
},
|
|
2386
2393
|
...this.getCommonEditorProperties(t)
|
|
2387
2394
|
}, (y, r) => {
|
|
2388
2395
|
if (!y || !r.editor)
|
|
2389
2396
|
return;
|
|
2390
|
-
const
|
|
2397
|
+
const i = this;
|
|
2391
2398
|
switch (y.propertyID) {
|
|
2392
2399
|
case "dataSourceType": {
|
|
2393
2400
|
y.propertyValue === "static" ? (r.editor.valueField = "value", r.editor.textField = "name", r.editor.remote = null) : y.propertyValue === "dynamic" && (r.editor.remote = { method: "GET" });
|
|
2394
2401
|
break;
|
|
2395
2402
|
}
|
|
2396
2403
|
case "data": {
|
|
2397
|
-
!
|
|
2404
|
+
!i.checkEnumDataReadonly(r) && r.formatter && (r.formatter.data = [...y.propertyValue]);
|
|
2398
2405
|
break;
|
|
2399
2406
|
}
|
|
2400
2407
|
}
|
|
2401
2408
|
});
|
|
2402
2409
|
}
|
|
2403
|
-
setEditorPropertyRelates(t, n,
|
|
2410
|
+
setEditorPropertyRelates(t, n, o) {
|
|
2404
2411
|
if (!t || !n.editor)
|
|
2405
2412
|
return;
|
|
2406
|
-
const
|
|
2413
|
+
const f = this;
|
|
2407
2414
|
switch (t.propertyID) {
|
|
2408
2415
|
case "dataSourceType": {
|
|
2409
2416
|
t.propertyValue === "static" && (n.editor.valueField = "value", n.editor.textField = "name", n.editor.remote = {});
|
|
2410
2417
|
break;
|
|
2411
2418
|
}
|
|
2412
2419
|
case "data": {
|
|
2413
|
-
!
|
|
2420
|
+
!f.checkEnumDataReadonly(n) && n.formatter && (n.formatter.data = [...t.propertyValue]);
|
|
2414
2421
|
break;
|
|
2415
2422
|
}
|
|
2416
2423
|
}
|
|
@@ -2418,31 +2425,31 @@ class xn extends bt {
|
|
|
2418
2425
|
/**
|
|
2419
2426
|
* 切换绑定属性
|
|
2420
2427
|
*/
|
|
2421
|
-
changeBindingField(t, n,
|
|
2428
|
+
changeBindingField(t, n, o) {
|
|
2422
2429
|
var v;
|
|
2423
2430
|
super.changeBindingField(t, n);
|
|
2424
|
-
const
|
|
2425
|
-
t.editor && ((v =
|
|
2431
|
+
const f = o;
|
|
2432
|
+
t.editor && ((v = f == null ? void 0 : f.type) == null ? void 0 : v.$type) === qe.EnumType && (t.editor.data = f.type.enumValues || []);
|
|
2426
2433
|
}
|
|
2427
2434
|
}
|
|
2428
2435
|
function Hn(e, t) {
|
|
2429
2436
|
const n = e.schema;
|
|
2430
|
-
function
|
|
2431
|
-
return new xn(
|
|
2437
|
+
function o(f, v) {
|
|
2438
|
+
return new xn(f, t).getPropertyConfig(n, v);
|
|
2432
2439
|
}
|
|
2433
2440
|
return {
|
|
2434
|
-
getPropsConfig:
|
|
2441
|
+
getPropsConfig: o
|
|
2435
2442
|
};
|
|
2436
2443
|
}
|
|
2437
2444
|
const Nn = /* @__PURE__ */ q({
|
|
2438
2445
|
name: "FComboListDesign",
|
|
2439
|
-
props:
|
|
2446
|
+
props: jn,
|
|
2440
2447
|
emits: ["clear", "update:modelValue", "change"],
|
|
2441
2448
|
setup(e, t) {
|
|
2442
|
-
const n = F(),
|
|
2449
|
+
const n = F(), o = ie("designer-host-service"), f = ie("design-item-context"), v = Hn(f, o), m = yt(n, f, v);
|
|
2443
2450
|
return le(() => {
|
|
2444
|
-
n.value.componentInstance =
|
|
2445
|
-
}), t.expose(
|
|
2451
|
+
n.value.componentInstance = m;
|
|
2452
|
+
}), t.expose(m.value), () => C(ht, {
|
|
2446
2453
|
ref: n,
|
|
2447
2454
|
buttonContent: e.dropDownIcon,
|
|
2448
2455
|
readonly: !0,
|
|
@@ -2453,7 +2460,7 @@ const Nn = /* @__PURE__ */ q({
|
|
|
2453
2460
|
}, null);
|
|
2454
2461
|
}
|
|
2455
2462
|
});
|
|
2456
|
-
Q.register = (e, t, n,
|
|
2463
|
+
Q.register = (e, t, n, o) => {
|
|
2457
2464
|
e["combo-list"] = Q, t["combo-list"] = Me;
|
|
2458
2465
|
};
|
|
2459
2466
|
Q.registerDesigner = (e, t, n) => {
|
|
@@ -2464,14 +2471,14 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2464
2471
|
props: ce,
|
|
2465
2472
|
emits: ["change"],
|
|
2466
2473
|
setup(e, t) {
|
|
2467
|
-
const n = F(),
|
|
2468
|
-
function
|
|
2474
|
+
const n = F(), o = F(e.items);
|
|
2475
|
+
function f() {
|
|
2469
2476
|
var g;
|
|
2470
2477
|
const u = Array.isArray(e.items) ? e.items : [];
|
|
2471
|
-
|
|
2478
|
+
o.value = [...u], (g = n.value) == null || g.updateDataSource(o.value);
|
|
2472
2479
|
}
|
|
2473
|
-
G(() => e.items,
|
|
2474
|
-
const v = F("排序列"),
|
|
2480
|
+
G(() => e.items, f);
|
|
2481
|
+
const v = F("排序列"), m = F("排序方式"), S = F("添加排序列"), k = [{
|
|
2475
2482
|
id: "asc",
|
|
2476
2483
|
name: "升序"
|
|
2477
2484
|
}, {
|
|
@@ -2479,41 +2486,41 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2479
2486
|
name: "降序"
|
|
2480
2487
|
}], p = F(/* @__PURE__ */ new Map());
|
|
2481
2488
|
function y() {
|
|
2482
|
-
const u =
|
|
2489
|
+
const u = o.value.map((g) => [g.id, !0]);
|
|
2483
2490
|
p.value = new Map(u);
|
|
2484
2491
|
}
|
|
2485
2492
|
y();
|
|
2486
|
-
const r = L(() => e.dataSource.map((u) => (u.disabled = p.value.has(u.id), u))),
|
|
2493
|
+
const r = L(() => e.dataSource.map((u) => (u.disabled = p.value.has(u.id), u))), i = L(() => ({
|
|
2487
2494
|
"f-order": !0
|
|
2488
2495
|
}));
|
|
2489
2496
|
function c(u) {
|
|
2490
|
-
|
|
2497
|
+
o.value = o.value.filter((g) => g.id !== u.id), y(), t.emit("change", o.value);
|
|
2491
2498
|
}
|
|
2492
2499
|
function a() {
|
|
2493
|
-
|
|
2500
|
+
o.value = [...o.value, {
|
|
2494
2501
|
id: Date.now().toString(),
|
|
2495
2502
|
name: "",
|
|
2496
2503
|
order: "asc"
|
|
2497
|
-
}], y(), t.emit("change",
|
|
2504
|
+
}], y(), t.emit("change", o.value);
|
|
2498
2505
|
}
|
|
2499
2506
|
function l(u) {
|
|
2500
2507
|
if (u && u.length === 1) {
|
|
2501
|
-
const g = u[0],
|
|
2502
|
-
|
|
2508
|
+
const g = u[0], I = o.value.find((E) => E.id === g.id);
|
|
2509
|
+
I && (I.name = g.name);
|
|
2503
2510
|
}
|
|
2504
|
-
y(), t.emit("change",
|
|
2511
|
+
y(), t.emit("change", o.value);
|
|
2505
2512
|
}
|
|
2506
2513
|
function s(u) {
|
|
2507
2514
|
if (u && u.length) {
|
|
2508
2515
|
const g = /* @__PURE__ */ new Map();
|
|
2509
|
-
u.reduce((
|
|
2516
|
+
u.reduce((I, E) => (I.set(E.id, E), I), g), o.value = u.map((I) => g.get(I.id)), t.emit("change", o.value);
|
|
2510
2517
|
}
|
|
2511
2518
|
}
|
|
2512
2519
|
function h() {
|
|
2513
2520
|
return C(Be, {
|
|
2514
2521
|
ref: n,
|
|
2515
2522
|
style: "flex:1",
|
|
2516
|
-
data:
|
|
2523
|
+
data: o.value,
|
|
2517
2524
|
draggable: !0,
|
|
2518
2525
|
view: "DraggableView",
|
|
2519
2526
|
"keep-order": !0,
|
|
@@ -2527,7 +2534,7 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2527
2534
|
class: "f-order-header-order-field"
|
|
2528
2535
|
}, [v.value]), C("span", {
|
|
2529
2536
|
class: "f-order-header-order-type"
|
|
2530
|
-
}, [
|
|
2537
|
+
}, [m.value])]),
|
|
2531
2538
|
itemContent: (u) => C("div", {
|
|
2532
2539
|
class: "f-order-item-content"
|
|
2533
2540
|
}, [C(Z, {
|
|
@@ -2561,20 +2568,20 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2561
2568
|
class: "f-order-add-icon"
|
|
2562
2569
|
}, [C("i", {
|
|
2563
2570
|
class: "f-icon f-icon-add"
|
|
2564
|
-
}, null)]),
|
|
2571
|
+
}, null)]), S.value])
|
|
2565
2572
|
})])
|
|
2566
2573
|
});
|
|
2567
2574
|
}
|
|
2568
2575
|
return () => C("div", {
|
|
2569
|
-
class:
|
|
2576
|
+
class: i.value
|
|
2570
2577
|
}, [h()]);
|
|
2571
2578
|
}
|
|
2572
2579
|
});
|
|
2573
2580
|
function Gn(e, t, n) {
|
|
2574
2581
|
var A;
|
|
2575
|
-
const
|
|
2576
|
-
let
|
|
2577
|
-
function
|
|
2582
|
+
const o = "", f = "", v = F();
|
|
2583
|
+
let m;
|
|
2584
|
+
function S() {
|
|
2578
2585
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2579
2586
|
}
|
|
2580
2587
|
function k() {
|
|
@@ -2591,16 +2598,16 @@ function Gn(e, t, n) {
|
|
|
2591
2598
|
return null;
|
|
2592
2599
|
if (T.value.schema && T.value.schema.type === "component")
|
|
2593
2600
|
return T.value;
|
|
2594
|
-
const
|
|
2595
|
-
return
|
|
2601
|
+
const B = F(T == null ? void 0 : T.value.parent), b = r(B);
|
|
2602
|
+
return b || null;
|
|
2596
2603
|
}
|
|
2597
|
-
function
|
|
2598
|
-
var
|
|
2599
|
-
const { componentInstance:
|
|
2600
|
-
if (!
|
|
2604
|
+
function i(T = t) {
|
|
2605
|
+
var O;
|
|
2606
|
+
const { componentInstance: B, designerItemElementRef: b } = T;
|
|
2607
|
+
if (!B || !B.value)
|
|
2601
2608
|
return null;
|
|
2602
|
-
const { getCustomButtons: w } =
|
|
2603
|
-
return
|
|
2609
|
+
const { getCustomButtons: w } = B.value;
|
|
2610
|
+
return B.value.canMove || w && ((O = w()) != null && O.length) ? b : i(T.parent);
|
|
2604
2611
|
}
|
|
2605
2612
|
function c(T) {
|
|
2606
2613
|
return !!n;
|
|
@@ -2610,68 +2617,68 @@ function Gn(e, t, n) {
|
|
|
2610
2617
|
}
|
|
2611
2618
|
function l() {
|
|
2612
2619
|
}
|
|
2613
|
-
function s(T,
|
|
2614
|
-
var
|
|
2615
|
-
!T || !
|
|
2620
|
+
function s(T, B) {
|
|
2621
|
+
var b;
|
|
2622
|
+
!T || !B || (b = t == null ? void 0 : t.setupContext) == null || b.emit("dragEnd");
|
|
2616
2623
|
}
|
|
2617
|
-
function h(T,
|
|
2618
|
-
const { componentType:
|
|
2619
|
-
let w = pt(
|
|
2620
|
-
const
|
|
2621
|
-
return w && !w.id && w.type ===
|
|
2624
|
+
function h(T, B) {
|
|
2625
|
+
const { componentType: b } = T;
|
|
2626
|
+
let w = pt(b, T, B);
|
|
2627
|
+
const O = b.toLowerCase().replace(/-/g, "_");
|
|
2628
|
+
return w && !w.id && w.type === b && (w.id = `${O}_${Math.random().toString().slice(2, 6)}`), w;
|
|
2622
2629
|
}
|
|
2623
2630
|
function u(T) {
|
|
2624
2631
|
}
|
|
2625
2632
|
function g(...T) {
|
|
2626
2633
|
}
|
|
2627
|
-
function
|
|
2634
|
+
function I(T) {
|
|
2628
2635
|
if (!T)
|
|
2629
2636
|
return;
|
|
2630
|
-
const
|
|
2631
|
-
if (
|
|
2632
|
-
const w =
|
|
2633
|
-
w > -1 &&
|
|
2637
|
+
const B = t == null ? void 0 : t.schema, { formSchemaUtils: b } = T;
|
|
2638
|
+
if (B && b.getExpressions().length) {
|
|
2639
|
+
const w = b.getExpressions().findIndex((O) => O.target === B.id);
|
|
2640
|
+
w > -1 && b.getExpressions().splice(w, 1);
|
|
2634
2641
|
}
|
|
2635
2642
|
}
|
|
2636
2643
|
function E(T) {
|
|
2637
2644
|
if (!T || !(t != null && t.schema))
|
|
2638
2645
|
return;
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2641
|
-
}
|
|
2642
|
-
function
|
|
2643
|
-
|
|
2644
|
-
let
|
|
2645
|
-
|
|
2646
|
-
const w = e.value.querySelectorAll(`#${
|
|
2647
|
-
w != null && w.length && Array.from(w).map((
|
|
2646
|
+
const B = t.schema, { formSchemaUtils: b } = T;
|
|
2647
|
+
b.removeCommunicationInComponent(B);
|
|
2648
|
+
}
|
|
2649
|
+
function V(T) {
|
|
2650
|
+
I(T), E(T), t != null && t.schema.contents && t.schema.contents.map((B) => {
|
|
2651
|
+
let b = B.id;
|
|
2652
|
+
B.type === "component-ref" && (b = B.component);
|
|
2653
|
+
const w = e.value.querySelectorAll(`#${b}-design-item`);
|
|
2654
|
+
w != null && w.length && Array.from(w).map((O) => {
|
|
2648
2655
|
var j;
|
|
2649
|
-
(j =
|
|
2656
|
+
(j = O == null ? void 0 : O.componentInstance) != null && j.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent(T);
|
|
2650
2657
|
});
|
|
2651
2658
|
});
|
|
2652
2659
|
}
|
|
2653
2660
|
function P() {
|
|
2654
2661
|
}
|
|
2655
2662
|
function R(T) {
|
|
2656
|
-
var
|
|
2657
|
-
if (!((
|
|
2663
|
+
var b, w;
|
|
2664
|
+
if (!((b = t == null ? void 0 : t.schema) != null && b.id))
|
|
2658
2665
|
return;
|
|
2659
|
-
!
|
|
2660
|
-
let
|
|
2666
|
+
!m && T && (m = T.formSchemaUtils);
|
|
2667
|
+
let B = "";
|
|
2661
2668
|
{
|
|
2662
|
-
const { text:
|
|
2663
|
-
|
|
2669
|
+
const { text: O, title: j, label: D, mainTitle: x, name: H, type: _ } = t.schema;
|
|
2670
|
+
B = O || j || D || x || H || ((w = Ce[_]) == null ? void 0 : w.name);
|
|
2664
2671
|
}
|
|
2665
|
-
|
|
2666
|
-
componentTitle:
|
|
2667
|
-
parentPathName:
|
|
2672
|
+
B && m.getControlBasicInfoMap().set(t.schema.id, {
|
|
2673
|
+
componentTitle: B,
|
|
2674
|
+
parentPathName: B
|
|
2668
2675
|
});
|
|
2669
2676
|
}
|
|
2670
2677
|
function d(T) {
|
|
2671
|
-
var
|
|
2672
|
-
const { changeObject:
|
|
2673
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
2674
|
-
const j =
|
|
2678
|
+
var O;
|
|
2679
|
+
const { changeObject: B } = T, { propertyID: b, propertyValue: w } = B;
|
|
2680
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((O = T == null ? void 0 : T.changeObject) == null ? void 0 : O.propertyID) && b && w && (R(), m)) {
|
|
2681
|
+
const j = m.getControlBasicInfoMap(), D = j.keys().toArray().filter((x) => {
|
|
2675
2682
|
var H, _;
|
|
2676
2683
|
return ((H = j.get(x)) == null ? void 0 : H.reliedComponentId) === ((_ = t == null ? void 0 : t.schema) == null ? void 0 : _.id);
|
|
2677
2684
|
});
|
|
@@ -2685,7 +2692,7 @@ function Gn(e, t, n) {
|
|
|
2685
2692
|
d(T);
|
|
2686
2693
|
}
|
|
2687
2694
|
return v.value = {
|
|
2688
|
-
canMove:
|
|
2695
|
+
canMove: S(),
|
|
2689
2696
|
canSelectParent: k(),
|
|
2690
2697
|
canDelete: p(),
|
|
2691
2698
|
canNested: !y(),
|
|
@@ -2693,11 +2700,11 @@ function Gn(e, t, n) {
|
|
|
2693
2700
|
elementRef: e,
|
|
2694
2701
|
parent: (A = t == null ? void 0 : t.parent) == null ? void 0 : A.componentInstance,
|
|
2695
2702
|
schema: t == null ? void 0 : t.schema,
|
|
2696
|
-
styles:
|
|
2697
|
-
designerClass:
|
|
2703
|
+
styles: o,
|
|
2704
|
+
designerClass: f,
|
|
2698
2705
|
canAccepts: c,
|
|
2699
2706
|
getBelongedComponentInstance: r,
|
|
2700
|
-
getDraggableDesignItemElement:
|
|
2707
|
+
getDraggableDesignItemElement: i,
|
|
2701
2708
|
getDraggingDisplayText: a,
|
|
2702
2709
|
getPropConfig: g,
|
|
2703
2710
|
getDragScopeElement: l,
|
|
@@ -2706,7 +2713,7 @@ function Gn(e, t, n) {
|
|
|
2706
2713
|
addNewChildComponentSchema: h,
|
|
2707
2714
|
triggerBelongedComponentToMoveWhenMoved: F(!1),
|
|
2708
2715
|
triggerBelongedComponentToDeleteWhenDeleted: F(!1),
|
|
2709
|
-
onRemoveComponent:
|
|
2716
|
+
onRemoveComponent: V,
|
|
2710
2717
|
getCustomButtons: P,
|
|
2711
2718
|
onPropertyChanged: M,
|
|
2712
2719
|
setComponentBasicInfoMap: R,
|
|
@@ -2718,26 +2725,26 @@ const _n = /* @__PURE__ */ q({
|
|
|
2718
2725
|
props: ce,
|
|
2719
2726
|
emits: ["change"],
|
|
2720
2727
|
setup(e, t) {
|
|
2721
|
-
const n = F(e.items),
|
|
2728
|
+
const n = F(e.items), o = F("排序列"), f = F("排序方式"), v = F("添加排序列"), m = [{
|
|
2722
2729
|
id: "asc",
|
|
2723
2730
|
name: "升序"
|
|
2724
2731
|
}, {
|
|
2725
2732
|
id: "desc",
|
|
2726
2733
|
name: "降序"
|
|
2727
|
-
}],
|
|
2734
|
+
}], S = F(/* @__PURE__ */ new Map()), k = F(), p = ie("design-item-context"), y = Gn(k, p);
|
|
2728
2735
|
le(() => {
|
|
2729
2736
|
k.value.componentInstance = y;
|
|
2730
2737
|
}), t.expose(y.value);
|
|
2731
2738
|
function r() {
|
|
2732
|
-
const g = n.value.map((
|
|
2733
|
-
|
|
2739
|
+
const g = n.value.map((I) => [I.id, !0]);
|
|
2740
|
+
S.value = new Map(g);
|
|
2734
2741
|
}
|
|
2735
2742
|
r();
|
|
2736
|
-
const
|
|
2743
|
+
const i = L(() => e.dataSource.map((g) => (g.disabled = S.value.has(g.id), g))), c = L(() => ({
|
|
2737
2744
|
"f-order": !0
|
|
2738
2745
|
}));
|
|
2739
2746
|
function a(g) {
|
|
2740
|
-
n.value = n.value.filter((
|
|
2747
|
+
n.value = n.value.filter((I) => I.id !== g.id), r(), t.emit("change", n.value);
|
|
2741
2748
|
}
|
|
2742
2749
|
function l() {
|
|
2743
2750
|
n.value = [...n.value, {
|
|
@@ -2751,8 +2758,8 @@ const _n = /* @__PURE__ */ q({
|
|
|
2751
2758
|
}
|
|
2752
2759
|
function h(g) {
|
|
2753
2760
|
if (g && g.length) {
|
|
2754
|
-
const
|
|
2755
|
-
g.reduce((E,
|
|
2761
|
+
const I = /* @__PURE__ */ new Map();
|
|
2762
|
+
g.reduce((E, V) => (E.set(V.id, V), E), I), n.value = g.map((E) => I.get(E.id)), t.emit("change", n.value);
|
|
2756
2763
|
}
|
|
2757
2764
|
}
|
|
2758
2765
|
function u() {
|
|
@@ -2770,29 +2777,29 @@ const _n = /* @__PURE__ */ q({
|
|
|
2770
2777
|
class: "f-order-header"
|
|
2771
2778
|
}, [C("span", {
|
|
2772
2779
|
class: "f-order-header-order-field"
|
|
2773
|
-
}, [
|
|
2780
|
+
}, [o.value]), C("span", {
|
|
2774
2781
|
class: "f-order-header-order-type"
|
|
2775
|
-
}, [
|
|
2782
|
+
}, [f.value])]),
|
|
2776
2783
|
itemContent: (g) => C("div", {
|
|
2777
2784
|
class: "f-order-item-content"
|
|
2778
2785
|
}, [C(Z, {
|
|
2779
2786
|
class: "f-order-item-content-order-field",
|
|
2780
|
-
data:
|
|
2787
|
+
data: i.value,
|
|
2781
2788
|
valueField: "id",
|
|
2782
2789
|
textField: "name",
|
|
2783
2790
|
idField: "id",
|
|
2784
2791
|
modelValue: g.id,
|
|
2785
|
-
"onUpdate:modelValue": (
|
|
2792
|
+
"onUpdate:modelValue": (I) => g.id = I,
|
|
2786
2793
|
onChange: s,
|
|
2787
2794
|
onClear: s
|
|
2788
2795
|
}, null), C(Z, {
|
|
2789
2796
|
class: "f-order-item-content-order-type",
|
|
2790
|
-
data:
|
|
2797
|
+
data: m,
|
|
2791
2798
|
valueField: "id",
|
|
2792
2799
|
textField: "name",
|
|
2793
2800
|
idField: "id",
|
|
2794
2801
|
modelValue: g.order,
|
|
2795
|
-
"onUpdate:modelValue": (
|
|
2802
|
+
"onUpdate:modelValue": (I) => g.order = I,
|
|
2796
2803
|
onChange: s
|
|
2797
2804
|
}, null)]),
|
|
2798
2805
|
footer: () => C("div", {
|
|
@@ -2819,7 +2826,7 @@ const _n = /* @__PURE__ */ q({
|
|
|
2819
2826
|
install(e) {
|
|
2820
2827
|
e.component(oe.name, oe);
|
|
2821
2828
|
},
|
|
2822
|
-
register(e, t, n,
|
|
2829
|
+
register(e, t, n, o) {
|
|
2823
2830
|
e.order = oe, t.order = ve;
|
|
2824
2831
|
},
|
|
2825
2832
|
registerDesigner(e, t, n) {
|