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