@farris/ui-vue 1.2.5 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +122 -131
- 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/package.json +1 -1
- package/components/checkbox/index.esm.js +216 -223
- 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 +201 -181
- 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/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 +341 -338
- 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 +3415 -3295
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2719 -2717
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +31 -40
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +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 +578 -584
- 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 +287 -278
- 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 +1923 -1908
- 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 +3719 -3604
- 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 +483 -470
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- 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 +258 -267
- 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 +1452 -1450
- 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 +4860 -4657
- 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 +4411 -4259
- 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/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +763 -741
- 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 +948 -945
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +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 +485 -466
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +437 -426
- 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 +98 -107
- 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 +840 -800
- 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 +757 -760
- 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 +3659 -3432
- 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 +126 -135
- 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 +1400 -1379
- 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 +97 -106
- 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 +393 -402
- 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 +124 -122
- 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 +3531 -3412
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2046 -2044
- 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 +12370 -11917
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/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/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- 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/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/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/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
- package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- 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 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -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/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/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-canvas/{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/flow-canvas/{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,16 +1,16 @@
|
|
|
1
1
|
var Ce = Object.defineProperty;
|
|
2
2
|
var Se = (e, t, n) => t in e ? Ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var $ = (e, t, n) => Se(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { ref as
|
|
4
|
+
import { ref as C, computed as B, createVNode as v, Fragment as Q, watch as H, withModifiers as we, withDirectives as Fe, vModelText as ke, defineComponent as N, inject as q, onMounted as ie, nextTick as Te } from "vue";
|
|
5
5
|
import { cloneDeep as Me } from "lodash-es";
|
|
6
|
-
import { useIdentify as Ve, useHierarchy as De, useGroupData as je, usePagination as Ie, useDataView as
|
|
6
|
+
import { useIdentify as Ve, useHierarchy as De, useGroupData as je, usePagination as Ie, useDataView as Oe, useSelection as Pe, useEdit as Be, useVisualDataBound as Ae, useVisualDataCell as xe, useVisualDataRow as Le, useVisualGroupRow as $e, useVisualSummaryRow as Ee, useVisualData as He } from "@farris/ui-vue/components/data-view";
|
|
7
7
|
import { FCheckBox as X } from "@farris/ui-vue/components/checkbox";
|
|
8
|
-
import
|
|
8
|
+
import Ne from "@farris/ui-vue/components/list-view";
|
|
9
9
|
import le from "@farris/ui-vue/components/button-edit";
|
|
10
10
|
import { useDesignerComponent as Re } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component";
|
|
11
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, r) => (c[r] = t[r].type === "object" && t[r].properties ? Y(t[r]) : Me(t[r].default), c), {});
|
|
14
14
|
return o.id = `${n}-${Date.now()}`, o;
|
|
15
15
|
}
|
|
16
16
|
function R(e, t = {}) {
|
|
@@ -29,11 +29,11 @@ function Ue(e, t) {
|
|
|
29
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 r = t.get(c);
|
|
33
|
+
if (typeof r == "string")
|
|
34
|
+
o[r] = e[c];
|
|
35
35
|
else {
|
|
36
|
-
const d =
|
|
36
|
+
const d = r(c, e[c], e);
|
|
37
37
|
Object.assign(o, d);
|
|
38
38
|
}
|
|
39
39
|
} else
|
|
@@ -46,65 +46,65 @@ function Ge(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
46
46
|
return ze(o, n);
|
|
47
47
|
}
|
|
48
48
|
function _e(e = {}) {
|
|
49
|
-
function t(
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(
|
|
58
|
-
if (
|
|
59
|
-
return Number(
|
|
49
|
+
function t(m, g, l, i) {
|
|
50
|
+
if (typeof l == "number")
|
|
51
|
+
return i[m].length === l;
|
|
52
|
+
if (typeof l == "object") {
|
|
53
|
+
const h = Object.keys(l)[0], a = l[h];
|
|
54
|
+
if (h === "not")
|
|
55
|
+
return Number(i[m].length) !== Number(a);
|
|
56
|
+
if (h === "moreThan")
|
|
57
|
+
return Number(i[m].length) >= Number(a);
|
|
58
|
+
if (h === "lessThan")
|
|
59
|
+
return Number(i[m].length) <= Number(a);
|
|
60
60
|
}
|
|
61
61
|
return !1;
|
|
62
62
|
}
|
|
63
|
-
function n(
|
|
64
|
-
return
|
|
63
|
+
function n(m, g, l, i) {
|
|
64
|
+
return i[m] && i[m].propertyValue && String(i[m].propertyValue.value) === String(l);
|
|
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
|
|
73
|
-
return typeof
|
|
74
|
-
if (
|
|
75
|
-
return { target:
|
|
76
|
-
const
|
|
77
|
-
return { target:
|
|
70
|
+
Object.keys(e).reduce((m, g) => (m.set(g, e[g]), m), o);
|
|
71
|
+
function c(m, g) {
|
|
72
|
+
const l = m;
|
|
73
|
+
return typeof g == "number" ? [{ target: l, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: l, operator: "getProperty", param: m, value: !!g }] : typeof g == "object" ? Object.keys(g).map((i) => {
|
|
74
|
+
if (i === "length")
|
|
75
|
+
return { target: l, operator: "length", param: null, value: g[i] };
|
|
76
|
+
const h = i, a = g[i];
|
|
77
|
+
return { target: l, operator: "getProperty", param: h, value: a };
|
|
78
78
|
}) : [];
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return Object.keys(
|
|
82
|
-
const
|
|
83
|
-
return
|
|
80
|
+
function r(m) {
|
|
81
|
+
return Object.keys(m).reduce((l, i) => {
|
|
82
|
+
const h = c(i, m[i]);
|
|
83
|
+
return l.push(...h), l;
|
|
84
84
|
}, []);
|
|
85
85
|
}
|
|
86
|
-
function d(
|
|
87
|
-
if (o.has(
|
|
88
|
-
const
|
|
89
|
-
return
|
|
86
|
+
function d(m, g) {
|
|
87
|
+
if (o.has(m.operator)) {
|
|
88
|
+
const l = o.get(m.operator);
|
|
89
|
+
return l && l(m.target, m.param, m.value, g) || !1;
|
|
90
90
|
}
|
|
91
91
|
return !1;
|
|
92
92
|
}
|
|
93
|
-
function m
|
|
94
|
-
return
|
|
93
|
+
function y(m, g) {
|
|
94
|
+
return r(m).reduce((h, a) => h && d(a, g), !0);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
96
|
+
function w(m, g) {
|
|
97
|
+
const l = Object.keys(m), i = l.includes("allOf"), h = l.includes("anyOf"), a = i || h, u = (a ? m[a ? i ? "allOf" : "anyOf" : "allOf"] : [m]).map((k) => y(k, g));
|
|
98
|
+
return i ? !u.includes(!1) : u.includes(!0);
|
|
99
99
|
}
|
|
100
|
-
return { parseValueSchema:
|
|
100
|
+
return { parseValueSchema: w };
|
|
101
101
|
}
|
|
102
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 M = {
|
|
|
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 M = {
|
|
|
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 M = {
|
|
|
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" },
|
|
@@ -212,10 +212,10 @@ const M = {
|
|
|
212
212
|
/** 审批类 end */
|
|
213
213
|
}, We = {}, qe = {};
|
|
214
214
|
_e();
|
|
215
|
-
function Z(e, t, n = /* @__PURE__ */ new Map(), o = (d,
|
|
216
|
-
return se[t.title] = t, ce[t.title] = o, We[t.title] = c, qe[t.title] =
|
|
217
|
-
const
|
|
218
|
-
return Object.assign(
|
|
215
|
+
function Z(e, t, n = /* @__PURE__ */ new Map(), o = (d, y, w) => y, c = {}, r = (d) => d) {
|
|
216
|
+
return se[t.title] = t, ce[t.title] = o, We[t.title] = c, qe[t.title] = r, (d = {}) => {
|
|
217
|
+
const y = Ge(d, t, n), w = Object.keys(e).reduce((m, g) => (m[g] = e[g].default, m), {});
|
|
218
|
+
return Object.assign(w, y);
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
function J(e, t) {
|
|
@@ -580,199 +580,201 @@ const dt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-
|
|
|
580
580
|
}
|
|
581
581
|
},
|
|
582
582
|
keepOrder: { type: Boolean, default: !1 },
|
|
583
|
-
disableField: { type: String, default: "disabled" }
|
|
583
|
+
disableField: { type: String, default: "disabled" },
|
|
584
|
+
// 搜索启用高亮
|
|
585
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
584
586
|
};
|
|
585
587
|
Z(ue, vt, ct, ut, Ft);
|
|
586
|
-
function
|
|
587
|
-
function n(
|
|
588
|
+
function kt(e, t) {
|
|
589
|
+
function n(r) {
|
|
588
590
|
const d = [];
|
|
589
|
-
let
|
|
590
|
-
for (;
|
|
591
|
-
d.push(
|
|
591
|
+
let y = r.nextNode();
|
|
592
|
+
for (; y; )
|
|
593
|
+
d.push(y), y = r.nextNode();
|
|
592
594
|
return d;
|
|
593
595
|
}
|
|
594
|
-
function o(
|
|
595
|
-
const
|
|
596
|
-
return n(
|
|
597
|
-
const
|
|
598
|
-
let
|
|
599
|
-
for (;
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
596
|
+
function o(r, d) {
|
|
597
|
+
const y = document.createTreeWalker(r, NodeFilter.SHOW_TEXT);
|
|
598
|
+
return n(y).map((l) => ({ textNode: l, text: (l.textContent || "").toLocaleLowerCase() })).map(({ textNode: l, text: i }) => {
|
|
599
|
+
const h = [];
|
|
600
|
+
let a = 0;
|
|
601
|
+
for (; a < i.length; ) {
|
|
602
|
+
const f = i.indexOf(d, a);
|
|
603
|
+
if (f === -1)
|
|
602
604
|
break;
|
|
603
|
-
|
|
605
|
+
h.push(f), a = f + d.length;
|
|
604
606
|
}
|
|
605
|
-
return
|
|
606
|
-
const
|
|
607
|
-
return
|
|
607
|
+
return h.map((f) => {
|
|
608
|
+
const s = new Range();
|
|
609
|
+
return s.setStart(l, f), s.setEnd(l, f + d.length), s;
|
|
608
610
|
});
|
|
609
611
|
}).flat();
|
|
610
612
|
}
|
|
611
|
-
function c(
|
|
612
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
613
|
+
function c(r) {
|
|
614
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !r || !t))
|
|
613
615
|
return;
|
|
614
|
-
const d = o(t.value,
|
|
615
|
-
CSS.highlights.set("search-result",
|
|
616
|
+
const d = o(t.value, r.toLocaleLowerCase()), y = new Highlight(...d);
|
|
617
|
+
CSS.highlights.set("search-result", y);
|
|
616
618
|
}
|
|
617
619
|
return { search: c };
|
|
618
620
|
}
|
|
619
|
-
function ae(e, t, n, o, c,
|
|
620
|
-
const
|
|
621
|
-
onMouseenterItem:
|
|
622
|
-
onMouseoverItem:
|
|
621
|
+
function ae(e, t, n, o, c, r, d, y, w, m) {
|
|
622
|
+
const g = C(e.size), l = C(e.textField), i = C(e.titleField), h = C(e.multiSelect), a = C(e.disableField), {
|
|
623
|
+
onMouseenterItem: f,
|
|
624
|
+
onMouseoverItem: s,
|
|
623
625
|
onMouseoutItem: u
|
|
624
|
-
} =
|
|
626
|
+
} = r, {
|
|
625
627
|
getKey: F,
|
|
626
|
-
listViewItemClass:
|
|
628
|
+
listViewItemClass: k,
|
|
627
629
|
onCheckItem: j,
|
|
628
|
-
onClickItem:
|
|
629
|
-
} = d,
|
|
630
|
-
margin:
|
|
630
|
+
onClickItem: S
|
|
631
|
+
} = d, b = B(() => ({
|
|
632
|
+
margin: g.value === "small" ? "0.25rem 0" : "10px 0"
|
|
631
633
|
}));
|
|
632
634
|
function D(p, V, A) {
|
|
633
|
-
return p.checked =
|
|
634
|
-
class:
|
|
635
|
+
return p.checked = y.findIndexInSelectedItems(p) > -1, v("li", {
|
|
636
|
+
class: k(p, V),
|
|
635
637
|
id: F(p, V),
|
|
636
638
|
key: F(p, V),
|
|
637
|
-
onClick: (
|
|
638
|
-
onMouseenter: (
|
|
639
|
-
onMouseover: (
|
|
640
|
-
onMouseout: (
|
|
641
|
-
}, [
|
|
639
|
+
onClick: (T) => S(T, p, V),
|
|
640
|
+
onMouseenter: (T) => f(T, p, V),
|
|
641
|
+
onMouseover: (T) => s(T, p, V),
|
|
642
|
+
onMouseout: (T) => u(T, p, V)
|
|
643
|
+
}, [h.value && v("div", {
|
|
642
644
|
class: "f-list-select",
|
|
643
|
-
onClick: (
|
|
644
|
-
}, [
|
|
645
|
+
onClick: (T) => T.stopPropagation()
|
|
646
|
+
}, [v(X, {
|
|
645
647
|
id: "list-" + F(p, V),
|
|
646
648
|
customClass: "listview-checkbox",
|
|
647
|
-
disabled: p[
|
|
649
|
+
disabled: p[a.value],
|
|
648
650
|
checked: p.checked,
|
|
649
|
-
"onUpdate:checked": (
|
|
650
|
-
onChange: (
|
|
651
|
-
j(p, V, !
|
|
651
|
+
"onUpdate:checked": (T) => p.checked = T,
|
|
652
|
+
onChange: (T) => {
|
|
653
|
+
j(p, V, !T.checked);
|
|
652
654
|
}
|
|
653
|
-
}, null)]),
|
|
655
|
+
}, null)]), v("div", {
|
|
654
656
|
class: "f-list-content"
|
|
655
|
-
}, [
|
|
656
|
-
style:
|
|
657
|
-
title: p.raw[
|
|
658
|
-
}, [p.raw[
|
|
657
|
+
}, [v("div", {
|
|
658
|
+
style: b.value,
|
|
659
|
+
title: p.raw[i.value] || p.raw[l.value]
|
|
660
|
+
}, [p.raw[l.value]])])]);
|
|
659
661
|
}
|
|
660
662
|
return {
|
|
661
663
|
renderItem: D
|
|
662
664
|
};
|
|
663
665
|
}
|
|
664
|
-
function
|
|
665
|
-
const
|
|
666
|
-
onMouseenterItem:
|
|
667
|
-
onMouseoverItem:
|
|
668
|
-
onMouseoutItem:
|
|
669
|
-
} =
|
|
670
|
-
getKey:
|
|
671
|
-
listViewItemClass:
|
|
666
|
+
function Tt(e, t, n, o, c, r, d, y, w, m) {
|
|
667
|
+
const g = C(e.multiSelect), l = C(e.disableField), {
|
|
668
|
+
onMouseenterItem: i,
|
|
669
|
+
onMouseoverItem: h,
|
|
670
|
+
onMouseoutItem: a
|
|
671
|
+
} = r, {
|
|
672
|
+
getKey: f,
|
|
673
|
+
listViewItemClass: s,
|
|
672
674
|
onCheckItem: u,
|
|
673
675
|
onClickItem: F
|
|
674
676
|
} = d;
|
|
675
|
-
function
|
|
676
|
-
return t.slots.content ?
|
|
677
|
-
item:
|
|
678
|
-
index:
|
|
677
|
+
function k(S, b, D) {
|
|
678
|
+
return t.slots.content ? v(Q, null, [t.slots.content && t.slots.content({
|
|
679
|
+
item: S.raw,
|
|
680
|
+
index: b,
|
|
679
681
|
selectedItem: D
|
|
680
|
-
})]) :
|
|
682
|
+
})]) : v("div", {
|
|
681
683
|
style: "margin: 10px 0;"
|
|
682
|
-
}, [
|
|
683
|
-
}
|
|
684
|
-
function j(
|
|
685
|
-
return
|
|
686
|
-
class:
|
|
687
|
-
id:
|
|
688
|
-
key:
|
|
689
|
-
onClick: (p) => F(p,
|
|
690
|
-
onMouseenter: (p) =>
|
|
691
|
-
onMouseover: (p) =>
|
|
692
|
-
onMouseout: (p) =>
|
|
693
|
-
}, [
|
|
684
|
+
}, [S.raw.name]);
|
|
685
|
+
}
|
|
686
|
+
function j(S, b, D) {
|
|
687
|
+
return v("li", {
|
|
688
|
+
class: s(S, b),
|
|
689
|
+
id: f(S, b),
|
|
690
|
+
key: f(S, b),
|
|
691
|
+
onClick: (p) => F(p, S, b),
|
|
692
|
+
onMouseenter: (p) => i(p, S, b),
|
|
693
|
+
onMouseover: (p) => h(p, S, b),
|
|
694
|
+
onMouseout: (p) => a(p, S, b)
|
|
695
|
+
}, [g.value && v("div", {
|
|
694
696
|
class: "f-list-select",
|
|
695
697
|
onClick: (p) => p.stopPropagation()
|
|
696
|
-
}, [
|
|
697
|
-
id: "list-" +
|
|
698
|
+
}, [v(X, {
|
|
699
|
+
id: "list-" + f(S, b),
|
|
698
700
|
customClass: "listview-checkbox",
|
|
699
|
-
disabled:
|
|
700
|
-
checked:
|
|
701
|
-
"onUpdate:checked": (p) =>
|
|
702
|
-
onChange: (p) => u(
|
|
703
|
-
}, null)]),
|
|
701
|
+
disabled: S[l.value] || !S.checked,
|
|
702
|
+
checked: S.checked,
|
|
703
|
+
"onUpdate:checked": (p) => S.checked = p,
|
|
704
|
+
onChange: (p) => u(S, b, !p.checked)
|
|
705
|
+
}, null)]), v("div", {
|
|
704
706
|
class: "f-list-content"
|
|
705
|
-
}, [
|
|
707
|
+
}, [k(S, b, D)])]);
|
|
706
708
|
}
|
|
707
709
|
return {
|
|
708
710
|
renderItem: j
|
|
709
711
|
};
|
|
710
712
|
}
|
|
711
|
-
function Mt(e, t, n, o, c,
|
|
712
|
-
const
|
|
713
|
-
onMouseenterItem:
|
|
714
|
-
onMouseoverItem:
|
|
715
|
-
onMouseoutItem:
|
|
716
|
-
} =
|
|
717
|
-
getKey:
|
|
718
|
-
listViewItemClass:
|
|
713
|
+
function Mt(e, t, n, o, c, r, d, y, w, m) {
|
|
714
|
+
const g = C(e.multiSelect), l = C(e.disableField), {
|
|
715
|
+
onMouseenterItem: i,
|
|
716
|
+
onMouseoverItem: h,
|
|
717
|
+
onMouseoutItem: a
|
|
718
|
+
} = r, {
|
|
719
|
+
getKey: f,
|
|
720
|
+
listViewItemClass: s,
|
|
719
721
|
onCheckItem: u,
|
|
720
722
|
onClickItem: F
|
|
721
723
|
} = d, {
|
|
722
|
-
dragstart:
|
|
724
|
+
dragstart: k,
|
|
723
725
|
dragenter: j,
|
|
724
|
-
dragover:
|
|
725
|
-
dragend:
|
|
726
|
+
dragover: S,
|
|
727
|
+
dragend: b
|
|
726
728
|
} = o, {
|
|
727
729
|
removeItem: D
|
|
728
|
-
} =
|
|
729
|
-
margin:
|
|
730
|
+
} = w, p = B(() => ({
|
|
731
|
+
margin: g.value ? "10px 0" : "10px 0px 10px 14px"
|
|
730
732
|
}));
|
|
731
733
|
function V(I) {
|
|
732
|
-
return
|
|
734
|
+
return v("div", {
|
|
733
735
|
style: p.value
|
|
734
736
|
}, [I.raw.name]);
|
|
735
737
|
}
|
|
736
738
|
function A() {
|
|
737
739
|
return t.slots.itemContent ? t.slots.itemContent : V;
|
|
738
740
|
}
|
|
739
|
-
const
|
|
740
|
-
function x(I,
|
|
741
|
-
return
|
|
742
|
-
class:
|
|
743
|
-
id:
|
|
744
|
-
key:
|
|
745
|
-
onClick: (
|
|
746
|
-
onMouseenter: (
|
|
747
|
-
onMouseover: (
|
|
748
|
-
onMouseout: (
|
|
741
|
+
const T = A();
|
|
742
|
+
function x(I, P, E) {
|
|
743
|
+
return v("li", {
|
|
744
|
+
class: s(I, P),
|
|
745
|
+
id: f(I, P),
|
|
746
|
+
key: f(I, P),
|
|
747
|
+
onClick: (O) => F(O, I, P),
|
|
748
|
+
onMouseenter: (O) => i(O, I, P),
|
|
749
|
+
onMouseover: (O) => h(O, I, P),
|
|
750
|
+
onMouseout: (O) => a(O, I, P),
|
|
749
751
|
draggable: "true",
|
|
750
|
-
onDragstart: (
|
|
751
|
-
onDragenter: (
|
|
752
|
-
onDragend: (
|
|
753
|
-
onDragover: (
|
|
754
|
-
}, [
|
|
752
|
+
onDragstart: (O) => k(O, I, P),
|
|
753
|
+
onDragenter: (O) => j(O, P),
|
|
754
|
+
onDragend: (O) => b(O, I),
|
|
755
|
+
onDragover: (O) => S(O, P)
|
|
756
|
+
}, [g.value && v("div", {
|
|
755
757
|
class: "f-list-select",
|
|
756
|
-
onClick: (
|
|
757
|
-
}, [
|
|
758
|
-
id: "list-" +
|
|
758
|
+
onClick: (O) => O.stopPropagation()
|
|
759
|
+
}, [v(X, {
|
|
760
|
+
id: "list-" + f(I, P),
|
|
759
761
|
customClass: "listview-checkbox",
|
|
760
|
-
disabled: I[
|
|
762
|
+
disabled: I[l.value] || !I.checked,
|
|
761
763
|
checked: I.checked,
|
|
762
|
-
"onUpdate:checked": (
|
|
763
|
-
onChange: (
|
|
764
|
-
}, null)]),
|
|
764
|
+
"onUpdate:checked": (O) => I.checked = O,
|
|
765
|
+
onChange: (O) => u(I, P, !O.checked)
|
|
766
|
+
}, null)]), v("div", {
|
|
765
767
|
class: "f-list-content"
|
|
766
|
-
}, [
|
|
768
|
+
}, [T(I)]), v("div", {
|
|
767
769
|
class: "f-list-remove",
|
|
768
|
-
onClick: (
|
|
769
|
-
}, [
|
|
770
|
+
onClick: (O) => D(P)
|
|
771
|
+
}, [v("div", {
|
|
770
772
|
class: "f-list-remove-icon"
|
|
771
|
-
}, [
|
|
773
|
+
}, [v("i", {
|
|
772
774
|
class: "f-icon f-icon-remove_face"
|
|
773
|
-
}, null)])]),
|
|
775
|
+
}, null)])]), v("div", {
|
|
774
776
|
class: "f-list-handle"
|
|
775
|
-
}, [
|
|
777
|
+
}, [v("div", null, [v("i", {
|
|
776
778
|
class: "f-icon f-icon-drag-vertical"
|
|
777
779
|
}, null)])])]);
|
|
778
780
|
}
|
|
@@ -780,47 +782,47 @@ function Mt(e, t, n, o, c, s, d, m, S, f) {
|
|
|
780
782
|
renderItem: x
|
|
781
783
|
};
|
|
782
784
|
}
|
|
783
|
-
function Vt(e, t, n, o, c,
|
|
784
|
-
var
|
|
785
|
-
const
|
|
786
|
-
collpaseGroupIconClass:
|
|
785
|
+
function Vt(e, t, n, o, c, r, d, y, w, m) {
|
|
786
|
+
var f;
|
|
787
|
+
const g = C(((f = e.group) == null ? void 0 : f.groupFields) || []), {
|
|
788
|
+
collpaseGroupIconClass: l
|
|
787
789
|
} = c, {
|
|
788
|
-
toggleGroupRow:
|
|
789
|
-
} =
|
|
790
|
-
function
|
|
791
|
-
u.collapse = !u.collapse, n.value =
|
|
790
|
+
toggleGroupRow: i
|
|
791
|
+
} = m;
|
|
792
|
+
function h(s, u) {
|
|
793
|
+
u.collapse = !u.collapse, n.value = i(u.collapse ? "collapse" : "expand", u, n.value);
|
|
792
794
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
795
|
+
function a(s, u, F) {
|
|
796
|
+
return s.layer > -1 && v("div", {
|
|
795
797
|
class: "f-navlookup-recentHeader",
|
|
796
|
-
onClick: (
|
|
797
|
-
}, [
|
|
798
|
+
onClick: (k) => h(k, s)
|
|
799
|
+
}, [v("div", {
|
|
798
800
|
class: "fv-grid-group-row-icon"
|
|
799
|
-
}, [
|
|
800
|
-
class:
|
|
801
|
-
}, null)]),
|
|
801
|
+
}, [v("span", {
|
|
802
|
+
class: l(s)
|
|
803
|
+
}, null)]), v("div", {
|
|
802
804
|
class: "f-navlookup-recommandLabel"
|
|
803
|
-
}, [
|
|
805
|
+
}, [s.raw[g.value[s.layer]]])]);
|
|
804
806
|
}
|
|
805
807
|
return {
|
|
806
|
-
renderItem:
|
|
808
|
+
renderItem: a
|
|
807
809
|
};
|
|
808
810
|
}
|
|
809
811
|
function Dt() {
|
|
810
|
-
const e =
|
|
811
|
-
function c(
|
|
812
|
-
n.value =
|
|
812
|
+
const e = C(-1), t = C(""), n = C(-1), o = C(!1);
|
|
813
|
+
function c(m, g, l) {
|
|
814
|
+
n.value = l;
|
|
813
815
|
}
|
|
814
|
-
function
|
|
815
|
-
o.value || (n.value =
|
|
816
|
+
function r(m, g, l) {
|
|
817
|
+
o.value || (n.value = l);
|
|
816
818
|
}
|
|
817
|
-
function d(
|
|
819
|
+
function d(m, g, l) {
|
|
818
820
|
n.value = -1;
|
|
819
821
|
}
|
|
820
|
-
function
|
|
822
|
+
function y() {
|
|
821
823
|
o.value = !0;
|
|
822
824
|
}
|
|
823
|
-
function
|
|
825
|
+
function w() {
|
|
824
826
|
o.value = !1;
|
|
825
827
|
}
|
|
826
828
|
return {
|
|
@@ -828,126 +830,126 @@ function Dt() {
|
|
|
828
830
|
focusedItemId: t,
|
|
829
831
|
hoverIndex: n,
|
|
830
832
|
onMouseenterItem: c,
|
|
831
|
-
onMouseoverItem:
|
|
833
|
+
onMouseoverItem: r,
|
|
832
834
|
onMouseoutItem: d,
|
|
833
|
-
resumeHover:
|
|
834
|
-
suspendHover:
|
|
835
|
+
resumeHover: w,
|
|
836
|
+
suspendHover: y
|
|
835
837
|
};
|
|
836
838
|
}
|
|
837
839
|
function jt(e, t, n, o) {
|
|
838
|
-
const c =
|
|
839
|
-
function
|
|
840
|
-
u.stopPropagation(),
|
|
841
|
-
d.value =
|
|
840
|
+
const c = C(e.idField), { dataView: r } = n, d = C(-1), y = C(!1), { activeIndex: w, focusedItemId: m, hoverIndex: g, resumeHover: l, suspendHover: i } = o;
|
|
841
|
+
function h(u, F, k) {
|
|
842
|
+
u.stopPropagation(), i(), F && setTimeout(() => {
|
|
843
|
+
d.value = k, y.value = !0, F.moving = !0;
|
|
842
844
|
});
|
|
843
845
|
}
|
|
844
|
-
function
|
|
846
|
+
function a(u, F) {
|
|
845
847
|
if (u.preventDefault(), d.value !== F) {
|
|
846
|
-
const
|
|
847
|
-
j.splice(d.value, 1), j.splice(F, 0,
|
|
848
|
+
const k = r.value[d.value], j = r.value;
|
|
849
|
+
j.splice(d.value, 1), j.splice(F, 0, k), d.value = F;
|
|
848
850
|
}
|
|
849
851
|
}
|
|
850
|
-
function
|
|
852
|
+
function f(u, F) {
|
|
851
853
|
u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
|
|
852
854
|
}
|
|
853
|
-
function
|
|
854
|
-
F && (F.moving = !1),
|
|
855
|
-
|
|
856
|
-
}),
|
|
855
|
+
function s(u, F) {
|
|
856
|
+
F && (F.moving = !1), r.value.forEach((k, j) => {
|
|
857
|
+
k.__fv_index__ = j;
|
|
858
|
+
}), y.value = !1, l(), g.value = F.raw.__fv_index__, w.value = F.raw.__fv_index__, m.value = F.raw[c.value], t.emit("change", r.value), t.emit("activeChange", F);
|
|
857
859
|
}
|
|
858
860
|
return {
|
|
859
|
-
dragstart:
|
|
860
|
-
dragenter:
|
|
861
|
-
dragover:
|
|
862
|
-
dragend:
|
|
863
|
-
isDragging:
|
|
861
|
+
dragstart: h,
|
|
862
|
+
dragenter: a,
|
|
863
|
+
dragover: f,
|
|
864
|
+
dragend: s,
|
|
865
|
+
isDragging: y
|
|
864
866
|
};
|
|
865
867
|
}
|
|
866
868
|
function It(e, t, n) {
|
|
867
869
|
const { dataView: o } = n;
|
|
868
|
-
function c(
|
|
869
|
-
if (
|
|
870
|
-
const d = o.value.splice(
|
|
870
|
+
function c(r) {
|
|
871
|
+
if (r > -1 && r < o.value.length) {
|
|
872
|
+
const d = o.value.splice(r, 1);
|
|
871
873
|
t.emit("removeItem", d[0]);
|
|
872
874
|
}
|
|
873
875
|
}
|
|
874
876
|
return { removeItem: c };
|
|
875
877
|
}
|
|
876
|
-
function
|
|
877
|
-
const d =
|
|
878
|
-
|
|
879
|
-
const { isDragging:
|
|
880
|
-
function j(
|
|
878
|
+
function Ot(e, t, n, o, c, r) {
|
|
879
|
+
const d = C(e.idField), y = C(e.disableField), w = C(e.draggable), m = C(e.itemClass), g = C(e.selection.multiSelect ?? !1), l = C(e.selection.multiSelectMode);
|
|
880
|
+
C(!0);
|
|
881
|
+
const { isDragging: i } = o, { activeIndex: h, focusedItemId: a, hoverIndex: f } = c, { clearSelection: s, getSelectedItems: u, toggleSelectItem: F } = r, k = C(u());
|
|
882
|
+
function j(T, x) {
|
|
881
883
|
const I = {
|
|
882
884
|
"f-list-view-group-item": !0,
|
|
883
|
-
"f-list-view-draggable-item":
|
|
884
|
-
"f-un-click": !
|
|
885
|
-
"f-un-select": !!
|
|
886
|
-
"f-listview-active":
|
|
887
|
-
"f-listview-hover": !
|
|
888
|
-
moving: !!
|
|
885
|
+
"f-list-view-draggable-item": w.value,
|
|
886
|
+
"f-un-click": !T.checked,
|
|
887
|
+
"f-un-select": !!T.raw[y.value],
|
|
888
|
+
"f-listview-active": T.raw.__fv_index__ === h.value,
|
|
889
|
+
"f-listview-hover": !i.value && x === f.value,
|
|
890
|
+
moving: !!T.moving
|
|
889
891
|
};
|
|
890
|
-
return
|
|
892
|
+
return m.value.split(" ").reduce((E, O) => (E[O] = !0, E), I), I;
|
|
891
893
|
}
|
|
892
|
-
function
|
|
893
|
-
return
|
|
894
|
+
function S(T, x) {
|
|
895
|
+
return T.raw[d.value] || "";
|
|
894
896
|
}
|
|
895
|
-
const
|
|
896
|
-
function D(
|
|
897
|
-
|
|
897
|
+
const b = B(() => !g.value);
|
|
898
|
+
function D(T, x, I) {
|
|
899
|
+
T.checked = I, !T.raw[y.value] && (b.value && (a.value = T.raw[d.value]), F(T));
|
|
898
900
|
}
|
|
899
|
-
const p =
|
|
900
|
-
function A(
|
|
901
|
-
if (x.raw[
|
|
902
|
-
|
|
901
|
+
const p = B(() => g.value && l.value === "OnCheckClearByClick"), V = B(() => !g.value || g.value && (l.value === "OnCheckAndClick" || l.value === "OnClick"));
|
|
902
|
+
function A(T, x, I) {
|
|
903
|
+
if (x.raw[y.value]) {
|
|
904
|
+
T.preventDefault(), T.stopPropagation();
|
|
903
905
|
return;
|
|
904
906
|
}
|
|
905
|
-
|
|
907
|
+
a.value = x.raw[d.value], h.value = I, p.value && s(n.value), V.value && (F(x), k.value = u()), t.emit("clickItem", { data: k.value, index: I }), t.emit("activeChange", k.value);
|
|
906
908
|
}
|
|
907
909
|
return {
|
|
908
|
-
getKey:
|
|
910
|
+
getKey: S,
|
|
909
911
|
listViewItemClass: j,
|
|
910
912
|
onCheckItem: D,
|
|
911
913
|
onClickItem: A
|
|
912
914
|
};
|
|
913
915
|
}
|
|
914
|
-
function
|
|
915
|
-
const
|
|
916
|
+
function Pt(e, t, n, o, c, r, d) {
|
|
917
|
+
const y = C(e.view), w = C(e.view === "CardView"), m = C({}), g = C("暂无数据"), l = Dt(), i = jt(e, t, o, l), h = It(e, t, o), a = Ot(e, t, n, i, l, r), f = B(() => ({
|
|
916
918
|
"f-list-view-group": !0,
|
|
917
|
-
"d-flex":
|
|
918
|
-
"flex-wrap":
|
|
919
|
-
})),
|
|
920
|
-
function
|
|
921
|
-
return
|
|
922
|
-
}
|
|
923
|
-
const j =
|
|
924
|
-
renderItem:
|
|
925
|
-
} = j(e, t, n,
|
|
926
|
-
renderItem:
|
|
927
|
-
} = Vt(e, t, n,
|
|
919
|
+
"d-flex": w.value,
|
|
920
|
+
"flex-wrap": w.value
|
|
921
|
+
})), s = B(() => !!n.value && n.value.length > 0), u = B(() => n.value.length === 0), F = B(() => u.value && !t.slots.empty);
|
|
922
|
+
function k() {
|
|
923
|
+
return y.value === "SingleView" ? ae : y.value === "DraggableView" ? Mt : (y.value === "ContentView" || y.value === "CardView") && t.slots.content ? Tt : ae;
|
|
924
|
+
}
|
|
925
|
+
const j = k(), {
|
|
926
|
+
renderItem: S
|
|
927
|
+
} = j(e, t, n, i, c, l, a, r, h, d), {
|
|
928
|
+
renderItem: b
|
|
929
|
+
} = Vt(e, t, n, i, c, l, a, r, h, d), D = [S, b];
|
|
928
930
|
function p() {
|
|
929
|
-
return n.value.filter((
|
|
931
|
+
return n.value.filter((T) => T.visible !== !1).map((T, x) => D[T.type](T, x, m));
|
|
930
932
|
}
|
|
931
933
|
function V() {
|
|
932
|
-
return
|
|
934
|
+
return v("div", {
|
|
933
935
|
class: "f-list-view-emptydata"
|
|
934
|
-
}, [
|
|
936
|
+
}, [v("p", {
|
|
935
937
|
class: "f-empty-title"
|
|
936
|
-
}, [
|
|
938
|
+
}, [g.value])]);
|
|
937
939
|
}
|
|
938
940
|
function A() {
|
|
939
|
-
return
|
|
940
|
-
class:
|
|
941
|
+
return v("ul", {
|
|
942
|
+
class: f.value,
|
|
941
943
|
style: "list-style: none;"
|
|
942
|
-
}, [
|
|
944
|
+
}, [s.value && p(), F.value && V(), t.slots.empty && t.slots.empty()]);
|
|
943
945
|
}
|
|
944
946
|
return {
|
|
945
947
|
renderListArea: A
|
|
946
948
|
};
|
|
947
949
|
}
|
|
948
|
-
function
|
|
950
|
+
function Bt(e, t, n) {
|
|
949
951
|
function o() {
|
|
950
|
-
return t.slots.header &&
|
|
952
|
+
return t.slots.header && v("div", {
|
|
951
953
|
class: "f-list-view-header"
|
|
952
954
|
}, [t.slots.header()]);
|
|
953
955
|
}
|
|
@@ -956,99 +958,99 @@ function Ot(e, t, n) {
|
|
|
956
958
|
};
|
|
957
959
|
}
|
|
958
960
|
function re(e, t, n) {
|
|
959
|
-
const o =
|
|
960
|
-
function
|
|
961
|
-
|
|
961
|
+
const o = C(e.headerClass), c = C(e.placeholder), r = C(""), d = B(() => !r.value), y = B(() => !!r.value);
|
|
962
|
+
function w(i) {
|
|
963
|
+
r.value = "";
|
|
962
964
|
}
|
|
963
|
-
|
|
964
|
-
n.search(
|
|
965
|
+
H(r, (i) => {
|
|
966
|
+
e.enableHighlightSearch && n.search(i), t.emit("afterSearch", i);
|
|
965
967
|
});
|
|
966
|
-
const
|
|
967
|
-
const
|
|
968
|
+
const m = B(() => {
|
|
969
|
+
const i = {
|
|
968
970
|
"form-group": !0,
|
|
969
971
|
"farris-form-group": !0
|
|
970
972
|
};
|
|
971
|
-
return o.value && o.value.split(" ").reduce((
|
|
973
|
+
return o.value && o.value.split(" ").reduce((a, f) => (a[f] = !0, a), i), i;
|
|
972
974
|
});
|
|
973
|
-
function
|
|
975
|
+
function g(i) {
|
|
974
976
|
}
|
|
975
|
-
function
|
|
976
|
-
return
|
|
977
|
+
function l() {
|
|
978
|
+
return v("div", {
|
|
977
979
|
class: "f-list-view-header",
|
|
978
|
-
onClick: we(() =>
|
|
979
|
-
}, [
|
|
980
|
-
class:
|
|
981
|
-
}, [
|
|
980
|
+
onClick: we(() => g, ["prevent", "stop"])
|
|
981
|
+
}, [v("div", {
|
|
982
|
+
class: m.value
|
|
983
|
+
}, [v("div", {
|
|
982
984
|
class: "farris-input-wrap"
|
|
983
|
-
}, [
|
|
985
|
+
}, [v("div", {
|
|
984
986
|
class: "f-cmp-inputgroup"
|
|
985
|
-
}, [
|
|
987
|
+
}, [v("div", {
|
|
986
988
|
class: "input-group f-state-editable"
|
|
987
|
-
}, [Fe(
|
|
989
|
+
}, [Fe(v("input", {
|
|
988
990
|
class: "form-control f-utils-fill text-left",
|
|
989
|
-
"onUpdate:modelValue": (
|
|
991
|
+
"onUpdate:modelValue": (i) => r.value = i,
|
|
990
992
|
name: "input-group-value",
|
|
991
993
|
type: "text",
|
|
992
994
|
placeholder: c.value,
|
|
993
995
|
autocomplete: "off"
|
|
994
|
-
}, null), [[
|
|
996
|
+
}, null), [[ke, r.value]]), v("div", {
|
|
995
997
|
class: "input-group-append"
|
|
996
|
-
}, [
|
|
998
|
+
}, [y.value && v("span", {
|
|
997
999
|
class: "input-group-text input-group-clear",
|
|
998
|
-
onClick: (
|
|
999
|
-
}, [
|
|
1000
|
+
onClick: (i) => w()
|
|
1001
|
+
}, [v("i", {
|
|
1000
1002
|
class: "f-icon f-icon-close-circle"
|
|
1001
|
-
}, null)]), d.value &&
|
|
1003
|
+
}, null)]), d.value && v("span", {
|
|
1002
1004
|
class: "input-group-text"
|
|
1003
|
-
}, [
|
|
1005
|
+
}, [v("span", {
|
|
1004
1006
|
class: "f-icon f-icon-search"
|
|
1005
1007
|
}, null)])])])])])])]);
|
|
1006
1008
|
}
|
|
1007
1009
|
return {
|
|
1008
|
-
renderHeader:
|
|
1010
|
+
renderHeader: l
|
|
1009
1011
|
};
|
|
1010
1012
|
}
|
|
1011
|
-
const de = /* @__PURE__ */
|
|
1013
|
+
const de = /* @__PURE__ */ N({
|
|
1012
1014
|
name: "FListView",
|
|
1013
1015
|
props: ue,
|
|
1014
|
-
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
1016
|
+
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
1015
1017
|
setup(e, t) {
|
|
1016
|
-
const n =
|
|
1018
|
+
const n = C(), o = C(!0), c = C(!1), r = C([]), d = 0, y = C(e.columns), w = Ve(e), m = De(e), g = je(e, w), l = Ie(e), i = Oe(e, /* @__PURE__ */ new Map(), m, w, l), h = Pe(e, i, w, r, t), a = kt(e, n), f = B(() => i.dataView.value.length), s = Be(e, w), u = Ae(), F = xe(e, {}, u), k = Le(e, s, m, w, u, F), j = $e(e, w, F, k), S = Ee(e, w, F, k), b = He(e, y, i, f, d, k, j, S), {
|
|
1017
1019
|
getVisualData: D
|
|
1018
|
-
} =
|
|
1019
|
-
|
|
1020
|
-
const p =
|
|
1020
|
+
} = b;
|
|
1021
|
+
r.value = D(0, f.value + d - 1);
|
|
1022
|
+
const p = B(() => {
|
|
1021
1023
|
const L = {
|
|
1022
1024
|
"f-list-view": !0,
|
|
1023
1025
|
"f-list-view-multiple": e.multiSelect
|
|
1024
1026
|
};
|
|
1025
1027
|
return e.size !== "default" && (L[`${e.size}-item`] = !0), L;
|
|
1026
|
-
}), V =
|
|
1028
|
+
}), V = B(() => !!t.slots.footer || o.value);
|
|
1027
1029
|
function A() {
|
|
1028
|
-
return e.header === "SearchBar" ? re : e.header === "ContentHeader" ?
|
|
1030
|
+
return e.header === "SearchBar" ? re : e.header === "ContentHeader" ? Bt : re;
|
|
1029
1031
|
}
|
|
1030
|
-
const
|
|
1032
|
+
const T = A(), {
|
|
1031
1033
|
renderHeader: x
|
|
1032
|
-
} =
|
|
1034
|
+
} = T(e, t, a), {
|
|
1033
1035
|
renderListArea: I
|
|
1034
|
-
} =
|
|
1035
|
-
function
|
|
1036
|
-
|
|
1036
|
+
} = Pt(e, t, r, i, g, h, b);
|
|
1037
|
+
function P(L) {
|
|
1038
|
+
a.search(L);
|
|
1037
1039
|
}
|
|
1038
1040
|
function E(L) {
|
|
1039
|
-
L && (
|
|
1041
|
+
L && (i.load(L), r.value = D(0, f.value + d - 1));
|
|
1040
1042
|
}
|
|
1041
1043
|
t.expose({
|
|
1042
|
-
search:
|
|
1044
|
+
search: P,
|
|
1043
1045
|
updateDataSource: E
|
|
1044
1046
|
});
|
|
1045
|
-
function
|
|
1047
|
+
function O(L) {
|
|
1046
1048
|
e.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
1047
1049
|
}
|
|
1048
|
-
return () =>
|
|
1050
|
+
return () => v("div", {
|
|
1049
1051
|
class: p.value,
|
|
1050
|
-
onClick:
|
|
1051
|
-
}, [x(),
|
|
1052
|
+
onClick: O
|
|
1053
|
+
}, [x(), v("div", {
|
|
1052
1054
|
ref: n,
|
|
1053
1055
|
class: "f-list-view-content",
|
|
1054
1056
|
onMouseover: () => {
|
|
@@ -1057,7 +1059,7 @@ const de = /* @__PURE__ */ H({
|
|
|
1057
1059
|
onMouseleave: () => {
|
|
1058
1060
|
c.value = !1;
|
|
1059
1061
|
}
|
|
1060
|
-
}, [I()]), V.value &&
|
|
1062
|
+
}, [I()]), V.value && v("div", {
|
|
1061
1063
|
class: "f-list-view-footer"
|
|
1062
1064
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1063
1065
|
}
|
|
@@ -1096,19 +1098,19 @@ function xt(e, t) {
|
|
|
1096
1098
|
};
|
|
1097
1099
|
}
|
|
1098
1100
|
function Lt(e) {
|
|
1099
|
-
const t =
|
|
1101
|
+
const t = B(() => {
|
|
1100
1102
|
const o = {
|
|
1101
1103
|
"f-icon": !0
|
|
1102
1104
|
};
|
|
1103
1105
|
if (e.icon) {
|
|
1104
1106
|
const c = e.icon.trim().split(" ");
|
|
1105
|
-
c && c.length && c.reduce((
|
|
1107
|
+
c && c.length && c.reduce((r, d) => (r[d] = !0, r), o);
|
|
1106
1108
|
}
|
|
1107
1109
|
return o;
|
|
1108
|
-
}), n =
|
|
1110
|
+
}), n = B(() => !!(e.icon && e.icon.trim()));
|
|
1109
1111
|
return { iconClass: t, shouldShowIcon: n };
|
|
1110
1112
|
}
|
|
1111
|
-
const pe = /* @__PURE__ */
|
|
1113
|
+
const pe = /* @__PURE__ */ N({
|
|
1112
1114
|
name: "FButton",
|
|
1113
1115
|
props: At,
|
|
1114
1116
|
emits: ["click"],
|
|
@@ -1118,7 +1120,7 @@ const pe = /* @__PURE__ */ H({
|
|
|
1118
1120
|
} = xt(e, t), {
|
|
1119
1121
|
iconClass: o,
|
|
1120
1122
|
shouldShowIcon: c
|
|
1121
|
-
} = Lt(e),
|
|
1123
|
+
} = Lt(e), r = B(() => {
|
|
1122
1124
|
const d = {
|
|
1123
1125
|
btn: !0,
|
|
1124
1126
|
"btn-lg": e.size === "large",
|
|
@@ -1126,19 +1128,19 @@ const pe = /* @__PURE__ */ H({
|
|
|
1126
1128
|
"btn-sm": e.size === "small",
|
|
1127
1129
|
"btn-icontext": c.value
|
|
1128
1130
|
};
|
|
1129
|
-
return d[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((
|
|
1131
|
+
return d[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((y, w) => (y[w] = e.customClass[w], y), d), d;
|
|
1130
1132
|
});
|
|
1131
|
-
return () =>
|
|
1132
|
-
class:
|
|
1133
|
+
return () => v("button", {
|
|
1134
|
+
class: r.value,
|
|
1133
1135
|
disabled: e.disabled,
|
|
1134
1136
|
onClick: (d) => n(d)
|
|
1135
|
-
}, [c.value &&
|
|
1137
|
+
}, [c.value && v("i", {
|
|
1136
1138
|
class: o.value
|
|
1137
1139
|
}, null), t.slots.default && t.slots.default()]);
|
|
1138
1140
|
}
|
|
1139
1141
|
}), $t = /* @__PURE__ */ new Map([
|
|
1140
1142
|
["appearance", J]
|
|
1141
|
-
]), Et = "https://json-schema.org/draft/2020-12/schema",
|
|
1143
|
+
]), Et = "https://json-schema.org/draft/2020-12/schema", Ht = "https://farris-design.gitee.io/combo-list.schema.json", Nt = "combo-list", Rt = "A Farris Input Component", Ut = "object", zt = {
|
|
1142
1144
|
id: {
|
|
1143
1145
|
description: "The unique identifier for a combo list",
|
|
1144
1146
|
type: "string"
|
|
@@ -1193,7 +1195,7 @@ const pe = /* @__PURE__ */ H({
|
|
|
1193
1195
|
valueField: {
|
|
1194
1196
|
description: "",
|
|
1195
1197
|
type: "string",
|
|
1196
|
-
default: "
|
|
1198
|
+
default: "value"
|
|
1197
1199
|
},
|
|
1198
1200
|
titleField: {
|
|
1199
1201
|
description: "",
|
|
@@ -1254,8 +1256,8 @@ const pe = /* @__PURE__ */ H({
|
|
|
1254
1256
|
"type"
|
|
1255
1257
|
], _t = {
|
|
1256
1258
|
$schema: Et,
|
|
1257
|
-
$id:
|
|
1258
|
-
title:
|
|
1259
|
+
$id: Ht,
|
|
1260
|
+
title: Nt,
|
|
1259
1261
|
description: Rt,
|
|
1260
1262
|
type: Ut,
|
|
1261
1263
|
properties: zt,
|
|
@@ -1423,7 +1425,13 @@ const ee = {
|
|
|
1423
1425
|
/**
|
|
1424
1426
|
* 打开前
|
|
1425
1427
|
*/
|
|
1426
|
-
beforeOpen: { type: Function, default: null }
|
|
1428
|
+
beforeOpen: { type: Function, default: null },
|
|
1429
|
+
searchOption: {
|
|
1430
|
+
type: Object,
|
|
1431
|
+
default: !1
|
|
1432
|
+
},
|
|
1433
|
+
// 搜索启用高亮
|
|
1434
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1427
1435
|
}, fe = Z(ee, _t, $t, Wt), qt = {
|
|
1428
1436
|
dataSource: { type: Array, default: [] },
|
|
1429
1437
|
enableSearch: { type: Boolean, default: !1 },
|
|
@@ -1438,137 +1446,159 @@ const ee = {
|
|
|
1438
1446
|
valueField: { type: String, default: "id" },
|
|
1439
1447
|
/** 值变化事件 */
|
|
1440
1448
|
onSelectionChange: { type: Function, default: () => {
|
|
1441
|
-
} }
|
|
1442
|
-
|
|
1449
|
+
} },
|
|
1450
|
+
searchOption: {
|
|
1451
|
+
type: Object,
|
|
1452
|
+
default: !1
|
|
1453
|
+
},
|
|
1454
|
+
// 搜索启用高亮
|
|
1455
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1456
|
+
}, Qt = /* @__PURE__ */ N({
|
|
1443
1457
|
name: "FComboListContainer",
|
|
1444
1458
|
props: qt,
|
|
1445
1459
|
emits: ["selectionChange"],
|
|
1446
1460
|
setup(e, t) {
|
|
1447
|
-
const n =
|
|
1448
|
-
|
|
1449
|
-
|
|
1461
|
+
const n = C(), o = C(e.dataSource), c = C([]), r = C(e.separator), d = C(e.width), y = C(e.maxHeight), w = C(String(e.selectedValues).split(r.value));
|
|
1462
|
+
H(e.dataSource, () => {
|
|
1463
|
+
o.value = e.dataSource;
|
|
1450
1464
|
});
|
|
1451
|
-
const
|
|
1452
|
-
const
|
|
1453
|
-
return
|
|
1465
|
+
const m = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), g = B(() => {
|
|
1466
|
+
const h = {};
|
|
1467
|
+
return d.value !== void 0 && (h.width = `${d.value}px`), y.value !== void 0 && y.value > 0 && (h.maxHeight = `${y.value}px`), h;
|
|
1454
1468
|
});
|
|
1455
|
-
function
|
|
1456
|
-
|
|
1469
|
+
function l(h) {
|
|
1470
|
+
c.value = h.map((a) => Object.assign({}, a)), w.value = h.map((a) => a[e.idField]), t.emit("selectionChange", c.value);
|
|
1471
|
+
}
|
|
1472
|
+
function i(h) {
|
|
1473
|
+
if (e.enableHighlightSearch)
|
|
1474
|
+
return;
|
|
1475
|
+
let a = [];
|
|
1476
|
+
typeof e.searchOption == "function" ? a = o.value.filter((f) => e.searchOption(h, f)) : a = o.value.filter((f) => f[e.valueField].indexOf(h) > -1 || f[e.textField].indexOf(h) > -1), n.value.updateDataSource(a);
|
|
1457
1477
|
}
|
|
1458
|
-
return
|
|
1459
|
-
|
|
1460
|
-
}), () =>
|
|
1478
|
+
return H([() => e.selectedValues], ([h]) => {
|
|
1479
|
+
w.value = h.split(r.value);
|
|
1480
|
+
}), () => v("div", {
|
|
1461
1481
|
class: "f-combo-list-container pl-3",
|
|
1462
|
-
style:
|
|
1463
|
-
}, [
|
|
1482
|
+
style: g.value
|
|
1483
|
+
}, [v(Ne, {
|
|
1484
|
+
ref: n,
|
|
1464
1485
|
size: "small",
|
|
1465
1486
|
itemClass: "f-combo-list-item",
|
|
1466
|
-
header:
|
|
1487
|
+
header: m.value,
|
|
1467
1488
|
headerClass: "f-combo-list-search-box",
|
|
1468
|
-
data:
|
|
1489
|
+
data: o.value,
|
|
1469
1490
|
idField: e.idField,
|
|
1470
1491
|
textField: e.textField,
|
|
1471
1492
|
titleField: e.titleField,
|
|
1472
1493
|
multiSelect: e.multiSelect,
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1494
|
+
selection: {
|
|
1495
|
+
enableSelectRow: !0,
|
|
1496
|
+
multiSelect: !0,
|
|
1497
|
+
multiSelectMode: "OnCheckAndClick",
|
|
1498
|
+
showCheckbox: !0,
|
|
1499
|
+
showSelectAll: !1,
|
|
1500
|
+
showSelection: !0
|
|
1501
|
+
},
|
|
1502
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1503
|
+
selectionValues: w.value,
|
|
1504
|
+
onSelectionChange: l,
|
|
1505
|
+
onAfterSearch: i
|
|
1476
1506
|
}, null)]);
|
|
1477
1507
|
}
|
|
1478
1508
|
});
|
|
1479
1509
|
function Xt(e) {
|
|
1480
|
-
const t =
|
|
1481
|
-
function
|
|
1482
|
-
const
|
|
1483
|
-
return o.value.filter((
|
|
1510
|
+
const t = C(""), n = C(e.modelValue), o = C(e.data || []), c = C(e.editable);
|
|
1511
|
+
function r(l) {
|
|
1512
|
+
const i = String(l).split(e.separator).map((a) => [a, !0]), h = new Map(i);
|
|
1513
|
+
return o.value.filter((a) => h.has(String(a[e.valueField])));
|
|
1484
1514
|
}
|
|
1485
|
-
function d(
|
|
1486
|
-
const
|
|
1487
|
-
t.value = c.value ?
|
|
1515
|
+
function d(l) {
|
|
1516
|
+
const i = r(l).map((h) => h[e.textField]).join(e.separator);
|
|
1517
|
+
t.value = c.value ? i || l : i;
|
|
1488
1518
|
}
|
|
1489
|
-
function
|
|
1490
|
-
const
|
|
1491
|
-
return o.value.filter((
|
|
1519
|
+
function y(l) {
|
|
1520
|
+
const i = l.split(e.separator).map((a) => [a, !0]), h = new Map(i);
|
|
1521
|
+
return o.value.filter((a) => h.has(a[e.textField]));
|
|
1492
1522
|
}
|
|
1493
|
-
function
|
|
1494
|
-
const
|
|
1495
|
-
return
|
|
1523
|
+
function w(l) {
|
|
1524
|
+
const i = {};
|
|
1525
|
+
return i[e.idField] = l, i[e.textField] = l, [i];
|
|
1496
1526
|
}
|
|
1497
|
-
function
|
|
1498
|
-
let
|
|
1499
|
-
const
|
|
1500
|
-
return c.value && !
|
|
1527
|
+
function m(l) {
|
|
1528
|
+
let i = y(l);
|
|
1529
|
+
const h = i && i.length > 0;
|
|
1530
|
+
return c.value && !h && (i = w(l)), i;
|
|
1501
1531
|
}
|
|
1502
|
-
function
|
|
1503
|
-
const { url:
|
|
1504
|
-
let
|
|
1505
|
-
fetch(
|
|
1506
|
-
var
|
|
1532
|
+
function g() {
|
|
1533
|
+
const { url: l, method: i = "GET", headers: h = {}, body: a = null } = e.remote, f = i.toLowerCase() == "get" ? { method: i, headers: h } : { method: i, headers: h, body: a };
|
|
1534
|
+
let s = !1;
|
|
1535
|
+
fetch(l, f).then((u) => {
|
|
1536
|
+
var k, j;
|
|
1507
1537
|
if (u.status === 200)
|
|
1508
|
-
return
|
|
1538
|
+
return s = !!((j = (k = u.headers) == null ? void 0 : k.get("content-type")) != null && j.includes("application/json")), s ? u.text() : u.json();
|
|
1509
1539
|
throw new Error(u.statusText);
|
|
1510
1540
|
}).then((u) => {
|
|
1511
|
-
o.value =
|
|
1541
|
+
o.value = s ? JSON.parse(u) : u;
|
|
1512
1542
|
}).catch((u) => {
|
|
1513
1543
|
console.error(u);
|
|
1514
1544
|
});
|
|
1515
1545
|
}
|
|
1516
|
-
return e.remote &&
|
|
1546
|
+
return e.remote && g(), H(() => e.data, () => {
|
|
1517
1547
|
o.value = e.data;
|
|
1518
|
-
}),
|
|
1548
|
+
}), H([o], ([l]) => {
|
|
1519
1549
|
if (e.modelValue) {
|
|
1520
|
-
const
|
|
1521
|
-
|
|
1550
|
+
const i = l.find((h) => h[e.valueField] === e.modelValue);
|
|
1551
|
+
i && (t.value = i[e.textField]);
|
|
1522
1552
|
}
|
|
1523
|
-
}),
|
|
1524
|
-
n.value =
|
|
1525
|
-
}), d(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText:
|
|
1553
|
+
}), H(() => e.modelValue, (l) => {
|
|
1554
|
+
n.value = l, d(l);
|
|
1555
|
+
}), d(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText: y, getItemsByValue: r, getSelectedItemsByDisplayText: m };
|
|
1526
1556
|
}
|
|
1527
|
-
const U = /* @__PURE__ */
|
|
1557
|
+
const U = /* @__PURE__ */ N({
|
|
1528
1558
|
name: "FComboList",
|
|
1529
1559
|
props: ee,
|
|
1530
1560
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1531
1561
|
setup(e, t) {
|
|
1532
|
-
const n =
|
|
1533
|
-
dataSource:
|
|
1534
|
-
displayText:
|
|
1535
|
-
editable:
|
|
1536
|
-
modelValue:
|
|
1537
|
-
getSelectedItemsByDisplayText:
|
|
1538
|
-
} = Xt(e),
|
|
1539
|
-
function
|
|
1540
|
-
!
|
|
1562
|
+
const n = C(), o = C(e.disabled), c = C(e.enableClear), r = C(e.enableSearch), d = C(e.readonly), {
|
|
1563
|
+
dataSource: y,
|
|
1564
|
+
displayText: w,
|
|
1565
|
+
editable: m,
|
|
1566
|
+
modelValue: g,
|
|
1567
|
+
getSelectedItemsByDisplayText: l
|
|
1568
|
+
} = Xt(e), i = B(() => e.multiSelect), h = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1569
|
+
function a() {
|
|
1570
|
+
!i.value && n.value && n.value.hidePopup();
|
|
1541
1571
|
}
|
|
1542
|
-
function
|
|
1543
|
-
|
|
1572
|
+
function f(S) {
|
|
1573
|
+
w.value = S.map((b) => b[e.textField]).join(e.separator), S.length === 1 ? g.value = S[0][e.valueField] : g.value = S.map((b) => b[e.valueField]).join(e.separator), t.emit("update:modelValue", g.value), t.emit("change", S, g.value), a();
|
|
1544
1574
|
}
|
|
1545
|
-
function
|
|
1575
|
+
function s() {
|
|
1546
1576
|
d.value || n.value.togglePopup();
|
|
1547
1577
|
}
|
|
1548
|
-
function u(
|
|
1549
|
-
|
|
1578
|
+
function u(S) {
|
|
1579
|
+
g.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1550
1580
|
}
|
|
1551
|
-
function F(
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1581
|
+
function F(S) {
|
|
1582
|
+
const b = l(S);
|
|
1583
|
+
f(b);
|
|
1554
1584
|
}
|
|
1555
|
-
function
|
|
1556
|
-
return
|
|
1585
|
+
function k() {
|
|
1586
|
+
return w.value;
|
|
1557
1587
|
}
|
|
1558
|
-
function j(
|
|
1559
|
-
t.emit("input",
|
|
1588
|
+
function j(S) {
|
|
1589
|
+
t.emit("input", S);
|
|
1560
1590
|
}
|
|
1561
1591
|
return t.expose({
|
|
1562
|
-
getDisplayText:
|
|
1563
|
-
}),
|
|
1564
|
-
o.value =
|
|
1565
|
-
}), () =>
|
|
1592
|
+
getDisplayText: k
|
|
1593
|
+
}), H([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([S, b, D, p, V]) => {
|
|
1594
|
+
o.value = S, m.value = b, c.value = D, r.value = p, d.value = V;
|
|
1595
|
+
}), () => v(le, {
|
|
1566
1596
|
ref: n,
|
|
1567
1597
|
id: e.id,
|
|
1568
1598
|
disable: o.value,
|
|
1569
1599
|
readonly: d.value,
|
|
1570
1600
|
forcePlaceholder: e.forcePlaceholder,
|
|
1571
|
-
editable:
|
|
1601
|
+
editable: m.value,
|
|
1572
1602
|
buttonContent: e.dropDownIcon,
|
|
1573
1603
|
placeholder: e.placeholder,
|
|
1574
1604
|
enableClear: c.value,
|
|
@@ -1577,69 +1607,71 @@ const U = /* @__PURE__ */ H({
|
|
|
1577
1607
|
enableTitle: e.enableTitle,
|
|
1578
1608
|
multiSelect: e.multiSelect,
|
|
1579
1609
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1580
|
-
modelValue:
|
|
1581
|
-
"onUpdate:modelValue": (
|
|
1610
|
+
modelValue: w.value,
|
|
1611
|
+
"onUpdate:modelValue": (S) => w.value = S,
|
|
1582
1612
|
focusOnCreated: e.focusOnCreated,
|
|
1583
1613
|
selectOnCreated: e.selectOnCreated,
|
|
1584
1614
|
onClear: u,
|
|
1585
|
-
onClick:
|
|
1615
|
+
onClick: s,
|
|
1586
1616
|
onChange: F,
|
|
1587
1617
|
onInput: j,
|
|
1588
1618
|
beforeOpen: e.beforeOpen
|
|
1589
1619
|
}, {
|
|
1590
|
-
default: () => [
|
|
1620
|
+
default: () => [v(Qt, {
|
|
1591
1621
|
idField: e.idField,
|
|
1592
1622
|
valueField: e.valueField,
|
|
1593
1623
|
textField: e.textField,
|
|
1594
1624
|
titleField: e.titleField,
|
|
1595
|
-
dataSource:
|
|
1596
|
-
selectedValues:
|
|
1625
|
+
dataSource: y.value,
|
|
1626
|
+
selectedValues: g.value,
|
|
1597
1627
|
multiSelect: e.multiSelect,
|
|
1598
|
-
enableSearch:
|
|
1628
|
+
enableSearch: r.value,
|
|
1599
1629
|
maxHeight: e.maxHeight,
|
|
1600
|
-
|
|
1601
|
-
|
|
1630
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1631
|
+
width: e.fitEditor ? h.value : void 0,
|
|
1632
|
+
onSelectionChange: f
|
|
1602
1633
|
}, null)]
|
|
1603
1634
|
});
|
|
1604
1635
|
}
|
|
1605
1636
|
});
|
|
1606
1637
|
function Yt(e, t) {
|
|
1607
1638
|
e.schema;
|
|
1608
|
-
const n =
|
|
1609
|
-
function c(
|
|
1639
|
+
const n = C(!0), o = C(!0);
|
|
1640
|
+
function c(l) {
|
|
1610
1641
|
return !1;
|
|
1611
1642
|
}
|
|
1612
|
-
function
|
|
1643
|
+
function r() {
|
|
1613
1644
|
return !1;
|
|
1614
1645
|
}
|
|
1615
1646
|
function d() {
|
|
1616
1647
|
return !1;
|
|
1617
1648
|
}
|
|
1618
|
-
function
|
|
1649
|
+
function y() {
|
|
1619
1650
|
return !0;
|
|
1620
1651
|
}
|
|
1621
|
-
function
|
|
1652
|
+
function w(l) {
|
|
1622
1653
|
}
|
|
1623
|
-
function
|
|
1654
|
+
function m() {
|
|
1624
1655
|
}
|
|
1625
|
-
function
|
|
1656
|
+
function g(l) {
|
|
1626
1657
|
return null;
|
|
1627
1658
|
}
|
|
1628
1659
|
return {
|
|
1629
1660
|
canAccepts: c,
|
|
1630
|
-
checkCanDeleteComponent:
|
|
1661
|
+
checkCanDeleteComponent: r,
|
|
1631
1662
|
checkCanMoveComponent: d,
|
|
1632
|
-
hideNestedPaddingInDesginerView:
|
|
1633
|
-
onAcceptMovedChildElement:
|
|
1634
|
-
resolveComponentContext:
|
|
1663
|
+
hideNestedPaddingInDesginerView: y,
|
|
1664
|
+
onAcceptMovedChildElement: w,
|
|
1665
|
+
resolveComponentContext: m,
|
|
1635
1666
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1636
1667
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1637
|
-
getPropsConfig:
|
|
1668
|
+
getPropsConfig: g
|
|
1638
1669
|
};
|
|
1639
1670
|
}
|
|
1640
1671
|
class me {
|
|
1641
1672
|
static getEditorTypesByMDataType(t) {
|
|
1642
|
-
|
|
1673
|
+
const n = this.fieldControlTypeMapping[t];
|
|
1674
|
+
return n || [{ key: "", value: "" }];
|
|
1643
1675
|
}
|
|
1644
1676
|
}
|
|
1645
1677
|
/**
|
|
@@ -1711,13 +1743,18 @@ class Zt {
|
|
|
1711
1743
|
$(this, "designViewModelField");
|
|
1712
1744
|
$(this, "controlCreatorUtils");
|
|
1713
1745
|
$(this, "designerHostService");
|
|
1746
|
+
$(this, "schemaService", null);
|
|
1714
1747
|
$(this, "metadataService", null);
|
|
1715
1748
|
$(this, "propertyConfig", {
|
|
1716
1749
|
type: "object",
|
|
1717
1750
|
categories: {}
|
|
1718
1751
|
});
|
|
1719
1752
|
var o;
|
|
1720
|
-
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;
|
|
1753
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1754
|
+
}
|
|
1755
|
+
getTableInfo() {
|
|
1756
|
+
var t;
|
|
1757
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1721
1758
|
}
|
|
1722
1759
|
setDesignViewModelField(t) {
|
|
1723
1760
|
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
@@ -1732,6 +1769,7 @@ class Zt {
|
|
|
1732
1769
|
changeFieldEditorType(t, n) {
|
|
1733
1770
|
}
|
|
1734
1771
|
getBasicPropConfig(t) {
|
|
1772
|
+
var o, c;
|
|
1735
1773
|
var n = this;
|
|
1736
1774
|
return this.setDesignViewModelField(t), {
|
|
1737
1775
|
description: "Basic Information",
|
|
@@ -1753,7 +1791,8 @@ class Zt {
|
|
|
1753
1791
|
type: "combo-list",
|
|
1754
1792
|
textField: "value",
|
|
1755
1793
|
valueField: "key",
|
|
1756
|
-
data: me.getEditorTypesByMDataType(n.designViewModelField.type.name)
|
|
1794
|
+
data: me.getEditorTypesByMDataType(((c = (o = n.designViewModelField) == null ? void 0 : o.type) == null ? void 0 : c.name) || ""),
|
|
1795
|
+
editable: !1
|
|
1757
1796
|
}
|
|
1758
1797
|
},
|
|
1759
1798
|
label: {
|
|
@@ -1762,11 +1801,11 @@ class Zt {
|
|
|
1762
1801
|
$converter: "/converter/form-group-label.converter"
|
|
1763
1802
|
}
|
|
1764
1803
|
},
|
|
1765
|
-
setPropertyRelates(
|
|
1766
|
-
if (
|
|
1767
|
-
switch (
|
|
1804
|
+
setPropertyRelates(r, d) {
|
|
1805
|
+
if (r)
|
|
1806
|
+
switch (r && r.propertyID) {
|
|
1768
1807
|
case "type": {
|
|
1769
|
-
n.changeControlType(t,
|
|
1808
|
+
n.changeControlType(t, r);
|
|
1770
1809
|
break;
|
|
1771
1810
|
}
|
|
1772
1811
|
}
|
|
@@ -1779,13 +1818,13 @@ class Zt {
|
|
|
1779
1818
|
* @param newControlType 新控件类型
|
|
1780
1819
|
*/
|
|
1781
1820
|
changeControlType(t, n) {
|
|
1782
|
-
var
|
|
1821
|
+
var m, g, l, i, h;
|
|
1783
1822
|
const o = n.propertyValue, c = this.formSchemaUtils.getComponentById(this.componentId);
|
|
1784
|
-
let
|
|
1785
|
-
if (!
|
|
1823
|
+
let r = this.getControlParentContainer(t.id, c);
|
|
1824
|
+
if (!r)
|
|
1786
1825
|
return;
|
|
1787
|
-
const d =
|
|
1788
|
-
let
|
|
1826
|
+
const d = r.contents.findIndex((a) => a.id === t.id), y = r.contents[d];
|
|
1827
|
+
let w;
|
|
1789
1828
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1790
1829
|
editor: {
|
|
1791
1830
|
$type: o
|
|
@@ -1793,20 +1832,20 @@ class Zt {
|
|
|
1793
1832
|
name: this.designViewModelField.name,
|
|
1794
1833
|
require: this.designViewModelField.require,
|
|
1795
1834
|
readonly: this.designViewModelField.readonly
|
|
1796
|
-
}, !1),
|
|
1797
|
-
id:
|
|
1798
|
-
appearance:
|
|
1799
|
-
size:
|
|
1800
|
-
label:
|
|
1801
|
-
}), Object.assign(
|
|
1802
|
-
isTextArea:
|
|
1835
|
+
}, !1), w = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(w, {
|
|
1836
|
+
id: y.id,
|
|
1837
|
+
appearance: y.appearance,
|
|
1838
|
+
size: y.size,
|
|
1839
|
+
label: y.label
|
|
1840
|
+
}), Object.assign(w.editor, {
|
|
1841
|
+
isTextArea: w.isTextArea && y.isTextArea,
|
|
1803
1842
|
type: o || "",
|
|
1804
|
-
placeHolder: (
|
|
1805
|
-
holdPlace: (
|
|
1806
|
-
readonly: (
|
|
1807
|
-
require: (
|
|
1808
|
-
visible: (
|
|
1809
|
-
}),
|
|
1843
|
+
placeHolder: (m = y.editor) == null ? void 0 : m.placeHolder,
|
|
1844
|
+
holdPlace: (g = y.editor) == null ? void 0 : g.holdPlace,
|
|
1845
|
+
readonly: (l = y.editor) == null ? void 0 : l.readonly,
|
|
1846
|
+
require: (i = y.editor) == null ? void 0 : i.require,
|
|
1847
|
+
visible: (h = y.editor) == null ? void 0 : h.visible
|
|
1848
|
+
}), r.contents.splice(d, 1, w);
|
|
1810
1849
|
}
|
|
1811
1850
|
getAppearanceConfig(t = null) {
|
|
1812
1851
|
return {
|
|
@@ -1854,27 +1893,6 @@ class Zt {
|
|
|
1854
1893
|
return o;
|
|
1855
1894
|
}
|
|
1856
1895
|
}
|
|
1857
|
-
getBindingFieldEditorOptions(t) {
|
|
1858
|
-
const n = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
1859
|
-
return {
|
|
1860
|
-
type: "field-selector",
|
|
1861
|
-
bindingType: { enable: !1 },
|
|
1862
|
-
editorParams: {
|
|
1863
|
-
propertyData: t,
|
|
1864
|
-
formBasicInfo: n
|
|
1865
|
-
},
|
|
1866
|
-
columns: [
|
|
1867
|
-
{ field: "name", title: "字段名称" },
|
|
1868
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1869
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1870
|
-
],
|
|
1871
|
-
beforeOpenDialog: (o) => {
|
|
1872
|
-
const c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1873
|
-
o.instance.loadData(c);
|
|
1874
|
-
},
|
|
1875
|
-
textField: "bindingField"
|
|
1876
|
-
};
|
|
1877
|
-
}
|
|
1878
1896
|
}
|
|
1879
1897
|
class Jt extends Zt {
|
|
1880
1898
|
constructor(t, n) {
|
|
@@ -1911,17 +1929,21 @@ class Jt extends Zt {
|
|
|
1911
1929
|
{ field: "bindingField", title: "绑定字段" },
|
|
1912
1930
|
{ field: "fieldType", title: "字段类型" }
|
|
1913
1931
|
],
|
|
1932
|
+
textField: "bindingField",
|
|
1914
1933
|
data: o
|
|
1915
1934
|
}
|
|
1916
1935
|
};
|
|
1917
1936
|
}
|
|
1937
|
+
getBindingOtions(t) {
|
|
1938
|
+
return this.getFieldSelectorOptions(t);
|
|
1939
|
+
}
|
|
1918
1940
|
getComponentConfig(t, n = {}, o = {}) {
|
|
1919
1941
|
const c = Object.assign({
|
|
1920
1942
|
description: "组件信息",
|
|
1921
1943
|
title: "组件信息",
|
|
1922
1944
|
type: "input-group",
|
|
1923
1945
|
$converter: "/converter/property-editor.converter"
|
|
1924
|
-
}, n),
|
|
1946
|
+
}, n), r = Object.assign({
|
|
1925
1947
|
readonly: {
|
|
1926
1948
|
description: "",
|
|
1927
1949
|
title: "只读",
|
|
@@ -1943,7 +1965,7 @@ class Jt extends Zt {
|
|
|
1943
1965
|
type: "string"
|
|
1944
1966
|
}
|
|
1945
1967
|
}, o);
|
|
1946
|
-
return { ...c, properties: { ...
|
|
1968
|
+
return { ...c, properties: { ...r } };
|
|
1947
1969
|
}
|
|
1948
1970
|
}
|
|
1949
1971
|
class Kt extends Jt {
|
|
@@ -1975,36 +1997,36 @@ function en(e, t) {
|
|
|
1975
1997
|
canAccepts: n,
|
|
1976
1998
|
checkCanDeleteComponent: o,
|
|
1977
1999
|
checkCanMoveComponent: c,
|
|
1978
|
-
hideNestedPaddingInDesginerView:
|
|
2000
|
+
hideNestedPaddingInDesginerView: r,
|
|
1979
2001
|
onAcceptMovedChildElement: d,
|
|
1980
|
-
resolveComponentContext:
|
|
1981
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1982
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1983
|
-
} = Yt(e),
|
|
1984
|
-
function
|
|
1985
|
-
return new Kt(
|
|
2002
|
+
resolveComponentContext: y,
|
|
2003
|
+
triggerBelongedComponentToMoveWhenMoved: w,
|
|
2004
|
+
triggerBelongedComponentToDeleteWhenDeleted: m
|
|
2005
|
+
} = Yt(e), g = e.schema;
|
|
2006
|
+
function l(i) {
|
|
2007
|
+
return new Kt(i, t).getPropertyConfig(g);
|
|
1986
2008
|
}
|
|
1987
2009
|
return {
|
|
1988
2010
|
canAccepts: n,
|
|
1989
2011
|
checkCanDeleteComponent: o,
|
|
1990
2012
|
checkCanMoveComponent: c,
|
|
1991
|
-
hideNestedPaddingInDesginerView:
|
|
2013
|
+
hideNestedPaddingInDesginerView: r,
|
|
1992
2014
|
onAcceptMovedChildElement: d,
|
|
1993
|
-
resolveComponentContext:
|
|
1994
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1995
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1996
|
-
getPropsConfig:
|
|
2015
|
+
resolveComponentContext: y,
|
|
2016
|
+
triggerBelongedComponentToMoveWhenMoved: w,
|
|
2017
|
+
triggerBelongedComponentToDeleteWhenDeleted: m,
|
|
2018
|
+
getPropsConfig: l
|
|
1997
2019
|
};
|
|
1998
2020
|
}
|
|
1999
|
-
const tn = /* @__PURE__ */
|
|
2021
|
+
const tn = /* @__PURE__ */ N({
|
|
2000
2022
|
name: "FComboListDesign",
|
|
2001
2023
|
props: ee,
|
|
2002
2024
|
emits: ["clear", "update:modelValue", "change"],
|
|
2003
2025
|
setup(e, t) {
|
|
2004
|
-
const n =
|
|
2026
|
+
const n = C(), o = q("designer-host-service"), c = q("design-item-context"), r = en(c, o), d = Re(n, c, r);
|
|
2005
2027
|
return ie(() => {
|
|
2006
2028
|
n.value.componentInstance = d;
|
|
2007
|
-
}), t.expose(d.value), () =>
|
|
2029
|
+
}), t.expose(d.value), () => v(le, {
|
|
2008
2030
|
ref: n,
|
|
2009
2031
|
id: e.id,
|
|
2010
2032
|
disable: e.disabled,
|
|
@@ -2033,210 +2055,210 @@ U.register = (e, t, n, o) => {
|
|
|
2033
2055
|
U.registerDesigner = (e, t, n) => {
|
|
2034
2056
|
e["combo-list"] = tn, t["combo-list"] = fe;
|
|
2035
2057
|
};
|
|
2036
|
-
const z = nn(U), _ = /* @__PURE__ */
|
|
2058
|
+
const z = nn(U), _ = /* @__PURE__ */ N({
|
|
2037
2059
|
name: "FOrder",
|
|
2038
2060
|
props: K,
|
|
2039
2061
|
emits: ["change"],
|
|
2040
2062
|
setup(e, t) {
|
|
2041
|
-
const n =
|
|
2063
|
+
const n = C(e.items), o = C("排序列"), c = C("排序方式"), r = C("添加排序列"), d = [{
|
|
2042
2064
|
id: "asc",
|
|
2043
2065
|
name: "升序"
|
|
2044
2066
|
}, {
|
|
2045
2067
|
id: "desc",
|
|
2046
2068
|
name: "降序"
|
|
2047
|
-
}],
|
|
2048
|
-
function
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2069
|
+
}], y = C(/* @__PURE__ */ new Map());
|
|
2070
|
+
function w() {
|
|
2071
|
+
const s = n.value.map((u) => [u.id, !0]);
|
|
2072
|
+
y.value = new Map(s);
|
|
2051
2073
|
}
|
|
2052
|
-
|
|
2053
|
-
const
|
|
2074
|
+
w();
|
|
2075
|
+
const m = B(() => e.dataSource.map((s) => (s.disabled = y.value.has(s.id), s))), g = B(() => ({
|
|
2054
2076
|
"f-order": !0
|
|
2055
2077
|
}));
|
|
2056
|
-
function
|
|
2057
|
-
n.value = n.value.filter((u) => u.id !==
|
|
2078
|
+
function l(s) {
|
|
2079
|
+
n.value = n.value.filter((u) => u.id !== s.id), w(), t.emit("change", n.value);
|
|
2058
2080
|
}
|
|
2059
|
-
function
|
|
2081
|
+
function i() {
|
|
2060
2082
|
n.value = [...n.value, {
|
|
2061
2083
|
id: Date.now().toString(),
|
|
2062
2084
|
name: "",
|
|
2063
2085
|
order: "asc"
|
|
2064
|
-
}],
|
|
2086
|
+
}], w(), t.emit("change", n.value);
|
|
2065
2087
|
}
|
|
2066
|
-
function
|
|
2067
|
-
if (
|
|
2068
|
-
const u =
|
|
2088
|
+
function h(s) {
|
|
2089
|
+
if (s && s.length === 1) {
|
|
2090
|
+
const u = s[0], F = n.value.find((k) => k.id === u.id);
|
|
2069
2091
|
F && (F.name = u.name);
|
|
2070
2092
|
}
|
|
2071
|
-
|
|
2093
|
+
w(), t.emit("change", n.value);
|
|
2072
2094
|
}
|
|
2073
|
-
function
|
|
2074
|
-
if (
|
|
2095
|
+
function a(s) {
|
|
2096
|
+
if (s && s.length) {
|
|
2075
2097
|
const u = /* @__PURE__ */ new Map();
|
|
2076
|
-
|
|
2098
|
+
s.reduce((F, k) => (F.set(k.id, k), F), u), n.value = s.map((F) => u.get(F.id)), t.emit("change", n.value);
|
|
2077
2099
|
}
|
|
2078
2100
|
}
|
|
2079
|
-
function
|
|
2080
|
-
return
|
|
2101
|
+
function f() {
|
|
2102
|
+
return v(de, {
|
|
2081
2103
|
style: "flex:1",
|
|
2082
2104
|
data: n.value,
|
|
2083
2105
|
draggable: !0,
|
|
2084
2106
|
view: "DraggableView",
|
|
2085
2107
|
"keep-order": !0,
|
|
2086
2108
|
itemClass: "f-order-item",
|
|
2087
|
-
onRemoveItem:
|
|
2088
|
-
onChange:
|
|
2109
|
+
onRemoveItem: l,
|
|
2110
|
+
onChange: a
|
|
2089
2111
|
}, {
|
|
2090
|
-
header: () =>
|
|
2112
|
+
header: () => v("div", {
|
|
2091
2113
|
class: "f-order-header"
|
|
2092
|
-
}, [
|
|
2114
|
+
}, [v("span", {
|
|
2093
2115
|
class: "f-order-header-order-field"
|
|
2094
|
-
}, [o.value]),
|
|
2116
|
+
}, [o.value]), v("span", {
|
|
2095
2117
|
class: "f-order-header-order-type"
|
|
2096
2118
|
}, [c.value])]),
|
|
2097
|
-
itemContent: (
|
|
2119
|
+
itemContent: (s) => v("div", {
|
|
2098
2120
|
class: "f-order-item-content"
|
|
2099
|
-
}, [
|
|
2121
|
+
}, [v(z, {
|
|
2100
2122
|
class: "f-order-item-content-order-field",
|
|
2101
|
-
data:
|
|
2123
|
+
data: m.value,
|
|
2102
2124
|
valueField: "id",
|
|
2103
2125
|
textField: "name",
|
|
2104
2126
|
idField: "id",
|
|
2105
|
-
modelValue:
|
|
2106
|
-
"onUpdate:modelValue": (u) =>
|
|
2107
|
-
onChange:
|
|
2108
|
-
onClear:
|
|
2109
|
-
}, null),
|
|
2127
|
+
modelValue: s.id,
|
|
2128
|
+
"onUpdate:modelValue": (u) => s.id = u,
|
|
2129
|
+
onChange: h,
|
|
2130
|
+
onClear: h
|
|
2131
|
+
}, null), v(z, {
|
|
2110
2132
|
class: "f-order-item-content-order-type",
|
|
2111
2133
|
data: d,
|
|
2112
2134
|
valueField: "id",
|
|
2113
2135
|
textField: "name",
|
|
2114
2136
|
idField: "id",
|
|
2115
|
-
modelValue:
|
|
2116
|
-
"onUpdate:modelValue": (u) =>
|
|
2117
|
-
onChange:
|
|
2137
|
+
modelValue: s.order,
|
|
2138
|
+
"onUpdate:modelValue": (u) => s.order = u,
|
|
2139
|
+
onChange: h
|
|
2118
2140
|
}, null)]),
|
|
2119
|
-
footer: () =>
|
|
2141
|
+
footer: () => v("div", {
|
|
2120
2142
|
class: "f-order-footer"
|
|
2121
|
-
}, [
|
|
2143
|
+
}, [v(pe, {
|
|
2122
2144
|
type: "link",
|
|
2123
2145
|
class: "f-order-add-button",
|
|
2124
|
-
onClick:
|
|
2146
|
+
onClick: i
|
|
2125
2147
|
}, {
|
|
2126
|
-
default: () =>
|
|
2148
|
+
default: () => v(Q, null, [v("span", {
|
|
2127
2149
|
class: "f-order-add-icon"
|
|
2128
|
-
}, [
|
|
2150
|
+
}, [v("i", {
|
|
2129
2151
|
class: "f-icon f-icon-add"
|
|
2130
|
-
}, null)]),
|
|
2152
|
+
}, null)]), r.value])
|
|
2131
2153
|
})])
|
|
2132
2154
|
});
|
|
2133
2155
|
}
|
|
2134
|
-
return () =>
|
|
2135
|
-
class:
|
|
2136
|
-
}, [
|
|
2156
|
+
return () => v("div", {
|
|
2157
|
+
class: g.value
|
|
2158
|
+
}, [f()]);
|
|
2137
2159
|
}
|
|
2138
2160
|
});
|
|
2139
2161
|
function on(e, t, n) {
|
|
2140
|
-
var
|
|
2162
|
+
var S;
|
|
2141
2163
|
function o() {
|
|
2142
2164
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
2143
2165
|
}
|
|
2144
2166
|
o();
|
|
2145
|
-
const c = n && n.getStyles && n.getStyles() || "",
|
|
2146
|
-
function
|
|
2167
|
+
const c = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", d = C();
|
|
2168
|
+
function y() {
|
|
2147
2169
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2148
2170
|
}
|
|
2149
|
-
function
|
|
2171
|
+
function w() {
|
|
2150
2172
|
return !1;
|
|
2151
2173
|
}
|
|
2152
|
-
function
|
|
2174
|
+
function m() {
|
|
2153
2175
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
2154
2176
|
}
|
|
2155
|
-
function
|
|
2177
|
+
function g() {
|
|
2156
2178
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
2157
2179
|
}
|
|
2158
|
-
function
|
|
2159
|
-
if (!
|
|
2180
|
+
function l(b) {
|
|
2181
|
+
if (!b || !b.value)
|
|
2160
2182
|
return null;
|
|
2161
|
-
if (
|
|
2162
|
-
return
|
|
2163
|
-
const D = b
|
|
2183
|
+
if (b.value.schema && b.value.schema.type === "component")
|
|
2184
|
+
return b.value;
|
|
2185
|
+
const D = C(b == null ? void 0 : b.value.parent), p = l(D);
|
|
2164
2186
|
return p || null;
|
|
2165
2187
|
}
|
|
2166
|
-
function
|
|
2167
|
-
const { componentInstance: D, designerItemElementRef: p } =
|
|
2168
|
-
return !D || !D.value ? null : D.value.canMove ? p :
|
|
2188
|
+
function i(b = t) {
|
|
2189
|
+
const { componentInstance: D, designerItemElementRef: p } = b;
|
|
2190
|
+
return !D || !D.value ? null : D.value.canMove ? p : i(b.parent);
|
|
2169
2191
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return !!n && n.canAccepts(
|
|
2192
|
+
function h(b) {
|
|
2193
|
+
return !!n && n.canAccepts(b);
|
|
2172
2194
|
}
|
|
2173
|
-
function
|
|
2195
|
+
function a() {
|
|
2174
2196
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2175
2197
|
}
|
|
2176
|
-
function
|
|
2198
|
+
function f() {
|
|
2177
2199
|
}
|
|
2178
|
-
function
|
|
2200
|
+
function s(b, D) {
|
|
2179
2201
|
D && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(D);
|
|
2180
2202
|
}
|
|
2181
|
-
function u(
|
|
2182
|
-
const { componentType: D } =
|
|
2183
|
-
let p = R(D,
|
|
2184
|
-
n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(
|
|
2203
|
+
function u(b) {
|
|
2204
|
+
const { componentType: D } = b;
|
|
2205
|
+
let p = R(D, b);
|
|
2206
|
+
n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(b, p));
|
|
2185
2207
|
const V = D.toLowerCase().replace("-", "_");
|
|
2186
2208
|
return p && !p.id && p.type === D && (p.id = `${V}_${Math.random().toString().slice(2, 6)}`), p;
|
|
2187
2209
|
}
|
|
2188
|
-
function F(
|
|
2189
|
-
const p = String(
|
|
2210
|
+
function F(b, D) {
|
|
2211
|
+
const p = String(b.getAttribute("data-controltype")), V = b.getAttribute("data-feature"), A = V ? JSON.parse(V) : {};
|
|
2190
2212
|
A.parentComponentInstance = d.value;
|
|
2191
|
-
let
|
|
2192
|
-
n && n.onAcceptNewChildElement && (
|
|
2213
|
+
let T = R(p, A);
|
|
2214
|
+
n && n.onAcceptNewChildElement && (T = n.onAcceptNewChildElement(b, D, T));
|
|
2193
2215
|
const x = p.toLowerCase().replace("-", "_");
|
|
2194
|
-
return
|
|
2216
|
+
return T && !T.id && T.type === p && (T.id = `${x}_${Math.random().toString().slice(2, 6)}`), T;
|
|
2195
2217
|
}
|
|
2196
|
-
function
|
|
2218
|
+
function k(b) {
|
|
2197
2219
|
}
|
|
2198
|
-
function j(...
|
|
2220
|
+
function j(...b) {
|
|
2199
2221
|
if (n && n.getPropsConfig)
|
|
2200
|
-
return n.getPropsConfig(...
|
|
2222
|
+
return n.getPropsConfig(...b);
|
|
2201
2223
|
}
|
|
2202
2224
|
return d.value = {
|
|
2203
|
-
canMove:
|
|
2204
|
-
canSelectParent:
|
|
2205
|
-
canDelete:
|
|
2206
|
-
canNested: !
|
|
2225
|
+
canMove: y(),
|
|
2226
|
+
canSelectParent: w(),
|
|
2227
|
+
canDelete: m(),
|
|
2228
|
+
canNested: !g(),
|
|
2207
2229
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2208
2230
|
elementRef: e,
|
|
2209
|
-
parent: (
|
|
2231
|
+
parent: (S = t == null ? void 0 : t.parent) == null ? void 0 : S.componentInstance,
|
|
2210
2232
|
schema: t == null ? void 0 : t.schema,
|
|
2211
2233
|
styles: c,
|
|
2212
|
-
designerClass:
|
|
2213
|
-
canAccepts:
|
|
2214
|
-
getBelongedComponentInstance:
|
|
2215
|
-
getDraggableDesignItemElement:
|
|
2216
|
-
getDraggingDisplayText:
|
|
2234
|
+
designerClass: r,
|
|
2235
|
+
canAccepts: h,
|
|
2236
|
+
getBelongedComponentInstance: l,
|
|
2237
|
+
getDraggableDesignItemElement: i,
|
|
2238
|
+
getDraggingDisplayText: a,
|
|
2217
2239
|
getPropConfig: j,
|
|
2218
|
-
getDragScopeElement:
|
|
2219
|
-
onAcceptMovedChildElement:
|
|
2240
|
+
getDragScopeElement: f,
|
|
2241
|
+
onAcceptMovedChildElement: s,
|
|
2220
2242
|
onAcceptNewChildElement: F,
|
|
2221
|
-
onChildElementMovedOut:
|
|
2243
|
+
onChildElementMovedOut: k,
|
|
2222
2244
|
addNewChildComponentSchema: u,
|
|
2223
2245
|
updateDragAndDropRules: o,
|
|
2224
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
2225
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
2246
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
2247
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
2226
2248
|
}, d;
|
|
2227
2249
|
}
|
|
2228
2250
|
function an() {
|
|
2229
2251
|
function e(t) {
|
|
2230
|
-
var c,
|
|
2252
|
+
var c, r;
|
|
2231
2253
|
if (!t)
|
|
2232
2254
|
return !1;
|
|
2233
2255
|
const n = ((c = t.targetContainer) == null ? void 0 : c.componentInstance) && t.targetContainer.componentInstance.value;
|
|
2234
2256
|
if (!n)
|
|
2235
2257
|
return !1;
|
|
2236
|
-
const o = (
|
|
2258
|
+
const o = (r = n.schema.appearance) == null ? void 0 : r.class;
|
|
2237
2259
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2238
|
-
const d = n.schema.type,
|
|
2239
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
2260
|
+
const d = n.schema.type, y = (d === "response-form" || d === "content-container") && o && o.includes("farris-form");
|
|
2261
|
+
if (n.schema.type !== "response-layout-item" && !y)
|
|
2240
2262
|
return !1;
|
|
2241
2263
|
}
|
|
2242
2264
|
return t.controlType !== "field-set";
|
|
@@ -2819,29 +2841,29 @@ const rn = "https://json-schema.org/draft/2020-12/schema", ln = "https://farris-
|
|
|
2819
2841
|
required: pn
|
|
2820
2842
|
}, W = /* @__PURE__ */ new Map();
|
|
2821
2843
|
function mn() {
|
|
2822
|
-
function e(
|
|
2844
|
+
function e(a, f, s, u) {
|
|
2823
2845
|
var F;
|
|
2824
|
-
if (typeof
|
|
2825
|
-
return ((F = u[
|
|
2826
|
-
if (typeof
|
|
2827
|
-
const
|
|
2828
|
-
if (
|
|
2829
|
-
return Number(u[
|
|
2830
|
-
if (
|
|
2831
|
-
return Number(u[
|
|
2832
|
-
if (
|
|
2833
|
-
return Number(u[
|
|
2846
|
+
if (typeof s == "number")
|
|
2847
|
+
return ((F = u[a]) == null ? void 0 : F.length) === s;
|
|
2848
|
+
if (typeof s == "object") {
|
|
2849
|
+
const k = Object.keys(s)[0], j = s[k];
|
|
2850
|
+
if (k === "not")
|
|
2851
|
+
return Number(u[a].length) !== Number(j);
|
|
2852
|
+
if (k === "moreThan")
|
|
2853
|
+
return Number(u[a].length) >= Number(j);
|
|
2854
|
+
if (k === "lessThan")
|
|
2855
|
+
return Number(u[a].length) <= Number(j);
|
|
2834
2856
|
}
|
|
2835
2857
|
return !1;
|
|
2836
2858
|
}
|
|
2837
|
-
function t(
|
|
2838
|
-
return typeof
|
|
2859
|
+
function t(a, f, s, u) {
|
|
2860
|
+
return typeof s == "boolean" ? u.childrenClassList.includes(f) === !!s : !1;
|
|
2839
2861
|
}
|
|
2840
|
-
function n(
|
|
2841
|
-
return typeof
|
|
2862
|
+
function n(a, f, s, u) {
|
|
2863
|
+
return typeof s == "boolean" ? u.parentClassList.includes(f) === !!s : !1;
|
|
2842
2864
|
}
|
|
2843
|
-
function o(
|
|
2844
|
-
return typeof
|
|
2865
|
+
function o(a, f, s, u) {
|
|
2866
|
+
return typeof s == "boolean" ? u.parentClassList.includes(f) === !!s : !1;
|
|
2845
2867
|
}
|
|
2846
2868
|
const c = /* @__PURE__ */ new Map([
|
|
2847
2869
|
["length", e],
|
|
@@ -2849,116 +2871,116 @@ function mn() {
|
|
|
2849
2871
|
["hasSibling", o],
|
|
2850
2872
|
["hasParent", n]
|
|
2851
2873
|
]);
|
|
2852
|
-
function
|
|
2853
|
-
const
|
|
2854
|
-
return typeof
|
|
2874
|
+
function r(a, f) {
|
|
2875
|
+
const s = a;
|
|
2876
|
+
return typeof f == "number" ? [{ target: s, operator: "length", param: null, value: Number(f) }] : typeof f == "object" ? Object.keys(f).map((u) => {
|
|
2855
2877
|
if (u === "length")
|
|
2856
|
-
return { target:
|
|
2857
|
-
const F = u,
|
|
2858
|
-
return { target:
|
|
2878
|
+
return { target: s, operator: "length", param: null, value: f[u] };
|
|
2879
|
+
const F = u, k = f[u];
|
|
2880
|
+
return { target: s, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param: F, value: k };
|
|
2859
2881
|
}) : [];
|
|
2860
2882
|
}
|
|
2861
|
-
function d(
|
|
2862
|
-
if (c.has(
|
|
2863
|
-
const
|
|
2864
|
-
return
|
|
2883
|
+
function d(a, f) {
|
|
2884
|
+
if (c.has(a.operator)) {
|
|
2885
|
+
const s = c.get(a.operator);
|
|
2886
|
+
return s && s(a.target, a.param, a.value, f) || !1;
|
|
2865
2887
|
}
|
|
2866
2888
|
return !1;
|
|
2867
2889
|
}
|
|
2868
|
-
function
|
|
2869
|
-
return Object.keys(
|
|
2870
|
-
const
|
|
2871
|
-
return
|
|
2872
|
-
}, []).reduce((
|
|
2873
|
-
}
|
|
2874
|
-
function
|
|
2875
|
-
const
|
|
2876
|
-
return u ? !
|
|
2877
|
-
}
|
|
2878
|
-
function
|
|
2879
|
-
const
|
|
2880
|
-
return
|
|
2881
|
-
}
|
|
2882
|
-
function
|
|
2883
|
-
return (
|
|
2884
|
-
const
|
|
2885
|
-
return
|
|
2886
|
-
const
|
|
2887
|
-
return u[F] =
|
|
2888
|
-
},
|
|
2890
|
+
function y(a, f) {
|
|
2891
|
+
return Object.keys(a).reduce((k, j) => {
|
|
2892
|
+
const S = r(j, a[j]);
|
|
2893
|
+
return k.push(...S), k;
|
|
2894
|
+
}, []).reduce((k, j) => k && d(j, f), !0);
|
|
2895
|
+
}
|
|
2896
|
+
function w(a, f) {
|
|
2897
|
+
const s = Object.keys(a), u = s.includes("allOf"), F = s.includes("anyOf"), k = u || F, b = (k ? a[k ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((p) => y(p, f));
|
|
2898
|
+
return u ? !b.includes(!1) : b.includes(!0);
|
|
2899
|
+
}
|
|
2900
|
+
function m(a, f) {
|
|
2901
|
+
const s = a.const;
|
|
2902
|
+
return s ? typeof s == "boolean" ? s : typeof s == "object" ? w(s, f) : !1 : !1;
|
|
2903
|
+
}
|
|
2904
|
+
function g(a) {
|
|
2905
|
+
return (f) => {
|
|
2906
|
+
const s = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2907
|
+
return a && a.properties && Object.keys(a.properties).reduce((u, F) => {
|
|
2908
|
+
const k = a.properties[F];
|
|
2909
|
+
return u[F] = m(k, f), u;
|
|
2910
|
+
}, s), s;
|
|
2889
2911
|
};
|
|
2890
2912
|
}
|
|
2891
|
-
function a
|
|
2892
|
-
if (
|
|
2893
|
-
const { rules: u, contents: F } =
|
|
2894
|
-
|
|
2895
|
-
(
|
|
2913
|
+
function l(a, f, s) {
|
|
2914
|
+
if (f.type === "object" && f.properties) {
|
|
2915
|
+
const { rules: u, contents: F } = f.properties;
|
|
2916
|
+
s.set(a, g(u)), F && Object.keys(F.properties).forEach(
|
|
2917
|
+
(k) => l(k, F.properties[k], s)
|
|
2896
2918
|
);
|
|
2897
2919
|
}
|
|
2898
2920
|
}
|
|
2899
|
-
function
|
|
2900
|
-
const { properties:
|
|
2901
|
-
Object.keys(
|
|
2902
|
-
|
|
2921
|
+
function i() {
|
|
2922
|
+
const { properties: a } = fn;
|
|
2923
|
+
Object.keys(a).forEach((f) => {
|
|
2924
|
+
l(f, a[f], W);
|
|
2903
2925
|
});
|
|
2904
2926
|
}
|
|
2905
|
-
function
|
|
2906
|
-
const
|
|
2907
|
-
return W.has(
|
|
2927
|
+
function h(a, f) {
|
|
2928
|
+
const s = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2929
|
+
return W.has(a) ? W.get(a)(f) : s;
|
|
2908
2930
|
}
|
|
2909
|
-
return
|
|
2931
|
+
return i(), { getRuleValue: h };
|
|
2910
2932
|
}
|
|
2911
2933
|
function yn(e, t) {
|
|
2912
2934
|
var D;
|
|
2913
|
-
const n = e.schema, o = (D = e.parent) == null ? void 0 : D.schema, c = mn(),
|
|
2914
|
-
let
|
|
2915
|
-
function
|
|
2916
|
-
return
|
|
2935
|
+
const n = e.schema, o = (D = e.parent) == null ? void 0 : D.schema, c = mn(), r = C(!1), d = C(!1);
|
|
2936
|
+
let y = !0, w = !1, m, g = !1;
|
|
2937
|
+
function l(p) {
|
|
2938
|
+
return m && m.componentClassList && m.componentClassList.includes("f-form-layout") && m.componentClassList.includes("farris-form") ? p.sourceType === "control" && p.controlCategory === "input" || p.sourceType === "move" && p.controlType === "form-group" : !0;
|
|
2917
2939
|
}
|
|
2918
|
-
function
|
|
2919
|
-
return !(!an().basalDragulaRuleForContainer(p) || !
|
|
2940
|
+
function i(p) {
|
|
2941
|
+
return !(!an().basalDragulaRuleForContainer(p) || !y || !l(p));
|
|
2920
2942
|
}
|
|
2921
|
-
function
|
|
2922
|
-
|
|
2923
|
-
const p = n, V = p.appearance && p.appearance.class || "", A = V.split(" "),
|
|
2943
|
+
function h() {
|
|
2944
|
+
r.value = !1, d.value = !1;
|
|
2945
|
+
const p = n, V = p.appearance && p.appearance.class || "", A = V.split(" "), T = p.contents || [], x = T.length ? T[0] : null, I = x && x.appearance ? x.appearance.class : "", P = I ? I.split(" ") : [], E = T.length ? T.reduce((te, G) => {
|
|
2924
2946
|
const ne = G && G.appearance ? G.appearance.class : "", be = ne ? ne.split(" ") : [];
|
|
2925
2947
|
return te.push(...be), te;
|
|
2926
|
-
}, []) : [],
|
|
2927
|
-
|
|
2948
|
+
}, []) : [], O = o, L = O && O.appearance && O.appearance.class || "", ye = L ? L.split(" ") : [];
|
|
2949
|
+
m = {
|
|
2928
2950
|
componentClass: V,
|
|
2929
2951
|
componentClassList: A,
|
|
2930
|
-
childContents:
|
|
2952
|
+
childContents: T,
|
|
2931
2953
|
firstChildContent: x,
|
|
2932
2954
|
firstChildClass: I,
|
|
2933
|
-
firstChildClassList:
|
|
2934
|
-
parent:
|
|
2955
|
+
firstChildClassList: P,
|
|
2956
|
+
parent: O,
|
|
2935
2957
|
parentClass: L,
|
|
2936
2958
|
parentClassList: ye,
|
|
2937
|
-
children:
|
|
2959
|
+
children: T,
|
|
2938
2960
|
childrenClassList: E
|
|
2939
2961
|
};
|
|
2940
|
-
const { canAccept: ge, fixed: he, hidePadding: ve } = c.getRuleValue(A[0],
|
|
2941
|
-
return
|
|
2962
|
+
const { canAccept: ge, fixed: he, hidePadding: ve } = c.getRuleValue(A[0], m);
|
|
2963
|
+
return y = ge, w = ve, g = he, !0;
|
|
2942
2964
|
}
|
|
2943
|
-
function
|
|
2944
|
-
|
|
2965
|
+
function a(p) {
|
|
2966
|
+
Te();
|
|
2945
2967
|
}
|
|
2946
|
-
function
|
|
2968
|
+
function f() {
|
|
2947
2969
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2948
2970
|
}
|
|
2949
|
-
function
|
|
2971
|
+
function s(p, V) {
|
|
2950
2972
|
const A = n;
|
|
2951
2973
|
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2952
|
-
const { label: I } = p,
|
|
2953
|
-
return
|
|
2974
|
+
const { label: I } = p, P = R("form-group");
|
|
2975
|
+
return P.editor = V, P.label = I, u(P), delete P.editor.id, delete P.editor.binding, delete P.editor.appearance, delete P.editor.visible, P;
|
|
2954
2976
|
}
|
|
2955
2977
|
return V;
|
|
2956
2978
|
}
|
|
2957
2979
|
function u(p) {
|
|
2958
2980
|
const V = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
2959
2981
|
if (V && V.schema && V.schema.componentType) {
|
|
2960
|
-
const A = V.schema.componentType,
|
|
2961
|
-
p.appearance || (p.appearance = {}), p.appearance.class =
|
|
2982
|
+
const A = V.schema.componentType, T = F(A);
|
|
2983
|
+
p.appearance || (p.appearance = {}), p.appearance.class = T;
|
|
2962
2984
|
}
|
|
2963
2985
|
}
|
|
2964
2986
|
function F(p) {
|
|
@@ -2995,141 +3017,141 @@ function yn(e, t) {
|
|
|
2995
3017
|
}
|
|
2996
3018
|
return V;
|
|
2997
3019
|
}
|
|
2998
|
-
function
|
|
2999
|
-
const
|
|
3000
|
-
if ((
|
|
3001
|
-
const
|
|
3002
|
-
return E.editor = A, E.label =
|
|
3020
|
+
function k(p, V, A) {
|
|
3021
|
+
const T = n;
|
|
3022
|
+
if ((T.appearance && T.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3023
|
+
const P = String(p.innerText), E = R("form-group");
|
|
3024
|
+
return E.editor = A, E.label = P, E;
|
|
3003
3025
|
}
|
|
3004
3026
|
return A;
|
|
3005
3027
|
}
|
|
3006
3028
|
function j() {
|
|
3007
|
-
return !
|
|
3029
|
+
return !g;
|
|
3008
3030
|
}
|
|
3009
|
-
function
|
|
3010
|
-
return !
|
|
3031
|
+
function S() {
|
|
3032
|
+
return !g;
|
|
3011
3033
|
}
|
|
3012
|
-
function
|
|
3013
|
-
return
|
|
3034
|
+
function b() {
|
|
3035
|
+
return w;
|
|
3014
3036
|
}
|
|
3015
3037
|
return {
|
|
3016
|
-
canAccepts:
|
|
3017
|
-
checkCanDeleteComponent:
|
|
3038
|
+
canAccepts: i,
|
|
3039
|
+
checkCanDeleteComponent: S,
|
|
3018
3040
|
checkCanMoveComponent: j,
|
|
3019
|
-
getStyles:
|
|
3020
|
-
hideNestedPaddingInDesginerView:
|
|
3021
|
-
onAcceptNewChildElement:
|
|
3022
|
-
onAcceptMovedChildElement:
|
|
3023
|
-
resolveComponentContext:
|
|
3024
|
-
onResolveNewComponentSchema:
|
|
3025
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
3041
|
+
getStyles: f,
|
|
3042
|
+
hideNestedPaddingInDesginerView: b,
|
|
3043
|
+
onAcceptNewChildElement: k,
|
|
3044
|
+
onAcceptMovedChildElement: a,
|
|
3045
|
+
resolveComponentContext: h,
|
|
3046
|
+
onResolveNewComponentSchema: s,
|
|
3047
|
+
triggerBelongedComponentToMoveWhenMoved: r,
|
|
3026
3048
|
triggerBelongedComponentToDeleteWhenDeleted: d
|
|
3027
3049
|
};
|
|
3028
3050
|
}
|
|
3029
|
-
const gn = /* @__PURE__ */
|
|
3051
|
+
const gn = /* @__PURE__ */ N({
|
|
3030
3052
|
name: "FOrderDesign",
|
|
3031
3053
|
props: K,
|
|
3032
3054
|
emits: ["change"],
|
|
3033
3055
|
setup(e, t) {
|
|
3034
3056
|
var j;
|
|
3035
|
-
const n =
|
|
3057
|
+
const n = C(e.items), o = C("排序列"), c = C("排序方式"), r = C("添加排序列"), d = [{
|
|
3036
3058
|
id: "asc",
|
|
3037
3059
|
name: "升序"
|
|
3038
3060
|
}, {
|
|
3039
3061
|
id: "desc",
|
|
3040
3062
|
name: "降序"
|
|
3041
|
-
}],
|
|
3063
|
+
}], y = C(/* @__PURE__ */ new Map()), w = C(), m = q("design-item-context"), g = yn(m.schema, (j = m.parent) == null ? void 0 : j.schema), l = on(w, m, g);
|
|
3042
3064
|
ie(() => {
|
|
3043
|
-
|
|
3044
|
-
}), t.expose(
|
|
3045
|
-
function
|
|
3046
|
-
const
|
|
3047
|
-
|
|
3065
|
+
w.value.componentInstance = l;
|
|
3066
|
+
}), t.expose(l.value);
|
|
3067
|
+
function i() {
|
|
3068
|
+
const S = n.value.map((b) => [b.id, !0]);
|
|
3069
|
+
y.value = new Map(S);
|
|
3048
3070
|
}
|
|
3049
|
-
|
|
3050
|
-
const
|
|
3071
|
+
i();
|
|
3072
|
+
const h = B(() => e.dataSource.map((S) => (S.disabled = y.value.has(S.id), S))), a = B(() => ({
|
|
3051
3073
|
"f-order": !0
|
|
3052
3074
|
}));
|
|
3053
|
-
function
|
|
3054
|
-
n.value = n.value.filter((
|
|
3075
|
+
function f(S) {
|
|
3076
|
+
n.value = n.value.filter((b) => b.id !== S.id), i(), t.emit("change", n.value);
|
|
3055
3077
|
}
|
|
3056
|
-
function
|
|
3078
|
+
function s() {
|
|
3057
3079
|
n.value = [...n.value, {
|
|
3058
3080
|
id: Date.now().toString(),
|
|
3059
3081
|
name: "",
|
|
3060
3082
|
order: "asc"
|
|
3061
|
-
}],
|
|
3083
|
+
}], i(), t.emit("change", n.value);
|
|
3062
3084
|
}
|
|
3063
|
-
function u(
|
|
3064
|
-
|
|
3085
|
+
function u(S) {
|
|
3086
|
+
i(), t.emit("change", n.value);
|
|
3065
3087
|
}
|
|
3066
|
-
function F(
|
|
3067
|
-
if (
|
|
3068
|
-
const
|
|
3069
|
-
|
|
3088
|
+
function F(S) {
|
|
3089
|
+
if (S && S.length) {
|
|
3090
|
+
const b = /* @__PURE__ */ new Map();
|
|
3091
|
+
S.reduce((D, p) => (D.set(p.id, p), D), b), n.value = S.map((D) => b.get(D.id)), t.emit("change", n.value);
|
|
3070
3092
|
}
|
|
3071
3093
|
}
|
|
3072
|
-
function
|
|
3073
|
-
return
|
|
3094
|
+
function k() {
|
|
3095
|
+
return v(de, {
|
|
3074
3096
|
style: "flex:1",
|
|
3075
3097
|
data: n.value,
|
|
3076
3098
|
draggable: !0,
|
|
3077
3099
|
view: "DraggableView",
|
|
3078
3100
|
"keep-order": !0,
|
|
3079
3101
|
itemClass: "f-order-item",
|
|
3080
|
-
onRemoveItem:
|
|
3102
|
+
onRemoveItem: f,
|
|
3081
3103
|
onChange: F
|
|
3082
3104
|
}, {
|
|
3083
|
-
header: () =>
|
|
3105
|
+
header: () => v("div", {
|
|
3084
3106
|
class: "f-order-header"
|
|
3085
|
-
}, [
|
|
3107
|
+
}, [v("span", {
|
|
3086
3108
|
class: "f-order-header-order-field"
|
|
3087
|
-
}, [o.value]),
|
|
3109
|
+
}, [o.value]), v("span", {
|
|
3088
3110
|
class: "f-order-header-order-type"
|
|
3089
3111
|
}, [c.value])]),
|
|
3090
|
-
itemContent: (
|
|
3112
|
+
itemContent: (S) => v("div", {
|
|
3091
3113
|
class: "f-order-item-content"
|
|
3092
|
-
}, [
|
|
3114
|
+
}, [v(z, {
|
|
3093
3115
|
class: "f-order-item-content-order-field",
|
|
3094
|
-
data:
|
|
3116
|
+
data: h.value,
|
|
3095
3117
|
valueField: "id",
|
|
3096
3118
|
textField: "name",
|
|
3097
3119
|
idField: "id",
|
|
3098
|
-
modelValue:
|
|
3099
|
-
"onUpdate:modelValue": (
|
|
3120
|
+
modelValue: S.id,
|
|
3121
|
+
"onUpdate:modelValue": (b) => S.id = b,
|
|
3100
3122
|
onChange: u,
|
|
3101
3123
|
onClear: u
|
|
3102
|
-
}, null),
|
|
3124
|
+
}, null), v(z, {
|
|
3103
3125
|
class: "f-order-item-content-order-type",
|
|
3104
3126
|
data: d,
|
|
3105
3127
|
valueField: "id",
|
|
3106
3128
|
textField: "name",
|
|
3107
3129
|
idField: "id",
|
|
3108
|
-
modelValue:
|
|
3109
|
-
"onUpdate:modelValue": (
|
|
3130
|
+
modelValue: S.order,
|
|
3131
|
+
"onUpdate:modelValue": (b) => S.order = b,
|
|
3110
3132
|
onChange: u
|
|
3111
3133
|
}, null)]),
|
|
3112
|
-
footer: () =>
|
|
3134
|
+
footer: () => v("div", {
|
|
3113
3135
|
class: "f-order-footer"
|
|
3114
|
-
}, [
|
|
3136
|
+
}, [v(pe, {
|
|
3115
3137
|
type: "link",
|
|
3116
3138
|
class: "f-order-add-button",
|
|
3117
|
-
onClick:
|
|
3139
|
+
onClick: s
|
|
3118
3140
|
}, {
|
|
3119
|
-
default: () =>
|
|
3141
|
+
default: () => v(Q, null, [v("span", {
|
|
3120
3142
|
class: "f-order-add-icon"
|
|
3121
|
-
}, [
|
|
3143
|
+
}, [v("i", {
|
|
3122
3144
|
class: "f-icon f-icon-add"
|
|
3123
|
-
}, null)]),
|
|
3145
|
+
}, null)]), r.value])
|
|
3124
3146
|
})])
|
|
3125
3147
|
});
|
|
3126
3148
|
}
|
|
3127
|
-
return () =>
|
|
3128
|
-
ref:
|
|
3129
|
-
class:
|
|
3130
|
-
}, [
|
|
3149
|
+
return () => v("div", {
|
|
3150
|
+
ref: w,
|
|
3151
|
+
class: a.value
|
|
3152
|
+
}, [k()]);
|
|
3131
3153
|
}
|
|
3132
|
-
}),
|
|
3154
|
+
}), Tn = {
|
|
3133
3155
|
install(e) {
|
|
3134
3156
|
e.component(_.name, _);
|
|
3135
3157
|
},
|
|
@@ -3142,7 +3164,7 @@ const gn = /* @__PURE__ */ H({
|
|
|
3142
3164
|
};
|
|
3143
3165
|
export {
|
|
3144
3166
|
_ as FOrder,
|
|
3145
|
-
|
|
3167
|
+
Tn as default,
|
|
3146
3168
|
K as orderProps,
|
|
3147
3169
|
oe as propsResolver
|
|
3148
3170
|
};
|