@farris/ui-vue 1.2.4 → 1.2.6
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 +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +219 -209
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +36 -28
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +406 -402
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +4439 -4273
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2904 -2892
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.css +1 -0
- package/components/designer-canvas/index.esm.js +24 -21
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +984 -928
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +281 -277
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1917 -1901
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +4185 -4023
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +595 -581
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.css +1 -0
- package/components/flow-canvas/index.esm.js +38 -35
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +256 -248
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1522 -1519
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4629 -4410
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4454 -4255
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +972 -920
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +917 -893
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +361 -349
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +72 -64
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +452 -439
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +610 -592
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +4041 -3749
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +159 -178
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1450 -1408
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +86 -78
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +387 -379
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +4437 -4271
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +1989 -1985
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12989 -12513
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/condition/index.d.ts +60 -1
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/message-box/index.d.ts +84 -1
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/notify/index.d.ts +84 -1
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
- package/components/button-edit/style.css +0 -1
- package/components/designer-canvas/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/flow-canvas/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (o, e, t) =>
|
|
4
|
-
import { defineComponent as $, toRefs as j, ref as
|
|
1
|
+
var q = Object.defineProperty;
|
|
2
|
+
var _ = (o, e, t) => e in o ? q(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var C = (o, e, t) => _(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as $, toRefs as j, ref as T, computed as k, watch as U, createVNode as b, inject as z, onMounted as X } from "vue";
|
|
5
5
|
import { cloneDeep as Y } from "lodash-es";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title: t } = o, n = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ?
|
|
6
|
+
const x = {}, W = {};
|
|
7
|
+
function A(o) {
|
|
8
|
+
const { properties: e, title: t } = o, n = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), i), {});
|
|
9
9
|
return n.id = `${t}-${Date.now()}`, n;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const t =
|
|
11
|
+
function V(o, e = {}) {
|
|
12
|
+
const t = x[o];
|
|
13
13
|
if (t) {
|
|
14
|
-
let n =
|
|
15
|
-
const i =
|
|
16
|
-
return n = i ? i({ getSchemaByType:
|
|
14
|
+
let n = A(t);
|
|
15
|
+
const i = W[o];
|
|
16
|
+
return n = i ? i({ getSchemaByType: V }, n, e) : n, n;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
function Z(o, e) {
|
|
21
|
-
const t =
|
|
21
|
+
const t = A(e);
|
|
22
22
|
return Object.keys(o).reduce((n, i) => (n[i] = o[i], n), t), t;
|
|
23
23
|
}
|
|
24
24
|
function J(o, e) {
|
|
@@ -28,8 +28,8 @@ function J(o, e) {
|
|
|
28
28
|
if (typeof c == "string")
|
|
29
29
|
n[c] = o[i];
|
|
30
30
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(n,
|
|
31
|
+
const m = c(i, o[i], o);
|
|
32
|
+
Object.assign(n, m);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
35
|
n[i] = o[i];
|
|
@@ -45,12 +45,12 @@ function K(o = {}) {
|
|
|
45
45
|
if (typeof s == "number")
|
|
46
46
|
return p[a].length === s;
|
|
47
47
|
if (typeof s == "object") {
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
48
|
+
const g = Object.keys(s)[0], f = s[g];
|
|
49
|
+
if (g === "not")
|
|
50
50
|
return Number(p[a].length) !== Number(f);
|
|
51
|
-
if (
|
|
51
|
+
if (g === "moreThan")
|
|
52
52
|
return Number(p[a].length) >= Number(f);
|
|
53
|
-
if (
|
|
53
|
+
if (g === "lessThan")
|
|
54
54
|
return Number(p[a].length) <= Number(f);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
@@ -68,17 +68,17 @@ function K(o = {}) {
|
|
|
68
68
|
return typeof l == "number" ? [{ target: s, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: s, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((p) => {
|
|
69
69
|
if (p === "length")
|
|
70
70
|
return { target: s, operator: "length", param: null, value: l[p] };
|
|
71
|
-
const
|
|
72
|
-
return { target: s, operator: "getProperty", param:
|
|
71
|
+
const g = p, f = l[p];
|
|
72
|
+
return { target: s, operator: "getProperty", param: g, value: f };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
75
|
function c(a) {
|
|
76
76
|
return Object.keys(a).reduce((s, p) => {
|
|
77
|
-
const
|
|
78
|
-
return s.push(...
|
|
77
|
+
const g = i(p, a[p]);
|
|
78
|
+
return s.push(...g), s;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function m(a, l) {
|
|
82
82
|
if (n.has(a.operator)) {
|
|
83
83
|
const s = n.get(a.operator);
|
|
84
84
|
return s && s(a.target, a.param, a.value, l) || !1;
|
|
@@ -86,20 +86,20 @@ function K(o = {}) {
|
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
88
|
function u(a, l) {
|
|
89
|
-
return c(a).reduce((
|
|
89
|
+
return c(a).reduce((g, f) => g && m(f, l), !0);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const s = Object.keys(a), p = s.includes("allOf"),
|
|
91
|
+
function y(a, l) {
|
|
92
|
+
const s = Object.keys(a), p = s.includes("allOf"), g = s.includes("anyOf"), f = p || g, S = (f ? a[f ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
|
|
93
93
|
return p ? !S.includes(!1) : S.includes(!0);
|
|
94
94
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: y };
|
|
96
96
|
}
|
|
97
97
|
const r = {
|
|
98
98
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
99
99
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
101
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
|
|
102
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
103
103
|
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
104
104
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
105
105
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
@@ -126,15 +126,15 @@ const r = {
|
|
|
126
126
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
127
127
|
Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
|
|
128
128
|
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
129
|
-
|
|
129
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
130
130
|
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
131
131
|
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
132
132
|
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
133
133
|
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
134
134
|
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
135
135
|
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
137
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
138
138
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
139
139
|
Tag: { type: "Tag", name: "Tag", icon: "Tag" },
|
|
140
140
|
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
@@ -143,7 +143,7 @@ const r = {
|
|
|
143
143
|
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
144
144
|
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
145
145
|
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
146
|
-
|
|
146
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
147
147
|
SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
|
|
148
148
|
SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
|
|
149
149
|
QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
|
|
@@ -173,7 +173,7 @@ const r = {
|
|
|
173
173
|
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
174
174
|
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
175
175
|
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
176
|
-
|
|
176
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
177
177
|
ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
|
|
178
178
|
ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
|
|
179
179
|
PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
@@ -207,10 +207,10 @@ const r = {
|
|
|
207
207
|
/** 审批类 end */
|
|
208
208
|
}, ee = {}, te = {};
|
|
209
209
|
K();
|
|
210
|
-
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (
|
|
211
|
-
return
|
|
212
|
-
const u = R(
|
|
213
|
-
return Object.assign(
|
|
210
|
+
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, i = {}, c = (m) => m) {
|
|
211
|
+
return x[e.title] = e, W[e.title] = n, ee[e.title] = i, 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);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
function oe(o, e) {
|
|
@@ -305,7 +305,7 @@ const ie = /* @__PURE__ */ new Map([
|
|
|
305
305
|
function me(o, e, t) {
|
|
306
306
|
return e;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const E = {
|
|
309
309
|
/** 组件值*/
|
|
310
310
|
modelValue: { type: Boolean, default: !1 },
|
|
311
311
|
/** 禁用 */
|
|
@@ -321,9 +321,9 @@ const L = {
|
|
|
321
321
|
/** 开关值变化事件 */
|
|
322
322
|
onModelValueChanged: { type: Function, default: () => {
|
|
323
323
|
} }
|
|
324
|
-
},
|
|
324
|
+
}, I = ne(E, de, ie, me), P = /* @__PURE__ */ $({
|
|
325
325
|
name: "FSwitch",
|
|
326
|
-
props:
|
|
326
|
+
props: E,
|
|
327
327
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
328
328
|
setup(o, e) {
|
|
329
329
|
const {
|
|
@@ -331,11 +331,11 @@ const L = {
|
|
|
331
331
|
size: n,
|
|
332
332
|
onLabel: i,
|
|
333
333
|
offLabel: c,
|
|
334
|
-
onBackground:
|
|
334
|
+
onBackground: m,
|
|
335
335
|
offBackground: u,
|
|
336
|
-
onColor:
|
|
336
|
+
onColor: y,
|
|
337
337
|
offColor: a
|
|
338
|
-
} = j(o), l =
|
|
338
|
+
} = j(o), l = T(o.modelValue), s = k(() => ({
|
|
339
339
|
switch: !0,
|
|
340
340
|
"f-cmp-switch": !0,
|
|
341
341
|
checked: l.value,
|
|
@@ -343,28 +343,30 @@ const L = {
|
|
|
343
343
|
"switch-large": n.value === "large",
|
|
344
344
|
"switch-medium": n.value === "medium",
|
|
345
345
|
"switch-small": n.value === "small"
|
|
346
|
-
})), p =
|
|
346
|
+
})), p = k(() => l.value ? {
|
|
347
347
|
outline: "none",
|
|
348
|
-
background:
|
|
348
|
+
background: m.value
|
|
349
349
|
} : {
|
|
350
350
|
outline: "none",
|
|
351
351
|
backgroundColor: u.value
|
|
352
|
-
}),
|
|
353
|
-
background:
|
|
352
|
+
}), g = k(() => l.value ? {
|
|
353
|
+
background: y.value
|
|
354
354
|
} : {
|
|
355
355
|
backgroundColor: a.value
|
|
356
|
-
}), f =
|
|
357
|
-
function
|
|
356
|
+
}), f = k(() => (i == null ? void 0 : i.value) || (c == null ? void 0 : c.value));
|
|
357
|
+
function F() {
|
|
358
358
|
t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
|
|
359
359
|
}
|
|
360
|
-
return
|
|
361
|
-
|
|
360
|
+
return U(l, (w, S) => {
|
|
361
|
+
w !== S && e.emit("modelValueChanged", w);
|
|
362
|
+
}), U(() => o.modelValue, (w, S) => {
|
|
363
|
+
w !== S && (l.value = w);
|
|
362
364
|
}), () => b("span", {
|
|
363
365
|
tabindex: "0",
|
|
364
366
|
role: "button",
|
|
365
367
|
class: s.value,
|
|
366
368
|
style: p.value,
|
|
367
|
-
onClick:
|
|
369
|
+
onClick: F
|
|
368
370
|
}, [f.value && b("span", {
|
|
369
371
|
class: "switch-pane"
|
|
370
372
|
}, [b("span", {
|
|
@@ -372,21 +374,21 @@ const L = {
|
|
|
372
374
|
}, [i == null ? void 0 : i.value]), b("span", {
|
|
373
375
|
class: "switch-label-unchecked"
|
|
374
376
|
}, [c == null ? void 0 : c.value])]), b("small", {
|
|
375
|
-
style:
|
|
377
|
+
style: g.value
|
|
376
378
|
}, [e.slots.default && e.slots.default()])]);
|
|
377
379
|
}
|
|
378
380
|
});
|
|
379
381
|
function ye(o, e, t) {
|
|
380
|
-
var
|
|
382
|
+
var N;
|
|
381
383
|
function n() {
|
|
382
384
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
383
385
|
}
|
|
384
386
|
n();
|
|
385
|
-
const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "",
|
|
387
|
+
const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = T();
|
|
386
388
|
function u() {
|
|
387
389
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
388
390
|
}
|
|
389
|
-
function
|
|
391
|
+
function y() {
|
|
390
392
|
return !1;
|
|
391
393
|
}
|
|
392
394
|
function a() {
|
|
@@ -395,79 +397,80 @@ function ye(o, e, t) {
|
|
|
395
397
|
function l() {
|
|
396
398
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
397
399
|
}
|
|
398
|
-
function s(
|
|
399
|
-
if (!
|
|
400
|
+
function s(d) {
|
|
401
|
+
if (!d || !d.value)
|
|
400
402
|
return null;
|
|
401
|
-
if (
|
|
402
|
-
return
|
|
403
|
-
const v =
|
|
403
|
+
if (d.value.schema && d.value.schema.type === "component")
|
|
404
|
+
return d.value;
|
|
405
|
+
const v = T(d == null ? void 0 : d.value.parent), h = s(v);
|
|
404
406
|
return h || null;
|
|
405
407
|
}
|
|
406
|
-
function p(
|
|
407
|
-
const { componentInstance: v, designerItemElementRef: h } =
|
|
408
|
-
return !v || !v.value ? null : v.value.canMove ? h : p(
|
|
408
|
+
function p(d = e) {
|
|
409
|
+
const { componentInstance: v, designerItemElementRef: h } = d;
|
|
410
|
+
return !v || !v.value ? null : v.value.canMove ? h : p(d.parent);
|
|
409
411
|
}
|
|
410
|
-
function
|
|
411
|
-
return !!t && t.canAccepts(
|
|
412
|
+
function g(d) {
|
|
413
|
+
return !!t && t.canAccepts(d);
|
|
412
414
|
}
|
|
413
415
|
function f() {
|
|
414
416
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
415
417
|
}
|
|
416
|
-
function
|
|
418
|
+
function F() {
|
|
417
419
|
}
|
|
418
|
-
function
|
|
420
|
+
function w(d, v) {
|
|
419
421
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
420
422
|
}
|
|
421
|
-
function S(
|
|
422
|
-
const { componentType: v } =
|
|
423
|
-
let h =
|
|
424
|
-
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(
|
|
425
|
-
const
|
|
426
|
-
return h && !h.id && h.type === v && (h.id = `${
|
|
423
|
+
function S(d) {
|
|
424
|
+
const { componentType: v } = d;
|
|
425
|
+
let h = V(v, d);
|
|
426
|
+
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(d, h));
|
|
427
|
+
const B = v.toLowerCase().replace("-", "_");
|
|
428
|
+
return h && !h.id && h.type === v && (h.id = `${B}_${Math.random().toString().slice(2, 6)}`), h;
|
|
427
429
|
}
|
|
428
|
-
function
|
|
429
|
-
const h = String(
|
|
430
|
-
|
|
431
|
-
let
|
|
432
|
-
t && t.onAcceptNewChildElement && (
|
|
433
|
-
const
|
|
434
|
-
return
|
|
430
|
+
function O(d, v) {
|
|
431
|
+
const h = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
|
|
432
|
+
L.parentComponentInstance = m.value;
|
|
433
|
+
let M = V(h, L);
|
|
434
|
+
t && t.onAcceptNewChildElement && (M = t.onAcceptNewChildElement(d, v, M));
|
|
435
|
+
const Q = h.toLowerCase().replace("-", "_");
|
|
436
|
+
return M && !M.id && M.type === h && (M.id = `${Q}_${Math.random().toString().slice(2, 6)}`), M;
|
|
435
437
|
}
|
|
436
|
-
function
|
|
438
|
+
function D(d) {
|
|
437
439
|
}
|
|
438
|
-
function
|
|
440
|
+
function H(...d) {
|
|
439
441
|
if (t && t.getPropsConfig)
|
|
440
|
-
return t.getPropsConfig(...
|
|
442
|
+
return t.getPropsConfig(...d);
|
|
441
443
|
}
|
|
442
|
-
return
|
|
444
|
+
return m.value = {
|
|
443
445
|
canMove: u(),
|
|
444
|
-
canSelectParent:
|
|
446
|
+
canSelectParent: y(),
|
|
445
447
|
canDelete: a(),
|
|
446
448
|
canNested: !l(),
|
|
447
449
|
contents: e == null ? void 0 : e.schema.contents,
|
|
448
450
|
elementRef: o,
|
|
449
|
-
parent: (
|
|
451
|
+
parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
|
|
450
452
|
schema: e == null ? void 0 : e.schema,
|
|
451
453
|
styles: i,
|
|
452
454
|
designerClass: c,
|
|
453
|
-
canAccepts:
|
|
455
|
+
canAccepts: g,
|
|
454
456
|
getBelongedComponentInstance: s,
|
|
455
457
|
getDraggableDesignItemElement: p,
|
|
456
458
|
getDraggingDisplayText: f,
|
|
457
|
-
getPropConfig:
|
|
458
|
-
getDragScopeElement:
|
|
459
|
-
onAcceptMovedChildElement:
|
|
460
|
-
onAcceptNewChildElement:
|
|
461
|
-
onChildElementMovedOut:
|
|
459
|
+
getPropConfig: H,
|
|
460
|
+
getDragScopeElement: F,
|
|
461
|
+
onAcceptMovedChildElement: w,
|
|
462
|
+
onAcceptNewChildElement: O,
|
|
463
|
+
onChildElementMovedOut: D,
|
|
462
464
|
addNewChildComponentSchema: S,
|
|
463
465
|
updateDragAndDropRules: n,
|
|
464
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
465
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
466
|
-
},
|
|
466
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || T(!1),
|
|
467
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1)
|
|
468
|
+
}, m;
|
|
467
469
|
}
|
|
468
470
|
class G {
|
|
469
471
|
static getEditorTypesByMDataType(e) {
|
|
470
|
-
|
|
472
|
+
const t = this.fieldControlTypeMapping[e];
|
|
473
|
+
return t || [{ key: "", value: "" }];
|
|
471
474
|
}
|
|
472
475
|
}
|
|
473
476
|
/**
|
|
@@ -539,13 +542,18 @@ class ge {
|
|
|
539
542
|
C(this, "designViewModelField");
|
|
540
543
|
C(this, "controlCreatorUtils");
|
|
541
544
|
C(this, "designerHostService");
|
|
545
|
+
C(this, "schemaService", null);
|
|
542
546
|
C(this, "metadataService", null);
|
|
543
547
|
C(this, "propertyConfig", {
|
|
544
548
|
type: "object",
|
|
545
549
|
categories: {}
|
|
546
550
|
});
|
|
547
551
|
var n;
|
|
548
|
-
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;
|
|
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);
|
|
549
557
|
}
|
|
550
558
|
setDesignViewModelField(e) {
|
|
551
559
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
@@ -560,6 +568,7 @@ class ge {
|
|
|
560
568
|
changeFieldEditorType(e, t) {
|
|
561
569
|
}
|
|
562
570
|
getBasicPropConfig(e) {
|
|
571
|
+
var n, i;
|
|
563
572
|
var t = this;
|
|
564
573
|
return this.setDesignViewModelField(e), {
|
|
565
574
|
description: "Basic Information",
|
|
@@ -581,7 +590,8 @@ class ge {
|
|
|
581
590
|
type: "combo-list",
|
|
582
591
|
textField: "value",
|
|
583
592
|
valueField: "key",
|
|
584
|
-
data: G.getEditorTypesByMDataType(t.designViewModelField.type.name)
|
|
593
|
+
data: G.getEditorTypesByMDataType(((i = (n = t.designViewModelField) == null ? void 0 : n.type) == null ? void 0 : i.name) || ""),
|
|
594
|
+
editable: !1
|
|
585
595
|
}
|
|
586
596
|
},
|
|
587
597
|
label: {
|
|
@@ -590,11 +600,11 @@ class ge {
|
|
|
590
600
|
$converter: "/converter/form-group-label.converter"
|
|
591
601
|
}
|
|
592
602
|
},
|
|
593
|
-
setPropertyRelates(
|
|
594
|
-
if (
|
|
595
|
-
switch (
|
|
603
|
+
setPropertyRelates(c, m) {
|
|
604
|
+
if (c)
|
|
605
|
+
switch (c && c.propertyID) {
|
|
596
606
|
case "type": {
|
|
597
|
-
t.changeControlType(e,
|
|
607
|
+
t.changeControlType(e, c);
|
|
598
608
|
break;
|
|
599
609
|
}
|
|
600
610
|
}
|
|
@@ -607,13 +617,13 @@ class ge {
|
|
|
607
617
|
* @param newControlType 新控件类型
|
|
608
618
|
*/
|
|
609
619
|
changeControlType(e, t) {
|
|
610
|
-
var a, l, s, p,
|
|
620
|
+
var a, l, s, p, g;
|
|
611
621
|
const n = t.propertyValue, i = this.formSchemaUtils.getComponentById(this.componentId);
|
|
612
622
|
let c = this.getControlParentContainer(e.id, i);
|
|
613
623
|
if (!c)
|
|
614
624
|
return;
|
|
615
|
-
const
|
|
616
|
-
let
|
|
625
|
+
const m = c.contents.findIndex((f) => f.id === e.id), u = c.contents[m];
|
|
626
|
+
let y;
|
|
617
627
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
618
628
|
editor: {
|
|
619
629
|
$type: n
|
|
@@ -621,20 +631,20 @@ class ge {
|
|
|
621
631
|
name: this.designViewModelField.name,
|
|
622
632
|
require: this.designViewModelField.require,
|
|
623
633
|
readonly: this.designViewModelField.readonly
|
|
624
|
-
}, !1),
|
|
634
|
+
}, !1), y = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, n)), Object.assign(y, {
|
|
625
635
|
id: u.id,
|
|
626
636
|
appearance: u.appearance,
|
|
627
637
|
size: u.size,
|
|
628
638
|
label: u.label
|
|
629
|
-
}), Object.assign(
|
|
630
|
-
isTextArea:
|
|
639
|
+
}), Object.assign(y.editor, {
|
|
640
|
+
isTextArea: y.isTextArea && u.isTextArea,
|
|
631
641
|
type: n || "",
|
|
632
642
|
placeHolder: (a = u.editor) == null ? void 0 : a.placeHolder,
|
|
633
643
|
holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
|
|
634
644
|
readonly: (s = u.editor) == null ? void 0 : s.readonly,
|
|
635
645
|
require: (p = u.editor) == null ? void 0 : p.require,
|
|
636
|
-
visible: (
|
|
637
|
-
}), c.contents.splice(
|
|
646
|
+
visible: (g = u.editor) == null ? void 0 : g.visible
|
|
647
|
+
}), c.contents.splice(m, 1, y);
|
|
638
648
|
}
|
|
639
649
|
getAppearanceConfig(e = null) {
|
|
640
650
|
return {
|
|
@@ -831,20 +841,20 @@ class he extends fe {
|
|
|
831
841
|
}
|
|
832
842
|
function ve(o, e) {
|
|
833
843
|
o.schema;
|
|
834
|
-
const t =
|
|
844
|
+
const t = T(!0), n = T(!0);
|
|
835
845
|
function i(s) {
|
|
836
846
|
return !1;
|
|
837
847
|
}
|
|
838
848
|
function c() {
|
|
839
849
|
return !1;
|
|
840
850
|
}
|
|
841
|
-
function
|
|
851
|
+
function m() {
|
|
842
852
|
return !1;
|
|
843
853
|
}
|
|
844
854
|
function u() {
|
|
845
855
|
return !0;
|
|
846
856
|
}
|
|
847
|
-
function
|
|
857
|
+
function y(s) {
|
|
848
858
|
}
|
|
849
859
|
function a() {
|
|
850
860
|
}
|
|
@@ -854,9 +864,9 @@ function ve(o, e) {
|
|
|
854
864
|
return {
|
|
855
865
|
canAccepts: i,
|
|
856
866
|
checkCanDeleteComponent: c,
|
|
857
|
-
checkCanMoveComponent:
|
|
867
|
+
checkCanMoveComponent: m,
|
|
858
868
|
hideNestedPaddingInDesginerView: u,
|
|
859
|
-
onAcceptMovedChildElement:
|
|
869
|
+
onAcceptMovedChildElement: y,
|
|
860
870
|
resolveComponentContext: a,
|
|
861
871
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
862
872
|
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
@@ -869,9 +879,9 @@ function Ce(o, e) {
|
|
|
869
879
|
checkCanDeleteComponent: n,
|
|
870
880
|
checkCanMoveComponent: i,
|
|
871
881
|
hideNestedPaddingInDesginerView: c,
|
|
872
|
-
onAcceptMovedChildElement:
|
|
882
|
+
onAcceptMovedChildElement: m,
|
|
873
883
|
resolveComponentContext: u,
|
|
874
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
884
|
+
triggerBelongedComponentToMoveWhenMoved: y,
|
|
875
885
|
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
876
886
|
} = ve(o), l = o.schema;
|
|
877
887
|
function s(p) {
|
|
@@ -882,73 +892,44 @@ function Ce(o, e) {
|
|
|
882
892
|
checkCanDeleteComponent: n,
|
|
883
893
|
checkCanMoveComponent: i,
|
|
884
894
|
hideNestedPaddingInDesginerView: c,
|
|
885
|
-
onAcceptMovedChildElement:
|
|
895
|
+
onAcceptMovedChildElement: m,
|
|
886
896
|
resolveComponentContext: u,
|
|
887
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
897
|
+
triggerBelongedComponentToMoveWhenMoved: y,
|
|
888
898
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
889
899
|
getPropsConfig: s
|
|
890
900
|
};
|
|
891
901
|
}
|
|
892
902
|
const be = /* @__PURE__ */ $({
|
|
893
903
|
name: "FSwitchDesign",
|
|
894
|
-
props:
|
|
904
|
+
props: E,
|
|
895
905
|
emits: ["update:modelValue"],
|
|
896
906
|
setup(o, e) {
|
|
897
907
|
const {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
} = j(o), d = w(o.modelValue), u = w(), g = z("designer-host-service"), a = z("design-item-context"), l = Ce(a, g), s = ye(u, a, l);
|
|
908
|
+
size: t,
|
|
909
|
+
onLabel: n,
|
|
910
|
+
offLabel: i
|
|
911
|
+
} = j(o), c = T(), m = z("designer-host-service"), u = z("design-item-context"), y = Ce(u, m), a = ye(c, u, y);
|
|
903
912
|
X(() => {
|
|
904
|
-
|
|
905
|
-
}), e.expose(
|
|
906
|
-
|
|
907
|
-
return "";
|
|
908
|
-
}
|
|
909
|
-
function y() {
|
|
910
|
-
return "";
|
|
911
|
-
}
|
|
912
|
-
function f() {
|
|
913
|
-
return "";
|
|
914
|
-
}
|
|
915
|
-
const k = T(() => ({
|
|
913
|
+
c.value.componentInstance = a;
|
|
914
|
+
}), e.expose(a.value);
|
|
915
|
+
const l = k(() => ({
|
|
916
916
|
switch: !0,
|
|
917
917
|
"f-cmp-switch": !0,
|
|
918
|
-
checked:
|
|
919
|
-
|
|
920
|
-
"switch-
|
|
921
|
-
"switch-
|
|
922
|
-
|
|
923
|
-
})), M = T(() => ({
|
|
924
|
-
outline: "none",
|
|
925
|
-
"backgroud-color": p(),
|
|
926
|
-
"border-color": y()
|
|
927
|
-
})), S = T(() => ({
|
|
928
|
-
background: f()
|
|
929
|
-
})), P = T(() => (i == null ? void 0 : i.value) || (c == null ? void 0 : c.value));
|
|
930
|
-
function B(D, m = !0) {
|
|
931
|
-
t.value || (d.value = !d.value, e.emit("update:modelValue", d.value));
|
|
932
|
-
}
|
|
933
|
-
function E(D) {
|
|
934
|
-
B();
|
|
935
|
-
}
|
|
918
|
+
checked: !1,
|
|
919
|
+
"switch-large": t.value === "large",
|
|
920
|
+
"switch-medium": t.value === "medium",
|
|
921
|
+
"switch-small": t.value === "small"
|
|
922
|
+
})), s = k(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
|
|
936
923
|
return () => b("span", {
|
|
937
|
-
ref:
|
|
924
|
+
ref: c,
|
|
938
925
|
tabindex: "0",
|
|
939
926
|
role: "button",
|
|
940
|
-
class:
|
|
941
|
-
|
|
942
|
-
onClick: E
|
|
943
|
-
}, [P.value && b("span", {
|
|
927
|
+
class: l.value
|
|
928
|
+
}, [s.value && b("span", {
|
|
944
929
|
class: "switch-pane"
|
|
945
930
|
}, [b("span", {
|
|
946
|
-
class: "switch-label-checked"
|
|
947
|
-
}, [i == null ? void 0 : i.value]), b("span", {
|
|
948
931
|
class: "switch-label-unchecked"
|
|
949
|
-
}, [
|
|
950
|
-
style: S.value
|
|
951
|
-
}, [e.slots.default && e.slots.default()])]);
|
|
932
|
+
}, [i == null ? void 0 : i.value])]), b("small", null, [e.slots.default && e.slots.default()])]);
|
|
952
933
|
}
|
|
953
934
|
}), we = (o) => {
|
|
954
935
|
const e = o;
|
|
@@ -956,16 +937,16 @@ const be = /* @__PURE__ */ $({
|
|
|
956
937
|
t.component(e.name, o);
|
|
957
938
|
}, o;
|
|
958
939
|
};
|
|
959
|
-
|
|
960
|
-
o.switch =
|
|
940
|
+
P.register = (o, e, t, n) => {
|
|
941
|
+
o.switch = P, e.switch = I;
|
|
961
942
|
};
|
|
962
|
-
|
|
963
|
-
o.switch = be, e.switch =
|
|
943
|
+
P.registerDesigner = (o, e, t) => {
|
|
944
|
+
o.switch = be, e.switch = I;
|
|
964
945
|
};
|
|
965
|
-
const
|
|
946
|
+
const ke = we(P);
|
|
966
947
|
export {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
948
|
+
P as FSwitch,
|
|
949
|
+
ke as default,
|
|
950
|
+
I as propsResolver,
|
|
951
|
+
E as switchProps
|
|
971
952
|
};
|