@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,91 +1,92 @@
|
|
|
1
1
|
var Ge = Object.defineProperty;
|
|
2
2
|
var ze = (e, n, t) => n in e ? Ge(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var V = (e, n, t) => ze(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as Ce, cloneDeep as
|
|
4
|
+
import { ref as T, computed as W, defineComponent as ne, watch as K, createVNode as w, createTextVNode as ge, mergeProps as De, reactive as We, withDirectives as Se, resolveDirective as _e, Fragment as ve, inject as ye, onMounted as be, onBeforeMount as He, vModelText as Xe, nextTick as Pe } from "vue";
|
|
5
|
+
import { isPlainObject as Ce, cloneDeep as me, debounce as Je } from "lodash-es";
|
|
6
6
|
import Qe from "../accordion/index.esm.js";
|
|
7
|
-
import Ye from "
|
|
7
|
+
import Ye from "../../designer/avatar/index.esm.js";
|
|
8
8
|
import Ze from "../../designer/button-edit/index.esm.js";
|
|
9
9
|
import Ke from "../button-group/index.esm.js";
|
|
10
|
-
import et from "../
|
|
11
|
-
import tt from "
|
|
10
|
+
import et from "../button/index.esm.js";
|
|
11
|
+
import tt from "../calendar/index.esm.js";
|
|
12
|
+
import nt from "../../designer/capsule/index.esm.js";
|
|
12
13
|
import Fe from "../../designer/checkbox/index.esm.js";
|
|
13
14
|
import we from "../../designer/checkbox-group/index.esm.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
15
|
+
import rt from "../combo-list/index.esm.js";
|
|
16
|
+
import it from "../combo-tree/index.esm.js";
|
|
17
|
+
import ot from "../component/index.esm.js";
|
|
18
|
+
import at from "../color-picker/index.esm.js";
|
|
19
|
+
import st from "../content-container/index.esm.js";
|
|
20
|
+
import lt from "../../designer/date-picker/index.esm.js";
|
|
21
|
+
import dt from "../../designer/data-grid/index.esm.js";
|
|
22
|
+
import ct from "../dropdown/index.esm.js";
|
|
23
|
+
import ut from "../../designer/dynamic-form/index.esm.js";
|
|
24
|
+
import pt from "../events-editor/index.esm.js";
|
|
25
|
+
import ft from "../filter-bar/index.esm.js";
|
|
25
26
|
import mt from "../field-selector/index.esm.js";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
27
|
+
import gt from "../binding-selector/index.esm.js";
|
|
28
|
+
import vt from "../image-cropper/index.esm.js";
|
|
29
|
+
import ht from "../../designer/input-group/index.esm.js";
|
|
30
|
+
import yt from "../layout/index.esm.js";
|
|
31
|
+
import bt from "../list-nav/index.esm.js";
|
|
32
|
+
import Ct from "../../designer/list-view/index.esm.js";
|
|
33
|
+
import Ft from "../lookup/index.esm.js";
|
|
34
|
+
import wt from "../mapping-editor/index.esm.js";
|
|
35
|
+
import Et from "../../designer/nav/index.esm.js";
|
|
36
|
+
import xt from "../number-range/index.esm.js";
|
|
37
|
+
import St from "../../designer/number-spinner/index.esm.js";
|
|
38
|
+
import Pt from "../order/index.esm.js";
|
|
39
|
+
import kt from "../page-header/index.esm.js";
|
|
39
40
|
import Tt from "../page-footer/index.esm.js";
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
41
|
+
import It from "../pagination/index.esm.js";
|
|
42
|
+
import Vt from "../progress/index.esm.js";
|
|
43
|
+
import Mt from "../query-solution/index.esm.js";
|
|
44
|
+
import Lt from "../../designer/radio-group/index.esm.js";
|
|
45
|
+
import Bt from "../../designer/rate/index.esm.js";
|
|
46
|
+
import Nt from "../../designer/response-toolbar/index.esm.js";
|
|
47
|
+
import Ot from "../response-layout/index.esm.js";
|
|
48
|
+
import $t from "../../designer/response-layout-editor/index.esm.js";
|
|
49
|
+
import Rt from "../search-box/index.esm.js";
|
|
50
|
+
import Ut from "../../designer/section/index.esm.js";
|
|
51
|
+
import At from "../smoke-detector/index.esm.js";
|
|
52
|
+
import qt from "../splitter/index.esm.js";
|
|
53
|
+
import jt from "../step/index.esm.js";
|
|
54
|
+
import Gt from "../../designer/switch/index.esm.js";
|
|
55
|
+
import zt from "../../designer/tabs/index.esm.js";
|
|
56
|
+
import Dt from "../../designer/tags/index.esm.js";
|
|
57
|
+
import Wt from "../text/index.esm.js";
|
|
58
|
+
import _t from "../../designer/time-picker/index.esm.js";
|
|
59
|
+
import Ht from "../transfer/index.esm.js";
|
|
60
|
+
import Xt from "../tree-view/index.esm.js";
|
|
61
|
+
import Jt from "../uploader/index.esm.js";
|
|
62
|
+
import Qt from "../verify-detail/index.esm.js";
|
|
63
|
+
import Yt from "../video/index.esm.js";
|
|
64
|
+
import Zt from "../../designer/textarea/index.esm.js";
|
|
65
|
+
import Kt from "../schema-selector/index.esm.js";
|
|
66
|
+
import en from "../../designer/tree-grid/index.esm.js";
|
|
67
|
+
import tn from "../event-parameter/index.esm.js";
|
|
68
|
+
import nn from "../filter-condition-editor/index.esm.js";
|
|
69
|
+
import rn from "../fieldset/index.esm.js";
|
|
70
|
+
import on from "../sort-condition-editor/index.esm.js";
|
|
71
|
+
import an from "../menu-lookup/index.esm.js";
|
|
72
|
+
import sn from "../../designer/drawer/index.esm.js";
|
|
73
|
+
import ln from "../json-editor/index.esm.js";
|
|
74
|
+
import dn from "../property-editor/index.esm.js";
|
|
75
|
+
import cn from "../expression-editor/index.esm.js";
|
|
76
|
+
import un from "../code-editor/index.esm.js";
|
|
77
|
+
import pn from "../html-template/index.esm.js";
|
|
78
|
+
import fn from "../collection-property-editor/index.esm.js";
|
|
78
79
|
import mn from "../../designer/modal/index.esm.js";
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import { schemaResolverMap as
|
|
85
|
-
import { useThirdComponent as
|
|
80
|
+
import gn from "../external-container/index.esm.js";
|
|
81
|
+
import vn from "../language-textbox/index.esm.js";
|
|
82
|
+
import hn from "../image/index.esm.js";
|
|
83
|
+
import yn from "../comment/index.esm.js";
|
|
84
|
+
import bn from "../../designer/wizard/index.esm.js";
|
|
85
|
+
import { schemaResolverMap as Cn, propertyEffectMap as Fn, propertyConfigSchemaMap as wn, schemaMap as En, createPropsResolver as xn } from "../dynamic-resolver/index.esm.js";
|
|
86
|
+
import { useThirdComponent as Sn, isMobilePhone as Pn, FormSchemaEntityField$Type as Ee, FormSchemaEntityFieldType$Type as kn } from "../common/index.esm.js";
|
|
86
87
|
import Tn from "../tooltip/index.esm.js";
|
|
87
|
-
import { DgControl as v, canvasChanged as ce, refreshCanvas as
|
|
88
|
-
const
|
|
88
|
+
import { DgControl as v, canvasChanged as ce, refreshCanvas as In } from "../designer-canvas/index.esm.js";
|
|
89
|
+
const Vn = {
|
|
89
90
|
width: { type: String, default: "300px" },
|
|
90
91
|
height: { type: Number, default: 10 },
|
|
91
92
|
isWidePanel: { type: Boolean, default: !1 },
|
|
@@ -116,73 +117,73 @@ const In = {
|
|
|
116
117
|
/** 允许折叠面板 */
|
|
117
118
|
allowCollapse: { type: Boolean, default: !0 }
|
|
118
119
|
};
|
|
119
|
-
function
|
|
120
|
-
function n(p,
|
|
120
|
+
function Mn(e = {}) {
|
|
121
|
+
function n(p, f, s, c) {
|
|
121
122
|
if (typeof s == "number")
|
|
122
123
|
return c[p].length === s;
|
|
123
124
|
if (typeof s == "object") {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
125
|
+
const m = Object.keys(s)[0], l = s[m];
|
|
126
|
+
if (m === "not")
|
|
126
127
|
return Number(c[p].length) !== Number(l);
|
|
127
|
-
if (
|
|
128
|
+
if (m === "moreThan")
|
|
128
129
|
return Number(c[p].length) >= Number(l);
|
|
129
|
-
if (
|
|
130
|
+
if (m === "lessThan")
|
|
130
131
|
return Number(c[p].length) <= Number(l);
|
|
131
132
|
}
|
|
132
133
|
return !1;
|
|
133
134
|
}
|
|
134
|
-
function t(p,
|
|
135
|
+
function t(p, f, s, c) {
|
|
135
136
|
return c[p] && c[p].propertyValue && String(c[p].propertyValue.value) === String(s);
|
|
136
137
|
}
|
|
137
138
|
const r = /* @__PURE__ */ new Map([
|
|
138
139
|
["length", n],
|
|
139
140
|
["getProperty", t]
|
|
140
141
|
]);
|
|
141
|
-
Object.keys(e).reduce((p,
|
|
142
|
-
function i(p,
|
|
142
|
+
Object.keys(e).reduce((p, f) => (p.set(f, e[f]), p), r);
|
|
143
|
+
function i(p, f) {
|
|
143
144
|
const s = p;
|
|
144
|
-
return typeof
|
|
145
|
+
return typeof f == "number" ? [{ target: s, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: s, operator: "getProperty", param: p, value: !!f }] : typeof f == "object" ? Object.keys(f).map((c) => {
|
|
145
146
|
if (c === "length")
|
|
146
|
-
return { target: s, operator: "length", param: null, value:
|
|
147
|
-
const
|
|
148
|
-
return { target: s, operator: "getProperty", param:
|
|
147
|
+
return { target: s, operator: "length", param: null, value: f[c] };
|
|
148
|
+
const m = c, l = f[c];
|
|
149
|
+
return { target: s, operator: "getProperty", param: m, value: l };
|
|
149
150
|
}) : [];
|
|
150
151
|
}
|
|
151
152
|
function o(p) {
|
|
152
153
|
return Object.keys(p).reduce((s, c) => {
|
|
153
|
-
const
|
|
154
|
-
return s.push(...
|
|
154
|
+
const m = i(c, p[c]);
|
|
155
|
+
return s.push(...m), s;
|
|
155
156
|
}, []);
|
|
156
157
|
}
|
|
157
|
-
function a(p,
|
|
158
|
+
function a(p, f) {
|
|
158
159
|
if (r.has(p.operator)) {
|
|
159
160
|
const s = r.get(p.operator);
|
|
160
|
-
return s && s(p.target, p.param, p.value,
|
|
161
|
+
return s && s(p.target, p.param, p.value, f) || !1;
|
|
161
162
|
}
|
|
162
163
|
return !1;
|
|
163
164
|
}
|
|
164
|
-
function g(p,
|
|
165
|
-
return o(p).reduce((
|
|
165
|
+
function g(p, f) {
|
|
166
|
+
return o(p).reduce((m, l) => m && a(l, f), !0);
|
|
166
167
|
}
|
|
167
|
-
function d(p,
|
|
168
|
-
const s = Object.keys(p), c = s.includes("allOf"),
|
|
168
|
+
function d(p, f) {
|
|
169
|
+
const s = Object.keys(p), c = s.includes("allOf"), m = s.includes("anyOf"), l = c || m, x = (l ? p[l ? c ? "allOf" : "anyOf" : "allOf"] : [p]).map((U) => g(U, f));
|
|
169
170
|
return c ? !x.includes(!1) : x.includes(!0);
|
|
170
171
|
}
|
|
171
172
|
return { parseValueSchema: d };
|
|
172
173
|
}
|
|
173
|
-
const
|
|
174
|
+
const Ln = {
|
|
174
175
|
convertTo: (e, n, t, r) => {
|
|
175
176
|
e.appearance || (e.appearance = {}), e.appearance[n] = t;
|
|
176
177
|
},
|
|
177
178
|
convertFrom: (e, n, t) => e.appearance ? e.appearance[n] : e[n]
|
|
178
|
-
}, Ln = {
|
|
179
|
-
convertFrom: (e, n, t) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
180
179
|
}, Bn = {
|
|
180
|
+
convertFrom: (e, n, t) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
181
|
+
}, Nn = {
|
|
181
182
|
convertTo: (e, n, t, r) => {
|
|
182
183
|
e.editor && (e.editor[n] = t);
|
|
183
184
|
},
|
|
184
185
|
convertFrom: (e, n, t) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, n) ? e.editor[n] : e[n]
|
|
185
|
-
},
|
|
186
|
+
}, On = {
|
|
186
187
|
button: { type: "button", name: "按钮" },
|
|
187
188
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
188
189
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -228,10 +229,12 @@ const Mn = {
|
|
|
228
229
|
drawer: { type: "drawer", name: "抽屉" },
|
|
229
230
|
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
230
231
|
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
232
|
+
nav: { type: "nav", name: "标签类导航" },
|
|
231
233
|
"list-view": { type: "list-view", name: "列表" },
|
|
232
234
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
233
235
|
"language-textbox": { type: "language-textbox", name: "多语输入框" },
|
|
234
236
|
image: { type: "image", name: "图像" },
|
|
237
|
+
avatar: { type: "avatar", name: "头像" },
|
|
235
238
|
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
236
239
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
237
240
|
comment: { type: "comment", name: "评论区" },
|
|
@@ -239,19 +242,20 @@ const Mn = {
|
|
|
239
242
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" },
|
|
240
243
|
wizard: { type: "wizard", name: "向导", icon: "wizard" },
|
|
241
244
|
"wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" },
|
|
242
|
-
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" }
|
|
243
|
-
|
|
245
|
+
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" },
|
|
246
|
+
step: { type: "step", name: "步骤条", icon: "step" }
|
|
247
|
+
}, $n = {
|
|
244
248
|
convertFrom: (e, n, t) => {
|
|
245
249
|
var i;
|
|
246
250
|
const r = e.editor && e.editor[n] ? e.editor[n] : e[n];
|
|
247
|
-
return ((i =
|
|
251
|
+
return ((i = On[r]) == null ? void 0 : i.name) || r;
|
|
248
252
|
}
|
|
249
|
-
},
|
|
253
|
+
}, Rn = {
|
|
250
254
|
convertTo: (e, n, t, r) => {
|
|
251
255
|
e[n] = e[n];
|
|
252
256
|
},
|
|
253
257
|
convertFrom: (e, n, t) => e.editor ? t.getRealEditorType(e.editor.type) : ""
|
|
254
|
-
},
|
|
258
|
+
}, Un = {
|
|
255
259
|
convertTo: (e, n, t, r) => {
|
|
256
260
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[n] = t : e.formatter = {
|
|
257
261
|
[n]: t
|
|
@@ -284,7 +288,7 @@ const Mn = {
|
|
|
284
288
|
}
|
|
285
289
|
return "none";
|
|
286
290
|
}
|
|
287
|
-
},
|
|
291
|
+
}, An = {
|
|
288
292
|
convertTo: (e, n, t, r) => {
|
|
289
293
|
e.command ? e.command[n] = t : e.command = {
|
|
290
294
|
[n]: t
|
|
@@ -345,7 +349,7 @@ const Mn = {
|
|
|
345
349
|
}
|
|
346
350
|
return "";
|
|
347
351
|
}
|
|
348
|
-
},
|
|
352
|
+
}, qn = {
|
|
349
353
|
convertTo: (e, n, t, r) => {
|
|
350
354
|
e.column ? e.column[n] = t : e.column = {
|
|
351
355
|
[n]: t
|
|
@@ -360,7 +364,7 @@ const Mn = {
|
|
|
360
364
|
}
|
|
361
365
|
return "";
|
|
362
366
|
}
|
|
363
|
-
},
|
|
367
|
+
}, jn = {
|
|
364
368
|
convertTo: (e, n, t, r) => {
|
|
365
369
|
e.summary ? e.summary[n] = t : e.summary = {
|
|
366
370
|
[n]: t
|
|
@@ -373,7 +377,7 @@ const Mn = {
|
|
|
373
377
|
var r;
|
|
374
378
|
return n === "customSummaryStyle" ? e.summary.customSummaryStyle : n === "position" ? ((r = e.summary) == null ? void 0 : r[n]) || "bottom" : e.summary && n === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : "";
|
|
375
379
|
}
|
|
376
|
-
},
|
|
380
|
+
}, Gn = {
|
|
377
381
|
convertTo: (e, n, t, r) => {
|
|
378
382
|
e.group ? e.group[n] = t : e.group = {
|
|
379
383
|
[n]: t
|
|
@@ -391,7 +395,7 @@ const Mn = {
|
|
|
391
395
|
return e.group.showSummary;
|
|
392
396
|
}
|
|
393
397
|
}
|
|
394
|
-
},
|
|
398
|
+
}, zn = {
|
|
395
399
|
convertFrom: (e, n) => e.binding ? e.binding.path : "",
|
|
396
400
|
convertTo: (e, n, t) => {
|
|
397
401
|
if (t && t.length > 0) {
|
|
@@ -399,17 +403,17 @@ const Mn = {
|
|
|
399
403
|
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = r.bindingField, e.binding.field = r.id, e.binding.fullPath = r.path, e.path = r.bindingPath;
|
|
400
404
|
}
|
|
401
405
|
}
|
|
402
|
-
},
|
|
406
|
+
}, Dn = {
|
|
403
407
|
convertTo: (e, n, t, r) => {
|
|
404
408
|
e.pagination || (e.pagination = {}), n === "sizeLimits" ? e.pagination.sizeLimits = t.split(",") : e.pagination[n] = t;
|
|
405
409
|
},
|
|
406
410
|
convertFrom: (e, n, t) => e.pagination ? n === "sizeLimits" ? e.pagination.sizeLimits.join(",") : e.pagination[n] : e[n]
|
|
407
|
-
},
|
|
411
|
+
}, Wn = {
|
|
408
412
|
convertTo: (e, n, t, r) => {
|
|
409
413
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[n] = t;
|
|
410
414
|
},
|
|
411
415
|
convertFrom: (e, n, t) => e.rowNumber ? e.rowNumber[n] : e[n]
|
|
412
|
-
},
|
|
416
|
+
}, _n = {
|
|
413
417
|
convertTo: (e, n, t, r) => {
|
|
414
418
|
e.selection || (e.selection = {}), e.selection[n] = t;
|
|
415
419
|
},
|
|
@@ -417,24 +421,24 @@ const Mn = {
|
|
|
417
421
|
var r, i;
|
|
418
422
|
return n === "showCheckbox" ? (r = e.selection) != null && r.multiSelect ? !0 : (i = e.selection) == null ? void 0 : i.showCheckbox : e.selection ? e.selection[n] : e[n];
|
|
419
423
|
}
|
|
420
|
-
}, _n = {
|
|
421
|
-
convertFrom: (e, n, t) => e[n] && e[n].length ? `共 ${e[n].length} 项` : ""
|
|
422
424
|
}, Hn = {
|
|
425
|
+
convertFrom: (e, n, t) => e[n] && e[n].length ? `共 ${e[n].length} 项` : ""
|
|
426
|
+
}, Xn = {
|
|
423
427
|
convertFrom: (e, n) => e[n] || "",
|
|
424
428
|
convertTo: (e, n, t) => {
|
|
425
429
|
e[n] = t;
|
|
426
430
|
}
|
|
427
|
-
},
|
|
431
|
+
}, Jn = {
|
|
428
432
|
convertTo: (e, n, t, r) => {
|
|
429
433
|
e.size || (e.size = {}), e.size[n] = t;
|
|
430
434
|
},
|
|
431
435
|
convertFrom: (e, n, t) => e.size ? e.size[n] : e[n]
|
|
432
|
-
},
|
|
436
|
+
}, Qn = {
|
|
433
437
|
convertFrom: (e, n, t) => {
|
|
434
438
|
var r, i;
|
|
435
439
|
return (r = e.formatter) != null && r.data && n === "formatterEnumData" && !e.formatterEnumData ? (i = e.formatter) == null ? void 0 : i.data : e.formatterEnumData;
|
|
436
440
|
}
|
|
437
|
-
},
|
|
441
|
+
}, Yn = {
|
|
438
442
|
convertTo: (e, n, t, r) => {
|
|
439
443
|
e.sort || (e.sort = {}), e.sort[n] = t;
|
|
440
444
|
},
|
|
@@ -445,7 +449,7 @@ const Mn = {
|
|
|
445
449
|
if (n === "multiSort")
|
|
446
450
|
return !!((i = e.sort) != null && i.multiSort);
|
|
447
451
|
}
|
|
448
|
-
},
|
|
452
|
+
}, Zn = {
|
|
449
453
|
convertTo: (e, n, t, r) => {
|
|
450
454
|
e.filter || (e.filter = {}), e.filter[n] = t;
|
|
451
455
|
},
|
|
@@ -454,7 +458,7 @@ const Mn = {
|
|
|
454
458
|
if (n === "mode")
|
|
455
459
|
return ((r = e.filter) == null ? void 0 : r.mode) || "client";
|
|
456
460
|
}
|
|
457
|
-
},
|
|
461
|
+
}, Kn = {
|
|
458
462
|
convertTo: (e, n, t, r) => {
|
|
459
463
|
e.rowOption ? e.rowOption[n] = t : e.rowOption = {
|
|
460
464
|
[n]: t
|
|
@@ -471,7 +475,7 @@ const Mn = {
|
|
|
471
475
|
}
|
|
472
476
|
return "";
|
|
473
477
|
}
|
|
474
|
-
},
|
|
478
|
+
}, er = {
|
|
475
479
|
convertTo: (e, n, t, r) => {
|
|
476
480
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[n] = t, n === "columnTemplateType" && t === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
477
481
|
<span class="f-pretend-link f-cursor-pointer"
|
|
@@ -483,31 +487,42 @@ const Mn = {
|
|
|
483
487
|
</span>`), n === "columnTemplateType" && t === "default" && (e.columnTemplate = ""), n === "columnTemplateType" && t === "custom" && (e.columnTemplate = ""));
|
|
484
488
|
},
|
|
485
489
|
convertFrom: (e, n, t) => n === "columnTemplate" ? e.columnTemplate : n === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
490
|
+
}, tr = {
|
|
491
|
+
convertTo: (e, n, t, r) => {
|
|
492
|
+
e.hierarchy || (e.hierarchy = {
|
|
493
|
+
cascadeOption: {}
|
|
494
|
+
}), e.hierarchy.cascadeOption || (e.hierarchy.cascadeOption = {}), e.hierarchy.cascadeOption[n] = t;
|
|
495
|
+
},
|
|
496
|
+
convertFrom: (e, n, t) => {
|
|
497
|
+
var r, i;
|
|
498
|
+
return !!((i = (r = e.hierarchy) == null ? void 0 : r.cascadeOption) != null && i[n]);
|
|
499
|
+
}
|
|
486
500
|
};
|
|
487
|
-
function
|
|
501
|
+
function nr(e, n, t) {
|
|
488
502
|
const r = /* @__PURE__ */ new Map([
|
|
489
|
-
["/converter/appearance.converter",
|
|
490
|
-
["/converter/buttons.converter",
|
|
491
|
-
["/converter/property-editor.converter",
|
|
492
|
-
["/converter/items-count.converter",
|
|
493
|
-
["/converter/type.converter",
|
|
494
|
-
["/converter/change-editor.converter",
|
|
495
|
-
["/converter/change-formatter.converter",
|
|
496
|
-
["/converter/column-command.converter",
|
|
497
|
-
["/converter/column-option.converter",
|
|
498
|
-
["/converter/summary.converter",
|
|
499
|
-
["/converter/group.converter",
|
|
500
|
-
["/converter/form-group-label.converter",
|
|
501
|
-
["/converter/field-selector.converter",
|
|
502
|
-
["/converter/pagination.converter",
|
|
503
|
-
["/converter/row-number.converter",
|
|
504
|
-
["/converter/grid-selection.converter",
|
|
505
|
-
["/converter/size.converter",
|
|
506
|
-
["/converter/change-formatter-enum.converter",
|
|
507
|
-
["/converter/grid-sort.converter",
|
|
508
|
-
["/converter/grid-filter.converter",
|
|
509
|
-
["/converter/row-option.converter",
|
|
510
|
-
["/converter/change-formatter-type.converter",
|
|
503
|
+
["/converter/appearance.converter", Ln],
|
|
504
|
+
["/converter/buttons.converter", Bn],
|
|
505
|
+
["/converter/property-editor.converter", Nn],
|
|
506
|
+
["/converter/items-count.converter", Hn],
|
|
507
|
+
["/converter/type.converter", $n],
|
|
508
|
+
["/converter/change-editor.converter", Rn],
|
|
509
|
+
["/converter/change-formatter.converter", Un],
|
|
510
|
+
["/converter/column-command.converter", An],
|
|
511
|
+
["/converter/column-option.converter", qn],
|
|
512
|
+
["/converter/summary.converter", jn],
|
|
513
|
+
["/converter/group.converter", Gn],
|
|
514
|
+
["/converter/form-group-label.converter", Xn],
|
|
515
|
+
["/converter/field-selector.converter", zn],
|
|
516
|
+
["/converter/pagination.converter", Dn],
|
|
517
|
+
["/converter/row-number.converter", Wn],
|
|
518
|
+
["/converter/grid-selection.converter", _n],
|
|
519
|
+
["/converter/size.converter", Jn],
|
|
520
|
+
["/converter/change-formatter-enum.converter", Qn],
|
|
521
|
+
["/converter/grid-sort.converter", Yn],
|
|
522
|
+
["/converter/grid-filter.converter", Zn],
|
|
523
|
+
["/converter/row-option.converter", Kn],
|
|
524
|
+
["/converter/change-formatter-type.converter", er],
|
|
525
|
+
["/converter/tree-auto-check.converter", tr]
|
|
511
526
|
]), i = /* @__PURE__ */ new Map([
|
|
512
527
|
["string", { type: "input-group", enableClear: !1 }],
|
|
513
528
|
["boolean", {
|
|
@@ -532,7 +547,7 @@ function er(e, n, t) {
|
|
|
532
547
|
["array", { type: "button-edit" }],
|
|
533
548
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
534
549
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
535
|
-
]), o =
|
|
550
|
+
]), o = Mn();
|
|
536
551
|
function a(l, u) {
|
|
537
552
|
return () => o.parseValueSchema(l, u);
|
|
538
553
|
}
|
|
@@ -546,11 +561,11 @@ function er(e, n, t) {
|
|
|
546
561
|
const h = l.$converter || u;
|
|
547
562
|
return typeof h == "string" && h && r.has(h) ? r.get(h) || null : h || null;
|
|
548
563
|
}
|
|
549
|
-
function
|
|
564
|
+
function f(l, u, h, x, I, U = "", A = "") {
|
|
550
565
|
return Object.keys(l).map((B) => {
|
|
551
|
-
const L =
|
|
566
|
+
const L = T(1), j = B, N = l[B], k = Object.keys(N), Y = N.title, _ = N.type, H = i.get(_) || { type: "input-group", enableClear: !1 }, M = N.editor ? Object.assign({}, H, N.editor) : Object.assign({}, H), q = g(k, N, u), O = d(k, N, u);
|
|
552
567
|
M.readonly = M.readonly === void 0 ? O() : M.readonly;
|
|
553
|
-
const G = N.type === "cascade" ?
|
|
568
|
+
const G = N.type === "cascade" ? f(N.properties, u, h, x, I, U, A) : [], X = !0;
|
|
554
569
|
let D = p(N, A);
|
|
555
570
|
const re = W({
|
|
556
571
|
get() {
|
|
@@ -572,81 +587,81 @@ function er(e, n, t) {
|
|
|
572
587
|
function s(l, u, h = {}) {
|
|
573
588
|
const x = {}, I = e[l];
|
|
574
589
|
return I && I.categories ? Object.keys(I.categories).map((A) => {
|
|
575
|
-
const R = I.categories[A], B = R == null ? void 0 : R.title, L =
|
|
590
|
+
const R = I.categories[A], B = R == null ? void 0 : R.title, L = f(R.properties || {}, x, {}, h, u);
|
|
576
591
|
return { categoryId: A, categoryName: B, properties: L };
|
|
577
592
|
}) : [];
|
|
578
593
|
}
|
|
579
594
|
function c(l, u, h, x, I = "") {
|
|
580
595
|
const U = u.$ref.schema, A = u.$ref.converter, R = h[U], B = R.type, L = t(R), j = {}, N = e[B];
|
|
581
596
|
if (N && N.categories) {
|
|
582
|
-
const
|
|
583
|
-
A && Object.keys(
|
|
584
|
-
|
|
597
|
+
const k = N.categories[l], Y = k == null ? void 0 : k.title;
|
|
598
|
+
A && Object.keys(k.properties).forEach((M) => {
|
|
599
|
+
k.properties[M].$converter = A;
|
|
585
600
|
});
|
|
586
|
-
const _ = (
|
|
601
|
+
const _ = (k == null ? void 0 : k.properties) || {}, H = f(_, j, L, R, x, I);
|
|
587
602
|
return { categoryId: l, categoryName: Y, properties: H };
|
|
588
603
|
}
|
|
589
604
|
return { categoryId: l, categoryName: "", properties: [] };
|
|
590
605
|
}
|
|
591
|
-
function
|
|
606
|
+
function m(l, u, h, x, I) {
|
|
592
607
|
const U = l.type, A = t(l), R = {};
|
|
593
608
|
let B = I || e[U];
|
|
594
609
|
if (!(B && Object.keys(B).length > 0) && h && h.getPropConfig && (B = h.getPropConfig(x)), B && B.categories) {
|
|
595
610
|
const j = [];
|
|
596
611
|
return Object.keys(B.categories).map((N) => {
|
|
597
|
-
const
|
|
598
|
-
if (
|
|
599
|
-
j.push(c(N,
|
|
612
|
+
const k = B.categories[N];
|
|
613
|
+
if (k.$ref) {
|
|
614
|
+
j.push(c(N, k, l, u, x));
|
|
600
615
|
return;
|
|
601
616
|
}
|
|
602
|
-
const Y =
|
|
617
|
+
const Y = k == null ? void 0 : k.title, _ = k == null ? void 0 : k.tabId, H = k == null ? void 0 : k.tabName, M = k == null ? void 0 : k.hide, q = k == null ? void 0 : k.hideTitle, O = f(k.properties || {}, R, A, l, u, x, k.$converter), { setPropertyRelates: G } = k, X = k == null ? void 0 : k.parentPropertyID;
|
|
603
618
|
j.push({ categoryId: N, categoryName: Y, tabId: _, tabName: H, hide: M, properties: O, hideTitle: q, setPropertyRelates: G, parentPropertyID: X });
|
|
604
619
|
}), j;
|
|
605
620
|
}
|
|
606
621
|
return [];
|
|
607
622
|
}
|
|
608
623
|
return {
|
|
609
|
-
getPropertyConfigBySchema:
|
|
624
|
+
getPropertyConfigBySchema: m,
|
|
610
625
|
getPropertyConfigByType: s,
|
|
611
626
|
propertyConverterMap: r
|
|
612
627
|
};
|
|
613
628
|
}
|
|
614
|
-
function
|
|
629
|
+
function rr(e, n) {
|
|
615
630
|
let t;
|
|
616
631
|
function r(s) {
|
|
617
|
-
const { properties: c, title:
|
|
618
|
-
if (
|
|
619
|
-
const x =
|
|
632
|
+
const { properties: c, title: m, ignore: l } = s, u = l && Array.isArray(l), h = Object.keys(c).reduce((x, I) => ((!u || !l.find((U) => U === I)) && (x[I] = c[I].type === "object" && c[I].properties ? r(c[I]) : me(c[I].default)), x), {});
|
|
633
|
+
if (m && (!u || !l.find((x) => x === "id"))) {
|
|
634
|
+
const x = m.toLowerCase().replace(/-/g, "_");
|
|
620
635
|
h.id = `${x}_${Math.random().toString().slice(2, 6)}`;
|
|
621
636
|
}
|
|
622
637
|
return h;
|
|
623
638
|
}
|
|
624
639
|
function i(s) {
|
|
625
|
-
const { properties: c, title:
|
|
640
|
+
const { properties: c, title: m, required: l } = s;
|
|
626
641
|
if (l && Array.isArray(l)) {
|
|
627
|
-
const u = l.reduce((h, x) => (h[x] = c[x].type === "object" && c[x].properties ? r(c[x]) :
|
|
628
|
-
if (
|
|
629
|
-
const h =
|
|
642
|
+
const u = l.reduce((h, x) => (h[x] = c[x].type === "object" && c[x].properties ? r(c[x]) : me(c[x].default), h), {});
|
|
643
|
+
if (m && l.find((h) => h === "id")) {
|
|
644
|
+
const h = m.toLowerCase().replace(/-/g, "_");
|
|
630
645
|
u.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
631
646
|
}
|
|
632
647
|
return u;
|
|
633
648
|
}
|
|
634
649
|
return {
|
|
635
|
-
type:
|
|
650
|
+
type: m
|
|
636
651
|
};
|
|
637
652
|
}
|
|
638
|
-
function o(s, c = {},
|
|
653
|
+
function o(s, c = {}, m) {
|
|
639
654
|
const l = e[s];
|
|
640
655
|
if (l) {
|
|
641
656
|
let u = i(l);
|
|
642
657
|
const h = n[s];
|
|
643
|
-
return u = h ? h({ getSchemaByType: o }, u, c,
|
|
658
|
+
return u = h ? h({ getSchemaByType: o }, u, c, m) : u, t != null && t.appendIdentifyForNewControl && t.appendIdentifyForNewControl(u), u;
|
|
644
659
|
}
|
|
645
660
|
return null;
|
|
646
661
|
}
|
|
647
662
|
function a(s, c) {
|
|
648
|
-
const
|
|
649
|
-
return Object.keys(
|
|
663
|
+
const m = r(c);
|
|
664
|
+
return Object.keys(m).reduce((l, u) => (Object.prototype.hasOwnProperty.call(s, u) && (l[u] && Ce(l[u]) && Ce(s[u] || !s[u]) ? Object.assign(l[u], s[u] || {}) : l[u] = s[u]), l), m), m;
|
|
650
665
|
}
|
|
651
666
|
function g(s, c) {
|
|
652
667
|
return Object.keys(s).filter((l) => s[l] != null).reduce((l, u) => {
|
|
@@ -663,18 +678,18 @@ function tr(e, n) {
|
|
|
663
678
|
return l;
|
|
664
679
|
}, {});
|
|
665
680
|
}
|
|
666
|
-
function d(s, c,
|
|
681
|
+
function d(s, c, m = /* @__PURE__ */ new Map()) {
|
|
667
682
|
const l = a(s, c);
|
|
668
|
-
return g(l,
|
|
683
|
+
return g(l, m);
|
|
669
684
|
}
|
|
670
685
|
function p(s) {
|
|
671
|
-
var
|
|
686
|
+
var m;
|
|
672
687
|
const c = s.type;
|
|
673
688
|
if (c) {
|
|
674
689
|
const l = e[c];
|
|
675
690
|
if (!l)
|
|
676
691
|
return s;
|
|
677
|
-
const u = a(s, l), h = ((
|
|
692
|
+
const u = a(s, l), h = ((m = s.editor) == null ? void 0 : m.type) || "";
|
|
678
693
|
if (h) {
|
|
679
694
|
const x = e[h], I = a(s.editor, x);
|
|
680
695
|
u.editor = I;
|
|
@@ -683,12 +698,12 @@ function tr(e, n) {
|
|
|
683
698
|
}
|
|
684
699
|
return s;
|
|
685
700
|
}
|
|
686
|
-
function
|
|
701
|
+
function f(s) {
|
|
687
702
|
t = s;
|
|
688
703
|
}
|
|
689
|
-
return { getSchemaByType: o, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: d, mappingSchemaToProps: g, setDesignerContext:
|
|
704
|
+
return { getSchemaByType: o, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: d, mappingSchemaToProps: g, setDesignerContext: f };
|
|
690
705
|
}
|
|
691
|
-
const
|
|
706
|
+
const ir = {}, or = {}, { resolveSchemaWithDefaultValue: ar } = rr(ir, or), sr = {}, lr = {}, { getPropertyConfigBySchema: fe } = nr(sr, lr, ar), dr = {
|
|
692
707
|
/** 某一分类下的属性配置 */
|
|
693
708
|
// as PropType<ElementPropertyConfig>
|
|
694
709
|
category: { type: Object, default: {} },
|
|
@@ -697,10 +712,10 @@ const nr = {}, rr = {}, { resolveSchemaWithDefaultValue: ir } = tr(nr, rr), or =
|
|
|
697
712
|
propertyData: { type: Object, default: {} },
|
|
698
713
|
valueChanged: { type: Function },
|
|
699
714
|
triggerRefreshPanel: { type: Function }
|
|
700
|
-
},
|
|
715
|
+
}, cr = {
|
|
701
716
|
elementConfig: { type: Object, default: {} },
|
|
702
717
|
category: { type: Object, default: {} }
|
|
703
|
-
},
|
|
718
|
+
}, ur = {
|
|
704
719
|
id: { type: String, default: "" },
|
|
705
720
|
customClass: { type: String, default: "" },
|
|
706
721
|
customStyle: { type: String, default: "" },
|
|
@@ -722,8 +737,9 @@ const nr = {}, rr = {}, { resolveSchemaWithDefaultValue: ir } = tr(nr, rr), or =
|
|
|
722
737
|
errors: { type: Object, default: null },
|
|
723
738
|
fill: { type: Boolean, default: !1 },
|
|
724
739
|
enableTips: { type: Boolean, default: !1 },
|
|
725
|
-
tipsContent: { type: Object, default: "" }
|
|
726
|
-
|
|
740
|
+
tipsContent: { type: Object, default: "" },
|
|
741
|
+
linkLabel: { type: String, default: !1 }
|
|
742
|
+
}, pr = {
|
|
727
743
|
id: { type: String },
|
|
728
744
|
required: { type: Boolean, default: !1 },
|
|
729
745
|
text: { type: String, default: "" },
|
|
@@ -733,25 +749,27 @@ const nr = {}, rr = {}, { resolveSchemaWithDefaultValue: ir } = tr(nr, rr), or =
|
|
|
733
749
|
/**
|
|
734
750
|
* 实际支持 'visible'可见 | 'reserve-space' 占位不显示
|
|
735
751
|
*/
|
|
736
|
-
showType: { type: String, default: "visible" }
|
|
737
|
-
|
|
752
|
+
showType: { type: String, default: "visible" },
|
|
753
|
+
isLink: { type: Boolean, default: !1 }
|
|
754
|
+
}, fr = /* @__PURE__ */ ne({
|
|
738
755
|
name: "FDynamicFormLabel",
|
|
739
|
-
props:
|
|
756
|
+
props: pr,
|
|
740
757
|
emits: ["clickLabel"],
|
|
741
758
|
setup(e, n) {
|
|
742
|
-
|
|
743
|
-
const t =
|
|
759
|
+
T(e.title || e.text);
|
|
760
|
+
const t = T(e.required), r = T(e.text), i = T(e.valid), o = T(e.inValidTip);
|
|
744
761
|
K(() => e.text, () => {
|
|
745
762
|
r.value = e.text;
|
|
746
|
-
}), K(() => e.required, (
|
|
747
|
-
|
|
748
|
-
}), K([() => e.valid, () => e.inValidTip], ([
|
|
749
|
-
i.value =
|
|
763
|
+
}), K(() => e.required, (f, s) => {
|
|
764
|
+
f !== s && (t.value = f);
|
|
765
|
+
}), K([() => e.valid, () => e.inValidTip], ([f, s]) => {
|
|
766
|
+
i.value = f, o.value = s;
|
|
750
767
|
});
|
|
751
768
|
const a = W(() => i.value ? r.value : o.value), g = W(() => i.value ? "" : "color:red"), d = W(() => ({
|
|
752
769
|
"col-form-label": !0,
|
|
753
770
|
// 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
|
|
754
|
-
"f-width-auto": t.value && (e.showType === "none" || !r.value)
|
|
771
|
+
"f-width-auto": t.value && (e.showType === "none" || !r.value),
|
|
772
|
+
"f-pretend-link": e.isLink
|
|
755
773
|
})), p = W(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || t.value || !!r.value && e.showType !== "none");
|
|
756
774
|
return () => p.value && w("label", {
|
|
757
775
|
class: d.value,
|
|
@@ -768,24 +786,24 @@ const nr = {}, rr = {}, { resolveSchemaWithDefaultValue: ir } = tr(nr, rr), or =
|
|
|
768
786
|
class: "farris-label-info text-danger"
|
|
769
787
|
}, [ge("*")]), e.showType === "visible" && r.value])]);
|
|
770
788
|
}
|
|
771
|
-
}), { globalStorageKey:
|
|
772
|
-
async function
|
|
789
|
+
}), { globalStorageKey: mr } = Sn(), y = {}, b = {}, C = {}, F = {};
|
|
790
|
+
async function gr() {
|
|
773
791
|
{
|
|
774
792
|
const e = {
|
|
775
|
-
schemaMap:
|
|
776
|
-
propertyConfigSchemaMap:
|
|
777
|
-
propertyEffectMap:
|
|
778
|
-
schemaResolverMap:
|
|
793
|
+
schemaMap: En,
|
|
794
|
+
propertyConfigSchemaMap: wn,
|
|
795
|
+
propertyEffectMap: Fn,
|
|
796
|
+
schemaResolverMap: Cn
|
|
779
797
|
};
|
|
780
|
-
Ye.register(y, b, C, F), Qe.register(y, b, C, F), Ze.register(y, b, C, F), Ke.register(y, b, C, F), et.register(y, b, C, F, e),
|
|
781
|
-
const n = window[
|
|
798
|
+
Ye.register(y, b, C, F), Qe.register(y, b, C, F), Ze.register(y, b, C, F), Ke.register(y, b, C, F), et.register(y, b, C, F), tt.register(y, b, C, F, e), nt.register(y, b, C, F), Fe.register(y, b, C, F, e), we.register(y, b, C, F, e), Fe.register(y, b, C, F, e), we.register(y, b, C, F, e), rt.register(y, b, C, F, e), it.register(y, b, C, F), ot.register(y, b, C, F), st.register(y, b, C, F, e), at.register(y, b, C, F), lt.register(y, b, C, F, e), dt.register(y, b, C, F, e), ct.register(y, b, C, F), ut.register(y, b, C, F, e), pt.register(y, b, C, F), cn.register(y, b, C, F), ft.register(y, b, C, F), mt.register(y, b, C, F), nn.register(y, b, C, F), vt.register(y, b, C, F), ht.register(y, b, C, F, e), yt.register(y, b, C, F, e), Ct.register(y, b, C, F, e), bt.register(y, b, C, F), Ft.register(y, b, C, F, e), wt.register(y, b, C, F), Et.register(y, b, C, F), xt.register(y, b, C, F), St.register(y, b, C, F, e), Pt.register(y, b, C, F), kt.register(y, b, C, F, e), Tt.register(y, b, C, F), It.register(y, b, C, F), Vt.register(y, b, C, F), Mt.register(y, b, C, F, e), Lt.register(y, b, C, F, e), Bt.register(y, b, C, F), Ot.register(y, b, C, F, e), $t.register(y, b, C, F), Nt.register(y, b, C, F), Kt.register(y, b, C), Rt.register(y, b, C, F), Ut.register(y, b, C, F, e), At.register(y, b, C, F), qt.register(y, b, C, F), jt.register(y, b, C, F), Gt.register(y, b, C, F, e), on.register(y, b, C, F), zt.register(y, b, C, F, e), Dt.register(y, b, C, F), Wt.register(y, b, C, F), _t.register(y, b, C, F, e), Ht.register(y, b, C, F), Xt.register(y, b, C, F), Qt.register(y, b, C, F), Jt.register(y, b, C, F), Yt.register(y, b, C, F), Zt.register(y, b, C, F, e), en.register(y, b, C, F), gt.register(y, b, C, F), tn.register(y, b, C, F), rn.register(y, b, C, F, e), an.register(y, b, C, F), sn.register(y, b, C, F), ln.register(y, b, C, F), dn.register(y, b, C, F), un.register(y, b, C, F), pn.register(y, b, C, F, e), fn.register(y, b, C, F), mn.register(y, b, C, F), gn.register(y, b, C, F), vn.register(y, b, C, F, e), hn.register(y, b, C, F, e), yn.register(y, b, C, F), bn.register(y, b, C, F);
|
|
799
|
+
const n = window[mr];
|
|
782
800
|
if (n)
|
|
783
801
|
for (const t in n)
|
|
784
|
-
n[t].createPropsResolver =
|
|
802
|
+
n[t].createPropsResolver = xn, n[t].register(y, b, C);
|
|
785
803
|
}
|
|
786
804
|
}
|
|
787
|
-
function
|
|
788
|
-
|
|
805
|
+
function vr() {
|
|
806
|
+
gr();
|
|
789
807
|
function e(a) {
|
|
790
808
|
const g = y[a];
|
|
791
809
|
if (!g)
|
|
@@ -895,7 +913,7 @@ function fr() {
|
|
|
895
913
|
}
|
|
896
914
|
return { resolveEditorProps: n, resolveEditorType: e, getChangeFunctionName: t, getClearFunctionName: r, getMousedownFunctionName: i, getMouseupFunctionName: o };
|
|
897
915
|
}
|
|
898
|
-
const
|
|
916
|
+
const hr = {
|
|
899
917
|
/**
|
|
900
918
|
* 显示的错误信息
|
|
901
919
|
*/
|
|
@@ -903,16 +921,16 @@ const gr = {
|
|
|
903
921
|
type: Object,
|
|
904
922
|
default: null
|
|
905
923
|
}
|
|
906
|
-
},
|
|
924
|
+
}, yr = /* @__PURE__ */ ne({
|
|
907
925
|
name: "FValidationMessage",
|
|
908
|
-
props:
|
|
926
|
+
props: hr,
|
|
909
927
|
emits: [],
|
|
910
928
|
setup(e, n) {
|
|
911
|
-
const t =
|
|
929
|
+
const t = T(e.errors);
|
|
912
930
|
K(() => e.errors, (o) => {
|
|
913
931
|
t.value = o;
|
|
914
932
|
});
|
|
915
|
-
const r =
|
|
933
|
+
const r = T(!0), i = W(() => {
|
|
916
934
|
if (t.value) {
|
|
917
935
|
const o = Object.keys(t.value).map((a) => {
|
|
918
936
|
var g;
|
|
@@ -931,27 +949,27 @@ const gr = {
|
|
|
931
949
|
class: "f-feedback-message"
|
|
932
950
|
}, [i.value])]);
|
|
933
951
|
}
|
|
934
|
-
}),
|
|
952
|
+
}), br = /* @__PURE__ */ ne({
|
|
935
953
|
name: "FDynamicFormGroup",
|
|
936
|
-
props:
|
|
954
|
+
props: ur,
|
|
937
955
|
emits: ["change", "update:modelValue", "clickLabel"],
|
|
938
956
|
setup(e, n) {
|
|
939
957
|
var H;
|
|
940
|
-
const t =
|
|
941
|
-
|
|
942
|
-
const s =
|
|
958
|
+
const t = T(e.id), r = T(e.customClass), i = T(e.editor), o = T(e.label), a = T(e.modelValue), g = T(e.readonly), d = T(((H = e.editor) == null ? void 0 : H.required) || e.required), p = T(e.showLabel), f = T(e.visible);
|
|
959
|
+
T(e.type);
|
|
960
|
+
const s = T(), c = T(e.errors), m = Pn(), l = T(e.editor.type || "input-group"), u = W(() => p.value ? e.showLabelType : "none"), {
|
|
943
961
|
resolveEditorProps: h,
|
|
944
962
|
resolveEditorType: x,
|
|
945
963
|
getChangeFunctionName: I,
|
|
946
964
|
getClearFunctionName: U
|
|
947
|
-
} =
|
|
965
|
+
} = vr(), A = W(() => {
|
|
948
966
|
const M = {
|
|
949
967
|
"form-group": !0,
|
|
950
968
|
"farris-form-group": !0,
|
|
951
969
|
"common-group": !0,
|
|
952
970
|
"q-state-readonly": g.value,
|
|
953
971
|
"align-items-start": i.value.type === "textarea" || i.value.type === "rich-text-editor",
|
|
954
|
-
"form-group--in-mobile":
|
|
972
|
+
"form-group--in-mobile": m
|
|
955
973
|
};
|
|
956
974
|
return M["form-group--has-" + l.value] = !0, M;
|
|
957
975
|
}), R = W(() => {
|
|
@@ -980,7 +998,7 @@ const gr = {
|
|
|
980
998
|
B(q, O, G), typeof M == "function" && M(q, O, G);
|
|
981
999
|
};
|
|
982
1000
|
}
|
|
983
|
-
const
|
|
1001
|
+
const k = W(() => {
|
|
984
1002
|
const M = i.value.type || "input-group", q = x(M), O = h(M, i.value), G = I(M), X = U(i.value.type);
|
|
985
1003
|
return X && (O[X] = j(O[X])), G && (O[G] = N(O[G])), (O.id == null || O.id === "") && (O.id = t.value), M === "number-range" && i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" ? (i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" && (O.onBeginValueChange = i.value.onBeginValueChange), i.value.onEndValueChange && typeof i.value.onEndValueChange == "function" && (O.onEndValueChange = i.value.onEndValueChange)) : M === "lookup" && i.value["onUpdate:idValue"] && typeof i.value["onUpdate:idValue"] == "function" ? (O["onUpdate:idValue"] = i.value["onUpdate:idValue"], O.id = t.value) : M === "collection-property-editor" && i.value.onSelectionChange && typeof i.value.onSelectionChange == "function" ? O.onSelectionChange = i.value.onSelectionChange : M === "property-editor" && (O.onBeforeOpenVariables = i.value.onBeforeOpenVariables), () => w(q, De({
|
|
986
1004
|
ref: s
|
|
@@ -990,21 +1008,21 @@ const gr = {
|
|
|
990
1008
|
}), n.slots);
|
|
991
1009
|
});
|
|
992
1010
|
function Y() {
|
|
993
|
-
return w(
|
|
1011
|
+
return w(yr, {
|
|
994
1012
|
id: `${t.value}-validation-message`,
|
|
995
1013
|
errors: c.value
|
|
996
1014
|
}, null);
|
|
997
1015
|
}
|
|
998
1016
|
K([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([M, q, O, G, X, D, re, ie, ee, oe]) => {
|
|
999
1017
|
var Q;
|
|
1000
|
-
t.value = M, r.value = q, i.value = O, o.value = G, a.value = X, g.value = D, d.value = ((Q = i.value) == null ? void 0 : Q.required) || re, p.value = ie,
|
|
1018
|
+
t.value = M, r.value = q, i.value = O, o.value = G, a.value = X, g.value = D, d.value = ((Q = i.value) == null ? void 0 : Q.required) || re, p.value = ie, f.value = ee, c.value = oe;
|
|
1001
1019
|
});
|
|
1002
1020
|
function _(M) {
|
|
1003
1021
|
n.emit("clickLabel", M);
|
|
1004
1022
|
}
|
|
1005
1023
|
return n.expose({
|
|
1006
1024
|
editorRef: s
|
|
1007
|
-
}), () =>
|
|
1025
|
+
}), () => f.value && w("div", {
|
|
1008
1026
|
id: `${t.value}-form-group`,
|
|
1009
1027
|
class: r.value,
|
|
1010
1028
|
style: e.customStyle
|
|
@@ -1013,16 +1031,17 @@ const gr = {
|
|
|
1013
1031
|
style: R.value
|
|
1014
1032
|
}, [w("div", {
|
|
1015
1033
|
class: A.value
|
|
1016
|
-
}, [w(
|
|
1034
|
+
}, [w(fr, {
|
|
1017
1035
|
id: `${t.value}-lable`,
|
|
1018
1036
|
showType: u.value,
|
|
1019
1037
|
required: d.value,
|
|
1020
1038
|
text: o.value,
|
|
1021
1039
|
title: o.value,
|
|
1040
|
+
isLink: !!e.linkLabel,
|
|
1022
1041
|
onClickLabel: _
|
|
1023
1042
|
}, null), w("div", {
|
|
1024
1043
|
class: "farris-input-wrap"
|
|
1025
|
-
}, [
|
|
1044
|
+
}, [k.value(), Y()]), e.enableTips && w(Tn, {
|
|
1026
1045
|
content: e.tipsContent
|
|
1027
1046
|
}, {
|
|
1028
1047
|
default: () => [w("span", {
|
|
@@ -1032,15 +1051,15 @@ const gr = {
|
|
|
1032
1051
|
}, null)])]
|
|
1033
1052
|
})])])]);
|
|
1034
1053
|
}
|
|
1035
|
-
}),
|
|
1054
|
+
}), Cr = /* @__PURE__ */ ne({
|
|
1036
1055
|
name: "FPropertyPanelItem",
|
|
1037
|
-
props:
|
|
1056
|
+
props: cr,
|
|
1038
1057
|
emits: ["propertyChange", "triggerRefreshPanel"],
|
|
1039
1058
|
setup(e, n) {
|
|
1040
1059
|
var s;
|
|
1041
|
-
const t =
|
|
1042
|
-
|
|
1043
|
-
const o =
|
|
1060
|
+
const t = T((s = e.category) == null ? void 0 : s.categoryId), r = T(e.elementConfig.propertyID), i = T(e.elementConfig.propertyName);
|
|
1061
|
+
T(e.elementConfig.editor);
|
|
1062
|
+
const o = T(e.elementConfig.propertyValue), a = W(() => {
|
|
1044
1063
|
const c = e.elementConfig.visible;
|
|
1045
1064
|
return {
|
|
1046
1065
|
"farris-group-wrap": !0,
|
|
@@ -1059,10 +1078,10 @@ const gr = {
|
|
|
1059
1078
|
}, (c) => {
|
|
1060
1079
|
i.value = c;
|
|
1061
1080
|
});
|
|
1062
|
-
function g(c,
|
|
1081
|
+
function g(c, m) {
|
|
1063
1082
|
const {
|
|
1064
1083
|
parameters: l
|
|
1065
|
-
} =
|
|
1084
|
+
} = m;
|
|
1066
1085
|
e.elementConfig.propertyValue = c;
|
|
1067
1086
|
const u = {
|
|
1068
1087
|
propertyID: e.elementConfig.propertyID,
|
|
@@ -1078,15 +1097,15 @@ const gr = {
|
|
|
1078
1097
|
${d}
|
|
1079
1098
|
</div>`,
|
|
1080
1099
|
placement: "left"
|
|
1081
|
-
}),
|
|
1082
|
-
return
|
|
1100
|
+
}), f = T("");
|
|
1101
|
+
return f.value = `${t.value}-${r.value}`, () => w("div", {
|
|
1083
1102
|
class: a.value
|
|
1084
1103
|
}, [e.elementConfig.propertyName && Se(w("label", {
|
|
1085
|
-
class: `col-form-label ${
|
|
1104
|
+
class: `col-form-label ${f.value}`
|
|
1086
1105
|
}, [w("span", {
|
|
1087
1106
|
class: "farris-label-text"
|
|
1088
|
-
}, [i.value])]), [[_e("tooltip"), p]]), w(
|
|
1089
|
-
id:
|
|
1107
|
+
}, [i.value])]), [[_e("tooltip"), p]]), w(br, {
|
|
1108
|
+
id: f.value,
|
|
1090
1109
|
showLabel: !1,
|
|
1091
1110
|
editor: e.elementConfig.editor,
|
|
1092
1111
|
modelValue: o.value,
|
|
@@ -1094,41 +1113,41 @@ const gr = {
|
|
|
1094
1113
|
editorParams: e.elementConfig.editorParams
|
|
1095
1114
|
}, null)]);
|
|
1096
1115
|
}
|
|
1097
|
-
}),
|
|
1116
|
+
}), Fr = /* @__PURE__ */ ne({
|
|
1098
1117
|
name: "FPropertyPanelItemList",
|
|
1099
|
-
props:
|
|
1118
|
+
props: dr,
|
|
1100
1119
|
emits: ["valueChanged", "submitModal", "triggerRefreshPanel"],
|
|
1101
1120
|
setup(e, n) {
|
|
1102
|
-
const t =
|
|
1103
|
-
function r(
|
|
1104
|
-
if (!
|
|
1121
|
+
const t = T(e.category);
|
|
1122
|
+
function r(m) {
|
|
1123
|
+
if (!m.hideCascadeTitle)
|
|
1105
1124
|
return w("div", {
|
|
1106
1125
|
class: "farris-input-wrap"
|
|
1107
1126
|
}, [w("input", {
|
|
1108
1127
|
title: "summary",
|
|
1109
1128
|
type: "input",
|
|
1110
1129
|
class: "form-control form-control-sm",
|
|
1111
|
-
value:
|
|
1130
|
+
value: m.cascadeSummary,
|
|
1112
1131
|
readonly: !0
|
|
1113
1132
|
}, null)]);
|
|
1114
1133
|
}
|
|
1115
|
-
function i(
|
|
1134
|
+
function i(m, l) {
|
|
1116
1135
|
l.isExpand = !l.isExpand;
|
|
1117
1136
|
}
|
|
1118
|
-
function o(
|
|
1137
|
+
function o(m) {
|
|
1119
1138
|
return w("div", {
|
|
1120
1139
|
class: "landscape"
|
|
1121
1140
|
}, [w("button", {
|
|
1122
1141
|
title: "expand-button",
|
|
1123
1142
|
class: ["btn f-btn-collapse-expand f-btn-mx px-1", {
|
|
1124
|
-
"f-state-expand":
|
|
1143
|
+
"f-state-expand": m.isExpand
|
|
1125
1144
|
}],
|
|
1126
|
-
onClick: (l) => i(l,
|
|
1145
|
+
onClick: (l) => i(l, m)
|
|
1127
1146
|
}, [w("span", null, null)])]);
|
|
1128
1147
|
}
|
|
1129
|
-
function a(
|
|
1148
|
+
function a(m) {
|
|
1130
1149
|
return w("div", {
|
|
1131
|
-
class: `f-section-formgroup-legend ${t.value.categoryId}-${
|
|
1150
|
+
class: `f-section-formgroup-legend ${t.value.categoryId}-${m.propertyID}`
|
|
1132
1151
|
}, [w("div", {
|
|
1133
1152
|
class: "f-header px-0 my-0 col-form-label",
|
|
1134
1153
|
style: "font-size: inherit;"
|
|
@@ -1136,74 +1155,74 @@ const gr = {
|
|
|
1136
1155
|
class: "wrap"
|
|
1137
1156
|
}, [w("span", {
|
|
1138
1157
|
class: ["f-icon mr-1", {
|
|
1139
|
-
"f-icon-arrow-60-right": !
|
|
1140
|
-
"f-icon-arrow-60-down":
|
|
1158
|
+
"f-icon-arrow-60-right": !m.isExpand,
|
|
1159
|
+
"f-icon-arrow-60-down": m.isExpand
|
|
1141
1160
|
}]
|
|
1142
1161
|
}, null), w("span", {
|
|
1143
1162
|
class: "farris-label-text"
|
|
1144
|
-
}, [
|
|
1163
|
+
}, [m.propertyName])])])]);
|
|
1145
1164
|
}
|
|
1146
|
-
function g(
|
|
1147
|
-
return `${e.categoryKey}_${
|
|
1165
|
+
function g(m) {
|
|
1166
|
+
return `${e.categoryKey}_${m.propertyID}`;
|
|
1148
1167
|
}
|
|
1149
|
-
function d(
|
|
1150
|
-
|
|
1151
|
-
changeObject:
|
|
1168
|
+
function d(m, l) {
|
|
1169
|
+
m.categoryId = t.value.categoryId, t.value.enableCascade && (m.propertyPath = t.value.parentPropertyID), t.value.setPropertyRelates && t.value.setPropertyRelates(m, e.propertyData, l), n.emit("valueChanged", {
|
|
1170
|
+
changeObject: m
|
|
1152
1171
|
});
|
|
1153
1172
|
}
|
|
1154
1173
|
function p() {
|
|
1155
1174
|
n.emit("triggerRefreshPanel");
|
|
1156
1175
|
}
|
|
1157
|
-
function m
|
|
1176
|
+
function f(m) {
|
|
1158
1177
|
return w("div", {
|
|
1159
1178
|
class: "px-2 mb-2"
|
|
1160
|
-
}, [w(
|
|
1161
|
-
key: g(
|
|
1162
|
-
elementConfig:
|
|
1179
|
+
}, [w(Cr, {
|
|
1180
|
+
key: g(m),
|
|
1181
|
+
elementConfig: m,
|
|
1163
1182
|
category: t.value,
|
|
1164
1183
|
onPropertyChange: d,
|
|
1165
1184
|
onTriggerRefreshPanel: p
|
|
1166
1185
|
}, null)]);
|
|
1167
1186
|
}
|
|
1168
|
-
function s(
|
|
1187
|
+
function s(m) {
|
|
1169
1188
|
var l;
|
|
1170
1189
|
return w("div", {
|
|
1171
1190
|
class: "propertyCascadeItem farris-panel px-2 mb-2"
|
|
1172
1191
|
}, [w("div", {
|
|
1173
1192
|
class: ["farris-panel-item card", {
|
|
1174
|
-
hidden: !
|
|
1193
|
+
hidden: !m.isExpand
|
|
1175
1194
|
}]
|
|
1176
1195
|
}, [w("div", {
|
|
1177
1196
|
class: "card-header",
|
|
1178
|
-
onClick: (u) => i(u,
|
|
1197
|
+
onClick: (u) => i(u, m)
|
|
1179
1198
|
}, [w("div", {
|
|
1180
1199
|
class: "panel-item-title"
|
|
1181
1200
|
}, [w("div", {
|
|
1182
1201
|
class: "form-group farris-form-group line-item"
|
|
1183
|
-
}, [a(
|
|
1202
|
+
}, [a(m), r(m), o(m)])])]), w("div", {
|
|
1184
1203
|
class: ["card-body", {
|
|
1185
|
-
hidden: !
|
|
1204
|
+
hidden: !m.isExpand
|
|
1186
1205
|
}]
|
|
1187
|
-
}, [(l =
|
|
1206
|
+
}, [(l = m.cascadeConfig) == null ? void 0 : l.map((u) => f(u))])])]);
|
|
1188
1207
|
}
|
|
1189
1208
|
K(() => e.category, () => {
|
|
1190
1209
|
t.value = e.category;
|
|
1191
1210
|
});
|
|
1192
|
-
function c(
|
|
1193
|
-
return
|
|
1211
|
+
function c(m) {
|
|
1212
|
+
return m.propertyType === "cascade" ? s : f;
|
|
1194
1213
|
}
|
|
1195
|
-
return () => w(ve, null, [t.value.properties.map((
|
|
1214
|
+
return () => w(ve, null, [t.value.properties.map((m) => c(m)(m))]);
|
|
1196
1215
|
}
|
|
1197
1216
|
}), xe = /* @__PURE__ */ ne({
|
|
1198
1217
|
name: "FPropertyPanel",
|
|
1199
|
-
props:
|
|
1218
|
+
props: Vn,
|
|
1200
1219
|
emits: ["propertyChanged"],
|
|
1201
1220
|
setup(e, n) {
|
|
1202
|
-
const t =
|
|
1221
|
+
const t = T(e.width), r = T(e.isWidePanel), i = T(e.enableSearch), o = T(e.mode), a = T(e.isPersitOpenState), g = T(e.isShowPanel), d = T(), p = T(), f = T(e.showCloseBtn), s = T(e.selectedTabId), c = T(!0), m = T(e.isWhiteTheme);
|
|
1203
1222
|
let l = [], u = [];
|
|
1204
|
-
const h =
|
|
1223
|
+
const h = T(""), x = T(), I = T(), U = ye("SchemaService");
|
|
1205
1224
|
let A = [], R = null, B = "";
|
|
1206
|
-
const L =
|
|
1225
|
+
const L = T(), j = T(0), N = W(() => l.map((P) => !P.hide).length === 1), k = ye("designerContext");
|
|
1207
1226
|
function Y() {
|
|
1208
1227
|
u = [], L.value && L.value.categoryList && Array.isArray(L.value.categoryList) && L.value.categoryList.length > 0 && L.value.categoryList.forEach((S) => {
|
|
1209
1228
|
if (S.properties && Array.isArray(S.properties) && S.properties.length > 0) {
|
|
@@ -1323,12 +1342,12 @@ const gr = {
|
|
|
1323
1342
|
s.value = (S = L.value) == null ? void 0 : S.tabId;
|
|
1324
1343
|
}
|
|
1325
1344
|
K(() => [e.schema, e.isShowPanel], () => {
|
|
1326
|
-
p.value = e.schema, !e.schema || !e.schema.type ? d.value = [] : (d.value =
|
|
1345
|
+
p.value = e.schema, !e.schema || !e.schema.type ? d.value = [] : (d.value = fe(p.value, U, R, B), k.filterPropertyEntity && (d.value = k.filterPropertyEntity(d.value, p.value))), Q(), ee(h.value), j.value++;
|
|
1327
1346
|
}), be(() => {
|
|
1328
1347
|
Q();
|
|
1329
1348
|
});
|
|
1330
1349
|
function ae(P, S, E = !0) {
|
|
1331
|
-
(!p.value || S) && (p.value = S || e.schema), d.value =
|
|
1350
|
+
(!p.value || S) && (p.value = S || e.schema), d.value = fe(p.value, U, R, B, P), k.filterPropertyEntity && (d.value = k.filterPropertyEntity(d.value, p.value)), Q(), i.value && ee(h.value), E && j.value++;
|
|
1332
1351
|
}
|
|
1333
1352
|
function J(P, S) {
|
|
1334
1353
|
R = P, B = S;
|
|
@@ -1338,8 +1357,8 @@ const gr = {
|
|
|
1338
1357
|
G();
|
|
1339
1358
|
}, 100), t.value = "300px") : t.value = "41px";
|
|
1340
1359
|
}
|
|
1341
|
-
function
|
|
1342
|
-
if (
|
|
1360
|
+
function Te() {
|
|
1361
|
+
if (f.value)
|
|
1343
1362
|
return w("div", {
|
|
1344
1363
|
class: "title-actions"
|
|
1345
1364
|
}, [w("div", {
|
|
@@ -1357,7 +1376,7 @@ const gr = {
|
|
|
1357
1376
|
}, null)])])])])]);
|
|
1358
1377
|
}
|
|
1359
1378
|
function he() {
|
|
1360
|
-
d.value =
|
|
1379
|
+
d.value = fe(p.value, U, R, B), k.filterPropertyEntity && (d.value = k.filterPropertyEntity(d.value, p.value)), Q();
|
|
1361
1380
|
}
|
|
1362
1381
|
function Ie() {
|
|
1363
1382
|
var P;
|
|
@@ -1424,7 +1443,7 @@ const gr = {
|
|
|
1424
1443
|
}]
|
|
1425
1444
|
}, null), E.categoryName]), w("div", {
|
|
1426
1445
|
hidden: E.status === "closed"
|
|
1427
|
-
}, [w(
|
|
1446
|
+
}, [w(Fr, {
|
|
1428
1447
|
key: `${E == null ? void 0 : E.categoryId}-${j.value}`,
|
|
1429
1448
|
category: E,
|
|
1430
1449
|
propertyData: p.value,
|
|
@@ -1490,7 +1509,7 @@ const gr = {
|
|
|
1490
1509
|
}), () => w(ve, null, [w("div", {
|
|
1491
1510
|
ref: x,
|
|
1492
1511
|
class: ["property-panel", {
|
|
1493
|
-
"white-theme":
|
|
1512
|
+
"white-theme": m.value
|
|
1494
1513
|
}],
|
|
1495
1514
|
style: Ne()
|
|
1496
1515
|
}, [w("div", {
|
|
@@ -1498,14 +1517,14 @@ const gr = {
|
|
|
1498
1517
|
hidden: o.value !== "panel"
|
|
1499
1518
|
}, [w("div", {
|
|
1500
1519
|
class: ["title d-flex", {
|
|
1501
|
-
"p-right":
|
|
1520
|
+
"p-right": f.value
|
|
1502
1521
|
}, {
|
|
1503
1522
|
only: N.value
|
|
1504
1523
|
}]
|
|
1505
|
-
}, [Re(),
|
|
1524
|
+
}, [Re(), Te()]), Ie(), Le()]), Oe(), Be()])]);
|
|
1506
1525
|
}
|
|
1507
1526
|
});
|
|
1508
|
-
function
|
|
1527
|
+
function wr(e) {
|
|
1509
1528
|
const { formSchemaUtils: n, formStateMachineUtils: t } = e;
|
|
1510
1529
|
function r(d, p = "") {
|
|
1511
1530
|
return {
|
|
@@ -1515,15 +1534,15 @@ function Cr(e) {
|
|
|
1515
1534
|
};
|
|
1516
1535
|
}
|
|
1517
1536
|
function i(d, p = "") {
|
|
1518
|
-
const
|
|
1519
|
-
return
|
|
1537
|
+
const f = n.getViewModelById(d);
|
|
1538
|
+
return f ? f.states.map((s) => r(s, p)) : [];
|
|
1520
1539
|
}
|
|
1521
1540
|
function o(d) {
|
|
1522
|
-
const p = n.getRootViewModelId(),
|
|
1541
|
+
const p = n.getRootViewModelId(), f = i(d);
|
|
1523
1542
|
if (d === p)
|
|
1524
|
-
return
|
|
1543
|
+
return f;
|
|
1525
1544
|
const s = i(p, "root-component.");
|
|
1526
|
-
return [...
|
|
1545
|
+
return [...f, ...s];
|
|
1527
1546
|
}
|
|
1528
1547
|
function a(d) {
|
|
1529
1548
|
return d.binding && d.binding.path || d.id || "";
|
|
@@ -1533,7 +1552,7 @@ function Cr(e) {
|
|
|
1533
1552
|
}
|
|
1534
1553
|
return { getVariables: o, getControlName: a, getStateMachines: g };
|
|
1535
1554
|
}
|
|
1536
|
-
class
|
|
1555
|
+
class ke {
|
|
1537
1556
|
constructor(n) {
|
|
1538
1557
|
V(this, "sessionVariables", [
|
|
1539
1558
|
{
|
|
@@ -1718,12 +1737,12 @@ class Te {
|
|
|
1718
1737
|
}
|
|
1719
1738
|
updateExpression(n, t, r, i) {
|
|
1720
1739
|
const o = t === "Field" ? n.binding.field : n.id, a = this.buildRule(o, r, i, n.type === "form-group" ? n.id : "");
|
|
1721
|
-
let d = this.getExpressionData().find((
|
|
1722
|
-
const p = (
|
|
1740
|
+
let d = this.getExpressionData().find((f) => f.targetType === t && f.target === o);
|
|
1741
|
+
const p = (f) => f.value.trim() === "";
|
|
1723
1742
|
if (d) {
|
|
1724
|
-
const
|
|
1725
|
-
if (
|
|
1726
|
-
p(a) ? d.rules = d.rules.filter((s) => s.id !== a.id) : (Object.assign(
|
|
1743
|
+
const f = d.rules.find((s) => s.id === a.id);
|
|
1744
|
+
if (f)
|
|
1745
|
+
p(a) ? d.rules = d.rules.filter((s) => s.id !== a.id) : (Object.assign(f, a), i === "validate" && n.type === "form-group" && (f.elementId = n.id));
|
|
1727
1746
|
else {
|
|
1728
1747
|
if (p(a))
|
|
1729
1748
|
return null;
|
|
@@ -1758,10 +1777,10 @@ class Te {
|
|
|
1758
1777
|
showMessage: a === "validate" || a === "dataPicking" || a === "required",
|
|
1759
1778
|
showMessageType: a === "dataPicking",
|
|
1760
1779
|
beforeOpen: () => this.onBeforeOpenExpression(n, a, t),
|
|
1761
|
-
onSubmitModal: (
|
|
1762
|
-
const s = this.updateExpression(n, t,
|
|
1780
|
+
onSubmitModal: (f) => {
|
|
1781
|
+
const s = this.updateExpression(n, t, f, a);
|
|
1763
1782
|
if (i) {
|
|
1764
|
-
const c = this.buildRule(g,
|
|
1783
|
+
const c = this.buildRule(g, f, a);
|
|
1765
1784
|
i(c);
|
|
1766
1785
|
}
|
|
1767
1786
|
return s;
|
|
@@ -1800,7 +1819,7 @@ class Te {
|
|
|
1800
1819
|
};
|
|
1801
1820
|
}
|
|
1802
1821
|
}
|
|
1803
|
-
class
|
|
1822
|
+
class Er {
|
|
1804
1823
|
constructor(n, t) {
|
|
1805
1824
|
V(this, "componentId");
|
|
1806
1825
|
V(this, "viewModelId");
|
|
@@ -1917,12 +1936,12 @@ class Fr {
|
|
|
1917
1936
|
* @returns
|
|
1918
1937
|
*/
|
|
1919
1938
|
getPropertyEditorParams(n, t = [], r = "visible", i = {}, o = {}, a = "") {
|
|
1920
|
-
const { getVariables: g, getControlName: d, getStateMachines: p } =
|
|
1939
|
+
const { getVariables: g, getControlName: d, getStateMachines: p } = wr(this.designerHostService), f = this.getRealTargetType(n), s = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], c = {
|
|
1921
1940
|
type: "property-editor",
|
|
1922
1941
|
propertyTypes: s
|
|
1923
1942
|
};
|
|
1924
|
-
return s.map((
|
|
1925
|
-
switch (
|
|
1943
|
+
return s.map((m) => {
|
|
1944
|
+
switch (m) {
|
|
1926
1945
|
case "Const":
|
|
1927
1946
|
Object.assign(c, {
|
|
1928
1947
|
constType: "enum",
|
|
@@ -1930,7 +1949,7 @@ class Fr {
|
|
|
1930
1949
|
}, i);
|
|
1931
1950
|
break;
|
|
1932
1951
|
case "Expression":
|
|
1933
|
-
c.expressionConfig = this.getExpressionOptions(n,
|
|
1952
|
+
c.expressionConfig = this.getExpressionOptions(n, f, a || r);
|
|
1934
1953
|
break;
|
|
1935
1954
|
case "StateMachine":
|
|
1936
1955
|
c.stateMachines = p();
|
|
@@ -2011,8 +2030,8 @@ class Fr {
|
|
|
2011
2030
|
const r = t && t.parent && t.parent.schema;
|
|
2012
2031
|
if (!r)
|
|
2013
2032
|
return;
|
|
2014
|
-
const i = r.contents.findIndex((a) => a.id === n), o =
|
|
2015
|
-
r.contents.splice(i, 1), r.contents.splice(i, 0, o),
|
|
2033
|
+
const i = r.contents.findIndex((a) => a.id === n), o = me(r.contents[i]);
|
|
2034
|
+
r.contents.splice(i, 1), r.contents.splice(i, 0, o), In();
|
|
2016
2035
|
}
|
|
2017
2036
|
/**
|
|
2018
2037
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -2042,16 +2061,16 @@ class Fr {
|
|
|
2042
2061
|
const t = n.propertyValue;
|
|
2043
2062
|
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
2044
2063
|
return;
|
|
2045
|
-
const { expressionId: o, expressionInfo: a } = t, { targetId: g, targetType: d, expressionType: p, value:
|
|
2064
|
+
const { expressionId: o, expressionInfo: a } = t, { targetId: g, targetType: d, expressionType: p, value: f, message: s } = a, c = this.formSchemaUtils.getModule();
|
|
2046
2065
|
c.expressions = c.expressions || [];
|
|
2047
|
-
const { expressions:
|
|
2048
|
-
let l =
|
|
2049
|
-
l || (l = { target: g, rules: [], targetType: d },
|
|
2066
|
+
const { expressions: m } = c;
|
|
2067
|
+
let l = m.find((h) => h.target === g);
|
|
2068
|
+
l || (l = { target: g, rules: [], targetType: d }, m.push(l));
|
|
2050
2069
|
const u = l.rules.find((h) => h.type === p);
|
|
2051
2070
|
if (u)
|
|
2052
|
-
u.value =
|
|
2071
|
+
u.value = f, u.message = s;
|
|
2053
2072
|
else {
|
|
2054
|
-
const h = { id: o, type: p, value:
|
|
2073
|
+
const h = { id: o, type: p, value: f, message: s };
|
|
2055
2074
|
l.rules.push(h);
|
|
2056
2075
|
}
|
|
2057
2076
|
delete t.expressionInfo;
|
|
@@ -2070,7 +2089,7 @@ class Fr {
|
|
|
2070
2089
|
!d || !d.rules || (d.rules = d.rules.filter((p) => p.type !== o));
|
|
2071
2090
|
}
|
|
2072
2091
|
getExpressionOptions(n, t, r) {
|
|
2073
|
-
return new
|
|
2092
|
+
return new ke(this.formSchemaUtils).getExpressionOptions(n, t, r);
|
|
2074
2093
|
}
|
|
2075
2094
|
getRealTargetType(n) {
|
|
2076
2095
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
|
|
@@ -2145,6 +2164,7 @@ V(te, "fieldControlTypeMapping", {
|
|
|
2145
2164
|
{ key: v.textarea.type, value: v.textarea.name },
|
|
2146
2165
|
{ key: v.lookup.type, value: v.lookup.name },
|
|
2147
2166
|
{ key: v.image.type, value: v.image.name },
|
|
2167
|
+
{ key: v.avatar.type, value: v.avatar.name },
|
|
2148
2168
|
{ key: v["rich-text-editor"].type, value: v["rich-text-editor"].name }
|
|
2149
2169
|
],
|
|
2150
2170
|
Decimal: [
|
|
@@ -2182,8 +2202,8 @@ V(te, "fieldControlTypeMapping", {
|
|
|
2182
2202
|
]
|
|
2183
2203
|
});
|
|
2184
2204
|
let pe = te;
|
|
2185
|
-
var
|
|
2186
|
-
class
|
|
2205
|
+
var xr = /* @__PURE__ */ ((e) => (e.string = "string", e.boolean = "boolean", e.number = "number", e.select = "select", e.boolOrExp = "boolOrExp", e.editableSelect = "editableSelect", e.multiSelect = "multiSelect", e.date = "date", e.datetime = "datetime", e.modal = "modal", e.cascade = "cascade", e.custom = "custom", e.unity = "unity", e.events = "events", e.switch = "switch", e.multiLanguage = "multiLanguage", e))(xr || {}), ue = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ue || {});
|
|
2206
|
+
class Sr {
|
|
2187
2207
|
constructor() {
|
|
2188
2208
|
/** 控件标题 */
|
|
2189
2209
|
V(this, "label", "");
|
|
@@ -2213,44 +2233,44 @@ class Er {
|
|
|
2213
2233
|
V(this, "fieldSetId", "");
|
|
2214
2234
|
}
|
|
2215
2235
|
}
|
|
2216
|
-
function
|
|
2236
|
+
function Pr(e) {
|
|
2217
2237
|
let n, t;
|
|
2218
2238
|
const r = /* @__PURE__ */ new Map();
|
|
2219
2239
|
let i = [];
|
|
2220
|
-
function o(
|
|
2221
|
-
const
|
|
2222
|
-
if (
|
|
2240
|
+
function o(f, s) {
|
|
2241
|
+
const m = f.split(" ").filter((I) => I.startsWith("col-"));
|
|
2242
|
+
if (m.length === 0) {
|
|
2223
2243
|
s.isSupportedClass = !1;
|
|
2224
2244
|
return;
|
|
2225
2245
|
}
|
|
2226
|
-
let l =
|
|
2246
|
+
let l = m.find((I) => /^col-([1-9]|10|11|12)$/.test(I)), u = m.find((I) => /^col-md-([1-9]|10|11|12)$/.test(I)), h = m.find((I) => /^col-xl-([1-9]|10|11|12)$/.test(I)), x = m.find((I) => /^col-el-([1-9]|10|11|12)$/.test(I));
|
|
2227
2247
|
l = l || "col-12", s.columnInSM = parseInt(l.replace("col-", ""), 10), s.displayWidthInSM = s.columnInSM / 12, s.displayWidthInSM !== 1 && (s.isSupportedClass = !1), u = u || "col-md-" + s.columnInSM, s.columnInMD = parseInt(u.replace("col-md-", ""), 10), s.displayWidthInMD = s.columnInMD / 6, [1, 2].includes(s.displayWidthInMD) || (s.isSupportedClass = !1), h = h || "col-xl-" + s.columnInMD, s.columnInLG = parseInt(h.replace("col-xl-", ""), 10), s.displayWidthInLG = s.columnInLG / 3, [1, 2, 3, 4].includes(s.displayWidthInLG) || (s.isSupportedClass = !1), x = x || "col-el-" + s.columnInLG, s.columnInEL = parseInt(x.replace("col-el-", ""), 10), s.displayWidthInEL = s.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(s.displayWidthInEL) || (s.isSupportedClass = !1);
|
|
2228
2248
|
}
|
|
2229
|
-
function a(
|
|
2249
|
+
function a(f, s, c, m = !1) {
|
|
2230
2250
|
let l = !1;
|
|
2231
|
-
|
|
2251
|
+
f.contents.forEach((u) => {
|
|
2232
2252
|
if (u.type === "fieldset") {
|
|
2233
2253
|
c += 1, a(u, s, c, !0), l = !0;
|
|
2234
2254
|
return;
|
|
2235
2255
|
}
|
|
2236
2256
|
l && (c += 1, l = !1);
|
|
2237
|
-
const h = u.appearance && u.appearance.class, x = new
|
|
2238
|
-
h ? o(h, x) : x.isSupportedClass = !1, x.label = u.label || u.id, x.id = u.id, x.group = c,
|
|
2257
|
+
const h = u.appearance && u.appearance.class, x = new Sr();
|
|
2258
|
+
h ? o(h, x) : x.isSupportedClass = !1, x.label = u.label || u.id, x.id = u.id, x.group = c, m && (x.fieldSetId = f.id), t === u.id && (n = c), r.set(u.id, u), s.push(x);
|
|
2239
2259
|
});
|
|
2240
2260
|
}
|
|
2241
|
-
function g(
|
|
2242
|
-
const s = e.getComponentById(
|
|
2261
|
+
function g(f) {
|
|
2262
|
+
const s = e.getComponentById(f);
|
|
2243
2263
|
if (!s || !s.componentType || !s.componentType.startsWith("form"))
|
|
2244
2264
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
2245
|
-
const c = e.selectNode(s, (
|
|
2265
|
+
const c = e.selectNode(s, (m) => m.type === v["response-form"].type);
|
|
2246
2266
|
return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
|
|
2247
2267
|
}
|
|
2248
|
-
function d(
|
|
2249
|
-
s = s ||
|
|
2250
|
-
const { result: c, message:
|
|
2268
|
+
function d(f, s) {
|
|
2269
|
+
s = s || f.id;
|
|
2270
|
+
const { result: c, message: m, formNode: l } = g(s);
|
|
2251
2271
|
if (!c)
|
|
2252
|
-
return { result: c, message:
|
|
2253
|
-
t =
|
|
2272
|
+
return { result: c, message: m };
|
|
2273
|
+
t = f.id, i = [], r.clear();
|
|
2254
2274
|
const u = l.contents[0].type === v.fieldset.type ? 0 : 1;
|
|
2255
2275
|
a(l, i, u);
|
|
2256
2276
|
const h = i.find((I) => !I.isSupportedClass);
|
|
@@ -2262,25 +2282,25 @@ function xr(e) {
|
|
|
2262
2282
|
importData: i
|
|
2263
2283
|
};
|
|
2264
2284
|
}
|
|
2265
|
-
function p(
|
|
2285
|
+
function p(f, s) {
|
|
2266
2286
|
s = s;
|
|
2267
|
-
const { result: c, formNode:
|
|
2287
|
+
const { result: c, formNode: m } = g(s);
|
|
2268
2288
|
if (!c)
|
|
2269
2289
|
return "";
|
|
2270
2290
|
const l = [];
|
|
2271
|
-
return
|
|
2291
|
+
return f.forEach((u) => {
|
|
2272
2292
|
var I;
|
|
2273
2293
|
const h = r.get(u.id), x = h.appearance && h.appearance.class;
|
|
2274
2294
|
if (x) {
|
|
2275
|
-
const A = x.split(" ").filter((
|
|
2295
|
+
const A = x.split(" ").filter((k) => !k.startsWith("col-")), R = "col-" + u.columnInSM, B = "col-md-" + u.columnInMD, L = "col-xl-" + u.columnInLG, j = "col-el-" + u.columnInEL, N = [R, B, L, j].concat(A);
|
|
2276
2296
|
h.appearance.class = N.join(" ");
|
|
2277
2297
|
}
|
|
2278
2298
|
if (u.fieldSetId) {
|
|
2279
|
-
const U =
|
|
2299
|
+
const U = m.contents.find((R) => R.id === u.fieldSetId), A = l.find((R) => R.id === u.fieldSetId);
|
|
2280
2300
|
A ? (I = A.contents) == null || I.push(h) : (l.push(U), U.contents = [h]);
|
|
2281
2301
|
} else
|
|
2282
2302
|
l.push(h);
|
|
2283
|
-
}),
|
|
2303
|
+
}), m.contents = l, m.id;
|
|
2284
2304
|
}
|
|
2285
2305
|
return {
|
|
2286
2306
|
checkCanFindFormNode: g,
|
|
@@ -2289,7 +2309,7 @@ function xr(e) {
|
|
|
2289
2309
|
getResonseFormLayoutConfig: a
|
|
2290
2310
|
};
|
|
2291
2311
|
}
|
|
2292
|
-
const
|
|
2312
|
+
const kr = (e) => w(ve, null, [w("h5", null, [ge("代码示例")]), w("pre", {
|
|
2293
2313
|
style: "background-color: #f5f5f5; padding: 10px; border-radius: 5px;"
|
|
2294
2314
|
}, [w("code", null, [`
|
|
2295
2315
|
<h3>Tips:</h3>
|
|
@@ -2297,7 +2317,7 @@ const Sr = (e) => w(ve, null, [w("h5", null, [ge("代码示例")]), w("pre", {
|
|
|
2297
2317
|
自定义提示内容
|
|
2298
2318
|
</span>
|
|
2299
2319
|
`])])]);
|
|
2300
|
-
class
|
|
2320
|
+
class ao extends Er {
|
|
2301
2321
|
constructor(t, r) {
|
|
2302
2322
|
super(t, r);
|
|
2303
2323
|
V(this, "responseLayoutEditorFunction");
|
|
@@ -2314,7 +2334,7 @@ class ro extends Fr {
|
|
|
2314
2334
|
},
|
|
2315
2335
|
{
|
|
2316
2336
|
label: "onClickLabel",
|
|
2317
|
-
name: "
|
|
2337
|
+
name: "标签点击事件"
|
|
2318
2338
|
}
|
|
2319
2339
|
]);
|
|
2320
2340
|
V(this, "numberEditorOptions", {
|
|
@@ -2323,12 +2343,12 @@ class ro extends Fr {
|
|
|
2323
2343
|
keyboard: !1,
|
|
2324
2344
|
showButton: !1
|
|
2325
2345
|
});
|
|
2326
|
-
this.responseLayoutEditorFunction =
|
|
2346
|
+
this.responseLayoutEditorFunction = Pr(this.formSchemaUtils);
|
|
2327
2347
|
}
|
|
2328
2348
|
getCommonPropertyConfig(t, r, i = "Card") {
|
|
2329
2349
|
if (this.propertyConfig.categories.basic = this.getBasicProperties(t, r, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, r), this.propertyConfig.categories.behavior = this.getBehaviorConfig(t, "form-group"), i === "Card") {
|
|
2330
2350
|
const o = this.getTipsConfig(t);
|
|
2331
|
-
this.propertyConfig.categories.behavior.properties = { ...this.propertyConfig.categories.behavior.properties, ...o }, ["time-picker", "date-picker", "lookup", "combo-list", "number-spinner", "input-group"].includes(t.editor.type) && (this.propertyConfig.categories.expansion = this.getExpandProperties(t));
|
|
2351
|
+
this.propertyConfig.categories.behavior.properties = { ...this.propertyConfig.categories.behavior.properties, ...o }, ["time-picker", "date-picker", "lookup", "combo-list", "number-spinner", "input-group", "language-textbox"].includes(t.editor.type) && (this.propertyConfig.categories.expansion = this.getExpandProperties(t));
|
|
2332
2352
|
}
|
|
2333
2353
|
}
|
|
2334
2354
|
getPropertyConfig(t, r) {
|
|
@@ -2400,19 +2420,19 @@ class ro extends Fr {
|
|
|
2400
2420
|
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !t.isRtcControl
|
|
2401
2421
|
}
|
|
2402
2422
|
},
|
|
2403
|
-
setPropertyRelates(
|
|
2404
|
-
if (
|
|
2405
|
-
switch (
|
|
2423
|
+
setPropertyRelates(f, s, c) {
|
|
2424
|
+
if (f)
|
|
2425
|
+
switch (f && f.propertyID) {
|
|
2406
2426
|
case "type": {
|
|
2407
|
-
o.changeControlType(t,
|
|
2427
|
+
o.changeControlType(t, f, r);
|
|
2408
2428
|
break;
|
|
2409
2429
|
}
|
|
2410
2430
|
case "label": {
|
|
2411
|
-
|
|
2431
|
+
f.needRefreshControlTree = !0;
|
|
2412
2432
|
break;
|
|
2413
2433
|
}
|
|
2414
2434
|
case "binding": {
|
|
2415
|
-
o.changeBindingField(t,
|
|
2435
|
+
o.changeBindingField(t, f, c);
|
|
2416
2436
|
break;
|
|
2417
2437
|
}
|
|
2418
2438
|
}
|
|
@@ -2573,7 +2593,7 @@ class ro extends Fr {
|
|
|
2573
2593
|
const o = r.propertyValue, a = i && i.parent && i.parent.schema;
|
|
2574
2594
|
if (!a)
|
|
2575
2595
|
return;
|
|
2576
|
-
const g = a.contents.findIndex((
|
|
2596
|
+
const g = a.contents.findIndex((f) => f.id === t.id);
|
|
2577
2597
|
if (g === -1)
|
|
2578
2598
|
return;
|
|
2579
2599
|
const d = a.contents[g];
|
|
@@ -2588,18 +2608,18 @@ class ro extends Fr {
|
|
|
2588
2608
|
size: d.size,
|
|
2589
2609
|
label: d.label,
|
|
2590
2610
|
binding: d.binding
|
|
2591
|
-
}), Object.prototype.hasOwnProperty.call(d, "visible") && Object.assign(p, { visible: d.visible }), d.editor && ["readonly", "required", "placeholder"].map((
|
|
2592
|
-
Object.prototype.hasOwnProperty.call(d.editor,
|
|
2611
|
+
}), Object.prototype.hasOwnProperty.call(d, "visible") && Object.assign(p, { visible: d.visible }), d.editor && ["readonly", "required", "placeholder"].map((f) => {
|
|
2612
|
+
Object.prototype.hasOwnProperty.call(d.editor, f) && (p.editor[f] = d.editor[f]);
|
|
2593
2613
|
}), i != null && i.updateContextSchema ? i.updateContextSchema(p) : (i.schema = Object.assign(d, p), Object.assign(t, p)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2594
|
-
(
|
|
2614
|
+
(f) => f.classList.remove("dgComponentSelected")
|
|
2595
2615
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
2596
|
-
(
|
|
2616
|
+
(f) => f.classList.remove("dgComponentFocused")
|
|
2597
2617
|
), ce.value++, Pe(() => {
|
|
2598
2618
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
2599
2619
|
});
|
|
2600
2620
|
}
|
|
2601
2621
|
getTipsConfig(t) {
|
|
2602
|
-
return ["time-picker", "date-picker", "lookup", "combo-list", "number-spinner", "input-group", "textarea", "rich-text-editor"].includes(t.editor.type) ? {
|
|
2622
|
+
return ["time-picker", "date-picker", "lookup", "combo-list", "number-spinner", "input-group", "textarea", "rich-text-editor", "language-textbox"].includes(t.editor.type) ? {
|
|
2603
2623
|
enableTips: {
|
|
2604
2624
|
refreshPanelAfterChanged: !0,
|
|
2605
2625
|
description: "",
|
|
@@ -2614,21 +2634,21 @@ class ro extends Fr {
|
|
|
2614
2634
|
editor: {
|
|
2615
2635
|
type: "code-editor",
|
|
2616
2636
|
language: "html",
|
|
2617
|
-
leftTemplate:
|
|
2637
|
+
leftTemplate: kr
|
|
2618
2638
|
},
|
|
2619
2639
|
visible: !!t.enableTips
|
|
2620
2640
|
}
|
|
2621
2641
|
} : {};
|
|
2622
2642
|
}
|
|
2623
2643
|
getComponentConfig(t, r = {}, i = {}, o) {
|
|
2624
|
-
var c,
|
|
2644
|
+
var c, m;
|
|
2625
2645
|
const a = Object.assign({
|
|
2626
2646
|
description: "编辑器",
|
|
2627
2647
|
title: "编辑器",
|
|
2628
2648
|
type: "input-group",
|
|
2629
2649
|
$converter: "/converter/property-editor.converter",
|
|
2630
2650
|
parentPropertyID: "editor"
|
|
2631
|
-
}, r), g = (c = t.binding) != null && c.field ? [] : ["Const", "Variable", "StateMachine"], d = this.getPropertyEditorParams(t, g, "readonly"), p = this.getPropertyEditorParams(t, g, "required"),
|
|
2651
|
+
}, r), g = (c = t.binding) != null && c.field ? [] : ["Const", "Variable", "StateMachine"], d = this.getPropertyEditorParams(t, g, "readonly"), p = this.getPropertyEditorParams(t, g, "required"), f = {
|
|
2632
2652
|
readonly: {
|
|
2633
2653
|
description: "",
|
|
2634
2654
|
title: "只读",
|
|
@@ -2639,7 +2659,7 @@ class ro extends Fr {
|
|
|
2639
2659
|
title: "必填",
|
|
2640
2660
|
type: "boolean",
|
|
2641
2661
|
editor: p,
|
|
2642
|
-
visible: !!((
|
|
2662
|
+
visible: !!((m = t.binding) != null && m.field)
|
|
2643
2663
|
},
|
|
2644
2664
|
placeholder: {
|
|
2645
2665
|
description: "当控件没有值时在输入框中显示的文本",
|
|
@@ -2648,11 +2668,11 @@ class ro extends Fr {
|
|
|
2648
2668
|
}
|
|
2649
2669
|
};
|
|
2650
2670
|
for (const l in i)
|
|
2651
|
-
|
|
2671
|
+
f[l] = Object.assign(f[l] || {}, i[l]);
|
|
2652
2672
|
const s = this;
|
|
2653
2673
|
return {
|
|
2654
2674
|
...a,
|
|
2655
|
-
properties: { ...
|
|
2675
|
+
properties: { ...f },
|
|
2656
2676
|
setPropertyRelates(l, u) {
|
|
2657
2677
|
if (l) {
|
|
2658
2678
|
switch (l.propertyID) {
|
|
@@ -2676,14 +2696,14 @@ class ro extends Fr {
|
|
|
2676
2696
|
const o = t.split(" ");
|
|
2677
2697
|
let a = o.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), g = o.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), d = o.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), p = o.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
2678
2698
|
a = a || "col-12", g = g || "col-md-" + a.replace("col-", ""), d = d || "col-xl-" + g.replace("col-md-", ""), p = p || "col-el-" + d.replace("col-xl-", "");
|
|
2679
|
-
const
|
|
2699
|
+
const f = {
|
|
2680
2700
|
id: r,
|
|
2681
2701
|
columnInSM: parseInt(a.replace("col-", ""), 10),
|
|
2682
2702
|
columnInMD: parseInt(g.replace("col-md-", ""), 10),
|
|
2683
2703
|
columnInLG: parseInt(d.replace("col-xl-", ""), 10),
|
|
2684
2704
|
columnInEL: parseInt(p.replace("col-el-", ""), 10)
|
|
2685
2705
|
};
|
|
2686
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(i,
|
|
2706
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, f);
|
|
2687
2707
|
}
|
|
2688
2708
|
/**
|
|
2689
2709
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -2699,12 +2719,12 @@ class ro extends Fr {
|
|
|
2699
2719
|
const l = o.find((u) => u.id === r.id);
|
|
2700
2720
|
Object.assign(l || {}, r);
|
|
2701
2721
|
}
|
|
2702
|
-
const a = o.map((l) => l.columnInSM), g = o.map((l) => l.columnInMD), d = o.map((l) => l.columnInLG), p = o.map((l) => l.columnInEL),
|
|
2722
|
+
const a = o.map((l) => l.columnInSM), g = o.map((l) => l.columnInMD), d = o.map((l) => l.columnInLG), p = o.map((l) => l.columnInEL), f = this.checkIsUniqueColumn(a) ? a[0] : null, s = this.checkIsUniqueColumn(g) ? g[0] : null, c = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(p) ? p[0] : null;
|
|
2703
2723
|
Object.assign(i.unifiedLayout, {
|
|
2704
|
-
uniqueColClassInSM:
|
|
2724
|
+
uniqueColClassInSM: f,
|
|
2705
2725
|
uniqueColClassInMD: s,
|
|
2706
2726
|
uniqueColClassInLG: c,
|
|
2707
|
-
uniqueColClassInEL:
|
|
2727
|
+
uniqueColClassInEL: m
|
|
2708
2728
|
});
|
|
2709
2729
|
}
|
|
2710
2730
|
/**
|
|
@@ -2745,7 +2765,7 @@ class ro extends Fr {
|
|
|
2745
2765
|
* @param propertyData 下拉框控件属性值
|
|
2746
2766
|
*/
|
|
2747
2767
|
checkEnumDataReadonly(t) {
|
|
2748
|
-
return !t.binding || t.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type ===
|
|
2768
|
+
return !t.binding || t.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === kn.EnumType);
|
|
2749
2769
|
}
|
|
2750
2770
|
/**
|
|
2751
2771
|
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
@@ -2765,6 +2785,13 @@ class ro extends Fr {
|
|
|
2765
2785
|
}
|
|
2766
2786
|
return t.type;
|
|
2767
2787
|
}
|
|
2788
|
+
updateLinkedLabel(t, r) {
|
|
2789
|
+
if (t.boundEventsList && t.boundEventsList.length > 0) {
|
|
2790
|
+
const i = t.boundEventsList.find((o) => o.boundEvents && o.boundEvents.label === "onClickLabel");
|
|
2791
|
+
r.linkLabel = !!i;
|
|
2792
|
+
} else
|
|
2793
|
+
r.linkLabel = !1;
|
|
2794
|
+
}
|
|
2768
2795
|
/**
|
|
2769
2796
|
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
2770
2797
|
* @param propertyData 属性值
|
|
@@ -2795,16 +2822,16 @@ class ro extends Fr {
|
|
|
2795
2822
|
properties: a.createBaseEventProperty(p),
|
|
2796
2823
|
tabId: "commands",
|
|
2797
2824
|
tabName: "交互",
|
|
2798
|
-
setPropertyRelates(c,
|
|
2825
|
+
setPropertyRelates(c, m) {
|
|
2799
2826
|
const l = c.propertyValue;
|
|
2800
|
-
delete t[a.viewModelId], l && (l.setPropertyRelates = this.setPropertyRelates, l.controlInfo = { type: a.getControlMethodType(t), name: t.title }, a.eventsEditorUtils.saveRelatedParameters(t, a.viewModelId, l.events, l)), o && o(c,
|
|
2827
|
+
delete t[a.viewModelId], l && (l.setPropertyRelates = this.setPropertyRelates, l.controlInfo = { type: a.getControlMethodType(t), name: t.title }, a.eventsEditorUtils.saveRelatedParameters(t, a.viewModelId, l.events, l), a.updateLinkedLabel(l, m)), o && o(c, m, l);
|
|
2801
2828
|
const u = a.designViewModelUtils.getDgViewModel(a.viewModelId);
|
|
2802
2829
|
u && a.designViewModelField && u.changeField(a.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged });
|
|
2803
2830
|
}
|
|
2804
2831
|
};
|
|
2805
2832
|
}
|
|
2806
2833
|
getExpressionConfig(t, r, i = ["compute", "dependency", "validate"], o) {
|
|
2807
|
-
return new
|
|
2834
|
+
return new ke(this.formSchemaUtils).getExpressionConfig(
|
|
2808
2835
|
t,
|
|
2809
2836
|
r,
|
|
2810
2837
|
i,
|
|
@@ -2836,20 +2863,20 @@ class ro extends Fr {
|
|
|
2836
2863
|
};
|
|
2837
2864
|
}
|
|
2838
2865
|
}
|
|
2839
|
-
const
|
|
2866
|
+
const so = {
|
|
2840
2867
|
install(e) {
|
|
2841
2868
|
e.component(xe.name, xe);
|
|
2842
2869
|
}
|
|
2843
2870
|
};
|
|
2844
2871
|
export {
|
|
2845
|
-
|
|
2846
|
-
|
|
2872
|
+
Er as BaseControlProperty,
|
|
2873
|
+
ke as ExpressionProperty,
|
|
2847
2874
|
xe as FPropertyPanel,
|
|
2848
2875
|
ue as FormBindingType,
|
|
2849
|
-
|
|
2850
|
-
|
|
2876
|
+
ao as InputBaseProperty,
|
|
2877
|
+
xr as PropertyType,
|
|
2851
2878
|
pe as SchemaDOMMapping,
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2879
|
+
so as default,
|
|
2880
|
+
cr as propertyPanelItemProps,
|
|
2881
|
+
Vn as propertyPanelProps
|
|
2855
2882
|
};
|