@farris/ui-vue 1.2.9 → 1.3.0
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/accordion/index.esm.js +63 -63
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +402 -323
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +98 -96
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +66 -66
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +118 -118
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +539 -460
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +135 -135
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1007 -312
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +97 -97
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +472 -329
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2231 -1055
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +79 -79
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6408 -5034
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4762 -3511
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3442 -2742
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2597 -1141
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +114 -71
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +171 -171
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3075 -2586
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5272 -8511
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1726 -1822
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +126 -126
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +620 -540
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +88 -88
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +71 -71
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3582 -2356
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10752 -8972
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5601 -5329
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +535 -452
- package/components/nav/index.umd.cjs +2 -2
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +556 -477
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +504 -425
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1833 -1054
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +899 -870
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +576 -487
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +73 -73
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +1916 -1220
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +783 -886
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3632 -2556
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +484 -405
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +152 -152
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +73 -73
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1081 -1043
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +753 -738
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4418 -4177
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +119 -119
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +92 -91
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +59 -59
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +103 -103
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +85 -85
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +457 -378
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +1696 -1617
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +53 -53
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +268 -268
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +420 -341
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1062 -981
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +381 -379
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5252 -9560
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3920 -2692
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +373 -367
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +92 -92
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +597 -417
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +251 -251
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +17125 -16176
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +1 -1
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { useIdentify as
|
|
1
|
+
import { ref as h, computed as $, createVNode as l, Fragment as B, watch as Q, withModifiers as ne, withDirectives as le, vModelText as se, defineComponent as G, createTextVNode as _, inject as ae, onMounted as oe } from "vue";
|
|
2
|
+
import { isPlainObject as W, cloneDeep as ie } from "lodash-es";
|
|
3
|
+
import { useIdentify as re, useHierarchy as ce, useGroupData as ue, usePagination as fe, useDataView as de, useSelection as pe, useEdit as ve, useVisualDataBound as ge, useVisualDataCell as he, useVisualDataRow as me, useVisualGroupRow as ye, useVisualSummaryRow as we, useVisualData as Ce } from "../data-view/index.esm.js";
|
|
4
4
|
import { FCheckBox as q } from "../checkbox/index.esm.js";
|
|
5
|
-
const
|
|
5
|
+
const Y = {}, Z = {};
|
|
6
6
|
function z(t) {
|
|
7
|
-
const { properties: e, title: n, ignore: u } = t, v = u && Array.isArray(u), a = Object.keys(e).reduce((
|
|
8
|
-
return (!v || !u.find((
|
|
7
|
+
const { properties: e, title: n, ignore: u } = t, v = u && Array.isArray(u), a = Object.keys(e).reduce((r, m) => ((!v || !u.find((c) => c == m)) && (r[m] = e[m].type === "object" && e[m].properties ? z(e[m]) : ie(e[m].default)), r), {});
|
|
8
|
+
return (!v || !u.find((r) => r == "id")) && (a.id = `${n}-${Date.now()}`), a;
|
|
9
9
|
}
|
|
10
10
|
function N(t, e = {}, n) {
|
|
11
|
-
const u =
|
|
11
|
+
const u = Y[t];
|
|
12
12
|
if (u) {
|
|
13
13
|
let v = z(u);
|
|
14
|
-
const a =
|
|
14
|
+
const a = Z[t];
|
|
15
15
|
return v = a ? a({ getSchemaByType: N }, v, e, n) : v, v;
|
|
16
16
|
}
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Se(t, e) {
|
|
20
20
|
const n = z(e);
|
|
21
|
-
return Object.keys(t).reduce((u, v) => (u[v] &&
|
|
21
|
+
return Object.keys(t).reduce((u, v) => (u[v] && W(u[v]) && W(t[v]) ? Object.assign(u[v], t[v]) : u[v] = t[v], u), n), n;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function be(t, e) {
|
|
24
24
|
return Object.keys(t).filter((u) => t[u] != null).reduce((u, v) => {
|
|
25
25
|
if (e.has(v)) {
|
|
26
26
|
const a = e.get(v);
|
|
27
27
|
if (typeof a == "string")
|
|
28
28
|
u[a] = t[v];
|
|
29
29
|
else {
|
|
30
|
-
const
|
|
31
|
-
Object.assign(u,
|
|
30
|
+
const r = a(v, t[v], t);
|
|
31
|
+
Object.assign(u, r);
|
|
32
32
|
}
|
|
33
33
|
} else
|
|
34
34
|
u[v] = t[v];
|
|
35
35
|
return u;
|
|
36
36
|
}, {});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const u =
|
|
40
|
-
return
|
|
38
|
+
function ke(t, e, n = /* @__PURE__ */ new Map()) {
|
|
39
|
+
const u = Se(t, e);
|
|
40
|
+
return be(u, n);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
function e(p, d, o,
|
|
42
|
+
function Me(t = {}) {
|
|
43
|
+
function e(p, d, o, i) {
|
|
44
44
|
if (typeof o == "number")
|
|
45
|
-
return
|
|
45
|
+
return i[p].length === o;
|
|
46
46
|
if (typeof o == "object") {
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
47
|
+
const M = Object.keys(o)[0], b = o[M];
|
|
48
|
+
if (M === "not")
|
|
49
|
+
return Number(i[p].length) !== Number(b);
|
|
50
|
+
if (M === "moreThan")
|
|
51
|
+
return Number(i[p].length) >= Number(b);
|
|
52
|
+
if (M === "lessThan")
|
|
53
|
+
return Number(i[p].length) <= Number(b);
|
|
54
54
|
}
|
|
55
55
|
return !1;
|
|
56
56
|
}
|
|
57
|
-
function n(p, d, o,
|
|
58
|
-
return
|
|
57
|
+
function n(p, d, o, i) {
|
|
58
|
+
return i[p] && i[p].propertyValue && String(i[p].propertyValue.value) === String(o);
|
|
59
59
|
}
|
|
60
60
|
const u = /* @__PURE__ */ new Map([
|
|
61
61
|
["length", e],
|
|
@@ -64,20 +64,20 @@ function ke(t = {}) {
|
|
|
64
64
|
Object.keys(t).reduce((p, d) => (p.set(d, t[d]), p), u);
|
|
65
65
|
function v(p, d) {
|
|
66
66
|
const o = p;
|
|
67
|
-
return typeof d == "number" ? [{ target: o, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: o, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((
|
|
68
|
-
if (
|
|
69
|
-
return { target: o, operator: "length", param: null, value: d[
|
|
70
|
-
const
|
|
71
|
-
return { target: o, operator: "getProperty", param:
|
|
67
|
+
return typeof d == "number" ? [{ target: o, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: o, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((i) => {
|
|
68
|
+
if (i === "length")
|
|
69
|
+
return { target: o, operator: "length", param: null, value: d[i] };
|
|
70
|
+
const M = i, b = d[i];
|
|
71
|
+
return { target: o, operator: "getProperty", param: M, value: b };
|
|
72
72
|
}) : [];
|
|
73
73
|
}
|
|
74
74
|
function a(p) {
|
|
75
|
-
return Object.keys(p).reduce((o,
|
|
76
|
-
const
|
|
77
|
-
return o.push(...
|
|
75
|
+
return Object.keys(p).reduce((o, i) => {
|
|
76
|
+
const M = v(i, p[i]);
|
|
77
|
+
return o.push(...M), o;
|
|
78
78
|
}, []);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function r(p, d) {
|
|
81
81
|
if (u.has(p.operator)) {
|
|
82
82
|
const o = u.get(p.operator);
|
|
83
83
|
return o && o(p.target, p.param, p.value, d) || !1;
|
|
@@ -85,32 +85,32 @@ function ke(t = {}) {
|
|
|
85
85
|
return !1;
|
|
86
86
|
}
|
|
87
87
|
function m(p, d) {
|
|
88
|
-
return a(p).reduce((
|
|
88
|
+
return a(p).reduce((M, b) => M && r(b, d), !0);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
const o = Object.keys(p),
|
|
92
|
-
return
|
|
90
|
+
function c(p, d) {
|
|
91
|
+
const o = Object.keys(p), i = o.includes("allOf"), M = o.includes("anyOf"), b = i || M, D = (b ? p[b ? i ? "allOf" : "anyOf" : "allOf"] : [p]).map((T) => m(T, d));
|
|
92
|
+
return i ? !D.includes(!1) : D.includes(!0);
|
|
93
93
|
}
|
|
94
|
-
return { parseValueSchema:
|
|
94
|
+
return { parseValueSchema: c };
|
|
95
95
|
}
|
|
96
|
-
const Ve = {},
|
|
97
|
-
|
|
98
|
-
function
|
|
99
|
-
return
|
|
100
|
-
const m =
|
|
101
|
-
return Object.assign(
|
|
96
|
+
const Ve = {}, De = {};
|
|
97
|
+
Me();
|
|
98
|
+
function K(t, e, n = /* @__PURE__ */ new Map(), u = (r, m, c) => m, v = {}, a = (r) => r) {
|
|
99
|
+
return Y[e.title] = e, Z[e.title] = u, Ve[e.title] = v, De[e.title] = a, (r = {}) => {
|
|
100
|
+
const m = ke(r, e, n), c = Object.keys(t).reduce((p, d) => (p[d] = t[d].default, p), {});
|
|
101
|
+
return Object.assign(c, m);
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function x(t, e) {
|
|
105
105
|
return { customClass: e.class, customStyle: e.style };
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
["appearance",
|
|
107
|
+
const Oe = /* @__PURE__ */ new Map([
|
|
108
|
+
["appearance", x]
|
|
109
109
|
]);
|
|
110
110
|
function Te(t, e, n) {
|
|
111
111
|
return e;
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const Ie = "transfer", Fe = "A Farris Component", je = "object", Re = {
|
|
114
114
|
basic: {
|
|
115
115
|
description: "Basic Infomation",
|
|
116
116
|
title: "基本信息",
|
|
@@ -132,12 +132,12 @@ const Oe = "transfer", Ie = "A Farris Component", Fe = "object", je = {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
},
|
|
136
|
-
title:
|
|
137
|
-
description:
|
|
138
|
-
type:
|
|
139
|
-
categories:
|
|
140
|
-
},
|
|
135
|
+
}, $e = {
|
|
136
|
+
title: Ie,
|
|
137
|
+
description: Fe,
|
|
138
|
+
type: je,
|
|
139
|
+
categories: Re
|
|
140
|
+
}, Pe = "https://json-schema.org/draft/2020-12/schema", Ae = "https://farris-design.gitee.io/transfer.schema.json", Le = "transfer", Ee = "A Farris Component", He = "object", _e = {
|
|
141
141
|
id: {
|
|
142
142
|
description: "The unique identifier for transfer",
|
|
143
143
|
type: "string"
|
|
@@ -199,17 +199,17 @@ const Oe = "transfer", Ie = "A Farris Component", Fe = "object", je = {
|
|
|
199
199
|
type: "boolean",
|
|
200
200
|
default: !0
|
|
201
201
|
}
|
|
202
|
-
},
|
|
202
|
+
}, Ne = [
|
|
203
203
|
"id",
|
|
204
204
|
"type"
|
|
205
|
-
],
|
|
206
|
-
$schema:
|
|
207
|
-
$id:
|
|
208
|
-
title:
|
|
209
|
-
description:
|
|
210
|
-
type:
|
|
211
|
-
properties:
|
|
212
|
-
required:
|
|
205
|
+
], Be = {
|
|
206
|
+
$schema: Pe,
|
|
207
|
+
$id: Ae,
|
|
208
|
+
title: Le,
|
|
209
|
+
description: Ee,
|
|
210
|
+
type: He,
|
|
211
|
+
properties: _e,
|
|
212
|
+
required: Ne
|
|
213
213
|
}, U = {
|
|
214
214
|
dataSource: {
|
|
215
215
|
type: Array,
|
|
@@ -222,13 +222,13 @@ const Oe = "transfer", Ie = "A Farris Component", Fe = "object", je = {
|
|
|
222
222
|
placeholder: { type: String, default: "" },
|
|
223
223
|
selections: { type: Array, default: [] },
|
|
224
224
|
selectionValues: { type: Array, default: [] }
|
|
225
|
-
},
|
|
226
|
-
["appearance",
|
|
225
|
+
}, ee = K(U, Be, Oe, Te, $e), Ge = /* @__PURE__ */ new Map([
|
|
226
|
+
["appearance", x]
|
|
227
227
|
]);
|
|
228
|
-
function
|
|
228
|
+
function qe(t, e, n) {
|
|
229
229
|
return e;
|
|
230
230
|
}
|
|
231
|
-
const
|
|
231
|
+
const ze = "https://json-schema.org/draft/2020-12/schema", Ue = "https://farris-design.gitee.io/list-view.schema.json", We = "list-view", Je = "A Farris Component", Xe = "object", Qe = {
|
|
232
232
|
id: {
|
|
233
233
|
description: "The unique identifier for list-view",
|
|
234
234
|
type: "string"
|
|
@@ -290,18 +290,18 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
290
290
|
type: "boolean",
|
|
291
291
|
default: !0
|
|
292
292
|
}
|
|
293
|
-
},
|
|
293
|
+
}, Ye = [
|
|
294
294
|
"id",
|
|
295
295
|
"type"
|
|
296
|
-
],
|
|
297
|
-
$schema:
|
|
298
|
-
$id:
|
|
299
|
-
title:
|
|
300
|
-
description:
|
|
301
|
-
type:
|
|
302
|
-
properties:
|
|
303
|
-
required:
|
|
304
|
-
},
|
|
296
|
+
], Ze = {
|
|
297
|
+
$schema: ze,
|
|
298
|
+
$id: Ue,
|
|
299
|
+
title: We,
|
|
300
|
+
description: Je,
|
|
301
|
+
type: Xe,
|
|
302
|
+
properties: Qe,
|
|
303
|
+
required: Ye
|
|
304
|
+
}, Ke = "list-view", xe = "A Farris Component", et = "object", tt = {
|
|
305
305
|
basic: {
|
|
306
306
|
description: "Basic Infomation",
|
|
307
307
|
title: "基本信息",
|
|
@@ -323,12 +323,12 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
},
|
|
327
|
-
title:
|
|
328
|
-
description:
|
|
329
|
-
type:
|
|
330
|
-
categories:
|
|
331
|
-
},
|
|
326
|
+
}, nt = {
|
|
327
|
+
title: Ke,
|
|
328
|
+
description: xe,
|
|
329
|
+
type: et,
|
|
330
|
+
categories: tt
|
|
331
|
+
}, te = {
|
|
332
332
|
/** 列集合 */
|
|
333
333
|
columns: {
|
|
334
334
|
type: Array,
|
|
@@ -370,72 +370,72 @@ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
370
370
|
// 搜索启用高亮
|
|
371
371
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
372
372
|
};
|
|
373
|
-
|
|
374
|
-
function
|
|
373
|
+
K(te, Ze, Ge, qe, nt);
|
|
374
|
+
function lt(t, e) {
|
|
375
375
|
function n(a) {
|
|
376
|
-
const
|
|
376
|
+
const r = [];
|
|
377
377
|
let m = a.nextNode();
|
|
378
378
|
for (; m; )
|
|
379
|
-
|
|
380
|
-
return
|
|
379
|
+
r.push(m), m = a.nextNode();
|
|
380
|
+
return r;
|
|
381
381
|
}
|
|
382
|
-
function u(a,
|
|
382
|
+
function u(a, r) {
|
|
383
383
|
const m = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
384
|
-
return n(m).map((o) => ({ textNode: o, text: (o.textContent || "").toLocaleLowerCase() })).map(({ textNode: o, text:
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
for (;
|
|
388
|
-
const
|
|
389
|
-
if (
|
|
384
|
+
return n(m).map((o) => ({ textNode: o, text: (o.textContent || "").toLocaleLowerCase() })).map(({ textNode: o, text: i }) => {
|
|
385
|
+
const M = [];
|
|
386
|
+
let b = 0;
|
|
387
|
+
for (; b < i.length; ) {
|
|
388
|
+
const k = i.indexOf(r, b);
|
|
389
|
+
if (k === -1)
|
|
390
390
|
break;
|
|
391
|
-
|
|
391
|
+
M.push(k), b = k + r.length;
|
|
392
392
|
}
|
|
393
|
-
return
|
|
393
|
+
return M.map((k) => {
|
|
394
394
|
const I = new Range();
|
|
395
|
-
return I.setStart(o,
|
|
395
|
+
return I.setStart(o, k), I.setEnd(o, k + r.length), I;
|
|
396
396
|
});
|
|
397
397
|
}).flat();
|
|
398
398
|
}
|
|
399
399
|
function v(a) {
|
|
400
400
|
if (!CSS.highlights || (CSS.highlights.clear(), !a || !e))
|
|
401
401
|
return;
|
|
402
|
-
const
|
|
402
|
+
const r = u(e.value, a.toLocaleLowerCase()), m = new Highlight(...r);
|
|
403
403
|
CSS.highlights.set("search-result", m);
|
|
404
404
|
}
|
|
405
405
|
return { search: v };
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
const d =
|
|
407
|
+
function J(t, e, n, u, v, a, r, m, c, p) {
|
|
408
|
+
const d = h(t.size), o = h(t.textField), i = h(t.titleField), M = h(t.disableField), b = $(() => {
|
|
409
409
|
var f, y;
|
|
410
410
|
return ((f = t.selection) == null ? void 0 : f.multiSelect) && ((y = t.selection) == null ? void 0 : y.showCheckbox);
|
|
411
411
|
}), {
|
|
412
|
-
onMouseenterItem:
|
|
412
|
+
onMouseenterItem: k,
|
|
413
413
|
onMouseoverItem: I,
|
|
414
414
|
onMouseoutItem: D
|
|
415
415
|
} = a, {
|
|
416
|
-
getKey:
|
|
417
|
-
listViewItemClass:
|
|
416
|
+
getKey: V,
|
|
417
|
+
listViewItemClass: T,
|
|
418
418
|
onCheckItem: P,
|
|
419
|
-
onClickItem:
|
|
420
|
-
} =
|
|
419
|
+
onClickItem: O
|
|
420
|
+
} = r, w = $(() => ({
|
|
421
421
|
margin: d.value === "small" ? "0.25rem 0" : "10px 0"
|
|
422
422
|
}));
|
|
423
|
-
function F(f, y,
|
|
423
|
+
function F(f, y, C) {
|
|
424
424
|
return f.checked = m.findIndexInSelectedItems(f) > -1, l("li", {
|
|
425
|
-
class:
|
|
426
|
-
id:
|
|
427
|
-
key:
|
|
428
|
-
onClick: (s) =>
|
|
429
|
-
onMouseenter: (s) =>
|
|
425
|
+
class: T(f, y),
|
|
426
|
+
id: V(f, y),
|
|
427
|
+
key: V(f, y),
|
|
428
|
+
onClick: (s) => O(s, f, y),
|
|
429
|
+
onMouseenter: (s) => k(s, f, y),
|
|
430
430
|
onMouseover: (s) => I(s, f, y),
|
|
431
431
|
onMouseout: (s) => D(s, f, y)
|
|
432
|
-
}, [
|
|
432
|
+
}, [b.value && l("div", {
|
|
433
433
|
class: "f-list-select",
|
|
434
434
|
onClick: (s) => s.stopPropagation()
|
|
435
435
|
}, [l(q, {
|
|
436
|
-
id: "list-" +
|
|
436
|
+
id: "list-" + V(f, y),
|
|
437
437
|
customClass: "listview-checkbox",
|
|
438
|
-
disabled: f[
|
|
438
|
+
disabled: f[M.value],
|
|
439
439
|
checked: f.checked,
|
|
440
440
|
"onUpdate:checked": (s) => f.checked = s,
|
|
441
441
|
onChange: (s) => {
|
|
@@ -445,116 +445,116 @@ function W(t, e, n, u, v, a, i, m, r, p) {
|
|
|
445
445
|
class: "f-list-content"
|
|
446
446
|
}, [l("div", {
|
|
447
447
|
style: w.value,
|
|
448
|
-
title: f.raw[
|
|
448
|
+
title: f.raw[i.value] || f.raw[o.value]
|
|
449
449
|
}, [f.raw[o.value]])])]);
|
|
450
450
|
}
|
|
451
451
|
return {
|
|
452
452
|
renderItem: F
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
const d =
|
|
457
|
-
onMouseenterItem:
|
|
458
|
-
onMouseoverItem:
|
|
459
|
-
onMouseoutItem:
|
|
455
|
+
function st(t, e, n, u, v, a, r, m, c, p) {
|
|
456
|
+
const d = h(t.multiSelect), o = h(t.disableField), {
|
|
457
|
+
onMouseenterItem: i,
|
|
458
|
+
onMouseoverItem: M,
|
|
459
|
+
onMouseoutItem: b
|
|
460
460
|
} = a, {
|
|
461
|
-
getKey:
|
|
461
|
+
getKey: k,
|
|
462
462
|
listViewItemClass: I,
|
|
463
463
|
onCheckItem: D,
|
|
464
|
-
onClickItem:
|
|
465
|
-
} =
|
|
466
|
-
function O
|
|
464
|
+
onClickItem: V
|
|
465
|
+
} = r;
|
|
466
|
+
function T(O, w, F) {
|
|
467
467
|
return e.slots.content ? l(B, null, [e.slots.content && e.slots.content({
|
|
468
|
-
item:
|
|
468
|
+
item: O.raw,
|
|
469
469
|
index: w,
|
|
470
470
|
selectedItem: F
|
|
471
471
|
})]) : l("div", {
|
|
472
472
|
style: "margin: 10px 0;"
|
|
473
|
-
}, [
|
|
473
|
+
}, [O.raw.name]);
|
|
474
474
|
}
|
|
475
|
-
function P(
|
|
475
|
+
function P(O, w, F) {
|
|
476
476
|
return l("li", {
|
|
477
|
-
class: I(
|
|
478
|
-
id:
|
|
479
|
-
key:
|
|
480
|
-
onClick: (f) =>
|
|
481
|
-
onMouseenter: (f) =>
|
|
482
|
-
onMouseover: (f) =>
|
|
483
|
-
onMouseout: (f) =>
|
|
477
|
+
class: I(O, w),
|
|
478
|
+
id: k(O, w),
|
|
479
|
+
key: k(O, w),
|
|
480
|
+
onClick: (f) => V(f, O, w),
|
|
481
|
+
onMouseenter: (f) => i(f, O, w),
|
|
482
|
+
onMouseover: (f) => M(f, O, w),
|
|
483
|
+
onMouseout: (f) => b(f, O, w)
|
|
484
484
|
}, [d.value && l("div", {
|
|
485
485
|
class: "f-list-select",
|
|
486
486
|
onClick: (f) => f.stopPropagation()
|
|
487
487
|
}, [l(q, {
|
|
488
|
-
id: "list-" +
|
|
488
|
+
id: "list-" + k(O, w),
|
|
489
489
|
customClass: "listview-checkbox",
|
|
490
|
-
disabled:
|
|
491
|
-
checked:
|
|
492
|
-
"onUpdate:checked": (f) =>
|
|
493
|
-
onChange: (f) => D(
|
|
490
|
+
disabled: O[o.value] || !O.checked,
|
|
491
|
+
checked: O.checked,
|
|
492
|
+
"onUpdate:checked": (f) => O.checked = f,
|
|
493
|
+
onChange: (f) => D(O, w, !f.checked)
|
|
494
494
|
}, null)]), l("div", {
|
|
495
495
|
class: "f-list-content"
|
|
496
|
-
}, [O
|
|
496
|
+
}, [T(O, w, F)])]);
|
|
497
497
|
}
|
|
498
498
|
return {
|
|
499
499
|
renderItem: P
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
const d =
|
|
504
|
-
onMouseenterItem:
|
|
505
|
-
onMouseoverItem:
|
|
506
|
-
onMouseoutItem:
|
|
502
|
+
function at(t, e, n, u, v, a, r, m, c, p) {
|
|
503
|
+
const d = h(t.multiSelect), o = h(t.disableField), {
|
|
504
|
+
onMouseenterItem: i,
|
|
505
|
+
onMouseoverItem: M,
|
|
506
|
+
onMouseoutItem: b
|
|
507
507
|
} = a, {
|
|
508
|
-
getKey:
|
|
508
|
+
getKey: k,
|
|
509
509
|
listViewItemClass: I,
|
|
510
510
|
onCheckItem: D,
|
|
511
|
-
onClickItem:
|
|
512
|
-
} =
|
|
513
|
-
dragstart:
|
|
511
|
+
onClickItem: V
|
|
512
|
+
} = r, {
|
|
513
|
+
dragstart: T,
|
|
514
514
|
dragenter: P,
|
|
515
|
-
dragover:
|
|
515
|
+
dragover: O,
|
|
516
516
|
dragend: w
|
|
517
517
|
} = u, {
|
|
518
518
|
removeItem: F
|
|
519
|
-
} =
|
|
519
|
+
} = c, f = $(() => ({
|
|
520
520
|
margin: d.value ? "10px 0" : "10px 0px 10px 14px"
|
|
521
521
|
}));
|
|
522
|
-
function y(
|
|
522
|
+
function y(g) {
|
|
523
523
|
return l("div", {
|
|
524
524
|
style: f.value
|
|
525
|
-
}, [
|
|
525
|
+
}, [g.raw.name]);
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function C() {
|
|
528
528
|
return e.slots.itemContent ? e.slots.itemContent : y;
|
|
529
529
|
}
|
|
530
|
-
const s =
|
|
531
|
-
function
|
|
530
|
+
const s = C();
|
|
531
|
+
function S(g, j, A) {
|
|
532
532
|
return l("li", {
|
|
533
|
-
class: I(
|
|
534
|
-
id:
|
|
535
|
-
key:
|
|
536
|
-
onClick: (R) =>
|
|
537
|
-
onMouseenter: (R) =>
|
|
538
|
-
onMouseover: (R) =>
|
|
539
|
-
onMouseout: (R) =>
|
|
533
|
+
class: I(g, j),
|
|
534
|
+
id: k(g, j),
|
|
535
|
+
key: k(g, j),
|
|
536
|
+
onClick: (R) => V(R, g, j),
|
|
537
|
+
onMouseenter: (R) => i(R, g, j),
|
|
538
|
+
onMouseover: (R) => M(R, g, j),
|
|
539
|
+
onMouseout: (R) => b(R, g, j),
|
|
540
540
|
draggable: "true",
|
|
541
|
-
onDragstart: (R) =>
|
|
541
|
+
onDragstart: (R) => T(R, g, j),
|
|
542
542
|
onDragenter: (R) => P(R, j),
|
|
543
|
-
onDragend: (R) => w(R,
|
|
544
|
-
onDragover: (R) =>
|
|
543
|
+
onDragend: (R) => w(R, g),
|
|
544
|
+
onDragover: (R) => O(R, j)
|
|
545
545
|
}, [d.value && l("div", {
|
|
546
546
|
class: "f-list-select",
|
|
547
547
|
onClick: (R) => R.stopPropagation()
|
|
548
548
|
}, [l(q, {
|
|
549
|
-
id: "list-" +
|
|
549
|
+
id: "list-" + k(g, j),
|
|
550
550
|
customClass: "listview-checkbox",
|
|
551
|
-
disabled:
|
|
552
|
-
checked:
|
|
553
|
-
"onUpdate:checked": (R) =>
|
|
554
|
-
onChange: (R) => D(
|
|
551
|
+
disabled: g[o.value] || !g.checked,
|
|
552
|
+
checked: g.checked,
|
|
553
|
+
"onUpdate:checked": (R) => g.checked = R,
|
|
554
|
+
onChange: (R) => D(g, j, !R.checked)
|
|
555
555
|
}, null)]), l("div", {
|
|
556
556
|
class: "f-list-content"
|
|
557
|
-
}, [s(
|
|
557
|
+
}, [s(g)]), l("div", {
|
|
558
558
|
class: "f-list-remove",
|
|
559
559
|
onClick: (R) => F(j)
|
|
560
560
|
}, [l("div", {
|
|
@@ -568,23 +568,23 @@ function st(t, e, n, u, v, a, i, m, r, p) {
|
|
|
568
568
|
}, null)])])]);
|
|
569
569
|
}
|
|
570
570
|
return {
|
|
571
|
-
renderItem:
|
|
571
|
+
renderItem: S
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
|
-
function
|
|
575
|
-
var
|
|
576
|
-
const d =
|
|
574
|
+
function ot(t, e, n, u, v, a, r, m, c, p) {
|
|
575
|
+
var k;
|
|
576
|
+
const d = h(((k = t.group) == null ? void 0 : k.groupFields) || []), {
|
|
577
577
|
collpaseGroupIconClass: o
|
|
578
578
|
} = v, {
|
|
579
|
-
toggleGroupRow:
|
|
579
|
+
toggleGroupRow: i
|
|
580
580
|
} = p;
|
|
581
|
-
function
|
|
582
|
-
D.collapse = !D.collapse, n.value =
|
|
581
|
+
function M(I, D) {
|
|
582
|
+
D.collapse = !D.collapse, n.value = i(D.collapse ? "collapse" : "expand", D, n.value);
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function b(I, D, V) {
|
|
585
585
|
return I.layer > -1 && l("div", {
|
|
586
586
|
class: "f-navlookup-recentHeader",
|
|
587
|
-
onClick: (
|
|
587
|
+
onClick: (T) => M(T, I)
|
|
588
588
|
}, [l("div", {
|
|
589
589
|
class: "fv-grid-group-row-icon"
|
|
590
590
|
}, [l("span", {
|
|
@@ -594,24 +594,24 @@ function at(t, e, n, u, v, a, i, m, r, p) {
|
|
|
594
594
|
}, [I.raw[d.value[I.layer]]])]);
|
|
595
595
|
}
|
|
596
596
|
return {
|
|
597
|
-
renderItem:
|
|
597
|
+
renderItem: b
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
const t =
|
|
600
|
+
function it() {
|
|
601
|
+
const t = h(-1), e = h(""), n = h(-1), u = h(!1);
|
|
602
602
|
function v(p, d, o) {
|
|
603
603
|
n.value = o;
|
|
604
604
|
}
|
|
605
605
|
function a(p, d, o) {
|
|
606
606
|
u.value || (n.value = o);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function r(p, d, o) {
|
|
609
609
|
n.value = -1;
|
|
610
610
|
}
|
|
611
611
|
function m() {
|
|
612
612
|
u.value = !0;
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function c() {
|
|
615
615
|
u.value = !1;
|
|
616
616
|
}
|
|
617
617
|
return {
|
|
@@ -620,129 +620,131 @@ function ot() {
|
|
|
620
620
|
hoverIndex: n,
|
|
621
621
|
onMouseenterItem: v,
|
|
622
622
|
onMouseoverItem: a,
|
|
623
|
-
onMouseoutItem:
|
|
624
|
-
resumeHover:
|
|
623
|
+
onMouseoutItem: r,
|
|
624
|
+
resumeHover: c,
|
|
625
625
|
suspendHover: m
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
const v =
|
|
630
|
-
function
|
|
631
|
-
D.stopPropagation(),
|
|
632
|
-
|
|
628
|
+
function rt(t, e, n, u) {
|
|
629
|
+
const v = h(t.idField), { dataView: a } = n, r = h(-1), m = h(!1), { activeIndex: c, focusedItemId: p, hoverIndex: d, resumeHover: o, suspendHover: i } = u;
|
|
630
|
+
function M(D, V, T) {
|
|
631
|
+
D.stopPropagation(), i(), V && setTimeout(() => {
|
|
632
|
+
r.value = T, m.value = !0, V.moving = !0;
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
if (D.preventDefault(),
|
|
637
|
-
const
|
|
638
|
-
P.splice(
|
|
635
|
+
function b(D, V) {
|
|
636
|
+
if (D.preventDefault(), r.value !== V) {
|
|
637
|
+
const T = a.value[r.value], P = a.value;
|
|
638
|
+
P.splice(r.value, 1), P.splice(V, 0, T), r.value = V;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function k(D, V) {
|
|
642
642
|
D.preventDefault(), D.dataTransfer && (D.dataTransfer.dropEffect = "move");
|
|
643
643
|
}
|
|
644
|
-
function I(D,
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}), m.value = !1, o(), d.value =
|
|
644
|
+
function I(D, V) {
|
|
645
|
+
V && (V.moving = !1), a.value.forEach((T, P) => {
|
|
646
|
+
T.__fv_index__ = P;
|
|
647
|
+
}), m.value = !1, o(), d.value = V.raw.__fv_index__, c.value = V.raw.__fv_index__, p.value = V.raw[v.value], e.emit("change", a.value), e.emit("activeChange", V);
|
|
648
648
|
}
|
|
649
649
|
return {
|
|
650
|
-
dragstart:
|
|
651
|
-
dragenter:
|
|
652
|
-
dragover:
|
|
650
|
+
dragstart: M,
|
|
651
|
+
dragenter: b,
|
|
652
|
+
dragover: k,
|
|
653
653
|
dragend: I,
|
|
654
654
|
isDragging: m
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function ct(t, e, n) {
|
|
658
658
|
const { dataView: u } = n;
|
|
659
659
|
function v(a) {
|
|
660
660
|
if (a > -1 && a < u.value.length) {
|
|
661
|
-
const
|
|
662
|
-
e.emit("removeItem",
|
|
661
|
+
const r = u.value.splice(a, 1);
|
|
662
|
+
e.emit("removeItem", r[0]);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
return { removeItem: v };
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
const
|
|
669
|
-
function P(s,
|
|
670
|
-
const
|
|
667
|
+
function ut(t, e, n, u, v, a) {
|
|
668
|
+
const r = h(t.idField), m = h(t.disableField), c = h(t.draggable), p = h(t.itemClass), d = h(t.selection.multiSelect ?? !1), o = h(t.selection.multiSelectMode), { isDragging: i } = u, { activeIndex: M, focusedItemId: b, hoverIndex: k } = v, { clearSelection: I, getSelectedItems: D, toggleSelectItem: V } = a, T = h(D());
|
|
669
|
+
function P(s, S) {
|
|
670
|
+
const g = {
|
|
671
671
|
"f-listview-item": !0,
|
|
672
672
|
"f-list-view-group-item": !0,
|
|
673
|
-
"f-list-view-draggable-item":
|
|
673
|
+
"f-list-view-draggable-item": c.value,
|
|
674
674
|
"f-un-click": !s.checked,
|
|
675
675
|
"f-un-select": !!s.raw[m.value],
|
|
676
676
|
// 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
|
|
677
677
|
// 多选
|
|
678
|
-
"f-listview-active":
|
|
679
|
-
(A) => A[
|
|
678
|
+
"f-listview-active": T.value.findIndex(
|
|
679
|
+
(A) => A[r.value] === s.raw[r.value]
|
|
680
680
|
) > -1,
|
|
681
|
-
"f-listview-item-active":
|
|
682
|
-
(A) => A[
|
|
681
|
+
"f-listview-item-active": T.value.findIndex(
|
|
682
|
+
(A) => A[r.value] === s.raw[r.value]
|
|
683
683
|
) > -1,
|
|
684
|
-
"f-listview-hover": !
|
|
684
|
+
"f-listview-hover": !i.value && S === k.value,
|
|
685
|
+
"f-listview-item-hover": !i.value && S === k.value,
|
|
685
686
|
moving: !!s.moving
|
|
686
687
|
};
|
|
687
|
-
return p.value.split(" ").reduce((A, R) => (A[R] = !0, A),
|
|
688
|
+
return p.value.split(" ").reduce((A, R) => (A[R] = !0, A), g), g;
|
|
688
689
|
}
|
|
689
|
-
function
|
|
690
|
-
return s.raw[
|
|
690
|
+
function O(s, S) {
|
|
691
|
+
return s.raw[r.value] || "";
|
|
691
692
|
}
|
|
692
693
|
const w = $(() => !d.value);
|
|
693
|
-
function F(s,
|
|
694
|
-
s.checked =
|
|
694
|
+
function F(s, S, g) {
|
|
695
|
+
s.checked = g, !s.raw[m.value] && (w.value && (b.value = s.raw[r.value]), V(s));
|
|
695
696
|
}
|
|
696
697
|
const f = $(() => d.value && o.value === "OnCheckClearByClick"), y = $(() => !d.value || d.value && (o.value === "OnCheckAndClick" || o.value === "OnClick"));
|
|
697
|
-
function
|
|
698
|
-
if (
|
|
698
|
+
function C(s, S, g) {
|
|
699
|
+
if (S.raw[m.value]) {
|
|
699
700
|
s.preventDefault(), s.stopPropagation();
|
|
700
701
|
return;
|
|
701
702
|
}
|
|
702
|
-
|
|
703
|
+
b.value = S.raw[r.value], M.value = g, f.value && I(n.value), y.value && (V(S), T.value = D()), e.emit("clickItem", { data: T.value, index: g }), e.emit("activeChange", T.value);
|
|
703
704
|
}
|
|
704
705
|
return {
|
|
705
|
-
getKey:
|
|
706
|
+
getKey: O,
|
|
706
707
|
listViewItemClass: P,
|
|
707
708
|
onCheckItem: F,
|
|
708
|
-
onClickItem:
|
|
709
|
+
onClickItem: C
|
|
709
710
|
};
|
|
710
711
|
}
|
|
711
|
-
function
|
|
712
|
-
const m =
|
|
712
|
+
function ft(t, e, n, u, v, a, r) {
|
|
713
|
+
const m = h(t.view), c = h(t.view === "CardView"), p = h({}), d = h("暂无数据"), o = it(), i = rt(t, e, u, o), M = ct(t, e, u), b = ut(t, e, n, i, o, a), k = $(() => ({
|
|
713
714
|
"f-list-view-group": !0,
|
|
714
|
-
"d-flex":
|
|
715
|
-
"flex-wrap":
|
|
716
|
-
})), I = $(() => !!n.value && n.value.length > 0), D = $(() => n.value.length === 0)
|
|
717
|
-
|
|
718
|
-
|
|
715
|
+
"d-flex": c.value,
|
|
716
|
+
"flex-wrap": c.value
|
|
717
|
+
})), I = $(() => !!n.value && n.value.length > 0), D = $(() => n.value.length === 0);
|
|
718
|
+
$(() => D.value && !e.slots.empty);
|
|
719
|
+
function V() {
|
|
720
|
+
return m.value === "SingleView" ? J : m.value === "DraggableView" ? at : (m.value === "ContentView" || m.value === "CardView") && e.slots.content ? st : J;
|
|
719
721
|
}
|
|
720
|
-
const
|
|
721
|
-
renderItem:
|
|
722
|
-
} =
|
|
723
|
-
renderItem:
|
|
724
|
-
} =
|
|
725
|
-
function
|
|
726
|
-
return n.value.filter((
|
|
722
|
+
const T = V(), {
|
|
723
|
+
renderItem: P
|
|
724
|
+
} = T(t, e, n, i, v, o, b, a, M, r), {
|
|
725
|
+
renderItem: O
|
|
726
|
+
} = ot(t, e, n, i, v, o, b, a, M, r), w = [P, O];
|
|
727
|
+
function F() {
|
|
728
|
+
return n.value.filter((C) => C.visible !== !1).map((C, s) => w[C.type](C, s, p));
|
|
727
729
|
}
|
|
728
|
-
function
|
|
730
|
+
function f() {
|
|
729
731
|
return l("div", {
|
|
730
732
|
class: "f-list-view-emptydata"
|
|
731
733
|
}, [l("p", {
|
|
732
734
|
class: "f-empty-title"
|
|
733
|
-
}, [d.value])]);
|
|
735
|
+
}, [e.slots.empty ? e.slots.empty() : d.value])]);
|
|
734
736
|
}
|
|
735
|
-
function
|
|
737
|
+
function y() {
|
|
736
738
|
return l("ul", {
|
|
737
|
-
class:
|
|
739
|
+
class: k.value,
|
|
738
740
|
style: "list-style: none;"
|
|
739
|
-
}, [I.value &&
|
|
741
|
+
}, [I.value && F(), D.value && f()]);
|
|
740
742
|
}
|
|
741
743
|
return {
|
|
742
|
-
renderListArea:
|
|
744
|
+
renderListArea: y
|
|
743
745
|
};
|
|
744
746
|
}
|
|
745
|
-
function
|
|
747
|
+
function dt(t, e, n) {
|
|
746
748
|
function u() {
|
|
747
749
|
return e.slots.header && l("div", {
|
|
748
750
|
class: "f-list-view-header"
|
|
@@ -752,27 +754,27 @@ function ft(t, e, n) {
|
|
|
752
754
|
renderHeader: u
|
|
753
755
|
};
|
|
754
756
|
}
|
|
755
|
-
function
|
|
756
|
-
const u =
|
|
757
|
-
function
|
|
757
|
+
function X(t, e, n) {
|
|
758
|
+
const u = h(t.headerClass), v = h(t.placeholder), a = h(""), r = $(() => !a.value), m = $(() => !!a.value);
|
|
759
|
+
function c(i) {
|
|
758
760
|
a.value = "";
|
|
759
761
|
}
|
|
760
|
-
|
|
761
|
-
t.enableHighlightSearch && n.search(
|
|
762
|
+
Q(a, (i) => {
|
|
763
|
+
t.enableHighlightSearch && n.search(i), e.emit("afterSearch", i);
|
|
762
764
|
});
|
|
763
765
|
const p = $(() => {
|
|
764
|
-
const
|
|
766
|
+
const i = {
|
|
765
767
|
"form-group": !0,
|
|
766
768
|
"farris-form-group": !0
|
|
767
769
|
};
|
|
768
|
-
return u.value && u.value.split(" ").reduce((
|
|
770
|
+
return u.value && u.value.split(" ").reduce((b, k) => (b[k] = !0, b), i), i;
|
|
769
771
|
});
|
|
770
|
-
function d(
|
|
772
|
+
function d(i) {
|
|
771
773
|
}
|
|
772
774
|
function o() {
|
|
773
775
|
return l("div", {
|
|
774
776
|
class: "f-list-view-header",
|
|
775
|
-
onClick:
|
|
777
|
+
onClick: ne(() => d, ["prevent", "stop"])
|
|
776
778
|
}, [l("div", {
|
|
777
779
|
class: p.value
|
|
778
780
|
}, [l("div", {
|
|
@@ -781,21 +783,21 @@ function J(t, e, n) {
|
|
|
781
783
|
class: "f-cmp-inputgroup"
|
|
782
784
|
}, [l("div", {
|
|
783
785
|
class: "input-group f-state-editable"
|
|
784
|
-
}, [
|
|
786
|
+
}, [le(l("input", {
|
|
785
787
|
class: "form-control f-utils-fill text-left",
|
|
786
|
-
"onUpdate:modelValue": (
|
|
788
|
+
"onUpdate:modelValue": (i) => a.value = i,
|
|
787
789
|
name: "input-group-value",
|
|
788
790
|
type: "text",
|
|
789
791
|
placeholder: v.value,
|
|
790
792
|
autocomplete: "off"
|
|
791
|
-
}, null), [[
|
|
793
|
+
}, null), [[se, a.value]]), l("div", {
|
|
792
794
|
class: "input-group-append"
|
|
793
795
|
}, [m.value && l("span", {
|
|
794
796
|
class: "input-group-text input-group-clear",
|
|
795
|
-
onClick: (
|
|
797
|
+
onClick: (i) => c()
|
|
796
798
|
}, [l("i", {
|
|
797
799
|
class: "f-icon f-icon-close-circle"
|
|
798
|
-
}, null)]),
|
|
800
|
+
}, null)]), r.value && l("span", {
|
|
799
801
|
class: "input-group-text"
|
|
800
802
|
}, [l("span", {
|
|
801
803
|
class: "f-icon f-icon-search"
|
|
@@ -807,13 +809,13 @@ function J(t, e, n) {
|
|
|
807
809
|
}
|
|
808
810
|
const E = /* @__PURE__ */ G({
|
|
809
811
|
name: "FListView",
|
|
810
|
-
props:
|
|
812
|
+
props: te,
|
|
811
813
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
812
814
|
setup(t, e) {
|
|
813
|
-
const n =
|
|
815
|
+
const n = h(), u = h(!0), v = h(!1), a = h([]), r = 0, m = h(t.columns), c = re(t), p = ce(t), d = ue(t, c), o = fe(t), i = de(t, /* @__PURE__ */ new Map(), p, c, o), M = pe(t, i, c, a, e), b = lt(t, n), k = $(() => i.dataView.value.length), I = ve(t, e, c), D = ge(), V = he(t, {}, D), T = me(t, I, p, c, D, V), P = ye(t, c, V, T), O = we(t, c, V, T), w = Ce(t, m, i, k, r, T, P, O), {
|
|
814
816
|
getVisualData: F
|
|
815
817
|
} = w;
|
|
816
|
-
a.value = F(0,
|
|
818
|
+
a.value = F(0, k.value + r - 1);
|
|
817
819
|
const f = $(() => {
|
|
818
820
|
const L = {
|
|
819
821
|
"f-list-view": !0,
|
|
@@ -821,19 +823,19 @@ const E = /* @__PURE__ */ G({
|
|
|
821
823
|
};
|
|
822
824
|
return t.size !== "default" && (L[`${t.size}-item`] = !0), L;
|
|
823
825
|
}), y = $(() => !!e.slots.footer || u.value);
|
|
824
|
-
function
|
|
825
|
-
return t.header === "SearchBar" ?
|
|
826
|
+
function C() {
|
|
827
|
+
return t.header === "SearchBar" ? X : t.header === "ContentHeader" ? dt : X;
|
|
826
828
|
}
|
|
827
|
-
const s =
|
|
828
|
-
renderHeader:
|
|
829
|
-
} = s(t, e,
|
|
830
|
-
renderListArea:
|
|
831
|
-
} =
|
|
829
|
+
const s = C(), {
|
|
830
|
+
renderHeader: S
|
|
831
|
+
} = s(t, e, b), {
|
|
832
|
+
renderListArea: g
|
|
833
|
+
} = ft(t, e, a, i, d, M, w);
|
|
832
834
|
function j(L) {
|
|
833
|
-
|
|
835
|
+
b.search(L);
|
|
834
836
|
}
|
|
835
837
|
function A(L) {
|
|
836
|
-
L && (
|
|
838
|
+
L && (i.load(L), a.value = F(0, k.value + r - 1));
|
|
837
839
|
}
|
|
838
840
|
e.expose({
|
|
839
841
|
search: j,
|
|
@@ -845,7 +847,7 @@ const E = /* @__PURE__ */ G({
|
|
|
845
847
|
return () => l("div", {
|
|
846
848
|
class: f.value,
|
|
847
849
|
onClick: R
|
|
848
|
-
}, [
|
|
850
|
+
}, [S(), l("div", {
|
|
849
851
|
ref: n,
|
|
850
852
|
class: "f-list-view-content",
|
|
851
853
|
onMouseover: () => {
|
|
@@ -854,7 +856,7 @@ const E = /* @__PURE__ */ G({
|
|
|
854
856
|
onMouseleave: () => {
|
|
855
857
|
v.value = !1;
|
|
856
858
|
}
|
|
857
|
-
}, [
|
|
859
|
+
}, [g()]), y.value && l("div", {
|
|
858
860
|
class: "f-list-view-footer"
|
|
859
861
|
}, [e.slots.footer && e.slots.footer()])]);
|
|
860
862
|
}
|
|
@@ -863,20 +865,20 @@ const E = /* @__PURE__ */ G({
|
|
|
863
865
|
props: U,
|
|
864
866
|
emits: ["change", "activeChange"],
|
|
865
867
|
setup(t, e) {
|
|
866
|
-
const n =
|
|
867
|
-
function
|
|
868
|
-
const y = /* @__PURE__ */ new Map(),
|
|
869
|
-
|
|
868
|
+
const n = h(t.identifyField), u = h("已选:"), v = h("项数据"), a = h(t.displayType), r = h(!1), m = h(t.dataSource), c = h(t.selections || []), p = $(() => c.value.map((y) => y[n.value])), d = /* @__PURE__ */ new Map(), o = h();
|
|
869
|
+
function i() {
|
|
870
|
+
const y = /* @__PURE__ */ new Map(), C = t.selectionValues || [];
|
|
871
|
+
C.length && C.reduce((S, g) => (S.set(g, !0), S), y);
|
|
870
872
|
const s = t.selections || [];
|
|
871
|
-
s.length && (y.clear(), s.reduce((
|
|
872
|
-
const
|
|
873
|
-
|
|
873
|
+
s.length && (y.clear(), s.reduce((S, g) => (S.set(g[n.value], !0), S), y)), c.value.length || (c.value = m.value.filter((S) => y.has(S[n.value])).map((S) => Object.assign({}, S))), m.value.forEach((S) => {
|
|
874
|
+
const g = S[n.value], j = y.has(g);
|
|
875
|
+
S.checked = j, j && d.set(g, S);
|
|
874
876
|
});
|
|
875
877
|
}
|
|
876
|
-
|
|
877
|
-
const
|
|
878
|
-
function
|
|
879
|
-
|
|
878
|
+
i();
|
|
879
|
+
const M = $(() => a.value === "List"), b = $(() => a.value === "Tree");
|
|
880
|
+
function k(y) {
|
|
881
|
+
c.value = y.map((C) => Object.assign({}, C)), e.emit("change", c.value);
|
|
880
882
|
}
|
|
881
883
|
function I() {
|
|
882
884
|
return l(E, {
|
|
@@ -895,7 +897,7 @@ const E = /* @__PURE__ */ G({
|
|
|
895
897
|
header: "Search",
|
|
896
898
|
headerClass: "transfer-search-box",
|
|
897
899
|
"selection-values": p.value,
|
|
898
|
-
onSelectionChange:
|
|
900
|
+
onSelectionChange: k
|
|
899
901
|
}, {
|
|
900
902
|
default: () => [_(" ")]
|
|
901
903
|
});
|
|
@@ -903,44 +905,44 @@ const E = /* @__PURE__ */ G({
|
|
|
903
905
|
function D() {
|
|
904
906
|
return l(B, null, null);
|
|
905
907
|
}
|
|
906
|
-
function
|
|
908
|
+
function V() {
|
|
907
909
|
return l("div", {
|
|
908
910
|
class: "f-utils-fill option-pane d-flex flex-column"
|
|
909
911
|
}, [l("div", {
|
|
910
912
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
911
913
|
}, [l("div", {
|
|
912
914
|
class: "container columns-box d-flex f-utils-fill"
|
|
913
|
-
}, [
|
|
915
|
+
}, [M.value && I(), b.value && D()])])]);
|
|
914
916
|
}
|
|
915
|
-
function
|
|
916
|
-
const
|
|
917
|
-
if (
|
|
918
|
-
|
|
919
|
-
const s = d.get(
|
|
920
|
-
s && (s.checked = !1, d.delete(
|
|
917
|
+
function T(y) {
|
|
918
|
+
const C = y[n.value];
|
|
919
|
+
if (C !== null || C !== void 0) {
|
|
920
|
+
c.value = c.value.filter((S) => S[n.value] !== C);
|
|
921
|
+
const s = d.get(C);
|
|
922
|
+
s && (s.checked = !1, d.delete(C)), e.emit("change", c.value);
|
|
921
923
|
}
|
|
922
924
|
}
|
|
923
|
-
|
|
925
|
+
Q(c, (y) => {
|
|
924
926
|
o.value.updateDataSource(y);
|
|
925
927
|
});
|
|
926
928
|
function P(y) {
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
+
const C = /* @__PURE__ */ new Map();
|
|
930
|
+
c.value.reduce((s, S) => (s.set(S[n.value], S), s), C), c.value = y.map((s) => C.get(s[n.value])), e.emit("change", c.value);
|
|
929
931
|
}
|
|
930
|
-
function
|
|
932
|
+
function O(y) {
|
|
931
933
|
e.emit("activeChange", y);
|
|
932
934
|
}
|
|
933
935
|
function w() {
|
|
934
936
|
return l(E, {
|
|
935
937
|
ref: o,
|
|
936
938
|
style: "flex:1",
|
|
937
|
-
data:
|
|
939
|
+
data: c.value,
|
|
938
940
|
draggable: !0,
|
|
939
941
|
view: "DraggableView",
|
|
940
942
|
"keep-order": !0,
|
|
941
943
|
onChange: P,
|
|
942
|
-
onRemoveItem:
|
|
943
|
-
onActiveChange:
|
|
944
|
+
onRemoveItem: T,
|
|
945
|
+
onActiveChange: O
|
|
944
946
|
}, null);
|
|
945
947
|
}
|
|
946
948
|
function F() {
|
|
@@ -954,7 +956,7 @@ const E = /* @__PURE__ */ G({
|
|
|
954
956
|
class: "selection-title"
|
|
955
957
|
}, [u.value]), l("span", {
|
|
956
958
|
class: "selection-count"
|
|
957
|
-
}, [
|
|
959
|
+
}, [c.value && c.value.length]), l("span", {
|
|
958
960
|
class: "selection-item-title"
|
|
959
961
|
}, [v.value])]), l("div", {
|
|
960
962
|
class: "container columns-box f-utils-fill d-flex"
|
|
@@ -963,23 +965,23 @@ const E = /* @__PURE__ */ G({
|
|
|
963
965
|
const f = $(() => ({
|
|
964
966
|
transfer: !0,
|
|
965
967
|
row: !0,
|
|
966
|
-
"f-utils-fill":
|
|
968
|
+
"f-utils-fill": r.value
|
|
967
969
|
}));
|
|
968
970
|
return () => l("div", {
|
|
969
971
|
class: f.value,
|
|
970
972
|
style: "height:480px"
|
|
971
|
-
}, [
|
|
973
|
+
}, [V(), F()]);
|
|
972
974
|
}
|
|
973
975
|
});
|
|
974
|
-
function
|
|
975
|
-
var
|
|
976
|
+
function pt(t, e, n) {
|
|
977
|
+
var O;
|
|
976
978
|
function u() {
|
|
977
979
|
}
|
|
978
|
-
const v = "", a = "",
|
|
980
|
+
const v = "", a = "", r = h();
|
|
979
981
|
function m() {
|
|
980
982
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
981
983
|
}
|
|
982
|
-
function
|
|
984
|
+
function c() {
|
|
983
985
|
return !1;
|
|
984
986
|
}
|
|
985
987
|
function p() {
|
|
@@ -993,87 +995,87 @@ function dt(t, e, n) {
|
|
|
993
995
|
return null;
|
|
994
996
|
if (w.value.schema && w.value.schema.type === "component")
|
|
995
997
|
return w.value;
|
|
996
|
-
const F =
|
|
998
|
+
const F = h(w == null ? void 0 : w.value.parent), f = o(F);
|
|
997
999
|
return f || null;
|
|
998
1000
|
}
|
|
999
|
-
function
|
|
1001
|
+
function i(w = e) {
|
|
1000
1002
|
const { componentInstance: F, designerItemElementRef: f } = w;
|
|
1001
|
-
return !F || !F.value ? null : F.value.canMove ? f :
|
|
1003
|
+
return !F || !F.value ? null : F.value.canMove ? f : i(w.parent);
|
|
1002
1004
|
}
|
|
1003
|
-
function
|
|
1005
|
+
function M(w) {
|
|
1004
1006
|
return !!n;
|
|
1005
1007
|
}
|
|
1006
|
-
function
|
|
1008
|
+
function b() {
|
|
1007
1009
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
1008
1010
|
}
|
|
1009
|
-
function
|
|
1011
|
+
function k() {
|
|
1010
1012
|
}
|
|
1011
1013
|
function I(w, F) {
|
|
1012
1014
|
}
|
|
1013
1015
|
function D(w, F) {
|
|
1014
1016
|
const { componentType: f } = w;
|
|
1015
1017
|
let y = N(f, w, F);
|
|
1016
|
-
const b = f.toLowerCase().replace("-", "_");
|
|
1017
|
-
return y && !y.id && y.type === f && (y.id = `${b}_${Math.random().toString().slice(2, 6)}`), y;
|
|
1018
|
-
}
|
|
1019
|
-
function M(w, F) {
|
|
1020
|
-
const f = String(w.getAttribute("data-controltype")), y = w.getAttribute("data-feature"), b = y ? JSON.parse(y) : {};
|
|
1021
|
-
b.parentComponentInstance = i.value;
|
|
1022
|
-
let s = N(f, b);
|
|
1023
1018
|
const C = f.toLowerCase().replace("-", "_");
|
|
1024
|
-
return
|
|
1019
|
+
return y && !y.id && y.type === f && (y.id = `${C}_${Math.random().toString().slice(2, 6)}`), y;
|
|
1020
|
+
}
|
|
1021
|
+
function V(w, F) {
|
|
1022
|
+
const f = String(w.getAttribute("data-controltype")), y = w.getAttribute("data-feature"), C = y ? JSON.parse(y) : {};
|
|
1023
|
+
C.parentComponentInstance = r.value;
|
|
1024
|
+
let s = N(f, C);
|
|
1025
|
+
const S = f.toLowerCase().replace("-", "_");
|
|
1026
|
+
return s && !s.id && s.type === f && (s.id = `${S}_${Math.random().toString().slice(2, 6)}`), s;
|
|
1025
1027
|
}
|
|
1026
|
-
function
|
|
1028
|
+
function T(w) {
|
|
1027
1029
|
}
|
|
1028
1030
|
function P(...w) {
|
|
1029
1031
|
}
|
|
1030
|
-
return
|
|
1032
|
+
return r.value = {
|
|
1031
1033
|
canMove: m(),
|
|
1032
|
-
canSelectParent:
|
|
1034
|
+
canSelectParent: c(),
|
|
1033
1035
|
canDelete: p(),
|
|
1034
1036
|
canNested: !d(),
|
|
1035
1037
|
contents: e == null ? void 0 : e.schema.contents,
|
|
1036
1038
|
elementRef: t,
|
|
1037
|
-
parent: (
|
|
1039
|
+
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
1038
1040
|
schema: e == null ? void 0 : e.schema,
|
|
1039
1041
|
styles: v,
|
|
1040
1042
|
designerClass: a,
|
|
1041
|
-
canAccepts:
|
|
1043
|
+
canAccepts: M,
|
|
1042
1044
|
getBelongedComponentInstance: o,
|
|
1043
|
-
getDraggableDesignItemElement:
|
|
1044
|
-
getDraggingDisplayText:
|
|
1045
|
+
getDraggableDesignItemElement: i,
|
|
1046
|
+
getDraggingDisplayText: b,
|
|
1045
1047
|
getPropConfig: P,
|
|
1046
|
-
getDragScopeElement:
|
|
1048
|
+
getDragScopeElement: k,
|
|
1047
1049
|
onAcceptMovedChildElement: I,
|
|
1048
|
-
onAcceptNewChildElement:
|
|
1049
|
-
onChildElementMovedOut:
|
|
1050
|
+
onAcceptNewChildElement: V,
|
|
1051
|
+
onChildElementMovedOut: T,
|
|
1050
1052
|
addNewChildComponentSchema: D,
|
|
1051
1053
|
updateDragAndDropRules: u,
|
|
1052
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1053
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1054
|
-
},
|
|
1054
|
+
triggerBelongedComponentToMoveWhenMoved: h(!1),
|
|
1055
|
+
triggerBelongedComponentToDeleteWhenDeleted: h(!1)
|
|
1056
|
+
}, r;
|
|
1055
1057
|
}
|
|
1056
|
-
const
|
|
1058
|
+
const vt = /* @__PURE__ */ G({
|
|
1057
1059
|
name: "FTransferDesign",
|
|
1058
1060
|
props: U,
|
|
1059
1061
|
emits: ["change"],
|
|
1060
1062
|
setup(t, e) {
|
|
1061
|
-
const n =
|
|
1063
|
+
const n = h(t.identifyField), u = h("已选:"), v = h("项数据"), a = h(t.displayType), r = h(!1), m = h(t.dataSource), c = h(t.selections || []), p = $(() => c.value.map((C) => C[n.value])), d = /* @__PURE__ */ new Map();
|
|
1062
1064
|
function o() {
|
|
1063
|
-
const
|
|
1064
|
-
s.length && s.reduce((
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1067
|
-
const j =
|
|
1068
|
-
|
|
1065
|
+
const C = /* @__PURE__ */ new Map(), s = t.selectionValues || [];
|
|
1066
|
+
s.length && s.reduce((g, j) => (g.set(j, !0), g), C);
|
|
1067
|
+
const S = t.selections || [];
|
|
1068
|
+
S.length && (C.clear(), S.reduce((g, j) => (g.set(j[n.value], !0), g), C)), c.value.length || (c.value = m.value.filter((g) => C.has(g[n.value])).map((g) => Object.assign({}, g))), m.value.forEach((g) => {
|
|
1069
|
+
const j = g[n.value], A = C.has(j);
|
|
1070
|
+
g.checked = A, A && d.set(j, g);
|
|
1069
1071
|
});
|
|
1070
1072
|
}
|
|
1071
1073
|
o();
|
|
1072
|
-
const
|
|
1073
|
-
function
|
|
1074
|
-
|
|
1074
|
+
const i = $(() => a.value === "List"), M = $(() => a.value === "Tree");
|
|
1075
|
+
function b(C) {
|
|
1076
|
+
c.value = C.map((s) => Object.assign({}, s)), e.emit("change", c.value);
|
|
1075
1077
|
}
|
|
1076
|
-
function
|
|
1078
|
+
function k() {
|
|
1077
1079
|
return l(E, {
|
|
1078
1080
|
class: "f-utils-fill",
|
|
1079
1081
|
data: m.value,
|
|
@@ -1082,7 +1084,7 @@ const pt = /* @__PURE__ */ G({
|
|
|
1082
1084
|
header: "Search",
|
|
1083
1085
|
headerClass: "transfer-search-box",
|
|
1084
1086
|
"selection-values": p.value,
|
|
1085
|
-
onSelectionChange:
|
|
1087
|
+
onSelectionChange: b
|
|
1086
1088
|
}, {
|
|
1087
1089
|
default: () => [_(" ")]
|
|
1088
1090
|
});
|
|
@@ -1097,34 +1099,34 @@ const pt = /* @__PURE__ */ G({
|
|
|
1097
1099
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
1098
1100
|
}, [l("div", {
|
|
1099
1101
|
class: "container columns-box d-flex f-utils-fill"
|
|
1100
|
-
}, [
|
|
1102
|
+
}, [i.value && k(), M.value && I()])])]);
|
|
1101
1103
|
}
|
|
1102
|
-
function
|
|
1103
|
-
const s =
|
|
1104
|
+
function V(C) {
|
|
1105
|
+
const s = C[n.value];
|
|
1104
1106
|
if (s !== null || s !== void 0) {
|
|
1105
|
-
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1107
|
+
c.value = c.value.filter((g) => g[n.value] !== s);
|
|
1108
|
+
const S = d.get(s);
|
|
1109
|
+
S && (S.checked = !1, d.delete(s)), e.emit("change", c.value);
|
|
1108
1110
|
}
|
|
1109
1111
|
}
|
|
1110
|
-
function
|
|
1112
|
+
function T(C) {
|
|
1111
1113
|
const s = /* @__PURE__ */ new Map();
|
|
1112
|
-
|
|
1114
|
+
c.value.reduce((S, g) => (S.set(g[n.value], g), S), s), c.value = C.map((S) => s.get(S[n.value])), e.emit("change", c.value);
|
|
1113
1115
|
}
|
|
1114
1116
|
function P() {
|
|
1115
1117
|
return l(E, {
|
|
1116
1118
|
style: "flex:1",
|
|
1117
|
-
data:
|
|
1119
|
+
data: c.value,
|
|
1118
1120
|
draggable: !0,
|
|
1119
1121
|
view: "DraggableView",
|
|
1120
1122
|
"keep-order": !0,
|
|
1121
|
-
onChange:
|
|
1122
|
-
onRemoveItem:
|
|
1123
|
+
onChange: T,
|
|
1124
|
+
onRemoveItem: V
|
|
1123
1125
|
}, {
|
|
1124
1126
|
default: () => [_(" ")]
|
|
1125
1127
|
});
|
|
1126
1128
|
}
|
|
1127
|
-
function
|
|
1129
|
+
function O() {
|
|
1128
1130
|
return l("div", {
|
|
1129
1131
|
class: "f-utils-fill selection-pane d-flex flex-column"
|
|
1130
1132
|
}, [l("div", {
|
|
@@ -1135,7 +1137,7 @@ const pt = /* @__PURE__ */ G({
|
|
|
1135
1137
|
class: "selection-title"
|
|
1136
1138
|
}, [u.value]), l("span", {
|
|
1137
1139
|
class: "selection-count"
|
|
1138
|
-
}, [
|
|
1140
|
+
}, [c.value && c.value.length]), l("span", {
|
|
1139
1141
|
class: "selection-item-title"
|
|
1140
1142
|
}, [v.value])]), l("div", {
|
|
1141
1143
|
class: "container columns-box f-utils-fill d-flex"
|
|
@@ -1144,32 +1146,32 @@ const pt = /* @__PURE__ */ G({
|
|
|
1144
1146
|
const w = $(() => ({
|
|
1145
1147
|
transfer: !0,
|
|
1146
1148
|
row: !0,
|
|
1147
|
-
"f-utils-fill":
|
|
1148
|
-
})), F =
|
|
1149
|
-
return
|
|
1149
|
+
"f-utils-fill": r.value
|
|
1150
|
+
})), F = h(), f = ae("design-item-context"), y = pt(F, f);
|
|
1151
|
+
return oe(() => {
|
|
1150
1152
|
F.value.componentInstance = y;
|
|
1151
1153
|
}), e.expose(y.value), () => l("div", {
|
|
1152
1154
|
ref: F,
|
|
1153
1155
|
class: w.value,
|
|
1154
1156
|
style: "height:480px"
|
|
1155
|
-
}, [D(),
|
|
1157
|
+
}, [D(), O()]);
|
|
1156
1158
|
}
|
|
1157
|
-
}),
|
|
1159
|
+
}), gt = (t) => {
|
|
1158
1160
|
const e = t;
|
|
1159
1161
|
return e.install = function(n) {
|
|
1160
1162
|
n.component(e.name, t);
|
|
1161
1163
|
}, t;
|
|
1162
1164
|
};
|
|
1163
1165
|
H.register = (t, e, n) => {
|
|
1164
|
-
t.transfer = H, e.transfer =
|
|
1166
|
+
t.transfer = H, e.transfer = ee;
|
|
1165
1167
|
};
|
|
1166
1168
|
H.registerDesigner = (t, e, n) => {
|
|
1167
|
-
t.transfer =
|
|
1169
|
+
t.transfer = vt, e.transfer = ee;
|
|
1168
1170
|
};
|
|
1169
|
-
const
|
|
1171
|
+
const Ct = gt(H);
|
|
1170
1172
|
export {
|
|
1171
1173
|
H as FTransfer,
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
+
Ct as default,
|
|
1175
|
+
ee as propsResolver,
|
|
1174
1176
|
U as transferProps
|
|
1175
1177
|
};
|