@farris/ui-vue 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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;
|
|
13
15
|
}
|
|
14
|
-
function
|
|
15
|
-
const n =
|
|
16
|
-
return Object.keys(e).reduce((
|
|
16
|
+
function Z(e, t) {
|
|
17
|
+
const n = j(t);
|
|
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;
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
return Object.keys(e).filter((
|
|
20
|
-
if (t.has(
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
|
|
20
|
+
function _(e, t) {
|
|
21
|
+
return Object.keys(e).filter((i) => e[i] != null).reduce((i, l) => {
|
|
22
|
+
if (t.has(l)) {
|
|
23
|
+
const m = t.get(l);
|
|
24
|
+
if (typeof m == "string")
|
|
25
|
+
i[m] = e[l];
|
|
24
26
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(
|
|
27
|
+
const u = m(l, e[l], e);
|
|
28
|
+
Object.assign(i, u);
|
|
27
29
|
}
|
|
28
30
|
} else
|
|
29
|
-
|
|
30
|
-
return
|
|
31
|
+
i[l] = e[l];
|
|
32
|
+
return i;
|
|
31
33
|
}, {});
|
|
32
34
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
return
|
|
35
|
+
function K(e, t, n = /* @__PURE__ */ new Map()) {
|
|
36
|
+
const i = Z(e, t);
|
|
37
|
+
return _(i, n);
|
|
36
38
|
}
|
|
37
|
-
function
|
|
38
|
-
function t(
|
|
39
|
-
if (typeof
|
|
40
|
-
return
|
|
41
|
-
if (typeof
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
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);
|
|
49
51
|
}
|
|
50
52
|
return !1;
|
|
51
53
|
}
|
|
52
|
-
function n(
|
|
53
|
-
return
|
|
54
|
+
function n(r, d, a, o) {
|
|
55
|
+
return o[r] && o[r].propertyValue && String(o[r].propertyValue.value) === String(a);
|
|
54
56
|
}
|
|
55
|
-
const
|
|
57
|
+
const i = /* @__PURE__ */ new Map([
|
|
56
58
|
["length", t],
|
|
57
59
|
["getProperty", n]
|
|
58
60
|
]);
|
|
59
|
-
Object.keys(e).reduce((
|
|
60
|
-
function r
|
|
61
|
-
const
|
|
62
|
-
return typeof d == "number" ? [{ target:
|
|
63
|
-
if (
|
|
64
|
-
return { target:
|
|
65
|
-
const
|
|
66
|
-
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 };
|
|
67
69
|
}) : [];
|
|
68
70
|
}
|
|
69
|
-
function
|
|
70
|
-
return Object.keys(
|
|
71
|
-
const
|
|
72
|
-
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;
|
|
73
75
|
}, []);
|
|
74
76
|
}
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
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;
|
|
79
81
|
}
|
|
80
82
|
return !1;
|
|
81
83
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
84
|
+
function c(r, d) {
|
|
85
|
+
return m(r).reduce((p, y) => p && u(y, d), !0);
|
|
84
86
|
}
|
|
85
|
-
function
|
|
86
|
-
const
|
|
87
|
-
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);
|
|
88
90
|
}
|
|
89
|
-
return { parseValueSchema:
|
|
91
|
+
return { parseValueSchema: f };
|
|
90
92
|
}
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
93
|
+
const s = {
|
|
94
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
94
95
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
95
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
96
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
96
97
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
97
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
98
98
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
99
99
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
100
100
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -105,114 +105,43 @@ const l = {
|
|
|
105
105
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
106
106
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
107
107
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
112
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
113
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
108
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
109
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
110
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
114
111
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
115
|
-
|
|
116
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
117
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
118
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
112
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
119
113
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
120
114
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
121
|
-
|
|
122
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
115
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
123
116
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
124
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
125
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
126
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
127
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
128
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
129
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
130
117
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
131
118
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
132
119
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
133
|
-
|
|
134
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
135
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
136
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
137
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
138
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
139
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
120
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
140
121
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
148
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
149
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
150
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
151
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
152
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
153
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
154
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
155
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
156
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
157
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
158
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
159
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
160
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
161
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
162
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
163
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
164
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
165
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
166
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
167
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
168
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
169
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
122
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
123
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
124
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
125
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
126
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
127
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
170
128
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
180
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
181
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
182
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
183
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
184
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
185
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
186
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
187
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
188
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
189
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
190
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
191
|
-
/** 查询类 start */
|
|
192
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
193
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
194
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
195
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
196
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
197
|
-
/** 查询类 end */
|
|
198
|
-
/** 审批类 start */
|
|
199
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
200
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
201
|
-
/** 审批类 end */
|
|
202
|
-
}, J = {}, K = {};
|
|
203
|
-
_();
|
|
204
|
-
function ee(e, t, n = /* @__PURE__ */ new Map(), o = (m, y, g) => y, r = {}, u = (m) => m) {
|
|
205
|
-
return Q[t.title] = t, q[t.title] = o, J[t.title] = r, K[t.title] = u, (m = {}) => {
|
|
206
|
-
const y = Z(m, t, n), g = Object.keys(e).reduce((c, d) => (c[d] = e[d].default, c), {});
|
|
207
|
-
return Object.assign(g, y);
|
|
129
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
130
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
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);
|
|
208
137
|
};
|
|
209
138
|
}
|
|
210
|
-
function
|
|
139
|
+
function oe(e, t) {
|
|
211
140
|
return { customClass: t.class, customStyle: t.style };
|
|
212
141
|
}
|
|
213
|
-
const
|
|
214
|
-
["appearance",
|
|
215
|
-
]),
|
|
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 = {
|
|
216
145
|
id: {
|
|
217
146
|
description: "The unique identifier for a combo list",
|
|
218
147
|
type: "string"
|
|
@@ -240,6 +169,11 @@ const ne = /* @__PURE__ */ new Map([
|
|
|
240
169
|
type: "object",
|
|
241
170
|
default: {}
|
|
242
171
|
},
|
|
172
|
+
disabled: {
|
|
173
|
+
description: "",
|
|
174
|
+
type: "boolean",
|
|
175
|
+
default: !1
|
|
176
|
+
},
|
|
243
177
|
editable: {
|
|
244
178
|
description: "",
|
|
245
179
|
type: "boolean",
|
|
@@ -267,7 +201,7 @@ const ne = /* @__PURE__ */ new Map([
|
|
|
267
201
|
valueField: {
|
|
268
202
|
description: "",
|
|
269
203
|
type: "string",
|
|
270
|
-
default: "
|
|
204
|
+
default: "id"
|
|
271
205
|
},
|
|
272
206
|
titleField: {
|
|
273
207
|
description: "",
|
|
@@ -323,23 +257,28 @@ const ne = /* @__PURE__ */ new Map([
|
|
|
323
257
|
type: "sting",
|
|
324
258
|
default: ""
|
|
325
259
|
}
|
|
326
|
-
},
|
|
260
|
+
}, pe = [
|
|
327
261
|
"id",
|
|
328
262
|
"type"
|
|
329
|
-
],
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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
|
|
337
276
|
};
|
|
338
|
-
function
|
|
277
|
+
function ye(e, t, n) {
|
|
339
278
|
return t;
|
|
340
279
|
}
|
|
341
|
-
var
|
|
342
|
-
const
|
|
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 || {});
|
|
281
|
+
const D = {
|
|
343
282
|
/**
|
|
344
283
|
* 组件标识
|
|
345
284
|
*/
|
|
@@ -416,7 +355,7 @@ const P = {
|
|
|
416
355
|
* 可选,是否支持多选
|
|
417
356
|
* 默认`false`
|
|
418
357
|
*/
|
|
419
|
-
multiSelect: {
|
|
358
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
420
359
|
/**
|
|
421
360
|
* 绑定值
|
|
422
361
|
*/
|
|
@@ -505,11 +444,11 @@ const P = {
|
|
|
505
444
|
},
|
|
506
445
|
// 搜索启用高亮
|
|
507
446
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
508
|
-
},
|
|
447
|
+
}, L = ie(D, fe, ae, ye), be = {
|
|
509
448
|
dataSource: { type: Array, default: [] },
|
|
510
449
|
enableSearch: { type: Boolean, default: !1 },
|
|
511
450
|
idField: { type: String, default: "id" },
|
|
512
|
-
multiSelect: {
|
|
451
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
513
452
|
selectedValues: { type: String, default: "" },
|
|
514
453
|
separator: { type: String, default: "," },
|
|
515
454
|
textField: { type: String, default: "name" },
|
|
@@ -525,326 +464,393 @@ const P = {
|
|
|
525
464
|
default: !1
|
|
526
465
|
},
|
|
527
466
|
// 搜索启用高亮
|
|
528
|
-
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
529
|
-
|
|
467
|
+
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
468
|
+
// 是否展示复选框
|
|
469
|
+
showCheckbox: { type: Boolean, default: !1 }
|
|
470
|
+
}, ve = /* @__PURE__ */ P({
|
|
530
471
|
name: "FComboListContainer",
|
|
531
|
-
props:
|
|
472
|
+
props: be,
|
|
532
473
|
emits: ["selectionChange"],
|
|
533
474
|
setup(e, t) {
|
|
534
|
-
const n =
|
|
535
|
-
|
|
536
|
-
|
|
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, () => {
|
|
484
|
+
i.value = e.dataSource;
|
|
537
485
|
});
|
|
538
|
-
const
|
|
539
|
-
const
|
|
540
|
-
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;
|
|
541
489
|
});
|
|
542
|
-
function
|
|
543
|
-
|
|
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);
|
|
544
492
|
}
|
|
545
|
-
function
|
|
493
|
+
function y(h) {
|
|
546
494
|
if (e.enableHighlightSearch)
|
|
547
495
|
return;
|
|
548
|
-
let
|
|
549
|
-
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);
|
|
550
498
|
}
|
|
551
|
-
return
|
|
552
|
-
|
|
553
|
-
}), () =>
|
|
554
|
-
class: "f-combo-list-container pl-
|
|
555
|
-
style:
|
|
556
|
-
}, [
|
|
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, {
|
|
557
505
|
ref: n,
|
|
558
506
|
size: "small",
|
|
559
507
|
itemClass: "f-combo-list-item",
|
|
560
|
-
header:
|
|
508
|
+
header: a.value,
|
|
561
509
|
headerClass: "f-combo-list-search-box",
|
|
562
|
-
data:
|
|
510
|
+
data: i.value,
|
|
563
511
|
idField: e.idField,
|
|
564
512
|
textField: e.textField,
|
|
565
513
|
titleField: e.titleField,
|
|
566
514
|
multiSelect: e.multiSelect,
|
|
567
|
-
selection:
|
|
568
|
-
enableSelectRow: !0,
|
|
569
|
-
multiSelect: !0,
|
|
570
|
-
multiSelectMode: "OnCheckAndClick",
|
|
571
|
-
showCheckbox: !0,
|
|
572
|
-
showSelectAll: !1,
|
|
573
|
-
showSelection: !0
|
|
574
|
-
},
|
|
515
|
+
selection: d.value,
|
|
575
516
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
576
|
-
selectionValues:
|
|
577
|
-
onSelectionChange:
|
|
578
|
-
onAfterSearch:
|
|
517
|
+
selectionValues: f.value,
|
|
518
|
+
onSelectionChange: p,
|
|
519
|
+
onAfterSearch: y
|
|
579
520
|
}, null)]);
|
|
580
521
|
}
|
|
581
522
|
});
|
|
582
|
-
function
|
|
583
|
-
const t =
|
|
584
|
-
function
|
|
585
|
-
const
|
|
586
|
-
return
|
|
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
|
+
});
|
|
587
531
|
}
|
|
588
|
-
function
|
|
589
|
-
const
|
|
590
|
-
t.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;
|
|
591
535
|
}
|
|
592
|
-
function
|
|
593
|
-
const
|
|
594
|
-
return
|
|
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]));
|
|
595
539
|
}
|
|
596
|
-
function
|
|
597
|
-
const
|
|
598
|
-
return
|
|
540
|
+
function f(a) {
|
|
541
|
+
const o = {};
|
|
542
|
+
return o[e.idField] = a, o[e.textField] = a, [o];
|
|
599
543
|
}
|
|
600
|
-
function
|
|
601
|
-
let
|
|
602
|
-
const
|
|
603
|
-
return
|
|
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;
|
|
604
548
|
}
|
|
605
549
|
function d() {
|
|
606
|
-
const { url:
|
|
607
|
-
let
|
|
608
|
-
fetch(
|
|
609
|
-
var
|
|
610
|
-
if (
|
|
611
|
-
return
|
|
612
|
-
throw new Error(
|
|
613
|
-
}).then((
|
|
614
|
-
|
|
615
|
-
}).catch((
|
|
616
|
-
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);
|
|
617
561
|
});
|
|
618
562
|
}
|
|
619
|
-
return e.remote && d(),
|
|
620
|
-
|
|
621
|
-
}),
|
|
563
|
+
return e.remote && d(), M(() => e.data, () => {
|
|
564
|
+
i.value = e.data;
|
|
565
|
+
}), M([i], ([a]) => {
|
|
622
566
|
if (e.modelValue) {
|
|
623
|
-
const
|
|
624
|
-
|
|
567
|
+
const o = a.find((p) => p[e.valueField] === e.modelValue);
|
|
568
|
+
o && (t.value = o[e.textField]);
|
|
625
569
|
}
|
|
626
|
-
}),
|
|
627
|
-
n.value =
|
|
628
|
-
}),
|
|
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 };
|
|
629
573
|
}
|
|
630
|
-
const
|
|
574
|
+
const I = /* @__PURE__ */ P({
|
|
631
575
|
name: "FComboList",
|
|
632
|
-
props:
|
|
576
|
+
props: D,
|
|
633
577
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
634
578
|
setup(e, t) {
|
|
635
|
-
const n =
|
|
636
|
-
dataSource:
|
|
637
|
-
displayText:
|
|
638
|
-
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,
|
|
639
583
|
modelValue: d,
|
|
640
|
-
getSelectedItemsByDisplayText:
|
|
641
|
-
} =
|
|
642
|
-
function
|
|
643
|
-
!
|
|
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();
|
|
644
588
|
}
|
|
645
|
-
function
|
|
646
|
-
|
|
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();
|
|
647
591
|
}
|
|
648
|
-
function
|
|
649
|
-
|
|
592
|
+
function b() {
|
|
593
|
+
u.value || n.value.togglePopup();
|
|
650
594
|
}
|
|
651
|
-
function
|
|
595
|
+
function g(C) {
|
|
652
596
|
d.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
653
597
|
}
|
|
654
|
-
function
|
|
655
|
-
const
|
|
656
|
-
|
|
598
|
+
function T(C) {
|
|
599
|
+
const x = a(C);
|
|
600
|
+
h(x);
|
|
657
601
|
}
|
|
658
|
-
function
|
|
659
|
-
return
|
|
602
|
+
function F() {
|
|
603
|
+
return f.value;
|
|
660
604
|
}
|
|
661
|
-
function
|
|
662
|
-
t.emit("input",
|
|
605
|
+
function V(C) {
|
|
606
|
+
t.emit("input", C);
|
|
663
607
|
}
|
|
664
608
|
return t.expose({
|
|
665
|
-
getDisplayText:
|
|
666
|
-
}),
|
|
667
|
-
|
|
668
|
-
}), () =>
|
|
609
|
+
getDisplayText: F
|
|
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, {
|
|
669
613
|
ref: n,
|
|
670
614
|
id: e.id,
|
|
671
|
-
disable:
|
|
672
|
-
readonly:
|
|
615
|
+
disable: i.value,
|
|
616
|
+
readonly: u.value,
|
|
673
617
|
forcePlaceholder: e.forcePlaceholder,
|
|
674
|
-
editable:
|
|
618
|
+
editable: r.value,
|
|
675
619
|
buttonContent: e.dropDownIcon,
|
|
676
620
|
placeholder: e.placeholder,
|
|
677
|
-
enableClear:
|
|
621
|
+
enableClear: l.value,
|
|
678
622
|
maxLength: e.maxLength,
|
|
679
623
|
tabIndex: e.tabIndex,
|
|
680
624
|
enableTitle: e.enableTitle,
|
|
681
625
|
multiSelect: e.multiSelect,
|
|
682
626
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
683
|
-
modelValue:
|
|
684
|
-
"onUpdate:modelValue": (
|
|
627
|
+
modelValue: f.value,
|
|
628
|
+
"onUpdate:modelValue": (C) => f.value = C,
|
|
685
629
|
focusOnCreated: e.focusOnCreated,
|
|
686
630
|
selectOnCreated: e.selectOnCreated,
|
|
687
|
-
onClear:
|
|
688
|
-
onClick:
|
|
689
|
-
onChange:
|
|
690
|
-
onInput:
|
|
631
|
+
onClear: g,
|
|
632
|
+
onClick: b,
|
|
633
|
+
onChange: T,
|
|
634
|
+
onInput: V,
|
|
691
635
|
beforeOpen: e.beforeOpen
|
|
692
636
|
}, {
|
|
693
|
-
default: () => [
|
|
637
|
+
default: () => [B(ve, {
|
|
694
638
|
idField: e.idField,
|
|
695
639
|
valueField: e.valueField,
|
|
696
640
|
textField: e.textField,
|
|
697
641
|
titleField: e.titleField,
|
|
698
|
-
dataSource:
|
|
642
|
+
dataSource: c.value,
|
|
699
643
|
selectedValues: d.value,
|
|
700
644
|
multiSelect: e.multiSelect,
|
|
701
|
-
enableSearch:
|
|
645
|
+
enableSearch: m.value,
|
|
702
646
|
maxHeight: e.maxHeight,
|
|
703
647
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
704
|
-
width: e.fitEditor ?
|
|
705
|
-
onSelectionChange:
|
|
648
|
+
width: e.fitEditor ? p.value : void 0,
|
|
649
|
+
onSelectionChange: h
|
|
706
650
|
}, null)]
|
|
707
651
|
});
|
|
708
652
|
}
|
|
709
653
|
});
|
|
710
|
-
function
|
|
654
|
+
function Se(e, t) {
|
|
711
655
|
e.schema;
|
|
712
|
-
const n =
|
|
713
|
-
function
|
|
656
|
+
const n = v(!0), i = v(!0);
|
|
657
|
+
function l(a) {
|
|
714
658
|
return !1;
|
|
715
659
|
}
|
|
716
|
-
function
|
|
660
|
+
function m() {
|
|
717
661
|
return !1;
|
|
718
662
|
}
|
|
719
|
-
function
|
|
663
|
+
function u() {
|
|
720
664
|
return !1;
|
|
721
665
|
}
|
|
722
|
-
function
|
|
666
|
+
function c() {
|
|
723
667
|
return !0;
|
|
724
668
|
}
|
|
725
|
-
function
|
|
669
|
+
function f(a) {
|
|
726
670
|
}
|
|
727
|
-
function
|
|
671
|
+
function r() {
|
|
728
672
|
}
|
|
729
|
-
function d(
|
|
673
|
+
function d(a) {
|
|
730
674
|
return null;
|
|
731
675
|
}
|
|
732
676
|
return {
|
|
733
|
-
canAccepts:
|
|
734
|
-
checkCanDeleteComponent:
|
|
735
|
-
checkCanMoveComponent:
|
|
736
|
-
hideNestedPaddingInDesginerView:
|
|
737
|
-
onAcceptMovedChildElement:
|
|
738
|
-
resolveComponentContext:
|
|
677
|
+
canAccepts: l,
|
|
678
|
+
checkCanDeleteComponent: m,
|
|
679
|
+
checkCanMoveComponent: u,
|
|
680
|
+
hideNestedPaddingInDesginerView: c,
|
|
681
|
+
onAcceptMovedChildElement: f,
|
|
682
|
+
resolveComponentContext: r,
|
|
739
683
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
740
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
684
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
741
685
|
getPropsConfig: d
|
|
742
686
|
};
|
|
743
687
|
}
|
|
744
|
-
class
|
|
688
|
+
class Fe {
|
|
689
|
+
constructor(t, n) {
|
|
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", {
|
|
702
|
+
type: "object",
|
|
703
|
+
categories: {}
|
|
704
|
+
});
|
|
705
|
+
var i;
|
|
706
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
707
|
+
}
|
|
708
|
+
getTableInfo() {
|
|
709
|
+
var t;
|
|
710
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
711
|
+
}
|
|
712
|
+
setDesignViewModelField(t) {
|
|
713
|
+
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
714
|
+
if (n) {
|
|
715
|
+
if (!this.designViewModelField) {
|
|
716
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
717
|
+
this.designViewModelField = i.fields.find((l) => l.id === n);
|
|
718
|
+
}
|
|
719
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
changeFieldEditorType(t, n) {
|
|
723
|
+
}
|
|
724
|
+
getBasicPropConfig(t) {
|
|
725
|
+
return {
|
|
726
|
+
description: "Basic Information",
|
|
727
|
+
title: "基本信息",
|
|
728
|
+
properties: {
|
|
729
|
+
id: {
|
|
730
|
+
description: "组件标识",
|
|
731
|
+
title: "标识",
|
|
732
|
+
type: "string",
|
|
733
|
+
readonly: !0
|
|
734
|
+
},
|
|
735
|
+
type: {
|
|
736
|
+
description: "组件类型",
|
|
737
|
+
title: "控件类型",
|
|
738
|
+
type: "select",
|
|
739
|
+
editor: {
|
|
740
|
+
type: "combo-list",
|
|
741
|
+
textField: "name",
|
|
742
|
+
valueField: "value",
|
|
743
|
+
data: [{ value: t.type, name: s[t.type].name }]
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
getAppearanceConfig(t = null) {
|
|
750
|
+
return {
|
|
751
|
+
title: "样式",
|
|
752
|
+
description: "Appearance",
|
|
753
|
+
properties: {
|
|
754
|
+
class: {
|
|
755
|
+
title: "class样式",
|
|
756
|
+
type: "string",
|
|
757
|
+
description: "组件的CSS样式",
|
|
758
|
+
$converter: "/converter/appearance.converter"
|
|
759
|
+
},
|
|
760
|
+
style: {
|
|
761
|
+
title: "style样式",
|
|
762
|
+
type: "string",
|
|
763
|
+
description: "组件的样式",
|
|
764
|
+
$converter: "/converter/appearance.converter"
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
const w = class w {
|
|
771
|
+
/**
|
|
772
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
773
|
+
*/
|
|
745
774
|
static getEditorTypesByMDataType(t) {
|
|
746
|
-
const n =
|
|
775
|
+
const n = w.fieldControlTypeMapping[t];
|
|
747
776
|
return n || [{ key: "", value: "" }];
|
|
748
777
|
}
|
|
749
|
-
|
|
778
|
+
/**
|
|
779
|
+
* 获取所有输入类控件
|
|
780
|
+
*/
|
|
781
|
+
static getAllInputTypes() {
|
|
782
|
+
const t = [];
|
|
783
|
+
for (let n in w.fieldControlTypeMapping)
|
|
784
|
+
w.fieldControlTypeMapping[n].forEach((i) => {
|
|
785
|
+
t.find((l) => l.key === i.key && l.value === i.value) || t.push({ key: i.key, value: i.value });
|
|
786
|
+
});
|
|
787
|
+
return t;
|
|
788
|
+
}
|
|
789
|
+
};
|
|
750
790
|
/**
|
|
751
791
|
* <字段类型,可配置的控件类型列表>的映射
|
|
752
792
|
*/
|
|
753
|
-
|
|
793
|
+
S(w, "fieldControlTypeMapping", {
|
|
754
794
|
String: [
|
|
755
|
-
{ key:
|
|
756
|
-
{ key:
|
|
757
|
-
{ key:
|
|
758
|
-
{ key:
|
|
759
|
-
{ key:
|
|
760
|
-
{ key:
|
|
761
|
-
{ key:
|
|
762
|
-
{ key: l.textarea.type, value: l.textarea.name }
|
|
763
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
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 }
|
|
764
802
|
],
|
|
765
803
|
Text: [
|
|
766
|
-
{ key:
|
|
767
|
-
{ key:
|
|
768
|
-
{ key: l.lookup.type, value: l.lookup.name }
|
|
804
|
+
{ key: s.textarea.type, value: s.textarea.name },
|
|
805
|
+
{ key: s.lookup.type, value: s.lookup.name }
|
|
769
806
|
],
|
|
770
807
|
Decimal: [
|
|
771
|
-
{ key:
|
|
808
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
772
809
|
],
|
|
773
810
|
Integer: [
|
|
774
|
-
{ key:
|
|
811
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
775
812
|
],
|
|
776
813
|
Number: [
|
|
777
|
-
{ key:
|
|
814
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
778
815
|
],
|
|
779
816
|
BigNumber: [
|
|
780
|
-
{ key:
|
|
817
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
781
818
|
],
|
|
782
819
|
Date: [
|
|
783
|
-
{ key:
|
|
820
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name }
|
|
784
821
|
],
|
|
785
822
|
DateTime: [
|
|
786
|
-
{ key:
|
|
823
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name }
|
|
787
824
|
],
|
|
788
825
|
Boolean: [
|
|
789
|
-
{ key:
|
|
790
|
-
{ key:
|
|
826
|
+
{ key: s.switch.type, value: s.switch.name },
|
|
827
|
+
{ key: s["check-box"].type, value: s["check-box"].name }
|
|
791
828
|
],
|
|
792
829
|
Enum: [
|
|
793
|
-
{ key:
|
|
794
|
-
{ key:
|
|
830
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
831
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name }
|
|
795
832
|
],
|
|
796
833
|
Object: [
|
|
797
|
-
{ key:
|
|
798
|
-
{ key:
|
|
799
|
-
{ key:
|
|
800
|
-
],
|
|
801
|
-
EmployeeSelector: [
|
|
802
|
-
{ key: l.EmployeeSelector.type, value: l.EmployeeSelector.name }
|
|
803
|
-
],
|
|
804
|
-
AdminOrganizationSelector: [
|
|
805
|
-
{ key: l.AdminOrganizationSelector.type, value: l.AdminOrganizationSelector.name }
|
|
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 }
|
|
806
837
|
]
|
|
807
838
|
});
|
|
808
|
-
|
|
839
|
+
let O = w;
|
|
840
|
+
const xe = v(0);
|
|
841
|
+
class ke extends Fe {
|
|
809
842
|
constructor(t, n) {
|
|
810
|
-
|
|
811
|
-
C(this, "viewModelId");
|
|
812
|
-
C(this, "eventsEditorUtils");
|
|
813
|
-
C(this, "formSchemaUtils");
|
|
814
|
-
C(this, "formMetadataConverter");
|
|
815
|
-
C(this, "designViewModelUtils");
|
|
816
|
-
C(this, "designViewModelField");
|
|
817
|
-
C(this, "controlCreatorUtils");
|
|
818
|
-
C(this, "designerHostService");
|
|
819
|
-
C(this, "schemaService", null);
|
|
820
|
-
C(this, "metadataService", null);
|
|
821
|
-
C(this, "propertyConfig", {
|
|
822
|
-
type: "object",
|
|
823
|
-
categories: {}
|
|
824
|
-
});
|
|
825
|
-
var o;
|
|
826
|
-
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;
|
|
827
|
-
}
|
|
828
|
-
getTableInfo() {
|
|
829
|
-
var t;
|
|
830
|
-
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
831
|
-
}
|
|
832
|
-
setDesignViewModelField(t) {
|
|
833
|
-
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
834
|
-
if (n) {
|
|
835
|
-
if (!this.designViewModelField) {
|
|
836
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
837
|
-
this.designViewModelField = o.fields.find((r) => r.id === n);
|
|
838
|
-
}
|
|
839
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
840
|
-
}
|
|
843
|
+
super(t, n);
|
|
841
844
|
}
|
|
842
|
-
|
|
845
|
+
getPropertyConfig(t, n) {
|
|
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;
|
|
843
847
|
}
|
|
844
|
-
|
|
845
|
-
var
|
|
846
|
-
var
|
|
847
|
-
|
|
848
|
+
getBasicProperties(t, n) {
|
|
849
|
+
var u;
|
|
850
|
+
var i = this;
|
|
851
|
+
this.setDesignViewModelField(t);
|
|
852
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), m = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
853
|
+
return {
|
|
848
854
|
description: "Basic Information",
|
|
849
855
|
title: "基本信息",
|
|
850
856
|
properties: {
|
|
@@ -855,8 +861,8 @@ class be {
|
|
|
855
861
|
readonly: !0
|
|
856
862
|
},
|
|
857
863
|
type: {
|
|
858
|
-
description: "
|
|
859
|
-
title: "
|
|
864
|
+
description: "编辑器类型",
|
|
865
|
+
title: "编辑器类型",
|
|
860
866
|
type: "string",
|
|
861
867
|
refreshPanelAfterChanged: !0,
|
|
862
868
|
$converter: "/converter/change-editor.converter",
|
|
@@ -864,63 +870,52 @@ class be {
|
|
|
864
870
|
type: "combo-list",
|
|
865
871
|
textField: "value",
|
|
866
872
|
valueField: "key",
|
|
867
|
-
|
|
868
|
-
|
|
873
|
+
editable: !1,
|
|
874
|
+
data: i.designViewModelField ? O.getEditorTypesByMDataType((u = i.designViewModelField.type) == null ? void 0 : u.name) : O.getAllInputTypes()
|
|
869
875
|
}
|
|
870
876
|
},
|
|
871
877
|
label: {
|
|
872
878
|
title: "标签",
|
|
873
879
|
type: "string",
|
|
874
880
|
$converter: "/converter/form-group-label.converter"
|
|
881
|
+
},
|
|
882
|
+
binding: {
|
|
883
|
+
description: "绑定的表单字段",
|
|
884
|
+
title: "绑定",
|
|
885
|
+
$converter: "/converter/field-selector.converter",
|
|
886
|
+
editor: {
|
|
887
|
+
type: "field-selector",
|
|
888
|
+
bindingType: { enable: !1 },
|
|
889
|
+
editorParams: {
|
|
890
|
+
propertyData: t,
|
|
891
|
+
formBasicInfo: l
|
|
892
|
+
},
|
|
893
|
+
columns: [
|
|
894
|
+
{ field: "name", title: "字段名称" },
|
|
895
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
896
|
+
{ field: "fieldType", title: "字段类型" }
|
|
897
|
+
],
|
|
898
|
+
textField: "bindingField",
|
|
899
|
+
data: m
|
|
900
|
+
}
|
|
875
901
|
}
|
|
876
902
|
},
|
|
877
|
-
setPropertyRelates(
|
|
878
|
-
if (
|
|
879
|
-
switch (
|
|
903
|
+
setPropertyRelates(c, f) {
|
|
904
|
+
if (c)
|
|
905
|
+
switch (c && c.propertyID) {
|
|
880
906
|
case "type": {
|
|
881
|
-
|
|
907
|
+
i.changeControlType(t, c, n);
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
case "label": {
|
|
911
|
+
c.needRefreshControlTree = !0;
|
|
882
912
|
break;
|
|
883
913
|
}
|
|
884
914
|
}
|
|
885
915
|
}
|
|
886
916
|
};
|
|
887
917
|
}
|
|
888
|
-
|
|
889
|
-
* 卡片控件:切换控件类型后事件
|
|
890
|
-
* @param propertyData 控件DOM属性
|
|
891
|
-
* @param newControlType 新控件类型
|
|
892
|
-
*/
|
|
893
|
-
changeControlType(t, n) {
|
|
894
|
-
var c, d, i, a, s;
|
|
895
|
-
const o = n.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
896
|
-
let u = this.getControlParentContainer(t.id, r);
|
|
897
|
-
if (!u)
|
|
898
|
-
return;
|
|
899
|
-
const m = u.contents.findIndex((p) => p.id === t.id), y = u.contents[m];
|
|
900
|
-
let g;
|
|
901
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
902
|
-
editor: {
|
|
903
|
-
$type: o
|
|
904
|
-
},
|
|
905
|
-
name: this.designViewModelField.name,
|
|
906
|
-
require: this.designViewModelField.require,
|
|
907
|
-
readonly: this.designViewModelField.readonly
|
|
908
|
-
}, !1), g = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(g, {
|
|
909
|
-
id: y.id,
|
|
910
|
-
appearance: y.appearance,
|
|
911
|
-
size: y.size,
|
|
912
|
-
label: y.label
|
|
913
|
-
}), Object.assign(g.editor, {
|
|
914
|
-
isTextArea: g.isTextArea && y.isTextArea,
|
|
915
|
-
type: o || "",
|
|
916
|
-
placeHolder: (c = y.editor) == null ? void 0 : c.placeHolder,
|
|
917
|
-
holdPlace: (d = y.editor) == null ? void 0 : d.holdPlace,
|
|
918
|
-
readonly: (i = y.editor) == null ? void 0 : i.readonly,
|
|
919
|
-
require: (a = y.editor) == null ? void 0 : a.require,
|
|
920
|
-
visible: (s = y.editor) == null ? void 0 : s.visible
|
|
921
|
-
}), u.contents.splice(m, 1, g);
|
|
922
|
-
}
|
|
923
|
-
getAppearanceConfig(t = null) {
|
|
918
|
+
getAppearanceProperties(t) {
|
|
924
919
|
return {
|
|
925
920
|
title: "样式",
|
|
926
921
|
description: "Appearance",
|
|
@@ -950,73 +945,52 @@ class be {
|
|
|
950
945
|
}
|
|
951
946
|
};
|
|
952
947
|
}
|
|
953
|
-
/**
|
|
954
|
-
* 获取控件:以contents为节点进行定位
|
|
955
|
-
* @param controlId 控件ID
|
|
956
|
-
* @param domJson 容器
|
|
957
|
-
*/
|
|
958
|
-
getControlParentContainer(t, n) {
|
|
959
|
-
let o;
|
|
960
|
-
if (!n || !n.contents || n.contents.length === 0)
|
|
961
|
-
return null;
|
|
962
|
-
for (const r of n.contents) {
|
|
963
|
-
if (r.id === t)
|
|
964
|
-
return o = n, n;
|
|
965
|
-
if (o = this.getControlParentContainer(t, r), o)
|
|
966
|
-
return o;
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
class Ce extends be {
|
|
971
|
-
constructor(t, n) {
|
|
972
|
-
super(t, n);
|
|
973
|
-
}
|
|
974
|
-
getBasicProperties(t) {
|
|
975
|
-
let n = this.getBasicPropConfig(t);
|
|
976
|
-
return n.properties.binding = this.getFieldSelectorOptions(t), n;
|
|
977
|
-
}
|
|
978
|
-
getAppearanceProperties(t) {
|
|
979
|
-
return this.getAppearanceConfig(t);
|
|
980
|
-
}
|
|
981
948
|
getEditorProperties(t) {
|
|
982
949
|
return this.getComponentConfig(t);
|
|
983
950
|
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
951
|
+
/**
|
|
952
|
+
* 卡片控件:切换控件类型后事件
|
|
953
|
+
* @param propertyData 控件DOM属性
|
|
954
|
+
* @param newControlType 新控件类型
|
|
955
|
+
*/
|
|
956
|
+
changeControlType(t, n, i) {
|
|
957
|
+
var r, d, a, o;
|
|
958
|
+
const l = n.propertyValue, m = i && i.parent && i.parent.schema;
|
|
959
|
+
if (!m)
|
|
960
|
+
return;
|
|
961
|
+
const u = m.contents.findIndex((p) => p.id === t.id), c = m.contents[u];
|
|
962
|
+
let f;
|
|
963
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
993
964
|
editor: {
|
|
994
|
-
type:
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
965
|
+
$type: l
|
|
966
|
+
},
|
|
967
|
+
name: this.designViewModelField.name,
|
|
968
|
+
require: this.designViewModelField.require,
|
|
969
|
+
readonly: this.designViewModelField.readonly
|
|
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++;
|
|
1012
986
|
}
|
|
1013
|
-
getComponentConfig(t, n = {},
|
|
1014
|
-
const
|
|
1015
|
-
description: "
|
|
1016
|
-
title: "
|
|
987
|
+
getComponentConfig(t, n = {}, i = {}) {
|
|
988
|
+
const l = Object.assign({
|
|
989
|
+
description: "编辑器",
|
|
990
|
+
title: "编辑器",
|
|
1017
991
|
type: "input-group",
|
|
1018
992
|
$converter: "/converter/property-editor.converter"
|
|
1019
|
-
}, n),
|
|
993
|
+
}, n), m = Object.assign({
|
|
1020
994
|
readonly: {
|
|
1021
995
|
description: "",
|
|
1022
996
|
title: "只读",
|
|
@@ -1037,11 +1011,11 @@ class Ce extends be {
|
|
|
1037
1011
|
title: "提示文本",
|
|
1038
1012
|
type: "string"
|
|
1039
1013
|
}
|
|
1040
|
-
},
|
|
1041
|
-
return { ...
|
|
1014
|
+
}, i);
|
|
1015
|
+
return { ...l, properties: { ...m } };
|
|
1042
1016
|
}
|
|
1043
1017
|
}
|
|
1044
|
-
class
|
|
1018
|
+
class we extends ke {
|
|
1045
1019
|
constructor(t, n) {
|
|
1046
1020
|
super(t, n);
|
|
1047
1021
|
}
|
|
@@ -1065,75 +1039,68 @@ class ve extends Ce {
|
|
|
1065
1039
|
});
|
|
1066
1040
|
}
|
|
1067
1041
|
}
|
|
1068
|
-
function
|
|
1042
|
+
function Me(e, t) {
|
|
1069
1043
|
const {
|
|
1070
1044
|
canAccepts: n,
|
|
1071
|
-
checkCanDeleteComponent:
|
|
1072
|
-
checkCanMoveComponent:
|
|
1073
|
-
hideNestedPaddingInDesginerView:
|
|
1074
|
-
onAcceptMovedChildElement:
|
|
1075
|
-
resolveComponentContext:
|
|
1076
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1077
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1078
|
-
} =
|
|
1079
|
-
function
|
|
1080
|
-
return new
|
|
1045
|
+
checkCanDeleteComponent: i,
|
|
1046
|
+
checkCanMoveComponent: l,
|
|
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);
|
|
1081
1055
|
}
|
|
1082
1056
|
return {
|
|
1083
1057
|
canAccepts: n,
|
|
1084
|
-
checkCanDeleteComponent:
|
|
1085
|
-
checkCanMoveComponent:
|
|
1086
|
-
hideNestedPaddingInDesginerView:
|
|
1087
|
-
onAcceptMovedChildElement:
|
|
1088
|
-
resolveComponentContext:
|
|
1089
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1090
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1091
|
-
getPropsConfig:
|
|
1058
|
+
checkCanDeleteComponent: i,
|
|
1059
|
+
checkCanMoveComponent: l,
|
|
1060
|
+
hideNestedPaddingInDesginerView: m,
|
|
1061
|
+
onAcceptMovedChildElement: u,
|
|
1062
|
+
resolveComponentContext: c,
|
|
1063
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1064
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1065
|
+
getPropsConfig: a
|
|
1092
1066
|
};
|
|
1093
1067
|
}
|
|
1094
|
-
const
|
|
1068
|
+
const Te = /* @__PURE__ */ P({
|
|
1095
1069
|
name: "FComboListDesign",
|
|
1096
|
-
props:
|
|
1070
|
+
props: D,
|
|
1097
1071
|
emits: ["clear", "update:modelValue", "change"],
|
|
1098
1072
|
setup(e, t) {
|
|
1099
|
-
const n =
|
|
1100
|
-
return
|
|
1101
|
-
n.value.componentInstance =
|
|
1102
|
-
}), 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, {
|
|
1103
1077
|
ref: n,
|
|
1104
|
-
id: e.id,
|
|
1105
|
-
disable: e.disabled,
|
|
1106
|
-
readonly: e.readonly,
|
|
1107
|
-
forcePlaceholder: e.forcePlaceholder,
|
|
1108
|
-
editable: !1,
|
|
1109
1078
|
buttonContent: e.dropDownIcon,
|
|
1079
|
+
readonly: !0,
|
|
1080
|
+
editable: !1,
|
|
1081
|
+
forcePlaceholder: !0,
|
|
1110
1082
|
placeholder: e.placeholder,
|
|
1111
|
-
enableClear: !
|
|
1112
|
-
maxLength: e.maxLength,
|
|
1113
|
-
tabIndex: e.tabIndex,
|
|
1114
|
-
enableTitle: e.enableTitle,
|
|
1115
|
-
multiSelect: e.multiSelect,
|
|
1116
|
-
inputType: e.multiSelect ? "tag" : "text"
|
|
1083
|
+
enableClear: !0
|
|
1117
1084
|
}, null);
|
|
1118
1085
|
}
|
|
1119
|
-
}),
|
|
1086
|
+
}), Be = (e) => {
|
|
1120
1087
|
const t = e;
|
|
1121
1088
|
return t.install = function(n) {
|
|
1122
1089
|
n.component(t.name, e);
|
|
1123
1090
|
}, e;
|
|
1124
1091
|
};
|
|
1125
|
-
|
|
1126
|
-
e["combo-list"] =
|
|
1092
|
+
I.register = (e, t, n, i) => {
|
|
1093
|
+
e["combo-list"] = I, t["combo-list"] = L;
|
|
1127
1094
|
};
|
|
1128
|
-
|
|
1129
|
-
e["combo-list"] =
|
|
1095
|
+
I.registerDesigner = (e, t, n) => {
|
|
1096
|
+
e["combo-list"] = Te, t["combo-list"] = L;
|
|
1130
1097
|
};
|
|
1131
|
-
const
|
|
1098
|
+
const Le = Be(I);
|
|
1132
1099
|
export {
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1100
|
+
I as FComboList,
|
|
1101
|
+
he as Placement,
|
|
1102
|
+
ge as ViewType,
|
|
1103
|
+
D as comboListProps,
|
|
1104
|
+
Le as default,
|
|
1105
|
+
L as propsResolver
|
|
1139
1106
|
};
|