@farris/ui-vue 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { useCheck as
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import { getSchemaByType as
|
|
8
|
-
|
|
1
|
+
var H = Object.defineProperty;
|
|
2
|
+
var K = (r, t, e) => t in r ? H(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var v = (r, t, e) => K(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as N, inject as L, onMounted as z, createVNode as h, Fragment as ee, computed as B, ref as M, provide as te } from "vue";
|
|
5
|
+
import { useCheck as ne } from "../common/index.esm.js";
|
|
6
|
+
import { isPlainObject as q, cloneDeep as W } from "lodash-es";
|
|
7
|
+
import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
|
|
8
|
+
import { useResponseLayoutEditorSetting as oe } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
9
|
+
const re = {
|
|
9
10
|
value: { type: String, default: "" },
|
|
10
11
|
/** 值 */
|
|
11
12
|
modelValue: { type: String, default: "" },
|
|
@@ -15,150 +16,150 @@ const ne = {
|
|
|
15
16
|
label: { type: String, default: "" },
|
|
16
17
|
/** 标识 */
|
|
17
18
|
id: { type: String, default: "" }
|
|
18
|
-
},
|
|
19
|
+
}, R = Symbol("radioGroupContext"), x = /* @__PURE__ */ N({
|
|
19
20
|
name: "FRadio",
|
|
20
|
-
props:
|
|
21
|
+
props: re,
|
|
21
22
|
emits: ["update:value"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
buttonClass:
|
|
25
|
-
checked:
|
|
26
|
-
disabled:
|
|
27
|
-
name:
|
|
28
|
-
tagClass:
|
|
29
|
-
shouldRenderButton:
|
|
30
|
-
shouldRenderNative:
|
|
31
|
-
shouldRenderTag:
|
|
32
|
-
onClickRadio:
|
|
33
|
-
} =
|
|
34
|
-
return
|
|
23
|
+
setup(r, t) {
|
|
24
|
+
const e = L(R, null), {
|
|
25
|
+
buttonClass: n,
|
|
26
|
+
checked: o,
|
|
27
|
+
disabled: a,
|
|
28
|
+
name: c,
|
|
29
|
+
tagClass: d,
|
|
30
|
+
shouldRenderButton: l,
|
|
31
|
+
shouldRenderNative: i,
|
|
32
|
+
shouldRenderTag: p,
|
|
33
|
+
onClickRadio: s
|
|
34
|
+
} = ne(r, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
|
|
35
|
+
return z(() => {
|
|
35
36
|
}), () => {
|
|
36
|
-
var
|
|
37
|
-
return h(
|
|
38
|
-
class:
|
|
37
|
+
var m, y, f, k, T, F;
|
|
38
|
+
return h(ee, null, [l.value && h("div", {
|
|
39
|
+
class: n.value,
|
|
39
40
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
40
|
-
onClick:
|
|
41
|
-
}, [(
|
|
42
|
-
class:
|
|
43
|
-
onClick:
|
|
41
|
+
onClick: s
|
|
42
|
+
}, [(y = (m = t.slots).default) == null ? void 0 : y.call(m)]), p.value && h("div", {
|
|
43
|
+
class: d.value,
|
|
44
|
+
onClick: s
|
|
44
45
|
}, [h("div", {
|
|
45
46
|
class: "title"
|
|
46
|
-
}, [(
|
|
47
|
+
}, [(k = (f = t.slots).default) == null ? void 0 : k.call(f)]), h("div", {
|
|
47
48
|
class: "tip"
|
|
48
49
|
}, null), h("span", {
|
|
49
50
|
class: "f-icon f-icon-check f-radio-icon"
|
|
50
|
-
}, null)]),
|
|
51
|
+
}, null)]), i.value && h("div", {
|
|
51
52
|
class: "custom-control custom-radio",
|
|
52
|
-
onClick:
|
|
53
|
+
onClick: s
|
|
53
54
|
}, [h("input", {
|
|
54
55
|
type: "radio",
|
|
55
56
|
class: "custom-control-input",
|
|
56
|
-
name:
|
|
57
|
-
id:
|
|
58
|
-
value:
|
|
59
|
-
checked:
|
|
60
|
-
disabled:
|
|
57
|
+
name: c.value,
|
|
58
|
+
id: r.id,
|
|
59
|
+
value: r.value,
|
|
60
|
+
checked: o.value,
|
|
61
|
+
disabled: a.value
|
|
61
62
|
}, null), h("div", {
|
|
62
63
|
class: "custom-control-label"
|
|
63
|
-
}, [(
|
|
64
|
+
}, [(F = (T = t.slots).default) == null ? void 0 : F.call(T)])])]);
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
});
|
|
67
|
-
function
|
|
68
|
-
return
|
|
68
|
+
function ie(r, t, e) {
|
|
69
|
+
return t;
|
|
69
70
|
}
|
|
70
|
-
const _ = {},
|
|
71
|
-
function $(
|
|
72
|
-
const { properties:
|
|
73
|
-
return o.id = `${
|
|
71
|
+
const _ = {}, X = {};
|
|
72
|
+
function $(r) {
|
|
73
|
+
const { properties: t, title: e, ignore: n } = r, o = n && Array.isArray(n), a = Object.keys(t).reduce((c, d) => ((!o || !n.find((l) => l == d)) && (c[d] = t[d].type === "object" && t[d].properties ? $(t[d]) : W(t[d].default)), c), {});
|
|
74
|
+
return (!o || !n.find((c) => c == "id")) && (a.id = `${e}-${Date.now()}`), a;
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
let o = $(
|
|
79
|
-
const
|
|
80
|
-
return o =
|
|
76
|
+
function U(r, t = {}, e) {
|
|
77
|
+
const n = _[r];
|
|
78
|
+
if (n) {
|
|
79
|
+
let o = $(n);
|
|
80
|
+
const a = X[r];
|
|
81
|
+
return o = a ? a({ getSchemaByType: U }, o, t, e) : o, o;
|
|
81
82
|
}
|
|
82
83
|
return null;
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
return Object.keys(
|
|
85
|
+
function ae(r, t) {
|
|
86
|
+
const e = $(t);
|
|
87
|
+
return Object.keys(r).reduce((n, o) => (n[o] && q(n[o]) && q(r[o]) ? Object.assign(n[o], r[o]) : n[o] = r[o], n), e), e;
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return Object.keys(
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
if (typeof
|
|
93
|
-
|
|
89
|
+
function le(r, t) {
|
|
90
|
+
return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
|
|
91
|
+
if (t.has(o)) {
|
|
92
|
+
const a = t.get(o);
|
|
93
|
+
if (typeof a == "string")
|
|
94
|
+
n[a] = r[o];
|
|
94
95
|
else {
|
|
95
|
-
const
|
|
96
|
-
Object.assign(
|
|
96
|
+
const c = a(o, r[o], r);
|
|
97
|
+
Object.assign(n, c);
|
|
97
98
|
}
|
|
98
99
|
} else
|
|
99
|
-
o
|
|
100
|
-
return
|
|
100
|
+
n[o] = r[o];
|
|
101
|
+
return n;
|
|
101
102
|
}, {});
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
-
const
|
|
105
|
-
return
|
|
104
|
+
function se(r, t, e = /* @__PURE__ */ new Map()) {
|
|
105
|
+
const n = ae(r, t);
|
|
106
|
+
return le(n, e);
|
|
106
107
|
}
|
|
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(
|
|
108
|
+
function ce(r = {}) {
|
|
109
|
+
function t(i, p, s, m) {
|
|
110
|
+
if (typeof s == "number")
|
|
111
|
+
return m[i].length === s;
|
|
112
|
+
if (typeof s == "object") {
|
|
113
|
+
const y = Object.keys(s)[0], f = s[y];
|
|
114
|
+
if (y === "not")
|
|
115
|
+
return Number(m[i].length) !== Number(f);
|
|
116
|
+
if (y === "moreThan")
|
|
117
|
+
return Number(m[i].length) >= Number(f);
|
|
118
|
+
if (y === "lessThan")
|
|
119
|
+
return Number(m[i].length) <= Number(f);
|
|
119
120
|
}
|
|
120
121
|
return !1;
|
|
121
122
|
}
|
|
122
|
-
function
|
|
123
|
-
return
|
|
123
|
+
function e(i, p, s, m) {
|
|
124
|
+
return m[i] && m[i].propertyValue && String(m[i].propertyValue.value) === String(s);
|
|
124
125
|
}
|
|
125
|
-
const
|
|
126
|
-
["length",
|
|
127
|
-
["getProperty",
|
|
126
|
+
const n = /* @__PURE__ */ new Map([
|
|
127
|
+
["length", t],
|
|
128
|
+
["getProperty", e]
|
|
128
129
|
]);
|
|
129
|
-
Object.keys(
|
|
130
|
-
function i
|
|
131
|
-
const
|
|
132
|
-
return typeof
|
|
133
|
-
if (
|
|
134
|
-
return { target:
|
|
135
|
-
const
|
|
136
|
-
return { target:
|
|
130
|
+
Object.keys(r).reduce((i, p) => (i.set(p, r[p]), i), n);
|
|
131
|
+
function o(i, p) {
|
|
132
|
+
const s = i;
|
|
133
|
+
return typeof p == "number" ? [{ target: s, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!p }] : typeof p == "object" ? Object.keys(p).map((m) => {
|
|
134
|
+
if (m === "length")
|
|
135
|
+
return { target: s, operator: "length", param: null, value: p[m] };
|
|
136
|
+
const y = m, f = p[m];
|
|
137
|
+
return { target: s, operator: "getProperty", param: y, value: f };
|
|
137
138
|
}) : [];
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
return Object.keys(
|
|
141
|
-
const
|
|
142
|
-
return
|
|
140
|
+
function a(i) {
|
|
141
|
+
return Object.keys(i).reduce((s, m) => {
|
|
142
|
+
const y = o(m, i[m]);
|
|
143
|
+
return s.push(...y), s;
|
|
143
144
|
}, []);
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
return
|
|
146
|
+
function c(i, p) {
|
|
147
|
+
if (n.has(i.operator)) {
|
|
148
|
+
const s = n.get(i.operator);
|
|
149
|
+
return s && s(i.target, i.param, i.value, p) || !1;
|
|
149
150
|
}
|
|
150
151
|
return !1;
|
|
151
152
|
}
|
|
152
|
-
function
|
|
153
|
-
return
|
|
153
|
+
function d(i, p) {
|
|
154
|
+
return a(i).reduce((y, f) => y && c(f, p), !0);
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
return
|
|
156
|
+
function l(i, p) {
|
|
157
|
+
const s = Object.keys(i), m = s.includes("allOf"), y = s.includes("anyOf"), f = m || y, F = (f ? i[f ? m ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => d(A, p));
|
|
158
|
+
return m ? !F.includes(!1) : F.includes(!0);
|
|
158
159
|
}
|
|
159
|
-
return { parseValueSchema:
|
|
160
|
+
return { parseValueSchema: l };
|
|
160
161
|
}
|
|
161
|
-
const
|
|
162
|
+
const u = {
|
|
162
163
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
163
164
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
164
165
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -195,21 +196,22 @@ const a = {
|
|
|
195
196
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
196
197
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
197
198
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
198
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
200
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
201
|
+
}, pe = {}, ue = {};
|
|
202
|
+
ce();
|
|
203
|
+
function de(r, t, e = /* @__PURE__ */ new Map(), n = (c, d, l) => d, o = {}, a = (c) => c) {
|
|
204
|
+
return _[t.title] = t, X[t.title] = n, pe[t.title] = o, ue[t.title] = a, (c = {}) => {
|
|
205
|
+
const d = se(c, t, e), l = Object.keys(r).reduce((i, p) => (i[p] = r[p].default, i), {});
|
|
206
|
+
return Object.assign(l, d);
|
|
205
207
|
};
|
|
206
208
|
}
|
|
207
|
-
function
|
|
208
|
-
return { customClass:
|
|
209
|
+
function me(r, t) {
|
|
210
|
+
return { customClass: t.class, customStyle: t.style };
|
|
209
211
|
}
|
|
210
|
-
const
|
|
211
|
-
["appearance",
|
|
212
|
-
]),
|
|
212
|
+
const fe = /* @__PURE__ */ new Map([
|
|
213
|
+
["appearance", me]
|
|
214
|
+
]), ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/radio-group.schema.json", he = "radio-group", ve = "A Farris Input Component", be = "object", Ce = {
|
|
213
215
|
id: {
|
|
214
216
|
description: "The unique identifier for a radio-group",
|
|
215
217
|
type: "string"
|
|
@@ -290,18 +292,23 @@ const de = /* @__PURE__ */ new Map([
|
|
|
290
292
|
description: "",
|
|
291
293
|
type: "array"
|
|
292
294
|
}
|
|
293
|
-
},
|
|
295
|
+
}, ke = [
|
|
294
296
|
"id",
|
|
295
297
|
"type"
|
|
296
|
-
],
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
298
|
+
], Me = [
|
|
299
|
+
"id",
|
|
300
|
+
"appearance",
|
|
301
|
+
"binding"
|
|
302
|
+
], we = {
|
|
303
|
+
$schema: ye,
|
|
304
|
+
$id: ge,
|
|
305
|
+
title: he,
|
|
306
|
+
description: ve,
|
|
307
|
+
type: be,
|
|
308
|
+
properties: Ce,
|
|
309
|
+
required: ke,
|
|
310
|
+
ignore: Me
|
|
311
|
+
}, Te = {
|
|
305
312
|
/**
|
|
306
313
|
* 是否被选中
|
|
307
314
|
*/
|
|
@@ -318,8 +325,8 @@ const de = /* @__PURE__ */ new Map([
|
|
|
318
325
|
* type为button或者tag时的尺寸
|
|
319
326
|
*/
|
|
320
327
|
size: { type: String, default: "middle" }
|
|
321
|
-
},
|
|
322
|
-
...
|
|
328
|
+
}, O = {
|
|
329
|
+
...Te,
|
|
323
330
|
/**
|
|
324
331
|
* 组件标识
|
|
325
332
|
*/
|
|
@@ -358,195 +365,195 @@ const de = /* @__PURE__ */ new Map([
|
|
|
358
365
|
* 枚举数组中枚举值的key值。
|
|
359
366
|
*/
|
|
360
367
|
valueField: { type: String, default: "value" }
|
|
361
|
-
},
|
|
362
|
-
function Q(
|
|
363
|
-
const
|
|
364
|
-
function
|
|
365
|
-
return
|
|
366
|
-
}
|
|
367
|
-
function
|
|
368
|
-
return
|
|
369
|
-
}
|
|
370
|
-
function
|
|
371
|
-
if (
|
|
372
|
-
const
|
|
373
|
-
|
|
368
|
+
}, J = de(O, we, fe, ie);
|
|
369
|
+
function Q(r, t, e) {
|
|
370
|
+
const n = B(() => !r.disabled), o = B(() => r.enumData || []);
|
|
371
|
+
function a(l) {
|
|
372
|
+
return l[r.valueField];
|
|
373
|
+
}
|
|
374
|
+
function c(l) {
|
|
375
|
+
return l[r.textField];
|
|
376
|
+
}
|
|
377
|
+
function d(l, i) {
|
|
378
|
+
if (n.value) {
|
|
379
|
+
const p = a(l);
|
|
380
|
+
e.value !== p && (e.value = p, t.emit("changeValue", p), t.emit("update:modelValue", p));
|
|
374
381
|
}
|
|
375
|
-
|
|
382
|
+
i.stopPropagation();
|
|
376
383
|
}
|
|
377
384
|
return {
|
|
378
|
-
enumData:
|
|
379
|
-
getValue:
|
|
380
|
-
getText:
|
|
381
|
-
onClickRadio:
|
|
385
|
+
enumData: o,
|
|
386
|
+
getValue: a,
|
|
387
|
+
getText: c,
|
|
388
|
+
onClickRadio: d
|
|
382
389
|
};
|
|
383
390
|
}
|
|
384
|
-
const
|
|
391
|
+
const E = /* @__PURE__ */ N({
|
|
385
392
|
name: "FRadioGroup",
|
|
386
|
-
props:
|
|
393
|
+
props: O,
|
|
387
394
|
emits: ["changeValue", "update:modelValue"],
|
|
388
|
-
setup(
|
|
389
|
-
const
|
|
390
|
-
enumData:
|
|
391
|
-
onClickRadio:
|
|
392
|
-
getValue:
|
|
393
|
-
getText:
|
|
394
|
-
} = Q(
|
|
395
|
-
"farris-checkradio-hor":
|
|
396
|
-
})),
|
|
397
|
-
return
|
|
398
|
-
radios:
|
|
399
|
-
parentProps:
|
|
400
|
-
parentContext:
|
|
395
|
+
setup(r, t) {
|
|
396
|
+
const e = M(r.modelValue), {
|
|
397
|
+
enumData: n,
|
|
398
|
+
onClickRadio: o,
|
|
399
|
+
getValue: a,
|
|
400
|
+
getText: c
|
|
401
|
+
} = Q(r, t, e), d = B(() => ({
|
|
402
|
+
"farris-checkradio-hor": r.direction === "horizontal"
|
|
403
|
+
})), l = M([]);
|
|
404
|
+
return te(R, {
|
|
405
|
+
radios: l,
|
|
406
|
+
parentProps: r,
|
|
407
|
+
parentContext: t
|
|
401
408
|
}), () => h("div", {
|
|
402
|
-
class: ["farris-input-wrap",
|
|
403
|
-
}, [
|
|
404
|
-
const
|
|
409
|
+
class: ["farris-input-wrap", d.value]
|
|
410
|
+
}, [t.slots.default ? t.slots.default() : n.value.map((i, p) => {
|
|
411
|
+
const s = "radio_" + r.id + r.name + i[r.valueField];
|
|
405
412
|
return h("div", {
|
|
406
413
|
class: "custom-control custom-radio"
|
|
407
414
|
}, [h("input", {
|
|
408
415
|
type: "radio",
|
|
409
416
|
class: "custom-control-input",
|
|
410
|
-
name:
|
|
411
|
-
id:
|
|
412
|
-
value:
|
|
413
|
-
checked:
|
|
414
|
-
disabled:
|
|
415
|
-
tabindex:
|
|
416
|
-
onClick: (
|
|
417
|
+
name: s,
|
|
418
|
+
id: s,
|
|
419
|
+
value: a(i),
|
|
420
|
+
checked: a(i) === e.value,
|
|
421
|
+
disabled: r.disabled,
|
|
422
|
+
tabindex: r.tabIndex,
|
|
423
|
+
onClick: (m) => o(i, m)
|
|
417
424
|
}, null), h("label", {
|
|
418
425
|
class: "custom-control-label",
|
|
419
|
-
for:
|
|
420
|
-
}, [
|
|
426
|
+
for: s
|
|
427
|
+
}, [c(i)])]);
|
|
421
428
|
})]);
|
|
422
429
|
}
|
|
423
430
|
});
|
|
424
|
-
function
|
|
425
|
-
var
|
|
426
|
-
function
|
|
427
|
-
|
|
431
|
+
function Fe(r, t, e) {
|
|
432
|
+
var I;
|
|
433
|
+
function n() {
|
|
434
|
+
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
428
435
|
}
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
function
|
|
432
|
-
return (
|
|
436
|
+
n();
|
|
437
|
+
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", c = M();
|
|
438
|
+
function d() {
|
|
439
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
433
440
|
}
|
|
434
|
-
function
|
|
441
|
+
function l() {
|
|
435
442
|
return !1;
|
|
436
443
|
}
|
|
437
|
-
function
|
|
438
|
-
return (
|
|
444
|
+
function i() {
|
|
445
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
439
446
|
}
|
|
440
|
-
function
|
|
441
|
-
return (
|
|
447
|
+
function p() {
|
|
448
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
442
449
|
}
|
|
443
|
-
function
|
|
444
|
-
if (!
|
|
450
|
+
function s(g) {
|
|
451
|
+
if (!g || !g.value)
|
|
445
452
|
return null;
|
|
446
|
-
if (
|
|
447
|
-
return
|
|
448
|
-
const b =
|
|
449
|
-
return
|
|
450
|
-
}
|
|
451
|
-
function
|
|
452
|
-
const { componentInstance: b, designerItemElementRef:
|
|
453
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
454
|
-
}
|
|
455
|
-
function
|
|
456
|
-
return !!
|
|
457
|
-
}
|
|
458
|
-
function
|
|
459
|
-
return (
|
|
460
|
-
}
|
|
461
|
-
function
|
|
462
|
-
}
|
|
463
|
-
function T(
|
|
464
|
-
b &&
|
|
465
|
-
}
|
|
466
|
-
function
|
|
467
|
-
const { componentType:
|
|
468
|
-
let
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
return
|
|
472
|
-
}
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
let
|
|
477
|
-
|
|
478
|
-
const Z =
|
|
479
|
-
return
|
|
480
|
-
}
|
|
481
|
-
function
|
|
482
|
-
}
|
|
483
|
-
function Y(...
|
|
484
|
-
if (
|
|
485
|
-
return
|
|
486
|
-
}
|
|
487
|
-
return
|
|
488
|
-
canMove:
|
|
489
|
-
canSelectParent:
|
|
490
|
-
canDelete:
|
|
491
|
-
canNested: !
|
|
492
|
-
contents:
|
|
493
|
-
elementRef:
|
|
494
|
-
parent: (
|
|
495
|
-
schema:
|
|
496
|
-
styles:
|
|
497
|
-
designerClass:
|
|
498
|
-
canAccepts:
|
|
499
|
-
getBelongedComponentInstance:
|
|
500
|
-
getDraggableDesignItemElement:
|
|
501
|
-
getDraggingDisplayText:
|
|
453
|
+
if (g.value.schema && g.value.schema.type === "component")
|
|
454
|
+
return g.value;
|
|
455
|
+
const b = M(g == null ? void 0 : g.value.parent), C = s(b);
|
|
456
|
+
return C || null;
|
|
457
|
+
}
|
|
458
|
+
function m(g = t) {
|
|
459
|
+
const { componentInstance: b, designerItemElementRef: C } = g;
|
|
460
|
+
return !b || !b.value ? null : b.value.canMove ? C : m(g.parent);
|
|
461
|
+
}
|
|
462
|
+
function y(g) {
|
|
463
|
+
return !!e && e.canAccepts(g);
|
|
464
|
+
}
|
|
465
|
+
function f() {
|
|
466
|
+
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
467
|
+
}
|
|
468
|
+
function k() {
|
|
469
|
+
}
|
|
470
|
+
function T(g, b) {
|
|
471
|
+
b && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(b);
|
|
472
|
+
}
|
|
473
|
+
function F(g, b) {
|
|
474
|
+
const { componentType: C } = g;
|
|
475
|
+
let w = U(C, g, b);
|
|
476
|
+
e && e.onResolveNewComponentSchema && (w = e.onResolveNewComponentSchema(g, w));
|
|
477
|
+
const V = C.toLowerCase().replace("-", "_");
|
|
478
|
+
return w && !w.id && w.type === C && (w.id = `${V}_${Math.random().toString().slice(2, 6)}`), w;
|
|
479
|
+
}
|
|
480
|
+
function G(g, b) {
|
|
481
|
+
const C = String(g.getAttribute("data-controltype")), w = g.getAttribute("data-feature"), V = w ? JSON.parse(w) : {};
|
|
482
|
+
V.parentComponentInstance = c.value;
|
|
483
|
+
let S = U(C, V);
|
|
484
|
+
e && e.onAcceptNewChildElement && (S = e.onAcceptNewChildElement(g, b, S));
|
|
485
|
+
const Z = C.toLowerCase().replace("-", "_");
|
|
486
|
+
return S && !S.id && S.type === C && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
|
|
487
|
+
}
|
|
488
|
+
function A(g) {
|
|
489
|
+
}
|
|
490
|
+
function Y(...g) {
|
|
491
|
+
if (e && e.getPropsConfig)
|
|
492
|
+
return e.getPropsConfig(...g);
|
|
493
|
+
}
|
|
494
|
+
return c.value = {
|
|
495
|
+
canMove: d(),
|
|
496
|
+
canSelectParent: l(),
|
|
497
|
+
canDelete: i(),
|
|
498
|
+
canNested: !p(),
|
|
499
|
+
contents: t == null ? void 0 : t.schema.contents,
|
|
500
|
+
elementRef: r,
|
|
501
|
+
parent: (I = t == null ? void 0 : t.parent) == null ? void 0 : I.componentInstance,
|
|
502
|
+
schema: t == null ? void 0 : t.schema,
|
|
503
|
+
styles: o,
|
|
504
|
+
designerClass: a,
|
|
505
|
+
canAccepts: y,
|
|
506
|
+
getBelongedComponentInstance: s,
|
|
507
|
+
getDraggableDesignItemElement: m,
|
|
508
|
+
getDraggingDisplayText: f,
|
|
502
509
|
getPropConfig: Y,
|
|
503
|
-
getDragScopeElement:
|
|
510
|
+
getDragScopeElement: k,
|
|
504
511
|
onAcceptMovedChildElement: T,
|
|
505
|
-
onAcceptNewChildElement:
|
|
506
|
-
onChildElementMovedOut:
|
|
507
|
-
addNewChildComponentSchema:
|
|
508
|
-
updateDragAndDropRules:
|
|
509
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
510
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
511
|
-
},
|
|
512
|
+
onAcceptNewChildElement: G,
|
|
513
|
+
onChildElementMovedOut: A,
|
|
514
|
+
addNewChildComponentSchema: F,
|
|
515
|
+
updateDragAndDropRules: n,
|
|
516
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || M(!1),
|
|
517
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
|
|
518
|
+
}, c;
|
|
512
519
|
}
|
|
513
|
-
class
|
|
514
|
-
constructor(
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
520
|
+
class Se {
|
|
521
|
+
constructor(t, e) {
|
|
522
|
+
v(this, "componentId");
|
|
523
|
+
v(this, "viewModelId");
|
|
524
|
+
v(this, "eventsEditorUtils");
|
|
525
|
+
v(this, "formSchemaUtils");
|
|
526
|
+
v(this, "formMetadataConverter");
|
|
527
|
+
v(this, "designViewModelUtils");
|
|
528
|
+
v(this, "designViewModelField");
|
|
529
|
+
v(this, "controlCreatorUtils");
|
|
530
|
+
v(this, "designerHostService");
|
|
531
|
+
v(this, "schemaService", null);
|
|
532
|
+
v(this, "metadataService", null);
|
|
533
|
+
v(this, "propertyConfig", {
|
|
527
534
|
type: "object",
|
|
528
535
|
categories: {}
|
|
529
536
|
});
|
|
530
|
-
var
|
|
531
|
-
this.componentId =
|
|
537
|
+
var n;
|
|
538
|
+
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
532
539
|
}
|
|
533
540
|
getTableInfo() {
|
|
534
|
-
var
|
|
535
|
-
return (
|
|
541
|
+
var t;
|
|
542
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
536
543
|
}
|
|
537
|
-
setDesignViewModelField(
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
544
|
+
setDesignViewModelField(t) {
|
|
545
|
+
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
546
|
+
if (e) {
|
|
540
547
|
if (!this.designViewModelField) {
|
|
541
|
-
const
|
|
542
|
-
this.designViewModelField =
|
|
548
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
549
|
+
this.designViewModelField = n.fields.find((o) => o.id === e);
|
|
543
550
|
}
|
|
544
|
-
|
|
551
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
545
552
|
}
|
|
546
553
|
}
|
|
547
|
-
changeFieldEditorType(
|
|
554
|
+
changeFieldEditorType(t, e) {
|
|
548
555
|
}
|
|
549
|
-
getBasicPropConfig(
|
|
556
|
+
getBasicPropConfig(t) {
|
|
550
557
|
return {
|
|
551
558
|
description: "Basic Information",
|
|
552
559
|
title: "基本信息",
|
|
@@ -565,13 +572,13 @@ class Te {
|
|
|
565
572
|
type: "combo-list",
|
|
566
573
|
textField: "name",
|
|
567
574
|
valueField: "value",
|
|
568
|
-
data: [{ value:
|
|
575
|
+
data: [{ value: t.type, name: u[t.type].name }]
|
|
569
576
|
}
|
|
570
577
|
}
|
|
571
578
|
}
|
|
572
579
|
};
|
|
573
580
|
}
|
|
574
|
-
getAppearanceConfig(
|
|
581
|
+
getAppearanceConfig(t = null) {
|
|
575
582
|
return {
|
|
576
583
|
title: "样式",
|
|
577
584
|
description: "Appearance",
|
|
@@ -591,90 +598,105 @@ class Te {
|
|
|
591
598
|
}
|
|
592
599
|
};
|
|
593
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
*
|
|
603
|
+
* @param propertyId
|
|
604
|
+
* @param componentInstance
|
|
605
|
+
* @returns
|
|
606
|
+
*/
|
|
607
|
+
updateElementByParentContainer(t, e) {
|
|
608
|
+
const n = e && e.parent && e.parent.schema;
|
|
609
|
+
if (!n)
|
|
610
|
+
return;
|
|
611
|
+
const o = n.contents.findIndex((c) => c.id === t), a = W(n.contents[o]);
|
|
612
|
+
n.contents.splice(o, 1), n.contents.splice(o, 0, a);
|
|
613
|
+
}
|
|
594
614
|
}
|
|
595
|
-
const
|
|
615
|
+
const P = class P {
|
|
596
616
|
/**
|
|
597
617
|
* 根据绑定字段类型获取可用的输入类控件
|
|
598
618
|
*/
|
|
599
|
-
static getEditorTypesByMDataType(
|
|
600
|
-
const
|
|
601
|
-
return
|
|
619
|
+
static getEditorTypesByMDataType(t) {
|
|
620
|
+
const e = P.fieldControlTypeMapping[t];
|
|
621
|
+
return e || [{ key: "", value: "" }];
|
|
602
622
|
}
|
|
603
623
|
/**
|
|
604
624
|
* 获取所有输入类控件
|
|
605
625
|
*/
|
|
606
626
|
static getAllInputTypes() {
|
|
607
|
-
const
|
|
608
|
-
for (let
|
|
609
|
-
|
|
610
|
-
|
|
627
|
+
const t = [];
|
|
628
|
+
for (let e in P.fieldControlTypeMapping)
|
|
629
|
+
P.fieldControlTypeMapping[e].forEach((n) => {
|
|
630
|
+
t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
|
|
611
631
|
});
|
|
612
|
-
return
|
|
632
|
+
return t;
|
|
613
633
|
}
|
|
614
634
|
};
|
|
615
635
|
/**
|
|
616
636
|
* <字段类型,可配置的控件类型列表>的映射
|
|
617
637
|
*/
|
|
618
|
-
|
|
638
|
+
v(P, "fieldControlTypeMapping", {
|
|
619
639
|
String: [
|
|
620
|
-
{ key:
|
|
621
|
-
{ key:
|
|
622
|
-
{ key:
|
|
623
|
-
{ key:
|
|
624
|
-
{ key:
|
|
625
|
-
{ key:
|
|
626
|
-
{ key:
|
|
640
|
+
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
641
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
642
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name },
|
|
643
|
+
{ key: u["check-box"].type, value: u["check-box"].name },
|
|
644
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name },
|
|
645
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
646
|
+
{ key: u.textarea.type, value: u.textarea.name }
|
|
627
647
|
],
|
|
628
648
|
Text: [
|
|
629
|
-
{ key:
|
|
630
|
-
{ key:
|
|
649
|
+
{ key: u.textarea.type, value: u.textarea.name },
|
|
650
|
+
{ key: u.lookup.type, value: u.lookup.name }
|
|
631
651
|
],
|
|
632
652
|
Decimal: [
|
|
633
|
-
{ key:
|
|
653
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
634
654
|
],
|
|
635
655
|
Integer: [
|
|
636
|
-
{ key:
|
|
656
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
637
657
|
],
|
|
638
658
|
Number: [
|
|
639
|
-
{ key:
|
|
659
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
640
660
|
],
|
|
641
661
|
BigNumber: [
|
|
642
|
-
{ key:
|
|
662
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
643
663
|
],
|
|
644
664
|
Date: [
|
|
645
|
-
{ key:
|
|
665
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
646
666
|
],
|
|
647
667
|
DateTime: [
|
|
648
|
-
{ key:
|
|
668
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
649
669
|
],
|
|
650
670
|
Boolean: [
|
|
651
|
-
{ key:
|
|
652
|
-
{ key:
|
|
671
|
+
{ key: u.switch.type, value: u.switch.name },
|
|
672
|
+
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
653
673
|
],
|
|
654
674
|
Enum: [
|
|
655
|
-
{ key:
|
|
656
|
-
{ key:
|
|
675
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
676
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
657
677
|
],
|
|
658
678
|
Object: [
|
|
659
|
-
{ key:
|
|
660
|
-
{ key:
|
|
661
|
-
{ key:
|
|
679
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
680
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
681
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
662
682
|
]
|
|
663
683
|
});
|
|
664
|
-
let
|
|
665
|
-
const
|
|
666
|
-
class
|
|
667
|
-
constructor(e,
|
|
668
|
-
super(e,
|
|
684
|
+
let D = P;
|
|
685
|
+
const Pe = M(0);
|
|
686
|
+
class Ee extends Se {
|
|
687
|
+
constructor(e, n) {
|
|
688
|
+
super(e, n);
|
|
689
|
+
v(this, "responseLayoutEditorFunction");
|
|
690
|
+
this.responseLayoutEditorFunction = oe(this.formSchemaUtils);
|
|
669
691
|
}
|
|
670
|
-
getPropertyConfig(e,
|
|
671
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(e,
|
|
692
|
+
getPropertyConfig(e, n) {
|
|
693
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
672
694
|
}
|
|
673
|
-
getBasicProperties(e,
|
|
674
|
-
var
|
|
695
|
+
getBasicProperties(e, n) {
|
|
696
|
+
var d;
|
|
675
697
|
var o = this;
|
|
676
698
|
this.setDesignViewModelField(e);
|
|
677
|
-
const
|
|
699
|
+
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
678
700
|
return {
|
|
679
701
|
description: "Basic Information",
|
|
680
702
|
title: "基本信息",
|
|
@@ -686,8 +708,8 @@ class Ve extends Te {
|
|
|
686
708
|
readonly: !0
|
|
687
709
|
},
|
|
688
710
|
type: {
|
|
689
|
-
description: "
|
|
690
|
-
title: "
|
|
711
|
+
description: "编辑器类型",
|
|
712
|
+
title: "编辑器类型",
|
|
691
713
|
type: "string",
|
|
692
714
|
refreshPanelAfterChanged: !0,
|
|
693
715
|
$converter: "/converter/change-editor.converter",
|
|
@@ -696,7 +718,7 @@ class Ve extends Te {
|
|
|
696
718
|
textField: "value",
|
|
697
719
|
valueField: "key",
|
|
698
720
|
editable: !1,
|
|
699
|
-
data: o.designViewModelField ?
|
|
721
|
+
data: o.designViewModelField ? D.getEditorTypesByMDataType((d = o.designViewModelField.type) == null ? void 0 : d.name) : D.getAllInputTypes()
|
|
700
722
|
}
|
|
701
723
|
},
|
|
702
724
|
label: {
|
|
@@ -713,7 +735,7 @@ class Ve extends Te {
|
|
|
713
735
|
bindingType: { enable: !1 },
|
|
714
736
|
editorParams: {
|
|
715
737
|
propertyData: e,
|
|
716
|
-
formBasicInfo:
|
|
738
|
+
formBasicInfo: a
|
|
717
739
|
},
|
|
718
740
|
columns: [
|
|
719
741
|
{ field: "name", title: "字段名称" },
|
|
@@ -721,22 +743,27 @@ class Ve extends Te {
|
|
|
721
743
|
{ field: "fieldType", title: "字段类型" }
|
|
722
744
|
],
|
|
723
745
|
textField: "bindingField",
|
|
724
|
-
data:
|
|
746
|
+
data: c
|
|
725
747
|
}
|
|
726
748
|
}
|
|
727
749
|
},
|
|
728
|
-
setPropertyRelates(
|
|
729
|
-
if (
|
|
730
|
-
switch (
|
|
750
|
+
setPropertyRelates(l, i) {
|
|
751
|
+
if (l)
|
|
752
|
+
switch (l && l.propertyID) {
|
|
731
753
|
case "type": {
|
|
732
|
-
o.changeControlType(e,
|
|
754
|
+
o.changeControlType(e, l, n);
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
case "label": {
|
|
758
|
+
l.needRefreshControlTree = !0;
|
|
733
759
|
break;
|
|
734
760
|
}
|
|
735
761
|
}
|
|
736
762
|
}
|
|
737
763
|
};
|
|
738
764
|
}
|
|
739
|
-
getAppearanceProperties(e) {
|
|
765
|
+
getAppearanceProperties(e, n) {
|
|
766
|
+
var o = this;
|
|
740
767
|
return {
|
|
741
768
|
title: "样式",
|
|
742
769
|
description: "Appearance",
|
|
@@ -757,12 +784,25 @@ class Ve extends Te {
|
|
|
757
784
|
description: "响应式列宽",
|
|
758
785
|
title: "响应式列宽",
|
|
759
786
|
type: "boolean",
|
|
760
|
-
visible: !
|
|
787
|
+
visible: !0,
|
|
788
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
789
|
+
refreshPanelAfterChanged: !0,
|
|
761
790
|
editor: {
|
|
762
|
-
type: "response-layout-editor-setting"
|
|
763
|
-
|
|
764
|
-
|
|
791
|
+
type: "response-layout-editor-setting",
|
|
792
|
+
initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
|
|
793
|
+
}
|
|
765
794
|
}
|
|
795
|
+
},
|
|
796
|
+
setPropertyRelates(a, c) {
|
|
797
|
+
if (a)
|
|
798
|
+
switch (a && a.propertyID) {
|
|
799
|
+
case "responseLayout":
|
|
800
|
+
o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, n), delete e.responseLayout;
|
|
801
|
+
break;
|
|
802
|
+
case "class":
|
|
803
|
+
o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, n);
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
766
806
|
}
|
|
767
807
|
};
|
|
768
808
|
}
|
|
@@ -774,44 +814,44 @@ class Ve extends Te {
|
|
|
774
814
|
* @param propertyData 控件DOM属性
|
|
775
815
|
* @param newControlType 新控件类型
|
|
776
816
|
*/
|
|
777
|
-
changeControlType(e,
|
|
778
|
-
var
|
|
779
|
-
const
|
|
780
|
-
if (!
|
|
817
|
+
changeControlType(e, n, o) {
|
|
818
|
+
var p, s, m, y;
|
|
819
|
+
const a = n.propertyValue, c = o && o.parent && o.parent.schema;
|
|
820
|
+
if (!c)
|
|
781
821
|
return;
|
|
782
|
-
const
|
|
783
|
-
let
|
|
822
|
+
const d = c.contents.findIndex((f) => f.id === e.id), l = c.contents[d];
|
|
823
|
+
let i;
|
|
784
824
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
785
825
|
editor: {
|
|
786
|
-
$type:
|
|
826
|
+
$type: a
|
|
787
827
|
},
|
|
788
828
|
name: this.designViewModelField.name,
|
|
789
829
|
require: this.designViewModelField.require,
|
|
790
830
|
readonly: this.designViewModelField.readonly
|
|
791
|
-
}, !1),
|
|
792
|
-
id:
|
|
793
|
-
appearance:
|
|
794
|
-
size:
|
|
795
|
-
label:
|
|
796
|
-
binding:
|
|
797
|
-
visible:
|
|
798
|
-
}), Object.assign(
|
|
799
|
-
isTextArea:
|
|
800
|
-
placeholder: (
|
|
801
|
-
holdPlace: (
|
|
802
|
-
readonly: (
|
|
803
|
-
require: (
|
|
804
|
-
}),
|
|
831
|
+
}, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), i || (i = j("form-group") || {}, i.editor = j(a) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
|
|
832
|
+
id: l.id,
|
|
833
|
+
appearance: l.appearance,
|
|
834
|
+
size: l.size,
|
|
835
|
+
label: l.label,
|
|
836
|
+
binding: l.binding,
|
|
837
|
+
visible: l.visible
|
|
838
|
+
}), Object.assign(i.editor, {
|
|
839
|
+
isTextArea: i.isTextArea && l.isTextArea,
|
|
840
|
+
placeholder: (p = l.editor) == null ? void 0 : p.placeholder,
|
|
841
|
+
holdPlace: (s = l.editor) == null ? void 0 : s.holdPlace,
|
|
842
|
+
readonly: (m = l.editor) == null ? void 0 : m.readonly,
|
|
843
|
+
require: (y = l.editor) == null ? void 0 : y.require
|
|
844
|
+
}), c.contents.splice(d, 1), c.contents.splice(d, 0, i), o.schema = Object.assign(l, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
805
845
|
(f) => f.classList.remove("dgComponentSelected")
|
|
806
|
-
),
|
|
846
|
+
), Pe.value++;
|
|
807
847
|
}
|
|
808
|
-
getComponentConfig(e,
|
|
809
|
-
const
|
|
810
|
-
description: "
|
|
811
|
-
title: "
|
|
848
|
+
getComponentConfig(e, n = {}, o = {}) {
|
|
849
|
+
const a = Object.assign({
|
|
850
|
+
description: "编辑器",
|
|
851
|
+
title: "编辑器",
|
|
812
852
|
type: "input-group",
|
|
813
853
|
$converter: "/converter/property-editor.converter"
|
|
814
|
-
},
|
|
854
|
+
}, n), c = Object.assign({
|
|
815
855
|
readonly: {
|
|
816
856
|
description: "",
|
|
817
857
|
title: "只读",
|
|
@@ -833,15 +873,63 @@ class Ve extends Te {
|
|
|
833
873
|
type: "string"
|
|
834
874
|
}
|
|
835
875
|
}, o);
|
|
836
|
-
return { ...
|
|
876
|
+
return { ...a, properties: { ...c } };
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
880
|
+
* @param controlClass 控件样式
|
|
881
|
+
* @param controlId 控件Id
|
|
882
|
+
* @param componentId 控件所在组件id
|
|
883
|
+
*/
|
|
884
|
+
updateUnifiedLayoutAfterControlChanged(e, n, o) {
|
|
885
|
+
const a = e.split(" ");
|
|
886
|
+
let c = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), d = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), l = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), i = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
887
|
+
c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), l = l || "col-xl-" + d.replace("col-md-", ""), i = i || "col-el-" + l.replace("col-xl-", "");
|
|
888
|
+
const p = {
|
|
889
|
+
id: n,
|
|
890
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
891
|
+
columnInMD: parseInt(d.replace("col-md-", ""), 10),
|
|
892
|
+
columnInLG: parseInt(l.replace("col-xl-", ""), 10),
|
|
893
|
+
columnInEL: parseInt(i.replace("col-el-", ""), 10)
|
|
894
|
+
};
|
|
895
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, p);
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
899
|
+
* @param componentId 组件Id
|
|
900
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
901
|
+
*/
|
|
902
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
|
|
903
|
+
const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
904
|
+
if (!o || !o.unifiedLayout)
|
|
905
|
+
return;
|
|
906
|
+
const a = [];
|
|
907
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), n) {
|
|
908
|
+
const f = a.find((k) => k.id === n.id);
|
|
909
|
+
Object.assign(f || {}, n);
|
|
910
|
+
}
|
|
911
|
+
const c = a.map((f) => f.columnInSM), d = a.map((f) => f.columnInMD), l = a.map((f) => f.columnInLG), i = a.map((f) => f.columnInEL), p = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(l) ? l[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
|
|
912
|
+
Object.assign(o.unifiedLayout, {
|
|
913
|
+
uniqueColClassInSM: p,
|
|
914
|
+
uniqueColClassInMD: s,
|
|
915
|
+
uniqueColClassInLG: m,
|
|
916
|
+
uniqueColClassInEL: y
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* 校验宽度样式值是否一致
|
|
921
|
+
*/
|
|
922
|
+
checkIsUniqueColumn(e) {
|
|
923
|
+
const n = new Set(e);
|
|
924
|
+
return Array.from(n).length === 1;
|
|
837
925
|
}
|
|
838
926
|
}
|
|
839
|
-
class
|
|
840
|
-
constructor(
|
|
841
|
-
super(
|
|
927
|
+
class Ve extends Ee {
|
|
928
|
+
constructor(t, e) {
|
|
929
|
+
super(t, e);
|
|
842
930
|
}
|
|
843
|
-
getEditorProperties(
|
|
844
|
-
return this.getComponentConfig(
|
|
931
|
+
getEditorProperties(t) {
|
|
932
|
+
return this.getComponentConfig(t, { type: "number-spinner" }, {
|
|
845
933
|
readonly: {
|
|
846
934
|
visible: !1
|
|
847
935
|
},
|
|
@@ -872,118 +960,118 @@ class De extends Ve {
|
|
|
872
960
|
});
|
|
873
961
|
}
|
|
874
962
|
}
|
|
875
|
-
function
|
|
876
|
-
|
|
877
|
-
const
|
|
878
|
-
function
|
|
963
|
+
function Be(r, t) {
|
|
964
|
+
r.schema;
|
|
965
|
+
const e = M(!0), n = M(!0);
|
|
966
|
+
function o(s) {
|
|
879
967
|
return !1;
|
|
880
968
|
}
|
|
881
|
-
function
|
|
969
|
+
function a() {
|
|
882
970
|
return !1;
|
|
883
971
|
}
|
|
884
|
-
function
|
|
972
|
+
function c() {
|
|
885
973
|
return !1;
|
|
886
974
|
}
|
|
887
|
-
function
|
|
975
|
+
function d() {
|
|
888
976
|
return !0;
|
|
889
977
|
}
|
|
890
|
-
function
|
|
978
|
+
function l(s) {
|
|
891
979
|
}
|
|
892
|
-
function
|
|
980
|
+
function i() {
|
|
893
981
|
}
|
|
894
|
-
function
|
|
982
|
+
function p(s) {
|
|
895
983
|
return null;
|
|
896
984
|
}
|
|
897
985
|
return {
|
|
898
|
-
canAccepts:
|
|
899
|
-
checkCanDeleteComponent:
|
|
900
|
-
checkCanMoveComponent:
|
|
901
|
-
hideNestedPaddingInDesginerView:
|
|
902
|
-
onAcceptMovedChildElement:
|
|
903
|
-
resolveComponentContext:
|
|
904
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
905
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
906
|
-
getPropsConfig:
|
|
986
|
+
canAccepts: o,
|
|
987
|
+
checkCanDeleteComponent: a,
|
|
988
|
+
checkCanMoveComponent: c,
|
|
989
|
+
hideNestedPaddingInDesginerView: d,
|
|
990
|
+
onAcceptMovedChildElement: l,
|
|
991
|
+
resolveComponentContext: i,
|
|
992
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
993
|
+
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
994
|
+
getPropsConfig: p
|
|
907
995
|
};
|
|
908
996
|
}
|
|
909
|
-
function
|
|
997
|
+
function De(r, t) {
|
|
910
998
|
const {
|
|
911
|
-
canAccepts:
|
|
912
|
-
checkCanDeleteComponent:
|
|
913
|
-
checkCanMoveComponent:
|
|
914
|
-
hideNestedPaddingInDesginerView:
|
|
915
|
-
onAcceptMovedChildElement:
|
|
916
|
-
resolveComponentContext:
|
|
917
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
918
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
919
|
-
} =
|
|
920
|
-
function
|
|
921
|
-
return new
|
|
999
|
+
canAccepts: e,
|
|
1000
|
+
checkCanDeleteComponent: n,
|
|
1001
|
+
checkCanMoveComponent: o,
|
|
1002
|
+
hideNestedPaddingInDesginerView: a,
|
|
1003
|
+
onAcceptMovedChildElement: c,
|
|
1004
|
+
resolveComponentContext: d,
|
|
1005
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1006
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
1007
|
+
} = Be(r), p = r.schema;
|
|
1008
|
+
function s(m, y) {
|
|
1009
|
+
return new Ve(m, t).getPropertyConfig(p, y);
|
|
922
1010
|
}
|
|
923
1011
|
return {
|
|
924
|
-
canAccepts:
|
|
925
|
-
checkCanDeleteComponent:
|
|
926
|
-
checkCanMoveComponent:
|
|
927
|
-
hideNestedPaddingInDesginerView:
|
|
928
|
-
onAcceptMovedChildElement:
|
|
929
|
-
resolveComponentContext:
|
|
930
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
931
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
932
|
-
getPropsConfig:
|
|
1012
|
+
canAccepts: e,
|
|
1013
|
+
checkCanDeleteComponent: n,
|
|
1014
|
+
checkCanMoveComponent: o,
|
|
1015
|
+
hideNestedPaddingInDesginerView: a,
|
|
1016
|
+
onAcceptMovedChildElement: c,
|
|
1017
|
+
resolveComponentContext: d,
|
|
1018
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1019
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
1020
|
+
getPropsConfig: s
|
|
933
1021
|
};
|
|
934
1022
|
}
|
|
935
|
-
const
|
|
1023
|
+
const Ae = /* @__PURE__ */ N({
|
|
936
1024
|
name: "FRadioGroupDesign",
|
|
937
|
-
props:
|
|
1025
|
+
props: O,
|
|
938
1026
|
emits: ["changeValue", "update:modelValue"],
|
|
939
|
-
setup(
|
|
940
|
-
const
|
|
941
|
-
enumData:
|
|
942
|
-
onClickRadio:
|
|
943
|
-
getValue:
|
|
944
|
-
getText:
|
|
945
|
-
} = Q(
|
|
946
|
-
"farris-checkradio-hor":
|
|
947
|
-
})),
|
|
948
|
-
return
|
|
949
|
-
|
|
950
|
-
}),
|
|
951
|
-
class: ["farris-input-wrap",
|
|
952
|
-
ref:
|
|
953
|
-
}, [
|
|
954
|
-
const
|
|
1027
|
+
setup(r, t) {
|
|
1028
|
+
const e = M(r.modelValue), {
|
|
1029
|
+
enumData: n,
|
|
1030
|
+
onClickRadio: o,
|
|
1031
|
+
getValue: a,
|
|
1032
|
+
getText: c
|
|
1033
|
+
} = Q(r, t, e), d = B(() => ({
|
|
1034
|
+
"farris-checkradio-hor": r.horizontal
|
|
1035
|
+
})), l = M(), i = L("designer-host-service"), p = L("design-item-context"), s = De(p, i), m = Fe(l, p, s);
|
|
1036
|
+
return z(() => {
|
|
1037
|
+
l.value.componentInstance = m;
|
|
1038
|
+
}), t.expose(m.value), () => h("div", {
|
|
1039
|
+
class: ["farris-input-wrap", d.value],
|
|
1040
|
+
ref: l
|
|
1041
|
+
}, [n.value.map((y, f) => {
|
|
1042
|
+
const k = "radio_" + r.name + f;
|
|
955
1043
|
return h("div", {
|
|
956
1044
|
class: "custom-control custom-radio"
|
|
957
1045
|
}, [h("input", {
|
|
958
1046
|
type: "radio",
|
|
959
1047
|
class: "custom-control-input",
|
|
960
|
-
name:
|
|
961
|
-
id:
|
|
962
|
-
value:
|
|
963
|
-
checked:
|
|
964
|
-
disabled:
|
|
965
|
-
tabindex:
|
|
966
|
-
onClick: (T) =>
|
|
1048
|
+
name: r.name,
|
|
1049
|
+
id: k,
|
|
1050
|
+
value: a(y),
|
|
1051
|
+
checked: a(y) === e.value,
|
|
1052
|
+
disabled: r.disabled,
|
|
1053
|
+
tabindex: r.tabIndex,
|
|
1054
|
+
onClick: (T) => o(y, T)
|
|
967
1055
|
}, null), h("label", {
|
|
968
1056
|
class: "custom-control-label",
|
|
969
|
-
for:
|
|
970
|
-
}, [
|
|
1057
|
+
for: k
|
|
1058
|
+
}, [c(y)])]);
|
|
971
1059
|
})]);
|
|
972
1060
|
}
|
|
973
1061
|
});
|
|
974
|
-
|
|
975
|
-
|
|
1062
|
+
E.install = (r) => {
|
|
1063
|
+
r.component(E.name, E), r.component(x.name, x);
|
|
976
1064
|
};
|
|
977
|
-
|
|
978
|
-
|
|
1065
|
+
E.register = (r, t, e, n) => {
|
|
1066
|
+
r["radio-group"] = E, t["radio-group"] = J;
|
|
979
1067
|
};
|
|
980
|
-
|
|
981
|
-
|
|
1068
|
+
E.registerDesigner = (r, t, e) => {
|
|
1069
|
+
r["radio-group"] = Ae, t["radio-group"] = J;
|
|
982
1070
|
};
|
|
983
1071
|
export {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1072
|
+
E as RadioGroup,
|
|
1073
|
+
E as default,
|
|
1074
|
+
J as propsResolver,
|
|
1075
|
+
O as radioGroupProps,
|
|
1076
|
+
re as radioProps
|
|
989
1077
|
};
|