@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,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
1
|
+
var H = Object.defineProperty;
|
|
2
|
+
var x = (i, t, e) => t in i ? H(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var g = (i, t, e) => x(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as N, inject as L, onMounted as j, createVNode as M, Fragment as R, computed as V, ref as F, provide as K } from "vue";
|
|
5
5
|
import { useCheck as ee } from "../common/index.esm.js";
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
6
|
+
import { isPlainObject as $, cloneDeep as q } from "lodash-es";
|
|
7
|
+
import { DgControl as W } from "../designer-canvas/index.esm.js";
|
|
8
|
+
const te = {
|
|
9
9
|
value: { type: String, default: "" },
|
|
10
10
|
/** 值 */
|
|
11
11
|
modelValue: { type: String, default: "" },
|
|
@@ -15,150 +15,150 @@ const ne = {
|
|
|
15
15
|
label: { type: String, default: "" },
|
|
16
16
|
/** 标识 */
|
|
17
17
|
id: { type: String, default: "" }
|
|
18
|
-
},
|
|
18
|
+
}, z = Symbol("radioGroupContext"), O = /* @__PURE__ */ N({
|
|
19
19
|
name: "FRadio",
|
|
20
|
-
props:
|
|
20
|
+
props: te,
|
|
21
21
|
emits: ["update:value"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
22
|
+
setup(i, t) {
|
|
23
|
+
const e = L(z, null), {
|
|
24
24
|
buttonClass: o,
|
|
25
25
|
checked: r,
|
|
26
|
-
disabled:
|
|
27
|
-
name:
|
|
28
|
-
tagClass:
|
|
29
|
-
shouldRenderButton:
|
|
30
|
-
shouldRenderNative:
|
|
31
|
-
shouldRenderTag:
|
|
32
|
-
onClickRadio:
|
|
33
|
-
} = ee(
|
|
34
|
-
return
|
|
26
|
+
disabled: l,
|
|
27
|
+
name: d,
|
|
28
|
+
tagClass: f,
|
|
29
|
+
shouldRenderButton: p,
|
|
30
|
+
shouldRenderNative: a,
|
|
31
|
+
shouldRenderTag: s,
|
|
32
|
+
onClickRadio: n
|
|
33
|
+
} = ee(i, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
|
|
34
|
+
return j(() => {
|
|
35
35
|
}), () => {
|
|
36
|
-
var
|
|
37
|
-
return
|
|
36
|
+
var c, y, u, h, b, C;
|
|
37
|
+
return M(R, null, [p.value && M("div", {
|
|
38
38
|
class: o.value,
|
|
39
39
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
40
|
-
onClick:
|
|
41
|
-
}, [(
|
|
42
|
-
class:
|
|
43
|
-
onClick:
|
|
44
|
-
}, [
|
|
40
|
+
onClick: n
|
|
41
|
+
}, [(y = (c = t.slots).default) == null ? void 0 : y.call(c)]), s.value && M("div", {
|
|
42
|
+
class: f.value,
|
|
43
|
+
onClick: n
|
|
44
|
+
}, [M("div", {
|
|
45
45
|
class: "title"
|
|
46
|
-
}, [(
|
|
46
|
+
}, [(h = (u = t.slots).default) == null ? void 0 : h.call(u)]), M("div", {
|
|
47
47
|
class: "tip"
|
|
48
|
-
}, null),
|
|
48
|
+
}, null), M("span", {
|
|
49
49
|
class: "f-icon f-icon-check f-radio-icon"
|
|
50
|
-
}, null)]),
|
|
50
|
+
}, null)]), a.value && M("div", {
|
|
51
51
|
class: "custom-control custom-radio",
|
|
52
|
-
onClick:
|
|
53
|
-
}, [
|
|
52
|
+
onClick: n
|
|
53
|
+
}, [M("input", {
|
|
54
54
|
type: "radio",
|
|
55
55
|
class: "custom-control-input",
|
|
56
|
-
name:
|
|
57
|
-
id:
|
|
58
|
-
value:
|
|
56
|
+
name: d.value,
|
|
57
|
+
id: i.id,
|
|
58
|
+
value: i.value,
|
|
59
59
|
checked: r.value,
|
|
60
|
-
disabled:
|
|
61
|
-
}, null),
|
|
60
|
+
disabled: l.value
|
|
61
|
+
}, null), M("div", {
|
|
62
62
|
class: "custom-control-label"
|
|
63
|
-
}, [(
|
|
63
|
+
}, [(C = (b = t.slots).default) == null ? void 0 : C.call(b)])])]);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
function
|
|
68
|
-
return
|
|
67
|
+
function ne(i, t, e) {
|
|
68
|
+
return t;
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
function U(
|
|
72
|
-
const { properties:
|
|
73
|
-
return (!r || !o.find((
|
|
70
|
+
const X = {}, _ = {};
|
|
71
|
+
function U(i) {
|
|
72
|
+
const { properties: t, title: e, ignore: o } = i, r = o && Array.isArray(o), l = Object.keys(t).reduce((d, f) => ((!r || !o.find((p) => p == f)) && (d[f] = t[f].type === "object" && t[f].properties ? U(t[f]) : q(t[f].default)), d), {});
|
|
73
|
+
return e && (!r || !o.find((d) => d == "id")) && (l.id = `${e}-${Date.now()}`), l;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const o =
|
|
75
|
+
function J(i, t = {}, e) {
|
|
76
|
+
const o = X[i];
|
|
77
77
|
if (o) {
|
|
78
78
|
let r = U(o);
|
|
79
|
-
const
|
|
80
|
-
return r =
|
|
79
|
+
const l = _[i];
|
|
80
|
+
return r = l ? l({ getSchemaByType: J }, r, t, e) : r, r;
|
|
81
81
|
}
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
return Object.keys(
|
|
84
|
+
function oe(i, t) {
|
|
85
|
+
const e = U(t);
|
|
86
|
+
return Object.keys(i).reduce((o, r) => (o[r] && $(o[r]) && $(i[r]) ? Object.assign(o[r], i[r]) : o[r] = i[r], o), e), e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return Object.keys(
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
if (typeof
|
|
93
|
-
o[
|
|
88
|
+
function re(i, t) {
|
|
89
|
+
return Object.keys(i).filter((o) => i[o] != null).reduce((o, r) => {
|
|
90
|
+
if (t.has(r)) {
|
|
91
|
+
const l = t.get(r);
|
|
92
|
+
if (typeof l == "string")
|
|
93
|
+
o[l] = i[r];
|
|
94
94
|
else {
|
|
95
|
-
const
|
|
96
|
-
Object.assign(o,
|
|
95
|
+
const d = l(r, i[r], i);
|
|
96
|
+
Object.assign(o, d);
|
|
97
97
|
}
|
|
98
98
|
} else
|
|
99
|
-
o[r] =
|
|
99
|
+
o[r] = i[r];
|
|
100
100
|
return o;
|
|
101
101
|
}, {});
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
const o =
|
|
105
|
-
return
|
|
103
|
+
function ie(i, t, e = /* @__PURE__ */ new Map()) {
|
|
104
|
+
const o = oe(i, t);
|
|
105
|
+
return re(o, e);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
function
|
|
109
|
-
if (typeof
|
|
110
|
-
return
|
|
111
|
-
if (typeof
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
return Number(
|
|
115
|
-
if (
|
|
116
|
-
return Number(
|
|
117
|
-
if (
|
|
118
|
-
return Number(
|
|
107
|
+
function ae(i = {}) {
|
|
108
|
+
function t(a, s, n, c) {
|
|
109
|
+
if (typeof n == "number")
|
|
110
|
+
return c[a].length === n;
|
|
111
|
+
if (typeof n == "object") {
|
|
112
|
+
const y = Object.keys(n)[0], u = n[y];
|
|
113
|
+
if (y === "not")
|
|
114
|
+
return Number(c[a].length) !== Number(u);
|
|
115
|
+
if (y === "moreThan")
|
|
116
|
+
return Number(c[a].length) >= Number(u);
|
|
117
|
+
if (y === "lessThan")
|
|
118
|
+
return Number(c[a].length) <= Number(u);
|
|
119
119
|
}
|
|
120
120
|
return !1;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return
|
|
122
|
+
function e(a, s, n, c) {
|
|
123
|
+
return c[a] && c[a].propertyValue && String(c[a].propertyValue.value) === String(n);
|
|
124
124
|
}
|
|
125
125
|
const o = /* @__PURE__ */ new Map([
|
|
126
|
-
["length",
|
|
127
|
-
["getProperty",
|
|
126
|
+
["length", t],
|
|
127
|
+
["getProperty", e]
|
|
128
128
|
]);
|
|
129
|
-
Object.keys(
|
|
130
|
-
function r(
|
|
131
|
-
const
|
|
132
|
-
return typeof
|
|
133
|
-
if (
|
|
134
|
-
return { target:
|
|
135
|
-
const
|
|
136
|
-
return { target:
|
|
129
|
+
Object.keys(i).reduce((a, s) => (a.set(s, i[s]), a), o);
|
|
130
|
+
function r(a, s) {
|
|
131
|
+
const n = a;
|
|
132
|
+
return typeof s == "number" ? [{ target: n, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: n, operator: "getProperty", param: a, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
|
|
133
|
+
if (c === "length")
|
|
134
|
+
return { target: n, operator: "length", param: null, value: s[c] };
|
|
135
|
+
const y = c, u = s[c];
|
|
136
|
+
return { target: n, operator: "getProperty", param: y, value: u };
|
|
137
137
|
}) : [];
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return Object.keys(
|
|
141
|
-
const
|
|
142
|
-
return
|
|
139
|
+
function l(a) {
|
|
140
|
+
return Object.keys(a).reduce((n, c) => {
|
|
141
|
+
const y = r(c, a[c]);
|
|
142
|
+
return n.push(...y), n;
|
|
143
143
|
}, []);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
if (o.has(
|
|
147
|
-
const
|
|
148
|
-
return
|
|
145
|
+
function d(a, s) {
|
|
146
|
+
if (o.has(a.operator)) {
|
|
147
|
+
const n = o.get(a.operator);
|
|
148
|
+
return n && n(a.target, a.param, a.value, s) || !1;
|
|
149
149
|
}
|
|
150
150
|
return !1;
|
|
151
151
|
}
|
|
152
|
-
function a
|
|
153
|
-
return
|
|
152
|
+
function f(a, s) {
|
|
153
|
+
return l(a).reduce((y, u) => y && d(u, s), !0);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
return
|
|
155
|
+
function p(a, s) {
|
|
156
|
+
const n = Object.keys(a), c = n.includes("allOf"), y = n.includes("anyOf"), u = c || y, C = (u ? a[u ? c ? "allOf" : "anyOf" : "allOf"] : [a]).map((E) => f(E, s));
|
|
157
|
+
return c ? !C.includes(!1) : C.includes(!0);
|
|
158
158
|
}
|
|
159
|
-
return { parseValueSchema:
|
|
159
|
+
return { parseValueSchema: p };
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const m = {
|
|
162
162
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
163
163
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
164
164
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -195,21 +195,22 @@ const l = {
|
|
|
195
195
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
196
196
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
197
197
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
198
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
199
|
-
|
|
200
|
-
le
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
198
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
199
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
200
|
+
}, le = {}, se = {};
|
|
201
|
+
ae();
|
|
202
|
+
function ce(i, t, e = /* @__PURE__ */ new Map(), o = (d, f, p) => f, r = {}, l = (d) => d) {
|
|
203
|
+
return X[t.title] = t, _[t.title] = o, le[t.title] = r, se[t.title] = l, (d = {}) => {
|
|
204
|
+
const f = ie(d, t, e), p = Object.keys(i).reduce((a, s) => (a[s] = i[s].default, a), {});
|
|
205
|
+
return Object.assign(p, f);
|
|
205
206
|
};
|
|
206
207
|
}
|
|
207
|
-
function
|
|
208
|
-
return { customClass:
|
|
208
|
+
function pe(i, t) {
|
|
209
|
+
return { customClass: t.class, customStyle: t.style };
|
|
209
210
|
}
|
|
210
211
|
const de = /* @__PURE__ */ new Map([
|
|
211
|
-
["appearance",
|
|
212
|
-
]),
|
|
212
|
+
["appearance", pe]
|
|
213
|
+
]), ue = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/radio-group.schema.json", fe = "radio-group", ye = "A Farris Input Component", he = "object", ge = {
|
|
213
214
|
id: {
|
|
214
215
|
description: "The unique identifier for a radio-group",
|
|
215
216
|
type: "string"
|
|
@@ -290,23 +291,23 @@ const de = /* @__PURE__ */ new Map([
|
|
|
290
291
|
description: "",
|
|
291
292
|
type: "array"
|
|
292
293
|
}
|
|
293
|
-
},
|
|
294
|
+
}, ve = [
|
|
294
295
|
"id",
|
|
295
296
|
"type"
|
|
296
|
-
],
|
|
297
|
+
], be = [
|
|
297
298
|
"id",
|
|
298
299
|
"appearance",
|
|
299
300
|
"binding"
|
|
300
|
-
],
|
|
301
|
-
$schema:
|
|
302
|
-
$id:
|
|
303
|
-
title:
|
|
304
|
-
description:
|
|
301
|
+
], Ce = {
|
|
302
|
+
$schema: ue,
|
|
303
|
+
$id: me,
|
|
304
|
+
title: fe,
|
|
305
|
+
description: ye,
|
|
305
306
|
type: he,
|
|
306
|
-
properties:
|
|
307
|
-
required:
|
|
308
|
-
ignore:
|
|
309
|
-
},
|
|
307
|
+
properties: ge,
|
|
308
|
+
required: ve,
|
|
309
|
+
ignore: be
|
|
310
|
+
}, ke = {
|
|
310
311
|
/**
|
|
311
312
|
* 是否被选中
|
|
312
313
|
*/
|
|
@@ -323,8 +324,8 @@ const de = /* @__PURE__ */ new Map([
|
|
|
323
324
|
* type为button或者tag时的尺寸
|
|
324
325
|
*/
|
|
325
326
|
size: { type: String, default: "middle" }
|
|
326
|
-
},
|
|
327
|
-
...
|
|
327
|
+
}, G = {
|
|
328
|
+
...ke,
|
|
328
329
|
/**
|
|
329
330
|
* 组件标识
|
|
330
331
|
*/
|
|
@@ -363,195 +364,186 @@ const de = /* @__PURE__ */ new Map([
|
|
|
363
364
|
* 枚举数组中枚举值的key值。
|
|
364
365
|
*/
|
|
365
366
|
valueField: { type: String, default: "value" }
|
|
366
|
-
},
|
|
367
|
-
function
|
|
368
|
-
const o =
|
|
369
|
-
function p
|
|
370
|
-
return
|
|
367
|
+
}, Q = ce(G, Ce, de, ne);
|
|
368
|
+
function Y(i, t, e) {
|
|
369
|
+
const o = V(() => !i.disabled), r = V(() => i.enumData || []);
|
|
370
|
+
function l(p) {
|
|
371
|
+
return p[i.valueField];
|
|
371
372
|
}
|
|
372
|
-
function
|
|
373
|
-
return
|
|
373
|
+
function d(p) {
|
|
374
|
+
return p[i.textField];
|
|
374
375
|
}
|
|
375
|
-
function
|
|
376
|
+
function f(p, a) {
|
|
376
377
|
if (o.value) {
|
|
377
|
-
const
|
|
378
|
-
|
|
378
|
+
const s = l(p);
|
|
379
|
+
e.value !== s && (e.value = s, t.emit("changeValue", s), t.emit("update:modelValue", s));
|
|
379
380
|
}
|
|
380
|
-
|
|
381
|
+
a.stopPropagation();
|
|
381
382
|
}
|
|
382
383
|
return {
|
|
383
384
|
enumData: r,
|
|
384
|
-
getValue:
|
|
385
|
-
getText:
|
|
386
|
-
onClickRadio:
|
|
385
|
+
getValue: l,
|
|
386
|
+
getText: d,
|
|
387
|
+
onClickRadio: f
|
|
387
388
|
};
|
|
388
389
|
}
|
|
389
|
-
const
|
|
390
|
+
const I = /* @__PURE__ */ N({
|
|
390
391
|
name: "FRadioGroup",
|
|
391
|
-
props:
|
|
392
|
+
props: G,
|
|
392
393
|
emits: ["changeValue", "update:modelValue"],
|
|
393
|
-
setup(
|
|
394
|
-
const
|
|
394
|
+
setup(i, t) {
|
|
395
|
+
const e = F(i.modelValue), {
|
|
395
396
|
enumData: o,
|
|
396
397
|
onClickRadio: r,
|
|
397
|
-
getValue:
|
|
398
|
-
getText:
|
|
399
|
-
} =
|
|
400
|
-
"farris-checkradio-hor":
|
|
401
|
-
})),
|
|
402
|
-
return K(
|
|
403
|
-
radios:
|
|
404
|
-
parentProps:
|
|
405
|
-
parentContext:
|
|
406
|
-
}), () =>
|
|
407
|
-
class: ["farris-input-wrap",
|
|
408
|
-
}, [
|
|
409
|
-
const
|
|
410
|
-
return
|
|
398
|
+
getValue: l,
|
|
399
|
+
getText: d
|
|
400
|
+
} = Y(i, t, e), f = V(() => ({
|
|
401
|
+
"farris-checkradio-hor": i.direction === "horizontal"
|
|
402
|
+
})), p = F([]);
|
|
403
|
+
return K(z, {
|
|
404
|
+
radios: p,
|
|
405
|
+
parentProps: i,
|
|
406
|
+
parentContext: t
|
|
407
|
+
}), () => M("div", {
|
|
408
|
+
class: ["farris-input-wrap", f.value]
|
|
409
|
+
}, [t.slots.default ? t.slots.default() : o.value.map((a, s) => {
|
|
410
|
+
const n = "radio_" + i.id + i.name + a[i.valueField];
|
|
411
|
+
return M("div", {
|
|
411
412
|
class: "custom-control custom-radio"
|
|
412
|
-
}, [
|
|
413
|
+
}, [M("input", {
|
|
413
414
|
type: "radio",
|
|
414
415
|
class: "custom-control-input",
|
|
415
|
-
name:
|
|
416
|
-
id:
|
|
417
|
-
value:
|
|
418
|
-
checked:
|
|
419
|
-
disabled:
|
|
420
|
-
tabindex:
|
|
421
|
-
onClick: (
|
|
422
|
-
}, null),
|
|
416
|
+
name: n,
|
|
417
|
+
id: n,
|
|
418
|
+
value: l(a),
|
|
419
|
+
checked: l(a) === e.value,
|
|
420
|
+
disabled: i.disabled,
|
|
421
|
+
tabindex: i.tabIndex,
|
|
422
|
+
onClick: (c) => r(a, c)
|
|
423
|
+
}, null), M("label", {
|
|
423
424
|
class: "custom-control-label",
|
|
424
|
-
for:
|
|
425
|
-
}, [
|
|
425
|
+
for: n
|
|
426
|
+
}, [d(a)])]);
|
|
426
427
|
})]);
|
|
427
428
|
}
|
|
428
429
|
});
|
|
429
|
-
function
|
|
430
|
-
var
|
|
430
|
+
function Me(i, t, e) {
|
|
431
|
+
var D;
|
|
431
432
|
function o() {
|
|
432
|
-
|
|
433
|
+
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
433
434
|
}
|
|
434
435
|
o();
|
|
435
|
-
const r =
|
|
436
|
-
function
|
|
437
|
-
return (
|
|
436
|
+
const r = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", d = F();
|
|
437
|
+
function f() {
|
|
438
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
+
function p() {
|
|
440
441
|
return !1;
|
|
441
442
|
}
|
|
442
|
-
function
|
|
443
|
-
return (
|
|
443
|
+
function a() {
|
|
444
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
444
445
|
}
|
|
445
|
-
function
|
|
446
|
-
return (
|
|
446
|
+
function s() {
|
|
447
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
447
448
|
}
|
|
448
|
-
function
|
|
449
|
-
if (!
|
|
449
|
+
function n(v) {
|
|
450
|
+
if (!v || !v.value)
|
|
450
451
|
return null;
|
|
451
|
-
if (
|
|
452
|
-
return
|
|
453
|
-
const
|
|
454
|
-
return
|
|
455
|
-
}
|
|
456
|
-
function
|
|
457
|
-
const { componentInstance:
|
|
458
|
-
return !
|
|
459
|
-
}
|
|
460
|
-
function
|
|
461
|
-
return !!
|
|
462
|
-
}
|
|
463
|
-
function
|
|
464
|
-
return (
|
|
465
|
-
}
|
|
466
|
-
function
|
|
467
|
-
}
|
|
468
|
-
function
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
function
|
|
472
|
-
const { componentType:
|
|
473
|
-
let
|
|
474
|
-
|
|
475
|
-
const
|
|
476
|
-
return
|
|
477
|
-
}
|
|
478
|
-
function
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
canMove: a(),
|
|
494
|
-
canSelectParent: u(),
|
|
495
|
-
canDelete: i(),
|
|
496
|
-
canNested: !c(),
|
|
497
|
-
contents: e == null ? void 0 : e.schema.contents,
|
|
498
|
-
elementRef: n,
|
|
499
|
-
parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
|
|
500
|
-
schema: e == null ? void 0 : e.schema,
|
|
452
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
453
|
+
return v.value;
|
|
454
|
+
const S = F(v == null ? void 0 : v.value.parent), w = n(S);
|
|
455
|
+
return w || null;
|
|
456
|
+
}
|
|
457
|
+
function c(v = t) {
|
|
458
|
+
const { componentInstance: S, designerItemElementRef: w } = v;
|
|
459
|
+
return !S || !S.value ? null : S.value.canMove ? w : c(v.parent);
|
|
460
|
+
}
|
|
461
|
+
function y(v) {
|
|
462
|
+
return !!e && e.canAccepts(v);
|
|
463
|
+
}
|
|
464
|
+
function u() {
|
|
465
|
+
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
466
|
+
}
|
|
467
|
+
function h() {
|
|
468
|
+
}
|
|
469
|
+
function b(v, S) {
|
|
470
|
+
S && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(S);
|
|
471
|
+
}
|
|
472
|
+
function C(v, S) {
|
|
473
|
+
const { componentType: w } = v;
|
|
474
|
+
let T = J(w, v, S);
|
|
475
|
+
e && e.onResolveNewComponentSchema && (T = e.onResolveNewComponentSchema(v, T));
|
|
476
|
+
const A = w.toLowerCase().replace("-", "_");
|
|
477
|
+
return T && !T.id && T.type === w && (T.id = `${A}_${Math.random().toString().slice(2, 6)}`), T;
|
|
478
|
+
}
|
|
479
|
+
function k(v) {
|
|
480
|
+
}
|
|
481
|
+
function E(...v) {
|
|
482
|
+
if (e && e.getPropsConfig)
|
|
483
|
+
return e.getPropsConfig(...v);
|
|
484
|
+
}
|
|
485
|
+
return d.value = {
|
|
486
|
+
canMove: f(),
|
|
487
|
+
canSelectParent: p(),
|
|
488
|
+
canDelete: a(),
|
|
489
|
+
canNested: !s(),
|
|
490
|
+
contents: t == null ? void 0 : t.schema.contents,
|
|
491
|
+
elementRef: i,
|
|
492
|
+
parent: (D = t == null ? void 0 : t.parent) == null ? void 0 : D.componentInstance,
|
|
493
|
+
schema: t == null ? void 0 : t.schema,
|
|
501
494
|
styles: r,
|
|
502
|
-
designerClass:
|
|
503
|
-
canAccepts:
|
|
504
|
-
getBelongedComponentInstance:
|
|
505
|
-
getDraggableDesignItemElement:
|
|
506
|
-
getDraggingDisplayText:
|
|
507
|
-
getPropConfig:
|
|
508
|
-
getDragScopeElement:
|
|
509
|
-
onAcceptMovedChildElement:
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
addNewChildComponentSchema: V,
|
|
495
|
+
designerClass: l,
|
|
496
|
+
canAccepts: y,
|
|
497
|
+
getBelongedComponentInstance: n,
|
|
498
|
+
getDraggableDesignItemElement: c,
|
|
499
|
+
getDraggingDisplayText: u,
|
|
500
|
+
getPropConfig: E,
|
|
501
|
+
getDragScopeElement: h,
|
|
502
|
+
onAcceptMovedChildElement: b,
|
|
503
|
+
onChildElementMovedOut: k,
|
|
504
|
+
addNewChildComponentSchema: C,
|
|
513
505
|
updateDragAndDropRules: o,
|
|
514
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
515
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
516
|
-
},
|
|
506
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || F(!1),
|
|
507
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || F(!1)
|
|
508
|
+
}, d;
|
|
517
509
|
}
|
|
518
|
-
class
|
|
519
|
-
constructor(
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
510
|
+
class Se {
|
|
511
|
+
constructor(t, e) {
|
|
512
|
+
g(this, "componentId");
|
|
513
|
+
g(this, "viewModelId");
|
|
514
|
+
g(this, "eventsEditorUtils");
|
|
515
|
+
g(this, "formSchemaUtils");
|
|
516
|
+
g(this, "formMetadataConverter");
|
|
517
|
+
g(this, "designViewModelUtils");
|
|
518
|
+
g(this, "designViewModelField");
|
|
519
|
+
g(this, "controlCreatorUtils");
|
|
520
|
+
g(this, "designerHostService");
|
|
521
|
+
g(this, "schemaService", null);
|
|
522
|
+
g(this, "metadataService", null);
|
|
523
|
+
g(this, "propertyConfig", {
|
|
532
524
|
type: "object",
|
|
533
525
|
categories: {}
|
|
534
526
|
});
|
|
535
527
|
var o;
|
|
536
|
-
this.componentId =
|
|
528
|
+
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;
|
|
537
529
|
}
|
|
538
530
|
getTableInfo() {
|
|
539
|
-
var
|
|
540
|
-
return (
|
|
531
|
+
var t;
|
|
532
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
541
533
|
}
|
|
542
|
-
setDesignViewModelField(
|
|
543
|
-
const
|
|
544
|
-
if (
|
|
534
|
+
setDesignViewModelField(t) {
|
|
535
|
+
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
536
|
+
if (e) {
|
|
545
537
|
if (!this.designViewModelField) {
|
|
546
538
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
547
|
-
this.designViewModelField = o.fields.find((r) => r.id ===
|
|
539
|
+
this.designViewModelField = o.fields.find((r) => r.id === e);
|
|
548
540
|
}
|
|
549
|
-
|
|
541
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
550
542
|
}
|
|
551
543
|
}
|
|
552
|
-
changeFieldEditorType(
|
|
544
|
+
changeFieldEditorType(t, e) {
|
|
553
545
|
}
|
|
554
|
-
getBasicPropConfig(
|
|
546
|
+
getBasicPropConfig(t) {
|
|
555
547
|
return {
|
|
556
548
|
description: "Basic Information",
|
|
557
549
|
title: "基本信息",
|
|
@@ -570,13 +562,13 @@ class we {
|
|
|
570
562
|
type: "combo-list",
|
|
571
563
|
textField: "name",
|
|
572
564
|
valueField: "value",
|
|
573
|
-
data: [{ value:
|
|
565
|
+
data: [{ value: t.type, name: m[t.type].name }]
|
|
574
566
|
}
|
|
575
567
|
}
|
|
576
568
|
}
|
|
577
569
|
};
|
|
578
570
|
}
|
|
579
|
-
getAppearanceConfig(
|
|
571
|
+
getAppearanceConfig(t = null) {
|
|
580
572
|
return {
|
|
581
573
|
title: "样式",
|
|
582
574
|
description: "Appearance",
|
|
@@ -596,90 +588,212 @@ class we {
|
|
|
596
588
|
}
|
|
597
589
|
};
|
|
598
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
*
|
|
593
|
+
* @param propertyId
|
|
594
|
+
* @param componentInstance
|
|
595
|
+
* @returns
|
|
596
|
+
*/
|
|
597
|
+
updateElementByParentContainer(t, e) {
|
|
598
|
+
const o = e && e.parent && e.parent.schema;
|
|
599
|
+
if (!o)
|
|
600
|
+
return;
|
|
601
|
+
const r = o.contents.findIndex((d) => d.id === t), l = q(o.contents[r]);
|
|
602
|
+
o.contents.splice(r, 1), o.contents.splice(r, 0, l);
|
|
603
|
+
}
|
|
599
604
|
}
|
|
600
|
-
const
|
|
605
|
+
const P = class P {
|
|
601
606
|
/**
|
|
602
607
|
* 根据绑定字段类型获取可用的输入类控件
|
|
603
608
|
*/
|
|
604
|
-
static getEditorTypesByMDataType(
|
|
605
|
-
const
|
|
606
|
-
return
|
|
609
|
+
static getEditorTypesByMDataType(t) {
|
|
610
|
+
const e = P.fieldControlTypeMapping[t];
|
|
611
|
+
return e || [{ key: "", value: "" }];
|
|
607
612
|
}
|
|
608
613
|
/**
|
|
609
614
|
* 获取所有输入类控件
|
|
610
615
|
*/
|
|
611
616
|
static getAllInputTypes() {
|
|
612
|
-
const
|
|
613
|
-
for (let
|
|
614
|
-
|
|
615
|
-
|
|
617
|
+
const t = [];
|
|
618
|
+
for (let e in P.fieldControlTypeMapping)
|
|
619
|
+
P.fieldControlTypeMapping[e].forEach((o) => {
|
|
620
|
+
t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
616
621
|
});
|
|
617
|
-
return
|
|
622
|
+
return t;
|
|
618
623
|
}
|
|
619
624
|
};
|
|
620
625
|
/**
|
|
621
626
|
* <字段类型,可配置的控件类型列表>的映射
|
|
622
627
|
*/
|
|
623
|
-
|
|
628
|
+
g(P, "fieldControlTypeMapping", {
|
|
624
629
|
String: [
|
|
625
|
-
{ key:
|
|
626
|
-
{ key:
|
|
627
|
-
{ key:
|
|
628
|
-
{ key:
|
|
629
|
-
{ key:
|
|
630
|
-
{ key:
|
|
631
|
-
{ key:
|
|
630
|
+
{ key: m["input-group"].type, value: m["input-group"].name },
|
|
631
|
+
{ key: m.lookup.type, value: m.lookup.name },
|
|
632
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name },
|
|
633
|
+
{ key: m["check-box"].type, value: m["check-box"].name },
|
|
634
|
+
{ key: m["check-group"].type, value: m["check-group"].name },
|
|
635
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name },
|
|
636
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
637
|
+
{ key: m.textarea.type, value: m.textarea.name }
|
|
632
638
|
],
|
|
633
639
|
Text: [
|
|
634
|
-
{ key:
|
|
635
|
-
{ key:
|
|
640
|
+
{ key: m.textarea.type, value: m.textarea.name },
|
|
641
|
+
{ key: m.lookup.type, value: m.lookup.name }
|
|
636
642
|
],
|
|
637
643
|
Decimal: [
|
|
638
|
-
{ key:
|
|
644
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
639
645
|
],
|
|
640
646
|
Integer: [
|
|
641
|
-
{ key:
|
|
647
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
642
648
|
],
|
|
643
649
|
Number: [
|
|
644
|
-
{ key:
|
|
650
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
645
651
|
],
|
|
646
652
|
BigNumber: [
|
|
647
|
-
{ key:
|
|
653
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
648
654
|
],
|
|
649
655
|
Date: [
|
|
650
|
-
{ key:
|
|
656
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name }
|
|
651
657
|
],
|
|
652
658
|
DateTime: [
|
|
653
|
-
{ key:
|
|
659
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name }
|
|
654
660
|
],
|
|
655
661
|
Boolean: [
|
|
656
|
-
{ key:
|
|
657
|
-
{ key:
|
|
662
|
+
{ key: m.switch.type, value: m.switch.name },
|
|
663
|
+
{ key: m["check-box"].type, value: m["check-box"].name }
|
|
658
664
|
],
|
|
659
665
|
Enum: [
|
|
660
|
-
{ key:
|
|
661
|
-
{ key:
|
|
666
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
667
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name }
|
|
662
668
|
],
|
|
663
669
|
Object: [
|
|
664
|
-
{ key:
|
|
665
|
-
{ key:
|
|
666
|
-
{ key:
|
|
670
|
+
{ key: m.lookup.type, value: m.lookup.name },
|
|
671
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
672
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name }
|
|
667
673
|
]
|
|
668
674
|
});
|
|
669
|
-
let
|
|
670
|
-
const
|
|
671
|
-
class
|
|
672
|
-
constructor(
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
675
|
+
let B = P;
|
|
676
|
+
const Fe = F(0);
|
|
677
|
+
class we {
|
|
678
|
+
constructor() {
|
|
679
|
+
/** 控件标题 */
|
|
680
|
+
g(this, "label", "");
|
|
681
|
+
/** 控件id */
|
|
682
|
+
g(this, "id", "");
|
|
683
|
+
/** 每个控件占用的栅格数 */
|
|
684
|
+
g(this, "columnInSM", 12);
|
|
685
|
+
g(this, "columnInMD", 6);
|
|
686
|
+
g(this, "columnInLG", 3);
|
|
687
|
+
g(this, "columnInEL", 2);
|
|
688
|
+
/** 每个控件占用的列数 */
|
|
689
|
+
g(this, "displayWidthInSM", 1);
|
|
690
|
+
g(this, "displayWidthInMD", 1);
|
|
691
|
+
g(this, "displayWidthInLG", 1);
|
|
692
|
+
g(this, "displayWidthInEL", 1);
|
|
693
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
694
|
+
g(this, "displayColumnCountAtBreakPoint", "md");
|
|
695
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
696
|
+
g(this, "tagRow", 0);
|
|
697
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
698
|
+
g(this, "showTopBorder", 0);
|
|
699
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
700
|
+
g(this, "group", 1);
|
|
701
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
702
|
+
g(this, "isSupportedClass", !0);
|
|
703
|
+
/** 控件所在分组id(设计器用的) */
|
|
704
|
+
g(this, "fieldSetId", "");
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
function Te(i) {
|
|
708
|
+
let t, e;
|
|
709
|
+
const o = /* @__PURE__ */ new Map();
|
|
710
|
+
let r = [];
|
|
711
|
+
function l(s, n) {
|
|
712
|
+
const y = s.split(" ").filter((k) => k.startsWith("col-"));
|
|
713
|
+
if (y.length === 0) {
|
|
714
|
+
n.isSupportedClass = !1;
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
let u = y.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), h = y.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), b = y.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), C = y.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k));
|
|
718
|
+
u = u || "col-12", n.columnInSM = parseInt(u.replace("col-", ""), 10), n.displayWidthInSM = n.columnInSM / 12, n.displayWidthInSM !== 1 && (n.isSupportedClass = !1), h = h || "col-md-" + n.columnInSM, n.columnInMD = parseInt(h.replace("col-md-", ""), 10), n.displayWidthInMD = n.columnInMD / 6, [1, 2].includes(n.displayWidthInMD) || (n.isSupportedClass = !1), b = b || "col-xl-" + n.columnInMD, n.columnInLG = parseInt(b.replace("col-xl-", ""), 10), n.displayWidthInLG = n.columnInLG / 3, [1, 2, 3, 4].includes(n.displayWidthInLG) || (n.isSupportedClass = !1), C = C || "col-el-" + n.columnInLG, n.columnInEL = parseInt(C.replace("col-el-", ""), 10), n.displayWidthInEL = n.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(n.displayWidthInEL) || (n.isSupportedClass = !1);
|
|
719
|
+
}
|
|
720
|
+
function d(s, n, c, y = !1) {
|
|
721
|
+
let u = !1;
|
|
722
|
+
s.contents.forEach((h) => {
|
|
723
|
+
if (h.type === "fieldset") {
|
|
724
|
+
c += 1, d(h, n, c, !0), u = !0;
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
u && (c += 1, u = !1);
|
|
728
|
+
const b = h.appearance && h.appearance.class, C = new we();
|
|
729
|
+
b ? l(b, C) : C.isSupportedClass = !1, C.label = h.label || h.id, C.id = h.id, C.group = c, y && (C.fieldSetId = s.id), e === h.id && (t = c), o.set(h.id, h), n.push(C);
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
function f(s) {
|
|
733
|
+
const n = i.getComponentById(s);
|
|
734
|
+
if (!n || !n.componentType || !n.componentType.startsWith("form"))
|
|
735
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
736
|
+
const c = i.selectNode(n, (y) => y.type === W["response-form"].type);
|
|
737
|
+
return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
|
|
738
|
+
}
|
|
739
|
+
function p(s, n) {
|
|
740
|
+
n = n || s.id;
|
|
741
|
+
const { result: c, message: y, formNode: u } = f(n);
|
|
742
|
+
if (!c)
|
|
743
|
+
return { result: c, message: y };
|
|
744
|
+
e = s.id, r = [], o.clear();
|
|
745
|
+
const h = u.contents[0].type === W.fieldset.type ? 0 : 1;
|
|
746
|
+
d(u, r, h);
|
|
747
|
+
const b = r.find((k) => !k.isSupportedClass);
|
|
748
|
+
return {
|
|
749
|
+
defaultState: {
|
|
750
|
+
defaultGroupNumber: t || 1,
|
|
751
|
+
model: b ? "customize" : "standard"
|
|
752
|
+
},
|
|
753
|
+
importData: r
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function a(s, n) {
|
|
757
|
+
n = n;
|
|
758
|
+
const { result: c, formNode: y } = f(n);
|
|
759
|
+
if (!c)
|
|
760
|
+
return "";
|
|
761
|
+
const u = [];
|
|
762
|
+
return s.forEach((h) => {
|
|
763
|
+
var k;
|
|
764
|
+
const b = o.get(h.id), C = b.appearance && b.appearance.class;
|
|
765
|
+
if (C) {
|
|
766
|
+
const D = C.split(" ").filter((Z) => !Z.startsWith("col-")), v = "col-" + h.columnInSM, S = "col-md-" + h.columnInMD, w = "col-xl-" + h.columnInLG, T = "col-el-" + h.columnInEL, A = [v, S, w, T].concat(D);
|
|
767
|
+
b.appearance.class = A.join(" ");
|
|
768
|
+
}
|
|
769
|
+
if (h.fieldSetId) {
|
|
770
|
+
const E = y.contents.find((v) => v.id === h.fieldSetId), D = u.find((v) => v.id === h.fieldSetId);
|
|
771
|
+
D ? (k = D.contents) == null || k.push(b) : (u.push(E), E.contents = [b]);
|
|
772
|
+
} else
|
|
773
|
+
u.push(b);
|
|
774
|
+
}), y.contents = u, y.id;
|
|
775
|
+
}
|
|
776
|
+
return {
|
|
777
|
+
checkCanFindFormNode: f,
|
|
778
|
+
checkCanOpenLayoutEditor: p,
|
|
779
|
+
changeFormControlsByResponseLayoutConfig: a,
|
|
780
|
+
getResonseFormLayoutConfig: d
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
class Ee extends Se {
|
|
784
|
+
constructor(e, o) {
|
|
785
|
+
super(e, o);
|
|
786
|
+
g(this, "responseLayoutEditorFunction");
|
|
787
|
+
this.responseLayoutEditorFunction = Te(this.formSchemaUtils);
|
|
788
|
+
}
|
|
789
|
+
getPropertyConfig(e, o) {
|
|
790
|
+
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;
|
|
791
|
+
}
|
|
792
|
+
getBasicProperties(e, o) {
|
|
793
|
+
var f;
|
|
794
|
+
var r = this;
|
|
681
795
|
this.setDesignViewModelField(e);
|
|
682
|
-
const
|
|
796
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
683
797
|
return {
|
|
684
798
|
description: "Basic Information",
|
|
685
799
|
title: "基本信息",
|
|
@@ -701,7 +815,7 @@ class Pe extends we {
|
|
|
701
815
|
textField: "value",
|
|
702
816
|
valueField: "key",
|
|
703
817
|
editable: !1,
|
|
704
|
-
data:
|
|
818
|
+
data: r.designViewModelField ? B.getEditorTypesByMDataType((f = r.designViewModelField.type) == null ? void 0 : f.name) : B.getAllInputTypes()
|
|
705
819
|
}
|
|
706
820
|
},
|
|
707
821
|
label: {
|
|
@@ -718,7 +832,7 @@ class Pe extends we {
|
|
|
718
832
|
bindingType: { enable: !1 },
|
|
719
833
|
editorParams: {
|
|
720
834
|
propertyData: e,
|
|
721
|
-
formBasicInfo:
|
|
835
|
+
formBasicInfo: l
|
|
722
836
|
},
|
|
723
837
|
columns: [
|
|
724
838
|
{ field: "name", title: "字段名称" },
|
|
@@ -726,26 +840,27 @@ class Pe extends we {
|
|
|
726
840
|
{ field: "fieldType", title: "字段类型" }
|
|
727
841
|
],
|
|
728
842
|
textField: "bindingField",
|
|
729
|
-
data:
|
|
843
|
+
data: d
|
|
730
844
|
}
|
|
731
845
|
}
|
|
732
846
|
},
|
|
733
|
-
setPropertyRelates(
|
|
734
|
-
if (
|
|
735
|
-
switch (
|
|
847
|
+
setPropertyRelates(p, a) {
|
|
848
|
+
if (p)
|
|
849
|
+
switch (p && p.propertyID) {
|
|
736
850
|
case "type": {
|
|
737
|
-
|
|
851
|
+
r.changeControlType(e, p, o);
|
|
738
852
|
break;
|
|
739
853
|
}
|
|
740
854
|
case "label": {
|
|
741
|
-
|
|
855
|
+
p.needRefreshControlTree = !0;
|
|
742
856
|
break;
|
|
743
857
|
}
|
|
744
858
|
}
|
|
745
859
|
}
|
|
746
860
|
};
|
|
747
861
|
}
|
|
748
|
-
getAppearanceProperties(e) {
|
|
862
|
+
getAppearanceProperties(e, o) {
|
|
863
|
+
var r = this;
|
|
749
864
|
return {
|
|
750
865
|
title: "样式",
|
|
751
866
|
description: "Appearance",
|
|
@@ -766,12 +881,25 @@ class Pe extends we {
|
|
|
766
881
|
description: "响应式列宽",
|
|
767
882
|
title: "响应式列宽",
|
|
768
883
|
type: "boolean",
|
|
769
|
-
visible: !
|
|
884
|
+
visible: !0,
|
|
885
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
886
|
+
refreshPanelAfterChanged: !0,
|
|
770
887
|
editor: {
|
|
771
|
-
type: "response-layout-editor-setting"
|
|
772
|
-
|
|
773
|
-
|
|
888
|
+
type: "response-layout-editor-setting",
|
|
889
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
|
|
890
|
+
}
|
|
774
891
|
}
|
|
892
|
+
},
|
|
893
|
+
setPropertyRelates(l, d) {
|
|
894
|
+
if (l)
|
|
895
|
+
switch (l && l.propertyID) {
|
|
896
|
+
case "responseLayout":
|
|
897
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
|
|
898
|
+
break;
|
|
899
|
+
case "class":
|
|
900
|
+
r.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
775
903
|
}
|
|
776
904
|
};
|
|
777
905
|
}
|
|
@@ -783,44 +911,44 @@ class Pe extends we {
|
|
|
783
911
|
* @param propertyData 控件DOM属性
|
|
784
912
|
* @param newControlType 新控件类型
|
|
785
913
|
*/
|
|
786
|
-
changeControlType(e,
|
|
787
|
-
var
|
|
788
|
-
const
|
|
789
|
-
if (!
|
|
914
|
+
changeControlType(e, o, r) {
|
|
915
|
+
var s, n, c, y;
|
|
916
|
+
const l = o.propertyValue, d = r && r.parent && r.parent.schema;
|
|
917
|
+
if (!d)
|
|
790
918
|
return;
|
|
791
|
-
const
|
|
792
|
-
let
|
|
919
|
+
const f = d.contents.findIndex((u) => u.id === e.id), p = d.contents[f];
|
|
920
|
+
let a;
|
|
793
921
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
794
922
|
editor: {
|
|
795
|
-
$type:
|
|
923
|
+
$type: l
|
|
796
924
|
},
|
|
797
925
|
name: this.designViewModelField.name,
|
|
798
926
|
require: this.designViewModelField.require,
|
|
799
927
|
readonly: this.designViewModelField.readonly
|
|
800
|
-
}, !1),
|
|
801
|
-
id:
|
|
802
|
-
appearance:
|
|
803
|
-
size:
|
|
804
|
-
label:
|
|
805
|
-
binding:
|
|
806
|
-
visible:
|
|
807
|
-
}), Object.assign(
|
|
808
|
-
isTextArea:
|
|
809
|
-
placeholder: (
|
|
810
|
-
holdPlace: (
|
|
811
|
-
readonly: (
|
|
812
|
-
require: (
|
|
813
|
-
}),
|
|
814
|
-
(
|
|
815
|
-
),
|
|
816
|
-
}
|
|
817
|
-
getComponentConfig(e,
|
|
818
|
-
const
|
|
928
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(a, {
|
|
929
|
+
id: p.id,
|
|
930
|
+
appearance: p.appearance,
|
|
931
|
+
size: p.size,
|
|
932
|
+
label: p.label,
|
|
933
|
+
binding: p.binding,
|
|
934
|
+
visible: p.visible
|
|
935
|
+
}), Object.assign(a.editor, {
|
|
936
|
+
isTextArea: a.isTextArea && p.isTextArea,
|
|
937
|
+
placeholder: (s = p.editor) == null ? void 0 : s.placeholder,
|
|
938
|
+
holdPlace: (n = p.editor) == null ? void 0 : n.holdPlace,
|
|
939
|
+
readonly: (c = p.editor) == null ? void 0 : c.readonly,
|
|
940
|
+
require: (y = p.editor) == null ? void 0 : y.require
|
|
941
|
+
}), d.contents.splice(f, 1), d.contents.splice(f, 0, a), r.schema = Object.assign(p, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
942
|
+
(u) => u.classList.remove("dgComponentSelected")
|
|
943
|
+
), Fe.value++;
|
|
944
|
+
}
|
|
945
|
+
getComponentConfig(e, o = {}, r = {}) {
|
|
946
|
+
const l = Object.assign({
|
|
819
947
|
description: "编辑器",
|
|
820
948
|
title: "编辑器",
|
|
821
949
|
type: "input-group",
|
|
822
950
|
$converter: "/converter/property-editor.converter"
|
|
823
|
-
},
|
|
951
|
+
}, o), d = Object.assign({
|
|
824
952
|
readonly: {
|
|
825
953
|
description: "",
|
|
826
954
|
title: "只读",
|
|
@@ -841,16 +969,64 @@ class Pe extends we {
|
|
|
841
969
|
title: "提示文本",
|
|
842
970
|
type: "string"
|
|
843
971
|
}
|
|
844
|
-
},
|
|
845
|
-
return { ...
|
|
972
|
+
}, r);
|
|
973
|
+
return { ...l, properties: { ...d } };
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
977
|
+
* @param controlClass 控件样式
|
|
978
|
+
* @param controlId 控件Id
|
|
979
|
+
* @param componentId 控件所在组件id
|
|
980
|
+
*/
|
|
981
|
+
updateUnifiedLayoutAfterControlChanged(e, o, r) {
|
|
982
|
+
const l = e.split(" ");
|
|
983
|
+
let d = l.find((n) => /^col-([1-9]|10|11|12)$/.test(n)), f = l.find((n) => /^col-md-([1-9]|10|11|12)$/.test(n)), p = l.find((n) => /^col-xl-([1-9]|10|11|12)$/.test(n)), a = l.find((n) => /^col-el-([1-9]|10|11|12)$/.test(n));
|
|
984
|
+
d = d || "col-12", f = f || "col-md-" + d.replace("col-", ""), p = p || "col-xl-" + f.replace("col-md-", ""), a = a || "col-el-" + p.replace("col-xl-", "");
|
|
985
|
+
const s = {
|
|
986
|
+
id: o,
|
|
987
|
+
columnInSM: parseInt(d.replace("col-", ""), 10),
|
|
988
|
+
columnInMD: parseInt(f.replace("col-md-", ""), 10),
|
|
989
|
+
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
990
|
+
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
991
|
+
};
|
|
992
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, s);
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
996
|
+
* @param componentId 组件Id
|
|
997
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
998
|
+
*/
|
|
999
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
|
|
1000
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1001
|
+
if (!r || !r.unifiedLayout)
|
|
1002
|
+
return;
|
|
1003
|
+
const l = [];
|
|
1004
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), o) {
|
|
1005
|
+
const u = l.find((h) => h.id === o.id);
|
|
1006
|
+
Object.assign(u || {}, o);
|
|
1007
|
+
}
|
|
1008
|
+
const d = l.map((u) => u.columnInSM), f = l.map((u) => u.columnInMD), p = l.map((u) => u.columnInLG), a = l.map((u) => u.columnInEL), s = this.checkIsUniqueColumn(d) ? d[0] : null, n = this.checkIsUniqueColumn(f) ? f[0] : null, c = this.checkIsUniqueColumn(p) ? p[0] : null, y = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
1009
|
+
Object.assign(r.unifiedLayout, {
|
|
1010
|
+
uniqueColClassInSM: s,
|
|
1011
|
+
uniqueColClassInMD: n,
|
|
1012
|
+
uniqueColClassInLG: c,
|
|
1013
|
+
uniqueColClassInEL: y
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* 校验宽度样式值是否一致
|
|
1018
|
+
*/
|
|
1019
|
+
checkIsUniqueColumn(e) {
|
|
1020
|
+
const o = new Set(e);
|
|
1021
|
+
return Array.from(o).length === 1;
|
|
846
1022
|
}
|
|
847
1023
|
}
|
|
848
|
-
class De extends
|
|
849
|
-
constructor(
|
|
850
|
-
super(
|
|
1024
|
+
class De extends Ee {
|
|
1025
|
+
constructor(t, e) {
|
|
1026
|
+
super(t, e);
|
|
851
1027
|
}
|
|
852
|
-
getEditorProperties(
|
|
853
|
-
return this.getComponentConfig(
|
|
1028
|
+
getEditorProperties(t) {
|
|
1029
|
+
return this.getComponentConfig(t, { type: "number-spinner" }, {
|
|
854
1030
|
readonly: {
|
|
855
1031
|
visible: !1
|
|
856
1032
|
},
|
|
@@ -881,118 +1057,118 @@ class De extends Pe {
|
|
|
881
1057
|
});
|
|
882
1058
|
}
|
|
883
1059
|
}
|
|
884
|
-
function
|
|
885
|
-
|
|
886
|
-
const
|
|
887
|
-
function r(
|
|
1060
|
+
function Pe(i, t) {
|
|
1061
|
+
i.schema;
|
|
1062
|
+
const e = F(!0), o = F(!0);
|
|
1063
|
+
function r(n) {
|
|
888
1064
|
return !1;
|
|
889
1065
|
}
|
|
890
|
-
function
|
|
1066
|
+
function l() {
|
|
891
1067
|
return !1;
|
|
892
1068
|
}
|
|
893
|
-
function
|
|
1069
|
+
function d() {
|
|
894
1070
|
return !1;
|
|
895
1071
|
}
|
|
896
|
-
function
|
|
1072
|
+
function f() {
|
|
897
1073
|
return !0;
|
|
898
1074
|
}
|
|
899
|
-
function
|
|
1075
|
+
function p(n) {
|
|
900
1076
|
}
|
|
901
|
-
function
|
|
1077
|
+
function a() {
|
|
902
1078
|
}
|
|
903
|
-
function
|
|
1079
|
+
function s(n) {
|
|
904
1080
|
return null;
|
|
905
1081
|
}
|
|
906
1082
|
return {
|
|
907
1083
|
canAccepts: r,
|
|
908
|
-
checkCanDeleteComponent:
|
|
909
|
-
checkCanMoveComponent:
|
|
910
|
-
hideNestedPaddingInDesginerView:
|
|
911
|
-
onAcceptMovedChildElement:
|
|
912
|
-
resolveComponentContext:
|
|
913
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1084
|
+
checkCanDeleteComponent: l,
|
|
1085
|
+
checkCanMoveComponent: d,
|
|
1086
|
+
hideNestedPaddingInDesginerView: f,
|
|
1087
|
+
onAcceptMovedChildElement: p,
|
|
1088
|
+
resolveComponentContext: a,
|
|
1089
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
914
1090
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
915
|
-
getPropsConfig:
|
|
1091
|
+
getPropsConfig: s
|
|
916
1092
|
};
|
|
917
1093
|
}
|
|
918
|
-
function
|
|
1094
|
+
function Ie(i, t) {
|
|
919
1095
|
const {
|
|
920
|
-
canAccepts:
|
|
1096
|
+
canAccepts: e,
|
|
921
1097
|
checkCanDeleteComponent: o,
|
|
922
1098
|
checkCanMoveComponent: r,
|
|
923
|
-
hideNestedPaddingInDesginerView:
|
|
924
|
-
onAcceptMovedChildElement:
|
|
925
|
-
resolveComponentContext:
|
|
926
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
927
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
928
|
-
} =
|
|
929
|
-
function
|
|
930
|
-
return new De(
|
|
1099
|
+
hideNestedPaddingInDesginerView: l,
|
|
1100
|
+
onAcceptMovedChildElement: d,
|
|
1101
|
+
resolveComponentContext: f,
|
|
1102
|
+
triggerBelongedComponentToMoveWhenMoved: p,
|
|
1103
|
+
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1104
|
+
} = Pe(i), s = i.schema;
|
|
1105
|
+
function n(c, y) {
|
|
1106
|
+
return new De(c, t).getPropertyConfig(s, y);
|
|
931
1107
|
}
|
|
932
1108
|
return {
|
|
933
|
-
canAccepts:
|
|
1109
|
+
canAccepts: e,
|
|
934
1110
|
checkCanDeleteComponent: o,
|
|
935
1111
|
checkCanMoveComponent: r,
|
|
936
|
-
hideNestedPaddingInDesginerView:
|
|
937
|
-
onAcceptMovedChildElement:
|
|
938
|
-
resolveComponentContext:
|
|
939
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
940
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
941
|
-
getPropsConfig:
|
|
1112
|
+
hideNestedPaddingInDesginerView: l,
|
|
1113
|
+
onAcceptMovedChildElement: d,
|
|
1114
|
+
resolveComponentContext: f,
|
|
1115
|
+
triggerBelongedComponentToMoveWhenMoved: p,
|
|
1116
|
+
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1117
|
+
getPropsConfig: n
|
|
942
1118
|
};
|
|
943
1119
|
}
|
|
944
|
-
const
|
|
1120
|
+
const Ve = /* @__PURE__ */ N({
|
|
945
1121
|
name: "FRadioGroupDesign",
|
|
946
|
-
props:
|
|
1122
|
+
props: G,
|
|
947
1123
|
emits: ["changeValue", "update:modelValue"],
|
|
948
|
-
setup(
|
|
949
|
-
const
|
|
1124
|
+
setup(i, t) {
|
|
1125
|
+
const e = F(i.modelValue), {
|
|
950
1126
|
enumData: o,
|
|
951
1127
|
onClickRadio: r,
|
|
952
|
-
getValue:
|
|
953
|
-
getText:
|
|
954
|
-
} =
|
|
955
|
-
"farris-checkradio-hor":
|
|
956
|
-
})),
|
|
957
|
-
return
|
|
958
|
-
|
|
959
|
-
}),
|
|
960
|
-
class: ["farris-input-wrap",
|
|
961
|
-
ref:
|
|
962
|
-
}, [o.value.map((
|
|
963
|
-
const
|
|
964
|
-
return
|
|
1128
|
+
getValue: l,
|
|
1129
|
+
getText: d
|
|
1130
|
+
} = Y(i, t, e), f = V(() => ({
|
|
1131
|
+
"farris-checkradio-hor": i.horizontal
|
|
1132
|
+
})), p = F(), a = L("designer-host-service"), s = L("design-item-context"), n = Ie(s, a), c = Me(p, s, n);
|
|
1133
|
+
return j(() => {
|
|
1134
|
+
p.value.componentInstance = c;
|
|
1135
|
+
}), t.expose(c.value), () => M("div", {
|
|
1136
|
+
class: ["farris-input-wrap", f.value],
|
|
1137
|
+
ref: p
|
|
1138
|
+
}, [o.value.map((y, u) => {
|
|
1139
|
+
const h = "radio_" + i.name + u;
|
|
1140
|
+
return M("div", {
|
|
965
1141
|
class: "custom-control custom-radio"
|
|
966
|
-
}, [
|
|
1142
|
+
}, [M("input", {
|
|
967
1143
|
type: "radio",
|
|
968
1144
|
class: "custom-control-input",
|
|
969
|
-
name:
|
|
970
|
-
id:
|
|
971
|
-
value:
|
|
972
|
-
checked:
|
|
973
|
-
disabled:
|
|
974
|
-
tabindex:
|
|
975
|
-
onClick: (
|
|
976
|
-
}, null),
|
|
1145
|
+
name: i.name,
|
|
1146
|
+
id: h,
|
|
1147
|
+
value: l(y),
|
|
1148
|
+
checked: l(y) === e.value,
|
|
1149
|
+
disabled: i.disabled,
|
|
1150
|
+
tabindex: i.tabIndex,
|
|
1151
|
+
onClick: (b) => r(y, b)
|
|
1152
|
+
}, null), M("label", {
|
|
977
1153
|
class: "custom-control-label",
|
|
978
|
-
for:
|
|
979
|
-
}, [
|
|
1154
|
+
for: h
|
|
1155
|
+
}, [d(y)])]);
|
|
980
1156
|
})]);
|
|
981
1157
|
}
|
|
982
1158
|
});
|
|
983
|
-
|
|
984
|
-
|
|
1159
|
+
I.install = (i) => {
|
|
1160
|
+
i.component(I.name, I), i.component(O.name, O);
|
|
985
1161
|
};
|
|
986
|
-
|
|
987
|
-
|
|
1162
|
+
I.register = (i, t, e, o) => {
|
|
1163
|
+
i["radio-group"] = I, t["radio-group"] = Q;
|
|
988
1164
|
};
|
|
989
|
-
|
|
990
|
-
|
|
1165
|
+
I.registerDesigner = (i, t, e) => {
|
|
1166
|
+
i["radio-group"] = Ve, t["radio-group"] = Q;
|
|
991
1167
|
};
|
|
992
1168
|
export {
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1169
|
+
I as RadioGroup,
|
|
1170
|
+
I as default,
|
|
1171
|
+
Q as propsResolver,
|
|
1172
|
+
G as radioGroupProps,
|
|
1173
|
+
te as radioProps
|
|
998
1174
|
};
|