@farris/ui-vue 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
var _ = Object.defineProperty;
|
|
2
2
|
var H = (r, e, t) => e in r ? _(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as G, toRefs as L, ref as
|
|
3
|
+
var g = (r, e, t) => H(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as G, toRefs as L, ref as k, computed as B, watch as W, createVNode as C, inject as q, onMounted as x } from "vue";
|
|
5
5
|
import { cloneDeep as I } from "lodash-es";
|
|
6
6
|
import { getSchemaByType as z } from "../dynamic-resolver/index.esm.js";
|
|
7
7
|
const J = {}, Q = {};
|
|
8
|
-
function
|
|
9
|
-
const { properties: e, title: t } = r, n = Object.keys(e).reduce((
|
|
10
|
-
return n.id = `${t}-${Date.now()}
|
|
8
|
+
function $(r) {
|
|
9
|
+
const { properties: e, title: t, ignore: n } = r, o = n && Array.isArray(n), c = Object.keys(e).reduce((u, s) => ((!o || !n.find((m) => m == s)) && (u[s] = e[s].type === "object" && e[s].properties ? $(e[s]) : I(e[s].default)), u), {});
|
|
10
|
+
return (!o || !n.find((u) => u == "id")) && (c.id = `${t}-${Date.now()}`), c;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
let
|
|
16
|
-
const
|
|
17
|
-
return
|
|
12
|
+
function N(r, e = {}, t) {
|
|
13
|
+
const n = J[r];
|
|
14
|
+
if (n) {
|
|
15
|
+
let o = $(n);
|
|
16
|
+
const c = Q[r];
|
|
17
|
+
return o = c ? c({ getSchemaByType: N }, o, e, t) : o, o;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
function K(r, e) {
|
|
22
|
-
const t =
|
|
22
|
+
const t = $(e);
|
|
23
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;
|
|
24
24
|
}
|
|
25
25
|
function R(r, e) {
|
|
26
26
|
return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
|
|
27
27
|
if (e.has(o)) {
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
n[
|
|
28
|
+
const c = e.get(o);
|
|
29
|
+
if (typeof c == "string")
|
|
30
|
+
n[c] = r[o];
|
|
31
31
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(n,
|
|
32
|
+
const u = c(o, r[o], r);
|
|
33
|
+
Object.assign(n, u);
|
|
34
34
|
}
|
|
35
35
|
} else
|
|
36
36
|
n[o] = r[o];
|
|
@@ -42,22 +42,22 @@ function ee(r, e, t = /* @__PURE__ */ new Map()) {
|
|
|
42
42
|
return R(n, t);
|
|
43
43
|
}
|
|
44
44
|
function te(r = {}) {
|
|
45
|
-
function e(i, l,
|
|
46
|
-
if (typeof
|
|
47
|
-
return
|
|
48
|
-
if (typeof
|
|
49
|
-
const f = Object.keys(
|
|
45
|
+
function e(i, l, p, d) {
|
|
46
|
+
if (typeof p == "number")
|
|
47
|
+
return d[i].length === p;
|
|
48
|
+
if (typeof p == "object") {
|
|
49
|
+
const f = Object.keys(p)[0], h = p[f];
|
|
50
50
|
if (f === "not")
|
|
51
|
-
return Number(
|
|
51
|
+
return Number(d[i].length) !== Number(h);
|
|
52
52
|
if (f === "moreThan")
|
|
53
|
-
return Number(
|
|
53
|
+
return Number(d[i].length) >= Number(h);
|
|
54
54
|
if (f === "lessThan")
|
|
55
|
-
return Number(
|
|
55
|
+
return Number(d[i].length) <= Number(h);
|
|
56
56
|
}
|
|
57
57
|
return !1;
|
|
58
58
|
}
|
|
59
|
-
function t(i, l,
|
|
60
|
-
return
|
|
59
|
+
function t(i, l, p, d) {
|
|
60
|
+
return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(p);
|
|
61
61
|
}
|
|
62
62
|
const n = /* @__PURE__ */ new Map([
|
|
63
63
|
["length", e],
|
|
@@ -65,35 +65,35 @@ function te(r = {}) {
|
|
|
65
65
|
]);
|
|
66
66
|
Object.keys(r).reduce((i, l) => (i.set(l, r[l]), i), n);
|
|
67
67
|
function o(i, l) {
|
|
68
|
-
const
|
|
69
|
-
return typeof l == "number" ? [{ target:
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const f =
|
|
73
|
-
return { target:
|
|
68
|
+
const p = i;
|
|
69
|
+
return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((d) => {
|
|
70
|
+
if (d === "length")
|
|
71
|
+
return { target: p, operator: "length", param: null, value: l[d] };
|
|
72
|
+
const f = d, h = l[d];
|
|
73
|
+
return { target: p, operator: "getProperty", param: f, value: h };
|
|
74
74
|
}) : [];
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(i).reduce((
|
|
78
|
-
const f = o(
|
|
79
|
-
return
|
|
76
|
+
function c(i) {
|
|
77
|
+
return Object.keys(i).reduce((p, d) => {
|
|
78
|
+
const f = o(d, i[d]);
|
|
79
|
+
return p.push(...f), p;
|
|
80
80
|
}, []);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function u(i, l) {
|
|
83
83
|
if (n.has(i.operator)) {
|
|
84
|
-
const
|
|
85
|
-
return
|
|
84
|
+
const p = n.get(i.operator);
|
|
85
|
+
return p && p(i.target, i.param, i.value, l) || !1;
|
|
86
86
|
}
|
|
87
87
|
return !1;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function s(i, l) {
|
|
90
|
+
return c(i).reduce((f, h) => f && u(h, l), !0);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
return
|
|
92
|
+
function m(i, l) {
|
|
93
|
+
const p = Object.keys(i), d = p.includes("allOf"), f = p.includes("anyOf"), h = d || f, T = (h ? i[h ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => s(A, l));
|
|
94
|
+
return d ? !T.includes(!1) : T.includes(!0);
|
|
95
95
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
96
|
+
return { parseValueSchema: m };
|
|
97
97
|
}
|
|
98
98
|
const a = {
|
|
99
99
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -135,10 +135,10 @@ const a = {
|
|
|
135
135
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
136
136
|
}, ne = {}, oe = {};
|
|
137
137
|
te();
|
|
138
|
-
function re(r, e, t = /* @__PURE__ */ new Map(), n = (
|
|
139
|
-
return J[e.title] = e, Q[e.title] = n, ne[e.title] = o, oe[e.title] =
|
|
140
|
-
const
|
|
141
|
-
return Object.assign(
|
|
138
|
+
function re(r, e, t = /* @__PURE__ */ new Map(), n = (u, s, m) => s, o = {}, c = (u) => u) {
|
|
139
|
+
return J[e.title] = e, Q[e.title] = n, ne[e.title] = o, oe[e.title] = c, (u = {}) => {
|
|
140
|
+
const s = ee(u, e, t), m = Object.keys(r).reduce((i, l) => (i[l] = r[l].default, i), {});
|
|
141
|
+
return Object.assign(m, s);
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
function ie(r, e) {
|
|
@@ -216,24 +216,29 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
216
216
|
size: {
|
|
217
217
|
description: "",
|
|
218
218
|
type: "enum",
|
|
219
|
-
default: "
|
|
219
|
+
default: "middle"
|
|
220
220
|
}
|
|
221
221
|
}, me = [
|
|
222
222
|
"id",
|
|
223
223
|
"type"
|
|
224
|
-
], ye =
|
|
224
|
+
], ye = [
|
|
225
|
+
"id",
|
|
226
|
+
"appearance",
|
|
227
|
+
"binding"
|
|
228
|
+
], fe = {
|
|
225
229
|
$schema: le,
|
|
226
230
|
$id: se,
|
|
227
231
|
title: ce,
|
|
228
232
|
description: pe,
|
|
229
233
|
type: ue,
|
|
230
234
|
properties: de,
|
|
231
|
-
required: me
|
|
235
|
+
required: me,
|
|
236
|
+
ignore: ye
|
|
232
237
|
};
|
|
233
|
-
function
|
|
238
|
+
function he(r, e, t) {
|
|
234
239
|
return e;
|
|
235
240
|
}
|
|
236
|
-
const
|
|
241
|
+
const U = {
|
|
237
242
|
/** 组件值*/
|
|
238
243
|
modelValue: { type: Boolean, default: !1 },
|
|
239
244
|
/** 禁用 */
|
|
@@ -249,21 +254,21 @@ const $ = {
|
|
|
249
254
|
/** 开关值变化事件 */
|
|
250
255
|
onModelValueChanged: { type: Function, default: () => {
|
|
251
256
|
} }
|
|
252
|
-
}, X = re(
|
|
257
|
+
}, X = re(U, fe, ae, he), F = /* @__PURE__ */ G({
|
|
253
258
|
name: "FSwitch",
|
|
254
|
-
props:
|
|
259
|
+
props: U,
|
|
255
260
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
256
261
|
setup(r, e) {
|
|
257
262
|
const {
|
|
258
263
|
disabled: t,
|
|
259
264
|
size: n,
|
|
260
265
|
onLabel: o,
|
|
261
|
-
offLabel:
|
|
262
|
-
onBackground:
|
|
263
|
-
offBackground:
|
|
264
|
-
onColor:
|
|
266
|
+
offLabel: c,
|
|
267
|
+
onBackground: u,
|
|
268
|
+
offBackground: s,
|
|
269
|
+
onColor: m,
|
|
265
270
|
offColor: i
|
|
266
|
-
} = L(r), l =
|
|
271
|
+
} = L(r), l = k(r.modelValue), p = B(() => ({
|
|
267
272
|
switch: !0,
|
|
268
273
|
"f-cmp-switch": !0,
|
|
269
274
|
checked: l.value,
|
|
@@ -271,52 +276,52 @@ const $ = {
|
|
|
271
276
|
"switch-large": n.value === "large",
|
|
272
277
|
"switch-medium": n.value === "medium",
|
|
273
278
|
"switch-small": n.value === "small"
|
|
274
|
-
})),
|
|
279
|
+
})), d = B(() => l.value ? {
|
|
275
280
|
outline: "none",
|
|
276
|
-
background:
|
|
281
|
+
background: u.value
|
|
277
282
|
} : {
|
|
278
283
|
outline: "none",
|
|
279
|
-
backgroundColor:
|
|
280
|
-
}), f =
|
|
281
|
-
background:
|
|
284
|
+
backgroundColor: s.value
|
|
285
|
+
}), f = B(() => l.value ? {
|
|
286
|
+
background: m.value
|
|
282
287
|
} : {
|
|
283
288
|
backgroundColor: i.value
|
|
284
|
-
}),
|
|
285
|
-
function
|
|
289
|
+
}), h = B(() => (o == null ? void 0 : o.value) || (c == null ? void 0 : c.value));
|
|
290
|
+
function P() {
|
|
286
291
|
t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
|
|
287
292
|
}
|
|
288
|
-
return W(l, (
|
|
289
|
-
|
|
290
|
-
}), W(() => r.modelValue, (
|
|
291
|
-
|
|
292
|
-
}), () =>
|
|
293
|
+
return W(l, (M, T) => {
|
|
294
|
+
M !== T && e.emit("modelValueChanged", M);
|
|
295
|
+
}), W(() => r.modelValue, (M, T) => {
|
|
296
|
+
M !== T && (l.value = M);
|
|
297
|
+
}), () => C("span", {
|
|
293
298
|
tabindex: "0",
|
|
294
299
|
role: "button",
|
|
295
|
-
class:
|
|
296
|
-
style:
|
|
297
|
-
onClick:
|
|
298
|
-
}, [
|
|
300
|
+
class: p.value,
|
|
301
|
+
style: d.value,
|
|
302
|
+
onClick: P
|
|
303
|
+
}, [h.value && C("span", {
|
|
299
304
|
class: "switch-pane"
|
|
300
|
-
}, [
|
|
305
|
+
}, [C("span", {
|
|
301
306
|
class: "switch-label-checked"
|
|
302
|
-
}, [o == null ? void 0 : o.value]),
|
|
307
|
+
}, [o == null ? void 0 : o.value]), C("span", {
|
|
303
308
|
class: "switch-label-unchecked"
|
|
304
|
-
}, [
|
|
309
|
+
}, [c == null ? void 0 : c.value])]), C("small", {
|
|
305
310
|
style: f.value
|
|
306
311
|
}, [e.slots.default && e.slots.default()])]);
|
|
307
312
|
}
|
|
308
313
|
});
|
|
309
|
-
function
|
|
314
|
+
function ge(r, e, t) {
|
|
310
315
|
var O;
|
|
311
316
|
function n() {
|
|
312
317
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
313
318
|
}
|
|
314
319
|
n();
|
|
315
|
-
const o = t && t.getStyles && t.getStyles() || "",
|
|
316
|
-
function
|
|
320
|
+
const o = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", u = k();
|
|
321
|
+
function s() {
|
|
317
322
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
318
323
|
}
|
|
319
|
-
function
|
|
324
|
+
function m() {
|
|
320
325
|
return !1;
|
|
321
326
|
}
|
|
322
327
|
function i() {
|
|
@@ -325,53 +330,53 @@ function he(r, e, t) {
|
|
|
325
330
|
function l() {
|
|
326
331
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
327
332
|
}
|
|
328
|
-
function
|
|
333
|
+
function p(y) {
|
|
329
334
|
if (!y || !y.value)
|
|
330
335
|
return null;
|
|
331
336
|
if (y.value.schema && y.value.schema.type === "component")
|
|
332
337
|
return y.value;
|
|
333
|
-
const v =
|
|
334
|
-
return
|
|
338
|
+
const v = k(y == null ? void 0 : y.value.parent), b = p(v);
|
|
339
|
+
return b || null;
|
|
335
340
|
}
|
|
336
|
-
function
|
|
337
|
-
const { componentInstance: v, designerItemElementRef:
|
|
338
|
-
return !v || !v.value ? null : v.value.canMove ?
|
|
341
|
+
function d(y = e) {
|
|
342
|
+
const { componentInstance: v, designerItemElementRef: b } = y;
|
|
343
|
+
return !v || !v.value ? null : v.value.canMove ? b : d(y.parent);
|
|
339
344
|
}
|
|
340
345
|
function f(y) {
|
|
341
346
|
return !!t && t.canAccepts(y);
|
|
342
347
|
}
|
|
343
|
-
function
|
|
348
|
+
function h() {
|
|
344
349
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
345
350
|
}
|
|
346
|
-
function
|
|
351
|
+
function P() {
|
|
347
352
|
}
|
|
348
|
-
function
|
|
353
|
+
function M(y, v) {
|
|
349
354
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
350
355
|
}
|
|
351
|
-
function
|
|
352
|
-
const { componentType:
|
|
353
|
-
let
|
|
354
|
-
t && t.onResolveNewComponentSchema && (
|
|
355
|
-
const
|
|
356
|
-
return
|
|
356
|
+
function T(y, v) {
|
|
357
|
+
const { componentType: b } = y;
|
|
358
|
+
let w = N(b, y, v);
|
|
359
|
+
t && t.onResolveNewComponentSchema && (w = t.onResolveNewComponentSchema(y, w));
|
|
360
|
+
const D = b.toLowerCase().replace("-", "_");
|
|
361
|
+
return w && !w.id && w.type === b && (w.id = `${D}_${Math.random().toString().slice(2, 6)}`), w;
|
|
357
362
|
}
|
|
358
363
|
function j(y, v) {
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
let
|
|
362
|
-
t && t.onAcceptNewChildElement && (
|
|
363
|
-
const Z =
|
|
364
|
-
return
|
|
364
|
+
const b = String(y.getAttribute("data-controltype")), w = y.getAttribute("data-feature"), D = w ? JSON.parse(w) : {};
|
|
365
|
+
D.parentComponentInstance = u.value;
|
|
366
|
+
let S = N(b, D);
|
|
367
|
+
t && t.onAcceptNewChildElement && (S = t.onAcceptNewChildElement(y, v, S));
|
|
368
|
+
const Z = b.toLowerCase().replace("-", "_");
|
|
369
|
+
return S && !S.id && S.type === b && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
|
|
365
370
|
}
|
|
366
|
-
function
|
|
371
|
+
function A(y) {
|
|
367
372
|
}
|
|
368
373
|
function Y(...y) {
|
|
369
374
|
if (t && t.getPropsConfig)
|
|
370
375
|
return t.getPropsConfig(...y);
|
|
371
376
|
}
|
|
372
|
-
return
|
|
373
|
-
canMove:
|
|
374
|
-
canSelectParent:
|
|
377
|
+
return u.value = {
|
|
378
|
+
canMove: s(),
|
|
379
|
+
canSelectParent: m(),
|
|
375
380
|
canDelete: i(),
|
|
376
381
|
canNested: !l(),
|
|
377
382
|
contents: e == null ? void 0 : e.schema.contents,
|
|
@@ -379,36 +384,36 @@ function he(r, e, t) {
|
|
|
379
384
|
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
380
385
|
schema: e == null ? void 0 : e.schema,
|
|
381
386
|
styles: o,
|
|
382
|
-
designerClass:
|
|
387
|
+
designerClass: c,
|
|
383
388
|
canAccepts: f,
|
|
384
|
-
getBelongedComponentInstance:
|
|
385
|
-
getDraggableDesignItemElement:
|
|
386
|
-
getDraggingDisplayText:
|
|
389
|
+
getBelongedComponentInstance: p,
|
|
390
|
+
getDraggableDesignItemElement: d,
|
|
391
|
+
getDraggingDisplayText: h,
|
|
387
392
|
getPropConfig: Y,
|
|
388
|
-
getDragScopeElement:
|
|
389
|
-
onAcceptMovedChildElement:
|
|
393
|
+
getDragScopeElement: P,
|
|
394
|
+
onAcceptMovedChildElement: M,
|
|
390
395
|
onAcceptNewChildElement: j,
|
|
391
|
-
onChildElementMovedOut:
|
|
392
|
-
addNewChildComponentSchema:
|
|
396
|
+
onChildElementMovedOut: A,
|
|
397
|
+
addNewChildComponentSchema: T,
|
|
393
398
|
updateDragAndDropRules: n,
|
|
394
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
395
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
396
|
-
},
|
|
399
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
|
|
400
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
401
|
+
}, u;
|
|
397
402
|
}
|
|
398
|
-
class
|
|
403
|
+
class ve {
|
|
399
404
|
constructor(e, t) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
405
|
+
g(this, "componentId");
|
|
406
|
+
g(this, "viewModelId");
|
|
407
|
+
g(this, "eventsEditorUtils");
|
|
408
|
+
g(this, "formSchemaUtils");
|
|
409
|
+
g(this, "formMetadataConverter");
|
|
410
|
+
g(this, "designViewModelUtils");
|
|
411
|
+
g(this, "designViewModelField");
|
|
412
|
+
g(this, "controlCreatorUtils");
|
|
413
|
+
g(this, "designerHostService");
|
|
414
|
+
g(this, "schemaService", null);
|
|
415
|
+
g(this, "metadataService", null);
|
|
416
|
+
g(this, "propertyConfig", {
|
|
412
417
|
type: "object",
|
|
413
418
|
categories: {}
|
|
414
419
|
});
|
|
@@ -477,12 +482,12 @@ class ge {
|
|
|
477
482
|
};
|
|
478
483
|
}
|
|
479
484
|
}
|
|
480
|
-
const
|
|
485
|
+
const V = class V {
|
|
481
486
|
/**
|
|
482
487
|
* 根据绑定字段类型获取可用的输入类控件
|
|
483
488
|
*/
|
|
484
489
|
static getEditorTypesByMDataType(e) {
|
|
485
|
-
const t =
|
|
490
|
+
const t = V.fieldControlTypeMapping[e];
|
|
486
491
|
return t || [{ key: "", value: "" }];
|
|
487
492
|
}
|
|
488
493
|
/**
|
|
@@ -490,8 +495,8 @@ const B = class B {
|
|
|
490
495
|
*/
|
|
491
496
|
static getAllInputTypes() {
|
|
492
497
|
const e = [];
|
|
493
|
-
for (let t in
|
|
494
|
-
|
|
498
|
+
for (let t in V.fieldControlTypeMapping)
|
|
499
|
+
V.fieldControlTypeMapping[t].forEach((n) => {
|
|
495
500
|
e.find((o) => o.key === n.key && o.value === n.value) || e.push({ key: n.key, value: n.value });
|
|
496
501
|
});
|
|
497
502
|
return e;
|
|
@@ -500,7 +505,7 @@ const B = class B {
|
|
|
500
505
|
/**
|
|
501
506
|
* <字段类型,可配置的控件类型列表>的映射
|
|
502
507
|
*/
|
|
503
|
-
|
|
508
|
+
g(V, "fieldControlTypeMapping", {
|
|
504
509
|
String: [
|
|
505
510
|
{ key: a["input-group"].type, value: a["input-group"].name },
|
|
506
511
|
{ key: a.lookup.type, value: a.lookup.name },
|
|
@@ -546,9 +551,9 @@ b(B, "fieldControlTypeMapping", {
|
|
|
546
551
|
{ key: a["radio-group"].type, value: a["radio-group"].name }
|
|
547
552
|
]
|
|
548
553
|
});
|
|
549
|
-
let
|
|
550
|
-
const
|
|
551
|
-
class
|
|
554
|
+
let E = V;
|
|
555
|
+
const be = k(0);
|
|
556
|
+
class we extends ve {
|
|
552
557
|
constructor(e, t) {
|
|
553
558
|
super(e, t);
|
|
554
559
|
}
|
|
@@ -556,10 +561,10 @@ class be extends ge {
|
|
|
556
561
|
return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
557
562
|
}
|
|
558
563
|
getBasicProperties(e, t) {
|
|
559
|
-
var
|
|
564
|
+
var u;
|
|
560
565
|
var n = this;
|
|
561
566
|
this.setDesignViewModelField(e);
|
|
562
|
-
const o = this.formSchemaUtils.getFormMetadataBasicInfo(),
|
|
567
|
+
const o = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
563
568
|
return {
|
|
564
569
|
description: "Basic Information",
|
|
565
570
|
title: "基本信息",
|
|
@@ -571,8 +576,8 @@ class be extends ge {
|
|
|
571
576
|
readonly: !0
|
|
572
577
|
},
|
|
573
578
|
type: {
|
|
574
|
-
description: "
|
|
575
|
-
title: "
|
|
579
|
+
description: "编辑器类型",
|
|
580
|
+
title: "编辑器类型",
|
|
576
581
|
type: "string",
|
|
577
582
|
refreshPanelAfterChanged: !0,
|
|
578
583
|
$converter: "/converter/change-editor.converter",
|
|
@@ -581,7 +586,7 @@ class be extends ge {
|
|
|
581
586
|
textField: "value",
|
|
582
587
|
valueField: "key",
|
|
583
588
|
editable: !1,
|
|
584
|
-
data: n.designViewModelField ?
|
|
589
|
+
data: n.designViewModelField ? E.getEditorTypesByMDataType((u = n.designViewModelField.type) == null ? void 0 : u.name) : E.getAllInputTypes()
|
|
585
590
|
}
|
|
586
591
|
},
|
|
587
592
|
label: {
|
|
@@ -606,15 +611,19 @@ class be extends ge {
|
|
|
606
611
|
{ field: "fieldType", title: "字段类型" }
|
|
607
612
|
],
|
|
608
613
|
textField: "bindingField",
|
|
609
|
-
data:
|
|
614
|
+
data: c
|
|
610
615
|
}
|
|
611
616
|
}
|
|
612
617
|
},
|
|
613
|
-
setPropertyRelates(
|
|
614
|
-
if (
|
|
615
|
-
switch (
|
|
618
|
+
setPropertyRelates(s, m) {
|
|
619
|
+
if (s)
|
|
620
|
+
switch (s && s.propertyID) {
|
|
616
621
|
case "type": {
|
|
617
|
-
n.changeControlType(e,
|
|
622
|
+
n.changeControlType(e, s, t);
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
case "label": {
|
|
626
|
+
s.needRefreshControlTree = !0;
|
|
618
627
|
break;
|
|
619
628
|
}
|
|
620
629
|
}
|
|
@@ -660,12 +669,12 @@ class be extends ge {
|
|
|
660
669
|
* @param newControlType 新控件类型
|
|
661
670
|
*/
|
|
662
671
|
changeControlType(e, t, n) {
|
|
663
|
-
var i, l,
|
|
664
|
-
const o = t.propertyValue,
|
|
665
|
-
if (!
|
|
672
|
+
var i, l, p, d;
|
|
673
|
+
const o = t.propertyValue, c = n && n.parent && n.parent.schema;
|
|
674
|
+
if (!c)
|
|
666
675
|
return;
|
|
667
|
-
const
|
|
668
|
-
let
|
|
676
|
+
const u = c.contents.findIndex((f) => f.id === e.id), s = c.contents[u];
|
|
677
|
+
let m;
|
|
669
678
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
670
679
|
editor: {
|
|
671
680
|
$type: o
|
|
@@ -673,30 +682,30 @@ class be extends ge {
|
|
|
673
682
|
name: this.designViewModelField.name,
|
|
674
683
|
require: this.designViewModelField.require,
|
|
675
684
|
readonly: this.designViewModelField.readonly
|
|
676
|
-
}, !1),
|
|
677
|
-
id:
|
|
678
|
-
appearance:
|
|
679
|
-
size:
|
|
680
|
-
label:
|
|
681
|
-
binding:
|
|
682
|
-
visible:
|
|
683
|
-
}), Object.assign(
|
|
684
|
-
isTextArea:
|
|
685
|
-
placeholder: (i =
|
|
686
|
-
holdPlace: (l =
|
|
687
|
-
readonly: (
|
|
688
|
-
require: (
|
|
689
|
-
}),
|
|
685
|
+
}, !1), m = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), m || (m = z("form-group") || {}, m.editor = z(o) || {}, delete m.editor.id, delete m.editor.binding, delete m.editor.appearance), Object.assign(m, {
|
|
686
|
+
id: s.id,
|
|
687
|
+
appearance: s.appearance,
|
|
688
|
+
size: s.size,
|
|
689
|
+
label: s.label,
|
|
690
|
+
binding: s.binding,
|
|
691
|
+
visible: s.visible
|
|
692
|
+
}), Object.assign(m.editor, {
|
|
693
|
+
isTextArea: m.isTextArea && s.isTextArea,
|
|
694
|
+
placeholder: (i = s.editor) == null ? void 0 : i.placeholder,
|
|
695
|
+
holdPlace: (l = s.editor) == null ? void 0 : l.holdPlace,
|
|
696
|
+
readonly: (p = s.editor) == null ? void 0 : p.readonly,
|
|
697
|
+
require: (d = s.editor) == null ? void 0 : d.require
|
|
698
|
+
}), c.contents.splice(u, 1), c.contents.splice(u, 0, m), n.schema = Object.assign(s, m), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
690
699
|
(f) => f.classList.remove("dgComponentSelected")
|
|
691
|
-
),
|
|
700
|
+
), be.value++;
|
|
692
701
|
}
|
|
693
702
|
getComponentConfig(e, t = {}, n = {}) {
|
|
694
703
|
const o = Object.assign({
|
|
695
|
-
description: "
|
|
696
|
-
title: "
|
|
704
|
+
description: "编辑器",
|
|
705
|
+
title: "编辑器",
|
|
697
706
|
type: "input-group",
|
|
698
707
|
$converter: "/converter/property-editor.converter"
|
|
699
|
-
}, t),
|
|
708
|
+
}, t), c = Object.assign({
|
|
700
709
|
readonly: {
|
|
701
710
|
description: "",
|
|
702
711
|
title: "只读",
|
|
@@ -718,10 +727,10 @@ class be extends ge {
|
|
|
718
727
|
type: "string"
|
|
719
728
|
}
|
|
720
729
|
}, n);
|
|
721
|
-
return { ...o, properties: { ...
|
|
730
|
+
return { ...o, properties: { ...c } };
|
|
722
731
|
}
|
|
723
732
|
}
|
|
724
|
-
class
|
|
733
|
+
class Ce extends we {
|
|
725
734
|
constructor(e, t) {
|
|
726
735
|
super(e, t);
|
|
727
736
|
}
|
|
@@ -756,6 +765,7 @@ class we extends be {
|
|
|
756
765
|
size: {
|
|
757
766
|
description: "",
|
|
758
767
|
title: "尺寸",
|
|
768
|
+
type: "enum",
|
|
759
769
|
editor: {
|
|
760
770
|
data: [
|
|
761
771
|
{
|
|
@@ -776,114 +786,114 @@ class we extends be {
|
|
|
776
786
|
});
|
|
777
787
|
}
|
|
778
788
|
}
|
|
779
|
-
function
|
|
789
|
+
function ke(r, e) {
|
|
780
790
|
r.schema;
|
|
781
|
-
const t =
|
|
782
|
-
function o(
|
|
791
|
+
const t = k(!0), n = k(!0);
|
|
792
|
+
function o(p) {
|
|
783
793
|
return !1;
|
|
784
794
|
}
|
|
785
|
-
function
|
|
795
|
+
function c() {
|
|
786
796
|
return !1;
|
|
787
797
|
}
|
|
788
|
-
function
|
|
798
|
+
function u() {
|
|
789
799
|
return !1;
|
|
790
800
|
}
|
|
791
|
-
function
|
|
801
|
+
function s() {
|
|
792
802
|
return !0;
|
|
793
803
|
}
|
|
794
|
-
function
|
|
804
|
+
function m(p) {
|
|
795
805
|
}
|
|
796
806
|
function i() {
|
|
797
807
|
}
|
|
798
|
-
function l(
|
|
808
|
+
function l(p) {
|
|
799
809
|
return null;
|
|
800
810
|
}
|
|
801
811
|
return {
|
|
802
812
|
canAccepts: o,
|
|
803
|
-
checkCanDeleteComponent:
|
|
804
|
-
checkCanMoveComponent:
|
|
805
|
-
hideNestedPaddingInDesginerView:
|
|
806
|
-
onAcceptMovedChildElement:
|
|
813
|
+
checkCanDeleteComponent: c,
|
|
814
|
+
checkCanMoveComponent: u,
|
|
815
|
+
hideNestedPaddingInDesginerView: s,
|
|
816
|
+
onAcceptMovedChildElement: m,
|
|
807
817
|
resolveComponentContext: i,
|
|
808
818
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
809
819
|
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
810
820
|
getPropsConfig: l
|
|
811
821
|
};
|
|
812
822
|
}
|
|
813
|
-
function
|
|
823
|
+
function Me(r, e) {
|
|
814
824
|
const {
|
|
815
825
|
canAccepts: t,
|
|
816
826
|
checkCanDeleteComponent: n,
|
|
817
827
|
checkCanMoveComponent: o,
|
|
818
|
-
hideNestedPaddingInDesginerView:
|
|
819
|
-
onAcceptMovedChildElement:
|
|
820
|
-
resolveComponentContext:
|
|
821
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
828
|
+
hideNestedPaddingInDesginerView: c,
|
|
829
|
+
onAcceptMovedChildElement: u,
|
|
830
|
+
resolveComponentContext: s,
|
|
831
|
+
triggerBelongedComponentToMoveWhenMoved: m,
|
|
822
832
|
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
823
|
-
} =
|
|
824
|
-
function
|
|
825
|
-
return new
|
|
833
|
+
} = ke(r), l = r.schema;
|
|
834
|
+
function p(d, f) {
|
|
835
|
+
return new Ce(d, e).getPropertyConfig(l, f);
|
|
826
836
|
}
|
|
827
837
|
return {
|
|
828
838
|
canAccepts: t,
|
|
829
839
|
checkCanDeleteComponent: n,
|
|
830
840
|
checkCanMoveComponent: o,
|
|
831
|
-
hideNestedPaddingInDesginerView:
|
|
832
|
-
onAcceptMovedChildElement:
|
|
833
|
-
resolveComponentContext:
|
|
834
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
841
|
+
hideNestedPaddingInDesginerView: c,
|
|
842
|
+
onAcceptMovedChildElement: u,
|
|
843
|
+
resolveComponentContext: s,
|
|
844
|
+
triggerBelongedComponentToMoveWhenMoved: m,
|
|
835
845
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
836
|
-
getPropsConfig:
|
|
846
|
+
getPropsConfig: p
|
|
837
847
|
};
|
|
838
848
|
}
|
|
839
|
-
const
|
|
849
|
+
const Te = /* @__PURE__ */ G({
|
|
840
850
|
name: "FSwitchDesign",
|
|
841
|
-
props:
|
|
851
|
+
props: U,
|
|
842
852
|
emits: ["update:modelValue"],
|
|
843
853
|
setup(r, e) {
|
|
844
854
|
const {
|
|
845
855
|
size: t,
|
|
846
856
|
onLabel: n,
|
|
847
857
|
offLabel: o
|
|
848
|
-
} = L(r),
|
|
858
|
+
} = L(r), c = k(), u = q("designer-host-service"), s = q("design-item-context"), m = Me(s, u), i = ge(c, s, m);
|
|
849
859
|
x(() => {
|
|
850
|
-
|
|
860
|
+
c.value.componentInstance = i;
|
|
851
861
|
}), e.expose(i.value);
|
|
852
|
-
const l =
|
|
862
|
+
const l = B(() => ({
|
|
853
863
|
switch: !0,
|
|
854
864
|
"f-cmp-switch": !0,
|
|
855
865
|
checked: !1,
|
|
856
866
|
"switch-large": t.value === "large",
|
|
857
867
|
"switch-medium": t.value === "medium",
|
|
858
868
|
"switch-small": t.value === "small"
|
|
859
|
-
})),
|
|
860
|
-
return () =>
|
|
861
|
-
ref:
|
|
869
|
+
})), p = B(() => (n == null ? void 0 : n.value) || (o == null ? void 0 : o.value));
|
|
870
|
+
return () => C("span", {
|
|
871
|
+
ref: c,
|
|
862
872
|
tabindex: "0",
|
|
863
873
|
role: "button",
|
|
864
874
|
class: l.value
|
|
865
|
-
}, [
|
|
875
|
+
}, [p.value && C("span", {
|
|
866
876
|
class: "switch-pane"
|
|
867
|
-
}, [
|
|
877
|
+
}, [C("span", {
|
|
868
878
|
class: "switch-label-unchecked"
|
|
869
|
-
}, [o == null ? void 0 : o.value])]),
|
|
879
|
+
}, [o == null ? void 0 : o.value])]), C("small", null, [e.slots.default && e.slots.default()])]);
|
|
870
880
|
}
|
|
871
|
-
}),
|
|
881
|
+
}), Se = (r) => {
|
|
872
882
|
const e = r;
|
|
873
883
|
return e.install = function(t) {
|
|
874
884
|
t.component(e.name, r);
|
|
875
885
|
}, r;
|
|
876
886
|
};
|
|
877
|
-
|
|
878
|
-
r.switch =
|
|
887
|
+
F.register = (r, e, t, n) => {
|
|
888
|
+
r.switch = F, e.switch = X;
|
|
879
889
|
};
|
|
880
|
-
|
|
881
|
-
r.switch =
|
|
890
|
+
F.registerDesigner = (r, e, t) => {
|
|
891
|
+
r.switch = Te, e.switch = X;
|
|
882
892
|
};
|
|
883
|
-
const
|
|
893
|
+
const Fe = Se(F);
|
|
884
894
|
export {
|
|
885
|
-
|
|
886
|
-
|
|
895
|
+
F as FSwitch,
|
|
896
|
+
Fe as default,
|
|
887
897
|
X as propsResolver,
|
|
888
|
-
|
|
898
|
+
U as switchProps
|
|
889
899
|
};
|