@farris/ui-vue 1.6.5-beta.7 → 1.6.5-beta.8
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 +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +28 -29
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +521 -517
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +163 -157
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +10 -10
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1122 -1121
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +190 -190
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2693 -2693
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +8 -8
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +8 -8
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1470 -1460
- package/components/expression-editor/index.umd.cjs +3 -3
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +853 -843
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +922 -911
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +12 -12
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +104 -108
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1311 -1307
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +7 -7
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +9 -9
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +326 -326
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +168 -167
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +739 -737
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +1 -1
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +565 -565
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +409 -409
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1488 -1478
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1765 -1762
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/search-box/index.esm.js +114 -114
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1184 -1181
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +927 -916
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +76 -72
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1527 -1524
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +361 -361
- package/components/textarea/index.umd.cjs +2 -2
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +130 -134
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +25 -25
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +1746 -1743
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +8 -8
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/farris.all.esm.js +16987 -17002
- package/farris.all.umd.cjs +27 -27
- package/package.json +1 -1
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
- package/components/time-picker/index.css +0 -1
- package/components/time-picker/index.esm.js +0 -9793
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/time-picker/package.json +0 -8
- package/components/time-picker/style.js +0 -6
- package/designer/button-edit/index.css +0 -1
- package/designer/button-edit/index.esm.js +0 -4856
- package/designer/button-edit/index.umd.cjs +0 -1
- package/designer/checkbox/index.esm.js +0 -250
- package/designer/checkbox/index.umd.cjs +0 -1
- package/designer/checkbox-group/index.esm.js +0 -377
- package/designer/checkbox-group/index.umd.cjs +0 -1
- package/designer/data-grid/index.css +0 -1
- package/designer/data-grid/index.esm.js +0 -15413
- package/designer/data-grid/index.umd.cjs +0 -23
- package/designer/data-view/index.esm.js +0 -854
- package/designer/data-view/index.umd.cjs +0 -38
- package/designer/drawer/index.css +0 -1
- package/designer/drawer/index.esm.js +0 -525
- package/designer/drawer/index.umd.cjs +0 -1
- package/designer/farris-designer.all.esm.js +0 -22320
- package/designer/farris-designer.all.umd.cjs +0 -34
- package/designer/index.css +0 -1
- package/designer/input-group/index.esm.js +0 -1098
- package/designer/input-group/index.umd.cjs +0 -1
- package/designer/list-view/index.css +0 -1
- package/designer/list-view/index.esm.js +0 -4675
- package/designer/list-view/index.umd.cjs +0 -40
- package/designer/radio-group/index.css +0 -1
- package/designer/radio-group/index.esm.js +0 -6980
- package/designer/radio-group/index.umd.cjs +0 -1
- package/designer/tree-grid/index.esm.js +0 -1099
- package/designer/tree-grid/index.umd.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ref as F, computed as L, createVNode as C, Fragment as U, watch as G, withModifiers as Ne, withDirectives as Ge, vModelText as _e, defineComponent as q, onMounted as le, inject as ie } from "vue";
|
|
2
|
+
import { cloneDeep as de, isPlainObject as fe, isUndefined as ze } from "lodash-es";
|
|
3
|
+
import { getCustomClass as re, getCustomStyle as me, FormSchemaEntityFieldType$Type as qe, withInstall as We } from "../common/index.esm.js";
|
|
4
4
|
import { useFilter as Ue, useIdentify as Xe, useHierarchy as Ye, useGroupData as Je, useDataView as Qe, useSelection as Ze, usePagination as Ke, useRow as et, useEdit as tt, useVisualDataBound as nt, useVisualDataCell as ot, useVisualDataRow as it, useVisualGroupRow as rt, useVisualSummaryRow as lt, useVisualData as at, useSidebar as st, useColumn as ct, useVirtualScroll as ut, getPagination as dt } from "../data-view/index.esm.js";
|
|
5
5
|
import { useI18n as ae } from "vue-i18n";
|
|
6
6
|
import { FCheckbox as se } from "../checkbox/index.esm.js";
|
|
@@ -13,134 +13,134 @@ import { InputBaseProperty as bt } from "../property-panel/index.esm.js";
|
|
|
13
13
|
function ye(e, t) {
|
|
14
14
|
let n;
|
|
15
15
|
function i(r) {
|
|
16
|
-
const { properties: o, title:
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
|
|
16
|
+
const { properties: o, title: c, ignore: a } = r, l = a && Array.isArray(a), s = Object.keys(o).reduce((h, u) => ((!l || !a.find((g) => g === u)) && (h[u] = o[u].type === "object" && o[u].properties ? i(o[u]) : de(o[u].default)), h), {});
|
|
17
|
+
if (c && (!l || !a.find((h) => h === "id"))) {
|
|
18
|
+
const h = c.toLowerCase().replace(/-/g, "_");
|
|
19
|
+
s.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return s;
|
|
22
22
|
}
|
|
23
23
|
function m(r) {
|
|
24
|
-
const { properties: o, title:
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
|
|
24
|
+
const { properties: o, title: c, required: a } = r;
|
|
25
|
+
if (a && Array.isArray(a)) {
|
|
26
|
+
const l = a.reduce((s, h) => (s[h] = o[h].type === "object" && o[h].properties ? i(o[h]) : de(o[h].default), s), {});
|
|
27
|
+
if (c && a.find((s) => s === "id")) {
|
|
28
|
+
const s = c.toLowerCase().replace(/-/g, "_");
|
|
29
|
+
l.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return l;
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
|
-
type:
|
|
34
|
+
type: c
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function v(r, o = {},
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
let
|
|
41
|
-
const
|
|
42
|
-
return
|
|
37
|
+
function v(r, o = {}, c) {
|
|
38
|
+
const a = e[r];
|
|
39
|
+
if (a) {
|
|
40
|
+
let l = m(a);
|
|
41
|
+
const s = t[r];
|
|
42
|
+
return l = s ? s({ getSchemaByType: v }, l, o, c) : l, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(l), l;
|
|
43
43
|
}
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
function f(r, o) {
|
|
47
|
-
const
|
|
48
|
-
return Object.keys(
|
|
49
|
-
}
|
|
50
|
-
function
|
|
51
|
-
return Object.keys(r).filter((
|
|
52
|
-
if (o.has(
|
|
53
|
-
const
|
|
54
|
-
if (typeof
|
|
55
|
-
|
|
47
|
+
const c = i(o);
|
|
48
|
+
return Object.keys(c).reduce((a, l) => (Object.prototype.hasOwnProperty.call(r, l) && (a[l] && fe(a[l]) && fe(r[l] || !r[l]) ? Object.assign(a[l], r[l] || {}) : a[l] = r[l]), a), c), c;
|
|
49
|
+
}
|
|
50
|
+
function b(r, o) {
|
|
51
|
+
return Object.keys(r).filter((a) => r[a] != null).reduce((a, l) => {
|
|
52
|
+
if (o.has(l)) {
|
|
53
|
+
const s = o.get(l);
|
|
54
|
+
if (typeof s == "string")
|
|
55
|
+
a[s] = r[l];
|
|
56
56
|
else {
|
|
57
|
-
const
|
|
58
|
-
Object.assign(
|
|
57
|
+
const h = s(l, r[l], r);
|
|
58
|
+
Object.assign(a, h);
|
|
59
59
|
}
|
|
60
60
|
} else
|
|
61
|
-
l
|
|
62
|
-
return
|
|
61
|
+
a[l] = r[l];
|
|
62
|
+
return a;
|
|
63
63
|
}, {});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
return
|
|
65
|
+
function k(r, o, c = /* @__PURE__ */ new Map()) {
|
|
66
|
+
const a = f(r, o);
|
|
67
|
+
return b(a, c);
|
|
68
68
|
}
|
|
69
69
|
function p(r) {
|
|
70
|
-
var
|
|
70
|
+
var c;
|
|
71
71
|
const o = r.type;
|
|
72
72
|
if (o) {
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
73
|
+
const a = e[o];
|
|
74
|
+
if (!a)
|
|
75
75
|
return r;
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
const
|
|
79
|
-
|
|
76
|
+
const l = f(r, a), s = ((c = r.editor) == null ? void 0 : c.type) || "";
|
|
77
|
+
if (s) {
|
|
78
|
+
const h = e[s], u = f(r.editor, h);
|
|
79
|
+
l.editor = u;
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return l;
|
|
82
82
|
}
|
|
83
83
|
return r;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function y(r) {
|
|
86
86
|
n = r;
|
|
87
87
|
}
|
|
88
|
-
return { getSchemaByType: v, resolveSchemaWithDefaultValue: p, resolveSchemaToProps:
|
|
88
|
+
return { getSchemaByType: v, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: k, mappingSchemaToProps: b, setDesignerContext: y };
|
|
89
89
|
}
|
|
90
|
-
const be = {}, Se = {}, { resolveSchemaWithDefaultValue: St, resolveSchemaToProps: Ct, mappingSchemaToProps: wt } = ye(be, Se);
|
|
90
|
+
const be = {}, Se = {}, { getSchemaByType: ro, resolveSchemaWithDefaultValue: St, resolveSchemaToProps: Ct, mappingSchemaToProps: wt, setDesignerContext: lo } = ye(be, Se);
|
|
91
91
|
function Ft(e = {}) {
|
|
92
|
-
function t(p,
|
|
92
|
+
function t(p, y, r, o) {
|
|
93
93
|
if (typeof r == "number")
|
|
94
94
|
return o[p].length === r;
|
|
95
95
|
if (typeof r == "object") {
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
return Number(o[p].length) !== Number(
|
|
99
|
-
if (
|
|
100
|
-
return Number(o[p].length) >= Number(
|
|
101
|
-
if (
|
|
102
|
-
return Number(o[p].length) <= Number(
|
|
96
|
+
const c = Object.keys(r)[0], a = r[c];
|
|
97
|
+
if (c === "not")
|
|
98
|
+
return Number(o[p].length) !== Number(a);
|
|
99
|
+
if (c === "moreThan")
|
|
100
|
+
return Number(o[p].length) >= Number(a);
|
|
101
|
+
if (c === "lessThan")
|
|
102
|
+
return Number(o[p].length) <= Number(a);
|
|
103
103
|
}
|
|
104
104
|
return !1;
|
|
105
105
|
}
|
|
106
|
-
function n(p,
|
|
106
|
+
function n(p, y, r, o) {
|
|
107
107
|
return o[p] && o[p].propertyValue && String(o[p].propertyValue.value) === String(r);
|
|
108
108
|
}
|
|
109
109
|
const i = /* @__PURE__ */ new Map([
|
|
110
110
|
["length", t],
|
|
111
111
|
["getProperty", n]
|
|
112
112
|
]);
|
|
113
|
-
Object.keys(e).reduce((p,
|
|
114
|
-
function m(p,
|
|
113
|
+
Object.keys(e).reduce((p, y) => (p.set(y, e[y]), p), i);
|
|
114
|
+
function m(p, y) {
|
|
115
115
|
const r = p;
|
|
116
|
-
return typeof
|
|
116
|
+
return typeof y == "number" ? [{ target: r, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: r, operator: "getProperty", param: p, value: !!y }] : typeof y == "object" ? Object.keys(y).map((o) => {
|
|
117
117
|
if (o === "length")
|
|
118
|
-
return { target: r, operator: "length", param: null, value:
|
|
119
|
-
const
|
|
120
|
-
return { target: r, operator: "getProperty", param:
|
|
118
|
+
return { target: r, operator: "length", param: null, value: y[o] };
|
|
119
|
+
const c = o, a = y[o];
|
|
120
|
+
return { target: r, operator: "getProperty", param: c, value: a };
|
|
121
121
|
}) : [];
|
|
122
122
|
}
|
|
123
123
|
function v(p) {
|
|
124
124
|
return Object.keys(p).reduce((r, o) => {
|
|
125
|
-
const
|
|
126
|
-
return r.push(...
|
|
125
|
+
const c = m(o, p[o]);
|
|
126
|
+
return r.push(...c), r;
|
|
127
127
|
}, []);
|
|
128
128
|
}
|
|
129
|
-
function f(p,
|
|
129
|
+
function f(p, y) {
|
|
130
130
|
if (i.has(p.operator)) {
|
|
131
131
|
const r = i.get(p.operator);
|
|
132
|
-
return r && r(p.target, p.param, p.value,
|
|
132
|
+
return r && r(p.target, p.param, p.value, y) || !1;
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return v(p).reduce((
|
|
136
|
+
function b(p, y) {
|
|
137
|
+
return v(p).reduce((c, a) => c && f(a, y), !0);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
const r = Object.keys(p), o = r.includes("allOf"),
|
|
141
|
-
return o ? !
|
|
139
|
+
function k(p, y) {
|
|
140
|
+
const r = Object.keys(p), o = r.includes("allOf"), c = r.includes("anyOf"), a = o || c, h = (a ? p[a ? o ? "allOf" : "anyOf" : "allOf"] : [p]).map((g) => b(g, y));
|
|
141
|
+
return o ? !h.includes(!1) : h.includes(!0);
|
|
142
142
|
}
|
|
143
|
-
return { parseValueSchema:
|
|
143
|
+
return { parseValueSchema: k };
|
|
144
144
|
}
|
|
145
145
|
const Tt = {
|
|
146
146
|
convertTo: (e, t, n, i) => {
|
|
@@ -212,7 +212,7 @@ const Tt = {
|
|
|
212
212
|
e[t] = e[t];
|
|
213
213
|
},
|
|
214
214
|
convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
|
|
215
|
-
},
|
|
215
|
+
}, Bt = {
|
|
216
216
|
convertTo: (e, t, n, i) => {
|
|
217
217
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
|
|
218
218
|
[t]: n
|
|
@@ -261,7 +261,7 @@ const Tt = {
|
|
|
261
261
|
]));
|
|
262
262
|
},
|
|
263
263
|
convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : ""
|
|
264
|
-
},
|
|
264
|
+
}, Mt = {
|
|
265
265
|
convertTo: (e, t, n, i) => {
|
|
266
266
|
e.column ? e.column[t] = n : e.column = {
|
|
267
267
|
[t]: n
|
|
@@ -312,17 +312,17 @@ const Tt = {
|
|
|
312
312
|
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = i.bindingField, e.binding.field = i.id, e.binding.fullPath = i.path, e.path = i.bindingPath;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
},
|
|
315
|
+
}, Dt = {
|
|
316
316
|
convertTo: (e, t, n, i) => {
|
|
317
317
|
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
318
318
|
},
|
|
319
319
|
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
320
|
-
},
|
|
320
|
+
}, Lt = {
|
|
321
321
|
convertTo: (e, t, n, i) => {
|
|
322
322
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
323
323
|
},
|
|
324
324
|
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
325
|
-
},
|
|
325
|
+
}, $t = {
|
|
326
326
|
convertTo: (e, t, n, i) => {
|
|
327
327
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
328
328
|
},
|
|
@@ -330,7 +330,7 @@ const Tt = {
|
|
|
330
330
|
var i, m;
|
|
331
331
|
return t === "showCheckbox" ? (i = e.selection) != null && i.multiSelect ? !0 : (m = e.selection) == null ? void 0 : m.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
332
332
|
}
|
|
333
|
-
},
|
|
333
|
+
}, At = {
|
|
334
334
|
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
335
335
|
}, xt = {
|
|
336
336
|
convertFrom: (e, t) => e[t] || "",
|
|
@@ -388,19 +388,19 @@ function we(e, t, n) {
|
|
|
388
388
|
["/converter/appearance.converter", Tt],
|
|
389
389
|
["/converter/buttons.converter", kt],
|
|
390
390
|
["/converter/property-editor.converter", Ot],
|
|
391
|
-
["/converter/items-count.converter",
|
|
391
|
+
["/converter/items-count.converter", At],
|
|
392
392
|
["/converter/type.converter", Vt],
|
|
393
393
|
["/converter/change-editor.converter", Pt],
|
|
394
|
-
["/converter/change-formatter.converter",
|
|
394
|
+
["/converter/change-formatter.converter", Bt],
|
|
395
395
|
["/converter/column-command.converter", It],
|
|
396
|
-
["/converter/column-option.converter",
|
|
396
|
+
["/converter/column-option.converter", Mt],
|
|
397
397
|
["/converter/summary.converter", Rt],
|
|
398
398
|
["/converter/group.converter", Et],
|
|
399
399
|
["/converter/form-group-label.converter", xt],
|
|
400
400
|
["/converter/field-selector.converter", jt],
|
|
401
|
-
["/converter/pagination.converter",
|
|
402
|
-
["/converter/row-number.converter",
|
|
403
|
-
["/converter/grid-selection.converter",
|
|
401
|
+
["/converter/pagination.converter", Dt],
|
|
402
|
+
["/converter/row-number.converter", Lt],
|
|
403
|
+
["/converter/grid-selection.converter", $t],
|
|
404
404
|
["/converter/size.converter", Ht],
|
|
405
405
|
["/converter/change-formatter-enum.converter", Nt],
|
|
406
406
|
["/converter/grid-sort.converter", Gt],
|
|
@@ -431,94 +431,94 @@ function we(e, t, n) {
|
|
|
431
431
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
432
432
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
433
433
|
]), v = Ft();
|
|
434
|
-
function f(
|
|
435
|
-
return () => v.parseValueSchema(
|
|
436
|
-
}
|
|
437
|
-
function
|
|
438
|
-
return
|
|
439
|
-
}
|
|
440
|
-
function
|
|
441
|
-
return
|
|
442
|
-
}
|
|
443
|
-
function p(
|
|
444
|
-
const
|
|
445
|
-
return typeof
|
|
446
|
-
}
|
|
447
|
-
function
|
|
448
|
-
return Object.keys(
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
const
|
|
452
|
-
let x = p(d,
|
|
453
|
-
const H =
|
|
434
|
+
function f(a, l) {
|
|
435
|
+
return () => v.parseValueSchema(a, l);
|
|
436
|
+
}
|
|
437
|
+
function b(a, l, s) {
|
|
438
|
+
return a.includes("visible") && l.visible !== void 0 ? typeof l.visible == "boolean" ? () => !!l.visible : l.visible === void 0 ? !0 : f(l.visible, s) : () => !0;
|
|
439
|
+
}
|
|
440
|
+
function k(a, l, s) {
|
|
441
|
+
return a.includes("readonly") && l.readonly !== void 0 ? typeof l.readonly == "boolean" ? () => !!l.readonly : f(l.readonly, s) : () => !1;
|
|
442
|
+
}
|
|
443
|
+
function p(a, l) {
|
|
444
|
+
const s = a.$converter || l;
|
|
445
|
+
return typeof s == "string" && s && i.has(s) ? i.get(s) || null : s || null;
|
|
446
|
+
}
|
|
447
|
+
function y(a, l, s, h, u, g = "", B = "") {
|
|
448
|
+
return Object.keys(a).map((O) => {
|
|
449
|
+
const P = F(1), R = O, d = a[O], M = Object.keys(d), A = d.title, T = d.type, I = m.get(T) || { type: "input-group", enableClear: !1 }, S = d.editor ? Object.assign({}, I, d.editor) : Object.assign({}, I), w = b(M, d, l), V = k(M, d, l);
|
|
450
|
+
S.readonly = S.readonly === void 0 ? V() : S.readonly;
|
|
451
|
+
const j = d.type === "cascade" ? y(d.properties, l, s, h, u, g, B) : [], D = !0;
|
|
452
|
+
let x = p(d, B);
|
|
453
|
+
const H = L({
|
|
454
454
|
get() {
|
|
455
|
-
if (
|
|
456
|
-
if (["class", "style"].find((te) => te ===
|
|
457
|
-
return x.convertFrom(
|
|
458
|
-
const N =
|
|
455
|
+
if (P.value) {
|
|
456
|
+
if (["class", "style"].find((te) => te === R) && !x && (x = i.get("/converter/appearance.converter") || null), x && x.convertFrom)
|
|
457
|
+
return x.convertFrom(s, O, u, g);
|
|
458
|
+
const N = s[O];
|
|
459
459
|
return Object.prototype.hasOwnProperty.call(d, "defaultValue") && (N === void 0 || typeof N == "string" && N === "") ? d.type === "boolean" ? d.defaultValue : d.defaultValue || "" : N;
|
|
460
460
|
}
|
|
461
461
|
return null;
|
|
462
462
|
},
|
|
463
463
|
set(N) {
|
|
464
|
-
|
|
464
|
+
P.value += 1, x && x.convertTo ? (x.convertTo(h, O, N, u, g), x.convertTo(s, O, N, u, g)) : (h[O] = N, s[O] = N);
|
|
465
465
|
}
|
|
466
|
-
}), { refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X } = d, Y = { propertyID:
|
|
467
|
-
return
|
|
466
|
+
}), { refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X } = d, Y = { propertyID: R, propertyName: A, propertyType: T, propertyValue: H, editor: S, visible: w, readonly: V, cascadeConfig: j, hideCascadeTitle: D, refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X };
|
|
467
|
+
return l[R] = Y, Y;
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
function r(
|
|
471
|
-
const
|
|
472
|
-
return
|
|
473
|
-
const
|
|
474
|
-
return { categoryId:
|
|
470
|
+
function r(a, l, s = {}) {
|
|
471
|
+
const h = {}, u = e[a];
|
|
472
|
+
return u && u.categories ? Object.keys(u.categories).map((B) => {
|
|
473
|
+
const E = u.categories[B], O = E == null ? void 0 : E.title, P = y(E.properties || {}, h, {}, s, l);
|
|
474
|
+
return { categoryId: B, categoryName: O, properties: P };
|
|
475
475
|
}) : [];
|
|
476
476
|
}
|
|
477
|
-
function o(
|
|
478
|
-
const g =
|
|
477
|
+
function o(a, l, s, h, u = "") {
|
|
478
|
+
const g = l.$ref.schema, B = l.$ref.converter, E = s[g], O = E.type, P = n(E), R = {}, d = e[O];
|
|
479
479
|
if (d && d.categories) {
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
const M = d.categories[a], A = M == null ? void 0 : M.title;
|
|
481
|
+
B && Object.keys(M.properties).forEach((S) => {
|
|
482
|
+
M.properties[S].$converter = B;
|
|
483
483
|
});
|
|
484
|
-
const
|
|
485
|
-
return { categoryId:
|
|
486
|
-
}
|
|
487
|
-
return { categoryId:
|
|
488
|
-
}
|
|
489
|
-
function
|
|
490
|
-
const g =
|
|
491
|
-
let O =
|
|
492
|
-
if (O && Object.keys(O).length === 0 &&
|
|
493
|
-
const
|
|
494
|
-
return Object.keys(O.categories).map((
|
|
495
|
-
const d = O.categories[
|
|
484
|
+
const T = (M == null ? void 0 : M.properties) || {}, I = y(T, R, P, E, h, u);
|
|
485
|
+
return { categoryId: a, categoryName: A, properties: I };
|
|
486
|
+
}
|
|
487
|
+
return { categoryId: a, categoryName: "", properties: [] };
|
|
488
|
+
}
|
|
489
|
+
function c(a, l, s, h, u) {
|
|
490
|
+
const g = a.type, B = n(a), E = {};
|
|
491
|
+
let O = u || e[g];
|
|
492
|
+
if (O && Object.keys(O).length === 0 && s && s.getPropConfig && (O = s.getPropConfig(h)), O && O.categories) {
|
|
493
|
+
const P = [];
|
|
494
|
+
return Object.keys(O.categories).map((R) => {
|
|
495
|
+
const d = O.categories[R];
|
|
496
496
|
if (d.$ref) {
|
|
497
|
-
|
|
497
|
+
P.push(o(R, d, a, l, h));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
}),
|
|
500
|
+
const M = d == null ? void 0 : d.title, A = d == null ? void 0 : d.tabId, T = d == null ? void 0 : d.tabName, I = d == null ? void 0 : d.hide, S = d == null ? void 0 : d.hideTitle, w = y(d.properties || {}, E, B, a, l, h, d.$converter), { setPropertyRelates: V } = d, j = d == null ? void 0 : d.parentPropertyID;
|
|
501
|
+
P.push({ categoryId: R, categoryName: M, tabId: A, tabName: T, hide: I, properties: w, hideTitle: S, setPropertyRelates: V, parentPropertyID: j });
|
|
502
|
+
}), P;
|
|
503
503
|
}
|
|
504
504
|
return [];
|
|
505
505
|
}
|
|
506
506
|
return {
|
|
507
|
-
getPropertyConfigBySchema:
|
|
507
|
+
getPropertyConfigBySchema: c,
|
|
508
508
|
getPropertyConfigByType: r,
|
|
509
509
|
propertyConverterMap: i
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
const Fe = {}, Te = {};
|
|
513
513
|
we(Fe, Te, St);
|
|
514
|
-
const ke = {}, Oe = {}, { resolveSchemaWithDefaultValue: qt } = ye(ke, Oe), Ve = {}, Pe = {};
|
|
514
|
+
const ke = {}, Oe = {}, { getSchemaByType: ao, resolveSchemaWithDefaultValue: qt, resolveSchemaToProps: so, mappingSchemaToProps: co, setDesignerContext: uo } = ye(ke, Oe), Ve = {}, Pe = {};
|
|
515
515
|
we(Ve, Pe, qt);
|
|
516
|
-
function Wt(e, t, n = /* @__PURE__ */ new Map(), i = (f,
|
|
517
|
-
return be[t.title] = t, Se[t.title] = i, Fe[t.title] = m, Te[t.title] = v, ke[t.title] = t, Oe[t.title] = i, Ve[t.title] = m, Pe[t.title] = v, (f = {},
|
|
518
|
-
if (!
|
|
516
|
+
function Wt(e, t, n = /* @__PURE__ */ new Map(), i = (f, b, k, p) => b, m = {}, v = (f) => f) {
|
|
517
|
+
return be[t.title] = t, Se[t.title] = i, Fe[t.title] = m, Te[t.title] = v, ke[t.title] = t, Oe[t.title] = i, Ve[t.title] = m, Pe[t.title] = v, (f = {}, b = !0) => {
|
|
518
|
+
if (!b)
|
|
519
519
|
return wt(f, n);
|
|
520
|
-
const
|
|
521
|
-
return Object.assign(p,
|
|
520
|
+
const k = Ct(f, t, n), p = Object.keys(e).reduce((y, r) => (y[r] = e[r].default, y), {});
|
|
521
|
+
return Object.assign(p, k);
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
524
|
function Ut(e, t) {
|
|
@@ -796,211 +796,211 @@ const rn = "order", ln = "A Farris Component", an = "object", sn = {
|
|
|
796
796
|
function dn(e, t) {
|
|
797
797
|
function n(v) {
|
|
798
798
|
const f = [];
|
|
799
|
-
let
|
|
800
|
-
for (;
|
|
801
|
-
f.push(
|
|
799
|
+
let b = v.nextNode();
|
|
800
|
+
for (; b; )
|
|
801
|
+
f.push(b), b = v.nextNode();
|
|
802
802
|
return f;
|
|
803
803
|
}
|
|
804
804
|
function i(v, f) {
|
|
805
|
-
const
|
|
806
|
-
return n(
|
|
807
|
-
const
|
|
808
|
-
let
|
|
809
|
-
for (;
|
|
810
|
-
const
|
|
811
|
-
if (
|
|
805
|
+
const b = document.createTreeWalker(v, NodeFilter.SHOW_TEXT);
|
|
806
|
+
return n(b).map((r) => ({ textNode: r, text: (r.textContent || "").toLocaleLowerCase() })).map(({ textNode: r, text: o }) => {
|
|
807
|
+
const c = [];
|
|
808
|
+
let a = 0;
|
|
809
|
+
for (; a < o.length; ) {
|
|
810
|
+
const l = o.indexOf(f, a);
|
|
811
|
+
if (l === -1)
|
|
812
812
|
break;
|
|
813
|
-
|
|
813
|
+
c.push(l), a = l + f.length;
|
|
814
814
|
}
|
|
815
|
-
return
|
|
816
|
-
const
|
|
817
|
-
return
|
|
815
|
+
return c.map((l) => {
|
|
816
|
+
const s = new Range();
|
|
817
|
+
return s.setStart(r, l), s.setEnd(r, l + f.length), s;
|
|
818
818
|
});
|
|
819
819
|
}).flat();
|
|
820
820
|
}
|
|
821
821
|
function m(v) {
|
|
822
822
|
if (!CSS.highlights || (CSS.highlights.clear(), !v || !t))
|
|
823
823
|
return;
|
|
824
|
-
const f = i(t.value, v.toLocaleLowerCase()),
|
|
825
|
-
CSS.highlights.set("search-result",
|
|
824
|
+
const f = i(t.value, v.toLocaleLowerCase()), b = new Highlight(...f);
|
|
825
|
+
CSS.highlights.set("search-result", b);
|
|
826
826
|
}
|
|
827
827
|
return { search: m };
|
|
828
828
|
}
|
|
829
|
-
function pe(e, t, n, i, m, v, f,
|
|
830
|
-
const
|
|
831
|
-
var d,
|
|
832
|
-
return ((d = e.selection) == null ? void 0 : d.multiSelect) && ((
|
|
829
|
+
function pe(e, t, n, i, m, v, f, b, k, p) {
|
|
830
|
+
const y = F(e.size), r = F(e.textField), o = F(e.titleField), c = F(e.disableField), a = L(() => {
|
|
831
|
+
var d, M;
|
|
832
|
+
return ((d = e.selection) == null ? void 0 : d.multiSelect) && ((M = e.selection) == null ? void 0 : M.showCheckbox);
|
|
833
833
|
}), {
|
|
834
|
-
onMouseenterItem:
|
|
835
|
-
onMouseoverItem:
|
|
836
|
-
onMouseoutItem:
|
|
834
|
+
onMouseenterItem: l,
|
|
835
|
+
onMouseoverItem: s,
|
|
836
|
+
onMouseoutItem: h
|
|
837
837
|
} = v, {
|
|
838
|
-
getKey:
|
|
838
|
+
getKey: u,
|
|
839
839
|
listViewItemClass: g,
|
|
840
|
-
listViewItemStyle:
|
|
841
|
-
onCheckItem:
|
|
840
|
+
listViewItemStyle: B,
|
|
841
|
+
onCheckItem: E,
|
|
842
842
|
onClickItem: O
|
|
843
|
-
} = f,
|
|
843
|
+
} = f, P = L(() => {
|
|
844
844
|
const d = {
|
|
845
845
|
"text-overflow": "ellipsis",
|
|
846
846
|
overflow: "hidden",
|
|
847
847
|
"white-space": "nowrap"
|
|
848
848
|
};
|
|
849
849
|
return e.itemClass ? d : {
|
|
850
|
-
margin:
|
|
850
|
+
margin: y.value === "small" ? "0.25rem 0" : "8px 0",
|
|
851
851
|
...d
|
|
852
852
|
};
|
|
853
853
|
});
|
|
854
|
-
function
|
|
855
|
-
return d.checked =
|
|
856
|
-
class: g(d,
|
|
857
|
-
id:
|
|
858
|
-
key:
|
|
859
|
-
style:
|
|
860
|
-
onClick: (
|
|
861
|
-
onMouseenter: (
|
|
862
|
-
onMouseover: (
|
|
863
|
-
onMouseout: (
|
|
864
|
-
}, [
|
|
854
|
+
function R(d, M, A) {
|
|
855
|
+
return d.checked = b.findIndexInSelectedItems(d) > -1, C("li", {
|
|
856
|
+
class: g(d, M),
|
|
857
|
+
id: u(d, M),
|
|
858
|
+
key: u(d, M),
|
|
859
|
+
style: B(d, M),
|
|
860
|
+
onClick: (T) => O(d, M, T),
|
|
861
|
+
onMouseenter: (T) => l(T, d, M),
|
|
862
|
+
onMouseover: (T) => s(T, d, M),
|
|
863
|
+
onMouseout: (T) => h(T, d, M)
|
|
864
|
+
}, [a.value && C("div", {
|
|
865
865
|
class: "f-list-select",
|
|
866
|
-
onClick: (
|
|
866
|
+
onClick: (T) => T.stopPropagation()
|
|
867
867
|
}, [C(se, {
|
|
868
|
-
id: "list-" +
|
|
868
|
+
id: "list-" + u(d, M),
|
|
869
869
|
customClass: "listview-checkbox float-left",
|
|
870
|
-
disabled: d[
|
|
870
|
+
disabled: d[c.value],
|
|
871
871
|
checked: d.checked,
|
|
872
|
-
"onUpdate:checked": (
|
|
873
|
-
onChange: (
|
|
874
|
-
|
|
872
|
+
"onUpdate:checked": (T) => d.checked = T,
|
|
873
|
+
onChange: (T) => {
|
|
874
|
+
E(d, M, !T.checked);
|
|
875
875
|
}
|
|
876
876
|
}, null)]), C("div", {
|
|
877
877
|
class: "f-list-content"
|
|
878
878
|
}, [C("div", {
|
|
879
879
|
class: e.itemContentClass,
|
|
880
|
-
style:
|
|
880
|
+
style: P.value,
|
|
881
881
|
title: d.raw[o.value] || d.raw[r.value]
|
|
882
882
|
}, [d.raw[r.value]])])]);
|
|
883
883
|
}
|
|
884
884
|
return {
|
|
885
|
-
renderItem:
|
|
885
|
+
renderItem: R
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
function fn(e, t, n, i, m, v, f,
|
|
889
|
-
const
|
|
890
|
-
onMouseenterItem:
|
|
891
|
-
onMouseoverItem:
|
|
892
|
-
onMouseoutItem:
|
|
888
|
+
function fn(e, t, n, i, m, v, f, b, k, p) {
|
|
889
|
+
const y = F(e.multiSelect), r = F(e.disableField), o = F(e.textField), {
|
|
890
|
+
onMouseenterItem: c,
|
|
891
|
+
onMouseoverItem: a,
|
|
892
|
+
onMouseoutItem: l
|
|
893
893
|
} = v, {
|
|
894
|
-
getKey:
|
|
895
|
-
listViewItemClass:
|
|
896
|
-
listViewItemStyle:
|
|
894
|
+
getKey: s,
|
|
895
|
+
listViewItemClass: h,
|
|
896
|
+
listViewItemStyle: u,
|
|
897
897
|
onCheckItem: g,
|
|
898
|
-
onClickItem:
|
|
898
|
+
onClickItem: B
|
|
899
899
|
} = f;
|
|
900
|
-
function
|
|
900
|
+
function E(P, R, d) {
|
|
901
901
|
return e.contentTemplate ? C(U, null, [e.contentTemplate({
|
|
902
|
-
item:
|
|
903
|
-
index:
|
|
902
|
+
item: P.raw,
|
|
903
|
+
index: R,
|
|
904
904
|
selectedItem: d
|
|
905
905
|
})]) : t.slots.content ? C(U, null, [t.slots.content && t.slots.content({
|
|
906
|
-
item:
|
|
907
|
-
index:
|
|
906
|
+
item: P.raw,
|
|
907
|
+
index: R,
|
|
908
908
|
selectedItem: d
|
|
909
909
|
})]) : C("div", {
|
|
910
910
|
style: "margin: 10px 0;"
|
|
911
|
-
}, [
|
|
911
|
+
}, [P.raw[o.value || "name"]]);
|
|
912
912
|
}
|
|
913
|
-
function O(
|
|
913
|
+
function O(P, R, d) {
|
|
914
914
|
return C("li", {
|
|
915
|
-
class:
|
|
916
|
-
id:
|
|
917
|
-
key:
|
|
918
|
-
style:
|
|
919
|
-
onClick: (
|
|
920
|
-
onMouseenter: (
|
|
921
|
-
onMouseover: (
|
|
922
|
-
onMouseout: (
|
|
923
|
-
}, [
|
|
915
|
+
class: h(P, R),
|
|
916
|
+
id: s(P, R),
|
|
917
|
+
key: s(P, R),
|
|
918
|
+
style: u(P, R),
|
|
919
|
+
onClick: (M) => B(P, R, M),
|
|
920
|
+
onMouseenter: (M) => c(M, P, R),
|
|
921
|
+
onMouseover: (M) => a(M, P, R),
|
|
922
|
+
onMouseout: (M) => l(M, P, R)
|
|
923
|
+
}, [y.value && C("div", {
|
|
924
924
|
class: "f-list-select",
|
|
925
|
-
onClick: (
|
|
925
|
+
onClick: (M) => M.stopPropagation()
|
|
926
926
|
}, [C(se, {
|
|
927
|
-
id: "list-" +
|
|
927
|
+
id: "list-" + s(P, R),
|
|
928
928
|
customClass: "listview-checkbox",
|
|
929
|
-
disabled:
|
|
930
|
-
checked:
|
|
931
|
-
"onUpdate:checked": (
|
|
932
|
-
onChange: (
|
|
929
|
+
disabled: P[r.value] || !P.checked,
|
|
930
|
+
checked: P.checked,
|
|
931
|
+
"onUpdate:checked": (M) => P.checked = M,
|
|
932
|
+
onChange: (M) => g(P, R, !M.checked)
|
|
933
933
|
}, null)]), C("div", {
|
|
934
934
|
class: "f-list-content"
|
|
935
|
-
}, [
|
|
935
|
+
}, [E(P, R, d)])]);
|
|
936
936
|
}
|
|
937
937
|
return {
|
|
938
938
|
renderItem: O
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
function mn(e, t, n, i, m, v, f,
|
|
942
|
-
const
|
|
943
|
-
onMouseenterItem:
|
|
944
|
-
onMouseoverItem:
|
|
945
|
-
onMouseoutItem:
|
|
941
|
+
function mn(e, t, n, i, m, v, f, b, k, p) {
|
|
942
|
+
const y = F(e.multiSelect), r = F(e.disableField), o = F(e.textField), {
|
|
943
|
+
onMouseenterItem: c,
|
|
944
|
+
onMouseoverItem: a,
|
|
945
|
+
onMouseoutItem: l
|
|
946
946
|
} = v, {
|
|
947
|
-
getKey:
|
|
948
|
-
listViewItemClass:
|
|
949
|
-
onCheckItem:
|
|
947
|
+
getKey: s,
|
|
948
|
+
listViewItemClass: h,
|
|
949
|
+
onCheckItem: u,
|
|
950
950
|
onClickItem: g
|
|
951
951
|
} = f, {
|
|
952
|
-
dragstart:
|
|
953
|
-
dragenter:
|
|
952
|
+
dragstart: B,
|
|
953
|
+
dragenter: E,
|
|
954
954
|
dragover: O,
|
|
955
|
-
dragend:
|
|
955
|
+
dragend: P
|
|
956
956
|
} = i, {
|
|
957
|
-
removeItem:
|
|
958
|
-
} =
|
|
959
|
-
margin:
|
|
957
|
+
removeItem: R
|
|
958
|
+
} = k, d = L(() => ({
|
|
959
|
+
margin: y.value ? "10px 0" : "10px 0px 10px 14px"
|
|
960
960
|
}));
|
|
961
|
-
function
|
|
962
|
-
const
|
|
963
|
-
|
|
961
|
+
function M(w, V = "") {
|
|
962
|
+
const j = w.target;
|
|
963
|
+
j.title = j.scrollWidth > j.clientWidth ? V : "";
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function A(w) {
|
|
966
966
|
return C("div", {
|
|
967
967
|
style: d.value,
|
|
968
|
-
onMouseenter: (
|
|
969
|
-
}, [
|
|
968
|
+
onMouseenter: (V) => M(V, w.raw[o.value || "name"])
|
|
969
|
+
}, [w.raw[o.value || "name"]]);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
971
|
+
function T() {
|
|
972
|
+
return t.slots.itemContent ? t.slots.itemContent : A;
|
|
973
973
|
}
|
|
974
|
-
const
|
|
975
|
-
function
|
|
974
|
+
const I = T();
|
|
975
|
+
function S(w, V, j) {
|
|
976
976
|
return C("li", {
|
|
977
|
-
class:
|
|
978
|
-
id:
|
|
979
|
-
key:
|
|
980
|
-
onClick: (
|
|
981
|
-
onMouseenter: (
|
|
982
|
-
onMouseover: (
|
|
983
|
-
onMouseout: (
|
|
977
|
+
class: h(w, V),
|
|
978
|
+
id: s(w, V),
|
|
979
|
+
key: s(w, V),
|
|
980
|
+
onClick: (D) => g(w, V, D),
|
|
981
|
+
onMouseenter: (D) => c(D, w, V),
|
|
982
|
+
onMouseover: (D) => a(D, w, V),
|
|
983
|
+
onMouseout: (D) => l(D, w, V),
|
|
984
984
|
draggable: "true",
|
|
985
|
-
onDragstart: (
|
|
986
|
-
onDragenter: (
|
|
987
|
-
onDragend: (
|
|
988
|
-
onDragover: (
|
|
989
|
-
}, [
|
|
985
|
+
onDragstart: (D) => B(D, w, V),
|
|
986
|
+
onDragenter: (D) => E(D, V),
|
|
987
|
+
onDragend: (D) => P(D, w),
|
|
988
|
+
onDragover: (D) => O(D)
|
|
989
|
+
}, [y.value && C("div", {
|
|
990
990
|
class: "f-list-select",
|
|
991
|
-
onClick: (
|
|
991
|
+
onClick: (D) => D.stopPropagation()
|
|
992
992
|
}, [C(se, {
|
|
993
|
-
id: "list-" +
|
|
993
|
+
id: "list-" + s(w, V),
|
|
994
994
|
customClass: "listview-checkbox",
|
|
995
|
-
disabled:
|
|
996
|
-
checked:
|
|
997
|
-
"onUpdate:checked": (
|
|
998
|
-
onChange: (
|
|
995
|
+
disabled: w[r.value] || !w.checked,
|
|
996
|
+
checked: w.checked,
|
|
997
|
+
"onUpdate:checked": (D) => w.checked = D,
|
|
998
|
+
onChange: (D) => u(w, V, !D.checked)
|
|
999
999
|
}, null)]), C("div", {
|
|
1000
1000
|
class: "f-list-content"
|
|
1001
|
-
}, [
|
|
1001
|
+
}, [I(w)]), C("div", {
|
|
1002
1002
|
class: "f-list-remove",
|
|
1003
|
-
onClick: (
|
|
1003
|
+
onClick: (D) => R(V)
|
|
1004
1004
|
}, [C("div", {
|
|
1005
1005
|
class: "f-list-remove-icon"
|
|
1006
1006
|
}, [C("i", {
|
|
@@ -1012,74 +1012,74 @@ function mn(e, t, n, i, m, v, f, S, T, p) {
|
|
|
1012
1012
|
}, null)])])]);
|
|
1013
1013
|
}
|
|
1014
1014
|
return {
|
|
1015
|
-
renderItem:
|
|
1015
|
+
renderItem: S
|
|
1016
1016
|
};
|
|
1017
1017
|
}
|
|
1018
|
-
function vn(e, t, n, i, m, v, f,
|
|
1019
|
-
var
|
|
1020
|
-
const
|
|
1018
|
+
function vn(e, t, n, i, m, v, f, b, k, p) {
|
|
1019
|
+
var s;
|
|
1020
|
+
const y = F(((s = e.group) == null ? void 0 : s.groupFields) || []), {
|
|
1021
1021
|
collpaseGroupIconClass: r
|
|
1022
1022
|
} = m, {
|
|
1023
1023
|
toggleGroupRow: o
|
|
1024
1024
|
} = p;
|
|
1025
|
-
function
|
|
1026
|
-
|
|
1025
|
+
function c(h, u) {
|
|
1026
|
+
u.collapse = !u.collapse, n.value = o(u.collapse ? "collapse" : "expand", u, n.value);
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function a(h, u, g) {
|
|
1029
1029
|
return t.slots.group ? C(U, null, [t.slots.content && t.slots.group({
|
|
1030
|
-
item:
|
|
1031
|
-
index:
|
|
1030
|
+
item: h.raw,
|
|
1031
|
+
index: u,
|
|
1032
1032
|
selectedItem: g
|
|
1033
1033
|
})]) : C("div", {
|
|
1034
1034
|
class: "f-navlookup-recentHeader",
|
|
1035
|
-
onClick: (
|
|
1035
|
+
onClick: (B) => c(B, h)
|
|
1036
1036
|
}, [C("div", {
|
|
1037
1037
|
class: "fv-grid-group-row-icon"
|
|
1038
1038
|
}, [C("span", {
|
|
1039
|
-
class: r(
|
|
1039
|
+
class: r(h)
|
|
1040
1040
|
}, null)]), C("div", {
|
|
1041
1041
|
class: "f-navlookup-recommandLabel"
|
|
1042
|
-
}, [
|
|
1042
|
+
}, [h.raw[y.value[h.layer]]])]);
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
return
|
|
1044
|
+
function l(h, u, g) {
|
|
1045
|
+
return h.layer > -1 && a(h, u, g);
|
|
1046
1046
|
}
|
|
1047
1047
|
return {
|
|
1048
|
-
renderItem:
|
|
1048
|
+
renderItem: l
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
1051
|
function pn(e, t, n, i) {
|
|
1052
1052
|
const { dataView: m } = n, { updateSelectedItems: v } = i;
|
|
1053
|
-
function f(
|
|
1054
|
-
if (
|
|
1055
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(m.value[
|
|
1053
|
+
function f(b) {
|
|
1054
|
+
if (b > -1 && b < m.value.length) {
|
|
1055
|
+
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(m.value[b]))
|
|
1056
1056
|
return;
|
|
1057
|
-
const
|
|
1058
|
-
v(), t.emit("removeItem",
|
|
1057
|
+
const k = m.value.splice(b, 1);
|
|
1058
|
+
v(), t.emit("removeItem", k[0]);
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
1061
|
return { removeItem: f };
|
|
1062
1062
|
}
|
|
1063
|
-
function gn(e, t, n, i, m, v, f,
|
|
1063
|
+
function gn(e, t, n, i, m, v, f, b, k, p) {
|
|
1064
1064
|
const {
|
|
1065
|
-
t:
|
|
1066
|
-
} = ae(), r =
|
|
1065
|
+
t: y
|
|
1066
|
+
} = ae(), r = F(e.view), o = F(e.view === "CardView"), c = F({}), a = F(y("listView.emptyMessage")), l = pn(e, t, i, k), s = L(() => ({
|
|
1067
1067
|
"f-list-view-group": !0,
|
|
1068
1068
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
1069
1069
|
"d-flex": o.value,
|
|
1070
1070
|
"flex-wrap": o.value
|
|
1071
|
-
})),
|
|
1072
|
-
|
|
1071
|
+
})), h = L(() => !!n.value && n.value.length > 0), u = L(() => n.value.length === 0);
|
|
1072
|
+
L(() => u.value && !t.slots.empty);
|
|
1073
1073
|
function g() {
|
|
1074
1074
|
return r.value === "SingleView" ? pe : r.value === "DraggableView" ? mn : (r.value === "ContentView" || r.value === "CardView") && (e.contentTemplate || t.slots.content) ? fn : pe;
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1077
|
-
renderItem:
|
|
1078
|
-
} =
|
|
1076
|
+
const B = g(), {
|
|
1077
|
+
renderItem: E
|
|
1078
|
+
} = B(e, t, n, p, m, v, k, f, l, b), {
|
|
1079
1079
|
renderItem: O
|
|
1080
|
-
} = vn(e, t, n, p, m, v,
|
|
1081
|
-
function
|
|
1082
|
-
return n.value.filter((
|
|
1080
|
+
} = vn(e, t, n, p, m, v, k, f, l, b), P = [E, O];
|
|
1081
|
+
function R() {
|
|
1082
|
+
return n.value.filter((A) => A.visible !== !1).map((A, T) => P[A.type](A, T, c));
|
|
1083
1083
|
}
|
|
1084
1084
|
function d() {
|
|
1085
1085
|
return C("div", {
|
|
@@ -1087,16 +1087,16 @@ function gn(e, t, n, i, m, v, f, S, T, p) {
|
|
|
1087
1087
|
style: "margin: 0 auto;"
|
|
1088
1088
|
}, [C("p", {
|
|
1089
1089
|
class: "f-empty-title"
|
|
1090
|
-
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() :
|
|
1090
|
+
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() : a.value])]);
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function M() {
|
|
1093
1093
|
return C("ul", {
|
|
1094
|
-
class:
|
|
1094
|
+
class: s.value,
|
|
1095
1095
|
style: "list-style: none;"
|
|
1096
|
-
}, [
|
|
1096
|
+
}, [h.value && R(), u.value && d()]);
|
|
1097
1097
|
}
|
|
1098
1098
|
return {
|
|
1099
|
-
renderListArea:
|
|
1099
|
+
renderListArea: M
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
1102
|
function hn(e, t, n) {
|
|
@@ -1110,26 +1110,26 @@ function hn(e, t, n) {
|
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
1112
|
function ge(e, t, n) {
|
|
1113
|
-
const i =
|
|
1114
|
-
function
|
|
1113
|
+
const i = F(e.headerClass), m = F(e.placeholder), v = F(""), f = L(() => !v.value), b = L(() => !!v.value);
|
|
1114
|
+
function k(o) {
|
|
1115
1115
|
v.value = "";
|
|
1116
1116
|
}
|
|
1117
1117
|
G(v, (o) => {
|
|
1118
1118
|
e.enableHighlightSearch && n.search(o), t.emit("afterSearch", o);
|
|
1119
1119
|
});
|
|
1120
|
-
const p =
|
|
1120
|
+
const p = L(() => {
|
|
1121
1121
|
const o = {
|
|
1122
1122
|
"form-group": !0,
|
|
1123
1123
|
"farris-form-group": !0
|
|
1124
1124
|
};
|
|
1125
|
-
return i.value && i.value.split(" ").reduce((
|
|
1125
|
+
return i.value && i.value.split(" ").reduce((a, l) => (a[l] = !0, a), o), o;
|
|
1126
1126
|
});
|
|
1127
|
-
function
|
|
1127
|
+
function y(o) {
|
|
1128
1128
|
}
|
|
1129
1129
|
function r() {
|
|
1130
1130
|
return C("div", {
|
|
1131
1131
|
class: "f-list-view-header",
|
|
1132
|
-
onClick: Ne(() =>
|
|
1132
|
+
onClick: Ne(() => y, ["prevent", "stop"])
|
|
1133
1133
|
}, [C("div", {
|
|
1134
1134
|
class: p.value
|
|
1135
1135
|
}, [C("div", {
|
|
@@ -1147,9 +1147,9 @@ function ge(e, t, n) {
|
|
|
1147
1147
|
autocomplete: "off"
|
|
1148
1148
|
}, null), [[_e, v.value]]), C("div", {
|
|
1149
1149
|
class: "input-group-append"
|
|
1150
|
-
}, [
|
|
1150
|
+
}, [b.value && C("span", {
|
|
1151
1151
|
class: "input-group-text input-group-clear",
|
|
1152
|
-
onClick: (o) =>
|
|
1152
|
+
onClick: (o) => k()
|
|
1153
1153
|
}, [C("i", {
|
|
1154
1154
|
class: "f-icon f-icon-close-circle"
|
|
1155
1155
|
}, null)]), f.value && C("span", {
|
|
@@ -1163,50 +1163,50 @@ function ge(e, t, n) {
|
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
1165
|
function yn() {
|
|
1166
|
-
const e =
|
|
1167
|
-
function v(r, o,
|
|
1168
|
-
i.value =
|
|
1166
|
+
const e = F(""), t = F(-1), n = F(""), i = F(-1), m = F(!1);
|
|
1167
|
+
function v(r, o, c) {
|
|
1168
|
+
i.value = c;
|
|
1169
1169
|
}
|
|
1170
|
-
function f(r, o,
|
|
1171
|
-
m.value || (i.value =
|
|
1170
|
+
function f(r, o, c) {
|
|
1171
|
+
m.value || (i.value = c);
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function b(r, o, c) {
|
|
1174
1174
|
i.value = -1;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function k() {
|
|
1177
1177
|
m.value = !0;
|
|
1178
1178
|
}
|
|
1179
1179
|
function p() {
|
|
1180
1180
|
m.value = !1;
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function y() {
|
|
1183
1183
|
t.value = -1, e.value = "";
|
|
1184
1184
|
}
|
|
1185
1185
|
return {
|
|
1186
1186
|
activeIndex: t,
|
|
1187
1187
|
focusedItemId: n,
|
|
1188
1188
|
hoverIndex: i,
|
|
1189
|
-
clearActiveItem:
|
|
1189
|
+
clearActiveItem: y,
|
|
1190
1190
|
onMouseenterItem: v,
|
|
1191
1191
|
onMouseoverItem: f,
|
|
1192
|
-
onMouseoutItem:
|
|
1192
|
+
onMouseoutItem: b,
|
|
1193
1193
|
resumeHover: p,
|
|
1194
|
-
suspendHover:
|
|
1194
|
+
suspendHover: k
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
1197
|
function bn(e, t, n, i) {
|
|
1198
|
-
const m =
|
|
1199
|
-
let
|
|
1200
|
-
function
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
function
|
|
1205
|
-
const { left:
|
|
1198
|
+
const m = F(e.idField), { dataView: v } = n, f = F(-1), b = F(!1), { activeIndex: k, focusedItemId: p, hoverIndex: y, resumeHover: r, suspendHover: o } = i;
|
|
1199
|
+
let c, a = 0, l = 0;
|
|
1200
|
+
function s(O, P) {
|
|
1201
|
+
const R = O - a, d = P - l;
|
|
1202
|
+
c.style.left = parseInt(c.style.left) + R + "px", c.style.top = parseInt(c.style.top) + d + "px", a = O, l = P;
|
|
1203
|
+
}
|
|
1204
|
+
function h(O) {
|
|
1205
|
+
const { left: P, top: R } = O.getBoundingClientRect(), d = O.cloneNode(!0);
|
|
1206
1206
|
return d.style.cssText = `
|
|
1207
1207
|
position:absolute;
|
|
1208
|
-
left:${
|
|
1209
|
-
top:${document.documentElement.scrollTop ?
|
|
1208
|
+
left:${P}px;
|
|
1209
|
+
top:${document.documentElement.scrollTop ? R + document.documentElement.scrollTop : R}px;
|
|
1210
1210
|
z-index: 999999;
|
|
1211
1211
|
border: 1px solid #e2e3e5;
|
|
1212
1212
|
pointer-events: none;
|
|
@@ -1224,168 +1224,168 @@ function bn(e, t, n, i) {
|
|
|
1224
1224
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
1225
1225
|
`, d.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", d.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(d), d;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
if (O.stopPropagation(), o(),
|
|
1229
|
-
if (
|
|
1227
|
+
function u(O, P, R) {
|
|
1228
|
+
if (O.stopPropagation(), o(), P) {
|
|
1229
|
+
if (c = h(O.target), O.dataTransfer) {
|
|
1230
1230
|
const d = new Image();
|
|
1231
1231
|
d.src = "", O.dataTransfer.setDragImage(d, 0, 0);
|
|
1232
1232
|
}
|
|
1233
|
-
|
|
1234
|
-
f.value =
|
|
1233
|
+
a = O.pageX, l = O.pageY, setTimeout(() => {
|
|
1234
|
+
f.value = R, b.value = !0, P.moving = !0;
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
|
-
function g(O,
|
|
1239
|
-
if (O.preventDefault(), f.value !==
|
|
1240
|
-
const
|
|
1241
|
-
d.splice(f.value, 1), d.splice(
|
|
1238
|
+
function g(O, P) {
|
|
1239
|
+
if (O.preventDefault(), f.value !== P) {
|
|
1240
|
+
const R = v.value[f.value], d = v.value;
|
|
1241
|
+
d.splice(f.value, 1), d.splice(P, 0, R), f.value = P, s(O.pageX, O.pageY);
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
O.preventDefault(), O.dataTransfer && (O.dataTransfer.dropEffect = "move"),
|
|
1244
|
+
function B(O) {
|
|
1245
|
+
O.preventDefault(), O.dataTransfer && (O.dataTransfer.dropEffect = "move"), s(O.pageX, O.pageY);
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}),
|
|
1247
|
+
function E(O, P) {
|
|
1248
|
+
P && (P.moving = !1, c && (document.body.removeChild(c), c = null)), v.value.forEach((R, d) => {
|
|
1249
|
+
R.__fv_index__ = d;
|
|
1250
|
+
}), b.value = !1, r(), y.value = P.raw.__fv_index__, k.value = P.raw.__fv_index__, p.value = P.raw[m.value], t.emit("change", v.value), t.emit("activeChange", [P.raw]);
|
|
1251
1251
|
}
|
|
1252
1252
|
return {
|
|
1253
|
-
dragstart:
|
|
1253
|
+
dragstart: u,
|
|
1254
1254
|
dragenter: g,
|
|
1255
|
-
dragover:
|
|
1256
|
-
dragend:
|
|
1257
|
-
isDragging:
|
|
1255
|
+
dragover: B,
|
|
1256
|
+
dragend: E,
|
|
1257
|
+
isDragging: b
|
|
1258
1258
|
};
|
|
1259
1259
|
}
|
|
1260
1260
|
function Sn(e, t, n, i, m, v) {
|
|
1261
|
-
const f =
|
|
1262
|
-
|
|
1263
|
-
const p =
|
|
1264
|
-
let
|
|
1265
|
-
return
|
|
1261
|
+
const f = F(e.idField), b = F(e.disableField), k = F(e.draggable);
|
|
1262
|
+
F(e.itemClass);
|
|
1263
|
+
const p = F(e.selection.multiSelect ?? !1), y = F(e.selection.multiSelectMode), { isDragging: r } = i, { activeIndex: o, focusedItemId: c, hoverIndex: a } = m, { clearSelection: l, getSelectedItems: s, toggleSelectItem: h, currentSelectedDataId: u } = v, g = F(s()), B = (S) => g.value.length === 0 ? !1 : g.value.some((w) => {
|
|
1264
|
+
let V = "";
|
|
1265
|
+
return w.data ? V = w.data[f.value] : V = w[f.value], V === S;
|
|
1266
1266
|
});
|
|
1267
|
-
function
|
|
1268
|
-
g.value =
|
|
1267
|
+
function E() {
|
|
1268
|
+
g.value = s();
|
|
1269
1269
|
}
|
|
1270
|
-
function O(
|
|
1271
|
-
return
|
|
1270
|
+
function O(S, w) {
|
|
1271
|
+
return S.raw[f.value] != null ? S.raw[f.value] : "";
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const
|
|
1273
|
+
function P(S, w) {
|
|
1274
|
+
const V = {
|
|
1275
1275
|
"f-list-view-group-item": !0,
|
|
1276
|
-
"f-list-view-draggable-item":
|
|
1277
|
-
"f-un-click": !
|
|
1278
|
-
"f-un-select": !!
|
|
1276
|
+
"f-list-view-draggable-item": k.value,
|
|
1277
|
+
"f-un-click": !S.checked,
|
|
1278
|
+
"f-un-select": !!S.raw[b.value],
|
|
1279
1279
|
"f-listview-active": (
|
|
1280
1280
|
// 多选
|
|
1281
|
-
p.value &&
|
|
1282
|
-
!p.value &&
|
|
1281
|
+
p.value && B(O(S)) || // 单选
|
|
1282
|
+
!p.value && S.raw[f.value] === u.value
|
|
1283
1283
|
),
|
|
1284
|
-
"f-listview-hover": !r.value &&
|
|
1285
|
-
moving: !!
|
|
1284
|
+
"f-listview-hover": !r.value && w === a.value,
|
|
1285
|
+
moving: !!S.moving
|
|
1286
1286
|
};
|
|
1287
1287
|
if (typeof e.itemClass == "string")
|
|
1288
|
-
return re(
|
|
1288
|
+
return re(V, e.itemClass);
|
|
1289
1289
|
if (typeof e.itemClass == "function") {
|
|
1290
|
-
const
|
|
1291
|
-
return re(
|
|
1290
|
+
const j = e.itemClass(S);
|
|
1291
|
+
return re(V, j);
|
|
1292
1292
|
}
|
|
1293
|
-
return
|
|
1293
|
+
return V;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1296
|
-
const
|
|
1295
|
+
function R(S, w) {
|
|
1296
|
+
const V = (
|
|
1297
1297
|
// 多选
|
|
1298
|
-
p.value &&
|
|
1299
|
-
!p.value &&
|
|
1300
|
-
),
|
|
1301
|
-
if (
|
|
1302
|
-
return me(
|
|
1298
|
+
p.value && B(O(S)) || // 单选
|
|
1299
|
+
!p.value && S.raw[f.value] === u.value
|
|
1300
|
+
), j = {};
|
|
1301
|
+
if (V && (j.backgroundColor = "#dae9ff"), typeof e.itemStyle == "string")
|
|
1302
|
+
return me(j, e.itemStyle);
|
|
1303
1303
|
if (typeof e.itemStyle == "function") {
|
|
1304
|
-
const
|
|
1305
|
-
return me(
|
|
1304
|
+
const D = e.itemStyle(S);
|
|
1305
|
+
return me(j, D);
|
|
1306
1306
|
}
|
|
1307
|
-
return
|
|
1307
|
+
return j;
|
|
1308
1308
|
}
|
|
1309
|
-
const d =
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1309
|
+
const d = L(() => !p.value);
|
|
1310
|
+
function M(S, w, V) {
|
|
1311
|
+
S.checked = V, !S.raw[b.value] && (d.value && (c.value = S.raw[f.value]), h(S));
|
|
1312
1312
|
}
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1315
|
-
if (
|
|
1316
|
-
|
|
1313
|
+
const A = L(() => p.value && y.value === "OnCheckClearByClick"), T = L(() => !p.value || p.value && (y.value === "OnCheckAndClick" || y.value === "OnClick"));
|
|
1314
|
+
function I(S, w, V) {
|
|
1315
|
+
if (S.raw[b.value]) {
|
|
1316
|
+
V == null || V.preventDefault(), V == null || V.stopPropagation();
|
|
1317
1317
|
return;
|
|
1318
1318
|
}
|
|
1319
|
-
|
|
1319
|
+
c.value = S.raw[f.value], o.value = w, A.value && l(), T.value && (h(S), E()), t.emit("clickItem", { data: g.value, index: w, dataItem: S.raw }), t.emit("activeChange", g.value);
|
|
1320
1320
|
}
|
|
1321
1321
|
return {
|
|
1322
1322
|
getKey: O,
|
|
1323
1323
|
selectedItems: g,
|
|
1324
|
-
listViewItemClass:
|
|
1325
|
-
listViewItemStyle:
|
|
1326
|
-
updateSelectedItems:
|
|
1327
|
-
onCheckItem:
|
|
1328
|
-
onClickItem:
|
|
1324
|
+
listViewItemClass: P,
|
|
1325
|
+
listViewItemStyle: R,
|
|
1326
|
+
updateSelectedItems: E,
|
|
1327
|
+
onCheckItem: M,
|
|
1328
|
+
onClickItem: I
|
|
1329
1329
|
};
|
|
1330
1330
|
}
|
|
1331
|
-
const
|
|
1331
|
+
const Be = /* @__PURE__ */ q({
|
|
1332
1332
|
name: "FListView",
|
|
1333
1333
|
props: un,
|
|
1334
1334
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
1335
1335
|
setup(e, t) {
|
|
1336
|
-
const n =
|
|
1336
|
+
const n = F(), i = F(!0), m = F(!1), v = F([]), f = 0, b = F(e.columns), k = Ue(e, t), p = Xe(e), y = Ye(e), r = Je(e, p), o = Qe(e, /* @__PURE__ */ new Map(), k, y, p), c = Ze(e, o, p, v, t), a = dn(e, n), l = Ke(e, o), s = L(() => o.dataView.value.length), h = et(e, t, c, p), u = tt(e, t, p, h, v), g = nt(e), B = ot(e, {}, g), E = it(e, o, u, y, p, g, B), O = rt(e, p, B, E), P = lt(e, p, B, E), R = at(e, b, o, s, f, E, O, P), {
|
|
1337
1337
|
getVisualData: d
|
|
1338
|
-
} =
|
|
1339
|
-
v.value = d(0,
|
|
1340
|
-
const
|
|
1338
|
+
} = R;
|
|
1339
|
+
v.value = d(0, s.value + f - 1);
|
|
1340
|
+
const M = L(() => {
|
|
1341
1341
|
const $ = {
|
|
1342
1342
|
"f-list-view": !0,
|
|
1343
1343
|
"f-list-view-multiple": e.multiSelect
|
|
1344
1344
|
};
|
|
1345
1345
|
return e.size !== "default" && ($[`${e.size}-item`] = !0), re($, e.customClass);
|
|
1346
|
-
}),
|
|
1347
|
-
function
|
|
1346
|
+
}), A = L(() => !!t.slots.footer || i.value);
|
|
1347
|
+
function T() {
|
|
1348
1348
|
return e.header === "SearchBar" ? ge : e.header === "ContentHeader" ? hn : ge;
|
|
1349
1349
|
}
|
|
1350
|
-
const
|
|
1351
|
-
renderHeader:
|
|
1352
|
-
} =
|
|
1353
|
-
renderListArea:
|
|
1354
|
-
} = gn(e, t, v, o, r,
|
|
1350
|
+
const I = T(), {
|
|
1351
|
+
renderHeader: S
|
|
1352
|
+
} = I(e, t, a), w = yn(), V = bn(e, t, o, w), j = Sn(e, t, v, V, w, c), {
|
|
1353
|
+
renderListArea: D
|
|
1354
|
+
} = gn(e, t, v, o, r, w, c, R, j, V);
|
|
1355
1355
|
function x($) {
|
|
1356
|
-
|
|
1356
|
+
a.search($);
|
|
1357
1357
|
}
|
|
1358
1358
|
function H($) {
|
|
1359
|
-
$ && (o.load($), v.value = d(0,
|
|
1359
|
+
$ && (o.load($), v.value = d(0, s.value + f - 1));
|
|
1360
1360
|
}
|
|
1361
1361
|
function _() {
|
|
1362
|
-
|
|
1362
|
+
c.clearSelection(), w.clearActiveItem();
|
|
1363
1363
|
}
|
|
1364
1364
|
function K() {
|
|
1365
|
-
return
|
|
1365
|
+
return j.selectedItems.value;
|
|
1366
1366
|
}
|
|
1367
1367
|
function ee() {
|
|
1368
|
-
return
|
|
1368
|
+
return j.selectedItems.value.map(($) => $[p.idField.value]);
|
|
1369
1369
|
}
|
|
1370
1370
|
function X($) {
|
|
1371
|
-
|
|
1371
|
+
c.selectedValues.value = $, j.updateSelectedItems();
|
|
1372
1372
|
}
|
|
1373
1373
|
function Y() {
|
|
1374
|
-
return
|
|
1374
|
+
return c.currentSelectedDataId.value;
|
|
1375
1375
|
}
|
|
1376
1376
|
function N($) {
|
|
1377
|
-
|
|
1377
|
+
h.activeRowById($);
|
|
1378
1378
|
}
|
|
1379
1379
|
function te($) {
|
|
1380
1380
|
const z = p.idField.value, W = v.value.find((ne) => ne.raw[z] === $), J = v.value.findIndex((ne) => ne.raw[z] === $);
|
|
1381
|
-
W && J > -1 &&
|
|
1381
|
+
W && J > -1 && j.onClickItem(W, J);
|
|
1382
1382
|
}
|
|
1383
1383
|
function Re($) {
|
|
1384
1384
|
const z = p.idField.value, W = v.value.find((J) => J.raw[z] === $);
|
|
1385
|
-
W &&
|
|
1385
|
+
W && h.changeRow(W);
|
|
1386
1386
|
}
|
|
1387
1387
|
function Ee($) {
|
|
1388
|
-
|
|
1388
|
+
l.updatePagination($);
|
|
1389
1389
|
}
|
|
1390
1390
|
function je($) {
|
|
1391
1391
|
return v.value.filter((z) => $.includes(z.raw[e.idField]));
|
|
@@ -1404,28 +1404,24 @@ const Me = /* @__PURE__ */ q({
|
|
|
1404
1404
|
getVisibleDataByIds: je,
|
|
1405
1405
|
selectRowById: Re
|
|
1406
1406
|
});
|
|
1407
|
-
function
|
|
1407
|
+
function De($) {
|
|
1408
1408
|
e.multiSelect && ($.preventDefault(), $.stopPropagation());
|
|
1409
1409
|
}
|
|
1410
1410
|
G(() => e.selectionValues, ($, z) => {
|
|
1411
1411
|
$ !== z && X($);
|
|
1412
1412
|
});
|
|
1413
|
-
const
|
|
1414
|
-
sidebarWidth:
|
|
1413
|
+
const Le = st(e, c), {
|
|
1414
|
+
sidebarWidth: $e,
|
|
1415
1415
|
showSidebarCheckBox: zn
|
|
1416
|
-
} =
|
|
1416
|
+
} = Le, Ae = ct(e, t), {
|
|
1417
1417
|
applyColumnSorter: qn,
|
|
1418
1418
|
columnContext: xe,
|
|
1419
1419
|
updateColumnRenderContext: Wn
|
|
1420
|
-
} =
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
}
|
|
1425
|
-
return () => C("div", {
|
|
1426
|
-
class: I.value,
|
|
1427
|
-
onClick: Le
|
|
1428
|
-
}, [k(), C("div", {
|
|
1420
|
+
} = Ae, He = ut(e, o, v, xe, R, s, f, $e, u);
|
|
1421
|
+
return dt(e, t, o, He, l, c), () => C("div", {
|
|
1422
|
+
class: M.value,
|
|
1423
|
+
onClick: De
|
|
1424
|
+
}, [S(), C("div", {
|
|
1429
1425
|
ref: n,
|
|
1430
1426
|
class: "f-list-view-content",
|
|
1431
1427
|
onMouseover: () => {
|
|
@@ -1434,7 +1430,7 @@ const Me = /* @__PURE__ */ q({
|
|
|
1434
1430
|
onMouseleave: () => {
|
|
1435
1431
|
m.value = !1;
|
|
1436
1432
|
}
|
|
1437
|
-
}, [
|
|
1433
|
+
}, [D()]), A.value && C("div", {
|
|
1438
1434
|
class: "f-list-view-footer"
|
|
1439
1435
|
}, [e.footerTemplate ? e.footerTemplate() : t.slots.footer && t.slots.footer()])]);
|
|
1440
1436
|
}
|
|
@@ -1473,7 +1469,7 @@ function wn(e, t) {
|
|
|
1473
1469
|
};
|
|
1474
1470
|
}
|
|
1475
1471
|
function Fn(e) {
|
|
1476
|
-
const t =
|
|
1472
|
+
const t = L(() => {
|
|
1477
1473
|
const i = {
|
|
1478
1474
|
"f-icon": !0
|
|
1479
1475
|
};
|
|
@@ -1482,7 +1478,7 @@ function Fn(e) {
|
|
|
1482
1478
|
m && m.length && m.reduce((v, f) => (v[f] = !0, v), i);
|
|
1483
1479
|
}
|
|
1484
1480
|
return i;
|
|
1485
|
-
}), n =
|
|
1481
|
+
}), n = L(() => !!(e.icon && e.icon.trim()));
|
|
1486
1482
|
return { iconClass: t, shouldShowIcon: n };
|
|
1487
1483
|
}
|
|
1488
1484
|
const Ie = /* @__PURE__ */ q({
|
|
@@ -1495,7 +1491,7 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1495
1491
|
} = wn(e, t), {
|
|
1496
1492
|
iconClass: i,
|
|
1497
1493
|
shouldShowIcon: m
|
|
1498
|
-
} = Fn(e), v =
|
|
1494
|
+
} = Fn(e), v = L(() => {
|
|
1499
1495
|
const f = {
|
|
1500
1496
|
btn: !0,
|
|
1501
1497
|
"btn-lg": e.size === "large",
|
|
@@ -1503,7 +1499,7 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1503
1499
|
"btn-sm": e.size === "small",
|
|
1504
1500
|
"btn-icontext": m.value
|
|
1505
1501
|
};
|
|
1506
|
-
return f[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((
|
|
1502
|
+
return f[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((b, k) => (b[k] = e.customClass[k], b), f), f;
|
|
1507
1503
|
});
|
|
1508
1504
|
return () => C("button", {
|
|
1509
1505
|
class: v.value,
|
|
@@ -1515,7 +1511,7 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1515
1511
|
}
|
|
1516
1512
|
}), Tn = /* @__PURE__ */ new Map([
|
|
1517
1513
|
["appearance", mt]
|
|
1518
|
-
]), kn = "https://json-schema.org/draft/2020-12/schema", On = "https://farris-design.gitee.io/combo-list.schema.json", Vn = "combo-list", Pn = "A Farris Input Component",
|
|
1514
|
+
]), kn = "https://json-schema.org/draft/2020-12/schema", On = "https://farris-design.gitee.io/combo-list.schema.json", Vn = "combo-list", Pn = "A Farris Input Component", Bn = "object", In = {
|
|
1519
1515
|
id: {
|
|
1520
1516
|
description: "The unique identifier for a combo list",
|
|
1521
1517
|
type: "string"
|
|
@@ -1694,8 +1690,12 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1694
1690
|
description: "启用高亮搜索",
|
|
1695
1691
|
type: "boolean",
|
|
1696
1692
|
default: !1
|
|
1693
|
+
},
|
|
1694
|
+
"onUpdate:modelValue": {
|
|
1695
|
+
description: "",
|
|
1696
|
+
type: "object"
|
|
1697
1697
|
}
|
|
1698
|
-
},
|
|
1698
|
+
}, Mn = [
|
|
1699
1699
|
"type"
|
|
1700
1700
|
], Rn = [
|
|
1701
1701
|
"id",
|
|
@@ -1707,9 +1707,9 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1707
1707
|
$id: On,
|
|
1708
1708
|
title: Vn,
|
|
1709
1709
|
description: Pn,
|
|
1710
|
-
type:
|
|
1710
|
+
type: Bn,
|
|
1711
1711
|
properties: In,
|
|
1712
|
-
required:
|
|
1712
|
+
required: Mn,
|
|
1713
1713
|
ignore: Rn
|
|
1714
1714
|
};
|
|
1715
1715
|
function jn(e, t, n) {
|
|
@@ -1883,9 +1883,9 @@ const ue = {
|
|
|
1883
1883
|
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
1884
1884
|
minPanelWidth: { type: Number, default: 160 },
|
|
1885
1885
|
popupOnClick: { type: Boolean, default: !0 }
|
|
1886
|
-
},
|
|
1886
|
+
}, Dn = Object.assign({}, ue, {
|
|
1887
1887
|
readonly: {}
|
|
1888
|
-
}),
|
|
1888
|
+
}), Me = vt(ue, En, Tn, jn), Ln = {
|
|
1889
1889
|
dataSource: { type: Array, default: [] },
|
|
1890
1890
|
enableSearch: { type: Boolean, default: !1 },
|
|
1891
1891
|
idField: { type: String, default: "id" },
|
|
@@ -1906,12 +1906,12 @@ const ue = {
|
|
|
1906
1906
|
},
|
|
1907
1907
|
// 搜索启用高亮
|
|
1908
1908
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1909
|
-
},
|
|
1909
|
+
}, $n = /* @__PURE__ */ q({
|
|
1910
1910
|
name: "FComboListContainer",
|
|
1911
|
-
props:
|
|
1911
|
+
props: Ln,
|
|
1912
1912
|
emits: ["selectionChange"],
|
|
1913
1913
|
setup(e, t) {
|
|
1914
|
-
const n =
|
|
1914
|
+
const n = F(), i = F(e.dataSource), m = F([]), v = F(e.separator), f = F(e.width), b = F(e.maxHeight), k = F(String(e.selectedValues).split(v.value)), p = L(() => e.multiSelect), y = L(() => ({
|
|
1915
1915
|
enableSelectRow: !0,
|
|
1916
1916
|
multiSelect: e.multiSelect,
|
|
1917
1917
|
multiSelectMode: "OnCheckAndClick",
|
|
@@ -1921,45 +1921,45 @@ const ue = {
|
|
|
1921
1921
|
}));
|
|
1922
1922
|
G(e.dataSource, () => {
|
|
1923
1923
|
i.value = e.dataSource;
|
|
1924
|
-
}),
|
|
1925
|
-
const r =
|
|
1926
|
-
const
|
|
1927
|
-
return f.value !== void 0 && (
|
|
1924
|
+
}), L(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
1925
|
+
const r = L(() => {
|
|
1926
|
+
const s = {};
|
|
1927
|
+
return f.value !== void 0 && (s.width = `${f.value}px`), b.value !== void 0 && b.value > 0 && (s.maxHeight = `${b.value}px`), s;
|
|
1928
1928
|
});
|
|
1929
|
-
function o(
|
|
1930
|
-
n.value.search(
|
|
1929
|
+
function o(s) {
|
|
1930
|
+
n.value.search(s);
|
|
1931
1931
|
}
|
|
1932
|
-
function s
|
|
1933
|
-
m.value =
|
|
1932
|
+
function c(s) {
|
|
1933
|
+
m.value = s.map((h) => Object.assign({}, h)), k.value = s.map((h) => h[e.idField]), t.emit("selectionChange", m.value);
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function a(s) {
|
|
1936
1936
|
if (e.enableHighlightSearch)
|
|
1937
1937
|
return;
|
|
1938
|
-
let
|
|
1938
|
+
let h = [];
|
|
1939
1939
|
const {
|
|
1940
|
-
searchOption:
|
|
1940
|
+
searchOption: u
|
|
1941
1941
|
} = e;
|
|
1942
|
-
typeof
|
|
1942
|
+
typeof u == "function" ? h = i.value.filter((g) => u(s, g)) : h = i.value.filter((g) => g[e.valueField].indexOf(s) > -1 || g[e.textField].indexOf(s) > -1), n.value.updateDataSource(h);
|
|
1943
1943
|
}
|
|
1944
|
-
G([() => e.selectedValues], ([
|
|
1945
|
-
e.multiSelect ?
|
|
1944
|
+
G([() => e.selectedValues], ([s]) => {
|
|
1945
|
+
e.multiSelect ? k.value = s.split(v.value) : k.value = [s];
|
|
1946
1946
|
});
|
|
1947
|
-
function
|
|
1948
|
-
n.value.activeRowById(
|
|
1947
|
+
function l(s) {
|
|
1948
|
+
n.value.activeRowById(s);
|
|
1949
1949
|
}
|
|
1950
1950
|
return le(() => {
|
|
1951
|
-
var
|
|
1951
|
+
var s, h;
|
|
1952
1952
|
if (!e.multiSelect) {
|
|
1953
|
-
const
|
|
1954
|
-
let g =
|
|
1955
|
-
if (!ze(
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1953
|
+
const u = (s = k.value) == null ? void 0 : s[0];
|
|
1954
|
+
let g = u;
|
|
1955
|
+
if (!ze(u)) {
|
|
1956
|
+
const B = typeof u, E = typeof ((h = i.value[0]) == null ? void 0 : h[e.valueField || e.idField]);
|
|
1957
|
+
E === "number" && B !== E && (g = Number(u)), E === "boolean" && B !== E && (g = u === "true" ? !0 : u === "false" ? !1 : u), l(g);
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
1960
1960
|
}), t.expose({
|
|
1961
1961
|
search: o,
|
|
1962
|
-
activeRowById:
|
|
1962
|
+
activeRowById: l
|
|
1963
1963
|
}), () => C("div", {
|
|
1964
1964
|
class: "f-combo-list-container",
|
|
1965
1965
|
style: r.value
|
|
@@ -1975,67 +1975,67 @@ const ue = {
|
|
|
1975
1975
|
textField: e.textField,
|
|
1976
1976
|
titleField: e.titleField,
|
|
1977
1977
|
multiSelect: e.multiSelect,
|
|
1978
|
-
selection:
|
|
1978
|
+
selection: y.value,
|
|
1979
1979
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1980
|
-
selectionValues:
|
|
1981
|
-
onSelectionUpdate:
|
|
1982
|
-
onAfterSearch:
|
|
1980
|
+
selectionValues: k.value,
|
|
1981
|
+
onSelectionUpdate: c,
|
|
1982
|
+
onAfterSearch: a
|
|
1983
1983
|
}, null)]);
|
|
1984
1984
|
}
|
|
1985
1985
|
});
|
|
1986
|
-
function
|
|
1987
|
-
const { t } = ae(), n =
|
|
1986
|
+
function An(e) {
|
|
1987
|
+
const { t } = ae(), n = F(""), i = F(e.modelValue), m = F(e.data || []), v = F(e.editable);
|
|
1988
1988
|
function f(o) {
|
|
1989
|
-
const
|
|
1990
|
-
return m.value.filter((
|
|
1991
|
-
const g =
|
|
1992
|
-
return g -
|
|
1989
|
+
const c = e.multiSelect ? String(o).split(e.separator) : [String(o)], a = c.map((h) => [h, !0]), l = new Map(a);
|
|
1990
|
+
return m.value.filter((h) => l.has(String(h[e.valueField]))).sort((h, u) => {
|
|
1991
|
+
const g = c.indexOf(h[e.valueField]), B = c.indexOf(u[e.valueField]);
|
|
1992
|
+
return g - B;
|
|
1993
1993
|
});
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1996
|
-
const
|
|
1997
|
-
n.value = v.value ?
|
|
1995
|
+
function b(o) {
|
|
1996
|
+
const c = f(o).map((a) => a[e.textField]).join(e.separator);
|
|
1997
|
+
n.value = v.value ? c || o : c;
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function k(o) {
|
|
2000
2000
|
if (e.multiSelect) {
|
|
2001
|
-
const
|
|
2002
|
-
return m.value.filter((
|
|
2001
|
+
const c = o.split(e.separator).map((l) => [l, !0]), a = new Map(c);
|
|
2002
|
+
return m.value.filter((l) => a.has(l[e.textField]));
|
|
2003
2003
|
}
|
|
2004
|
-
return m.value.filter((
|
|
2004
|
+
return m.value.filter((c) => "" + c[e.textField] === o);
|
|
2005
2005
|
}
|
|
2006
2006
|
function p(o) {
|
|
2007
|
-
const
|
|
2008
|
-
return
|
|
2007
|
+
const c = {};
|
|
2008
|
+
return c[e.idField] = o, c[e.textField] = o, [c];
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2011
|
-
let
|
|
2012
|
-
const
|
|
2013
|
-
return v.value && !
|
|
2010
|
+
function y(o) {
|
|
2011
|
+
let c = k(o);
|
|
2012
|
+
const a = c && c.length > 0;
|
|
2013
|
+
return v.value && !a && (c = p(o)), c;
|
|
2014
2014
|
}
|
|
2015
2015
|
function r() {
|
|
2016
|
-
const { url: o, method:
|
|
2017
|
-
let
|
|
2018
|
-
fetch(new Request(o,
|
|
2019
|
-
var
|
|
2020
|
-
if (
|
|
2021
|
-
return
|
|
2022
|
-
throw
|
|
2023
|
-
}).then((
|
|
2024
|
-
|
|
2025
|
-
}).catch((
|
|
2026
|
-
console.warn(
|
|
2016
|
+
const { url: o, method: c = "GET", headers: a = { "Content-Type": "application/json;charset=utf-8;" }, body: l = null } = e.remote, s = c.toLowerCase() === "get" ? { method: c, headers: a } : { method: c, headers: a, body: l };
|
|
2017
|
+
let h = !1;
|
|
2018
|
+
fetch(new Request(o, s)).then((u) => {
|
|
2019
|
+
var B, E;
|
|
2020
|
+
if (u.status === 200)
|
|
2021
|
+
return h = !!((E = (B = u.headers) == null ? void 0 : B.get("content-type")) != null && E.includes("application/json")), h ? u.text() : u.json();
|
|
2022
|
+
throw u.status === 405 ? new Error(t("comboList.remoteError")) : new Error(u.statusText);
|
|
2023
|
+
}).then((u) => {
|
|
2024
|
+
u.length && (m.value = h ? JSON.parse(u) : u);
|
|
2025
|
+
}).catch((u) => {
|
|
2026
|
+
console.warn(u);
|
|
2027
2027
|
});
|
|
2028
2028
|
}
|
|
2029
2029
|
return e.remote && r(), G(() => e.data, () => {
|
|
2030
2030
|
m.value = e.data;
|
|
2031
2031
|
}), G([m], ([o]) => {
|
|
2032
2032
|
if (e.modelValue != null) {
|
|
2033
|
-
const
|
|
2034
|
-
|
|
2033
|
+
const c = o.find((a) => a[e.valueField] === e.modelValue);
|
|
2034
|
+
c && (n.value = c[e.textField]);
|
|
2035
2035
|
}
|
|
2036
2036
|
}), G(() => e.modelValue, (o) => {
|
|
2037
|
-
i.value = o,
|
|
2038
|
-
}),
|
|
2037
|
+
i.value = o, b(o);
|
|
2038
|
+
}), b(e.modelValue), { dataSource: m, displayText: n, editable: v, modelValue: i, getItemsByDisplayText: k, getItemsByValue: f, getSelectedItemsByDisplayText: y };
|
|
2039
2039
|
}
|
|
2040
2040
|
const Q = /* @__PURE__ */ q({
|
|
2041
2041
|
name: "FComboList",
|
|
@@ -2044,69 +2044,71 @@ const Q = /* @__PURE__ */ q({
|
|
|
2044
2044
|
setup(e, t) {
|
|
2045
2045
|
const {
|
|
2046
2046
|
t: n
|
|
2047
|
-
} = ae(), i =
|
|
2047
|
+
} = ae(), i = F(), m = F(), v = F(e.disabled || e.readonly), f = F(e.enableClear), b = F(e.enableSearch), k = F(e.readonly), {
|
|
2048
2048
|
dataSource: p,
|
|
2049
|
-
displayText:
|
|
2049
|
+
displayText: y,
|
|
2050
2050
|
editable: r,
|
|
2051
2051
|
modelValue: o,
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2052
|
+
getSelectedItemsByDisplayText: c,
|
|
2053
|
+
getItemsByDisplayText: a,
|
|
2054
|
+
getItemsByValue: l
|
|
2055
|
+
} = An(e), s = F(e.dropDownIcon);
|
|
2056
|
+
s.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (s.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
2057
|
+
const h = L(() => e.multiSelect), u = L(() => m.value ? m.value.elementRef.getBoundingClientRect().width : 0);
|
|
2058
|
+
function g() {
|
|
2059
|
+
!h.value && m.value && m.value.hidePopup();
|
|
2058
2060
|
}
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2061
|
-
let
|
|
2062
|
-
|
|
2061
|
+
function B(I) {
|
|
2062
|
+
y.value = I.map((w) => w[e.textField]).join(e.separator);
|
|
2063
|
+
let S = "";
|
|
2064
|
+
I.length === 1 ? S = I[0][e.valueField] : S = I.map((w) => w[e.valueField]).join(e.separator), o.value !== S && (o.value = S, t.emit("update:modelValue", o.value), t.emit("change", I, o.value));
|
|
2063
2065
|
}
|
|
2064
|
-
function
|
|
2065
|
-
const
|
|
2066
|
-
|
|
2066
|
+
function E() {
|
|
2067
|
+
const I = l(o.value);
|
|
2068
|
+
B(I);
|
|
2067
2069
|
}
|
|
2068
|
-
function
|
|
2069
|
-
|
|
2070
|
+
function O() {
|
|
2071
|
+
k.value || y.value;
|
|
2070
2072
|
}
|
|
2071
|
-
function
|
|
2072
|
-
var
|
|
2073
|
-
o.value = "", (
|
|
2073
|
+
function P(I) {
|
|
2074
|
+
var S;
|
|
2075
|
+
o.value = "", (S = i.value) == null || S.activeRowById(""), t.emit("update:modelValue", ""), t.emit("change", [], ""), t.emit("clear");
|
|
2074
2076
|
}
|
|
2075
|
-
function
|
|
2076
|
-
var
|
|
2077
|
-
e.enableSearch && e.enableHighlightSearch && ((
|
|
2077
|
+
function R(I) {
|
|
2078
|
+
var S, w;
|
|
2079
|
+
e.enableSearch && e.enableHighlightSearch && ((S = i.value) == null || S.search(I)), (w = i.value) == null || w.activeRowById(I), t.emit("change", [o.value], o.value);
|
|
2078
2080
|
}
|
|
2079
|
-
function
|
|
2081
|
+
function d(I) {
|
|
2080
2082
|
if (e.multiSelect) {
|
|
2081
|
-
const
|
|
2082
|
-
o.value !==
|
|
2083
|
+
const S = l(o.value), V = S.map((j) => j[e.idField || e.valueField]).join(e.separator);
|
|
2084
|
+
o.value !== V && (o.value = V, t.emit("update:modelValue", o.value), t.emit("change", S, o.value));
|
|
2083
2085
|
}
|
|
2084
2086
|
}
|
|
2085
|
-
function
|
|
2086
|
-
return
|
|
2087
|
+
function M() {
|
|
2088
|
+
return y.value;
|
|
2087
2089
|
}
|
|
2088
|
-
function
|
|
2090
|
+
function A(I) {
|
|
2089
2091
|
const {
|
|
2090
|
-
value:
|
|
2091
|
-
} =
|
|
2092
|
-
|
|
2092
|
+
value: S
|
|
2093
|
+
} = I.target;
|
|
2094
|
+
R(S), t.emit("input", S);
|
|
2093
2095
|
}
|
|
2094
|
-
function
|
|
2096
|
+
function T() {
|
|
2095
2097
|
m.value.hidePopup();
|
|
2096
2098
|
}
|
|
2097
2099
|
return t.expose({
|
|
2098
|
-
getDisplayText:
|
|
2099
|
-
hidePopup:
|
|
2100
|
-
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
2101
|
-
v.value =
|
|
2100
|
+
getDisplayText: M,
|
|
2101
|
+
hidePopup: T
|
|
2102
|
+
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([I, S, w, V, j]) => {
|
|
2103
|
+
v.value = I, r.value = S, f.value = w, b.value = V, k.value = j;
|
|
2102
2104
|
}), () => C(ft, {
|
|
2103
2105
|
ref: m,
|
|
2104
2106
|
id: e.id,
|
|
2105
2107
|
disable: v.value,
|
|
2106
|
-
readonly:
|
|
2108
|
+
readonly: k.value,
|
|
2107
2109
|
forcePlaceholder: e.forcePlaceholder,
|
|
2108
2110
|
editable: r.value,
|
|
2109
|
-
buttonContent:
|
|
2111
|
+
buttonContent: s.value,
|
|
2110
2112
|
placeholder: e.placeholder === "请选择" ? n("comboList.placeholder") : e.placeholder,
|
|
2111
2113
|
enableClear: f.value,
|
|
2112
2114
|
maxLength: e.maxLength,
|
|
@@ -2114,15 +2116,15 @@ const Q = /* @__PURE__ */ q({
|
|
|
2114
2116
|
enableTitle: e.enableTitle,
|
|
2115
2117
|
multiSelect: e.multiSelect,
|
|
2116
2118
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
2117
|
-
modelValue:
|
|
2118
|
-
"onUpdate:modelValue": (
|
|
2119
|
+
modelValue: y.value,
|
|
2120
|
+
"onUpdate:modelValue": (I) => y.value = I,
|
|
2119
2121
|
focusOnCreated: e.focusOnCreated,
|
|
2120
2122
|
selectOnCreated: e.selectOnCreated,
|
|
2121
|
-
onClear:
|
|
2122
|
-
onClick:
|
|
2123
|
-
onChange:
|
|
2124
|
-
onBlur:
|
|
2125
|
-
onInput:
|
|
2123
|
+
onClear: P,
|
|
2124
|
+
onClick: O,
|
|
2125
|
+
onChange: d,
|
|
2126
|
+
onBlur: E,
|
|
2127
|
+
onInput: A,
|
|
2126
2128
|
beforeOpen: e.beforeOpen,
|
|
2127
2129
|
placement: e.placement,
|
|
2128
2130
|
popupMinWidth: e.minPanelWidth,
|
|
@@ -2130,7 +2132,7 @@ const Q = /* @__PURE__ */ q({
|
|
|
2130
2132
|
popupOnClick: e.popupOnClick,
|
|
2131
2133
|
limitContentBySpace: !0
|
|
2132
2134
|
}, {
|
|
2133
|
-
default: () => [C(
|
|
2135
|
+
default: () => [C($n, {
|
|
2134
2136
|
ref: i,
|
|
2135
2137
|
idField: e.idField,
|
|
2136
2138
|
valueField: e.valueField,
|
|
@@ -2140,12 +2142,12 @@ const Q = /* @__PURE__ */ q({
|
|
|
2140
2142
|
selectedValues: o.value,
|
|
2141
2143
|
separator: e.separator,
|
|
2142
2144
|
multiSelect: e.multiSelect,
|
|
2143
|
-
enableSearch:
|
|
2145
|
+
enableSearch: b.value,
|
|
2144
2146
|
maxHeight: e.maxHeight,
|
|
2145
2147
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
2146
2148
|
width: e.fitEditor ? u.value : void 0,
|
|
2147
|
-
onSelectionChange: (
|
|
2148
|
-
|
|
2149
|
+
onSelectionChange: (I) => {
|
|
2150
|
+
B(I), g();
|
|
2149
2151
|
}
|
|
2150
2152
|
}, null)]
|
|
2151
2153
|
});
|
|
@@ -2161,7 +2163,7 @@ class xn extends bt {
|
|
|
2161
2163
|
super(t, n);
|
|
2162
2164
|
}
|
|
2163
2165
|
getCommonEditorProperties(t) {
|
|
2164
|
-
var n, i, m, v, f,
|
|
2166
|
+
var n, i, m, v, f, b;
|
|
2165
2167
|
return {
|
|
2166
2168
|
viewType: {
|
|
2167
2169
|
visible: !!((n = t.editor) != null && n.multiSelect),
|
|
@@ -2198,7 +2200,7 @@ class xn extends bt {
|
|
|
2198
2200
|
readonly: !!((v = t.editor) != null && v.multiSelect) && (((f = t.editor) == null ? void 0 : f.viewType) === "tag" || !t.editor.viewType)
|
|
2199
2201
|
},
|
|
2200
2202
|
enableHighlightSearch: {
|
|
2201
|
-
visible: !!((
|
|
2203
|
+
visible: !!((b = t.editor) != null && b.editable),
|
|
2202
2204
|
description: "编辑状态下启用高亮搜索",
|
|
2203
2205
|
title: "启用高亮搜索",
|
|
2204
2206
|
type: "boolean"
|
|
@@ -2210,8 +2212,8 @@ class xn extends bt {
|
|
|
2210
2212
|
const n = this;
|
|
2211
2213
|
let i = "";
|
|
2212
2214
|
if (((v = t == null ? void 0 : t.binding) == null ? void 0 : v.type) === "Form") {
|
|
2213
|
-
const
|
|
2214
|
-
(f =
|
|
2215
|
+
const b = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
2216
|
+
(f = b == null ? void 0 : b.schemaField) != null && f.type && (i = b.schemaField.type.$type);
|
|
2215
2217
|
}
|
|
2216
2218
|
return n.getComponentConfig(t, { type: "combo-list" }, {
|
|
2217
2219
|
// enableSearch: {
|
|
@@ -2305,31 +2307,31 @@ class xn extends bt {
|
|
|
2305
2307
|
}
|
|
2306
2308
|
},
|
|
2307
2309
|
...this.getCommonEditorProperties(t)
|
|
2308
|
-
}, (
|
|
2309
|
-
if (!
|
|
2310
|
+
}, (b, k) => {
|
|
2311
|
+
if (!b || !k.editor)
|
|
2310
2312
|
return;
|
|
2311
2313
|
const p = this;
|
|
2312
|
-
switch (
|
|
2314
|
+
switch (b.propertyID) {
|
|
2313
2315
|
case "dataSourceType": {
|
|
2314
|
-
|
|
2316
|
+
b.propertyValue === "static" ? (k.editor.valueField = "value", k.editor.textField = "name", k.editor.remote = null) : b.propertyValue === "dynamic" && (k.editor.remote = { method: "GET" }, k.editor.valueField = "value", k.editor.textField = "name");
|
|
2315
2317
|
break;
|
|
2316
2318
|
}
|
|
2317
2319
|
case "data": {
|
|
2318
|
-
!p.checkEnumDataReadonly(
|
|
2320
|
+
!p.checkEnumDataReadonly(k) && k.formatter && (k.formatter.data = [...b.propertyValue]);
|
|
2319
2321
|
break;
|
|
2320
2322
|
}
|
|
2321
2323
|
case "viewType":
|
|
2322
|
-
|
|
2324
|
+
b.propertyValue === "tag" && (k.editor.editable = !1);
|
|
2323
2325
|
}
|
|
2324
2326
|
});
|
|
2325
2327
|
}
|
|
2326
2328
|
getGridFieldEdtiorProperties(t, n) {
|
|
2327
|
-
var f,
|
|
2329
|
+
var f, b, k, p;
|
|
2328
2330
|
const i = this;
|
|
2329
2331
|
let m = "";
|
|
2330
2332
|
if (((f = t == null ? void 0 : t.binding) == null ? void 0 : f.type) === "Form") {
|
|
2331
|
-
const
|
|
2332
|
-
(
|
|
2333
|
+
const y = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
2334
|
+
(b = y == null ? void 0 : y.schemaField) != null && b.type && (m = y.schemaField.type.$type);
|
|
2333
2335
|
}
|
|
2334
2336
|
return i.getComponentConfig(t, { type: "combo-list" }, {
|
|
2335
2337
|
// editable: {
|
|
@@ -2348,7 +2350,7 @@ class xn extends bt {
|
|
|
2348
2350
|
title: "数据",
|
|
2349
2351
|
type: "array",
|
|
2350
2352
|
visible: !0,
|
|
2351
|
-
...i.getItemCollectionEditor(t, (
|
|
2353
|
+
...i.getItemCollectionEditor(t, (k = t.editor) == null ? void 0 : k.valueField, (p = t.editor) == null ? void 0 : p.textField),
|
|
2352
2354
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2353
2355
|
refreshPanelAfterChanged: !0
|
|
2354
2356
|
},
|
|
@@ -2382,17 +2384,17 @@ class xn extends bt {
|
|
|
2382
2384
|
}
|
|
2383
2385
|
},
|
|
2384
2386
|
...this.getCommonEditorProperties(t)
|
|
2385
|
-
}, (
|
|
2386
|
-
if (!
|
|
2387
|
+
}, (y, r) => {
|
|
2388
|
+
if (!y || !r.editor)
|
|
2387
2389
|
return;
|
|
2388
2390
|
const o = this;
|
|
2389
|
-
switch (
|
|
2391
|
+
switch (y.propertyID) {
|
|
2390
2392
|
case "dataSourceType": {
|
|
2391
|
-
|
|
2393
|
+
y.propertyValue === "static" ? (r.editor.valueField = "value", r.editor.textField = "name", r.editor.remote = null) : y.propertyValue === "dynamic" && (r.editor.remote = { method: "GET" });
|
|
2392
2394
|
break;
|
|
2393
2395
|
}
|
|
2394
2396
|
case "data": {
|
|
2395
|
-
!o.checkEnumDataReadonly(r) && r.formatter && (r.formatter.data = [...
|
|
2397
|
+
!o.checkEnumDataReadonly(r) && r.formatter && (r.formatter.data = [...y.propertyValue]);
|
|
2396
2398
|
break;
|
|
2397
2399
|
}
|
|
2398
2400
|
}
|
|
@@ -2434,10 +2436,10 @@ function Hn(e, t) {
|
|
|
2434
2436
|
}
|
|
2435
2437
|
const Nn = /* @__PURE__ */ q({
|
|
2436
2438
|
name: "FComboListDesign",
|
|
2437
|
-
props:
|
|
2439
|
+
props: Dn,
|
|
2438
2440
|
emits: ["clear", "update:modelValue", "change"],
|
|
2439
2441
|
setup(e, t) {
|
|
2440
|
-
const n =
|
|
2442
|
+
const n = F(), i = ie("designer-host-service"), m = ie("design-item-context"), v = Hn(m, i), f = yt(n, m, v);
|
|
2441
2443
|
return le(() => {
|
|
2442
2444
|
n.value.componentInstance = f;
|
|
2443
2445
|
}), t.expose(f.value), () => C(ht, {
|
|
@@ -2452,63 +2454,63 @@ const Nn = /* @__PURE__ */ q({
|
|
|
2452
2454
|
}
|
|
2453
2455
|
});
|
|
2454
2456
|
Q.register = (e, t, n, i) => {
|
|
2455
|
-
e["combo-list"] = Q, t["combo-list"] =
|
|
2457
|
+
e["combo-list"] = Q, t["combo-list"] = Me;
|
|
2456
2458
|
};
|
|
2457
2459
|
Q.registerDesigner = (e, t, n) => {
|
|
2458
|
-
e["combo-list"] = Nn, t["combo-list"] =
|
|
2460
|
+
e["combo-list"] = Nn, t["combo-list"] = Me;
|
|
2459
2461
|
};
|
|
2460
2462
|
const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
2461
2463
|
name: "FOrder",
|
|
2462
2464
|
props: ce,
|
|
2463
2465
|
emits: ["change"],
|
|
2464
2466
|
setup(e, t) {
|
|
2465
|
-
const n =
|
|
2467
|
+
const n = F(), i = F(e.items);
|
|
2466
2468
|
function m() {
|
|
2467
2469
|
var g;
|
|
2468
|
-
const
|
|
2469
|
-
i.value = [...
|
|
2470
|
+
const u = Array.isArray(e.items) ? e.items : [];
|
|
2471
|
+
i.value = [...u], (g = n.value) == null || g.updateDataSource(i.value);
|
|
2470
2472
|
}
|
|
2471
2473
|
G(() => e.items, m);
|
|
2472
|
-
const v =
|
|
2474
|
+
const v = F("排序列"), f = F("排序方式"), b = F("添加排序列"), k = [{
|
|
2473
2475
|
id: "asc",
|
|
2474
2476
|
name: "升序"
|
|
2475
2477
|
}, {
|
|
2476
2478
|
id: "desc",
|
|
2477
2479
|
name: "降序"
|
|
2478
|
-
}], p =
|
|
2479
|
-
function
|
|
2480
|
-
const
|
|
2481
|
-
p.value = new Map(
|
|
2480
|
+
}], p = F(/* @__PURE__ */ new Map());
|
|
2481
|
+
function y() {
|
|
2482
|
+
const u = i.value.map((g) => [g.id, !0]);
|
|
2483
|
+
p.value = new Map(u);
|
|
2482
2484
|
}
|
|
2483
|
-
|
|
2484
|
-
const r =
|
|
2485
|
+
y();
|
|
2486
|
+
const r = L(() => e.dataSource.map((u) => (u.disabled = p.value.has(u.id), u))), o = L(() => ({
|
|
2485
2487
|
"f-order": !0
|
|
2486
2488
|
}));
|
|
2487
|
-
function
|
|
2488
|
-
i.value = i.value.filter((g) => g.id !==
|
|
2489
|
+
function c(u) {
|
|
2490
|
+
i.value = i.value.filter((g) => g.id !== u.id), y(), t.emit("change", i.value);
|
|
2489
2491
|
}
|
|
2490
|
-
function
|
|
2492
|
+
function a() {
|
|
2491
2493
|
i.value = [...i.value, {
|
|
2492
2494
|
id: Date.now().toString(),
|
|
2493
2495
|
name: "",
|
|
2494
2496
|
order: "asc"
|
|
2495
|
-
}],
|
|
2497
|
+
}], y(), t.emit("change", i.value);
|
|
2496
2498
|
}
|
|
2497
|
-
function
|
|
2498
|
-
if (
|
|
2499
|
-
const g =
|
|
2500
|
-
|
|
2499
|
+
function l(u) {
|
|
2500
|
+
if (u && u.length === 1) {
|
|
2501
|
+
const g = u[0], B = i.value.find((E) => E.id === g.id);
|
|
2502
|
+
B && (B.name = g.name);
|
|
2501
2503
|
}
|
|
2502
|
-
|
|
2504
|
+
y(), t.emit("change", i.value);
|
|
2503
2505
|
}
|
|
2504
|
-
function u
|
|
2505
|
-
if (
|
|
2506
|
+
function s(u) {
|
|
2507
|
+
if (u && u.length) {
|
|
2506
2508
|
const g = /* @__PURE__ */ new Map();
|
|
2507
|
-
|
|
2509
|
+
u.reduce((B, E) => (B.set(E.id, E), B), g), i.value = u.map((B) => g.get(B.id)), t.emit("change", i.value);
|
|
2508
2510
|
}
|
|
2509
2511
|
}
|
|
2510
|
-
function
|
|
2511
|
-
return C(
|
|
2512
|
+
function h() {
|
|
2513
|
+
return C(Be, {
|
|
2512
2514
|
ref: n,
|
|
2513
2515
|
style: "flex:1",
|
|
2514
2516
|
data: i.value,
|
|
@@ -2516,8 +2518,8 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2516
2518
|
view: "DraggableView",
|
|
2517
2519
|
"keep-order": !0,
|
|
2518
2520
|
itemClass: "f-order-item",
|
|
2519
|
-
onRemoveItem:
|
|
2520
|
-
onChange:
|
|
2521
|
+
onRemoveItem: c,
|
|
2522
|
+
onChange: s
|
|
2521
2523
|
}, {
|
|
2522
2524
|
header: () => C("div", {
|
|
2523
2525
|
class: "f-order-header"
|
|
@@ -2526,7 +2528,7 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2526
2528
|
}, [v.value]), C("span", {
|
|
2527
2529
|
class: "f-order-header-order-type"
|
|
2528
2530
|
}, [f.value])]),
|
|
2529
|
-
itemContent: (
|
|
2531
|
+
itemContent: (u) => C("div", {
|
|
2530
2532
|
class: "f-order-item-content"
|
|
2531
2533
|
}, [C(Z, {
|
|
2532
2534
|
class: "f-order-item-content-order-field",
|
|
@@ -2534,180 +2536,180 @@ const Z = We(Q), oe = /* @__PURE__ */ q({
|
|
|
2534
2536
|
valueField: "id",
|
|
2535
2537
|
textField: "name",
|
|
2536
2538
|
idField: "id",
|
|
2537
|
-
modelValue:
|
|
2538
|
-
"onUpdate:modelValue": (g) =>
|
|
2539
|
-
onChange:
|
|
2540
|
-
onClear:
|
|
2539
|
+
modelValue: u.raw.id,
|
|
2540
|
+
"onUpdate:modelValue": (g) => u.raw.id = g,
|
|
2541
|
+
onChange: l,
|
|
2542
|
+
onClear: l
|
|
2541
2543
|
}, null), C(Z, {
|
|
2542
2544
|
class: "f-order-item-content-order-type",
|
|
2543
|
-
data:
|
|
2545
|
+
data: k,
|
|
2544
2546
|
valueField: "id",
|
|
2545
2547
|
textField: "name",
|
|
2546
2548
|
idField: "id",
|
|
2547
|
-
modelValue:
|
|
2548
|
-
"onUpdate:modelValue": (g) =>
|
|
2549
|
-
onChange:
|
|
2549
|
+
modelValue: u.raw.order,
|
|
2550
|
+
"onUpdate:modelValue": (g) => u.raw.order = g,
|
|
2551
|
+
onChange: l
|
|
2550
2552
|
}, null)]),
|
|
2551
2553
|
footer: () => C("div", {
|
|
2552
2554
|
class: "f-order-footer"
|
|
2553
2555
|
}, [C(Ie, {
|
|
2554
2556
|
type: "link",
|
|
2555
2557
|
class: "f-order-add-button",
|
|
2556
|
-
onClick:
|
|
2558
|
+
onClick: a
|
|
2557
2559
|
}, {
|
|
2558
2560
|
default: () => C(U, null, [C("span", {
|
|
2559
2561
|
class: "f-order-add-icon"
|
|
2560
2562
|
}, [C("i", {
|
|
2561
2563
|
class: "f-icon f-icon-add"
|
|
2562
|
-
}, null)]),
|
|
2564
|
+
}, null)]), b.value])
|
|
2563
2565
|
})])
|
|
2564
2566
|
});
|
|
2565
2567
|
}
|
|
2566
2568
|
return () => C("div", {
|
|
2567
2569
|
class: o.value
|
|
2568
|
-
}, [
|
|
2570
|
+
}, [h()]);
|
|
2569
2571
|
}
|
|
2570
2572
|
});
|
|
2571
2573
|
function Gn(e, t, n) {
|
|
2572
|
-
var
|
|
2573
|
-
const i = "", m = "", v =
|
|
2574
|
+
var A;
|
|
2575
|
+
const i = "", m = "", v = F();
|
|
2574
2576
|
let f;
|
|
2575
|
-
function
|
|
2577
|
+
function b() {
|
|
2576
2578
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2577
2579
|
}
|
|
2578
|
-
function
|
|
2580
|
+
function k() {
|
|
2579
2581
|
return !1;
|
|
2580
2582
|
}
|
|
2581
2583
|
function p() {
|
|
2582
2584
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2583
2585
|
}
|
|
2584
|
-
function
|
|
2586
|
+
function y() {
|
|
2585
2587
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
2586
2588
|
}
|
|
2587
|
-
function r(
|
|
2588
|
-
if (!
|
|
2589
|
+
function r(T) {
|
|
2590
|
+
if (!T || !T.value)
|
|
2589
2591
|
return null;
|
|
2590
|
-
if (
|
|
2591
|
-
return
|
|
2592
|
-
const
|
|
2593
|
-
return
|
|
2594
|
-
}
|
|
2595
|
-
function o(
|
|
2596
|
-
var
|
|
2597
|
-
const { componentInstance:
|
|
2598
|
-
if (!
|
|
2592
|
+
if (T.value.schema && T.value.schema.type === "component")
|
|
2593
|
+
return T.value;
|
|
2594
|
+
const I = F(T == null ? void 0 : T.value.parent), S = r(I);
|
|
2595
|
+
return S || null;
|
|
2596
|
+
}
|
|
2597
|
+
function o(T = t) {
|
|
2598
|
+
var V;
|
|
2599
|
+
const { componentInstance: I, designerItemElementRef: S } = T;
|
|
2600
|
+
if (!I || !I.value)
|
|
2599
2601
|
return null;
|
|
2600
|
-
const { getCustomButtons:
|
|
2601
|
-
return
|
|
2602
|
+
const { getCustomButtons: w } = I.value;
|
|
2603
|
+
return I.value.canMove || w && ((V = w()) != null && V.length) ? S : o(T.parent);
|
|
2602
2604
|
}
|
|
2603
|
-
function
|
|
2604
|
-
return
|
|
2605
|
+
function c(T) {
|
|
2606
|
+
return !!n;
|
|
2605
2607
|
}
|
|
2606
|
-
function
|
|
2608
|
+
function a() {
|
|
2607
2609
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2608
2610
|
}
|
|
2609
|
-
function
|
|
2611
|
+
function l() {
|
|
2610
2612
|
}
|
|
2611
|
-
function
|
|
2612
|
-
var
|
|
2613
|
-
!
|
|
2613
|
+
function s(T, I) {
|
|
2614
|
+
var S;
|
|
2615
|
+
!T || !I || (S = t == null ? void 0 : t.setupContext) == null || S.emit("dragEnd");
|
|
2614
2616
|
}
|
|
2615
|
-
function
|
|
2616
|
-
const { componentType:
|
|
2617
|
-
let
|
|
2618
|
-
const
|
|
2619
|
-
return
|
|
2617
|
+
function h(T, I) {
|
|
2618
|
+
const { componentType: S } = T;
|
|
2619
|
+
let w = pt(S, T, I);
|
|
2620
|
+
const V = S.toLowerCase().replace(/-/g, "_");
|
|
2621
|
+
return w && !w.id && w.type === S && (w.id = `${V}_${Math.random().toString().slice(2, 6)}`), w;
|
|
2620
2622
|
}
|
|
2621
|
-
function
|
|
2623
|
+
function u(T) {
|
|
2622
2624
|
}
|
|
2623
|
-
function g(...
|
|
2625
|
+
function g(...T) {
|
|
2624
2626
|
}
|
|
2625
|
-
function
|
|
2626
|
-
if (!
|
|
2627
|
+
function B(T) {
|
|
2628
|
+
if (!T)
|
|
2627
2629
|
return;
|
|
2628
|
-
const
|
|
2629
|
-
if (
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2630
|
+
const I = t == null ? void 0 : t.schema, { formSchemaUtils: S } = T;
|
|
2631
|
+
if (I && S.getExpressions().length) {
|
|
2632
|
+
const w = S.getExpressions().findIndex((V) => V.target === I.id);
|
|
2633
|
+
w > -1 && S.getExpressions().splice(w, 1);
|
|
2632
2634
|
}
|
|
2633
2635
|
}
|
|
2634
|
-
function
|
|
2635
|
-
if (!
|
|
2636
|
+
function E(T) {
|
|
2637
|
+
if (!T || !(t != null && t.schema))
|
|
2636
2638
|
return;
|
|
2637
|
-
const
|
|
2638
|
-
|
|
2639
|
-
}
|
|
2640
|
-
function O(
|
|
2641
|
-
|
|
2642
|
-
let
|
|
2643
|
-
|
|
2644
|
-
const
|
|
2645
|
-
|
|
2646
|
-
var
|
|
2647
|
-
(
|
|
2639
|
+
const I = t.schema, { formSchemaUtils: S } = T;
|
|
2640
|
+
S.removeCommunicationInComponent(I);
|
|
2641
|
+
}
|
|
2642
|
+
function O(T) {
|
|
2643
|
+
B(T), E(T), t != null && t.schema.contents && t.schema.contents.map((I) => {
|
|
2644
|
+
let S = I.id;
|
|
2645
|
+
I.type === "component-ref" && (S = I.component);
|
|
2646
|
+
const w = e.value.querySelectorAll(`#${S}-design-item`);
|
|
2647
|
+
w != null && w.length && Array.from(w).map((V) => {
|
|
2648
|
+
var j;
|
|
2649
|
+
(j = V == null ? void 0 : V.componentInstance) != null && j.value.onRemoveComponent && V.componentInstance.value.onRemoveComponent(T);
|
|
2648
2650
|
});
|
|
2649
2651
|
});
|
|
2650
2652
|
}
|
|
2651
|
-
function
|
|
2653
|
+
function P() {
|
|
2652
2654
|
}
|
|
2653
|
-
function
|
|
2654
|
-
var
|
|
2655
|
-
if (!((
|
|
2655
|
+
function R(T) {
|
|
2656
|
+
var S, w;
|
|
2657
|
+
if (!((S = t == null ? void 0 : t.schema) != null && S.id))
|
|
2656
2658
|
return;
|
|
2657
|
-
!f &&
|
|
2658
|
-
let
|
|
2659
|
+
!f && T && (f = T.formSchemaUtils);
|
|
2660
|
+
let I = "";
|
|
2659
2661
|
{
|
|
2660
|
-
const { text:
|
|
2661
|
-
|
|
2662
|
+
const { text: V, title: j, label: D, mainTitle: x, name: H, type: _ } = t.schema;
|
|
2663
|
+
I = V || j || D || x || H || ((w = Ce[_]) == null ? void 0 : w.name);
|
|
2662
2664
|
}
|
|
2663
|
-
|
|
2664
|
-
componentTitle:
|
|
2665
|
-
parentPathName:
|
|
2665
|
+
I && f.getControlBasicInfoMap().set(t.schema.id, {
|
|
2666
|
+
componentTitle: I,
|
|
2667
|
+
parentPathName: I
|
|
2666
2668
|
});
|
|
2667
2669
|
}
|
|
2668
|
-
function d(
|
|
2669
|
-
var
|
|
2670
|
-
const { changeObject:
|
|
2671
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
2672
|
-
const
|
|
2670
|
+
function d(T) {
|
|
2671
|
+
var V;
|
|
2672
|
+
const { changeObject: I } = T, { propertyID: S, propertyValue: w } = I;
|
|
2673
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((V = T == null ? void 0 : T.changeObject) == null ? void 0 : V.propertyID) && S && w && (R(), f)) {
|
|
2674
|
+
const j = f.getControlBasicInfoMap(), D = j.keys().toArray().filter((x) => {
|
|
2673
2675
|
var H, _;
|
|
2674
|
-
return ((H =
|
|
2676
|
+
return ((H = j.get(x)) == null ? void 0 : H.reliedComponentId) === ((_ = t == null ? void 0 : t.schema) == null ? void 0 : _.id);
|
|
2675
2677
|
});
|
|
2676
|
-
|
|
2677
|
-
const H =
|
|
2678
|
-
H[0] =
|
|
2678
|
+
D != null && D.length && D.forEach((x) => {
|
|
2679
|
+
const H = j.get(x).parentPathName.split(" > ");
|
|
2680
|
+
H[0] = w, j.get(x).parentPathName = H.join(" > ");
|
|
2679
2681
|
});
|
|
2680
2682
|
}
|
|
2681
2683
|
}
|
|
2682
|
-
function
|
|
2683
|
-
d(
|
|
2684
|
+
function M(T) {
|
|
2685
|
+
d(T);
|
|
2684
2686
|
}
|
|
2685
2687
|
return v.value = {
|
|
2686
|
-
canMove:
|
|
2687
|
-
canSelectParent:
|
|
2688
|
+
canMove: b(),
|
|
2689
|
+
canSelectParent: k(),
|
|
2688
2690
|
canDelete: p(),
|
|
2689
|
-
canNested: !
|
|
2691
|
+
canNested: !y(),
|
|
2690
2692
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2691
2693
|
elementRef: e,
|
|
2692
|
-
parent: (
|
|
2694
|
+
parent: (A = t == null ? void 0 : t.parent) == null ? void 0 : A.componentInstance,
|
|
2693
2695
|
schema: t == null ? void 0 : t.schema,
|
|
2694
2696
|
styles: i,
|
|
2695
2697
|
designerClass: m,
|
|
2696
|
-
canAccepts:
|
|
2698
|
+
canAccepts: c,
|
|
2697
2699
|
getBelongedComponentInstance: r,
|
|
2698
2700
|
getDraggableDesignItemElement: o,
|
|
2699
|
-
getDraggingDisplayText:
|
|
2701
|
+
getDraggingDisplayText: a,
|
|
2700
2702
|
getPropConfig: g,
|
|
2701
|
-
getDragScopeElement:
|
|
2702
|
-
onAcceptMovedChildElement:
|
|
2703
|
-
onChildElementMovedOut:
|
|
2704
|
-
addNewChildComponentSchema:
|
|
2705
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2706
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2703
|
+
getDragScopeElement: l,
|
|
2704
|
+
onAcceptMovedChildElement: s,
|
|
2705
|
+
onChildElementMovedOut: u,
|
|
2706
|
+
addNewChildComponentSchema: h,
|
|
2707
|
+
triggerBelongedComponentToMoveWhenMoved: F(!1),
|
|
2708
|
+
triggerBelongedComponentToDeleteWhenDeleted: F(!1),
|
|
2707
2709
|
onRemoveComponent: O,
|
|
2708
|
-
getCustomButtons:
|
|
2709
|
-
onPropertyChanged:
|
|
2710
|
-
setComponentBasicInfoMap:
|
|
2710
|
+
getCustomButtons: P,
|
|
2711
|
+
onPropertyChanged: M,
|
|
2712
|
+
setComponentBasicInfoMap: R,
|
|
2711
2713
|
updateContextSchema: t == null ? void 0 : t.updateContextSchema
|
|
2712
2714
|
}, v;
|
|
2713
2715
|
}
|
|
@@ -2716,53 +2718,53 @@ const _n = /* @__PURE__ */ q({
|
|
|
2716
2718
|
props: ce,
|
|
2717
2719
|
emits: ["change"],
|
|
2718
2720
|
setup(e, t) {
|
|
2719
|
-
const n =
|
|
2721
|
+
const n = F(e.items), i = F("排序列"), m = F("排序方式"), v = F("添加排序列"), f = [{
|
|
2720
2722
|
id: "asc",
|
|
2721
2723
|
name: "升序"
|
|
2722
2724
|
}, {
|
|
2723
2725
|
id: "desc",
|
|
2724
2726
|
name: "降序"
|
|
2725
|
-
}],
|
|
2727
|
+
}], b = F(/* @__PURE__ */ new Map()), k = F(), p = ie("design-item-context"), y = Gn(k, p);
|
|
2726
2728
|
le(() => {
|
|
2727
|
-
|
|
2728
|
-
}), t.expose(
|
|
2729
|
+
k.value.componentInstance = y;
|
|
2730
|
+
}), t.expose(y.value);
|
|
2729
2731
|
function r() {
|
|
2730
|
-
const g = n.value.map((
|
|
2731
|
-
|
|
2732
|
+
const g = n.value.map((B) => [B.id, !0]);
|
|
2733
|
+
b.value = new Map(g);
|
|
2732
2734
|
}
|
|
2733
2735
|
r();
|
|
2734
|
-
const o =
|
|
2736
|
+
const o = L(() => e.dataSource.map((g) => (g.disabled = b.value.has(g.id), g))), c = L(() => ({
|
|
2735
2737
|
"f-order": !0
|
|
2736
2738
|
}));
|
|
2737
|
-
function
|
|
2738
|
-
n.value = n.value.filter((
|
|
2739
|
+
function a(g) {
|
|
2740
|
+
n.value = n.value.filter((B) => B.id !== g.id), r(), t.emit("change", n.value);
|
|
2739
2741
|
}
|
|
2740
|
-
function
|
|
2742
|
+
function l() {
|
|
2741
2743
|
n.value = [...n.value, {
|
|
2742
2744
|
id: Date.now().toString(),
|
|
2743
2745
|
name: "",
|
|
2744
2746
|
order: "asc"
|
|
2745
2747
|
}], r(), t.emit("change", n.value);
|
|
2746
2748
|
}
|
|
2747
|
-
function
|
|
2749
|
+
function s(g) {
|
|
2748
2750
|
r(), t.emit("change", n.value);
|
|
2749
2751
|
}
|
|
2750
|
-
function
|
|
2752
|
+
function h(g) {
|
|
2751
2753
|
if (g && g.length) {
|
|
2752
|
-
const
|
|
2753
|
-
g.reduce((
|
|
2754
|
+
const B = /* @__PURE__ */ new Map();
|
|
2755
|
+
g.reduce((E, O) => (E.set(O.id, O), E), B), n.value = g.map((E) => B.get(E.id)), t.emit("change", n.value);
|
|
2754
2756
|
}
|
|
2755
2757
|
}
|
|
2756
|
-
function
|
|
2757
|
-
return C(
|
|
2758
|
+
function u() {
|
|
2759
|
+
return C(Be, {
|
|
2758
2760
|
style: "flex:1",
|
|
2759
2761
|
data: n.value,
|
|
2760
2762
|
draggable: !0,
|
|
2761
2763
|
view: "DraggableView",
|
|
2762
2764
|
"keep-order": !0,
|
|
2763
2765
|
itemClass: "f-order-item",
|
|
2764
|
-
onRemoveItem:
|
|
2765
|
-
onChange:
|
|
2766
|
+
onRemoveItem: a,
|
|
2767
|
+
onChange: h
|
|
2766
2768
|
}, {
|
|
2767
2769
|
header: () => C("div", {
|
|
2768
2770
|
class: "f-order-header"
|
|
@@ -2780,9 +2782,9 @@ const _n = /* @__PURE__ */ q({
|
|
|
2780
2782
|
textField: "name",
|
|
2781
2783
|
idField: "id",
|
|
2782
2784
|
modelValue: g.id,
|
|
2783
|
-
"onUpdate:modelValue": (
|
|
2784
|
-
onChange:
|
|
2785
|
-
onClear:
|
|
2785
|
+
"onUpdate:modelValue": (B) => g.id = B,
|
|
2786
|
+
onChange: s,
|
|
2787
|
+
onClear: s
|
|
2786
2788
|
}, null), C(Z, {
|
|
2787
2789
|
class: "f-order-item-content-order-type",
|
|
2788
2790
|
data: f,
|
|
@@ -2790,15 +2792,15 @@ const _n = /* @__PURE__ */ q({
|
|
|
2790
2792
|
textField: "name",
|
|
2791
2793
|
idField: "id",
|
|
2792
2794
|
modelValue: g.order,
|
|
2793
|
-
"onUpdate:modelValue": (
|
|
2794
|
-
onChange:
|
|
2795
|
+
"onUpdate:modelValue": (B) => g.order = B,
|
|
2796
|
+
onChange: s
|
|
2795
2797
|
}, null)]),
|
|
2796
2798
|
footer: () => C("div", {
|
|
2797
2799
|
class: "f-order-footer"
|
|
2798
2800
|
}, [C(Ie, {
|
|
2799
2801
|
type: "link",
|
|
2800
2802
|
class: "f-order-add-button",
|
|
2801
|
-
onClick:
|
|
2803
|
+
onClick: l
|
|
2802
2804
|
}, {
|
|
2803
2805
|
default: () => C(U, null, [C("span", {
|
|
2804
2806
|
class: "f-order-add-icon"
|
|
@@ -2809,11 +2811,11 @@ const _n = /* @__PURE__ */ q({
|
|
|
2809
2811
|
});
|
|
2810
2812
|
}
|
|
2811
2813
|
return () => C("div", {
|
|
2812
|
-
ref:
|
|
2813
|
-
class:
|
|
2814
|
-
}, [
|
|
2814
|
+
ref: k,
|
|
2815
|
+
class: c.value
|
|
2816
|
+
}, [u()]);
|
|
2815
2817
|
}
|
|
2816
|
-
}),
|
|
2818
|
+
}), fo = {
|
|
2817
2819
|
install(e) {
|
|
2818
2820
|
e.component(oe.name, oe);
|
|
2819
2821
|
},
|
|
@@ -2826,7 +2828,7 @@ const _n = /* @__PURE__ */ q({
|
|
|
2826
2828
|
};
|
|
2827
2829
|
export {
|
|
2828
2830
|
oe as FOrder,
|
|
2829
|
-
|
|
2831
|
+
fo as default,
|
|
2830
2832
|
ce as orderProps,
|
|
2831
2833
|
ve as propsResolver
|
|
2832
2834
|
};
|