@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,106 +1,107 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as C, computed as B, createVNode as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { useIdentify as
|
|
1
|
+
var we = Object.defineProperty;
|
|
2
|
+
var Se = (e, t, n) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => Se(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as C, computed as B, createVNode as b, Fragment as Q, watch as N, withModifiers as ke, withDirectives as Fe, vModelText as je, defineComponent as H, inject as X, onMounted as ce, nextTick as Me } from "vue";
|
|
5
|
+
import { cloneDeep as Te } from "lodash-es";
|
|
6
|
+
import { useIdentify as Ve, useHierarchy as De, useGroupData as Oe, usePagination as Ie, useDataView as Pe, useSelection as Be, useEdit as Ae, useVisualDataBound as $e, useVisualDataCell as xe, useVisualDataRow as Le, useVisualGroupRow as Ee, useVisualSummaryRow as Ne, useVisualData as He } from "../data-view/index.esm.js";
|
|
7
7
|
import { FCheckBox as Y } from "../checkbox/index.esm.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import Re from "../list-view/index.esm.js";
|
|
9
|
+
import Ue from "../button-edit/index.esm.js";
|
|
10
|
+
import Ge from "../button-edit/index.esm.js/src/designer/button-edit.design.component";
|
|
10
11
|
import { getSchemaByType as re } from "../dynamic-resolver/index.esm.js";
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
const
|
|
12
|
+
import { useDesignerComponent as qe } from "../designer-canvas/index.esm.js";
|
|
13
|
+
const ue = {}, de = {};
|
|
13
14
|
function Z(e) {
|
|
14
|
-
const { properties: t, title: n } = e, o = Object.keys(t).reduce((
|
|
15
|
-
return o.id = `${n}-${Date.now()}
|
|
15
|
+
const { properties: t, title: n, ignore: o } = e, s = o && Array.isArray(o), c = Object.keys(t).reduce((i, p) => ((!s || !o.find((g) => g == p)) && (i[p] = t[p].type === "object" && t[p].properties ? Z(t[p]) : Te(t[p].default)), i), {});
|
|
16
|
+
return (!s || !o.find((i) => i == "id")) && (c.id = `${n}-${Date.now()}`), c;
|
|
16
17
|
}
|
|
17
|
-
function U(e, t = {}) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
let
|
|
21
|
-
const c =
|
|
22
|
-
return
|
|
18
|
+
function U(e, t = {}, n) {
|
|
19
|
+
const o = ue[e];
|
|
20
|
+
if (o) {
|
|
21
|
+
let s = Z(o);
|
|
22
|
+
const c = de[e];
|
|
23
|
+
return s = c ? c({ getSchemaByType: U }, s, t, n) : s, s;
|
|
23
24
|
}
|
|
24
25
|
return null;
|
|
25
26
|
}
|
|
26
27
|
function _e(e, t) {
|
|
27
28
|
const n = Z(t);
|
|
28
|
-
return Object.keys(e).reduce((o,
|
|
29
|
+
return Object.keys(e).reduce((o, s) => (o[s] && typeof o[s] == "object" ? Object.assign(o[s], e[s]) : o[s] = e[s], o), n), n;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
return Object.keys(e).filter((o) => e[o] != null).reduce((o,
|
|
32
|
-
if (t.has(
|
|
33
|
-
const
|
|
34
|
-
if (typeof
|
|
35
|
-
o[
|
|
31
|
+
function We(e, t) {
|
|
32
|
+
return Object.keys(e).filter((o) => e[o] != null).reduce((o, s) => {
|
|
33
|
+
if (t.has(s)) {
|
|
34
|
+
const c = t.get(s);
|
|
35
|
+
if (typeof c == "string")
|
|
36
|
+
o[c] = e[s];
|
|
36
37
|
else {
|
|
37
|
-
const
|
|
38
|
-
Object.assign(o,
|
|
38
|
+
const i = c(s, e[s], e);
|
|
39
|
+
Object.assign(o, i);
|
|
39
40
|
}
|
|
40
41
|
} else
|
|
41
|
-
o[
|
|
42
|
+
o[s] = e[s];
|
|
42
43
|
return o;
|
|
43
44
|
}, {});
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function ze(e, t, n = /* @__PURE__ */ new Map()) {
|
|
46
47
|
const o = _e(e, t);
|
|
47
|
-
return
|
|
48
|
+
return We(o, n);
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
function t(y, h,
|
|
51
|
-
if (typeof
|
|
52
|
-
return r[y].length ===
|
|
53
|
-
if (typeof
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return Number(r[y].length) !== Number(
|
|
57
|
-
if (
|
|
58
|
-
return Number(r[y].length) >= Number(
|
|
59
|
-
if (
|
|
60
|
-
return Number(r[y].length) <= Number(
|
|
50
|
+
function Je(e = {}) {
|
|
51
|
+
function t(y, h, l, r) {
|
|
52
|
+
if (typeof l == "number")
|
|
53
|
+
return r[y].length === l;
|
|
54
|
+
if (typeof l == "object") {
|
|
55
|
+
const S = Object.keys(l)[0], d = l[S];
|
|
56
|
+
if (S === "not")
|
|
57
|
+
return Number(r[y].length) !== Number(d);
|
|
58
|
+
if (S === "moreThan")
|
|
59
|
+
return Number(r[y].length) >= Number(d);
|
|
60
|
+
if (S === "lessThan")
|
|
61
|
+
return Number(r[y].length) <= Number(d);
|
|
61
62
|
}
|
|
62
63
|
return !1;
|
|
63
64
|
}
|
|
64
|
-
function n(y, h,
|
|
65
|
-
return r[y] && r[y].propertyValue && String(r[y].propertyValue.value) === String(
|
|
65
|
+
function n(y, h, l, r) {
|
|
66
|
+
return r[y] && r[y].propertyValue && String(r[y].propertyValue.value) === String(l);
|
|
66
67
|
}
|
|
67
68
|
const o = /* @__PURE__ */ new Map([
|
|
68
69
|
["length", t],
|
|
69
70
|
["getProperty", n]
|
|
70
71
|
]);
|
|
71
72
|
Object.keys(e).reduce((y, h) => (y.set(h, e[h]), y), o);
|
|
72
|
-
function
|
|
73
|
-
const
|
|
74
|
-
return typeof h == "number" ? [{ target:
|
|
73
|
+
function s(y, h) {
|
|
74
|
+
const l = y;
|
|
75
|
+
return typeof h == "number" ? [{ target: l, operator: "length", param: null, value: Number(h) }] : typeof h == "boolean" ? [{ target: l, operator: "getProperty", param: y, value: !!h }] : typeof h == "object" ? Object.keys(h).map((r) => {
|
|
75
76
|
if (r === "length")
|
|
76
|
-
return { target:
|
|
77
|
-
const
|
|
78
|
-
return { target:
|
|
77
|
+
return { target: l, operator: "length", param: null, value: h[r] };
|
|
78
|
+
const S = r, d = h[r];
|
|
79
|
+
return { target: l, operator: "getProperty", param: S, value: d };
|
|
79
80
|
}) : [];
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
return Object.keys(y).reduce((
|
|
83
|
-
const
|
|
84
|
-
return
|
|
82
|
+
function c(y) {
|
|
83
|
+
return Object.keys(y).reduce((l, r) => {
|
|
84
|
+
const S = s(r, y[r]);
|
|
85
|
+
return l.push(...S), l;
|
|
85
86
|
}, []);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function i(y, h) {
|
|
88
89
|
if (o.has(y.operator)) {
|
|
89
|
-
const
|
|
90
|
-
return
|
|
90
|
+
const l = o.get(y.operator);
|
|
91
|
+
return l && l(y.target, y.param, y.value, h) || !1;
|
|
91
92
|
}
|
|
92
93
|
return !1;
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
95
|
+
function p(y, h) {
|
|
96
|
+
return c(y).reduce((S, d) => S && i(d, h), !0);
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
-
const
|
|
99
|
-
return r ? !
|
|
98
|
+
function g(y, h) {
|
|
99
|
+
const l = Object.keys(y), r = l.includes("allOf"), S = l.includes("anyOf"), d = r || S, u = (d ? y[d ? r ? "allOf" : "anyOf" : "allOf"] : [y]).map((F) => p(F, h));
|
|
100
|
+
return r ? !u.includes(!1) : u.includes(!0);
|
|
100
101
|
}
|
|
101
|
-
return { parseValueSchema:
|
|
102
|
+
return { parseValueSchema: g };
|
|
102
103
|
}
|
|
103
|
-
const
|
|
104
|
+
const T = {
|
|
104
105
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
105
106
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
106
107
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -138,20 +139,20 @@ const j = {
|
|
|
138
139
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
139
140
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
140
141
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
function K(e, t, n = /* @__PURE__ */ new Map(), o = (
|
|
144
|
-
return
|
|
145
|
-
const
|
|
146
|
-
return Object.assign(
|
|
142
|
+
}, Xe = {}, Qe = {};
|
|
143
|
+
Je();
|
|
144
|
+
function K(e, t, n = /* @__PURE__ */ new Map(), o = (i, p, g) => p, s = {}, c = (i) => i) {
|
|
145
|
+
return ue[t.title] = t, de[t.title] = o, Xe[t.title] = s, Qe[t.title] = c, (i = {}) => {
|
|
146
|
+
const p = ze(i, t, n), g = Object.keys(e).reduce((y, h) => (y[h] = e[h].default, y), {});
|
|
147
|
+
return Object.assign(g, p);
|
|
147
148
|
};
|
|
148
149
|
}
|
|
149
150
|
function ee(e, t) {
|
|
150
151
|
return { customClass: t.class, customStyle: t.style };
|
|
151
152
|
}
|
|
152
|
-
const
|
|
153
|
+
const Ye = /* @__PURE__ */ new Map([
|
|
153
154
|
["appearance", ee]
|
|
154
|
-
]),
|
|
155
|
+
]), Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/order.schema.json", et = "order", tt = "A Farris Component", nt = "object", ot = {
|
|
155
156
|
id: {
|
|
156
157
|
description: "The unique identifier for a order",
|
|
157
158
|
type: "string"
|
|
@@ -243,22 +244,22 @@ const Qe = /* @__PURE__ */ new Map([
|
|
|
243
244
|
type: "sting",
|
|
244
245
|
default: ""
|
|
245
246
|
}
|
|
246
|
-
},
|
|
247
|
+
}, at = [
|
|
247
248
|
"id",
|
|
248
249
|
"type"
|
|
249
|
-
],
|
|
250
|
-
$schema:
|
|
251
|
-
$id:
|
|
252
|
-
title:
|
|
253
|
-
description:
|
|
254
|
-
type:
|
|
255
|
-
properties:
|
|
256
|
-
required:
|
|
250
|
+
], rt = {
|
|
251
|
+
$schema: Ze,
|
|
252
|
+
$id: Ke,
|
|
253
|
+
title: et,
|
|
254
|
+
description: tt,
|
|
255
|
+
type: nt,
|
|
256
|
+
properties: ot,
|
|
257
|
+
required: at
|
|
257
258
|
};
|
|
258
|
-
function
|
|
259
|
+
function it(e, t, n) {
|
|
259
260
|
return t;
|
|
260
261
|
}
|
|
261
|
-
const
|
|
262
|
+
const lt = "order", st = "A Farris Component", ct = "object", ut = {
|
|
262
263
|
basic: {
|
|
263
264
|
description: "Basic Infomation",
|
|
264
265
|
title: "基本信息",
|
|
@@ -340,11 +341,11 @@ const it = "order", lt = "A Farris Component", st = "object", ct = {
|
|
|
340
341
|
}
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
|
-
},
|
|
344
|
-
title:
|
|
345
|
-
description:
|
|
346
|
-
type:
|
|
347
|
-
categories:
|
|
344
|
+
}, dt = {
|
|
345
|
+
title: lt,
|
|
346
|
+
description: st,
|
|
347
|
+
type: ct,
|
|
348
|
+
categories: ut
|
|
348
349
|
}, te = {
|
|
349
350
|
dataSource: {
|
|
350
351
|
type: Array,
|
|
@@ -364,13 +365,13 @@ const it = "order", lt = "A Farris Component", st = "object", ct = {
|
|
|
364
365
|
{ id: "3", name: "开票日期", order: "asc" }
|
|
365
366
|
]
|
|
366
367
|
}
|
|
367
|
-
}, ie = K(te,
|
|
368
|
+
}, ie = K(te, rt, Ye, it, dt), pt = /* @__PURE__ */ new Map([
|
|
368
369
|
["appearance", ee]
|
|
369
370
|
]);
|
|
370
|
-
function
|
|
371
|
+
function ft(e, t, n) {
|
|
371
372
|
return t;
|
|
372
373
|
}
|
|
373
|
-
const
|
|
374
|
+
const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-design.gitee.io/list-view.schema.json", gt = "list-view", ht = "A Farris Component", bt = "object", vt = {
|
|
374
375
|
id: {
|
|
375
376
|
description: "The unique identifier for list-view",
|
|
376
377
|
type: "string"
|
|
@@ -432,18 +433,18 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
|
|
|
432
433
|
type: "boolean",
|
|
433
434
|
default: !0
|
|
434
435
|
}
|
|
435
|
-
},
|
|
436
|
+
}, Ct = [
|
|
436
437
|
"id",
|
|
437
438
|
"type"
|
|
438
|
-
],
|
|
439
|
-
$schema:
|
|
440
|
-
$id:
|
|
441
|
-
title:
|
|
442
|
-
description:
|
|
443
|
-
type:
|
|
444
|
-
properties:
|
|
445
|
-
required:
|
|
446
|
-
},
|
|
439
|
+
], wt = {
|
|
440
|
+
$schema: mt,
|
|
441
|
+
$id: yt,
|
|
442
|
+
title: gt,
|
|
443
|
+
description: ht,
|
|
444
|
+
type: bt,
|
|
445
|
+
properties: vt,
|
|
446
|
+
required: Ct
|
|
447
|
+
}, St = "list-view", kt = "A Farris Component", Ft = "object", jt = {
|
|
447
448
|
basic: {
|
|
448
449
|
description: "Basic Infomation",
|
|
449
450
|
title: "基本信息",
|
|
@@ -465,12 +466,12 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
|
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
468
|
}
|
|
468
|
-
},
|
|
469
|
-
title:
|
|
470
|
-
description:
|
|
471
|
-
type:
|
|
472
|
-
categories:
|
|
473
|
-
},
|
|
469
|
+
}, Mt = {
|
|
470
|
+
title: St,
|
|
471
|
+
description: kt,
|
|
472
|
+
type: Ft,
|
|
473
|
+
categories: jt
|
|
474
|
+
}, pe = {
|
|
474
475
|
/** 列集合 */
|
|
475
476
|
columns: {
|
|
476
477
|
type: Array,
|
|
@@ -512,197 +513,200 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
|
|
|
512
513
|
// 搜索启用高亮
|
|
513
514
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
514
515
|
};
|
|
515
|
-
K(
|
|
516
|
-
function
|
|
517
|
-
function n(
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
for (;
|
|
521
|
-
|
|
522
|
-
return
|
|
523
|
-
}
|
|
524
|
-
function o(
|
|
525
|
-
const
|
|
526
|
-
return n(
|
|
527
|
-
const
|
|
528
|
-
let
|
|
529
|
-
for (;
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
516
|
+
K(pe, wt, pt, ft, Mt);
|
|
517
|
+
function Tt(e, t) {
|
|
518
|
+
function n(c) {
|
|
519
|
+
const i = [];
|
|
520
|
+
let p = c.nextNode();
|
|
521
|
+
for (; p; )
|
|
522
|
+
i.push(p), p = c.nextNode();
|
|
523
|
+
return i;
|
|
524
|
+
}
|
|
525
|
+
function o(c, i) {
|
|
526
|
+
const p = document.createTreeWalker(c, NodeFilter.SHOW_TEXT);
|
|
527
|
+
return n(p).map((l) => ({ textNode: l, text: (l.textContent || "").toLocaleLowerCase() })).map(({ textNode: l, text: r }) => {
|
|
528
|
+
const S = [];
|
|
529
|
+
let d = 0;
|
|
530
|
+
for (; d < r.length; ) {
|
|
531
|
+
const f = r.indexOf(i, d);
|
|
532
|
+
if (f === -1)
|
|
532
533
|
break;
|
|
533
|
-
|
|
534
|
+
S.push(f), d = f + i.length;
|
|
534
535
|
}
|
|
535
|
-
return
|
|
536
|
-
const
|
|
537
|
-
return
|
|
536
|
+
return S.map((f) => {
|
|
537
|
+
const a = new Range();
|
|
538
|
+
return a.setStart(l, f), a.setEnd(l, f + i.length), a;
|
|
538
539
|
});
|
|
539
540
|
}).flat();
|
|
540
541
|
}
|
|
541
|
-
function c
|
|
542
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
542
|
+
function s(c) {
|
|
543
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !c || !t))
|
|
543
544
|
return;
|
|
544
|
-
const
|
|
545
|
-
CSS.highlights.set("search-result",
|
|
545
|
+
const i = o(t.value, c.toLocaleLowerCase()), p = new Highlight(...i);
|
|
546
|
+
CSS.highlights.set("search-result", p);
|
|
546
547
|
}
|
|
547
|
-
return { search:
|
|
548
|
+
return { search: s };
|
|
548
549
|
}
|
|
549
|
-
function le(e, t, n, o,
|
|
550
|
-
const h = C(e.size),
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
550
|
+
function le(e, t, n, o, s, c, i, p, g, y) {
|
|
551
|
+
const h = C(e.size), l = C(e.textField), r = C(e.titleField), S = C(e.disableField), d = B(() => {
|
|
552
|
+
var m, M;
|
|
553
|
+
return ((m = e.selection) == null ? void 0 : m.multiSelect) && ((M = e.selection) == null ? void 0 : M.showCheckbox);
|
|
554
|
+
}), {
|
|
555
|
+
onMouseenterItem: f,
|
|
556
|
+
onMouseoverItem: a,
|
|
557
|
+
onMouseoutItem: u
|
|
558
|
+
} = c, {
|
|
555
559
|
getKey: k,
|
|
556
560
|
listViewItemClass: F,
|
|
557
|
-
onCheckItem:
|
|
558
|
-
onClickItem:
|
|
559
|
-
} =
|
|
561
|
+
onCheckItem: V,
|
|
562
|
+
onClickItem: w
|
|
563
|
+
} = i, v = B(() => ({
|
|
560
564
|
margin: h.value === "small" ? "0.25rem 0" : "10px 0"
|
|
561
565
|
}));
|
|
562
|
-
function
|
|
563
|
-
return
|
|
564
|
-
class: F(
|
|
565
|
-
id: k(
|
|
566
|
-
key: k(
|
|
567
|
-
onClick: (
|
|
568
|
-
onMouseenter: (
|
|
569
|
-
onMouseover: (
|
|
570
|
-
onMouseout: (
|
|
571
|
-
}, [
|
|
566
|
+
function D(m, M, A) {
|
|
567
|
+
return m.checked = p.findIndexInSelectedItems(m) > -1, b("li", {
|
|
568
|
+
class: F(m, M),
|
|
569
|
+
id: k(m, M),
|
|
570
|
+
key: k(m, M),
|
|
571
|
+
onClick: (j) => w(j, m, M),
|
|
572
|
+
onMouseenter: (j) => f(j, m, M),
|
|
573
|
+
onMouseover: (j) => a(j, m, M),
|
|
574
|
+
onMouseout: (j) => u(j, m, M)
|
|
575
|
+
}, [d.value && b("div", {
|
|
572
576
|
class: "f-list-select",
|
|
573
|
-
onClick: (
|
|
574
|
-
}, [
|
|
575
|
-
id: "list-" + k(
|
|
577
|
+
onClick: (j) => j.stopPropagation()
|
|
578
|
+
}, [b(Y, {
|
|
579
|
+
id: "list-" + k(m, M),
|
|
576
580
|
customClass: "listview-checkbox",
|
|
577
|
-
disabled:
|
|
578
|
-
checked:
|
|
579
|
-
"onUpdate:checked": (
|
|
580
|
-
onChange: (
|
|
581
|
-
|
|
581
|
+
disabled: m[S.value],
|
|
582
|
+
checked: m.checked,
|
|
583
|
+
"onUpdate:checked": (j) => m.checked = j,
|
|
584
|
+
onChange: (j) => {
|
|
585
|
+
V(m, M, !j.checked);
|
|
582
586
|
}
|
|
583
|
-
}, null)]),
|
|
587
|
+
}, null)]), b("div", {
|
|
584
588
|
class: "f-list-content"
|
|
585
|
-
}, [
|
|
586
|
-
style:
|
|
587
|
-
title:
|
|
588
|
-
}, [
|
|
589
|
+
}, [b("div", {
|
|
590
|
+
style: v.value,
|
|
591
|
+
title: m.raw[r.value] || m.raw[l.value]
|
|
592
|
+
}, [m.raw[l.value]])])]);
|
|
589
593
|
}
|
|
590
594
|
return {
|
|
591
|
-
renderItem:
|
|
595
|
+
renderItem: D
|
|
592
596
|
};
|
|
593
597
|
}
|
|
594
|
-
function
|
|
595
|
-
const h = C(e.multiSelect),
|
|
598
|
+
function Vt(e, t, n, o, s, c, i, p, g, y) {
|
|
599
|
+
const h = C(e.multiSelect), l = C(e.disableField), {
|
|
596
600
|
onMouseenterItem: r,
|
|
597
|
-
onMouseoverItem:
|
|
598
|
-
onMouseoutItem:
|
|
599
|
-
} =
|
|
600
|
-
getKey:
|
|
601
|
-
listViewItemClass:
|
|
602
|
-
onCheckItem:
|
|
601
|
+
onMouseoverItem: S,
|
|
602
|
+
onMouseoutItem: d
|
|
603
|
+
} = c, {
|
|
604
|
+
getKey: f,
|
|
605
|
+
listViewItemClass: a,
|
|
606
|
+
onCheckItem: u,
|
|
603
607
|
onClickItem: k
|
|
604
|
-
} =
|
|
605
|
-
function F(
|
|
606
|
-
return t.slots.content ?
|
|
607
|
-
item:
|
|
608
|
-
index:
|
|
609
|
-
selectedItem:
|
|
610
|
-
})]) :
|
|
608
|
+
} = i;
|
|
609
|
+
function F(w, v, D) {
|
|
610
|
+
return t.slots.content ? b(Q, null, [t.slots.content && t.slots.content({
|
|
611
|
+
item: w.raw,
|
|
612
|
+
index: v,
|
|
613
|
+
selectedItem: D
|
|
614
|
+
})]) : b("div", {
|
|
611
615
|
style: "margin: 10px 0;"
|
|
612
|
-
}, [
|
|
613
|
-
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
616
|
-
class:
|
|
617
|
-
id:
|
|
618
|
-
key:
|
|
619
|
-
onClick: (
|
|
620
|
-
onMouseenter: (
|
|
621
|
-
onMouseover: (
|
|
622
|
-
onMouseout: (
|
|
623
|
-
}, [h.value &&
|
|
616
|
+
}, [w.raw.name]);
|
|
617
|
+
}
|
|
618
|
+
function V(w, v, D) {
|
|
619
|
+
return b("li", {
|
|
620
|
+
class: a(w, v),
|
|
621
|
+
id: f(w, v),
|
|
622
|
+
key: f(w, v),
|
|
623
|
+
onClick: (m) => k(m, w, v),
|
|
624
|
+
onMouseenter: (m) => r(m, w, v),
|
|
625
|
+
onMouseover: (m) => S(m, w, v),
|
|
626
|
+
onMouseout: (m) => d(m, w, v)
|
|
627
|
+
}, [h.value && b("div", {
|
|
624
628
|
class: "f-list-select",
|
|
625
|
-
onClick: (
|
|
626
|
-
}, [
|
|
627
|
-
id: "list-" +
|
|
629
|
+
onClick: (m) => m.stopPropagation()
|
|
630
|
+
}, [b(Y, {
|
|
631
|
+
id: "list-" + f(w, v),
|
|
628
632
|
customClass: "listview-checkbox",
|
|
629
|
-
disabled:
|
|
630
|
-
checked:
|
|
631
|
-
"onUpdate:checked": (
|
|
632
|
-
onChange: (
|
|
633
|
-
}, null)]),
|
|
633
|
+
disabled: w[l.value] || !w.checked,
|
|
634
|
+
checked: w.checked,
|
|
635
|
+
"onUpdate:checked": (m) => w.checked = m,
|
|
636
|
+
onChange: (m) => u(w, v, !m.checked)
|
|
637
|
+
}, null)]), b("div", {
|
|
634
638
|
class: "f-list-content"
|
|
635
|
-
}, [F(
|
|
639
|
+
}, [F(w, v, D)])]);
|
|
636
640
|
}
|
|
637
641
|
return {
|
|
638
|
-
renderItem:
|
|
642
|
+
renderItem: V
|
|
639
643
|
};
|
|
640
644
|
}
|
|
641
|
-
function
|
|
642
|
-
const h = C(e.multiSelect),
|
|
645
|
+
function Dt(e, t, n, o, s, c, i, p, g, y) {
|
|
646
|
+
const h = C(e.multiSelect), l = C(e.disableField), {
|
|
643
647
|
onMouseenterItem: r,
|
|
644
|
-
onMouseoverItem:
|
|
645
|
-
onMouseoutItem:
|
|
646
|
-
} =
|
|
647
|
-
getKey:
|
|
648
|
-
listViewItemClass:
|
|
649
|
-
onCheckItem:
|
|
648
|
+
onMouseoverItem: S,
|
|
649
|
+
onMouseoutItem: d
|
|
650
|
+
} = c, {
|
|
651
|
+
getKey: f,
|
|
652
|
+
listViewItemClass: a,
|
|
653
|
+
onCheckItem: u,
|
|
650
654
|
onClickItem: k
|
|
651
|
-
} =
|
|
655
|
+
} = i, {
|
|
652
656
|
dragstart: F,
|
|
653
|
-
dragenter:
|
|
654
|
-
dragover:
|
|
655
|
-
dragend:
|
|
657
|
+
dragenter: V,
|
|
658
|
+
dragover: w,
|
|
659
|
+
dragend: v
|
|
656
660
|
} = o, {
|
|
657
|
-
removeItem:
|
|
658
|
-
} =
|
|
661
|
+
removeItem: D
|
|
662
|
+
} = g, m = B(() => ({
|
|
659
663
|
margin: h.value ? "10px 0" : "10px 0px 10px 14px"
|
|
660
664
|
}));
|
|
661
665
|
function M(O) {
|
|
662
|
-
return
|
|
663
|
-
style:
|
|
666
|
+
return b("div", {
|
|
667
|
+
style: m.value
|
|
664
668
|
}, [O.raw.name]);
|
|
665
669
|
}
|
|
666
670
|
function A() {
|
|
667
671
|
return t.slots.itemContent ? t.slots.itemContent : M;
|
|
668
672
|
}
|
|
669
|
-
const
|
|
670
|
-
function $(O, P,
|
|
671
|
-
return
|
|
672
|
-
class:
|
|
673
|
-
id:
|
|
674
|
-
key:
|
|
673
|
+
const j = A();
|
|
674
|
+
function $(O, P, x) {
|
|
675
|
+
return b("li", {
|
|
676
|
+
class: a(O, P),
|
|
677
|
+
id: f(O, P),
|
|
678
|
+
key: f(O, P),
|
|
675
679
|
onClick: (I) => k(I, O, P),
|
|
676
680
|
onMouseenter: (I) => r(I, O, P),
|
|
677
|
-
onMouseover: (I) =>
|
|
678
|
-
onMouseout: (I) =>
|
|
681
|
+
onMouseover: (I) => S(I, O, P),
|
|
682
|
+
onMouseout: (I) => d(I, O, P),
|
|
679
683
|
draggable: "true",
|
|
680
684
|
onDragstart: (I) => F(I, O, P),
|
|
681
|
-
onDragenter: (I) =>
|
|
682
|
-
onDragend: (I) =>
|
|
683
|
-
onDragover: (I) =>
|
|
684
|
-
}, [h.value &&
|
|
685
|
+
onDragenter: (I) => V(I, P),
|
|
686
|
+
onDragend: (I) => v(I, O),
|
|
687
|
+
onDragover: (I) => w(I, P)
|
|
688
|
+
}, [h.value && b("div", {
|
|
685
689
|
class: "f-list-select",
|
|
686
690
|
onClick: (I) => I.stopPropagation()
|
|
687
|
-
}, [
|
|
688
|
-
id: "list-" +
|
|
691
|
+
}, [b(Y, {
|
|
692
|
+
id: "list-" + f(O, P),
|
|
689
693
|
customClass: "listview-checkbox",
|
|
690
|
-
disabled: O[
|
|
694
|
+
disabled: O[l.value] || !O.checked,
|
|
691
695
|
checked: O.checked,
|
|
692
696
|
"onUpdate:checked": (I) => O.checked = I,
|
|
693
|
-
onChange: (I) =>
|
|
694
|
-
}, null)]),
|
|
697
|
+
onChange: (I) => u(O, P, !I.checked)
|
|
698
|
+
}, null)]), b("div", {
|
|
695
699
|
class: "f-list-content"
|
|
696
|
-
}, [
|
|
700
|
+
}, [j(O)]), b("div", {
|
|
697
701
|
class: "f-list-remove",
|
|
698
|
-
onClick: (I) =>
|
|
699
|
-
}, [
|
|
702
|
+
onClick: (I) => D(P)
|
|
703
|
+
}, [b("div", {
|
|
700
704
|
class: "f-list-remove-icon"
|
|
701
|
-
}, [
|
|
705
|
+
}, [b("i", {
|
|
702
706
|
class: "f-icon f-icon-remove_face"
|
|
703
|
-
}, null)])]),
|
|
707
|
+
}, null)])]), b("div", {
|
|
704
708
|
class: "f-list-handle"
|
|
705
|
-
}, [
|
|
709
|
+
}, [b("div", null, [b("i", {
|
|
706
710
|
class: "f-icon f-icon-drag-vertical"
|
|
707
711
|
}, null)])])]);
|
|
708
712
|
}
|
|
@@ -710,174 +714,180 @@ function Vt(e, t, n, o, c, l, u, f, b, y) {
|
|
|
710
714
|
renderItem: $
|
|
711
715
|
};
|
|
712
716
|
}
|
|
713
|
-
function
|
|
714
|
-
var
|
|
715
|
-
const h = C(((
|
|
716
|
-
collpaseGroupIconClass:
|
|
717
|
-
} =
|
|
717
|
+
function Ot(e, t, n, o, s, c, i, p, g, y) {
|
|
718
|
+
var f;
|
|
719
|
+
const h = C(((f = e.group) == null ? void 0 : f.groupFields) || []), {
|
|
720
|
+
collpaseGroupIconClass: l
|
|
721
|
+
} = s, {
|
|
718
722
|
toggleGroupRow: r
|
|
719
723
|
} = y;
|
|
720
|
-
function
|
|
721
|
-
|
|
724
|
+
function S(a, u) {
|
|
725
|
+
u.collapse = !u.collapse, n.value = r(u.collapse ? "collapse" : "expand", u, n.value);
|
|
722
726
|
}
|
|
723
|
-
function a
|
|
724
|
-
return
|
|
727
|
+
function d(a, u, k) {
|
|
728
|
+
return a.layer > -1 && b("div", {
|
|
725
729
|
class: "f-navlookup-recentHeader",
|
|
726
|
-
onClick: (F) =>
|
|
727
|
-
}, [
|
|
730
|
+
onClick: (F) => S(F, a)
|
|
731
|
+
}, [b("div", {
|
|
728
732
|
class: "fv-grid-group-row-icon"
|
|
729
|
-
}, [
|
|
730
|
-
class:
|
|
731
|
-
}, null)]),
|
|
733
|
+
}, [b("span", {
|
|
734
|
+
class: l(a)
|
|
735
|
+
}, null)]), b("div", {
|
|
732
736
|
class: "f-navlookup-recommandLabel"
|
|
733
|
-
}, [
|
|
737
|
+
}, [a.raw[h.value[a.layer]]])]);
|
|
734
738
|
}
|
|
735
739
|
return {
|
|
736
|
-
renderItem:
|
|
740
|
+
renderItem: d
|
|
737
741
|
};
|
|
738
742
|
}
|
|
739
|
-
function
|
|
743
|
+
function It() {
|
|
740
744
|
const e = C(-1), t = C(""), n = C(-1), o = C(!1);
|
|
741
|
-
function
|
|
742
|
-
n.value =
|
|
745
|
+
function s(y, h, l) {
|
|
746
|
+
n.value = l;
|
|
743
747
|
}
|
|
744
|
-
function
|
|
745
|
-
o.value || (n.value =
|
|
748
|
+
function c(y, h, l) {
|
|
749
|
+
o.value || (n.value = l);
|
|
746
750
|
}
|
|
747
|
-
function
|
|
751
|
+
function i(y, h, l) {
|
|
748
752
|
n.value = -1;
|
|
749
753
|
}
|
|
750
|
-
function
|
|
754
|
+
function p() {
|
|
751
755
|
o.value = !0;
|
|
752
756
|
}
|
|
753
|
-
function
|
|
757
|
+
function g() {
|
|
754
758
|
o.value = !1;
|
|
755
759
|
}
|
|
756
760
|
return {
|
|
757
761
|
activeIndex: e,
|
|
758
762
|
focusedItemId: t,
|
|
759
763
|
hoverIndex: n,
|
|
760
|
-
onMouseenterItem:
|
|
761
|
-
onMouseoverItem:
|
|
762
|
-
onMouseoutItem:
|
|
763
|
-
resumeHover:
|
|
764
|
-
suspendHover:
|
|
764
|
+
onMouseenterItem: s,
|
|
765
|
+
onMouseoverItem: c,
|
|
766
|
+
onMouseoutItem: i,
|
|
767
|
+
resumeHover: g,
|
|
768
|
+
suspendHover: p
|
|
765
769
|
};
|
|
766
770
|
}
|
|
767
|
-
function
|
|
768
|
-
const
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
|
|
771
|
+
function Pt(e, t, n, o) {
|
|
772
|
+
const s = C(e.idField), { dataView: c } = n, i = C(-1), p = C(!1), { activeIndex: g, focusedItemId: y, hoverIndex: h, resumeHover: l, suspendHover: r } = o;
|
|
773
|
+
function S(u, k, F) {
|
|
774
|
+
u.stopPropagation(), r(), k && setTimeout(() => {
|
|
775
|
+
i.value = F, p.value = !0, k.moving = !0;
|
|
772
776
|
});
|
|
773
777
|
}
|
|
774
|
-
function
|
|
775
|
-
if (
|
|
776
|
-
const F =
|
|
777
|
-
|
|
778
|
+
function d(u, k) {
|
|
779
|
+
if (u.preventDefault(), i.value !== k) {
|
|
780
|
+
const F = c.value[i.value], V = c.value;
|
|
781
|
+
V.splice(i.value, 1), V.splice(k, 0, F), i.value = k;
|
|
778
782
|
}
|
|
779
783
|
}
|
|
780
|
-
function
|
|
781
|
-
|
|
784
|
+
function f(u, k) {
|
|
785
|
+
u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
|
|
782
786
|
}
|
|
783
|
-
function
|
|
784
|
-
k && (k.moving = !1),
|
|
785
|
-
F.__fv_index__ =
|
|
786
|
-
}),
|
|
787
|
+
function a(u, k) {
|
|
788
|
+
k && (k.moving = !1), c.value.forEach((F, V) => {
|
|
789
|
+
F.__fv_index__ = V;
|
|
790
|
+
}), p.value = !1, l(), h.value = k.raw.__fv_index__, g.value = k.raw.__fv_index__, y.value = k.raw[s.value], t.emit("change", c.value), t.emit("activeChange", k);
|
|
787
791
|
}
|
|
788
792
|
return {
|
|
789
|
-
dragstart:
|
|
790
|
-
dragenter:
|
|
791
|
-
dragover:
|
|
792
|
-
dragend:
|
|
793
|
-
isDragging:
|
|
793
|
+
dragstart: S,
|
|
794
|
+
dragenter: d,
|
|
795
|
+
dragover: f,
|
|
796
|
+
dragend: a,
|
|
797
|
+
isDragging: p
|
|
794
798
|
};
|
|
795
799
|
}
|
|
796
|
-
function
|
|
800
|
+
function Bt(e, t, n) {
|
|
797
801
|
const { dataView: o } = n;
|
|
798
|
-
function c
|
|
799
|
-
if (
|
|
800
|
-
const
|
|
801
|
-
t.emit("removeItem",
|
|
802
|
+
function s(c) {
|
|
803
|
+
if (c > -1 && c < o.value.length) {
|
|
804
|
+
const i = o.value.splice(c, 1);
|
|
805
|
+
t.emit("removeItem", i[0]);
|
|
802
806
|
}
|
|
803
807
|
}
|
|
804
|
-
return { removeItem:
|
|
808
|
+
return { removeItem: s };
|
|
805
809
|
}
|
|
806
|
-
function
|
|
807
|
-
const
|
|
808
|
-
|
|
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, $) {
|
|
810
|
+
function At(e, t, n, o, s, c) {
|
|
811
|
+
const i = C(e.idField), p = C(e.disableField), g = C(e.draggable), y = C(e.itemClass), h = C(e.selection.multiSelect ?? !1), l = C(e.selection.multiSelectMode), { isDragging: r } = o, { activeIndex: S, focusedItemId: d, hoverIndex: f } = s, { clearSelection: a, getSelectedItems: u, toggleSelectItem: k } = c, F = C(u());
|
|
812
|
+
function V(j, $) {
|
|
811
813
|
const O = {
|
|
814
|
+
"f-listview-item": !0,
|
|
812
815
|
"f-list-view-group-item": !0,
|
|
813
|
-
"f-list-view-draggable-item":
|
|
814
|
-
"f-un-click": !
|
|
815
|
-
"f-un-select": !!
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
"f-list-view-draggable-item": g.value,
|
|
817
|
+
"f-un-click": !j.checked,
|
|
818
|
+
"f-un-select": !!j.raw[p.value],
|
|
819
|
+
// 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
|
|
820
|
+
// 多选
|
|
821
|
+
"f-listview-active": F.value.findIndex(
|
|
822
|
+
(x) => x[i.value] === j.raw[i.value]
|
|
823
|
+
) > -1,
|
|
824
|
+
"f-listview-item-active": F.value.findIndex(
|
|
825
|
+
(x) => x[i.value] === j.raw[i.value]
|
|
826
|
+
) > -1,
|
|
827
|
+
"f-listview-hover": !r.value && $ === f.value,
|
|
828
|
+
moving: !!j.moving
|
|
819
829
|
};
|
|
820
|
-
return y.value.split(" ").reduce((
|
|
830
|
+
return y.value.split(" ").reduce((x, I) => (x[I] = !0, x), O), O;
|
|
821
831
|
}
|
|
822
|
-
function
|
|
823
|
-
return
|
|
832
|
+
function w(j, $) {
|
|
833
|
+
return j.raw[i.value] || "";
|
|
824
834
|
}
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
|
|
835
|
+
const v = B(() => !h.value);
|
|
836
|
+
function D(j, $, O) {
|
|
837
|
+
j.checked = O, !j.raw[p.value] && (v.value && (d.value = j.raw[i.value]), k(j));
|
|
828
838
|
}
|
|
829
|
-
const
|
|
830
|
-
function A(
|
|
831
|
-
if ($.raw[
|
|
832
|
-
|
|
839
|
+
const m = B(() => h.value && l.value === "OnCheckClearByClick"), M = B(() => !h.value || h.value && (l.value === "OnCheckAndClick" || l.value === "OnClick"));
|
|
840
|
+
function A(j, $, O) {
|
|
841
|
+
if ($.raw[p.value]) {
|
|
842
|
+
j.preventDefault(), j.stopPropagation();
|
|
833
843
|
return;
|
|
834
844
|
}
|
|
835
|
-
|
|
845
|
+
d.value = $.raw[i.value], S.value = O, m.value && a(n.value), M.value && (k($), F.value = u()), t.emit("clickItem", { data: F.value, index: O }), t.emit("activeChange", F.value);
|
|
836
846
|
}
|
|
837
847
|
return {
|
|
838
|
-
getKey:
|
|
839
|
-
listViewItemClass:
|
|
840
|
-
onCheckItem:
|
|
848
|
+
getKey: w,
|
|
849
|
+
listViewItemClass: V,
|
|
850
|
+
onCheckItem: D,
|
|
841
851
|
onClickItem: A
|
|
842
852
|
};
|
|
843
853
|
}
|
|
844
|
-
function
|
|
845
|
-
const
|
|
854
|
+
function $t(e, t, n, o, s, c, i) {
|
|
855
|
+
const p = C(e.view), g = C(e.view === "CardView"), y = C({}), h = C("暂无数据"), l = It(), r = Pt(e, t, o, l), S = Bt(e, t, o), d = At(e, t, n, r, l, c), f = B(() => ({
|
|
846
856
|
"f-list-view-group": !0,
|
|
847
|
-
"d-flex":
|
|
848
|
-
"flex-wrap":
|
|
849
|
-
})),
|
|
857
|
+
"d-flex": g.value,
|
|
858
|
+
"flex-wrap": g.value
|
|
859
|
+
})), a = B(() => !!n.value && n.value.length > 0), u = B(() => n.value.length === 0), k = B(() => u.value && !t.slots.empty);
|
|
850
860
|
function F() {
|
|
851
|
-
return
|
|
861
|
+
return p.value === "SingleView" ? le : p.value === "DraggableView" ? Dt : (p.value === "ContentView" || p.value === "CardView") && t.slots.content ? Vt : le;
|
|
852
862
|
}
|
|
853
|
-
const
|
|
854
|
-
renderItem: S
|
|
855
|
-
} = D(e, t, n, r, c, i, a, l, g, u), {
|
|
863
|
+
const V = F(), {
|
|
856
864
|
renderItem: w
|
|
857
|
-
} =
|
|
858
|
-
|
|
859
|
-
|
|
865
|
+
} = V(e, t, n, r, s, l, d, c, S, i), {
|
|
866
|
+
renderItem: v
|
|
867
|
+
} = Ot(e, t, n, r, s, l, d, c, S, i), D = [w, v];
|
|
868
|
+
function m() {
|
|
869
|
+
return n.value.filter((j) => j.visible !== !1).map((j, $) => D[j.type](j, $, y));
|
|
860
870
|
}
|
|
861
871
|
function M() {
|
|
862
|
-
return
|
|
872
|
+
return b("div", {
|
|
863
873
|
class: "f-list-view-emptydata"
|
|
864
|
-
}, [
|
|
874
|
+
}, [b("p", {
|
|
865
875
|
class: "f-empty-title"
|
|
866
876
|
}, [h.value])]);
|
|
867
877
|
}
|
|
868
878
|
function A() {
|
|
869
|
-
return
|
|
870
|
-
class:
|
|
879
|
+
return b("ul", {
|
|
880
|
+
class: f.value,
|
|
871
881
|
style: "list-style: none;"
|
|
872
|
-
}, [
|
|
882
|
+
}, [a.value && m(), k.value && M(), t.slots.empty && t.slots.empty()]);
|
|
873
883
|
}
|
|
874
884
|
return {
|
|
875
885
|
renderListArea: A
|
|
876
886
|
};
|
|
877
887
|
}
|
|
878
|
-
function
|
|
888
|
+
function xt(e, t, n) {
|
|
879
889
|
function o() {
|
|
880
|
-
return t.slots.header &&
|
|
890
|
+
return t.slots.header && b("div", {
|
|
881
891
|
class: "f-list-view-header"
|
|
882
892
|
}, [t.slots.header()]);
|
|
883
893
|
}
|
|
@@ -886,11 +896,11 @@ function $t(e, t, n) {
|
|
|
886
896
|
};
|
|
887
897
|
}
|
|
888
898
|
function se(e, t, n) {
|
|
889
|
-
const o = C(e.headerClass),
|
|
890
|
-
function
|
|
891
|
-
|
|
899
|
+
const o = C(e.headerClass), s = C(e.placeholder), c = C(""), i = B(() => !c.value), p = B(() => !!c.value);
|
|
900
|
+
function g(r) {
|
|
901
|
+
c.value = "";
|
|
892
902
|
}
|
|
893
|
-
N(
|
|
903
|
+
N(c, (r) => {
|
|
894
904
|
e.enableHighlightSearch && n.search(r), t.emit("afterSearch", r);
|
|
895
905
|
});
|
|
896
906
|
const y = B(() => {
|
|
@@ -898,100 +908,100 @@ function se(e, t, n) {
|
|
|
898
908
|
"form-group": !0,
|
|
899
909
|
"farris-form-group": !0
|
|
900
910
|
};
|
|
901
|
-
return o.value && o.value.split(" ").reduce((
|
|
911
|
+
return o.value && o.value.split(" ").reduce((d, f) => (d[f] = !0, d), r), r;
|
|
902
912
|
});
|
|
903
913
|
function h(r) {
|
|
904
914
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
915
|
+
function l() {
|
|
916
|
+
return b("div", {
|
|
907
917
|
class: "f-list-view-header",
|
|
908
|
-
onClick:
|
|
909
|
-
}, [
|
|
918
|
+
onClick: ke(() => h, ["prevent", "stop"])
|
|
919
|
+
}, [b("div", {
|
|
910
920
|
class: y.value
|
|
911
|
-
}, [
|
|
921
|
+
}, [b("div", {
|
|
912
922
|
class: "farris-input-wrap"
|
|
913
|
-
}, [
|
|
923
|
+
}, [b("div", {
|
|
914
924
|
class: "f-cmp-inputgroup"
|
|
915
|
-
}, [
|
|
925
|
+
}, [b("div", {
|
|
916
926
|
class: "input-group f-state-editable"
|
|
917
|
-
}, [
|
|
927
|
+
}, [Fe(b("input", {
|
|
918
928
|
class: "form-control f-utils-fill text-left",
|
|
919
|
-
"onUpdate:modelValue": (r) =>
|
|
929
|
+
"onUpdate:modelValue": (r) => c.value = r,
|
|
920
930
|
name: "input-group-value",
|
|
921
931
|
type: "text",
|
|
922
|
-
placeholder:
|
|
932
|
+
placeholder: s.value,
|
|
923
933
|
autocomplete: "off"
|
|
924
|
-
}, null), [[
|
|
934
|
+
}, null), [[je, c.value]]), b("div", {
|
|
925
935
|
class: "input-group-append"
|
|
926
|
-
}, [
|
|
936
|
+
}, [p.value && b("span", {
|
|
927
937
|
class: "input-group-text input-group-clear",
|
|
928
|
-
onClick: (r) =>
|
|
929
|
-
}, [
|
|
938
|
+
onClick: (r) => g()
|
|
939
|
+
}, [b("i", {
|
|
930
940
|
class: "f-icon f-icon-close-circle"
|
|
931
|
-
}, null)]),
|
|
941
|
+
}, null)]), i.value && b("span", {
|
|
932
942
|
class: "input-group-text"
|
|
933
|
-
}, [
|
|
943
|
+
}, [b("span", {
|
|
934
944
|
class: "f-icon f-icon-search"
|
|
935
945
|
}, null)])])])])])])]);
|
|
936
946
|
}
|
|
937
947
|
return {
|
|
938
|
-
renderHeader:
|
|
948
|
+
renderHeader: l
|
|
939
949
|
};
|
|
940
950
|
}
|
|
941
|
-
const
|
|
951
|
+
const fe = /* @__PURE__ */ H({
|
|
942
952
|
name: "FListView",
|
|
943
|
-
props:
|
|
953
|
+
props: pe,
|
|
944
954
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
945
955
|
setup(e, t) {
|
|
946
|
-
const n = C(), o = C(!0),
|
|
947
|
-
getVisualData:
|
|
948
|
-
} =
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
const
|
|
956
|
+
const n = C(), o = C(!0), s = C(!1), c = C([]), i = 0, p = C(e.columns), g = Ve(e), y = De(e), h = Oe(e, g), l = Ie(e), r = Pe(e, /* @__PURE__ */ new Map(), y, g, l), S = Be(e, r, g, c, t), d = Tt(e, n), f = B(() => r.dataView.value.length), a = Ae(e, t, g), u = $e(), k = xe(e, {}, u), F = Le(e, a, y, g, u, k), V = Ee(e, g, k, F), w = Ne(e, g, k, F), v = He(e, p, r, f, i, F, V, w), {
|
|
957
|
+
getVisualData: D
|
|
958
|
+
} = v;
|
|
959
|
+
c.value = D(0, f.value + i - 1);
|
|
960
|
+
const m = B(() => {
|
|
961
|
+
const L = {
|
|
952
962
|
"f-list-view": !0,
|
|
953
963
|
"f-list-view-multiple": e.multiSelect
|
|
954
964
|
};
|
|
955
|
-
return e.size !== "default" && (
|
|
965
|
+
return e.size !== "default" && (L[`${e.size}-item`] = !0), L;
|
|
956
966
|
}), M = B(() => !!t.slots.footer || o.value);
|
|
957
967
|
function A() {
|
|
958
|
-
return e.header === "SearchBar" ? se : e.header === "ContentHeader" ?
|
|
968
|
+
return e.header === "SearchBar" ? se : e.header === "ContentHeader" ? xt : se;
|
|
959
969
|
}
|
|
960
|
-
const
|
|
970
|
+
const j = A(), {
|
|
961
971
|
renderHeader: $
|
|
962
|
-
} =
|
|
972
|
+
} = j(e, t, d), {
|
|
963
973
|
renderListArea: O
|
|
964
|
-
} =
|
|
965
|
-
function P(
|
|
966
|
-
|
|
974
|
+
} = $t(e, t, c, r, h, S, v);
|
|
975
|
+
function P(L) {
|
|
976
|
+
d.search(L);
|
|
967
977
|
}
|
|
968
|
-
function
|
|
969
|
-
|
|
978
|
+
function x(L) {
|
|
979
|
+
L && (r.load(L), c.value = D(0, f.value + i - 1));
|
|
970
980
|
}
|
|
971
981
|
t.expose({
|
|
972
982
|
search: P,
|
|
973
|
-
updateDataSource:
|
|
983
|
+
updateDataSource: x
|
|
974
984
|
});
|
|
975
|
-
function I(
|
|
976
|
-
e.multiSelect && (
|
|
985
|
+
function I(L) {
|
|
986
|
+
e.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
977
987
|
}
|
|
978
|
-
return () =>
|
|
979
|
-
class:
|
|
988
|
+
return () => b("div", {
|
|
989
|
+
class: m.value,
|
|
980
990
|
onClick: I
|
|
981
|
-
}, [$(),
|
|
991
|
+
}, [$(), b("div", {
|
|
982
992
|
ref: n,
|
|
983
993
|
class: "f-list-view-content",
|
|
984
994
|
onMouseover: () => {
|
|
985
|
-
|
|
995
|
+
s.value = !0;
|
|
986
996
|
},
|
|
987
997
|
onMouseleave: () => {
|
|
988
|
-
|
|
998
|
+
s.value = !1;
|
|
989
999
|
}
|
|
990
|
-
}, [O()]), M.value &&
|
|
1000
|
+
}, [O()]), M.value && b("div", {
|
|
991
1001
|
class: "f-list-view-footer"
|
|
992
1002
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
993
1003
|
}
|
|
994
|
-
}),
|
|
1004
|
+
}), Lt = {
|
|
995
1005
|
/**
|
|
996
1006
|
* 组件标识
|
|
997
1007
|
*/
|
|
@@ -1017,7 +1027,7 @@ const me = /* @__PURE__ */ H({
|
|
|
1017
1027
|
*/
|
|
1018
1028
|
customClass: { type: Object, default: {} }
|
|
1019
1029
|
};
|
|
1020
|
-
function
|
|
1030
|
+
function Et(e, t) {
|
|
1021
1031
|
function n(o) {
|
|
1022
1032
|
o.stopPropagation(), e.disabled || t.emit("click", o);
|
|
1023
1033
|
}
|
|
@@ -1025,50 +1035,50 @@ function Lt(e, t) {
|
|
|
1025
1035
|
onClickButton: n
|
|
1026
1036
|
};
|
|
1027
1037
|
}
|
|
1028
|
-
function
|
|
1038
|
+
function Nt(e) {
|
|
1029
1039
|
const t = B(() => {
|
|
1030
1040
|
const o = {
|
|
1031
1041
|
"f-icon": !0
|
|
1032
1042
|
};
|
|
1033
1043
|
if (e.icon) {
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1044
|
+
const s = e.icon.trim().split(" ");
|
|
1045
|
+
s && s.length && s.reduce((c, i) => (c[i] = !0, c), o);
|
|
1036
1046
|
}
|
|
1037
1047
|
return o;
|
|
1038
1048
|
}), n = B(() => !!(e.icon && e.icon.trim()));
|
|
1039
1049
|
return { iconClass: t, shouldShowIcon: n };
|
|
1040
1050
|
}
|
|
1041
|
-
const
|
|
1051
|
+
const me = /* @__PURE__ */ H({
|
|
1042
1052
|
name: "FButton",
|
|
1043
|
-
props:
|
|
1053
|
+
props: Lt,
|
|
1044
1054
|
emits: ["click"],
|
|
1045
1055
|
setup(e, t) {
|
|
1046
1056
|
const {
|
|
1047
1057
|
onClickButton: n
|
|
1048
|
-
} =
|
|
1058
|
+
} = Et(e, t), {
|
|
1049
1059
|
iconClass: o,
|
|
1050
|
-
shouldShowIcon:
|
|
1051
|
-
} =
|
|
1052
|
-
const
|
|
1060
|
+
shouldShowIcon: s
|
|
1061
|
+
} = Nt(e), c = B(() => {
|
|
1062
|
+
const i = {
|
|
1053
1063
|
btn: !0,
|
|
1054
1064
|
"btn-lg": e.size === "large",
|
|
1055
1065
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
1056
1066
|
"btn-sm": e.size === "small",
|
|
1057
|
-
"btn-icontext":
|
|
1067
|
+
"btn-icontext": s.value
|
|
1058
1068
|
};
|
|
1059
|
-
return
|
|
1069
|
+
return i[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((p, g) => (p[g] = e.customClass[g], p), i), i;
|
|
1060
1070
|
});
|
|
1061
|
-
return () =>
|
|
1062
|
-
class:
|
|
1071
|
+
return () => b("button", {
|
|
1072
|
+
class: c.value,
|
|
1063
1073
|
disabled: e.disabled,
|
|
1064
|
-
onClick: (
|
|
1065
|
-
}, [
|
|
1074
|
+
onClick: (i) => n(i)
|
|
1075
|
+
}, [s.value && b("i", {
|
|
1066
1076
|
class: o.value
|
|
1067
1077
|
}, null), t.slots.default && t.slots.default()]);
|
|
1068
1078
|
}
|
|
1069
|
-
}),
|
|
1079
|
+
}), Ht = /* @__PURE__ */ new Map([
|
|
1070
1080
|
["appearance", ee]
|
|
1071
|
-
]),
|
|
1081
|
+
]), Rt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/combo-list.schema.json", Gt = "combo-list", qt = "A Farris Input Component", _t = "object", Wt = {
|
|
1072
1082
|
id: {
|
|
1073
1083
|
description: "The unique identifier for a combo list",
|
|
1074
1084
|
type: "string"
|
|
@@ -1096,6 +1106,11 @@ const ye = /* @__PURE__ */ H({
|
|
|
1096
1106
|
type: "object",
|
|
1097
1107
|
default: {}
|
|
1098
1108
|
},
|
|
1109
|
+
disabled: {
|
|
1110
|
+
description: "",
|
|
1111
|
+
type: "boolean",
|
|
1112
|
+
default: !1
|
|
1113
|
+
},
|
|
1099
1114
|
editable: {
|
|
1100
1115
|
description: "",
|
|
1101
1116
|
type: "boolean",
|
|
@@ -1123,7 +1138,7 @@ const ye = /* @__PURE__ */ H({
|
|
|
1123
1138
|
valueField: {
|
|
1124
1139
|
description: "",
|
|
1125
1140
|
type: "string",
|
|
1126
|
-
default: "
|
|
1141
|
+
default: "id"
|
|
1127
1142
|
},
|
|
1128
1143
|
titleField: {
|
|
1129
1144
|
description: "",
|
|
@@ -1179,19 +1194,24 @@ const ye = /* @__PURE__ */ H({
|
|
|
1179
1194
|
type: "sting",
|
|
1180
1195
|
default: ""
|
|
1181
1196
|
}
|
|
1182
|
-
},
|
|
1197
|
+
}, zt = [
|
|
1183
1198
|
"id",
|
|
1184
1199
|
"type"
|
|
1185
|
-
],
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1200
|
+
], Jt = [
|
|
1201
|
+
"id",
|
|
1202
|
+
"appearance",
|
|
1203
|
+
"binding"
|
|
1204
|
+
], Xt = {
|
|
1205
|
+
$schema: Rt,
|
|
1206
|
+
$id: Ut,
|
|
1207
|
+
title: Gt,
|
|
1208
|
+
description: qt,
|
|
1190
1209
|
type: _t,
|
|
1191
|
-
properties:
|
|
1192
|
-
required:
|
|
1210
|
+
properties: Wt,
|
|
1211
|
+
required: zt,
|
|
1212
|
+
ignore: Jt
|
|
1193
1213
|
};
|
|
1194
|
-
function
|
|
1214
|
+
function Qt(e, t, n) {
|
|
1195
1215
|
return t;
|
|
1196
1216
|
}
|
|
1197
1217
|
const ne = {
|
|
@@ -1271,7 +1291,7 @@ const ne = {
|
|
|
1271
1291
|
* 可选,是否支持多选
|
|
1272
1292
|
* 默认`false`
|
|
1273
1293
|
*/
|
|
1274
|
-
multiSelect: {
|
|
1294
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
1275
1295
|
/**
|
|
1276
1296
|
* 绑定值
|
|
1277
1297
|
*/
|
|
@@ -1360,11 +1380,11 @@ const ne = {
|
|
|
1360
1380
|
},
|
|
1361
1381
|
// 搜索启用高亮
|
|
1362
1382
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1363
|
-
},
|
|
1383
|
+
}, ye = K(ne, Xt, Ht, Qt), Yt = {
|
|
1364
1384
|
dataSource: { type: Array, default: [] },
|
|
1365
1385
|
enableSearch: { type: Boolean, default: !1 },
|
|
1366
1386
|
idField: { type: String, default: "id" },
|
|
1367
|
-
multiSelect: {
|
|
1387
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
1368
1388
|
selectedValues: { type: String, default: "" },
|
|
1369
1389
|
separator: { type: String, default: "," },
|
|
1370
1390
|
textField: { type: String, default: "name" },
|
|
@@ -1380,236 +1400,241 @@ const ne = {
|
|
|
1380
1400
|
default: !1
|
|
1381
1401
|
},
|
|
1382
1402
|
// 搜索启用高亮
|
|
1383
|
-
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1384
|
-
|
|
1403
|
+
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
1404
|
+
// 是否展示复选框
|
|
1405
|
+
showCheckbox: { type: Boolean, default: !1 }
|
|
1406
|
+
}, Zt = /* @__PURE__ */ H({
|
|
1385
1407
|
name: "FComboListContainer",
|
|
1386
|
-
props:
|
|
1408
|
+
props: Yt,
|
|
1387
1409
|
emits: ["selectionChange"],
|
|
1388
1410
|
setup(e, t) {
|
|
1389
|
-
const n = C(), o = C(e.dataSource),
|
|
1411
|
+
const n = C(), o = C(e.dataSource), s = C([]), c = C(e.separator), i = C(e.width), p = C(e.maxHeight), g = C(String(e.selectedValues).split(c.value)), y = B(() => e.multiSelect), h = B(() => ({
|
|
1412
|
+
enableSelectRow: !0,
|
|
1413
|
+
multiSelect: e.multiSelect,
|
|
1414
|
+
multiSelectMode: "OnCheckAndClick",
|
|
1415
|
+
showCheckbox: y.value,
|
|
1416
|
+
showSelectAll: !1,
|
|
1417
|
+
showSelection: !0
|
|
1418
|
+
}));
|
|
1390
1419
|
N(e.dataSource, () => {
|
|
1391
1420
|
o.value = e.dataSource;
|
|
1392
1421
|
});
|
|
1393
|
-
const
|
|
1394
|
-
const
|
|
1395
|
-
return
|
|
1422
|
+
const l = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), r = B(() => {
|
|
1423
|
+
const f = {};
|
|
1424
|
+
return i.value !== void 0 && (f.width = `${i.value}px`), p.value !== void 0 && p.value > 0 && (f.maxHeight = `${p.value}px`), f;
|
|
1396
1425
|
});
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1426
|
+
function S(f) {
|
|
1427
|
+
s.value = f.map((a) => Object.assign({}, a)), g.value = f.map((a) => a[e.idField]), t.emit("selectionChange", s.value);
|
|
1399
1428
|
}
|
|
1400
|
-
function
|
|
1429
|
+
function d(f) {
|
|
1401
1430
|
if (e.enableHighlightSearch)
|
|
1402
1431
|
return;
|
|
1403
1432
|
let a = [];
|
|
1404
|
-
typeof e.searchOption == "function" ? a = o.value.filter((
|
|
1433
|
+
typeof e.searchOption == "function" ? a = o.value.filter((u) => e.searchOption(f, u)) : a = o.value.filter((u) => u[e.valueField].indexOf(f) > -1 || u[e.textField].indexOf(f) > -1), n.value.updateDataSource(a);
|
|
1405
1434
|
}
|
|
1406
|
-
return N([() => e.selectedValues], ([
|
|
1407
|
-
|
|
1408
|
-
}), () =>
|
|
1409
|
-
class: "f-combo-list-container pl-
|
|
1410
|
-
style:
|
|
1411
|
-
}, [
|
|
1435
|
+
return N([() => e.selectedValues], ([f]) => {
|
|
1436
|
+
g.value = f.split(c.value);
|
|
1437
|
+
}), () => b("div", {
|
|
1438
|
+
class: "f-combo-list-container pl-1",
|
|
1439
|
+
style: r.value
|
|
1440
|
+
}, [b(Re, {
|
|
1412
1441
|
ref: n,
|
|
1413
1442
|
size: "small",
|
|
1414
1443
|
itemClass: "f-combo-list-item",
|
|
1415
|
-
header:
|
|
1444
|
+
header: l.value,
|
|
1416
1445
|
headerClass: "f-combo-list-search-box",
|
|
1417
1446
|
data: o.value,
|
|
1418
1447
|
idField: e.idField,
|
|
1419
1448
|
textField: e.textField,
|
|
1420
1449
|
titleField: e.titleField,
|
|
1421
1450
|
multiSelect: e.multiSelect,
|
|
1422
|
-
selection:
|
|
1423
|
-
enableSelectRow: !0,
|
|
1424
|
-
multiSelect: !0,
|
|
1425
|
-
multiSelectMode: "OnCheckAndClick",
|
|
1426
|
-
showCheckbox: !0,
|
|
1427
|
-
showSelectAll: !1,
|
|
1428
|
-
showSelection: !0
|
|
1429
|
-
},
|
|
1451
|
+
selection: h.value,
|
|
1430
1452
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1431
|
-
selectionValues:
|
|
1432
|
-
onSelectionChange:
|
|
1433
|
-
onAfterSearch:
|
|
1453
|
+
selectionValues: g.value,
|
|
1454
|
+
onSelectionChange: S,
|
|
1455
|
+
onAfterSearch: d
|
|
1434
1456
|
}, null)]);
|
|
1435
1457
|
}
|
|
1436
1458
|
});
|
|
1437
|
-
function
|
|
1438
|
-
const t = C(""), n = C(e.modelValue), o = C(e.data || []),
|
|
1439
|
-
function l
|
|
1440
|
-
const r = String(
|
|
1441
|
-
return o.value.filter((a) =>
|
|
1459
|
+
function Kt(e) {
|
|
1460
|
+
const t = C(""), n = C(e.modelValue), o = C(e.data || []), s = C(e.editable);
|
|
1461
|
+
function c(l) {
|
|
1462
|
+
const r = String(l).split(e.separator), S = r.map((a) => [a, !0]), d = new Map(S);
|
|
1463
|
+
return o.value.filter((a) => d.has(String(a[e.valueField]))).sort((a, u) => {
|
|
1464
|
+
const k = r.indexOf(a[e.valueField]), F = r.indexOf(u[e.valueField]);
|
|
1465
|
+
return k - F;
|
|
1466
|
+
});
|
|
1442
1467
|
}
|
|
1443
|
-
function
|
|
1444
|
-
const r = l
|
|
1445
|
-
t.value =
|
|
1468
|
+
function i(l) {
|
|
1469
|
+
const r = c(l).map((S) => S[e.textField]).join(e.separator);
|
|
1470
|
+
t.value = s.value ? r || l : r;
|
|
1446
1471
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const r =
|
|
1449
|
-
return o.value.filter((
|
|
1472
|
+
function p(l) {
|
|
1473
|
+
const r = l.split(e.separator).map((d) => [d, !0]), S = new Map(r);
|
|
1474
|
+
return o.value.filter((d) => S.has(d[e.textField]));
|
|
1450
1475
|
}
|
|
1451
|
-
function
|
|
1476
|
+
function g(l) {
|
|
1452
1477
|
const r = {};
|
|
1453
|
-
return r[e.idField] =
|
|
1478
|
+
return r[e.idField] = l, r[e.textField] = l, [r];
|
|
1454
1479
|
}
|
|
1455
|
-
function y(
|
|
1456
|
-
let r =
|
|
1457
|
-
const
|
|
1458
|
-
return
|
|
1480
|
+
function y(l) {
|
|
1481
|
+
let r = p(l);
|
|
1482
|
+
const S = r && r.length > 0;
|
|
1483
|
+
return s.value && !S && (r = g(l)), r;
|
|
1459
1484
|
}
|
|
1460
1485
|
function h() {
|
|
1461
|
-
const { url:
|
|
1462
|
-
let
|
|
1463
|
-
fetch(
|
|
1464
|
-
var F,
|
|
1465
|
-
if (
|
|
1466
|
-
return
|
|
1467
|
-
throw new Error(
|
|
1468
|
-
}).then((
|
|
1469
|
-
o.value =
|
|
1470
|
-
}).catch((
|
|
1471
|
-
console.error(
|
|
1486
|
+
const { url: l, method: r = "GET", headers: S = {}, body: d = null } = e.remote, f = r.toLowerCase() == "get" ? { method: r, headers: S } : { method: r, headers: S, body: d };
|
|
1487
|
+
let a = !1;
|
|
1488
|
+
fetch(l, f).then((u) => {
|
|
1489
|
+
var F, V;
|
|
1490
|
+
if (u.status === 200)
|
|
1491
|
+
return a = !!((V = (F = u.headers) == null ? void 0 : F.get("content-type")) != null && V.includes("application/json")), a ? u.text() : u.json();
|
|
1492
|
+
throw new Error(u.statusText);
|
|
1493
|
+
}).then((u) => {
|
|
1494
|
+
o.value = a ? JSON.parse(u) : u;
|
|
1495
|
+
}).catch((u) => {
|
|
1496
|
+
console.error(u);
|
|
1472
1497
|
});
|
|
1473
1498
|
}
|
|
1474
1499
|
return e.remote && h(), N(() => e.data, () => {
|
|
1475
1500
|
o.value = e.data;
|
|
1476
|
-
}), N([o], ([
|
|
1501
|
+
}), N([o], ([l]) => {
|
|
1477
1502
|
if (e.modelValue) {
|
|
1478
|
-
const r =
|
|
1503
|
+
const r = l.find((S) => S[e.valueField] === e.modelValue);
|
|
1479
1504
|
r && (t.value = r[e.textField]);
|
|
1480
1505
|
}
|
|
1481
|
-
}), N(() => e.modelValue, (
|
|
1482
|
-
n.value =
|
|
1483
|
-
}),
|
|
1506
|
+
}), N(() => e.modelValue, (l) => {
|
|
1507
|
+
n.value = l, i(l);
|
|
1508
|
+
}), i(e.modelValue), { dataSource: o, displayText: t, editable: s, modelValue: n, getItemsByDisplayText: p, getItemsByValue: c, getSelectedItemsByDisplayText: y };
|
|
1484
1509
|
}
|
|
1485
1510
|
const G = /* @__PURE__ */ H({
|
|
1486
1511
|
name: "FComboList",
|
|
1487
1512
|
props: ne,
|
|
1488
1513
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1489
1514
|
setup(e, t) {
|
|
1490
|
-
const n = C(), o = C(e.disabled),
|
|
1491
|
-
dataSource:
|
|
1492
|
-
displayText:
|
|
1515
|
+
const n = C(), o = C(e.disabled), s = C(e.enableClear), c = C(e.enableSearch), i = C(e.readonly), {
|
|
1516
|
+
dataSource: p,
|
|
1517
|
+
displayText: g,
|
|
1493
1518
|
editable: y,
|
|
1494
1519
|
modelValue: h,
|
|
1495
|
-
getSelectedItemsByDisplayText:
|
|
1496
|
-
} =
|
|
1497
|
-
function
|
|
1520
|
+
getSelectedItemsByDisplayText: l
|
|
1521
|
+
} = Kt(e), r = B(() => e.multiSelect), S = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1522
|
+
function d() {
|
|
1498
1523
|
!r.value && n.value && n.value.hidePopup();
|
|
1499
1524
|
}
|
|
1500
|
-
function
|
|
1501
|
-
|
|
1525
|
+
function f(w) {
|
|
1526
|
+
g.value = w.map((v) => v[e.textField]).join(e.separator), w.length === 1 ? h.value = w[0][e.valueField] : h.value = w.map((v) => v[e.valueField]).join(e.separator), t.emit("update:modelValue", h.value), t.emit("change", w, h.value), d();
|
|
1502
1527
|
}
|
|
1503
|
-
function
|
|
1504
|
-
|
|
1528
|
+
function a() {
|
|
1529
|
+
i.value || n.value.togglePopup();
|
|
1505
1530
|
}
|
|
1506
|
-
function
|
|
1531
|
+
function u(w) {
|
|
1507
1532
|
h.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1508
1533
|
}
|
|
1509
|
-
function k(
|
|
1510
|
-
const
|
|
1511
|
-
|
|
1534
|
+
function k(w) {
|
|
1535
|
+
const v = l(w);
|
|
1536
|
+
f(v);
|
|
1512
1537
|
}
|
|
1513
1538
|
function F() {
|
|
1514
|
-
return
|
|
1539
|
+
return g.value;
|
|
1515
1540
|
}
|
|
1516
|
-
function
|
|
1517
|
-
t.emit("input",
|
|
1541
|
+
function V(w) {
|
|
1542
|
+
t.emit("input", w);
|
|
1518
1543
|
}
|
|
1519
1544
|
return t.expose({
|
|
1520
1545
|
getDisplayText: F
|
|
1521
|
-
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
1522
|
-
o.value =
|
|
1523
|
-
}), () =>
|
|
1546
|
+
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([w, v, D, m, M]) => {
|
|
1547
|
+
o.value = w, y.value = v, s.value = D, c.value = m, i.value = M;
|
|
1548
|
+
}), () => b(Ue, {
|
|
1524
1549
|
ref: n,
|
|
1525
1550
|
id: e.id,
|
|
1526
1551
|
disable: o.value,
|
|
1527
|
-
readonly:
|
|
1552
|
+
readonly: i.value,
|
|
1528
1553
|
forcePlaceholder: e.forcePlaceholder,
|
|
1529
1554
|
editable: y.value,
|
|
1530
1555
|
buttonContent: e.dropDownIcon,
|
|
1531
1556
|
placeholder: e.placeholder,
|
|
1532
|
-
enableClear:
|
|
1557
|
+
enableClear: s.value,
|
|
1533
1558
|
maxLength: e.maxLength,
|
|
1534
1559
|
tabIndex: e.tabIndex,
|
|
1535
1560
|
enableTitle: e.enableTitle,
|
|
1536
1561
|
multiSelect: e.multiSelect,
|
|
1537
1562
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1538
|
-
modelValue:
|
|
1539
|
-
"onUpdate:modelValue": (
|
|
1563
|
+
modelValue: g.value,
|
|
1564
|
+
"onUpdate:modelValue": (w) => g.value = w,
|
|
1540
1565
|
focusOnCreated: e.focusOnCreated,
|
|
1541
1566
|
selectOnCreated: e.selectOnCreated,
|
|
1542
|
-
onClear:
|
|
1543
|
-
onClick:
|
|
1567
|
+
onClear: u,
|
|
1568
|
+
onClick: a,
|
|
1544
1569
|
onChange: k,
|
|
1545
|
-
onInput:
|
|
1570
|
+
onInput: V,
|
|
1546
1571
|
beforeOpen: e.beforeOpen
|
|
1547
1572
|
}, {
|
|
1548
|
-
default: () => [
|
|
1573
|
+
default: () => [b(Zt, {
|
|
1549
1574
|
idField: e.idField,
|
|
1550
1575
|
valueField: e.valueField,
|
|
1551
1576
|
textField: e.textField,
|
|
1552
1577
|
titleField: e.titleField,
|
|
1553
|
-
dataSource:
|
|
1578
|
+
dataSource: p.value,
|
|
1554
1579
|
selectedValues: h.value,
|
|
1555
1580
|
multiSelect: e.multiSelect,
|
|
1556
|
-
enableSearch:
|
|
1581
|
+
enableSearch: c.value,
|
|
1557
1582
|
maxHeight: e.maxHeight,
|
|
1558
1583
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1559
|
-
width: e.fitEditor ?
|
|
1560
|
-
onSelectionChange:
|
|
1584
|
+
width: e.fitEditor ? S.value : void 0,
|
|
1585
|
+
onSelectionChange: f
|
|
1561
1586
|
}, null)]
|
|
1562
1587
|
});
|
|
1563
1588
|
}
|
|
1564
1589
|
});
|
|
1565
|
-
function
|
|
1590
|
+
function en(e, t) {
|
|
1566
1591
|
e.schema;
|
|
1567
1592
|
const n = C(!0), o = C(!0);
|
|
1568
|
-
function
|
|
1593
|
+
function s(l) {
|
|
1569
1594
|
return !1;
|
|
1570
1595
|
}
|
|
1571
|
-
function
|
|
1596
|
+
function c() {
|
|
1572
1597
|
return !1;
|
|
1573
1598
|
}
|
|
1574
|
-
function
|
|
1599
|
+
function i() {
|
|
1575
1600
|
return !1;
|
|
1576
1601
|
}
|
|
1577
|
-
function
|
|
1602
|
+
function p() {
|
|
1578
1603
|
return !0;
|
|
1579
1604
|
}
|
|
1580
|
-
function
|
|
1605
|
+
function g(l) {
|
|
1581
1606
|
}
|
|
1582
1607
|
function y() {
|
|
1583
1608
|
}
|
|
1584
|
-
function h(
|
|
1609
|
+
function h(l) {
|
|
1585
1610
|
return null;
|
|
1586
1611
|
}
|
|
1587
1612
|
return {
|
|
1588
|
-
canAccepts:
|
|
1589
|
-
checkCanDeleteComponent:
|
|
1590
|
-
checkCanMoveComponent:
|
|
1591
|
-
hideNestedPaddingInDesginerView:
|
|
1592
|
-
onAcceptMovedChildElement:
|
|
1613
|
+
canAccepts: s,
|
|
1614
|
+
checkCanDeleteComponent: c,
|
|
1615
|
+
checkCanMoveComponent: i,
|
|
1616
|
+
hideNestedPaddingInDesginerView: p,
|
|
1617
|
+
onAcceptMovedChildElement: g,
|
|
1593
1618
|
resolveComponentContext: y,
|
|
1594
1619
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1595
1620
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1596
1621
|
getPropsConfig: h
|
|
1597
1622
|
};
|
|
1598
1623
|
}
|
|
1599
|
-
class
|
|
1624
|
+
class tn {
|
|
1600
1625
|
constructor(t, n) {
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1626
|
+
E(this, "componentId");
|
|
1627
|
+
E(this, "viewModelId");
|
|
1628
|
+
E(this, "eventsEditorUtils");
|
|
1629
|
+
E(this, "formSchemaUtils");
|
|
1630
|
+
E(this, "formMetadataConverter");
|
|
1631
|
+
E(this, "designViewModelUtils");
|
|
1632
|
+
E(this, "designViewModelField");
|
|
1633
|
+
E(this, "controlCreatorUtils");
|
|
1634
|
+
E(this, "designerHostService");
|
|
1635
|
+
E(this, "schemaService", null);
|
|
1636
|
+
E(this, "metadataService", null);
|
|
1637
|
+
E(this, "propertyConfig", {
|
|
1613
1638
|
type: "object",
|
|
1614
1639
|
categories: {}
|
|
1615
1640
|
});
|
|
@@ -1625,7 +1650,7 @@ class Kt {
|
|
|
1625
1650
|
if (n) {
|
|
1626
1651
|
if (!this.designViewModelField) {
|
|
1627
1652
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1628
|
-
this.designViewModelField = o.fields.find((
|
|
1653
|
+
this.designViewModelField = o.fields.find((s) => s.id === n);
|
|
1629
1654
|
}
|
|
1630
1655
|
t.updateOn = this.designViewModelField.updateOn;
|
|
1631
1656
|
}
|
|
@@ -1651,7 +1676,7 @@ class Kt {
|
|
|
1651
1676
|
type: "combo-list",
|
|
1652
1677
|
textField: "name",
|
|
1653
1678
|
valueField: "value",
|
|
1654
|
-
data: [{ value: t.type, name:
|
|
1679
|
+
data: [{ value: t.type, name: T[t.type].name }]
|
|
1655
1680
|
}
|
|
1656
1681
|
}
|
|
1657
1682
|
}
|
|
@@ -1693,7 +1718,7 @@ const R = class R {
|
|
|
1693
1718
|
const t = [];
|
|
1694
1719
|
for (let n in R.fieldControlTypeMapping)
|
|
1695
1720
|
R.fieldControlTypeMapping[n].forEach((o) => {
|
|
1696
|
-
t.find((
|
|
1721
|
+
t.find((s) => s.key === o.key && s.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
1697
1722
|
});
|
|
1698
1723
|
return t;
|
|
1699
1724
|
}
|
|
@@ -1701,55 +1726,55 @@ const R = class R {
|
|
|
1701
1726
|
/**
|
|
1702
1727
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1703
1728
|
*/
|
|
1704
|
-
|
|
1729
|
+
E(R, "fieldControlTypeMapping", {
|
|
1705
1730
|
String: [
|
|
1706
|
-
{ key:
|
|
1707
|
-
{ key:
|
|
1708
|
-
{ key:
|
|
1709
|
-
{ key:
|
|
1710
|
-
{ key:
|
|
1711
|
-
{ key:
|
|
1712
|
-
{ key:
|
|
1731
|
+
{ key: T["input-group"].type, value: T["input-group"].name },
|
|
1732
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
1733
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name },
|
|
1734
|
+
{ key: T["check-box"].type, value: T["check-box"].name },
|
|
1735
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name },
|
|
1736
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
1737
|
+
{ key: T.textarea.type, value: T.textarea.name }
|
|
1713
1738
|
],
|
|
1714
1739
|
Text: [
|
|
1715
|
-
{ key:
|
|
1716
|
-
{ key:
|
|
1740
|
+
{ key: T.textarea.type, value: T.textarea.name },
|
|
1741
|
+
{ key: T.lookup.type, value: T.lookup.name }
|
|
1717
1742
|
],
|
|
1718
1743
|
Decimal: [
|
|
1719
|
-
{ key:
|
|
1744
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
1720
1745
|
],
|
|
1721
1746
|
Integer: [
|
|
1722
|
-
{ key:
|
|
1747
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
1723
1748
|
],
|
|
1724
1749
|
Number: [
|
|
1725
|
-
{ key:
|
|
1750
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
1726
1751
|
],
|
|
1727
1752
|
BigNumber: [
|
|
1728
|
-
{ key:
|
|
1753
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
1729
1754
|
],
|
|
1730
1755
|
Date: [
|
|
1731
|
-
{ key:
|
|
1756
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
1732
1757
|
],
|
|
1733
1758
|
DateTime: [
|
|
1734
|
-
{ key:
|
|
1759
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
1735
1760
|
],
|
|
1736
1761
|
Boolean: [
|
|
1737
|
-
{ key:
|
|
1738
|
-
{ key:
|
|
1762
|
+
{ key: T.switch.type, value: T.switch.name },
|
|
1763
|
+
{ key: T["check-box"].type, value: T["check-box"].name }
|
|
1739
1764
|
],
|
|
1740
1765
|
Enum: [
|
|
1741
|
-
{ key:
|
|
1742
|
-
{ key:
|
|
1766
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
1767
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
1743
1768
|
],
|
|
1744
1769
|
Object: [
|
|
1745
|
-
{ key:
|
|
1746
|
-
{ key:
|
|
1747
|
-
{ key:
|
|
1770
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
1771
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
1772
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
1748
1773
|
]
|
|
1749
1774
|
});
|
|
1750
|
-
let
|
|
1751
|
-
const
|
|
1752
|
-
class
|
|
1775
|
+
let q = R;
|
|
1776
|
+
const nn = C(0);
|
|
1777
|
+
class on extends tn {
|
|
1753
1778
|
constructor(t, n) {
|
|
1754
1779
|
super(t, n);
|
|
1755
1780
|
}
|
|
@@ -1757,10 +1782,10 @@ class tn extends Kt {
|
|
|
1757
1782
|
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;
|
|
1758
1783
|
}
|
|
1759
1784
|
getBasicProperties(t, n) {
|
|
1760
|
-
var
|
|
1785
|
+
var i;
|
|
1761
1786
|
var o = this;
|
|
1762
1787
|
this.setDesignViewModelField(t);
|
|
1763
|
-
const
|
|
1788
|
+
const s = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1764
1789
|
return {
|
|
1765
1790
|
description: "Basic Information",
|
|
1766
1791
|
title: "基本信息",
|
|
@@ -1772,8 +1797,8 @@ class tn extends Kt {
|
|
|
1772
1797
|
readonly: !0
|
|
1773
1798
|
},
|
|
1774
1799
|
type: {
|
|
1775
|
-
description: "
|
|
1776
|
-
title: "
|
|
1800
|
+
description: "编辑器类型",
|
|
1801
|
+
title: "编辑器类型",
|
|
1777
1802
|
type: "string",
|
|
1778
1803
|
refreshPanelAfterChanged: !0,
|
|
1779
1804
|
$converter: "/converter/change-editor.converter",
|
|
@@ -1782,7 +1807,7 @@ class tn extends Kt {
|
|
|
1782
1807
|
textField: "value",
|
|
1783
1808
|
valueField: "key",
|
|
1784
1809
|
editable: !1,
|
|
1785
|
-
data: o.designViewModelField ?
|
|
1810
|
+
data: o.designViewModelField ? q.getEditorTypesByMDataType((i = o.designViewModelField.type) == null ? void 0 : i.name) : q.getAllInputTypes()
|
|
1786
1811
|
}
|
|
1787
1812
|
},
|
|
1788
1813
|
label: {
|
|
@@ -1799,7 +1824,7 @@ class tn extends Kt {
|
|
|
1799
1824
|
bindingType: { enable: !1 },
|
|
1800
1825
|
editorParams: {
|
|
1801
1826
|
propertyData: t,
|
|
1802
|
-
formBasicInfo:
|
|
1827
|
+
formBasicInfo: s
|
|
1803
1828
|
},
|
|
1804
1829
|
columns: [
|
|
1805
1830
|
{ field: "name", title: "字段名称" },
|
|
@@ -1807,15 +1832,19 @@ class tn extends Kt {
|
|
|
1807
1832
|
{ field: "fieldType", title: "字段类型" }
|
|
1808
1833
|
],
|
|
1809
1834
|
textField: "bindingField",
|
|
1810
|
-
data:
|
|
1835
|
+
data: c
|
|
1811
1836
|
}
|
|
1812
1837
|
}
|
|
1813
1838
|
},
|
|
1814
|
-
setPropertyRelates(
|
|
1815
|
-
if (
|
|
1816
|
-
switch (
|
|
1839
|
+
setPropertyRelates(p, g) {
|
|
1840
|
+
if (p)
|
|
1841
|
+
switch (p && p.propertyID) {
|
|
1817
1842
|
case "type": {
|
|
1818
|
-
o.changeControlType(t,
|
|
1843
|
+
o.changeControlType(t, p, n);
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
case "label": {
|
|
1847
|
+
p.needRefreshControlTree = !0;
|
|
1819
1848
|
break;
|
|
1820
1849
|
}
|
|
1821
1850
|
}
|
|
@@ -1861,43 +1890,43 @@ class tn extends Kt {
|
|
|
1861
1890
|
* @param newControlType 新控件类型
|
|
1862
1891
|
*/
|
|
1863
1892
|
changeControlType(t, n, o) {
|
|
1864
|
-
var y, h,
|
|
1865
|
-
const
|
|
1866
|
-
if (!
|
|
1893
|
+
var y, h, l, r;
|
|
1894
|
+
const s = n.propertyValue, c = o && o.parent && o.parent.schema;
|
|
1895
|
+
if (!c)
|
|
1867
1896
|
return;
|
|
1868
|
-
const
|
|
1869
|
-
let
|
|
1897
|
+
const i = c.contents.findIndex((S) => S.id === t.id), p = c.contents[i];
|
|
1898
|
+
let g;
|
|
1870
1899
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1871
1900
|
editor: {
|
|
1872
|
-
$type:
|
|
1901
|
+
$type: s
|
|
1873
1902
|
},
|
|
1874
1903
|
name: this.designViewModelField.name,
|
|
1875
1904
|
require: this.designViewModelField.require,
|
|
1876
1905
|
readonly: this.designViewModelField.readonly
|
|
1877
|
-
}, !1),
|
|
1878
|
-
id:
|
|
1879
|
-
appearance:
|
|
1880
|
-
size:
|
|
1881
|
-
label:
|
|
1882
|
-
binding:
|
|
1883
|
-
visible:
|
|
1884
|
-
}), Object.assign(
|
|
1885
|
-
isTextArea:
|
|
1886
|
-
placeholder: (y =
|
|
1887
|
-
holdPlace: (h =
|
|
1888
|
-
readonly: (
|
|
1889
|
-
require: (r =
|
|
1890
|
-
}),
|
|
1891
|
-
(
|
|
1892
|
-
),
|
|
1906
|
+
}, !1), g = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), g || (g = re("form-group") || {}, g.editor = re(s) || {}, delete g.editor.id, delete g.editor.binding, delete g.editor.appearance), Object.assign(g, {
|
|
1907
|
+
id: p.id,
|
|
1908
|
+
appearance: p.appearance,
|
|
1909
|
+
size: p.size,
|
|
1910
|
+
label: p.label,
|
|
1911
|
+
binding: p.binding,
|
|
1912
|
+
visible: p.visible
|
|
1913
|
+
}), Object.assign(g.editor, {
|
|
1914
|
+
isTextArea: g.isTextArea && p.isTextArea,
|
|
1915
|
+
placeholder: (y = p.editor) == null ? void 0 : y.placeholder,
|
|
1916
|
+
holdPlace: (h = p.editor) == null ? void 0 : h.holdPlace,
|
|
1917
|
+
readonly: (l = p.editor) == null ? void 0 : l.readonly,
|
|
1918
|
+
require: (r = p.editor) == null ? void 0 : r.require
|
|
1919
|
+
}), c.contents.splice(i, 1), c.contents.splice(i, 0, g), o.schema = Object.assign(p, g), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1920
|
+
(S) => S.classList.remove("dgComponentSelected")
|
|
1921
|
+
), nn.value++;
|
|
1893
1922
|
}
|
|
1894
1923
|
getComponentConfig(t, n = {}, o = {}) {
|
|
1895
|
-
const
|
|
1896
|
-
description: "
|
|
1897
|
-
title: "
|
|
1924
|
+
const s = Object.assign({
|
|
1925
|
+
description: "编辑器",
|
|
1926
|
+
title: "编辑器",
|
|
1898
1927
|
type: "input-group",
|
|
1899
1928
|
$converter: "/converter/property-editor.converter"
|
|
1900
|
-
}, n),
|
|
1929
|
+
}, n), c = Object.assign({
|
|
1901
1930
|
readonly: {
|
|
1902
1931
|
description: "",
|
|
1903
1932
|
title: "只读",
|
|
@@ -1919,10 +1948,10 @@ class tn extends Kt {
|
|
|
1919
1948
|
type: "string"
|
|
1920
1949
|
}
|
|
1921
1950
|
}, o);
|
|
1922
|
-
return { ...
|
|
1951
|
+
return { ...s, properties: { ...c } };
|
|
1923
1952
|
}
|
|
1924
1953
|
}
|
|
1925
|
-
class
|
|
1954
|
+
class an extends on {
|
|
1926
1955
|
constructor(t, n) {
|
|
1927
1956
|
super(t, n);
|
|
1928
1957
|
}
|
|
@@ -1946,183 +1975,176 @@ class nn extends tn {
|
|
|
1946
1975
|
});
|
|
1947
1976
|
}
|
|
1948
1977
|
}
|
|
1949
|
-
function
|
|
1978
|
+
function rn(e, t) {
|
|
1950
1979
|
const {
|
|
1951
1980
|
canAccepts: n,
|
|
1952
1981
|
checkCanDeleteComponent: o,
|
|
1953
|
-
checkCanMoveComponent:
|
|
1954
|
-
hideNestedPaddingInDesginerView:
|
|
1955
|
-
onAcceptMovedChildElement:
|
|
1956
|
-
resolveComponentContext:
|
|
1957
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1982
|
+
checkCanMoveComponent: s,
|
|
1983
|
+
hideNestedPaddingInDesginerView: c,
|
|
1984
|
+
onAcceptMovedChildElement: i,
|
|
1985
|
+
resolveComponentContext: p,
|
|
1986
|
+
triggerBelongedComponentToMoveWhenMoved: g,
|
|
1958
1987
|
triggerBelongedComponentToDeleteWhenDeleted: y
|
|
1959
|
-
} =
|
|
1960
|
-
function
|
|
1961
|
-
return new
|
|
1988
|
+
} = en(e), h = e.schema;
|
|
1989
|
+
function l(r, S) {
|
|
1990
|
+
return new an(r, t).getPropertyConfig(h, S);
|
|
1962
1991
|
}
|
|
1963
1992
|
return {
|
|
1964
1993
|
canAccepts: n,
|
|
1965
1994
|
checkCanDeleteComponent: o,
|
|
1966
|
-
checkCanMoveComponent:
|
|
1967
|
-
hideNestedPaddingInDesginerView:
|
|
1968
|
-
onAcceptMovedChildElement:
|
|
1969
|
-
resolveComponentContext:
|
|
1970
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1995
|
+
checkCanMoveComponent: s,
|
|
1996
|
+
hideNestedPaddingInDesginerView: c,
|
|
1997
|
+
onAcceptMovedChildElement: i,
|
|
1998
|
+
resolveComponentContext: p,
|
|
1999
|
+
triggerBelongedComponentToMoveWhenMoved: g,
|
|
1971
2000
|
triggerBelongedComponentToDeleteWhenDeleted: y,
|
|
1972
|
-
getPropsConfig:
|
|
2001
|
+
getPropsConfig: l
|
|
1973
2002
|
};
|
|
1974
2003
|
}
|
|
1975
|
-
const
|
|
2004
|
+
const ln = /* @__PURE__ */ H({
|
|
1976
2005
|
name: "FComboListDesign",
|
|
1977
2006
|
props: ne,
|
|
1978
2007
|
emits: ["clear", "update:modelValue", "change"],
|
|
1979
2008
|
setup(e, t) {
|
|
1980
|
-
const n = C(), o = X("designer-host-service"),
|
|
2009
|
+
const n = C(), o = X("designer-host-service"), s = X("design-item-context"), c = rn(s, o), i = qe(n, s, c);
|
|
1981
2010
|
return ce(() => {
|
|
1982
|
-
n.value.componentInstance =
|
|
1983
|
-
}), t.expose(
|
|
2011
|
+
n.value.componentInstance = i;
|
|
2012
|
+
}), t.expose(i.value), () => b(Ge, {
|
|
1984
2013
|
ref: n,
|
|
1985
|
-
id: e.id,
|
|
1986
|
-
disable: e.disabled,
|
|
1987
|
-
readonly: e.readonly,
|
|
1988
|
-
forcePlaceholder: e.forcePlaceholder,
|
|
1989
|
-
editable: !1,
|
|
1990
2014
|
buttonContent: e.dropDownIcon,
|
|
2015
|
+
readonly: !0,
|
|
2016
|
+
editable: !1,
|
|
2017
|
+
forcePlaceholder: !0,
|
|
1991
2018
|
placeholder: e.placeholder,
|
|
1992
|
-
enableClear: !
|
|
1993
|
-
maxLength: e.maxLength,
|
|
1994
|
-
tabIndex: e.tabIndex,
|
|
1995
|
-
enableTitle: e.enableTitle,
|
|
1996
|
-
multiSelect: e.multiSelect,
|
|
1997
|
-
inputType: e.multiSelect ? "tag" : "text"
|
|
2019
|
+
enableClear: !0
|
|
1998
2020
|
}, null);
|
|
1999
2021
|
}
|
|
2000
|
-
}),
|
|
2022
|
+
}), sn = (e) => {
|
|
2001
2023
|
const t = e;
|
|
2002
2024
|
return t.install = function(n) {
|
|
2003
2025
|
n.component(t.name, e);
|
|
2004
2026
|
}, e;
|
|
2005
2027
|
};
|
|
2006
2028
|
G.register = (e, t, n, o) => {
|
|
2007
|
-
e["combo-list"] = G, t["combo-list"] =
|
|
2029
|
+
e["combo-list"] = G, t["combo-list"] = ye;
|
|
2008
2030
|
};
|
|
2009
2031
|
G.registerDesigner = (e, t, n) => {
|
|
2010
|
-
e["combo-list"] =
|
|
2032
|
+
e["combo-list"] = ln, t["combo-list"] = ye;
|
|
2011
2033
|
};
|
|
2012
|
-
const
|
|
2034
|
+
const _ = sn(G), z = /* @__PURE__ */ H({
|
|
2013
2035
|
name: "FOrder",
|
|
2014
2036
|
props: te,
|
|
2015
2037
|
emits: ["change"],
|
|
2016
2038
|
setup(e, t) {
|
|
2017
|
-
const n = C(e.items), o = C("排序列"),
|
|
2039
|
+
const n = C(e.items), o = C("排序列"), s = C("排序方式"), c = C("添加排序列"), i = [{
|
|
2018
2040
|
id: "asc",
|
|
2019
2041
|
name: "升序"
|
|
2020
2042
|
}, {
|
|
2021
2043
|
id: "desc",
|
|
2022
2044
|
name: "降序"
|
|
2023
|
-
}],
|
|
2024
|
-
function
|
|
2025
|
-
const
|
|
2026
|
-
|
|
2045
|
+
}], p = C(/* @__PURE__ */ new Map());
|
|
2046
|
+
function g() {
|
|
2047
|
+
const a = n.value.map((u) => [u.id, !0]);
|
|
2048
|
+
p.value = new Map(a);
|
|
2027
2049
|
}
|
|
2028
|
-
|
|
2029
|
-
const y = B(() => e.dataSource.map((
|
|
2050
|
+
g();
|
|
2051
|
+
const y = B(() => e.dataSource.map((a) => (a.disabled = p.value.has(a.id), a))), h = B(() => ({
|
|
2030
2052
|
"f-order": !0
|
|
2031
2053
|
}));
|
|
2032
|
-
function
|
|
2033
|
-
n.value = n.value.filter((
|
|
2054
|
+
function l(a) {
|
|
2055
|
+
n.value = n.value.filter((u) => u.id !== a.id), g(), t.emit("change", n.value);
|
|
2034
2056
|
}
|
|
2035
2057
|
function r() {
|
|
2036
2058
|
n.value = [...n.value, {
|
|
2037
2059
|
id: Date.now().toString(),
|
|
2038
2060
|
name: "",
|
|
2039
2061
|
order: "asc"
|
|
2040
|
-
}],
|
|
2062
|
+
}], g(), t.emit("change", n.value);
|
|
2041
2063
|
}
|
|
2042
|
-
function
|
|
2043
|
-
if (
|
|
2044
|
-
const
|
|
2045
|
-
k && (k.name =
|
|
2064
|
+
function S(a) {
|
|
2065
|
+
if (a && a.length === 1) {
|
|
2066
|
+
const u = a[0], k = n.value.find((F) => F.id === u.id);
|
|
2067
|
+
k && (k.name = u.name);
|
|
2046
2068
|
}
|
|
2047
|
-
|
|
2069
|
+
g(), t.emit("change", n.value);
|
|
2048
2070
|
}
|
|
2049
|
-
function a
|
|
2050
|
-
if (
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2071
|
+
function d(a) {
|
|
2072
|
+
if (a && a.length) {
|
|
2073
|
+
const u = /* @__PURE__ */ new Map();
|
|
2074
|
+
a.reduce((k, F) => (k.set(F.id, F), k), u), n.value = a.map((k) => u.get(k.id)), t.emit("change", n.value);
|
|
2053
2075
|
}
|
|
2054
2076
|
}
|
|
2055
|
-
function
|
|
2056
|
-
return
|
|
2077
|
+
function f() {
|
|
2078
|
+
return b(fe, {
|
|
2057
2079
|
style: "flex:1",
|
|
2058
2080
|
data: n.value,
|
|
2059
2081
|
draggable: !0,
|
|
2060
2082
|
view: "DraggableView",
|
|
2061
2083
|
"keep-order": !0,
|
|
2062
2084
|
itemClass: "f-order-item",
|
|
2063
|
-
onRemoveItem:
|
|
2064
|
-
onChange:
|
|
2085
|
+
onRemoveItem: l,
|
|
2086
|
+
onChange: d
|
|
2065
2087
|
}, {
|
|
2066
|
-
header: () =>
|
|
2088
|
+
header: () => b("div", {
|
|
2067
2089
|
class: "f-order-header"
|
|
2068
|
-
}, [
|
|
2090
|
+
}, [b("span", {
|
|
2069
2091
|
class: "f-order-header-order-field"
|
|
2070
|
-
}, [o.value]),
|
|
2092
|
+
}, [o.value]), b("span", {
|
|
2071
2093
|
class: "f-order-header-order-type"
|
|
2072
|
-
}, [
|
|
2073
|
-
itemContent: (
|
|
2094
|
+
}, [s.value])]),
|
|
2095
|
+
itemContent: (a) => b("div", {
|
|
2074
2096
|
class: "f-order-item-content"
|
|
2075
|
-
}, [
|
|
2097
|
+
}, [b(_, {
|
|
2076
2098
|
class: "f-order-item-content-order-field",
|
|
2077
2099
|
data: y.value,
|
|
2078
2100
|
valueField: "id",
|
|
2079
2101
|
textField: "name",
|
|
2080
2102
|
idField: "id",
|
|
2081
|
-
modelValue:
|
|
2082
|
-
"onUpdate:modelValue": (
|
|
2083
|
-
onChange:
|
|
2084
|
-
onClear:
|
|
2085
|
-
}, null),
|
|
2103
|
+
modelValue: a.id,
|
|
2104
|
+
"onUpdate:modelValue": (u) => a.id = u,
|
|
2105
|
+
onChange: S,
|
|
2106
|
+
onClear: S
|
|
2107
|
+
}, null), b(_, {
|
|
2086
2108
|
class: "f-order-item-content-order-type",
|
|
2087
|
-
data:
|
|
2109
|
+
data: i,
|
|
2088
2110
|
valueField: "id",
|
|
2089
2111
|
textField: "name",
|
|
2090
2112
|
idField: "id",
|
|
2091
|
-
modelValue:
|
|
2092
|
-
"onUpdate:modelValue": (
|
|
2093
|
-
onChange:
|
|
2113
|
+
modelValue: a.order,
|
|
2114
|
+
"onUpdate:modelValue": (u) => a.order = u,
|
|
2115
|
+
onChange: S
|
|
2094
2116
|
}, null)]),
|
|
2095
|
-
footer: () =>
|
|
2117
|
+
footer: () => b("div", {
|
|
2096
2118
|
class: "f-order-footer"
|
|
2097
|
-
}, [
|
|
2119
|
+
}, [b(me, {
|
|
2098
2120
|
type: "link",
|
|
2099
2121
|
class: "f-order-add-button",
|
|
2100
2122
|
onClick: r
|
|
2101
2123
|
}, {
|
|
2102
|
-
default: () =>
|
|
2124
|
+
default: () => b(Q, null, [b("span", {
|
|
2103
2125
|
class: "f-order-add-icon"
|
|
2104
|
-
}, [
|
|
2126
|
+
}, [b("i", {
|
|
2105
2127
|
class: "f-icon f-icon-add"
|
|
2106
|
-
}, null)]),
|
|
2128
|
+
}, null)]), c.value])
|
|
2107
2129
|
})])
|
|
2108
2130
|
});
|
|
2109
2131
|
}
|
|
2110
|
-
return () =>
|
|
2132
|
+
return () => b("div", {
|
|
2111
2133
|
class: h.value
|
|
2112
|
-
}, [
|
|
2134
|
+
}, [f()]);
|
|
2113
2135
|
}
|
|
2114
2136
|
});
|
|
2115
|
-
function
|
|
2116
|
-
var
|
|
2137
|
+
function cn(e, t, n) {
|
|
2138
|
+
var w;
|
|
2117
2139
|
function o() {
|
|
2118
2140
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
2119
2141
|
}
|
|
2120
2142
|
o();
|
|
2121
|
-
const
|
|
2122
|
-
function
|
|
2143
|
+
const s = n && n.getStyles && n.getStyles() || "", c = n && n.getDesignerClass && n.getDesignerClass() || "", i = C();
|
|
2144
|
+
function p() {
|
|
2123
2145
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2124
2146
|
}
|
|
2125
|
-
function
|
|
2147
|
+
function g() {
|
|
2126
2148
|
return !1;
|
|
2127
2149
|
}
|
|
2128
2150
|
function y() {
|
|
@@ -2131,88 +2153,88 @@ function ln(e, t, n) {
|
|
|
2131
2153
|
function h() {
|
|
2132
2154
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
2133
2155
|
}
|
|
2134
|
-
function
|
|
2135
|
-
if (!
|
|
2156
|
+
function l(v) {
|
|
2157
|
+
if (!v || !v.value)
|
|
2136
2158
|
return null;
|
|
2137
|
-
if (
|
|
2138
|
-
return
|
|
2139
|
-
const
|
|
2140
|
-
return
|
|
2159
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
2160
|
+
return v.value;
|
|
2161
|
+
const D = C(v == null ? void 0 : v.value.parent), m = l(D);
|
|
2162
|
+
return m || null;
|
|
2141
2163
|
}
|
|
2142
|
-
function r(
|
|
2143
|
-
const { componentInstance:
|
|
2144
|
-
return !
|
|
2164
|
+
function r(v = t) {
|
|
2165
|
+
const { componentInstance: D, designerItemElementRef: m } = v;
|
|
2166
|
+
return !D || !D.value ? null : D.value.canMove ? m : r(v.parent);
|
|
2145
2167
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return !!n && n.canAccepts(
|
|
2168
|
+
function S(v) {
|
|
2169
|
+
return !!n && n.canAccepts(v);
|
|
2148
2170
|
}
|
|
2149
|
-
function
|
|
2171
|
+
function d() {
|
|
2150
2172
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2151
2173
|
}
|
|
2152
|
-
function
|
|
2174
|
+
function f() {
|
|
2153
2175
|
}
|
|
2154
|
-
function
|
|
2155
|
-
|
|
2176
|
+
function a(v, D) {
|
|
2177
|
+
D && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(D);
|
|
2156
2178
|
}
|
|
2157
|
-
function
|
|
2158
|
-
const { componentType:
|
|
2159
|
-
let
|
|
2160
|
-
n && n.onResolveNewComponentSchema && (
|
|
2161
|
-
const
|
|
2162
|
-
return
|
|
2179
|
+
function u(v, D) {
|
|
2180
|
+
const { componentType: m } = v;
|
|
2181
|
+
let M = U(m, v, D);
|
|
2182
|
+
n && n.onResolveNewComponentSchema && (M = n.onResolveNewComponentSchema(v, M));
|
|
2183
|
+
const A = m.toLowerCase().replace("-", "_");
|
|
2184
|
+
return M && !M.id && M.type === m && (M.id = `${A}_${Math.random().toString().slice(2, 6)}`), M;
|
|
2163
2185
|
}
|
|
2164
|
-
function k(
|
|
2165
|
-
const
|
|
2166
|
-
A.parentComponentInstance =
|
|
2167
|
-
let
|
|
2168
|
-
n && n.onAcceptNewChildElement && (
|
|
2169
|
-
const $ =
|
|
2170
|
-
return
|
|
2186
|
+
function k(v, D) {
|
|
2187
|
+
const m = String(v.getAttribute("data-controltype")), M = v.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
|
|
2188
|
+
A.parentComponentInstance = i.value;
|
|
2189
|
+
let j = U(m, A);
|
|
2190
|
+
n && n.onAcceptNewChildElement && (j = n.onAcceptNewChildElement(v, D, j));
|
|
2191
|
+
const $ = m.toLowerCase().replace("-", "_");
|
|
2192
|
+
return j && !j.id && j.type === m && (j.id = `${$}_${Math.random().toString().slice(2, 6)}`), j;
|
|
2171
2193
|
}
|
|
2172
|
-
function F(
|
|
2194
|
+
function F(v) {
|
|
2173
2195
|
}
|
|
2174
|
-
function
|
|
2196
|
+
function V(...v) {
|
|
2175
2197
|
if (n && n.getPropsConfig)
|
|
2176
|
-
return n.getPropsConfig(...
|
|
2198
|
+
return n.getPropsConfig(...v);
|
|
2177
2199
|
}
|
|
2178
|
-
return
|
|
2179
|
-
canMove:
|
|
2180
|
-
canSelectParent:
|
|
2200
|
+
return i.value = {
|
|
2201
|
+
canMove: p(),
|
|
2202
|
+
canSelectParent: g(),
|
|
2181
2203
|
canDelete: y(),
|
|
2182
2204
|
canNested: !h(),
|
|
2183
2205
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2184
2206
|
elementRef: e,
|
|
2185
|
-
parent: (
|
|
2207
|
+
parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
|
|
2186
2208
|
schema: t == null ? void 0 : t.schema,
|
|
2187
|
-
styles:
|
|
2188
|
-
designerClass:
|
|
2189
|
-
canAccepts:
|
|
2190
|
-
getBelongedComponentInstance:
|
|
2209
|
+
styles: s,
|
|
2210
|
+
designerClass: c,
|
|
2211
|
+
canAccepts: S,
|
|
2212
|
+
getBelongedComponentInstance: l,
|
|
2191
2213
|
getDraggableDesignItemElement: r,
|
|
2192
|
-
getDraggingDisplayText:
|
|
2193
|
-
getPropConfig:
|
|
2194
|
-
getDragScopeElement:
|
|
2195
|
-
onAcceptMovedChildElement:
|
|
2214
|
+
getDraggingDisplayText: d,
|
|
2215
|
+
getPropConfig: V,
|
|
2216
|
+
getDragScopeElement: f,
|
|
2217
|
+
onAcceptMovedChildElement: a,
|
|
2196
2218
|
onAcceptNewChildElement: k,
|
|
2197
2219
|
onChildElementMovedOut: F,
|
|
2198
|
-
addNewChildComponentSchema:
|
|
2220
|
+
addNewChildComponentSchema: u,
|
|
2199
2221
|
updateDragAndDropRules: o,
|
|
2200
2222
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
2201
2223
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
2202
|
-
},
|
|
2224
|
+
}, i;
|
|
2203
2225
|
}
|
|
2204
|
-
function
|
|
2226
|
+
function un() {
|
|
2205
2227
|
function e(t) {
|
|
2206
|
-
var
|
|
2228
|
+
var s, c;
|
|
2207
2229
|
if (!t)
|
|
2208
2230
|
return !1;
|
|
2209
|
-
const n = ((
|
|
2231
|
+
const n = ((s = t.targetContainer) == null ? void 0 : s.componentInstance) && t.targetContainer.componentInstance.value;
|
|
2210
2232
|
if (!n)
|
|
2211
2233
|
return !1;
|
|
2212
|
-
const o = (
|
|
2234
|
+
const o = (c = n.schema.appearance) == null ? void 0 : c.class;
|
|
2213
2235
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2214
|
-
const
|
|
2215
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
2236
|
+
const i = n.schema.type, p = (i === "response-form" || i === "content-container") && o && o.includes("farris-form");
|
|
2237
|
+
if (n.schema.type !== "response-layout-item" && !p)
|
|
2216
2238
|
return !1;
|
|
2217
2239
|
}
|
|
2218
2240
|
return t.controlType !== "field-set";
|
|
@@ -2221,7 +2243,7 @@ function sn() {
|
|
|
2221
2243
|
basalDragulaRuleForContainer: e
|
|
2222
2244
|
};
|
|
2223
2245
|
}
|
|
2224
|
-
const
|
|
2246
|
+
const dn = "https://json-schema.org/draft/2020-12/schema", pn = "https://farris-design.gitee.io/dragging-rules.schema.json", fn = "Dragging Rules", mn = "The rules of designer canvas", yn = "object", gn = {
|
|
2225
2247
|
"f-page": {
|
|
2226
2248
|
description: "The root class of page designed by farris.",
|
|
2227
2249
|
type: "object",
|
|
@@ -2640,6 +2662,80 @@ const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
|
|
|
2640
2662
|
"f-list-nav-left": {
|
|
2641
2663
|
description: "",
|
|
2642
2664
|
type: "object"
|
|
2665
|
+
},
|
|
2666
|
+
"f-struct-data-grid-in-nav": {
|
|
2667
|
+
description: "",
|
|
2668
|
+
type: "object",
|
|
2669
|
+
properties: {
|
|
2670
|
+
contents: {
|
|
2671
|
+
type: "object",
|
|
2672
|
+
properties: {
|
|
2673
|
+
"f-section-form": {
|
|
2674
|
+
description: "",
|
|
2675
|
+
type: "object",
|
|
2676
|
+
properties: {
|
|
2677
|
+
rules: {
|
|
2678
|
+
type: "object",
|
|
2679
|
+
properties: {
|
|
2680
|
+
canAccept: {
|
|
2681
|
+
type: "boolean",
|
|
2682
|
+
const: !1
|
|
2683
|
+
},
|
|
2684
|
+
fixed: {
|
|
2685
|
+
type: "boolean",
|
|
2686
|
+
const: !0
|
|
2687
|
+
},
|
|
2688
|
+
hidePadding: {
|
|
2689
|
+
type: "boolean",
|
|
2690
|
+
const: !0
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
},
|
|
2696
|
+
"f-section-grid": {
|
|
2697
|
+
description: "",
|
|
2698
|
+
type: "object",
|
|
2699
|
+
properties: {
|
|
2700
|
+
rules: {
|
|
2701
|
+
type: "object",
|
|
2702
|
+
properties: {
|
|
2703
|
+
canAccept: {
|
|
2704
|
+
type: "boolean",
|
|
2705
|
+
const: !1
|
|
2706
|
+
},
|
|
2707
|
+
fixed: {
|
|
2708
|
+
type: "boolean",
|
|
2709
|
+
const: !0
|
|
2710
|
+
},
|
|
2711
|
+
hidePadding: {
|
|
2712
|
+
type: "boolean",
|
|
2713
|
+
const: !0
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
},
|
|
2721
|
+
rules: {
|
|
2722
|
+
type: "object",
|
|
2723
|
+
properties: {
|
|
2724
|
+
canAccept: {
|
|
2725
|
+
type: "boolean",
|
|
2726
|
+
const: !1
|
|
2727
|
+
},
|
|
2728
|
+
fixed: {
|
|
2729
|
+
type: "boolean",
|
|
2730
|
+
const: !0
|
|
2731
|
+
},
|
|
2732
|
+
hidePadding: {
|
|
2733
|
+
type: "boolean",
|
|
2734
|
+
const: !0
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2643
2739
|
}
|
|
2644
2740
|
}
|
|
2645
2741
|
}
|
|
@@ -2785,327 +2881,314 @@ const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
|
|
|
2785
2881
|
description: "",
|
|
2786
2882
|
type: "object"
|
|
2787
2883
|
}
|
|
2788
|
-
},
|
|
2789
|
-
$schema:
|
|
2790
|
-
$id:
|
|
2791
|
-
title:
|
|
2792
|
-
description:
|
|
2793
|
-
type:
|
|
2794
|
-
properties:
|
|
2795
|
-
required: yn
|
|
2884
|
+
}, hn = {
|
|
2885
|
+
$schema: dn,
|
|
2886
|
+
$id: pn,
|
|
2887
|
+
title: fn,
|
|
2888
|
+
description: mn,
|
|
2889
|
+
type: yn,
|
|
2890
|
+
properties: gn
|
|
2796
2891
|
}, J = /* @__PURE__ */ new Map();
|
|
2797
|
-
function
|
|
2798
|
-
function e(
|
|
2892
|
+
function bn() {
|
|
2893
|
+
function e(d, f, a, u) {
|
|
2799
2894
|
var k;
|
|
2800
|
-
if (typeof
|
|
2801
|
-
return ((k = d
|
|
2802
|
-
if (typeof
|
|
2803
|
-
const F = Object.keys(
|
|
2895
|
+
if (typeof a == "number")
|
|
2896
|
+
return ((k = u[d]) == null ? void 0 : k.length) === a;
|
|
2897
|
+
if (typeof a == "object") {
|
|
2898
|
+
const F = Object.keys(a)[0], V = a[F];
|
|
2804
2899
|
if (F === "not")
|
|
2805
|
-
return Number(d
|
|
2900
|
+
return Number(u[d].length) !== Number(V);
|
|
2806
2901
|
if (F === "moreThan")
|
|
2807
|
-
return Number(d
|
|
2902
|
+
return Number(u[d].length) >= Number(V);
|
|
2808
2903
|
if (F === "lessThan")
|
|
2809
|
-
return Number(d
|
|
2904
|
+
return Number(u[d].length) <= Number(V);
|
|
2810
2905
|
}
|
|
2811
2906
|
return !1;
|
|
2812
2907
|
}
|
|
2813
|
-
function t(
|
|
2814
|
-
return typeof
|
|
2908
|
+
function t(d, f, a, u) {
|
|
2909
|
+
return typeof a == "boolean" ? u.childrenClassList.includes(f) === !!a : !1;
|
|
2815
2910
|
}
|
|
2816
|
-
function n(
|
|
2817
|
-
return typeof
|
|
2911
|
+
function n(d, f, a, u) {
|
|
2912
|
+
return typeof a == "boolean" ? u.parentClassList.includes(f) === !!a : !1;
|
|
2818
2913
|
}
|
|
2819
|
-
function o(
|
|
2820
|
-
return typeof
|
|
2914
|
+
function o(d, f, a, u) {
|
|
2915
|
+
return typeof a == "boolean" ? u.parentClassList.includes(f) === !!a : !1;
|
|
2821
2916
|
}
|
|
2822
|
-
const
|
|
2917
|
+
const s = /* @__PURE__ */ new Map([
|
|
2823
2918
|
["length", e],
|
|
2824
2919
|
["hasChildren", t],
|
|
2825
2920
|
["hasSibling", o],
|
|
2826
2921
|
["hasParent", n]
|
|
2827
2922
|
]);
|
|
2828
|
-
function
|
|
2829
|
-
const
|
|
2830
|
-
return typeof
|
|
2831
|
-
if (
|
|
2832
|
-
return { target:
|
|
2833
|
-
const k =
|
|
2834
|
-
return { target:
|
|
2923
|
+
function c(d, f) {
|
|
2924
|
+
const a = d;
|
|
2925
|
+
return typeof f == "number" ? [{ target: a, operator: "length", param: null, value: Number(f) }] : typeof f == "object" ? Object.keys(f).map((u) => {
|
|
2926
|
+
if (u === "length")
|
|
2927
|
+
return { target: a, operator: "length", param: null, value: f[u] };
|
|
2928
|
+
const k = u, F = f[u];
|
|
2929
|
+
return { target: a, operator: d === "children" ? "hasChildren" : d === "parent" ? "hasParent" : "hasSibling", param: k, value: F };
|
|
2835
2930
|
}) : [];
|
|
2836
2931
|
}
|
|
2837
|
-
function
|
|
2838
|
-
if (
|
|
2839
|
-
const
|
|
2840
|
-
return
|
|
2932
|
+
function i(d, f) {
|
|
2933
|
+
if (s.has(d.operator)) {
|
|
2934
|
+
const a = s.get(d.operator);
|
|
2935
|
+
return a && a(d.target, d.param, d.value, f) || !1;
|
|
2841
2936
|
}
|
|
2842
2937
|
return !1;
|
|
2843
2938
|
}
|
|
2844
|
-
function
|
|
2845
|
-
return Object.keys(
|
|
2846
|
-
const
|
|
2847
|
-
return F.push(...
|
|
2848
|
-
}, []).reduce((F,
|
|
2849
|
-
}
|
|
2850
|
-
function
|
|
2851
|
-
const
|
|
2852
|
-
return
|
|
2853
|
-
}
|
|
2854
|
-
function y(
|
|
2855
|
-
const
|
|
2856
|
-
return
|
|
2857
|
-
}
|
|
2858
|
-
function h(
|
|
2859
|
-
return (
|
|
2860
|
-
const
|
|
2861
|
-
return
|
|
2862
|
-
const F =
|
|
2863
|
-
return
|
|
2864
|
-
},
|
|
2939
|
+
function p(d, f) {
|
|
2940
|
+
return Object.keys(d).reduce((F, V) => {
|
|
2941
|
+
const w = c(V, d[V]);
|
|
2942
|
+
return F.push(...w), F;
|
|
2943
|
+
}, []).reduce((F, V) => F && i(V, f), !0);
|
|
2944
|
+
}
|
|
2945
|
+
function g(d, f) {
|
|
2946
|
+
const a = Object.keys(d), u = a.includes("allOf"), k = a.includes("anyOf"), F = u || k, v = (F ? d[F ? u ? "allOf" : "anyOf" : "allOf"] : [d]).map((m) => p(m, f));
|
|
2947
|
+
return u ? !v.includes(!1) : v.includes(!0);
|
|
2948
|
+
}
|
|
2949
|
+
function y(d, f) {
|
|
2950
|
+
const a = d.const;
|
|
2951
|
+
return a ? typeof a == "boolean" ? a : typeof a == "object" ? g(a, f) : !1 : !1;
|
|
2952
|
+
}
|
|
2953
|
+
function h(d) {
|
|
2954
|
+
return (f) => {
|
|
2955
|
+
const a = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2956
|
+
return d && d.properties && Object.keys(d.properties).reduce((u, k) => {
|
|
2957
|
+
const F = d.properties[k];
|
|
2958
|
+
return u[k] = y(F, f), u;
|
|
2959
|
+
}, a), a;
|
|
2865
2960
|
};
|
|
2866
2961
|
}
|
|
2867
|
-
function
|
|
2868
|
-
if (
|
|
2869
|
-
const { rules:
|
|
2870
|
-
|
|
2871
|
-
(F) =>
|
|
2962
|
+
function l(d, f, a) {
|
|
2963
|
+
if (f.type === "object" && f.properties) {
|
|
2964
|
+
const { rules: u, contents: k } = f.properties;
|
|
2965
|
+
a.set(d, h(u)), k && Object.keys(k.properties).forEach(
|
|
2966
|
+
(F) => l(F, k.properties[F], a)
|
|
2872
2967
|
);
|
|
2873
2968
|
}
|
|
2874
2969
|
}
|
|
2875
2970
|
function r() {
|
|
2876
|
-
const { properties:
|
|
2877
|
-
Object.keys(
|
|
2878
|
-
|
|
2971
|
+
const { properties: d } = hn;
|
|
2972
|
+
Object.keys(d).forEach((f) => {
|
|
2973
|
+
l(f, d[f], J);
|
|
2879
2974
|
});
|
|
2880
2975
|
}
|
|
2881
|
-
function
|
|
2882
|
-
const
|
|
2883
|
-
return J.has(
|
|
2976
|
+
function S(d, f) {
|
|
2977
|
+
const a = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2978
|
+
return J.has(d) ? J.get(d)(f) : a;
|
|
2884
2979
|
}
|
|
2885
|
-
return r(), { getRuleValue:
|
|
2980
|
+
return r(), { getRuleValue: S };
|
|
2886
2981
|
}
|
|
2887
|
-
function
|
|
2888
|
-
var
|
|
2889
|
-
const n = e.schema, o = (
|
|
2890
|
-
let
|
|
2891
|
-
function
|
|
2892
|
-
return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ?
|
|
2982
|
+
function vn(e, t) {
|
|
2983
|
+
var D;
|
|
2984
|
+
const n = e.schema, o = (D = e.parent) == null ? void 0 : D.schema, s = bn(), c = C(!1), i = C(!1);
|
|
2985
|
+
let p = !0, g = !1, y, h = !1;
|
|
2986
|
+
function l(m) {
|
|
2987
|
+
return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? m.sourceType === "control" && m.controlCategory === "input" || m.sourceType === "move" && m.controlType === "form-group" : !0;
|
|
2893
2988
|
}
|
|
2894
|
-
function r(
|
|
2895
|
-
return !(!
|
|
2989
|
+
function r(m) {
|
|
2990
|
+
return !(!un().basalDragulaRuleForContainer(m) || !p || !l(m));
|
|
2896
2991
|
}
|
|
2897
|
-
function
|
|
2898
|
-
|
|
2899
|
-
const
|
|
2900
|
-
const ae = W && W.appearance ? W.appearance.class : "",
|
|
2901
|
-
return oe.push(...
|
|
2902
|
-
}, []) : [], I = o,
|
|
2992
|
+
function S() {
|
|
2993
|
+
c.value = !1, i.value = !1;
|
|
2994
|
+
const m = n, M = m.appearance && m.appearance.class || "", A = M.split(" "), j = m.contents || [], $ = j.length ? j[0] : null, O = $ && $.appearance ? $.appearance.class : "", P = O ? O.split(" ") : [], x = j.length ? j.reduce((oe, W) => {
|
|
2995
|
+
const ae = W && W.appearance ? W.appearance.class : "", Ce = ae ? ae.split(" ") : [];
|
|
2996
|
+
return oe.push(...Ce), oe;
|
|
2997
|
+
}, []) : [], I = o, L = I && I.appearance && I.appearance.class || "", ge = L ? L.split(" ") : [];
|
|
2903
2998
|
y = {
|
|
2904
2999
|
componentClass: M,
|
|
2905
3000
|
componentClassList: A,
|
|
2906
|
-
childContents:
|
|
3001
|
+
childContents: j,
|
|
2907
3002
|
firstChildContent: $,
|
|
2908
3003
|
firstChildClass: O,
|
|
2909
3004
|
firstChildClassList: P,
|
|
2910
3005
|
parent: I,
|
|
2911
|
-
parentClass:
|
|
2912
|
-
parentClassList:
|
|
2913
|
-
children:
|
|
2914
|
-
childrenClassList:
|
|
3006
|
+
parentClass: L,
|
|
3007
|
+
parentClassList: ge,
|
|
3008
|
+
children: j,
|
|
3009
|
+
childrenClassList: x
|
|
2915
3010
|
};
|
|
2916
|
-
const { canAccept:
|
|
2917
|
-
return
|
|
3011
|
+
const { canAccept: he, fixed: be, hidePadding: ve } = s.getRuleValue(A[0], y);
|
|
3012
|
+
return p = he, g = ve, h = be, !0;
|
|
2918
3013
|
}
|
|
2919
|
-
function
|
|
2920
|
-
|
|
3014
|
+
function d(m) {
|
|
3015
|
+
Me();
|
|
2921
3016
|
}
|
|
2922
|
-
function
|
|
3017
|
+
function f() {
|
|
2923
3018
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2924
3019
|
}
|
|
2925
|
-
function
|
|
3020
|
+
function a(m, M) {
|
|
2926
3021
|
const A = n;
|
|
2927
3022
|
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2928
|
-
const { label: O } =
|
|
2929
|
-
return P.editor = M, P.label = O,
|
|
3023
|
+
const { label: O } = m, P = U("form-group");
|
|
3024
|
+
return P.editor = M, P.label = O, u(P), delete P.editor.id, delete P.editor.binding, delete P.editor.appearance, delete P.editor.visible, P;
|
|
2930
3025
|
}
|
|
2931
3026
|
return M;
|
|
2932
3027
|
}
|
|
2933
|
-
function
|
|
3028
|
+
function u(m) {
|
|
2934
3029
|
const M = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
2935
3030
|
if (M && M.schema && M.schema.componentType) {
|
|
2936
|
-
const A = M.schema.
|
|
2937
|
-
|
|
3031
|
+
const A = M.schema.formColumns, j = k(A);
|
|
3032
|
+
m.appearance || (m.appearance = {}), m.appearance.class = j;
|
|
2938
3033
|
}
|
|
2939
3034
|
}
|
|
2940
|
-
function k(
|
|
3035
|
+
function k(m) {
|
|
2941
3036
|
let M = "";
|
|
2942
|
-
switch (
|
|
2943
|
-
case
|
|
3037
|
+
switch (m) {
|
|
3038
|
+
case 1: {
|
|
2944
3039
|
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2945
3040
|
break;
|
|
2946
3041
|
}
|
|
2947
|
-
case
|
|
2948
|
-
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2949
|
-
break;
|
|
2950
|
-
}
|
|
2951
|
-
case "form-col-2": {
|
|
3042
|
+
case 2: {
|
|
2952
3043
|
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2953
3044
|
break;
|
|
2954
3045
|
}
|
|
2955
|
-
case
|
|
3046
|
+
case 3: {
|
|
2956
3047
|
M = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
2957
3048
|
break;
|
|
2958
3049
|
}
|
|
2959
|
-
case
|
|
3050
|
+
case 4: {
|
|
2960
3051
|
M = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
2961
3052
|
break;
|
|
2962
3053
|
}
|
|
2963
|
-
case "form-col-6": {
|
|
2964
|
-
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2965
|
-
break;
|
|
2966
|
-
}
|
|
2967
|
-
case "frame": {
|
|
2968
|
-
M = "col-12";
|
|
2969
|
-
break;
|
|
2970
|
-
}
|
|
2971
3054
|
}
|
|
2972
3055
|
return M;
|
|
2973
3056
|
}
|
|
2974
|
-
function F(
|
|
2975
|
-
const
|
|
2976
|
-
if ((
|
|
2977
|
-
const P = String(
|
|
2978
|
-
return
|
|
3057
|
+
function F(m, M, A) {
|
|
3058
|
+
const j = n;
|
|
3059
|
+
if ((j.appearance && j.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3060
|
+
const P = String(m.innerText), x = U("form-group");
|
|
3061
|
+
return x.editor = A, x.label = P, x;
|
|
2979
3062
|
}
|
|
2980
3063
|
return A;
|
|
2981
3064
|
}
|
|
2982
|
-
function
|
|
3065
|
+
function V() {
|
|
2983
3066
|
return !h;
|
|
2984
3067
|
}
|
|
2985
|
-
function
|
|
3068
|
+
function w() {
|
|
2986
3069
|
return !h;
|
|
2987
3070
|
}
|
|
2988
|
-
function
|
|
2989
|
-
return
|
|
3071
|
+
function v() {
|
|
3072
|
+
return g;
|
|
2990
3073
|
}
|
|
2991
3074
|
return {
|
|
2992
3075
|
canAccepts: r,
|
|
2993
|
-
checkCanDeleteComponent:
|
|
2994
|
-
checkCanMoveComponent:
|
|
2995
|
-
getStyles:
|
|
2996
|
-
hideNestedPaddingInDesginerView:
|
|
3076
|
+
checkCanDeleteComponent: w,
|
|
3077
|
+
checkCanMoveComponent: V,
|
|
3078
|
+
getStyles: f,
|
|
3079
|
+
hideNestedPaddingInDesginerView: v,
|
|
2997
3080
|
onAcceptNewChildElement: F,
|
|
2998
|
-
onAcceptMovedChildElement:
|
|
2999
|
-
resolveComponentContext:
|
|
3000
|
-
onResolveNewComponentSchema:
|
|
3001
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
3002
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3081
|
+
onAcceptMovedChildElement: d,
|
|
3082
|
+
resolveComponentContext: S,
|
|
3083
|
+
onResolveNewComponentSchema: a,
|
|
3084
|
+
triggerBelongedComponentToMoveWhenMoved: c,
|
|
3085
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
3003
3086
|
};
|
|
3004
3087
|
}
|
|
3005
|
-
const
|
|
3088
|
+
const Cn = /* @__PURE__ */ H({
|
|
3006
3089
|
name: "FOrderDesign",
|
|
3007
3090
|
props: te,
|
|
3008
3091
|
emits: ["change"],
|
|
3009
3092
|
setup(e, t) {
|
|
3010
|
-
var
|
|
3011
|
-
const n = C(e.items), o = C("排序列"),
|
|
3093
|
+
var V;
|
|
3094
|
+
const n = C(e.items), o = C("排序列"), s = C("排序方式"), c = C("添加排序列"), i = [{
|
|
3012
3095
|
id: "asc",
|
|
3013
3096
|
name: "升序"
|
|
3014
3097
|
}, {
|
|
3015
3098
|
id: "desc",
|
|
3016
3099
|
name: "降序"
|
|
3017
|
-
}],
|
|
3100
|
+
}], p = C(/* @__PURE__ */ new Map()), g = C(), y = X("design-item-context"), h = vn(y.schema, (V = y.parent) == null ? void 0 : V.schema), l = cn(g, y, h);
|
|
3018
3101
|
ce(() => {
|
|
3019
|
-
|
|
3020
|
-
}), t.expose(
|
|
3102
|
+
g.value.componentInstance = l;
|
|
3103
|
+
}), t.expose(l.value);
|
|
3021
3104
|
function r() {
|
|
3022
|
-
const
|
|
3023
|
-
|
|
3105
|
+
const w = n.value.map((v) => [v.id, !0]);
|
|
3106
|
+
p.value = new Map(w);
|
|
3024
3107
|
}
|
|
3025
3108
|
r();
|
|
3026
|
-
const
|
|
3109
|
+
const S = B(() => e.dataSource.map((w) => (w.disabled = p.value.has(w.id), w))), d = B(() => ({
|
|
3027
3110
|
"f-order": !0
|
|
3028
3111
|
}));
|
|
3029
|
-
function
|
|
3030
|
-
n.value = n.value.filter((
|
|
3112
|
+
function f(w) {
|
|
3113
|
+
n.value = n.value.filter((v) => v.id !== w.id), r(), t.emit("change", n.value);
|
|
3031
3114
|
}
|
|
3032
|
-
function
|
|
3115
|
+
function a() {
|
|
3033
3116
|
n.value = [...n.value, {
|
|
3034
3117
|
id: Date.now().toString(),
|
|
3035
3118
|
name: "",
|
|
3036
3119
|
order: "asc"
|
|
3037
3120
|
}], r(), t.emit("change", n.value);
|
|
3038
3121
|
}
|
|
3039
|
-
function
|
|
3122
|
+
function u(w) {
|
|
3040
3123
|
r(), t.emit("change", n.value);
|
|
3041
3124
|
}
|
|
3042
|
-
function k(
|
|
3043
|
-
if (
|
|
3044
|
-
const
|
|
3045
|
-
|
|
3125
|
+
function k(w) {
|
|
3126
|
+
if (w && w.length) {
|
|
3127
|
+
const v = /* @__PURE__ */ new Map();
|
|
3128
|
+
w.reduce((D, m) => (D.set(m.id, m), D), v), n.value = w.map((D) => v.get(D.id)), t.emit("change", n.value);
|
|
3046
3129
|
}
|
|
3047
3130
|
}
|
|
3048
3131
|
function F() {
|
|
3049
|
-
return
|
|
3132
|
+
return b(fe, {
|
|
3050
3133
|
style: "flex:1",
|
|
3051
3134
|
data: n.value,
|
|
3052
3135
|
draggable: !0,
|
|
3053
3136
|
view: "DraggableView",
|
|
3054
3137
|
"keep-order": !0,
|
|
3055
3138
|
itemClass: "f-order-item",
|
|
3056
|
-
onRemoveItem:
|
|
3139
|
+
onRemoveItem: f,
|
|
3057
3140
|
onChange: k
|
|
3058
3141
|
}, {
|
|
3059
|
-
header: () =>
|
|
3142
|
+
header: () => b("div", {
|
|
3060
3143
|
class: "f-order-header"
|
|
3061
|
-
}, [
|
|
3144
|
+
}, [b("span", {
|
|
3062
3145
|
class: "f-order-header-order-field"
|
|
3063
|
-
}, [o.value]),
|
|
3146
|
+
}, [o.value]), b("span", {
|
|
3064
3147
|
class: "f-order-header-order-type"
|
|
3065
|
-
}, [
|
|
3066
|
-
itemContent: (
|
|
3148
|
+
}, [s.value])]),
|
|
3149
|
+
itemContent: (w) => b("div", {
|
|
3067
3150
|
class: "f-order-item-content"
|
|
3068
|
-
}, [
|
|
3151
|
+
}, [b(_, {
|
|
3069
3152
|
class: "f-order-item-content-order-field",
|
|
3070
|
-
data:
|
|
3153
|
+
data: S.value,
|
|
3071
3154
|
valueField: "id",
|
|
3072
3155
|
textField: "name",
|
|
3073
3156
|
idField: "id",
|
|
3074
|
-
modelValue:
|
|
3075
|
-
"onUpdate:modelValue": (
|
|
3076
|
-
onChange:
|
|
3077
|
-
onClear:
|
|
3078
|
-
}, null),
|
|
3157
|
+
modelValue: w.id,
|
|
3158
|
+
"onUpdate:modelValue": (v) => w.id = v,
|
|
3159
|
+
onChange: u,
|
|
3160
|
+
onClear: u
|
|
3161
|
+
}, null), b(_, {
|
|
3079
3162
|
class: "f-order-item-content-order-type",
|
|
3080
|
-
data:
|
|
3163
|
+
data: i,
|
|
3081
3164
|
valueField: "id",
|
|
3082
3165
|
textField: "name",
|
|
3083
3166
|
idField: "id",
|
|
3084
|
-
modelValue:
|
|
3085
|
-
"onUpdate:modelValue": (
|
|
3086
|
-
onChange:
|
|
3167
|
+
modelValue: w.order,
|
|
3168
|
+
"onUpdate:modelValue": (v) => w.order = v,
|
|
3169
|
+
onChange: u
|
|
3087
3170
|
}, null)]),
|
|
3088
|
-
footer: () =>
|
|
3171
|
+
footer: () => b("div", {
|
|
3089
3172
|
class: "f-order-footer"
|
|
3090
|
-
}, [
|
|
3173
|
+
}, [b(me, {
|
|
3091
3174
|
type: "link",
|
|
3092
3175
|
class: "f-order-add-button",
|
|
3093
|
-
onClick:
|
|
3176
|
+
onClick: a
|
|
3094
3177
|
}, {
|
|
3095
|
-
default: () =>
|
|
3178
|
+
default: () => b(Q, null, [b("span", {
|
|
3096
3179
|
class: "f-order-add-icon"
|
|
3097
|
-
}, [
|
|
3180
|
+
}, [b("i", {
|
|
3098
3181
|
class: "f-icon f-icon-add"
|
|
3099
|
-
}, null)]),
|
|
3182
|
+
}, null)]), c.value])
|
|
3100
3183
|
})])
|
|
3101
3184
|
});
|
|
3102
3185
|
}
|
|
3103
|
-
return () =>
|
|
3104
|
-
ref:
|
|
3105
|
-
class:
|
|
3186
|
+
return () => b("div", {
|
|
3187
|
+
ref: g,
|
|
3188
|
+
class: d.value
|
|
3106
3189
|
}, [F()]);
|
|
3107
3190
|
}
|
|
3108
|
-
}),
|
|
3191
|
+
}), In = {
|
|
3109
3192
|
install(e) {
|
|
3110
3193
|
e.component(z.name, z);
|
|
3111
3194
|
},
|
|
@@ -3113,12 +3196,12 @@ const vn = /* @__PURE__ */ H({
|
|
|
3113
3196
|
e.order = z, t.order = ie;
|
|
3114
3197
|
},
|
|
3115
3198
|
registerDesigner(e, t, n) {
|
|
3116
|
-
e.order =
|
|
3199
|
+
e.order = Cn, t.order = ie;
|
|
3117
3200
|
}
|
|
3118
3201
|
};
|
|
3119
3202
|
export {
|
|
3120
3203
|
z as FOrder,
|
|
3121
|
-
|
|
3204
|
+
In as default,
|
|
3122
3205
|
te as orderProps,
|
|
3123
3206
|
ie as propsResolver
|
|
3124
3207
|
};
|