@farris/ui-vue 1.2.7 → 1.2.8
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 +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- 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.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- 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-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- 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/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- 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
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,106 +1,105 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 b = (r, e, t) => H(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as G, toRefs as L, ref as C, computed as S, watch as W, createVNode as w, 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 N(r) {
|
|
9
|
+
const { properties: e, title: t } = r, n = Object.keys(e).reduce((o, s) => (o[s] = e[s].type === "object" && e[s].properties ? N(e[s]) : I(e[s].default), o), {});
|
|
9
10
|
return n.id = `${t}-${Date.now()}`, n;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
const t =
|
|
12
|
+
function A(r, e = {}) {
|
|
13
|
+
const t = J[r];
|
|
13
14
|
if (t) {
|
|
14
|
-
let n =
|
|
15
|
-
const
|
|
16
|
-
return n =
|
|
15
|
+
let n = N(t);
|
|
16
|
+
const o = Q[r];
|
|
17
|
+
return n = o ? o({ getSchemaByType: A }, n, e) : n, n;
|
|
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 = N(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
|
|
28
|
-
if (typeof
|
|
29
|
-
n[
|
|
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 s = e.get(o);
|
|
29
|
+
if (typeof s == "string")
|
|
30
|
+
n[s] = r[o];
|
|
30
31
|
else {
|
|
31
|
-
const m =
|
|
32
|
+
const m = s(o, r[o], r);
|
|
32
33
|
Object.assign(n, m);
|
|
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(
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
44
|
+
function te(r = {}) {
|
|
45
|
+
function e(i, l, c, u) {
|
|
46
|
+
if (typeof c == "number")
|
|
47
|
+
return u[i].length === c;
|
|
48
|
+
if (typeof c == "object") {
|
|
49
|
+
const f = Object.keys(c)[0], g = c[f];
|
|
50
|
+
if (f === "not")
|
|
51
|
+
return Number(u[i].length) !== Number(g);
|
|
52
|
+
if (f === "moreThan")
|
|
53
|
+
return Number(u[i].length) >= Number(g);
|
|
54
|
+
if (f === "lessThan")
|
|
55
|
+
return Number(u[i].length) <= Number(g);
|
|
55
56
|
}
|
|
56
57
|
return !1;
|
|
57
58
|
}
|
|
58
|
-
function t(
|
|
59
|
-
return
|
|
59
|
+
function t(i, l, c, u) {
|
|
60
|
+
return u[i] && u[i].propertyValue && String(u[i].propertyValue.value) === String(c);
|
|
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
|
|
68
|
-
return typeof l == "number" ? [{ target:
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const
|
|
72
|
-
return { target:
|
|
66
|
+
Object.keys(r).reduce((i, l) => (i.set(l, r[l]), i), n);
|
|
67
|
+
function o(i, l) {
|
|
68
|
+
const c = i;
|
|
69
|
+
return typeof l == "number" ? [{ target: c, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: c, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
|
|
70
|
+
if (u === "length")
|
|
71
|
+
return { target: c, operator: "length", param: null, value: l[u] };
|
|
72
|
+
const f = u, g = l[u];
|
|
73
|
+
return { target: c, operator: "getProperty", param: f, value: g };
|
|
73
74
|
}) : [];
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const
|
|
78
|
-
return
|
|
76
|
+
function s(i) {
|
|
77
|
+
return Object.keys(i).reduce((c, u) => {
|
|
78
|
+
const f = o(u, i[u]);
|
|
79
|
+
return c.push(...f), c;
|
|
79
80
|
}, []);
|
|
80
81
|
}
|
|
81
|
-
function m(
|
|
82
|
-
if (n.has(
|
|
83
|
-
const
|
|
84
|
-
return
|
|
82
|
+
function m(i, l) {
|
|
83
|
+
if (n.has(i.operator)) {
|
|
84
|
+
const c = n.get(i.operator);
|
|
85
|
+
return c && c(i.target, i.param, i.value, l) || !1;
|
|
85
86
|
}
|
|
86
87
|
return !1;
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
89
|
+
function p(i, l) {
|
|
90
|
+
return s(i).reduce((f, g) => f && m(g, l), !0);
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return
|
|
92
|
+
function d(i, l) {
|
|
93
|
+
const c = Object.keys(i), u = c.includes("allOf"), f = c.includes("anyOf"), g = u || f, M = (g ? i[g ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((E) => p(E, l));
|
|
94
|
+
return u ? !M.includes(!1) : M.includes(!0);
|
|
94
95
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
96
|
+
return { parseValueSchema: d };
|
|
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 = (m, p, d) => p, o = {}, s = (m) => m) {
|
|
139
|
+
return J[e.title] = e, Q[e.title] = n, ne[e.title] = o, oe[e.title] = s, (m = {}) => {
|
|
140
|
+
const p = ee(m, e, t), d = Object.keys(r).reduce((i, l) => (i[l] = r[l].default, i), {});
|
|
141
|
+
return Object.assign(d, p);
|
|
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"
|
|
@@ -290,22 +218,22 @@ const re = /* @__PURE__ */ new Map([
|
|
|
290
218
|
type: "enum",
|
|
291
219
|
default: "medium"
|
|
292
220
|
}
|
|
293
|
-
},
|
|
221
|
+
}, me = [
|
|
294
222
|
"id",
|
|
295
223
|
"type"
|
|
296
|
-
],
|
|
297
|
-
$schema:
|
|
298
|
-
$id:
|
|
299
|
-
title:
|
|
300
|
-
description:
|
|
301
|
-
type:
|
|
302
|
-
properties:
|
|
303
|
-
required:
|
|
224
|
+
], ye = {
|
|
225
|
+
$schema: le,
|
|
226
|
+
$id: se,
|
|
227
|
+
title: ce,
|
|
228
|
+
description: pe,
|
|
229
|
+
type: ue,
|
|
230
|
+
properties: de,
|
|
231
|
+
required: me
|
|
304
232
|
};
|
|
305
|
-
function
|
|
233
|
+
function fe(r, e, t) {
|
|
306
234
|
return e;
|
|
307
235
|
}
|
|
308
|
-
const
|
|
236
|
+
const $ = {
|
|
309
237
|
/** 组件值*/
|
|
310
238
|
modelValue: { type: Boolean, default: !1 },
|
|
311
239
|
/** 禁用 */
|
|
@@ -321,21 +249,21 @@ const E = {
|
|
|
321
249
|
/** 开关值变化事件 */
|
|
322
250
|
onModelValueChanged: { type: Function, default: () => {
|
|
323
251
|
} }
|
|
324
|
-
},
|
|
252
|
+
}, X = re($, ye, ae, fe), D = /* @__PURE__ */ G({
|
|
325
253
|
name: "FSwitch",
|
|
326
|
-
props:
|
|
254
|
+
props: $,
|
|
327
255
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
328
|
-
setup(
|
|
256
|
+
setup(r, e) {
|
|
329
257
|
const {
|
|
330
258
|
disabled: t,
|
|
331
259
|
size: n,
|
|
332
|
-
onLabel:
|
|
333
|
-
offLabel:
|
|
260
|
+
onLabel: o,
|
|
261
|
+
offLabel: s,
|
|
334
262
|
onBackground: m,
|
|
335
|
-
offBackground:
|
|
336
|
-
onColor:
|
|
337
|
-
offColor:
|
|
338
|
-
} =
|
|
263
|
+
offBackground: p,
|
|
264
|
+
onColor: d,
|
|
265
|
+
offColor: i
|
|
266
|
+
} = L(r), l = C(r.modelValue), c = S(() => ({
|
|
339
267
|
switch: !0,
|
|
340
268
|
"f-cmp-switch": !0,
|
|
341
269
|
checked: l.value,
|
|
@@ -343,234 +271,296 @@ const E = {
|
|
|
343
271
|
"switch-large": n.value === "large",
|
|
344
272
|
"switch-medium": n.value === "medium",
|
|
345
273
|
"switch-small": n.value === "small"
|
|
346
|
-
})),
|
|
274
|
+
})), u = S(() => l.value ? {
|
|
347
275
|
outline: "none",
|
|
348
276
|
background: m.value
|
|
349
277
|
} : {
|
|
350
278
|
outline: "none",
|
|
351
|
-
backgroundColor:
|
|
352
|
-
}),
|
|
353
|
-
background:
|
|
279
|
+
backgroundColor: p.value
|
|
280
|
+
}), f = S(() => l.value ? {
|
|
281
|
+
background: d.value
|
|
354
282
|
} : {
|
|
355
|
-
backgroundColor:
|
|
356
|
-
}),
|
|
357
|
-
function
|
|
283
|
+
backgroundColor: i.value
|
|
284
|
+
}), g = S(() => (o == null ? void 0 : o.value) || (s == null ? void 0 : s.value));
|
|
285
|
+
function V() {
|
|
358
286
|
t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
|
|
359
287
|
}
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
}),
|
|
363
|
-
|
|
364
|
-
}), () =>
|
|
288
|
+
return W(l, (k, M) => {
|
|
289
|
+
k !== M && e.emit("modelValueChanged", k);
|
|
290
|
+
}), W(() => r.modelValue, (k, M) => {
|
|
291
|
+
k !== M && (l.value = k);
|
|
292
|
+
}), () => w("span", {
|
|
365
293
|
tabindex: "0",
|
|
366
294
|
role: "button",
|
|
367
|
-
class:
|
|
368
|
-
style:
|
|
369
|
-
onClick:
|
|
370
|
-
}, [
|
|
295
|
+
class: c.value,
|
|
296
|
+
style: u.value,
|
|
297
|
+
onClick: V
|
|
298
|
+
}, [g.value && w("span", {
|
|
371
299
|
class: "switch-pane"
|
|
372
|
-
}, [
|
|
300
|
+
}, [w("span", {
|
|
373
301
|
class: "switch-label-checked"
|
|
374
|
-
}, [
|
|
302
|
+
}, [o == null ? void 0 : o.value]), w("span", {
|
|
375
303
|
class: "switch-label-unchecked"
|
|
376
|
-
}, [
|
|
377
|
-
style:
|
|
304
|
+
}, [s == null ? void 0 : s.value])]), w("small", {
|
|
305
|
+
style: f.value
|
|
378
306
|
}, [e.slots.default && e.slots.default()])]);
|
|
379
307
|
}
|
|
380
308
|
});
|
|
381
|
-
function
|
|
382
|
-
var
|
|
309
|
+
function he(r, e, t) {
|
|
310
|
+
var O;
|
|
383
311
|
function n() {
|
|
384
312
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
385
313
|
}
|
|
386
314
|
n();
|
|
387
|
-
const
|
|
388
|
-
function
|
|
315
|
+
const o = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", m = C();
|
|
316
|
+
function p() {
|
|
389
317
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
390
318
|
}
|
|
391
|
-
function
|
|
319
|
+
function d() {
|
|
392
320
|
return !1;
|
|
393
321
|
}
|
|
394
|
-
function
|
|
322
|
+
function i() {
|
|
395
323
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
396
324
|
}
|
|
397
325
|
function l() {
|
|
398
326
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
399
327
|
}
|
|
400
|
-
function
|
|
401
|
-
if (!
|
|
328
|
+
function c(y) {
|
|
329
|
+
if (!y || !y.value)
|
|
402
330
|
return null;
|
|
403
|
-
if (
|
|
404
|
-
return
|
|
405
|
-
const v =
|
|
406
|
-
return
|
|
331
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
332
|
+
return y.value;
|
|
333
|
+
const v = C(y == null ? void 0 : y.value.parent), h = c(v);
|
|
334
|
+
return h || null;
|
|
407
335
|
}
|
|
408
|
-
function
|
|
409
|
-
const { componentInstance: v, designerItemElementRef:
|
|
410
|
-
return !v || !v.value ? null : v.value.canMove ?
|
|
336
|
+
function u(y = e) {
|
|
337
|
+
const { componentInstance: v, designerItemElementRef: h } = y;
|
|
338
|
+
return !v || !v.value ? null : v.value.canMove ? h : u(y.parent);
|
|
411
339
|
}
|
|
412
|
-
function
|
|
413
|
-
return !!t && t.canAccepts(
|
|
340
|
+
function f(y) {
|
|
341
|
+
return !!t && t.canAccepts(y);
|
|
414
342
|
}
|
|
415
|
-
function
|
|
343
|
+
function g() {
|
|
416
344
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
417
345
|
}
|
|
418
|
-
function
|
|
346
|
+
function V() {
|
|
419
347
|
}
|
|
420
|
-
function
|
|
348
|
+
function k(y, v) {
|
|
421
349
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
422
350
|
}
|
|
423
|
-
function
|
|
424
|
-
const { componentType: v } =
|
|
425
|
-
let
|
|
426
|
-
t && t.onResolveNewComponentSchema && (
|
|
427
|
-
const
|
|
428
|
-
return
|
|
351
|
+
function M(y) {
|
|
352
|
+
const { componentType: v } = y;
|
|
353
|
+
let h = A(v, y);
|
|
354
|
+
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(y, h));
|
|
355
|
+
const P = v.toLowerCase().replace("-", "_");
|
|
356
|
+
return h && !h.id && h.type === v && (h.id = `${P}_${Math.random().toString().slice(2, 6)}`), h;
|
|
429
357
|
}
|
|
430
|
-
function
|
|
431
|
-
const
|
|
432
|
-
|
|
433
|
-
let
|
|
434
|
-
t && t.onAcceptNewChildElement && (
|
|
435
|
-
const
|
|
436
|
-
return
|
|
358
|
+
function j(y, v) {
|
|
359
|
+
const h = String(y.getAttribute("data-controltype")), P = y.getAttribute("data-feature"), U = P ? JSON.parse(P) : {};
|
|
360
|
+
U.parentComponentInstance = m.value;
|
|
361
|
+
let T = A(h, U);
|
|
362
|
+
t && t.onAcceptNewChildElement && (T = t.onAcceptNewChildElement(y, v, T));
|
|
363
|
+
const Z = h.toLowerCase().replace("-", "_");
|
|
364
|
+
return T && !T.id && T.type === h && (T.id = `${Z}_${Math.random().toString().slice(2, 6)}`), T;
|
|
437
365
|
}
|
|
438
|
-
function
|
|
366
|
+
function E(y) {
|
|
439
367
|
}
|
|
440
|
-
function
|
|
368
|
+
function Y(...y) {
|
|
441
369
|
if (t && t.getPropsConfig)
|
|
442
|
-
return t.getPropsConfig(...
|
|
370
|
+
return t.getPropsConfig(...y);
|
|
443
371
|
}
|
|
444
372
|
return m.value = {
|
|
445
|
-
canMove:
|
|
446
|
-
canSelectParent:
|
|
447
|
-
canDelete:
|
|
373
|
+
canMove: p(),
|
|
374
|
+
canSelectParent: d(),
|
|
375
|
+
canDelete: i(),
|
|
448
376
|
canNested: !l(),
|
|
449
377
|
contents: e == null ? void 0 : e.schema.contents,
|
|
450
|
-
elementRef:
|
|
451
|
-
parent: (
|
|
378
|
+
elementRef: r,
|
|
379
|
+
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
452
380
|
schema: e == null ? void 0 : e.schema,
|
|
453
|
-
styles:
|
|
454
|
-
designerClass:
|
|
455
|
-
canAccepts:
|
|
456
|
-
getBelongedComponentInstance:
|
|
457
|
-
getDraggableDesignItemElement:
|
|
458
|
-
getDraggingDisplayText:
|
|
459
|
-
getPropConfig:
|
|
460
|
-
getDragScopeElement:
|
|
461
|
-
onAcceptMovedChildElement:
|
|
462
|
-
onAcceptNewChildElement:
|
|
463
|
-
onChildElementMovedOut:
|
|
464
|
-
addNewChildComponentSchema:
|
|
381
|
+
styles: o,
|
|
382
|
+
designerClass: s,
|
|
383
|
+
canAccepts: f,
|
|
384
|
+
getBelongedComponentInstance: c,
|
|
385
|
+
getDraggableDesignItemElement: u,
|
|
386
|
+
getDraggingDisplayText: g,
|
|
387
|
+
getPropConfig: Y,
|
|
388
|
+
getDragScopeElement: V,
|
|
389
|
+
onAcceptMovedChildElement: k,
|
|
390
|
+
onAcceptNewChildElement: j,
|
|
391
|
+
onChildElementMovedOut: E,
|
|
392
|
+
addNewChildComponentSchema: M,
|
|
465
393
|
updateDragAndDropRules: n,
|
|
466
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
467
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
394
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
395
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
468
396
|
}, m;
|
|
469
397
|
}
|
|
470
|
-
class
|
|
398
|
+
class ge {
|
|
399
|
+
constructor(e, t) {
|
|
400
|
+
b(this, "componentId");
|
|
401
|
+
b(this, "viewModelId");
|
|
402
|
+
b(this, "eventsEditorUtils");
|
|
403
|
+
b(this, "formSchemaUtils");
|
|
404
|
+
b(this, "formMetadataConverter");
|
|
405
|
+
b(this, "designViewModelUtils");
|
|
406
|
+
b(this, "designViewModelField");
|
|
407
|
+
b(this, "controlCreatorUtils");
|
|
408
|
+
b(this, "designerHostService");
|
|
409
|
+
b(this, "schemaService", null);
|
|
410
|
+
b(this, "metadataService", null);
|
|
411
|
+
b(this, "propertyConfig", {
|
|
412
|
+
type: "object",
|
|
413
|
+
categories: {}
|
|
414
|
+
});
|
|
415
|
+
var n;
|
|
416
|
+
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;
|
|
417
|
+
}
|
|
418
|
+
getTableInfo() {
|
|
419
|
+
var e;
|
|
420
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
421
|
+
}
|
|
422
|
+
setDesignViewModelField(e) {
|
|
423
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
424
|
+
if (t) {
|
|
425
|
+
if (!this.designViewModelField) {
|
|
426
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
427
|
+
this.designViewModelField = n.fields.find((o) => o.id === t);
|
|
428
|
+
}
|
|
429
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
changeFieldEditorType(e, t) {
|
|
433
|
+
}
|
|
434
|
+
getBasicPropConfig(e) {
|
|
435
|
+
return {
|
|
436
|
+
description: "Basic Information",
|
|
437
|
+
title: "基本信息",
|
|
438
|
+
properties: {
|
|
439
|
+
id: {
|
|
440
|
+
description: "组件标识",
|
|
441
|
+
title: "标识",
|
|
442
|
+
type: "string",
|
|
443
|
+
readonly: !0
|
|
444
|
+
},
|
|
445
|
+
type: {
|
|
446
|
+
description: "组件类型",
|
|
447
|
+
title: "控件类型",
|
|
448
|
+
type: "select",
|
|
449
|
+
editor: {
|
|
450
|
+
type: "combo-list",
|
|
451
|
+
textField: "name",
|
|
452
|
+
valueField: "value",
|
|
453
|
+
data: [{ value: e.type, name: a[e.type].name }]
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
getAppearanceConfig(e = null) {
|
|
460
|
+
return {
|
|
461
|
+
title: "样式",
|
|
462
|
+
description: "Appearance",
|
|
463
|
+
properties: {
|
|
464
|
+
class: {
|
|
465
|
+
title: "class样式",
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "组件的CSS样式",
|
|
468
|
+
$converter: "/converter/appearance.converter"
|
|
469
|
+
},
|
|
470
|
+
style: {
|
|
471
|
+
title: "style样式",
|
|
472
|
+
type: "string",
|
|
473
|
+
description: "组件的样式",
|
|
474
|
+
$converter: "/converter/appearance.converter"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
const B = class B {
|
|
481
|
+
/**
|
|
482
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
483
|
+
*/
|
|
471
484
|
static getEditorTypesByMDataType(e) {
|
|
472
|
-
const t =
|
|
485
|
+
const t = B.fieldControlTypeMapping[e];
|
|
473
486
|
return t || [{ key: "", value: "" }];
|
|
474
487
|
}
|
|
475
|
-
|
|
488
|
+
/**
|
|
489
|
+
* 获取所有输入类控件
|
|
490
|
+
*/
|
|
491
|
+
static getAllInputTypes() {
|
|
492
|
+
const e = [];
|
|
493
|
+
for (let t in B.fieldControlTypeMapping)
|
|
494
|
+
B.fieldControlTypeMapping[t].forEach((n) => {
|
|
495
|
+
e.find((o) => o.key === n.key && o.value === n.value) || e.push({ key: n.key, value: n.value });
|
|
496
|
+
});
|
|
497
|
+
return e;
|
|
498
|
+
}
|
|
499
|
+
};
|
|
476
500
|
/**
|
|
477
501
|
* <字段类型,可配置的控件类型列表>的映射
|
|
478
502
|
*/
|
|
479
|
-
|
|
503
|
+
b(B, "fieldControlTypeMapping", {
|
|
480
504
|
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 },
|
|
505
|
+
{ key: a["input-group"].type, value: a["input-group"].name },
|
|
506
|
+
{ key: a.lookup.type, value: a.lookup.name },
|
|
507
|
+
{ key: a["date-picker"].type, value: a["date-picker"].name },
|
|
508
|
+
{ key: a["check-box"].type, value: a["check-box"].name },
|
|
509
|
+
{ key: a["radio-group"].type, value: a["radio-group"].name },
|
|
510
|
+
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
511
|
+
{ key: a.textarea.type, value: a.textarea.name }
|
|
490
512
|
],
|
|
491
513
|
Text: [
|
|
492
|
-
{ key:
|
|
493
|
-
{ key:
|
|
494
|
-
{ key: i.lookup.type, value: i.lookup.name }
|
|
514
|
+
{ key: a.textarea.type, value: a.textarea.name },
|
|
515
|
+
{ key: a.lookup.type, value: a.lookup.name }
|
|
495
516
|
],
|
|
496
517
|
Decimal: [
|
|
497
|
-
{ key:
|
|
518
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
498
519
|
],
|
|
499
520
|
Integer: [
|
|
500
|
-
{ key:
|
|
521
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
501
522
|
],
|
|
502
523
|
Number: [
|
|
503
|
-
{ key:
|
|
524
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
504
525
|
],
|
|
505
526
|
BigNumber: [
|
|
506
|
-
{ key:
|
|
527
|
+
{ key: a["number-spinner"].type, value: a["number-spinner"].name }
|
|
507
528
|
],
|
|
508
529
|
Date: [
|
|
509
|
-
{ key:
|
|
530
|
+
{ key: a["date-picker"].type, value: a["date-picker"].name }
|
|
510
531
|
],
|
|
511
532
|
DateTime: [
|
|
512
|
-
{ key:
|
|
533
|
+
{ key: a["date-picker"].type, value: a["date-picker"].name }
|
|
513
534
|
],
|
|
514
535
|
Boolean: [
|
|
515
|
-
{ key:
|
|
516
|
-
{ key:
|
|
536
|
+
{ key: a.switch.type, value: a.switch.name },
|
|
537
|
+
{ key: a["check-box"].type, value: a["check-box"].name }
|
|
517
538
|
],
|
|
518
539
|
Enum: [
|
|
519
|
-
{ key:
|
|
520
|
-
{ key:
|
|
540
|
+
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
541
|
+
{ key: a["radio-group"].type, value: a["radio-group"].name }
|
|
521
542
|
],
|
|
522
543
|
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 }
|
|
544
|
+
{ key: a.lookup.type, value: a.lookup.name },
|
|
545
|
+
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
546
|
+
{ key: a["radio-group"].type, value: a["radio-group"].name }
|
|
532
547
|
]
|
|
533
548
|
});
|
|
534
|
-
|
|
549
|
+
let F = B;
|
|
550
|
+
const ve = C(0);
|
|
551
|
+
class be extends ge {
|
|
535
552
|
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
|
-
}
|
|
553
|
+
super(e, t);
|
|
567
554
|
}
|
|
568
|
-
|
|
555
|
+
getPropertyConfig(e, t) {
|
|
556
|
+
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
557
|
}
|
|
570
|
-
|
|
571
|
-
var
|
|
572
|
-
var
|
|
573
|
-
|
|
558
|
+
getBasicProperties(e, t) {
|
|
559
|
+
var m;
|
|
560
|
+
var n = this;
|
|
561
|
+
this.setDesignViewModelField(e);
|
|
562
|
+
const o = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
563
|
+
return {
|
|
574
564
|
description: "Basic Information",
|
|
575
565
|
title: "基本信息",
|
|
576
566
|
properties: {
|
|
@@ -590,63 +580,48 @@ class ge {
|
|
|
590
580
|
type: "combo-list",
|
|
591
581
|
textField: "value",
|
|
592
582
|
valueField: "key",
|
|
593
|
-
|
|
594
|
-
|
|
583
|
+
editable: !1,
|
|
584
|
+
data: n.designViewModelField ? F.getEditorTypesByMDataType((m = n.designViewModelField.type) == null ? void 0 : m.name) : F.getAllInputTypes()
|
|
595
585
|
}
|
|
596
586
|
},
|
|
597
587
|
label: {
|
|
598
588
|
title: "标签",
|
|
599
589
|
type: "string",
|
|
600
590
|
$converter: "/converter/form-group-label.converter"
|
|
591
|
+
},
|
|
592
|
+
binding: {
|
|
593
|
+
description: "绑定的表单字段",
|
|
594
|
+
title: "绑定",
|
|
595
|
+
$converter: "/converter/field-selector.converter",
|
|
596
|
+
editor: {
|
|
597
|
+
type: "field-selector",
|
|
598
|
+
bindingType: { enable: !1 },
|
|
599
|
+
editorParams: {
|
|
600
|
+
propertyData: e,
|
|
601
|
+
formBasicInfo: o
|
|
602
|
+
},
|
|
603
|
+
columns: [
|
|
604
|
+
{ field: "name", title: "字段名称" },
|
|
605
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
606
|
+
{ field: "fieldType", title: "字段类型" }
|
|
607
|
+
],
|
|
608
|
+
textField: "bindingField",
|
|
609
|
+
data: s
|
|
610
|
+
}
|
|
601
611
|
}
|
|
602
612
|
},
|
|
603
|
-
setPropertyRelates(
|
|
604
|
-
if (
|
|
605
|
-
switch (
|
|
613
|
+
setPropertyRelates(p, d) {
|
|
614
|
+
if (p)
|
|
615
|
+
switch (p && p.propertyID) {
|
|
606
616
|
case "type": {
|
|
607
|
-
|
|
617
|
+
n.changeControlType(e, p, t);
|
|
608
618
|
break;
|
|
609
619
|
}
|
|
610
620
|
}
|
|
611
621
|
}
|
|
612
622
|
};
|
|
613
623
|
}
|
|
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) {
|
|
624
|
+
getAppearanceProperties(e) {
|
|
650
625
|
return {
|
|
651
626
|
title: "样式",
|
|
652
627
|
description: "Appearance",
|
|
@@ -676,73 +651,52 @@ class ge {
|
|
|
676
651
|
}
|
|
677
652
|
};
|
|
678
653
|
}
|
|
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
654
|
getEditorProperties(e) {
|
|
708
655
|
return this.getComponentConfig(e);
|
|
709
656
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
657
|
+
/**
|
|
658
|
+
* 卡片控件:切换控件类型后事件
|
|
659
|
+
* @param propertyData 控件DOM属性
|
|
660
|
+
* @param newControlType 新控件类型
|
|
661
|
+
*/
|
|
662
|
+
changeControlType(e, t, n) {
|
|
663
|
+
var i, l, c, u;
|
|
664
|
+
const o = t.propertyValue, s = n && n.parent && n.parent.schema;
|
|
665
|
+
if (!s)
|
|
666
|
+
return;
|
|
667
|
+
const m = s.contents.findIndex((f) => f.id === e.id), p = s.contents[m];
|
|
668
|
+
let d;
|
|
669
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
719
670
|
editor: {
|
|
720
|
-
type:
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
671
|
+
$type: o
|
|
672
|
+
},
|
|
673
|
+
name: this.designViewModelField.name,
|
|
674
|
+
require: this.designViewModelField.require,
|
|
675
|
+
readonly: this.designViewModelField.readonly
|
|
676
|
+
}, !1), d = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), d || (d = z("form-group") || {}, d.editor = z(o) || {}, delete d.editor.id, delete d.editor.binding, delete d.editor.appearance), Object.assign(d, {
|
|
677
|
+
id: p.id,
|
|
678
|
+
appearance: p.appearance,
|
|
679
|
+
size: p.size,
|
|
680
|
+
label: p.label,
|
|
681
|
+
binding: p.binding,
|
|
682
|
+
visible: p.visible
|
|
683
|
+
}), Object.assign(d.editor, {
|
|
684
|
+
isTextArea: d.isTextArea && p.isTextArea,
|
|
685
|
+
placeholder: (i = p.editor) == null ? void 0 : i.placeholder,
|
|
686
|
+
holdPlace: (l = p.editor) == null ? void 0 : l.holdPlace,
|
|
687
|
+
readonly: (c = p.editor) == null ? void 0 : c.readonly,
|
|
688
|
+
require: (u = p.editor) == null ? void 0 : u.require
|
|
689
|
+
}), s.contents.splice(m, 1), s.contents.splice(m, 0, d), n.schema = Object.assign(p, d), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
690
|
+
(f) => f.classList.remove("dgComponentSelected")
|
|
691
|
+
), ve.value++;
|
|
738
692
|
}
|
|
739
693
|
getComponentConfig(e, t = {}, n = {}) {
|
|
740
|
-
const
|
|
694
|
+
const o = Object.assign({
|
|
741
695
|
description: "组件信息",
|
|
742
696
|
title: "组件信息",
|
|
743
697
|
type: "input-group",
|
|
744
698
|
$converter: "/converter/property-editor.converter"
|
|
745
|
-
}, t),
|
|
699
|
+
}, t), s = Object.assign({
|
|
746
700
|
readonly: {
|
|
747
701
|
description: "",
|
|
748
702
|
title: "只读",
|
|
@@ -764,10 +718,10 @@ class he extends ge {
|
|
|
764
718
|
type: "string"
|
|
765
719
|
}
|
|
766
720
|
}, n);
|
|
767
|
-
return { ...
|
|
721
|
+
return { ...o, properties: { ...s } };
|
|
768
722
|
}
|
|
769
723
|
}
|
|
770
|
-
class
|
|
724
|
+
class we extends be {
|
|
771
725
|
constructor(e, t) {
|
|
772
726
|
super(e, t);
|
|
773
727
|
}
|
|
@@ -822,114 +776,114 @@ class fe extends he {
|
|
|
822
776
|
});
|
|
823
777
|
}
|
|
824
778
|
}
|
|
825
|
-
function
|
|
826
|
-
|
|
827
|
-
const t =
|
|
828
|
-
function
|
|
779
|
+
function Ce(r, e) {
|
|
780
|
+
r.schema;
|
|
781
|
+
const t = C(!0), n = C(!0);
|
|
782
|
+
function o(c) {
|
|
829
783
|
return !1;
|
|
830
784
|
}
|
|
831
|
-
function
|
|
785
|
+
function s() {
|
|
832
786
|
return !1;
|
|
833
787
|
}
|
|
834
788
|
function m() {
|
|
835
789
|
return !1;
|
|
836
790
|
}
|
|
837
|
-
function
|
|
791
|
+
function p() {
|
|
838
792
|
return !0;
|
|
839
793
|
}
|
|
840
|
-
function
|
|
794
|
+
function d(c) {
|
|
841
795
|
}
|
|
842
|
-
function
|
|
796
|
+
function i() {
|
|
843
797
|
}
|
|
844
|
-
function l(
|
|
798
|
+
function l(c) {
|
|
845
799
|
return null;
|
|
846
800
|
}
|
|
847
801
|
return {
|
|
848
|
-
canAccepts:
|
|
849
|
-
checkCanDeleteComponent:
|
|
802
|
+
canAccepts: o,
|
|
803
|
+
checkCanDeleteComponent: s,
|
|
850
804
|
checkCanMoveComponent: m,
|
|
851
|
-
hideNestedPaddingInDesginerView:
|
|
852
|
-
onAcceptMovedChildElement:
|
|
853
|
-
resolveComponentContext:
|
|
805
|
+
hideNestedPaddingInDesginerView: p,
|
|
806
|
+
onAcceptMovedChildElement: d,
|
|
807
|
+
resolveComponentContext: i,
|
|
854
808
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
855
809
|
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
856
810
|
getPropsConfig: l
|
|
857
811
|
};
|
|
858
812
|
}
|
|
859
|
-
function
|
|
813
|
+
function ke(r, e) {
|
|
860
814
|
const {
|
|
861
815
|
canAccepts: t,
|
|
862
816
|
checkCanDeleteComponent: n,
|
|
863
|
-
checkCanMoveComponent:
|
|
864
|
-
hideNestedPaddingInDesginerView:
|
|
817
|
+
checkCanMoveComponent: o,
|
|
818
|
+
hideNestedPaddingInDesginerView: s,
|
|
865
819
|
onAcceptMovedChildElement: m,
|
|
866
|
-
resolveComponentContext:
|
|
867
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
868
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
869
|
-
} =
|
|
870
|
-
function
|
|
871
|
-
return new
|
|
820
|
+
resolveComponentContext: p,
|
|
821
|
+
triggerBelongedComponentToMoveWhenMoved: d,
|
|
822
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
823
|
+
} = Ce(r), l = r.schema;
|
|
824
|
+
function c(u, f) {
|
|
825
|
+
return new we(u, e).getPropertyConfig(l, f);
|
|
872
826
|
}
|
|
873
827
|
return {
|
|
874
828
|
canAccepts: t,
|
|
875
829
|
checkCanDeleteComponent: n,
|
|
876
|
-
checkCanMoveComponent:
|
|
877
|
-
hideNestedPaddingInDesginerView:
|
|
830
|
+
checkCanMoveComponent: o,
|
|
831
|
+
hideNestedPaddingInDesginerView: s,
|
|
878
832
|
onAcceptMovedChildElement: m,
|
|
879
|
-
resolveComponentContext:
|
|
880
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
881
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
882
|
-
getPropsConfig:
|
|
833
|
+
resolveComponentContext: p,
|
|
834
|
+
triggerBelongedComponentToMoveWhenMoved: d,
|
|
835
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
836
|
+
getPropsConfig: c
|
|
883
837
|
};
|
|
884
838
|
}
|
|
885
|
-
const
|
|
839
|
+
const Me = /* @__PURE__ */ G({
|
|
886
840
|
name: "FSwitchDesign",
|
|
887
|
-
props:
|
|
841
|
+
props: $,
|
|
888
842
|
emits: ["update:modelValue"],
|
|
889
|
-
setup(
|
|
843
|
+
setup(r, e) {
|
|
890
844
|
const {
|
|
891
845
|
size: t,
|
|
892
846
|
onLabel: n,
|
|
893
|
-
offLabel:
|
|
894
|
-
} =
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
}), e.expose(
|
|
898
|
-
const l =
|
|
847
|
+
offLabel: o
|
|
848
|
+
} = L(r), s = C(), m = q("designer-host-service"), p = q("design-item-context"), d = ke(p, m), i = he(s, p, d);
|
|
849
|
+
x(() => {
|
|
850
|
+
s.value.componentInstance = i;
|
|
851
|
+
}), e.expose(i.value);
|
|
852
|
+
const l = S(() => ({
|
|
899
853
|
switch: !0,
|
|
900
854
|
"f-cmp-switch": !0,
|
|
901
855
|
checked: !1,
|
|
902
856
|
"switch-large": t.value === "large",
|
|
903
857
|
"switch-medium": t.value === "medium",
|
|
904
858
|
"switch-small": t.value === "small"
|
|
905
|
-
})),
|
|
906
|
-
return () =>
|
|
907
|
-
ref:
|
|
859
|
+
})), c = S(() => (n == null ? void 0 : n.value) || (o == null ? void 0 : o.value));
|
|
860
|
+
return () => w("span", {
|
|
861
|
+
ref: s,
|
|
908
862
|
tabindex: "0",
|
|
909
863
|
role: "button",
|
|
910
864
|
class: l.value
|
|
911
|
-
}, [
|
|
865
|
+
}, [c.value && w("span", {
|
|
912
866
|
class: "switch-pane"
|
|
913
|
-
}, [
|
|
867
|
+
}, [w("span", {
|
|
914
868
|
class: "switch-label-unchecked"
|
|
915
|
-
}, [
|
|
869
|
+
}, [o == null ? void 0 : o.value])]), w("small", null, [e.slots.default && e.slots.default()])]);
|
|
916
870
|
}
|
|
917
|
-
}),
|
|
918
|
-
const e =
|
|
871
|
+
}), Te = (r) => {
|
|
872
|
+
const e = r;
|
|
919
873
|
return e.install = function(t) {
|
|
920
|
-
t.component(e.name,
|
|
921
|
-
},
|
|
874
|
+
t.component(e.name, r);
|
|
875
|
+
}, r;
|
|
922
876
|
};
|
|
923
|
-
|
|
924
|
-
|
|
877
|
+
D.register = (r, e, t, n) => {
|
|
878
|
+
r.switch = D, e.switch = X;
|
|
925
879
|
};
|
|
926
|
-
|
|
927
|
-
|
|
880
|
+
D.registerDesigner = (r, e, t) => {
|
|
881
|
+
r.switch = Me, e.switch = X;
|
|
928
882
|
};
|
|
929
|
-
const
|
|
883
|
+
const De = Te(D);
|
|
930
884
|
export {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
885
|
+
D as FSwitch,
|
|
886
|
+
De as default,
|
|
887
|
+
X as propsResolver,
|
|
888
|
+
$ as switchProps
|
|
935
889
|
};
|