@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,106 +1,105 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var H = (r, e, t) => e in r ? _(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var g = (r, e, t) => H(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as G, toRefs as L, ref as k, computed as B, watch as W, createVNode as C, inject as q, onMounted as x } from "vue";
|
|
5
|
+
import { cloneDeep as I } from "lodash-es";
|
|
6
|
+
import { getSchemaByType as z } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
const J = {}, Q = {};
|
|
8
|
+
function $(r) {
|
|
9
|
+
const { properties: e, title: t, ignore: n } = r, o = n && Array.isArray(n), c = Object.keys(e).reduce((u, s) => ((!o || !n.find((m) => m == s)) && (u[s] = e[s].type === "object" && e[s].properties ? $(e[s]) : I(e[s].default)), u), {});
|
|
10
|
+
return (!o || !n.find((u) => u == "id")) && (c.id = `${t}-${Date.now()}`), c;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
12
|
+
function N(r, e = {}, t) {
|
|
13
|
+
const n = J[r];
|
|
14
|
+
if (n) {
|
|
15
|
+
let o = $(n);
|
|
16
|
+
const c = Q[r];
|
|
17
|
+
return o = c ? c({ getSchemaByType: N }, o, e, t) : o, o;
|
|
17
18
|
}
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
const t =
|
|
22
|
-
return Object.keys(
|
|
21
|
+
function K(r, e) {
|
|
22
|
+
const t = $(e);
|
|
23
|
+
return Object.keys(r).reduce((n, o) => (n[o] && typeof n[o] == "object" ? Object.assign(n[o], r[o]) : n[o] = r[o], n), t), t;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(
|
|
26
|
-
if (e.has(
|
|
27
|
-
const c = e.get(
|
|
25
|
+
function R(r, e) {
|
|
26
|
+
return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
|
|
27
|
+
if (e.has(o)) {
|
|
28
|
+
const c = e.get(o);
|
|
28
29
|
if (typeof c == "string")
|
|
29
|
-
n[c] = o
|
|
30
|
+
n[c] = r[o];
|
|
30
31
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(n,
|
|
32
|
+
const u = c(o, r[o], r);
|
|
33
|
+
Object.assign(n, u);
|
|
33
34
|
}
|
|
34
35
|
} else
|
|
35
|
-
n[
|
|
36
|
+
n[o] = r[o];
|
|
36
37
|
return n;
|
|
37
38
|
}, {});
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
const n =
|
|
41
|
-
return
|
|
40
|
+
function ee(r, e, t = /* @__PURE__ */ new Map()) {
|
|
41
|
+
const n = K(r, e);
|
|
42
|
+
return R(n, t);
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(
|
|
44
|
+
function te(r = {}) {
|
|
45
|
+
function e(i, l, p, d) {
|
|
45
46
|
if (typeof p == "number")
|
|
46
|
-
return
|
|
47
|
+
return d[i].length === p;
|
|
47
48
|
if (typeof p == "object") {
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
49
|
+
const f = Object.keys(p)[0], h = p[f];
|
|
50
|
+
if (f === "not")
|
|
51
|
+
return Number(d[i].length) !== Number(h);
|
|
52
|
+
if (f === "moreThan")
|
|
53
|
+
return Number(d[i].length) >= Number(h);
|
|
54
|
+
if (f === "lessThan")
|
|
55
|
+
return Number(d[i].length) <= Number(h);
|
|
55
56
|
}
|
|
56
57
|
return !1;
|
|
57
58
|
}
|
|
58
|
-
function t(
|
|
59
|
-
return
|
|
59
|
+
function t(i, l, p, d) {
|
|
60
|
+
return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(p);
|
|
60
61
|
}
|
|
61
62
|
const n = /* @__PURE__ */ new Map([
|
|
62
63
|
["length", e],
|
|
63
64
|
["getProperty", t]
|
|
64
65
|
]);
|
|
65
|
-
Object.keys(
|
|
66
|
-
function
|
|
67
|
-
const p =
|
|
68
|
-
return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param:
|
|
69
|
-
if (
|
|
70
|
-
return { target: p, operator: "length", param: null, value: l[
|
|
71
|
-
const
|
|
72
|
-
return { target: p, operator: "getProperty", param:
|
|
66
|
+
Object.keys(r).reduce((i, l) => (i.set(l, r[l]), i), n);
|
|
67
|
+
function o(i, l) {
|
|
68
|
+
const p = i;
|
|
69
|
+
return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((d) => {
|
|
70
|
+
if (d === "length")
|
|
71
|
+
return { target: p, operator: "length", param: null, value: l[d] };
|
|
72
|
+
const f = d, h = l[d];
|
|
73
|
+
return { target: p, operator: "getProperty", param: f, value: h };
|
|
73
74
|
}) : [];
|
|
74
75
|
}
|
|
75
|
-
function c(
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const
|
|
78
|
-
return p.push(...
|
|
76
|
+
function c(i) {
|
|
77
|
+
return Object.keys(i).reduce((p, d) => {
|
|
78
|
+
const f = o(d, i[d]);
|
|
79
|
+
return p.push(...f), p;
|
|
79
80
|
}, []);
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
if (n.has(
|
|
83
|
-
const p = n.get(
|
|
84
|
-
return p && p(
|
|
82
|
+
function u(i, l) {
|
|
83
|
+
if (n.has(i.operator)) {
|
|
84
|
+
const p = n.get(i.operator);
|
|
85
|
+
return p && p(i.target, i.param, i.value, l) || !1;
|
|
85
86
|
}
|
|
86
87
|
return !1;
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return c(
|
|
89
|
+
function s(i, l) {
|
|
90
|
+
return c(i).reduce((f, h) => f && u(h, l), !0);
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
-
const p = Object.keys(
|
|
93
|
-
return
|
|
92
|
+
function m(i, l) {
|
|
93
|
+
const p = Object.keys(i), d = p.includes("allOf"), f = p.includes("anyOf"), h = d || f, T = (h ? i[h ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => s(A, l));
|
|
94
|
+
return d ? !T.includes(!1) : T.includes(!0);
|
|
94
95
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
96
|
+
return { parseValueSchema: m };
|
|
96
97
|
}
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
98
|
+
const a = {
|
|
99
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
100
100
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
101
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
101
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
102
102
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
103
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
104
103
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
105
104
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
106
105
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -111,114 +110,43 @@ const i = {
|
|
|
111
110
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
112
111
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
113
112
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
118
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
119
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
113
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
114
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
115
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
120
116
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
121
|
-
|
|
122
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
123
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
124
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
117
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
125
118
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
126
119
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
127
|
-
|
|
128
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
120
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
129
121
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
130
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
131
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
132
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
133
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
134
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
135
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
136
122
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
137
123
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
138
124
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
139
|
-
|
|
140
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
141
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
142
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
143
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
144
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
145
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
125
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
146
126
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
154
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
155
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
156
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
157
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
158
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
159
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
160
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
161
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
162
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
163
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
164
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
165
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
166
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
167
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
168
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
169
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
170
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
171
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
172
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
173
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
174
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
175
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
127
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
128
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
129
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
130
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
131
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
132
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
176
133
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
186
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
187
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
188
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
189
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
190
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
191
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
192
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
193
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
194
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
195
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
196
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
197
|
-
/** 查询类 start */
|
|
198
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
199
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
200
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
201
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
202
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
203
|
-
/** 查询类 end */
|
|
204
|
-
/** 审批类 start */
|
|
205
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
206
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
207
|
-
/** 审批类 end */
|
|
208
|
-
}, ee = {}, te = {};
|
|
209
|
-
K();
|
|
210
|
-
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, r = {}, c = (m) => m) {
|
|
211
|
-
return x[e.title] = e, W[e.title] = n, ee[e.title] = r, te[e.title] = c, (m = {}) => {
|
|
212
|
-
const u = R(m, e, t), y = Object.keys(o).reduce((a, l) => (a[l] = o[l].default, a), {});
|
|
213
|
-
return Object.assign(y, u);
|
|
134
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
135
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
136
|
+
}, ne = {}, oe = {};
|
|
137
|
+
te();
|
|
138
|
+
function re(r, e, t = /* @__PURE__ */ new Map(), n = (u, s, m) => s, o = {}, c = (u) => u) {
|
|
139
|
+
return J[e.title] = e, Q[e.title] = n, ne[e.title] = o, oe[e.title] = c, (u = {}) => {
|
|
140
|
+
const s = ee(u, e, t), m = Object.keys(r).reduce((i, l) => (i[l] = r[l].default, i), {});
|
|
141
|
+
return Object.assign(m, s);
|
|
214
142
|
};
|
|
215
143
|
}
|
|
216
|
-
function
|
|
144
|
+
function ie(r, e) {
|
|
217
145
|
return { customClass: e.class, customStyle: e.style };
|
|
218
146
|
}
|
|
219
|
-
const
|
|
220
|
-
["appearance",
|
|
221
|
-
]),
|
|
147
|
+
const ae = /* @__PURE__ */ new Map([
|
|
148
|
+
["appearance", ie]
|
|
149
|
+
]), le = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-design.gitee.io/switch.schema.json", ce = "switch", pe = "A Farris Component", ue = "object", de = {
|
|
222
150
|
id: {
|
|
223
151
|
description: "The unique identifier for a switch",
|
|
224
152
|
type: "string"
|
|
@@ -288,24 +216,29 @@ const re = /* @__PURE__ */ new Map([
|
|
|
288
216
|
size: {
|
|
289
217
|
description: "",
|
|
290
218
|
type: "enum",
|
|
291
|
-
default: "
|
|
219
|
+
default: "middle"
|
|
292
220
|
}
|
|
293
|
-
},
|
|
221
|
+
}, me = [
|
|
294
222
|
"id",
|
|
295
223
|
"type"
|
|
296
|
-
],
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
224
|
+
], ye = [
|
|
225
|
+
"id",
|
|
226
|
+
"appearance",
|
|
227
|
+
"binding"
|
|
228
|
+
], fe = {
|
|
229
|
+
$schema: le,
|
|
230
|
+
$id: se,
|
|
231
|
+
title: ce,
|
|
232
|
+
description: pe,
|
|
233
|
+
type: ue,
|
|
234
|
+
properties: de,
|
|
235
|
+
required: me,
|
|
236
|
+
ignore: ye
|
|
304
237
|
};
|
|
305
|
-
function
|
|
238
|
+
function he(r, e, t) {
|
|
306
239
|
return e;
|
|
307
240
|
}
|
|
308
|
-
const
|
|
241
|
+
const U = {
|
|
309
242
|
/** 组件值*/
|
|
310
243
|
modelValue: { type: Boolean, default: !1 },
|
|
311
244
|
/** 禁用 */
|
|
@@ -321,21 +254,21 @@ const E = {
|
|
|
321
254
|
/** 开关值变化事件 */
|
|
322
255
|
onModelValueChanged: { type: Function, default: () => {
|
|
323
256
|
} }
|
|
324
|
-
},
|
|
257
|
+
}, X = re(U, fe, ae, he), F = /* @__PURE__ */ G({
|
|
325
258
|
name: "FSwitch",
|
|
326
|
-
props:
|
|
259
|
+
props: U,
|
|
327
260
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
328
|
-
setup(
|
|
261
|
+
setup(r, e) {
|
|
329
262
|
const {
|
|
330
263
|
disabled: t,
|
|
331
264
|
size: n,
|
|
332
|
-
onLabel:
|
|
265
|
+
onLabel: o,
|
|
333
266
|
offLabel: c,
|
|
334
|
-
onBackground:
|
|
335
|
-
offBackground:
|
|
336
|
-
onColor:
|
|
337
|
-
offColor:
|
|
338
|
-
} =
|
|
267
|
+
onBackground: u,
|
|
268
|
+
offBackground: s,
|
|
269
|
+
onColor: m,
|
|
270
|
+
offColor: i
|
|
271
|
+
} = L(r), l = k(r.modelValue), p = B(() => ({
|
|
339
272
|
switch: !0,
|
|
340
273
|
"f-cmp-switch": !0,
|
|
341
274
|
checked: l.value,
|
|
@@ -343,234 +276,296 @@ const E = {
|
|
|
343
276
|
"switch-large": n.value === "large",
|
|
344
277
|
"switch-medium": n.value === "medium",
|
|
345
278
|
"switch-small": n.value === "small"
|
|
346
|
-
})),
|
|
279
|
+
})), d = B(() => l.value ? {
|
|
347
280
|
outline: "none",
|
|
348
|
-
background:
|
|
281
|
+
background: u.value
|
|
349
282
|
} : {
|
|
350
283
|
outline: "none",
|
|
351
|
-
backgroundColor:
|
|
352
|
-
}),
|
|
353
|
-
background:
|
|
284
|
+
backgroundColor: s.value
|
|
285
|
+
}), f = B(() => l.value ? {
|
|
286
|
+
background: m.value
|
|
354
287
|
} : {
|
|
355
|
-
backgroundColor:
|
|
356
|
-
}), h =
|
|
357
|
-
function
|
|
288
|
+
backgroundColor: i.value
|
|
289
|
+
}), h = B(() => (o == null ? void 0 : o.value) || (c == null ? void 0 : c.value));
|
|
290
|
+
function P() {
|
|
358
291
|
t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
|
|
359
292
|
}
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
}),
|
|
363
|
-
|
|
364
|
-
}), () =>
|
|
293
|
+
return W(l, (M, T) => {
|
|
294
|
+
M !== T && e.emit("modelValueChanged", M);
|
|
295
|
+
}), W(() => r.modelValue, (M, T) => {
|
|
296
|
+
M !== T && (l.value = M);
|
|
297
|
+
}), () => C("span", {
|
|
365
298
|
tabindex: "0",
|
|
366
299
|
role: "button",
|
|
367
300
|
class: p.value,
|
|
368
|
-
style:
|
|
369
|
-
onClick:
|
|
370
|
-
}, [h.value &&
|
|
301
|
+
style: d.value,
|
|
302
|
+
onClick: P
|
|
303
|
+
}, [h.value && C("span", {
|
|
371
304
|
class: "switch-pane"
|
|
372
|
-
}, [
|
|
305
|
+
}, [C("span", {
|
|
373
306
|
class: "switch-label-checked"
|
|
374
|
-
}, [
|
|
307
|
+
}, [o == null ? void 0 : o.value]), C("span", {
|
|
375
308
|
class: "switch-label-unchecked"
|
|
376
|
-
}, [c == null ? void 0 : c.value])]),
|
|
377
|
-
style:
|
|
309
|
+
}, [c == null ? void 0 : c.value])]), C("small", {
|
|
310
|
+
style: f.value
|
|
378
311
|
}, [e.slots.default && e.slots.default()])]);
|
|
379
312
|
}
|
|
380
313
|
});
|
|
381
|
-
function
|
|
382
|
-
var
|
|
314
|
+
function ge(r, e, t) {
|
|
315
|
+
var O;
|
|
383
316
|
function n() {
|
|
384
317
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
385
318
|
}
|
|
386
319
|
n();
|
|
387
|
-
const
|
|
388
|
-
function
|
|
320
|
+
const o = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", u = k();
|
|
321
|
+
function s() {
|
|
389
322
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
390
323
|
}
|
|
391
|
-
function
|
|
324
|
+
function m() {
|
|
392
325
|
return !1;
|
|
393
326
|
}
|
|
394
|
-
function
|
|
327
|
+
function i() {
|
|
395
328
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
396
329
|
}
|
|
397
330
|
function l() {
|
|
398
331
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
399
332
|
}
|
|
400
|
-
function p(
|
|
401
|
-
if (!
|
|
333
|
+
function p(y) {
|
|
334
|
+
if (!y || !y.value)
|
|
402
335
|
return null;
|
|
403
|
-
if (
|
|
404
|
-
return
|
|
405
|
-
const v =
|
|
406
|
-
return
|
|
336
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
337
|
+
return y.value;
|
|
338
|
+
const v = k(y == null ? void 0 : y.value.parent), b = p(v);
|
|
339
|
+
return b || null;
|
|
407
340
|
}
|
|
408
|
-
function
|
|
409
|
-
const { componentInstance: v, designerItemElementRef:
|
|
410
|
-
return !v || !v.value ? null : v.value.canMove ?
|
|
341
|
+
function d(y = e) {
|
|
342
|
+
const { componentInstance: v, designerItemElementRef: b } = y;
|
|
343
|
+
return !v || !v.value ? null : v.value.canMove ? b : d(y.parent);
|
|
411
344
|
}
|
|
412
|
-
function
|
|
413
|
-
return !!t && t.canAccepts(
|
|
345
|
+
function f(y) {
|
|
346
|
+
return !!t && t.canAccepts(y);
|
|
414
347
|
}
|
|
415
348
|
function h() {
|
|
416
349
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
417
350
|
}
|
|
418
|
-
function
|
|
351
|
+
function P() {
|
|
419
352
|
}
|
|
420
|
-
function
|
|
353
|
+
function M(y, v) {
|
|
421
354
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
422
355
|
}
|
|
423
|
-
function
|
|
424
|
-
const { componentType:
|
|
425
|
-
let
|
|
426
|
-
t && t.onResolveNewComponentSchema && (
|
|
427
|
-
const
|
|
428
|
-
return
|
|
356
|
+
function T(y, v) {
|
|
357
|
+
const { componentType: b } = y;
|
|
358
|
+
let w = N(b, y, v);
|
|
359
|
+
t && t.onResolveNewComponentSchema && (w = t.onResolveNewComponentSchema(y, w));
|
|
360
|
+
const D = b.toLowerCase().replace("-", "_");
|
|
361
|
+
return w && !w.id && w.type === b && (w.id = `${D}_${Math.random().toString().slice(2, 6)}`), w;
|
|
429
362
|
}
|
|
430
|
-
function
|
|
431
|
-
const
|
|
432
|
-
|
|
433
|
-
let
|
|
434
|
-
t && t.onAcceptNewChildElement && (
|
|
435
|
-
const
|
|
436
|
-
return
|
|
363
|
+
function j(y, v) {
|
|
364
|
+
const b = String(y.getAttribute("data-controltype")), w = y.getAttribute("data-feature"), D = w ? JSON.parse(w) : {};
|
|
365
|
+
D.parentComponentInstance = u.value;
|
|
366
|
+
let S = N(b, D);
|
|
367
|
+
t && t.onAcceptNewChildElement && (S = t.onAcceptNewChildElement(y, v, S));
|
|
368
|
+
const Z = b.toLowerCase().replace("-", "_");
|
|
369
|
+
return S && !S.id && S.type === b && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
|
|
437
370
|
}
|
|
438
|
-
function
|
|
371
|
+
function A(y) {
|
|
439
372
|
}
|
|
440
|
-
function
|
|
373
|
+
function Y(...y) {
|
|
441
374
|
if (t && t.getPropsConfig)
|
|
442
|
-
return t.getPropsConfig(...
|
|
375
|
+
return t.getPropsConfig(...y);
|
|
443
376
|
}
|
|
444
|
-
return
|
|
445
|
-
canMove:
|
|
446
|
-
canSelectParent:
|
|
447
|
-
canDelete:
|
|
377
|
+
return u.value = {
|
|
378
|
+
canMove: s(),
|
|
379
|
+
canSelectParent: m(),
|
|
380
|
+
canDelete: i(),
|
|
448
381
|
canNested: !l(),
|
|
449
382
|
contents: e == null ? void 0 : e.schema.contents,
|
|
450
|
-
elementRef:
|
|
451
|
-
parent: (
|
|
383
|
+
elementRef: r,
|
|
384
|
+
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
452
385
|
schema: e == null ? void 0 : e.schema,
|
|
453
|
-
styles:
|
|
386
|
+
styles: o,
|
|
454
387
|
designerClass: c,
|
|
455
|
-
canAccepts:
|
|
388
|
+
canAccepts: f,
|
|
456
389
|
getBelongedComponentInstance: p,
|
|
457
|
-
getDraggableDesignItemElement:
|
|
390
|
+
getDraggableDesignItemElement: d,
|
|
458
391
|
getDraggingDisplayText: h,
|
|
459
|
-
getPropConfig:
|
|
460
|
-
getDragScopeElement:
|
|
461
|
-
onAcceptMovedChildElement:
|
|
462
|
-
onAcceptNewChildElement:
|
|
463
|
-
onChildElementMovedOut:
|
|
464
|
-
addNewChildComponentSchema:
|
|
392
|
+
getPropConfig: Y,
|
|
393
|
+
getDragScopeElement: P,
|
|
394
|
+
onAcceptMovedChildElement: M,
|
|
395
|
+
onAcceptNewChildElement: j,
|
|
396
|
+
onChildElementMovedOut: A,
|
|
397
|
+
addNewChildComponentSchema: T,
|
|
465
398
|
updateDragAndDropRules: n,
|
|
466
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
467
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
468
|
-
},
|
|
399
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
|
|
400
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
401
|
+
}, u;
|
|
469
402
|
}
|
|
470
|
-
class
|
|
403
|
+
class ve {
|
|
404
|
+
constructor(e, t) {
|
|
405
|
+
g(this, "componentId");
|
|
406
|
+
g(this, "viewModelId");
|
|
407
|
+
g(this, "eventsEditorUtils");
|
|
408
|
+
g(this, "formSchemaUtils");
|
|
409
|
+
g(this, "formMetadataConverter");
|
|
410
|
+
g(this, "designViewModelUtils");
|
|
411
|
+
g(this, "designViewModelField");
|
|
412
|
+
g(this, "controlCreatorUtils");
|
|
413
|
+
g(this, "designerHostService");
|
|
414
|
+
g(this, "schemaService", null);
|
|
415
|
+
g(this, "metadataService", null);
|
|
416
|
+
g(this, "propertyConfig", {
|
|
417
|
+
type: "object",
|
|
418
|
+
categories: {}
|
|
419
|
+
});
|
|
420
|
+
var n;
|
|
421
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
422
|
+
}
|
|
423
|
+
getTableInfo() {
|
|
424
|
+
var e;
|
|
425
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
426
|
+
}
|
|
427
|
+
setDesignViewModelField(e) {
|
|
428
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
429
|
+
if (t) {
|
|
430
|
+
if (!this.designViewModelField) {
|
|
431
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
432
|
+
this.designViewModelField = n.fields.find((o) => o.id === t);
|
|
433
|
+
}
|
|
434
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
changeFieldEditorType(e, t) {
|
|
438
|
+
}
|
|
439
|
+
getBasicPropConfig(e) {
|
|
440
|
+
return {
|
|
441
|
+
description: "Basic Information",
|
|
442
|
+
title: "基本信息",
|
|
443
|
+
properties: {
|
|
444
|
+
id: {
|
|
445
|
+
description: "组件标识",
|
|
446
|
+
title: "标识",
|
|
447
|
+
type: "string",
|
|
448
|
+
readonly: !0
|
|
449
|
+
},
|
|
450
|
+
type: {
|
|
451
|
+
description: "组件类型",
|
|
452
|
+
title: "控件类型",
|
|
453
|
+
type: "select",
|
|
454
|
+
editor: {
|
|
455
|
+
type: "combo-list",
|
|
456
|
+
textField: "name",
|
|
457
|
+
valueField: "value",
|
|
458
|
+
data: [{ value: e.type, name: a[e.type].name }]
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
getAppearanceConfig(e = null) {
|
|
465
|
+
return {
|
|
466
|
+
title: "样式",
|
|
467
|
+
description: "Appearance",
|
|
468
|
+
properties: {
|
|
469
|
+
class: {
|
|
470
|
+
title: "class样式",
|
|
471
|
+
type: "string",
|
|
472
|
+
description: "组件的CSS样式",
|
|
473
|
+
$converter: "/converter/appearance.converter"
|
|
474
|
+
},
|
|
475
|
+
style: {
|
|
476
|
+
title: "style样式",
|
|
477
|
+
type: "string",
|
|
478
|
+
description: "组件的样式",
|
|
479
|
+
$converter: "/converter/appearance.converter"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
const V = class V {
|
|
486
|
+
/**
|
|
487
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
488
|
+
*/
|
|
471
489
|
static getEditorTypesByMDataType(e) {
|
|
472
|
-
const t =
|
|
490
|
+
const t = V.fieldControlTypeMapping[e];
|
|
473
491
|
return t || [{ key: "", value: "" }];
|
|
474
492
|
}
|
|
475
|
-
|
|
493
|
+
/**
|
|
494
|
+
* 获取所有输入类控件
|
|
495
|
+
*/
|
|
496
|
+
static getAllInputTypes() {
|
|
497
|
+
const e = [];
|
|
498
|
+
for (let t in V.fieldControlTypeMapping)
|
|
499
|
+
V.fieldControlTypeMapping[t].forEach((n) => {
|
|
500
|
+
e.find((o) => o.key === n.key && o.value === n.value) || e.push({ key: n.key, value: n.value });
|
|
501
|
+
});
|
|
502
|
+
return e;
|
|
503
|
+
}
|
|
504
|
+
};
|
|
476
505
|
/**
|
|
477
506
|
* <字段类型,可配置的控件类型列表>的映射
|
|
478
507
|
*/
|
|
479
|
-
|
|
508
|
+
g(V, "fieldControlTypeMapping", {
|
|
480
509
|
String: [
|
|
481
|
-
{ key:
|
|
482
|
-
{ key:
|
|
483
|
-
{ key:
|
|
484
|
-
{ key:
|
|
485
|
-
{ key:
|
|
486
|
-
{ key:
|
|
487
|
-
{ key:
|
|
488
|
-
{ key: i.textarea.type, value: i.textarea.name }
|
|
489
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
510
|
+
{ key: a["input-group"].type, value: a["input-group"].name },
|
|
511
|
+
{ key: a.lookup.type, value: a.lookup.name },
|
|
512
|
+
{ key: a["date-picker"].type, value: a["date-picker"].name },
|
|
513
|
+
{ key: a["check-box"].type, value: a["check-box"].name },
|
|
514
|
+
{ key: a["radio-group"].type, value: a["radio-group"].name },
|
|
515
|
+
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
516
|
+
{ key: a.textarea.type, value: a.textarea.name }
|
|
490
517
|
],
|
|
491
518
|
Text: [
|
|
492
|
-
{ key:
|
|
493
|
-
{ key:
|
|
494
|
-
{ key: i.lookup.type, value: i.lookup.name }
|
|
519
|
+
{ key: a.textarea.type, value: a.textarea.name },
|
|
520
|
+
{ key: a.lookup.type, value: a.lookup.name }
|
|
495
521
|
],
|
|
496
522
|
Decimal: [
|
|
497
|
-
{ key:
|
|
523
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
498
524
|
],
|
|
499
525
|
Integer: [
|
|
500
|
-
{ key:
|
|
526
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
501
527
|
],
|
|
502
528
|
Number: [
|
|
503
|
-
{ key:
|
|
529
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
504
530
|
],
|
|
505
531
|
BigNumber: [
|
|
506
|
-
{ key:
|
|
532
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
507
533
|
],
|
|
508
534
|
Date: [
|
|
509
|
-
{ key:
|
|
535
|
+
{ key: a["date-picker"].type, value: a["date-picker"].name }
|
|
510
536
|
],
|
|
511
537
|
DateTime: [
|
|
512
|
-
{ key:
|
|
538
|
+
{ key: a["date-picker"].type, value: a["date-picker"].name }
|
|
513
539
|
],
|
|
514
540
|
Boolean: [
|
|
515
|
-
{ key:
|
|
516
|
-
{ key:
|
|
541
|
+
{ key: a.switch.type, value: a.switch.name },
|
|
542
|
+
{ key: a["check-box"].type, value: a["check-box"].name }
|
|
517
543
|
],
|
|
518
544
|
Enum: [
|
|
519
|
-
{ key:
|
|
520
|
-
{ key:
|
|
545
|
+
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
546
|
+
{ key: a["radio-group"].type, value: a["radio-group"].name }
|
|
521
547
|
],
|
|
522
548
|
Object: [
|
|
523
|
-
{ key:
|
|
524
|
-
{ key:
|
|
525
|
-
{ key:
|
|
526
|
-
],
|
|
527
|
-
EmployeeSelector: [
|
|
528
|
-
{ key: i.EmployeeSelector.type, value: i.EmployeeSelector.name }
|
|
529
|
-
],
|
|
530
|
-
AdminOrganizationSelector: [
|
|
531
|
-
{ key: i.AdminOrganizationSelector.type, value: i.AdminOrganizationSelector.name }
|
|
549
|
+
{ key: a.lookup.type, value: a.lookup.name },
|
|
550
|
+
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
551
|
+
{ key: a["radio-group"].type, value: a["radio-group"].name }
|
|
532
552
|
]
|
|
533
553
|
});
|
|
534
|
-
|
|
554
|
+
let E = V;
|
|
555
|
+
const be = k(0);
|
|
556
|
+
class we extends ve {
|
|
535
557
|
constructor(e, t) {
|
|
536
|
-
|
|
537
|
-
C(this, "viewModelId");
|
|
538
|
-
C(this, "eventsEditorUtils");
|
|
539
|
-
C(this, "formSchemaUtils");
|
|
540
|
-
C(this, "formMetadataConverter");
|
|
541
|
-
C(this, "designViewModelUtils");
|
|
542
|
-
C(this, "designViewModelField");
|
|
543
|
-
C(this, "controlCreatorUtils");
|
|
544
|
-
C(this, "designerHostService");
|
|
545
|
-
C(this, "schemaService", null);
|
|
546
|
-
C(this, "metadataService", null);
|
|
547
|
-
C(this, "propertyConfig", {
|
|
548
|
-
type: "object",
|
|
549
|
-
categories: {}
|
|
550
|
-
});
|
|
551
|
-
var n;
|
|
552
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
553
|
-
}
|
|
554
|
-
getTableInfo() {
|
|
555
|
-
var e;
|
|
556
|
-
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
557
|
-
}
|
|
558
|
-
setDesignViewModelField(e) {
|
|
559
|
-
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
560
|
-
if (t) {
|
|
561
|
-
if (!this.designViewModelField) {
|
|
562
|
-
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
563
|
-
this.designViewModelField = n.fields.find((r) => r.id === t);
|
|
564
|
-
}
|
|
565
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
566
|
-
}
|
|
558
|
+
super(e, t);
|
|
567
559
|
}
|
|
568
|
-
|
|
560
|
+
getPropertyConfig(e, t) {
|
|
561
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
569
562
|
}
|
|
570
|
-
|
|
571
|
-
var
|
|
572
|
-
var
|
|
573
|
-
|
|
563
|
+
getBasicProperties(e, t) {
|
|
564
|
+
var u;
|
|
565
|
+
var n = this;
|
|
566
|
+
this.setDesignViewModelField(e);
|
|
567
|
+
const o = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
568
|
+
return {
|
|
574
569
|
description: "Basic Information",
|
|
575
570
|
title: "基本信息",
|
|
576
571
|
properties: {
|
|
@@ -581,8 +576,8 @@ class ge {
|
|
|
581
576
|
readonly: !0
|
|
582
577
|
},
|
|
583
578
|
type: {
|
|
584
|
-
description: "
|
|
585
|
-
title: "
|
|
579
|
+
description: "编辑器类型",
|
|
580
|
+
title: "编辑器类型",
|
|
586
581
|
type: "string",
|
|
587
582
|
refreshPanelAfterChanged: !0,
|
|
588
583
|
$converter: "/converter/change-editor.converter",
|
|
@@ -590,63 +585,52 @@ class ge {
|
|
|
590
585
|
type: "combo-list",
|
|
591
586
|
textField: "value",
|
|
592
587
|
valueField: "key",
|
|
593
|
-
|
|
594
|
-
|
|
588
|
+
editable: !1,
|
|
589
|
+
data: n.designViewModelField ? E.getEditorTypesByMDataType((u = n.designViewModelField.type) == null ? void 0 : u.name) : E.getAllInputTypes()
|
|
595
590
|
}
|
|
596
591
|
},
|
|
597
592
|
label: {
|
|
598
593
|
title: "标签",
|
|
599
594
|
type: "string",
|
|
600
595
|
$converter: "/converter/form-group-label.converter"
|
|
596
|
+
},
|
|
597
|
+
binding: {
|
|
598
|
+
description: "绑定的表单字段",
|
|
599
|
+
title: "绑定",
|
|
600
|
+
$converter: "/converter/field-selector.converter",
|
|
601
|
+
editor: {
|
|
602
|
+
type: "field-selector",
|
|
603
|
+
bindingType: { enable: !1 },
|
|
604
|
+
editorParams: {
|
|
605
|
+
propertyData: e,
|
|
606
|
+
formBasicInfo: o
|
|
607
|
+
},
|
|
608
|
+
columns: [
|
|
609
|
+
{ field: "name", title: "字段名称" },
|
|
610
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
611
|
+
{ field: "fieldType", title: "字段类型" }
|
|
612
|
+
],
|
|
613
|
+
textField: "bindingField",
|
|
614
|
+
data: c
|
|
615
|
+
}
|
|
601
616
|
}
|
|
602
617
|
},
|
|
603
|
-
setPropertyRelates(
|
|
604
|
-
if (
|
|
605
|
-
switch (
|
|
618
|
+
setPropertyRelates(s, m) {
|
|
619
|
+
if (s)
|
|
620
|
+
switch (s && s.propertyID) {
|
|
606
621
|
case "type": {
|
|
607
|
-
|
|
622
|
+
n.changeControlType(e, s, t);
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
case "label": {
|
|
626
|
+
s.needRefreshControlTree = !0;
|
|
608
627
|
break;
|
|
609
628
|
}
|
|
610
629
|
}
|
|
611
630
|
}
|
|
612
631
|
};
|
|
613
632
|
}
|
|
614
|
-
|
|
615
|
-
* 卡片控件:切换控件类型后事件
|
|
616
|
-
* @param propertyData 控件DOM属性
|
|
617
|
-
* @param newControlType 新控件类型
|
|
618
|
-
*/
|
|
619
|
-
changeControlType(e, t) {
|
|
620
|
-
var a, l, p, s, g;
|
|
621
|
-
const n = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
622
|
-
let c = this.getControlParentContainer(e.id, r);
|
|
623
|
-
if (!c)
|
|
624
|
-
return;
|
|
625
|
-
const m = c.contents.findIndex((h) => h.id === e.id), u = c.contents[m];
|
|
626
|
-
let y;
|
|
627
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
628
|
-
editor: {
|
|
629
|
-
$type: n
|
|
630
|
-
},
|
|
631
|
-
name: this.designViewModelField.name,
|
|
632
|
-
require: this.designViewModelField.require,
|
|
633
|
-
readonly: this.designViewModelField.readonly
|
|
634
|
-
}, !1), y = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, n)), Object.assign(y, {
|
|
635
|
-
id: u.id,
|
|
636
|
-
appearance: u.appearance,
|
|
637
|
-
size: u.size,
|
|
638
|
-
label: u.label
|
|
639
|
-
}), Object.assign(y.editor, {
|
|
640
|
-
isTextArea: y.isTextArea && u.isTextArea,
|
|
641
|
-
type: n || "",
|
|
642
|
-
placeHolder: (a = u.editor) == null ? void 0 : a.placeHolder,
|
|
643
|
-
holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
|
|
644
|
-
readonly: (p = u.editor) == null ? void 0 : p.readonly,
|
|
645
|
-
require: (s = u.editor) == null ? void 0 : s.require,
|
|
646
|
-
visible: (g = u.editor) == null ? void 0 : g.visible
|
|
647
|
-
}), c.contents.splice(m, 1, y);
|
|
648
|
-
}
|
|
649
|
-
getAppearanceConfig(e = null) {
|
|
633
|
+
getAppearanceProperties(e) {
|
|
650
634
|
return {
|
|
651
635
|
title: "样式",
|
|
652
636
|
description: "Appearance",
|
|
@@ -676,70 +660,49 @@ class ge {
|
|
|
676
660
|
}
|
|
677
661
|
};
|
|
678
662
|
}
|
|
679
|
-
/**
|
|
680
|
-
* 获取控件:以contents为节点进行定位
|
|
681
|
-
* @param controlId 控件ID
|
|
682
|
-
* @param domJson 容器
|
|
683
|
-
*/
|
|
684
|
-
getControlParentContainer(e, t) {
|
|
685
|
-
let n;
|
|
686
|
-
if (!t || !t.contents || t.contents.length === 0)
|
|
687
|
-
return null;
|
|
688
|
-
for (const r of t.contents) {
|
|
689
|
-
if (r.id === e)
|
|
690
|
-
return n = t, t;
|
|
691
|
-
if (n = this.getControlParentContainer(e, r), n)
|
|
692
|
-
return n;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
class he extends ge {
|
|
697
|
-
constructor(e, t) {
|
|
698
|
-
super(e, t);
|
|
699
|
-
}
|
|
700
|
-
getBasicProperties(e) {
|
|
701
|
-
let t = this.getBasicPropConfig(e);
|
|
702
|
-
return t.properties.binding = this.getFieldSelectorOptions(e), t;
|
|
703
|
-
}
|
|
704
|
-
getAppearanceProperties(e) {
|
|
705
|
-
return this.getAppearanceConfig(e);
|
|
706
|
-
}
|
|
707
663
|
getEditorProperties(e) {
|
|
708
664
|
return this.getComponentConfig(e);
|
|
709
665
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
666
|
+
/**
|
|
667
|
+
* 卡片控件:切换控件类型后事件
|
|
668
|
+
* @param propertyData 控件DOM属性
|
|
669
|
+
* @param newControlType 新控件类型
|
|
670
|
+
*/
|
|
671
|
+
changeControlType(e, t, n) {
|
|
672
|
+
var i, l, p, d;
|
|
673
|
+
const o = t.propertyValue, c = n && n.parent && n.parent.schema;
|
|
674
|
+
if (!c)
|
|
675
|
+
return;
|
|
676
|
+
const u = c.contents.findIndex((f) => f.id === e.id), s = c.contents[u];
|
|
677
|
+
let m;
|
|
678
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
719
679
|
editor: {
|
|
720
|
-
type:
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
680
|
+
$type: o
|
|
681
|
+
},
|
|
682
|
+
name: this.designViewModelField.name,
|
|
683
|
+
require: this.designViewModelField.require,
|
|
684
|
+
readonly: this.designViewModelField.readonly
|
|
685
|
+
}, !1), m = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), m || (m = z("form-group") || {}, m.editor = z(o) || {}, delete m.editor.id, delete m.editor.binding, delete m.editor.appearance), Object.assign(m, {
|
|
686
|
+
id: s.id,
|
|
687
|
+
appearance: s.appearance,
|
|
688
|
+
size: s.size,
|
|
689
|
+
label: s.label,
|
|
690
|
+
binding: s.binding,
|
|
691
|
+
visible: s.visible
|
|
692
|
+
}), Object.assign(m.editor, {
|
|
693
|
+
isTextArea: m.isTextArea && s.isTextArea,
|
|
694
|
+
placeholder: (i = s.editor) == null ? void 0 : i.placeholder,
|
|
695
|
+
holdPlace: (l = s.editor) == null ? void 0 : l.holdPlace,
|
|
696
|
+
readonly: (p = s.editor) == null ? void 0 : p.readonly,
|
|
697
|
+
require: (d = s.editor) == null ? void 0 : d.require
|
|
698
|
+
}), c.contents.splice(u, 1), c.contents.splice(u, 0, m), n.schema = Object.assign(s, m), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
699
|
+
(f) => f.classList.remove("dgComponentSelected")
|
|
700
|
+
), be.value++;
|
|
738
701
|
}
|
|
739
702
|
getComponentConfig(e, t = {}, n = {}) {
|
|
740
|
-
const
|
|
741
|
-
description: "
|
|
742
|
-
title: "
|
|
703
|
+
const o = Object.assign({
|
|
704
|
+
description: "编辑器",
|
|
705
|
+
title: "编辑器",
|
|
743
706
|
type: "input-group",
|
|
744
707
|
$converter: "/converter/property-editor.converter"
|
|
745
708
|
}, t), c = Object.assign({
|
|
@@ -764,10 +727,10 @@ class he extends ge {
|
|
|
764
727
|
type: "string"
|
|
765
728
|
}
|
|
766
729
|
}, n);
|
|
767
|
-
return { ...
|
|
730
|
+
return { ...o, properties: { ...c } };
|
|
768
731
|
}
|
|
769
732
|
}
|
|
770
|
-
class
|
|
733
|
+
class Ce extends we {
|
|
771
734
|
constructor(e, t) {
|
|
772
735
|
super(e, t);
|
|
773
736
|
}
|
|
@@ -802,6 +765,7 @@ class fe extends he {
|
|
|
802
765
|
size: {
|
|
803
766
|
description: "",
|
|
804
767
|
title: "尺寸",
|
|
768
|
+
type: "enum",
|
|
805
769
|
editor: {
|
|
806
770
|
data: [
|
|
807
771
|
{
|
|
@@ -822,114 +786,114 @@ class fe extends he {
|
|
|
822
786
|
});
|
|
823
787
|
}
|
|
824
788
|
}
|
|
825
|
-
function
|
|
826
|
-
|
|
827
|
-
const t =
|
|
828
|
-
function
|
|
789
|
+
function ke(r, e) {
|
|
790
|
+
r.schema;
|
|
791
|
+
const t = k(!0), n = k(!0);
|
|
792
|
+
function o(p) {
|
|
829
793
|
return !1;
|
|
830
794
|
}
|
|
831
795
|
function c() {
|
|
832
796
|
return !1;
|
|
833
797
|
}
|
|
834
|
-
function
|
|
798
|
+
function u() {
|
|
835
799
|
return !1;
|
|
836
800
|
}
|
|
837
|
-
function
|
|
801
|
+
function s() {
|
|
838
802
|
return !0;
|
|
839
803
|
}
|
|
840
|
-
function
|
|
804
|
+
function m(p) {
|
|
841
805
|
}
|
|
842
|
-
function
|
|
806
|
+
function i() {
|
|
843
807
|
}
|
|
844
808
|
function l(p) {
|
|
845
809
|
return null;
|
|
846
810
|
}
|
|
847
811
|
return {
|
|
848
|
-
canAccepts:
|
|
812
|
+
canAccepts: o,
|
|
849
813
|
checkCanDeleteComponent: c,
|
|
850
|
-
checkCanMoveComponent:
|
|
851
|
-
hideNestedPaddingInDesginerView:
|
|
852
|
-
onAcceptMovedChildElement:
|
|
853
|
-
resolveComponentContext:
|
|
814
|
+
checkCanMoveComponent: u,
|
|
815
|
+
hideNestedPaddingInDesginerView: s,
|
|
816
|
+
onAcceptMovedChildElement: m,
|
|
817
|
+
resolveComponentContext: i,
|
|
854
818
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
855
819
|
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
856
820
|
getPropsConfig: l
|
|
857
821
|
};
|
|
858
822
|
}
|
|
859
|
-
function
|
|
823
|
+
function Me(r, e) {
|
|
860
824
|
const {
|
|
861
825
|
canAccepts: t,
|
|
862
826
|
checkCanDeleteComponent: n,
|
|
863
|
-
checkCanMoveComponent:
|
|
827
|
+
checkCanMoveComponent: o,
|
|
864
828
|
hideNestedPaddingInDesginerView: c,
|
|
865
|
-
onAcceptMovedChildElement:
|
|
866
|
-
resolveComponentContext:
|
|
867
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
868
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
869
|
-
} =
|
|
870
|
-
function p(
|
|
871
|
-
return new
|
|
829
|
+
onAcceptMovedChildElement: u,
|
|
830
|
+
resolveComponentContext: s,
|
|
831
|
+
triggerBelongedComponentToMoveWhenMoved: m,
|
|
832
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
833
|
+
} = ke(r), l = r.schema;
|
|
834
|
+
function p(d, f) {
|
|
835
|
+
return new Ce(d, e).getPropertyConfig(l, f);
|
|
872
836
|
}
|
|
873
837
|
return {
|
|
874
838
|
canAccepts: t,
|
|
875
839
|
checkCanDeleteComponent: n,
|
|
876
|
-
checkCanMoveComponent:
|
|
840
|
+
checkCanMoveComponent: o,
|
|
877
841
|
hideNestedPaddingInDesginerView: c,
|
|
878
|
-
onAcceptMovedChildElement:
|
|
879
|
-
resolveComponentContext:
|
|
880
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
881
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
842
|
+
onAcceptMovedChildElement: u,
|
|
843
|
+
resolveComponentContext: s,
|
|
844
|
+
triggerBelongedComponentToMoveWhenMoved: m,
|
|
845
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
882
846
|
getPropsConfig: p
|
|
883
847
|
};
|
|
884
848
|
}
|
|
885
|
-
const
|
|
849
|
+
const Te = /* @__PURE__ */ G({
|
|
886
850
|
name: "FSwitchDesign",
|
|
887
|
-
props:
|
|
851
|
+
props: U,
|
|
888
852
|
emits: ["update:modelValue"],
|
|
889
|
-
setup(
|
|
853
|
+
setup(r, e) {
|
|
890
854
|
const {
|
|
891
855
|
size: t,
|
|
892
856
|
onLabel: n,
|
|
893
|
-
offLabel:
|
|
894
|
-
} =
|
|
895
|
-
|
|
896
|
-
c.value.componentInstance =
|
|
897
|
-
}), e.expose(
|
|
898
|
-
const l =
|
|
857
|
+
offLabel: o
|
|
858
|
+
} = L(r), c = k(), u = q("designer-host-service"), s = q("design-item-context"), m = Me(s, u), i = ge(c, s, m);
|
|
859
|
+
x(() => {
|
|
860
|
+
c.value.componentInstance = i;
|
|
861
|
+
}), e.expose(i.value);
|
|
862
|
+
const l = B(() => ({
|
|
899
863
|
switch: !0,
|
|
900
864
|
"f-cmp-switch": !0,
|
|
901
865
|
checked: !1,
|
|
902
866
|
"switch-large": t.value === "large",
|
|
903
867
|
"switch-medium": t.value === "medium",
|
|
904
868
|
"switch-small": t.value === "small"
|
|
905
|
-
})), p =
|
|
906
|
-
return () =>
|
|
869
|
+
})), p = B(() => (n == null ? void 0 : n.value) || (o == null ? void 0 : o.value));
|
|
870
|
+
return () => C("span", {
|
|
907
871
|
ref: c,
|
|
908
872
|
tabindex: "0",
|
|
909
873
|
role: "button",
|
|
910
874
|
class: l.value
|
|
911
|
-
}, [p.value &&
|
|
875
|
+
}, [p.value && C("span", {
|
|
912
876
|
class: "switch-pane"
|
|
913
|
-
}, [
|
|
877
|
+
}, [C("span", {
|
|
914
878
|
class: "switch-label-unchecked"
|
|
915
|
-
}, [
|
|
879
|
+
}, [o == null ? void 0 : o.value])]), C("small", null, [e.slots.default && e.slots.default()])]);
|
|
916
880
|
}
|
|
917
|
-
}),
|
|
918
|
-
const e =
|
|
881
|
+
}), Se = (r) => {
|
|
882
|
+
const e = r;
|
|
919
883
|
return e.install = function(t) {
|
|
920
|
-
t.component(e.name,
|
|
921
|
-
},
|
|
884
|
+
t.component(e.name, r);
|
|
885
|
+
}, r;
|
|
922
886
|
};
|
|
923
|
-
|
|
924
|
-
|
|
887
|
+
F.register = (r, e, t, n) => {
|
|
888
|
+
r.switch = F, e.switch = X;
|
|
925
889
|
};
|
|
926
|
-
|
|
927
|
-
|
|
890
|
+
F.registerDesigner = (r, e, t) => {
|
|
891
|
+
r.switch = Te, e.switch = X;
|
|
928
892
|
};
|
|
929
|
-
const
|
|
893
|
+
const Fe = Se(F);
|
|
930
894
|
export {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
895
|
+
F as FSwitch,
|
|
896
|
+
Fe as default,
|
|
897
|
+
X as propsResolver,
|
|
898
|
+
U as switchProps
|
|
935
899
|
};
|