@farris/ui-vue 1.6.0-beta.5 → 1.6.0-beta.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/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +1 -1
- package/components/drawer/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +1 -1
- package/components/locale/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1 -1
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +265 -261
- package/components/transfer/index.umd.cjs +3 -3
- package/components/tree-view/index.esm.js +1144 -1133
- package/components/tree-view/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +9 -3
- package/designer/data-grid/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +1 -1
- package/designer/drawer/index.umd.cjs +1 -1
- package/farris.all.esm.js +8231 -6736
- package/farris.all.umd.cjs +15 -15
- package/package.json +1 -1
- package/types/calendar/src/components/header/header.component.d.ts +2 -2
- package/types/chs.d.ts +494 -0
- package/types/cht.d.ts +490 -0
- package/types/en.d.ts +494 -0
- package/types/filter-bar/index.d.ts +3 -3
- package/types/filter-bar/src/components/filter-item-condition/filter-item-condition.component.d.ts +1 -1
- package/types/filter-bar/src/designer/filter-bar.design.component.d.ts +2 -2
- package/types/filter-bar/src/filter-bar.component.d.ts +1 -1
- package/types/index.d.ts +1479 -1
- package/types/order/src/designer/order.design.component.d.ts +3 -3
- package/types/order/src/order.component.d.ts +3 -3
- package/types/schema-selector/src/schema-selector.component.d.ts +1 -1
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { ref as T, computed as A, createVNode as g, Fragment as
|
|
1
|
+
import { ref as T, computed as A, createVNode as g, Fragment as Q, watch as x, withModifiers as Fe, withDirectives as Te, vModelText as De, defineComponent as Z, onMounted as le, inject as Me, createTextVNode as te } from "vue";
|
|
2
2
|
import Oe from "../tree-view/index.esm.js";
|
|
3
3
|
import { cloneDeep as ne, isPlainObject as oe } from "lodash-es";
|
|
4
|
-
import { getCustomClass as
|
|
4
|
+
import { getCustomClass as J, withInstall as Re } from "../common/index.esm.js";
|
|
5
5
|
import { useFilter as Ve, useIdentify as Pe, useHierarchy as je, useGroupData as $e, useDataView as Ee, useSelection as Ie, useRow as Be, useEdit as Ae, useVisualDataBound as Ne, useVisualDataCell as Le, useVisualDataRow as _e, useVisualGroupRow as He, useVisualSummaryRow as ze, useVisualData as Ge } from "../data-view/index.esm.js";
|
|
6
6
|
import { useI18n as ie } from "vue-i18n";
|
|
7
7
|
import { FCheckbox as K } from "../checkbox/index.esm.js";
|
|
8
|
-
import { getSchemaByTypeForDesigner as
|
|
8
|
+
import { getSchemaByTypeForDesigner as qe } from "../dynamic-resolver/index.esm.js";
|
|
9
9
|
function se(e, t) {
|
|
10
10
|
let n;
|
|
11
11
|
function p(i) {
|
|
12
|
-
const { properties: s, title: v, ignore:
|
|
13
|
-
if (v && (!
|
|
12
|
+
const { properties: s, title: v, ignore: l } = i, a = l && Array.isArray(l), m = Object.keys(s).reduce((C, D) => ((!a || !l.find((P) => P === D)) && (C[D] = s[D].type === "object" && s[D].properties ? p(s[D]) : ne(s[D].default)), C), {});
|
|
13
|
+
if (v && (!a || !l.find((C) => C === "id"))) {
|
|
14
14
|
const C = v.toLowerCase().replace(/-/g, "_");
|
|
15
15
|
m.id = `${C}_${Math.random().toString().slice(2, 6)}`;
|
|
16
16
|
}
|
|
17
17
|
return m;
|
|
18
18
|
}
|
|
19
19
|
function V(i) {
|
|
20
|
-
const { properties: s, title: v, required:
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
23
|
-
if (v &&
|
|
20
|
+
const { properties: s, title: v, required: l } = i;
|
|
21
|
+
if (l && Array.isArray(l)) {
|
|
22
|
+
const a = l.reduce((m, C) => (m[C] = s[C].type === "object" && s[C].properties ? p(s[C]) : ne(s[C].default), m), {});
|
|
23
|
+
if (v && l.find((m) => m === "id")) {
|
|
24
24
|
const m = v.toLowerCase().replace(/-/g, "_");
|
|
25
|
-
|
|
25
|
+
a.id = `${m}_${Math.random().toString().slice(2, 6)}`;
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return a;
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
30
|
type: v
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function F(i, s = {}, v) {
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
let
|
|
34
|
+
const l = e[i];
|
|
35
|
+
if (l) {
|
|
36
|
+
let a = V(l);
|
|
37
37
|
const m = t[i];
|
|
38
|
-
return
|
|
38
|
+
return a = m ? m({ getSchemaByType: F }, a, s, v) : a, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(a), a;
|
|
39
39
|
}
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
function h(i, s) {
|
|
43
43
|
const v = p(s);
|
|
44
|
-
return Object.keys(v).reduce((
|
|
44
|
+
return Object.keys(v).reduce((l, a) => (Object.prototype.hasOwnProperty.call(i, a) && (l[a] && oe(l[a]) && oe(i[a] || !i[a]) ? Object.assign(l[a], i[a] || {}) : l[a] = i[a]), l), v), v;
|
|
45
45
|
}
|
|
46
46
|
function M(i, s) {
|
|
47
|
-
return Object.keys(i).filter((
|
|
48
|
-
if (s.has(
|
|
49
|
-
const m = s.get(
|
|
47
|
+
return Object.keys(i).filter((l) => i[l] != null).reduce((l, a) => {
|
|
48
|
+
if (s.has(a)) {
|
|
49
|
+
const m = s.get(a);
|
|
50
50
|
if (typeof m == "string")
|
|
51
|
-
|
|
51
|
+
l[m] = i[a];
|
|
52
52
|
else {
|
|
53
|
-
const C = m(
|
|
54
|
-
Object.assign(
|
|
53
|
+
const C = m(a, i[a], i);
|
|
54
|
+
Object.assign(l, C);
|
|
55
55
|
}
|
|
56
56
|
} else
|
|
57
|
-
a
|
|
58
|
-
return
|
|
57
|
+
l[a] = i[a];
|
|
58
|
+
return l;
|
|
59
59
|
}, {});
|
|
60
60
|
}
|
|
61
61
|
function O(i, s, v = /* @__PURE__ */ new Map()) {
|
|
62
|
-
const
|
|
63
|
-
return M(
|
|
62
|
+
const l = h(i, s);
|
|
63
|
+
return M(l, v);
|
|
64
64
|
}
|
|
65
65
|
function c(i) {
|
|
66
66
|
var v;
|
|
67
67
|
const s = i.type;
|
|
68
68
|
if (s) {
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
69
|
+
const l = e[s];
|
|
70
|
+
if (!l)
|
|
71
71
|
return i;
|
|
72
|
-
const
|
|
72
|
+
const a = h(i, l), m = ((v = i.editor) == null ? void 0 : v.type) || "";
|
|
73
73
|
if (m) {
|
|
74
74
|
const C = e[m], D = h(i.editor, C);
|
|
75
|
-
|
|
75
|
+
a.editor = D;
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return a;
|
|
78
78
|
}
|
|
79
79
|
return i;
|
|
80
80
|
}
|
|
@@ -83,19 +83,19 @@ function se(e, t) {
|
|
|
83
83
|
}
|
|
84
84
|
return { getSchemaByType: F, resolveSchemaWithDefaultValue: c, resolveSchemaToProps: O, mappingSchemaToProps: M, setDesignerContext: S };
|
|
85
85
|
}
|
|
86
|
-
const ce = {}, ue = {}, { getSchemaByType: un, resolveSchemaWithDefaultValue:
|
|
86
|
+
const ce = {}, ue = {}, { getSchemaByType: un, resolveSchemaWithDefaultValue: xe, resolveSchemaToProps: We, mappingSchemaToProps: Ue, setDesignerContext: fn } = se(ce, ue);
|
|
87
87
|
function Xe(e = {}) {
|
|
88
88
|
function t(c, S, i, s) {
|
|
89
89
|
if (typeof i == "number")
|
|
90
90
|
return s[c].length === i;
|
|
91
91
|
if (typeof i == "object") {
|
|
92
|
-
const v = Object.keys(i)[0],
|
|
92
|
+
const v = Object.keys(i)[0], l = i[v];
|
|
93
93
|
if (v === "not")
|
|
94
|
-
return Number(s[c].length) !== Number(
|
|
94
|
+
return Number(s[c].length) !== Number(l);
|
|
95
95
|
if (v === "moreThan")
|
|
96
|
-
return Number(s[c].length) >= Number(
|
|
96
|
+
return Number(s[c].length) >= Number(l);
|
|
97
97
|
if (v === "lessThan")
|
|
98
|
-
return Number(s[c].length) <= Number(
|
|
98
|
+
return Number(s[c].length) <= Number(l);
|
|
99
99
|
}
|
|
100
100
|
return !1;
|
|
101
101
|
}
|
|
@@ -112,8 +112,8 @@ function Xe(e = {}) {
|
|
|
112
112
|
return typeof S == "number" ? [{ target: i, operator: "length", param: null, value: Number(S) }] : typeof S == "boolean" ? [{ target: i, operator: "getProperty", param: c, value: !!S }] : typeof S == "object" ? Object.keys(S).map((s) => {
|
|
113
113
|
if (s === "length")
|
|
114
114
|
return { target: i, operator: "length", param: null, value: S[s] };
|
|
115
|
-
const v = s,
|
|
116
|
-
return { target: i, operator: "getProperty", param: v, value:
|
|
115
|
+
const v = s, l = S[s];
|
|
116
|
+
return { target: i, operator: "getProperty", param: v, value: l };
|
|
117
117
|
}) : [];
|
|
118
118
|
}
|
|
119
119
|
function F(c) {
|
|
@@ -130,10 +130,10 @@ function Xe(e = {}) {
|
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
132
|
function M(c, S) {
|
|
133
|
-
return F(c).reduce((v,
|
|
133
|
+
return F(c).reduce((v, l) => v && h(l, S), !0);
|
|
134
134
|
}
|
|
135
135
|
function O(c, S) {
|
|
136
|
-
const i = Object.keys(c), s = i.includes("allOf"), v = i.includes("anyOf"),
|
|
136
|
+
const i = Object.keys(c), s = i.includes("allOf"), v = i.includes("anyOf"), l = s || v, C = (l ? c[l ? s ? "allOf" : "anyOf" : "allOf"] : [c]).map((P) => M(P, S));
|
|
137
137
|
return s ? !C.includes(!1) : C.includes(!0);
|
|
138
138
|
}
|
|
139
139
|
return { parseValueSchema: O };
|
|
@@ -364,74 +364,74 @@ function de(e, t, n) {
|
|
|
364
364
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
365
365
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
366
366
|
]), F = Xe();
|
|
367
|
-
function h(
|
|
368
|
-
return () => F.parseValueSchema(
|
|
367
|
+
function h(l, a) {
|
|
368
|
+
return () => F.parseValueSchema(l, a);
|
|
369
369
|
}
|
|
370
|
-
function M(
|
|
371
|
-
return
|
|
370
|
+
function M(l, a, m) {
|
|
371
|
+
return l.includes("visible") && a.visible !== void 0 ? typeof a.visible == "boolean" ? () => !!a.visible : a.visible === void 0 ? !0 : h(a.visible, m) : () => !0;
|
|
372
372
|
}
|
|
373
|
-
function O(
|
|
374
|
-
return
|
|
373
|
+
function O(l, a, m) {
|
|
374
|
+
return l.includes("readonly") && a.readonly !== void 0 ? typeof a.readonly == "boolean" ? () => !!a.readonly : h(a.readonly, m) : () => !1;
|
|
375
375
|
}
|
|
376
|
-
function c(
|
|
377
|
-
const m =
|
|
376
|
+
function c(l, a) {
|
|
377
|
+
const m = l.$converter || a;
|
|
378
378
|
return typeof m == "string" && m && p.has(m) ? p.get(m) || null : m || null;
|
|
379
379
|
}
|
|
380
|
-
function S(
|
|
381
|
-
return Object.keys(
|
|
382
|
-
const k = T(1), w = f,
|
|
380
|
+
function S(l, a, m, C, D, P = "", E = "") {
|
|
381
|
+
return Object.keys(l).map((f) => {
|
|
382
|
+
const k = T(1), w = f, r = l[f], j = Object.keys(r), R = r.title, y = r.type, o = V.get(y) || { type: "input-group", enableClear: !1 }, d = r.editor ? Object.assign({}, o, r.editor) : Object.assign({}, o), u = M(j, r, a), b = O(j, r, a);
|
|
383
383
|
d.readonly = d.readonly === void 0 ? b() : d.readonly;
|
|
384
|
-
const B =
|
|
385
|
-
let L = c(
|
|
384
|
+
const B = r.type === "cascade" ? S(r.properties, a, m, C, D, P, E) : [], $ = !0;
|
|
385
|
+
let L = c(r, E);
|
|
386
386
|
const _ = A({
|
|
387
387
|
get() {
|
|
388
388
|
if (k.value) {
|
|
389
389
|
if (["class", "style"].find((N) => N === w) && !L && (L = p.get("/converter/appearance.converter") || null), L && L.convertFrom)
|
|
390
390
|
return L.convertFrom(m, f, D, P);
|
|
391
391
|
const H = m[f];
|
|
392
|
-
return Object.prototype.hasOwnProperty.call(
|
|
392
|
+
return Object.prototype.hasOwnProperty.call(r, "defaultValue") && (H === void 0 || typeof H == "string" && H === "") ? r.type === "boolean" ? r.defaultValue : r.defaultValue || "" : H;
|
|
393
393
|
}
|
|
394
394
|
return null;
|
|
395
395
|
},
|
|
396
396
|
set(H) {
|
|
397
397
|
k.value += 1, L && L.convertTo ? (L.convertTo(C, f, H, D, P), L.convertTo(m, f, H, D, P)) : (C[f] = H, m[f] = H);
|
|
398
398
|
}
|
|
399
|
-
}), { refreshPanelAfterChanged: z, description:
|
|
400
|
-
return
|
|
399
|
+
}), { refreshPanelAfterChanged: z, description: X, isExpand: G, parentPropertyID: Y } = r, q = { propertyID: w, propertyName: R, propertyType: y, propertyValue: _, editor: d, visible: u, readonly: b, cascadeConfig: B, hideCascadeTitle: $, refreshPanelAfterChanged: z, description: X, isExpand: G, parentPropertyID: Y };
|
|
400
|
+
return a[w] = q, q;
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
-
function i(
|
|
404
|
-
const C = {}, D = e[
|
|
403
|
+
function i(l, a, m = {}) {
|
|
404
|
+
const C = {}, D = e[l];
|
|
405
405
|
return D && D.categories ? Object.keys(D.categories).map((E) => {
|
|
406
|
-
const I = D.categories[E], f = I == null ? void 0 : I.title, k = S(I.properties || {}, C, {}, m,
|
|
406
|
+
const I = D.categories[E], f = I == null ? void 0 : I.title, k = S(I.properties || {}, C, {}, m, a);
|
|
407
407
|
return { categoryId: E, categoryName: f, properties: k };
|
|
408
408
|
}) : [];
|
|
409
409
|
}
|
|
410
|
-
function s(
|
|
411
|
-
const P =
|
|
412
|
-
if (
|
|
413
|
-
const j =
|
|
410
|
+
function s(l, a, m, C, D = "") {
|
|
411
|
+
const P = a.$ref.schema, E = a.$ref.converter, I = m[P], f = I.type, k = n(I), w = {}, r = e[f];
|
|
412
|
+
if (r && r.categories) {
|
|
413
|
+
const j = r.categories[l], R = j == null ? void 0 : j.title;
|
|
414
414
|
E && Object.keys(j.properties).forEach((d) => {
|
|
415
415
|
j.properties[d].$converter = E;
|
|
416
416
|
});
|
|
417
|
-
const y = (j == null ? void 0 : j.properties) || {},
|
|
418
|
-
return { categoryId:
|
|
417
|
+
const y = (j == null ? void 0 : j.properties) || {}, o = S(y, w, k, I, C, D);
|
|
418
|
+
return { categoryId: l, categoryName: R, properties: o };
|
|
419
419
|
}
|
|
420
|
-
return { categoryId:
|
|
420
|
+
return { categoryId: l, categoryName: "", properties: [] };
|
|
421
421
|
}
|
|
422
|
-
function v(
|
|
423
|
-
const P =
|
|
422
|
+
function v(l, a, m, C, D) {
|
|
423
|
+
const P = l.type, E = n(l), I = {};
|
|
424
424
|
let f = D || e[P];
|
|
425
425
|
if (f && Object.keys(f).length === 0 && m && m.getPropConfig && (f = m.getPropConfig(C)), f && f.categories) {
|
|
426
426
|
const k = [];
|
|
427
427
|
return Object.keys(f.categories).map((w) => {
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
430
|
-
k.push(s(w,
|
|
428
|
+
const r = f.categories[w];
|
|
429
|
+
if (r.$ref) {
|
|
430
|
+
k.push(s(w, r, l, a, C));
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
|
-
const j =
|
|
434
|
-
k.push({ categoryId: w, categoryName: j, tabId: R, tabName: y, hide:
|
|
433
|
+
const j = r == null ? void 0 : r.title, R = r == null ? void 0 : r.tabId, y = r == null ? void 0 : r.tabName, o = r == null ? void 0 : r.hide, d = r == null ? void 0 : r.hideTitle, u = S(r.properties || {}, I, E, l, a, C, r.$converter), { setPropertyRelates: b } = r, B = r == null ? void 0 : r.parentPropertyID;
|
|
434
|
+
k.push({ categoryId: w, categoryName: j, tabId: R, tabName: y, hide: o, properties: u, hideTitle: d, setPropertyRelates: b, parentPropertyID: B });
|
|
435
435
|
}), k;
|
|
436
436
|
}
|
|
437
437
|
return [];
|
|
@@ -443,7 +443,7 @@ function de(e, t, n) {
|
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
const pe = {}, ve = {};
|
|
446
|
-
de(pe, ve,
|
|
446
|
+
de(pe, ve, xe);
|
|
447
447
|
const me = {}, ge = {}, { getSchemaByType: dn, resolveSchemaWithDefaultValue: dt, resolveSchemaToProps: pn, mappingSchemaToProps: vn, setDesignerContext: mn } = se(me, ge), he = {}, ye = {};
|
|
448
448
|
de(he, ye, dt);
|
|
449
449
|
function be(e, t, n = /* @__PURE__ */ new Map(), p = (h, M, O, c) => M, V = {}, F = (h) => h) {
|
|
@@ -763,16 +763,16 @@ function Gt(e, t) {
|
|
|
763
763
|
const M = document.createTreeWalker(F, NodeFilter.SHOW_TEXT);
|
|
764
764
|
return n(M).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: s }) => {
|
|
765
765
|
const v = [];
|
|
766
|
-
let
|
|
767
|
-
for (;
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
766
|
+
let l = 0;
|
|
767
|
+
for (; l < s.length; ) {
|
|
768
|
+
const a = s.indexOf(h, l);
|
|
769
|
+
if (a === -1)
|
|
770
770
|
break;
|
|
771
|
-
v.push(
|
|
771
|
+
v.push(a), l = a + h.length;
|
|
772
772
|
}
|
|
773
|
-
return v.map((
|
|
773
|
+
return v.map((a) => {
|
|
774
774
|
const m = new Range();
|
|
775
|
-
return m.setStart(i,
|
|
775
|
+
return m.setStart(i, a), m.setEnd(i, a + h.length), m;
|
|
776
776
|
});
|
|
777
777
|
}).flat();
|
|
778
778
|
}
|
|
@@ -785,11 +785,11 @@ function Gt(e, t) {
|
|
|
785
785
|
return { search: V };
|
|
786
786
|
}
|
|
787
787
|
function re(e, t, n, p, V, F, h, M, O, c) {
|
|
788
|
-
const S = T(e.size), i = T(e.textField), s = T(e.titleField), v = T(e.disableField),
|
|
789
|
-
var w,
|
|
790
|
-
return ((w = e.selection) == null ? void 0 : w.multiSelect) && ((
|
|
788
|
+
const S = T(e.size), i = T(e.textField), s = T(e.titleField), v = T(e.disableField), l = A(() => {
|
|
789
|
+
var w, r;
|
|
790
|
+
return ((w = e.selection) == null ? void 0 : w.multiSelect) && ((r = e.selection) == null ? void 0 : r.showCheckbox);
|
|
791
791
|
}), {
|
|
792
|
-
onMouseenterItem:
|
|
792
|
+
onMouseenterItem: a,
|
|
793
793
|
onMouseoverItem: m,
|
|
794
794
|
onMouseoutItem: C
|
|
795
795
|
} = F, {
|
|
@@ -808,26 +808,26 @@ function re(e, t, n, p, V, F, h, M, O, c) {
|
|
|
808
808
|
...w
|
|
809
809
|
};
|
|
810
810
|
});
|
|
811
|
-
function k(w,
|
|
811
|
+
function k(w, r, j) {
|
|
812
812
|
return w.checked = M.findIndexInSelectedItems(w) > -1, g("li", {
|
|
813
|
-
class: P(w,
|
|
814
|
-
id: D(w,
|
|
815
|
-
key: D(w,
|
|
816
|
-
onClick: (R) => I(R, w,
|
|
817
|
-
onMouseenter: (R) =>
|
|
818
|
-
onMouseover: (R) => m(R, w,
|
|
819
|
-
onMouseout: (R) => C(R, w,
|
|
820
|
-
}, [
|
|
813
|
+
class: P(w, r),
|
|
814
|
+
id: D(w, r),
|
|
815
|
+
key: D(w, r),
|
|
816
|
+
onClick: (R) => I(R, w, r),
|
|
817
|
+
onMouseenter: (R) => a(R, w, r),
|
|
818
|
+
onMouseover: (R) => m(R, w, r),
|
|
819
|
+
onMouseout: (R) => C(R, w, r)
|
|
820
|
+
}, [l.value && g("div", {
|
|
821
821
|
class: "f-list-select",
|
|
822
822
|
onClick: (R) => R.stopPropagation()
|
|
823
823
|
}, [g(K, {
|
|
824
|
-
id: "list-" + D(w,
|
|
824
|
+
id: "list-" + D(w, r),
|
|
825
825
|
customClass: "listview-checkbox float-left",
|
|
826
826
|
disabled: w[v.value],
|
|
827
827
|
checked: w.checked,
|
|
828
828
|
"onUpdate:checked": (R) => w.checked = R,
|
|
829
829
|
onChange: (R) => {
|
|
830
|
-
E(w,
|
|
830
|
+
E(w, r, !R.checked);
|
|
831
831
|
}
|
|
832
832
|
}, null)]), g("div", {
|
|
833
833
|
class: "f-list-content"
|
|
@@ -841,11 +841,11 @@ function re(e, t, n, p, V, F, h, M, O, c) {
|
|
|
841
841
|
renderItem: k
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function qt(e, t, n, p, V, F, h, M, O, c) {
|
|
845
845
|
const S = T(e.multiSelect), i = T(e.disableField), s = T(e.textField), {
|
|
846
846
|
onMouseenterItem: v,
|
|
847
|
-
onMouseoverItem:
|
|
848
|
-
onMouseoutItem:
|
|
847
|
+
onMouseoverItem: l,
|
|
848
|
+
onMouseoutItem: a
|
|
849
849
|
} = F, {
|
|
850
850
|
getKey: m,
|
|
851
851
|
listViewItemClass: C,
|
|
@@ -853,7 +853,7 @@ function xt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
853
853
|
onClickItem: P
|
|
854
854
|
} = h;
|
|
855
855
|
function E(f, k, w) {
|
|
856
|
-
return t.slots.content ? g(
|
|
856
|
+
return t.slots.content ? g(Q, null, [t.slots.content && t.slots.content({
|
|
857
857
|
item: f.raw,
|
|
858
858
|
index: k,
|
|
859
859
|
selectedItem: w
|
|
@@ -866,20 +866,20 @@ function xt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
866
866
|
class: C(f, k),
|
|
867
867
|
id: m(f, k),
|
|
868
868
|
key: m(f, k),
|
|
869
|
-
onClick: (
|
|
870
|
-
onMouseenter: (
|
|
871
|
-
onMouseover: (
|
|
872
|
-
onMouseout: (
|
|
869
|
+
onClick: (r) => P(r, f, k),
|
|
870
|
+
onMouseenter: (r) => v(r, f, k),
|
|
871
|
+
onMouseover: (r) => l(r, f, k),
|
|
872
|
+
onMouseout: (r) => a(r, f, k)
|
|
873
873
|
}, [S.value && g("div", {
|
|
874
874
|
class: "f-list-select",
|
|
875
|
-
onClick: (
|
|
875
|
+
onClick: (r) => r.stopPropagation()
|
|
876
876
|
}, [g(K, {
|
|
877
877
|
id: "list-" + m(f, k),
|
|
878
878
|
customClass: "listview-checkbox",
|
|
879
879
|
disabled: f[i.value] || !f.checked,
|
|
880
880
|
checked: f.checked,
|
|
881
|
-
"onUpdate:checked": (
|
|
882
|
-
onChange: (
|
|
881
|
+
"onUpdate:checked": (r) => f.checked = r,
|
|
882
|
+
onChange: (r) => D(f, k, !r.checked)
|
|
883
883
|
}, null)]), g("div", {
|
|
884
884
|
class: "f-list-content"
|
|
885
885
|
}, [E(f, k, w)])]);
|
|
@@ -888,11 +888,11 @@ function xt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
888
888
|
renderItem: I
|
|
889
889
|
};
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function xt(e, t, n, p, V, F, h, M, O, c) {
|
|
892
892
|
const S = T(e.multiSelect), i = T(e.disableField), s = T(e.textField), {
|
|
893
893
|
onMouseenterItem: v,
|
|
894
|
-
onMouseoverItem:
|
|
895
|
-
onMouseoutItem:
|
|
894
|
+
onMouseoverItem: l,
|
|
895
|
+
onMouseoutItem: a
|
|
896
896
|
} = F, {
|
|
897
897
|
getKey: m,
|
|
898
898
|
listViewItemClass: C,
|
|
@@ -905,7 +905,7 @@ function qt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
905
905
|
dragend: k
|
|
906
906
|
} = p, {
|
|
907
907
|
removeItem: w
|
|
908
|
-
} = O,
|
|
908
|
+
} = O, r = A(() => ({
|
|
909
909
|
margin: S.value ? "10px 0" : "10px 0px 10px 14px"
|
|
910
910
|
}));
|
|
911
911
|
function j(u, b = "") {
|
|
@@ -914,14 +914,14 @@ function qt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
914
914
|
}
|
|
915
915
|
function R(u) {
|
|
916
916
|
return g("div", {
|
|
917
|
-
style:
|
|
917
|
+
style: r.value,
|
|
918
918
|
onMouseenter: (b) => j(b, u.raw[s.value || "name"])
|
|
919
919
|
}, [u.raw[s.value || "name"]]);
|
|
920
920
|
}
|
|
921
921
|
function y() {
|
|
922
922
|
return t.slots.itemContent ? t.slots.itemContent : R;
|
|
923
923
|
}
|
|
924
|
-
const
|
|
924
|
+
const o = y();
|
|
925
925
|
function d(u, b, B) {
|
|
926
926
|
return g("li", {
|
|
927
927
|
class: C(u, b),
|
|
@@ -929,8 +929,8 @@ function qt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
929
929
|
key: m(u, b),
|
|
930
930
|
onClick: ($) => P($, u, b),
|
|
931
931
|
onMouseenter: ($) => v($, u, b),
|
|
932
|
-
onMouseover: ($) =>
|
|
933
|
-
onMouseout: ($) =>
|
|
932
|
+
onMouseover: ($) => l($, u, b),
|
|
933
|
+
onMouseout: ($) => a($, u, b),
|
|
934
934
|
draggable: "true",
|
|
935
935
|
onDragstart: ($) => E($, u, b),
|
|
936
936
|
onDragenter: ($) => I($, b),
|
|
@@ -948,7 +948,7 @@ function qt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
948
948
|
onChange: ($) => D(u, b, !$.checked)
|
|
949
949
|
}, null)]), g("div", {
|
|
950
950
|
class: "f-list-content"
|
|
951
|
-
}, [
|
|
951
|
+
}, [o(u)]), g("div", {
|
|
952
952
|
class: "f-list-remove",
|
|
953
953
|
onClick: ($) => w(b)
|
|
954
954
|
}, [g("div", {
|
|
@@ -975,8 +975,8 @@ function Wt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
975
975
|
function v(C, D) {
|
|
976
976
|
D.collapse = !D.collapse, n.value = s(D.collapse ? "collapse" : "expand", D, n.value);
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
return t.slots.group ? g(
|
|
978
|
+
function l(C, D, P) {
|
|
979
|
+
return t.slots.group ? g(Q, null, [t.slots.content && t.slots.group({
|
|
980
980
|
item: C.raw,
|
|
981
981
|
index: D,
|
|
982
982
|
selectedItem: P
|
|
@@ -991,11 +991,11 @@ function Wt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
991
991
|
class: "f-navlookup-recommandLabel"
|
|
992
992
|
}, [C.raw[S.value[C.layer]]])]);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
return C.layer > -1 &&
|
|
994
|
+
function a(C, D, P) {
|
|
995
|
+
return C.layer > -1 && l(C, D, P);
|
|
996
996
|
}
|
|
997
997
|
return {
|
|
998
|
-
renderItem:
|
|
998
|
+
renderItem: a
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
1001
|
function Ut(e, t, n, p) {
|
|
@@ -1013,7 +1013,7 @@ function Ut(e, t, n, p) {
|
|
|
1013
1013
|
function Xt(e, t, n, p, V, F, h, M, O, c) {
|
|
1014
1014
|
const {
|
|
1015
1015
|
t: S
|
|
1016
|
-
} = ie(), i = T(e.view), s = T(e.view === "CardView"), v = T({}),
|
|
1016
|
+
} = ie(), i = T(e.view), s = T(e.view === "CardView"), v = T({}), l = T(S("listView.emptyMessage")), a = Ut(e, t, p, O), m = A(() => ({
|
|
1017
1017
|
"f-list-view-group": !0,
|
|
1018
1018
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
1019
1019
|
"d-flex": s.value,
|
|
@@ -1021,29 +1021,29 @@ function Xt(e, t, n, p, V, F, h, M, O, c) {
|
|
|
1021
1021
|
})), C = A(() => !!n.value && n.value.length > 0), D = A(() => n.value.length === 0);
|
|
1022
1022
|
A(() => D.value && !t.slots.empty);
|
|
1023
1023
|
function P() {
|
|
1024
|
-
return i.value === "SingleView" ? re : i.value === "DraggableView" ?
|
|
1024
|
+
return i.value === "SingleView" ? re : i.value === "DraggableView" ? xt : (i.value === "ContentView" || i.value === "CardView") && t.slots.content ? qt : re;
|
|
1025
1025
|
}
|
|
1026
1026
|
const E = P(), {
|
|
1027
1027
|
renderItem: I
|
|
1028
|
-
} = E(e, t, n, c, V, F, O, h,
|
|
1028
|
+
} = E(e, t, n, c, V, F, O, h, a, M), {
|
|
1029
1029
|
renderItem: f
|
|
1030
|
-
} = Wt(e, t, n, c, V, F, O, h,
|
|
1030
|
+
} = Wt(e, t, n, c, V, F, O, h, a, M), k = [I, f];
|
|
1031
1031
|
function w() {
|
|
1032
1032
|
return n.value.filter((R) => R.visible !== !1).map((R, y) => k[R.type](R, y, v));
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function r() {
|
|
1035
1035
|
return g("div", {
|
|
1036
1036
|
class: "f-list-view-emptydata",
|
|
1037
1037
|
style: "margin: 0 auto;"
|
|
1038
1038
|
}, [g("p", {
|
|
1039
1039
|
class: "f-empty-title"
|
|
1040
|
-
}, [t.slots.empty ? t.slots.empty() :
|
|
1040
|
+
}, [t.slots.empty ? t.slots.empty() : l.value])]);
|
|
1041
1041
|
}
|
|
1042
1042
|
function j() {
|
|
1043
1043
|
return g("ul", {
|
|
1044
1044
|
class: m.value,
|
|
1045
1045
|
style: "list-style: none;"
|
|
1046
|
-
}, [C.value && w(), D.value &&
|
|
1046
|
+
}, [C.value && w(), D.value && r()]);
|
|
1047
1047
|
}
|
|
1048
1048
|
return {
|
|
1049
1049
|
renderListArea: j
|
|
@@ -1064,7 +1064,7 @@ function ae(e, t, n) {
|
|
|
1064
1064
|
function O(s) {
|
|
1065
1065
|
F.value = "";
|
|
1066
1066
|
}
|
|
1067
|
-
|
|
1067
|
+
x(F, (s) => {
|
|
1068
1068
|
e.enableHighlightSearch && n.search(s), t.emit("afterSearch", s);
|
|
1069
1069
|
});
|
|
1070
1070
|
const c = A(() => {
|
|
@@ -1072,7 +1072,7 @@ function ae(e, t, n) {
|
|
|
1072
1072
|
"form-group": !0,
|
|
1073
1073
|
"farris-form-group": !0
|
|
1074
1074
|
};
|
|
1075
|
-
return p.value && p.value.split(" ").reduce((
|
|
1075
|
+
return p.value && p.value.split(" ").reduce((l, a) => (l[a] = !0, l), s), s;
|
|
1076
1076
|
});
|
|
1077
1077
|
function S(s) {
|
|
1078
1078
|
}
|
|
@@ -1146,14 +1146,14 @@ function Jt() {
|
|
|
1146
1146
|
}
|
|
1147
1147
|
function Qt(e, t, n, p) {
|
|
1148
1148
|
const V = T(e.idField), { dataView: F } = n, h = T(-1), M = T(!1), { activeIndex: O, focusedItemId: c, hoverIndex: S, resumeHover: i, suspendHover: s } = p;
|
|
1149
|
-
let v,
|
|
1149
|
+
let v, l = 0, a = 0;
|
|
1150
1150
|
function m(f, k) {
|
|
1151
|
-
const w = f -
|
|
1152
|
-
v.style.left = parseInt(v.style.left) + w + "px", v.style.top = parseInt(v.style.top) +
|
|
1151
|
+
const w = f - l, r = k - a;
|
|
1152
|
+
v.style.left = parseInt(v.style.left) + w + "px", v.style.top = parseInt(v.style.top) + r + "px", l = f, a = k;
|
|
1153
1153
|
}
|
|
1154
1154
|
function C(f) {
|
|
1155
|
-
const { left: k, top: w } = f.getBoundingClientRect(),
|
|
1156
|
-
return
|
|
1155
|
+
const { left: k, top: w } = f.getBoundingClientRect(), r = f.cloneNode(!0);
|
|
1156
|
+
return r.style.cssText = `
|
|
1157
1157
|
position:absolute;
|
|
1158
1158
|
left:${k}px;
|
|
1159
1159
|
top:${document.documentElement.scrollTop ? w + document.documentElement.scrollTop : w}px;
|
|
@@ -1169,34 +1169,34 @@ function Qt(e, t, n, p) {
|
|
|
1169
1169
|
text-align: initial;
|
|
1170
1170
|
width:${getComputedStyle(f).width};
|
|
1171
1171
|
height:${getComputedStyle(f).height};
|
|
1172
|
-
`,
|
|
1172
|
+
`, r.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", r.children[0].children[0].style.cssText = `
|
|
1173
1173
|
margin: 10px 0px 10px 14px;
|
|
1174
1174
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
1175
|
-
`,
|
|
1175
|
+
`, r.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", r.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(r), r;
|
|
1176
1176
|
}
|
|
1177
1177
|
function D(f, k, w) {
|
|
1178
1178
|
if (f.stopPropagation(), s(), k) {
|
|
1179
1179
|
if (v = C(f.target), f.dataTransfer) {
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1180
|
+
const r = new Image();
|
|
1181
|
+
r.src = "", f.dataTransfer.setDragImage(r, 0, 0);
|
|
1182
1182
|
}
|
|
1183
|
-
|
|
1183
|
+
l = f.pageX, a = f.pageY, setTimeout(() => {
|
|
1184
1184
|
h.value = w, M.value = !0, k.moving = !0;
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
function P(f, k) {
|
|
1189
1189
|
if (f.preventDefault(), h.value !== k) {
|
|
1190
|
-
const w = F.value[h.value],
|
|
1191
|
-
|
|
1190
|
+
const w = F.value[h.value], r = F.value;
|
|
1191
|
+
r.splice(h.value, 1), r.splice(k, 0, w), h.value = k, m(f.pageX, f.pageY);
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
1194
|
function E(f) {
|
|
1195
1195
|
f.preventDefault(), f.dataTransfer && (f.dataTransfer.dropEffect = "move"), m(f.pageX, f.pageY);
|
|
1196
1196
|
}
|
|
1197
1197
|
function I(f, k) {
|
|
1198
|
-
k && (k.moving = !1, v && (document.body.removeChild(v), v = null)), F.value.forEach((w,
|
|
1199
|
-
w.__fv_index__ =
|
|
1198
|
+
k && (k.moving = !1, v && (document.body.removeChild(v), v = null)), F.value.forEach((w, r) => {
|
|
1199
|
+
w.__fv_index__ = r;
|
|
1200
1200
|
}), M.value = !1, i(), S.value = k.raw.__fv_index__, O.value = k.raw.__fv_index__, c.value = k.raw[V.value], t.emit("change", F.value), t.emit("activeChange", [k.raw]);
|
|
1201
1201
|
}
|
|
1202
1202
|
return {
|
|
@@ -1210,88 +1210,88 @@ function Qt(e, t, n, p) {
|
|
|
1210
1210
|
function Zt(e, t, n, p, V, F) {
|
|
1211
1211
|
const h = T(e.idField), M = T(e.disableField), O = T(e.draggable);
|
|
1212
1212
|
T(e.itemClass);
|
|
1213
|
-
const c = T(e.selection.multiSelect ?? !1), S = T(e.selection.multiSelectMode), { isDragging: i } = p, { activeIndex: s, focusedItemId: v, hoverIndex:
|
|
1213
|
+
const c = T(e.selection.multiSelect ?? !1), S = T(e.selection.multiSelectMode), { isDragging: i } = p, { activeIndex: s, focusedItemId: v, hoverIndex: l } = V, { clearSelection: a, getSelectedItems: m, toggleSelectItem: C, currentSelectedDataId: D } = F, P = T(m()), E = (o) => P.value.length === 0 ? !1 : P.value.some((d) => {
|
|
1214
1214
|
let u = "";
|
|
1215
|
-
return d.data ? u = d.data[h.value] : u = d[h.value], u ===
|
|
1215
|
+
return d.data ? u = d.data[h.value] : u = d[h.value], u === o;
|
|
1216
1216
|
});
|
|
1217
1217
|
function I() {
|
|
1218
1218
|
P.value = m();
|
|
1219
1219
|
}
|
|
1220
|
-
function f(
|
|
1221
|
-
return
|
|
1220
|
+
function f(o, d) {
|
|
1221
|
+
return o.raw[h.value] != null ? o.raw[h.value] : "";
|
|
1222
1222
|
}
|
|
1223
|
-
function k(
|
|
1223
|
+
function k(o, d) {
|
|
1224
1224
|
const u = {
|
|
1225
1225
|
"f-list-view-group-item": !0,
|
|
1226
1226
|
"f-list-view-draggable-item": O.value,
|
|
1227
|
-
"f-un-click": !
|
|
1228
|
-
"f-un-select": !!
|
|
1227
|
+
"f-un-click": !o.checked,
|
|
1228
|
+
"f-un-select": !!o.raw[M.value],
|
|
1229
1229
|
"f-listview-active": (
|
|
1230
1230
|
// 多选
|
|
1231
|
-
c.value && E(f(
|
|
1232
|
-
!c.value &&
|
|
1231
|
+
c.value && E(f(o)) || // 单选
|
|
1232
|
+
!c.value && o.raw[h.value] === D.value
|
|
1233
1233
|
),
|
|
1234
|
-
"f-listview-hover": !i.value && d ===
|
|
1235
|
-
moving: !!
|
|
1234
|
+
"f-listview-hover": !i.value && d === l.value,
|
|
1235
|
+
moving: !!o.moving
|
|
1236
1236
|
};
|
|
1237
1237
|
if (typeof e.itemClass == "string")
|
|
1238
|
-
return
|
|
1238
|
+
return J(u, e.itemClass);
|
|
1239
1239
|
if (typeof e.itemClass == "function") {
|
|
1240
|
-
const b = e.itemClass(
|
|
1241
|
-
return
|
|
1240
|
+
const b = e.itemClass(o);
|
|
1241
|
+
return J(u, b);
|
|
1242
1242
|
}
|
|
1243
1243
|
return u;
|
|
1244
1244
|
}
|
|
1245
1245
|
const w = A(() => !c.value);
|
|
1246
|
-
function o
|
|
1247
|
-
|
|
1246
|
+
function r(o, d, u) {
|
|
1247
|
+
o.checked = u, !o.raw[M.value] && (w.value && (v.value = o.raw[h.value]), C(o));
|
|
1248
1248
|
}
|
|
1249
1249
|
const j = A(() => c.value && S.value === "OnCheckClearByClick"), R = A(() => !c.value || c.value && (S.value === "OnCheckAndClick" || S.value === "OnClick"));
|
|
1250
|
-
function y(
|
|
1250
|
+
function y(o, d, u) {
|
|
1251
1251
|
if (d.raw[M.value]) {
|
|
1252
|
-
|
|
1252
|
+
o.preventDefault(), o.stopPropagation();
|
|
1253
1253
|
return;
|
|
1254
1254
|
}
|
|
1255
|
-
v.value = d.raw[h.value], s.value = u, j.value &&
|
|
1255
|
+
v.value = d.raw[h.value], s.value = u, j.value && a(), R.value && (C(d), I()), t.emit("clickItem", { data: P.value, index: u }), t.emit("activeChange", P.value);
|
|
1256
1256
|
}
|
|
1257
1257
|
return {
|
|
1258
1258
|
getKey: f,
|
|
1259
1259
|
selectedItems: P,
|
|
1260
1260
|
listViewItemClass: k,
|
|
1261
1261
|
updateSelectedItems: I,
|
|
1262
|
-
onCheckItem:
|
|
1262
|
+
onCheckItem: r,
|
|
1263
1263
|
onClickItem: y
|
|
1264
1264
|
};
|
|
1265
1265
|
}
|
|
1266
|
-
const
|
|
1266
|
+
const W = /* @__PURE__ */ Z({
|
|
1267
1267
|
name: "FListView",
|
|
1268
1268
|
props: Ce,
|
|
1269
1269
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
1270
1270
|
setup(e, t) {
|
|
1271
|
-
const n = T(), p = T(!0), V = T(!1), F = T([]), h = 0, M = T(e.columns), O = Ve(), c = Pe(e), S = je(e), i = $e(e, c), s = Ee(e, /* @__PURE__ */ new Map(), O, S, c), v = Ie(e, s, c, F, t),
|
|
1271
|
+
const n = T(), p = T(!0), V = T(!1), F = T([]), h = 0, M = T(e.columns), O = Ve(), c = Pe(e), S = je(e), i = $e(e, c), s = Ee(e, /* @__PURE__ */ new Map(), O, S, c), v = Ie(e, s, c, F, t), l = Gt(e, n), a = A(() => s.dataView.value.length), m = Be(e, t, v, c), C = Ae(e, t, c, m, F), D = Ne(e), P = Le(e, {}, D), E = _e(e, s, C, S, c, D, P), I = He(e, c, P, E), f = ze(e, c, P, E), k = Ge(e, M, s, a, h, E, I, f), {
|
|
1272
1272
|
getVisualData: w
|
|
1273
1273
|
} = k;
|
|
1274
|
-
F.value = w(0,
|
|
1275
|
-
const
|
|
1274
|
+
F.value = w(0, a.value + h - 1);
|
|
1275
|
+
const r = A(() => {
|
|
1276
1276
|
const N = {
|
|
1277
1277
|
"f-list-view": !0,
|
|
1278
1278
|
"f-list-view-multiple": e.multiSelect
|
|
1279
1279
|
};
|
|
1280
|
-
return e.size !== "default" && (N[`${e.size}-item`] = !0),
|
|
1280
|
+
return e.size !== "default" && (N[`${e.size}-item`] = !0), J(N, e.customClass);
|
|
1281
1281
|
}), j = A(() => !!t.slots.footer || p.value);
|
|
1282
1282
|
function R() {
|
|
1283
1283
|
return e.header === "SearchBar" ? ae : e.header === "ContentHeader" ? Yt : ae;
|
|
1284
1284
|
}
|
|
1285
1285
|
const y = R(), {
|
|
1286
|
-
renderHeader:
|
|
1287
|
-
} = y(e, t,
|
|
1286
|
+
renderHeader: o
|
|
1287
|
+
} = y(e, t, l), d = Jt(), u = Qt(e, t, s, d), b = Zt(e, t, F, u, d, v), {
|
|
1288
1288
|
renderListArea: B
|
|
1289
1289
|
} = Xt(e, t, F, s, i, d, v, k, b, u);
|
|
1290
1290
|
function $(N) {
|
|
1291
|
-
|
|
1291
|
+
l.search(N);
|
|
1292
1292
|
}
|
|
1293
1293
|
function L(N) {
|
|
1294
|
-
N && (s.load(N), F.value = w(0,
|
|
1294
|
+
N && (s.load(N), F.value = w(0, a.value + h - 1));
|
|
1295
1295
|
}
|
|
1296
1296
|
function _() {
|
|
1297
1297
|
v.clearSelection(), d.clearActiveItem();
|
|
@@ -1299,16 +1299,16 @@ const q = /* @__PURE__ */ Z({
|
|
|
1299
1299
|
function z() {
|
|
1300
1300
|
return b.selectedItems.value;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function X() {
|
|
1303
1303
|
return b.selectedItems.value.map((N) => N[c.idField.value]);
|
|
1304
1304
|
}
|
|
1305
1305
|
function G(N) {
|
|
1306
1306
|
v.selectedValues.value = N, b.updateSelectedItems();
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Y() {
|
|
1309
1309
|
return v.currentSelectedDataId.value;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function q(N) {
|
|
1312
1312
|
m.activeRowById(N);
|
|
1313
1313
|
}
|
|
1314
1314
|
t.expose({
|
|
@@ -1317,19 +1317,19 @@ const q = /* @__PURE__ */ Z({
|
|
|
1317
1317
|
clearSelection: _,
|
|
1318
1318
|
getSelections: z,
|
|
1319
1319
|
updateSelectionByIds: G,
|
|
1320
|
-
getSelectionIds:
|
|
1321
|
-
activeRowById:
|
|
1322
|
-
getCurrentRowId:
|
|
1320
|
+
getSelectionIds: X,
|
|
1321
|
+
activeRowById: q,
|
|
1322
|
+
getCurrentRowId: Y
|
|
1323
1323
|
});
|
|
1324
1324
|
function H(N) {
|
|
1325
1325
|
e.multiSelect && (N.preventDefault(), N.stopPropagation());
|
|
1326
1326
|
}
|
|
1327
|
-
return
|
|
1327
|
+
return x(() => e.selectionValues, (N, ke) => {
|
|
1328
1328
|
N !== ke && G(N);
|
|
1329
1329
|
}), () => g("div", {
|
|
1330
|
-
class:
|
|
1330
|
+
class: r.value,
|
|
1331
1331
|
onClick: H
|
|
1332
|
-
}, [
|
|
1332
|
+
}, [o(), g("div", {
|
|
1333
1333
|
ref: n,
|
|
1334
1334
|
class: "f-list-view-content",
|
|
1335
1335
|
onMouseover: () => {
|
|
@@ -1342,7 +1342,7 @@ const q = /* @__PURE__ */ Z({
|
|
|
1342
1342
|
class: "f-list-view-footer"
|
|
1343
1343
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1344
1344
|
}
|
|
1345
|
-
}),
|
|
1345
|
+
}), U = /* @__PURE__ */ Z({
|
|
1346
1346
|
name: "FTransfer",
|
|
1347
1347
|
props: ee,
|
|
1348
1348
|
emits: ["change", "activeChange"],
|
|
@@ -1352,24 +1352,26 @@ const q = /* @__PURE__ */ Z({
|
|
|
1352
1352
|
} = ie(), p = T(e.identifyField), V = {
|
|
1353
1353
|
selectedStart: n("transfer.selectedStart"),
|
|
1354
1354
|
selectedEnd: n("transfer.selectedEnd")
|
|
1355
|
-
}, F = T(e.displayType), h = T(!1), M = T(e.dataSource), O = T(e.textField), c = T(e.selections || []), S = A(() => c.value.map((
|
|
1356
|
-
let
|
|
1357
|
-
function
|
|
1358
|
-
const
|
|
1359
|
-
d.length && d.reduce((b, B) => (b.set(B, !0), b),
|
|
1355
|
+
}, F = T(e.displayType), h = T(!1), M = T(e.dataSource), O = T(e.textField), c = T(e.selections || []), S = A(() => c.value.map((o) => o[p.value])), i = /* @__PURE__ */ new Map(), s = T(), v = T();
|
|
1356
|
+
let l;
|
|
1357
|
+
function a() {
|
|
1358
|
+
const o = /* @__PURE__ */ new Map(), d = e.selectionValues || [];
|
|
1359
|
+
d.length && d.reduce((b, B) => (b.set(B, !0), b), o);
|
|
1360
1360
|
const u = e.selections || [];
|
|
1361
|
-
u.length && (
|
|
1362
|
-
const B = b[p.value], $ =
|
|
1361
|
+
u.length && (o.clear(), u.reduce((b, B) => (b.set(B[p.value], !0), b), o)), c.value.length || (c.value = M.value.filter((b) => o.has(b[p.value])).map((b) => Object.assign({}, b))), M.value.forEach((b) => {
|
|
1362
|
+
const B = b[p.value], $ = o.has(B);
|
|
1363
1363
|
b.checked = $, $ && i.set(B, b);
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
1366
|
-
|
|
1366
|
+
a(), x(() => e.selections, (o) => {
|
|
1367
|
+
c.value = o, a();
|
|
1368
|
+
});
|
|
1367
1369
|
const m = A(() => F.value === "List"), C = A(() => F.value === "Tree");
|
|
1368
|
-
function D(
|
|
1369
|
-
c.value =
|
|
1370
|
+
function D(o) {
|
|
1371
|
+
c.value = o.map((d) => Object.assign({}, d)), t.emit("change", c.value);
|
|
1370
1372
|
}
|
|
1371
1373
|
function P() {
|
|
1372
|
-
return g(
|
|
1374
|
+
return g(W, {
|
|
1373
1375
|
class: "f-utils-fill",
|
|
1374
1376
|
data: M.value,
|
|
1375
1377
|
multiSelect: !0,
|
|
@@ -1418,36 +1420,36 @@ const q = /* @__PURE__ */ Z({
|
|
|
1418
1420
|
class: "container columns-box d-flex f-utils-fill"
|
|
1419
1421
|
}, [m.value && P(), C.value && E()])])]);
|
|
1420
1422
|
}
|
|
1421
|
-
function f(
|
|
1422
|
-
const d =
|
|
1423
|
+
function f(o) {
|
|
1424
|
+
const d = o[p.value];
|
|
1423
1425
|
if (d !== null || d !== void 0) {
|
|
1424
1426
|
c.value = c.value.filter((b) => b[p.value] !== d);
|
|
1425
1427
|
const u = i.get(d);
|
|
1426
1428
|
u && (u.checked = !1, i.delete(d)), t.emit("change", c.value);
|
|
1427
1429
|
}
|
|
1428
1430
|
}
|
|
1429
|
-
function k(
|
|
1430
|
-
|
|
1431
|
+
function k(o) {
|
|
1432
|
+
o.forEach((d) => {
|
|
1431
1433
|
Object.keys(d).forEach((u) => {
|
|
1432
1434
|
u.indexOf("__fv") > -1 && delete d[u];
|
|
1433
1435
|
});
|
|
1434
1436
|
});
|
|
1435
1437
|
}
|
|
1436
|
-
|
|
1437
|
-
k(
|
|
1438
|
-
const d =
|
|
1439
|
-
u ? s.value.activeRowById(u[p.value]) : (
|
|
1438
|
+
x(c, (o) => {
|
|
1439
|
+
k(o), s.value.updateDataSource(o);
|
|
1440
|
+
const d = l == null ? void 0 : l[p.value], u = o.find((b) => d === b[p.value]);
|
|
1441
|
+
u ? s.value.activeRowById(u[p.value]) : (l = null, s.value.activeRowById(""));
|
|
1440
1442
|
});
|
|
1441
|
-
function w(
|
|
1443
|
+
function w(o) {
|
|
1442
1444
|
const d = /* @__PURE__ */ new Map();
|
|
1443
|
-
c.value.reduce((u, b) => (u.set(b[p.value], b), u), d), c.value =
|
|
1445
|
+
c.value.reduce((u, b) => (u.set(b[p.value], b), u), d), c.value = o.map((u) => d.get(u[p.value])), t.emit("change", c.value);
|
|
1444
1446
|
}
|
|
1445
|
-
function o
|
|
1446
|
-
|
|
1447
|
+
function r(o) {
|
|
1448
|
+
l = o[0], t.emit("activeChange", o);
|
|
1447
1449
|
}
|
|
1448
1450
|
function j() {
|
|
1449
|
-
var
|
|
1450
|
-
return k(c.value), g(
|
|
1451
|
+
var o;
|
|
1452
|
+
return k(c.value), g(W, {
|
|
1451
1453
|
ref: s,
|
|
1452
1454
|
columns: e.columns,
|
|
1453
1455
|
style: "flex:1",
|
|
@@ -1459,10 +1461,10 @@ const q = /* @__PURE__ */ Z({
|
|
|
1459
1461
|
itemClass: e.selectedItemClass,
|
|
1460
1462
|
onChange: w,
|
|
1461
1463
|
onRemoveItem: f,
|
|
1462
|
-
onActiveChange:
|
|
1464
|
+
onActiveChange: r,
|
|
1463
1465
|
checkBeforeRemoveItem: e.checkBeforeRemoveItem
|
|
1464
1466
|
}, {
|
|
1465
|
-
itemContent: (
|
|
1467
|
+
itemContent: (o = t.slots) != null && o.text ? (d) => {
|
|
1466
1468
|
var u;
|
|
1467
1469
|
return ((u = t.slots) == null ? void 0 : u.text) && t.slots.text(d);
|
|
1468
1470
|
} : null
|
|
@@ -1496,7 +1498,9 @@ const q = /* @__PURE__ */ Z({
|
|
|
1496
1498
|
ref: v,
|
|
1497
1499
|
class: y.value,
|
|
1498
1500
|
style: "height:480px"
|
|
1499
|
-
}, [
|
|
1501
|
+
}, [t.slots.children ? t.slots.children({
|
|
1502
|
+
selections: c.value
|
|
1503
|
+
}) : I(), R()]);
|
|
1500
1504
|
}
|
|
1501
1505
|
});
|
|
1502
1506
|
function Kt(e, t, n) {
|
|
@@ -1520,32 +1524,32 @@ function Kt(e, t, n) {
|
|
|
1520
1524
|
return null;
|
|
1521
1525
|
if (y.value.schema && y.value.schema.type === "component")
|
|
1522
1526
|
return y.value;
|
|
1523
|
-
const
|
|
1527
|
+
const o = T(y == null ? void 0 : y.value.parent), d = i(o);
|
|
1524
1528
|
return d || null;
|
|
1525
1529
|
}
|
|
1526
1530
|
function s(y = t) {
|
|
1527
1531
|
var b;
|
|
1528
|
-
const { componentInstance:
|
|
1529
|
-
if (!
|
|
1532
|
+
const { componentInstance: o, designerItemElementRef: d } = y;
|
|
1533
|
+
if (!o || !o.value)
|
|
1530
1534
|
return null;
|
|
1531
|
-
const { getCustomButtons: u } =
|
|
1532
|
-
return
|
|
1535
|
+
const { getCustomButtons: u } = o.value;
|
|
1536
|
+
return o.value.canMove || u && ((b = u()) != null && b.length) ? d : s(y.parent);
|
|
1533
1537
|
}
|
|
1534
1538
|
function v(y) {
|
|
1535
1539
|
return !!n;
|
|
1536
1540
|
}
|
|
1537
|
-
function
|
|
1541
|
+
function l() {
|
|
1538
1542
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
1539
1543
|
}
|
|
1540
|
-
function
|
|
1544
|
+
function a() {
|
|
1541
1545
|
}
|
|
1542
|
-
function m(y,
|
|
1546
|
+
function m(y, o) {
|
|
1543
1547
|
var d;
|
|
1544
|
-
!y || !
|
|
1548
|
+
!y || !o || (d = t == null ? void 0 : t.setupContext) == null || d.emit("dragEnd");
|
|
1545
1549
|
}
|
|
1546
|
-
function C(y,
|
|
1550
|
+
function C(y, o) {
|
|
1547
1551
|
const { componentType: d } = y;
|
|
1548
|
-
let u =
|
|
1552
|
+
let u = qe(d, y, o);
|
|
1549
1553
|
const b = d.toLowerCase().replace(/-/g, "_");
|
|
1550
1554
|
return u && !u.id && u.type === d && (u.id = `${b}_${Math.random().toString().slice(2, 6)}`), u;
|
|
1551
1555
|
}
|
|
@@ -1556,22 +1560,22 @@ function Kt(e, t, n) {
|
|
|
1556
1560
|
function E(y) {
|
|
1557
1561
|
if (!y)
|
|
1558
1562
|
return;
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1561
|
-
const u = d.getExpressions().findIndex((b) => b.target ===
|
|
1563
|
+
const o = t == null ? void 0 : t.schema, { formSchemaUtils: d } = y;
|
|
1564
|
+
if (o && d.getExpressions().length) {
|
|
1565
|
+
const u = d.getExpressions().findIndex((b) => b.target === o.id);
|
|
1562
1566
|
u > -1 && d.getExpressions().splice(u, 1);
|
|
1563
1567
|
}
|
|
1564
1568
|
}
|
|
1565
1569
|
function I(y) {
|
|
1566
1570
|
if (!y || !(t != null && t.schema))
|
|
1567
1571
|
return;
|
|
1568
|
-
const
|
|
1569
|
-
d.removeCommunicationInComponent(
|
|
1572
|
+
const o = t.schema, { formSchemaUtils: d } = y;
|
|
1573
|
+
d.removeCommunicationInComponent(o);
|
|
1570
1574
|
}
|
|
1571
1575
|
function f(y) {
|
|
1572
|
-
E(y), I(y), t != null && t.schema.contents && t.schema.contents.map((
|
|
1573
|
-
let d =
|
|
1574
|
-
|
|
1576
|
+
E(y), I(y), t != null && t.schema.contents && t.schema.contents.map((o) => {
|
|
1577
|
+
let d = o.id;
|
|
1578
|
+
o.type === "component-ref" && (d = o.component);
|
|
1575
1579
|
const u = e.value.querySelectorAll(`#${d}-design-item`);
|
|
1576
1580
|
u != null && u.length && Array.from(u).map((b) => {
|
|
1577
1581
|
var B;
|
|
@@ -1586,19 +1590,19 @@ function Kt(e, t, n) {
|
|
|
1586
1590
|
if (!((d = t == null ? void 0 : t.schema) != null && d.id))
|
|
1587
1591
|
return;
|
|
1588
1592
|
!h && y && (h = y.formSchemaUtils);
|
|
1589
|
-
let
|
|
1593
|
+
let o = "";
|
|
1590
1594
|
{
|
|
1591
1595
|
const { text: b, title: B, label: $, mainTitle: L, name: _, type: z } = t.schema;
|
|
1592
|
-
|
|
1596
|
+
o = b || B || $ || L || _ || ((u = fe[z]) == null ? void 0 : u.name);
|
|
1593
1597
|
}
|
|
1594
|
-
|
|
1595
|
-
componentTitle:
|
|
1596
|
-
parentPathName:
|
|
1598
|
+
o && h.getControlBasicInfoMap().set(t.schema.id, {
|
|
1599
|
+
componentTitle: o,
|
|
1600
|
+
parentPathName: o
|
|
1597
1601
|
});
|
|
1598
1602
|
}
|
|
1599
|
-
function
|
|
1603
|
+
function r(y) {
|
|
1600
1604
|
var b;
|
|
1601
|
-
const { changeObject:
|
|
1605
|
+
const { changeObject: o } = y, { propertyID: d, propertyValue: u } = o;
|
|
1602
1606
|
if (["text", "title", "label", "name", "mainTitle"].includes((b = y == null ? void 0 : y.changeObject) == null ? void 0 : b.propertyID) && d && u && (w(), h)) {
|
|
1603
1607
|
const B = h.getControlBasicInfoMap(), $ = B.keys().toArray().filter((L) => {
|
|
1604
1608
|
var _, z;
|
|
@@ -1611,7 +1615,7 @@ function Kt(e, t, n) {
|
|
|
1611
1615
|
}
|
|
1612
1616
|
}
|
|
1613
1617
|
function j(y) {
|
|
1614
|
-
|
|
1618
|
+
r(y);
|
|
1615
1619
|
}
|
|
1616
1620
|
return F.value = {
|
|
1617
1621
|
canMove: M(),
|
|
@@ -1627,9 +1631,9 @@ function Kt(e, t, n) {
|
|
|
1627
1631
|
canAccepts: v,
|
|
1628
1632
|
getBelongedComponentInstance: i,
|
|
1629
1633
|
getDraggableDesignItemElement: s,
|
|
1630
|
-
getDraggingDisplayText:
|
|
1634
|
+
getDraggingDisplayText: l,
|
|
1631
1635
|
getPropConfig: P,
|
|
1632
|
-
getDragScopeElement:
|
|
1636
|
+
getDragScopeElement: a,
|
|
1633
1637
|
onAcceptMovedChildElement: m,
|
|
1634
1638
|
onChildElementMovedOut: D,
|
|
1635
1639
|
addNewChildComponentSchema: C,
|
|
@@ -1650,20 +1654,20 @@ const en = /* @__PURE__ */ Z({
|
|
|
1650
1654
|
const n = T(e.identifyField), p = T("已选:"), V = T("项数据"), F = T(e.displayType), h = T(!1), M = T(e.dataSource), O = T(e.selections || []), c = A(() => O.value.map((j) => j[n.value])), S = /* @__PURE__ */ new Map();
|
|
1651
1655
|
function i() {
|
|
1652
1656
|
const j = /* @__PURE__ */ new Map(), R = e.selectionValues || [];
|
|
1653
|
-
R.length && R.reduce((
|
|
1657
|
+
R.length && R.reduce((o, d) => (o.set(d, !0), o), j);
|
|
1654
1658
|
const y = e.selections || [];
|
|
1655
|
-
y.length && (j.clear(), y.reduce((
|
|
1656
|
-
const d =
|
|
1657
|
-
|
|
1659
|
+
y.length && (j.clear(), y.reduce((o, d) => (o.set(d[n.value], !0), o), j)), O.value.length || (O.value = M.value.filter((o) => j.has(o[n.value])).map((o) => Object.assign({}, o))), M.value.forEach((o) => {
|
|
1660
|
+
const d = o[n.value], u = j.has(d);
|
|
1661
|
+
o.checked = u, u && S.set(d, o);
|
|
1658
1662
|
});
|
|
1659
1663
|
}
|
|
1660
1664
|
i();
|
|
1661
1665
|
const s = A(() => F.value === "List"), v = A(() => F.value === "Tree");
|
|
1662
|
-
function
|
|
1666
|
+
function l(j) {
|
|
1663
1667
|
O.value = j.map((R) => Object.assign({}, R)), t.emit("change", O.value);
|
|
1664
1668
|
}
|
|
1665
|
-
function
|
|
1666
|
-
return g(
|
|
1669
|
+
function a() {
|
|
1670
|
+
return g(W, {
|
|
1667
1671
|
class: "f-utils-fill",
|
|
1668
1672
|
data: M.value,
|
|
1669
1673
|
"multi-select": !0,
|
|
@@ -1671,13 +1675,13 @@ const en = /* @__PURE__ */ Z({
|
|
|
1671
1675
|
header: "Search",
|
|
1672
1676
|
headerClass: "transfer-search-box",
|
|
1673
1677
|
"selection-values": c.value,
|
|
1674
|
-
onSelectionChange:
|
|
1678
|
+
onSelectionChange: l
|
|
1675
1679
|
}, {
|
|
1676
1680
|
default: () => [te(" ")]
|
|
1677
1681
|
});
|
|
1678
1682
|
}
|
|
1679
1683
|
function m() {
|
|
1680
|
-
return g(
|
|
1684
|
+
return g(Q, null, null);
|
|
1681
1685
|
}
|
|
1682
1686
|
function C() {
|
|
1683
1687
|
return g("div", {
|
|
@@ -1686,22 +1690,22 @@ const en = /* @__PURE__ */ Z({
|
|
|
1686
1690
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
1687
1691
|
}, [g("div", {
|
|
1688
1692
|
class: "container columns-box d-flex f-utils-fill"
|
|
1689
|
-
}, [s.value &&
|
|
1693
|
+
}, [s.value && a(), v.value && m()])])]);
|
|
1690
1694
|
}
|
|
1691
1695
|
function D(j) {
|
|
1692
1696
|
const R = j[n.value];
|
|
1693
1697
|
if (R !== null || R !== void 0) {
|
|
1694
|
-
O.value = O.value.filter((
|
|
1698
|
+
O.value = O.value.filter((o) => o[n.value] !== R);
|
|
1695
1699
|
const y = S.get(R);
|
|
1696
1700
|
y && (y.checked = !1, S.delete(R)), t.emit("change", O.value);
|
|
1697
1701
|
}
|
|
1698
1702
|
}
|
|
1699
1703
|
function P(j) {
|
|
1700
1704
|
const R = /* @__PURE__ */ new Map();
|
|
1701
|
-
O.value.reduce((y,
|
|
1705
|
+
O.value.reduce((y, o) => (y.set(o[n.value], o), y), R), O.value = j.map((y) => R.get(y[n.value])), t.emit("change", O.value);
|
|
1702
1706
|
}
|
|
1703
1707
|
function E() {
|
|
1704
|
-
return g(
|
|
1708
|
+
return g(W, {
|
|
1705
1709
|
style: "flex:1",
|
|
1706
1710
|
data: O.value,
|
|
1707
1711
|
draggable: !0,
|
|
@@ -1734,25 +1738,25 @@ const en = /* @__PURE__ */ Z({
|
|
|
1734
1738
|
transfer: !0,
|
|
1735
1739
|
row: !0,
|
|
1736
1740
|
"f-utils-fill": h.value
|
|
1737
|
-
})), k = T(), w = Me("design-item-context"),
|
|
1741
|
+
})), k = T(), w = Me("design-item-context"), r = Kt(k, w);
|
|
1738
1742
|
return le(() => {
|
|
1739
|
-
k.value.componentInstance =
|
|
1740
|
-
}), t.expose(
|
|
1743
|
+
k.value.componentInstance = r;
|
|
1744
|
+
}), t.expose(r.value), () => g("div", {
|
|
1741
1745
|
ref: k,
|
|
1742
1746
|
class: f.value,
|
|
1743
1747
|
style: "height:480px"
|
|
1744
1748
|
}, [C(), I()]);
|
|
1745
1749
|
}
|
|
1746
1750
|
});
|
|
1747
|
-
|
|
1748
|
-
e.transfer =
|
|
1751
|
+
U.register = (e, t, n) => {
|
|
1752
|
+
e.transfer = U, t.transfer = we;
|
|
1749
1753
|
};
|
|
1750
|
-
|
|
1754
|
+
U.registerDesigner = (e, t, n) => {
|
|
1751
1755
|
e.transfer = en, t.transfer = we;
|
|
1752
1756
|
};
|
|
1753
|
-
const gn = Re(
|
|
1757
|
+
const gn = Re(U);
|
|
1754
1758
|
export {
|
|
1755
|
-
|
|
1759
|
+
U as FTransfer,
|
|
1756
1760
|
gn as default,
|
|
1757
1761
|
we as propsResolver,
|
|
1758
1762
|
ee as transferProps
|