@farris/ui-vue 1.2.8 → 1.3.0
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 +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- 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.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- 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 +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- 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 +38 -37
- 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 +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- 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 +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- 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 +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- 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 +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- 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 +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- 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/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -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/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -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 +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- 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 +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- 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/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- 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/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,101 +1,102 @@
|
|
|
1
1
|
var _ = Object.defineProperty;
|
|
2
|
-
var H = (
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import {
|
|
6
|
-
import { getSchemaByType as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var H = (a, t, e) => t in a ? _(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var g = (a, t, e) => H(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as W, toRefs as z, ref as w, computed as E, watch as j, createVNode as k, inject as q, onMounted as R } from "vue";
|
|
5
|
+
import { isPlainObject as I, cloneDeep as x } from "lodash-es";
|
|
6
|
+
import { getSchemaByType as G } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
import { useResponseLayoutEditorSetting as K } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
8
|
+
const J = {}, X = {};
|
|
9
|
+
function U(a) {
|
|
10
|
+
const { properties: t, title: e, ignore: o } = a, n = o && Array.isArray(o), i = Object.keys(t).reduce((c, d) => ((!n || !o.find((u) => u == d)) && (c[d] = t[d].type === "object" && t[d].properties ? U(t[d]) : x(t[d].default)), c), {});
|
|
11
|
+
return (!n || !o.find((c) => c == "id")) && (i.id = `${e}-${Date.now()}`), i;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
let n =
|
|
16
|
-
const
|
|
17
|
-
return n =
|
|
13
|
+
function L(a, t = {}, e) {
|
|
14
|
+
const o = J[a];
|
|
15
|
+
if (o) {
|
|
16
|
+
let n = U(o);
|
|
17
|
+
const i = X[a];
|
|
18
|
+
return n = i ? i({ getSchemaByType: L }, n, t, e) : n, n;
|
|
18
19
|
}
|
|
19
20
|
return null;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
return Object.keys(
|
|
22
|
+
function ee(a, t) {
|
|
23
|
+
const e = U(t);
|
|
24
|
+
return Object.keys(a).reduce((o, n) => (o[n] && I(o[n]) && I(a[n]) ? Object.assign(o[n], a[n]) : o[n] = a[n], o), e), e;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return Object.keys(
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
|
|
26
|
+
function te(a, t) {
|
|
27
|
+
return Object.keys(a).filter((o) => a[o] != null).reduce((o, n) => {
|
|
28
|
+
if (t.has(n)) {
|
|
29
|
+
const i = t.get(n);
|
|
30
|
+
if (typeof i == "string")
|
|
31
|
+
o[i] = a[n];
|
|
31
32
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
33
|
+
const c = i(n, a[n], a);
|
|
34
|
+
Object.assign(o, c);
|
|
34
35
|
}
|
|
35
36
|
} else
|
|
36
|
-
n
|
|
37
|
-
return
|
|
37
|
+
o[n] = a[n];
|
|
38
|
+
return o;
|
|
38
39
|
}, {});
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
41
|
+
function ne(a, t, e = /* @__PURE__ */ new Map()) {
|
|
42
|
+
const o = ee(a, t);
|
|
43
|
+
return te(o, e);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
function
|
|
46
|
-
if (typeof
|
|
47
|
-
return
|
|
48
|
-
if (typeof
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
45
|
+
function oe(a = {}) {
|
|
46
|
+
function t(r, s, l, m) {
|
|
47
|
+
if (typeof l == "number")
|
|
48
|
+
return m[r].length === l;
|
|
49
|
+
if (typeof l == "object") {
|
|
50
|
+
const h = Object.keys(l)[0], f = l[h];
|
|
51
|
+
if (h === "not")
|
|
52
|
+
return Number(m[r].length) !== Number(f);
|
|
53
|
+
if (h === "moreThan")
|
|
54
|
+
return Number(m[r].length) >= Number(f);
|
|
55
|
+
if (h === "lessThan")
|
|
56
|
+
return Number(m[r].length) <= Number(f);
|
|
56
57
|
}
|
|
57
58
|
return !1;
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
60
|
+
function e(r, s, l, m) {
|
|
61
|
+
return m[r] && m[r].propertyValue && String(m[r].propertyValue.value) === String(l);
|
|
61
62
|
}
|
|
62
|
-
const
|
|
63
|
-
["length",
|
|
64
|
-
["getProperty",
|
|
63
|
+
const o = /* @__PURE__ */ new Map([
|
|
64
|
+
["length", t],
|
|
65
|
+
["getProperty", e]
|
|
65
66
|
]);
|
|
66
|
-
Object.keys(
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const
|
|
73
|
-
return { target:
|
|
67
|
+
Object.keys(a).reduce((r, s) => (r.set(s, a[s]), r), o);
|
|
68
|
+
function n(r, s) {
|
|
69
|
+
const l = r;
|
|
70
|
+
return typeof s == "number" ? [{ target: l, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: l, operator: "getProperty", param: r, value: !!s }] : typeof s == "object" ? Object.keys(s).map((m) => {
|
|
71
|
+
if (m === "length")
|
|
72
|
+
return { target: l, operator: "length", param: null, value: s[m] };
|
|
73
|
+
const h = m, f = s[m];
|
|
74
|
+
return { target: l, operator: "getProperty", param: h, value: f };
|
|
74
75
|
}) : [];
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(
|
|
78
|
-
const
|
|
79
|
-
return
|
|
77
|
+
function i(r) {
|
|
78
|
+
return Object.keys(r).reduce((l, m) => {
|
|
79
|
+
const h = n(m, r[m]);
|
|
80
|
+
return l.push(...h), l;
|
|
80
81
|
}, []);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
return
|
|
83
|
+
function c(r, s) {
|
|
84
|
+
if (o.has(r.operator)) {
|
|
85
|
+
const l = o.get(r.operator);
|
|
86
|
+
return l && l(r.target, r.param, r.value, s) || !1;
|
|
86
87
|
}
|
|
87
88
|
return !1;
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
90
|
+
function d(r, s) {
|
|
91
|
+
return i(r).reduce((h, f) => h && c(f, s), !0);
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
return
|
|
93
|
+
function u(r, s) {
|
|
94
|
+
const l = Object.keys(r), m = l.includes("allOf"), h = l.includes("anyOf"), f = m || h, S = (f ? r[f ? m ? "allOf" : "anyOf" : "allOf"] : [r]).map((D) => d(D, s));
|
|
95
|
+
return m ? !S.includes(!1) : S.includes(!0);
|
|
95
96
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
97
|
+
return { parseValueSchema: u };
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
+
const p = {
|
|
99
100
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
100
101
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
101
102
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -132,21 +133,22 @@ const a = {
|
|
|
132
133
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
133
134
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
134
135
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
135
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
137
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
138
|
+
}, re = {}, ie = {};
|
|
139
|
+
oe();
|
|
140
|
+
function ae(a, t, e = /* @__PURE__ */ new Map(), o = (c, d, u) => d, n = {}, i = (c) => c) {
|
|
141
|
+
return J[t.title] = t, X[t.title] = o, re[t.title] = n, ie[t.title] = i, (c = {}) => {
|
|
142
|
+
const d = ne(c, t, e), u = Object.keys(a).reduce((r, s) => (r[s] = a[s].default, r), {});
|
|
143
|
+
return Object.assign(u, d);
|
|
142
144
|
};
|
|
143
145
|
}
|
|
144
|
-
function
|
|
145
|
-
return { customClass:
|
|
146
|
+
function se(a, t) {
|
|
147
|
+
return { customClass: t.class, customStyle: t.style };
|
|
146
148
|
}
|
|
147
|
-
const
|
|
148
|
-
["appearance",
|
|
149
|
-
]),
|
|
149
|
+
const le = /* @__PURE__ */ new Map([
|
|
150
|
+
["appearance", se]
|
|
151
|
+
]), ce = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/switch.schema.json", ue = "switch", de = "A Farris Component", me = "object", fe = {
|
|
150
152
|
id: {
|
|
151
153
|
description: "The unique identifier for a switch",
|
|
152
154
|
type: "string"
|
|
@@ -216,24 +218,29 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
216
218
|
size: {
|
|
217
219
|
description: "",
|
|
218
220
|
type: "enum",
|
|
219
|
-
default: "
|
|
221
|
+
default: "middle"
|
|
220
222
|
}
|
|
221
|
-
},
|
|
223
|
+
}, ye = [
|
|
222
224
|
"id",
|
|
223
225
|
"type"
|
|
224
|
-
],
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
], he = [
|
|
227
|
+
"id",
|
|
228
|
+
"appearance",
|
|
229
|
+
"binding"
|
|
230
|
+
], ge = {
|
|
231
|
+
$schema: ce,
|
|
232
|
+
$id: pe,
|
|
233
|
+
title: ue,
|
|
234
|
+
description: de,
|
|
235
|
+
type: me,
|
|
236
|
+
properties: fe,
|
|
237
|
+
required: ye,
|
|
238
|
+
ignore: he
|
|
232
239
|
};
|
|
233
|
-
function
|
|
234
|
-
return
|
|
240
|
+
function ve(a, t, e) {
|
|
241
|
+
return t;
|
|
235
242
|
}
|
|
236
|
-
const
|
|
243
|
+
const N = {
|
|
237
244
|
/** 组件值*/
|
|
238
245
|
modelValue: { type: Boolean, default: !1 },
|
|
239
246
|
/** 禁用 */
|
|
@@ -249,189 +256,189 @@ const $ = {
|
|
|
249
256
|
/** 开关值变化事件 */
|
|
250
257
|
onModelValueChanged: { type: Function, default: () => {
|
|
251
258
|
} }
|
|
252
|
-
},
|
|
259
|
+
}, Q = ae(N, ge, le, ve), V = /* @__PURE__ */ W({
|
|
253
260
|
name: "FSwitch",
|
|
254
|
-
props:
|
|
261
|
+
props: N,
|
|
255
262
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
256
|
-
setup(
|
|
263
|
+
setup(a, t) {
|
|
257
264
|
const {
|
|
258
|
-
disabled:
|
|
259
|
-
size:
|
|
260
|
-
onLabel:
|
|
261
|
-
offLabel:
|
|
262
|
-
onBackground:
|
|
263
|
-
offBackground:
|
|
264
|
-
onColor:
|
|
265
|
-
offColor:
|
|
266
|
-
} =
|
|
265
|
+
disabled: e,
|
|
266
|
+
size: o,
|
|
267
|
+
onLabel: n,
|
|
268
|
+
offLabel: i,
|
|
269
|
+
onBackground: c,
|
|
270
|
+
offBackground: d,
|
|
271
|
+
onColor: u,
|
|
272
|
+
offColor: r
|
|
273
|
+
} = z(a), s = w(a.modelValue), l = E(() => ({
|
|
267
274
|
switch: !0,
|
|
268
275
|
"f-cmp-switch": !0,
|
|
269
|
-
checked:
|
|
270
|
-
disabled:
|
|
271
|
-
"switch-large":
|
|
272
|
-
"switch-medium":
|
|
273
|
-
"switch-small":
|
|
274
|
-
})),
|
|
276
|
+
checked: s.value,
|
|
277
|
+
disabled: e.value,
|
|
278
|
+
"switch-large": o.value === "large",
|
|
279
|
+
"switch-medium": o.value === "medium",
|
|
280
|
+
"switch-small": o.value === "small"
|
|
281
|
+
})), m = E(() => s.value ? {
|
|
275
282
|
outline: "none",
|
|
276
|
-
background:
|
|
283
|
+
background: c.value
|
|
277
284
|
} : {
|
|
278
285
|
outline: "none",
|
|
279
|
-
backgroundColor:
|
|
280
|
-
}),
|
|
281
|
-
background:
|
|
286
|
+
backgroundColor: d.value
|
|
287
|
+
}), h = E(() => s.value ? {
|
|
288
|
+
background: u.value
|
|
282
289
|
} : {
|
|
283
|
-
backgroundColor:
|
|
284
|
-
}),
|
|
285
|
-
function
|
|
286
|
-
|
|
290
|
+
backgroundColor: r.value
|
|
291
|
+
}), f = E(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
|
|
292
|
+
function T() {
|
|
293
|
+
e.value || (s.value = !s.value, t.emit("update:modelValue", s.value));
|
|
287
294
|
}
|
|
288
|
-
return
|
|
289
|
-
|
|
290
|
-
}),
|
|
291
|
-
|
|
292
|
-
}), () =>
|
|
295
|
+
return j(s, (M, S) => {
|
|
296
|
+
M !== S && t.emit("modelValueChanged", M);
|
|
297
|
+
}), j(() => a.modelValue, (M, S) => {
|
|
298
|
+
M !== S && (s.value = M);
|
|
299
|
+
}), () => k("span", {
|
|
293
300
|
tabindex: "0",
|
|
294
301
|
role: "button",
|
|
295
|
-
class:
|
|
296
|
-
style:
|
|
297
|
-
onClick:
|
|
298
|
-
}, [
|
|
302
|
+
class: l.value,
|
|
303
|
+
style: m.value,
|
|
304
|
+
onClick: T
|
|
305
|
+
}, [f.value && k("span", {
|
|
299
306
|
class: "switch-pane"
|
|
300
|
-
}, [
|
|
307
|
+
}, [k("span", {
|
|
301
308
|
class: "switch-label-checked"
|
|
302
|
-
}, [
|
|
309
|
+
}, [n == null ? void 0 : n.value]), k("span", {
|
|
303
310
|
class: "switch-label-unchecked"
|
|
304
|
-
}, [
|
|
305
|
-
style:
|
|
306
|
-
}, [
|
|
311
|
+
}, [i == null ? void 0 : i.value])]), k("small", {
|
|
312
|
+
style: h.value
|
|
313
|
+
}, [t.slots.default && t.slots.default()])]);
|
|
307
314
|
}
|
|
308
315
|
});
|
|
309
|
-
function
|
|
316
|
+
function Ce(a, t, e) {
|
|
310
317
|
var O;
|
|
311
|
-
function
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
n();
|
|
315
|
-
const o = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", m = C();
|
|
316
|
-
function p() {
|
|
317
|
-
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
318
|
+
function o() {
|
|
319
|
+
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
318
320
|
}
|
|
321
|
+
o();
|
|
322
|
+
const n = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", c = w();
|
|
319
323
|
function d() {
|
|
324
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
325
|
+
}
|
|
326
|
+
function u() {
|
|
320
327
|
return !1;
|
|
321
328
|
}
|
|
322
|
-
function
|
|
323
|
-
return (
|
|
329
|
+
function r() {
|
|
330
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
324
331
|
}
|
|
325
|
-
function
|
|
326
|
-
return (
|
|
332
|
+
function s() {
|
|
333
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
327
334
|
}
|
|
328
|
-
function
|
|
335
|
+
function l(y) {
|
|
329
336
|
if (!y || !y.value)
|
|
330
337
|
return null;
|
|
331
338
|
if (y.value.schema && y.value.schema.type === "component")
|
|
332
339
|
return y.value;
|
|
333
|
-
const v =
|
|
334
|
-
return
|
|
340
|
+
const v = w(y == null ? void 0 : y.value.parent), C = l(v);
|
|
341
|
+
return C || null;
|
|
335
342
|
}
|
|
336
|
-
function
|
|
337
|
-
const { componentInstance: v, designerItemElementRef:
|
|
338
|
-
return !v || !v.value ? null : v.value.canMove ?
|
|
343
|
+
function m(y = t) {
|
|
344
|
+
const { componentInstance: v, designerItemElementRef: C } = y;
|
|
345
|
+
return !v || !v.value ? null : v.value.canMove ? C : m(y.parent);
|
|
339
346
|
}
|
|
340
|
-
function
|
|
341
|
-
return !!
|
|
347
|
+
function h(y) {
|
|
348
|
+
return !!e && e.canAccepts(y);
|
|
342
349
|
}
|
|
343
|
-
function
|
|
344
|
-
return (
|
|
350
|
+
function f() {
|
|
351
|
+
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
345
352
|
}
|
|
346
|
-
function
|
|
353
|
+
function T() {
|
|
347
354
|
}
|
|
348
|
-
function
|
|
349
|
-
v &&
|
|
355
|
+
function M(y, v) {
|
|
356
|
+
v && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(v);
|
|
350
357
|
}
|
|
351
|
-
function
|
|
352
|
-
const { componentType:
|
|
353
|
-
let
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
return
|
|
358
|
+
function S(y, v) {
|
|
359
|
+
const { componentType: C } = y;
|
|
360
|
+
let b = L(C, y, v);
|
|
361
|
+
e && e.onResolveNewComponentSchema && (b = e.onResolveNewComponentSchema(y, b));
|
|
362
|
+
const F = C.toLowerCase().replace("-", "_");
|
|
363
|
+
return b && !b.id && b.type === C && (b.id = `${F}_${Math.random().toString().slice(2, 6)}`), b;
|
|
357
364
|
}
|
|
358
|
-
function
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
let
|
|
362
|
-
|
|
363
|
-
const Z =
|
|
364
|
-
return
|
|
365
|
+
function $(y, v) {
|
|
366
|
+
const C = String(y.getAttribute("data-controltype")), b = y.getAttribute("data-feature"), F = b ? JSON.parse(b) : {};
|
|
367
|
+
F.parentComponentInstance = c.value;
|
|
368
|
+
let B = L(C, F);
|
|
369
|
+
e && e.onAcceptNewChildElement && (B = e.onAcceptNewChildElement(y, v, B));
|
|
370
|
+
const Z = C.toLowerCase().replace("-", "_");
|
|
371
|
+
return B && !B.id && B.type === C && (B.id = `${Z}_${Math.random().toString().slice(2, 6)}`), B;
|
|
365
372
|
}
|
|
366
|
-
function
|
|
373
|
+
function D(y) {
|
|
367
374
|
}
|
|
368
375
|
function Y(...y) {
|
|
369
|
-
if (
|
|
370
|
-
return
|
|
371
|
-
}
|
|
372
|
-
return
|
|
373
|
-
canMove:
|
|
374
|
-
canSelectParent:
|
|
375
|
-
canDelete:
|
|
376
|
-
canNested: !
|
|
377
|
-
contents:
|
|
378
|
-
elementRef:
|
|
379
|
-
parent: (O =
|
|
380
|
-
schema:
|
|
381
|
-
styles:
|
|
382
|
-
designerClass:
|
|
383
|
-
canAccepts:
|
|
384
|
-
getBelongedComponentInstance:
|
|
385
|
-
getDraggableDesignItemElement:
|
|
386
|
-
getDraggingDisplayText:
|
|
376
|
+
if (e && e.getPropsConfig)
|
|
377
|
+
return e.getPropsConfig(...y);
|
|
378
|
+
}
|
|
379
|
+
return c.value = {
|
|
380
|
+
canMove: d(),
|
|
381
|
+
canSelectParent: u(),
|
|
382
|
+
canDelete: r(),
|
|
383
|
+
canNested: !s(),
|
|
384
|
+
contents: t == null ? void 0 : t.schema.contents,
|
|
385
|
+
elementRef: a,
|
|
386
|
+
parent: (O = t == null ? void 0 : t.parent) == null ? void 0 : O.componentInstance,
|
|
387
|
+
schema: t == null ? void 0 : t.schema,
|
|
388
|
+
styles: n,
|
|
389
|
+
designerClass: i,
|
|
390
|
+
canAccepts: h,
|
|
391
|
+
getBelongedComponentInstance: l,
|
|
392
|
+
getDraggableDesignItemElement: m,
|
|
393
|
+
getDraggingDisplayText: f,
|
|
387
394
|
getPropConfig: Y,
|
|
388
|
-
getDragScopeElement:
|
|
389
|
-
onAcceptMovedChildElement:
|
|
390
|
-
onAcceptNewChildElement:
|
|
391
|
-
onChildElementMovedOut:
|
|
392
|
-
addNewChildComponentSchema:
|
|
393
|
-
updateDragAndDropRules:
|
|
394
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
395
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
396
|
-
},
|
|
395
|
+
getDragScopeElement: T,
|
|
396
|
+
onAcceptMovedChildElement: M,
|
|
397
|
+
onAcceptNewChildElement: $,
|
|
398
|
+
onChildElementMovedOut: D,
|
|
399
|
+
addNewChildComponentSchema: S,
|
|
400
|
+
updateDragAndDropRules: o,
|
|
401
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || w(!1),
|
|
402
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || w(!1)
|
|
403
|
+
}, c;
|
|
397
404
|
}
|
|
398
|
-
class
|
|
399
|
-
constructor(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
405
|
+
class be {
|
|
406
|
+
constructor(t, e) {
|
|
407
|
+
g(this, "componentId");
|
|
408
|
+
g(this, "viewModelId");
|
|
409
|
+
g(this, "eventsEditorUtils");
|
|
410
|
+
g(this, "formSchemaUtils");
|
|
411
|
+
g(this, "formMetadataConverter");
|
|
412
|
+
g(this, "designViewModelUtils");
|
|
413
|
+
g(this, "designViewModelField");
|
|
414
|
+
g(this, "controlCreatorUtils");
|
|
415
|
+
g(this, "designerHostService");
|
|
416
|
+
g(this, "schemaService", null);
|
|
417
|
+
g(this, "metadataService", null);
|
|
418
|
+
g(this, "propertyConfig", {
|
|
412
419
|
type: "object",
|
|
413
420
|
categories: {}
|
|
414
421
|
});
|
|
415
|
-
var
|
|
416
|
-
this.componentId =
|
|
422
|
+
var o;
|
|
423
|
+
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
417
424
|
}
|
|
418
425
|
getTableInfo() {
|
|
419
|
-
var
|
|
420
|
-
return (
|
|
426
|
+
var t;
|
|
427
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
421
428
|
}
|
|
422
|
-
setDesignViewModelField(
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
429
|
+
setDesignViewModelField(t) {
|
|
430
|
+
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
431
|
+
if (e) {
|
|
425
432
|
if (!this.designViewModelField) {
|
|
426
|
-
const
|
|
427
|
-
this.designViewModelField =
|
|
433
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
434
|
+
this.designViewModelField = o.fields.find((n) => n.id === e);
|
|
428
435
|
}
|
|
429
|
-
|
|
436
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
430
437
|
}
|
|
431
438
|
}
|
|
432
|
-
changeFieldEditorType(
|
|
439
|
+
changeFieldEditorType(t, e) {
|
|
433
440
|
}
|
|
434
|
-
getBasicPropConfig(
|
|
441
|
+
getBasicPropConfig(t) {
|
|
435
442
|
return {
|
|
436
443
|
description: "Basic Information",
|
|
437
444
|
title: "基本信息",
|
|
@@ -450,13 +457,13 @@ class ge {
|
|
|
450
457
|
type: "combo-list",
|
|
451
458
|
textField: "name",
|
|
452
459
|
valueField: "value",
|
|
453
|
-
data: [{ value:
|
|
460
|
+
data: [{ value: t.type, name: p[t.type].name }]
|
|
454
461
|
}
|
|
455
462
|
}
|
|
456
463
|
}
|
|
457
464
|
};
|
|
458
465
|
}
|
|
459
|
-
getAppearanceConfig(
|
|
466
|
+
getAppearanceConfig(t = null) {
|
|
460
467
|
return {
|
|
461
468
|
title: "样式",
|
|
462
469
|
description: "Appearance",
|
|
@@ -476,90 +483,105 @@ class ge {
|
|
|
476
483
|
}
|
|
477
484
|
};
|
|
478
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
*
|
|
488
|
+
* @param propertyId
|
|
489
|
+
* @param componentInstance
|
|
490
|
+
* @returns
|
|
491
|
+
*/
|
|
492
|
+
updateElementByParentContainer(t, e) {
|
|
493
|
+
const o = e && e.parent && e.parent.schema;
|
|
494
|
+
if (!o)
|
|
495
|
+
return;
|
|
496
|
+
const n = o.contents.findIndex((c) => c.id === t), i = x(o.contents[n]);
|
|
497
|
+
o.contents.splice(n, 1), o.contents.splice(n, 0, i);
|
|
498
|
+
}
|
|
479
499
|
}
|
|
480
|
-
const
|
|
500
|
+
const P = class P {
|
|
481
501
|
/**
|
|
482
502
|
* 根据绑定字段类型获取可用的输入类控件
|
|
483
503
|
*/
|
|
484
|
-
static getEditorTypesByMDataType(
|
|
485
|
-
const
|
|
486
|
-
return
|
|
504
|
+
static getEditorTypesByMDataType(t) {
|
|
505
|
+
const e = P.fieldControlTypeMapping[t];
|
|
506
|
+
return e || [{ key: "", value: "" }];
|
|
487
507
|
}
|
|
488
508
|
/**
|
|
489
509
|
* 获取所有输入类控件
|
|
490
510
|
*/
|
|
491
511
|
static getAllInputTypes() {
|
|
492
|
-
const
|
|
493
|
-
for (let
|
|
494
|
-
|
|
495
|
-
|
|
512
|
+
const t = [];
|
|
513
|
+
for (let e in P.fieldControlTypeMapping)
|
|
514
|
+
P.fieldControlTypeMapping[e].forEach((o) => {
|
|
515
|
+
t.find((n) => n.key === o.key && n.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
496
516
|
});
|
|
497
|
-
return
|
|
517
|
+
return t;
|
|
498
518
|
}
|
|
499
519
|
};
|
|
500
520
|
/**
|
|
501
521
|
* <字段类型,可配置的控件类型列表>的映射
|
|
502
522
|
*/
|
|
503
|
-
|
|
523
|
+
g(P, "fieldControlTypeMapping", {
|
|
504
524
|
String: [
|
|
505
|
-
{ key:
|
|
506
|
-
{ key:
|
|
507
|
-
{ key:
|
|
508
|
-
{ key:
|
|
509
|
-
{ key:
|
|
510
|
-
{ key:
|
|
511
|
-
{ key:
|
|
525
|
+
{ key: p["input-group"].type, value: p["input-group"].name },
|
|
526
|
+
{ key: p.lookup.type, value: p.lookup.name },
|
|
527
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name },
|
|
528
|
+
{ key: p["check-box"].type, value: p["check-box"].name },
|
|
529
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name },
|
|
530
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
531
|
+
{ key: p.textarea.type, value: p.textarea.name }
|
|
512
532
|
],
|
|
513
533
|
Text: [
|
|
514
|
-
{ key:
|
|
515
|
-
{ key:
|
|
534
|
+
{ key: p.textarea.type, value: p.textarea.name },
|
|
535
|
+
{ key: p.lookup.type, value: p.lookup.name }
|
|
516
536
|
],
|
|
517
537
|
Decimal: [
|
|
518
|
-
{ key:
|
|
538
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
519
539
|
],
|
|
520
540
|
Integer: [
|
|
521
|
-
{ key:
|
|
541
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
522
542
|
],
|
|
523
543
|
Number: [
|
|
524
|
-
{ key:
|
|
544
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
525
545
|
],
|
|
526
546
|
BigNumber: [
|
|
527
|
-
{ key:
|
|
547
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
528
548
|
],
|
|
529
549
|
Date: [
|
|
530
|
-
{ key:
|
|
550
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name }
|
|
531
551
|
],
|
|
532
552
|
DateTime: [
|
|
533
|
-
{ key:
|
|
553
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name }
|
|
534
554
|
],
|
|
535
555
|
Boolean: [
|
|
536
|
-
{ key:
|
|
537
|
-
{ key:
|
|
556
|
+
{ key: p.switch.type, value: p.switch.name },
|
|
557
|
+
{ key: p["check-box"].type, value: p["check-box"].name }
|
|
538
558
|
],
|
|
539
559
|
Enum: [
|
|
540
|
-
{ key:
|
|
541
|
-
{ key:
|
|
560
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
561
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name }
|
|
542
562
|
],
|
|
543
563
|
Object: [
|
|
544
|
-
{ key:
|
|
545
|
-
{ key:
|
|
546
|
-
{ key:
|
|
564
|
+
{ key: p.lookup.type, value: p.lookup.name },
|
|
565
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
566
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name }
|
|
547
567
|
]
|
|
548
568
|
});
|
|
549
|
-
let
|
|
550
|
-
const
|
|
551
|
-
class
|
|
552
|
-
constructor(e,
|
|
553
|
-
super(e,
|
|
569
|
+
let A = P;
|
|
570
|
+
const ke = w(0);
|
|
571
|
+
class we extends be {
|
|
572
|
+
constructor(e, o) {
|
|
573
|
+
super(e, o);
|
|
574
|
+
g(this, "responseLayoutEditorFunction");
|
|
575
|
+
this.responseLayoutEditorFunction = K(this.formSchemaUtils);
|
|
554
576
|
}
|
|
555
|
-
getPropertyConfig(e,
|
|
556
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(e,
|
|
577
|
+
getPropertyConfig(e, o) {
|
|
578
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, o), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
557
579
|
}
|
|
558
|
-
getBasicProperties(e,
|
|
559
|
-
var
|
|
580
|
+
getBasicProperties(e, o) {
|
|
581
|
+
var d;
|
|
560
582
|
var n = this;
|
|
561
583
|
this.setDesignViewModelField(e);
|
|
562
|
-
const
|
|
584
|
+
const i = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
563
585
|
return {
|
|
564
586
|
description: "Basic Information",
|
|
565
587
|
title: "基本信息",
|
|
@@ -571,8 +593,8 @@ class be extends ge {
|
|
|
571
593
|
readonly: !0
|
|
572
594
|
},
|
|
573
595
|
type: {
|
|
574
|
-
description: "
|
|
575
|
-
title: "
|
|
596
|
+
description: "编辑器类型",
|
|
597
|
+
title: "编辑器类型",
|
|
576
598
|
type: "string",
|
|
577
599
|
refreshPanelAfterChanged: !0,
|
|
578
600
|
$converter: "/converter/change-editor.converter",
|
|
@@ -581,7 +603,7 @@ class be extends ge {
|
|
|
581
603
|
textField: "value",
|
|
582
604
|
valueField: "key",
|
|
583
605
|
editable: !1,
|
|
584
|
-
data: n.designViewModelField ?
|
|
606
|
+
data: n.designViewModelField ? A.getEditorTypesByMDataType((d = n.designViewModelField.type) == null ? void 0 : d.name) : A.getAllInputTypes()
|
|
585
607
|
}
|
|
586
608
|
},
|
|
587
609
|
label: {
|
|
@@ -598,7 +620,7 @@ class be extends ge {
|
|
|
598
620
|
bindingType: { enable: !1 },
|
|
599
621
|
editorParams: {
|
|
600
622
|
propertyData: e,
|
|
601
|
-
formBasicInfo:
|
|
623
|
+
formBasicInfo: i
|
|
602
624
|
},
|
|
603
625
|
columns: [
|
|
604
626
|
{ field: "name", title: "字段名称" },
|
|
@@ -606,22 +628,27 @@ class be extends ge {
|
|
|
606
628
|
{ field: "fieldType", title: "字段类型" }
|
|
607
629
|
],
|
|
608
630
|
textField: "bindingField",
|
|
609
|
-
data:
|
|
631
|
+
data: c
|
|
610
632
|
}
|
|
611
633
|
}
|
|
612
634
|
},
|
|
613
|
-
setPropertyRelates(
|
|
614
|
-
if (
|
|
615
|
-
switch (
|
|
635
|
+
setPropertyRelates(u, r) {
|
|
636
|
+
if (u)
|
|
637
|
+
switch (u && u.propertyID) {
|
|
616
638
|
case "type": {
|
|
617
|
-
n.changeControlType(e,
|
|
639
|
+
n.changeControlType(e, u, o);
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
case "label": {
|
|
643
|
+
u.needRefreshControlTree = !0;
|
|
618
644
|
break;
|
|
619
645
|
}
|
|
620
646
|
}
|
|
621
647
|
}
|
|
622
648
|
};
|
|
623
649
|
}
|
|
624
|
-
getAppearanceProperties(e) {
|
|
650
|
+
getAppearanceProperties(e, o) {
|
|
651
|
+
var n = this;
|
|
625
652
|
return {
|
|
626
653
|
title: "样式",
|
|
627
654
|
description: "Appearance",
|
|
@@ -642,12 +669,25 @@ class be extends ge {
|
|
|
642
669
|
description: "响应式列宽",
|
|
643
670
|
title: "响应式列宽",
|
|
644
671
|
type: "boolean",
|
|
645
|
-
visible: !
|
|
672
|
+
visible: !0,
|
|
673
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
674
|
+
refreshPanelAfterChanged: !0,
|
|
646
675
|
editor: {
|
|
647
|
-
type: "response-layout-editor-setting"
|
|
648
|
-
|
|
649
|
-
|
|
676
|
+
type: "response-layout-editor-setting",
|
|
677
|
+
initialState: n.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, n.componentId)
|
|
678
|
+
}
|
|
650
679
|
}
|
|
680
|
+
},
|
|
681
|
+
setPropertyRelates(i, c) {
|
|
682
|
+
if (i)
|
|
683
|
+
switch (i && i.propertyID) {
|
|
684
|
+
case "responseLayout":
|
|
685
|
+
n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, o), delete e.responseLayout;
|
|
686
|
+
break;
|
|
687
|
+
case "class":
|
|
688
|
+
n.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, o);
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
651
691
|
}
|
|
652
692
|
};
|
|
653
693
|
}
|
|
@@ -659,44 +699,44 @@ class be extends ge {
|
|
|
659
699
|
* @param propertyData 控件DOM属性
|
|
660
700
|
* @param newControlType 新控件类型
|
|
661
701
|
*/
|
|
662
|
-
changeControlType(e,
|
|
663
|
-
var
|
|
664
|
-
const
|
|
665
|
-
if (!
|
|
702
|
+
changeControlType(e, o, n) {
|
|
703
|
+
var s, l, m, h;
|
|
704
|
+
const i = o.propertyValue, c = n && n.parent && n.parent.schema;
|
|
705
|
+
if (!c)
|
|
666
706
|
return;
|
|
667
|
-
const
|
|
668
|
-
let
|
|
707
|
+
const d = c.contents.findIndex((f) => f.id === e.id), u = c.contents[d];
|
|
708
|
+
let r;
|
|
669
709
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
670
710
|
editor: {
|
|
671
|
-
$type:
|
|
711
|
+
$type: i
|
|
672
712
|
},
|
|
673
713
|
name: this.designViewModelField.name,
|
|
674
714
|
require: this.designViewModelField.require,
|
|
675
715
|
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: (
|
|
686
|
-
holdPlace: (l =
|
|
687
|
-
readonly: (
|
|
688
|
-
require: (
|
|
689
|
-
}),
|
|
716
|
+
}, !1), r = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), r || (r = G("form-group") || {}, r.editor = G(i) || {}, delete r.editor.id, delete r.editor.binding, delete r.editor.appearance), Object.assign(r, {
|
|
717
|
+
id: u.id,
|
|
718
|
+
appearance: u.appearance,
|
|
719
|
+
size: u.size,
|
|
720
|
+
label: u.label,
|
|
721
|
+
binding: u.binding,
|
|
722
|
+
visible: u.visible
|
|
723
|
+
}), Object.assign(r.editor, {
|
|
724
|
+
isTextArea: r.isTextArea && u.isTextArea,
|
|
725
|
+
placeholder: (s = u.editor) == null ? void 0 : s.placeholder,
|
|
726
|
+
holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
|
|
727
|
+
readonly: (m = u.editor) == null ? void 0 : m.readonly,
|
|
728
|
+
require: (h = u.editor) == null ? void 0 : h.require
|
|
729
|
+
}), c.contents.splice(d, 1), c.contents.splice(d, 0, r), n.schema = Object.assign(u, r), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
690
730
|
(f) => f.classList.remove("dgComponentSelected")
|
|
691
|
-
),
|
|
731
|
+
), ke.value++;
|
|
692
732
|
}
|
|
693
|
-
getComponentConfig(e,
|
|
694
|
-
const
|
|
695
|
-
description: "
|
|
696
|
-
title: "
|
|
733
|
+
getComponentConfig(e, o = {}, n = {}) {
|
|
734
|
+
const i = Object.assign({
|
|
735
|
+
description: "编辑器",
|
|
736
|
+
title: "编辑器",
|
|
697
737
|
type: "input-group",
|
|
698
738
|
$converter: "/converter/property-editor.converter"
|
|
699
|
-
},
|
|
739
|
+
}, o), c = Object.assign({
|
|
700
740
|
readonly: {
|
|
701
741
|
description: "",
|
|
702
742
|
title: "只读",
|
|
@@ -718,15 +758,63 @@ class be extends ge {
|
|
|
718
758
|
type: "string"
|
|
719
759
|
}
|
|
720
760
|
}, n);
|
|
721
|
-
return { ...
|
|
761
|
+
return { ...i, properties: { ...c } };
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
765
|
+
* @param controlClass 控件样式
|
|
766
|
+
* @param controlId 控件Id
|
|
767
|
+
* @param componentId 控件所在组件id
|
|
768
|
+
*/
|
|
769
|
+
updateUnifiedLayoutAfterControlChanged(e, o, n) {
|
|
770
|
+
const i = e.split(" ");
|
|
771
|
+
let c = i.find((l) => /^col-([1-9]|10|11|12)$/.test(l)), d = i.find((l) => /^col-md-([1-9]|10|11|12)$/.test(l)), u = i.find((l) => /^col-xl-([1-9]|10|11|12)$/.test(l)), r = i.find((l) => /^col-el-([1-9]|10|11|12)$/.test(l));
|
|
772
|
+
c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), u = u || "col-xl-" + d.replace("col-md-", ""), r = r || "col-el-" + u.replace("col-xl-", "");
|
|
773
|
+
const s = {
|
|
774
|
+
id: o,
|
|
775
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
776
|
+
columnInMD: parseInt(d.replace("col-md-", ""), 10),
|
|
777
|
+
columnInLG: parseInt(u.replace("col-xl-", ""), 10),
|
|
778
|
+
columnInEL: parseInt(r.replace("col-el-", ""), 10)
|
|
779
|
+
};
|
|
780
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(n, s);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
784
|
+
* @param componentId 组件Id
|
|
785
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
786
|
+
*/
|
|
787
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
|
|
788
|
+
const { formNode: n } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
789
|
+
if (!n || !n.unifiedLayout)
|
|
790
|
+
return;
|
|
791
|
+
const i = [];
|
|
792
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, i, 1), o) {
|
|
793
|
+
const f = i.find((T) => T.id === o.id);
|
|
794
|
+
Object.assign(f || {}, o);
|
|
795
|
+
}
|
|
796
|
+
const c = i.map((f) => f.columnInSM), d = i.map((f) => f.columnInMD), u = i.map((f) => f.columnInLG), r = i.map((f) => f.columnInEL), s = this.checkIsUniqueColumn(c) ? c[0] : null, l = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(u) ? u[0] : null, h = this.checkIsUniqueColumn(r) ? r[0] : null;
|
|
797
|
+
Object.assign(n.unifiedLayout, {
|
|
798
|
+
uniqueColClassInSM: s,
|
|
799
|
+
uniqueColClassInMD: l,
|
|
800
|
+
uniqueColClassInLG: m,
|
|
801
|
+
uniqueColClassInEL: h
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* 校验宽度样式值是否一致
|
|
806
|
+
*/
|
|
807
|
+
checkIsUniqueColumn(e) {
|
|
808
|
+
const o = new Set(e);
|
|
809
|
+
return Array.from(o).length === 1;
|
|
722
810
|
}
|
|
723
811
|
}
|
|
724
|
-
class
|
|
725
|
-
constructor(
|
|
726
|
-
super(
|
|
812
|
+
class Me extends we {
|
|
813
|
+
constructor(t, e) {
|
|
814
|
+
super(t, e);
|
|
727
815
|
}
|
|
728
|
-
getEditorProperties(
|
|
729
|
-
return this.getComponentConfig(
|
|
816
|
+
getEditorProperties(t) {
|
|
817
|
+
return this.getComponentConfig(t, { type: "switch" }, {
|
|
730
818
|
readonly: {
|
|
731
819
|
visible: !1
|
|
732
820
|
},
|
|
@@ -756,6 +844,7 @@ class we extends be {
|
|
|
756
844
|
size: {
|
|
757
845
|
description: "",
|
|
758
846
|
title: "尺寸",
|
|
847
|
+
type: "enum",
|
|
759
848
|
editor: {
|
|
760
849
|
data: [
|
|
761
850
|
{
|
|
@@ -776,114 +865,114 @@ class we extends be {
|
|
|
776
865
|
});
|
|
777
866
|
}
|
|
778
867
|
}
|
|
779
|
-
function
|
|
780
|
-
|
|
781
|
-
const
|
|
782
|
-
function
|
|
868
|
+
function Se(a, t) {
|
|
869
|
+
a.schema;
|
|
870
|
+
const e = w(!0), o = w(!0);
|
|
871
|
+
function n(l) {
|
|
783
872
|
return !1;
|
|
784
873
|
}
|
|
785
|
-
function
|
|
874
|
+
function i() {
|
|
786
875
|
return !1;
|
|
787
876
|
}
|
|
788
|
-
function
|
|
877
|
+
function c() {
|
|
789
878
|
return !1;
|
|
790
879
|
}
|
|
791
|
-
function
|
|
880
|
+
function d() {
|
|
792
881
|
return !0;
|
|
793
882
|
}
|
|
794
|
-
function
|
|
883
|
+
function u(l) {
|
|
795
884
|
}
|
|
796
|
-
function
|
|
885
|
+
function r() {
|
|
797
886
|
}
|
|
798
|
-
function l
|
|
887
|
+
function s(l) {
|
|
799
888
|
return null;
|
|
800
889
|
}
|
|
801
890
|
return {
|
|
802
|
-
canAccepts:
|
|
803
|
-
checkCanDeleteComponent:
|
|
804
|
-
checkCanMoveComponent:
|
|
805
|
-
hideNestedPaddingInDesginerView:
|
|
806
|
-
onAcceptMovedChildElement:
|
|
807
|
-
resolveComponentContext:
|
|
808
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
809
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
810
|
-
getPropsConfig:
|
|
891
|
+
canAccepts: n,
|
|
892
|
+
checkCanDeleteComponent: i,
|
|
893
|
+
checkCanMoveComponent: c,
|
|
894
|
+
hideNestedPaddingInDesginerView: d,
|
|
895
|
+
onAcceptMovedChildElement: u,
|
|
896
|
+
resolveComponentContext: r,
|
|
897
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
898
|
+
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
899
|
+
getPropsConfig: s
|
|
811
900
|
};
|
|
812
901
|
}
|
|
813
|
-
function
|
|
902
|
+
function Te(a, t) {
|
|
814
903
|
const {
|
|
815
|
-
canAccepts:
|
|
816
|
-
checkCanDeleteComponent:
|
|
817
|
-
checkCanMoveComponent:
|
|
818
|
-
hideNestedPaddingInDesginerView:
|
|
819
|
-
onAcceptMovedChildElement:
|
|
820
|
-
resolveComponentContext:
|
|
821
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
822
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
823
|
-
} =
|
|
824
|
-
function
|
|
825
|
-
return new
|
|
904
|
+
canAccepts: e,
|
|
905
|
+
checkCanDeleteComponent: o,
|
|
906
|
+
checkCanMoveComponent: n,
|
|
907
|
+
hideNestedPaddingInDesginerView: i,
|
|
908
|
+
onAcceptMovedChildElement: c,
|
|
909
|
+
resolveComponentContext: d,
|
|
910
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
911
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
912
|
+
} = Se(a), s = a.schema;
|
|
913
|
+
function l(m, h) {
|
|
914
|
+
return new Me(m, t).getPropertyConfig(s, h);
|
|
826
915
|
}
|
|
827
916
|
return {
|
|
828
|
-
canAccepts:
|
|
829
|
-
checkCanDeleteComponent:
|
|
830
|
-
checkCanMoveComponent:
|
|
831
|
-
hideNestedPaddingInDesginerView:
|
|
832
|
-
onAcceptMovedChildElement:
|
|
833
|
-
resolveComponentContext:
|
|
834
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
835
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
836
|
-
getPropsConfig:
|
|
917
|
+
canAccepts: e,
|
|
918
|
+
checkCanDeleteComponent: o,
|
|
919
|
+
checkCanMoveComponent: n,
|
|
920
|
+
hideNestedPaddingInDesginerView: i,
|
|
921
|
+
onAcceptMovedChildElement: c,
|
|
922
|
+
resolveComponentContext: d,
|
|
923
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
924
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
925
|
+
getPropsConfig: l
|
|
837
926
|
};
|
|
838
927
|
}
|
|
839
|
-
const
|
|
928
|
+
const Be = /* @__PURE__ */ W({
|
|
840
929
|
name: "FSwitchDesign",
|
|
841
|
-
props:
|
|
930
|
+
props: N,
|
|
842
931
|
emits: ["update:modelValue"],
|
|
843
|
-
setup(
|
|
932
|
+
setup(a, t) {
|
|
844
933
|
const {
|
|
845
|
-
size:
|
|
846
|
-
onLabel:
|
|
847
|
-
offLabel:
|
|
848
|
-
} =
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}),
|
|
852
|
-
const
|
|
934
|
+
size: e,
|
|
935
|
+
onLabel: o,
|
|
936
|
+
offLabel: n
|
|
937
|
+
} = z(a), i = w(), c = q("designer-host-service"), d = q("design-item-context"), u = Te(d, c), r = Ce(i, d, u);
|
|
938
|
+
R(() => {
|
|
939
|
+
i.value.componentInstance = r;
|
|
940
|
+
}), t.expose(r.value);
|
|
941
|
+
const s = E(() => ({
|
|
853
942
|
switch: !0,
|
|
854
943
|
"f-cmp-switch": !0,
|
|
855
944
|
checked: !1,
|
|
856
|
-
"switch-large":
|
|
857
|
-
"switch-medium":
|
|
858
|
-
"switch-small":
|
|
859
|
-
})),
|
|
860
|
-
return () =>
|
|
861
|
-
ref:
|
|
945
|
+
"switch-large": e.value === "large",
|
|
946
|
+
"switch-medium": e.value === "medium",
|
|
947
|
+
"switch-small": e.value === "small"
|
|
948
|
+
})), l = E(() => (o == null ? void 0 : o.value) || (n == null ? void 0 : n.value));
|
|
949
|
+
return () => k("span", {
|
|
950
|
+
ref: i,
|
|
862
951
|
tabindex: "0",
|
|
863
952
|
role: "button",
|
|
864
|
-
class:
|
|
865
|
-
}, [
|
|
953
|
+
class: s.value
|
|
954
|
+
}, [l.value && k("span", {
|
|
866
955
|
class: "switch-pane"
|
|
867
|
-
}, [
|
|
956
|
+
}, [k("span", {
|
|
868
957
|
class: "switch-label-unchecked"
|
|
869
|
-
}, [
|
|
958
|
+
}, [n == null ? void 0 : n.value])]), k("small", null, [t.slots.default && t.slots.default()])]);
|
|
870
959
|
}
|
|
871
|
-
}),
|
|
872
|
-
const
|
|
873
|
-
return
|
|
874
|
-
|
|
875
|
-
},
|
|
960
|
+
}), Ee = (a) => {
|
|
961
|
+
const t = a;
|
|
962
|
+
return t.install = function(e) {
|
|
963
|
+
e.component(t.name, a);
|
|
964
|
+
}, a;
|
|
876
965
|
};
|
|
877
|
-
|
|
878
|
-
|
|
966
|
+
V.register = (a, t, e, o) => {
|
|
967
|
+
a.switch = V, t.switch = Q;
|
|
879
968
|
};
|
|
880
|
-
|
|
881
|
-
|
|
969
|
+
V.registerDesigner = (a, t, e) => {
|
|
970
|
+
a.switch = Be, t.switch = Q;
|
|
882
971
|
};
|
|
883
|
-
const
|
|
972
|
+
const Le = Ee(V);
|
|
884
973
|
export {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
974
|
+
V as FSwitch,
|
|
975
|
+
Le as default,
|
|
976
|
+
Q as propsResolver,
|
|
977
|
+
N as switchProps
|
|
889
978
|
};
|