@farris/ui-vue 1.2.6 → 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 +150 -142
- package/components/avatar/index.esm.js +393 -457
- 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 +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- 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 +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- 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 +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- 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 +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- 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 +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- 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 +453 -516
- 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 +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- 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 +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- 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 +27221 -26804
- 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/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.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/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- 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,39 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref 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 u =
|
|
37
|
+
const u = l(c, e[c], e);
|
|
37
38
|
Object.assign(o, u);
|
|
38
39
|
}
|
|
39
40
|
} else
|
|
@@ -41,71 +42,69 @@ function ze(e, t) {
|
|
|
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 r[
|
|
52
|
-
if (typeof
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
return Number(r[
|
|
56
|
-
if (
|
|
57
|
-
return Number(r[
|
|
58
|
-
if (
|
|
59
|
-
return Number(r[
|
|
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 r[
|
|
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
|
|
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) => {
|
|
74
75
|
if (r === "length")
|
|
75
|
-
return { target:
|
|
76
|
-
const
|
|
77
|
-
return { target:
|
|
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 u(
|
|
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
|
|
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
|
|
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));
|
|
98
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 = (u, m, S) => m, c = {}, i = (u) => u) {
|
|
216
|
-
return se[t.title] = t, ce[t.title] = o, We[t.title] = c, qe[t.title] = i, (u = {}) => {
|
|
217
|
-
const m = Ge(u, t, n), S = Object.keys(e).reduce((f, y) => (f[y] = e[y].default, f), {});
|
|
218
|
-
return Object.assign(S, m);
|
|
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,
|
|
@@ -580,247 +508,249 @@ const dt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-
|
|
|
580
508
|
}
|
|
581
509
|
},
|
|
582
510
|
keepOrder: { type: Boolean, default: !1 },
|
|
583
|
-
disableField: { type: String, default: "disabled" }
|
|
511
|
+
disableField: { type: String, default: "disabled" },
|
|
512
|
+
// 搜索启用高亮
|
|
513
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
584
514
|
};
|
|
585
|
-
|
|
586
|
-
function
|
|
587
|
-
function n(
|
|
515
|
+
K(fe, Ct, dt, pt, Tt);
|
|
516
|
+
function Mt(e, t) {
|
|
517
|
+
function n(l) {
|
|
588
518
|
const u = [];
|
|
589
|
-
let
|
|
590
|
-
for (;
|
|
591
|
-
u.push(
|
|
519
|
+
let f = l.nextNode();
|
|
520
|
+
for (; f; )
|
|
521
|
+
u.push(f), f = l.nextNode();
|
|
592
522
|
return u;
|
|
593
523
|
}
|
|
594
|
-
function o(
|
|
595
|
-
const
|
|
596
|
-
return n(
|
|
597
|
-
const
|
|
598
|
-
let
|
|
599
|
-
for (;
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
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 = [];
|
|
528
|
+
let a = 0;
|
|
529
|
+
for (; a < r.length; ) {
|
|
530
|
+
const m = r.indexOf(u, a);
|
|
531
|
+
if (m === -1)
|
|
602
532
|
break;
|
|
603
|
-
|
|
533
|
+
g.push(m), a = m + u.length;
|
|
604
534
|
}
|
|
605
|
-
return
|
|
606
|
-
const
|
|
607
|
-
return
|
|
535
|
+
return g.map((m) => {
|
|
536
|
+
const s = new Range();
|
|
537
|
+
return s.setStart(i, m), s.setEnd(i, m + u.length), s;
|
|
608
538
|
});
|
|
609
539
|
}).flat();
|
|
610
540
|
}
|
|
611
|
-
function c(
|
|
612
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
541
|
+
function c(l) {
|
|
542
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !l || !t))
|
|
613
543
|
return;
|
|
614
|
-
const u = o(t.value,
|
|
615
|
-
CSS.highlights.set("search-result",
|
|
544
|
+
const u = o(t.value, l.toLocaleLowerCase()), f = new Highlight(...u);
|
|
545
|
+
CSS.highlights.set("search-result", f);
|
|
616
546
|
}
|
|
617
547
|
return { search: c };
|
|
618
548
|
}
|
|
619
|
-
function
|
|
620
|
-
const
|
|
621
|
-
onMouseenterItem:
|
|
622
|
-
onMouseoverItem:
|
|
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,
|
|
552
|
+
onMouseoverItem: s,
|
|
623
553
|
onMouseoutItem: d
|
|
624
|
-
} =
|
|
625
|
-
getKey:
|
|
626
|
-
listViewItemClass:
|
|
627
|
-
onCheckItem:
|
|
628
|
-
onClickItem:
|
|
629
|
-
} = u,
|
|
630
|
-
margin:
|
|
554
|
+
} = l, {
|
|
555
|
+
getKey: k,
|
|
556
|
+
listViewItemClass: F,
|
|
557
|
+
onCheckItem: D,
|
|
558
|
+
onClickItem: S
|
|
559
|
+
} = u, w = B(() => ({
|
|
560
|
+
margin: h.value === "small" ? "0.25rem 0" : "10px 0"
|
|
631
561
|
}));
|
|
632
|
-
function
|
|
633
|
-
return p.checked =
|
|
634
|
-
class:
|
|
635
|
-
id:
|
|
636
|
-
key:
|
|
637
|
-
onClick: (
|
|
638
|
-
onMouseenter: (
|
|
639
|
-
onMouseover: (
|
|
640
|
-
onMouseout: (
|
|
641
|
-
}, [
|
|
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", {
|
|
642
572
|
class: "f-list-select",
|
|
643
|
-
onClick: (
|
|
644
|
-
}, [
|
|
645
|
-
id: "list-" +
|
|
573
|
+
onClick: (T) => T.stopPropagation()
|
|
574
|
+
}, [v(Y, {
|
|
575
|
+
id: "list-" + k(p, M),
|
|
646
576
|
customClass: "listview-checkbox",
|
|
647
|
-
disabled: p[
|
|
577
|
+
disabled: p[a.value],
|
|
648
578
|
checked: p.checked,
|
|
649
|
-
"onUpdate:checked": (
|
|
650
|
-
onChange: (
|
|
651
|
-
|
|
579
|
+
"onUpdate:checked": (T) => p.checked = T,
|
|
580
|
+
onChange: (T) => {
|
|
581
|
+
D(p, M, !T.checked);
|
|
652
582
|
}
|
|
653
|
-
}, null)]),
|
|
583
|
+
}, null)]), v("div", {
|
|
654
584
|
class: "f-list-content"
|
|
655
|
-
}, [
|
|
656
|
-
style:
|
|
657
|
-
title: p.raw[r.value] || p.raw[
|
|
658
|
-
}, [p.raw[
|
|
585
|
+
}, [v("div", {
|
|
586
|
+
style: w.value,
|
|
587
|
+
title: p.raw[r.value] || p.raw[i.value]
|
|
588
|
+
}, [p.raw[i.value]])])]);
|
|
659
589
|
}
|
|
660
590
|
return {
|
|
661
|
-
renderItem:
|
|
591
|
+
renderItem: V
|
|
662
592
|
};
|
|
663
593
|
}
|
|
664
|
-
function
|
|
665
|
-
const
|
|
594
|
+
function jt(e, t, n, o, c, l, u, f, b, y) {
|
|
595
|
+
const h = C(e.multiSelect), i = C(e.disableField), {
|
|
666
596
|
onMouseenterItem: r,
|
|
667
|
-
onMouseoverItem:
|
|
668
|
-
onMouseoutItem:
|
|
669
|
-
} =
|
|
670
|
-
getKey:
|
|
671
|
-
listViewItemClass:
|
|
597
|
+
onMouseoverItem: g,
|
|
598
|
+
onMouseoutItem: a
|
|
599
|
+
} = l, {
|
|
600
|
+
getKey: m,
|
|
601
|
+
listViewItemClass: s,
|
|
672
602
|
onCheckItem: d,
|
|
673
|
-
onClickItem:
|
|
603
|
+
onClickItem: k
|
|
674
604
|
} = u;
|
|
675
|
-
function
|
|
676
|
-
return t.slots.content ?
|
|
677
|
-
item:
|
|
678
|
-
index:
|
|
679
|
-
selectedItem:
|
|
680
|
-
})]) :
|
|
605
|
+
function F(S, w, V) {
|
|
606
|
+
return t.slots.content ? v(Q, null, [t.slots.content && t.slots.content({
|
|
607
|
+
item: S.raw,
|
|
608
|
+
index: w,
|
|
609
|
+
selectedItem: V
|
|
610
|
+
})]) : v("div", {
|
|
681
611
|
style: "margin: 10px 0;"
|
|
682
|
-
}, [
|
|
683
|
-
}
|
|
684
|
-
function
|
|
685
|
-
return
|
|
686
|
-
class:
|
|
687
|
-
id:
|
|
688
|
-
key:
|
|
689
|
-
onClick: (p) =>
|
|
690
|
-
onMouseenter: (p) => r(p,
|
|
691
|
-
onMouseover: (p) =>
|
|
692
|
-
onMouseout: (p) =>
|
|
693
|
-
}, [
|
|
612
|
+
}, [S.raw.name]);
|
|
613
|
+
}
|
|
614
|
+
function D(S, w, V) {
|
|
615
|
+
return v("li", {
|
|
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", {
|
|
694
624
|
class: "f-list-select",
|
|
695
625
|
onClick: (p) => p.stopPropagation()
|
|
696
|
-
}, [
|
|
697
|
-
id: "list-" +
|
|
626
|
+
}, [v(Y, {
|
|
627
|
+
id: "list-" + m(S, w),
|
|
698
628
|
customClass: "listview-checkbox",
|
|
699
|
-
disabled:
|
|
700
|
-
checked:
|
|
701
|
-
"onUpdate:checked": (p) =>
|
|
702
|
-
onChange: (p) => d(
|
|
703
|
-
}, null)]),
|
|
629
|
+
disabled: S[i.value] || !S.checked,
|
|
630
|
+
checked: S.checked,
|
|
631
|
+
"onUpdate:checked": (p) => S.checked = p,
|
|
632
|
+
onChange: (p) => d(S, w, !p.checked)
|
|
633
|
+
}, null)]), v("div", {
|
|
704
634
|
class: "f-list-content"
|
|
705
|
-
}, [
|
|
635
|
+
}, [F(S, w, V)])]);
|
|
706
636
|
}
|
|
707
637
|
return {
|
|
708
|
-
renderItem:
|
|
638
|
+
renderItem: D
|
|
709
639
|
};
|
|
710
640
|
}
|
|
711
|
-
function
|
|
712
|
-
const
|
|
641
|
+
function Vt(e, t, n, o, c, l, u, f, b, y) {
|
|
642
|
+
const h = C(e.multiSelect), i = C(e.disableField), {
|
|
713
643
|
onMouseenterItem: r,
|
|
714
|
-
onMouseoverItem:
|
|
715
|
-
onMouseoutItem:
|
|
716
|
-
} =
|
|
717
|
-
getKey:
|
|
718
|
-
listViewItemClass:
|
|
644
|
+
onMouseoverItem: g,
|
|
645
|
+
onMouseoutItem: a
|
|
646
|
+
} = l, {
|
|
647
|
+
getKey: m,
|
|
648
|
+
listViewItemClass: s,
|
|
719
649
|
onCheckItem: d,
|
|
720
|
-
onClickItem:
|
|
650
|
+
onClickItem: k
|
|
721
651
|
} = u, {
|
|
722
|
-
dragstart:
|
|
723
|
-
dragenter:
|
|
724
|
-
dragover:
|
|
725
|
-
dragend:
|
|
652
|
+
dragstart: F,
|
|
653
|
+
dragenter: D,
|
|
654
|
+
dragover: S,
|
|
655
|
+
dragend: w
|
|
726
656
|
} = o, {
|
|
727
|
-
removeItem:
|
|
728
|
-
} =
|
|
729
|
-
margin:
|
|
657
|
+
removeItem: V
|
|
658
|
+
} = b, p = B(() => ({
|
|
659
|
+
margin: h.value ? "10px 0" : "10px 0px 10px 14px"
|
|
730
660
|
}));
|
|
731
|
-
function
|
|
732
|
-
return
|
|
661
|
+
function M(O) {
|
|
662
|
+
return v("div", {
|
|
733
663
|
style: p.value
|
|
734
|
-
}, [
|
|
664
|
+
}, [O.raw.name]);
|
|
735
665
|
}
|
|
736
666
|
function A() {
|
|
737
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
738
|
-
}
|
|
739
|
-
const
|
|
740
|
-
function
|
|
741
|
-
return
|
|
742
|
-
class:
|
|
743
|
-
id:
|
|
744
|
-
key:
|
|
745
|
-
onClick: (
|
|
746
|
-
onMouseenter: (
|
|
747
|
-
onMouseover: (
|
|
748
|
-
onMouseout: (
|
|
667
|
+
return t.slots.itemContent ? t.slots.itemContent : M;
|
|
668
|
+
}
|
|
669
|
+
const T = A();
|
|
670
|
+
function $(O, P, E) {
|
|
671
|
+
return v("li", {
|
|
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),
|
|
749
679
|
draggable: "true",
|
|
750
|
-
onDragstart: (
|
|
751
|
-
onDragenter: (
|
|
752
|
-
onDragend: (
|
|
753
|
-
onDragover: (
|
|
754
|
-
}, [
|
|
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", {
|
|
755
685
|
class: "f-list-select",
|
|
756
|
-
onClick: (
|
|
757
|
-
}, [
|
|
758
|
-
id: "list-" +
|
|
686
|
+
onClick: (I) => I.stopPropagation()
|
|
687
|
+
}, [v(Y, {
|
|
688
|
+
id: "list-" + m(O, P),
|
|
759
689
|
customClass: "listview-checkbox",
|
|
760
|
-
disabled:
|
|
761
|
-
checked:
|
|
762
|
-
"onUpdate:checked": (
|
|
763
|
-
onChange: (
|
|
764
|
-
}, null)]),
|
|
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)
|
|
694
|
+
}, null)]), v("div", {
|
|
765
695
|
class: "f-list-content"
|
|
766
|
-
}, [
|
|
696
|
+
}, [T(O)]), v("div", {
|
|
767
697
|
class: "f-list-remove",
|
|
768
|
-
onClick: (
|
|
769
|
-
}, [
|
|
698
|
+
onClick: (I) => V(P)
|
|
699
|
+
}, [v("div", {
|
|
770
700
|
class: "f-list-remove-icon"
|
|
771
|
-
}, [
|
|
701
|
+
}, [v("i", {
|
|
772
702
|
class: "f-icon f-icon-remove_face"
|
|
773
|
-
}, null)])]),
|
|
703
|
+
}, null)])]), v("div", {
|
|
774
704
|
class: "f-list-handle"
|
|
775
|
-
}, [
|
|
705
|
+
}, [v("div", null, [v("i", {
|
|
776
706
|
class: "f-icon f-icon-drag-vertical"
|
|
777
707
|
}, null)])])]);
|
|
778
708
|
}
|
|
779
709
|
return {
|
|
780
|
-
renderItem:
|
|
710
|
+
renderItem: $
|
|
781
711
|
};
|
|
782
712
|
}
|
|
783
|
-
function
|
|
784
|
-
var
|
|
785
|
-
const
|
|
786
|
-
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
|
|
787
717
|
} = c, {
|
|
788
718
|
toggleGroupRow: r
|
|
789
|
-
} =
|
|
790
|
-
function
|
|
719
|
+
} = y;
|
|
720
|
+
function g(s, d) {
|
|
791
721
|
d.collapse = !d.collapse, n.value = r(d.collapse ? "collapse" : "expand", d, n.value);
|
|
792
722
|
}
|
|
793
|
-
function s
|
|
794
|
-
return
|
|
723
|
+
function a(s, d, k) {
|
|
724
|
+
return s.layer > -1 && v("div", {
|
|
795
725
|
class: "f-navlookup-recentHeader",
|
|
796
|
-
onClick: (
|
|
797
|
-
}, [
|
|
726
|
+
onClick: (F) => g(F, s)
|
|
727
|
+
}, [v("div", {
|
|
798
728
|
class: "fv-grid-group-row-icon"
|
|
799
|
-
}, [
|
|
800
|
-
class:
|
|
801
|
-
}, null)]),
|
|
729
|
+
}, [v("span", {
|
|
730
|
+
class: i(s)
|
|
731
|
+
}, null)]), v("div", {
|
|
802
732
|
class: "f-navlookup-recommandLabel"
|
|
803
|
-
}, [
|
|
733
|
+
}, [s.raw[h.value[s.layer]]])]);
|
|
804
734
|
}
|
|
805
735
|
return {
|
|
806
|
-
renderItem:
|
|
736
|
+
renderItem: a
|
|
807
737
|
};
|
|
808
738
|
}
|
|
809
|
-
function
|
|
810
|
-
const e =
|
|
811
|
-
function c(
|
|
812
|
-
n.value =
|
|
739
|
+
function Ot() {
|
|
740
|
+
const e = C(-1), t = C(""), n = C(-1), o = C(!1);
|
|
741
|
+
function c(y, h, i) {
|
|
742
|
+
n.value = i;
|
|
813
743
|
}
|
|
814
|
-
function
|
|
815
|
-
o.value || (n.value =
|
|
744
|
+
function l(y, h, i) {
|
|
745
|
+
o.value || (n.value = i);
|
|
816
746
|
}
|
|
817
|
-
function u(
|
|
747
|
+
function u(y, h, i) {
|
|
818
748
|
n.value = -1;
|
|
819
749
|
}
|
|
820
|
-
function
|
|
750
|
+
function f() {
|
|
821
751
|
o.value = !0;
|
|
822
752
|
}
|
|
823
|
-
function
|
|
753
|
+
function b() {
|
|
824
754
|
o.value = !1;
|
|
825
755
|
}
|
|
826
756
|
return {
|
|
@@ -828,126 +758,126 @@ function Dt() {
|
|
|
828
758
|
focusedItemId: t,
|
|
829
759
|
hoverIndex: n,
|
|
830
760
|
onMouseenterItem: c,
|
|
831
|
-
onMouseoverItem:
|
|
761
|
+
onMouseoverItem: l,
|
|
832
762
|
onMouseoutItem: u,
|
|
833
|
-
resumeHover:
|
|
834
|
-
suspendHover:
|
|
763
|
+
resumeHover: b,
|
|
764
|
+
suspendHover: f
|
|
835
765
|
};
|
|
836
766
|
}
|
|
837
767
|
function It(e, t, n, o) {
|
|
838
|
-
const c =
|
|
839
|
-
function
|
|
840
|
-
d.stopPropagation(), r(),
|
|
841
|
-
u.value =
|
|
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;
|
|
842
772
|
});
|
|
843
773
|
}
|
|
844
|
-
function
|
|
845
|
-
if (d.preventDefault(), u.value !==
|
|
846
|
-
const
|
|
847
|
-
|
|
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;
|
|
848
778
|
}
|
|
849
779
|
}
|
|
850
|
-
function
|
|
780
|
+
function m(d, k) {
|
|
851
781
|
d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "move");
|
|
852
782
|
}
|
|
853
|
-
function
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
}),
|
|
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);
|
|
857
787
|
}
|
|
858
788
|
return {
|
|
859
|
-
dragstart:
|
|
860
|
-
dragenter:
|
|
861
|
-
dragover:
|
|
862
|
-
dragend:
|
|
863
|
-
isDragging:
|
|
789
|
+
dragstart: g,
|
|
790
|
+
dragenter: a,
|
|
791
|
+
dragover: m,
|
|
792
|
+
dragend: s,
|
|
793
|
+
isDragging: f
|
|
864
794
|
};
|
|
865
795
|
}
|
|
866
|
-
function
|
|
796
|
+
function Pt(e, t, n) {
|
|
867
797
|
const { dataView: o } = n;
|
|
868
|
-
function c(
|
|
869
|
-
if (
|
|
870
|
-
const u = o.value.splice(
|
|
798
|
+
function c(l) {
|
|
799
|
+
if (l > -1 && l < o.value.length) {
|
|
800
|
+
const u = o.value.splice(l, 1);
|
|
871
801
|
t.emit("removeItem", u[0]);
|
|
872
802
|
}
|
|
873
803
|
}
|
|
874
804
|
return { removeItem: c };
|
|
875
805
|
}
|
|
876
|
-
function
|
|
877
|
-
const u =
|
|
878
|
-
|
|
879
|
-
const { isDragging: r } = o, { activeIndex:
|
|
880
|
-
function
|
|
881
|
-
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);
|
|
808
|
+
C(!0);
|
|
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 = {
|
|
882
812
|
"f-list-view-group-item": !0,
|
|
883
|
-
"f-list-view-draggable-item":
|
|
884
|
-
"f-un-click": !
|
|
885
|
-
"f-un-select": !!
|
|
886
|
-
"f-listview-active":
|
|
887
|
-
"f-listview-hover": !r.value &&
|
|
888
|
-
moving: !!
|
|
813
|
+
"f-list-view-draggable-item": b.value,
|
|
814
|
+
"f-un-click": !T.checked,
|
|
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,
|
|
818
|
+
moving: !!T.moving
|
|
889
819
|
};
|
|
890
|
-
return
|
|
820
|
+
return y.value.split(" ").reduce((E, I) => (E[I] = !0, E), O), O;
|
|
891
821
|
}
|
|
892
|
-
function
|
|
893
|
-
return
|
|
822
|
+
function S(T, $) {
|
|
823
|
+
return T.raw[u.value] || "";
|
|
894
824
|
}
|
|
895
|
-
const
|
|
896
|
-
function
|
|
897
|
-
|
|
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));
|
|
898
828
|
}
|
|
899
|
-
const p =
|
|
900
|
-
function A(
|
|
901
|
-
if (
|
|
902
|
-
|
|
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]) {
|
|
832
|
+
T.preventDefault(), T.stopPropagation();
|
|
903
833
|
return;
|
|
904
834
|
}
|
|
905
|
-
|
|
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);
|
|
906
836
|
}
|
|
907
837
|
return {
|
|
908
|
-
getKey:
|
|
909
|
-
listViewItemClass:
|
|
910
|
-
onCheckItem:
|
|
838
|
+
getKey: S,
|
|
839
|
+
listViewItemClass: D,
|
|
840
|
+
onCheckItem: V,
|
|
911
841
|
onClickItem: A
|
|
912
842
|
};
|
|
913
843
|
}
|
|
914
|
-
function
|
|
915
|
-
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(() => ({
|
|
916
846
|
"f-list-view-group": !0,
|
|
917
|
-
"d-flex":
|
|
918
|
-
"flex-wrap":
|
|
919
|
-
})),
|
|
920
|
-
function
|
|
921
|
-
return
|
|
922
|
-
}
|
|
923
|
-
const
|
|
924
|
-
renderItem:
|
|
925
|
-
} =
|
|
926
|
-
renderItem:
|
|
927
|
-
} =
|
|
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;
|
|
852
|
+
}
|
|
853
|
+
const D = F(), {
|
|
854
|
+
renderItem: S
|
|
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];
|
|
928
858
|
function p() {
|
|
929
|
-
return n.value.filter((
|
|
859
|
+
return n.value.filter((T) => T.visible !== !1).map((T, $) => V[T.type](T, $, y));
|
|
930
860
|
}
|
|
931
|
-
function
|
|
932
|
-
return
|
|
861
|
+
function M() {
|
|
862
|
+
return v("div", {
|
|
933
863
|
class: "f-list-view-emptydata"
|
|
934
|
-
}, [
|
|
864
|
+
}, [v("p", {
|
|
935
865
|
class: "f-empty-title"
|
|
936
|
-
}, [
|
|
866
|
+
}, [h.value])]);
|
|
937
867
|
}
|
|
938
868
|
function A() {
|
|
939
|
-
return
|
|
940
|
-
class:
|
|
869
|
+
return v("ul", {
|
|
870
|
+
class: m.value,
|
|
941
871
|
style: "list-style: none;"
|
|
942
|
-
}, [
|
|
872
|
+
}, [s.value && p(), k.value && M(), t.slots.empty && t.slots.empty()]);
|
|
943
873
|
}
|
|
944
874
|
return {
|
|
945
875
|
renderListArea: A
|
|
946
876
|
};
|
|
947
877
|
}
|
|
948
|
-
function
|
|
878
|
+
function $t(e, t, n) {
|
|
949
879
|
function o() {
|
|
950
|
-
return t.slots.header &&
|
|
880
|
+
return t.slots.header && v("div", {
|
|
951
881
|
class: "f-list-view-header"
|
|
952
882
|
}, [t.slots.header()]);
|
|
953
883
|
}
|
|
@@ -955,100 +885,100 @@ function Ot(e, t, n) {
|
|
|
955
885
|
renderHeader: o
|
|
956
886
|
};
|
|
957
887
|
}
|
|
958
|
-
function
|
|
959
|
-
const o =
|
|
960
|
-
function
|
|
961
|
-
|
|
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 = "";
|
|
962
892
|
}
|
|
963
|
-
N(
|
|
964
|
-
n.search(r);
|
|
893
|
+
N(l, (r) => {
|
|
894
|
+
e.enableHighlightSearch && n.search(r), t.emit("afterSearch", r);
|
|
965
895
|
});
|
|
966
|
-
const
|
|
896
|
+
const y = B(() => {
|
|
967
897
|
const r = {
|
|
968
898
|
"form-group": !0,
|
|
969
899
|
"farris-form-group": !0
|
|
970
900
|
};
|
|
971
|
-
return o.value && o.value.split(" ").reduce((
|
|
901
|
+
return o.value && o.value.split(" ").reduce((a, m) => (a[m] = !0, a), r), r;
|
|
972
902
|
});
|
|
973
|
-
function
|
|
903
|
+
function h(r) {
|
|
974
904
|
}
|
|
975
|
-
function
|
|
976
|
-
return
|
|
905
|
+
function i() {
|
|
906
|
+
return v("div", {
|
|
977
907
|
class: "f-list-view-header",
|
|
978
|
-
onClick:
|
|
979
|
-
}, [
|
|
980
|
-
class:
|
|
981
|
-
}, [
|
|
908
|
+
onClick: Fe(() => h, ["prevent", "stop"])
|
|
909
|
+
}, [v("div", {
|
|
910
|
+
class: y.value
|
|
911
|
+
}, [v("div", {
|
|
982
912
|
class: "farris-input-wrap"
|
|
983
|
-
}, [
|
|
913
|
+
}, [v("div", {
|
|
984
914
|
class: "f-cmp-inputgroup"
|
|
985
|
-
}, [
|
|
915
|
+
}, [v("div", {
|
|
986
916
|
class: "input-group f-state-editable"
|
|
987
|
-
}, [
|
|
917
|
+
}, [Te(v("input", {
|
|
988
918
|
class: "form-control f-utils-fill text-left",
|
|
989
|
-
"onUpdate:modelValue": (r) =>
|
|
919
|
+
"onUpdate:modelValue": (r) => l.value = r,
|
|
990
920
|
name: "input-group-value",
|
|
991
921
|
type: "text",
|
|
992
922
|
placeholder: c.value,
|
|
993
923
|
autocomplete: "off"
|
|
994
|
-
}, null), [[
|
|
924
|
+
}, null), [[Me, l.value]]), v("div", {
|
|
995
925
|
class: "input-group-append"
|
|
996
|
-
}, [
|
|
926
|
+
}, [f.value && v("span", {
|
|
997
927
|
class: "input-group-text input-group-clear",
|
|
998
|
-
onClick: (r) =>
|
|
999
|
-
}, [
|
|
928
|
+
onClick: (r) => b()
|
|
929
|
+
}, [v("i", {
|
|
1000
930
|
class: "f-icon f-icon-close-circle"
|
|
1001
|
-
}, null)]), u.value &&
|
|
931
|
+
}, null)]), u.value && v("span", {
|
|
1002
932
|
class: "input-group-text"
|
|
1003
|
-
}, [
|
|
933
|
+
}, [v("span", {
|
|
1004
934
|
class: "f-icon f-icon-search"
|
|
1005
935
|
}, null)])])])])])])]);
|
|
1006
936
|
}
|
|
1007
937
|
return {
|
|
1008
|
-
renderHeader:
|
|
938
|
+
renderHeader: i
|
|
1009
939
|
};
|
|
1010
940
|
}
|
|
1011
|
-
const
|
|
941
|
+
const me = /* @__PURE__ */ H({
|
|
1012
942
|
name: "FListView",
|
|
1013
|
-
props:
|
|
1014
|
-
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
943
|
+
props: fe,
|
|
944
|
+
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
1015
945
|
setup(e, t) {
|
|
1016
|
-
const n =
|
|
1017
|
-
getVisualData:
|
|
1018
|
-
} =
|
|
1019
|
-
|
|
1020
|
-
const p =
|
|
1021
|
-
const
|
|
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);
|
|
950
|
+
const p = B(() => {
|
|
951
|
+
const x = {
|
|
1022
952
|
"f-list-view": !0,
|
|
1023
953
|
"f-list-view-multiple": e.multiSelect
|
|
1024
954
|
};
|
|
1025
|
-
return e.size !== "default" && (
|
|
1026
|
-
}),
|
|
955
|
+
return e.size !== "default" && (x[`${e.size}-item`] = !0), x;
|
|
956
|
+
}), M = B(() => !!t.slots.footer || o.value);
|
|
1027
957
|
function A() {
|
|
1028
|
-
return e.header === "SearchBar" ?
|
|
958
|
+
return e.header === "SearchBar" ? se : e.header === "ContentHeader" ? $t : se;
|
|
1029
959
|
}
|
|
1030
|
-
const
|
|
1031
|
-
renderHeader:
|
|
1032
|
-
} =
|
|
1033
|
-
renderListArea:
|
|
1034
|
-
} =
|
|
1035
|
-
function
|
|
1036
|
-
|
|
960
|
+
const T = A(), {
|
|
961
|
+
renderHeader: $
|
|
962
|
+
} = T(e, t, a), {
|
|
963
|
+
renderListArea: O
|
|
964
|
+
} = At(e, t, l, r, h, g, w);
|
|
965
|
+
function P(x) {
|
|
966
|
+
a.search(x);
|
|
1037
967
|
}
|
|
1038
|
-
function E(
|
|
1039
|
-
|
|
968
|
+
function E(x) {
|
|
969
|
+
x && (r.load(x), l.value = V(0, m.value + u - 1));
|
|
1040
970
|
}
|
|
1041
971
|
t.expose({
|
|
1042
|
-
search:
|
|
972
|
+
search: P,
|
|
1043
973
|
updateDataSource: E
|
|
1044
974
|
});
|
|
1045
|
-
function
|
|
1046
|
-
e.multiSelect && (
|
|
975
|
+
function I(x) {
|
|
976
|
+
e.multiSelect && (x.preventDefault(), x.stopPropagation());
|
|
1047
977
|
}
|
|
1048
|
-
return () =>
|
|
978
|
+
return () => v("div", {
|
|
1049
979
|
class: p.value,
|
|
1050
|
-
onClick:
|
|
1051
|
-
}, [
|
|
980
|
+
onClick: I
|
|
981
|
+
}, [$(), v("div", {
|
|
1052
982
|
ref: n,
|
|
1053
983
|
class: "f-list-view-content",
|
|
1054
984
|
onMouseover: () => {
|
|
@@ -1057,11 +987,11 @@ const de = /* @__PURE__ */ H({
|
|
|
1057
987
|
onMouseleave: () => {
|
|
1058
988
|
c.value = !1;
|
|
1059
989
|
}
|
|
1060
|
-
}, [
|
|
990
|
+
}, [O()]), M.value && v("div", {
|
|
1061
991
|
class: "f-list-view-footer"
|
|
1062
992
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1063
993
|
}
|
|
1064
|
-
}),
|
|
994
|
+
}), xt = {
|
|
1065
995
|
/**
|
|
1066
996
|
* 组件标识
|
|
1067
997
|
*/
|
|
@@ -1087,7 +1017,7 @@ const de = /* @__PURE__ */ H({
|
|
|
1087
1017
|
*/
|
|
1088
1018
|
customClass: { type: Object, default: {} }
|
|
1089
1019
|
};
|
|
1090
|
-
function
|
|
1020
|
+
function Lt(e, t) {
|
|
1091
1021
|
function n(o) {
|
|
1092
1022
|
o.stopPropagation(), e.disabled || t.emit("click", o);
|
|
1093
1023
|
}
|
|
@@ -1095,30 +1025,30 @@ function xt(e, t) {
|
|
|
1095
1025
|
onClickButton: n
|
|
1096
1026
|
};
|
|
1097
1027
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const t =
|
|
1028
|
+
function Et(e) {
|
|
1029
|
+
const t = B(() => {
|
|
1100
1030
|
const o = {
|
|
1101
1031
|
"f-icon": !0
|
|
1102
1032
|
};
|
|
1103
1033
|
if (e.icon) {
|
|
1104
1034
|
const c = e.icon.trim().split(" ");
|
|
1105
|
-
c && c.length && c.reduce((
|
|
1035
|
+
c && c.length && c.reduce((l, u) => (l[u] = !0, l), o);
|
|
1106
1036
|
}
|
|
1107
1037
|
return o;
|
|
1108
|
-
}), n =
|
|
1038
|
+
}), n = B(() => !!(e.icon && e.icon.trim()));
|
|
1109
1039
|
return { iconClass: t, shouldShowIcon: n };
|
|
1110
1040
|
}
|
|
1111
|
-
const
|
|
1041
|
+
const ye = /* @__PURE__ */ H({
|
|
1112
1042
|
name: "FButton",
|
|
1113
|
-
props:
|
|
1043
|
+
props: xt,
|
|
1114
1044
|
emits: ["click"],
|
|
1115
1045
|
setup(e, t) {
|
|
1116
1046
|
const {
|
|
1117
1047
|
onClickButton: n
|
|
1118
|
-
} =
|
|
1048
|
+
} = Lt(e, t), {
|
|
1119
1049
|
iconClass: o,
|
|
1120
1050
|
shouldShowIcon: c
|
|
1121
|
-
} =
|
|
1051
|
+
} = Et(e), l = B(() => {
|
|
1122
1052
|
const u = {
|
|
1123
1053
|
btn: !0,
|
|
1124
1054
|
"btn-lg": e.size === "large",
|
|
@@ -1126,19 +1056,19 @@ const pe = /* @__PURE__ */ H({
|
|
|
1126
1056
|
"btn-sm": e.size === "small",
|
|
1127
1057
|
"btn-icontext": c.value
|
|
1128
1058
|
};
|
|
1129
|
-
return u[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((
|
|
1059
|
+
return u[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, b) => (f[b] = e.customClass[b], f), u), u;
|
|
1130
1060
|
});
|
|
1131
|
-
return () =>
|
|
1132
|
-
class:
|
|
1061
|
+
return () => v("button", {
|
|
1062
|
+
class: l.value,
|
|
1133
1063
|
disabled: e.disabled,
|
|
1134
1064
|
onClick: (u) => n(u)
|
|
1135
|
-
}, [c.value &&
|
|
1065
|
+
}, [c.value && v("i", {
|
|
1136
1066
|
class: o.value
|
|
1137
1067
|
}, null), t.slots.default && t.slots.default()]);
|
|
1138
1068
|
}
|
|
1139
|
-
}),
|
|
1140
|
-
["appearance",
|
|
1141
|
-
]),
|
|
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 = {
|
|
1142
1072
|
id: {
|
|
1143
1073
|
description: "The unique identifier for a combo list",
|
|
1144
1074
|
type: "string"
|
|
@@ -1249,22 +1179,22 @@ const pe = /* @__PURE__ */ H({
|
|
|
1249
1179
|
type: "sting",
|
|
1250
1180
|
default: ""
|
|
1251
1181
|
}
|
|
1252
|
-
},
|
|
1182
|
+
}, Wt = [
|
|
1253
1183
|
"id",
|
|
1254
1184
|
"type"
|
|
1255
|
-
],
|
|
1256
|
-
$schema:
|
|
1257
|
-
$id:
|
|
1258
|
-
title:
|
|
1259
|
-
description:
|
|
1260
|
-
type:
|
|
1261
|
-
properties:
|
|
1262
|
-
required:
|
|
1185
|
+
], zt = {
|
|
1186
|
+
$schema: Ht,
|
|
1187
|
+
$id: Rt,
|
|
1188
|
+
title: Ut,
|
|
1189
|
+
description: Gt,
|
|
1190
|
+
type: _t,
|
|
1191
|
+
properties: qt,
|
|
1192
|
+
required: Wt
|
|
1263
1193
|
};
|
|
1264
|
-
function
|
|
1194
|
+
function Jt(e, t, n) {
|
|
1265
1195
|
return t;
|
|
1266
1196
|
}
|
|
1267
|
-
const
|
|
1197
|
+
const ne = {
|
|
1268
1198
|
/**
|
|
1269
1199
|
* 组件标识
|
|
1270
1200
|
*/
|
|
@@ -1423,8 +1353,14 @@ const ee = {
|
|
|
1423
1353
|
/**
|
|
1424
1354
|
* 打开前
|
|
1425
1355
|
*/
|
|
1426
|
-
beforeOpen: { type: Function, default: null }
|
|
1427
|
-
|
|
1356
|
+
beforeOpen: { type: Function, default: null },
|
|
1357
|
+
searchOption: {
|
|
1358
|
+
type: Object,
|
|
1359
|
+
default: !1
|
|
1360
|
+
},
|
|
1361
|
+
// 搜索启用高亮
|
|
1362
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1363
|
+
}, ge = K(ne, zt, Nt, Jt), Xt = {
|
|
1428
1364
|
dataSource: { type: Array, default: [] },
|
|
1429
1365
|
enableSearch: { type: Boolean, default: !1 },
|
|
1430
1366
|
idField: { type: String, default: "id" },
|
|
@@ -1438,137 +1374,159 @@ const ee = {
|
|
|
1438
1374
|
valueField: { type: String, default: "id" },
|
|
1439
1375
|
/** 值变化事件 */
|
|
1440
1376
|
onSelectionChange: { type: Function, default: () => {
|
|
1441
|
-
} }
|
|
1377
|
+
} },
|
|
1378
|
+
searchOption: {
|
|
1379
|
+
type: Object,
|
|
1380
|
+
default: !1
|
|
1381
|
+
},
|
|
1382
|
+
// 搜索启用高亮
|
|
1383
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1442
1384
|
}, Qt = /* @__PURE__ */ H({
|
|
1443
1385
|
name: "FComboListContainer",
|
|
1444
|
-
props:
|
|
1386
|
+
props: Xt,
|
|
1445
1387
|
emits: ["selectionChange"],
|
|
1446
1388
|
setup(e, t) {
|
|
1447
|
-
const n =
|
|
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));
|
|
1448
1390
|
N(e.dataSource, () => {
|
|
1449
|
-
|
|
1391
|
+
o.value = e.dataSource;
|
|
1450
1392
|
});
|
|
1451
|
-
const
|
|
1452
|
-
const
|
|
1453
|
-
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;
|
|
1454
1396
|
});
|
|
1455
|
-
function
|
|
1456
|
-
|
|
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);
|
|
1399
|
+
}
|
|
1400
|
+
function r(g) {
|
|
1401
|
+
if (e.enableHighlightSearch)
|
|
1402
|
+
return;
|
|
1403
|
+
let a = [];
|
|
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);
|
|
1457
1405
|
}
|
|
1458
|
-
return N([() => e.selectedValues], ([
|
|
1459
|
-
|
|
1460
|
-
}), () =>
|
|
1406
|
+
return N([() => e.selectedValues], ([g]) => {
|
|
1407
|
+
b.value = g.split(l.value);
|
|
1408
|
+
}), () => v("div", {
|
|
1461
1409
|
class: "f-combo-list-container pl-3",
|
|
1462
|
-
style:
|
|
1463
|
-
}, [
|
|
1410
|
+
style: h.value
|
|
1411
|
+
}, [v(Ue, {
|
|
1412
|
+
ref: n,
|
|
1464
1413
|
size: "small",
|
|
1465
1414
|
itemClass: "f-combo-list-item",
|
|
1466
|
-
header:
|
|
1415
|
+
header: y.value,
|
|
1467
1416
|
headerClass: "f-combo-list-search-box",
|
|
1468
|
-
data:
|
|
1417
|
+
data: o.value,
|
|
1469
1418
|
idField: e.idField,
|
|
1470
1419
|
textField: e.textField,
|
|
1471
1420
|
titleField: e.titleField,
|
|
1472
1421
|
multiSelect: e.multiSelect,
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1422
|
+
selection: {
|
|
1423
|
+
enableSelectRow: !0,
|
|
1424
|
+
multiSelect: !0,
|
|
1425
|
+
multiSelectMode: "OnCheckAndClick",
|
|
1426
|
+
showCheckbox: !0,
|
|
1427
|
+
showSelectAll: !1,
|
|
1428
|
+
showSelection: !0
|
|
1429
|
+
},
|
|
1430
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1431
|
+
selectionValues: b.value,
|
|
1432
|
+
onSelectionChange: i,
|
|
1433
|
+
onAfterSearch: r
|
|
1476
1434
|
}, null)]);
|
|
1477
1435
|
}
|
|
1478
1436
|
});
|
|
1479
|
-
function
|
|
1480
|
-
const t =
|
|
1481
|
-
function i
|
|
1482
|
-
const r = String(
|
|
1483
|
-
return o.value.filter((
|
|
1437
|
+
function Yt(e) {
|
|
1438
|
+
const t = C(""), n = C(e.modelValue), o = C(e.data || []), c = C(e.editable);
|
|
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])));
|
|
1484
1442
|
}
|
|
1485
|
-
function u(
|
|
1486
|
-
const r = i
|
|
1487
|
-
t.value = c.value ? r ||
|
|
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;
|
|
1488
1446
|
}
|
|
1489
|
-
function
|
|
1490
|
-
const r =
|
|
1491
|
-
return o.value.filter((
|
|
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]));
|
|
1492
1450
|
}
|
|
1493
|
-
function
|
|
1451
|
+
function b(i) {
|
|
1494
1452
|
const r = {};
|
|
1495
|
-
return r[e.idField] =
|
|
1496
|
-
}
|
|
1497
|
-
function
|
|
1498
|
-
let r =
|
|
1499
|
-
const
|
|
1500
|
-
return c.value && !
|
|
1501
|
-
}
|
|
1502
|
-
function
|
|
1503
|
-
const { url:
|
|
1504
|
-
let
|
|
1505
|
-
fetch(
|
|
1506
|
-
var
|
|
1453
|
+
return r[e.idField] = i, r[e.textField] = i, [r];
|
|
1454
|
+
}
|
|
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;
|
|
1459
|
+
}
|
|
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 };
|
|
1462
|
+
let s = !1;
|
|
1463
|
+
fetch(i, m).then((d) => {
|
|
1464
|
+
var F, D;
|
|
1507
1465
|
if (d.status === 200)
|
|
1508
|
-
return
|
|
1466
|
+
return s = !!((D = (F = d.headers) == null ? void 0 : F.get("content-type")) != null && D.includes("application/json")), s ? d.text() : d.json();
|
|
1509
1467
|
throw new Error(d.statusText);
|
|
1510
1468
|
}).then((d) => {
|
|
1511
|
-
o.value =
|
|
1469
|
+
o.value = s ? JSON.parse(d) : d;
|
|
1512
1470
|
}).catch((d) => {
|
|
1513
1471
|
console.error(d);
|
|
1514
1472
|
});
|
|
1515
1473
|
}
|
|
1516
|
-
return e.remote &&
|
|
1474
|
+
return e.remote && h(), N(() => e.data, () => {
|
|
1517
1475
|
o.value = e.data;
|
|
1518
|
-
}), N([o], ([
|
|
1476
|
+
}), N([o], ([i]) => {
|
|
1519
1477
|
if (e.modelValue) {
|
|
1520
|
-
const r =
|
|
1478
|
+
const r = i.find((g) => g[e.valueField] === e.modelValue);
|
|
1521
1479
|
r && (t.value = r[e.textField]);
|
|
1522
1480
|
}
|
|
1523
|
-
}), N(() => e.modelValue, (
|
|
1524
|
-
n.value =
|
|
1525
|
-
}), u(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText:
|
|
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 };
|
|
1526
1484
|
}
|
|
1527
|
-
const
|
|
1485
|
+
const G = /* @__PURE__ */ H({
|
|
1528
1486
|
name: "FComboList",
|
|
1529
|
-
props:
|
|
1487
|
+
props: ne,
|
|
1530
1488
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1531
1489
|
setup(e, t) {
|
|
1532
|
-
const n =
|
|
1533
|
-
dataSource:
|
|
1534
|
-
displayText:
|
|
1535
|
-
editable:
|
|
1536
|
-
modelValue:
|
|
1537
|
-
getSelectedItemsByDisplayText:
|
|
1538
|
-
} =
|
|
1539
|
-
function
|
|
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);
|
|
1497
|
+
function a() {
|
|
1540
1498
|
!r.value && n.value && n.value.hidePopup();
|
|
1541
1499
|
}
|
|
1542
|
-
function
|
|
1543
|
-
|
|
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();
|
|
1544
1502
|
}
|
|
1545
|
-
function
|
|
1503
|
+
function s() {
|
|
1546
1504
|
u.value || n.value.togglePopup();
|
|
1547
1505
|
}
|
|
1548
|
-
function d(
|
|
1549
|
-
|
|
1506
|
+
function d(S) {
|
|
1507
|
+
h.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1550
1508
|
}
|
|
1551
|
-
function
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1509
|
+
function k(S) {
|
|
1510
|
+
const w = i(S);
|
|
1511
|
+
m(w);
|
|
1554
1512
|
}
|
|
1555
|
-
function
|
|
1556
|
-
return
|
|
1513
|
+
function F() {
|
|
1514
|
+
return b.value;
|
|
1557
1515
|
}
|
|
1558
|
-
function
|
|
1559
|
-
t.emit("input",
|
|
1516
|
+
function D(S) {
|
|
1517
|
+
t.emit("input", S);
|
|
1560
1518
|
}
|
|
1561
1519
|
return t.expose({
|
|
1562
|
-
getDisplayText:
|
|
1563
|
-
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
1564
|
-
o.value =
|
|
1565
|
-
}), () =>
|
|
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, {
|
|
1566
1524
|
ref: n,
|
|
1567
1525
|
id: e.id,
|
|
1568
1526
|
disable: o.value,
|
|
1569
1527
|
readonly: u.value,
|
|
1570
1528
|
forcePlaceholder: e.forcePlaceholder,
|
|
1571
|
-
editable:
|
|
1529
|
+
editable: y.value,
|
|
1572
1530
|
buttonContent: e.dropDownIcon,
|
|
1573
1531
|
placeholder: e.placeholder,
|
|
1574
1532
|
enableClear: c.value,
|
|
@@ -1577,170 +1535,233 @@ const U = /* @__PURE__ */ H({
|
|
|
1577
1535
|
enableTitle: e.enableTitle,
|
|
1578
1536
|
multiSelect: e.multiSelect,
|
|
1579
1537
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1580
|
-
modelValue:
|
|
1581
|
-
"onUpdate:modelValue": (
|
|
1538
|
+
modelValue: b.value,
|
|
1539
|
+
"onUpdate:modelValue": (S) => b.value = S,
|
|
1582
1540
|
focusOnCreated: e.focusOnCreated,
|
|
1583
1541
|
selectOnCreated: e.selectOnCreated,
|
|
1584
1542
|
onClear: d,
|
|
1585
|
-
onClick:
|
|
1586
|
-
onChange:
|
|
1587
|
-
onInput:
|
|
1543
|
+
onClick: s,
|
|
1544
|
+
onChange: k,
|
|
1545
|
+
onInput: D,
|
|
1588
1546
|
beforeOpen: e.beforeOpen
|
|
1589
1547
|
}, {
|
|
1590
|
-
default: () => [
|
|
1548
|
+
default: () => [v(Qt, {
|
|
1591
1549
|
idField: e.idField,
|
|
1592
1550
|
valueField: e.valueField,
|
|
1593
1551
|
textField: e.textField,
|
|
1594
1552
|
titleField: e.titleField,
|
|
1595
|
-
dataSource:
|
|
1596
|
-
selectedValues:
|
|
1553
|
+
dataSource: f.value,
|
|
1554
|
+
selectedValues: h.value,
|
|
1597
1555
|
multiSelect: e.multiSelect,
|
|
1598
|
-
enableSearch:
|
|
1556
|
+
enableSearch: l.value,
|
|
1599
1557
|
maxHeight: e.maxHeight,
|
|
1600
|
-
|
|
1601
|
-
|
|
1558
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1559
|
+
width: e.fitEditor ? g.value : void 0,
|
|
1560
|
+
onSelectionChange: m
|
|
1602
1561
|
}, null)]
|
|
1603
1562
|
});
|
|
1604
1563
|
}
|
|
1605
1564
|
});
|
|
1606
|
-
function
|
|
1565
|
+
function Zt(e, t) {
|
|
1607
1566
|
e.schema;
|
|
1608
|
-
const n =
|
|
1609
|
-
function c(
|
|
1567
|
+
const n = C(!0), o = C(!0);
|
|
1568
|
+
function c(i) {
|
|
1610
1569
|
return !1;
|
|
1611
1570
|
}
|
|
1612
|
-
function
|
|
1571
|
+
function l() {
|
|
1613
1572
|
return !1;
|
|
1614
1573
|
}
|
|
1615
1574
|
function u() {
|
|
1616
1575
|
return !1;
|
|
1617
1576
|
}
|
|
1618
|
-
function
|
|
1577
|
+
function f() {
|
|
1619
1578
|
return !0;
|
|
1620
1579
|
}
|
|
1621
|
-
function
|
|
1580
|
+
function b(i) {
|
|
1622
1581
|
}
|
|
1623
|
-
function
|
|
1582
|
+
function y() {
|
|
1624
1583
|
}
|
|
1625
|
-
function
|
|
1584
|
+
function h(i) {
|
|
1626
1585
|
return null;
|
|
1627
1586
|
}
|
|
1628
1587
|
return {
|
|
1629
1588
|
canAccepts: c,
|
|
1630
|
-
checkCanDeleteComponent:
|
|
1589
|
+
checkCanDeleteComponent: l,
|
|
1631
1590
|
checkCanMoveComponent: u,
|
|
1632
|
-
hideNestedPaddingInDesginerView:
|
|
1633
|
-
onAcceptMovedChildElement:
|
|
1634
|
-
resolveComponentContext:
|
|
1591
|
+
hideNestedPaddingInDesginerView: f,
|
|
1592
|
+
onAcceptMovedChildElement: b,
|
|
1593
|
+
resolveComponentContext: y,
|
|
1635
1594
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1636
1595
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1637
|
-
getPropsConfig:
|
|
1596
|
+
getPropsConfig: h
|
|
1638
1597
|
};
|
|
1639
1598
|
}
|
|
1640
|
-
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
|
+
*/
|
|
1641
1685
|
static getEditorTypesByMDataType(t) {
|
|
1642
|
-
const n =
|
|
1686
|
+
const n = R.fieldControlTypeMapping[t];
|
|
1643
1687
|
return n || [{ key: "", value: "" }];
|
|
1644
1688
|
}
|
|
1645
|
-
|
|
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
|
+
};
|
|
1646
1701
|
/**
|
|
1647
1702
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1648
1703
|
*/
|
|
1649
|
-
|
|
1704
|
+
L(R, "fieldControlTypeMapping", {
|
|
1650
1705
|
String: [
|
|
1651
|
-
{ key:
|
|
1652
|
-
{ key:
|
|
1653
|
-
{ key:
|
|
1654
|
-
{ key:
|
|
1655
|
-
{ key:
|
|
1656
|
-
{ key:
|
|
1657
|
-
{ key:
|
|
1658
|
-
{ key: M.textarea.type, value: M.textarea.name }
|
|
1659
|
-
// { 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 }
|
|
1660
1713
|
],
|
|
1661
1714
|
Text: [
|
|
1662
|
-
{ key:
|
|
1663
|
-
{ key:
|
|
1664
|
-
{ 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 }
|
|
1665
1717
|
],
|
|
1666
1718
|
Decimal: [
|
|
1667
|
-
{ key:
|
|
1719
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1668
1720
|
],
|
|
1669
1721
|
Integer: [
|
|
1670
|
-
{ key:
|
|
1722
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1671
1723
|
],
|
|
1672
1724
|
Number: [
|
|
1673
|
-
{ key:
|
|
1725
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1674
1726
|
],
|
|
1675
1727
|
BigNumber: [
|
|
1676
|
-
{ key:
|
|
1728
|
+
{ key: j["number-spinner"].type, value: j["number-spinner"].name }
|
|
1677
1729
|
],
|
|
1678
1730
|
Date: [
|
|
1679
|
-
{ key:
|
|
1731
|
+
{ key: j["date-picker"].type, value: j["date-picker"].name }
|
|
1680
1732
|
],
|
|
1681
1733
|
DateTime: [
|
|
1682
|
-
{ key:
|
|
1734
|
+
{ key: j["date-picker"].type, value: j["date-picker"].name }
|
|
1683
1735
|
],
|
|
1684
1736
|
Boolean: [
|
|
1685
|
-
{ key:
|
|
1686
|
-
{ key:
|
|
1737
|
+
{ key: j.switch.type, value: j.switch.name },
|
|
1738
|
+
{ key: j["check-box"].type, value: j["check-box"].name }
|
|
1687
1739
|
],
|
|
1688
1740
|
Enum: [
|
|
1689
|
-
{ key:
|
|
1690
|
-
{ key:
|
|
1741
|
+
{ key: j["combo-list"].type, value: j["combo-list"].name },
|
|
1742
|
+
{ key: j["radio-group"].type, value: j["radio-group"].name }
|
|
1691
1743
|
],
|
|
1692
1744
|
Object: [
|
|
1693
|
-
{ key:
|
|
1694
|
-
{ key:
|
|
1695
|
-
{ key:
|
|
1696
|
-
],
|
|
1697
|
-
EmployeeSelector: [
|
|
1698
|
-
{ key: M.EmployeeSelector.type, value: M.EmployeeSelector.name }
|
|
1699
|
-
],
|
|
1700
|
-
AdminOrganizationSelector: [
|
|
1701
|
-
{ 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 }
|
|
1702
1748
|
]
|
|
1703
1749
|
});
|
|
1704
|
-
|
|
1750
|
+
let _ = R;
|
|
1751
|
+
const en = C(0);
|
|
1752
|
+
class tn extends Kt {
|
|
1705
1753
|
constructor(t, n) {
|
|
1706
|
-
|
|
1707
|
-
$(this, "viewModelId");
|
|
1708
|
-
$(this, "eventsEditorUtils");
|
|
1709
|
-
$(this, "formSchemaUtils");
|
|
1710
|
-
$(this, "formMetadataConverter");
|
|
1711
|
-
$(this, "designViewModelUtils");
|
|
1712
|
-
$(this, "designViewModelField");
|
|
1713
|
-
$(this, "controlCreatorUtils");
|
|
1714
|
-
$(this, "designerHostService");
|
|
1715
|
-
$(this, "schemaService", null);
|
|
1716
|
-
$(this, "metadataService", null);
|
|
1717
|
-
$(this, "propertyConfig", {
|
|
1718
|
-
type: "object",
|
|
1719
|
-
categories: {}
|
|
1720
|
-
});
|
|
1721
|
-
var o;
|
|
1722
|
-
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;
|
|
1723
|
-
}
|
|
1724
|
-
getTableInfo() {
|
|
1725
|
-
var t;
|
|
1726
|
-
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1727
|
-
}
|
|
1728
|
-
setDesignViewModelField(t) {
|
|
1729
|
-
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
1730
|
-
if (n) {
|
|
1731
|
-
if (!this.designViewModelField) {
|
|
1732
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1733
|
-
this.designViewModelField = o.fields.find((c) => c.id === n);
|
|
1734
|
-
}
|
|
1735
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
1736
|
-
}
|
|
1754
|
+
super(t, n);
|
|
1737
1755
|
}
|
|
1738
|
-
|
|
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;
|
|
1739
1758
|
}
|
|
1740
|
-
|
|
1741
|
-
var
|
|
1742
|
-
var
|
|
1743
|
-
|
|
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 {
|
|
1744
1765
|
description: "Basic Information",
|
|
1745
1766
|
title: "基本信息",
|
|
1746
1767
|
properties: {
|
|
@@ -1760,63 +1781,48 @@ class Zt {
|
|
|
1760
1781
|
type: "combo-list",
|
|
1761
1782
|
textField: "value",
|
|
1762
1783
|
valueField: "key",
|
|
1763
|
-
|
|
1764
|
-
|
|
1784
|
+
editable: !1,
|
|
1785
|
+
data: o.designViewModelField ? _.getEditorTypesByMDataType((u = o.designViewModelField.type) == null ? void 0 : u.name) : _.getAllInputTypes()
|
|
1765
1786
|
}
|
|
1766
1787
|
},
|
|
1767
1788
|
label: {
|
|
1768
1789
|
title: "标签",
|
|
1769
1790
|
type: "string",
|
|
1770
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
|
+
}
|
|
1771
1812
|
}
|
|
1772
1813
|
},
|
|
1773
|
-
setPropertyRelates(
|
|
1774
|
-
if (
|
|
1775
|
-
switch (
|
|
1814
|
+
setPropertyRelates(f, b) {
|
|
1815
|
+
if (f)
|
|
1816
|
+
switch (f && f.propertyID) {
|
|
1776
1817
|
case "type": {
|
|
1777
|
-
|
|
1818
|
+
o.changeControlType(t, f, n);
|
|
1778
1819
|
break;
|
|
1779
1820
|
}
|
|
1780
1821
|
}
|
|
1781
1822
|
}
|
|
1782
1823
|
};
|
|
1783
1824
|
}
|
|
1784
|
-
|
|
1785
|
-
* 卡片控件:切换控件类型后事件
|
|
1786
|
-
* @param propertyData 控件DOM属性
|
|
1787
|
-
* @param newControlType 新控件类型
|
|
1788
|
-
*/
|
|
1789
|
-
changeControlType(t, n) {
|
|
1790
|
-
var f, y, a, r, w;
|
|
1791
|
-
const o = n.propertyValue, c = this.formSchemaUtils.getComponentById(this.componentId);
|
|
1792
|
-
let i = this.getControlParentContainer(t.id, c);
|
|
1793
|
-
if (!i)
|
|
1794
|
-
return;
|
|
1795
|
-
const u = i.contents.findIndex((s) => s.id === t.id), m = i.contents[u];
|
|
1796
|
-
let S;
|
|
1797
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1798
|
-
editor: {
|
|
1799
|
-
$type: o
|
|
1800
|
-
},
|
|
1801
|
-
name: this.designViewModelField.name,
|
|
1802
|
-
require: this.designViewModelField.require,
|
|
1803
|
-
readonly: this.designViewModelField.readonly
|
|
1804
|
-
}, !1), S = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(S, {
|
|
1805
|
-
id: m.id,
|
|
1806
|
-
appearance: m.appearance,
|
|
1807
|
-
size: m.size,
|
|
1808
|
-
label: m.label
|
|
1809
|
-
}), Object.assign(S.editor, {
|
|
1810
|
-
isTextArea: S.isTextArea && m.isTextArea,
|
|
1811
|
-
type: o || "",
|
|
1812
|
-
placeHolder: (f = m.editor) == null ? void 0 : f.placeHolder,
|
|
1813
|
-
holdPlace: (y = m.editor) == null ? void 0 : y.holdPlace,
|
|
1814
|
-
readonly: (a = m.editor) == null ? void 0 : a.readonly,
|
|
1815
|
-
require: (r = m.editor) == null ? void 0 : r.require,
|
|
1816
|
-
visible: (w = m.editor) == null ? void 0 : w.visible
|
|
1817
|
-
}), i.contents.splice(u, 1, S);
|
|
1818
|
-
}
|
|
1819
|
-
getAppearanceConfig(t = null) {
|
|
1825
|
+
getAppearanceProperties(t) {
|
|
1820
1826
|
return {
|
|
1821
1827
|
title: "样式",
|
|
1822
1828
|
description: "Appearance",
|
|
@@ -1846,82 +1852,44 @@ class Zt {
|
|
|
1846
1852
|
}
|
|
1847
1853
|
};
|
|
1848
1854
|
}
|
|
1849
|
-
/**
|
|
1850
|
-
* 获取控件:以contents为节点进行定位
|
|
1851
|
-
* @param controlId 控件ID
|
|
1852
|
-
* @param domJson 容器
|
|
1853
|
-
*/
|
|
1854
|
-
getControlParentContainer(t, n) {
|
|
1855
|
-
let o;
|
|
1856
|
-
if (!n || !n.contents || n.contents.length === 0)
|
|
1857
|
-
return null;
|
|
1858
|
-
for (const c of n.contents) {
|
|
1859
|
-
if (c.id === t)
|
|
1860
|
-
return o = n, n;
|
|
1861
|
-
if (o = this.getControlParentContainer(t, c), o)
|
|
1862
|
-
return o;
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
getBindingFieldEditorOptions(t) {
|
|
1866
|
-
const n = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
1867
|
-
return {
|
|
1868
|
-
type: "field-selector",
|
|
1869
|
-
bindingType: { enable: !1 },
|
|
1870
|
-
editorParams: {
|
|
1871
|
-
propertyData: t,
|
|
1872
|
-
formBasicInfo: n
|
|
1873
|
-
},
|
|
1874
|
-
columns: [
|
|
1875
|
-
{ field: "name", title: "字段名称" },
|
|
1876
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1877
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1878
|
-
],
|
|
1879
|
-
beforeOpenDialog: (o) => {
|
|
1880
|
-
const c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1881
|
-
o.instance.loadData(c);
|
|
1882
|
-
},
|
|
1883
|
-
textField: "bindingField"
|
|
1884
|
-
};
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
class Jt extends Zt {
|
|
1888
|
-
constructor(t, n) {
|
|
1889
|
-
super(t, n);
|
|
1890
|
-
}
|
|
1891
|
-
getBasicProperties(t) {
|
|
1892
|
-
let n = this.getBasicPropConfig(t);
|
|
1893
|
-
return n.properties.binding = this.getFieldSelectorOptions(t), n;
|
|
1894
|
-
}
|
|
1895
|
-
getAppearanceProperties(t) {
|
|
1896
|
-
return this.getAppearanceConfig(t);
|
|
1897
|
-
}
|
|
1898
1855
|
getEditorProperties(t) {
|
|
1899
1856
|
return this.getComponentConfig(t);
|
|
1900
1857
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
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, {
|
|
1910
1871
|
editor: {
|
|
1911
|
-
type:
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
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++;
|
|
1925
1893
|
}
|
|
1926
1894
|
getComponentConfig(t, n = {}, o = {}) {
|
|
1927
1895
|
const c = Object.assign({
|
|
@@ -1929,7 +1897,7 @@ class Jt extends Zt {
|
|
|
1929
1897
|
title: "组件信息",
|
|
1930
1898
|
type: "input-group",
|
|
1931
1899
|
$converter: "/converter/property-editor.converter"
|
|
1932
|
-
}, n),
|
|
1900
|
+
}, n), l = Object.assign({
|
|
1933
1901
|
readonly: {
|
|
1934
1902
|
description: "",
|
|
1935
1903
|
title: "只读",
|
|
@@ -1951,10 +1919,10 @@ class Jt extends Zt {
|
|
|
1951
1919
|
type: "string"
|
|
1952
1920
|
}
|
|
1953
1921
|
}, o);
|
|
1954
|
-
return { ...c, properties: { ...
|
|
1922
|
+
return { ...c, properties: { ...l } };
|
|
1955
1923
|
}
|
|
1956
1924
|
}
|
|
1957
|
-
class
|
|
1925
|
+
class nn extends tn {
|
|
1958
1926
|
constructor(t, n) {
|
|
1959
1927
|
super(t, n);
|
|
1960
1928
|
}
|
|
@@ -1978,41 +1946,41 @@ class Kt extends Jt {
|
|
|
1978
1946
|
});
|
|
1979
1947
|
}
|
|
1980
1948
|
}
|
|
1981
|
-
function
|
|
1949
|
+
function on(e, t) {
|
|
1982
1950
|
const {
|
|
1983
1951
|
canAccepts: n,
|
|
1984
1952
|
checkCanDeleteComponent: o,
|
|
1985
1953
|
checkCanMoveComponent: c,
|
|
1986
|
-
hideNestedPaddingInDesginerView:
|
|
1954
|
+
hideNestedPaddingInDesginerView: l,
|
|
1987
1955
|
onAcceptMovedChildElement: u,
|
|
1988
|
-
resolveComponentContext:
|
|
1989
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1990
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1991
|
-
} =
|
|
1992
|
-
function
|
|
1993
|
-
return new
|
|
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);
|
|
1994
1962
|
}
|
|
1995
1963
|
return {
|
|
1996
1964
|
canAccepts: n,
|
|
1997
1965
|
checkCanDeleteComponent: o,
|
|
1998
1966
|
checkCanMoveComponent: c,
|
|
1999
|
-
hideNestedPaddingInDesginerView:
|
|
1967
|
+
hideNestedPaddingInDesginerView: l,
|
|
2000
1968
|
onAcceptMovedChildElement: u,
|
|
2001
|
-
resolveComponentContext:
|
|
2002
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2003
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2004
|
-
getPropsConfig:
|
|
1969
|
+
resolveComponentContext: f,
|
|
1970
|
+
triggerBelongedComponentToMoveWhenMoved: b,
|
|
1971
|
+
triggerBelongedComponentToDeleteWhenDeleted: y,
|
|
1972
|
+
getPropsConfig: i
|
|
2005
1973
|
};
|
|
2006
1974
|
}
|
|
2007
|
-
const
|
|
1975
|
+
const an = /* @__PURE__ */ H({
|
|
2008
1976
|
name: "FComboListDesign",
|
|
2009
|
-
props:
|
|
1977
|
+
props: ne,
|
|
2010
1978
|
emits: ["clear", "update:modelValue", "change"],
|
|
2011
1979
|
setup(e, t) {
|
|
2012
|
-
const n =
|
|
2013
|
-
return
|
|
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(() => {
|
|
2014
1982
|
n.value.componentInstance = u;
|
|
2015
|
-
}), t.expose(u.value), () =>
|
|
1983
|
+
}), t.expose(u.value), () => v(ue, {
|
|
2016
1984
|
ref: n,
|
|
2017
1985
|
id: e.id,
|
|
2018
1986
|
disable: e.disabled,
|
|
@@ -2029,222 +1997,222 @@ const tn = /* @__PURE__ */ H({
|
|
|
2029
1997
|
inputType: e.multiSelect ? "tag" : "text"
|
|
2030
1998
|
}, null);
|
|
2031
1999
|
}
|
|
2032
|
-
}),
|
|
2000
|
+
}), rn = (e) => {
|
|
2033
2001
|
const t = e;
|
|
2034
2002
|
return t.install = function(n) {
|
|
2035
2003
|
n.component(t.name, e);
|
|
2036
2004
|
}, e;
|
|
2037
2005
|
};
|
|
2038
|
-
|
|
2039
|
-
e["combo-list"] =
|
|
2006
|
+
G.register = (e, t, n, o) => {
|
|
2007
|
+
e["combo-list"] = G, t["combo-list"] = ge;
|
|
2040
2008
|
};
|
|
2041
|
-
|
|
2042
|
-
e["combo-list"] =
|
|
2009
|
+
G.registerDesigner = (e, t, n) => {
|
|
2010
|
+
e["combo-list"] = an, t["combo-list"] = ge;
|
|
2043
2011
|
};
|
|
2044
|
-
const
|
|
2012
|
+
const q = rn(G), z = /* @__PURE__ */ H({
|
|
2045
2013
|
name: "FOrder",
|
|
2046
|
-
props:
|
|
2014
|
+
props: te,
|
|
2047
2015
|
emits: ["change"],
|
|
2048
2016
|
setup(e, t) {
|
|
2049
|
-
const n =
|
|
2017
|
+
const n = C(e.items), o = C("排序列"), c = C("排序方式"), l = C("添加排序列"), u = [{
|
|
2050
2018
|
id: "asc",
|
|
2051
2019
|
name: "升序"
|
|
2052
2020
|
}, {
|
|
2053
2021
|
id: "desc",
|
|
2054
2022
|
name: "降序"
|
|
2055
|
-
}],
|
|
2056
|
-
function
|
|
2057
|
-
const
|
|
2058
|
-
|
|
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);
|
|
2059
2027
|
}
|
|
2060
|
-
|
|
2061
|
-
const
|
|
2028
|
+
b();
|
|
2029
|
+
const y = B(() => e.dataSource.map((s) => (s.disabled = f.value.has(s.id), s))), h = B(() => ({
|
|
2062
2030
|
"f-order": !0
|
|
2063
2031
|
}));
|
|
2064
|
-
function
|
|
2065
|
-
n.value = n.value.filter((d) => d.id !==
|
|
2032
|
+
function i(s) {
|
|
2033
|
+
n.value = n.value.filter((d) => d.id !== s.id), b(), t.emit("change", n.value);
|
|
2066
2034
|
}
|
|
2067
2035
|
function r() {
|
|
2068
2036
|
n.value = [...n.value, {
|
|
2069
2037
|
id: Date.now().toString(),
|
|
2070
2038
|
name: "",
|
|
2071
2039
|
order: "asc"
|
|
2072
|
-
}],
|
|
2040
|
+
}], b(), t.emit("change", n.value);
|
|
2073
2041
|
}
|
|
2074
|
-
function
|
|
2075
|
-
if (
|
|
2076
|
-
const d =
|
|
2077
|
-
|
|
2042
|
+
function g(s) {
|
|
2043
|
+
if (s && s.length === 1) {
|
|
2044
|
+
const d = s[0], k = n.value.find((F) => F.id === d.id);
|
|
2045
|
+
k && (k.name = d.name);
|
|
2078
2046
|
}
|
|
2079
|
-
|
|
2047
|
+
b(), t.emit("change", n.value);
|
|
2080
2048
|
}
|
|
2081
|
-
function s
|
|
2082
|
-
if (
|
|
2049
|
+
function a(s) {
|
|
2050
|
+
if (s && s.length) {
|
|
2083
2051
|
const d = /* @__PURE__ */ new Map();
|
|
2084
|
-
|
|
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);
|
|
2085
2053
|
}
|
|
2086
2054
|
}
|
|
2087
|
-
function
|
|
2088
|
-
return
|
|
2055
|
+
function m() {
|
|
2056
|
+
return v(me, {
|
|
2089
2057
|
style: "flex:1",
|
|
2090
2058
|
data: n.value,
|
|
2091
2059
|
draggable: !0,
|
|
2092
2060
|
view: "DraggableView",
|
|
2093
2061
|
"keep-order": !0,
|
|
2094
2062
|
itemClass: "f-order-item",
|
|
2095
|
-
onRemoveItem:
|
|
2096
|
-
onChange:
|
|
2063
|
+
onRemoveItem: i,
|
|
2064
|
+
onChange: a
|
|
2097
2065
|
}, {
|
|
2098
|
-
header: () =>
|
|
2066
|
+
header: () => v("div", {
|
|
2099
2067
|
class: "f-order-header"
|
|
2100
|
-
}, [
|
|
2068
|
+
}, [v("span", {
|
|
2101
2069
|
class: "f-order-header-order-field"
|
|
2102
|
-
}, [o.value]),
|
|
2070
|
+
}, [o.value]), v("span", {
|
|
2103
2071
|
class: "f-order-header-order-type"
|
|
2104
2072
|
}, [c.value])]),
|
|
2105
|
-
itemContent: (
|
|
2073
|
+
itemContent: (s) => v("div", {
|
|
2106
2074
|
class: "f-order-item-content"
|
|
2107
|
-
}, [
|
|
2075
|
+
}, [v(q, {
|
|
2108
2076
|
class: "f-order-item-content-order-field",
|
|
2109
|
-
data:
|
|
2077
|
+
data: y.value,
|
|
2110
2078
|
valueField: "id",
|
|
2111
2079
|
textField: "name",
|
|
2112
2080
|
idField: "id",
|
|
2113
|
-
modelValue:
|
|
2114
|
-
"onUpdate:modelValue": (d) =>
|
|
2115
|
-
onChange:
|
|
2116
|
-
onClear:
|
|
2117
|
-
}, null),
|
|
2081
|
+
modelValue: s.id,
|
|
2082
|
+
"onUpdate:modelValue": (d) => s.id = d,
|
|
2083
|
+
onChange: g,
|
|
2084
|
+
onClear: g
|
|
2085
|
+
}, null), v(q, {
|
|
2118
2086
|
class: "f-order-item-content-order-type",
|
|
2119
2087
|
data: u,
|
|
2120
2088
|
valueField: "id",
|
|
2121
2089
|
textField: "name",
|
|
2122
2090
|
idField: "id",
|
|
2123
|
-
modelValue:
|
|
2124
|
-
"onUpdate:modelValue": (d) =>
|
|
2125
|
-
onChange:
|
|
2091
|
+
modelValue: s.order,
|
|
2092
|
+
"onUpdate:modelValue": (d) => s.order = d,
|
|
2093
|
+
onChange: g
|
|
2126
2094
|
}, null)]),
|
|
2127
|
-
footer: () =>
|
|
2095
|
+
footer: () => v("div", {
|
|
2128
2096
|
class: "f-order-footer"
|
|
2129
|
-
}, [
|
|
2097
|
+
}, [v(ye, {
|
|
2130
2098
|
type: "link",
|
|
2131
2099
|
class: "f-order-add-button",
|
|
2132
2100
|
onClick: r
|
|
2133
2101
|
}, {
|
|
2134
|
-
default: () =>
|
|
2102
|
+
default: () => v(Q, null, [v("span", {
|
|
2135
2103
|
class: "f-order-add-icon"
|
|
2136
|
-
}, [
|
|
2104
|
+
}, [v("i", {
|
|
2137
2105
|
class: "f-icon f-icon-add"
|
|
2138
|
-
}, null)]),
|
|
2106
|
+
}, null)]), l.value])
|
|
2139
2107
|
})])
|
|
2140
2108
|
});
|
|
2141
2109
|
}
|
|
2142
|
-
return () =>
|
|
2143
|
-
class:
|
|
2144
|
-
}, [
|
|
2110
|
+
return () => v("div", {
|
|
2111
|
+
class: h.value
|
|
2112
|
+
}, [m()]);
|
|
2145
2113
|
}
|
|
2146
2114
|
});
|
|
2147
|
-
function
|
|
2148
|
-
var
|
|
2115
|
+
function ln(e, t, n) {
|
|
2116
|
+
var S;
|
|
2149
2117
|
function o() {
|
|
2150
2118
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
2151
2119
|
}
|
|
2152
2120
|
o();
|
|
2153
|
-
const c = n && n.getStyles && n.getStyles() || "",
|
|
2154
|
-
function
|
|
2121
|
+
const c = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", u = C();
|
|
2122
|
+
function f() {
|
|
2155
2123
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2156
2124
|
}
|
|
2157
|
-
function
|
|
2125
|
+
function b() {
|
|
2158
2126
|
return !1;
|
|
2159
2127
|
}
|
|
2160
|
-
function
|
|
2128
|
+
function y() {
|
|
2161
2129
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
2162
2130
|
}
|
|
2163
|
-
function
|
|
2131
|
+
function h() {
|
|
2164
2132
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
2165
2133
|
}
|
|
2166
|
-
function
|
|
2167
|
-
if (!
|
|
2134
|
+
function i(w) {
|
|
2135
|
+
if (!w || !w.value)
|
|
2168
2136
|
return null;
|
|
2169
|
-
if (
|
|
2170
|
-
return
|
|
2171
|
-
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);
|
|
2172
2140
|
return p || null;
|
|
2173
2141
|
}
|
|
2174
|
-
function r(
|
|
2175
|
-
const { componentInstance:
|
|
2176
|
-
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);
|
|
2177
2145
|
}
|
|
2178
|
-
function w
|
|
2179
|
-
return !!n && n.canAccepts(
|
|
2146
|
+
function g(w) {
|
|
2147
|
+
return !!n && n.canAccepts(w);
|
|
2180
2148
|
}
|
|
2181
|
-
function
|
|
2149
|
+
function a() {
|
|
2182
2150
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2183
2151
|
}
|
|
2184
|
-
function
|
|
2152
|
+
function m() {
|
|
2185
2153
|
}
|
|
2186
|
-
function
|
|
2187
|
-
|
|
2154
|
+
function s(w, V) {
|
|
2155
|
+
V && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(V);
|
|
2188
2156
|
}
|
|
2189
|
-
function d(
|
|
2190
|
-
const { componentType:
|
|
2191
|
-
let p =
|
|
2192
|
-
n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(
|
|
2193
|
-
const
|
|
2194
|
-
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;
|
|
2195
2163
|
}
|
|
2196
|
-
function
|
|
2197
|
-
const p = String(
|
|
2164
|
+
function k(w, V) {
|
|
2165
|
+
const p = String(w.getAttribute("data-controltype")), M = w.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
|
|
2198
2166
|
A.parentComponentInstance = u.value;
|
|
2199
|
-
let
|
|
2200
|
-
n && n.onAcceptNewChildElement && (
|
|
2201
|
-
const
|
|
2202
|
-
return
|
|
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;
|
|
2203
2171
|
}
|
|
2204
|
-
function
|
|
2172
|
+
function F(w) {
|
|
2205
2173
|
}
|
|
2206
|
-
function
|
|
2174
|
+
function D(...w) {
|
|
2207
2175
|
if (n && n.getPropsConfig)
|
|
2208
|
-
return n.getPropsConfig(...
|
|
2176
|
+
return n.getPropsConfig(...w);
|
|
2209
2177
|
}
|
|
2210
2178
|
return u.value = {
|
|
2211
|
-
canMove:
|
|
2212
|
-
canSelectParent:
|
|
2213
|
-
canDelete:
|
|
2214
|
-
canNested: !
|
|
2179
|
+
canMove: f(),
|
|
2180
|
+
canSelectParent: b(),
|
|
2181
|
+
canDelete: y(),
|
|
2182
|
+
canNested: !h(),
|
|
2215
2183
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2216
2184
|
elementRef: e,
|
|
2217
|
-
parent: (
|
|
2185
|
+
parent: (S = t == null ? void 0 : t.parent) == null ? void 0 : S.componentInstance,
|
|
2218
2186
|
schema: t == null ? void 0 : t.schema,
|
|
2219
2187
|
styles: c,
|
|
2220
|
-
designerClass:
|
|
2221
|
-
canAccepts:
|
|
2222
|
-
getBelongedComponentInstance:
|
|
2188
|
+
designerClass: l,
|
|
2189
|
+
canAccepts: g,
|
|
2190
|
+
getBelongedComponentInstance: i,
|
|
2223
2191
|
getDraggableDesignItemElement: r,
|
|
2224
|
-
getDraggingDisplayText:
|
|
2225
|
-
getPropConfig:
|
|
2226
|
-
getDragScopeElement:
|
|
2227
|
-
onAcceptMovedChildElement:
|
|
2228
|
-
onAcceptNewChildElement:
|
|
2229
|
-
onChildElementMovedOut:
|
|
2192
|
+
getDraggingDisplayText: a,
|
|
2193
|
+
getPropConfig: D,
|
|
2194
|
+
getDragScopeElement: m,
|
|
2195
|
+
onAcceptMovedChildElement: s,
|
|
2196
|
+
onAcceptNewChildElement: k,
|
|
2197
|
+
onChildElementMovedOut: F,
|
|
2230
2198
|
addNewChildComponentSchema: d,
|
|
2231
2199
|
updateDragAndDropRules: o,
|
|
2232
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
2233
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
2200
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
2201
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
2234
2202
|
}, u;
|
|
2235
2203
|
}
|
|
2236
|
-
function
|
|
2204
|
+
function sn() {
|
|
2237
2205
|
function e(t) {
|
|
2238
|
-
var c,
|
|
2206
|
+
var c, l;
|
|
2239
2207
|
if (!t)
|
|
2240
2208
|
return !1;
|
|
2241
2209
|
const n = ((c = t.targetContainer) == null ? void 0 : c.componentInstance) && t.targetContainer.componentInstance.value;
|
|
2242
2210
|
if (!n)
|
|
2243
2211
|
return !1;
|
|
2244
|
-
const o = (
|
|
2212
|
+
const o = (l = n.schema.appearance) == null ? void 0 : l.class;
|
|
2245
2213
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2246
|
-
const u = n.schema.type,
|
|
2247
|
-
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)
|
|
2248
2216
|
return !1;
|
|
2249
2217
|
}
|
|
2250
2218
|
return t.controlType !== "field-set";
|
|
@@ -2253,7 +2221,7 @@ function an() {
|
|
|
2253
2221
|
basalDragulaRuleForContainer: e
|
|
2254
2222
|
};
|
|
2255
2223
|
}
|
|
2256
|
-
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 = {
|
|
2257
2225
|
"f-page": {
|
|
2258
2226
|
description: "The root class of page designed by farris.",
|
|
2259
2227
|
type: "object",
|
|
@@ -2817,39 +2785,39 @@ const rn = "https://json-schema.org/draft/2020-12/schema", ln = "https://farris-
|
|
|
2817
2785
|
description: "",
|
|
2818
2786
|
type: "object"
|
|
2819
2787
|
}
|
|
2820
|
-
},
|
|
2821
|
-
$schema:
|
|
2822
|
-
$id:
|
|
2823
|
-
title:
|
|
2824
|
-
description:
|
|
2825
|
-
type:
|
|
2826
|
-
properties:
|
|
2827
|
-
required:
|
|
2828
|
-
},
|
|
2829
|
-
function
|
|
2830
|
-
function e(
|
|
2831
|
-
var
|
|
2832
|
-
if (typeof
|
|
2833
|
-
return ((
|
|
2834
|
-
if (typeof
|
|
2835
|
-
const
|
|
2836
|
-
if (
|
|
2837
|
-
return Number(d[
|
|
2838
|
-
if (
|
|
2839
|
-
return Number(d[
|
|
2840
|
-
if (
|
|
2841
|
-
return Number(d[
|
|
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;
|
|
2800
|
+
if (typeof s == "number")
|
|
2801
|
+
return ((k = d[a]) == null ? void 0 : k.length) === s;
|
|
2802
|
+
if (typeof s == "object") {
|
|
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);
|
|
2842
2810
|
}
|
|
2843
2811
|
return !1;
|
|
2844
2812
|
}
|
|
2845
|
-
function t(
|
|
2846
|
-
return typeof
|
|
2813
|
+
function t(a, m, s, d) {
|
|
2814
|
+
return typeof s == "boolean" ? d.childrenClassList.includes(m) === !!s : !1;
|
|
2847
2815
|
}
|
|
2848
|
-
function n(
|
|
2849
|
-
return typeof
|
|
2816
|
+
function n(a, m, s, d) {
|
|
2817
|
+
return typeof s == "boolean" ? d.parentClassList.includes(m) === !!s : !1;
|
|
2850
2818
|
}
|
|
2851
|
-
function o(
|
|
2852
|
-
return typeof
|
|
2819
|
+
function o(a, m, s, d) {
|
|
2820
|
+
return typeof s == "boolean" ? d.parentClassList.includes(m) === !!s : !1;
|
|
2853
2821
|
}
|
|
2854
2822
|
const c = /* @__PURE__ */ new Map([
|
|
2855
2823
|
["length", e],
|
|
@@ -2857,300 +2825,300 @@ function mn() {
|
|
|
2857
2825
|
["hasSibling", o],
|
|
2858
2826
|
["hasParent", n]
|
|
2859
2827
|
]);
|
|
2860
|
-
function
|
|
2861
|
-
const
|
|
2862
|
-
return typeof
|
|
2828
|
+
function l(a, m) {
|
|
2829
|
+
const s = a;
|
|
2830
|
+
return typeof m == "number" ? [{ target: s, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((d) => {
|
|
2863
2831
|
if (d === "length")
|
|
2864
|
-
return { target:
|
|
2865
|
-
const
|
|
2866
|
-
return { target:
|
|
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 };
|
|
2867
2835
|
}) : [];
|
|
2868
2836
|
}
|
|
2869
|
-
function u(
|
|
2870
|
-
if (c.has(
|
|
2871
|
-
const
|
|
2872
|
-
return
|
|
2837
|
+
function u(a, m) {
|
|
2838
|
+
if (c.has(a.operator)) {
|
|
2839
|
+
const s = c.get(a.operator);
|
|
2840
|
+
return s && s(a.target, a.param, a.value, m) || !1;
|
|
2873
2841
|
}
|
|
2874
2842
|
return !1;
|
|
2875
2843
|
}
|
|
2876
|
-
function
|
|
2877
|
-
return Object.keys(
|
|
2878
|
-
const
|
|
2879
|
-
return
|
|
2880
|
-
}, []).reduce((
|
|
2881
|
-
}
|
|
2882
|
-
function
|
|
2883
|
-
const
|
|
2884
|
-
return d ? !
|
|
2885
|
-
}
|
|
2886
|
-
function
|
|
2887
|
-
const
|
|
2888
|
-
return
|
|
2889
|
-
}
|
|
2890
|
-
function
|
|
2891
|
-
return (
|
|
2892
|
-
const
|
|
2893
|
-
return
|
|
2894
|
-
const
|
|
2895
|
-
return d[
|
|
2896
|
-
},
|
|
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);
|
|
2849
|
+
}
|
|
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);
|
|
2853
|
+
}
|
|
2854
|
+
function y(a, m) {
|
|
2855
|
+
const s = a.const;
|
|
2856
|
+
return s ? typeof s == "boolean" ? s : typeof s == "object" ? b(s, m) : !1 : !1;
|
|
2857
|
+
}
|
|
2858
|
+
function h(a) {
|
|
2859
|
+
return (m) => {
|
|
2860
|
+
const s = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
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;
|
|
2864
|
+
}, s), s;
|
|
2897
2865
|
};
|
|
2898
2866
|
}
|
|
2899
|
-
function a
|
|
2900
|
-
if (
|
|
2901
|
-
const { rules: d, contents:
|
|
2902
|
-
|
|
2903
|
-
(
|
|
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)
|
|
2904
2872
|
);
|
|
2905
2873
|
}
|
|
2906
2874
|
}
|
|
2907
2875
|
function r() {
|
|
2908
|
-
const { properties:
|
|
2909
|
-
Object.keys(
|
|
2910
|
-
|
|
2876
|
+
const { properties: a } = gn;
|
|
2877
|
+
Object.keys(a).forEach((m) => {
|
|
2878
|
+
i(m, a[m], J);
|
|
2911
2879
|
});
|
|
2912
2880
|
}
|
|
2913
|
-
function
|
|
2914
|
-
const
|
|
2915
|
-
return
|
|
2881
|
+
function g(a, m) {
|
|
2882
|
+
const s = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2883
|
+
return J.has(a) ? J.get(a)(m) : s;
|
|
2916
2884
|
}
|
|
2917
|
-
return r(), { getRuleValue:
|
|
2885
|
+
return r(), { getRuleValue: g };
|
|
2918
2886
|
}
|
|
2919
|
-
function
|
|
2920
|
-
var
|
|
2921
|
-
const n = e.schema, o = (
|
|
2922
|
-
let
|
|
2923
|
-
function
|
|
2924
|
-
return
|
|
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;
|
|
2891
|
+
function i(p) {
|
|
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;
|
|
2925
2893
|
}
|
|
2926
2894
|
function r(p) {
|
|
2927
|
-
return !(!
|
|
2895
|
+
return !(!sn().basalDragulaRuleForContainer(p) || !f || !i(p));
|
|
2928
2896
|
}
|
|
2929
|
-
function
|
|
2930
|
-
|
|
2931
|
-
const p = n,
|
|
2932
|
-
const
|
|
2933
|
-
return
|
|
2934
|
-
}, []) : [],
|
|
2935
|
-
|
|
2936
|
-
componentClass:
|
|
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,
|
|
2937
2905
|
componentClassList: A,
|
|
2938
|
-
childContents:
|
|
2939
|
-
firstChildContent:
|
|
2940
|
-
firstChildClass:
|
|
2941
|
-
firstChildClassList:
|
|
2942
|
-
parent:
|
|
2943
|
-
parentClass:
|
|
2944
|
-
parentClassList:
|
|
2945
|
-
children:
|
|
2906
|
+
childContents: T,
|
|
2907
|
+
firstChildContent: $,
|
|
2908
|
+
firstChildClass: O,
|
|
2909
|
+
firstChildClassList: P,
|
|
2910
|
+
parent: I,
|
|
2911
|
+
parentClass: x,
|
|
2912
|
+
parentClassList: he,
|
|
2913
|
+
children: T,
|
|
2946
2914
|
childrenClassList: E
|
|
2947
2915
|
};
|
|
2948
|
-
const { canAccept:
|
|
2949
|
-
return
|
|
2916
|
+
const { canAccept: be, fixed: ve, hidePadding: Ce } = c.getRuleValue(A[0], y);
|
|
2917
|
+
return f = be, b = Ce, h = ve, !0;
|
|
2950
2918
|
}
|
|
2951
|
-
function
|
|
2952
|
-
|
|
2919
|
+
function a(p) {
|
|
2920
|
+
je();
|
|
2953
2921
|
}
|
|
2954
|
-
function
|
|
2922
|
+
function m() {
|
|
2955
2923
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2956
2924
|
}
|
|
2957
|
-
function
|
|
2925
|
+
function s(p, M) {
|
|
2958
2926
|
const A = n;
|
|
2959
2927
|
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2960
|
-
const { label:
|
|
2961
|
-
return
|
|
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;
|
|
2962
2930
|
}
|
|
2963
|
-
return
|
|
2931
|
+
return M;
|
|
2964
2932
|
}
|
|
2965
2933
|
function d(p) {
|
|
2966
|
-
const
|
|
2967
|
-
if (
|
|
2968
|
-
const A =
|
|
2969
|
-
p.appearance || (p.appearance = {}), p.appearance.class =
|
|
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);
|
|
2937
|
+
p.appearance || (p.appearance = {}), p.appearance.class = T;
|
|
2970
2938
|
}
|
|
2971
2939
|
}
|
|
2972
|
-
function
|
|
2973
|
-
let
|
|
2940
|
+
function k(p) {
|
|
2941
|
+
let M = "";
|
|
2974
2942
|
switch (p) {
|
|
2975
2943
|
case "form-col-1": {
|
|
2976
|
-
|
|
2944
|
+
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2977
2945
|
break;
|
|
2978
2946
|
}
|
|
2979
2947
|
case "form-col-12": {
|
|
2980
|
-
|
|
2948
|
+
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2981
2949
|
break;
|
|
2982
2950
|
}
|
|
2983
2951
|
case "form-col-2": {
|
|
2984
|
-
|
|
2952
|
+
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2985
2953
|
break;
|
|
2986
2954
|
}
|
|
2987
2955
|
case "form-col-3": {
|
|
2988
|
-
|
|
2956
|
+
M = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
2989
2957
|
break;
|
|
2990
2958
|
}
|
|
2991
2959
|
case "form-col-4": {
|
|
2992
|
-
|
|
2960
|
+
M = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
2993
2961
|
break;
|
|
2994
2962
|
}
|
|
2995
2963
|
case "form-col-6": {
|
|
2996
|
-
|
|
2964
|
+
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2997
2965
|
break;
|
|
2998
2966
|
}
|
|
2999
2967
|
case "frame": {
|
|
3000
|
-
|
|
2968
|
+
M = "col-12";
|
|
3001
2969
|
break;
|
|
3002
2970
|
}
|
|
3003
2971
|
}
|
|
3004
|
-
return
|
|
2972
|
+
return M;
|
|
3005
2973
|
}
|
|
3006
|
-
function
|
|
3007
|
-
const
|
|
3008
|
-
if ((
|
|
3009
|
-
const
|
|
3010
|
-
return E.editor = A, E.label =
|
|
2974
|
+
function F(p, M, A) {
|
|
2975
|
+
const T = n;
|
|
2976
|
+
if ((T.appearance && T.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2977
|
+
const P = String(p.innerText), E = U("form-group");
|
|
2978
|
+
return E.editor = A, E.label = P, E;
|
|
3011
2979
|
}
|
|
3012
2980
|
return A;
|
|
3013
2981
|
}
|
|
3014
|
-
function
|
|
3015
|
-
return !
|
|
2982
|
+
function D() {
|
|
2983
|
+
return !h;
|
|
3016
2984
|
}
|
|
3017
|
-
function
|
|
3018
|
-
return !
|
|
2985
|
+
function S() {
|
|
2986
|
+
return !h;
|
|
3019
2987
|
}
|
|
3020
|
-
function
|
|
3021
|
-
return
|
|
2988
|
+
function w() {
|
|
2989
|
+
return b;
|
|
3022
2990
|
}
|
|
3023
2991
|
return {
|
|
3024
2992
|
canAccepts: r,
|
|
3025
|
-
checkCanDeleteComponent:
|
|
3026
|
-
checkCanMoveComponent:
|
|
3027
|
-
getStyles:
|
|
3028
|
-
hideNestedPaddingInDesginerView:
|
|
3029
|
-
onAcceptNewChildElement:
|
|
3030
|
-
onAcceptMovedChildElement:
|
|
3031
|
-
resolveComponentContext:
|
|
3032
|
-
onResolveNewComponentSchema:
|
|
3033
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2993
|
+
checkCanDeleteComponent: S,
|
|
2994
|
+
checkCanMoveComponent: D,
|
|
2995
|
+
getStyles: m,
|
|
2996
|
+
hideNestedPaddingInDesginerView: w,
|
|
2997
|
+
onAcceptNewChildElement: F,
|
|
2998
|
+
onAcceptMovedChildElement: a,
|
|
2999
|
+
resolveComponentContext: g,
|
|
3000
|
+
onResolveNewComponentSchema: s,
|
|
3001
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
3034
3002
|
triggerBelongedComponentToDeleteWhenDeleted: u
|
|
3035
3003
|
};
|
|
3036
3004
|
}
|
|
3037
|
-
const
|
|
3005
|
+
const vn = /* @__PURE__ */ H({
|
|
3038
3006
|
name: "FOrderDesign",
|
|
3039
|
-
props:
|
|
3007
|
+
props: te,
|
|
3040
3008
|
emits: ["change"],
|
|
3041
3009
|
setup(e, t) {
|
|
3042
|
-
var
|
|
3043
|
-
const n =
|
|
3010
|
+
var D;
|
|
3011
|
+
const n = C(e.items), o = C("排序列"), c = C("排序方式"), l = C("添加排序列"), u = [{
|
|
3044
3012
|
id: "asc",
|
|
3045
3013
|
name: "升序"
|
|
3046
3014
|
}, {
|
|
3047
3015
|
id: "desc",
|
|
3048
3016
|
name: "降序"
|
|
3049
|
-
}],
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
}), t.expose(
|
|
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);
|
|
3053
3021
|
function r() {
|
|
3054
|
-
const
|
|
3055
|
-
|
|
3022
|
+
const S = n.value.map((w) => [w.id, !0]);
|
|
3023
|
+
f.value = new Map(S);
|
|
3056
3024
|
}
|
|
3057
3025
|
r();
|
|
3058
|
-
const
|
|
3026
|
+
const g = B(() => e.dataSource.map((S) => (S.disabled = f.value.has(S.id), S))), a = B(() => ({
|
|
3059
3027
|
"f-order": !0
|
|
3060
3028
|
}));
|
|
3061
|
-
function
|
|
3062
|
-
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);
|
|
3063
3031
|
}
|
|
3064
|
-
function
|
|
3032
|
+
function s() {
|
|
3065
3033
|
n.value = [...n.value, {
|
|
3066
3034
|
id: Date.now().toString(),
|
|
3067
3035
|
name: "",
|
|
3068
3036
|
order: "asc"
|
|
3069
3037
|
}], r(), t.emit("change", n.value);
|
|
3070
3038
|
}
|
|
3071
|
-
function d(
|
|
3039
|
+
function d(S) {
|
|
3072
3040
|
r(), t.emit("change", n.value);
|
|
3073
3041
|
}
|
|
3074
|
-
function
|
|
3075
|
-
if (
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3042
|
+
function k(S) {
|
|
3043
|
+
if (S && S.length) {
|
|
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);
|
|
3078
3046
|
}
|
|
3079
3047
|
}
|
|
3080
|
-
function
|
|
3081
|
-
return
|
|
3048
|
+
function F() {
|
|
3049
|
+
return v(me, {
|
|
3082
3050
|
style: "flex:1",
|
|
3083
3051
|
data: n.value,
|
|
3084
3052
|
draggable: !0,
|
|
3085
3053
|
view: "DraggableView",
|
|
3086
3054
|
"keep-order": !0,
|
|
3087
3055
|
itemClass: "f-order-item",
|
|
3088
|
-
onRemoveItem:
|
|
3089
|
-
onChange:
|
|
3056
|
+
onRemoveItem: m,
|
|
3057
|
+
onChange: k
|
|
3090
3058
|
}, {
|
|
3091
|
-
header: () =>
|
|
3059
|
+
header: () => v("div", {
|
|
3092
3060
|
class: "f-order-header"
|
|
3093
|
-
}, [
|
|
3061
|
+
}, [v("span", {
|
|
3094
3062
|
class: "f-order-header-order-field"
|
|
3095
|
-
}, [o.value]),
|
|
3063
|
+
}, [o.value]), v("span", {
|
|
3096
3064
|
class: "f-order-header-order-type"
|
|
3097
3065
|
}, [c.value])]),
|
|
3098
|
-
itemContent: (
|
|
3066
|
+
itemContent: (S) => v("div", {
|
|
3099
3067
|
class: "f-order-item-content"
|
|
3100
|
-
}, [
|
|
3068
|
+
}, [v(q, {
|
|
3101
3069
|
class: "f-order-item-content-order-field",
|
|
3102
|
-
data:
|
|
3070
|
+
data: g.value,
|
|
3103
3071
|
valueField: "id",
|
|
3104
3072
|
textField: "name",
|
|
3105
3073
|
idField: "id",
|
|
3106
|
-
modelValue:
|
|
3107
|
-
"onUpdate:modelValue": (
|
|
3074
|
+
modelValue: S.id,
|
|
3075
|
+
"onUpdate:modelValue": (w) => S.id = w,
|
|
3108
3076
|
onChange: d,
|
|
3109
3077
|
onClear: d
|
|
3110
|
-
}, null),
|
|
3078
|
+
}, null), v(q, {
|
|
3111
3079
|
class: "f-order-item-content-order-type",
|
|
3112
3080
|
data: u,
|
|
3113
3081
|
valueField: "id",
|
|
3114
3082
|
textField: "name",
|
|
3115
3083
|
idField: "id",
|
|
3116
|
-
modelValue:
|
|
3117
|
-
"onUpdate:modelValue": (
|
|
3084
|
+
modelValue: S.order,
|
|
3085
|
+
"onUpdate:modelValue": (w) => S.order = w,
|
|
3118
3086
|
onChange: d
|
|
3119
3087
|
}, null)]),
|
|
3120
|
-
footer: () =>
|
|
3088
|
+
footer: () => v("div", {
|
|
3121
3089
|
class: "f-order-footer"
|
|
3122
|
-
}, [
|
|
3090
|
+
}, [v(ye, {
|
|
3123
3091
|
type: "link",
|
|
3124
3092
|
class: "f-order-add-button",
|
|
3125
|
-
onClick:
|
|
3093
|
+
onClick: s
|
|
3126
3094
|
}, {
|
|
3127
|
-
default: () =>
|
|
3095
|
+
default: () => v(Q, null, [v("span", {
|
|
3128
3096
|
class: "f-order-add-icon"
|
|
3129
|
-
}, [
|
|
3097
|
+
}, [v("i", {
|
|
3130
3098
|
class: "f-icon f-icon-add"
|
|
3131
|
-
}, null)]),
|
|
3099
|
+
}, null)]), l.value])
|
|
3132
3100
|
})])
|
|
3133
3101
|
});
|
|
3134
3102
|
}
|
|
3135
|
-
return () =>
|
|
3136
|
-
ref:
|
|
3137
|
-
class:
|
|
3138
|
-
}, [
|
|
3103
|
+
return () => v("div", {
|
|
3104
|
+
ref: b,
|
|
3105
|
+
class: a.value
|
|
3106
|
+
}, [F()]);
|
|
3139
3107
|
}
|
|
3140
|
-
}),
|
|
3108
|
+
}), Dn = {
|
|
3141
3109
|
install(e) {
|
|
3142
|
-
e.component(
|
|
3110
|
+
e.component(z.name, z);
|
|
3143
3111
|
},
|
|
3144
3112
|
register(e, t, n, o) {
|
|
3145
|
-
e.order =
|
|
3113
|
+
e.order = z, t.order = ie;
|
|
3146
3114
|
},
|
|
3147
3115
|
registerDesigner(e, t, n) {
|
|
3148
|
-
e.order =
|
|
3116
|
+
e.order = vn, t.order = ie;
|
|
3149
3117
|
}
|
|
3150
3118
|
};
|
|
3151
3119
|
export {
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3120
|
+
z as FOrder,
|
|
3121
|
+
Dn as default,
|
|
3122
|
+
te as orderProps,
|
|
3123
|
+
ie as propsResolver
|
|
3156
3124
|
};
|