@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 { cloneDeep as
|
|
6
|
-
import { CHECKBOX_CONTEXT as
|
|
7
|
-
import { getSchemaByType as
|
|
8
|
-
|
|
1
|
+
var le = Object.defineProperty;
|
|
2
|
+
var ce = (n, t, e) => t in n ? le(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var M = (n, t, e) => ce(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as U, inject as A, ref as h, computed as j, watch as L, onMounted as O, createVNode as b, Fragment as se, provide as ue } from "vue";
|
|
5
|
+
import { isPlainObject as X, cloneDeep as J } from "lodash-es";
|
|
6
|
+
import { CHECKBOX_CONTEXT as H, useCheck as pe } from "../common/index.esm.js";
|
|
7
|
+
import { getSchemaByType as _ } from "../dynamic-resolver/index.esm.js";
|
|
8
|
+
import { useResponseLayoutEditorSetting as de } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
9
|
+
const me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/check-box.schema.json", ye = "check-box", he = "A Farris Input Component", ge = "object", be = {
|
|
9
10
|
id: {
|
|
10
11
|
description: "The unique identifier for a check box",
|
|
11
12
|
type: "string"
|
|
@@ -77,109 +78,114 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
77
78
|
type: "boolean",
|
|
78
79
|
default: !0
|
|
79
80
|
}
|
|
80
|
-
},
|
|
81
|
+
}, ve = [
|
|
81
82
|
"id",
|
|
82
83
|
"type"
|
|
83
|
-
],
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
84
|
+
], Ce = [
|
|
85
|
+
"id",
|
|
86
|
+
"appearance",
|
|
87
|
+
"binding"
|
|
88
|
+
], ke = {
|
|
89
|
+
$schema: me,
|
|
90
|
+
$id: fe,
|
|
91
|
+
title: ye,
|
|
92
|
+
description: he,
|
|
93
|
+
type: ge,
|
|
94
|
+
properties: be,
|
|
95
|
+
required: ve,
|
|
96
|
+
ignore: Ce
|
|
97
|
+
}, Q = {}, Y = {};
|
|
98
|
+
function q(n) {
|
|
99
|
+
const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), l = Object.keys(t).reduce((c, m) => ((!r || !o.find((s) => s == m)) && (c[m] = t[m].type === "object" && t[m].properties ? q(t[m]) : J(t[m].default)), c), {});
|
|
100
|
+
return (!r || !o.find((c) => c == "id")) && (l.id = `${e}-${Date.now()}`), l;
|
|
95
101
|
}
|
|
96
|
-
function G(n,
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
let
|
|
100
|
-
const
|
|
101
|
-
return
|
|
102
|
+
function G(n, t = {}, e) {
|
|
103
|
+
const o = Q[n];
|
|
104
|
+
if (o) {
|
|
105
|
+
let r = q(o);
|
|
106
|
+
const l = Y[n];
|
|
107
|
+
return r = l ? l({ getSchemaByType: G }, r, t, e) : r, r;
|
|
102
108
|
}
|
|
103
109
|
return null;
|
|
104
110
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
107
|
-
return Object.keys(n).reduce((o, r) => (o[r] &&
|
|
111
|
+
function Me(n, t) {
|
|
112
|
+
const e = q(t);
|
|
113
|
+
return Object.keys(n).reduce((o, r) => (o[r] && X(o[r]) && X(n[r]) ? Object.assign(o[r], n[r]) : o[r] = n[r], o), e), e;
|
|
108
114
|
}
|
|
109
|
-
function
|
|
115
|
+
function Te(n, t) {
|
|
110
116
|
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
|
|
111
|
-
if (
|
|
112
|
-
const l =
|
|
117
|
+
if (t.has(r)) {
|
|
118
|
+
const l = t.get(r);
|
|
113
119
|
if (typeof l == "string")
|
|
114
120
|
o[l] = n[r];
|
|
115
121
|
else {
|
|
116
|
-
const
|
|
117
|
-
Object.assign(o,
|
|
122
|
+
const c = l(r, n[r], n);
|
|
123
|
+
Object.assign(o, c);
|
|
118
124
|
}
|
|
119
125
|
} else
|
|
120
126
|
o[r] = n[r];
|
|
121
127
|
return o;
|
|
122
128
|
}, {});
|
|
123
129
|
}
|
|
124
|
-
function
|
|
125
|
-
const o =
|
|
126
|
-
return
|
|
130
|
+
function Ve(n, t, e = /* @__PURE__ */ new Map()) {
|
|
131
|
+
const o = Me(n, t);
|
|
132
|
+
return Te(o, e);
|
|
127
133
|
}
|
|
128
|
-
function
|
|
129
|
-
function
|
|
130
|
-
if (typeof
|
|
131
|
-
return
|
|
132
|
-
if (typeof
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
return Number(
|
|
136
|
-
if (
|
|
137
|
-
return Number(
|
|
138
|
-
if (
|
|
139
|
-
return Number(
|
|
134
|
+
function Se(n = {}) {
|
|
135
|
+
function t(i, p, a, f) {
|
|
136
|
+
if (typeof a == "number")
|
|
137
|
+
return f[i].length === a;
|
|
138
|
+
if (typeof a == "object") {
|
|
139
|
+
const u = Object.keys(a)[0], d = a[u];
|
|
140
|
+
if (u === "not")
|
|
141
|
+
return Number(f[i].length) !== Number(d);
|
|
142
|
+
if (u === "moreThan")
|
|
143
|
+
return Number(f[i].length) >= Number(d);
|
|
144
|
+
if (u === "lessThan")
|
|
145
|
+
return Number(f[i].length) <= Number(d);
|
|
140
146
|
}
|
|
141
147
|
return !1;
|
|
142
148
|
}
|
|
143
|
-
function
|
|
144
|
-
return
|
|
149
|
+
function e(i, p, a, f) {
|
|
150
|
+
return f[i] && f[i].propertyValue && String(f[i].propertyValue.value) === String(a);
|
|
145
151
|
}
|
|
146
152
|
const o = /* @__PURE__ */ new Map([
|
|
147
|
-
["length",
|
|
148
|
-
["getProperty",
|
|
153
|
+
["length", t],
|
|
154
|
+
["getProperty", e]
|
|
149
155
|
]);
|
|
150
|
-
Object.keys(n).reduce((
|
|
151
|
-
function r(
|
|
152
|
-
const
|
|
153
|
-
return typeof
|
|
154
|
-
if (
|
|
155
|
-
return { target:
|
|
156
|
-
const
|
|
157
|
-
return { target:
|
|
156
|
+
Object.keys(n).reduce((i, p) => (i.set(p, n[p]), i), o);
|
|
157
|
+
function r(i, p) {
|
|
158
|
+
const a = i;
|
|
159
|
+
return typeof p == "number" ? [{ target: a, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: a, operator: "getProperty", param: i, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
|
|
160
|
+
if (f === "length")
|
|
161
|
+
return { target: a, operator: "length", param: null, value: p[f] };
|
|
162
|
+
const u = f, d = p[f];
|
|
163
|
+
return { target: a, operator: "getProperty", param: u, value: d };
|
|
158
164
|
}) : [];
|
|
159
165
|
}
|
|
160
|
-
function l(
|
|
161
|
-
return Object.keys(
|
|
162
|
-
const
|
|
163
|
-
return
|
|
166
|
+
function l(i) {
|
|
167
|
+
return Object.keys(i).reduce((a, f) => {
|
|
168
|
+
const u = r(f, i[f]);
|
|
169
|
+
return a.push(...u), a;
|
|
164
170
|
}, []);
|
|
165
171
|
}
|
|
166
|
-
function
|
|
167
|
-
if (o.has(
|
|
168
|
-
const
|
|
169
|
-
return
|
|
172
|
+
function c(i, p) {
|
|
173
|
+
if (o.has(i.operator)) {
|
|
174
|
+
const a = o.get(i.operator);
|
|
175
|
+
return a && a(i.target, i.param, i.value, p) || !1;
|
|
170
176
|
}
|
|
171
177
|
return !1;
|
|
172
178
|
}
|
|
173
|
-
function
|
|
174
|
-
return l(
|
|
179
|
+
function m(i, p) {
|
|
180
|
+
return l(i).reduce((u, d) => u && c(d, p), !0);
|
|
175
181
|
}
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
return
|
|
182
|
+
function s(i, p) {
|
|
183
|
+
const a = Object.keys(i), f = a.includes("allOf"), u = a.includes("anyOf"), d = f || u, C = (d ? i[d ? f ? "allOf" : "anyOf" : "allOf"] : [i]).map((B) => m(B, p));
|
|
184
|
+
return f ? !C.includes(!1) : C.includes(!0);
|
|
179
185
|
}
|
|
180
|
-
return { parseValueSchema:
|
|
186
|
+
return { parseValueSchema: s };
|
|
181
187
|
}
|
|
182
|
-
const
|
|
188
|
+
const y = {
|
|
183
189
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
184
190
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
185
191
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -216,25 +222,26 @@ const s = {
|
|
|
216
222
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
217
223
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
218
224
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
219
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
226
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
227
|
+
}, we = {}, Be = {};
|
|
228
|
+
Se();
|
|
229
|
+
function Z(n, t, e = /* @__PURE__ */ new Map(), o = (c, m, s) => m, r = {}, l = (c) => c) {
|
|
230
|
+
return Q[t.title] = t, Y[t.title] = o, we[t.title] = r, Be[t.title] = l, (c = {}) => {
|
|
231
|
+
const m = Ve(c, t, e), s = Object.keys(n).reduce((i, p) => (i[p] = n[p].default, i), {});
|
|
232
|
+
return Object.assign(s, m);
|
|
226
233
|
};
|
|
227
234
|
}
|
|
228
|
-
function
|
|
229
|
-
return { customClass:
|
|
235
|
+
function Pe(n, t) {
|
|
236
|
+
return { customClass: t.class, customStyle: t.style };
|
|
230
237
|
}
|
|
231
|
-
const
|
|
232
|
-
["appearance",
|
|
238
|
+
const R = /* @__PURE__ */ new Map([
|
|
239
|
+
["appearance", Pe]
|
|
233
240
|
]);
|
|
234
|
-
function
|
|
235
|
-
return
|
|
241
|
+
function K(n, t, e) {
|
|
242
|
+
return t;
|
|
236
243
|
}
|
|
237
|
-
const
|
|
244
|
+
const z = {
|
|
238
245
|
/** 组件唯一标识 */
|
|
239
246
|
id: { Type: String, default: "" },
|
|
240
247
|
/** 自定义样式 */
|
|
@@ -257,67 +264,67 @@ const W = {
|
|
|
257
264
|
label: { type: String, default: "" },
|
|
258
265
|
/** 标识是否被选中 */
|
|
259
266
|
checked: { type: Boolean, default: !1 }
|
|
260
|
-
},
|
|
267
|
+
}, ee = Z(z, ke, R, K), I = /* @__PURE__ */ U({
|
|
261
268
|
name: "FCheckBox",
|
|
262
|
-
props:
|
|
269
|
+
props: z,
|
|
263
270
|
emits: ["change", "changeValue", "update:modelValue", "update:checked"],
|
|
264
|
-
setup(n,
|
|
265
|
-
const
|
|
271
|
+
setup(n, t) {
|
|
272
|
+
const e = A(H, null), {
|
|
266
273
|
buttonClass: o,
|
|
267
274
|
disabled: r,
|
|
268
275
|
name: l,
|
|
269
|
-
shouldRenderButton:
|
|
270
|
-
shouldRenderNative:
|
|
271
|
-
shouldRenderTag:
|
|
272
|
-
tagClass:
|
|
273
|
-
checked:
|
|
274
|
-
onClickCheckBox:
|
|
275
|
-
} = pe(n,
|
|
276
|
+
shouldRenderButton: c,
|
|
277
|
+
shouldRenderNative: m,
|
|
278
|
+
shouldRenderTag: s,
|
|
279
|
+
tagClass: i,
|
|
280
|
+
checked: p,
|
|
281
|
+
onClickCheckBox: a
|
|
282
|
+
} = pe(n, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
|
|
276
283
|
h();
|
|
277
|
-
const
|
|
278
|
-
return
|
|
284
|
+
const f = h(n.id), u = h(n.customClass), d = h(n.modelValue), v = h(n.indeterminate);
|
|
285
|
+
return j(() => {
|
|
279
286
|
const k = {
|
|
280
287
|
"custom-control": !0,
|
|
281
288
|
"custom-checkbox": !0
|
|
282
289
|
};
|
|
283
|
-
return
|
|
284
|
-
}),
|
|
285
|
-
|
|
286
|
-
}),
|
|
287
|
-
|
|
288
|
-
}),
|
|
290
|
+
return u.value && u.value.split(" ").reduce((C, w) => (C[w] = !0, C), k), k;
|
|
291
|
+
}), L(() => n.modelValue, (k) => {
|
|
292
|
+
d.value = k;
|
|
293
|
+
}), L(() => n.indeterminate, (k) => {
|
|
294
|
+
v.value = k;
|
|
295
|
+
}), O(() => {
|
|
289
296
|
}), () => {
|
|
290
|
-
var k,
|
|
291
|
-
return
|
|
297
|
+
var k, C, w, B, F, D;
|
|
298
|
+
return b(se, null, [c.value && b("div", {
|
|
292
299
|
class: o.value,
|
|
293
300
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
294
|
-
onClick:
|
|
295
|
-
}, [(
|
|
296
|
-
class:
|
|
297
|
-
onClick:
|
|
298
|
-
}, [
|
|
301
|
+
onClick: a
|
|
302
|
+
}, [(C = (k = t.slots).default) == null ? void 0 : C.call(k)]), s.value && b("div", {
|
|
303
|
+
class: i.value,
|
|
304
|
+
onClick: a
|
|
305
|
+
}, [b("div", {
|
|
299
306
|
class: "title"
|
|
300
|
-
}, [(B = (w =
|
|
307
|
+
}, [(B = (w = t.slots).default) == null ? void 0 : B.call(w)]), b("div", {
|
|
301
308
|
class: "tip"
|
|
302
|
-
}, null),
|
|
309
|
+
}, null), b("span", {
|
|
303
310
|
class: "f-icon f-icon-check f-radio-icon"
|
|
304
|
-
}, null)]),
|
|
311
|
+
}, null)]), m.value && b("div", {
|
|
305
312
|
class: "custom-control custom-checkbox",
|
|
306
|
-
onClick:
|
|
307
|
-
}, [
|
|
313
|
+
onClick: a
|
|
314
|
+
}, [b("input", {
|
|
308
315
|
type: "checkbox",
|
|
309
316
|
class: "custom-control-input",
|
|
310
317
|
name: l.value,
|
|
311
|
-
id:
|
|
318
|
+
id: f,
|
|
312
319
|
value: n.value,
|
|
313
|
-
checked:
|
|
320
|
+
checked: p.value,
|
|
314
321
|
disabled: r.value
|
|
315
|
-
}, null),
|
|
322
|
+
}, null), b("div", {
|
|
316
323
|
class: "custom-control-label"
|
|
317
|
-
}, [(
|
|
324
|
+
}, [(D = (F = t.slots).default) == null ? void 0 : D.call(F)])])]);
|
|
318
325
|
};
|
|
319
326
|
}
|
|
320
|
-
}),
|
|
327
|
+
}), Fe = "https://json-schema.org/draft/2020-12/schema", xe = "https://farris-design.gitee.io/check-box.schema.json", Ee = "check-group", De = "A Farris Input Component", Ae = "object", Le = {
|
|
321
328
|
id: {
|
|
322
329
|
description: "The unique identifier for a check box",
|
|
323
330
|
type: "string"
|
|
@@ -384,18 +391,18 @@ const W = {
|
|
|
384
391
|
type: "boolean",
|
|
385
392
|
default: !0
|
|
386
393
|
}
|
|
387
|
-
},
|
|
394
|
+
}, $e = [
|
|
388
395
|
"id",
|
|
389
396
|
"type"
|
|
390
|
-
],
|
|
391
|
-
$schema:
|
|
392
|
-
$id:
|
|
393
|
-
title:
|
|
394
|
-
description:
|
|
395
|
-
type:
|
|
396
|
-
properties:
|
|
397
|
-
required:
|
|
398
|
-
},
|
|
397
|
+
], Ne = {
|
|
398
|
+
$schema: Fe,
|
|
399
|
+
$id: xe,
|
|
400
|
+
title: Ee,
|
|
401
|
+
description: De,
|
|
402
|
+
type: Ae,
|
|
403
|
+
properties: Le,
|
|
404
|
+
required: $e
|
|
405
|
+
}, Ue = {
|
|
399
406
|
/**
|
|
400
407
|
* 是否被选中
|
|
401
408
|
*/
|
|
@@ -412,8 +419,8 @@ const W = {
|
|
|
412
419
|
* type为button或者tag时的尺寸
|
|
413
420
|
*/
|
|
414
421
|
size: { type: String, default: "middle" }
|
|
415
|
-
},
|
|
416
|
-
|
|
422
|
+
}, W = {
|
|
423
|
+
...Ue,
|
|
417
424
|
/**
|
|
418
425
|
* 组件标识
|
|
419
426
|
*/
|
|
@@ -469,248 +476,248 @@ const W = {
|
|
|
469
476
|
* 枚举数组中枚举值的key值。
|
|
470
477
|
*/
|
|
471
478
|
valueField: { type: String, default: "value" }
|
|
472
|
-
},
|
|
473
|
-
function
|
|
474
|
-
const o =
|
|
475
|
-
function l(
|
|
476
|
-
return
|
|
479
|
+
}, te = Z(W, Ne, R, K);
|
|
480
|
+
function ne(n, t, e) {
|
|
481
|
+
const o = j(() => !n.disabled), r = h(n.enumData);
|
|
482
|
+
function l(a) {
|
|
483
|
+
return a[n.valueField];
|
|
477
484
|
}
|
|
478
|
-
function
|
|
479
|
-
return
|
|
485
|
+
function c(a) {
|
|
486
|
+
return a[n.textField];
|
|
480
487
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
488
|
+
function m(a) {
|
|
489
|
+
return a ? n.isStringValue ? a.split(n.separator) : a : [];
|
|
483
490
|
}
|
|
484
|
-
function
|
|
485
|
-
const
|
|
486
|
-
return n.isStringValue ?
|
|
491
|
+
function s(a) {
|
|
492
|
+
const u = r.value.map((d) => l(d)).filter((d) => a.some((v) => v === String(d)));
|
|
493
|
+
return n.isStringValue ? u.join(n.separator) : u;
|
|
487
494
|
}
|
|
488
|
-
function a
|
|
489
|
-
const
|
|
490
|
-
return
|
|
495
|
+
function i(a) {
|
|
496
|
+
const f = String(l(a));
|
|
497
|
+
return m(e.value).some((d) => d === f);
|
|
491
498
|
}
|
|
492
|
-
function
|
|
499
|
+
function p(a, f) {
|
|
493
500
|
if (o.value) {
|
|
494
|
-
let
|
|
495
|
-
const
|
|
496
|
-
!
|
|
501
|
+
let u = m(e.value) || [];
|
|
502
|
+
const d = String(l(a));
|
|
503
|
+
!u || !u.length ? u.push(d) : u.some((v) => v === d) ? u = u.filter((v) => v !== d) : u.push(d), e.value = s(u), t.emit("changeValue", e.value), t.emit("update:modelValue", e.value);
|
|
497
504
|
}
|
|
498
|
-
|
|
505
|
+
f.stopPropagation();
|
|
499
506
|
}
|
|
500
507
|
return {
|
|
501
508
|
enumData: r,
|
|
502
509
|
getValue: l,
|
|
503
|
-
getText:
|
|
504
|
-
checked:
|
|
505
|
-
onClickCheckbox:
|
|
510
|
+
getText: c,
|
|
511
|
+
checked: i,
|
|
512
|
+
onClickCheckbox: p
|
|
506
513
|
};
|
|
507
514
|
}
|
|
508
|
-
const
|
|
515
|
+
const E = /* @__PURE__ */ U({
|
|
509
516
|
name: "FCheckGroup",
|
|
510
|
-
props:
|
|
517
|
+
props: W,
|
|
511
518
|
emits: ["changeValue", "update:modelValue"],
|
|
512
|
-
setup(n,
|
|
513
|
-
const
|
|
514
|
-
enumData:
|
|
515
|
-
onClickCheckbox:
|
|
516
|
-
getValue:
|
|
517
|
-
getText:
|
|
518
|
-
checked:
|
|
519
|
-
} =
|
|
519
|
+
setup(n, t) {
|
|
520
|
+
const e = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), l = h(n.name), {
|
|
521
|
+
enumData: c,
|
|
522
|
+
onClickCheckbox: m,
|
|
523
|
+
getValue: s,
|
|
524
|
+
getText: i,
|
|
525
|
+
checked: p
|
|
526
|
+
} = ne(n, t, e), a = j(() => ({
|
|
520
527
|
"farris-checkradio-hor": o.value
|
|
521
528
|
}));
|
|
522
|
-
|
|
523
|
-
|
|
529
|
+
L(() => n.modelValue, (u) => {
|
|
530
|
+
e.value = u;
|
|
524
531
|
});
|
|
525
|
-
const
|
|
526
|
-
return
|
|
527
|
-
values:
|
|
532
|
+
const f = h([]);
|
|
533
|
+
return ue(H, {
|
|
534
|
+
values: f,
|
|
528
535
|
parentProps: n,
|
|
529
|
-
parentContext:
|
|
530
|
-
}), () =>
|
|
531
|
-
class: ["farris-input-wrap",
|
|
532
|
-
}, [
|
|
533
|
-
const
|
|
534
|
-
return
|
|
536
|
+
parentContext: t
|
|
537
|
+
}), () => b("div", {
|
|
538
|
+
class: ["farris-input-wrap", a.value]
|
|
539
|
+
}, [t.slots.default ? t.slots.default() : c.value.map((u, d) => {
|
|
540
|
+
const v = "checkbox_" + l.value + d;
|
|
541
|
+
return b("div", {
|
|
535
542
|
class: "custom-control custom-checkbox"
|
|
536
|
-
}, [
|
|
543
|
+
}, [b("input", {
|
|
537
544
|
type: "checkbox",
|
|
538
545
|
class: "custom-control-input",
|
|
539
546
|
name: l.value,
|
|
540
|
-
id:
|
|
541
|
-
value:
|
|
542
|
-
checked: u
|
|
547
|
+
id: v,
|
|
548
|
+
value: s(u),
|
|
549
|
+
checked: p(u),
|
|
543
550
|
disabled: n.disabled,
|
|
544
551
|
tabindex: r.value,
|
|
545
|
-
onClick: (k) =>
|
|
546
|
-
}, null),
|
|
552
|
+
onClick: (k) => m(u, k)
|
|
553
|
+
}, null), b("label", {
|
|
547
554
|
class: "custom-control-label",
|
|
548
|
-
for:
|
|
549
|
-
title:
|
|
550
|
-
}, [
|
|
555
|
+
for: v,
|
|
556
|
+
title: i(u)
|
|
557
|
+
}, [i(u)])]);
|
|
551
558
|
})]);
|
|
552
559
|
}
|
|
553
560
|
});
|
|
554
|
-
function
|
|
555
|
-
var
|
|
561
|
+
function oe(n, t, e) {
|
|
562
|
+
var D;
|
|
556
563
|
function o() {
|
|
557
|
-
|
|
564
|
+
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
558
565
|
}
|
|
559
566
|
o();
|
|
560
|
-
const r =
|
|
561
|
-
function
|
|
562
|
-
return (
|
|
567
|
+
const r = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", c = h();
|
|
568
|
+
function m() {
|
|
569
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
563
570
|
}
|
|
564
|
-
function
|
|
571
|
+
function s() {
|
|
565
572
|
return !1;
|
|
566
573
|
}
|
|
567
|
-
function
|
|
568
|
-
return (
|
|
574
|
+
function i() {
|
|
575
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
569
576
|
}
|
|
570
|
-
function
|
|
571
|
-
return (
|
|
577
|
+
function p() {
|
|
578
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
572
579
|
}
|
|
573
|
-
function
|
|
580
|
+
function a(g) {
|
|
574
581
|
if (!g || !g.value)
|
|
575
582
|
return null;
|
|
576
583
|
if (g.value.schema && g.value.schema.type === "component")
|
|
577
584
|
return g.value;
|
|
578
|
-
const T = h(g == null ? void 0 : g.value.parent),
|
|
579
|
-
return
|
|
585
|
+
const T = h(g == null ? void 0 : g.value.parent), V = a(T);
|
|
586
|
+
return V || null;
|
|
580
587
|
}
|
|
581
|
-
function
|
|
582
|
-
const { componentInstance: T, designerItemElementRef:
|
|
583
|
-
return !T || !T.value ? null : T.value.canMove ?
|
|
588
|
+
function f(g = t) {
|
|
589
|
+
const { componentInstance: T, designerItemElementRef: V } = g;
|
|
590
|
+
return !T || !T.value ? null : T.value.canMove ? V : f(g.parent);
|
|
584
591
|
}
|
|
585
|
-
function
|
|
586
|
-
return !!
|
|
592
|
+
function u(g) {
|
|
593
|
+
return !!e && e.canAccepts(g);
|
|
587
594
|
}
|
|
588
|
-
function
|
|
589
|
-
return (
|
|
595
|
+
function d() {
|
|
596
|
+
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
590
597
|
}
|
|
591
|
-
function
|
|
598
|
+
function v() {
|
|
592
599
|
}
|
|
593
600
|
function k(g, T) {
|
|
594
|
-
T &&
|
|
601
|
+
T && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(T);
|
|
595
602
|
}
|
|
596
|
-
function
|
|
597
|
-
const { componentType:
|
|
598
|
-
let
|
|
599
|
-
|
|
600
|
-
const $ =
|
|
601
|
-
return
|
|
603
|
+
function C(g, T) {
|
|
604
|
+
const { componentType: V } = g;
|
|
605
|
+
let S = G(V, g, T);
|
|
606
|
+
e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(g, S));
|
|
607
|
+
const $ = V.toLowerCase().replace("-", "_");
|
|
608
|
+
return S && !S.id && S.type === V && (S.id = `${$}_${Math.random().toString().slice(2, 6)}`), S;
|
|
602
609
|
}
|
|
603
610
|
function w(g, T) {
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
let P = G(
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
return P && !P.id && P.type ===
|
|
611
|
+
const V = String(g.getAttribute("data-controltype")), S = g.getAttribute("data-feature"), $ = S ? JSON.parse(S) : {};
|
|
612
|
+
$.parentComponentInstance = c.value;
|
|
613
|
+
let P = G(V, $);
|
|
614
|
+
e && e.onAcceptNewChildElement && (P = e.onAcceptNewChildElement(g, T, P));
|
|
615
|
+
const ae = V.toLowerCase().replace("-", "_");
|
|
616
|
+
return P && !P.id && P.type === V && (P.id = `${ae}_${Math.random().toString().slice(2, 6)}`), P;
|
|
610
617
|
}
|
|
611
618
|
function B(g) {
|
|
612
619
|
}
|
|
613
|
-
function
|
|
614
|
-
if (
|
|
615
|
-
return
|
|
620
|
+
function F(...g) {
|
|
621
|
+
if (e && e.getPropsConfig)
|
|
622
|
+
return e.getPropsConfig(...g);
|
|
616
623
|
}
|
|
617
|
-
return
|
|
618
|
-
canMove:
|
|
619
|
-
canSelectParent:
|
|
620
|
-
canDelete:
|
|
621
|
-
canNested: !
|
|
622
|
-
contents:
|
|
624
|
+
return c.value = {
|
|
625
|
+
canMove: m(),
|
|
626
|
+
canSelectParent: s(),
|
|
627
|
+
canDelete: i(),
|
|
628
|
+
canNested: !p(),
|
|
629
|
+
contents: t == null ? void 0 : t.schema.contents,
|
|
623
630
|
elementRef: n,
|
|
624
|
-
parent: (
|
|
625
|
-
schema:
|
|
631
|
+
parent: (D = t == null ? void 0 : t.parent) == null ? void 0 : D.componentInstance,
|
|
632
|
+
schema: t == null ? void 0 : t.schema,
|
|
626
633
|
styles: r,
|
|
627
634
|
designerClass: l,
|
|
628
|
-
canAccepts:
|
|
629
|
-
getBelongedComponentInstance:
|
|
630
|
-
getDraggableDesignItemElement:
|
|
631
|
-
getDraggingDisplayText:
|
|
632
|
-
getPropConfig:
|
|
633
|
-
getDragScopeElement:
|
|
635
|
+
canAccepts: u,
|
|
636
|
+
getBelongedComponentInstance: a,
|
|
637
|
+
getDraggableDesignItemElement: f,
|
|
638
|
+
getDraggingDisplayText: d,
|
|
639
|
+
getPropConfig: F,
|
|
640
|
+
getDragScopeElement: v,
|
|
634
641
|
onAcceptMovedChildElement: k,
|
|
635
642
|
onAcceptNewChildElement: w,
|
|
636
643
|
onChildElementMovedOut: B,
|
|
637
|
-
addNewChildComponentSchema:
|
|
644
|
+
addNewChildComponentSchema: C,
|
|
638
645
|
updateDragAndDropRules: o,
|
|
639
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
640
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
641
|
-
},
|
|
646
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || h(!1),
|
|
647
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || h(!1)
|
|
648
|
+
}, c;
|
|
642
649
|
}
|
|
643
|
-
function
|
|
650
|
+
function re(n, t) {
|
|
644
651
|
n.schema;
|
|
645
|
-
const
|
|
646
|
-
function r(
|
|
652
|
+
const e = h(!0), o = h(!0);
|
|
653
|
+
function r(a) {
|
|
647
654
|
return !1;
|
|
648
655
|
}
|
|
649
656
|
function l() {
|
|
650
657
|
return !1;
|
|
651
658
|
}
|
|
652
|
-
function
|
|
659
|
+
function c() {
|
|
653
660
|
return !1;
|
|
654
661
|
}
|
|
655
|
-
function
|
|
662
|
+
function m() {
|
|
656
663
|
return !0;
|
|
657
664
|
}
|
|
658
|
-
function
|
|
665
|
+
function s(a) {
|
|
659
666
|
}
|
|
660
|
-
function
|
|
667
|
+
function i() {
|
|
661
668
|
}
|
|
662
|
-
function
|
|
669
|
+
function p(a) {
|
|
663
670
|
return null;
|
|
664
671
|
}
|
|
665
672
|
return {
|
|
666
673
|
canAccepts: r,
|
|
667
674
|
checkCanDeleteComponent: l,
|
|
668
|
-
checkCanMoveComponent:
|
|
669
|
-
hideNestedPaddingInDesginerView:
|
|
670
|
-
onAcceptMovedChildElement:
|
|
671
|
-
resolveComponentContext:
|
|
672
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
675
|
+
checkCanMoveComponent: c,
|
|
676
|
+
hideNestedPaddingInDesginerView: m,
|
|
677
|
+
onAcceptMovedChildElement: s,
|
|
678
|
+
resolveComponentContext: i,
|
|
679
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
673
680
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
674
|
-
getPropsConfig:
|
|
681
|
+
getPropsConfig: p
|
|
675
682
|
};
|
|
676
683
|
}
|
|
677
|
-
class
|
|
678
|
-
constructor(
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
684
|
+
class je {
|
|
685
|
+
constructor(t, e) {
|
|
686
|
+
M(this, "componentId");
|
|
687
|
+
M(this, "viewModelId");
|
|
688
|
+
M(this, "eventsEditorUtils");
|
|
689
|
+
M(this, "formSchemaUtils");
|
|
690
|
+
M(this, "formMetadataConverter");
|
|
691
|
+
M(this, "designViewModelUtils");
|
|
692
|
+
M(this, "designViewModelField");
|
|
693
|
+
M(this, "controlCreatorUtils");
|
|
694
|
+
M(this, "designerHostService");
|
|
695
|
+
M(this, "schemaService", null);
|
|
696
|
+
M(this, "metadataService", null);
|
|
697
|
+
M(this, "propertyConfig", {
|
|
691
698
|
type: "object",
|
|
692
699
|
categories: {}
|
|
693
700
|
});
|
|
694
701
|
var o;
|
|
695
|
-
this.componentId =
|
|
702
|
+
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;
|
|
696
703
|
}
|
|
697
704
|
getTableInfo() {
|
|
698
|
-
var
|
|
699
|
-
return (
|
|
705
|
+
var t;
|
|
706
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
700
707
|
}
|
|
701
|
-
setDesignViewModelField(
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
708
|
+
setDesignViewModelField(t) {
|
|
709
|
+
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
710
|
+
if (e) {
|
|
704
711
|
if (!this.designViewModelField) {
|
|
705
712
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
706
|
-
this.designViewModelField = o.fields.find((r) => r.id ===
|
|
713
|
+
this.designViewModelField = o.fields.find((r) => r.id === e);
|
|
707
714
|
}
|
|
708
|
-
|
|
715
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
709
716
|
}
|
|
710
717
|
}
|
|
711
|
-
changeFieldEditorType(
|
|
718
|
+
changeFieldEditorType(t, e) {
|
|
712
719
|
}
|
|
713
|
-
getBasicPropConfig(
|
|
720
|
+
getBasicPropConfig(t) {
|
|
714
721
|
return {
|
|
715
722
|
description: "Basic Information",
|
|
716
723
|
title: "基本信息",
|
|
@@ -729,13 +736,13 @@ class Ne {
|
|
|
729
736
|
type: "combo-list",
|
|
730
737
|
textField: "name",
|
|
731
738
|
valueField: "value",
|
|
732
|
-
data: [{ value:
|
|
739
|
+
data: [{ value: t.type, name: y[t.type].name }]
|
|
733
740
|
}
|
|
734
741
|
}
|
|
735
742
|
}
|
|
736
743
|
};
|
|
737
744
|
}
|
|
738
|
-
getAppearanceConfig(
|
|
745
|
+
getAppearanceConfig(t = null) {
|
|
739
746
|
return {
|
|
740
747
|
title: "样式",
|
|
741
748
|
description: "Appearance",
|
|
@@ -755,90 +762,105 @@ class Ne {
|
|
|
755
762
|
}
|
|
756
763
|
};
|
|
757
764
|
}
|
|
765
|
+
/**
|
|
766
|
+
*
|
|
767
|
+
* @param propertyId
|
|
768
|
+
* @param componentInstance
|
|
769
|
+
* @returns
|
|
770
|
+
*/
|
|
771
|
+
updateElementByParentContainer(t, e) {
|
|
772
|
+
const o = e && e.parent && e.parent.schema;
|
|
773
|
+
if (!o)
|
|
774
|
+
return;
|
|
775
|
+
const r = o.contents.findIndex((c) => c.id === t), l = J(o.contents[r]);
|
|
776
|
+
o.contents.splice(r, 1), o.contents.splice(r, 0, l);
|
|
777
|
+
}
|
|
758
778
|
}
|
|
759
|
-
const
|
|
779
|
+
const x = class x {
|
|
760
780
|
/**
|
|
761
781
|
* 根据绑定字段类型获取可用的输入类控件
|
|
762
782
|
*/
|
|
763
|
-
static getEditorTypesByMDataType(
|
|
764
|
-
const
|
|
765
|
-
return
|
|
783
|
+
static getEditorTypesByMDataType(t) {
|
|
784
|
+
const e = x.fieldControlTypeMapping[t];
|
|
785
|
+
return e || [{ key: "", value: "" }];
|
|
766
786
|
}
|
|
767
787
|
/**
|
|
768
788
|
* 获取所有输入类控件
|
|
769
789
|
*/
|
|
770
790
|
static getAllInputTypes() {
|
|
771
|
-
const
|
|
772
|
-
for (let
|
|
773
|
-
|
|
774
|
-
|
|
791
|
+
const t = [];
|
|
792
|
+
for (let e in x.fieldControlTypeMapping)
|
|
793
|
+
x.fieldControlTypeMapping[e].forEach((o) => {
|
|
794
|
+
t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
775
795
|
});
|
|
776
|
-
return
|
|
796
|
+
return t;
|
|
777
797
|
}
|
|
778
798
|
};
|
|
779
799
|
/**
|
|
780
800
|
* <字段类型,可配置的控件类型列表>的映射
|
|
781
801
|
*/
|
|
782
|
-
|
|
802
|
+
M(x, "fieldControlTypeMapping", {
|
|
783
803
|
String: [
|
|
784
|
-
{ key:
|
|
785
|
-
{ key:
|
|
786
|
-
{ key:
|
|
787
|
-
{ key:
|
|
788
|
-
{ key:
|
|
789
|
-
{ key:
|
|
790
|
-
{ key:
|
|
804
|
+
{ key: y["input-group"].type, value: y["input-group"].name },
|
|
805
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
806
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name },
|
|
807
|
+
{ key: y["check-box"].type, value: y["check-box"].name },
|
|
808
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name },
|
|
809
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
810
|
+
{ key: y.textarea.type, value: y.textarea.name }
|
|
791
811
|
],
|
|
792
812
|
Text: [
|
|
793
|
-
{ key:
|
|
794
|
-
{ key:
|
|
813
|
+
{ key: y.textarea.type, value: y.textarea.name },
|
|
814
|
+
{ key: y.lookup.type, value: y.lookup.name }
|
|
795
815
|
],
|
|
796
816
|
Decimal: [
|
|
797
|
-
{ key:
|
|
817
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
798
818
|
],
|
|
799
819
|
Integer: [
|
|
800
|
-
{ key:
|
|
820
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
801
821
|
],
|
|
802
822
|
Number: [
|
|
803
|
-
{ key:
|
|
823
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
804
824
|
],
|
|
805
825
|
BigNumber: [
|
|
806
|
-
{ key:
|
|
826
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
807
827
|
],
|
|
808
828
|
Date: [
|
|
809
|
-
{ key:
|
|
829
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
810
830
|
],
|
|
811
831
|
DateTime: [
|
|
812
|
-
{ key:
|
|
832
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
813
833
|
],
|
|
814
834
|
Boolean: [
|
|
815
|
-
{ key:
|
|
816
|
-
{ key:
|
|
835
|
+
{ key: y.switch.type, value: y.switch.name },
|
|
836
|
+
{ key: y["check-box"].type, value: y["check-box"].name }
|
|
817
837
|
],
|
|
818
838
|
Enum: [
|
|
819
|
-
{ key:
|
|
820
|
-
{ key:
|
|
839
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
840
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
821
841
|
],
|
|
822
842
|
Object: [
|
|
823
|
-
{ key:
|
|
824
|
-
{ key:
|
|
825
|
-
{ key:
|
|
843
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
844
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
845
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
826
846
|
]
|
|
827
847
|
});
|
|
828
|
-
let N =
|
|
829
|
-
const
|
|
830
|
-
class
|
|
831
|
-
constructor(e,
|
|
832
|
-
super(e,
|
|
848
|
+
let N = x;
|
|
849
|
+
const Ge = h(0);
|
|
850
|
+
class ie extends je {
|
|
851
|
+
constructor(e, o) {
|
|
852
|
+
super(e, o);
|
|
853
|
+
M(this, "responseLayoutEditorFunction");
|
|
854
|
+
this.responseLayoutEditorFunction = de(this.formSchemaUtils);
|
|
833
855
|
}
|
|
834
|
-
getPropertyConfig(e,
|
|
835
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(e,
|
|
856
|
+
getPropertyConfig(e, o) {
|
|
857
|
+
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;
|
|
836
858
|
}
|
|
837
|
-
getBasicProperties(e,
|
|
859
|
+
getBasicProperties(e, o) {
|
|
838
860
|
var m;
|
|
839
|
-
var
|
|
861
|
+
var r = this;
|
|
840
862
|
this.setDesignViewModelField(e);
|
|
841
|
-
const
|
|
863
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
842
864
|
return {
|
|
843
865
|
description: "Basic Information",
|
|
844
866
|
title: "基本信息",
|
|
@@ -850,8 +872,8 @@ class oe extends Ne {
|
|
|
850
872
|
readonly: !0
|
|
851
873
|
},
|
|
852
874
|
type: {
|
|
853
|
-
description: "
|
|
854
|
-
title: "
|
|
875
|
+
description: "编辑器类型",
|
|
876
|
+
title: "编辑器类型",
|
|
855
877
|
type: "string",
|
|
856
878
|
refreshPanelAfterChanged: !0,
|
|
857
879
|
$converter: "/converter/change-editor.converter",
|
|
@@ -860,7 +882,7 @@ class oe extends Ne {
|
|
|
860
882
|
textField: "value",
|
|
861
883
|
valueField: "key",
|
|
862
884
|
editable: !1,
|
|
863
|
-
data:
|
|
885
|
+
data: r.designViewModelField ? N.getEditorTypesByMDataType((m = r.designViewModelField.type) == null ? void 0 : m.name) : N.getAllInputTypes()
|
|
864
886
|
}
|
|
865
887
|
},
|
|
866
888
|
label: {
|
|
@@ -877,7 +899,7 @@ class oe extends Ne {
|
|
|
877
899
|
bindingType: { enable: !1 },
|
|
878
900
|
editorParams: {
|
|
879
901
|
propertyData: e,
|
|
880
|
-
formBasicInfo:
|
|
902
|
+
formBasicInfo: l
|
|
881
903
|
},
|
|
882
904
|
columns: [
|
|
883
905
|
{ field: "name", title: "字段名称" },
|
|
@@ -885,22 +907,27 @@ class oe extends Ne {
|
|
|
885
907
|
{ field: "fieldType", title: "字段类型" }
|
|
886
908
|
],
|
|
887
909
|
textField: "bindingField",
|
|
888
|
-
data:
|
|
910
|
+
data: c
|
|
889
911
|
}
|
|
890
912
|
}
|
|
891
913
|
},
|
|
892
|
-
setPropertyRelates(
|
|
893
|
-
if (
|
|
894
|
-
switch (
|
|
914
|
+
setPropertyRelates(s, i) {
|
|
915
|
+
if (s)
|
|
916
|
+
switch (s && s.propertyID) {
|
|
895
917
|
case "type": {
|
|
896
|
-
|
|
918
|
+
r.changeControlType(e, s, o);
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
case "label": {
|
|
922
|
+
s.needRefreshControlTree = !0;
|
|
897
923
|
break;
|
|
898
924
|
}
|
|
899
925
|
}
|
|
900
926
|
}
|
|
901
927
|
};
|
|
902
928
|
}
|
|
903
|
-
getAppearanceProperties(e) {
|
|
929
|
+
getAppearanceProperties(e, o) {
|
|
930
|
+
var r = this;
|
|
904
931
|
return {
|
|
905
932
|
title: "样式",
|
|
906
933
|
description: "Appearance",
|
|
@@ -921,12 +948,25 @@ class oe extends Ne {
|
|
|
921
948
|
description: "响应式列宽",
|
|
922
949
|
title: "响应式列宽",
|
|
923
950
|
type: "boolean",
|
|
924
|
-
visible: !
|
|
951
|
+
visible: !0,
|
|
952
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
953
|
+
refreshPanelAfterChanged: !0,
|
|
925
954
|
editor: {
|
|
926
|
-
type: "response-layout-editor-setting"
|
|
927
|
-
|
|
928
|
-
|
|
955
|
+
type: "response-layout-editor-setting",
|
|
956
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
|
|
957
|
+
}
|
|
929
958
|
}
|
|
959
|
+
},
|
|
960
|
+
setPropertyRelates(l, c) {
|
|
961
|
+
if (l)
|
|
962
|
+
switch (l && l.propertyID) {
|
|
963
|
+
case "responseLayout":
|
|
964
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
|
|
965
|
+
break;
|
|
966
|
+
case "class":
|
|
967
|
+
r.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
930
970
|
}
|
|
931
971
|
};
|
|
932
972
|
}
|
|
@@ -938,44 +978,44 @@ class oe extends Ne {
|
|
|
938
978
|
* @param propertyData 控件DOM属性
|
|
939
979
|
* @param newControlType 新控件类型
|
|
940
980
|
*/
|
|
941
|
-
changeControlType(e,
|
|
942
|
-
var
|
|
943
|
-
const
|
|
944
|
-
if (!
|
|
981
|
+
changeControlType(e, o, r) {
|
|
982
|
+
var p, a, f, u;
|
|
983
|
+
const l = o.propertyValue, c = r && r.parent && r.parent.schema;
|
|
984
|
+
if (!c)
|
|
945
985
|
return;
|
|
946
|
-
const m =
|
|
947
|
-
let
|
|
986
|
+
const m = c.contents.findIndex((d) => d.id === e.id), s = c.contents[m];
|
|
987
|
+
let i;
|
|
948
988
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
949
989
|
editor: {
|
|
950
|
-
$type:
|
|
990
|
+
$type: l
|
|
951
991
|
},
|
|
952
992
|
name: this.designViewModelField.name,
|
|
953
993
|
require: this.designViewModelField.require,
|
|
954
994
|
readonly: this.designViewModelField.readonly
|
|
955
|
-
}, !1),
|
|
956
|
-
id:
|
|
957
|
-
appearance:
|
|
958
|
-
size:
|
|
959
|
-
label:
|
|
960
|
-
binding:
|
|
961
|
-
visible:
|
|
962
|
-
}), Object.assign(
|
|
963
|
-
isTextArea:
|
|
964
|
-
placeholder: (
|
|
965
|
-
holdPlace: (
|
|
966
|
-
readonly: (
|
|
967
|
-
require: (
|
|
968
|
-
}),
|
|
969
|
-
(
|
|
970
|
-
),
|
|
971
|
-
}
|
|
972
|
-
getComponentConfig(e,
|
|
973
|
-
const
|
|
974
|
-
description: "
|
|
975
|
-
title: "
|
|
995
|
+
}, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = _("form-group") || {}, i.editor = _(l) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
|
|
996
|
+
id: s.id,
|
|
997
|
+
appearance: s.appearance,
|
|
998
|
+
size: s.size,
|
|
999
|
+
label: s.label,
|
|
1000
|
+
binding: s.binding,
|
|
1001
|
+
visible: s.visible
|
|
1002
|
+
}), Object.assign(i.editor, {
|
|
1003
|
+
isTextArea: i.isTextArea && s.isTextArea,
|
|
1004
|
+
placeholder: (p = s.editor) == null ? void 0 : p.placeholder,
|
|
1005
|
+
holdPlace: (a = s.editor) == null ? void 0 : a.holdPlace,
|
|
1006
|
+
readonly: (f = s.editor) == null ? void 0 : f.readonly,
|
|
1007
|
+
require: (u = s.editor) == null ? void 0 : u.require
|
|
1008
|
+
}), c.contents.splice(m, 1), c.contents.splice(m, 0, i), r.schema = Object.assign(s, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1009
|
+
(d) => d.classList.remove("dgComponentSelected")
|
|
1010
|
+
), Ge.value++;
|
|
1011
|
+
}
|
|
1012
|
+
getComponentConfig(e, o = {}, r = {}) {
|
|
1013
|
+
const l = Object.assign({
|
|
1014
|
+
description: "编辑器",
|
|
1015
|
+
title: "编辑器",
|
|
976
1016
|
type: "input-group",
|
|
977
1017
|
$converter: "/converter/property-editor.converter"
|
|
978
|
-
},
|
|
1018
|
+
}, o), c = Object.assign({
|
|
979
1019
|
readonly: {
|
|
980
1020
|
description: "",
|
|
981
1021
|
title: "只读",
|
|
@@ -996,16 +1036,64 @@ class oe extends Ne {
|
|
|
996
1036
|
title: "提示文本",
|
|
997
1037
|
type: "string"
|
|
998
1038
|
}
|
|
999
|
-
},
|
|
1000
|
-
return { ...
|
|
1039
|
+
}, r);
|
|
1040
|
+
return { ...l, properties: { ...c } };
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
1044
|
+
* @param controlClass 控件样式
|
|
1045
|
+
* @param controlId 控件Id
|
|
1046
|
+
* @param componentId 控件所在组件id
|
|
1047
|
+
*/
|
|
1048
|
+
updateUnifiedLayoutAfterControlChanged(e, o, r) {
|
|
1049
|
+
const l = e.split(" ");
|
|
1050
|
+
let c = l.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), m = l.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), s = l.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), i = l.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
|
|
1051
|
+
c = c || "col-12", m = m || "col-md-" + c.replace("col-", ""), s = s || "col-xl-" + m.replace("col-md-", ""), i = i || "col-el-" + s.replace("col-xl-", "");
|
|
1052
|
+
const p = {
|
|
1053
|
+
id: o,
|
|
1054
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
1055
|
+
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
1056
|
+
columnInLG: parseInt(s.replace("col-xl-", ""), 10),
|
|
1057
|
+
columnInEL: parseInt(i.replace("col-el-", ""), 10)
|
|
1058
|
+
};
|
|
1059
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, p);
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
1063
|
+
* @param componentId 组件Id
|
|
1064
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1065
|
+
*/
|
|
1066
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
|
|
1067
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1068
|
+
if (!r || !r.unifiedLayout)
|
|
1069
|
+
return;
|
|
1070
|
+
const l = [];
|
|
1071
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), o) {
|
|
1072
|
+
const d = l.find((v) => v.id === o.id);
|
|
1073
|
+
Object.assign(d || {}, o);
|
|
1074
|
+
}
|
|
1075
|
+
const c = l.map((d) => d.columnInSM), m = l.map((d) => d.columnInMD), s = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), p = this.checkIsUniqueColumn(c) ? c[0] : null, a = this.checkIsUniqueColumn(m) ? m[0] : null, f = this.checkIsUniqueColumn(s) ? s[0] : null, u = this.checkIsUniqueColumn(i) ? i[0] : null;
|
|
1076
|
+
Object.assign(r.unifiedLayout, {
|
|
1077
|
+
uniqueColClassInSM: p,
|
|
1078
|
+
uniqueColClassInMD: a,
|
|
1079
|
+
uniqueColClassInLG: f,
|
|
1080
|
+
uniqueColClassInEL: u
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* 校验宽度样式值是否一致
|
|
1085
|
+
*/
|
|
1086
|
+
checkIsUniqueColumn(e) {
|
|
1087
|
+
const o = new Set(e);
|
|
1088
|
+
return Array.from(o).length === 1;
|
|
1001
1089
|
}
|
|
1002
1090
|
}
|
|
1003
|
-
class
|
|
1004
|
-
constructor(
|
|
1005
|
-
super(
|
|
1091
|
+
class Ie extends ie {
|
|
1092
|
+
constructor(t, e) {
|
|
1093
|
+
super(t, e);
|
|
1006
1094
|
}
|
|
1007
|
-
getEditorProperties(
|
|
1008
|
-
return this.getComponentConfig(
|
|
1095
|
+
getEditorProperties(t) {
|
|
1096
|
+
return this.getComponentConfig(t, { type: "check-group" }, {
|
|
1009
1097
|
placeholder: {
|
|
1010
1098
|
visible: !1
|
|
1011
1099
|
},
|
|
@@ -1027,12 +1115,12 @@ class Oe extends oe {
|
|
|
1027
1115
|
});
|
|
1028
1116
|
}
|
|
1029
1117
|
}
|
|
1030
|
-
class
|
|
1031
|
-
constructor(
|
|
1032
|
-
super(
|
|
1118
|
+
class Oe extends ie {
|
|
1119
|
+
constructor(t, e) {
|
|
1120
|
+
super(t, e);
|
|
1033
1121
|
}
|
|
1034
|
-
getEditorProperties(
|
|
1035
|
-
return this.getComponentConfig(
|
|
1122
|
+
getEditorProperties(t) {
|
|
1123
|
+
return this.getComponentConfig(t, { type: "check-group" }, {
|
|
1036
1124
|
placeholder: {
|
|
1037
1125
|
visible: !1
|
|
1038
1126
|
},
|
|
@@ -1049,141 +1137,141 @@ class Ge extends oe {
|
|
|
1049
1137
|
});
|
|
1050
1138
|
}
|
|
1051
1139
|
}
|
|
1052
|
-
function
|
|
1140
|
+
function qe(n, t) {
|
|
1053
1141
|
const {
|
|
1054
|
-
canAccepts:
|
|
1142
|
+
canAccepts: e,
|
|
1055
1143
|
checkCanDeleteComponent: o,
|
|
1056
1144
|
checkCanMoveComponent: r,
|
|
1057
1145
|
hideNestedPaddingInDesginerView: l,
|
|
1058
|
-
onAcceptMovedChildElement:
|
|
1059
|
-
resolveComponentContext:
|
|
1060
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1061
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1062
|
-
} =
|
|
1063
|
-
function
|
|
1064
|
-
return new
|
|
1146
|
+
onAcceptMovedChildElement: c,
|
|
1147
|
+
resolveComponentContext: m,
|
|
1148
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1149
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
1150
|
+
} = re(n), p = n.schema;
|
|
1151
|
+
function a(f, u) {
|
|
1152
|
+
return new Ie(f, t).getPropertyConfig(p, u);
|
|
1065
1153
|
}
|
|
1066
1154
|
return {
|
|
1067
|
-
canAccepts:
|
|
1155
|
+
canAccepts: e,
|
|
1068
1156
|
checkCanDeleteComponent: o,
|
|
1069
1157
|
checkCanMoveComponent: r,
|
|
1070
1158
|
hideNestedPaddingInDesginerView: l,
|
|
1071
|
-
onAcceptMovedChildElement:
|
|
1072
|
-
resolveComponentContext:
|
|
1073
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1074
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1075
|
-
getPropsConfig:
|
|
1159
|
+
onAcceptMovedChildElement: c,
|
|
1160
|
+
resolveComponentContext: m,
|
|
1161
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1162
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
1163
|
+
getPropsConfig: a
|
|
1076
1164
|
};
|
|
1077
1165
|
}
|
|
1078
|
-
function
|
|
1166
|
+
function ze(n, t) {
|
|
1079
1167
|
const {
|
|
1080
|
-
canAccepts:
|
|
1168
|
+
canAccepts: e,
|
|
1081
1169
|
checkCanDeleteComponent: o,
|
|
1082
1170
|
checkCanMoveComponent: r,
|
|
1083
1171
|
hideNestedPaddingInDesginerView: l,
|
|
1084
|
-
onAcceptMovedChildElement:
|
|
1085
|
-
resolveComponentContext:
|
|
1086
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1087
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1088
|
-
} =
|
|
1089
|
-
function
|
|
1090
|
-
return new
|
|
1172
|
+
onAcceptMovedChildElement: c,
|
|
1173
|
+
resolveComponentContext: m,
|
|
1174
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1175
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
1176
|
+
} = re(n), p = n.schema;
|
|
1177
|
+
function a(f, u) {
|
|
1178
|
+
return new Oe(f, t).getPropertyConfig(p, u);
|
|
1091
1179
|
}
|
|
1092
1180
|
return {
|
|
1093
|
-
canAccepts:
|
|
1181
|
+
canAccepts: e,
|
|
1094
1182
|
checkCanDeleteComponent: o,
|
|
1095
1183
|
checkCanMoveComponent: r,
|
|
1096
1184
|
hideNestedPaddingInDesginerView: l,
|
|
1097
|
-
onAcceptMovedChildElement:
|
|
1098
|
-
resolveComponentContext:
|
|
1099
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1100
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1101
|
-
getPropsConfig:
|
|
1185
|
+
onAcceptMovedChildElement: c,
|
|
1186
|
+
resolveComponentContext: m,
|
|
1187
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1188
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
1189
|
+
getPropsConfig: a
|
|
1102
1190
|
};
|
|
1103
1191
|
}
|
|
1104
|
-
const
|
|
1192
|
+
const We = /* @__PURE__ */ U({
|
|
1105
1193
|
name: "FCheckboxGroupDesign",
|
|
1106
|
-
props:
|
|
1194
|
+
props: W,
|
|
1107
1195
|
emits: ["changeValue", "update:modelValue"],
|
|
1108
|
-
setup(n,
|
|
1109
|
-
const
|
|
1196
|
+
setup(n, t) {
|
|
1197
|
+
const e = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), l = h(n.name), c = j(() => ({
|
|
1110
1198
|
"farris-checkradio-hor": o.value
|
|
1111
1199
|
})), {
|
|
1112
|
-
enumData:
|
|
1113
|
-
onClickCheckbox:
|
|
1114
|
-
getValue:
|
|
1115
|
-
getText:
|
|
1116
|
-
checked:
|
|
1117
|
-
} =
|
|
1118
|
-
return
|
|
1119
|
-
|
|
1120
|
-
}),
|
|
1121
|
-
|
|
1122
|
-
}), () =>
|
|
1123
|
-
ref:
|
|
1124
|
-
class: ["farris-input-wrap",
|
|
1125
|
-
}, [
|
|
1200
|
+
enumData: m,
|
|
1201
|
+
onClickCheckbox: s,
|
|
1202
|
+
getValue: i,
|
|
1203
|
+
getText: p,
|
|
1204
|
+
checked: a
|
|
1205
|
+
} = ne(n, t, e), f = h(), u = A("designer-host-service"), d = A("design-item-context"), v = qe(d, u), k = oe(f, d, v);
|
|
1206
|
+
return O(() => {
|
|
1207
|
+
f.value.componentInstance = k;
|
|
1208
|
+
}), t.expose(k.value), L(() => n.modelValue, (C) => {
|
|
1209
|
+
e.value = C, t.emit("changeValue", e.value);
|
|
1210
|
+
}), () => b("div", {
|
|
1211
|
+
ref: f,
|
|
1212
|
+
class: ["farris-input-wrap", c.value]
|
|
1213
|
+
}, [m.value.map((C, w) => {
|
|
1126
1214
|
const B = "checkbox_" + l.value + w;
|
|
1127
|
-
return
|
|
1215
|
+
return b("div", {
|
|
1128
1216
|
class: "custom-control custom-checkbox"
|
|
1129
|
-
}, [
|
|
1217
|
+
}, [b("input", {
|
|
1130
1218
|
type: "checkbox",
|
|
1131
1219
|
class: "custom-control-input",
|
|
1132
1220
|
name: l.value,
|
|
1133
1221
|
id: B,
|
|
1134
|
-
value:
|
|
1135
|
-
checked:
|
|
1222
|
+
value: i(C),
|
|
1223
|
+
checked: a(C),
|
|
1136
1224
|
disabled: n.disabled,
|
|
1137
1225
|
tabindex: r.value,
|
|
1138
|
-
onClick: (
|
|
1139
|
-
}, null),
|
|
1226
|
+
onClick: (F) => s(C, F)
|
|
1227
|
+
}, null), b("label", {
|
|
1140
1228
|
class: "custom-control-label",
|
|
1141
1229
|
for: B,
|
|
1142
|
-
title:
|
|
1143
|
-
}, [
|
|
1230
|
+
title: p(C)
|
|
1231
|
+
}, [p(C)])]);
|
|
1144
1232
|
})]);
|
|
1145
1233
|
}
|
|
1146
|
-
}),
|
|
1234
|
+
}), Xe = /* @__PURE__ */ U({
|
|
1147
1235
|
name: "FCheckBoxDesign",
|
|
1148
|
-
props:
|
|
1236
|
+
props: z,
|
|
1149
1237
|
emits: [],
|
|
1150
|
-
setup(n,
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1153
|
-
|
|
1154
|
-
}),
|
|
1155
|
-
r.value =
|
|
1156
|
-
}),
|
|
1157
|
-
ref:
|
|
1158
|
-
dragref: `${
|
|
1238
|
+
setup(n, t) {
|
|
1239
|
+
const e = h(), o = h(n.id), r = h(n.indeterminate), l = A("designer-host-service"), c = A("design-item-context"), m = ze(c, l), s = oe(e, c, m);
|
|
1240
|
+
return O(() => {
|
|
1241
|
+
e.value.componentInstance = s;
|
|
1242
|
+
}), L(() => n.indeterminate, (i) => {
|
|
1243
|
+
r.value = i;
|
|
1244
|
+
}), t.expose(s.value), () => b("div", {
|
|
1245
|
+
ref: e,
|
|
1246
|
+
dragref: `${c.schema.id}-container`,
|
|
1159
1247
|
class: "drag-container custom-control custom-checkbox"
|
|
1160
|
-
}, [
|
|
1248
|
+
}, [b("input", {
|
|
1161
1249
|
type: "checkbox",
|
|
1162
1250
|
class: "custom-control-input",
|
|
1163
1251
|
id: o,
|
|
1164
1252
|
value: n.value,
|
|
1165
1253
|
checked: n.modelValue,
|
|
1166
1254
|
disabled: n.disabled
|
|
1167
|
-
}, null),
|
|
1255
|
+
}, null), b("div", {
|
|
1168
1256
|
class: "custom-control-label"
|
|
1169
1257
|
}, null)]);
|
|
1170
1258
|
}
|
|
1171
1259
|
});
|
|
1172
|
-
|
|
1173
|
-
n.component(
|
|
1260
|
+
E.install = (n) => {
|
|
1261
|
+
n.component(E.name, E), n.component(I.name, I);
|
|
1174
1262
|
};
|
|
1175
|
-
|
|
1176
|
-
n["check-box"] =
|
|
1263
|
+
E.register = (n, t, e, o) => {
|
|
1264
|
+
n["check-box"] = I, t["check-box"] = ee, n["check-group"] = E, t["check-group"] = te;
|
|
1177
1265
|
};
|
|
1178
|
-
|
|
1179
|
-
n["check-box"] =
|
|
1266
|
+
E.registerDesigner = (n, t, e) => {
|
|
1267
|
+
n["check-box"] = Xe, t["check-box"] = ee, n["check-group"] = We, t["check-group"] = te;
|
|
1180
1268
|
};
|
|
1181
1269
|
export {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1270
|
+
I as FCheckBox,
|
|
1271
|
+
E as FCheckBoxGroup,
|
|
1272
|
+
te as checkBoxGroupPropsResolver,
|
|
1273
|
+
z as checkBoxProps,
|
|
1274
|
+
ee as checkBoxPropsResolver,
|
|
1275
|
+
W as checkboxGroupProps,
|
|
1276
|
+
E as default
|
|
1189
1277
|
};
|