@farris/ui-vue 1.2.7 → 1.2.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 +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,111 +1,110 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as C, computed as B, createVNode as v, Fragment as Q, watch as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { useIdentify as
|
|
7
|
-
import { FCheckBox as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var Se = Object.defineProperty;
|
|
2
|
+
var ke = (e, t, n) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var L = (e, t, n) => ke(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as C, computed as B, createVNode as v, Fragment as Q, watch as N, withModifiers as Fe, withDirectives as Te, vModelText as Me, defineComponent as H, inject as X, onMounted as ce, nextTick as je } from "vue";
|
|
5
|
+
import { cloneDeep as Ve } from "lodash-es";
|
|
6
|
+
import { useIdentify as De, useHierarchy as Oe, useGroupData as Ie, usePagination as Pe, useDataView as Be, useSelection as Ae, useEdit as $e, useVisualDataBound as xe, useVisualDataCell as Le, useVisualDataRow as Ee, useVisualGroupRow as Ne, useVisualSummaryRow as He, useVisualData as Re } from "../data-view/index.esm.js";
|
|
7
|
+
import { FCheckBox as Y } from "../checkbox/index.esm.js";
|
|
8
|
+
import Ue from "../list-view/index.esm.js";
|
|
9
|
+
import ue from "../button-edit/index.esm.js";
|
|
10
|
+
import { getSchemaByType as re } from "../dynamic-resolver/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as Ge } from "../designer-canvas/index.esm.js";
|
|
12
|
+
const de = {}, pe = {};
|
|
13
|
+
function Z(e) {
|
|
14
|
+
const { properties: t, title: n } = e, o = Object.keys(t).reduce((c, l) => (c[l] = t[l].type === "object" && t[l].properties ? Z(t[l]) : Ve(t[l].default), c), {});
|
|
14
15
|
return o.id = `${n}-${Date.now()}`, o;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
const n =
|
|
17
|
+
function U(e, t = {}) {
|
|
18
|
+
const n = de[e];
|
|
18
19
|
if (n) {
|
|
19
|
-
let o =
|
|
20
|
-
const c =
|
|
21
|
-
return o = c ? c({ getSchemaByType:
|
|
20
|
+
let o = Z(n);
|
|
21
|
+
const c = pe[e];
|
|
22
|
+
return o = c ? c({ getSchemaByType: U }, o, t) : o, o;
|
|
22
23
|
}
|
|
23
24
|
return null;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
const n =
|
|
27
|
-
return Object.keys(e).reduce((o, c) => (o[c] = e[c], o), n), n;
|
|
26
|
+
function _e(e, t) {
|
|
27
|
+
const n = Z(t);
|
|
28
|
+
return Object.keys(e).reduce((o, c) => (o[c] && typeof o[c] == "object" ? Object.assign(o[c], e[c]) : o[c] = e[c], o), n), n;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function qe(e, t) {
|
|
30
31
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, c) => {
|
|
31
32
|
if (t.has(c)) {
|
|
32
|
-
const
|
|
33
|
-
if (typeof
|
|
34
|
-
o[
|
|
33
|
+
const l = t.get(c);
|
|
34
|
+
if (typeof l == "string")
|
|
35
|
+
o[l] = e[c];
|
|
35
36
|
else {
|
|
36
|
-
const
|
|
37
|
-
Object.assign(o,
|
|
37
|
+
const u = l(c, e[c], e);
|
|
38
|
+
Object.assign(o, u);
|
|
38
39
|
}
|
|
39
40
|
} else
|
|
40
41
|
o[c] = e[c];
|
|
41
42
|
return o;
|
|
42
43
|
}, {});
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
const o =
|
|
46
|
-
return
|
|
45
|
+
function We(e, t, n = /* @__PURE__ */ new Map()) {
|
|
46
|
+
const o = _e(e, t);
|
|
47
|
+
return qe(o, n);
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
function t(
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(
|
|
58
|
-
if (
|
|
59
|
-
return Number(
|
|
49
|
+
function ze(e = {}) {
|
|
50
|
+
function t(y, h, i, r) {
|
|
51
|
+
if (typeof i == "number")
|
|
52
|
+
return r[y].length === i;
|
|
53
|
+
if (typeof i == "object") {
|
|
54
|
+
const g = Object.keys(i)[0], a = i[g];
|
|
55
|
+
if (g === "not")
|
|
56
|
+
return Number(r[y].length) !== Number(a);
|
|
57
|
+
if (g === "moreThan")
|
|
58
|
+
return Number(r[y].length) >= Number(a);
|
|
59
|
+
if (g === "lessThan")
|
|
60
|
+
return Number(r[y].length) <= Number(a);
|
|
60
61
|
}
|
|
61
62
|
return !1;
|
|
62
63
|
}
|
|
63
|
-
function n(
|
|
64
|
-
return
|
|
64
|
+
function n(y, h, i, r) {
|
|
65
|
+
return r[y] && r[y].propertyValue && String(r[y].propertyValue.value) === String(i);
|
|
65
66
|
}
|
|
66
67
|
const o = /* @__PURE__ */ new Map([
|
|
67
68
|
["length", t],
|
|
68
69
|
["getProperty", n]
|
|
69
70
|
]);
|
|
70
|
-
Object.keys(e).reduce((
|
|
71
|
-
function c(
|
|
72
|
-
const
|
|
73
|
-
return typeof
|
|
74
|
-
if (
|
|
75
|
-
return { target:
|
|
76
|
-
const
|
|
77
|
-
return { target:
|
|
71
|
+
Object.keys(e).reduce((y, h) => (y.set(h, e[h]), y), o);
|
|
72
|
+
function c(y, h) {
|
|
73
|
+
const i = y;
|
|
74
|
+
return typeof h == "number" ? [{ target: i, operator: "length", param: null, value: Number(h) }] : typeof h == "boolean" ? [{ target: i, operator: "getProperty", param: y, value: !!h }] : typeof h == "object" ? Object.keys(h).map((r) => {
|
|
75
|
+
if (r === "length")
|
|
76
|
+
return { target: i, operator: "length", param: null, value: h[r] };
|
|
77
|
+
const g = r, a = h[r];
|
|
78
|
+
return { target: i, operator: "getProperty", param: g, value: a };
|
|
78
79
|
}) : [];
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
-
return Object.keys(
|
|
82
|
-
const
|
|
83
|
-
return
|
|
81
|
+
function l(y) {
|
|
82
|
+
return Object.keys(y).reduce((i, r) => {
|
|
83
|
+
const g = c(r, y[r]);
|
|
84
|
+
return i.push(...g), i;
|
|
84
85
|
}, []);
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
-
if (o.has(
|
|
88
|
-
const
|
|
89
|
-
return
|
|
87
|
+
function u(y, h) {
|
|
88
|
+
if (o.has(y.operator)) {
|
|
89
|
+
const i = o.get(y.operator);
|
|
90
|
+
return i && i(y.target, y.param, y.value, h) || !1;
|
|
90
91
|
}
|
|
91
92
|
return !1;
|
|
92
93
|
}
|
|
93
|
-
function y
|
|
94
|
-
return
|
|
94
|
+
function f(y, h) {
|
|
95
|
+
return l(y).reduce((g, a) => g && u(a, h), !0);
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
97
|
+
function b(y, h) {
|
|
98
|
+
const i = Object.keys(y), r = i.includes("allOf"), g = i.includes("anyOf"), a = r || g, d = (a ? y[a ? r ? "allOf" : "anyOf" : "allOf"] : [y]).map((F) => f(F, h));
|
|
99
|
+
return r ? !d.includes(!1) : d.includes(!0);
|
|
99
100
|
}
|
|
100
|
-
return { parseValueSchema:
|
|
101
|
+
return { parseValueSchema: b };
|
|
101
102
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
103
|
+
const j = {
|
|
104
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
105
105
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
106
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
106
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
107
107
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
108
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
109
108
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
110
109
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
111
110
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -116,114 +115,43 @@ const M = {
|
|
|
116
115
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
117
116
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
118
117
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
123
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
124
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
118
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
119
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
120
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
125
121
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
126
|
-
|
|
127
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
128
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
129
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
122
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
130
123
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
131
124
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
132
|
-
|
|
133
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
125
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
134
126
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
135
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
136
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
137
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
138
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
139
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
140
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
141
127
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
142
128
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
143
129
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
144
|
-
|
|
145
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
146
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
147
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
148
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
149
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
150
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
130
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
151
131
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
159
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
160
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
161
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
162
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
163
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
164
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
165
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
166
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
167
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
168
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
169
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
170
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
171
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
172
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
173
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
174
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
175
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
176
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
177
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
178
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
179
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
180
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
132
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
133
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
134
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
135
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
136
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
137
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
181
138
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
191
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
192
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
193
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
194
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
195
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
196
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
197
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
198
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
199
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
200
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
201
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
202
|
-
/** 查询类 start */
|
|
203
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
204
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
205
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
206
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
207
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
208
|
-
/** 查询类 end */
|
|
209
|
-
/** 审批类 start */
|
|
210
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
211
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
212
|
-
/** 审批类 end */
|
|
213
|
-
}, We = {}, qe = {};
|
|
214
|
-
_e();
|
|
215
|
-
function Z(e, t, n = /* @__PURE__ */ new Map(), o = (d, y, w) => y, c = {}, r = (d) => d) {
|
|
216
|
-
return se[t.title] = t, ce[t.title] = o, We[t.title] = c, qe[t.title] = r, (d = {}) => {
|
|
217
|
-
const y = Ge(d, t, n), w = Object.keys(e).reduce((m, g) => (m[g] = e[g].default, m), {});
|
|
218
|
-
return Object.assign(w, y);
|
|
139
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
140
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
141
|
+
}, Je = {}, Xe = {};
|
|
142
|
+
ze();
|
|
143
|
+
function K(e, t, n = /* @__PURE__ */ new Map(), o = (u, f, b) => f, c = {}, l = (u) => u) {
|
|
144
|
+
return de[t.title] = t, pe[t.title] = o, Je[t.title] = c, Xe[t.title] = l, (u = {}) => {
|
|
145
|
+
const f = We(u, t, n), b = Object.keys(e).reduce((y, h) => (y[h] = e[h].default, y), {});
|
|
146
|
+
return Object.assign(b, f);
|
|
219
147
|
};
|
|
220
148
|
}
|
|
221
|
-
function
|
|
149
|
+
function ee(e, t) {
|
|
222
150
|
return { customClass: t.class, customStyle: t.style };
|
|
223
151
|
}
|
|
224
152
|
const Qe = /* @__PURE__ */ new Map([
|
|
225
|
-
["appearance",
|
|
226
|
-
]),
|
|
153
|
+
["appearance", ee]
|
|
154
|
+
]), Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/order.schema.json", Ke = "order", et = "A Farris Component", tt = "object", nt = {
|
|
227
155
|
id: {
|
|
228
156
|
description: "The unique identifier for a order",
|
|
229
157
|
type: "string"
|
|
@@ -315,22 +243,22 @@ const Qe = /* @__PURE__ */ new Map([
|
|
|
315
243
|
type: "sting",
|
|
316
244
|
default: ""
|
|
317
245
|
}
|
|
318
|
-
},
|
|
246
|
+
}, ot = [
|
|
319
247
|
"id",
|
|
320
248
|
"type"
|
|
321
|
-
],
|
|
322
|
-
$schema:
|
|
323
|
-
$id:
|
|
324
|
-
title:
|
|
325
|
-
description:
|
|
326
|
-
type:
|
|
327
|
-
properties:
|
|
328
|
-
required:
|
|
249
|
+
], at = {
|
|
250
|
+
$schema: Ye,
|
|
251
|
+
$id: Ze,
|
|
252
|
+
title: Ke,
|
|
253
|
+
description: et,
|
|
254
|
+
type: tt,
|
|
255
|
+
properties: nt,
|
|
256
|
+
required: ot
|
|
329
257
|
};
|
|
330
|
-
function
|
|
258
|
+
function rt(e, t, n) {
|
|
331
259
|
return t;
|
|
332
260
|
}
|
|
333
|
-
const
|
|
261
|
+
const it = "order", lt = "A Farris Component", st = "object", ct = {
|
|
334
262
|
basic: {
|
|
335
263
|
description: "Basic Infomation",
|
|
336
264
|
title: "基本信息",
|
|
@@ -412,12 +340,12 @@ const at = "order", rt = "A Farris Component", it = "object", lt = {
|
|
|
412
340
|
}
|
|
413
341
|
}
|
|
414
342
|
}
|
|
415
|
-
},
|
|
416
|
-
title:
|
|
417
|
-
description:
|
|
418
|
-
type:
|
|
419
|
-
categories:
|
|
420
|
-
},
|
|
343
|
+
}, ut = {
|
|
344
|
+
title: it,
|
|
345
|
+
description: lt,
|
|
346
|
+
type: st,
|
|
347
|
+
categories: ct
|
|
348
|
+
}, te = {
|
|
421
349
|
dataSource: {
|
|
422
350
|
type: Array,
|
|
423
351
|
default: [
|
|
@@ -436,13 +364,13 @@ const at = "order", rt = "A Farris Component", it = "object", lt = {
|
|
|
436
364
|
{ id: "3", name: "开票日期", order: "asc" }
|
|
437
365
|
]
|
|
438
366
|
}
|
|
439
|
-
},
|
|
440
|
-
["appearance",
|
|
367
|
+
}, ie = K(te, at, Qe, rt, ut), dt = /* @__PURE__ */ new Map([
|
|
368
|
+
["appearance", ee]
|
|
441
369
|
]);
|
|
442
|
-
function
|
|
370
|
+
function pt(e, t, n) {
|
|
443
371
|
return t;
|
|
444
372
|
}
|
|
445
|
-
const
|
|
373
|
+
const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/list-view.schema.json", yt = "list-view", gt = "A Farris Component", ht = "object", bt = {
|
|
446
374
|
id: {
|
|
447
375
|
description: "The unique identifier for list-view",
|
|
448
376
|
type: "string"
|
|
@@ -504,18 +432,18 @@ const dt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-
|
|
|
504
432
|
type: "boolean",
|
|
505
433
|
default: !0
|
|
506
434
|
}
|
|
507
|
-
},
|
|
435
|
+
}, vt = [
|
|
508
436
|
"id",
|
|
509
437
|
"type"
|
|
510
|
-
],
|
|
511
|
-
$schema:
|
|
512
|
-
$id:
|
|
513
|
-
title:
|
|
514
|
-
description:
|
|
515
|
-
type:
|
|
516
|
-
properties:
|
|
517
|
-
required:
|
|
518
|
-
},
|
|
438
|
+
], Ct = {
|
|
439
|
+
$schema: ft,
|
|
440
|
+
$id: mt,
|
|
441
|
+
title: yt,
|
|
442
|
+
description: gt,
|
|
443
|
+
type: ht,
|
|
444
|
+
properties: bt,
|
|
445
|
+
required: vt
|
|
446
|
+
}, wt = "list-view", St = "A Farris Component", kt = "object", Ft = {
|
|
519
447
|
basic: {
|
|
520
448
|
description: "Basic Infomation",
|
|
521
449
|
title: "基本信息",
|
|
@@ -537,12 +465,12 @@ const dt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-
|
|
|
537
465
|
}
|
|
538
466
|
}
|
|
539
467
|
}
|
|
540
|
-
},
|
|
541
|
-
title:
|
|
542
|
-
description:
|
|
543
|
-
type:
|
|
544
|
-
categories:
|
|
545
|
-
},
|
|
468
|
+
}, Tt = {
|
|
469
|
+
title: wt,
|
|
470
|
+
description: St,
|
|
471
|
+
type: kt,
|
|
472
|
+
categories: Ft
|
|
473
|
+
}, fe = {
|
|
546
474
|
/** 列集合 */
|
|
547
475
|
columns: {
|
|
548
476
|
type: Array,
|
|
@@ -584,190 +512,190 @@ const dt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-
|
|
|
584
512
|
// 搜索启用高亮
|
|
585
513
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
586
514
|
};
|
|
587
|
-
|
|
588
|
-
function
|
|
589
|
-
function n(
|
|
590
|
-
const
|
|
591
|
-
let
|
|
592
|
-
for (;
|
|
593
|
-
|
|
594
|
-
return
|
|
595
|
-
}
|
|
596
|
-
function o(
|
|
597
|
-
const
|
|
598
|
-
return n(
|
|
599
|
-
const
|
|
515
|
+
K(fe, Ct, dt, pt, Tt);
|
|
516
|
+
function Mt(e, t) {
|
|
517
|
+
function n(l) {
|
|
518
|
+
const u = [];
|
|
519
|
+
let f = l.nextNode();
|
|
520
|
+
for (; f; )
|
|
521
|
+
u.push(f), f = l.nextNode();
|
|
522
|
+
return u;
|
|
523
|
+
}
|
|
524
|
+
function o(l, u) {
|
|
525
|
+
const f = document.createTreeWalker(l, NodeFilter.SHOW_TEXT);
|
|
526
|
+
return n(f).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: r }) => {
|
|
527
|
+
const g = [];
|
|
600
528
|
let a = 0;
|
|
601
|
-
for (; a <
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
529
|
+
for (; a < r.length; ) {
|
|
530
|
+
const m = r.indexOf(u, a);
|
|
531
|
+
if (m === -1)
|
|
604
532
|
break;
|
|
605
|
-
|
|
533
|
+
g.push(m), a = m + u.length;
|
|
606
534
|
}
|
|
607
|
-
return
|
|
535
|
+
return g.map((m) => {
|
|
608
536
|
const s = new Range();
|
|
609
|
-
return s.setStart(
|
|
537
|
+
return s.setStart(i, m), s.setEnd(i, m + u.length), s;
|
|
610
538
|
});
|
|
611
539
|
}).flat();
|
|
612
540
|
}
|
|
613
|
-
function c(
|
|
614
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
541
|
+
function c(l) {
|
|
542
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !l || !t))
|
|
615
543
|
return;
|
|
616
|
-
const
|
|
617
|
-
CSS.highlights.set("search-result",
|
|
544
|
+
const u = o(t.value, l.toLocaleLowerCase()), f = new Highlight(...u);
|
|
545
|
+
CSS.highlights.set("search-result", f);
|
|
618
546
|
}
|
|
619
547
|
return { search: c };
|
|
620
548
|
}
|
|
621
|
-
function
|
|
622
|
-
const
|
|
623
|
-
onMouseenterItem:
|
|
549
|
+
function le(e, t, n, o, c, l, u, f, b, y) {
|
|
550
|
+
const h = C(e.size), i = C(e.textField), r = C(e.titleField), g = C(e.multiSelect), a = C(e.disableField), {
|
|
551
|
+
onMouseenterItem: m,
|
|
624
552
|
onMouseoverItem: s,
|
|
625
|
-
onMouseoutItem:
|
|
626
|
-
} =
|
|
627
|
-
getKey:
|
|
628
|
-
listViewItemClass:
|
|
629
|
-
onCheckItem:
|
|
553
|
+
onMouseoutItem: d
|
|
554
|
+
} = l, {
|
|
555
|
+
getKey: k,
|
|
556
|
+
listViewItemClass: F,
|
|
557
|
+
onCheckItem: D,
|
|
630
558
|
onClickItem: S
|
|
631
|
-
} =
|
|
632
|
-
margin:
|
|
559
|
+
} = u, w = B(() => ({
|
|
560
|
+
margin: h.value === "small" ? "0.25rem 0" : "10px 0"
|
|
633
561
|
}));
|
|
634
|
-
function
|
|
635
|
-
return p.checked =
|
|
636
|
-
class:
|
|
637
|
-
id:
|
|
638
|
-
key:
|
|
639
|
-
onClick: (T) => S(T, p,
|
|
640
|
-
onMouseenter: (T) =>
|
|
641
|
-
onMouseover: (T) => s(T, p,
|
|
642
|
-
onMouseout: (T) =>
|
|
643
|
-
}, [
|
|
562
|
+
function V(p, M, A) {
|
|
563
|
+
return p.checked = f.findIndexInSelectedItems(p) > -1, v("li", {
|
|
564
|
+
class: F(p, M),
|
|
565
|
+
id: k(p, M),
|
|
566
|
+
key: k(p, M),
|
|
567
|
+
onClick: (T) => S(T, p, M),
|
|
568
|
+
onMouseenter: (T) => m(T, p, M),
|
|
569
|
+
onMouseover: (T) => s(T, p, M),
|
|
570
|
+
onMouseout: (T) => d(T, p, M)
|
|
571
|
+
}, [g.value && v("div", {
|
|
644
572
|
class: "f-list-select",
|
|
645
573
|
onClick: (T) => T.stopPropagation()
|
|
646
|
-
}, [v(
|
|
647
|
-
id: "list-" +
|
|
574
|
+
}, [v(Y, {
|
|
575
|
+
id: "list-" + k(p, M),
|
|
648
576
|
customClass: "listview-checkbox",
|
|
649
577
|
disabled: p[a.value],
|
|
650
578
|
checked: p.checked,
|
|
651
579
|
"onUpdate:checked": (T) => p.checked = T,
|
|
652
580
|
onChange: (T) => {
|
|
653
|
-
|
|
581
|
+
D(p, M, !T.checked);
|
|
654
582
|
}
|
|
655
583
|
}, null)]), v("div", {
|
|
656
584
|
class: "f-list-content"
|
|
657
585
|
}, [v("div", {
|
|
658
|
-
style:
|
|
659
|
-
title: p.raw[
|
|
660
|
-
}, [p.raw[
|
|
586
|
+
style: w.value,
|
|
587
|
+
title: p.raw[r.value] || p.raw[i.value]
|
|
588
|
+
}, [p.raw[i.value]])])]);
|
|
661
589
|
}
|
|
662
590
|
return {
|
|
663
|
-
renderItem:
|
|
591
|
+
renderItem: V
|
|
664
592
|
};
|
|
665
593
|
}
|
|
666
|
-
function
|
|
667
|
-
const
|
|
668
|
-
onMouseenterItem:
|
|
669
|
-
onMouseoverItem:
|
|
594
|
+
function jt(e, t, n, o, c, l, u, f, b, y) {
|
|
595
|
+
const h = C(e.multiSelect), i = C(e.disableField), {
|
|
596
|
+
onMouseenterItem: r,
|
|
597
|
+
onMouseoverItem: g,
|
|
670
598
|
onMouseoutItem: a
|
|
671
|
-
} =
|
|
672
|
-
getKey:
|
|
599
|
+
} = l, {
|
|
600
|
+
getKey: m,
|
|
673
601
|
listViewItemClass: s,
|
|
674
|
-
onCheckItem:
|
|
675
|
-
onClickItem:
|
|
676
|
-
} =
|
|
677
|
-
function
|
|
602
|
+
onCheckItem: d,
|
|
603
|
+
onClickItem: k
|
|
604
|
+
} = u;
|
|
605
|
+
function F(S, w, V) {
|
|
678
606
|
return t.slots.content ? v(Q, null, [t.slots.content && t.slots.content({
|
|
679
607
|
item: S.raw,
|
|
680
|
-
index:
|
|
681
|
-
selectedItem:
|
|
608
|
+
index: w,
|
|
609
|
+
selectedItem: V
|
|
682
610
|
})]) : v("div", {
|
|
683
611
|
style: "margin: 10px 0;"
|
|
684
612
|
}, [S.raw.name]);
|
|
685
613
|
}
|
|
686
|
-
function
|
|
614
|
+
function D(S, w, V) {
|
|
687
615
|
return v("li", {
|
|
688
|
-
class: s(S,
|
|
689
|
-
id:
|
|
690
|
-
key:
|
|
691
|
-
onClick: (p) =>
|
|
692
|
-
onMouseenter: (p) =>
|
|
693
|
-
onMouseover: (p) =>
|
|
694
|
-
onMouseout: (p) => a(p, S,
|
|
695
|
-
}, [
|
|
616
|
+
class: s(S, w),
|
|
617
|
+
id: m(S, w),
|
|
618
|
+
key: m(S, w),
|
|
619
|
+
onClick: (p) => k(p, S, w),
|
|
620
|
+
onMouseenter: (p) => r(p, S, w),
|
|
621
|
+
onMouseover: (p) => g(p, S, w),
|
|
622
|
+
onMouseout: (p) => a(p, S, w)
|
|
623
|
+
}, [h.value && v("div", {
|
|
696
624
|
class: "f-list-select",
|
|
697
625
|
onClick: (p) => p.stopPropagation()
|
|
698
|
-
}, [v(
|
|
699
|
-
id: "list-" +
|
|
626
|
+
}, [v(Y, {
|
|
627
|
+
id: "list-" + m(S, w),
|
|
700
628
|
customClass: "listview-checkbox",
|
|
701
|
-
disabled: S[
|
|
629
|
+
disabled: S[i.value] || !S.checked,
|
|
702
630
|
checked: S.checked,
|
|
703
631
|
"onUpdate:checked": (p) => S.checked = p,
|
|
704
|
-
onChange: (p) =>
|
|
632
|
+
onChange: (p) => d(S, w, !p.checked)
|
|
705
633
|
}, null)]), v("div", {
|
|
706
634
|
class: "f-list-content"
|
|
707
|
-
}, [
|
|
635
|
+
}, [F(S, w, V)])]);
|
|
708
636
|
}
|
|
709
637
|
return {
|
|
710
|
-
renderItem:
|
|
638
|
+
renderItem: D
|
|
711
639
|
};
|
|
712
640
|
}
|
|
713
|
-
function
|
|
714
|
-
const
|
|
715
|
-
onMouseenterItem:
|
|
716
|
-
onMouseoverItem:
|
|
641
|
+
function Vt(e, t, n, o, c, l, u, f, b, y) {
|
|
642
|
+
const h = C(e.multiSelect), i = C(e.disableField), {
|
|
643
|
+
onMouseenterItem: r,
|
|
644
|
+
onMouseoverItem: g,
|
|
717
645
|
onMouseoutItem: a
|
|
718
|
-
} =
|
|
719
|
-
getKey:
|
|
646
|
+
} = l, {
|
|
647
|
+
getKey: m,
|
|
720
648
|
listViewItemClass: s,
|
|
721
|
-
onCheckItem:
|
|
722
|
-
onClickItem:
|
|
723
|
-
} =
|
|
724
|
-
dragstart:
|
|
725
|
-
dragenter:
|
|
649
|
+
onCheckItem: d,
|
|
650
|
+
onClickItem: k
|
|
651
|
+
} = u, {
|
|
652
|
+
dragstart: F,
|
|
653
|
+
dragenter: D,
|
|
726
654
|
dragover: S,
|
|
727
|
-
dragend:
|
|
655
|
+
dragend: w
|
|
728
656
|
} = o, {
|
|
729
|
-
removeItem:
|
|
730
|
-
} =
|
|
731
|
-
margin:
|
|
657
|
+
removeItem: V
|
|
658
|
+
} = b, p = B(() => ({
|
|
659
|
+
margin: h.value ? "10px 0" : "10px 0px 10px 14px"
|
|
732
660
|
}));
|
|
733
|
-
function
|
|
661
|
+
function M(O) {
|
|
734
662
|
return v("div", {
|
|
735
663
|
style: p.value
|
|
736
|
-
}, [
|
|
664
|
+
}, [O.raw.name]);
|
|
737
665
|
}
|
|
738
666
|
function A() {
|
|
739
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
667
|
+
return t.slots.itemContent ? t.slots.itemContent : M;
|
|
740
668
|
}
|
|
741
669
|
const T = A();
|
|
742
|
-
function
|
|
670
|
+
function $(O, P, E) {
|
|
743
671
|
return v("li", {
|
|
744
|
-
class: s(
|
|
745
|
-
id:
|
|
746
|
-
key:
|
|
747
|
-
onClick: (
|
|
748
|
-
onMouseenter: (
|
|
749
|
-
onMouseover: (
|
|
750
|
-
onMouseout: (
|
|
672
|
+
class: s(O, P),
|
|
673
|
+
id: m(O, P),
|
|
674
|
+
key: m(O, P),
|
|
675
|
+
onClick: (I) => k(I, O, P),
|
|
676
|
+
onMouseenter: (I) => r(I, O, P),
|
|
677
|
+
onMouseover: (I) => g(I, O, P),
|
|
678
|
+
onMouseout: (I) => a(I, O, P),
|
|
751
679
|
draggable: "true",
|
|
752
|
-
onDragstart: (
|
|
753
|
-
onDragenter: (
|
|
754
|
-
onDragend: (
|
|
755
|
-
onDragover: (
|
|
756
|
-
}, [
|
|
680
|
+
onDragstart: (I) => F(I, O, P),
|
|
681
|
+
onDragenter: (I) => D(I, P),
|
|
682
|
+
onDragend: (I) => w(I, O),
|
|
683
|
+
onDragover: (I) => S(I, P)
|
|
684
|
+
}, [h.value && v("div", {
|
|
757
685
|
class: "f-list-select",
|
|
758
|
-
onClick: (
|
|
759
|
-
}, [v(
|
|
760
|
-
id: "list-" +
|
|
686
|
+
onClick: (I) => I.stopPropagation()
|
|
687
|
+
}, [v(Y, {
|
|
688
|
+
id: "list-" + m(O, P),
|
|
761
689
|
customClass: "listview-checkbox",
|
|
762
|
-
disabled:
|
|
763
|
-
checked:
|
|
764
|
-
"onUpdate:checked": (
|
|
765
|
-
onChange: (
|
|
690
|
+
disabled: O[i.value] || !O.checked,
|
|
691
|
+
checked: O.checked,
|
|
692
|
+
"onUpdate:checked": (I) => O.checked = I,
|
|
693
|
+
onChange: (I) => d(O, P, !I.checked)
|
|
766
694
|
}, null)]), v("div", {
|
|
767
695
|
class: "f-list-content"
|
|
768
|
-
}, [T(
|
|
696
|
+
}, [T(O)]), v("div", {
|
|
769
697
|
class: "f-list-remove",
|
|
770
|
-
onClick: (
|
|
698
|
+
onClick: (I) => V(P)
|
|
771
699
|
}, [v("div", {
|
|
772
700
|
class: "f-list-remove-icon"
|
|
773
701
|
}, [v("i", {
|
|
@@ -779,50 +707,50 @@ function Mt(e, t, n, o, c, r, d, y, w, m) {
|
|
|
779
707
|
}, null)])])]);
|
|
780
708
|
}
|
|
781
709
|
return {
|
|
782
|
-
renderItem:
|
|
710
|
+
renderItem: $
|
|
783
711
|
};
|
|
784
712
|
}
|
|
785
|
-
function
|
|
786
|
-
var
|
|
787
|
-
const
|
|
788
|
-
collpaseGroupIconClass:
|
|
713
|
+
function Dt(e, t, n, o, c, l, u, f, b, y) {
|
|
714
|
+
var m;
|
|
715
|
+
const h = C(((m = e.group) == null ? void 0 : m.groupFields) || []), {
|
|
716
|
+
collpaseGroupIconClass: i
|
|
789
717
|
} = c, {
|
|
790
|
-
toggleGroupRow:
|
|
791
|
-
} =
|
|
792
|
-
function
|
|
793
|
-
|
|
718
|
+
toggleGroupRow: r
|
|
719
|
+
} = y;
|
|
720
|
+
function g(s, d) {
|
|
721
|
+
d.collapse = !d.collapse, n.value = r(d.collapse ? "collapse" : "expand", d, n.value);
|
|
794
722
|
}
|
|
795
|
-
function a(s,
|
|
723
|
+
function a(s, d, k) {
|
|
796
724
|
return s.layer > -1 && v("div", {
|
|
797
725
|
class: "f-navlookup-recentHeader",
|
|
798
|
-
onClick: (
|
|
726
|
+
onClick: (F) => g(F, s)
|
|
799
727
|
}, [v("div", {
|
|
800
728
|
class: "fv-grid-group-row-icon"
|
|
801
729
|
}, [v("span", {
|
|
802
|
-
class:
|
|
730
|
+
class: i(s)
|
|
803
731
|
}, null)]), v("div", {
|
|
804
732
|
class: "f-navlookup-recommandLabel"
|
|
805
|
-
}, [s.raw[
|
|
733
|
+
}, [s.raw[h.value[s.layer]]])]);
|
|
806
734
|
}
|
|
807
735
|
return {
|
|
808
736
|
renderItem: a
|
|
809
737
|
};
|
|
810
738
|
}
|
|
811
|
-
function
|
|
739
|
+
function Ot() {
|
|
812
740
|
const e = C(-1), t = C(""), n = C(-1), o = C(!1);
|
|
813
|
-
function c(
|
|
814
|
-
n.value =
|
|
741
|
+
function c(y, h, i) {
|
|
742
|
+
n.value = i;
|
|
815
743
|
}
|
|
816
|
-
function
|
|
817
|
-
o.value || (n.value =
|
|
744
|
+
function l(y, h, i) {
|
|
745
|
+
o.value || (n.value = i);
|
|
818
746
|
}
|
|
819
|
-
function
|
|
747
|
+
function u(y, h, i) {
|
|
820
748
|
n.value = -1;
|
|
821
749
|
}
|
|
822
|
-
function
|
|
750
|
+
function f() {
|
|
823
751
|
o.value = !0;
|
|
824
752
|
}
|
|
825
|
-
function
|
|
753
|
+
function b() {
|
|
826
754
|
o.value = !1;
|
|
827
755
|
}
|
|
828
756
|
return {
|
|
@@ -830,124 +758,124 @@ function Dt() {
|
|
|
830
758
|
focusedItemId: t,
|
|
831
759
|
hoverIndex: n,
|
|
832
760
|
onMouseenterItem: c,
|
|
833
|
-
onMouseoverItem:
|
|
834
|
-
onMouseoutItem:
|
|
835
|
-
resumeHover:
|
|
836
|
-
suspendHover:
|
|
761
|
+
onMouseoverItem: l,
|
|
762
|
+
onMouseoutItem: u,
|
|
763
|
+
resumeHover: b,
|
|
764
|
+
suspendHover: f
|
|
837
765
|
};
|
|
838
766
|
}
|
|
839
|
-
function
|
|
840
|
-
const c = C(e.idField), { dataView:
|
|
841
|
-
function
|
|
842
|
-
|
|
843
|
-
|
|
767
|
+
function It(e, t, n, o) {
|
|
768
|
+
const c = C(e.idField), { dataView: l } = n, u = C(-1), f = C(!1), { activeIndex: b, focusedItemId: y, hoverIndex: h, resumeHover: i, suspendHover: r } = o;
|
|
769
|
+
function g(d, k, F) {
|
|
770
|
+
d.stopPropagation(), r(), k && setTimeout(() => {
|
|
771
|
+
u.value = F, f.value = !0, k.moving = !0;
|
|
844
772
|
});
|
|
845
773
|
}
|
|
846
|
-
function a(
|
|
847
|
-
if (
|
|
848
|
-
const
|
|
849
|
-
|
|
774
|
+
function a(d, k) {
|
|
775
|
+
if (d.preventDefault(), u.value !== k) {
|
|
776
|
+
const F = l.value[u.value], D = l.value;
|
|
777
|
+
D.splice(u.value, 1), D.splice(k, 0, F), u.value = k;
|
|
850
778
|
}
|
|
851
779
|
}
|
|
852
|
-
function
|
|
853
|
-
|
|
780
|
+
function m(d, k) {
|
|
781
|
+
d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "move");
|
|
854
782
|
}
|
|
855
|
-
function s(
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
}),
|
|
783
|
+
function s(d, k) {
|
|
784
|
+
k && (k.moving = !1), l.value.forEach((F, D) => {
|
|
785
|
+
F.__fv_index__ = D;
|
|
786
|
+
}), f.value = !1, i(), h.value = k.raw.__fv_index__, b.value = k.raw.__fv_index__, y.value = k.raw[c.value], t.emit("change", l.value), t.emit("activeChange", k);
|
|
859
787
|
}
|
|
860
788
|
return {
|
|
861
|
-
dragstart:
|
|
789
|
+
dragstart: g,
|
|
862
790
|
dragenter: a,
|
|
863
|
-
dragover:
|
|
791
|
+
dragover: m,
|
|
864
792
|
dragend: s,
|
|
865
|
-
isDragging:
|
|
793
|
+
isDragging: f
|
|
866
794
|
};
|
|
867
795
|
}
|
|
868
|
-
function
|
|
796
|
+
function Pt(e, t, n) {
|
|
869
797
|
const { dataView: o } = n;
|
|
870
|
-
function c(
|
|
871
|
-
if (
|
|
872
|
-
const
|
|
873
|
-
t.emit("removeItem",
|
|
798
|
+
function c(l) {
|
|
799
|
+
if (l > -1 && l < o.value.length) {
|
|
800
|
+
const u = o.value.splice(l, 1);
|
|
801
|
+
t.emit("removeItem", u[0]);
|
|
874
802
|
}
|
|
875
803
|
}
|
|
876
804
|
return { removeItem: c };
|
|
877
805
|
}
|
|
878
|
-
function
|
|
879
|
-
const
|
|
806
|
+
function Bt(e, t, n, o, c, l) {
|
|
807
|
+
const u = C(e.idField), f = C(e.disableField), b = C(e.draggable), y = C(e.itemClass), h = C(e.selection.multiSelect ?? !1), i = C(e.selection.multiSelectMode);
|
|
880
808
|
C(!0);
|
|
881
|
-
const { isDragging:
|
|
882
|
-
function
|
|
883
|
-
const
|
|
809
|
+
const { isDragging: r } = o, { activeIndex: g, focusedItemId: a, hoverIndex: m } = c, { clearSelection: s, getSelectedItems: d, toggleSelectItem: k } = l, F = C(d());
|
|
810
|
+
function D(T, $) {
|
|
811
|
+
const O = {
|
|
884
812
|
"f-list-view-group-item": !0,
|
|
885
|
-
"f-list-view-draggable-item":
|
|
813
|
+
"f-list-view-draggable-item": b.value,
|
|
886
814
|
"f-un-click": !T.checked,
|
|
887
|
-
"f-un-select": !!T.raw[
|
|
888
|
-
"f-listview-active": T.raw.__fv_index__ ===
|
|
889
|
-
"f-listview-hover": !
|
|
815
|
+
"f-un-select": !!T.raw[f.value],
|
|
816
|
+
"f-listview-active": T.raw.__fv_index__ === g.value,
|
|
817
|
+
"f-listview-hover": !r.value && $ === m.value,
|
|
890
818
|
moving: !!T.moving
|
|
891
819
|
};
|
|
892
|
-
return
|
|
820
|
+
return y.value.split(" ").reduce((E, I) => (E[I] = !0, E), O), O;
|
|
893
821
|
}
|
|
894
|
-
function S(T,
|
|
895
|
-
return T.raw[
|
|
822
|
+
function S(T, $) {
|
|
823
|
+
return T.raw[u.value] || "";
|
|
896
824
|
}
|
|
897
|
-
const
|
|
898
|
-
function
|
|
899
|
-
T.checked =
|
|
825
|
+
const w = B(() => !h.value);
|
|
826
|
+
function V(T, $, O) {
|
|
827
|
+
T.checked = O, !T.raw[f.value] && (w.value && (a.value = T.raw[u.value]), k(T));
|
|
900
828
|
}
|
|
901
|
-
const p = B(() =>
|
|
902
|
-
function A(T,
|
|
903
|
-
if (
|
|
829
|
+
const p = B(() => h.value && i.value === "OnCheckClearByClick"), M = B(() => !h.value || h.value && (i.value === "OnCheckAndClick" || i.value === "OnClick"));
|
|
830
|
+
function A(T, $, O) {
|
|
831
|
+
if ($.raw[f.value]) {
|
|
904
832
|
T.preventDefault(), T.stopPropagation();
|
|
905
833
|
return;
|
|
906
834
|
}
|
|
907
|
-
a.value =
|
|
835
|
+
a.value = $.raw[u.value], g.value = O, p.value && s(n.value), M.value && (k($), F.value = d()), t.emit("clickItem", { data: F.value, index: O }), t.emit("activeChange", F.value);
|
|
908
836
|
}
|
|
909
837
|
return {
|
|
910
838
|
getKey: S,
|
|
911
|
-
listViewItemClass:
|
|
912
|
-
onCheckItem:
|
|
839
|
+
listViewItemClass: D,
|
|
840
|
+
onCheckItem: V,
|
|
913
841
|
onClickItem: A
|
|
914
842
|
};
|
|
915
843
|
}
|
|
916
|
-
function
|
|
917
|
-
const
|
|
844
|
+
function At(e, t, n, o, c, l, u) {
|
|
845
|
+
const f = C(e.view), b = C(e.view === "CardView"), y = C({}), h = C("暂无数据"), i = Ot(), r = It(e, t, o, i), g = Pt(e, t, o), a = Bt(e, t, n, r, i, l), m = B(() => ({
|
|
918
846
|
"f-list-view-group": !0,
|
|
919
|
-
"d-flex":
|
|
920
|
-
"flex-wrap":
|
|
921
|
-
})), s = B(() => !!n.value && n.value.length > 0),
|
|
922
|
-
function
|
|
923
|
-
return
|
|
847
|
+
"d-flex": b.value,
|
|
848
|
+
"flex-wrap": b.value
|
|
849
|
+
})), s = B(() => !!n.value && n.value.length > 0), d = B(() => n.value.length === 0), k = B(() => d.value && !t.slots.empty);
|
|
850
|
+
function F() {
|
|
851
|
+
return f.value === "SingleView" ? le : f.value === "DraggableView" ? Vt : (f.value === "ContentView" || f.value === "CardView") && t.slots.content ? jt : le;
|
|
924
852
|
}
|
|
925
|
-
const
|
|
853
|
+
const D = F(), {
|
|
926
854
|
renderItem: S
|
|
927
|
-
} =
|
|
928
|
-
renderItem:
|
|
929
|
-
} =
|
|
855
|
+
} = D(e, t, n, r, c, i, a, l, g, u), {
|
|
856
|
+
renderItem: w
|
|
857
|
+
} = Dt(e, t, n, r, c, i, a, l, g, u), V = [S, w];
|
|
930
858
|
function p() {
|
|
931
|
-
return n.value.filter((T) => T.visible !== !1).map((T,
|
|
859
|
+
return n.value.filter((T) => T.visible !== !1).map((T, $) => V[T.type](T, $, y));
|
|
932
860
|
}
|
|
933
|
-
function
|
|
861
|
+
function M() {
|
|
934
862
|
return v("div", {
|
|
935
863
|
class: "f-list-view-emptydata"
|
|
936
864
|
}, [v("p", {
|
|
937
865
|
class: "f-empty-title"
|
|
938
|
-
}, [
|
|
866
|
+
}, [h.value])]);
|
|
939
867
|
}
|
|
940
868
|
function A() {
|
|
941
869
|
return v("ul", {
|
|
942
|
-
class:
|
|
870
|
+
class: m.value,
|
|
943
871
|
style: "list-style: none;"
|
|
944
|
-
}, [s.value && p(),
|
|
872
|
+
}, [s.value && p(), k.value && M(), t.slots.empty && t.slots.empty()]);
|
|
945
873
|
}
|
|
946
874
|
return {
|
|
947
875
|
renderListArea: A
|
|
948
876
|
};
|
|
949
877
|
}
|
|
950
|
-
function
|
|
878
|
+
function $t(e, t, n) {
|
|
951
879
|
function o() {
|
|
952
880
|
return t.slots.header && v("div", {
|
|
953
881
|
class: "f-list-view-header"
|
|
@@ -957,100 +885,100 @@ function Bt(e, t, n) {
|
|
|
957
885
|
renderHeader: o
|
|
958
886
|
};
|
|
959
887
|
}
|
|
960
|
-
function
|
|
961
|
-
const o = C(e.headerClass), c = C(e.placeholder),
|
|
962
|
-
function
|
|
963
|
-
|
|
888
|
+
function se(e, t, n) {
|
|
889
|
+
const o = C(e.headerClass), c = C(e.placeholder), l = C(""), u = B(() => !l.value), f = B(() => !!l.value);
|
|
890
|
+
function b(r) {
|
|
891
|
+
l.value = "";
|
|
964
892
|
}
|
|
965
|
-
|
|
966
|
-
e.enableHighlightSearch && n.search(
|
|
893
|
+
N(l, (r) => {
|
|
894
|
+
e.enableHighlightSearch && n.search(r), t.emit("afterSearch", r);
|
|
967
895
|
});
|
|
968
|
-
const
|
|
969
|
-
const
|
|
896
|
+
const y = B(() => {
|
|
897
|
+
const r = {
|
|
970
898
|
"form-group": !0,
|
|
971
899
|
"farris-form-group": !0
|
|
972
900
|
};
|
|
973
|
-
return o.value && o.value.split(" ").reduce((a,
|
|
901
|
+
return o.value && o.value.split(" ").reduce((a, m) => (a[m] = !0, a), r), r;
|
|
974
902
|
});
|
|
975
|
-
function
|
|
903
|
+
function h(r) {
|
|
976
904
|
}
|
|
977
|
-
function
|
|
905
|
+
function i() {
|
|
978
906
|
return v("div", {
|
|
979
907
|
class: "f-list-view-header",
|
|
980
|
-
onClick:
|
|
908
|
+
onClick: Fe(() => h, ["prevent", "stop"])
|
|
981
909
|
}, [v("div", {
|
|
982
|
-
class:
|
|
910
|
+
class: y.value
|
|
983
911
|
}, [v("div", {
|
|
984
912
|
class: "farris-input-wrap"
|
|
985
913
|
}, [v("div", {
|
|
986
914
|
class: "f-cmp-inputgroup"
|
|
987
915
|
}, [v("div", {
|
|
988
916
|
class: "input-group f-state-editable"
|
|
989
|
-
}, [
|
|
917
|
+
}, [Te(v("input", {
|
|
990
918
|
class: "form-control f-utils-fill text-left",
|
|
991
|
-
"onUpdate:modelValue": (
|
|
919
|
+
"onUpdate:modelValue": (r) => l.value = r,
|
|
992
920
|
name: "input-group-value",
|
|
993
921
|
type: "text",
|
|
994
922
|
placeholder: c.value,
|
|
995
923
|
autocomplete: "off"
|
|
996
|
-
}, null), [[
|
|
924
|
+
}, null), [[Me, l.value]]), v("div", {
|
|
997
925
|
class: "input-group-append"
|
|
998
|
-
}, [
|
|
926
|
+
}, [f.value && v("span", {
|
|
999
927
|
class: "input-group-text input-group-clear",
|
|
1000
|
-
onClick: (
|
|
928
|
+
onClick: (r) => b()
|
|
1001
929
|
}, [v("i", {
|
|
1002
930
|
class: "f-icon f-icon-close-circle"
|
|
1003
|
-
}, null)]),
|
|
931
|
+
}, null)]), u.value && v("span", {
|
|
1004
932
|
class: "input-group-text"
|
|
1005
933
|
}, [v("span", {
|
|
1006
934
|
class: "f-icon f-icon-search"
|
|
1007
935
|
}, null)])])])])])])]);
|
|
1008
936
|
}
|
|
1009
937
|
return {
|
|
1010
|
-
renderHeader:
|
|
938
|
+
renderHeader: i
|
|
1011
939
|
};
|
|
1012
940
|
}
|
|
1013
|
-
const
|
|
941
|
+
const me = /* @__PURE__ */ H({
|
|
1014
942
|
name: "FListView",
|
|
1015
|
-
props:
|
|
943
|
+
props: fe,
|
|
1016
944
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
1017
945
|
setup(e, t) {
|
|
1018
|
-
const n = C(), o = C(!0), c = C(!1),
|
|
1019
|
-
getVisualData:
|
|
1020
|
-
} =
|
|
1021
|
-
|
|
946
|
+
const n = C(), o = C(!0), c = C(!1), l = C([]), u = 0, f = C(e.columns), b = De(e), y = Oe(e), h = Ie(e, b), i = Pe(e), r = Be(e, /* @__PURE__ */ new Map(), y, b, i), g = Ae(e, r, b, l, t), a = Mt(e, n), m = B(() => r.dataView.value.length), s = $e(e, b), d = xe(), k = Le(e, {}, d), F = Ee(e, s, y, b, d, k), D = Ne(e, b, k, F), S = He(e, b, k, F), w = Re(e, f, r, m, u, F, D, S), {
|
|
947
|
+
getVisualData: V
|
|
948
|
+
} = w;
|
|
949
|
+
l.value = V(0, m.value + u - 1);
|
|
1022
950
|
const p = B(() => {
|
|
1023
|
-
const
|
|
951
|
+
const x = {
|
|
1024
952
|
"f-list-view": !0,
|
|
1025
953
|
"f-list-view-multiple": e.multiSelect
|
|
1026
954
|
};
|
|
1027
|
-
return e.size !== "default" && (
|
|
1028
|
-
}),
|
|
955
|
+
return e.size !== "default" && (x[`${e.size}-item`] = !0), x;
|
|
956
|
+
}), M = B(() => !!t.slots.footer || o.value);
|
|
1029
957
|
function A() {
|
|
1030
|
-
return e.header === "SearchBar" ?
|
|
958
|
+
return e.header === "SearchBar" ? se : e.header === "ContentHeader" ? $t : se;
|
|
1031
959
|
}
|
|
1032
960
|
const T = A(), {
|
|
1033
|
-
renderHeader:
|
|
961
|
+
renderHeader: $
|
|
1034
962
|
} = T(e, t, a), {
|
|
1035
|
-
renderListArea:
|
|
1036
|
-
} =
|
|
1037
|
-
function P(
|
|
1038
|
-
a.search(
|
|
963
|
+
renderListArea: O
|
|
964
|
+
} = At(e, t, l, r, h, g, w);
|
|
965
|
+
function P(x) {
|
|
966
|
+
a.search(x);
|
|
1039
967
|
}
|
|
1040
|
-
function E(
|
|
1041
|
-
|
|
968
|
+
function E(x) {
|
|
969
|
+
x && (r.load(x), l.value = V(0, m.value + u - 1));
|
|
1042
970
|
}
|
|
1043
971
|
t.expose({
|
|
1044
972
|
search: P,
|
|
1045
973
|
updateDataSource: E
|
|
1046
974
|
});
|
|
1047
|
-
function
|
|
1048
|
-
e.multiSelect && (
|
|
975
|
+
function I(x) {
|
|
976
|
+
e.multiSelect && (x.preventDefault(), x.stopPropagation());
|
|
1049
977
|
}
|
|
1050
978
|
return () => v("div", {
|
|
1051
979
|
class: p.value,
|
|
1052
|
-
onClick:
|
|
1053
|
-
}, [
|
|
980
|
+
onClick: I
|
|
981
|
+
}, [$(), v("div", {
|
|
1054
982
|
ref: n,
|
|
1055
983
|
class: "f-list-view-content",
|
|
1056
984
|
onMouseover: () => {
|
|
@@ -1059,11 +987,11 @@ const de = /* @__PURE__ */ N({
|
|
|
1059
987
|
onMouseleave: () => {
|
|
1060
988
|
c.value = !1;
|
|
1061
989
|
}
|
|
1062
|
-
}, [
|
|
990
|
+
}, [O()]), M.value && v("div", {
|
|
1063
991
|
class: "f-list-view-footer"
|
|
1064
992
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1065
993
|
}
|
|
1066
|
-
}),
|
|
994
|
+
}), xt = {
|
|
1067
995
|
/**
|
|
1068
996
|
* 组件标识
|
|
1069
997
|
*/
|
|
@@ -1089,7 +1017,7 @@ const de = /* @__PURE__ */ N({
|
|
|
1089
1017
|
*/
|
|
1090
1018
|
customClass: { type: Object, default: {} }
|
|
1091
1019
|
};
|
|
1092
|
-
function
|
|
1020
|
+
function Lt(e, t) {
|
|
1093
1021
|
function n(o) {
|
|
1094
1022
|
o.stopPropagation(), e.disabled || t.emit("click", o);
|
|
1095
1023
|
}
|
|
@@ -1097,50 +1025,50 @@ function xt(e, t) {
|
|
|
1097
1025
|
onClickButton: n
|
|
1098
1026
|
};
|
|
1099
1027
|
}
|
|
1100
|
-
function
|
|
1028
|
+
function Et(e) {
|
|
1101
1029
|
const t = B(() => {
|
|
1102
1030
|
const o = {
|
|
1103
1031
|
"f-icon": !0
|
|
1104
1032
|
};
|
|
1105
1033
|
if (e.icon) {
|
|
1106
1034
|
const c = e.icon.trim().split(" ");
|
|
1107
|
-
c && c.length && c.reduce((
|
|
1035
|
+
c && c.length && c.reduce((l, u) => (l[u] = !0, l), o);
|
|
1108
1036
|
}
|
|
1109
1037
|
return o;
|
|
1110
1038
|
}), n = B(() => !!(e.icon && e.icon.trim()));
|
|
1111
1039
|
return { iconClass: t, shouldShowIcon: n };
|
|
1112
1040
|
}
|
|
1113
|
-
const
|
|
1041
|
+
const ye = /* @__PURE__ */ H({
|
|
1114
1042
|
name: "FButton",
|
|
1115
|
-
props:
|
|
1043
|
+
props: xt,
|
|
1116
1044
|
emits: ["click"],
|
|
1117
1045
|
setup(e, t) {
|
|
1118
1046
|
const {
|
|
1119
1047
|
onClickButton: n
|
|
1120
|
-
} =
|
|
1048
|
+
} = Lt(e, t), {
|
|
1121
1049
|
iconClass: o,
|
|
1122
1050
|
shouldShowIcon: c
|
|
1123
|
-
} =
|
|
1124
|
-
const
|
|
1051
|
+
} = Et(e), l = B(() => {
|
|
1052
|
+
const u = {
|
|
1125
1053
|
btn: !0,
|
|
1126
1054
|
"btn-lg": e.size === "large",
|
|
1127
1055
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
1128
1056
|
"btn-sm": e.size === "small",
|
|
1129
1057
|
"btn-icontext": c.value
|
|
1130
1058
|
};
|
|
1131
|
-
return
|
|
1059
|
+
return u[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, b) => (f[b] = e.customClass[b], f), u), u;
|
|
1132
1060
|
});
|
|
1133
1061
|
return () => v("button", {
|
|
1134
|
-
class:
|
|
1062
|
+
class: l.value,
|
|
1135
1063
|
disabled: e.disabled,
|
|
1136
|
-
onClick: (
|
|
1064
|
+
onClick: (u) => n(u)
|
|
1137
1065
|
}, [c.value && v("i", {
|
|
1138
1066
|
class: o.value
|
|
1139
1067
|
}, null), t.slots.default && t.slots.default()]);
|
|
1140
1068
|
}
|
|
1141
|
-
}),
|
|
1142
|
-
["appearance",
|
|
1143
|
-
]),
|
|
1069
|
+
}), Nt = /* @__PURE__ */ new Map([
|
|
1070
|
+
["appearance", ee]
|
|
1071
|
+
]), Ht = "https://json-schema.org/draft/2020-12/schema", Rt = "https://farris-design.gitee.io/combo-list.schema.json", Ut = "combo-list", Gt = "A Farris Input Component", _t = "object", qt = {
|
|
1144
1072
|
id: {
|
|
1145
1073
|
description: "The unique identifier for a combo list",
|
|
1146
1074
|
type: "string"
|
|
@@ -1251,22 +1179,22 @@ const pe = /* @__PURE__ */ N({
|
|
|
1251
1179
|
type: "sting",
|
|
1252
1180
|
default: ""
|
|
1253
1181
|
}
|
|
1254
|
-
},
|
|
1182
|
+
}, Wt = [
|
|
1255
1183
|
"id",
|
|
1256
1184
|
"type"
|
|
1257
|
-
],
|
|
1258
|
-
$schema:
|
|
1259
|
-
$id:
|
|
1260
|
-
title:
|
|
1261
|
-
description:
|
|
1262
|
-
type:
|
|
1263
|
-
properties:
|
|
1264
|
-
required:
|
|
1185
|
+
], zt = {
|
|
1186
|
+
$schema: Ht,
|
|
1187
|
+
$id: Rt,
|
|
1188
|
+
title: Ut,
|
|
1189
|
+
description: Gt,
|
|
1190
|
+
type: _t,
|
|
1191
|
+
properties: qt,
|
|
1192
|
+
required: Wt
|
|
1265
1193
|
};
|
|
1266
|
-
function
|
|
1194
|
+
function Jt(e, t, n) {
|
|
1267
1195
|
return t;
|
|
1268
1196
|
}
|
|
1269
|
-
const
|
|
1197
|
+
const ne = {
|
|
1270
1198
|
/**
|
|
1271
1199
|
* 组件标识
|
|
1272
1200
|
*/
|
|
@@ -1432,7 +1360,7 @@ const ee = {
|
|
|
1432
1360
|
},
|
|
1433
1361
|
// 搜索启用高亮
|
|
1434
1362
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1435
|
-
},
|
|
1363
|
+
}, ge = K(ne, zt, Nt, Jt), Xt = {
|
|
1436
1364
|
dataSource: { type: Array, default: [] },
|
|
1437
1365
|
enableSearch: { type: Boolean, default: !1 },
|
|
1438
1366
|
idField: { type: String, default: "id" },
|
|
@@ -1453,38 +1381,38 @@ const ee = {
|
|
|
1453
1381
|
},
|
|
1454
1382
|
// 搜索启用高亮
|
|
1455
1383
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1456
|
-
}, Qt = /* @__PURE__ */
|
|
1384
|
+
}, Qt = /* @__PURE__ */ H({
|
|
1457
1385
|
name: "FComboListContainer",
|
|
1458
|
-
props:
|
|
1386
|
+
props: Xt,
|
|
1459
1387
|
emits: ["selectionChange"],
|
|
1460
1388
|
setup(e, t) {
|
|
1461
|
-
const n = C(), o = C(e.dataSource), c = C([]),
|
|
1462
|
-
|
|
1389
|
+
const n = C(), o = C(e.dataSource), c = C([]), l = C(e.separator), u = C(e.width), f = C(e.maxHeight), b = C(String(e.selectedValues).split(l.value));
|
|
1390
|
+
N(e.dataSource, () => {
|
|
1463
1391
|
o.value = e.dataSource;
|
|
1464
1392
|
});
|
|
1465
|
-
const
|
|
1466
|
-
const
|
|
1467
|
-
return
|
|
1393
|
+
const y = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), h = B(() => {
|
|
1394
|
+
const g = {};
|
|
1395
|
+
return u.value !== void 0 && (g.width = `${u.value}px`), f.value !== void 0 && f.value > 0 && (g.maxHeight = `${f.value}px`), g;
|
|
1468
1396
|
});
|
|
1469
|
-
function
|
|
1470
|
-
c.value =
|
|
1397
|
+
function i(g) {
|
|
1398
|
+
c.value = g.map((a) => Object.assign({}, a)), b.value = g.map((a) => a[e.idField]), t.emit("selectionChange", c.value);
|
|
1471
1399
|
}
|
|
1472
|
-
function
|
|
1400
|
+
function r(g) {
|
|
1473
1401
|
if (e.enableHighlightSearch)
|
|
1474
1402
|
return;
|
|
1475
1403
|
let a = [];
|
|
1476
|
-
typeof e.searchOption == "function" ? a = o.value.filter((
|
|
1404
|
+
typeof e.searchOption == "function" ? a = o.value.filter((m) => e.searchOption(g, m)) : a = o.value.filter((m) => m[e.valueField].indexOf(g) > -1 || m[e.textField].indexOf(g) > -1), n.value.updateDataSource(a);
|
|
1477
1405
|
}
|
|
1478
|
-
return
|
|
1479
|
-
|
|
1406
|
+
return N([() => e.selectedValues], ([g]) => {
|
|
1407
|
+
b.value = g.split(l.value);
|
|
1480
1408
|
}), () => v("div", {
|
|
1481
1409
|
class: "f-combo-list-container pl-3",
|
|
1482
|
-
style:
|
|
1483
|
-
}, [v(
|
|
1410
|
+
style: h.value
|
|
1411
|
+
}, [v(Ue, {
|
|
1484
1412
|
ref: n,
|
|
1485
1413
|
size: "small",
|
|
1486
1414
|
itemClass: "f-combo-list-item",
|
|
1487
|
-
header:
|
|
1415
|
+
header: y.value,
|
|
1488
1416
|
headerClass: "f-combo-list-search-box",
|
|
1489
1417
|
data: o.value,
|
|
1490
1418
|
idField: e.idField,
|
|
@@ -1500,105 +1428,105 @@ const ee = {
|
|
|
1500
1428
|
showSelection: !0
|
|
1501
1429
|
},
|
|
1502
1430
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1503
|
-
selectionValues:
|
|
1504
|
-
onSelectionChange:
|
|
1505
|
-
onAfterSearch:
|
|
1431
|
+
selectionValues: b.value,
|
|
1432
|
+
onSelectionChange: i,
|
|
1433
|
+
onAfterSearch: r
|
|
1506
1434
|
}, null)]);
|
|
1507
1435
|
}
|
|
1508
1436
|
});
|
|
1509
|
-
function
|
|
1437
|
+
function Yt(e) {
|
|
1510
1438
|
const t = C(""), n = C(e.modelValue), o = C(e.data || []), c = C(e.editable);
|
|
1511
|
-
function
|
|
1512
|
-
const
|
|
1513
|
-
return o.value.filter((a) =>
|
|
1439
|
+
function l(i) {
|
|
1440
|
+
const r = String(i).split(e.separator).map((a) => [a, !0]), g = new Map(r);
|
|
1441
|
+
return o.value.filter((a) => g.has(String(a[e.valueField])));
|
|
1514
1442
|
}
|
|
1515
|
-
function
|
|
1516
|
-
const
|
|
1517
|
-
t.value = c.value ?
|
|
1443
|
+
function u(i) {
|
|
1444
|
+
const r = l(i).map((g) => g[e.textField]).join(e.separator);
|
|
1445
|
+
t.value = c.value ? r || i : r;
|
|
1518
1446
|
}
|
|
1519
|
-
function
|
|
1520
|
-
const
|
|
1521
|
-
return o.value.filter((a) =>
|
|
1447
|
+
function f(i) {
|
|
1448
|
+
const r = i.split(e.separator).map((a) => [a, !0]), g = new Map(r);
|
|
1449
|
+
return o.value.filter((a) => g.has(a[e.textField]));
|
|
1522
1450
|
}
|
|
1523
|
-
function
|
|
1524
|
-
const
|
|
1525
|
-
return
|
|
1451
|
+
function b(i) {
|
|
1452
|
+
const r = {};
|
|
1453
|
+
return r[e.idField] = i, r[e.textField] = i, [r];
|
|
1526
1454
|
}
|
|
1527
|
-
function
|
|
1528
|
-
let
|
|
1529
|
-
const
|
|
1530
|
-
return c.value && !
|
|
1455
|
+
function y(i) {
|
|
1456
|
+
let r = f(i);
|
|
1457
|
+
const g = r && r.length > 0;
|
|
1458
|
+
return c.value && !g && (r = b(i)), r;
|
|
1531
1459
|
}
|
|
1532
|
-
function
|
|
1533
|
-
const { url:
|
|
1460
|
+
function h() {
|
|
1461
|
+
const { url: i, method: r = "GET", headers: g = {}, body: a = null } = e.remote, m = r.toLowerCase() == "get" ? { method: r, headers: g } : { method: r, headers: g, body: a };
|
|
1534
1462
|
let s = !1;
|
|
1535
|
-
fetch(
|
|
1536
|
-
var
|
|
1537
|
-
if (
|
|
1538
|
-
return s = !!((
|
|
1539
|
-
throw new Error(
|
|
1540
|
-
}).then((
|
|
1541
|
-
o.value = s ? JSON.parse(
|
|
1542
|
-
}).catch((
|
|
1543
|
-
console.error(
|
|
1463
|
+
fetch(i, m).then((d) => {
|
|
1464
|
+
var F, D;
|
|
1465
|
+
if (d.status === 200)
|
|
1466
|
+
return s = !!((D = (F = d.headers) == null ? void 0 : F.get("content-type")) != null && D.includes("application/json")), s ? d.text() : d.json();
|
|
1467
|
+
throw new Error(d.statusText);
|
|
1468
|
+
}).then((d) => {
|
|
1469
|
+
o.value = s ? JSON.parse(d) : d;
|
|
1470
|
+
}).catch((d) => {
|
|
1471
|
+
console.error(d);
|
|
1544
1472
|
});
|
|
1545
1473
|
}
|
|
1546
|
-
return e.remote &&
|
|
1474
|
+
return e.remote && h(), N(() => e.data, () => {
|
|
1547
1475
|
o.value = e.data;
|
|
1548
|
-
}),
|
|
1476
|
+
}), N([o], ([i]) => {
|
|
1549
1477
|
if (e.modelValue) {
|
|
1550
|
-
const
|
|
1551
|
-
|
|
1478
|
+
const r = i.find((g) => g[e.valueField] === e.modelValue);
|
|
1479
|
+
r && (t.value = r[e.textField]);
|
|
1552
1480
|
}
|
|
1553
|
-
}),
|
|
1554
|
-
n.value =
|
|
1555
|
-
}),
|
|
1481
|
+
}), N(() => e.modelValue, (i) => {
|
|
1482
|
+
n.value = i, u(i);
|
|
1483
|
+
}), u(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText: f, getItemsByValue: l, getSelectedItemsByDisplayText: y };
|
|
1556
1484
|
}
|
|
1557
|
-
const
|
|
1485
|
+
const G = /* @__PURE__ */ H({
|
|
1558
1486
|
name: "FComboList",
|
|
1559
|
-
props:
|
|
1487
|
+
props: ne,
|
|
1560
1488
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1561
1489
|
setup(e, t) {
|
|
1562
|
-
const n = C(), o = C(e.disabled), c = C(e.enableClear),
|
|
1563
|
-
dataSource:
|
|
1564
|
-
displayText:
|
|
1565
|
-
editable:
|
|
1566
|
-
modelValue:
|
|
1567
|
-
getSelectedItemsByDisplayText:
|
|
1568
|
-
} =
|
|
1490
|
+
const n = C(), o = C(e.disabled), c = C(e.enableClear), l = C(e.enableSearch), u = C(e.readonly), {
|
|
1491
|
+
dataSource: f,
|
|
1492
|
+
displayText: b,
|
|
1493
|
+
editable: y,
|
|
1494
|
+
modelValue: h,
|
|
1495
|
+
getSelectedItemsByDisplayText: i
|
|
1496
|
+
} = Yt(e), r = B(() => e.multiSelect), g = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1569
1497
|
function a() {
|
|
1570
|
-
!
|
|
1498
|
+
!r.value && n.value && n.value.hidePopup();
|
|
1571
1499
|
}
|
|
1572
|
-
function
|
|
1573
|
-
|
|
1500
|
+
function m(S) {
|
|
1501
|
+
b.value = S.map((w) => w[e.textField]).join(e.separator), S.length === 1 ? h.value = S[0][e.valueField] : h.value = S.map((w) => w[e.valueField]).join(e.separator), t.emit("update:modelValue", h.value), t.emit("change", S, h.value), a();
|
|
1574
1502
|
}
|
|
1575
1503
|
function s() {
|
|
1576
|
-
|
|
1504
|
+
u.value || n.value.togglePopup();
|
|
1577
1505
|
}
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1506
|
+
function d(S) {
|
|
1507
|
+
h.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1580
1508
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1509
|
+
function k(S) {
|
|
1510
|
+
const w = i(S);
|
|
1511
|
+
m(w);
|
|
1584
1512
|
}
|
|
1585
|
-
function
|
|
1586
|
-
return
|
|
1513
|
+
function F() {
|
|
1514
|
+
return b.value;
|
|
1587
1515
|
}
|
|
1588
|
-
function
|
|
1516
|
+
function D(S) {
|
|
1589
1517
|
t.emit("input", S);
|
|
1590
1518
|
}
|
|
1591
1519
|
return t.expose({
|
|
1592
|
-
getDisplayText:
|
|
1593
|
-
}),
|
|
1594
|
-
o.value = S,
|
|
1595
|
-
}), () => v(
|
|
1520
|
+
getDisplayText: F
|
|
1521
|
+
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([S, w, V, p, M]) => {
|
|
1522
|
+
o.value = S, y.value = w, c.value = V, l.value = p, u.value = M;
|
|
1523
|
+
}), () => v(ue, {
|
|
1596
1524
|
ref: n,
|
|
1597
1525
|
id: e.id,
|
|
1598
1526
|
disable: o.value,
|
|
1599
|
-
readonly:
|
|
1527
|
+
readonly: u.value,
|
|
1600
1528
|
forcePlaceholder: e.forcePlaceholder,
|
|
1601
|
-
editable:
|
|
1529
|
+
editable: y.value,
|
|
1602
1530
|
buttonContent: e.dropDownIcon,
|
|
1603
1531
|
placeholder: e.placeholder,
|
|
1604
1532
|
enableClear: c.value,
|
|
@@ -1607,14 +1535,14 @@ const U = /* @__PURE__ */ N({
|
|
|
1607
1535
|
enableTitle: e.enableTitle,
|
|
1608
1536
|
multiSelect: e.multiSelect,
|
|
1609
1537
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1610
|
-
modelValue:
|
|
1611
|
-
"onUpdate:modelValue": (S) =>
|
|
1538
|
+
modelValue: b.value,
|
|
1539
|
+
"onUpdate:modelValue": (S) => b.value = S,
|
|
1612
1540
|
focusOnCreated: e.focusOnCreated,
|
|
1613
1541
|
selectOnCreated: e.selectOnCreated,
|
|
1614
|
-
onClear:
|
|
1542
|
+
onClear: d,
|
|
1615
1543
|
onClick: s,
|
|
1616
|
-
onChange:
|
|
1617
|
-
onInput:
|
|
1544
|
+
onChange: k,
|
|
1545
|
+
onInput: D,
|
|
1618
1546
|
beforeOpen: e.beforeOpen
|
|
1619
1547
|
}, {
|
|
1620
1548
|
default: () => [v(Qt, {
|
|
@@ -1622,156 +1550,218 @@ const U = /* @__PURE__ */ N({
|
|
|
1622
1550
|
valueField: e.valueField,
|
|
1623
1551
|
textField: e.textField,
|
|
1624
1552
|
titleField: e.titleField,
|
|
1625
|
-
dataSource:
|
|
1626
|
-
selectedValues:
|
|
1553
|
+
dataSource: f.value,
|
|
1554
|
+
selectedValues: h.value,
|
|
1627
1555
|
multiSelect: e.multiSelect,
|
|
1628
|
-
enableSearch:
|
|
1556
|
+
enableSearch: l.value,
|
|
1629
1557
|
maxHeight: e.maxHeight,
|
|
1630
1558
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1631
|
-
width: e.fitEditor ?
|
|
1632
|
-
onSelectionChange:
|
|
1559
|
+
width: e.fitEditor ? g.value : void 0,
|
|
1560
|
+
onSelectionChange: m
|
|
1633
1561
|
}, null)]
|
|
1634
1562
|
});
|
|
1635
1563
|
}
|
|
1636
1564
|
});
|
|
1637
|
-
function
|
|
1565
|
+
function Zt(e, t) {
|
|
1638
1566
|
e.schema;
|
|
1639
1567
|
const n = C(!0), o = C(!0);
|
|
1640
|
-
function c(
|
|
1568
|
+
function c(i) {
|
|
1641
1569
|
return !1;
|
|
1642
1570
|
}
|
|
1643
|
-
function
|
|
1571
|
+
function l() {
|
|
1644
1572
|
return !1;
|
|
1645
1573
|
}
|
|
1646
|
-
function
|
|
1574
|
+
function u() {
|
|
1647
1575
|
return !1;
|
|
1648
1576
|
}
|
|
1649
|
-
function
|
|
1577
|
+
function f() {
|
|
1650
1578
|
return !0;
|
|
1651
1579
|
}
|
|
1652
|
-
function
|
|
1580
|
+
function b(i) {
|
|
1653
1581
|
}
|
|
1654
|
-
function
|
|
1582
|
+
function y() {
|
|
1655
1583
|
}
|
|
1656
|
-
function
|
|
1584
|
+
function h(i) {
|
|
1657
1585
|
return null;
|
|
1658
1586
|
}
|
|
1659
1587
|
return {
|
|
1660
1588
|
canAccepts: c,
|
|
1661
|
-
checkCanDeleteComponent:
|
|
1662
|
-
checkCanMoveComponent:
|
|
1663
|
-
hideNestedPaddingInDesginerView:
|
|
1664
|
-
onAcceptMovedChildElement:
|
|
1665
|
-
resolveComponentContext:
|
|
1589
|
+
checkCanDeleteComponent: l,
|
|
1590
|
+
checkCanMoveComponent: u,
|
|
1591
|
+
hideNestedPaddingInDesginerView: f,
|
|
1592
|
+
onAcceptMovedChildElement: b,
|
|
1593
|
+
resolveComponentContext: y,
|
|
1666
1594
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1667
1595
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1668
|
-
getPropsConfig:
|
|
1596
|
+
getPropsConfig: h
|
|
1669
1597
|
};
|
|
1670
1598
|
}
|
|
1671
|
-
class
|
|
1599
|
+
class Kt {
|
|
1600
|
+
constructor(t, n) {
|
|
1601
|
+
L(this, "componentId");
|
|
1602
|
+
L(this, "viewModelId");
|
|
1603
|
+
L(this, "eventsEditorUtils");
|
|
1604
|
+
L(this, "formSchemaUtils");
|
|
1605
|
+
L(this, "formMetadataConverter");
|
|
1606
|
+
L(this, "designViewModelUtils");
|
|
1607
|
+
L(this, "designViewModelField");
|
|
1608
|
+
L(this, "controlCreatorUtils");
|
|
1609
|
+
L(this, "designerHostService");
|
|
1610
|
+
L(this, "schemaService", null);
|
|
1611
|
+
L(this, "metadataService", null);
|
|
1612
|
+
L(this, "propertyConfig", {
|
|
1613
|
+
type: "object",
|
|
1614
|
+
categories: {}
|
|
1615
|
+
});
|
|
1616
|
+
var o;
|
|
1617
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1618
|
+
}
|
|
1619
|
+
getTableInfo() {
|
|
1620
|
+
var t;
|
|
1621
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1622
|
+
}
|
|
1623
|
+
setDesignViewModelField(t) {
|
|
1624
|
+
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
1625
|
+
if (n) {
|
|
1626
|
+
if (!this.designViewModelField) {
|
|
1627
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1628
|
+
this.designViewModelField = o.fields.find((c) => c.id === n);
|
|
1629
|
+
}
|
|
1630
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
changeFieldEditorType(t, n) {
|
|
1634
|
+
}
|
|
1635
|
+
getBasicPropConfig(t) {
|
|
1636
|
+
return {
|
|
1637
|
+
description: "Basic Information",
|
|
1638
|
+
title: "基本信息",
|
|
1639
|
+
properties: {
|
|
1640
|
+
id: {
|
|
1641
|
+
description: "组件标识",
|
|
1642
|
+
title: "标识",
|
|
1643
|
+
type: "string",
|
|
1644
|
+
readonly: !0
|
|
1645
|
+
},
|
|
1646
|
+
type: {
|
|
1647
|
+
description: "组件类型",
|
|
1648
|
+
title: "控件类型",
|
|
1649
|
+
type: "select",
|
|
1650
|
+
editor: {
|
|
1651
|
+
type: "combo-list",
|
|
1652
|
+
textField: "name",
|
|
1653
|
+
valueField: "value",
|
|
1654
|
+
data: [{ value: t.type, name: j[t.type].name }]
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
getAppearanceConfig(t = null) {
|
|
1661
|
+
return {
|
|
1662
|
+
title: "样式",
|
|
1663
|
+
description: "Appearance",
|
|
1664
|
+
properties: {
|
|
1665
|
+
class: {
|
|
1666
|
+
title: "class样式",
|
|
1667
|
+
type: "string",
|
|
1668
|
+
description: "组件的CSS样式",
|
|
1669
|
+
$converter: "/converter/appearance.converter"
|
|
1670
|
+
},
|
|
1671
|
+
style: {
|
|
1672
|
+
title: "style样式",
|
|
1673
|
+
type: "string",
|
|
1674
|
+
description: "组件的样式",
|
|
1675
|
+
$converter: "/converter/appearance.converter"
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
const R = class R {
|
|
1682
|
+
/**
|
|
1683
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
1684
|
+
*/
|
|
1672
1685
|
static getEditorTypesByMDataType(t) {
|
|
1673
|
-
const n =
|
|
1686
|
+
const n = R.fieldControlTypeMapping[t];
|
|
1674
1687
|
return n || [{ key: "", value: "" }];
|
|
1675
1688
|
}
|
|
1676
|
-
|
|
1689
|
+
/**
|
|
1690
|
+
* 获取所有输入类控件
|
|
1691
|
+
*/
|
|
1692
|
+
static getAllInputTypes() {
|
|
1693
|
+
const t = [];
|
|
1694
|
+
for (let n in R.fieldControlTypeMapping)
|
|
1695
|
+
R.fieldControlTypeMapping[n].forEach((o) => {
|
|
1696
|
+
t.find((c) => c.key === o.key && c.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
1697
|
+
});
|
|
1698
|
+
return t;
|
|
1699
|
+
}
|
|
1700
|
+
};
|
|
1677
1701
|
/**
|
|
1678
1702
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1679
1703
|
*/
|
|
1680
|
-
|
|
1704
|
+
L(R, "fieldControlTypeMapping", {
|
|
1681
1705
|
String: [
|
|
1682
|
-
{ key:
|
|
1683
|
-
{ key:
|
|
1684
|
-
{ key:
|
|
1685
|
-
{ key:
|
|
1686
|
-
{ key:
|
|
1687
|
-
{ key:
|
|
1688
|
-
{ key:
|
|
1689
|
-
{ key: M.textarea.type, value: M.textarea.name }
|
|
1690
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
1706
|
+
{ key: j["input-group"].type, value: j["input-group"].name },
|
|
1707
|
+
{ key: j.lookup.type, value: j.lookup.name },
|
|
1708
|
+
{ key: j["date-picker"].type, value: j["date-picker"].name },
|
|
1709
|
+
{ key: j["check-box"].type, value: j["check-box"].name },
|
|
1710
|
+
{ key: j["radio-group"].type, value: j["radio-group"].name },
|
|
1711
|
+
{ key: j["combo-list"].type, value: j["combo-list"].name },
|
|
1712
|
+
{ key: j.textarea.type, value: j.textarea.name }
|
|
1691
1713
|
],
|
|
1692
1714
|
Text: [
|
|
1693
|
-
{ key:
|
|
1694
|
-
{ key:
|
|
1695
|
-
{ key: M.lookup.type, value: M.lookup.name }
|
|
1715
|
+
{ key: j.textarea.type, value: j.textarea.name },
|
|
1716
|
+
{ key: j.lookup.type, value: j.lookup.name }
|
|
1696
1717
|
],
|
|
1697
1718
|
Decimal: [
|
|
1698
|
-
{ key:
|
|
1719
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1699
1720
|
],
|
|
1700
1721
|
Integer: [
|
|
1701
|
-
{ key:
|
|
1722
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1702
1723
|
],
|
|
1703
1724
|
Number: [
|
|
1704
|
-
{ key:
|
|
1725
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1705
1726
|
],
|
|
1706
1727
|
BigNumber: [
|
|
1707
|
-
{ key:
|
|
1728
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1708
1729
|
],
|
|
1709
1730
|
Date: [
|
|
1710
|
-
{ key:
|
|
1731
|
+
{ key: j["date-picker"].type, value: j["date-picker"].name }
|
|
1711
1732
|
],
|
|
1712
1733
|
DateTime: [
|
|
1713
|
-
{ key:
|
|
1734
|
+
{ key: j["date-picker"].type, value: j["date-picker"].name }
|
|
1714
1735
|
],
|
|
1715
1736
|
Boolean: [
|
|
1716
|
-
{ key:
|
|
1717
|
-
{ key:
|
|
1737
|
+
{ key: j.switch.type, value: j.switch.name },
|
|
1738
|
+
{ key: j["check-box"].type, value: j["check-box"].name }
|
|
1718
1739
|
],
|
|
1719
1740
|
Enum: [
|
|
1720
|
-
{ key:
|
|
1721
|
-
{ key:
|
|
1741
|
+
{ key: j["combo-list"].type, value: j["combo-list"].name },
|
|
1742
|
+
{ key: j["radio-group"].type, value: j["radio-group"].name }
|
|
1722
1743
|
],
|
|
1723
1744
|
Object: [
|
|
1724
|
-
{ key:
|
|
1725
|
-
{ key:
|
|
1726
|
-
{ key:
|
|
1727
|
-
],
|
|
1728
|
-
EmployeeSelector: [
|
|
1729
|
-
{ key: M.EmployeeSelector.type, value: M.EmployeeSelector.name }
|
|
1730
|
-
],
|
|
1731
|
-
AdminOrganizationSelector: [
|
|
1732
|
-
{ key: M.AdminOrganizationSelector.type, value: M.AdminOrganizationSelector.name }
|
|
1745
|
+
{ key: j.lookup.type, value: j.lookup.name },
|
|
1746
|
+
{ key: j["combo-list"].type, value: j["combo-list"].name },
|
|
1747
|
+
{ key: j["radio-group"].type, value: j["radio-group"].name }
|
|
1733
1748
|
]
|
|
1734
1749
|
});
|
|
1735
|
-
|
|
1750
|
+
let _ = R;
|
|
1751
|
+
const en = C(0);
|
|
1752
|
+
class tn extends Kt {
|
|
1736
1753
|
constructor(t, n) {
|
|
1737
|
-
|
|
1738
|
-
$(this, "viewModelId");
|
|
1739
|
-
$(this, "eventsEditorUtils");
|
|
1740
|
-
$(this, "formSchemaUtils");
|
|
1741
|
-
$(this, "formMetadataConverter");
|
|
1742
|
-
$(this, "designViewModelUtils");
|
|
1743
|
-
$(this, "designViewModelField");
|
|
1744
|
-
$(this, "controlCreatorUtils");
|
|
1745
|
-
$(this, "designerHostService");
|
|
1746
|
-
$(this, "schemaService", null);
|
|
1747
|
-
$(this, "metadataService", null);
|
|
1748
|
-
$(this, "propertyConfig", {
|
|
1749
|
-
type: "object",
|
|
1750
|
-
categories: {}
|
|
1751
|
-
});
|
|
1752
|
-
var o;
|
|
1753
|
-
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1754
|
-
}
|
|
1755
|
-
getTableInfo() {
|
|
1756
|
-
var t;
|
|
1757
|
-
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1758
|
-
}
|
|
1759
|
-
setDesignViewModelField(t) {
|
|
1760
|
-
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
1761
|
-
if (n) {
|
|
1762
|
-
if (!this.designViewModelField) {
|
|
1763
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1764
|
-
this.designViewModelField = o.fields.find((c) => c.id === n);
|
|
1765
|
-
}
|
|
1766
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
1767
|
-
}
|
|
1754
|
+
super(t, n);
|
|
1768
1755
|
}
|
|
1769
|
-
|
|
1756
|
+
getPropertyConfig(t, n) {
|
|
1757
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(t, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
1770
1758
|
}
|
|
1771
|
-
|
|
1772
|
-
var
|
|
1773
|
-
var
|
|
1774
|
-
|
|
1759
|
+
getBasicProperties(t, n) {
|
|
1760
|
+
var u;
|
|
1761
|
+
var o = this;
|
|
1762
|
+
this.setDesignViewModelField(t);
|
|
1763
|
+
const c = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1764
|
+
return {
|
|
1775
1765
|
description: "Basic Information",
|
|
1776
1766
|
title: "基本信息",
|
|
1777
1767
|
properties: {
|
|
@@ -1791,63 +1781,48 @@ class Zt {
|
|
|
1791
1781
|
type: "combo-list",
|
|
1792
1782
|
textField: "value",
|
|
1793
1783
|
valueField: "key",
|
|
1794
|
-
|
|
1795
|
-
|
|
1784
|
+
editable: !1,
|
|
1785
|
+
data: o.designViewModelField ? _.getEditorTypesByMDataType((u = o.designViewModelField.type) == null ? void 0 : u.name) : _.getAllInputTypes()
|
|
1796
1786
|
}
|
|
1797
1787
|
},
|
|
1798
1788
|
label: {
|
|
1799
1789
|
title: "标签",
|
|
1800
1790
|
type: "string",
|
|
1801
1791
|
$converter: "/converter/form-group-label.converter"
|
|
1792
|
+
},
|
|
1793
|
+
binding: {
|
|
1794
|
+
description: "绑定的表单字段",
|
|
1795
|
+
title: "绑定",
|
|
1796
|
+
$converter: "/converter/field-selector.converter",
|
|
1797
|
+
editor: {
|
|
1798
|
+
type: "field-selector",
|
|
1799
|
+
bindingType: { enable: !1 },
|
|
1800
|
+
editorParams: {
|
|
1801
|
+
propertyData: t,
|
|
1802
|
+
formBasicInfo: c
|
|
1803
|
+
},
|
|
1804
|
+
columns: [
|
|
1805
|
+
{ field: "name", title: "字段名称" },
|
|
1806
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
1807
|
+
{ field: "fieldType", title: "字段类型" }
|
|
1808
|
+
],
|
|
1809
|
+
textField: "bindingField",
|
|
1810
|
+
data: l
|
|
1811
|
+
}
|
|
1802
1812
|
}
|
|
1803
1813
|
},
|
|
1804
|
-
setPropertyRelates(
|
|
1805
|
-
if (
|
|
1806
|
-
switch (
|
|
1814
|
+
setPropertyRelates(f, b) {
|
|
1815
|
+
if (f)
|
|
1816
|
+
switch (f && f.propertyID) {
|
|
1807
1817
|
case "type": {
|
|
1808
|
-
|
|
1818
|
+
o.changeControlType(t, f, n);
|
|
1809
1819
|
break;
|
|
1810
1820
|
}
|
|
1811
1821
|
}
|
|
1812
1822
|
}
|
|
1813
1823
|
};
|
|
1814
1824
|
}
|
|
1815
|
-
|
|
1816
|
-
* 卡片控件:切换控件类型后事件
|
|
1817
|
-
* @param propertyData 控件DOM属性
|
|
1818
|
-
* @param newControlType 新控件类型
|
|
1819
|
-
*/
|
|
1820
|
-
changeControlType(t, n) {
|
|
1821
|
-
var m, g, l, i, h;
|
|
1822
|
-
const o = n.propertyValue, c = this.formSchemaUtils.getComponentById(this.componentId);
|
|
1823
|
-
let r = this.getControlParentContainer(t.id, c);
|
|
1824
|
-
if (!r)
|
|
1825
|
-
return;
|
|
1826
|
-
const d = r.contents.findIndex((a) => a.id === t.id), y = r.contents[d];
|
|
1827
|
-
let w;
|
|
1828
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1829
|
-
editor: {
|
|
1830
|
-
$type: o
|
|
1831
|
-
},
|
|
1832
|
-
name: this.designViewModelField.name,
|
|
1833
|
-
require: this.designViewModelField.require,
|
|
1834
|
-
readonly: this.designViewModelField.readonly
|
|
1835
|
-
}, !1), w = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(w, {
|
|
1836
|
-
id: y.id,
|
|
1837
|
-
appearance: y.appearance,
|
|
1838
|
-
size: y.size,
|
|
1839
|
-
label: y.label
|
|
1840
|
-
}), Object.assign(w.editor, {
|
|
1841
|
-
isTextArea: w.isTextArea && y.isTextArea,
|
|
1842
|
-
type: o || "",
|
|
1843
|
-
placeHolder: (m = y.editor) == null ? void 0 : m.placeHolder,
|
|
1844
|
-
holdPlace: (g = y.editor) == null ? void 0 : g.holdPlace,
|
|
1845
|
-
readonly: (l = y.editor) == null ? void 0 : l.readonly,
|
|
1846
|
-
require: (i = y.editor) == null ? void 0 : i.require,
|
|
1847
|
-
visible: (h = y.editor) == null ? void 0 : h.visible
|
|
1848
|
-
}), r.contents.splice(d, 1, w);
|
|
1849
|
-
}
|
|
1850
|
-
getAppearanceConfig(t = null) {
|
|
1825
|
+
getAppearanceProperties(t) {
|
|
1851
1826
|
return {
|
|
1852
1827
|
title: "样式",
|
|
1853
1828
|
description: "Appearance",
|
|
@@ -1877,65 +1852,44 @@ class Zt {
|
|
|
1877
1852
|
}
|
|
1878
1853
|
};
|
|
1879
1854
|
}
|
|
1880
|
-
/**
|
|
1881
|
-
* 获取控件:以contents为节点进行定位
|
|
1882
|
-
* @param controlId 控件ID
|
|
1883
|
-
* @param domJson 容器
|
|
1884
|
-
*/
|
|
1885
|
-
getControlParentContainer(t, n) {
|
|
1886
|
-
let o;
|
|
1887
|
-
if (!n || !n.contents || n.contents.length === 0)
|
|
1888
|
-
return null;
|
|
1889
|
-
for (const c of n.contents) {
|
|
1890
|
-
if (c.id === t)
|
|
1891
|
-
return o = n, n;
|
|
1892
|
-
if (o = this.getControlParentContainer(t, c), o)
|
|
1893
|
-
return o;
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
class Jt extends Zt {
|
|
1898
|
-
constructor(t, n) {
|
|
1899
|
-
super(t, n);
|
|
1900
|
-
}
|
|
1901
|
-
getBasicProperties(t) {
|
|
1902
|
-
let n = this.getBasicPropConfig(t);
|
|
1903
|
-
return n.properties.binding = this.getFieldSelectorOptions(t), n;
|
|
1904
|
-
}
|
|
1905
|
-
getAppearanceProperties(t) {
|
|
1906
|
-
return this.getAppearanceConfig(t);
|
|
1907
|
-
}
|
|
1908
1855
|
getEditorProperties(t) {
|
|
1909
1856
|
return this.getComponentConfig(t);
|
|
1910
1857
|
}
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1858
|
+
/**
|
|
1859
|
+
* 卡片控件:切换控件类型后事件
|
|
1860
|
+
* @param propertyData 控件DOM属性
|
|
1861
|
+
* @param newControlType 新控件类型
|
|
1862
|
+
*/
|
|
1863
|
+
changeControlType(t, n, o) {
|
|
1864
|
+
var y, h, i, r;
|
|
1865
|
+
const c = n.propertyValue, l = o && o.parent && o.parent.schema;
|
|
1866
|
+
if (!l)
|
|
1867
|
+
return;
|
|
1868
|
+
const u = l.contents.findIndex((g) => g.id === t.id), f = l.contents[u];
|
|
1869
|
+
let b;
|
|
1870
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1920
1871
|
editor: {
|
|
1921
|
-
type:
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1872
|
+
$type: c
|
|
1873
|
+
},
|
|
1874
|
+
name: this.designViewModelField.name,
|
|
1875
|
+
require: this.designViewModelField.require,
|
|
1876
|
+
readonly: this.designViewModelField.readonly
|
|
1877
|
+
}, !1), b = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, c)), b || (b = re("form-group") || {}, b.editor = re(c) || {}, delete b.editor.id, delete b.editor.binding, delete b.editor.appearance), Object.assign(b, {
|
|
1878
|
+
id: f.id,
|
|
1879
|
+
appearance: f.appearance,
|
|
1880
|
+
size: f.size,
|
|
1881
|
+
label: f.label,
|
|
1882
|
+
binding: f.binding,
|
|
1883
|
+
visible: f.visible
|
|
1884
|
+
}), Object.assign(b.editor, {
|
|
1885
|
+
isTextArea: b.isTextArea && f.isTextArea,
|
|
1886
|
+
placeholder: (y = f.editor) == null ? void 0 : y.placeholder,
|
|
1887
|
+
holdPlace: (h = f.editor) == null ? void 0 : h.holdPlace,
|
|
1888
|
+
readonly: (i = f.editor) == null ? void 0 : i.readonly,
|
|
1889
|
+
require: (r = f.editor) == null ? void 0 : r.require
|
|
1890
|
+
}), l.contents.splice(u, 1), l.contents.splice(u, 0, b), o.schema = Object.assign(f, b), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1891
|
+
(g) => g.classList.remove("dgComponentSelected")
|
|
1892
|
+
), en.value++;
|
|
1939
1893
|
}
|
|
1940
1894
|
getComponentConfig(t, n = {}, o = {}) {
|
|
1941
1895
|
const c = Object.assign({
|
|
@@ -1943,7 +1897,7 @@ class Jt extends Zt {
|
|
|
1943
1897
|
title: "组件信息",
|
|
1944
1898
|
type: "input-group",
|
|
1945
1899
|
$converter: "/converter/property-editor.converter"
|
|
1946
|
-
}, n),
|
|
1900
|
+
}, n), l = Object.assign({
|
|
1947
1901
|
readonly: {
|
|
1948
1902
|
description: "",
|
|
1949
1903
|
title: "只读",
|
|
@@ -1965,10 +1919,10 @@ class Jt extends Zt {
|
|
|
1965
1919
|
type: "string"
|
|
1966
1920
|
}
|
|
1967
1921
|
}, o);
|
|
1968
|
-
return { ...c, properties: { ...
|
|
1922
|
+
return { ...c, properties: { ...l } };
|
|
1969
1923
|
}
|
|
1970
1924
|
}
|
|
1971
|
-
class
|
|
1925
|
+
class nn extends tn {
|
|
1972
1926
|
constructor(t, n) {
|
|
1973
1927
|
super(t, n);
|
|
1974
1928
|
}
|
|
@@ -1992,41 +1946,41 @@ class Kt extends Jt {
|
|
|
1992
1946
|
});
|
|
1993
1947
|
}
|
|
1994
1948
|
}
|
|
1995
|
-
function
|
|
1949
|
+
function on(e, t) {
|
|
1996
1950
|
const {
|
|
1997
1951
|
canAccepts: n,
|
|
1998
1952
|
checkCanDeleteComponent: o,
|
|
1999
1953
|
checkCanMoveComponent: c,
|
|
2000
|
-
hideNestedPaddingInDesginerView:
|
|
2001
|
-
onAcceptMovedChildElement:
|
|
2002
|
-
resolveComponentContext:
|
|
2003
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2004
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2005
|
-
} =
|
|
2006
|
-
function
|
|
2007
|
-
return new
|
|
1954
|
+
hideNestedPaddingInDesginerView: l,
|
|
1955
|
+
onAcceptMovedChildElement: u,
|
|
1956
|
+
resolveComponentContext: f,
|
|
1957
|
+
triggerBelongedComponentToMoveWhenMoved: b,
|
|
1958
|
+
triggerBelongedComponentToDeleteWhenDeleted: y
|
|
1959
|
+
} = Zt(e), h = e.schema;
|
|
1960
|
+
function i(r, g) {
|
|
1961
|
+
return new nn(r, t).getPropertyConfig(h, g);
|
|
2008
1962
|
}
|
|
2009
1963
|
return {
|
|
2010
1964
|
canAccepts: n,
|
|
2011
1965
|
checkCanDeleteComponent: o,
|
|
2012
1966
|
checkCanMoveComponent: c,
|
|
2013
|
-
hideNestedPaddingInDesginerView:
|
|
2014
|
-
onAcceptMovedChildElement:
|
|
2015
|
-
resolveComponentContext:
|
|
2016
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2017
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2018
|
-
getPropsConfig:
|
|
1967
|
+
hideNestedPaddingInDesginerView: l,
|
|
1968
|
+
onAcceptMovedChildElement: u,
|
|
1969
|
+
resolveComponentContext: f,
|
|
1970
|
+
triggerBelongedComponentToMoveWhenMoved: b,
|
|
1971
|
+
triggerBelongedComponentToDeleteWhenDeleted: y,
|
|
1972
|
+
getPropsConfig: i
|
|
2019
1973
|
};
|
|
2020
1974
|
}
|
|
2021
|
-
const
|
|
1975
|
+
const an = /* @__PURE__ */ H({
|
|
2022
1976
|
name: "FComboListDesign",
|
|
2023
|
-
props:
|
|
1977
|
+
props: ne,
|
|
2024
1978
|
emits: ["clear", "update:modelValue", "change"],
|
|
2025
1979
|
setup(e, t) {
|
|
2026
|
-
const n = C(), o =
|
|
2027
|
-
return
|
|
2028
|
-
n.value.componentInstance =
|
|
2029
|
-
}), t.expose(
|
|
1980
|
+
const n = C(), o = X("designer-host-service"), c = X("design-item-context"), l = on(c, o), u = Ge(n, c, l);
|
|
1981
|
+
return ce(() => {
|
|
1982
|
+
n.value.componentInstance = u;
|
|
1983
|
+
}), t.expose(u.value), () => v(ue, {
|
|
2030
1984
|
ref: n,
|
|
2031
1985
|
id: e.id,
|
|
2032
1986
|
disable: e.disabled,
|
|
@@ -2043,70 +1997,70 @@ const tn = /* @__PURE__ */ N({
|
|
|
2043
1997
|
inputType: e.multiSelect ? "tag" : "text"
|
|
2044
1998
|
}, null);
|
|
2045
1999
|
}
|
|
2046
|
-
}),
|
|
2000
|
+
}), rn = (e) => {
|
|
2047
2001
|
const t = e;
|
|
2048
2002
|
return t.install = function(n) {
|
|
2049
2003
|
n.component(t.name, e);
|
|
2050
2004
|
}, e;
|
|
2051
2005
|
};
|
|
2052
|
-
|
|
2053
|
-
e["combo-list"] =
|
|
2006
|
+
G.register = (e, t, n, o) => {
|
|
2007
|
+
e["combo-list"] = G, t["combo-list"] = ge;
|
|
2054
2008
|
};
|
|
2055
|
-
|
|
2056
|
-
e["combo-list"] =
|
|
2009
|
+
G.registerDesigner = (e, t, n) => {
|
|
2010
|
+
e["combo-list"] = an, t["combo-list"] = ge;
|
|
2057
2011
|
};
|
|
2058
|
-
const
|
|
2012
|
+
const q = rn(G), z = /* @__PURE__ */ H({
|
|
2059
2013
|
name: "FOrder",
|
|
2060
|
-
props:
|
|
2014
|
+
props: te,
|
|
2061
2015
|
emits: ["change"],
|
|
2062
2016
|
setup(e, t) {
|
|
2063
|
-
const n = C(e.items), o = C("排序列"), c = C("排序方式"),
|
|
2017
|
+
const n = C(e.items), o = C("排序列"), c = C("排序方式"), l = C("添加排序列"), u = [{
|
|
2064
2018
|
id: "asc",
|
|
2065
2019
|
name: "升序"
|
|
2066
2020
|
}, {
|
|
2067
2021
|
id: "desc",
|
|
2068
2022
|
name: "降序"
|
|
2069
|
-
}],
|
|
2070
|
-
function
|
|
2071
|
-
const s = n.value.map((
|
|
2072
|
-
|
|
2023
|
+
}], f = C(/* @__PURE__ */ new Map());
|
|
2024
|
+
function b() {
|
|
2025
|
+
const s = n.value.map((d) => [d.id, !0]);
|
|
2026
|
+
f.value = new Map(s);
|
|
2073
2027
|
}
|
|
2074
|
-
|
|
2075
|
-
const
|
|
2028
|
+
b();
|
|
2029
|
+
const y = B(() => e.dataSource.map((s) => (s.disabled = f.value.has(s.id), s))), h = B(() => ({
|
|
2076
2030
|
"f-order": !0
|
|
2077
2031
|
}));
|
|
2078
|
-
function
|
|
2079
|
-
n.value = n.value.filter((
|
|
2032
|
+
function i(s) {
|
|
2033
|
+
n.value = n.value.filter((d) => d.id !== s.id), b(), t.emit("change", n.value);
|
|
2080
2034
|
}
|
|
2081
|
-
function
|
|
2035
|
+
function r() {
|
|
2082
2036
|
n.value = [...n.value, {
|
|
2083
2037
|
id: Date.now().toString(),
|
|
2084
2038
|
name: "",
|
|
2085
2039
|
order: "asc"
|
|
2086
|
-
}],
|
|
2040
|
+
}], b(), t.emit("change", n.value);
|
|
2087
2041
|
}
|
|
2088
|
-
function
|
|
2042
|
+
function g(s) {
|
|
2089
2043
|
if (s && s.length === 1) {
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2044
|
+
const d = s[0], k = n.value.find((F) => F.id === d.id);
|
|
2045
|
+
k && (k.name = d.name);
|
|
2092
2046
|
}
|
|
2093
|
-
|
|
2047
|
+
b(), t.emit("change", n.value);
|
|
2094
2048
|
}
|
|
2095
2049
|
function a(s) {
|
|
2096
2050
|
if (s && s.length) {
|
|
2097
|
-
const
|
|
2098
|
-
s.reduce((
|
|
2051
|
+
const d = /* @__PURE__ */ new Map();
|
|
2052
|
+
s.reduce((k, F) => (k.set(F.id, F), k), d), n.value = s.map((k) => d.get(k.id)), t.emit("change", n.value);
|
|
2099
2053
|
}
|
|
2100
2054
|
}
|
|
2101
|
-
function
|
|
2102
|
-
return v(
|
|
2055
|
+
function m() {
|
|
2056
|
+
return v(me, {
|
|
2103
2057
|
style: "flex:1",
|
|
2104
2058
|
data: n.value,
|
|
2105
2059
|
draggable: !0,
|
|
2106
2060
|
view: "DraggableView",
|
|
2107
2061
|
"keep-order": !0,
|
|
2108
2062
|
itemClass: "f-order-item",
|
|
2109
|
-
onRemoveItem:
|
|
2063
|
+
onRemoveItem: i,
|
|
2110
2064
|
onChange: a
|
|
2111
2065
|
}, {
|
|
2112
2066
|
header: () => v("div", {
|
|
@@ -2118,147 +2072,147 @@ const z = nn(U), _ = /* @__PURE__ */ N({
|
|
|
2118
2072
|
}, [c.value])]),
|
|
2119
2073
|
itemContent: (s) => v("div", {
|
|
2120
2074
|
class: "f-order-item-content"
|
|
2121
|
-
}, [v(
|
|
2075
|
+
}, [v(q, {
|
|
2122
2076
|
class: "f-order-item-content-order-field",
|
|
2123
|
-
data:
|
|
2077
|
+
data: y.value,
|
|
2124
2078
|
valueField: "id",
|
|
2125
2079
|
textField: "name",
|
|
2126
2080
|
idField: "id",
|
|
2127
2081
|
modelValue: s.id,
|
|
2128
|
-
"onUpdate:modelValue": (
|
|
2129
|
-
onChange:
|
|
2130
|
-
onClear:
|
|
2131
|
-
}, null), v(
|
|
2082
|
+
"onUpdate:modelValue": (d) => s.id = d,
|
|
2083
|
+
onChange: g,
|
|
2084
|
+
onClear: g
|
|
2085
|
+
}, null), v(q, {
|
|
2132
2086
|
class: "f-order-item-content-order-type",
|
|
2133
|
-
data:
|
|
2087
|
+
data: u,
|
|
2134
2088
|
valueField: "id",
|
|
2135
2089
|
textField: "name",
|
|
2136
2090
|
idField: "id",
|
|
2137
2091
|
modelValue: s.order,
|
|
2138
|
-
"onUpdate:modelValue": (
|
|
2139
|
-
onChange:
|
|
2092
|
+
"onUpdate:modelValue": (d) => s.order = d,
|
|
2093
|
+
onChange: g
|
|
2140
2094
|
}, null)]),
|
|
2141
2095
|
footer: () => v("div", {
|
|
2142
2096
|
class: "f-order-footer"
|
|
2143
|
-
}, [v(
|
|
2097
|
+
}, [v(ye, {
|
|
2144
2098
|
type: "link",
|
|
2145
2099
|
class: "f-order-add-button",
|
|
2146
|
-
onClick:
|
|
2100
|
+
onClick: r
|
|
2147
2101
|
}, {
|
|
2148
2102
|
default: () => v(Q, null, [v("span", {
|
|
2149
2103
|
class: "f-order-add-icon"
|
|
2150
2104
|
}, [v("i", {
|
|
2151
2105
|
class: "f-icon f-icon-add"
|
|
2152
|
-
}, null)]),
|
|
2106
|
+
}, null)]), l.value])
|
|
2153
2107
|
})])
|
|
2154
2108
|
});
|
|
2155
2109
|
}
|
|
2156
2110
|
return () => v("div", {
|
|
2157
|
-
class:
|
|
2158
|
-
}, [
|
|
2111
|
+
class: h.value
|
|
2112
|
+
}, [m()]);
|
|
2159
2113
|
}
|
|
2160
2114
|
});
|
|
2161
|
-
function
|
|
2115
|
+
function ln(e, t, n) {
|
|
2162
2116
|
var S;
|
|
2163
2117
|
function o() {
|
|
2164
2118
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
2165
2119
|
}
|
|
2166
2120
|
o();
|
|
2167
|
-
const c = n && n.getStyles && n.getStyles() || "",
|
|
2168
|
-
function
|
|
2121
|
+
const c = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", u = C();
|
|
2122
|
+
function f() {
|
|
2169
2123
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2170
2124
|
}
|
|
2171
|
-
function
|
|
2125
|
+
function b() {
|
|
2172
2126
|
return !1;
|
|
2173
2127
|
}
|
|
2174
|
-
function
|
|
2128
|
+
function y() {
|
|
2175
2129
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
2176
2130
|
}
|
|
2177
|
-
function
|
|
2131
|
+
function h() {
|
|
2178
2132
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
2179
2133
|
}
|
|
2180
|
-
function
|
|
2181
|
-
if (!
|
|
2134
|
+
function i(w) {
|
|
2135
|
+
if (!w || !w.value)
|
|
2182
2136
|
return null;
|
|
2183
|
-
if (
|
|
2184
|
-
return
|
|
2185
|
-
const
|
|
2137
|
+
if (w.value.schema && w.value.schema.type === "component")
|
|
2138
|
+
return w.value;
|
|
2139
|
+
const V = C(w == null ? void 0 : w.value.parent), p = i(V);
|
|
2186
2140
|
return p || null;
|
|
2187
2141
|
}
|
|
2188
|
-
function
|
|
2189
|
-
const { componentInstance:
|
|
2190
|
-
return !
|
|
2142
|
+
function r(w = t) {
|
|
2143
|
+
const { componentInstance: V, designerItemElementRef: p } = w;
|
|
2144
|
+
return !V || !V.value ? null : V.value.canMove ? p : r(w.parent);
|
|
2191
2145
|
}
|
|
2192
|
-
function
|
|
2193
|
-
return !!n && n.canAccepts(
|
|
2146
|
+
function g(w) {
|
|
2147
|
+
return !!n && n.canAccepts(w);
|
|
2194
2148
|
}
|
|
2195
2149
|
function a() {
|
|
2196
2150
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2197
2151
|
}
|
|
2198
|
-
function
|
|
2152
|
+
function m() {
|
|
2199
2153
|
}
|
|
2200
|
-
function s(
|
|
2201
|
-
|
|
2154
|
+
function s(w, V) {
|
|
2155
|
+
V && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(V);
|
|
2202
2156
|
}
|
|
2203
|
-
function
|
|
2204
|
-
const { componentType:
|
|
2205
|
-
let p =
|
|
2206
|
-
n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(
|
|
2207
|
-
const
|
|
2208
|
-
return p && !p.id && p.type ===
|
|
2157
|
+
function d(w) {
|
|
2158
|
+
const { componentType: V } = w;
|
|
2159
|
+
let p = U(V, w);
|
|
2160
|
+
n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(w, p));
|
|
2161
|
+
const M = V.toLowerCase().replace("-", "_");
|
|
2162
|
+
return p && !p.id && p.type === V && (p.id = `${M}_${Math.random().toString().slice(2, 6)}`), p;
|
|
2209
2163
|
}
|
|
2210
|
-
function
|
|
2211
|
-
const p = String(
|
|
2212
|
-
A.parentComponentInstance =
|
|
2213
|
-
let T =
|
|
2214
|
-
n && n.onAcceptNewChildElement && (T = n.onAcceptNewChildElement(
|
|
2215
|
-
const
|
|
2216
|
-
return T && !T.id && T.type === p && (T.id = `${
|
|
2164
|
+
function k(w, V) {
|
|
2165
|
+
const p = String(w.getAttribute("data-controltype")), M = w.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
|
|
2166
|
+
A.parentComponentInstance = u.value;
|
|
2167
|
+
let T = U(p, A);
|
|
2168
|
+
n && n.onAcceptNewChildElement && (T = n.onAcceptNewChildElement(w, V, T));
|
|
2169
|
+
const $ = p.toLowerCase().replace("-", "_");
|
|
2170
|
+
return T && !T.id && T.type === p && (T.id = `${$}_${Math.random().toString().slice(2, 6)}`), T;
|
|
2217
2171
|
}
|
|
2218
|
-
function
|
|
2172
|
+
function F(w) {
|
|
2219
2173
|
}
|
|
2220
|
-
function
|
|
2174
|
+
function D(...w) {
|
|
2221
2175
|
if (n && n.getPropsConfig)
|
|
2222
|
-
return n.getPropsConfig(...
|
|
2176
|
+
return n.getPropsConfig(...w);
|
|
2223
2177
|
}
|
|
2224
|
-
return
|
|
2225
|
-
canMove:
|
|
2226
|
-
canSelectParent:
|
|
2227
|
-
canDelete:
|
|
2228
|
-
canNested: !
|
|
2178
|
+
return u.value = {
|
|
2179
|
+
canMove: f(),
|
|
2180
|
+
canSelectParent: b(),
|
|
2181
|
+
canDelete: y(),
|
|
2182
|
+
canNested: !h(),
|
|
2229
2183
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2230
2184
|
elementRef: e,
|
|
2231
2185
|
parent: (S = t == null ? void 0 : t.parent) == null ? void 0 : S.componentInstance,
|
|
2232
2186
|
schema: t == null ? void 0 : t.schema,
|
|
2233
2187
|
styles: c,
|
|
2234
|
-
designerClass:
|
|
2235
|
-
canAccepts:
|
|
2236
|
-
getBelongedComponentInstance:
|
|
2237
|
-
getDraggableDesignItemElement:
|
|
2188
|
+
designerClass: l,
|
|
2189
|
+
canAccepts: g,
|
|
2190
|
+
getBelongedComponentInstance: i,
|
|
2191
|
+
getDraggableDesignItemElement: r,
|
|
2238
2192
|
getDraggingDisplayText: a,
|
|
2239
|
-
getPropConfig:
|
|
2240
|
-
getDragScopeElement:
|
|
2193
|
+
getPropConfig: D,
|
|
2194
|
+
getDragScopeElement: m,
|
|
2241
2195
|
onAcceptMovedChildElement: s,
|
|
2242
|
-
onAcceptNewChildElement:
|
|
2243
|
-
onChildElementMovedOut:
|
|
2244
|
-
addNewChildComponentSchema:
|
|
2196
|
+
onAcceptNewChildElement: k,
|
|
2197
|
+
onChildElementMovedOut: F,
|
|
2198
|
+
addNewChildComponentSchema: d,
|
|
2245
2199
|
updateDragAndDropRules: o,
|
|
2246
2200
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
2247
2201
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
2248
|
-
},
|
|
2202
|
+
}, u;
|
|
2249
2203
|
}
|
|
2250
|
-
function
|
|
2204
|
+
function sn() {
|
|
2251
2205
|
function e(t) {
|
|
2252
|
-
var c,
|
|
2206
|
+
var c, l;
|
|
2253
2207
|
if (!t)
|
|
2254
2208
|
return !1;
|
|
2255
2209
|
const n = ((c = t.targetContainer) == null ? void 0 : c.componentInstance) && t.targetContainer.componentInstance.value;
|
|
2256
2210
|
if (!n)
|
|
2257
2211
|
return !1;
|
|
2258
|
-
const o = (
|
|
2212
|
+
const o = (l = n.schema.appearance) == null ? void 0 : l.class;
|
|
2259
2213
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2260
|
-
const
|
|
2261
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
2214
|
+
const u = n.schema.type, f = (u === "response-form" || u === "content-container") && o && o.includes("farris-form");
|
|
2215
|
+
if (n.schema.type !== "response-layout-item" && !f)
|
|
2262
2216
|
return !1;
|
|
2263
2217
|
}
|
|
2264
2218
|
return t.controlType !== "field-set";
|
|
@@ -2267,7 +2221,7 @@ function an() {
|
|
|
2267
2221
|
basalDragulaRuleForContainer: e
|
|
2268
2222
|
};
|
|
2269
2223
|
}
|
|
2270
|
-
const
|
|
2224
|
+
const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-design.gitee.io/dragging-rules.schema.json", dn = "Dragging Rules", pn = "The rules of designer canvas", fn = "object", mn = {
|
|
2271
2225
|
"f-page": {
|
|
2272
2226
|
description: "The root class of page designed by farris.",
|
|
2273
2227
|
type: "object",
|
|
@@ -2831,39 +2785,39 @@ const rn = "https://json-schema.org/draft/2020-12/schema", ln = "https://farris-
|
|
|
2831
2785
|
description: "",
|
|
2832
2786
|
type: "object"
|
|
2833
2787
|
}
|
|
2834
|
-
},
|
|
2835
|
-
$schema:
|
|
2836
|
-
$id:
|
|
2837
|
-
title:
|
|
2838
|
-
description:
|
|
2839
|
-
type:
|
|
2840
|
-
properties:
|
|
2841
|
-
required:
|
|
2842
|
-
},
|
|
2843
|
-
function
|
|
2844
|
-
function e(a,
|
|
2845
|
-
var
|
|
2788
|
+
}, yn = [], gn = {
|
|
2789
|
+
$schema: cn,
|
|
2790
|
+
$id: un,
|
|
2791
|
+
title: dn,
|
|
2792
|
+
description: pn,
|
|
2793
|
+
type: fn,
|
|
2794
|
+
properties: mn,
|
|
2795
|
+
required: yn
|
|
2796
|
+
}, J = /* @__PURE__ */ new Map();
|
|
2797
|
+
function hn() {
|
|
2798
|
+
function e(a, m, s, d) {
|
|
2799
|
+
var k;
|
|
2846
2800
|
if (typeof s == "number")
|
|
2847
|
-
return ((
|
|
2801
|
+
return ((k = d[a]) == null ? void 0 : k.length) === s;
|
|
2848
2802
|
if (typeof s == "object") {
|
|
2849
|
-
const
|
|
2850
|
-
if (
|
|
2851
|
-
return Number(
|
|
2852
|
-
if (
|
|
2853
|
-
return Number(
|
|
2854
|
-
if (
|
|
2855
|
-
return Number(
|
|
2803
|
+
const F = Object.keys(s)[0], D = s[F];
|
|
2804
|
+
if (F === "not")
|
|
2805
|
+
return Number(d[a].length) !== Number(D);
|
|
2806
|
+
if (F === "moreThan")
|
|
2807
|
+
return Number(d[a].length) >= Number(D);
|
|
2808
|
+
if (F === "lessThan")
|
|
2809
|
+
return Number(d[a].length) <= Number(D);
|
|
2856
2810
|
}
|
|
2857
2811
|
return !1;
|
|
2858
2812
|
}
|
|
2859
|
-
function t(a,
|
|
2860
|
-
return typeof s == "boolean" ?
|
|
2813
|
+
function t(a, m, s, d) {
|
|
2814
|
+
return typeof s == "boolean" ? d.childrenClassList.includes(m) === !!s : !1;
|
|
2861
2815
|
}
|
|
2862
|
-
function n(a,
|
|
2863
|
-
return typeof s == "boolean" ?
|
|
2816
|
+
function n(a, m, s, d) {
|
|
2817
|
+
return typeof s == "boolean" ? d.parentClassList.includes(m) === !!s : !1;
|
|
2864
2818
|
}
|
|
2865
|
-
function o(a,
|
|
2866
|
-
return typeof s == "boolean" ?
|
|
2819
|
+
function o(a, m, s, d) {
|
|
2820
|
+
return typeof s == "boolean" ? d.parentClassList.includes(m) === !!s : !1;
|
|
2867
2821
|
}
|
|
2868
2822
|
const c = /* @__PURE__ */ new Map([
|
|
2869
2823
|
["length", e],
|
|
@@ -2871,236 +2825,236 @@ function mn() {
|
|
|
2871
2825
|
["hasSibling", o],
|
|
2872
2826
|
["hasParent", n]
|
|
2873
2827
|
]);
|
|
2874
|
-
function
|
|
2828
|
+
function l(a, m) {
|
|
2875
2829
|
const s = a;
|
|
2876
|
-
return typeof
|
|
2877
|
-
if (
|
|
2878
|
-
return { target: s, operator: "length", param: null, value:
|
|
2879
|
-
const
|
|
2880
|
-
return { target: s, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param:
|
|
2830
|
+
return typeof m == "number" ? [{ target: s, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((d) => {
|
|
2831
|
+
if (d === "length")
|
|
2832
|
+
return { target: s, operator: "length", param: null, value: m[d] };
|
|
2833
|
+
const k = d, F = m[d];
|
|
2834
|
+
return { target: s, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param: k, value: F };
|
|
2881
2835
|
}) : [];
|
|
2882
2836
|
}
|
|
2883
|
-
function
|
|
2837
|
+
function u(a, m) {
|
|
2884
2838
|
if (c.has(a.operator)) {
|
|
2885
2839
|
const s = c.get(a.operator);
|
|
2886
|
-
return s && s(a.target, a.param, a.value,
|
|
2840
|
+
return s && s(a.target, a.param, a.value, m) || !1;
|
|
2887
2841
|
}
|
|
2888
2842
|
return !1;
|
|
2889
2843
|
}
|
|
2890
|
-
function
|
|
2891
|
-
return Object.keys(a).reduce((
|
|
2892
|
-
const S =
|
|
2893
|
-
return
|
|
2894
|
-
}, []).reduce((
|
|
2844
|
+
function f(a, m) {
|
|
2845
|
+
return Object.keys(a).reduce((F, D) => {
|
|
2846
|
+
const S = l(D, a[D]);
|
|
2847
|
+
return F.push(...S), F;
|
|
2848
|
+
}, []).reduce((F, D) => F && u(D, m), !0);
|
|
2895
2849
|
}
|
|
2896
|
-
function
|
|
2897
|
-
const s = Object.keys(a),
|
|
2898
|
-
return
|
|
2850
|
+
function b(a, m) {
|
|
2851
|
+
const s = Object.keys(a), d = s.includes("allOf"), k = s.includes("anyOf"), F = d || k, w = (F ? a[F ? d ? "allOf" : "anyOf" : "allOf"] : [a]).map((p) => f(p, m));
|
|
2852
|
+
return d ? !w.includes(!1) : w.includes(!0);
|
|
2899
2853
|
}
|
|
2900
|
-
function
|
|
2854
|
+
function y(a, m) {
|
|
2901
2855
|
const s = a.const;
|
|
2902
|
-
return s ? typeof s == "boolean" ? s : typeof s == "object" ?
|
|
2856
|
+
return s ? typeof s == "boolean" ? s : typeof s == "object" ? b(s, m) : !1 : !1;
|
|
2903
2857
|
}
|
|
2904
|
-
function
|
|
2905
|
-
return (
|
|
2858
|
+
function h(a) {
|
|
2859
|
+
return (m) => {
|
|
2906
2860
|
const s = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2907
|
-
return a && a.properties && Object.keys(a.properties).reduce((
|
|
2908
|
-
const
|
|
2909
|
-
return
|
|
2861
|
+
return a && a.properties && Object.keys(a.properties).reduce((d, k) => {
|
|
2862
|
+
const F = a.properties[k];
|
|
2863
|
+
return d[k] = y(F, m), d;
|
|
2910
2864
|
}, s), s;
|
|
2911
2865
|
};
|
|
2912
2866
|
}
|
|
2913
|
-
function
|
|
2914
|
-
if (
|
|
2915
|
-
const { rules:
|
|
2916
|
-
s.set(a,
|
|
2917
|
-
(
|
|
2867
|
+
function i(a, m, s) {
|
|
2868
|
+
if (m.type === "object" && m.properties) {
|
|
2869
|
+
const { rules: d, contents: k } = m.properties;
|
|
2870
|
+
s.set(a, h(d)), k && Object.keys(k.properties).forEach(
|
|
2871
|
+
(F) => i(F, k.properties[F], s)
|
|
2918
2872
|
);
|
|
2919
2873
|
}
|
|
2920
2874
|
}
|
|
2921
|
-
function
|
|
2922
|
-
const { properties: a } =
|
|
2923
|
-
Object.keys(a).forEach((
|
|
2924
|
-
|
|
2875
|
+
function r() {
|
|
2876
|
+
const { properties: a } = gn;
|
|
2877
|
+
Object.keys(a).forEach((m) => {
|
|
2878
|
+
i(m, a[m], J);
|
|
2925
2879
|
});
|
|
2926
2880
|
}
|
|
2927
|
-
function
|
|
2881
|
+
function g(a, m) {
|
|
2928
2882
|
const s = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2929
|
-
return
|
|
2883
|
+
return J.has(a) ? J.get(a)(m) : s;
|
|
2930
2884
|
}
|
|
2931
|
-
return
|
|
2885
|
+
return r(), { getRuleValue: g };
|
|
2932
2886
|
}
|
|
2933
|
-
function
|
|
2934
|
-
var
|
|
2935
|
-
const n = e.schema, o = (
|
|
2936
|
-
let
|
|
2937
|
-
function l(p) {
|
|
2938
|
-
return m && m.componentClassList && m.componentClassList.includes("f-form-layout") && m.componentClassList.includes("farris-form") ? p.sourceType === "control" && p.controlCategory === "input" || p.sourceType === "move" && p.controlType === "form-group" : !0;
|
|
2939
|
-
}
|
|
2887
|
+
function bn(e, t) {
|
|
2888
|
+
var V;
|
|
2889
|
+
const n = e.schema, o = (V = e.parent) == null ? void 0 : V.schema, c = hn(), l = C(!1), u = C(!1);
|
|
2890
|
+
let f = !0, b = !1, y, h = !1;
|
|
2940
2891
|
function i(p) {
|
|
2941
|
-
return
|
|
2892
|
+
return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? p.sourceType === "control" && p.controlCategory === "input" || p.sourceType === "move" && p.controlType === "form-group" : !0;
|
|
2942
2893
|
}
|
|
2943
|
-
function
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2894
|
+
function r(p) {
|
|
2895
|
+
return !(!sn().basalDragulaRuleForContainer(p) || !f || !i(p));
|
|
2896
|
+
}
|
|
2897
|
+
function g() {
|
|
2898
|
+
l.value = !1, u.value = !1;
|
|
2899
|
+
const p = n, M = p.appearance && p.appearance.class || "", A = M.split(" "), T = p.contents || [], $ = T.length ? T[0] : null, O = $ && $.appearance ? $.appearance.class : "", P = O ? O.split(" ") : [], E = T.length ? T.reduce((oe, W) => {
|
|
2900
|
+
const ae = W && W.appearance ? W.appearance.class : "", we = ae ? ae.split(" ") : [];
|
|
2901
|
+
return oe.push(...we), oe;
|
|
2902
|
+
}, []) : [], I = o, x = I && I.appearance && I.appearance.class || "", he = x ? x.split(" ") : [];
|
|
2903
|
+
y = {
|
|
2904
|
+
componentClass: M,
|
|
2951
2905
|
componentClassList: A,
|
|
2952
2906
|
childContents: T,
|
|
2953
|
-
firstChildContent:
|
|
2954
|
-
firstChildClass:
|
|
2907
|
+
firstChildContent: $,
|
|
2908
|
+
firstChildClass: O,
|
|
2955
2909
|
firstChildClassList: P,
|
|
2956
|
-
parent:
|
|
2957
|
-
parentClass:
|
|
2958
|
-
parentClassList:
|
|
2910
|
+
parent: I,
|
|
2911
|
+
parentClass: x,
|
|
2912
|
+
parentClassList: he,
|
|
2959
2913
|
children: T,
|
|
2960
2914
|
childrenClassList: E
|
|
2961
2915
|
};
|
|
2962
|
-
const { canAccept:
|
|
2963
|
-
return
|
|
2916
|
+
const { canAccept: be, fixed: ve, hidePadding: Ce } = c.getRuleValue(A[0], y);
|
|
2917
|
+
return f = be, b = Ce, h = ve, !0;
|
|
2964
2918
|
}
|
|
2965
2919
|
function a(p) {
|
|
2966
|
-
|
|
2920
|
+
je();
|
|
2967
2921
|
}
|
|
2968
|
-
function
|
|
2922
|
+
function m() {
|
|
2969
2923
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2970
2924
|
}
|
|
2971
|
-
function s(p,
|
|
2925
|
+
function s(p, M) {
|
|
2972
2926
|
const A = n;
|
|
2973
2927
|
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2974
|
-
const { label:
|
|
2975
|
-
return P.editor =
|
|
2928
|
+
const { label: O } = p, P = U("form-group");
|
|
2929
|
+
return P.editor = M, P.label = O, d(P), delete P.editor.id, delete P.editor.binding, delete P.editor.appearance, delete P.editor.visible, P;
|
|
2976
2930
|
}
|
|
2977
|
-
return
|
|
2931
|
+
return M;
|
|
2978
2932
|
}
|
|
2979
|
-
function
|
|
2980
|
-
const
|
|
2981
|
-
if (
|
|
2982
|
-
const A =
|
|
2933
|
+
function d(p) {
|
|
2934
|
+
const M = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
2935
|
+
if (M && M.schema && M.schema.componentType) {
|
|
2936
|
+
const A = M.schema.componentType, T = k(A);
|
|
2983
2937
|
p.appearance || (p.appearance = {}), p.appearance.class = T;
|
|
2984
2938
|
}
|
|
2985
2939
|
}
|
|
2986
|
-
function
|
|
2987
|
-
let
|
|
2940
|
+
function k(p) {
|
|
2941
|
+
let M = "";
|
|
2988
2942
|
switch (p) {
|
|
2989
2943
|
case "form-col-1": {
|
|
2990
|
-
|
|
2944
|
+
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2991
2945
|
break;
|
|
2992
2946
|
}
|
|
2993
2947
|
case "form-col-12": {
|
|
2994
|
-
|
|
2948
|
+
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2995
2949
|
break;
|
|
2996
2950
|
}
|
|
2997
2951
|
case "form-col-2": {
|
|
2998
|
-
|
|
2952
|
+
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2999
2953
|
break;
|
|
3000
2954
|
}
|
|
3001
2955
|
case "form-col-3": {
|
|
3002
|
-
|
|
2956
|
+
M = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
3003
2957
|
break;
|
|
3004
2958
|
}
|
|
3005
2959
|
case "form-col-4": {
|
|
3006
|
-
|
|
2960
|
+
M = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
3007
2961
|
break;
|
|
3008
2962
|
}
|
|
3009
2963
|
case "form-col-6": {
|
|
3010
|
-
|
|
2964
|
+
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
3011
2965
|
break;
|
|
3012
2966
|
}
|
|
3013
2967
|
case "frame": {
|
|
3014
|
-
|
|
2968
|
+
M = "col-12";
|
|
3015
2969
|
break;
|
|
3016
2970
|
}
|
|
3017
2971
|
}
|
|
3018
|
-
return
|
|
2972
|
+
return M;
|
|
3019
2973
|
}
|
|
3020
|
-
function
|
|
2974
|
+
function F(p, M, A) {
|
|
3021
2975
|
const T = n;
|
|
3022
2976
|
if ((T.appearance && T.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3023
|
-
const P = String(p.innerText), E =
|
|
2977
|
+
const P = String(p.innerText), E = U("form-group");
|
|
3024
2978
|
return E.editor = A, E.label = P, E;
|
|
3025
2979
|
}
|
|
3026
2980
|
return A;
|
|
3027
2981
|
}
|
|
3028
|
-
function
|
|
3029
|
-
return !
|
|
2982
|
+
function D() {
|
|
2983
|
+
return !h;
|
|
3030
2984
|
}
|
|
3031
2985
|
function S() {
|
|
3032
|
-
return !
|
|
2986
|
+
return !h;
|
|
3033
2987
|
}
|
|
3034
|
-
function
|
|
3035
|
-
return
|
|
2988
|
+
function w() {
|
|
2989
|
+
return b;
|
|
3036
2990
|
}
|
|
3037
2991
|
return {
|
|
3038
|
-
canAccepts:
|
|
2992
|
+
canAccepts: r,
|
|
3039
2993
|
checkCanDeleteComponent: S,
|
|
3040
|
-
checkCanMoveComponent:
|
|
3041
|
-
getStyles:
|
|
3042
|
-
hideNestedPaddingInDesginerView:
|
|
3043
|
-
onAcceptNewChildElement:
|
|
2994
|
+
checkCanMoveComponent: D,
|
|
2995
|
+
getStyles: m,
|
|
2996
|
+
hideNestedPaddingInDesginerView: w,
|
|
2997
|
+
onAcceptNewChildElement: F,
|
|
3044
2998
|
onAcceptMovedChildElement: a,
|
|
3045
|
-
resolveComponentContext:
|
|
2999
|
+
resolveComponentContext: g,
|
|
3046
3000
|
onResolveNewComponentSchema: s,
|
|
3047
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
3048
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3001
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
3002
|
+
triggerBelongedComponentToDeleteWhenDeleted: u
|
|
3049
3003
|
};
|
|
3050
3004
|
}
|
|
3051
|
-
const
|
|
3005
|
+
const vn = /* @__PURE__ */ H({
|
|
3052
3006
|
name: "FOrderDesign",
|
|
3053
|
-
props:
|
|
3007
|
+
props: te,
|
|
3054
3008
|
emits: ["change"],
|
|
3055
3009
|
setup(e, t) {
|
|
3056
|
-
var
|
|
3057
|
-
const n = C(e.items), o = C("排序列"), c = C("排序方式"),
|
|
3010
|
+
var D;
|
|
3011
|
+
const n = C(e.items), o = C("排序列"), c = C("排序方式"), l = C("添加排序列"), u = [{
|
|
3058
3012
|
id: "asc",
|
|
3059
3013
|
name: "升序"
|
|
3060
3014
|
}, {
|
|
3061
3015
|
id: "desc",
|
|
3062
3016
|
name: "降序"
|
|
3063
|
-
}],
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
}), t.expose(
|
|
3067
|
-
function
|
|
3068
|
-
const S = n.value.map((
|
|
3069
|
-
|
|
3017
|
+
}], f = C(/* @__PURE__ */ new Map()), b = C(), y = X("design-item-context"), h = bn(y.schema, (D = y.parent) == null ? void 0 : D.schema), i = ln(b, y, h);
|
|
3018
|
+
ce(() => {
|
|
3019
|
+
b.value.componentInstance = i;
|
|
3020
|
+
}), t.expose(i.value);
|
|
3021
|
+
function r() {
|
|
3022
|
+
const S = n.value.map((w) => [w.id, !0]);
|
|
3023
|
+
f.value = new Map(S);
|
|
3070
3024
|
}
|
|
3071
|
-
|
|
3072
|
-
const
|
|
3025
|
+
r();
|
|
3026
|
+
const g = B(() => e.dataSource.map((S) => (S.disabled = f.value.has(S.id), S))), a = B(() => ({
|
|
3073
3027
|
"f-order": !0
|
|
3074
3028
|
}));
|
|
3075
|
-
function
|
|
3076
|
-
n.value = n.value.filter((
|
|
3029
|
+
function m(S) {
|
|
3030
|
+
n.value = n.value.filter((w) => w.id !== S.id), r(), t.emit("change", n.value);
|
|
3077
3031
|
}
|
|
3078
3032
|
function s() {
|
|
3079
3033
|
n.value = [...n.value, {
|
|
3080
3034
|
id: Date.now().toString(),
|
|
3081
3035
|
name: "",
|
|
3082
3036
|
order: "asc"
|
|
3083
|
-
}],
|
|
3037
|
+
}], r(), t.emit("change", n.value);
|
|
3084
3038
|
}
|
|
3085
|
-
function
|
|
3086
|
-
|
|
3039
|
+
function d(S) {
|
|
3040
|
+
r(), t.emit("change", n.value);
|
|
3087
3041
|
}
|
|
3088
|
-
function
|
|
3042
|
+
function k(S) {
|
|
3089
3043
|
if (S && S.length) {
|
|
3090
|
-
const
|
|
3091
|
-
S.reduce((
|
|
3044
|
+
const w = /* @__PURE__ */ new Map();
|
|
3045
|
+
S.reduce((V, p) => (V.set(p.id, p), V), w), n.value = S.map((V) => w.get(V.id)), t.emit("change", n.value);
|
|
3092
3046
|
}
|
|
3093
3047
|
}
|
|
3094
|
-
function
|
|
3095
|
-
return v(
|
|
3048
|
+
function F() {
|
|
3049
|
+
return v(me, {
|
|
3096
3050
|
style: "flex:1",
|
|
3097
3051
|
data: n.value,
|
|
3098
3052
|
draggable: !0,
|
|
3099
3053
|
view: "DraggableView",
|
|
3100
3054
|
"keep-order": !0,
|
|
3101
3055
|
itemClass: "f-order-item",
|
|
3102
|
-
onRemoveItem:
|
|
3103
|
-
onChange:
|
|
3056
|
+
onRemoveItem: m,
|
|
3057
|
+
onChange: k
|
|
3104
3058
|
}, {
|
|
3105
3059
|
header: () => v("div", {
|
|
3106
3060
|
class: "f-order-header"
|
|
@@ -3111,29 +3065,29 @@ const gn = /* @__PURE__ */ N({
|
|
|
3111
3065
|
}, [c.value])]),
|
|
3112
3066
|
itemContent: (S) => v("div", {
|
|
3113
3067
|
class: "f-order-item-content"
|
|
3114
|
-
}, [v(
|
|
3068
|
+
}, [v(q, {
|
|
3115
3069
|
class: "f-order-item-content-order-field",
|
|
3116
|
-
data:
|
|
3070
|
+
data: g.value,
|
|
3117
3071
|
valueField: "id",
|
|
3118
3072
|
textField: "name",
|
|
3119
3073
|
idField: "id",
|
|
3120
3074
|
modelValue: S.id,
|
|
3121
|
-
"onUpdate:modelValue": (
|
|
3122
|
-
onChange:
|
|
3123
|
-
onClear:
|
|
3124
|
-
}, null), v(
|
|
3075
|
+
"onUpdate:modelValue": (w) => S.id = w,
|
|
3076
|
+
onChange: d,
|
|
3077
|
+
onClear: d
|
|
3078
|
+
}, null), v(q, {
|
|
3125
3079
|
class: "f-order-item-content-order-type",
|
|
3126
|
-
data:
|
|
3080
|
+
data: u,
|
|
3127
3081
|
valueField: "id",
|
|
3128
3082
|
textField: "name",
|
|
3129
3083
|
idField: "id",
|
|
3130
3084
|
modelValue: S.order,
|
|
3131
|
-
"onUpdate:modelValue": (
|
|
3132
|
-
onChange:
|
|
3085
|
+
"onUpdate:modelValue": (w) => S.order = w,
|
|
3086
|
+
onChange: d
|
|
3133
3087
|
}, null)]),
|
|
3134
3088
|
footer: () => v("div", {
|
|
3135
3089
|
class: "f-order-footer"
|
|
3136
|
-
}, [v(
|
|
3090
|
+
}, [v(ye, {
|
|
3137
3091
|
type: "link",
|
|
3138
3092
|
class: "f-order-add-button",
|
|
3139
3093
|
onClick: s
|
|
@@ -3142,29 +3096,29 @@ const gn = /* @__PURE__ */ N({
|
|
|
3142
3096
|
class: "f-order-add-icon"
|
|
3143
3097
|
}, [v("i", {
|
|
3144
3098
|
class: "f-icon f-icon-add"
|
|
3145
|
-
}, null)]),
|
|
3099
|
+
}, null)]), l.value])
|
|
3146
3100
|
})])
|
|
3147
3101
|
});
|
|
3148
3102
|
}
|
|
3149
3103
|
return () => v("div", {
|
|
3150
|
-
ref:
|
|
3104
|
+
ref: b,
|
|
3151
3105
|
class: a.value
|
|
3152
|
-
}, [
|
|
3106
|
+
}, [F()]);
|
|
3153
3107
|
}
|
|
3154
|
-
}),
|
|
3108
|
+
}), Dn = {
|
|
3155
3109
|
install(e) {
|
|
3156
|
-
e.component(
|
|
3110
|
+
e.component(z.name, z);
|
|
3157
3111
|
},
|
|
3158
3112
|
register(e, t, n, o) {
|
|
3159
|
-
e.order =
|
|
3113
|
+
e.order = z, t.order = ie;
|
|
3160
3114
|
},
|
|
3161
3115
|
registerDesigner(e, t, n) {
|
|
3162
|
-
e.order =
|
|
3116
|
+
e.order = vn, t.order = ie;
|
|
3163
3117
|
}
|
|
3164
3118
|
};
|
|
3165
3119
|
export {
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3120
|
+
z as FOrder,
|
|
3121
|
+
Dn as default,
|
|
3122
|
+
te as orderProps,
|
|
3123
|
+
ie as propsResolver
|
|
3170
3124
|
};
|