@farris/ui-vue 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,95 +1,96 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var H = (e, t, n) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var S = (e, t, n) => H(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as P, ref as v, computed as k, watch as M, createVNode as B, inject as E, onMounted as q } from "vue";
|
|
5
|
+
import { cloneDeep as G } from "lodash-es";
|
|
6
|
+
import W from "../list-view/index.esm.js";
|
|
7
|
+
import z from "../button-edit/index.esm.js";
|
|
8
|
+
import J from "../button-edit/index.esm.js/src/designer/button-edit.design.component";
|
|
9
|
+
import { getSchemaByType as A } from "../dynamic-resolver/index.esm.js";
|
|
10
|
+
import { useDesignerComponent as Q } from "../designer-canvas/index.esm.js";
|
|
11
|
+
const X = {}, Y = {};
|
|
12
|
+
function j(e) {
|
|
13
|
+
const { properties: t, title: n, ignore: i } = e, l = i && Array.isArray(i), m = Object.keys(t).reduce((u, c) => ((!l || !i.find((f) => f == c)) && (u[c] = t[c].type === "object" && t[c].properties ? j(t[c]) : G(t[c].default)), u), {});
|
|
14
|
+
return (!l || !i.find((u) => u == "id")) && (m.id = `${n}-${Date.now()}`), m;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
const n =
|
|
16
|
+
function Z(e, t) {
|
|
17
|
+
const n = j(t);
|
|
17
18
|
return Object.keys(e).reduce((i, l) => (i[l] && typeof i[l] == "object" ? Object.assign(i[l], e[l]) : i[l] = e[l], i), n), n;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
+
function _(e, t) {
|
|
20
21
|
return Object.keys(e).filter((i) => e[i] != null).reduce((i, l) => {
|
|
21
22
|
if (t.has(l)) {
|
|
22
|
-
const
|
|
23
|
-
if (typeof
|
|
24
|
-
i[
|
|
23
|
+
const m = t.get(l);
|
|
24
|
+
if (typeof m == "string")
|
|
25
|
+
i[m] = e[l];
|
|
25
26
|
else {
|
|
26
|
-
const
|
|
27
|
-
Object.assign(i,
|
|
27
|
+
const u = m(l, e[l], e);
|
|
28
|
+
Object.assign(i, u);
|
|
28
29
|
}
|
|
29
30
|
} else
|
|
30
31
|
i[l] = e[l];
|
|
31
32
|
return i;
|
|
32
33
|
}, {});
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
const i =
|
|
36
|
-
return
|
|
35
|
+
function K(e, t, n = /* @__PURE__ */ new Map()) {
|
|
36
|
+
const i = Z(e, t);
|
|
37
|
+
return _(i, n);
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
function t(
|
|
40
|
-
if (typeof
|
|
41
|
-
return
|
|
42
|
-
if (typeof
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
return Number(
|
|
46
|
-
if (
|
|
47
|
-
return Number(
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
39
|
+
function ee(e = {}) {
|
|
40
|
+
function t(r, d, a, o) {
|
|
41
|
+
if (typeof a == "number")
|
|
42
|
+
return o[r].length === a;
|
|
43
|
+
if (typeof a == "object") {
|
|
44
|
+
const p = Object.keys(a)[0], y = a[p];
|
|
45
|
+
if (p === "not")
|
|
46
|
+
return Number(o[r].length) !== Number(y);
|
|
47
|
+
if (p === "moreThan")
|
|
48
|
+
return Number(o[r].length) >= Number(y);
|
|
49
|
+
if (p === "lessThan")
|
|
50
|
+
return Number(o[r].length) <= Number(y);
|
|
50
51
|
}
|
|
51
52
|
return !1;
|
|
52
53
|
}
|
|
53
|
-
function n(
|
|
54
|
-
return
|
|
54
|
+
function n(r, d, a, o) {
|
|
55
|
+
return o[r] && o[r].propertyValue && String(o[r].propertyValue.value) === String(a);
|
|
55
56
|
}
|
|
56
57
|
const i = /* @__PURE__ */ new Map([
|
|
57
58
|
["length", t],
|
|
58
59
|
["getProperty", n]
|
|
59
60
|
]);
|
|
60
|
-
Object.keys(e).reduce((
|
|
61
|
-
function l(
|
|
62
|
-
const
|
|
63
|
-
return typeof d == "number" ? [{ target:
|
|
64
|
-
if (
|
|
65
|
-
return { target:
|
|
66
|
-
const
|
|
67
|
-
return { target:
|
|
61
|
+
Object.keys(e).reduce((r, d) => (r.set(d, e[d]), r), i);
|
|
62
|
+
function l(r, d) {
|
|
63
|
+
const a = r;
|
|
64
|
+
return typeof d == "number" ? [{ target: a, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: a, operator: "getProperty", param: r, value: !!d }] : typeof d == "object" ? Object.keys(d).map((o) => {
|
|
65
|
+
if (o === "length")
|
|
66
|
+
return { target: a, operator: "length", param: null, value: d[o] };
|
|
67
|
+
const p = o, y = d[o];
|
|
68
|
+
return { target: a, operator: "getProperty", param: p, value: y };
|
|
68
69
|
}) : [];
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
-
return Object.keys(
|
|
72
|
-
const
|
|
73
|
-
return
|
|
71
|
+
function m(r) {
|
|
72
|
+
return Object.keys(r).reduce((a, o) => {
|
|
73
|
+
const p = l(o, r[o]);
|
|
74
|
+
return a.push(...p), a;
|
|
74
75
|
}, []);
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
if (i.has(
|
|
78
|
-
const
|
|
79
|
-
return
|
|
77
|
+
function u(r, d) {
|
|
78
|
+
if (i.has(r.operator)) {
|
|
79
|
+
const a = i.get(r.operator);
|
|
80
|
+
return a && a(r.target, r.param, r.value, d) || !1;
|
|
80
81
|
}
|
|
81
82
|
return !1;
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
84
|
+
function c(r, d) {
|
|
85
|
+
return m(r).reduce((p, y) => p && u(y, d), !0);
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
-
const
|
|
88
|
-
return
|
|
87
|
+
function f(r, d) {
|
|
88
|
+
const a = Object.keys(r), o = a.includes("allOf"), p = a.includes("anyOf"), y = o || p, g = (y ? r[y ? o ? "allOf" : "anyOf" : "allOf"] : [r]).map((F) => c(F, d));
|
|
89
|
+
return o ? !g.includes(!1) : g.includes(!0);
|
|
89
90
|
}
|
|
90
|
-
return { parseValueSchema:
|
|
91
|
+
return { parseValueSchema: f };
|
|
91
92
|
}
|
|
92
|
-
const
|
|
93
|
+
const s = {
|
|
93
94
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
94
95
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
95
96
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -127,20 +128,20 @@ const c = {
|
|
|
127
128
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
128
129
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
129
130
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
function
|
|
133
|
-
return
|
|
134
|
-
const
|
|
135
|
-
return Object.assign(
|
|
131
|
+
}, te = {}, ne = {};
|
|
132
|
+
ee();
|
|
133
|
+
function ie(e, t, n = /* @__PURE__ */ new Map(), i = (u, c, f) => c, l = {}, m = (u) => u) {
|
|
134
|
+
return X[t.title] = t, Y[t.title] = i, te[t.title] = l, ne[t.title] = m, (u = {}) => {
|
|
135
|
+
const c = K(u, t, n), f = Object.keys(e).reduce((r, d) => (r[d] = e[d].default, r), {});
|
|
136
|
+
return Object.assign(f, c);
|
|
136
137
|
};
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function oe(e, t) {
|
|
139
140
|
return { customClass: t.class, customStyle: t.style };
|
|
140
141
|
}
|
|
141
|
-
const
|
|
142
|
-
["appearance",
|
|
143
|
-
]),
|
|
142
|
+
const ae = /* @__PURE__ */ new Map([
|
|
143
|
+
["appearance", oe]
|
|
144
|
+
]), le = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/combo-list.schema.json", se = "combo-list", ce = "A Farris Input Component", de = "object", ue = {
|
|
144
145
|
id: {
|
|
145
146
|
description: "The unique identifier for a combo list",
|
|
146
147
|
type: "string"
|
|
@@ -168,6 +169,11 @@ const oe = /* @__PURE__ */ new Map([
|
|
|
168
169
|
type: "object",
|
|
169
170
|
default: {}
|
|
170
171
|
},
|
|
172
|
+
disabled: {
|
|
173
|
+
description: "",
|
|
174
|
+
type: "boolean",
|
|
175
|
+
default: !1
|
|
176
|
+
},
|
|
171
177
|
editable: {
|
|
172
178
|
description: "",
|
|
173
179
|
type: "boolean",
|
|
@@ -195,7 +201,7 @@ const oe = /* @__PURE__ */ new Map([
|
|
|
195
201
|
valueField: {
|
|
196
202
|
description: "",
|
|
197
203
|
type: "string",
|
|
198
|
-
default: "
|
|
204
|
+
default: "id"
|
|
199
205
|
},
|
|
200
206
|
titleField: {
|
|
201
207
|
description: "",
|
|
@@ -251,22 +257,27 @@ const oe = /* @__PURE__ */ new Map([
|
|
|
251
257
|
type: "sting",
|
|
252
258
|
default: ""
|
|
253
259
|
}
|
|
254
|
-
},
|
|
260
|
+
}, pe = [
|
|
255
261
|
"id",
|
|
256
262
|
"type"
|
|
257
|
-
],
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
], me = [
|
|
264
|
+
"id",
|
|
265
|
+
"appearance",
|
|
266
|
+
"binding"
|
|
267
|
+
], fe = {
|
|
268
|
+
$schema: le,
|
|
269
|
+
$id: re,
|
|
270
|
+
title: se,
|
|
271
|
+
description: ce,
|
|
272
|
+
type: de,
|
|
273
|
+
properties: ue,
|
|
274
|
+
required: pe,
|
|
275
|
+
ignore: me
|
|
265
276
|
};
|
|
266
|
-
function
|
|
277
|
+
function ye(e, t, n) {
|
|
267
278
|
return t;
|
|
268
279
|
}
|
|
269
|
-
var
|
|
280
|
+
var ge = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(ge || {}), he = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(he || {});
|
|
270
281
|
const D = {
|
|
271
282
|
/**
|
|
272
283
|
* 组件标识
|
|
@@ -344,7 +355,7 @@ const D = {
|
|
|
344
355
|
* 可选,是否支持多选
|
|
345
356
|
* 默认`false`
|
|
346
357
|
*/
|
|
347
|
-
multiSelect: {
|
|
358
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
348
359
|
/**
|
|
349
360
|
* 绑定值
|
|
350
361
|
*/
|
|
@@ -433,11 +444,11 @@ const D = {
|
|
|
433
444
|
},
|
|
434
445
|
// 搜索启用高亮
|
|
435
446
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
436
|
-
},
|
|
447
|
+
}, L = ie(D, fe, ae, ye), be = {
|
|
437
448
|
dataSource: { type: Array, default: [] },
|
|
438
449
|
enableSearch: { type: Boolean, default: !1 },
|
|
439
450
|
idField: { type: String, default: "id" },
|
|
440
|
-
multiSelect: {
|
|
451
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
441
452
|
selectedValues: { type: String, default: "" },
|
|
442
453
|
separator: { type: String, default: "," },
|
|
443
454
|
textField: { type: String, default: "name" },
|
|
@@ -453,153 +464,158 @@ const D = {
|
|
|
453
464
|
default: !1
|
|
454
465
|
},
|
|
455
466
|
// 搜索启用高亮
|
|
456
|
-
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
457
|
-
|
|
467
|
+
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
468
|
+
// 是否展示复选框
|
|
469
|
+
showCheckbox: { type: Boolean, default: !1 }
|
|
470
|
+
}, ve = /* @__PURE__ */ P({
|
|
458
471
|
name: "FComboListContainer",
|
|
459
|
-
props:
|
|
472
|
+
props: be,
|
|
460
473
|
emits: ["selectionChange"],
|
|
461
474
|
setup(e, t) {
|
|
462
|
-
const n =
|
|
463
|
-
|
|
475
|
+
const n = v(), i = v(e.dataSource), l = v([]), m = v(e.separator), u = v(e.width), c = v(e.maxHeight), f = v(String(e.selectedValues).split(m.value)), r = k(() => e.multiSelect), d = k(() => ({
|
|
476
|
+
enableSelectRow: !0,
|
|
477
|
+
multiSelect: e.multiSelect,
|
|
478
|
+
multiSelectMode: "OnCheckAndClick",
|
|
479
|
+
showCheckbox: r.value,
|
|
480
|
+
showSelectAll: !1,
|
|
481
|
+
showSelection: !0
|
|
482
|
+
}));
|
|
483
|
+
M(e.dataSource, () => {
|
|
464
484
|
i.value = e.dataSource;
|
|
465
485
|
});
|
|
466
|
-
const
|
|
467
|
-
const
|
|
468
|
-
return
|
|
486
|
+
const a = k(() => e.enableSearch ? "SearchBar" : "ContentHeader"), o = k(() => {
|
|
487
|
+
const h = {};
|
|
488
|
+
return u.value !== void 0 && (h.width = `${u.value}px`), c.value !== void 0 && c.value > 0 && (h.maxHeight = `${c.value}px`), h;
|
|
469
489
|
});
|
|
470
|
-
function
|
|
471
|
-
l.value =
|
|
490
|
+
function p(h) {
|
|
491
|
+
l.value = h.map((b) => Object.assign({}, b)), f.value = h.map((b) => b[e.idField]), t.emit("selectionChange", l.value);
|
|
472
492
|
}
|
|
473
|
-
function
|
|
493
|
+
function y(h) {
|
|
474
494
|
if (e.enableHighlightSearch)
|
|
475
495
|
return;
|
|
476
|
-
let
|
|
477
|
-
typeof e.searchOption == "function" ?
|
|
496
|
+
let b = [];
|
|
497
|
+
typeof e.searchOption == "function" ? b = i.value.filter((g) => e.searchOption(h, g)) : b = i.value.filter((g) => g[e.valueField].indexOf(h) > -1 || g[e.textField].indexOf(h) > -1), n.value.updateDataSource(b);
|
|
478
498
|
}
|
|
479
|
-
return
|
|
480
|
-
|
|
481
|
-
}), () =>
|
|
482
|
-
class: "f-combo-list-container pl-
|
|
483
|
-
style:
|
|
484
|
-
}, [
|
|
499
|
+
return M([() => e.selectedValues], ([h]) => {
|
|
500
|
+
f.value = h.split(m.value);
|
|
501
|
+
}), () => B("div", {
|
|
502
|
+
class: "f-combo-list-container pl-1",
|
|
503
|
+
style: o.value
|
|
504
|
+
}, [B(W, {
|
|
485
505
|
ref: n,
|
|
486
506
|
size: "small",
|
|
487
507
|
itemClass: "f-combo-list-item",
|
|
488
|
-
header:
|
|
508
|
+
header: a.value,
|
|
489
509
|
headerClass: "f-combo-list-search-box",
|
|
490
510
|
data: i.value,
|
|
491
511
|
idField: e.idField,
|
|
492
512
|
textField: e.textField,
|
|
493
513
|
titleField: e.titleField,
|
|
494
514
|
multiSelect: e.multiSelect,
|
|
495
|
-
selection:
|
|
496
|
-
enableSelectRow: !0,
|
|
497
|
-
multiSelect: !0,
|
|
498
|
-
multiSelectMode: "OnCheckAndClick",
|
|
499
|
-
showCheckbox: !0,
|
|
500
|
-
showSelectAll: !1,
|
|
501
|
-
showSelection: !0
|
|
502
|
-
},
|
|
515
|
+
selection: d.value,
|
|
503
516
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
504
|
-
selectionValues:
|
|
505
|
-
onSelectionChange:
|
|
506
|
-
onAfterSearch:
|
|
517
|
+
selectionValues: f.value,
|
|
518
|
+
onSelectionChange: p,
|
|
519
|
+
onAfterSearch: y
|
|
507
520
|
}, null)]);
|
|
508
521
|
}
|
|
509
522
|
});
|
|
510
|
-
function
|
|
511
|
-
const t =
|
|
512
|
-
function
|
|
513
|
-
const
|
|
514
|
-
return i.value.filter((
|
|
523
|
+
function Ce(e) {
|
|
524
|
+
const t = v(""), n = v(e.modelValue), i = v(e.data || []), l = v(e.editable);
|
|
525
|
+
function m(a) {
|
|
526
|
+
const o = String(a).split(e.separator), p = o.map((b) => [b, !0]), y = new Map(p);
|
|
527
|
+
return i.value.filter((b) => y.has(String(b[e.valueField]))).sort((b, g) => {
|
|
528
|
+
const T = o.indexOf(b[e.valueField]), F = o.indexOf(g[e.valueField]);
|
|
529
|
+
return T - F;
|
|
530
|
+
});
|
|
515
531
|
}
|
|
516
|
-
function
|
|
517
|
-
const
|
|
518
|
-
t.value = l.value ?
|
|
532
|
+
function u(a) {
|
|
533
|
+
const o = m(a).map((p) => p[e.textField]).join(e.separator);
|
|
534
|
+
t.value = l.value ? o || a : o;
|
|
519
535
|
}
|
|
520
|
-
function
|
|
521
|
-
const
|
|
522
|
-
return i.value.filter((
|
|
536
|
+
function c(a) {
|
|
537
|
+
const o = a.split(e.separator).map((y) => [y, !0]), p = new Map(o);
|
|
538
|
+
return i.value.filter((y) => p.has(y[e.textField]));
|
|
523
539
|
}
|
|
524
|
-
function
|
|
525
|
-
const
|
|
526
|
-
return
|
|
540
|
+
function f(a) {
|
|
541
|
+
const o = {};
|
|
542
|
+
return o[e.idField] = a, o[e.textField] = a, [o];
|
|
527
543
|
}
|
|
528
|
-
function
|
|
529
|
-
let
|
|
530
|
-
const
|
|
531
|
-
return l.value && !
|
|
544
|
+
function r(a) {
|
|
545
|
+
let o = c(a);
|
|
546
|
+
const p = o && o.length > 0;
|
|
547
|
+
return l.value && !p && (o = f(a)), o;
|
|
532
548
|
}
|
|
533
549
|
function d() {
|
|
534
|
-
const { url:
|
|
535
|
-
let
|
|
536
|
-
fetch(
|
|
537
|
-
var F,
|
|
538
|
-
if (
|
|
539
|
-
return
|
|
540
|
-
throw new Error(
|
|
541
|
-
}).then((
|
|
542
|
-
i.value =
|
|
543
|
-
}).catch((
|
|
544
|
-
console.error(
|
|
550
|
+
const { url: a, method: o = "GET", headers: p = {}, body: y = null } = e.remote, h = o.toLowerCase() == "get" ? { method: o, headers: p } : { method: o, headers: p, body: y };
|
|
551
|
+
let b = !1;
|
|
552
|
+
fetch(a, h).then((g) => {
|
|
553
|
+
var F, V;
|
|
554
|
+
if (g.status === 200)
|
|
555
|
+
return b = !!((V = (F = g.headers) == null ? void 0 : F.get("content-type")) != null && V.includes("application/json")), b ? g.text() : g.json();
|
|
556
|
+
throw new Error(g.statusText);
|
|
557
|
+
}).then((g) => {
|
|
558
|
+
i.value = b ? JSON.parse(g) : g;
|
|
559
|
+
}).catch((g) => {
|
|
560
|
+
console.error(g);
|
|
545
561
|
});
|
|
546
562
|
}
|
|
547
|
-
return e.remote && d(),
|
|
563
|
+
return e.remote && d(), M(() => e.data, () => {
|
|
548
564
|
i.value = e.data;
|
|
549
|
-
}),
|
|
565
|
+
}), M([i], ([a]) => {
|
|
550
566
|
if (e.modelValue) {
|
|
551
|
-
const
|
|
552
|
-
|
|
567
|
+
const o = a.find((p) => p[e.valueField] === e.modelValue);
|
|
568
|
+
o && (t.value = o[e.textField]);
|
|
553
569
|
}
|
|
554
|
-
}),
|
|
555
|
-
n.value =
|
|
556
|
-
}),
|
|
570
|
+
}), M(() => e.modelValue, (a) => {
|
|
571
|
+
n.value = a, u(a);
|
|
572
|
+
}), u(e.modelValue), { dataSource: i, displayText: t, editable: l, modelValue: n, getItemsByDisplayText: c, getItemsByValue: m, getSelectedItemsByDisplayText: r };
|
|
557
573
|
}
|
|
558
|
-
const
|
|
574
|
+
const I = /* @__PURE__ */ P({
|
|
559
575
|
name: "FComboList",
|
|
560
576
|
props: D,
|
|
561
577
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
562
578
|
setup(e, t) {
|
|
563
|
-
const n =
|
|
564
|
-
dataSource:
|
|
565
|
-
displayText:
|
|
566
|
-
editable:
|
|
579
|
+
const n = v(), i = v(e.disabled), l = v(e.enableClear), m = v(e.enableSearch), u = v(e.readonly), {
|
|
580
|
+
dataSource: c,
|
|
581
|
+
displayText: f,
|
|
582
|
+
editable: r,
|
|
567
583
|
modelValue: d,
|
|
568
|
-
getSelectedItemsByDisplayText:
|
|
569
|
-
} =
|
|
570
|
-
function
|
|
571
|
-
!
|
|
584
|
+
getSelectedItemsByDisplayText: a
|
|
585
|
+
} = Ce(e), o = k(() => e.multiSelect), p = k(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
586
|
+
function y() {
|
|
587
|
+
!o.value && n.value && n.value.hidePopup();
|
|
572
588
|
}
|
|
573
|
-
function C
|
|
574
|
-
|
|
589
|
+
function h(C) {
|
|
590
|
+
f.value = C.map((x) => x[e.textField]).join(e.separator), C.length === 1 ? d.value = C[0][e.valueField] : d.value = C.map((x) => x[e.valueField]).join(e.separator), t.emit("update:modelValue", d.value), t.emit("change", C, d.value), y();
|
|
575
591
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
592
|
+
function b() {
|
|
593
|
+
u.value || n.value.togglePopup();
|
|
578
594
|
}
|
|
579
|
-
function
|
|
595
|
+
function g(C) {
|
|
580
596
|
d.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
581
597
|
}
|
|
582
|
-
function
|
|
583
|
-
const
|
|
584
|
-
|
|
598
|
+
function T(C) {
|
|
599
|
+
const x = a(C);
|
|
600
|
+
h(x);
|
|
585
601
|
}
|
|
586
602
|
function F() {
|
|
587
|
-
return
|
|
603
|
+
return f.value;
|
|
588
604
|
}
|
|
589
|
-
function
|
|
590
|
-
t.emit("input",
|
|
605
|
+
function V(C) {
|
|
606
|
+
t.emit("input", C);
|
|
591
607
|
}
|
|
592
608
|
return t.expose({
|
|
593
609
|
getDisplayText: F
|
|
594
|
-
}),
|
|
595
|
-
i.value =
|
|
596
|
-
}), () =>
|
|
610
|
+
}), M([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([C, x, R, N, U]) => {
|
|
611
|
+
i.value = C, r.value = x, l.value = R, m.value = N, u.value = U;
|
|
612
|
+
}), () => B(z, {
|
|
597
613
|
ref: n,
|
|
598
614
|
id: e.id,
|
|
599
615
|
disable: i.value,
|
|
600
|
-
readonly:
|
|
616
|
+
readonly: u.value,
|
|
601
617
|
forcePlaceholder: e.forcePlaceholder,
|
|
602
|
-
editable:
|
|
618
|
+
editable: r.value,
|
|
603
619
|
buttonContent: e.dropDownIcon,
|
|
604
620
|
placeholder: e.placeholder,
|
|
605
621
|
enableClear: l.value,
|
|
@@ -608,81 +624,81 @@ const V = /* @__PURE__ */ O({
|
|
|
608
624
|
enableTitle: e.enableTitle,
|
|
609
625
|
multiSelect: e.multiSelect,
|
|
610
626
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
611
|
-
modelValue:
|
|
612
|
-
"onUpdate:modelValue": (
|
|
627
|
+
modelValue: f.value,
|
|
628
|
+
"onUpdate:modelValue": (C) => f.value = C,
|
|
613
629
|
focusOnCreated: e.focusOnCreated,
|
|
614
630
|
selectOnCreated: e.selectOnCreated,
|
|
615
|
-
onClear:
|
|
616
|
-
onClick:
|
|
617
|
-
onChange:
|
|
618
|
-
onInput:
|
|
631
|
+
onClear: g,
|
|
632
|
+
onClick: b,
|
|
633
|
+
onChange: T,
|
|
634
|
+
onInput: V,
|
|
619
635
|
beforeOpen: e.beforeOpen
|
|
620
636
|
}, {
|
|
621
|
-
default: () => [
|
|
637
|
+
default: () => [B(ve, {
|
|
622
638
|
idField: e.idField,
|
|
623
639
|
valueField: e.valueField,
|
|
624
640
|
textField: e.textField,
|
|
625
641
|
titleField: e.titleField,
|
|
626
|
-
dataSource:
|
|
642
|
+
dataSource: c.value,
|
|
627
643
|
selectedValues: d.value,
|
|
628
644
|
multiSelect: e.multiSelect,
|
|
629
|
-
enableSearch:
|
|
645
|
+
enableSearch: m.value,
|
|
630
646
|
maxHeight: e.maxHeight,
|
|
631
647
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
632
|
-
width: e.fitEditor ?
|
|
633
|
-
onSelectionChange:
|
|
648
|
+
width: e.fitEditor ? p.value : void 0,
|
|
649
|
+
onSelectionChange: h
|
|
634
650
|
}, null)]
|
|
635
651
|
});
|
|
636
652
|
}
|
|
637
653
|
});
|
|
638
|
-
function
|
|
654
|
+
function Se(e, t) {
|
|
639
655
|
e.schema;
|
|
640
|
-
const n =
|
|
641
|
-
function l(
|
|
656
|
+
const n = v(!0), i = v(!0);
|
|
657
|
+
function l(a) {
|
|
642
658
|
return !1;
|
|
643
659
|
}
|
|
644
|
-
function
|
|
660
|
+
function m() {
|
|
645
661
|
return !1;
|
|
646
662
|
}
|
|
647
|
-
function
|
|
663
|
+
function u() {
|
|
648
664
|
return !1;
|
|
649
665
|
}
|
|
650
|
-
function
|
|
666
|
+
function c() {
|
|
651
667
|
return !0;
|
|
652
668
|
}
|
|
653
|
-
function
|
|
669
|
+
function f(a) {
|
|
654
670
|
}
|
|
655
|
-
function
|
|
671
|
+
function r() {
|
|
656
672
|
}
|
|
657
|
-
function d(
|
|
673
|
+
function d(a) {
|
|
658
674
|
return null;
|
|
659
675
|
}
|
|
660
676
|
return {
|
|
661
677
|
canAccepts: l,
|
|
662
|
-
checkCanDeleteComponent:
|
|
663
|
-
checkCanMoveComponent:
|
|
664
|
-
hideNestedPaddingInDesginerView:
|
|
665
|
-
onAcceptMovedChildElement:
|
|
666
|
-
resolveComponentContext:
|
|
678
|
+
checkCanDeleteComponent: m,
|
|
679
|
+
checkCanMoveComponent: u,
|
|
680
|
+
hideNestedPaddingInDesginerView: c,
|
|
681
|
+
onAcceptMovedChildElement: f,
|
|
682
|
+
resolveComponentContext: r,
|
|
667
683
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
668
684
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
669
685
|
getPropsConfig: d
|
|
670
686
|
};
|
|
671
687
|
}
|
|
672
|
-
class
|
|
688
|
+
class Fe {
|
|
673
689
|
constructor(t, n) {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
690
|
+
S(this, "componentId");
|
|
691
|
+
S(this, "viewModelId");
|
|
692
|
+
S(this, "eventsEditorUtils");
|
|
693
|
+
S(this, "formSchemaUtils");
|
|
694
|
+
S(this, "formMetadataConverter");
|
|
695
|
+
S(this, "designViewModelUtils");
|
|
696
|
+
S(this, "designViewModelField");
|
|
697
|
+
S(this, "controlCreatorUtils");
|
|
698
|
+
S(this, "designerHostService");
|
|
699
|
+
S(this, "schemaService", null);
|
|
700
|
+
S(this, "metadataService", null);
|
|
701
|
+
S(this, "propertyConfig", {
|
|
686
702
|
type: "object",
|
|
687
703
|
categories: {}
|
|
688
704
|
});
|
|
@@ -724,7 +740,7 @@ class Ce {
|
|
|
724
740
|
type: "combo-list",
|
|
725
741
|
textField: "name",
|
|
726
742
|
valueField: "value",
|
|
727
|
-
data: [{ value: t.type, name:
|
|
743
|
+
data: [{ value: t.type, name: s[t.type].name }]
|
|
728
744
|
}
|
|
729
745
|
}
|
|
730
746
|
}
|
|
@@ -751,12 +767,12 @@ class Ce {
|
|
|
751
767
|
};
|
|
752
768
|
}
|
|
753
769
|
}
|
|
754
|
-
const
|
|
770
|
+
const w = class w {
|
|
755
771
|
/**
|
|
756
772
|
* 根据绑定字段类型获取可用的输入类控件
|
|
757
773
|
*/
|
|
758
774
|
static getEditorTypesByMDataType(t) {
|
|
759
|
-
const n =
|
|
775
|
+
const n = w.fieldControlTypeMapping[t];
|
|
760
776
|
return n || [{ key: "", value: "" }];
|
|
761
777
|
}
|
|
762
778
|
/**
|
|
@@ -764,8 +780,8 @@ const k = class k {
|
|
|
764
780
|
*/
|
|
765
781
|
static getAllInputTypes() {
|
|
766
782
|
const t = [];
|
|
767
|
-
for (let n in
|
|
768
|
-
|
|
783
|
+
for (let n in w.fieldControlTypeMapping)
|
|
784
|
+
w.fieldControlTypeMapping[n].forEach((i) => {
|
|
769
785
|
t.find((l) => l.key === i.key && l.value === i.value) || t.push({ key: i.key, value: i.value });
|
|
770
786
|
});
|
|
771
787
|
return t;
|
|
@@ -774,55 +790,55 @@ const k = class k {
|
|
|
774
790
|
/**
|
|
775
791
|
* <字段类型,可配置的控件类型列表>的映射
|
|
776
792
|
*/
|
|
777
|
-
|
|
793
|
+
S(w, "fieldControlTypeMapping", {
|
|
778
794
|
String: [
|
|
779
|
-
{ key:
|
|
780
|
-
{ key:
|
|
781
|
-
{ key:
|
|
782
|
-
{ key:
|
|
783
|
-
{ key:
|
|
784
|
-
{ key:
|
|
785
|
-
{ key:
|
|
795
|
+
{ key: s["input-group"].type, value: s["input-group"].name },
|
|
796
|
+
{ key: s.lookup.type, value: s.lookup.name },
|
|
797
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name },
|
|
798
|
+
{ key: s["check-box"].type, value: s["check-box"].name },
|
|
799
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name },
|
|
800
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
801
|
+
{ key: s.textarea.type, value: s.textarea.name }
|
|
786
802
|
],
|
|
787
803
|
Text: [
|
|
788
|
-
{ key:
|
|
789
|
-
{ key:
|
|
804
|
+
{ key: s.textarea.type, value: s.textarea.name },
|
|
805
|
+
{ key: s.lookup.type, value: s.lookup.name }
|
|
790
806
|
],
|
|
791
807
|
Decimal: [
|
|
792
|
-
{ key:
|
|
808
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
793
809
|
],
|
|
794
810
|
Integer: [
|
|
795
|
-
{ key:
|
|
811
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
796
812
|
],
|
|
797
813
|
Number: [
|
|
798
|
-
{ key:
|
|
814
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
799
815
|
],
|
|
800
816
|
BigNumber: [
|
|
801
|
-
{ key:
|
|
817
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
802
818
|
],
|
|
803
819
|
Date: [
|
|
804
|
-
{ key:
|
|
820
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name }
|
|
805
821
|
],
|
|
806
822
|
DateTime: [
|
|
807
|
-
{ key:
|
|
823
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name }
|
|
808
824
|
],
|
|
809
825
|
Boolean: [
|
|
810
|
-
{ key:
|
|
811
|
-
{ key:
|
|
826
|
+
{ key: s.switch.type, value: s.switch.name },
|
|
827
|
+
{ key: s["check-box"].type, value: s["check-box"].name }
|
|
812
828
|
],
|
|
813
829
|
Enum: [
|
|
814
|
-
{ key:
|
|
815
|
-
{ key:
|
|
830
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
831
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name }
|
|
816
832
|
],
|
|
817
833
|
Object: [
|
|
818
|
-
{ key:
|
|
819
|
-
{ key:
|
|
820
|
-
{ key:
|
|
834
|
+
{ key: s.lookup.type, value: s.lookup.name },
|
|
835
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
836
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name }
|
|
821
837
|
]
|
|
822
838
|
});
|
|
823
|
-
let
|
|
824
|
-
const
|
|
825
|
-
class
|
|
839
|
+
let O = w;
|
|
840
|
+
const xe = v(0);
|
|
841
|
+
class ke extends Fe {
|
|
826
842
|
constructor(t, n) {
|
|
827
843
|
super(t, n);
|
|
828
844
|
}
|
|
@@ -830,10 +846,10 @@ class xe extends Ce {
|
|
|
830
846
|
return this.propertyConfig.categories.basic = this.getBasicProperties(t, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
831
847
|
}
|
|
832
848
|
getBasicProperties(t, n) {
|
|
833
|
-
var
|
|
849
|
+
var u;
|
|
834
850
|
var i = this;
|
|
835
851
|
this.setDesignViewModelField(t);
|
|
836
|
-
const l = this.formSchemaUtils.getFormMetadataBasicInfo(),
|
|
852
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), m = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
837
853
|
return {
|
|
838
854
|
description: "Basic Information",
|
|
839
855
|
title: "基本信息",
|
|
@@ -845,8 +861,8 @@ class xe extends Ce {
|
|
|
845
861
|
readonly: !0
|
|
846
862
|
},
|
|
847
863
|
type: {
|
|
848
|
-
description: "
|
|
849
|
-
title: "
|
|
864
|
+
description: "编辑器类型",
|
|
865
|
+
title: "编辑器类型",
|
|
850
866
|
type: "string",
|
|
851
867
|
refreshPanelAfterChanged: !0,
|
|
852
868
|
$converter: "/converter/change-editor.converter",
|
|
@@ -855,7 +871,7 @@ class xe extends Ce {
|
|
|
855
871
|
textField: "value",
|
|
856
872
|
valueField: "key",
|
|
857
873
|
editable: !1,
|
|
858
|
-
data: i.designViewModelField ?
|
|
874
|
+
data: i.designViewModelField ? O.getEditorTypesByMDataType((u = i.designViewModelField.type) == null ? void 0 : u.name) : O.getAllInputTypes()
|
|
859
875
|
}
|
|
860
876
|
},
|
|
861
877
|
label: {
|
|
@@ -880,15 +896,19 @@ class xe extends Ce {
|
|
|
880
896
|
{ field: "fieldType", title: "字段类型" }
|
|
881
897
|
],
|
|
882
898
|
textField: "bindingField",
|
|
883
|
-
data:
|
|
899
|
+
data: m
|
|
884
900
|
}
|
|
885
901
|
}
|
|
886
902
|
},
|
|
887
|
-
setPropertyRelates(
|
|
888
|
-
if (
|
|
889
|
-
switch (
|
|
903
|
+
setPropertyRelates(c, f) {
|
|
904
|
+
if (c)
|
|
905
|
+
switch (c && c.propertyID) {
|
|
890
906
|
case "type": {
|
|
891
|
-
i.changeControlType(t,
|
|
907
|
+
i.changeControlType(t, c, n);
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
case "label": {
|
|
911
|
+
c.needRefreshControlTree = !0;
|
|
892
912
|
break;
|
|
893
913
|
}
|
|
894
914
|
}
|
|
@@ -934,12 +954,12 @@ class xe extends Ce {
|
|
|
934
954
|
* @param newControlType 新控件类型
|
|
935
955
|
*/
|
|
936
956
|
changeControlType(t, n, i) {
|
|
937
|
-
var
|
|
938
|
-
const l = n.propertyValue,
|
|
939
|
-
if (!
|
|
957
|
+
var r, d, a, o;
|
|
958
|
+
const l = n.propertyValue, m = i && i.parent && i.parent.schema;
|
|
959
|
+
if (!m)
|
|
940
960
|
return;
|
|
941
|
-
const
|
|
942
|
-
let
|
|
961
|
+
const u = m.contents.findIndex((p) => p.id === t.id), c = m.contents[u];
|
|
962
|
+
let f;
|
|
943
963
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
944
964
|
editor: {
|
|
945
965
|
$type: l
|
|
@@ -947,30 +967,30 @@ class xe extends Ce {
|
|
|
947
967
|
name: this.designViewModelField.name,
|
|
948
968
|
require: this.designViewModelField.require,
|
|
949
969
|
readonly: this.designViewModelField.readonly
|
|
950
|
-
}, !1),
|
|
951
|
-
id:
|
|
952
|
-
appearance:
|
|
953
|
-
size:
|
|
954
|
-
label:
|
|
955
|
-
binding:
|
|
956
|
-
visible:
|
|
957
|
-
}), Object.assign(
|
|
958
|
-
isTextArea:
|
|
959
|
-
placeholder: (
|
|
960
|
-
holdPlace: (d =
|
|
961
|
-
readonly: (
|
|
962
|
-
require: (
|
|
963
|
-
}),
|
|
964
|
-
(
|
|
965
|
-
),
|
|
970
|
+
}, !1), f = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), f || (f = A("form-group") || {}, f.editor = A(l) || {}, delete f.editor.id, delete f.editor.binding, delete f.editor.appearance), Object.assign(f, {
|
|
971
|
+
id: c.id,
|
|
972
|
+
appearance: c.appearance,
|
|
973
|
+
size: c.size,
|
|
974
|
+
label: c.label,
|
|
975
|
+
binding: c.binding,
|
|
976
|
+
visible: c.visible
|
|
977
|
+
}), Object.assign(f.editor, {
|
|
978
|
+
isTextArea: f.isTextArea && c.isTextArea,
|
|
979
|
+
placeholder: (r = c.editor) == null ? void 0 : r.placeholder,
|
|
980
|
+
holdPlace: (d = c.editor) == null ? void 0 : d.holdPlace,
|
|
981
|
+
readonly: (a = c.editor) == null ? void 0 : a.readonly,
|
|
982
|
+
require: (o = c.editor) == null ? void 0 : o.require
|
|
983
|
+
}), m.contents.splice(u, 1), m.contents.splice(u, 0, f), i.schema = Object.assign(c, f), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
984
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
985
|
+
), xe.value++;
|
|
966
986
|
}
|
|
967
987
|
getComponentConfig(t, n = {}, i = {}) {
|
|
968
988
|
const l = Object.assign({
|
|
969
|
-
description: "
|
|
970
|
-
title: "
|
|
989
|
+
description: "编辑器",
|
|
990
|
+
title: "编辑器",
|
|
971
991
|
type: "input-group",
|
|
972
992
|
$converter: "/converter/property-editor.converter"
|
|
973
|
-
}, n),
|
|
993
|
+
}, n), m = Object.assign({
|
|
974
994
|
readonly: {
|
|
975
995
|
description: "",
|
|
976
996
|
title: "只读",
|
|
@@ -992,10 +1012,10 @@ class xe extends Ce {
|
|
|
992
1012
|
type: "string"
|
|
993
1013
|
}
|
|
994
1014
|
}, i);
|
|
995
|
-
return { ...l, properties: { ...
|
|
1015
|
+
return { ...l, properties: { ...m } };
|
|
996
1016
|
}
|
|
997
1017
|
}
|
|
998
|
-
class
|
|
1018
|
+
class we extends ke {
|
|
999
1019
|
constructor(t, n) {
|
|
1000
1020
|
super(t, n);
|
|
1001
1021
|
}
|
|
@@ -1019,75 +1039,68 @@ class Fe extends xe {
|
|
|
1019
1039
|
});
|
|
1020
1040
|
}
|
|
1021
1041
|
}
|
|
1022
|
-
function
|
|
1042
|
+
function Me(e, t) {
|
|
1023
1043
|
const {
|
|
1024
1044
|
canAccepts: n,
|
|
1025
1045
|
checkCanDeleteComponent: i,
|
|
1026
1046
|
checkCanMoveComponent: l,
|
|
1027
|
-
hideNestedPaddingInDesginerView:
|
|
1028
|
-
onAcceptMovedChildElement:
|
|
1029
|
-
resolveComponentContext:
|
|
1030
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1031
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1032
|
-
} =
|
|
1033
|
-
function o
|
|
1034
|
-
return new
|
|
1047
|
+
hideNestedPaddingInDesginerView: m,
|
|
1048
|
+
onAcceptMovedChildElement: u,
|
|
1049
|
+
resolveComponentContext: c,
|
|
1050
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1051
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1052
|
+
} = Se(e), d = e.schema;
|
|
1053
|
+
function a(o, p) {
|
|
1054
|
+
return new we(o, t).getPropertyConfig(d, p);
|
|
1035
1055
|
}
|
|
1036
1056
|
return {
|
|
1037
1057
|
canAccepts: n,
|
|
1038
1058
|
checkCanDeleteComponent: i,
|
|
1039
1059
|
checkCanMoveComponent: l,
|
|
1040
|
-
hideNestedPaddingInDesginerView:
|
|
1041
|
-
onAcceptMovedChildElement:
|
|
1042
|
-
resolveComponentContext:
|
|
1043
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1044
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1045
|
-
getPropsConfig:
|
|
1060
|
+
hideNestedPaddingInDesginerView: m,
|
|
1061
|
+
onAcceptMovedChildElement: u,
|
|
1062
|
+
resolveComponentContext: c,
|
|
1063
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1064
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1065
|
+
getPropsConfig: a
|
|
1046
1066
|
};
|
|
1047
1067
|
}
|
|
1048
|
-
const
|
|
1068
|
+
const Te = /* @__PURE__ */ P({
|
|
1049
1069
|
name: "FComboListDesign",
|
|
1050
1070
|
props: D,
|
|
1051
1071
|
emits: ["clear", "update:modelValue", "change"],
|
|
1052
1072
|
setup(e, t) {
|
|
1053
|
-
const n =
|
|
1054
|
-
return
|
|
1055
|
-
n.value.componentInstance =
|
|
1056
|
-
}), t.expose(
|
|
1073
|
+
const n = v(), i = E("designer-host-service"), l = E("design-item-context"), m = Me(l, i), u = Q(n, l, m);
|
|
1074
|
+
return q(() => {
|
|
1075
|
+
n.value.componentInstance = u;
|
|
1076
|
+
}), t.expose(u.value), () => B(J, {
|
|
1057
1077
|
ref: n,
|
|
1058
|
-
id: e.id,
|
|
1059
|
-
disable: e.disabled,
|
|
1060
|
-
readonly: e.readonly,
|
|
1061
|
-
forcePlaceholder: e.forcePlaceholder,
|
|
1062
|
-
editable: !1,
|
|
1063
1078
|
buttonContent: e.dropDownIcon,
|
|
1079
|
+
readonly: !0,
|
|
1080
|
+
editable: !1,
|
|
1081
|
+
forcePlaceholder: !0,
|
|
1064
1082
|
placeholder: e.placeholder,
|
|
1065
|
-
enableClear: !
|
|
1066
|
-
maxLength: e.maxLength,
|
|
1067
|
-
tabIndex: e.tabIndex,
|
|
1068
|
-
enableTitle: e.enableTitle,
|
|
1069
|
-
multiSelect: e.multiSelect,
|
|
1070
|
-
inputType: e.multiSelect ? "tag" : "text"
|
|
1083
|
+
enableClear: !0
|
|
1071
1084
|
}, null);
|
|
1072
1085
|
}
|
|
1073
|
-
}),
|
|
1086
|
+
}), Be = (e) => {
|
|
1074
1087
|
const t = e;
|
|
1075
1088
|
return t.install = function(n) {
|
|
1076
1089
|
n.component(t.name, e);
|
|
1077
1090
|
}, e;
|
|
1078
1091
|
};
|
|
1079
|
-
|
|
1080
|
-
e["combo-list"] =
|
|
1092
|
+
I.register = (e, t, n, i) => {
|
|
1093
|
+
e["combo-list"] = I, t["combo-list"] = L;
|
|
1081
1094
|
};
|
|
1082
|
-
|
|
1083
|
-
e["combo-list"] =
|
|
1095
|
+
I.registerDesigner = (e, t, n) => {
|
|
1096
|
+
e["combo-list"] = Te, t["combo-list"] = L;
|
|
1084
1097
|
};
|
|
1085
|
-
const
|
|
1098
|
+
const Le = Be(I);
|
|
1086
1099
|
export {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1100
|
+
I as FComboList,
|
|
1101
|
+
he as Placement,
|
|
1102
|
+
ge as ViewType,
|
|
1090
1103
|
D as comboListProps,
|
|
1091
|
-
|
|
1092
|
-
|
|
1104
|
+
Le as default,
|
|
1105
|
+
L as propsResolver
|
|
1093
1106
|
};
|