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