@farris/ui-vue 1.2.9 → 1.3.1
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 +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- 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 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -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/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- 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/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- 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 +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -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/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- 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/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -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/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- 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,101 @@
|
|
|
1
|
-
var
|
|
2
|
-
var H = (
|
|
3
|
-
var g = (
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const { properties:
|
|
10
|
-
return (!
|
|
1
|
+
var Z = Object.defineProperty;
|
|
2
|
+
var H = (a, t, e) => t in a ? Z(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 O, toRefs as j, ref as E, computed as D, watch as U, createVNode as F, inject as $, onMounted as _ } from "vue";
|
|
5
|
+
import { isPlainObject as W, cloneDeep as q } from "lodash-es";
|
|
6
|
+
import { DgControl as G } from "../designer-canvas/index.esm.js";
|
|
7
|
+
const z = {}, X = {};
|
|
8
|
+
function L(a) {
|
|
9
|
+
const { properties: t, title: e, ignore: r } = a, n = r && Array.isArray(r), l = Object.keys(t).reduce((p, f) => ((!n || !r.find((m) => m == f)) && (p[f] = t[f].type === "object" && t[f].properties ? L(t[f]) : q(t[f].default)), p), {});
|
|
10
|
+
return e && (!n || !r.find((p) => p == "id")) && (l.id = `${e}-${Date.now()}`), l;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
let
|
|
16
|
-
const
|
|
17
|
-
return
|
|
12
|
+
function J(a, t = {}, e) {
|
|
13
|
+
const r = z[a];
|
|
14
|
+
if (r) {
|
|
15
|
+
let n = L(r);
|
|
16
|
+
const l = X[a];
|
|
17
|
+
return n = l ? l({ getSchemaByType: J }, n, t, e) : n, n;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
return Object.keys(
|
|
21
|
+
function x(a, t) {
|
|
22
|
+
const e = L(t);
|
|
23
|
+
return Object.keys(a).reduce((r, n) => (r[n] && W(r[n]) && W(a[n]) ? Object.assign(r[n], a[n]) : r[n] = a[n], r), e), e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return Object.keys(
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
|
|
25
|
+
function K(a, t) {
|
|
26
|
+
return Object.keys(a).filter((r) => a[r] != null).reduce((r, n) => {
|
|
27
|
+
if (t.has(n)) {
|
|
28
|
+
const l = t.get(n);
|
|
29
|
+
if (typeof l == "string")
|
|
30
|
+
r[l] = a[n];
|
|
31
31
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
32
|
+
const p = l(n, a[n], a);
|
|
33
|
+
Object.assign(r, p);
|
|
34
34
|
}
|
|
35
35
|
} else
|
|
36
|
-
n
|
|
37
|
-
return
|
|
36
|
+
r[n] = a[n];
|
|
37
|
+
return r;
|
|
38
38
|
}, {});
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
40
|
+
function R(a, t, e = /* @__PURE__ */ new Map()) {
|
|
41
|
+
const r = x(a, t);
|
|
42
|
+
return K(r, e);
|
|
43
43
|
}
|
|
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(
|
|
44
|
+
function ee(a = {}) {
|
|
45
|
+
function t(i, s, o, c) {
|
|
46
|
+
if (typeof o == "number")
|
|
47
|
+
return c[i].length === o;
|
|
48
|
+
if (typeof o == "object") {
|
|
49
|
+
const y = Object.keys(o)[0], d = o[y];
|
|
50
|
+
if (y === "not")
|
|
51
|
+
return Number(c[i].length) !== Number(d);
|
|
52
|
+
if (y === "moreThan")
|
|
53
|
+
return Number(c[i].length) >= Number(d);
|
|
54
|
+
if (y === "lessThan")
|
|
55
|
+
return Number(c[i].length) <= Number(d);
|
|
56
56
|
}
|
|
57
57
|
return !1;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
59
|
+
function e(i, s, o, c) {
|
|
60
|
+
return c[i] && c[i].propertyValue && String(c[i].propertyValue.value) === String(o);
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
["length",
|
|
64
|
-
["getProperty",
|
|
62
|
+
const r = /* @__PURE__ */ new Map([
|
|
63
|
+
["length", t],
|
|
64
|
+
["getProperty", e]
|
|
65
65
|
]);
|
|
66
|
-
Object.keys(
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const
|
|
73
|
-
return { target:
|
|
66
|
+
Object.keys(a).reduce((i, s) => (i.set(s, a[s]), i), r);
|
|
67
|
+
function n(i, s) {
|
|
68
|
+
const o = i;
|
|
69
|
+
return typeof s == "number" ? [{ target: o, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: o, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
|
|
70
|
+
if (c === "length")
|
|
71
|
+
return { target: o, operator: "length", param: null, value: s[c] };
|
|
72
|
+
const y = c, d = s[c];
|
|
73
|
+
return { target: o, operator: "getProperty", param: y, value: d };
|
|
74
74
|
}) : [];
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(i).reduce((
|
|
78
|
-
const
|
|
79
|
-
return
|
|
76
|
+
function l(i) {
|
|
77
|
+
return Object.keys(i).reduce((o, c) => {
|
|
78
|
+
const y = n(c, i[c]);
|
|
79
|
+
return o.push(...y), o;
|
|
80
80
|
}, []);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
return
|
|
82
|
+
function p(i, s) {
|
|
83
|
+
if (r.has(i.operator)) {
|
|
84
|
+
const o = r.get(i.operator);
|
|
85
|
+
return o && o(i.target, i.param, i.value, s) || !1;
|
|
86
86
|
}
|
|
87
87
|
return !1;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function f(i, s) {
|
|
90
|
+
return l(i).reduce((y, d) => y && p(d, s), !0);
|
|
91
91
|
}
|
|
92
|
-
function m(i,
|
|
93
|
-
const
|
|
94
|
-
return
|
|
92
|
+
function m(i, s) {
|
|
93
|
+
const o = Object.keys(i), c = o.includes("allOf"), y = o.includes("anyOf"), d = c || y, b = (d ? i[d ? c ? "allOf" : "anyOf" : "allOf"] : [i]).map((T) => f(T, s));
|
|
94
|
+
return c ? !b.includes(!1) : b.includes(!0);
|
|
95
95
|
}
|
|
96
96
|
return { parseValueSchema: m };
|
|
97
97
|
}
|
|
98
|
-
const
|
|
98
|
+
const u = {
|
|
99
99
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
100
100
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
101
101
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -132,21 +132,22 @@ const a = {
|
|
|
132
132
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
133
133
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
134
134
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
135
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
136
|
-
|
|
137
|
-
te
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
136
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
137
|
+
}, te = {}, ne = {};
|
|
138
|
+
ee();
|
|
139
|
+
function oe(a, t, e = /* @__PURE__ */ new Map(), r = (p, f, m) => f, n = {}, l = (p) => p) {
|
|
140
|
+
return z[t.title] = t, X[t.title] = r, te[t.title] = n, ne[t.title] = l, (p = {}) => {
|
|
141
|
+
const f = R(p, t, e), m = Object.keys(a).reduce((i, s) => (i[s] = a[s].default, i), {});
|
|
142
|
+
return Object.assign(m, f);
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
|
-
function
|
|
145
|
-
return { customClass:
|
|
145
|
+
function re(a, t) {
|
|
146
|
+
return { customClass: t.class, customStyle: t.style };
|
|
146
147
|
}
|
|
147
|
-
const
|
|
148
|
-
["appearance",
|
|
149
|
-
]),
|
|
148
|
+
const ie = /* @__PURE__ */ new Map([
|
|
149
|
+
["appearance", re]
|
|
150
|
+
]), ae = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/switch.schema.json", se = "switch", ce = "A Farris Component", pe = "object", ue = {
|
|
150
151
|
id: {
|
|
151
152
|
description: "The unique identifier for a switch",
|
|
152
153
|
type: "string"
|
|
@@ -216,29 +217,29 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
216
217
|
size: {
|
|
217
218
|
description: "",
|
|
218
219
|
type: "enum",
|
|
219
|
-
default: "
|
|
220
|
+
default: "medium"
|
|
220
221
|
}
|
|
221
|
-
},
|
|
222
|
+
}, de = [
|
|
222
223
|
"id",
|
|
223
224
|
"type"
|
|
224
|
-
],
|
|
225
|
+
], me = [
|
|
225
226
|
"id",
|
|
226
227
|
"appearance",
|
|
227
228
|
"binding"
|
|
228
229
|
], fe = {
|
|
229
|
-
$schema:
|
|
230
|
-
$id:
|
|
231
|
-
title:
|
|
232
|
-
description:
|
|
233
|
-
type:
|
|
234
|
-
properties:
|
|
235
|
-
required:
|
|
236
|
-
ignore:
|
|
230
|
+
$schema: ae,
|
|
231
|
+
$id: le,
|
|
232
|
+
title: se,
|
|
233
|
+
description: ce,
|
|
234
|
+
type: pe,
|
|
235
|
+
properties: ue,
|
|
236
|
+
required: de,
|
|
237
|
+
ignore: me
|
|
237
238
|
};
|
|
238
|
-
function
|
|
239
|
-
return
|
|
239
|
+
function ye(a, t, e) {
|
|
240
|
+
return t;
|
|
240
241
|
}
|
|
241
|
-
const
|
|
242
|
+
const N = {
|
|
242
243
|
/** 组件值*/
|
|
243
244
|
modelValue: { type: Boolean, default: !1 },
|
|
244
245
|
/** 禁用 */
|
|
@@ -254,154 +255,145 @@ const U = {
|
|
|
254
255
|
/** 开关值变化事件 */
|
|
255
256
|
onModelValueChanged: { type: Function, default: () => {
|
|
256
257
|
} }
|
|
257
|
-
},
|
|
258
|
+
}, Q = oe(N, fe, ie, ye), P = /* @__PURE__ */ O({
|
|
258
259
|
name: "FSwitch",
|
|
259
|
-
props:
|
|
260
|
+
props: N,
|
|
260
261
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
261
|
-
setup(
|
|
262
|
+
setup(a, t) {
|
|
262
263
|
const {
|
|
263
|
-
disabled:
|
|
264
|
-
size:
|
|
265
|
-
onLabel:
|
|
266
|
-
offLabel:
|
|
267
|
-
onBackground:
|
|
268
|
-
offBackground:
|
|
264
|
+
disabled: e,
|
|
265
|
+
size: r,
|
|
266
|
+
onLabel: n,
|
|
267
|
+
offLabel: l,
|
|
268
|
+
onBackground: p,
|
|
269
|
+
offBackground: f,
|
|
269
270
|
onColor: m,
|
|
270
271
|
offColor: i
|
|
271
|
-
} =
|
|
272
|
+
} = j(a), s = E(a.modelValue), o = D(() => ({
|
|
272
273
|
switch: !0,
|
|
273
274
|
"f-cmp-switch": !0,
|
|
274
|
-
checked:
|
|
275
|
-
disabled:
|
|
276
|
-
"switch-large":
|
|
277
|
-
"switch-medium":
|
|
278
|
-
"switch-small":
|
|
279
|
-
})),
|
|
275
|
+
checked: s.value,
|
|
276
|
+
disabled: e.value,
|
|
277
|
+
"switch-large": r.value === "large",
|
|
278
|
+
"switch-medium": r.value === "medium",
|
|
279
|
+
"switch-small": r.value === "small"
|
|
280
|
+
})), c = D(() => s.value ? {
|
|
280
281
|
outline: "none",
|
|
281
|
-
background:
|
|
282
|
+
background: p.value
|
|
282
283
|
} : {
|
|
283
284
|
outline: "none",
|
|
284
|
-
backgroundColor:
|
|
285
|
-
}),
|
|
285
|
+
backgroundColor: f.value
|
|
286
|
+
}), y = D(() => s.value ? {
|
|
286
287
|
background: m.value
|
|
287
288
|
} : {
|
|
288
289
|
backgroundColor: i.value
|
|
289
|
-
}),
|
|
290
|
-
function
|
|
291
|
-
|
|
290
|
+
}), d = D(() => (n == null ? void 0 : n.value) || (l == null ? void 0 : l.value));
|
|
291
|
+
function h() {
|
|
292
|
+
e.value || (s.value = !s.value, t.emit("update:modelValue", s.value));
|
|
292
293
|
}
|
|
293
|
-
return
|
|
294
|
-
|
|
295
|
-
}),
|
|
296
|
-
|
|
297
|
-
}), () =>
|
|
294
|
+
return U(s, (C, b) => {
|
|
295
|
+
C !== b && t.emit("modelValueChanged", C);
|
|
296
|
+
}), U(() => a.modelValue, (C, b) => {
|
|
297
|
+
C !== b && (s.value = C);
|
|
298
|
+
}), () => F("span", {
|
|
298
299
|
tabindex: "0",
|
|
299
300
|
role: "button",
|
|
300
|
-
class:
|
|
301
|
-
style:
|
|
302
|
-
onClick:
|
|
303
|
-
}, [
|
|
301
|
+
class: o.value,
|
|
302
|
+
style: c.value,
|
|
303
|
+
onClick: h
|
|
304
|
+
}, [d.value && F("span", {
|
|
304
305
|
class: "switch-pane"
|
|
305
|
-
}, [
|
|
306
|
+
}, [F("span", {
|
|
306
307
|
class: "switch-label-checked"
|
|
307
|
-
}, [
|
|
308
|
+
}, [n == null ? void 0 : n.value]), F("span", {
|
|
308
309
|
class: "switch-label-unchecked"
|
|
309
|
-
}, [
|
|
310
|
-
style:
|
|
311
|
-
}, [
|
|
310
|
+
}, [l == null ? void 0 : l.value])]), F("small", {
|
|
311
|
+
style: y.value
|
|
312
|
+
}, [t.slots.default && t.slots.default()])]);
|
|
312
313
|
}
|
|
313
314
|
});
|
|
314
|
-
function
|
|
315
|
-
var
|
|
316
|
-
function
|
|
317
|
-
|
|
315
|
+
function he(a, t, e) {
|
|
316
|
+
var B;
|
|
317
|
+
function r() {
|
|
318
|
+
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
318
319
|
}
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
function
|
|
322
|
-
return (
|
|
320
|
+
r();
|
|
321
|
+
const n = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", p = E();
|
|
322
|
+
function f() {
|
|
323
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
323
324
|
}
|
|
324
325
|
function m() {
|
|
325
326
|
return !1;
|
|
326
327
|
}
|
|
327
328
|
function i() {
|
|
328
|
-
return (
|
|
329
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
-
return (
|
|
331
|
+
function s() {
|
|
332
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
-
if (!
|
|
334
|
+
function o(v) {
|
|
335
|
+
if (!v || !v.value)
|
|
335
336
|
return null;
|
|
336
|
-
if (
|
|
337
|
-
return
|
|
338
|
-
const
|
|
339
|
-
return
|
|
337
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
338
|
+
return v.value;
|
|
339
|
+
const M = E(v == null ? void 0 : v.value.parent), w = o(M);
|
|
340
|
+
return w || null;
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
-
const { componentInstance:
|
|
343
|
-
return !
|
|
342
|
+
function c(v = t) {
|
|
343
|
+
const { componentInstance: M, designerItemElementRef: w } = v;
|
|
344
|
+
return !M || !M.value ? null : M.value.canMove ? w : c(v.parent);
|
|
344
345
|
}
|
|
345
|
-
function
|
|
346
|
-
return !!
|
|
346
|
+
function y(v) {
|
|
347
|
+
return !!e && e.canAccepts(v);
|
|
347
348
|
}
|
|
348
|
-
function
|
|
349
|
-
return (
|
|
350
|
-
}
|
|
351
|
-
function P() {
|
|
349
|
+
function d() {
|
|
350
|
+
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
352
351
|
}
|
|
353
|
-
function
|
|
354
|
-
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
352
|
+
function h() {
|
|
355
353
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
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;
|
|
354
|
+
function C(v, M) {
|
|
355
|
+
M && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(M);
|
|
362
356
|
}
|
|
363
|
-
function
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return S && !S.id && S.type === b && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
|
|
357
|
+
function b(v, M) {
|
|
358
|
+
const { componentType: w } = v;
|
|
359
|
+
let S = J(w, v, M);
|
|
360
|
+
e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(v, S));
|
|
361
|
+
const A = w.toLowerCase().replace("-", "_");
|
|
362
|
+
return S && !S.id && S.type === w && (S.id = `${A}_${Math.random().toString().slice(2, 6)}`), S;
|
|
370
363
|
}
|
|
371
|
-
function
|
|
364
|
+
function k(v) {
|
|
372
365
|
}
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
375
|
-
return
|
|
366
|
+
function T(...v) {
|
|
367
|
+
if (e && e.getPropsConfig)
|
|
368
|
+
return e.getPropsConfig(...v);
|
|
376
369
|
}
|
|
377
|
-
return
|
|
378
|
-
canMove:
|
|
370
|
+
return p.value = {
|
|
371
|
+
canMove: f(),
|
|
379
372
|
canSelectParent: m(),
|
|
380
373
|
canDelete: i(),
|
|
381
|
-
canNested: !
|
|
382
|
-
contents:
|
|
383
|
-
elementRef:
|
|
384
|
-
parent: (
|
|
385
|
-
schema:
|
|
386
|
-
styles:
|
|
387
|
-
designerClass:
|
|
388
|
-
canAccepts:
|
|
389
|
-
getBelongedComponentInstance:
|
|
390
|
-
getDraggableDesignItemElement:
|
|
391
|
-
getDraggingDisplayText:
|
|
392
|
-
getPropConfig:
|
|
393
|
-
getDragScopeElement:
|
|
394
|
-
onAcceptMovedChildElement:
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}, u;
|
|
374
|
+
canNested: !s(),
|
|
375
|
+
contents: t == null ? void 0 : t.schema.contents,
|
|
376
|
+
elementRef: a,
|
|
377
|
+
parent: (B = t == null ? void 0 : t.parent) == null ? void 0 : B.componentInstance,
|
|
378
|
+
schema: t == null ? void 0 : t.schema,
|
|
379
|
+
styles: n,
|
|
380
|
+
designerClass: l,
|
|
381
|
+
canAccepts: y,
|
|
382
|
+
getBelongedComponentInstance: o,
|
|
383
|
+
getDraggableDesignItemElement: c,
|
|
384
|
+
getDraggingDisplayText: d,
|
|
385
|
+
getPropConfig: T,
|
|
386
|
+
getDragScopeElement: h,
|
|
387
|
+
onAcceptMovedChildElement: C,
|
|
388
|
+
onChildElementMovedOut: k,
|
|
389
|
+
addNewChildComponentSchema: b,
|
|
390
|
+
updateDragAndDropRules: r,
|
|
391
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || E(!1),
|
|
392
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
|
|
393
|
+
}, p;
|
|
402
394
|
}
|
|
403
|
-
class
|
|
404
|
-
constructor(
|
|
395
|
+
class ge {
|
|
396
|
+
constructor(t, e) {
|
|
405
397
|
g(this, "componentId");
|
|
406
398
|
g(this, "viewModelId");
|
|
407
399
|
g(this, "eventsEditorUtils");
|
|
@@ -417,26 +409,26 @@ class ve {
|
|
|
417
409
|
type: "object",
|
|
418
410
|
categories: {}
|
|
419
411
|
});
|
|
420
|
-
var
|
|
421
|
-
this.componentId =
|
|
412
|
+
var r;
|
|
413
|
+
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
422
414
|
}
|
|
423
415
|
getTableInfo() {
|
|
424
|
-
var
|
|
425
|
-
return (
|
|
416
|
+
var t;
|
|
417
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
426
418
|
}
|
|
427
|
-
setDesignViewModelField(
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
419
|
+
setDesignViewModelField(t) {
|
|
420
|
+
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
421
|
+
if (e) {
|
|
430
422
|
if (!this.designViewModelField) {
|
|
431
|
-
const
|
|
432
|
-
this.designViewModelField =
|
|
423
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
424
|
+
this.designViewModelField = r.fields.find((n) => n.id === e);
|
|
433
425
|
}
|
|
434
|
-
|
|
426
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
435
427
|
}
|
|
436
428
|
}
|
|
437
|
-
changeFieldEditorType(
|
|
429
|
+
changeFieldEditorType(t, e) {
|
|
438
430
|
}
|
|
439
|
-
getBasicPropConfig(
|
|
431
|
+
getBasicPropConfig(t) {
|
|
440
432
|
return {
|
|
441
433
|
description: "Basic Information",
|
|
442
434
|
title: "基本信息",
|
|
@@ -455,13 +447,13 @@ class ve {
|
|
|
455
447
|
type: "combo-list",
|
|
456
448
|
textField: "name",
|
|
457
449
|
valueField: "value",
|
|
458
|
-
data: [{ value:
|
|
450
|
+
data: [{ value: t.type, name: u[t.type].name }]
|
|
459
451
|
}
|
|
460
452
|
}
|
|
461
453
|
}
|
|
462
454
|
};
|
|
463
455
|
}
|
|
464
|
-
getAppearanceConfig(
|
|
456
|
+
getAppearanceConfig(t = null) {
|
|
465
457
|
return {
|
|
466
458
|
title: "样式",
|
|
467
459
|
description: "Appearance",
|
|
@@ -481,90 +473,212 @@ class ve {
|
|
|
481
473
|
}
|
|
482
474
|
};
|
|
483
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
*
|
|
478
|
+
* @param propertyId
|
|
479
|
+
* @param componentInstance
|
|
480
|
+
* @returns
|
|
481
|
+
*/
|
|
482
|
+
updateElementByParentContainer(t, e) {
|
|
483
|
+
const r = e && e.parent && e.parent.schema;
|
|
484
|
+
if (!r)
|
|
485
|
+
return;
|
|
486
|
+
const n = r.contents.findIndex((p) => p.id === t), l = q(r.contents[n]);
|
|
487
|
+
r.contents.splice(n, 1), r.contents.splice(n, 0, l);
|
|
488
|
+
}
|
|
484
489
|
}
|
|
485
|
-
const
|
|
490
|
+
const I = class I {
|
|
486
491
|
/**
|
|
487
492
|
* 根据绑定字段类型获取可用的输入类控件
|
|
488
493
|
*/
|
|
489
|
-
static getEditorTypesByMDataType(
|
|
490
|
-
const
|
|
491
|
-
return
|
|
494
|
+
static getEditorTypesByMDataType(t) {
|
|
495
|
+
const e = I.fieldControlTypeMapping[t];
|
|
496
|
+
return e || [{ key: "", value: "" }];
|
|
492
497
|
}
|
|
493
498
|
/**
|
|
494
499
|
* 获取所有输入类控件
|
|
495
500
|
*/
|
|
496
501
|
static getAllInputTypes() {
|
|
497
|
-
const
|
|
498
|
-
for (let
|
|
499
|
-
|
|
500
|
-
|
|
502
|
+
const t = [];
|
|
503
|
+
for (let e in I.fieldControlTypeMapping)
|
|
504
|
+
I.fieldControlTypeMapping[e].forEach((r) => {
|
|
505
|
+
t.find((n) => n.key === r.key && n.value === r.value) || t.push({ key: r.key, value: r.value });
|
|
501
506
|
});
|
|
502
|
-
return
|
|
507
|
+
return t;
|
|
503
508
|
}
|
|
504
509
|
};
|
|
505
510
|
/**
|
|
506
511
|
* <字段类型,可配置的控件类型列表>的映射
|
|
507
512
|
*/
|
|
508
|
-
g(
|
|
513
|
+
g(I, "fieldControlTypeMapping", {
|
|
509
514
|
String: [
|
|
510
|
-
{ key:
|
|
511
|
-
{ key:
|
|
512
|
-
{ key:
|
|
513
|
-
{ key:
|
|
514
|
-
{ key:
|
|
515
|
-
{ key:
|
|
516
|
-
{ key:
|
|
515
|
+
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
516
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
517
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name },
|
|
518
|
+
{ key: u["check-box"].type, value: u["check-box"].name },
|
|
519
|
+
{ key: u["check-group"].type, value: u["check-group"].name },
|
|
520
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name },
|
|
521
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
522
|
+
{ key: u.textarea.type, value: u.textarea.name }
|
|
517
523
|
],
|
|
518
524
|
Text: [
|
|
519
|
-
{ key:
|
|
520
|
-
{ key:
|
|
525
|
+
{ key: u.textarea.type, value: u.textarea.name },
|
|
526
|
+
{ key: u.lookup.type, value: u.lookup.name }
|
|
521
527
|
],
|
|
522
528
|
Decimal: [
|
|
523
|
-
{ key:
|
|
529
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
524
530
|
],
|
|
525
531
|
Integer: [
|
|
526
|
-
{ key:
|
|
532
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
527
533
|
],
|
|
528
534
|
Number: [
|
|
529
|
-
{ key:
|
|
535
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
530
536
|
],
|
|
531
537
|
BigNumber: [
|
|
532
|
-
{ key:
|
|
538
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
533
539
|
],
|
|
534
540
|
Date: [
|
|
535
|
-
{ key:
|
|
541
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
536
542
|
],
|
|
537
543
|
DateTime: [
|
|
538
|
-
{ key:
|
|
544
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
539
545
|
],
|
|
540
546
|
Boolean: [
|
|
541
|
-
{ key:
|
|
542
|
-
{ key:
|
|
547
|
+
{ key: u.switch.type, value: u.switch.name },
|
|
548
|
+
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
543
549
|
],
|
|
544
550
|
Enum: [
|
|
545
|
-
{ key:
|
|
546
|
-
{ key:
|
|
551
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
552
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
547
553
|
],
|
|
548
554
|
Object: [
|
|
549
|
-
{ key:
|
|
550
|
-
{ key:
|
|
551
|
-
{ key:
|
|
555
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
556
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
557
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
552
558
|
]
|
|
553
559
|
});
|
|
554
|
-
let
|
|
555
|
-
const
|
|
556
|
-
class
|
|
557
|
-
constructor(
|
|
558
|
-
|
|
560
|
+
let V = I;
|
|
561
|
+
const ve = E(0);
|
|
562
|
+
class Ce {
|
|
563
|
+
constructor() {
|
|
564
|
+
/** 控件标题 */
|
|
565
|
+
g(this, "label", "");
|
|
566
|
+
/** 控件id */
|
|
567
|
+
g(this, "id", "");
|
|
568
|
+
/** 每个控件占用的栅格数 */
|
|
569
|
+
g(this, "columnInSM", 12);
|
|
570
|
+
g(this, "columnInMD", 6);
|
|
571
|
+
g(this, "columnInLG", 3);
|
|
572
|
+
g(this, "columnInEL", 2);
|
|
573
|
+
/** 每个控件占用的列数 */
|
|
574
|
+
g(this, "displayWidthInSM", 1);
|
|
575
|
+
g(this, "displayWidthInMD", 1);
|
|
576
|
+
g(this, "displayWidthInLG", 1);
|
|
577
|
+
g(this, "displayWidthInEL", 1);
|
|
578
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
579
|
+
g(this, "displayColumnCountAtBreakPoint", "md");
|
|
580
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
581
|
+
g(this, "tagRow", 0);
|
|
582
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
583
|
+
g(this, "showTopBorder", 0);
|
|
584
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
585
|
+
g(this, "group", 1);
|
|
586
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
587
|
+
g(this, "isSupportedClass", !0);
|
|
588
|
+
/** 控件所在分组id(设计器用的) */
|
|
589
|
+
g(this, "fieldSetId", "");
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
function be(a) {
|
|
593
|
+
let t, e;
|
|
594
|
+
const r = /* @__PURE__ */ new Map();
|
|
595
|
+
let n = [];
|
|
596
|
+
function l(s, o) {
|
|
597
|
+
const y = s.split(" ").filter((k) => k.startsWith("col-"));
|
|
598
|
+
if (y.length === 0) {
|
|
599
|
+
o.isSupportedClass = !1;
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
let d = y.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), h = y.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), C = y.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), b = y.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k));
|
|
603
|
+
d = d || "col-12", o.columnInSM = parseInt(d.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), h = h || "col-md-" + o.columnInSM, o.columnInMD = parseInt(h.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), C = C || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(C.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
559
604
|
}
|
|
560
|
-
|
|
561
|
-
|
|
605
|
+
function p(s, o, c, y = !1) {
|
|
606
|
+
let d = !1;
|
|
607
|
+
s.contents.forEach((h) => {
|
|
608
|
+
if (h.type === "fieldset") {
|
|
609
|
+
c += 1, p(h, o, c, !0), d = !0;
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
d && (c += 1, d = !1);
|
|
613
|
+
const C = h.appearance && h.appearance.class, b = new Ce();
|
|
614
|
+
C ? l(C, b) : b.isSupportedClass = !1, b.label = h.label || h.id, b.id = h.id, b.group = c, y && (b.fieldSetId = s.id), e === h.id && (t = c), r.set(h.id, h), o.push(b);
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
function f(s) {
|
|
618
|
+
const o = a.getComponentById(s);
|
|
619
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
620
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
621
|
+
const c = a.selectNode(o, (y) => y.type === G["response-form"].type);
|
|
622
|
+
return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
|
|
623
|
+
}
|
|
624
|
+
function m(s, o) {
|
|
625
|
+
o = o || s.id;
|
|
626
|
+
const { result: c, message: y, formNode: d } = f(o);
|
|
627
|
+
if (!c)
|
|
628
|
+
return { result: c, message: y };
|
|
629
|
+
e = s.id, n = [], r.clear();
|
|
630
|
+
const h = d.contents[0].type === G.fieldset.type ? 0 : 1;
|
|
631
|
+
p(d, n, h);
|
|
632
|
+
const C = n.find((k) => !k.isSupportedClass);
|
|
633
|
+
return {
|
|
634
|
+
defaultState: {
|
|
635
|
+
defaultGroupNumber: t || 1,
|
|
636
|
+
model: C ? "customize" : "standard"
|
|
637
|
+
},
|
|
638
|
+
importData: n
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
function i(s, o) {
|
|
642
|
+
o = o;
|
|
643
|
+
const { result: c, formNode: y } = f(o);
|
|
644
|
+
if (!c)
|
|
645
|
+
return "";
|
|
646
|
+
const d = [];
|
|
647
|
+
return s.forEach((h) => {
|
|
648
|
+
var k;
|
|
649
|
+
const C = r.get(h.id), b = C.appearance && C.appearance.class;
|
|
650
|
+
if (b) {
|
|
651
|
+
const B = b.split(" ").filter((Y) => !Y.startsWith("col-")), v = "col-" + h.columnInSM, M = "col-md-" + h.columnInMD, w = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, A = [v, M, w, S].concat(B);
|
|
652
|
+
C.appearance.class = A.join(" ");
|
|
653
|
+
}
|
|
654
|
+
if (h.fieldSetId) {
|
|
655
|
+
const T = y.contents.find((v) => v.id === h.fieldSetId), B = d.find((v) => v.id === h.fieldSetId);
|
|
656
|
+
B ? (k = B.contents) == null || k.push(C) : (d.push(T), T.contents = [C]);
|
|
657
|
+
} else
|
|
658
|
+
d.push(C);
|
|
659
|
+
}), y.contents = d, y.id;
|
|
562
660
|
}
|
|
563
|
-
|
|
564
|
-
|
|
661
|
+
return {
|
|
662
|
+
checkCanFindFormNode: f,
|
|
663
|
+
checkCanOpenLayoutEditor: m,
|
|
664
|
+
changeFormControlsByResponseLayoutConfig: i,
|
|
665
|
+
getResonseFormLayoutConfig: p
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
class ke extends ge {
|
|
669
|
+
constructor(e, r) {
|
|
670
|
+
super(e, r);
|
|
671
|
+
g(this, "responseLayoutEditorFunction");
|
|
672
|
+
this.responseLayoutEditorFunction = be(this.formSchemaUtils);
|
|
673
|
+
}
|
|
674
|
+
getPropertyConfig(e, r) {
|
|
675
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
676
|
+
}
|
|
677
|
+
getBasicProperties(e, r) {
|
|
678
|
+
var f;
|
|
565
679
|
var n = this;
|
|
566
680
|
this.setDesignViewModelField(e);
|
|
567
|
-
const
|
|
681
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
568
682
|
return {
|
|
569
683
|
description: "Basic Information",
|
|
570
684
|
title: "基本信息",
|
|
@@ -586,7 +700,7 @@ class we extends ve {
|
|
|
586
700
|
textField: "value",
|
|
587
701
|
valueField: "key",
|
|
588
702
|
editable: !1,
|
|
589
|
-
data: n.designViewModelField ?
|
|
703
|
+
data: n.designViewModelField ? V.getEditorTypesByMDataType((f = n.designViewModelField.type) == null ? void 0 : f.name) : V.getAllInputTypes()
|
|
590
704
|
}
|
|
591
705
|
},
|
|
592
706
|
label: {
|
|
@@ -603,7 +717,7 @@ class we extends ve {
|
|
|
603
717
|
bindingType: { enable: !1 },
|
|
604
718
|
editorParams: {
|
|
605
719
|
propertyData: e,
|
|
606
|
-
formBasicInfo:
|
|
720
|
+
formBasicInfo: l
|
|
607
721
|
},
|
|
608
722
|
columns: [
|
|
609
723
|
{ field: "name", title: "字段名称" },
|
|
@@ -611,26 +725,27 @@ class we extends ve {
|
|
|
611
725
|
{ field: "fieldType", title: "字段类型" }
|
|
612
726
|
],
|
|
613
727
|
textField: "bindingField",
|
|
614
|
-
data:
|
|
728
|
+
data: p
|
|
615
729
|
}
|
|
616
730
|
}
|
|
617
731
|
},
|
|
618
|
-
setPropertyRelates(
|
|
619
|
-
if (
|
|
620
|
-
switch (
|
|
732
|
+
setPropertyRelates(m, i) {
|
|
733
|
+
if (m)
|
|
734
|
+
switch (m && m.propertyID) {
|
|
621
735
|
case "type": {
|
|
622
|
-
n.changeControlType(e,
|
|
736
|
+
n.changeControlType(e, m, r);
|
|
623
737
|
break;
|
|
624
738
|
}
|
|
625
739
|
case "label": {
|
|
626
|
-
|
|
740
|
+
m.needRefreshControlTree = !0;
|
|
627
741
|
break;
|
|
628
742
|
}
|
|
629
743
|
}
|
|
630
744
|
}
|
|
631
745
|
};
|
|
632
746
|
}
|
|
633
|
-
getAppearanceProperties(e) {
|
|
747
|
+
getAppearanceProperties(e, r) {
|
|
748
|
+
var n = this;
|
|
634
749
|
return {
|
|
635
750
|
title: "样式",
|
|
636
751
|
description: "Appearance",
|
|
@@ -651,12 +766,25 @@ class we extends ve {
|
|
|
651
766
|
description: "响应式列宽",
|
|
652
767
|
title: "响应式列宽",
|
|
653
768
|
type: "boolean",
|
|
654
|
-
visible: !
|
|
769
|
+
visible: !0,
|
|
770
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
771
|
+
refreshPanelAfterChanged: !0,
|
|
655
772
|
editor: {
|
|
656
|
-
type: "response-layout-editor-setting"
|
|
657
|
-
|
|
658
|
-
|
|
773
|
+
type: "response-layout-editor-setting",
|
|
774
|
+
initialState: n.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, n.componentId)
|
|
775
|
+
}
|
|
659
776
|
}
|
|
777
|
+
},
|
|
778
|
+
setPropertyRelates(l, p) {
|
|
779
|
+
if (l)
|
|
780
|
+
switch (l && l.propertyID) {
|
|
781
|
+
case "responseLayout":
|
|
782
|
+
n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, r), delete e.responseLayout;
|
|
783
|
+
break;
|
|
784
|
+
case "class":
|
|
785
|
+
n.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, r);
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
660
788
|
}
|
|
661
789
|
};
|
|
662
790
|
}
|
|
@@ -668,44 +796,44 @@ class we extends ve {
|
|
|
668
796
|
* @param propertyData 控件DOM属性
|
|
669
797
|
* @param newControlType 新控件类型
|
|
670
798
|
*/
|
|
671
|
-
changeControlType(e,
|
|
672
|
-
var
|
|
673
|
-
const
|
|
674
|
-
if (!
|
|
799
|
+
changeControlType(e, r, n) {
|
|
800
|
+
var s, o, c, y;
|
|
801
|
+
const l = r.propertyValue, p = n && n.parent && n.parent.schema;
|
|
802
|
+
if (!p)
|
|
675
803
|
return;
|
|
676
|
-
const
|
|
677
|
-
let
|
|
804
|
+
const f = p.contents.findIndex((d) => d.id === e.id), m = p.contents[f];
|
|
805
|
+
let i;
|
|
678
806
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
679
807
|
editor: {
|
|
680
|
-
$type:
|
|
808
|
+
$type: l
|
|
681
809
|
},
|
|
682
810
|
name: this.designViewModelField.name,
|
|
683
811
|
require: this.designViewModelField.require,
|
|
684
812
|
readonly: this.designViewModelField.readonly
|
|
685
|
-
}, !1),
|
|
686
|
-
id:
|
|
687
|
-
appearance:
|
|
688
|
-
size:
|
|
689
|
-
label:
|
|
690
|
-
binding:
|
|
691
|
-
visible:
|
|
692
|
-
}), Object.assign(
|
|
693
|
-
isTextArea:
|
|
694
|
-
placeholder: (
|
|
695
|
-
holdPlace: (
|
|
696
|
-
readonly: (
|
|
697
|
-
require: (
|
|
698
|
-
}),
|
|
699
|
-
(
|
|
700
|
-
),
|
|
701
|
-
}
|
|
702
|
-
getComponentConfig(e,
|
|
703
|
-
const
|
|
813
|
+
}, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(i, {
|
|
814
|
+
id: m.id,
|
|
815
|
+
appearance: m.appearance,
|
|
816
|
+
size: m.size,
|
|
817
|
+
label: m.label,
|
|
818
|
+
binding: m.binding,
|
|
819
|
+
visible: m.visible
|
|
820
|
+
}), Object.assign(i.editor, {
|
|
821
|
+
isTextArea: i.isTextArea && m.isTextArea,
|
|
822
|
+
placeholder: (s = m.editor) == null ? void 0 : s.placeholder,
|
|
823
|
+
holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
|
|
824
|
+
readonly: (c = m.editor) == null ? void 0 : c.readonly,
|
|
825
|
+
require: (y = m.editor) == null ? void 0 : y.require
|
|
826
|
+
}), p.contents.splice(f, 1), p.contents.splice(f, 0, i), n.schema = Object.assign(m, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
827
|
+
(d) => d.classList.remove("dgComponentSelected")
|
|
828
|
+
), ve.value++;
|
|
829
|
+
}
|
|
830
|
+
getComponentConfig(e, r = {}, n = {}) {
|
|
831
|
+
const l = Object.assign({
|
|
704
832
|
description: "编辑器",
|
|
705
833
|
title: "编辑器",
|
|
706
834
|
type: "input-group",
|
|
707
835
|
$converter: "/converter/property-editor.converter"
|
|
708
|
-
},
|
|
836
|
+
}, r), p = Object.assign({
|
|
709
837
|
readonly: {
|
|
710
838
|
description: "",
|
|
711
839
|
title: "只读",
|
|
@@ -727,15 +855,63 @@ class we extends ve {
|
|
|
727
855
|
type: "string"
|
|
728
856
|
}
|
|
729
857
|
}, n);
|
|
730
|
-
return { ...
|
|
858
|
+
return { ...l, properties: { ...p } };
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
862
|
+
* @param controlClass 控件样式
|
|
863
|
+
* @param controlId 控件Id
|
|
864
|
+
* @param componentId 控件所在组件id
|
|
865
|
+
*/
|
|
866
|
+
updateUnifiedLayoutAfterControlChanged(e, r, n) {
|
|
867
|
+
const l = e.split(" ");
|
|
868
|
+
let p = l.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = l.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = l.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), i = l.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
869
|
+
p = p || "col-12", f = f || "col-md-" + p.replace("col-", ""), m = m || "col-xl-" + f.replace("col-md-", ""), i = i || "col-el-" + m.replace("col-xl-", "");
|
|
870
|
+
const s = {
|
|
871
|
+
id: r,
|
|
872
|
+
columnInSM: parseInt(p.replace("col-", ""), 10),
|
|
873
|
+
columnInMD: parseInt(f.replace("col-md-", ""), 10),
|
|
874
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
875
|
+
columnInEL: parseInt(i.replace("col-el-", ""), 10)
|
|
876
|
+
};
|
|
877
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(n, s);
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
881
|
+
* @param componentId 组件Id
|
|
882
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
883
|
+
*/
|
|
884
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
|
|
885
|
+
const { formNode: n } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
886
|
+
if (!n || !n.unifiedLayout)
|
|
887
|
+
return;
|
|
888
|
+
const l = [];
|
|
889
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, l, 1), r) {
|
|
890
|
+
const d = l.find((h) => h.id === r.id);
|
|
891
|
+
Object.assign(d || {}, r);
|
|
892
|
+
}
|
|
893
|
+
const p = l.map((d) => d.columnInSM), f = l.map((d) => d.columnInMD), m = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), s = this.checkIsUniqueColumn(p) ? p[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, c = this.checkIsUniqueColumn(m) ? m[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
|
|
894
|
+
Object.assign(n.unifiedLayout, {
|
|
895
|
+
uniqueColClassInSM: s,
|
|
896
|
+
uniqueColClassInMD: o,
|
|
897
|
+
uniqueColClassInLG: c,
|
|
898
|
+
uniqueColClassInEL: y
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* 校验宽度样式值是否一致
|
|
903
|
+
*/
|
|
904
|
+
checkIsUniqueColumn(e) {
|
|
905
|
+
const r = new Set(e);
|
|
906
|
+
return Array.from(r).length === 1;
|
|
731
907
|
}
|
|
732
908
|
}
|
|
733
|
-
class
|
|
734
|
-
constructor(
|
|
735
|
-
super(
|
|
909
|
+
class Me extends ke {
|
|
910
|
+
constructor(t, e) {
|
|
911
|
+
super(t, e);
|
|
736
912
|
}
|
|
737
|
-
getEditorProperties(
|
|
738
|
-
return this.getComponentConfig(
|
|
913
|
+
getEditorProperties(t) {
|
|
914
|
+
return this.getComponentConfig(t, { type: "switch" }, {
|
|
739
915
|
readonly: {
|
|
740
916
|
visible: !1
|
|
741
917
|
},
|
|
@@ -786,114 +962,114 @@ class Ce extends we {
|
|
|
786
962
|
});
|
|
787
963
|
}
|
|
788
964
|
}
|
|
789
|
-
function
|
|
790
|
-
|
|
791
|
-
const
|
|
792
|
-
function o
|
|
965
|
+
function we(a, t) {
|
|
966
|
+
a.schema;
|
|
967
|
+
const e = E(!0), r = E(!0);
|
|
968
|
+
function n(o) {
|
|
793
969
|
return !1;
|
|
794
970
|
}
|
|
795
|
-
function
|
|
971
|
+
function l() {
|
|
796
972
|
return !1;
|
|
797
973
|
}
|
|
798
|
-
function
|
|
974
|
+
function p() {
|
|
799
975
|
return !1;
|
|
800
976
|
}
|
|
801
|
-
function
|
|
977
|
+
function f() {
|
|
802
978
|
return !0;
|
|
803
979
|
}
|
|
804
|
-
function m(
|
|
980
|
+
function m(o) {
|
|
805
981
|
}
|
|
806
982
|
function i() {
|
|
807
983
|
}
|
|
808
|
-
function
|
|
984
|
+
function s(o) {
|
|
809
985
|
return null;
|
|
810
986
|
}
|
|
811
987
|
return {
|
|
812
|
-
canAccepts:
|
|
813
|
-
checkCanDeleteComponent:
|
|
814
|
-
checkCanMoveComponent:
|
|
815
|
-
hideNestedPaddingInDesginerView:
|
|
988
|
+
canAccepts: n,
|
|
989
|
+
checkCanDeleteComponent: l,
|
|
990
|
+
checkCanMoveComponent: p,
|
|
991
|
+
hideNestedPaddingInDesginerView: f,
|
|
816
992
|
onAcceptMovedChildElement: m,
|
|
817
993
|
resolveComponentContext: i,
|
|
818
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
819
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
820
|
-
getPropsConfig:
|
|
994
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
995
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
996
|
+
getPropsConfig: s
|
|
821
997
|
};
|
|
822
998
|
}
|
|
823
|
-
function
|
|
999
|
+
function Se(a, t) {
|
|
824
1000
|
const {
|
|
825
|
-
canAccepts:
|
|
826
|
-
checkCanDeleteComponent:
|
|
827
|
-
checkCanMoveComponent:
|
|
828
|
-
hideNestedPaddingInDesginerView:
|
|
829
|
-
onAcceptMovedChildElement:
|
|
830
|
-
resolveComponentContext:
|
|
1001
|
+
canAccepts: e,
|
|
1002
|
+
checkCanDeleteComponent: r,
|
|
1003
|
+
checkCanMoveComponent: n,
|
|
1004
|
+
hideNestedPaddingInDesginerView: l,
|
|
1005
|
+
onAcceptMovedChildElement: p,
|
|
1006
|
+
resolveComponentContext: f,
|
|
831
1007
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
832
1008
|
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
833
|
-
} =
|
|
834
|
-
function
|
|
835
|
-
return new
|
|
1009
|
+
} = we(a), s = a.schema;
|
|
1010
|
+
function o(c, y) {
|
|
1011
|
+
return new Me(c, t).getPropertyConfig(s, y);
|
|
836
1012
|
}
|
|
837
1013
|
return {
|
|
838
|
-
canAccepts:
|
|
839
|
-
checkCanDeleteComponent:
|
|
840
|
-
checkCanMoveComponent:
|
|
841
|
-
hideNestedPaddingInDesginerView:
|
|
842
|
-
onAcceptMovedChildElement:
|
|
843
|
-
resolveComponentContext:
|
|
1014
|
+
canAccepts: e,
|
|
1015
|
+
checkCanDeleteComponent: r,
|
|
1016
|
+
checkCanMoveComponent: n,
|
|
1017
|
+
hideNestedPaddingInDesginerView: l,
|
|
1018
|
+
onAcceptMovedChildElement: p,
|
|
1019
|
+
resolveComponentContext: f,
|
|
844
1020
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
845
1021
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
846
|
-
getPropsConfig:
|
|
1022
|
+
getPropsConfig: o
|
|
847
1023
|
};
|
|
848
1024
|
}
|
|
849
|
-
const
|
|
1025
|
+
const Fe = /* @__PURE__ */ O({
|
|
850
1026
|
name: "FSwitchDesign",
|
|
851
|
-
props:
|
|
1027
|
+
props: N,
|
|
852
1028
|
emits: ["update:modelValue"],
|
|
853
|
-
setup(
|
|
1029
|
+
setup(a, t) {
|
|
854
1030
|
const {
|
|
855
|
-
size:
|
|
856
|
-
onLabel:
|
|
857
|
-
offLabel:
|
|
858
|
-
} =
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}),
|
|
862
|
-
const
|
|
1031
|
+
size: e,
|
|
1032
|
+
onLabel: r,
|
|
1033
|
+
offLabel: n
|
|
1034
|
+
} = j(a), l = E(), p = $("designer-host-service"), f = $("design-item-context"), m = Se(f, p), i = he(l, f, m);
|
|
1035
|
+
_(() => {
|
|
1036
|
+
l.value.componentInstance = i;
|
|
1037
|
+
}), t.expose(i.value);
|
|
1038
|
+
const s = D(() => ({
|
|
863
1039
|
switch: !0,
|
|
864
1040
|
"f-cmp-switch": !0,
|
|
865
1041
|
checked: !1,
|
|
866
|
-
"switch-large":
|
|
867
|
-
"switch-medium":
|
|
868
|
-
"switch-small":
|
|
869
|
-
})),
|
|
870
|
-
return () =>
|
|
871
|
-
ref:
|
|
1042
|
+
"switch-large": e.value === "large",
|
|
1043
|
+
"switch-medium": e.value === "medium",
|
|
1044
|
+
"switch-small": e.value === "small"
|
|
1045
|
+
})), o = D(() => (r == null ? void 0 : r.value) || (n == null ? void 0 : n.value));
|
|
1046
|
+
return () => F("span", {
|
|
1047
|
+
ref: l,
|
|
872
1048
|
tabindex: "0",
|
|
873
1049
|
role: "button",
|
|
874
|
-
class:
|
|
875
|
-
}, [
|
|
1050
|
+
class: s.value
|
|
1051
|
+
}, [o.value && F("span", {
|
|
876
1052
|
class: "switch-pane"
|
|
877
|
-
}, [
|
|
1053
|
+
}, [F("span", {
|
|
878
1054
|
class: "switch-label-unchecked"
|
|
879
|
-
}, [
|
|
1055
|
+
}, [n == null ? void 0 : n.value])]), F("small", null, [t.slots.default && t.slots.default()])]);
|
|
880
1056
|
}
|
|
881
|
-
}),
|
|
882
|
-
const
|
|
883
|
-
return
|
|
884
|
-
|
|
885
|
-
},
|
|
1057
|
+
}), Ee = (a) => {
|
|
1058
|
+
const t = a;
|
|
1059
|
+
return t.install = function(e) {
|
|
1060
|
+
e.component(t.name, a);
|
|
1061
|
+
}, a;
|
|
886
1062
|
};
|
|
887
|
-
|
|
888
|
-
|
|
1063
|
+
P.register = (a, t, e, r) => {
|
|
1064
|
+
a.switch = P, t.switch = Q;
|
|
889
1065
|
};
|
|
890
|
-
|
|
891
|
-
|
|
1066
|
+
P.registerDesigner = (a, t, e) => {
|
|
1067
|
+
a.switch = Fe, t.switch = Q;
|
|
892
1068
|
};
|
|
893
|
-
const
|
|
1069
|
+
const Pe = Ee(P);
|
|
894
1070
|
export {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
1071
|
+
P as FSwitch,
|
|
1072
|
+
Pe as default,
|
|
1073
|
+
Q as propsResolver,
|
|
1074
|
+
N as switchProps
|
|
899
1075
|
};
|