@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,163 +1,169 @@
|
|
|
1
1
|
var kt = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var N = (
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { DgControl as
|
|
7
|
-
import "
|
|
8
|
-
import At, { useNumber as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
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
|
|
39
|
-
import
|
|
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 An from "../
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
2
|
+
var Et = (t, e, n) => e in t ? kt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var N = (t, e, n) => Et(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { defineComponent as H, ref as p, computed as L, createVNode as f, nextTick as ue, inject as ee, onMounted as J, withDirectives as Ae, resolveDirective as $e, watch as W, createTextVNode as X, reactive as Z, Fragment as ae, mergeProps as te, onUnmounted as Ue, Teleport as It, Transition as St, shallowRef as Lt, createApp as Dt, render as ge, h as Pt, cloneVNode as Vt } from "vue";
|
|
5
|
+
import { isPlainObject as De, cloneDeep as Te } from "lodash-es";
|
|
6
|
+
import { DgControl as Me, useDesignerComponent as Rt } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { useTextBox as Nt, useClear as je, useTextBoxDesign as Ot } from "../common/index.esm.js";
|
|
8
|
+
import At, { useNumber as $t, useFormat as Ut, useSpinner as jt, useTextBox as zt } from "../number-spinner/index.esm.js";
|
|
9
|
+
import qt from "../accordion/index.esm.js";
|
|
10
|
+
import Gt from "../avatar/index.esm.js";
|
|
11
|
+
import Wt from "../button-edit/index.esm.js";
|
|
12
|
+
import Ht from "../button-group/index.esm.js";
|
|
13
|
+
import Xt from "../calendar/index.esm.js";
|
|
14
|
+
import Yt from "../capsule/index.esm.js";
|
|
15
|
+
import Jt from "../checkbox/index.esm.js";
|
|
16
|
+
import oe from "../combo-list/index.esm.js";
|
|
17
|
+
import Qt from "../combo-tree/index.esm.js";
|
|
18
|
+
import Zt from "../component/index.esm.js";
|
|
19
|
+
import _t from "../color-picker/index.esm.js";
|
|
20
|
+
import Kt from "../content-container/index.esm.js";
|
|
21
|
+
import en from "../date-picker/index.esm.js";
|
|
22
|
+
import tn from "../data-grid/index.esm.js";
|
|
23
|
+
import nn from "../dropdown/index.esm.js";
|
|
24
|
+
import on from "../dynamic-form/index.esm.js";
|
|
25
|
+
import an from "../events-editor/index.esm.js";
|
|
26
|
+
import ln from "../filter-bar/index.esm.js";
|
|
27
|
+
import sn from "../field-selector/index.esm.js";
|
|
28
|
+
import rn from "../binding-selector/index.esm.js";
|
|
29
|
+
import un from "../image-cropper/index.esm.js";
|
|
30
|
+
import cn from "../input-group/index.esm.js";
|
|
31
|
+
import dn from "../layout/index.esm.js";
|
|
32
|
+
import pn from "../list-nav/index.esm.js";
|
|
33
|
+
import mn from "../list-view/index.esm.js";
|
|
34
|
+
import fn from "../lookup/index.esm.js";
|
|
35
|
+
import vn from "../mapping-editor/index.esm.js";
|
|
36
|
+
import hn from "../nav/index.esm.js";
|
|
37
|
+
import yn from "../number-range/index.esm.js";
|
|
38
|
+
import gn from "../order/index.esm.js";
|
|
39
|
+
import Cn from "../page-header/index.esm.js";
|
|
40
|
+
import bn from "../page-footer/index.esm.js";
|
|
41
|
+
import wn from "../pagination/index.esm.js";
|
|
42
|
+
import Mn from "../progress/index.esm.js";
|
|
43
|
+
import xn from "../query-solution/index.esm.js";
|
|
44
|
+
import Fn from "../radio-group/index.esm.js";
|
|
45
|
+
import Tn from "../rate/index.esm.js";
|
|
46
|
+
import Bn from "../response-toolbar/index.esm.js";
|
|
47
|
+
import kn from "../response-layout/index.esm.js";
|
|
48
|
+
import En from "../response-layout-editor/index.esm.js";
|
|
49
|
+
import In from "../search-box/index.esm.js";
|
|
50
|
+
import Sn from "../section/index.esm.js";
|
|
51
|
+
import Ln from "../smoke-detector/index.esm.js";
|
|
52
|
+
import Dn from "../splitter/index.esm.js";
|
|
53
|
+
import Pn from "../step/index.esm.js";
|
|
54
|
+
import Vn from "../switch/index.esm.js";
|
|
55
|
+
import Rn from "../tabs/index.esm.js";
|
|
56
|
+
import Nn from "../tags/index.esm.js";
|
|
57
|
+
import On from "../text/index.esm.js";
|
|
58
|
+
import An from "../time-picker/index.esm.js";
|
|
59
|
+
import $n from "../transfer/index.esm.js";
|
|
60
|
+
import Un from "../tree-view/index.esm.js";
|
|
61
|
+
import jn from "../uploader/index.esm.js";
|
|
62
|
+
import zn from "../verify-detail/index.esm.js";
|
|
63
|
+
import qn from "../weather/index.esm.js";
|
|
64
|
+
import Gn from "../video/index.esm.js";
|
|
65
|
+
import Wn from "../textarea/index.esm.js";
|
|
66
|
+
import Hn from "../schema-selector/index.esm.js";
|
|
67
|
+
import Xn from "../tree-grid/index.esm.js";
|
|
68
|
+
import Yn from "../event-parameter/index.esm.js";
|
|
67
69
|
import "../external-container/index.esm.js";
|
|
68
|
-
import { createPropsResolver as
|
|
69
|
-
const
|
|
70
|
-
function Be(
|
|
71
|
-
const { properties:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
import { createPropsResolver as Jn } from "../dynamic-resolver/index.esm.js";
|
|
71
|
+
const ze = {}, qe = {};
|
|
72
|
+
function Be(t) {
|
|
73
|
+
const { properties: e, title: n, ignore: o } = t, a = o && Array.isArray(o), s = Object.keys(e).reduce((l, c) => ((!a || !o.find((u) => u === c)) && (l[c] = e[c].type === "object" && e[c].properties ? Be(e[c]) : Te(e[c].default)), l), {});
|
|
74
|
+
if (n && (!a || !o.find((l) => l === "id"))) {
|
|
75
|
+
const l = n.toLowerCase().replace(/-/g, "_");
|
|
76
|
+
s.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
77
|
+
}
|
|
78
|
+
return s;
|
|
79
|
+
}
|
|
80
|
+
function ke(t, e = {}, n) {
|
|
81
|
+
const o = ze[t];
|
|
76
82
|
if (o) {
|
|
77
83
|
let a = Be(o);
|
|
78
|
-
const s =
|
|
79
|
-
return a = s ? s({ getSchemaByType: ke }, a,
|
|
84
|
+
const s = qe[t];
|
|
85
|
+
return a = s ? s({ getSchemaByType: ke }, a, e, n) : a, a;
|
|
80
86
|
}
|
|
81
87
|
return null;
|
|
82
88
|
}
|
|
83
|
-
function
|
|
84
|
-
const n = Be(
|
|
85
|
-
return Object.keys(
|
|
89
|
+
function Qn(t, e) {
|
|
90
|
+
const n = Be(e);
|
|
91
|
+
return Object.keys(n).reduce((o, a) => (o[a] && De(o[a]) && De(t[a] || !t[a]) ? Object.assign(o[a], t[a] || {}) : o[a] = t[a], o), n), n;
|
|
86
92
|
}
|
|
87
|
-
function
|
|
88
|
-
return Object.keys(
|
|
89
|
-
if (
|
|
90
|
-
const s =
|
|
93
|
+
function Zn(t, e) {
|
|
94
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, a) => {
|
|
95
|
+
if (e.has(a)) {
|
|
96
|
+
const s = e.get(a);
|
|
91
97
|
if (typeof s == "string")
|
|
92
|
-
o[s] =
|
|
98
|
+
o[s] = t[a];
|
|
93
99
|
else {
|
|
94
|
-
const l = s(a,
|
|
100
|
+
const l = s(a, t[a], t);
|
|
95
101
|
Object.assign(o, l);
|
|
96
102
|
}
|
|
97
103
|
} else
|
|
98
|
-
o[a] =
|
|
104
|
+
o[a] = t[a];
|
|
99
105
|
return o;
|
|
100
106
|
}, {});
|
|
101
107
|
}
|
|
102
|
-
function
|
|
103
|
-
const o =
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
function
|
|
107
|
-
function
|
|
108
|
-
if (typeof
|
|
109
|
-
return m[
|
|
110
|
-
if (typeof
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return Number(m[
|
|
114
|
-
if (
|
|
115
|
-
return Number(m[
|
|
116
|
-
if (
|
|
117
|
-
return Number(m[
|
|
108
|
+
function _n(t, e, n = /* @__PURE__ */ new Map()) {
|
|
109
|
+
const o = Qn(t, e);
|
|
110
|
+
return Zn(o, n);
|
|
111
|
+
}
|
|
112
|
+
function Kn(t = {}) {
|
|
113
|
+
function e(i, d, r, m) {
|
|
114
|
+
if (typeof r == "number")
|
|
115
|
+
return m[i].length === r;
|
|
116
|
+
if (typeof r == "object") {
|
|
117
|
+
const v = Object.keys(r)[0], h = r[v];
|
|
118
|
+
if (v === "not")
|
|
119
|
+
return Number(m[i].length) !== Number(h);
|
|
120
|
+
if (v === "moreThan")
|
|
121
|
+
return Number(m[i].length) >= Number(h);
|
|
122
|
+
if (v === "lessThan")
|
|
123
|
+
return Number(m[i].length) <= Number(h);
|
|
118
124
|
}
|
|
119
125
|
return !1;
|
|
120
126
|
}
|
|
121
|
-
function n(
|
|
122
|
-
return m[
|
|
127
|
+
function n(i, d, r, m) {
|
|
128
|
+
return m[i] && m[i].propertyValue && String(m[i].propertyValue.value) === String(r);
|
|
123
129
|
}
|
|
124
130
|
const o = /* @__PURE__ */ new Map([
|
|
125
|
-
["length",
|
|
131
|
+
["length", e],
|
|
126
132
|
["getProperty", n]
|
|
127
133
|
]);
|
|
128
|
-
Object.keys(
|
|
129
|
-
function a(
|
|
130
|
-
const
|
|
131
|
-
return typeof
|
|
134
|
+
Object.keys(t).reduce((i, d) => (i.set(d, t[d]), i), o);
|
|
135
|
+
function a(i, d) {
|
|
136
|
+
const r = i;
|
|
137
|
+
return typeof d == "number" ? [{ target: r, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: r, operator: "getProperty", param: i, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
|
|
132
138
|
if (m === "length")
|
|
133
|
-
return { target:
|
|
134
|
-
const
|
|
135
|
-
return { target:
|
|
139
|
+
return { target: r, operator: "length", param: null, value: d[m] };
|
|
140
|
+
const v = m, h = d[m];
|
|
141
|
+
return { target: r, operator: "getProperty", param: v, value: h };
|
|
136
142
|
}) : [];
|
|
137
143
|
}
|
|
138
|
-
function s(
|
|
139
|
-
return Object.keys(
|
|
140
|
-
const
|
|
141
|
-
return
|
|
144
|
+
function s(i) {
|
|
145
|
+
return Object.keys(i).reduce((r, m) => {
|
|
146
|
+
const v = a(m, i[m]);
|
|
147
|
+
return r.push(...v), r;
|
|
142
148
|
}, []);
|
|
143
149
|
}
|
|
144
|
-
function l(
|
|
145
|
-
if (o.has(
|
|
146
|
-
const
|
|
147
|
-
return
|
|
150
|
+
function l(i, d) {
|
|
151
|
+
if (o.has(i.operator)) {
|
|
152
|
+
const r = o.get(i.operator);
|
|
153
|
+
return r && r(i.target, i.param, i.value, d) || !1;
|
|
148
154
|
}
|
|
149
155
|
return !1;
|
|
150
156
|
}
|
|
151
|
-
function c(
|
|
152
|
-
return s(
|
|
157
|
+
function c(i, d) {
|
|
158
|
+
return s(i).reduce((v, h) => v && l(h, d), !0);
|
|
153
159
|
}
|
|
154
|
-
function u(
|
|
155
|
-
const
|
|
156
|
-
return m ? !
|
|
160
|
+
function u(i, d) {
|
|
161
|
+
const r = Object.keys(i), m = r.includes("allOf"), v = r.includes("anyOf"), h = m || v, M = (h ? i[h ? m ? "allOf" : "anyOf" : "allOf"] : [i]).map((F) => c(F, d));
|
|
162
|
+
return m ? !M.includes(!1) : M.includes(!0);
|
|
157
163
|
}
|
|
158
164
|
return { parseValueSchema: u };
|
|
159
165
|
}
|
|
160
|
-
const
|
|
166
|
+
const V = {
|
|
161
167
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
162
168
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
163
169
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -195,59 +201,60 @@ const A = {
|
|
|
195
201
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
196
202
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
197
203
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
198
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
205
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
206
|
+
}, Ge = {}, eo = {};
|
|
207
|
+
Kn();
|
|
208
|
+
function de(t, e, n = /* @__PURE__ */ new Map(), o = (l, c, u, i) => c, a = {}, s = (l) => l) {
|
|
209
|
+
return ze[e.title] = e, qe[e.title] = o, Ge[e.title] = a, eo[e.title] = s, (l = {}) => {
|
|
210
|
+
const c = _n(l, e, n), u = Object.keys(t).reduce((i, d) => (i[d] = t[d].default, i), {});
|
|
204
211
|
return Object.assign(u, c);
|
|
205
212
|
};
|
|
206
213
|
}
|
|
207
|
-
function We(
|
|
208
|
-
return { customClass:
|
|
214
|
+
function We(t, e) {
|
|
215
|
+
return { customClass: e.class, customStyle: e.style };
|
|
209
216
|
}
|
|
210
|
-
function
|
|
211
|
-
function e
|
|
212
|
-
return
|
|
217
|
+
function to() {
|
|
218
|
+
function t(e) {
|
|
219
|
+
return e.editor;
|
|
213
220
|
}
|
|
214
221
|
return {
|
|
215
|
-
resolve:
|
|
222
|
+
resolve: t
|
|
216
223
|
};
|
|
217
224
|
}
|
|
218
|
-
const
|
|
225
|
+
const Ee = /* @__PURE__ */ new Map([
|
|
219
226
|
["appearance", We]
|
|
220
|
-
]),
|
|
221
|
-
var
|
|
222
|
-
const
|
|
223
|
-
class
|
|
224
|
-
constructor(
|
|
227
|
+
]), no = /* @__PURE__ */ new Map([]);
|
|
228
|
+
var xe = /* @__PURE__ */ ((t) => (t.String = "String", t.DateTime = "DateTime", t.Date = "Date", t.Enum = "Enum", t.Boolean = "Boolean", t.Number = "Number", t.Text = "Text", t.BigNumber = "BigNumber", t))(xe || {});
|
|
229
|
+
const oo = "root-viewmodel";
|
|
230
|
+
class ao {
|
|
231
|
+
constructor(e, n) {
|
|
225
232
|
N(this, "formSchemaUtils");
|
|
226
233
|
N(this, "controlCreatorUtils");
|
|
227
234
|
N(this, "designViewModelUtils");
|
|
228
|
-
this.resolver =
|
|
235
|
+
this.resolver = e, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
229
236
|
}
|
|
230
|
-
createComponent(
|
|
231
|
-
const n = this.createComponentRefNode(
|
|
237
|
+
createComponent(e) {
|
|
238
|
+
const n = this.createComponentRefNode(e), o = this.createComponentNode(e), a = this.createViewModeNode(e), s = this.formSchemaUtils.getFormSchema();
|
|
232
239
|
return s.module.viewmodels.push(a), s.module.components.push(o), this.designViewModelUtils.assembleDesignViewModel(), n;
|
|
233
240
|
}
|
|
234
|
-
createComponentRefNode(
|
|
241
|
+
createComponentRefNode(e) {
|
|
235
242
|
const n = this.resolver.getSchemaByType("component-ref");
|
|
236
243
|
return Object.assign(n, {
|
|
237
|
-
id: `${
|
|
238
|
-
component: `${
|
|
244
|
+
id: `${e.componentId}-component-ref`,
|
|
245
|
+
component: `${e.componentId}-component`
|
|
239
246
|
}), n;
|
|
240
247
|
}
|
|
241
|
-
createComponentNode(
|
|
242
|
-
const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(
|
|
248
|
+
createComponentNode(e) {
|
|
249
|
+
const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(e);
|
|
243
250
|
return Object.assign(n, {
|
|
244
|
-
id: `${
|
|
245
|
-
viewModel: `${
|
|
246
|
-
componentType:
|
|
251
|
+
id: `${e.componentId}-component`,
|
|
252
|
+
viewModel: `${e.componentId}-component-viewmodel`,
|
|
253
|
+
componentType: e.componentType,
|
|
247
254
|
appearance: {
|
|
248
255
|
class: this.getFormComponentClass()
|
|
249
256
|
},
|
|
250
|
-
formColumns:
|
|
257
|
+
formColumns: e.formColumns,
|
|
251
258
|
contents: o
|
|
252
259
|
}), n;
|
|
253
260
|
}
|
|
@@ -255,34 +262,37 @@ class _n {
|
|
|
255
262
|
* 获取卡片组件层级的class样式
|
|
256
263
|
*/
|
|
257
264
|
getFormComponentClass() {
|
|
258
|
-
|
|
265
|
+
const { templateId: e } = this.formSchemaUtils.getFormSchema().module;
|
|
266
|
+
return e === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
259
267
|
}
|
|
260
|
-
createFormComponentContents(
|
|
268
|
+
createFormComponentContents(e) {
|
|
261
269
|
const n = this.resolver.getSchemaByType("section");
|
|
262
270
|
Object.assign(n, {
|
|
263
|
-
id:
|
|
271
|
+
id: e.componentId + "-form-section",
|
|
264
272
|
appearance: {
|
|
265
273
|
class: "f-section-form f-section-in-mainsubcard"
|
|
266
274
|
},
|
|
267
|
-
mainTitle:
|
|
275
|
+
mainTitle: e.componentName
|
|
268
276
|
});
|
|
269
277
|
const o = this.resolver.getSchemaByType("response-form"), a = [];
|
|
270
278
|
Object.assign(o, {
|
|
271
|
-
id:
|
|
279
|
+
id: e.componentId + "-form",
|
|
272
280
|
appearance: {
|
|
273
281
|
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
274
282
|
},
|
|
275
283
|
contents: a
|
|
276
284
|
}), n.contents = [o];
|
|
277
|
-
const { selectedFields: s } =
|
|
278
|
-
|
|
279
|
-
const u =
|
|
280
|
-
|
|
281
|
-
})
|
|
285
|
+
const { selectedFields: s } = e;
|
|
286
|
+
s == null || s.forEach((c) => {
|
|
287
|
+
const u = Te(c), i = this.resolveControlClassByFormColumns(e), d = this.controlCreatorUtils.setFormFieldProperty(u, "", i);
|
|
288
|
+
d && a.push(d);
|
|
289
|
+
});
|
|
290
|
+
const { templateId: l } = this.formSchemaUtils.getFormSchema().module;
|
|
291
|
+
return l === "double-list-in-tab-template" && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0), [n];
|
|
282
292
|
}
|
|
283
|
-
resolveControlClassByFormColumns(
|
|
293
|
+
resolveControlClassByFormColumns(e) {
|
|
284
294
|
let n = "";
|
|
285
|
-
switch (
|
|
295
|
+
switch (e.formColumns) {
|
|
286
296
|
case 1: {
|
|
287
297
|
n = "col-12";
|
|
288
298
|
break;
|
|
@@ -305,31 +315,28 @@ class _n {
|
|
|
305
315
|
/**
|
|
306
316
|
* 添加viewModel节点
|
|
307
317
|
*/
|
|
308
|
-
createViewModeNode(
|
|
318
|
+
createViewModeNode(e) {
|
|
309
319
|
return {
|
|
310
|
-
id: `${
|
|
311
|
-
code: `${
|
|
312
|
-
name:
|
|
313
|
-
bindTo:
|
|
314
|
-
parent:
|
|
315
|
-
fields: this.assembleViewModelFields(
|
|
320
|
+
id: `${e.componentId}-component-viewmodel`,
|
|
321
|
+
code: `${e.componentId}-component-viewmodel`,
|
|
322
|
+
name: e.componentName,
|
|
323
|
+
bindTo: e.bindTo,
|
|
324
|
+
parent: oo,
|
|
325
|
+
fields: this.assembleViewModelFields(e),
|
|
316
326
|
commands: [],
|
|
317
327
|
states: [],
|
|
318
|
-
enableValidation: !0
|
|
319
|
-
pagination: {
|
|
320
|
-
enable: !1
|
|
321
|
-
}
|
|
328
|
+
enableValidation: !0
|
|
322
329
|
};
|
|
323
330
|
}
|
|
324
331
|
/**
|
|
325
332
|
* 组装viewModel fields 节点
|
|
326
333
|
*/
|
|
327
|
-
assembleViewModelFields(
|
|
328
|
-
const n = [], { selectedFields: o } =
|
|
334
|
+
assembleViewModelFields(e) {
|
|
335
|
+
const n = [], { selectedFields: o } = e;
|
|
329
336
|
return o == null || o.forEach((a) => {
|
|
330
337
|
let s = "blur";
|
|
331
338
|
const l = a.type.name;
|
|
332
|
-
(l ===
|
|
339
|
+
(l === xe.Enum || l === xe.Boolean) && (s = "change"), n.push({
|
|
333
340
|
type: "Form",
|
|
334
341
|
id: a.id,
|
|
335
342
|
fieldName: a.bindingField,
|
|
@@ -341,26 +348,26 @@ class _n {
|
|
|
341
348
|
}), n;
|
|
342
349
|
}
|
|
343
350
|
}
|
|
344
|
-
function
|
|
345
|
-
var s;
|
|
351
|
+
function lo(t, e, n, o) {
|
|
352
|
+
var s, l, c, u;
|
|
346
353
|
const a = n.parentComponentInstance;
|
|
347
|
-
if (a) {
|
|
348
|
-
const
|
|
354
|
+
if (a && o) {
|
|
355
|
+
const i = (s = a.schema) == null ? void 0 : s.type, r = {
|
|
349
356
|
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
350
|
-
componentName: "标题",
|
|
357
|
+
componentName: ((c = (l = n.bindingSourceContext) == null ? void 0 : l.bindingEntity) == null ? void 0 : c.name) || "标题",
|
|
351
358
|
componentType: "form",
|
|
352
|
-
formColumns:
|
|
359
|
+
formColumns: i === "splitter-pane" ? 1 : 4,
|
|
353
360
|
parentContainerId: a.schema.id,
|
|
354
|
-
bindTo: "/"
|
|
361
|
+
bindTo: ((u = n.bindingSourceContext) == null ? void 0 : u.bindTo) || "/"
|
|
355
362
|
};
|
|
356
|
-
return new
|
|
363
|
+
return new ao(t, o).createComponent(r);
|
|
357
364
|
} else
|
|
358
|
-
return
|
|
365
|
+
return e;
|
|
359
366
|
}
|
|
360
|
-
function
|
|
361
|
-
return
|
|
367
|
+
function so(t, e, n) {
|
|
368
|
+
return e;
|
|
362
369
|
}
|
|
363
|
-
const
|
|
370
|
+
const ro = "https://json-schema.org/draft/2020-12/schema", io = "https://farris-design.gitee.io/response-form.schema.json", uo = "response-form", co = "A Farris Data Collection Component", po = "object", mo = {
|
|
364
371
|
id: {
|
|
365
372
|
description: "The unique identifier for a form group",
|
|
366
373
|
type: "string"
|
|
@@ -388,36 +395,38 @@ const no = "https://json-schema.org/draft/2020-12/schema", oo = "https://farris-
|
|
|
388
395
|
type: "array",
|
|
389
396
|
default: []
|
|
390
397
|
}
|
|
391
|
-
},
|
|
398
|
+
}, fo = [
|
|
392
399
|
"id",
|
|
393
400
|
"type"
|
|
394
|
-
],
|
|
395
|
-
$schema:
|
|
396
|
-
$id:
|
|
397
|
-
title:
|
|
398
|
-
description:
|
|
399
|
-
type:
|
|
400
|
-
properties:
|
|
401
|
-
required:
|
|
401
|
+
], vo = {
|
|
402
|
+
$schema: ro,
|
|
403
|
+
$id: io,
|
|
404
|
+
title: uo,
|
|
405
|
+
description: co,
|
|
406
|
+
type: po,
|
|
407
|
+
properties: mo,
|
|
408
|
+
required: fo
|
|
402
409
|
}, He = {
|
|
403
|
-
customClass: { type: String, default: "" }
|
|
404
|
-
|
|
410
|
+
customClass: { type: String, default: "" },
|
|
411
|
+
customStyle: { type: String, defaut: "" }
|
|
412
|
+
}, Pe = de(He, vo, Ee, lo), Ce = /* @__PURE__ */ H({
|
|
405
413
|
name: "FResponseForm",
|
|
406
414
|
props: He,
|
|
407
415
|
emits: [],
|
|
408
|
-
setup(
|
|
409
|
-
const n =
|
|
410
|
-
const a =
|
|
416
|
+
setup(t, e) {
|
|
417
|
+
const n = p(), o = L(() => {
|
|
418
|
+
const a = t.customClass.split(" "), s = {
|
|
411
419
|
"drag-container": !0
|
|
412
420
|
};
|
|
413
421
|
return a.reduce((l, c) => (l[c] = !0, l), s), s;
|
|
414
422
|
});
|
|
415
423
|
return () => f("div", {
|
|
416
424
|
ref: n,
|
|
417
|
-
class: o.value
|
|
418
|
-
|
|
425
|
+
class: o.value,
|
|
426
|
+
style: t.customStyle
|
|
427
|
+
}, [e.slots.default && e.slots.default()]);
|
|
419
428
|
}
|
|
420
|
-
}),
|
|
429
|
+
}), ho = "https://json-schema.org/draft/2020-12/schema", yo = "https://farris-design.gitee.io/form-group.schema.json", go = "form-group", Co = "A Farris Input Component", bo = "object", wo = {
|
|
421
430
|
id: {
|
|
422
431
|
description: "The unique identifier for a form group",
|
|
423
432
|
type: "string"
|
|
@@ -457,21 +466,27 @@ const no = "https://json-schema.org/draft/2020-12/schema", oo = "https://farris-
|
|
|
457
466
|
lableWidth: {
|
|
458
467
|
description: "",
|
|
459
468
|
type: "number"
|
|
469
|
+
},
|
|
470
|
+
binding: {
|
|
471
|
+
description: "",
|
|
472
|
+
type: "object",
|
|
473
|
+
default: {}
|
|
460
474
|
}
|
|
461
|
-
},
|
|
475
|
+
}, Mo = [
|
|
462
476
|
"id",
|
|
463
477
|
"type"
|
|
464
478
|
], Xe = {
|
|
465
|
-
$schema:
|
|
466
|
-
$id:
|
|
467
|
-
title:
|
|
468
|
-
description:
|
|
469
|
-
type:
|
|
470
|
-
properties:
|
|
471
|
-
required:
|
|
472
|
-
},
|
|
479
|
+
$schema: ho,
|
|
480
|
+
$id: yo,
|
|
481
|
+
title: go,
|
|
482
|
+
description: Co,
|
|
483
|
+
type: bo,
|
|
484
|
+
properties: wo,
|
|
485
|
+
required: Mo
|
|
486
|
+
}, le = {
|
|
473
487
|
id: { type: String, default: "" },
|
|
474
488
|
customClass: { type: String, default: "" },
|
|
489
|
+
customStyle: { type: String, default: "" },
|
|
475
490
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
476
491
|
editor: { type: Object, default: {} },
|
|
477
492
|
label: { type: String, default: "" },
|
|
@@ -482,138 +497,143 @@ const no = "https://json-schema.org/draft/2020-12/schema", oo = "https://farris-
|
|
|
482
497
|
required: { type: Boolean, default: !1 },
|
|
483
498
|
showLabel: { type: Boolean, default: !0 },
|
|
484
499
|
type: { type: String, default: "input-group" }
|
|
485
|
-
},
|
|
486
|
-
|
|
500
|
+
}, Ve = de(
|
|
501
|
+
le,
|
|
487
502
|
Xe,
|
|
488
|
-
|
|
503
|
+
Ee,
|
|
489
504
|
void 0
|
|
490
|
-
),
|
|
491
|
-
function
|
|
492
|
-
var
|
|
493
|
-
|
|
494
|
-
|
|
505
|
+
), xo = to();
|
|
506
|
+
function Ye(t, e, n) {
|
|
507
|
+
var b;
|
|
508
|
+
const o = n && n.getStyles && n.getStyles() || "", a = n && n.getDesignerClass && n.getDesignerClass() || "", s = p();
|
|
509
|
+
function l() {
|
|
510
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
495
511
|
}
|
|
496
|
-
o();
|
|
497
|
-
const a = n && n.getStyles && n.getStyles() || "", s = n && n.getDesignerClass && n.getDesignerClass() || "", l = d();
|
|
498
512
|
function c() {
|
|
499
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
500
|
-
}
|
|
501
|
-
function u() {
|
|
502
513
|
return !1;
|
|
503
514
|
}
|
|
504
|
-
function
|
|
505
|
-
return (
|
|
515
|
+
function u() {
|
|
516
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
506
517
|
}
|
|
507
|
-
function
|
|
508
|
-
return (
|
|
518
|
+
function i() {
|
|
519
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
509
520
|
}
|
|
510
|
-
function
|
|
511
|
-
if (!
|
|
521
|
+
function d(w) {
|
|
522
|
+
if (!w || !w.value)
|
|
512
523
|
return null;
|
|
513
|
-
if (
|
|
514
|
-
return
|
|
515
|
-
const
|
|
516
|
-
return
|
|
524
|
+
if (w.value.schema && w.value.schema.type === "component")
|
|
525
|
+
return w.value;
|
|
526
|
+
const R = p(w == null ? void 0 : w.value.parent), C = d(R);
|
|
527
|
+
return C || null;
|
|
517
528
|
}
|
|
518
|
-
function
|
|
519
|
-
const { componentInstance:
|
|
520
|
-
return !
|
|
529
|
+
function r(w = e) {
|
|
530
|
+
const { componentInstance: R, designerItemElementRef: C } = w;
|
|
531
|
+
return !R || !R.value ? null : R.value.canMove ? C : r(w.parent);
|
|
521
532
|
}
|
|
522
|
-
function
|
|
523
|
-
return !!n && n.canAccepts(
|
|
533
|
+
function m(w) {
|
|
534
|
+
return !!n && n.canAccepts(w);
|
|
524
535
|
}
|
|
525
|
-
function
|
|
526
|
-
return (
|
|
536
|
+
function v() {
|
|
537
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
527
538
|
}
|
|
528
|
-
function
|
|
539
|
+
function h() {
|
|
529
540
|
}
|
|
530
|
-
function
|
|
531
|
-
|
|
541
|
+
function g(w, R) {
|
|
542
|
+
R && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(R);
|
|
532
543
|
}
|
|
533
|
-
function
|
|
534
|
-
const { componentType:
|
|
535
|
-
let
|
|
536
|
-
n && n.onResolveNewComponentSchema && (
|
|
537
|
-
const
|
|
538
|
-
return
|
|
544
|
+
function x(w, R) {
|
|
545
|
+
const { componentType: C } = w;
|
|
546
|
+
let P = ke(C, w, R);
|
|
547
|
+
n && n.onResolveNewComponentSchema && (P = n.onResolveNewComponentSchema(w, P));
|
|
548
|
+
const O = C.toLowerCase().replace(/-/g, "_");
|
|
549
|
+
return P && !P.id && P.type === C && (P.id = `${O}_${Math.random().toString().slice(2, 6)}`), P;
|
|
539
550
|
}
|
|
540
|
-
function
|
|
551
|
+
function M(w) {
|
|
541
552
|
}
|
|
542
|
-
function
|
|
553
|
+
function y(...w) {
|
|
543
554
|
if (n && n.getPropsConfig)
|
|
544
|
-
return n.getPropsConfig(...
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
555
|
+
return n.getPropsConfig(...w);
|
|
556
|
+
}
|
|
557
|
+
function F() {
|
|
558
|
+
n && n.onRemoveComponent && n.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((w) => {
|
|
559
|
+
var P;
|
|
560
|
+
let R = w.id;
|
|
561
|
+
w.type === "component-ref" && (R = w.component);
|
|
562
|
+
const C = t.value.querySelector(`#${R}-design-item`);
|
|
563
|
+
(P = C == null ? void 0 : C.componentInstance) != null && P.value.onRemoveComponent && C.componentInstance.value.onRemoveComponent();
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
return s.value = {
|
|
567
|
+
canMove: l(),
|
|
568
|
+
canSelectParent: c(),
|
|
569
|
+
canDelete: u(),
|
|
570
|
+
canNested: !i(),
|
|
571
|
+
contents: e == null ? void 0 : e.schema.contents,
|
|
572
|
+
elementRef: t,
|
|
573
|
+
parent: (b = e == null ? void 0 : e.parent) == null ? void 0 : b.componentInstance,
|
|
574
|
+
schema: e == null ? void 0 : e.schema,
|
|
575
|
+
styles: o,
|
|
576
|
+
designerClass: a,
|
|
577
|
+
canAccepts: m,
|
|
578
|
+
getBelongedComponentInstance: d,
|
|
579
|
+
getDraggableDesignItemElement: r,
|
|
580
|
+
getDraggingDisplayText: v,
|
|
581
|
+
getPropConfig: y,
|
|
582
|
+
getDragScopeElement: h,
|
|
583
|
+
onAcceptMovedChildElement: g,
|
|
584
|
+
onChildElementMovedOut: M,
|
|
585
|
+
addNewChildComponentSchema: x,
|
|
586
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || p(!1),
|
|
587
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || p(!1),
|
|
588
|
+
onRemoveComponent: F
|
|
589
|
+
}, s;
|
|
590
|
+
}
|
|
591
|
+
function Fo() {
|
|
592
|
+
function t(e, n) {
|
|
573
593
|
var l;
|
|
574
|
-
if (!
|
|
594
|
+
if (!e)
|
|
575
595
|
return !1;
|
|
576
|
-
const o = ((l =
|
|
596
|
+
const o = ((l = e.targetContainer) == null ? void 0 : l.componentInstance) && e.targetContainer.componentInstance.value;
|
|
577
597
|
if (!o)
|
|
578
598
|
return !1;
|
|
579
599
|
const a = o.schema.type, s = n == null ? void 0 : n.formSchemaUtils.getComponentById(o.belongedComponentId);
|
|
580
|
-
return !((
|
|
600
|
+
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![V["response-layout-item"].type, V["response-form"].type].includes(a) || (e.componentType === V.tabs.type || e.componentType === V.section.type) && ((s == null ? void 0 : s.componentType) !== "frame" || ![V["content-container"].type, V["splitter-pane"].type, V["response-layout-item"].type].includes(a)));
|
|
581
601
|
}
|
|
582
602
|
return {
|
|
583
|
-
basalDragulaRuleForContainer:
|
|
603
|
+
basalDragulaRuleForContainer: t
|
|
584
604
|
};
|
|
585
605
|
}
|
|
586
|
-
class
|
|
587
|
-
getTemplateRule(
|
|
606
|
+
class To {
|
|
607
|
+
getTemplateRule(e, n) {
|
|
588
608
|
const o = n == null ? void 0 : n.formSchemaUtils, a = o == null ? void 0 : o.getFormTemplateRule(), s = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
589
609
|
if (!a)
|
|
590
610
|
return s;
|
|
591
|
-
const l = this.getComponentContext(
|
|
592
|
-
return
|
|
611
|
+
const l = this.getComponentContext(e), { componentClassList: c } = l;
|
|
612
|
+
return c.forEach((u) => {
|
|
593
613
|
if (!u || !a[u])
|
|
594
614
|
return;
|
|
595
|
-
const { canMove:
|
|
596
|
-
s.canMove = s.canMove && this.resolveRuleValue(
|
|
615
|
+
const { canMove: i, canDelete: d, canAccept: r } = a[u];
|
|
616
|
+
s.canMove = s.canMove && this.resolveRuleValue(i, l), s.canDelete = s.canDelete && this.resolveRuleValue(d, l), s.canAccept = s.canAccept && this.resolveRuleValue(r, l);
|
|
597
617
|
}), s;
|
|
598
618
|
}
|
|
599
|
-
resolveRuleValue(
|
|
600
|
-
return typeof
|
|
619
|
+
resolveRuleValue(e, n) {
|
|
620
|
+
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, n);
|
|
601
621
|
}
|
|
602
|
-
parseRuleValueSchema(
|
|
603
|
-
const o =
|
|
622
|
+
parseRuleValueSchema(e, n) {
|
|
623
|
+
const o = e.invalidContext || [];
|
|
604
624
|
let a = !0;
|
|
605
625
|
for (const s of o) {
|
|
606
626
|
if (s.firstLevelChild) {
|
|
607
627
|
if (s.firstLevelChild.class) {
|
|
608
|
-
const l = n
|
|
628
|
+
const { firstLevelChildClassList: l } = n;
|
|
609
629
|
if (l && !l.includes(s.firstLevelChild.class)) {
|
|
610
630
|
a = !1;
|
|
611
631
|
continue;
|
|
612
632
|
}
|
|
613
633
|
}
|
|
614
634
|
if (s.firstLevelChild.type) {
|
|
615
|
-
const l = n
|
|
616
|
-
if (l
|
|
635
|
+
const { firstLevelChildSchema: l } = n;
|
|
636
|
+
if (!l || l.type !== s.firstLevelChild.type) {
|
|
617
637
|
a = !1;
|
|
618
638
|
continue;
|
|
619
639
|
}
|
|
@@ -621,15 +641,15 @@ class bo {
|
|
|
621
641
|
}
|
|
622
642
|
if (s.secondLevelChild) {
|
|
623
643
|
if (s.secondLevelChild.class) {
|
|
624
|
-
const l = n
|
|
644
|
+
const { secondLevelChildClassList: l } = n;
|
|
625
645
|
if (l && !l.includes(s.secondLevelChild.class)) {
|
|
626
646
|
a = !1;
|
|
627
647
|
continue;
|
|
628
648
|
}
|
|
629
649
|
}
|
|
630
650
|
if (s.secondLevelChild.type) {
|
|
631
|
-
const l = n
|
|
632
|
-
if (l
|
|
651
|
+
const { secondLevelChildSchema: l } = n;
|
|
652
|
+
if (!l || l.type !== s.secondLevelChild.type) {
|
|
633
653
|
a = !1;
|
|
634
654
|
continue;
|
|
635
655
|
}
|
|
@@ -637,14 +657,14 @@ class bo {
|
|
|
637
657
|
}
|
|
638
658
|
if (s.parent) {
|
|
639
659
|
if (s.parent.class) {
|
|
640
|
-
const l = n
|
|
660
|
+
const { parentClassList: l } = n;
|
|
641
661
|
if (l && !l.includes(s.parent.class)) {
|
|
642
662
|
a = !1;
|
|
643
663
|
continue;
|
|
644
664
|
}
|
|
645
665
|
}
|
|
646
666
|
if (s.parent.type) {
|
|
647
|
-
const l = n
|
|
667
|
+
const { parentSchema: l } = n;
|
|
648
668
|
if (l && l.type !== s.parent.type) {
|
|
649
669
|
a = !1;
|
|
650
670
|
continue;
|
|
@@ -656,9 +676,9 @@ class bo {
|
|
|
656
676
|
}
|
|
657
677
|
return !a;
|
|
658
678
|
}
|
|
659
|
-
getComponentContext(
|
|
660
|
-
var
|
|
661
|
-
const n =
|
|
679
|
+
getComponentContext(e) {
|
|
680
|
+
var g, x, M, y;
|
|
681
|
+
const n = e.schema, o = n.appearance && n.appearance.class || "", a = o.split(" ") || [], s = n.contents || [], l = s.length ? s[0] : null, c = l && l.appearance ? l.appearance.class : "", u = c ? c.split(" ") : [], i = (g = l == null ? void 0 : l.contents) != null && g.length ? l == null ? void 0 : l.contents[0] : null, d = i && i.appearance ? i.appearance.class : "", r = d ? d.split(" ") : [], m = n.type === "component" ? (M = (x = e.parent) == null ? void 0 : x.parent) == null ? void 0 : M.schema : (y = e.parent) == null ? void 0 : y.schema, v = m && m.appearance && m.appearance.class || "", h = v ? v.split(" ") : [];
|
|
662
682
|
return {
|
|
663
683
|
componentClass: o,
|
|
664
684
|
componentClassList: a,
|
|
@@ -666,17 +686,17 @@ class bo {
|
|
|
666
686
|
firstLevelChildSchema: l,
|
|
667
687
|
firstLevelChildClass: c,
|
|
668
688
|
firstLevelChildClassList: u,
|
|
669
|
-
secondLevelChildSchema:
|
|
670
|
-
secondLevelChildClass:
|
|
671
|
-
secondLevelChildClassList:
|
|
689
|
+
secondLevelChildSchema: i,
|
|
690
|
+
secondLevelChildClass: d,
|
|
691
|
+
secondLevelChildClassList: r,
|
|
672
692
|
parentSchema: m,
|
|
673
|
-
parentClass:
|
|
674
|
-
parentClassList:
|
|
693
|
+
parentClass: v,
|
|
694
|
+
parentClassList: h
|
|
675
695
|
};
|
|
676
696
|
}
|
|
677
697
|
}
|
|
678
|
-
class
|
|
679
|
-
constructor(
|
|
698
|
+
class Je {
|
|
699
|
+
constructor(e, n) {
|
|
680
700
|
N(this, "componentId");
|
|
681
701
|
N(this, "viewModelId");
|
|
682
702
|
N(this, "eventsEditorUtils");
|
|
@@ -693,25 +713,26 @@ class Ye {
|
|
|
693
713
|
categories: {}
|
|
694
714
|
});
|
|
695
715
|
var o;
|
|
696
|
-
this.componentId =
|
|
716
|
+
this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
697
717
|
}
|
|
698
718
|
getTableInfo() {
|
|
699
|
-
var
|
|
700
|
-
return (
|
|
719
|
+
var e;
|
|
720
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
701
721
|
}
|
|
702
|
-
setDesignViewModelField(
|
|
703
|
-
|
|
722
|
+
setDesignViewModelField(e) {
|
|
723
|
+
var o;
|
|
724
|
+
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
704
725
|
if (n) {
|
|
705
726
|
if (!this.designViewModelField) {
|
|
706
|
-
const
|
|
707
|
-
this.designViewModelField =
|
|
727
|
+
const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
728
|
+
this.designViewModelField = a.fields.find((s) => s.id === n);
|
|
708
729
|
}
|
|
709
|
-
|
|
730
|
+
e.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
|
|
710
731
|
}
|
|
711
732
|
}
|
|
712
|
-
changeFieldEditorType(
|
|
733
|
+
changeFieldEditorType(e, n) {
|
|
713
734
|
}
|
|
714
|
-
getBasicPropConfig(
|
|
735
|
+
getBasicPropConfig(e) {
|
|
715
736
|
return {
|
|
716
737
|
description: "Basic Information",
|
|
717
738
|
title: "基本信息",
|
|
@@ -730,13 +751,13 @@ class Ye {
|
|
|
730
751
|
type: "combo-list",
|
|
731
752
|
textField: "name",
|
|
732
753
|
valueField: "value",
|
|
733
|
-
data: [{ value:
|
|
754
|
+
data: [{ value: e.type, name: V[e.type].name }]
|
|
734
755
|
}
|
|
735
756
|
}
|
|
736
757
|
}
|
|
737
758
|
};
|
|
738
759
|
}
|
|
739
|
-
getAppearanceConfig(
|
|
760
|
+
getAppearanceConfig(e = null) {
|
|
740
761
|
return {
|
|
741
762
|
title: "样式",
|
|
742
763
|
description: "Appearance",
|
|
@@ -762,15 +783,15 @@ class Ye {
|
|
|
762
783
|
* @param componentInstance
|
|
763
784
|
* @returns
|
|
764
785
|
*/
|
|
765
|
-
updateElementByParentContainer(
|
|
786
|
+
updateElementByParentContainer(e, n) {
|
|
766
787
|
const o = n && n.parent && n.parent.schema;
|
|
767
788
|
if (!o)
|
|
768
789
|
return;
|
|
769
|
-
const a = o.contents.findIndex((l) => l.id ===
|
|
790
|
+
const a = o.contents.findIndex((l) => l.id === e), s = Te(o.contents[a]);
|
|
770
791
|
o.contents.splice(a, 1), o.contents.splice(a, 0, s);
|
|
771
792
|
}
|
|
772
793
|
}
|
|
773
|
-
class
|
|
794
|
+
class Bo {
|
|
774
795
|
constructor() {
|
|
775
796
|
/** 控件标题 */
|
|
776
797
|
N(this, "label", "");
|
|
@@ -800,137 +821,139 @@ class wo {
|
|
|
800
821
|
N(this, "fieldSetId", "");
|
|
801
822
|
}
|
|
802
823
|
}
|
|
803
|
-
function
|
|
804
|
-
let
|
|
824
|
+
function Qe(t) {
|
|
825
|
+
let e, n;
|
|
805
826
|
const o = /* @__PURE__ */ new Map();
|
|
806
827
|
let a = [];
|
|
807
|
-
function s(
|
|
808
|
-
const
|
|
809
|
-
if (
|
|
810
|
-
|
|
828
|
+
function s(d, r) {
|
|
829
|
+
const v = d.split(" ").filter((y) => y.startsWith("col-"));
|
|
830
|
+
if (v.length === 0) {
|
|
831
|
+
r.isSupportedClass = !1;
|
|
811
832
|
return;
|
|
812
833
|
}
|
|
813
|
-
let
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
function l(
|
|
817
|
-
let
|
|
818
|
-
|
|
819
|
-
if (
|
|
820
|
-
m += 1, l(
|
|
834
|
+
let h = v.find((y) => /^col-([1-9]|10|11|12)$/.test(y)), g = v.find((y) => /^col-md-([1-9]|10|11|12)$/.test(y)), x = v.find((y) => /^col-xl-([1-9]|10|11|12)$/.test(y)), M = v.find((y) => /^col-el-([1-9]|10|11|12)$/.test(y));
|
|
835
|
+
h = h || "col-12", r.columnInSM = parseInt(h.replace("col-", ""), 10), r.displayWidthInSM = r.columnInSM / 12, r.displayWidthInSM !== 1 && (r.isSupportedClass = !1), g = g || "col-md-" + r.columnInSM, r.columnInMD = parseInt(g.replace("col-md-", ""), 10), r.displayWidthInMD = r.columnInMD / 6, [1, 2].includes(r.displayWidthInMD) || (r.isSupportedClass = !1), x = x || "col-xl-" + r.columnInMD, r.columnInLG = parseInt(x.replace("col-xl-", ""), 10), r.displayWidthInLG = r.columnInLG / 3, [1, 2, 3, 4].includes(r.displayWidthInLG) || (r.isSupportedClass = !1), M = M || "col-el-" + r.columnInLG, r.columnInEL = parseInt(M.replace("col-el-", ""), 10), r.displayWidthInEL = r.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(r.displayWidthInEL) || (r.isSupportedClass = !1);
|
|
836
|
+
}
|
|
837
|
+
function l(d, r, m, v = !1) {
|
|
838
|
+
let h = !1;
|
|
839
|
+
d.contents.forEach((g) => {
|
|
840
|
+
if (g.type === "fieldset") {
|
|
841
|
+
m += 1, l(g, r, m, !0), h = !0;
|
|
821
842
|
return;
|
|
822
843
|
}
|
|
823
|
-
|
|
824
|
-
const x =
|
|
825
|
-
x ? s(x,
|
|
844
|
+
h && (m += 1, h = !1);
|
|
845
|
+
const x = g.appearance && g.appearance.class, M = new Bo();
|
|
846
|
+
x ? s(x, M) : M.isSupportedClass = !1, M.label = g.label || g.id, M.id = g.id, M.group = m, v && (M.fieldSetId = d.id), n === g.id && (e = m), o.set(g.id, g), r.push(M);
|
|
826
847
|
});
|
|
827
848
|
}
|
|
828
|
-
function c(
|
|
829
|
-
const
|
|
830
|
-
if (!
|
|
849
|
+
function c(d) {
|
|
850
|
+
const r = t.getComponentById(d);
|
|
851
|
+
if (!r || !r.componentType || !r.componentType.startsWith("form"))
|
|
831
852
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
832
|
-
const m =
|
|
853
|
+
const m = t.selectNode(r, (v) => v.type === Me["response-form"].type);
|
|
833
854
|
return !m || !m.contents || m.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: m };
|
|
834
855
|
}
|
|
835
|
-
function u(
|
|
836
|
-
|
|
837
|
-
const { result: m, message:
|
|
856
|
+
function u(d, r) {
|
|
857
|
+
r = r || d.id;
|
|
858
|
+
const { result: m, message: v, formNode: h } = c(r);
|
|
838
859
|
if (!m)
|
|
839
|
-
return { result: m, message:
|
|
840
|
-
n =
|
|
841
|
-
const
|
|
842
|
-
l(
|
|
843
|
-
const x = a.find((
|
|
860
|
+
return { result: m, message: v };
|
|
861
|
+
n = d.id, a = [], o.clear();
|
|
862
|
+
const g = h.contents[0].type === Me.fieldset.type ? 0 : 1;
|
|
863
|
+
l(h, a, g);
|
|
864
|
+
const x = a.find((y) => !y.isSupportedClass);
|
|
844
865
|
return {
|
|
845
866
|
defaultState: {
|
|
846
|
-
defaultGroupNumber:
|
|
867
|
+
defaultGroupNumber: e || 1,
|
|
847
868
|
model: x ? "customize" : "standard"
|
|
848
869
|
},
|
|
849
870
|
importData: a
|
|
850
871
|
};
|
|
851
872
|
}
|
|
852
|
-
function
|
|
853
|
-
|
|
854
|
-
const { result: m, formNode:
|
|
873
|
+
function i(d, r) {
|
|
874
|
+
r = r;
|
|
875
|
+
const { result: m, formNode: v } = c(r);
|
|
855
876
|
if (!m)
|
|
856
877
|
return "";
|
|
857
|
-
const
|
|
858
|
-
return
|
|
859
|
-
var
|
|
860
|
-
const x = o.get(
|
|
861
|
-
if (
|
|
862
|
-
const
|
|
863
|
-
x.appearance.class =
|
|
878
|
+
const h = [];
|
|
879
|
+
return d.forEach((g) => {
|
|
880
|
+
var y;
|
|
881
|
+
const x = o.get(g.id), M = x.appearance && x.appearance.class;
|
|
882
|
+
if (M) {
|
|
883
|
+
const b = M.split(" ").filter((U) => !U.startsWith("col-")), w = "col-" + g.columnInSM, R = "col-md-" + g.columnInMD, C = "col-xl-" + g.columnInLG, P = "col-el-" + g.columnInEL, O = [w, R, C, P].concat(b);
|
|
884
|
+
x.appearance.class = O.join(" ");
|
|
864
885
|
}
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
|
|
886
|
+
if (g.fieldSetId) {
|
|
887
|
+
const F = v.contents.find((w) => w.id === g.fieldSetId), b = h.find((w) => w.id === g.fieldSetId);
|
|
888
|
+
b ? (y = b.contents) == null || y.push(x) : (h.push(F), F.contents = [x]);
|
|
868
889
|
} else
|
|
869
|
-
|
|
870
|
-
}),
|
|
890
|
+
h.push(x);
|
|
891
|
+
}), v.contents = h, v.id;
|
|
871
892
|
}
|
|
872
893
|
return {
|
|
873
894
|
checkCanFindFormNode: c,
|
|
874
895
|
checkCanOpenLayoutEditor: u,
|
|
875
|
-
changeFormControlsByResponseLayoutConfig:
|
|
896
|
+
changeFormControlsByResponseLayoutConfig: i,
|
|
876
897
|
getResonseFormLayoutConfig: l
|
|
877
898
|
};
|
|
878
899
|
}
|
|
879
|
-
function
|
|
880
|
-
function n(
|
|
881
|
-
if (
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
900
|
+
function ko(t, e) {
|
|
901
|
+
function n(c, u = null) {
|
|
902
|
+
if (u)
|
|
903
|
+
return u;
|
|
904
|
+
const i = t.getComponentById(e);
|
|
905
|
+
return t.selectNode(i, (d) => d.id === c);
|
|
906
|
+
}
|
|
907
|
+
function o(c) {
|
|
908
|
+
const u = t.getComponentById(c);
|
|
909
|
+
return !(!u || !u.componentType || !u.componentType.startsWith("form"));
|
|
910
|
+
}
|
|
911
|
+
function a(c) {
|
|
912
|
+
const u = n(c.id), i = Qe(t), d = [];
|
|
913
|
+
i.getResonseFormLayoutConfig(u, d, 1);
|
|
914
|
+
const r = d.map((b) => b.columnInSM), m = d.map((b) => b.columnInMD), v = d.map((b) => b.columnInLG), h = d.map((b) => b.columnInEL);
|
|
915
|
+
function g(b) {
|
|
916
|
+
const w = new Set(b);
|
|
917
|
+
return Array.from(w).length === 1;
|
|
918
|
+
}
|
|
919
|
+
const x = g(r) ? r[0] : 0, M = g(m) ? m[0] : 0, y = g(v) ? v[0] : 0, F = g(h) ? h[0] : 0;
|
|
893
920
|
return {
|
|
894
921
|
uniqueColClassInSM: x,
|
|
895
|
-
uniqueColClassInMD:
|
|
896
|
-
uniqueColClassInLG:
|
|
897
|
-
uniqueColClassInEL:
|
|
922
|
+
uniqueColClassInMD: M,
|
|
923
|
+
uniqueColClassInLG: y,
|
|
924
|
+
uniqueColClassInEL: F
|
|
898
925
|
};
|
|
899
926
|
}
|
|
900
|
-
function s(u) {
|
|
901
|
-
|
|
902
|
-
|
|
927
|
+
function s(c, u) {
|
|
928
|
+
let i, d, r, m, v = [];
|
|
929
|
+
if (c) {
|
|
930
|
+
const F = c.split(" "), b = F.filter((w) => w.startsWith("col-"));
|
|
931
|
+
i = b.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), d = b.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), r = b.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), m = b.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w)), v = F.filter((w) => !w.startsWith("col-"));
|
|
932
|
+
}
|
|
933
|
+
const h = u.uniqueColClassInSM ? "col-" + u.uniqueColClassInSM : i, g = u.uniqueColClassInMD ? "col-md-" + u.uniqueColClassInMD : d, x = u.uniqueColClassInLG ? "col-xl-" + u.uniqueColClassInLG : r, M = u.uniqueColClassInEL ? "col-el-" + u.uniqueColClassInEL : m;
|
|
934
|
+
return [h, g, x, M].concat(v).join(" ");
|
|
903
935
|
}
|
|
904
|
-
function l(
|
|
905
|
-
|
|
906
|
-
if (
|
|
907
|
-
l(
|
|
936
|
+
function l(c, u, i) {
|
|
937
|
+
c = n(i, c), c.contents.forEach((d) => {
|
|
938
|
+
if (d.type === Me.fieldset.type) {
|
|
939
|
+
l(d, u, d.id);
|
|
908
940
|
return;
|
|
909
941
|
}
|
|
910
|
-
|
|
911
|
-
const
|
|
912
|
-
|
|
942
|
+
d.appearance || (d.appearance = {});
|
|
943
|
+
const r = d.appearance.class;
|
|
944
|
+
d.appearance.class = s(r, u);
|
|
913
945
|
});
|
|
914
946
|
}
|
|
915
|
-
function c(u, r) {
|
|
916
|
-
let p, i, m, h, g = [];
|
|
917
|
-
if (u) {
|
|
918
|
-
const B = u.split(" "), F = B.filter((V) => V.startsWith("col-"));
|
|
919
|
-
p = F.find((V) => /^col-([1-9]|10|11|12)$/.test(V)), i = F.find((V) => /^col-md-([1-9]|10|11|12)$/.test(V)), m = F.find((V) => /^col-xl-([1-9]|10|11|12)$/.test(V)), h = F.find((V) => /^col-el-([1-9]|10|11|12)$/.test(V)), g = B.filter((V) => !V.startsWith("col-"));
|
|
920
|
-
}
|
|
921
|
-
const y = r.uniqueColClassInSM ? "col-" + r.uniqueColClassInSM : p, x = r.uniqueColClassInMD ? "col-md-" + r.uniqueColClassInMD : i, C = r.uniqueColClassInLG ? "col-xl-" + r.uniqueColClassInLG : m, v = r.uniqueColClassInEL ? "col-el-" + r.uniqueColClassInEL : h;
|
|
922
|
-
return [y, x, C, v].concat(g).join(" ");
|
|
923
|
-
}
|
|
924
947
|
return { checkIsInFormComponent: o, assembleUnifiedLayoutContext: a, changeFormControlsByUnifiedLayoutConfig: l };
|
|
925
948
|
}
|
|
926
|
-
class
|
|
927
|
-
constructor(
|
|
928
|
-
super(
|
|
949
|
+
class Eo extends Je {
|
|
950
|
+
constructor(e, n) {
|
|
951
|
+
super(e, n);
|
|
929
952
|
}
|
|
930
|
-
getPropertyConfig(
|
|
931
|
-
|
|
932
|
-
this.propertyConfig.categories.basic = this.getBasicPropConfig(
|
|
933
|
-
const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: l } =
|
|
953
|
+
getPropertyConfig(e, n) {
|
|
954
|
+
const o = this;
|
|
955
|
+
this.propertyConfig.categories.basic = this.getBasicPropConfig(e);
|
|
956
|
+
const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: l } = ko(this.formSchemaUtils, this.componentId), c = this.getAppearanceConfig(e);
|
|
934
957
|
return c.properties.unifiedLayout = {
|
|
935
958
|
title: "统一布局配置",
|
|
936
959
|
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
@@ -938,110 +961,119 @@ class Mo extends Ye {
|
|
|
938
961
|
refreshPanelAfterChanged: !0,
|
|
939
962
|
editor: {
|
|
940
963
|
type: "response-form-layout-setting",
|
|
941
|
-
initialState: s(
|
|
964
|
+
initialState: s(e)
|
|
942
965
|
}
|
|
943
|
-
}, c.setPropertyRelates = function(u,
|
|
966
|
+
}, c.setPropertyRelates = function(u, i) {
|
|
944
967
|
if (u)
|
|
945
968
|
switch (u && u.propertyID) {
|
|
946
969
|
case "unifiedLayout": {
|
|
947
|
-
l(null, u.propertyValue,
|
|
970
|
+
l(null, u.propertyValue, e.id), o.updateElementByParentContainer(e.id, n);
|
|
948
971
|
break;
|
|
949
972
|
}
|
|
950
973
|
}
|
|
951
974
|
}, this.propertyConfig.categories.appearance = c, this.propertyConfig;
|
|
952
975
|
}
|
|
953
976
|
}
|
|
954
|
-
function
|
|
955
|
-
const n =
|
|
956
|
-
function c(
|
|
957
|
-
const
|
|
958
|
-
return
|
|
977
|
+
function Io(t, e) {
|
|
978
|
+
const n = t.schema, o = new To(), { canMove: a, canAccept: s, canDelete: l } = o.getTemplateRule(t, e);
|
|
979
|
+
function c(F) {
|
|
980
|
+
const b = o.getComponentContext(t);
|
|
981
|
+
return b && b.componentClassList && b.componentClassList.includes("f-form-layout") && b.componentClassList.includes("farris-form") ? F.sourceType === "control" && F.componentCategory === "input" || F.sourceType === "move" && F.componentType === "form-group" : !0;
|
|
959
982
|
}
|
|
960
|
-
function u(
|
|
961
|
-
return !(!
|
|
983
|
+
function u(F) {
|
|
984
|
+
return !(!Fo().basalDragulaRuleForContainer(F, e) || !s || !c(F));
|
|
962
985
|
}
|
|
963
|
-
function
|
|
964
|
-
|
|
986
|
+
function i(F) {
|
|
987
|
+
ue();
|
|
965
988
|
}
|
|
966
|
-
function
|
|
989
|
+
function d() {
|
|
967
990
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
968
991
|
}
|
|
969
|
-
function
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
const { label: b } = v, D = ke("form-group");
|
|
973
|
-
return D.editor = T, D.label = b, m(D), delete D.editor.id, delete D.editor.binding, delete D.editor.appearance, delete D.editor.visible, D;
|
|
974
|
-
}
|
|
975
|
-
return T;
|
|
976
|
-
}
|
|
977
|
-
function m(v) {
|
|
978
|
-
const T = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
979
|
-
if (T && T.schema && T.schema.componentType) {
|
|
980
|
-
const B = T.schema.formColumns;
|
|
981
|
-
let F = h(B);
|
|
982
|
-
F = t == null ? void 0 : t.formSchemaUtils.getControlClassByFormUnifiedLayout(F, "", e.schema), v.appearance || (v.appearance = {}), v.appearance.class = F;
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
function h(v) {
|
|
986
|
-
let T = "";
|
|
987
|
-
switch (v) {
|
|
992
|
+
function r(F) {
|
|
993
|
+
let b = "";
|
|
994
|
+
switch (F) {
|
|
988
995
|
case 1: {
|
|
989
|
-
|
|
996
|
+
b = "col-12";
|
|
990
997
|
break;
|
|
991
998
|
}
|
|
992
999
|
case 2: {
|
|
993
|
-
|
|
1000
|
+
b = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
994
1001
|
break;
|
|
995
1002
|
}
|
|
996
1003
|
case 3: {
|
|
997
|
-
|
|
1004
|
+
b = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
998
1005
|
break;
|
|
999
1006
|
}
|
|
1000
1007
|
case 4: {
|
|
1001
|
-
|
|
1008
|
+
b = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1002
1009
|
break;
|
|
1003
1010
|
}
|
|
1004
1011
|
}
|
|
1005
|
-
return
|
|
1012
|
+
return b;
|
|
1013
|
+
}
|
|
1014
|
+
function m(F) {
|
|
1015
|
+
const b = t.componentInstance.value.getBelongedComponentInstance(t.componentInstance);
|
|
1016
|
+
if (b && b.schema && b.schema.componentType) {
|
|
1017
|
+
const { formColumns: w } = b.schema;
|
|
1018
|
+
let R = r(w);
|
|
1019
|
+
R = e == null ? void 0 : e.formSchemaUtils.getControlClassByFormUnifiedLayout(R, "", t.schema), F.appearance || (F.appearance = {}), F.appearance.class = R;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
function v(F, b) {
|
|
1023
|
+
const { bindingSourceContext: w, parentComponentInstance: R } = F;
|
|
1024
|
+
if (w != null && w.entityFieldNode && R) {
|
|
1025
|
+
const C = e == null ? void 0 : e.designViewModelUtils, O = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(R.belongedComponentId), U = C.getDgViewModel(O);
|
|
1026
|
+
U.removeField([w.entityFieldNode.id]), U.addField(w.designViewModelField), b && U.changeField(w.entityFieldNode.id, { editor: { $type: b } });
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
function h(F, b) {
|
|
1030
|
+
var P, O;
|
|
1031
|
+
const w = n;
|
|
1032
|
+
if ((w.appearance && w.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1033
|
+
const { label: U } = F;
|
|
1034
|
+
let z;
|
|
1035
|
+
return (P = F.bindingSourceContext) != null && P.entityFieldNode ? z = (e == null ? void 0 : e.controlCreatorUtils).setFormFieldProperty((O = F.bindingSourceContext) == null ? void 0 : O.entityFieldNode, b.type) : (z = ke("form-group"), z.editor = b, z.label = U), m(z), v(F, b.type), z;
|
|
1036
|
+
}
|
|
1037
|
+
return b;
|
|
1006
1038
|
}
|
|
1007
1039
|
function g() {
|
|
1008
1040
|
return a;
|
|
1009
1041
|
}
|
|
1010
|
-
function
|
|
1042
|
+
function x() {
|
|
1011
1043
|
return l;
|
|
1012
1044
|
}
|
|
1013
|
-
function
|
|
1045
|
+
function M() {
|
|
1014
1046
|
return !1;
|
|
1015
1047
|
}
|
|
1016
|
-
function
|
|
1017
|
-
return new
|
|
1048
|
+
function y(F) {
|
|
1049
|
+
return new Eo(F, e).getPropertyConfig(n, t.componentInstance.value);
|
|
1018
1050
|
}
|
|
1019
1051
|
return {
|
|
1020
1052
|
canAccepts: u,
|
|
1021
|
-
checkCanDeleteComponent:
|
|
1053
|
+
checkCanDeleteComponent: x,
|
|
1022
1054
|
checkCanMoveComponent: g,
|
|
1023
|
-
getStyles:
|
|
1024
|
-
getPropsConfig:
|
|
1025
|
-
hideNestedPaddingInDesginerView:
|
|
1026
|
-
onAcceptMovedChildElement:
|
|
1027
|
-
onResolveNewComponentSchema:
|
|
1055
|
+
getStyles: d,
|
|
1056
|
+
getPropsConfig: y,
|
|
1057
|
+
hideNestedPaddingInDesginerView: M,
|
|
1058
|
+
onAcceptMovedChildElement: i,
|
|
1059
|
+
onResolveNewComponentSchema: h
|
|
1028
1060
|
};
|
|
1029
1061
|
}
|
|
1030
|
-
function
|
|
1031
|
-
const
|
|
1032
|
-
return
|
|
1062
|
+
function Ze(t) {
|
|
1063
|
+
const e = t.nativeElement ? t.nativeElement : t;
|
|
1064
|
+
return e.classList !== void 0 && e.classList !== null ? e : null;
|
|
1033
1065
|
}
|
|
1034
|
-
function
|
|
1035
|
-
if (
|
|
1066
|
+
function _e(t, e) {
|
|
1067
|
+
if (e === void 0)
|
|
1036
1068
|
return;
|
|
1037
|
-
const n =
|
|
1038
|
-
n && n.classList.remove(
|
|
1069
|
+
const n = Ze(t);
|
|
1070
|
+
n && n.classList.remove(e);
|
|
1039
1071
|
}
|
|
1040
|
-
function
|
|
1041
|
-
if (
|
|
1072
|
+
function Fe(t, e) {
|
|
1073
|
+
if (e === void 0)
|
|
1042
1074
|
return;
|
|
1043
|
-
const n =
|
|
1044
|
-
n && n.classList.add(
|
|
1075
|
+
const n = Ze(t);
|
|
1076
|
+
n && n.classList.add(e);
|
|
1045
1077
|
}
|
|
1046
1078
|
const be = [
|
|
1047
1079
|
{ size: "sm", width: 576 },
|
|
@@ -1050,53 +1082,52 @@ const be = [
|
|
|
1050
1082
|
{ size: "xl", width: 1200 },
|
|
1051
1083
|
{ size: "el", width: 1690 }
|
|
1052
1084
|
];
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1055
|
-
if (!n || n.length < 1 || !n[0].contentRect)
|
|
1056
|
-
return;
|
|
1057
|
-
const o = n[0].contentRect;
|
|
1058
|
-
Math.abs(parseInt(o.width + "") - e.width) > e.threshold && (_e(e, t, o.width), e.width = parseInt(o.width + ""));
|
|
1059
|
-
}), e.resizeObserver.observe(t)) : Ke(e);
|
|
1060
|
-
}
|
|
1061
|
-
function Ke(e) {
|
|
1062
|
-
e.resizeObserver && (e.resizeObserver.disconnect(), e.sharedObject = null);
|
|
1085
|
+
function Ke(t) {
|
|
1086
|
+
t.resizeObserver && (t.resizeObserver.disconnect(), t.sharedObject = null);
|
|
1063
1087
|
}
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1066
|
-
if (!
|
|
1088
|
+
function et(t, e, n = 0) {
|
|
1089
|
+
const o = [];
|
|
1090
|
+
if (!e)
|
|
1067
1091
|
return;
|
|
1068
|
-
const a = n ||
|
|
1069
|
-
let s = parseFloat(a);
|
|
1092
|
+
const a = n || e.getBoundingClientRect().width, s = parseFloat(a);
|
|
1070
1093
|
for (let l = 0; l < be.length; l++)
|
|
1071
1094
|
be[l].width <= s && o.push(be[l].size);
|
|
1072
|
-
if (
|
|
1073
|
-
if (
|
|
1074
|
-
for (let c = o.length; c <
|
|
1075
|
-
|
|
1095
|
+
if (t.className.join(",") !== o.join(",")) {
|
|
1096
|
+
if (t.className.length - o.length > 0)
|
|
1097
|
+
for (let c = o.length; c < t.className.length; c++)
|
|
1098
|
+
_e(e, "f-area-response--" + t.className[c]);
|
|
1076
1099
|
else
|
|
1077
|
-
for (let c =
|
|
1078
|
-
|
|
1079
|
-
|
|
1100
|
+
for (let c = t.className.length; c < o.length; c++)
|
|
1101
|
+
Fe(e, "f-area-response--" + o[c]);
|
|
1102
|
+
t.className = [...o];
|
|
1080
1103
|
}
|
|
1081
1104
|
}
|
|
1082
|
-
function
|
|
1083
|
-
|
|
1084
|
-
|
|
1105
|
+
function So(t, e) {
|
|
1106
|
+
t.enable && t.autoWidth ? t.resizeObserver || (t.resizeObserver = new ResizeObserver((n) => {
|
|
1107
|
+
if (!n || n.length < 1 || !n[0].contentRect)
|
|
1108
|
+
return;
|
|
1109
|
+
const o = n[0].contentRect;
|
|
1110
|
+
Math.abs(parseInt(o.width + "") - t.width) > t.threshold && (et(t, e, o.width), t.width = parseInt(o.width + ""));
|
|
1111
|
+
}), t.resizeObserver.observe(e)) : Ke(t);
|
|
1112
|
+
}
|
|
1113
|
+
function Re(t, e) {
|
|
1114
|
+
if (t.enable)
|
|
1115
|
+
Fe(e, "f-area-response"), et(t, e);
|
|
1085
1116
|
else {
|
|
1086
|
-
|
|
1087
|
-
for (let n =
|
|
1088
|
-
|
|
1089
|
-
|
|
1117
|
+
_e(e, "f-area-response");
|
|
1118
|
+
for (let n = t.className.length; n > 0; n--)
|
|
1119
|
+
Fe(e, "f-area-response--" + t.className[n]);
|
|
1120
|
+
t.className = [];
|
|
1090
1121
|
}
|
|
1091
|
-
|
|
1122
|
+
So(t, e);
|
|
1092
1123
|
}
|
|
1093
|
-
function Ne(
|
|
1094
|
-
|
|
1124
|
+
function Ne(t, e) {
|
|
1125
|
+
e.value && Object.prototype.hasOwnProperty.call(e.value, "enable") && (t.enable = e.value.enable), e.value && Object.prototype.hasOwnProperty.call(e.value, "autoWidth") && (t.autoWidth = e.value.autoWidth);
|
|
1095
1126
|
}
|
|
1096
|
-
const
|
|
1127
|
+
const Lo = {
|
|
1097
1128
|
// 在绑定元素的父组件
|
|
1098
1129
|
// 及他自己的所有子节点都挂载完成后调用
|
|
1099
|
-
mounted: (
|
|
1130
|
+
mounted: (t, e, n) => {
|
|
1100
1131
|
n.sharedObject = {
|
|
1101
1132
|
className: [],
|
|
1102
1133
|
resizeObserver: null,
|
|
@@ -1104,73 +1135,74 @@ const Bo = {
|
|
|
1104
1135
|
autoWidth: !0,
|
|
1105
1136
|
threshold: 10,
|
|
1106
1137
|
width: 0
|
|
1107
|
-
}, Ne(n.sharedObject,
|
|
1138
|
+
}, Ne(n.sharedObject, e), Re(n.sharedObject, t);
|
|
1108
1139
|
},
|
|
1109
1140
|
// 在绑定元素的父组件
|
|
1110
1141
|
// 及他自己的所有子节点都更新后调用
|
|
1111
|
-
updated: function(
|
|
1112
|
-
n.sharedObject = o.sharedObject, Ne(n.sharedObject,
|
|
1142
|
+
updated: function(t, e, n, o) {
|
|
1143
|
+
n.sharedObject = o.sharedObject, Ne(n.sharedObject, e), Re(n.sharedObject, t);
|
|
1113
1144
|
},
|
|
1114
1145
|
// 绑定元素的父组件卸载前调用
|
|
1115
|
-
beforeUnmount(
|
|
1146
|
+
beforeUnmount(t, e, n) {
|
|
1116
1147
|
Ke(n.sharedObject);
|
|
1117
1148
|
}
|
|
1118
|
-
},
|
|
1149
|
+
}, Do = /* @__PURE__ */ H({
|
|
1119
1150
|
name: "FResponseFormDesign",
|
|
1120
1151
|
directives: {
|
|
1121
|
-
"area-response":
|
|
1152
|
+
"area-response": Lo
|
|
1122
1153
|
},
|
|
1123
|
-
props:
|
|
1154
|
+
props: le,
|
|
1124
1155
|
emits: [],
|
|
1125
|
-
setup(
|
|
1126
|
-
const n =
|
|
1127
|
-
|
|
1156
|
+
setup(t, e) {
|
|
1157
|
+
const n = p(), o = ee("design-item-context"), a = ee("designer-host-service"), s = Io(o, a), l = Ye(n, o, s);
|
|
1158
|
+
J(() => {
|
|
1128
1159
|
n.value.componentInstance = l;
|
|
1129
|
-
}),
|
|
1130
|
-
const c =
|
|
1131
|
-
const u =
|
|
1160
|
+
}), e.expose(l.value);
|
|
1161
|
+
const c = L(() => {
|
|
1162
|
+
const u = t.customClass.split(" "), i = {
|
|
1132
1163
|
"drag-container": !0
|
|
1133
1164
|
};
|
|
1134
|
-
return u.reduce((
|
|
1165
|
+
return u.reduce((d, r) => (d[r] = !0, d), i), i;
|
|
1135
1166
|
});
|
|
1136
|
-
return () =>
|
|
1167
|
+
return () => Ae(f("div", {
|
|
1137
1168
|
ref: n,
|
|
1138
1169
|
class: c.value,
|
|
1170
|
+
style: t.customClass,
|
|
1139
1171
|
"data-dragref": `${o.schema.id}-container`,
|
|
1140
1172
|
"data-associate": `${o.schema.id}-component`
|
|
1141
|
-
}, [
|
|
1173
|
+
}, [e.slots.default && e.slots.default()]), [[$e("area-response")]]);
|
|
1142
1174
|
}
|
|
1143
|
-
}),
|
|
1175
|
+
}), Po = {
|
|
1144
1176
|
id: { type: String },
|
|
1145
1177
|
required: { type: Boolean, default: !1 },
|
|
1146
1178
|
text: { type: String, default: "" },
|
|
1147
1179
|
title: { type: String }
|
|
1148
|
-
},
|
|
1180
|
+
}, tt = /* @__PURE__ */ H({
|
|
1149
1181
|
name: "FDynamicFormLabel",
|
|
1150
|
-
props:
|
|
1182
|
+
props: Po,
|
|
1151
1183
|
emits: [],
|
|
1152
|
-
setup(
|
|
1153
|
-
const n =
|
|
1154
|
-
return
|
|
1155
|
-
a.value =
|
|
1156
|
-
}),
|
|
1184
|
+
setup(t, e) {
|
|
1185
|
+
const n = p(t.title || t.text), o = p(t.required), a = p(t.text);
|
|
1186
|
+
return W(() => t.text, () => {
|
|
1187
|
+
a.value = t.text;
|
|
1188
|
+
}), W(() => t.required, (s, l) => {
|
|
1157
1189
|
s !== l && (o.value = s);
|
|
1158
1190
|
}), () => a.value && f("label", {
|
|
1159
1191
|
class: "col-form-label",
|
|
1160
1192
|
title: n.value
|
|
1161
1193
|
}, [o.value && f("span", {
|
|
1162
1194
|
class: "farris-label-info text-danger"
|
|
1163
|
-
}, [
|
|
1195
|
+
}, [X("*")]), f("span", {
|
|
1164
1196
|
class: "farris-label-text"
|
|
1165
1197
|
}, [a.value])]);
|
|
1166
1198
|
}
|
|
1167
|
-
}),
|
|
1199
|
+
}), Vo = /* @__PURE__ */ new Map([
|
|
1168
1200
|
["appearance", We]
|
|
1169
1201
|
]);
|
|
1170
|
-
function
|
|
1171
|
-
return
|
|
1202
|
+
function Ro(t, e, n) {
|
|
1203
|
+
return e;
|
|
1172
1204
|
}
|
|
1173
|
-
const
|
|
1205
|
+
const No = "https://json-schema.org/draft/2020-12/schema", Oo = "https://farris-design.gitee.io/input-group.schema.json", Ao = "input-group", $o = "A Farris Input Component", Uo = "object", jo = {
|
|
1174
1206
|
id: {
|
|
1175
1207
|
description: "The unique identifier for a Input Group",
|
|
1176
1208
|
type: "string"
|
|
@@ -1232,11 +1264,6 @@ const Lo = "https://json-schema.org/draft/2020-12/schema", Do = "https://farris-
|
|
|
1232
1264
|
type: "boolean",
|
|
1233
1265
|
default: !1
|
|
1234
1266
|
},
|
|
1235
|
-
required: {
|
|
1236
|
-
description: "",
|
|
1237
|
-
type: "boolean",
|
|
1238
|
-
default: !1
|
|
1239
|
-
},
|
|
1240
1267
|
tabIndex: {
|
|
1241
1268
|
description: "",
|
|
1242
1269
|
type: "number",
|
|
@@ -1372,18 +1399,24 @@ const Lo = "https://json-schema.org/draft/2020-12/schema", Do = "https://farris-
|
|
|
1372
1399
|
type: "string",
|
|
1373
1400
|
default: ""
|
|
1374
1401
|
}
|
|
1375
|
-
},
|
|
1402
|
+
}, zo = [
|
|
1376
1403
|
"id",
|
|
1377
1404
|
"type"
|
|
1378
|
-
],
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1405
|
+
], qo = [
|
|
1406
|
+
"id",
|
|
1407
|
+
"appearance",
|
|
1408
|
+
"binding",
|
|
1409
|
+
"visible"
|
|
1410
|
+
], Go = {
|
|
1411
|
+
$schema: No,
|
|
1412
|
+
$id: Oo,
|
|
1413
|
+
title: Ao,
|
|
1414
|
+
description: $o,
|
|
1415
|
+
type: Uo,
|
|
1416
|
+
properties: jo,
|
|
1417
|
+
required: zo,
|
|
1418
|
+
ignore: qo
|
|
1419
|
+
}, Ie = {
|
|
1387
1420
|
id: { Type: String, default: "" },
|
|
1388
1421
|
/** 是否自动完成 */
|
|
1389
1422
|
autocomplete: { Type: String, default: "off" },
|
|
@@ -1451,255 +1484,85 @@ const Lo = "https://json-schema.org/draft/2020-12/schema", Do = "https://farris-
|
|
|
1451
1484
|
*/
|
|
1452
1485
|
updateOn: { type: String, default: "blur" }
|
|
1453
1486
|
};
|
|
1454
|
-
|
|
1455
|
-
function
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1458
|
-
"f-utils-fill": !0,
|
|
1459
|
-
"text-left": u.value === "left",
|
|
1460
|
-
"text-center": u.value === "center",
|
|
1461
|
-
"text-right": u.value === "right"
|
|
1462
|
-
})), v = w(() => {
|
|
1463
|
-
const R = {
|
|
1464
|
-
"f-cmp-inputgroup": !0,
|
|
1465
|
-
"input-group": !0,
|
|
1466
|
-
"f-state-disable": a.value,
|
|
1467
|
-
"f-state-editable": i.value,
|
|
1468
|
-
"f-state-readonly": y.value,
|
|
1469
|
-
"f-state-focus": m.value
|
|
1470
|
-
};
|
|
1471
|
-
return (e.customClass || "").split(" ").reduce((te, ne) => (te[ne] = !0, te), R), R;
|
|
1472
|
-
}), T = w(() => c.value ? "" : "border-width : 0 ");
|
|
1473
|
-
function B(R, H = !0) {
|
|
1474
|
-
n.value = R, o.value !== R && (o.value = R), H && t.emit("change", R), t.emit("update:modelValue", R), t.emit("update:value", R);
|
|
1475
|
-
}
|
|
1476
|
-
U(
|
|
1477
|
-
() => e.modelValue,
|
|
1478
|
-
(R, H) => {
|
|
1479
|
-
R !== H && (n.value = R, o.value = R);
|
|
1480
|
-
}
|
|
1481
|
-
), U(() => e.disabled, (R, H) => {
|
|
1482
|
-
R !== H && (a.value = R);
|
|
1483
|
-
});
|
|
1484
|
-
function F(R) {
|
|
1485
|
-
return s.value = !1, t.emit("blur", R), R.stopPropagation(), !1;
|
|
1486
|
-
}
|
|
1487
|
-
function V(R) {
|
|
1488
|
-
t.emit("click", R);
|
|
1489
|
-
}
|
|
1490
|
-
function b(R) {
|
|
1491
|
-
e.disabled || (c.value && (s.value = !0), p.value && t.emit("focus", R));
|
|
1492
|
-
}
|
|
1493
|
-
function D(R) {
|
|
1494
|
-
t.emit("input", R.target.value);
|
|
1495
|
-
const H = R.target.value;
|
|
1496
|
-
o.value = H, r.value === "change" && (t.emit("update:modelValue", H), t.emit("update:value", H));
|
|
1497
|
-
}
|
|
1498
|
-
function j(R) {
|
|
1499
|
-
t.emit("keydown", R);
|
|
1500
|
-
}
|
|
1501
|
-
function q(R) {
|
|
1502
|
-
t.emit("keyup", R);
|
|
1503
|
-
}
|
|
1504
|
-
function X(R) {
|
|
1505
|
-
R.target.tagName !== "INPUT" && R.preventDefault(), R.stopPropagation();
|
|
1506
|
-
}
|
|
1507
|
-
function J(R) {
|
|
1508
|
-
if (r.value === "blur") {
|
|
1509
|
-
const H = R.target.value;
|
|
1510
|
-
R.stopPropagation(), B(H);
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
return {
|
|
1514
|
-
changeTextBoxValue: B,
|
|
1515
|
-
disabled: a,
|
|
1516
|
-
displayText: o,
|
|
1517
|
-
editable: i,
|
|
1518
|
-
hasFocused: m,
|
|
1519
|
-
inputGroupClass: v,
|
|
1520
|
-
inputType: l,
|
|
1521
|
-
isEmpty: h,
|
|
1522
|
-
modelValue: n,
|
|
1523
|
-
readonly: y,
|
|
1524
|
-
onBlur: F,
|
|
1525
|
-
onClick: V,
|
|
1526
|
-
onFocus: b,
|
|
1527
|
-
onInput: D,
|
|
1528
|
-
onKeydown: j,
|
|
1529
|
-
onKeyup: q,
|
|
1530
|
-
onMousedown: X,
|
|
1531
|
-
onTextBoxValueChange: J,
|
|
1532
|
-
placeholder: g,
|
|
1533
|
-
textBoxClass: C,
|
|
1534
|
-
textBoxTitle: x,
|
|
1535
|
-
inputGroupStyle: T
|
|
1536
|
-
};
|
|
1537
|
-
}
|
|
1538
|
-
function jo(e, t, n, o) {
|
|
1539
|
-
const a = d(e.disabled), s = d(!1), l = d("text"), c = d(e.showBorder), u = d(e.textAlign);
|
|
1540
|
-
w(() => e.editable || !e.readonly);
|
|
1541
|
-
const r = w(() => e.editable && !e.disabled && !e.readonly), p = w(() => !e.disabled && s.value), i = w(() => n.value === "" || n.value === null || n.value === void 0), m = w(() => e.placeholder), h = w(() => e.readonly || !e.editable), g = w(() => e.enableTitle ? n.value : ""), y = w(() => ({
|
|
1542
|
-
"form-control": !0,
|
|
1543
|
-
// 'f-utils-fill': true,
|
|
1544
|
-
"text-left": u.value === "left",
|
|
1545
|
-
"text-center": u.value === "center",
|
|
1546
|
-
"text-right": u.value === "right"
|
|
1547
|
-
})), x = w(() => ({
|
|
1548
|
-
"f-cmp-inputgroup": !0,
|
|
1549
|
-
"input-group": !0,
|
|
1550
|
-
"f-state-disable": !0,
|
|
1551
|
-
"f-state-editable": !1,
|
|
1552
|
-
"f-state-readonly": !0
|
|
1553
|
-
// 'f-state-focus': hasFocused.value
|
|
1554
|
-
})), C = w(() => c.value ? "" : "border-width : 0 ");
|
|
1555
|
-
return {
|
|
1556
|
-
// changeTextBoxValue,
|
|
1557
|
-
disabled: a,
|
|
1558
|
-
displayText: o,
|
|
1559
|
-
editable: r,
|
|
1560
|
-
hasFocused: p,
|
|
1561
|
-
inputGroupClass: x,
|
|
1562
|
-
inputType: l,
|
|
1563
|
-
isEmpty: i,
|
|
1564
|
-
modelValue: n,
|
|
1565
|
-
readonly: h,
|
|
1566
|
-
// onBlur,
|
|
1567
|
-
// onClick,
|
|
1568
|
-
// onFocus,
|
|
1569
|
-
// onInput,
|
|
1570
|
-
// onKeydown,
|
|
1571
|
-
// onKeyup,
|
|
1572
|
-
// onMousedown,
|
|
1573
|
-
// onTextBoxValueChange,
|
|
1574
|
-
placeholder: m,
|
|
1575
|
-
textBoxClass: y,
|
|
1576
|
-
textBoxTitle: g,
|
|
1577
|
-
inputGroupStyle: C
|
|
1578
|
-
};
|
|
1579
|
-
}
|
|
1580
|
-
function tt(e, t, n) {
|
|
1581
|
-
const o = d(!1), a = w(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: s, displayText: l, hasFocused: c, isEmpty: u } = n;
|
|
1582
|
-
function r(y) {
|
|
1583
|
-
o.value = y;
|
|
1584
|
-
}
|
|
1585
|
-
U(l, () => {
|
|
1586
|
-
c != null && c.value ? r(!!(l != null && l.value)) : r(!1);
|
|
1587
|
-
});
|
|
1588
|
-
const p = w(() => ({
|
|
1589
|
-
"input-group-text": !0,
|
|
1590
|
-
"input-group-clear": !0
|
|
1591
|
-
})), i = w(() => ({
|
|
1592
|
-
width: "24px",
|
|
1593
|
-
display: o.value ? "flex" : "none"
|
|
1594
|
-
}));
|
|
1595
|
-
function m(y) {
|
|
1596
|
-
y.stopPropagation(), a.value && (s("", !0), r(!o.value), t.emit("clear"));
|
|
1597
|
-
}
|
|
1598
|
-
function h(y) {
|
|
1599
|
-
a.value && !u.value && r(!0);
|
|
1600
|
-
}
|
|
1601
|
-
function g(y) {
|
|
1602
|
-
a.value && r(!1);
|
|
1603
|
-
}
|
|
1604
|
-
return { clearButtonClass: p, clearButtonStyle: i, hasShownClearButton: o, onClearValue: m, onMouseEnter: h, onMouseLeave: g, shouldShowClearButton: a };
|
|
1605
|
-
}
|
|
1606
|
-
const zo = ["moz", "ms", "webkit"];
|
|
1607
|
-
function qo() {
|
|
1608
|
-
let e = 0;
|
|
1609
|
-
return (t) => {
|
|
1610
|
-
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), a = setTimeout(() => {
|
|
1611
|
-
t(n + o);
|
|
1612
|
-
}, o);
|
|
1613
|
-
return e = n + o, a;
|
|
1614
|
-
};
|
|
1615
|
-
}
|
|
1616
|
-
function Uo() {
|
|
1617
|
-
if (typeof window > "u")
|
|
1618
|
-
return () => 0;
|
|
1619
|
-
if (window.requestAnimationFrame)
|
|
1620
|
-
return window.requestAnimationFrame.bind(window);
|
|
1621
|
-
const e = zo.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
1622
|
-
return e ? window[`${e}RequestAnimationFrame`] : qo();
|
|
1623
|
-
}
|
|
1624
|
-
Uo();
|
|
1625
|
-
function nt(e, t) {
|
|
1626
|
-
const n = d(e.groupText), o = w(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), a = w(() => e.enableClear || !!e.groupText);
|
|
1627
|
-
return { appendedButtonClass: w(() => ({
|
|
1487
|
+
de(Ie, Go, Vo, Ro);
|
|
1488
|
+
function nt(t, e) {
|
|
1489
|
+
const n = p(t.groupText), o = L(() => t.showButtonWhenDisabled && (t.readonly || t.disabled)), a = L(() => t.enableClear || !!t.groupText);
|
|
1490
|
+
return { appendedButtonClass: L(() => ({
|
|
1628
1491
|
"input-group-append": !0,
|
|
1629
1492
|
"append-force-show": o.value
|
|
1630
1493
|
})), appendedContent: n, shouldShowAppendedButton: a };
|
|
1631
1494
|
}
|
|
1632
|
-
function ot(
|
|
1633
|
-
const { appendedContent: a } = o, s =
|
|
1634
|
-
|
|
1635
|
-
l.value && (n.value = m ||
|
|
1495
|
+
function ot(t, e, n, o) {
|
|
1496
|
+
const { appendedContent: a } = o, s = p(t.enableViewPassword), l = L(() => t.type === "password"), c = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', u = '<span class="f-icon f-icon-eye"></span>', i = p(!1);
|
|
1497
|
+
W(() => [t.readonly, t.disabled], ([m, v]) => {
|
|
1498
|
+
l.value && (n.value = m || v ? "password" : n.value, a.value = m || v ? u : a.value);
|
|
1636
1499
|
});
|
|
1637
|
-
function
|
|
1638
|
-
return
|
|
1500
|
+
function d() {
|
|
1501
|
+
return i.value = !i.value, n.value = i.value ? "text" : "password", a.value = i.value ? c : u, !1;
|
|
1639
1502
|
}
|
|
1640
|
-
function
|
|
1503
|
+
function r() {
|
|
1641
1504
|
n.value = l.value ? "password" : "text", a.value = l.value ? s.value ? u : "" : a.value;
|
|
1642
1505
|
}
|
|
1643
|
-
return
|
|
1506
|
+
return r(), { isPassword: l, onClickAppendedButton: d };
|
|
1644
1507
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const o =
|
|
1508
|
+
function Wo(t, e, n) {
|
|
1509
|
+
const o = p(), {
|
|
1647
1510
|
onBlurTextBox: a,
|
|
1648
1511
|
onFocusTextBox: s,
|
|
1649
1512
|
onInput: l,
|
|
1650
1513
|
onKeyDown: c,
|
|
1651
1514
|
textBoxValue: u
|
|
1652
|
-
} = n,
|
|
1515
|
+
} = n, i = L(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), d = L(() => ({
|
|
1653
1516
|
"form-control": !0,
|
|
1654
1517
|
"f-utils-fill": !0
|
|
1655
|
-
})),
|
|
1656
|
-
"text-align":
|
|
1518
|
+
})), r = L(() => ({
|
|
1519
|
+
"text-align": t.textAlign
|
|
1657
1520
|
}));
|
|
1658
|
-
function m(
|
|
1659
|
-
|
|
1521
|
+
function m(g) {
|
|
1522
|
+
g.stopPropagation();
|
|
1660
1523
|
}
|
|
1661
|
-
function
|
|
1662
|
-
|
|
1524
|
+
function v() {
|
|
1525
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
1663
1526
|
}
|
|
1664
|
-
async function g
|
|
1665
|
-
s(
|
|
1527
|
+
async function h(g) {
|
|
1528
|
+
s(g), await ue, v();
|
|
1666
1529
|
}
|
|
1667
|
-
return
|
|
1668
|
-
await
|
|
1530
|
+
return J(async () => {
|
|
1531
|
+
await ue, v();
|
|
1669
1532
|
}), () => f("input", {
|
|
1670
1533
|
ref: o,
|
|
1671
|
-
class:
|
|
1672
|
-
style:
|
|
1534
|
+
class: d.value,
|
|
1535
|
+
style: r.value,
|
|
1673
1536
|
type: "text",
|
|
1674
1537
|
value: u.value,
|
|
1675
|
-
disabled:
|
|
1676
|
-
readonly:
|
|
1677
|
-
placeholder:
|
|
1538
|
+
disabled: t.disabled,
|
|
1539
|
+
readonly: t.readonly || !t.editable,
|
|
1540
|
+
placeholder: i.value,
|
|
1678
1541
|
onBlur: a,
|
|
1679
1542
|
onChange: m,
|
|
1680
|
-
onFocus:
|
|
1543
|
+
onFocus: h,
|
|
1681
1544
|
onInput: l,
|
|
1682
1545
|
onKeydown: c
|
|
1683
1546
|
}, null);
|
|
1684
1547
|
}
|
|
1685
|
-
function
|
|
1548
|
+
function Ho(t, e, n) {
|
|
1686
1549
|
const {
|
|
1687
1550
|
canDownward: o,
|
|
1688
1551
|
canUpward: a,
|
|
1689
1552
|
onClickDownButton: s,
|
|
1690
1553
|
onClickUpButton: l
|
|
1691
|
-
} = n, c =
|
|
1554
|
+
} = n, c = L(() => ({
|
|
1692
1555
|
"input-group-append": !0,
|
|
1693
1556
|
"btn-group": !0,
|
|
1694
1557
|
"btn-group-number": !0
|
|
1695
|
-
})), u =
|
|
1558
|
+
})), u = L(() => ({
|
|
1696
1559
|
btn: !0,
|
|
1697
1560
|
"btn-secondary": !0,
|
|
1698
1561
|
"btn-number-flag": !0
|
|
1699
|
-
})),
|
|
1562
|
+
})), i = L(() => ({
|
|
1700
1563
|
cursor: a() ? "pointer" : "not-allowed",
|
|
1701
1564
|
"margin-left": 0
|
|
1702
|
-
})),
|
|
1565
|
+
})), d = L(() => ({
|
|
1703
1566
|
cursor: o() ? "pointer" : "not-allowed",
|
|
1704
1567
|
"margin-left": 0
|
|
1705
1568
|
}));
|
|
@@ -1708,7 +1571,7 @@ function Wo(e, t, n) {
|
|
|
1708
1571
|
}, [f("button", {
|
|
1709
1572
|
title: "upButton",
|
|
1710
1573
|
class: u.value,
|
|
1711
|
-
style:
|
|
1574
|
+
style: i.value,
|
|
1712
1575
|
onClick: l,
|
|
1713
1576
|
disabled: !a()
|
|
1714
1577
|
}, [f("span", {
|
|
@@ -1716,196 +1579,196 @@ function Wo(e, t, n) {
|
|
|
1716
1579
|
}, null)]), f("button", {
|
|
1717
1580
|
title: "downButton",
|
|
1718
1581
|
class: u.value,
|
|
1719
|
-
style:
|
|
1582
|
+
style: d.value,
|
|
1720
1583
|
onClick: s,
|
|
1721
1584
|
disabled: !o()
|
|
1722
1585
|
}, [f("span", {
|
|
1723
1586
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1724
1587
|
}, null)])]);
|
|
1725
1588
|
}
|
|
1726
|
-
function
|
|
1727
|
-
const n =
|
|
1589
|
+
function Xo(t, e) {
|
|
1590
|
+
const n = $t(t, e), o = Ut(t, e, n), a = jt(t, e, o, n), s = zt(t, e, o, n, a), l = Ho(t, e, a), {
|
|
1728
1591
|
displayValue: c,
|
|
1729
1592
|
modelValue: u,
|
|
1730
|
-
getRealValue:
|
|
1731
|
-
} = n,
|
|
1732
|
-
format:
|
|
1593
|
+
getRealValue: i
|
|
1594
|
+
} = n, d = Wo(t, e, s), {
|
|
1595
|
+
format: r
|
|
1733
1596
|
} = o, {
|
|
1734
1597
|
isFocus: m
|
|
1735
|
-
} = s,
|
|
1736
|
-
return
|
|
1737
|
-
const
|
|
1738
|
-
c.value =
|
|
1739
|
-
}),
|
|
1740
|
-
const
|
|
1741
|
-
u.value =
|
|
1742
|
-
}),
|
|
1743
|
-
|
|
1744
|
-
}),
|
|
1745
|
-
c.value =
|
|
1598
|
+
} = s, v = L(() => !t.disabled && !t.readonly);
|
|
1599
|
+
return J(() => {
|
|
1600
|
+
const h = i(t.modelValue);
|
|
1601
|
+
c.value = r(h);
|
|
1602
|
+
}), W(() => [t.value], ([h]) => {
|
|
1603
|
+
const g = i(h);
|
|
1604
|
+
u.value = g, c.value = r(g);
|
|
1605
|
+
}), W(() => [t.modelValue], ([h]) => {
|
|
1606
|
+
h !== u.value && (u.value = h, !m.value && (c.value = r(i(h))));
|
|
1607
|
+
}), W(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
|
|
1608
|
+
c.value = r(u.value);
|
|
1746
1609
|
}), () => f("div", {
|
|
1747
1610
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1748
|
-
}, [
|
|
1611
|
+
}, [d(), v.value && l()]);
|
|
1749
1612
|
}
|
|
1750
|
-
function
|
|
1751
|
-
const a =
|
|
1613
|
+
function Yo(t, e, n, o) {
|
|
1614
|
+
const a = p(), s = p(t.autocomplete), l = p(t.enableTitle), {
|
|
1752
1615
|
isPassword: c
|
|
1753
|
-
} = n, u =
|
|
1754
|
-
disabled:
|
|
1616
|
+
} = n, u = p(t.minLength), i = p(t.maxLength), d = p(t.tabIndex), {
|
|
1617
|
+
disabled: r,
|
|
1755
1618
|
displayText: m,
|
|
1756
|
-
inputType:
|
|
1757
|
-
onBlur:
|
|
1758
|
-
onFocus:
|
|
1619
|
+
inputType: v,
|
|
1620
|
+
onBlur: h,
|
|
1621
|
+
onFocus: g,
|
|
1759
1622
|
onInput: x,
|
|
1760
|
-
onClick:
|
|
1761
|
-
onKeydown:
|
|
1762
|
-
onKeyup:
|
|
1763
|
-
onMousedown:
|
|
1764
|
-
onTextBoxValueChange:
|
|
1765
|
-
readonly:
|
|
1766
|
-
placeholder:
|
|
1767
|
-
textBoxClass:
|
|
1768
|
-
textBoxTitle:
|
|
1623
|
+
onClick: M,
|
|
1624
|
+
onKeydown: y,
|
|
1625
|
+
onKeyup: F,
|
|
1626
|
+
onMousedown: b,
|
|
1627
|
+
onTextBoxValueChange: w,
|
|
1628
|
+
readonly: R,
|
|
1629
|
+
placeholder: C,
|
|
1630
|
+
textBoxClass: P,
|
|
1631
|
+
textBoxTitle: O
|
|
1769
1632
|
} = o;
|
|
1770
|
-
return
|
|
1771
|
-
|
|
1633
|
+
return J(() => {
|
|
1634
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
1772
1635
|
}), () => f("input", {
|
|
1773
1636
|
ref: a,
|
|
1774
1637
|
name: "input-group-value",
|
|
1775
1638
|
autocomplete: s.value,
|
|
1776
|
-
class:
|
|
1777
|
-
disabled:
|
|
1778
|
-
maxlength:
|
|
1639
|
+
class: P.value,
|
|
1640
|
+
disabled: r == null ? void 0 : r.value,
|
|
1641
|
+
maxlength: i.value,
|
|
1779
1642
|
minlength: u.value,
|
|
1780
|
-
placeholder:
|
|
1781
|
-
readonly:
|
|
1782
|
-
tabindex:
|
|
1783
|
-
title: l.value && !c.value ?
|
|
1784
|
-
type:
|
|
1643
|
+
placeholder: C.value,
|
|
1644
|
+
readonly: R == null ? void 0 : R.value,
|
|
1645
|
+
tabindex: d.value,
|
|
1646
|
+
title: l.value && !c.value ? O.value : "",
|
|
1647
|
+
type: v.value,
|
|
1785
1648
|
value: m == null ? void 0 : m.value,
|
|
1786
|
-
onBlur:
|
|
1787
|
-
onClick:
|
|
1788
|
-
onChange:
|
|
1789
|
-
onFocus:
|
|
1649
|
+
onBlur: h,
|
|
1650
|
+
onClick: M,
|
|
1651
|
+
onChange: w,
|
|
1652
|
+
onFocus: g,
|
|
1790
1653
|
onInput: x,
|
|
1791
|
-
onKeydown:
|
|
1792
|
-
onKeyup:
|
|
1793
|
-
onMousedown:
|
|
1654
|
+
onKeydown: y,
|
|
1655
|
+
onKeyup: F,
|
|
1656
|
+
onMousedown: b
|
|
1794
1657
|
}, null);
|
|
1795
1658
|
}
|
|
1796
|
-
function
|
|
1797
|
-
const n =
|
|
1798
|
-
content:
|
|
1659
|
+
function Jo(t, e) {
|
|
1660
|
+
const n = L(() => t.useExtendInfo && !!t.extendInfo), o = Z({
|
|
1661
|
+
content: t.extendInfo
|
|
1799
1662
|
});
|
|
1800
1663
|
function a() {
|
|
1801
|
-
|
|
1664
|
+
e.emit("updateExtendInfo");
|
|
1802
1665
|
}
|
|
1803
|
-
return () => n.value &&
|
|
1666
|
+
return () => n.value && Ae(f("span", {
|
|
1804
1667
|
class: "input-group-before-tips",
|
|
1805
1668
|
onMouseenter: a
|
|
1806
1669
|
}, [f("i", {
|
|
1807
1670
|
class: "f-icon f-icon-info-circle"
|
|
1808
1671
|
}, null), f("b", {
|
|
1809
1672
|
class: "tips-arrow"
|
|
1810
|
-
}, null)]), [[
|
|
1673
|
+
}, null)]), [[$e("tooltip"), o]]);
|
|
1811
1674
|
}
|
|
1812
|
-
function at(
|
|
1675
|
+
function at(t, e, n, o, a) {
|
|
1813
1676
|
const {
|
|
1814
1677
|
appendedButtonClass: s,
|
|
1815
1678
|
appendedContent: l
|
|
1816
|
-
} = n, c =
|
|
1817
|
-
clearButtonClass:
|
|
1818
|
-
clearButtonStyle:
|
|
1679
|
+
} = n, c = L(() => t.showButtonWhenDisabled && (!t.editable || !t.readonly) && !t.disabled), u = L(() => l.value && !e.slots.groupTextTemplate), i = L(() => !!e.slots.groupTextTemplate), {
|
|
1680
|
+
clearButtonClass: d,
|
|
1681
|
+
clearButtonStyle: r,
|
|
1819
1682
|
onClearValue: m,
|
|
1820
|
-
shouldShowClearButton:
|
|
1683
|
+
shouldShowClearButton: v
|
|
1821
1684
|
} = o;
|
|
1822
|
-
function
|
|
1685
|
+
function h() {
|
|
1823
1686
|
return f("span", {
|
|
1824
1687
|
id: "clearIcon",
|
|
1825
|
-
class:
|
|
1826
|
-
style:
|
|
1827
|
-
onClick: (
|
|
1688
|
+
class: d.value,
|
|
1689
|
+
style: r.value,
|
|
1690
|
+
onClick: (C) => m(C)
|
|
1828
1691
|
}, [f("i", {
|
|
1829
1692
|
class: "f-icon modal_close"
|
|
1830
1693
|
}, null)]);
|
|
1831
1694
|
}
|
|
1832
|
-
function
|
|
1833
|
-
|
|
1695
|
+
function g(C) {
|
|
1696
|
+
e.emit("iconMouseEnter", C);
|
|
1834
1697
|
}
|
|
1835
|
-
function x(
|
|
1836
|
-
|
|
1698
|
+
function x(C) {
|
|
1699
|
+
e.emit("iconMouseLeave", C);
|
|
1837
1700
|
}
|
|
1838
|
-
function C
|
|
1839
|
-
c.value &&
|
|
1840
|
-
originalEvent:
|
|
1841
|
-
}),
|
|
1701
|
+
function M(C) {
|
|
1702
|
+
c.value && e.emit("clickHandle", {
|
|
1703
|
+
originalEvent: C
|
|
1704
|
+
}), C.stopPropagation();
|
|
1842
1705
|
}
|
|
1843
|
-
const
|
|
1844
|
-
function
|
|
1706
|
+
const y = t.type === "password" ? a.onClickAppendedButton : M;
|
|
1707
|
+
function F() {
|
|
1845
1708
|
return f("span", {
|
|
1846
1709
|
class: "input-group-text",
|
|
1847
|
-
onMouseenter: (
|
|
1848
|
-
onMouseleave: (
|
|
1710
|
+
onMouseenter: (C) => g(C),
|
|
1711
|
+
onMouseleave: (C) => x(C),
|
|
1849
1712
|
innerHTML: l.value,
|
|
1850
|
-
onClick: (
|
|
1713
|
+
onClick: (C) => y(C)
|
|
1851
1714
|
}, null);
|
|
1852
1715
|
}
|
|
1853
|
-
function
|
|
1854
|
-
return
|
|
1716
|
+
function b() {
|
|
1717
|
+
return e.slots.groupTextTemplate && e.slots.groupTextTemplate();
|
|
1855
1718
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return u.value ?
|
|
1719
|
+
function w() {
|
|
1720
|
+
return u.value ? F : i.value ? b : "";
|
|
1858
1721
|
}
|
|
1859
|
-
const
|
|
1722
|
+
const R = w();
|
|
1860
1723
|
return () => f("div", {
|
|
1861
1724
|
class: s.value
|
|
1862
|
-
}, [
|
|
1725
|
+
}, [v.value && h(), R && R()]);
|
|
1863
1726
|
}
|
|
1864
|
-
const
|
|
1727
|
+
const Qo = /* @__PURE__ */ H({
|
|
1865
1728
|
name: "FInputGroup",
|
|
1866
|
-
props:
|
|
1729
|
+
props: Ie,
|
|
1867
1730
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
1868
|
-
setup(
|
|
1869
|
-
const n =
|
|
1731
|
+
setup(t, e) {
|
|
1732
|
+
const n = p(t.modelValue), o = p(t.modelValue), a = Nt(t, e, n, o), {
|
|
1870
1733
|
inputGroupClass: s,
|
|
1871
1734
|
inputType: l,
|
|
1872
1735
|
inputGroupStyle: c
|
|
1873
|
-
} = a, u = nt(
|
|
1874
|
-
shouldShowAppendedButton:
|
|
1875
|
-
} = u,
|
|
1876
|
-
onMouseEnter:
|
|
1736
|
+
} = a, u = nt(t), {
|
|
1737
|
+
shouldShowAppendedButton: i
|
|
1738
|
+
} = u, d = je(t, e, a), {
|
|
1739
|
+
onMouseEnter: r,
|
|
1877
1740
|
onMouseLeave: m
|
|
1878
|
-
} =
|
|
1879
|
-
|
|
1880
|
-
n.value =
|
|
1881
|
-
}),
|
|
1882
|
-
n.value =
|
|
1883
|
-
}),
|
|
1884
|
-
|
|
1741
|
+
} = d, v = ot(t, e, l, u), h = Xo(t, e), g = Yo(t, e, v, a), x = at(t, e, u, d, v), M = Jo(t, e), y = L(() => t.type === "number");
|
|
1742
|
+
W(() => [t.value], ([b]) => {
|
|
1743
|
+
n.value = b, o.value = b;
|
|
1744
|
+
}), W(() => [t.modelValue], ([b]) => {
|
|
1745
|
+
n.value = b, o.value = b;
|
|
1746
|
+
}), J(() => {
|
|
1747
|
+
t.value && (n.value = t.value, o.value = t.value);
|
|
1885
1748
|
});
|
|
1886
|
-
const
|
|
1887
|
-
id:
|
|
1749
|
+
const F = () => f(ae, null, [f("div", {
|
|
1750
|
+
id: t.id,
|
|
1888
1751
|
class: s.value,
|
|
1889
1752
|
style: c.value,
|
|
1890
|
-
onMouseenter:
|
|
1753
|
+
onMouseenter: r,
|
|
1891
1754
|
onMouseleave: m
|
|
1892
|
-
}, [
|
|
1893
|
-
return () =>
|
|
1755
|
+
}, [y.value ? h() : f(ae, null, [M(), g(), i.value && x()])])]);
|
|
1756
|
+
return () => F();
|
|
1894
1757
|
}
|
|
1895
|
-
}),
|
|
1758
|
+
}), B = {}, k = {}, E = {}, S = {};
|
|
1896
1759
|
let Oe = !1;
|
|
1897
|
-
function
|
|
1898
|
-
Oe || (Oe = !0,
|
|
1760
|
+
function Zo() {
|
|
1761
|
+
Oe || (Oe = !0, Gt.register(B, k, E, S), qt.register(B, k, E, S), Wt.register(B, k, E, S), Ht.register(B, k, E, S), Xt.register(B, k, E, S), Yt.register(B, k, E, S), Jt.register(B, k, E, S), oe.register(B, k, E, S), Qt.register(B, k, E, S), Zt.register(B, k, E, S), Kt.register(B, k, E, S), _t.register(B, k, E, S), en.register(B, k, E, S), tn.register(B, k, E, S), nn.register(B, k, E, S), on.register(B, k, E, S), an.register(B, k, E, S), ln.register(B, k, E, S), sn.register(B, k, E, S), un.register(B, k, E, S), cn.register(B, k, E, S), dn.register(B, k, E, S), mn.register(B, k, E, S), pn.register(B, k, E, S), fn.register(B, k, E, S), vn.register(B, k, E, S), hn.register(B, k, E, S), yn.register(B, k, E, S), At.register(B, k, E, S), gn.register(B, k, E, S), Cn.register(B, k, E, S), bn.register(B, k, E, S), wn.register(B, k, E, S), Mn.register(B, k, E, S), xn.register(B, k, E, S), Fn.register(B, k, E, S), Tn.register(B, k, E, S), kn.register(B, k, E, S), En.register(B, k, E, S), Bn.register(B, k, E, S), Hn.register(B, k, E), In.register(B, k, E, S), Sn.register(B, k, E, S), Ln.register(B, k, E, S), Dn.register(B, k, E, S), Pn.register(B, k, E, S), Vn.register(B, k, E, S), Rn.register(B, k, E, S), Nn.register(B, k, E, S), On.register(B, k, E, S), An.register(B, k, E, S), $n.register(B, k, E, S), Un.register(B, k, E, S), zn.register(B, k, E, S), jn.register(B, k, E, S), qn.register(B, k, E, S), Gn.register(B, k, E, S), Wn.register(B, k, E, S), Xn.register(B, k, E, S), rn.register(B, k, E, S), Yn.register(B, k, E, S));
|
|
1899
1762
|
}
|
|
1900
1763
|
function lt() {
|
|
1901
|
-
|
|
1764
|
+
Zo();
|
|
1765
|
+
function t(a) {
|
|
1766
|
+
return B[a] || Qo;
|
|
1767
|
+
}
|
|
1902
1768
|
function e(a, s) {
|
|
1903
|
-
const l =
|
|
1769
|
+
const l = k[a];
|
|
1904
1770
|
return l ? l(s) : {};
|
|
1905
1771
|
}
|
|
1906
|
-
function t(a) {
|
|
1907
|
-
return S[a] || Jo;
|
|
1908
|
-
}
|
|
1909
1772
|
function n(a) {
|
|
1910
1773
|
switch (a) {
|
|
1911
1774
|
case "check-box":
|
|
@@ -1953,9 +1816,12 @@ function lt() {
|
|
|
1953
1816
|
return "onSavedCommandListChanged";
|
|
1954
1817
|
case "grid-field-editor":
|
|
1955
1818
|
return "onChange";
|
|
1819
|
+
case "item-collection-editor":
|
|
1820
|
+
return "onChange";
|
|
1956
1821
|
case "response-form-layout-setting":
|
|
1957
1822
|
return "onChange";
|
|
1958
1823
|
case "field-selector":
|
|
1824
|
+
case "binding-selector":
|
|
1959
1825
|
return "onFieldSelected";
|
|
1960
1826
|
case "schema-selector":
|
|
1961
1827
|
return "onSchemaSelected";
|
|
@@ -1963,6 +1829,8 @@ function lt() {
|
|
|
1963
1829
|
return "onMappingFieldsChanged";
|
|
1964
1830
|
case "textarea":
|
|
1965
1831
|
return "onValueChange";
|
|
1832
|
+
case "query-solution-config":
|
|
1833
|
+
return "onFieldsChanged";
|
|
1966
1834
|
}
|
|
1967
1835
|
}
|
|
1968
1836
|
function o(a) {
|
|
@@ -1975,181 +1843,145 @@ function lt() {
|
|
|
1975
1843
|
}
|
|
1976
1844
|
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: n, getClearFunctionName: o };
|
|
1977
1845
|
}
|
|
1978
|
-
const we = /* @__PURE__ */
|
|
1846
|
+
const we = /* @__PURE__ */ H({
|
|
1979
1847
|
name: "FDynamicFormGroup",
|
|
1980
|
-
props:
|
|
1848
|
+
props: le,
|
|
1981
1849
|
emits: ["change", "update:modelValue"],
|
|
1982
|
-
setup(
|
|
1983
|
-
const n =
|
|
1984
|
-
|
|
1985
|
-
const
|
|
1850
|
+
setup(t, e) {
|
|
1851
|
+
const n = p(t.id), o = p(t.customClass), a = p(t.editor), s = p(t.label), l = p(t.modelValue), c = p(t.readonly), u = p(t.required), i = p(t.showLabel), d = p(t.visible);
|
|
1852
|
+
p(t.type);
|
|
1853
|
+
const r = p(), {
|
|
1986
1854
|
resolveEditorProps: m,
|
|
1987
|
-
resolveEditorType:
|
|
1988
|
-
getChangeFunctionName:
|
|
1989
|
-
getClearFunctionName:
|
|
1990
|
-
} = lt(), x =
|
|
1855
|
+
resolveEditorType: v,
|
|
1856
|
+
getChangeFunctionName: h,
|
|
1857
|
+
getClearFunctionName: g
|
|
1858
|
+
} = lt(), x = L(() => ({
|
|
1991
1859
|
"form-group": !0,
|
|
1992
1860
|
"farris-form-group": !0,
|
|
1993
1861
|
"common-group": !0,
|
|
1994
1862
|
"q-state-readonly": c.value
|
|
1995
1863
|
}));
|
|
1996
|
-
function
|
|
1997
|
-
l.value =
|
|
1864
|
+
function M(b, w) {
|
|
1865
|
+
l.value = w !== void 0 ? w : b, e.emit("update:modelValue", l.value), e.emit("change", l.value);
|
|
1998
1866
|
}
|
|
1999
|
-
function
|
|
2000
|
-
|
|
1867
|
+
function y() {
|
|
1868
|
+
e.emit("update:modelValue", "");
|
|
2001
1869
|
}
|
|
2002
|
-
const
|
|
2003
|
-
const
|
|
2004
|
-
return
|
|
2005
|
-
ref:
|
|
2006
|
-
},
|
|
1870
|
+
const F = L(() => {
|
|
1871
|
+
const b = a.value.type || "input-group", w = v(b), R = m(b, a.value), C = h(b), P = g(a.value.type);
|
|
1872
|
+
return P && (R[P] = y), R[C] = M, (R.id == null || R.id === "") && (R.id = n.value), () => f(w, te({
|
|
1873
|
+
ref: r
|
|
1874
|
+
}, R, {
|
|
2007
1875
|
modelValue: l.value,
|
|
2008
|
-
"onUpdate:modelValue": (
|
|
2009
|
-
}),
|
|
1876
|
+
"onUpdate:modelValue": (O) => l.value = O
|
|
1877
|
+
}), e.slots);
|
|
2010
1878
|
});
|
|
2011
|
-
return
|
|
2012
|
-
n.value =
|
|
2013
|
-
}),
|
|
2014
|
-
editorRef:
|
|
2015
|
-
}), () =>
|
|
1879
|
+
return W([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible], ([b, w, R, C, P, O, U, z, Y]) => {
|
|
1880
|
+
n.value = b, o.value = w, a.value = R, s.value = C, l.value = P, c.value = O, u.value = U, i.value = z, d.value = Y;
|
|
1881
|
+
}), e.expose({
|
|
1882
|
+
editorRef: r
|
|
1883
|
+
}), () => d.value && f("div", {
|
|
2016
1884
|
id: `${n.value}-input-group`,
|
|
2017
|
-
class: o.value
|
|
1885
|
+
class: o.value,
|
|
1886
|
+
style: t.customStyle
|
|
2018
1887
|
}, [f("div", {
|
|
2019
1888
|
class: "farris-group-wrap"
|
|
2020
1889
|
}, [f("div", {
|
|
2021
1890
|
class: x.value
|
|
2022
|
-
}, [
|
|
1891
|
+
}, [i.value && f(tt, {
|
|
2023
1892
|
id: `${n.value}-lable`,
|
|
2024
1893
|
required: u.value,
|
|
2025
1894
|
text: s.value,
|
|
2026
1895
|
title: s.value
|
|
2027
1896
|
}, null), f("div", {
|
|
2028
1897
|
class: "farris-input-wrap"
|
|
2029
|
-
}, [
|
|
2030
|
-
}
|
|
2031
|
-
}), Zo = {}, Ko = {};
|
|
2032
|
-
function _o(e, t) {
|
|
2033
|
-
e.schema;
|
|
2034
|
-
const n = d(!0), o = d(!0);
|
|
2035
|
-
function a(i) {
|
|
2036
|
-
return !1;
|
|
2037
|
-
}
|
|
2038
|
-
function s() {
|
|
2039
|
-
return !1;
|
|
2040
|
-
}
|
|
2041
|
-
function l() {
|
|
2042
|
-
return !1;
|
|
2043
|
-
}
|
|
2044
|
-
function c() {
|
|
2045
|
-
return !0;
|
|
2046
|
-
}
|
|
2047
|
-
function u(i) {
|
|
1898
|
+
}, [F.value()])])])]);
|
|
2048
1899
|
}
|
|
2049
|
-
|
|
2050
|
-
}
|
|
2051
|
-
function p(i) {
|
|
2052
|
-
return null;
|
|
2053
|
-
}
|
|
2054
|
-
return {
|
|
2055
|
-
canAccepts: a,
|
|
2056
|
-
checkCanDeleteComponent: s,
|
|
2057
|
-
checkCanMoveComponent: l,
|
|
2058
|
-
hideNestedPaddingInDesginerView: c,
|
|
2059
|
-
onAcceptMovedChildElement: u,
|
|
2060
|
-
resolveComponentContext: r,
|
|
2061
|
-
triggerBelongedComponentToMoveWhenMoved: n,
|
|
2062
|
-
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
2063
|
-
getPropsConfig: p
|
|
2064
|
-
};
|
|
2065
|
-
}
|
|
2066
|
-
const oe = class oe {
|
|
1900
|
+
}), _o = {}, Ko = {}, K = class K {
|
|
2067
1901
|
/**
|
|
2068
1902
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2069
1903
|
*/
|
|
2070
|
-
static getEditorTypesByMDataType(
|
|
2071
|
-
const n =
|
|
1904
|
+
static getEditorTypesByMDataType(e) {
|
|
1905
|
+
const n = K.fieldControlTypeMapping[e];
|
|
2072
1906
|
return n || [{ key: "", value: "" }];
|
|
2073
1907
|
}
|
|
2074
1908
|
/**
|
|
2075
1909
|
* 获取所有输入类控件
|
|
2076
1910
|
*/
|
|
2077
1911
|
static getAllInputTypes() {
|
|
2078
|
-
const
|
|
2079
|
-
for (
|
|
2080
|
-
|
|
2081
|
-
|
|
1912
|
+
const e = [];
|
|
1913
|
+
for (const n in K.fieldControlTypeMapping)
|
|
1914
|
+
K.fieldControlTypeMapping[n].forEach((o) => {
|
|
1915
|
+
e.find((a) => a.key === o.key && a.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
2082
1916
|
});
|
|
2083
|
-
return
|
|
1917
|
+
return e;
|
|
2084
1918
|
}
|
|
2085
1919
|
};
|
|
2086
1920
|
/**
|
|
2087
1921
|
* <字段类型,可配置的控件类型列表>的映射
|
|
2088
1922
|
*/
|
|
2089
|
-
N(
|
|
1923
|
+
N(K, "fieldControlTypeMapping", {
|
|
2090
1924
|
String: [
|
|
2091
|
-
{ key:
|
|
2092
|
-
{ key:
|
|
2093
|
-
{ key:
|
|
2094
|
-
{ key:
|
|
2095
|
-
{ key:
|
|
2096
|
-
{ key:
|
|
2097
|
-
{ key:
|
|
2098
|
-
{ key:
|
|
1925
|
+
{ key: V["input-group"].type, value: V["input-group"].name },
|
|
1926
|
+
{ key: V.lookup.type, value: V.lookup.name },
|
|
1927
|
+
{ key: V["date-picker"].type, value: V["date-picker"].name },
|
|
1928
|
+
{ key: V["check-box"].type, value: V["check-box"].name },
|
|
1929
|
+
{ key: V["check-group"].type, value: V["check-group"].name },
|
|
1930
|
+
{ key: V["radio-group"].type, value: V["radio-group"].name },
|
|
1931
|
+
{ key: V["combo-list"].type, value: V["combo-list"].name },
|
|
1932
|
+
{ key: V.textarea.type, value: V.textarea.name }
|
|
2099
1933
|
],
|
|
2100
1934
|
Text: [
|
|
2101
|
-
{ key:
|
|
2102
|
-
{ key:
|
|
1935
|
+
{ key: V.textarea.type, value: V.textarea.name },
|
|
1936
|
+
{ key: V.lookup.type, value: V.lookup.name }
|
|
2103
1937
|
],
|
|
2104
1938
|
Decimal: [
|
|
2105
|
-
{ key:
|
|
1939
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2106
1940
|
],
|
|
2107
1941
|
Integer: [
|
|
2108
|
-
{ key:
|
|
1942
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2109
1943
|
],
|
|
2110
1944
|
Number: [
|
|
2111
|
-
{ key:
|
|
1945
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2112
1946
|
],
|
|
2113
1947
|
BigNumber: [
|
|
2114
|
-
{ key:
|
|
1948
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2115
1949
|
],
|
|
2116
1950
|
Date: [
|
|
2117
|
-
{ key:
|
|
1951
|
+
{ key: V["date-picker"].type, value: V["date-picker"].name }
|
|
2118
1952
|
],
|
|
2119
1953
|
DateTime: [
|
|
2120
|
-
{ key:
|
|
1954
|
+
{ key: V["date-picker"].type, value: V["date-picker"].name }
|
|
2121
1955
|
],
|
|
2122
1956
|
Boolean: [
|
|
2123
|
-
{ key:
|
|
2124
|
-
{ key:
|
|
1957
|
+
{ key: V.switch.type, value: V.switch.name },
|
|
1958
|
+
{ key: V["check-box"].type, value: V["check-box"].name }
|
|
2125
1959
|
],
|
|
2126
1960
|
Enum: [
|
|
2127
|
-
{ key:
|
|
2128
|
-
{ key:
|
|
1961
|
+
{ key: V["combo-list"].type, value: V["combo-list"].name },
|
|
1962
|
+
{ key: V["radio-group"].type, value: V["radio-group"].name }
|
|
2129
1963
|
],
|
|
2130
1964
|
Object: [
|
|
2131
|
-
{ key:
|
|
2132
|
-
{ key:
|
|
2133
|
-
{ key:
|
|
1965
|
+
{ key: V.lookup.type, value: V.lookup.name },
|
|
1966
|
+
{ key: V["combo-list"].type, value: V["combo-list"].name },
|
|
1967
|
+
{ key: V["radio-group"].type, value: V["radio-group"].name }
|
|
2134
1968
|
]
|
|
2135
1969
|
});
|
|
2136
|
-
let
|
|
2137
|
-
const ea =
|
|
2138
|
-
class ta extends
|
|
1970
|
+
let ce = K;
|
|
1971
|
+
const ea = p(0);
|
|
1972
|
+
class ta extends Je {
|
|
2139
1973
|
constructor(n, o) {
|
|
2140
1974
|
super(n, o);
|
|
2141
1975
|
N(this, "responseLayoutEditorFunction");
|
|
2142
|
-
this.responseLayoutEditorFunction =
|
|
1976
|
+
this.responseLayoutEditorFunction = Qe(this.formSchemaUtils);
|
|
2143
1977
|
}
|
|
2144
1978
|
getPropertyConfig(n, o) {
|
|
2145
1979
|
return this.propertyConfig.categories.basic = this.getBasicProperties(n, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, o), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
2146
1980
|
}
|
|
2147
1981
|
getBasicProperties(n, o) {
|
|
2148
|
-
var
|
|
2149
|
-
|
|
2150
|
-
this.setDesignViewModelField(n)
|
|
2151
|
-
const s = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
2152
|
-
return {
|
|
1982
|
+
var s;
|
|
1983
|
+
const a = this;
|
|
1984
|
+
return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
2153
1985
|
description: "Basic Information",
|
|
2154
1986
|
title: "基本信息",
|
|
2155
1987
|
properties: {
|
|
@@ -2170,7 +2002,7 @@ class ta extends Ye {
|
|
|
2170
2002
|
textField: "value",
|
|
2171
2003
|
valueField: "key",
|
|
2172
2004
|
editable: !1,
|
|
2173
|
-
data: a.designViewModelField ?
|
|
2005
|
+
data: a.designViewModelField ? ce.getEditorTypesByMDataType((s = a.designViewModelField.type) == null ? void 0 : s.name) : ce.getAllInputTypes()
|
|
2174
2006
|
}
|
|
2175
2007
|
},
|
|
2176
2008
|
label: {
|
|
@@ -2181,33 +2013,29 @@ class ta extends Ye {
|
|
|
2181
2013
|
binding: {
|
|
2182
2014
|
description: "绑定的表单字段",
|
|
2183
2015
|
title: "绑定",
|
|
2184
|
-
$converter: "/converter/field-selector.converter",
|
|
2185
2016
|
editor: {
|
|
2186
|
-
type: "
|
|
2017
|
+
type: "binding-selector",
|
|
2187
2018
|
bindingType: { enable: !1 },
|
|
2188
2019
|
editorParams: {
|
|
2189
|
-
|
|
2190
|
-
|
|
2020
|
+
componentSchema: n,
|
|
2021
|
+
needSyncToViewModel: !0,
|
|
2022
|
+
viewModelId: this.viewModelId,
|
|
2023
|
+
designerHostService: this.designerHostService,
|
|
2024
|
+
disableOccupiedFields: !0
|
|
2191
2025
|
},
|
|
2192
|
-
|
|
2193
|
-
{ field: "name", title: "字段名称" },
|
|
2194
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
2195
|
-
{ field: "fieldType", title: "字段类型" }
|
|
2196
|
-
],
|
|
2197
|
-
textField: "bindingField",
|
|
2198
|
-
data: l
|
|
2026
|
+
textField: "bindingField"
|
|
2199
2027
|
}
|
|
2200
2028
|
}
|
|
2201
2029
|
},
|
|
2202
|
-
setPropertyRelates(
|
|
2203
|
-
if (
|
|
2204
|
-
switch (
|
|
2030
|
+
setPropertyRelates(l, c) {
|
|
2031
|
+
if (l)
|
|
2032
|
+
switch (l && l.propertyID) {
|
|
2205
2033
|
case "type": {
|
|
2206
|
-
a.changeControlType(n,
|
|
2034
|
+
a.changeControlType(n, l, o);
|
|
2207
2035
|
break;
|
|
2208
2036
|
}
|
|
2209
2037
|
case "label": {
|
|
2210
|
-
|
|
2038
|
+
l.needRefreshControlTree = !0;
|
|
2211
2039
|
break;
|
|
2212
2040
|
}
|
|
2213
2041
|
}
|
|
@@ -2215,7 +2043,7 @@ class ta extends Ye {
|
|
|
2215
2043
|
};
|
|
2216
2044
|
}
|
|
2217
2045
|
getAppearanceProperties(n, o) {
|
|
2218
|
-
|
|
2046
|
+
const a = this;
|
|
2219
2047
|
return {
|
|
2220
2048
|
title: "样式",
|
|
2221
2049
|
description: "Appearance",
|
|
@@ -2267,12 +2095,12 @@ class ta extends Ye {
|
|
|
2267
2095
|
* @param newControlType 新控件类型
|
|
2268
2096
|
*/
|
|
2269
2097
|
changeControlType(n, o, a) {
|
|
2270
|
-
var
|
|
2098
|
+
var d, r, m, v;
|
|
2271
2099
|
const s = o.propertyValue, l = a && a.parent && a.parent.schema;
|
|
2272
2100
|
if (!l)
|
|
2273
2101
|
return;
|
|
2274
|
-
const c = l.contents.findIndex((
|
|
2275
|
-
let
|
|
2102
|
+
const c = l.contents.findIndex((h) => h.id === n.id), u = l.contents[c];
|
|
2103
|
+
let i;
|
|
2276
2104
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2277
2105
|
editor: {
|
|
2278
2106
|
$type: s
|
|
@@ -2280,21 +2108,21 @@ class ta extends Ye {
|
|
|
2280
2108
|
name: this.designViewModelField.name,
|
|
2281
2109
|
require: this.designViewModelField.require,
|
|
2282
2110
|
readonly: this.designViewModelField.readonly
|
|
2283
|
-
}, !1),
|
|
2111
|
+
}, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(i, {
|
|
2284
2112
|
id: u.id,
|
|
2285
2113
|
appearance: u.appearance,
|
|
2286
2114
|
size: u.size,
|
|
2287
2115
|
label: u.label,
|
|
2288
2116
|
binding: u.binding,
|
|
2289
2117
|
visible: u.visible
|
|
2290
|
-
}), Object.assign(
|
|
2291
|
-
isTextArea:
|
|
2292
|
-
placeholder: (
|
|
2293
|
-
holdPlace: (
|
|
2118
|
+
}), Object.assign(i.editor, {
|
|
2119
|
+
isTextArea: i.isTextArea && u.isTextArea,
|
|
2120
|
+
placeholder: (d = u.editor) == null ? void 0 : d.placeholder,
|
|
2121
|
+
holdPlace: (r = u.editor) == null ? void 0 : r.holdPlace,
|
|
2294
2122
|
readonly: (m = u.editor) == null ? void 0 : m.readonly,
|
|
2295
|
-
require: (
|
|
2296
|
-
}), l.contents.splice(c, 1), l.contents.splice(c, 0,
|
|
2297
|
-
(
|
|
2123
|
+
require: (v = u.editor) == null ? void 0 : v.require
|
|
2124
|
+
}), l.contents.splice(c, 1), l.contents.splice(c, 0, i), a.schema = Object.assign(u, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2125
|
+
(h) => h.classList.remove("dgComponentSelected")
|
|
2298
2126
|
), ea.value++;
|
|
2299
2127
|
}
|
|
2300
2128
|
getComponentConfig(n, o = {}, a = {}) {
|
|
@@ -2335,16 +2163,16 @@ class ta extends Ye {
|
|
|
2335
2163
|
*/
|
|
2336
2164
|
updateUnifiedLayoutAfterControlChanged(n, o, a) {
|
|
2337
2165
|
const s = n.split(" ");
|
|
2338
|
-
let l = s.find((
|
|
2339
|
-
l = l || "col-12", c = c || "col-md-" + l.replace("col-", ""), u = u || "col-xl-" + c.replace("col-md-", ""),
|
|
2340
|
-
const
|
|
2166
|
+
let l = s.find((r) => /^col-([1-9]|10|11|12)$/.test(r)), c = s.find((r) => /^col-md-([1-9]|10|11|12)$/.test(r)), u = s.find((r) => /^col-xl-([1-9]|10|11|12)$/.test(r)), i = s.find((r) => /^col-el-([1-9]|10|11|12)$/.test(r));
|
|
2167
|
+
l = l || "col-12", c = c || "col-md-" + l.replace("col-", ""), u = u || "col-xl-" + c.replace("col-md-", ""), i = i || "col-el-" + u.replace("col-xl-", "");
|
|
2168
|
+
const d = {
|
|
2341
2169
|
id: o,
|
|
2342
2170
|
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
2343
2171
|
columnInMD: parseInt(c.replace("col-md-", ""), 10),
|
|
2344
2172
|
columnInLG: parseInt(u.replace("col-xl-", ""), 10),
|
|
2345
|
-
columnInEL: parseInt(
|
|
2173
|
+
columnInEL: parseInt(i.replace("col-el-", ""), 10)
|
|
2346
2174
|
};
|
|
2347
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(a,
|
|
2175
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(a, d);
|
|
2348
2176
|
}
|
|
2349
2177
|
/**
|
|
2350
2178
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -2357,15 +2185,15 @@ class ta extends Ye {
|
|
|
2357
2185
|
return;
|
|
2358
2186
|
const s = [];
|
|
2359
2187
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, s, 1), o) {
|
|
2360
|
-
const
|
|
2361
|
-
Object.assign(
|
|
2188
|
+
const h = s.find((g) => g.id === o.id);
|
|
2189
|
+
Object.assign(h || {}, o);
|
|
2362
2190
|
}
|
|
2363
|
-
const l = s.map((
|
|
2191
|
+
const l = s.map((h) => h.columnInSM), c = s.map((h) => h.columnInMD), u = s.map((h) => h.columnInLG), i = s.map((h) => h.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, r = this.checkIsUniqueColumn(c) ? c[0] : null, m = this.checkIsUniqueColumn(u) ? u[0] : null, v = this.checkIsUniqueColumn(i) ? i[0] : null;
|
|
2364
2192
|
Object.assign(a.unifiedLayout, {
|
|
2365
|
-
uniqueColClassInSM:
|
|
2366
|
-
uniqueColClassInMD:
|
|
2193
|
+
uniqueColClassInSM: d,
|
|
2194
|
+
uniqueColClassInMD: r,
|
|
2367
2195
|
uniqueColClassInLG: m,
|
|
2368
|
-
uniqueColClassInEL:
|
|
2196
|
+
uniqueColClassInEL: v
|
|
2369
2197
|
});
|
|
2370
2198
|
}
|
|
2371
2199
|
/**
|
|
@@ -2377,109 +2205,94 @@ class ta extends Ye {
|
|
|
2377
2205
|
}
|
|
2378
2206
|
}
|
|
2379
2207
|
class na extends ta {
|
|
2380
|
-
constructor(
|
|
2381
|
-
super(
|
|
2208
|
+
constructor(e, n) {
|
|
2209
|
+
super(e, n);
|
|
2382
2210
|
}
|
|
2383
2211
|
}
|
|
2384
|
-
function oa(
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
checkCanMoveComponent: a,
|
|
2389
|
-
hideNestedPaddingInDesginerView: s,
|
|
2390
|
-
onAcceptMovedChildElement: l,
|
|
2391
|
-
resolveComponentContext: c,
|
|
2392
|
-
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2393
|
-
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
2394
|
-
} = _o(e), p = e.schema;
|
|
2395
|
-
function i(m, h) {
|
|
2396
|
-
return new na(m, t).getPropertyConfig(p, h);
|
|
2212
|
+
function oa(t, e) {
|
|
2213
|
+
const n = t.schema;
|
|
2214
|
+
function o(a, s) {
|
|
2215
|
+
return new na(a, e).getPropertyConfig(n, s);
|
|
2397
2216
|
}
|
|
2398
|
-
return {
|
|
2399
|
-
canAccepts: n,
|
|
2400
|
-
checkCanDeleteComponent: o,
|
|
2401
|
-
checkCanMoveComponent: a,
|
|
2402
|
-
hideNestedPaddingInDesginerView: s,
|
|
2403
|
-
onAcceptMovedChildElement: l,
|
|
2404
|
-
resolveComponentContext: c,
|
|
2405
|
-
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2406
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
2407
|
-
getPropsConfig: i
|
|
2408
|
-
};
|
|
2217
|
+
return { getPropsConfig: o };
|
|
2409
2218
|
}
|
|
2410
|
-
const aa = /* @__PURE__ */
|
|
2219
|
+
const aa = /* @__PURE__ */ H({
|
|
2411
2220
|
name: "FInputGroupDesign",
|
|
2412
|
-
props:
|
|
2221
|
+
props: Ie,
|
|
2413
2222
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
2414
|
-
setup(
|
|
2415
|
-
const n =
|
|
2223
|
+
setup(t, e) {
|
|
2224
|
+
const n = p(t.modelValue), o = p(t.modelValue), a = Ot(t, e, n, o), {
|
|
2416
2225
|
inputGroupClass: s,
|
|
2417
2226
|
inputType: l,
|
|
2418
2227
|
inputGroupStyle: c
|
|
2419
|
-
} = a, u = nt(
|
|
2420
|
-
shouldShowAppendedButton:
|
|
2421
|
-
} = u,
|
|
2422
|
-
onMouseEnter:
|
|
2228
|
+
} = a, u = nt(t), {
|
|
2229
|
+
shouldShowAppendedButton: i
|
|
2230
|
+
} = u, d = je(t, e, a), {
|
|
2231
|
+
onMouseEnter: r,
|
|
2423
2232
|
onMouseLeave: m
|
|
2424
|
-
} =
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
}),
|
|
2428
|
-
const
|
|
2233
|
+
} = d, v = ot(t, e, l, u), h = p(), g = ee("designer-host-service"), x = ee("design-item-context"), M = oa(x, g), y = Rt(h, x, M);
|
|
2234
|
+
J(() => {
|
|
2235
|
+
h.value.componentInstance = y;
|
|
2236
|
+
}), e.expose(y.value);
|
|
2237
|
+
const F = at(t, e, u, d, v), b = p();
|
|
2429
2238
|
return () => f("div", {
|
|
2430
2239
|
id: "inputGroup",
|
|
2431
|
-
ref:
|
|
2240
|
+
ref: h,
|
|
2432
2241
|
class: s.value,
|
|
2433
2242
|
style: c.value,
|
|
2434
|
-
onMouseenter:
|
|
2243
|
+
onMouseenter: r,
|
|
2435
2244
|
onMouseleave: m
|
|
2436
2245
|
}, [f("input", {
|
|
2437
|
-
ref:
|
|
2246
|
+
ref: b,
|
|
2438
2247
|
class: "form-control",
|
|
2439
2248
|
readonly: !0,
|
|
2440
|
-
placeholder:
|
|
2441
|
-
}, null),
|
|
2249
|
+
placeholder: t.placeholder
|
|
2250
|
+
}, null), i.value && F()]);
|
|
2442
2251
|
}
|
|
2443
2252
|
});
|
|
2444
2253
|
function la() {
|
|
2445
|
-
function
|
|
2446
|
-
const
|
|
2447
|
-
return
|
|
2254
|
+
function t(a, s) {
|
|
2255
|
+
const l = Ko[a];
|
|
2256
|
+
return l ? l(s) : {};
|
|
2257
|
+
}
|
|
2258
|
+
function e(a) {
|
|
2259
|
+
return _o[a] || aa;
|
|
2448
2260
|
}
|
|
2449
|
-
function
|
|
2450
|
-
|
|
2261
|
+
function n(a) {
|
|
2262
|
+
}
|
|
2263
|
+
function o(a) {
|
|
2451
2264
|
}
|
|
2452
|
-
return { resolveEditorProps:
|
|
2265
|
+
return { getChangeFunctionName: n, getClearFunctionName: o, resolveEditorProps: t, resolveEditorType: e };
|
|
2453
2266
|
}
|
|
2454
|
-
const sa = /* @__PURE__ */
|
|
2267
|
+
const sa = /* @__PURE__ */ H({
|
|
2455
2268
|
name: "FDynamicFormGroupDesign",
|
|
2456
|
-
props:
|
|
2269
|
+
props: le,
|
|
2457
2270
|
emits: ["change", "update:modelValue"],
|
|
2458
|
-
setup(
|
|
2459
|
-
const n =
|
|
2460
|
-
|
|
2461
|
-
const
|
|
2462
|
-
resolveEditorProps:
|
|
2271
|
+
setup(t, e) {
|
|
2272
|
+
const n = p(t.id), o = p(t.customClass), a = p(t.editor), s = p(t.label), l = p(t.modelValue), c = p(!0), u = p(t.required), i = p(t.showLabel);
|
|
2273
|
+
p(t.type);
|
|
2274
|
+
const d = p(), {
|
|
2275
|
+
resolveEditorProps: r,
|
|
2463
2276
|
resolveEditorType: m
|
|
2464
|
-
} = la(),
|
|
2277
|
+
} = la(), v = L(() => ({
|
|
2465
2278
|
"form-group": !0,
|
|
2466
2279
|
"farris-form-group": !0,
|
|
2467
2280
|
"common-group": !0,
|
|
2468
2281
|
"q-state-readonly": c.value,
|
|
2469
2282
|
"form-group-in-canvas": !0
|
|
2470
|
-
})),
|
|
2471
|
-
const
|
|
2472
|
-
return () => f(x,
|
|
2473
|
-
ref:
|
|
2474
|
-
},
|
|
2283
|
+
})), h = L(() => {
|
|
2284
|
+
const g = a.value.type || "input-group", x = m(g), M = r(g, a.value);
|
|
2285
|
+
return () => f(x, te({
|
|
2286
|
+
ref: d
|
|
2287
|
+
}, M, {
|
|
2475
2288
|
modelValue: l.value,
|
|
2476
|
-
"onUpdate:modelValue": (
|
|
2289
|
+
"onUpdate:modelValue": (y) => l.value = y
|
|
2477
2290
|
}), null);
|
|
2478
2291
|
});
|
|
2479
|
-
return
|
|
2480
|
-
n.value =
|
|
2481
|
-
}),
|
|
2482
|
-
editorRef:
|
|
2292
|
+
return W([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel], ([g, x, M, y, F, b, w, R]) => {
|
|
2293
|
+
n.value = g, o.value = x, a.value = M, s.value = y, l.value = F, c.value = b, u.value = w, i.value = R;
|
|
2294
|
+
}), e.expose({
|
|
2295
|
+
editorRef: d
|
|
2483
2296
|
}), () => f("div", {
|
|
2484
2297
|
id: `${n.value}-input-group`,
|
|
2485
2298
|
class: o.value,
|
|
@@ -2487,29 +2300,70 @@ const sa = /* @__PURE__ */ Y({
|
|
|
2487
2300
|
}, [f("div", {
|
|
2488
2301
|
class: "farris-group-wrap"
|
|
2489
2302
|
}, [f("div", {
|
|
2490
|
-
class:
|
|
2491
|
-
}, [
|
|
2303
|
+
class: v.value
|
|
2304
|
+
}, [i.value && f(tt, {
|
|
2492
2305
|
id: `${n.value}-lable`,
|
|
2493
2306
|
required: u.value,
|
|
2494
2307
|
text: s.value,
|
|
2495
2308
|
title: s.value
|
|
2496
2309
|
}, null), f("div", {
|
|
2497
2310
|
class: "farris-input-wrap"
|
|
2498
|
-
}, [
|
|
2311
|
+
}, [h.value()])])])]);
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
function ra(t, e) {
|
|
2315
|
+
function n() {
|
|
2316
|
+
return !0;
|
|
2499
2317
|
}
|
|
2500
|
-
|
|
2318
|
+
function o() {
|
|
2319
|
+
return !0;
|
|
2320
|
+
}
|
|
2321
|
+
function a() {
|
|
2322
|
+
return !1;
|
|
2323
|
+
}
|
|
2324
|
+
function s() {
|
|
2325
|
+
return !0;
|
|
2326
|
+
}
|
|
2327
|
+
function l(i) {
|
|
2328
|
+
var g;
|
|
2329
|
+
const d = e == null ? void 0 : e.designViewModelUtils, r = e == null ? void 0 : e.formSchemaUtils, m = (g = t == null ? void 0 : t.componentInstance.value) == null ? void 0 : g.belongedComponentId;
|
|
2330
|
+
if (!m || !d || !r)
|
|
2331
|
+
return;
|
|
2332
|
+
const v = r.getViewModelIdByComponentId(m), h = d.getDgViewModel(v);
|
|
2333
|
+
h && h.removeField([i]);
|
|
2334
|
+
}
|
|
2335
|
+
function c(i) {
|
|
2336
|
+
const d = e == null ? void 0 : e.formSchemaUtils;
|
|
2337
|
+
if (d.getExpressions().length) {
|
|
2338
|
+
const r = d.getExpressions().findIndex((m) => m.fieldId === i);
|
|
2339
|
+
r > -1 && d.getExpressions().splice(r, 1);
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
function u() {
|
|
2343
|
+
const { schema: i } = t, d = i.binding && i.binding.field;
|
|
2344
|
+
d && (l(d), c(d));
|
|
2345
|
+
}
|
|
2346
|
+
return {
|
|
2347
|
+
canAccepts: a,
|
|
2348
|
+
checkCanDeleteComponent: o,
|
|
2349
|
+
checkCanMoveComponent: n,
|
|
2350
|
+
hideNestedPaddingInDesginerView: s,
|
|
2351
|
+
onRemoveComponent: u
|
|
2352
|
+
};
|
|
2353
|
+
}
|
|
2354
|
+
const ia = /* @__PURE__ */ H({
|
|
2501
2355
|
name: "FFormGroupDesign",
|
|
2502
|
-
props:
|
|
2356
|
+
props: le,
|
|
2503
2357
|
emits: [],
|
|
2504
|
-
setup(
|
|
2505
|
-
const n =
|
|
2506
|
-
return
|
|
2507
|
-
n.value.componentInstance =
|
|
2508
|
-
var
|
|
2509
|
-
let
|
|
2510
|
-
return
|
|
2358
|
+
setup(t, e) {
|
|
2359
|
+
const n = p(), o = ee("design-item-context"), a = ee("designer-host-service"), s = ra(o, a), l = Ye(n, o, s);
|
|
2360
|
+
return J(() => {
|
|
2361
|
+
n.value.componentInstance = l, l.value.getPropConfig = (...c) => {
|
|
2362
|
+
var i, d, r;
|
|
2363
|
+
let u = Ge[t.editor.type];
|
|
2364
|
+
return u && Object.keys(u).length === 0 && ((i = n.value) != null && i.editorRef) && ((r = (d = n.value) == null ? void 0 : d.editorRef) != null && r.getPropConfig) && (u = n.value.editorRef.getPropConfig(...c, l.value)), u;
|
|
2511
2365
|
};
|
|
2512
|
-
}),
|
|
2366
|
+
}), e.expose(l.value), () => f(sa, te(t, {
|
|
2513
2367
|
ref: n
|
|
2514
2368
|
}), null);
|
|
2515
2369
|
}
|
|
@@ -2527,38 +2381,38 @@ const sa = /* @__PURE__ */ Y({
|
|
|
2527
2381
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
2528
2382
|
*/
|
|
2529
2383
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
2530
|
-
},
|
|
2384
|
+
}, ua = de(
|
|
2531
2385
|
st,
|
|
2532
2386
|
Xe,
|
|
2533
|
-
|
|
2387
|
+
Ee,
|
|
2534
2388
|
void 0
|
|
2535
|
-
),
|
|
2389
|
+
), ca = /* @__PURE__ */ H({
|
|
2536
2390
|
name: "FDynamicFormInput",
|
|
2537
2391
|
props: st,
|
|
2538
2392
|
emits: ["change", "update:modelValue"],
|
|
2539
|
-
setup(
|
|
2540
|
-
const n =
|
|
2393
|
+
setup(t, e) {
|
|
2394
|
+
const n = p(t.id), o = p(t.editor), a = p(t.modelValue), {
|
|
2541
2395
|
resolveEditorProps: s,
|
|
2542
2396
|
resolveEditorType: l,
|
|
2543
2397
|
getChangeFunctionName: c
|
|
2544
2398
|
} = lt();
|
|
2545
|
-
function u(
|
|
2546
|
-
a.value =
|
|
2399
|
+
function u(d, r) {
|
|
2400
|
+
a.value = r !== void 0 ? r : d, e.emit("update:modelValue", a.value), e.emit("change", a.value);
|
|
2547
2401
|
}
|
|
2548
|
-
const
|
|
2549
|
-
const
|
|
2550
|
-
|
|
2402
|
+
const i = L(() => {
|
|
2403
|
+
const d = l(o.value.type), r = s(o.value.type, o.value);
|
|
2404
|
+
r.focusOnCreated = t.focusOnCreated, r.selectOnCreated = t.selectOnCreated;
|
|
2551
2405
|
const m = c(o.value.type);
|
|
2552
|
-
return
|
|
2406
|
+
return r[m] = u, (r.id == null || r.id === "") && (r.id = n.value), () => f(d, te(r, {
|
|
2553
2407
|
modelValue: a.value,
|
|
2554
|
-
"onUpdate:modelValue": (
|
|
2408
|
+
"onUpdate:modelValue": (v) => a.value = v
|
|
2555
2409
|
}), null);
|
|
2556
2410
|
});
|
|
2557
|
-
return
|
|
2558
|
-
n.value =
|
|
2559
|
-
}), () =>
|
|
2411
|
+
return W([() => t.id, () => t.editor, () => t.modelValue], ([d, r, m]) => {
|
|
2412
|
+
n.value = d, o.value = r, a.value = m;
|
|
2413
|
+
}), () => i.value();
|
|
2560
2414
|
}
|
|
2561
|
-
}),
|
|
2415
|
+
}), da = "https://json-schema.org/draft/2020-12/schema", pa = "https://farris-design.gitee.io/grid-field-editor.schema.json", ma = "response-form-layout-setting", fa = "A Farris Data Grid Component", va = "object", ha = {
|
|
2562
2416
|
id: {
|
|
2563
2417
|
description: "The unique identifier for a Input Group",
|
|
2564
2418
|
type: "string"
|
|
@@ -2578,17 +2432,17 @@ const sa = /* @__PURE__ */ Y({
|
|
|
2578
2432
|
type: "Object",
|
|
2579
2433
|
default: null
|
|
2580
2434
|
}
|
|
2581
|
-
},
|
|
2435
|
+
}, ya = [
|
|
2582
2436
|
"id",
|
|
2583
2437
|
"type"
|
|
2584
2438
|
], ga = {
|
|
2585
|
-
$schema:
|
|
2586
|
-
$id:
|
|
2587
|
-
title:
|
|
2588
|
-
description:
|
|
2589
|
-
type:
|
|
2590
|
-
properties:
|
|
2591
|
-
required:
|
|
2439
|
+
$schema: da,
|
|
2440
|
+
$id: pa,
|
|
2441
|
+
title: ma,
|
|
2442
|
+
description: fa,
|
|
2443
|
+
type: va,
|
|
2444
|
+
properties: ha,
|
|
2445
|
+
required: ya
|
|
2592
2446
|
}, rt = {
|
|
2593
2447
|
initialState: {
|
|
2594
2448
|
type: Object,
|
|
@@ -2599,7 +2453,7 @@ const sa = /* @__PURE__ */ Y({
|
|
|
2599
2453
|
uniqueColClassInEL: 2
|
|
2600
2454
|
}
|
|
2601
2455
|
}
|
|
2602
|
-
},
|
|
2456
|
+
}, Ca = Jn(rt, ga, no, so), ba = {
|
|
2603
2457
|
width: { Type: Number, default: 400 },
|
|
2604
2458
|
type: { Type: String, default: "info" },
|
|
2605
2459
|
title: { Type: String, default: "" },
|
|
@@ -2609,80 +2463,81 @@ const sa = /* @__PURE__ */ Y({
|
|
|
2609
2463
|
exceptionInfo: { Type: Object, default: null },
|
|
2610
2464
|
promptEditorType: { Type: String, default: "text-area" }
|
|
2611
2465
|
};
|
|
2612
|
-
function
|
|
2466
|
+
function Se() {
|
|
2613
2467
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
2614
2468
|
}
|
|
2615
|
-
async function
|
|
2469
|
+
async function wa(t) {
|
|
2616
2470
|
if (!navigator.clipboard)
|
|
2617
|
-
throw
|
|
2618
|
-
return navigator.clipboard.writeText(
|
|
2471
|
+
throw Se();
|
|
2472
|
+
return navigator.clipboard.writeText(t);
|
|
2619
2473
|
}
|
|
2620
|
-
async function
|
|
2621
|
-
const
|
|
2622
|
-
|
|
2474
|
+
async function Ma(t) {
|
|
2475
|
+
const e = document.createElement("span");
|
|
2476
|
+
e.textContent = t, e.style.whiteSpace = "pre", e.style.webkitUserSelect = "auto", e.style.userSelect = "all", document.body.appendChild(e);
|
|
2623
2477
|
const n = window.getSelection(), o = window.document.createRange();
|
|
2624
|
-
n == null || n.removeAllRanges(), o.selectNode(
|
|
2478
|
+
n == null || n.removeAllRanges(), o.selectNode(e), n == null || n.addRange(o);
|
|
2625
2479
|
let a = !1;
|
|
2626
2480
|
try {
|
|
2627
2481
|
a = window.document.execCommand("copy");
|
|
2628
2482
|
} finally {
|
|
2629
|
-
n == null || n.removeAllRanges(), window.document.body.removeChild(
|
|
2483
|
+
n == null || n.removeAllRanges(), window.document.body.removeChild(e);
|
|
2630
2484
|
}
|
|
2631
|
-
if (!a)
|
|
2485
|
+
if (!a)
|
|
2486
|
+
throw Se();
|
|
2632
2487
|
}
|
|
2633
|
-
async function xa(
|
|
2488
|
+
async function xa(t) {
|
|
2634
2489
|
try {
|
|
2635
|
-
await
|
|
2636
|
-
} catch (
|
|
2490
|
+
await wa(t);
|
|
2491
|
+
} catch (e) {
|
|
2637
2492
|
try {
|
|
2638
|
-
await
|
|
2493
|
+
await Ma(t);
|
|
2639
2494
|
} catch (n) {
|
|
2640
|
-
throw n ||
|
|
2495
|
+
throw n || e || Se();
|
|
2641
2496
|
}
|
|
2642
2497
|
}
|
|
2643
2498
|
}
|
|
2644
|
-
function
|
|
2645
|
-
async function e
|
|
2646
|
-
await xa(
|
|
2499
|
+
function Fa() {
|
|
2500
|
+
async function t(e) {
|
|
2501
|
+
await xa(e);
|
|
2647
2502
|
}
|
|
2648
|
-
return { onCopy:
|
|
2503
|
+
return { onCopy: t };
|
|
2649
2504
|
}
|
|
2650
|
-
function Ta(
|
|
2651
|
-
const a =
|
|
2505
|
+
function Ta(t, e, n, o) {
|
|
2506
|
+
const a = p(14), s = p(140), l = p(""), c = p(o.value.length), u = L(() => o.value), i = L(() => ({
|
|
2652
2507
|
"font-size": `${a.value}px`,
|
|
2653
2508
|
height: "100%"
|
|
2654
2509
|
}));
|
|
2655
|
-
function
|
|
2656
|
-
if (
|
|
2657
|
-
const m =
|
|
2510
|
+
function d(r) {
|
|
2511
|
+
if (r.currentTarget) {
|
|
2512
|
+
const m = r.currentTarget.value || "";
|
|
2658
2513
|
c.value = m.length;
|
|
2659
2514
|
}
|
|
2660
2515
|
}
|
|
2661
|
-
return () => f(
|
|
2516
|
+
return () => f(ae, null, [f("textarea", {
|
|
2662
2517
|
title: "promptMessage",
|
|
2663
2518
|
name: "promptMessage",
|
|
2664
2519
|
class: "form-control",
|
|
2665
|
-
style:
|
|
2520
|
+
style: i.value,
|
|
2666
2521
|
rows: "4",
|
|
2667
2522
|
maxlength: s.value,
|
|
2668
|
-
onInput: (
|
|
2523
|
+
onInput: (r) => d(r)
|
|
2669
2524
|
}, [u.value]), f("span", {
|
|
2670
2525
|
class: "textarea-wordcount",
|
|
2671
2526
|
title: l.value,
|
|
2672
2527
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
2673
2528
|
}, [c.value + " / " + s.value])]);
|
|
2674
2529
|
}
|
|
2675
|
-
function
|
|
2676
|
-
const a = Ta(
|
|
2530
|
+
function Ba(t, e, n, o) {
|
|
2531
|
+
const a = Ta(t, e, n, o), s = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
2677
2532
|
function l(c) {
|
|
2678
2533
|
return s.get(c) || null;
|
|
2679
2534
|
}
|
|
2680
2535
|
return { getEditorRender: l };
|
|
2681
2536
|
}
|
|
2682
|
-
function
|
|
2683
|
-
const
|
|
2537
|
+
function ka() {
|
|
2538
|
+
const t = p(!1), e = p("复制成功");
|
|
2684
2539
|
return {
|
|
2685
|
-
feedbackStyle:
|
|
2540
|
+
feedbackStyle: L(() => {
|
|
2686
2541
|
const o = {
|
|
2687
2542
|
position: "absolute",
|
|
2688
2543
|
left: "50%",
|
|
@@ -2699,42 +2554,42 @@ function Ba() {
|
|
|
2699
2554
|
color: "#fff",
|
|
2700
2555
|
transition: "all .3s ease"
|
|
2701
2556
|
};
|
|
2702
|
-
return o.opacity =
|
|
2557
|
+
return o.opacity = t.value ? "0.8" : "0", o.display = t.value ? "" : "none", o;
|
|
2703
2558
|
}),
|
|
2704
|
-
feedbackMessage:
|
|
2705
|
-
toShowFeedback:
|
|
2559
|
+
feedbackMessage: e,
|
|
2560
|
+
toShowFeedback: t
|
|
2706
2561
|
};
|
|
2707
2562
|
}
|
|
2708
|
-
function
|
|
2709
|
-
const n =
|
|
2563
|
+
function Ea(t, e) {
|
|
2564
|
+
const n = e.getEditorRender(t.promptEditorType);
|
|
2710
2565
|
return () => n && n();
|
|
2711
2566
|
}
|
|
2712
|
-
function
|
|
2713
|
-
const
|
|
2567
|
+
function Ia(t) {
|
|
2568
|
+
const e = p(3), n = p(480), o = L(() => !!t.value && !!t.value.date), a = L(() => `发生时间 : ${t.value && t.value.date || ""}`), s = L(() => !!t.value && !!t.value.detail), l = L(() => {
|
|
2714
2569
|
const x = `${n.value}px`;
|
|
2715
2570
|
return {
|
|
2716
2571
|
overflow: "hidden",
|
|
2717
2572
|
"text-overflow": "ellipsis",
|
|
2718
2573
|
display: "-webkit-box",
|
|
2719
2574
|
"-webkit-box-orient": "vertical",
|
|
2720
|
-
"-webkit-line-clamp":
|
|
2575
|
+
"-webkit-line-clamp": e.value,
|
|
2721
2576
|
"max-height": x
|
|
2722
2577
|
};
|
|
2723
|
-
}), c =
|
|
2578
|
+
}), c = L(() => t.value && t.value.detail || ""), u = L(() => !0), i = p(!1), d = p("展开"), r = p("收起"), m = L(() => {
|
|
2724
2579
|
const x = {
|
|
2725
2580
|
display: "block",
|
|
2726
2581
|
color: "#2A87FF"
|
|
2727
2582
|
};
|
|
2728
|
-
return x["text-align"] =
|
|
2583
|
+
return x["text-align"] = i.value ? "" : "right", x;
|
|
2729
2584
|
});
|
|
2730
|
-
function
|
|
2731
|
-
|
|
2585
|
+
function v(x, M) {
|
|
2586
|
+
i.value = !i.value, e.value = i.value ? 20 : 3;
|
|
2732
2587
|
}
|
|
2733
|
-
function
|
|
2734
|
-
return
|
|
2588
|
+
function h(x) {
|
|
2589
|
+
return v();
|
|
2735
2590
|
}
|
|
2736
|
-
function
|
|
2737
|
-
return
|
|
2591
|
+
function g(x) {
|
|
2592
|
+
return v();
|
|
2738
2593
|
}
|
|
2739
2594
|
return () => f("div", {
|
|
2740
2595
|
class: "toast-msg-detail"
|
|
@@ -2742,36 +2597,36 @@ function Sa(e) {
|
|
|
2742
2597
|
id: "exception_error_msg",
|
|
2743
2598
|
ref: "exceptionMessageRef",
|
|
2744
2599
|
style: l.value
|
|
2745
|
-
}, [
|
|
2600
|
+
}, [X("详细信息 : "), f("span", {
|
|
2746
2601
|
innerHTML: c.value
|
|
2747
2602
|
}, null)]), u.value && f("span", {
|
|
2748
2603
|
style: m.value
|
|
2749
|
-
}, [
|
|
2750
|
-
onClick:
|
|
2604
|
+
}, [i.value && f("span", {
|
|
2605
|
+
onClick: h,
|
|
2751
2606
|
style: "cursor: pointer;"
|
|
2752
|
-
}, [
|
|
2753
|
-
onClick:
|
|
2607
|
+
}, [r.value]), !i.value && f("span", {
|
|
2608
|
+
onClick: g,
|
|
2754
2609
|
style: "cursor: pointer;"
|
|
2755
|
-
}, [
|
|
2610
|
+
}, [d.value])])]);
|
|
2756
2611
|
}
|
|
2757
|
-
function
|
|
2612
|
+
function Sa(t) {
|
|
2758
2613
|
return () => f("p", {
|
|
2759
2614
|
class: "toast-msg-detail",
|
|
2760
|
-
innerHTML:
|
|
2615
|
+
innerHTML: t.value
|
|
2761
2616
|
}, null);
|
|
2762
2617
|
}
|
|
2763
|
-
function
|
|
2764
|
-
const a =
|
|
2618
|
+
function La(t, e, n, o) {
|
|
2619
|
+
const a = p(t.exceptionInfo), s = L(() => {
|
|
2765
2620
|
const m = {
|
|
2766
2621
|
"f-icon": !0
|
|
2767
|
-
},
|
|
2768
|
-
return m[
|
|
2769
|
-
}), l =
|
|
2770
|
-
function
|
|
2771
|
-
return
|
|
2772
|
-
}
|
|
2773
|
-
const
|
|
2774
|
-
return () => f(
|
|
2622
|
+
}, v = `f-icon-${e.value}`;
|
|
2623
|
+
return m[v] = !0, m;
|
|
2624
|
+
}), l = L(() => n.value || a.value && a.value.message), c = L(() => o.value), u = L(() => !!o.value), i = L(() => !!a.value);
|
|
2625
|
+
function d() {
|
|
2626
|
+
return i.value ? Ia(a) : u.value ? Sa(c) : () => null;
|
|
2627
|
+
}
|
|
2628
|
+
const r = d();
|
|
2629
|
+
return () => f(ae, null, [f("div", {
|
|
2775
2630
|
class: "float-left modal-tips-iconwrap"
|
|
2776
2631
|
}, [f("span", {
|
|
2777
2632
|
class: s.value
|
|
@@ -2780,20 +2635,20 @@ function Ea(e, t, n, o) {
|
|
|
2780
2635
|
}, [f("p", {
|
|
2781
2636
|
class: "toast-msg-title",
|
|
2782
2637
|
innerHTML: l.value
|
|
2783
|
-
}, null),
|
|
2638
|
+
}, null), r()])]);
|
|
2784
2639
|
}
|
|
2785
|
-
function
|
|
2640
|
+
function Da(t, e, n) {
|
|
2786
2641
|
const {
|
|
2787
2642
|
onCopy: o
|
|
2788
|
-
} =
|
|
2643
|
+
} = e, {
|
|
2789
2644
|
toShowFeedback: a
|
|
2790
|
-
} = n, s =
|
|
2645
|
+
} = n, s = p("复制成功"), l = p("复制详细信息"), c = p(t.exceptionInfo || {
|
|
2791
2646
|
date: "",
|
|
2792
2647
|
message: "",
|
|
2793
2648
|
detail: ""
|
|
2794
|
-
}), u =
|
|
2795
|
-
function
|
|
2796
|
-
o(u.value).catch((
|
|
2649
|
+
}), u = L(() => c.value && c.value.detail || "");
|
|
2650
|
+
function i(d) {
|
|
2651
|
+
o(u.value).catch((r) => {
|
|
2797
2652
|
s.value = "复制失败";
|
|
2798
2653
|
}).finally(() => {
|
|
2799
2654
|
a.value = !0, setTimeout(() => {
|
|
@@ -2804,77 +2659,77 @@ function La(e, t, n) {
|
|
|
2804
2659
|
return () => f("span", {
|
|
2805
2660
|
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
2806
2661
|
}, [f("span", {
|
|
2807
|
-
onClick:
|
|
2662
|
+
onClick: i,
|
|
2808
2663
|
style: "cursor: pointer;"
|
|
2809
2664
|
}, [l.value])]);
|
|
2810
2665
|
}
|
|
2811
|
-
function
|
|
2812
|
-
const a =
|
|
2813
|
-
function
|
|
2814
|
-
a.value === "question" &&
|
|
2666
|
+
function Pa(t, e, n, o) {
|
|
2667
|
+
const a = p(t.type), s = p([]), l = p(t.exceptionInfo), c = p(t.okButtonText), u = p(t.cancelButtonText), i = p(!0), d = p(!0), r = L(() => !!(s.value && s.value.length)), m = L(() => l.value && l.value.date && l.value.message && l.value.detail), v = L(() => !(s.value && s.value.length) && (c.value || u.value)), h = L(() => d.value && c.value), g = L(() => i.value && u.value), x = Da(t, n, o);
|
|
2668
|
+
function M(F) {
|
|
2669
|
+
a.value === "question" && e.emit("reject"), e.emit("close");
|
|
2815
2670
|
}
|
|
2816
|
-
function
|
|
2817
|
-
a.value === "question" &&
|
|
2671
|
+
function y(F) {
|
|
2672
|
+
a.value === "question" && e.emit("accept"), e.emit("close");
|
|
2818
2673
|
}
|
|
2819
2674
|
return () => f("div", {
|
|
2820
2675
|
class: "modal-footer"
|
|
2821
|
-
}, [m.value && x(),
|
|
2676
|
+
}, [m.value && x(), v.value && g.value && f("button", {
|
|
2822
2677
|
type: "button",
|
|
2823
2678
|
class: "btn btn-secondary btn-lg",
|
|
2824
|
-
onClick:
|
|
2825
|
-
}, [u.value]),
|
|
2679
|
+
onClick: M
|
|
2680
|
+
}, [u.value]), v.value && h.value && f("button", {
|
|
2826
2681
|
type: "button",
|
|
2827
2682
|
class: "btn btn-primary btn-lg",
|
|
2828
|
-
onClick:
|
|
2829
|
-
}, [c.value]),
|
|
2683
|
+
onClick: y
|
|
2684
|
+
}, [c.value]), r.value && s.value.length && s.value.map((F) => f("button", {
|
|
2830
2685
|
type: "button",
|
|
2831
|
-
onClick:
|
|
2832
|
-
class:
|
|
2833
|
-
}, [
|
|
2834
|
-
class:
|
|
2835
|
-
}, null),
|
|
2686
|
+
onClick: F.handle,
|
|
2687
|
+
class: F.class
|
|
2688
|
+
}, [F.iconClass && f("span", {
|
|
2689
|
+
class: F.iconClass
|
|
2690
|
+
}, null), F.text]))]);
|
|
2836
2691
|
}
|
|
2837
|
-
const
|
|
2692
|
+
const ie = /* @__PURE__ */ H({
|
|
2838
2693
|
name: "FMessageBox",
|
|
2839
|
-
props:
|
|
2694
|
+
props: ba,
|
|
2840
2695
|
emits: ["accept", "reject", "close"],
|
|
2841
|
-
setup(
|
|
2842
|
-
const n =
|
|
2696
|
+
setup(t, e) {
|
|
2697
|
+
const n = p(t.type), o = p(t.title), a = p(t.detail), s = L(() => {
|
|
2843
2698
|
const x = {
|
|
2844
2699
|
"modal-tips": !0,
|
|
2845
2700
|
"d-flex": !0,
|
|
2846
2701
|
"flex-row": !0
|
|
2847
|
-
},
|
|
2848
|
-
return x[
|
|
2849
|
-
}), l =
|
|
2702
|
+
}, M = `messager-type-${n.value}`;
|
|
2703
|
+
return x[M] = !0, x;
|
|
2704
|
+
}), l = L(() => {
|
|
2850
2705
|
const x = {};
|
|
2851
2706
|
return n.value === "prompt" ? x.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (x.padding = "0.5rem 1.5rem 1rem 1.5rem"), x;
|
|
2852
|
-
}), c =
|
|
2853
|
-
feedbackStyle:
|
|
2854
|
-
feedbackMessage:
|
|
2855
|
-
} =
|
|
2707
|
+
}), c = Fa(), u = Ba(t, n, o, a), i = ka(), {
|
|
2708
|
+
feedbackStyle: d,
|
|
2709
|
+
feedbackMessage: r
|
|
2710
|
+
} = i;
|
|
2856
2711
|
function m() {
|
|
2857
2712
|
return f("div", {
|
|
2858
|
-
style:
|
|
2859
|
-
}, [
|
|
2713
|
+
style: d.value
|
|
2714
|
+
}, [r.value]);
|
|
2860
2715
|
}
|
|
2861
|
-
function
|
|
2716
|
+
function v() {
|
|
2862
2717
|
switch (n.value) {
|
|
2863
2718
|
case "prompt":
|
|
2864
|
-
return
|
|
2719
|
+
return Ea(t, u);
|
|
2865
2720
|
default:
|
|
2866
|
-
return
|
|
2721
|
+
return La(t, n, o, a);
|
|
2867
2722
|
}
|
|
2868
2723
|
}
|
|
2869
|
-
const
|
|
2724
|
+
const h = v(), g = Pa(t, e, c, i);
|
|
2870
2725
|
return () => f("div", {
|
|
2871
2726
|
class: "farris-messager"
|
|
2872
2727
|
}, [f("section", {
|
|
2873
2728
|
class: s.value,
|
|
2874
2729
|
style: l.value
|
|
2875
|
-
}, [
|
|
2730
|
+
}, [h()]), g(), m()]);
|
|
2876
2731
|
}
|
|
2877
|
-
}),
|
|
2732
|
+
}), Va = {
|
|
2878
2733
|
/**
|
|
2879
2734
|
* 自定义类
|
|
2880
2735
|
*/
|
|
@@ -2935,37 +2790,37 @@ const de = /* @__PURE__ */ Y({
|
|
|
2935
2790
|
enableEsc: { type: Boolean, default: !0 },
|
|
2936
2791
|
enableEnter: { type: Boolean, default: !1 }
|
|
2937
2792
|
};
|
|
2938
|
-
class
|
|
2939
|
-
constructor(
|
|
2940
|
-
this.x =
|
|
2793
|
+
class q {
|
|
2794
|
+
constructor(e, n) {
|
|
2795
|
+
this.x = e, this.y = n;
|
|
2941
2796
|
}
|
|
2942
|
-
static getTransformInfo(
|
|
2943
|
-
const o = window.getComputedStyle(
|
|
2797
|
+
static getTransformInfo(e) {
|
|
2798
|
+
const o = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
2944
2799
|
if (o.length >= 6) {
|
|
2945
2800
|
const a = parseInt(o[4], 10), s = parseInt(o[5], 10);
|
|
2946
2801
|
return { x: a, y: s };
|
|
2947
2802
|
}
|
|
2948
2803
|
return { x: 0, y: 0 };
|
|
2949
2804
|
}
|
|
2950
|
-
static fromEvent(
|
|
2951
|
-
if (this.isMouseEvent(
|
|
2952
|
-
return new
|
|
2953
|
-
if (n === null ||
|
|
2954
|
-
return new
|
|
2955
|
-
for (let o = 0; o <
|
|
2956
|
-
if (
|
|
2957
|
-
return new
|
|
2805
|
+
static fromEvent(e, n = null) {
|
|
2806
|
+
if (this.isMouseEvent(e))
|
|
2807
|
+
return new q(e.clientX, e.clientY);
|
|
2808
|
+
if (n === null || e.changedTouches.length === 1)
|
|
2809
|
+
return new q(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
|
|
2810
|
+
for (let o = 0; o < e.changedTouches.length; o++)
|
|
2811
|
+
if (e.changedTouches[o].target === n)
|
|
2812
|
+
return new q(e.changedTouches[o].clientX, e.changedTouches[o].clientY);
|
|
2958
2813
|
}
|
|
2959
|
-
static isMouseEvent(
|
|
2960
|
-
return Object.prototype.toString.apply(
|
|
2814
|
+
static isMouseEvent(e) {
|
|
2815
|
+
return Object.prototype.toString.apply(e).indexOf("MouseEvent") === 8;
|
|
2961
2816
|
}
|
|
2962
|
-
static isIPosition(
|
|
2963
|
-
return !!
|
|
2817
|
+
static isIPosition(e) {
|
|
2818
|
+
return !!e && "x" in e && "y" in e;
|
|
2964
2819
|
}
|
|
2965
|
-
static getCurrent(
|
|
2966
|
-
const n = new
|
|
2820
|
+
static getCurrent(e) {
|
|
2821
|
+
const n = new q(0, 0);
|
|
2967
2822
|
if (window) {
|
|
2968
|
-
const o = window.getComputedStyle(
|
|
2823
|
+
const o = window.getComputedStyle(e);
|
|
2969
2824
|
if (o) {
|
|
2970
2825
|
const a = parseInt(o.getPropertyValue("left"), 10), s = parseInt(o.getPropertyValue("top"), 10);
|
|
2971
2826
|
n.x = isNaN(a) ? 0 : a, n.y = isNaN(s) ? 0 : s;
|
|
@@ -2974,676 +2829,676 @@ class G {
|
|
|
2974
2829
|
}
|
|
2975
2830
|
return null;
|
|
2976
2831
|
}
|
|
2977
|
-
static copy(
|
|
2978
|
-
return new
|
|
2832
|
+
static copy(e) {
|
|
2833
|
+
return new q(0, 0).set(e);
|
|
2979
2834
|
}
|
|
2980
2835
|
get value() {
|
|
2981
2836
|
return { x: this.x, y: this.y };
|
|
2982
2837
|
}
|
|
2983
|
-
add(
|
|
2984
|
-
return this.x +=
|
|
2838
|
+
add(e) {
|
|
2839
|
+
return this.x += e.x, this.y += e.y, this;
|
|
2985
2840
|
}
|
|
2986
|
-
subtract(
|
|
2987
|
-
return this.x -=
|
|
2841
|
+
subtract(e) {
|
|
2842
|
+
return this.x -= e.x, this.y -= e.y, this;
|
|
2988
2843
|
}
|
|
2989
|
-
multiply(
|
|
2990
|
-
this.x *=
|
|
2844
|
+
multiply(e) {
|
|
2845
|
+
this.x *= e, this.y *= e;
|
|
2991
2846
|
}
|
|
2992
|
-
divide(
|
|
2993
|
-
this.x /=
|
|
2847
|
+
divide(e) {
|
|
2848
|
+
this.x /= e, this.y /= e;
|
|
2994
2849
|
}
|
|
2995
2850
|
reset() {
|
|
2996
2851
|
return this.x = 0, this.y = 0, this;
|
|
2997
2852
|
}
|
|
2998
|
-
set(
|
|
2999
|
-
return this.x =
|
|
2853
|
+
set(e) {
|
|
2854
|
+
return this.x = e.x, this.y = e.y, this;
|
|
3000
2855
|
}
|
|
3001
2856
|
}
|
|
3002
|
-
class
|
|
3003
|
-
constructor(
|
|
3004
|
-
this.width =
|
|
2857
|
+
class _ {
|
|
2858
|
+
constructor(e, n) {
|
|
2859
|
+
this.width = e, this.height = n;
|
|
3005
2860
|
}
|
|
3006
|
-
static getCurrent(
|
|
3007
|
-
const n = new
|
|
2861
|
+
static getCurrent(e) {
|
|
2862
|
+
const n = new _(0, 0);
|
|
3008
2863
|
if (window) {
|
|
3009
|
-
const o = window.getComputedStyle(
|
|
2864
|
+
const o = window.getComputedStyle(e);
|
|
3010
2865
|
return o && (n.width = parseInt(o.getPropertyValue("width"), 10), n.height = parseInt(o.getPropertyValue("height"), 10)), n;
|
|
3011
2866
|
}
|
|
3012
2867
|
return null;
|
|
3013
2868
|
}
|
|
3014
|
-
static copy(
|
|
3015
|
-
return new
|
|
2869
|
+
static copy(e) {
|
|
2870
|
+
return new _(0, 0).set(e);
|
|
3016
2871
|
}
|
|
3017
|
-
set(
|
|
3018
|
-
return this.width =
|
|
2872
|
+
set(e) {
|
|
2873
|
+
return this.width = e.width, this.height = e.height, this;
|
|
3019
2874
|
}
|
|
3020
2875
|
}
|
|
3021
|
-
function
|
|
3022
|
-
const n =
|
|
2876
|
+
function Ra(t, e) {
|
|
2877
|
+
const n = p(), o = p(), a = p(), s = p(), l = p(), c = p(), u = p(), i = p(), d = p(), r = p(), m = p(), v = p(), h = p(t.draggable), g = p(!1);
|
|
3023
2878
|
function x() {
|
|
3024
|
-
const
|
|
3025
|
-
if (!
|
|
2879
|
+
const I = o.value || document.body, D = window.getComputedStyle(I);
|
|
2880
|
+
if (!D || !n.value)
|
|
3026
2881
|
return;
|
|
3027
|
-
const $ =
|
|
3028
|
-
u.value && (
|
|
3029
|
-
const
|
|
3030
|
-
|
|
2882
|
+
const $ = q.getTransformInfo(n.value), A = {};
|
|
2883
|
+
u.value && (A.deltaL = n.value.offsetLeft - u.value.x, A.deltaT = n.value.offsetTop - u.value.y);
|
|
2884
|
+
const G = D.getPropertyValue("position");
|
|
2885
|
+
A.width = I.clientWidth, A.height = I.clientHeight, A.pr = parseInt(D.getPropertyValue("padding-right"), 10), A.pb = parseInt(D.getPropertyValue("padding-bottom"), 10), A.position = D.getPropertyValue("position"), G === "static" && (I.style.position = "relative"), A.translateX = $.x, A.translateY = $.y, r.value = A;
|
|
3031
2886
|
}
|
|
3032
|
-
function
|
|
2887
|
+
function M(I) {
|
|
3033
2888
|
if (n.value) {
|
|
3034
|
-
s.value =
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3037
|
-
n: !!
|
|
3038
|
-
s: !!
|
|
3039
|
-
w: !!
|
|
3040
|
-
e: !!
|
|
2889
|
+
s.value = _.getCurrent(n.value), l.value = q.getCurrent(n.value), c.value = s.value ? _.copy(s.value) : null, u.value = l.value ? q.copy(l.value) : null, x();
|
|
2890
|
+
const D = I.target.getAttribute("type") || "";
|
|
2891
|
+
i.value = {
|
|
2892
|
+
n: !!D.match(/n/),
|
|
2893
|
+
s: !!D.match(/s/),
|
|
2894
|
+
w: !!D.match(/w/),
|
|
2895
|
+
e: !!D.match(/e/)
|
|
3041
2896
|
};
|
|
3042
2897
|
}
|
|
3043
2898
|
}
|
|
3044
|
-
function
|
|
3045
|
-
var
|
|
2899
|
+
function y() {
|
|
2900
|
+
var I, D, $, A;
|
|
3046
2901
|
if (n.value) {
|
|
3047
|
-
const
|
|
3048
|
-
|
|
2902
|
+
const G = n.value;
|
|
2903
|
+
i.value && ((i.value.n || i.value.s) && ((I = c.value) != null && I.height) && (G.style.height = c.value.height + "px"), (i.value.w || i.value.e) && ((D = c.value) != null && D.width) && (G.style.width = c.value.width + "px"), u.value && (($ = u.value) != null && $.x && (G.style.left = u.value.x + "px"), (A = u.value) != null && A.y && (G.style.top = u.value.y + "px")));
|
|
3049
2904
|
}
|
|
3050
2905
|
}
|
|
3051
|
-
function
|
|
3052
|
-
const
|
|
3053
|
-
c.value && u.value &&
|
|
2906
|
+
function F() {
|
|
2907
|
+
const I = t.minHeight ? t.minHeight : 1, D = t.minWidth ? t.minWidth : 1;
|
|
2908
|
+
c.value && u.value && i.value && s.value && (c.value.height < I && (c.value.height = I, i.value.n && l.value && (u.value.y = l.value.y + (s.value.height - I))), c.value.width < D && (c.value.width = D, i.value.w && l.value && (u.value.x = l.value.x + (s.value.width - D))), t.maxHeight && c.value.height > t.maxHeight && (c.value.height = t.maxHeight, l.value && i.value.n && (u.value.y = l.value.y + (s.value.height - t.maxHeight))), t.maxWidth && c.value.width > t.maxWidth && (c.value.width = t.maxWidth, i.value.w && l.value && (u.value.x = l.value.x + (s.value.width - t.maxWidth))));
|
|
3054
2909
|
}
|
|
3055
|
-
function
|
|
2910
|
+
function b() {
|
|
3056
2911
|
if (o.value) {
|
|
3057
|
-
const
|
|
3058
|
-
if (u.value && c.value &&
|
|
3059
|
-
const
|
|
3060
|
-
|
|
2912
|
+
const I = r.value;
|
|
2913
|
+
if (u.value && c.value && i.value && s.value) {
|
|
2914
|
+
const D = I.width - I.pr - I.deltaL - I.translateX - u.value.x, $ = I.height - I.pb - I.deltaT - I.translateY - u.value.y;
|
|
2915
|
+
i.value.n && u.value.y + I.translateY < 0 && l.value && (u.value.y = -I.translateY, c.value.height = s.value.height + l.value.y + I.translateY), i.value.w && u.value.x + I.translateX < 0 && l.value && (u.value.x = -I.translateX, c.value.width = s.value.width + l.value.x + I.translateX), c.value.width > D && (c.value.width = D), c.value.height > $ && (c.value.height = $);
|
|
3061
2916
|
}
|
|
3062
2917
|
}
|
|
3063
2918
|
}
|
|
3064
|
-
function
|
|
3065
|
-
if (!a.value || !s.value || !l.value || !
|
|
2919
|
+
function w(I) {
|
|
2920
|
+
if (!a.value || !s.value || !l.value || !i.value)
|
|
3066
2921
|
return;
|
|
3067
|
-
|
|
3068
|
-
const
|
|
3069
|
-
|
|
2922
|
+
I.subtract(a.value);
|
|
2923
|
+
const D = I.x, $ = I.y;
|
|
2924
|
+
i.value.n ? (u.value.y = l.value.y + $, c.value.height = s.value.height - $) : i.value.s && (c.value.height = s.value.height + $), i.value.e ? c.value.width = s.value.width + D : i.value.w && (c.value.width = s.value.width - D, u.value.x = l.value.x + D), b(), F(), y();
|
|
3070
2925
|
}
|
|
3071
|
-
function
|
|
3072
|
-
if (!
|
|
2926
|
+
function R(I) {
|
|
2927
|
+
if (!d.value)
|
|
3073
2928
|
return;
|
|
3074
|
-
const
|
|
3075
|
-
|
|
2929
|
+
const D = q.fromEvent(I);
|
|
2930
|
+
D && w(D);
|
|
3076
2931
|
}
|
|
3077
|
-
function
|
|
2932
|
+
function C() {
|
|
3078
2933
|
if (n.value) {
|
|
3079
2934
|
const {
|
|
3080
|
-
width:
|
|
3081
|
-
height:
|
|
2935
|
+
width: I,
|
|
2936
|
+
height: D,
|
|
3082
2937
|
x: $,
|
|
3083
|
-
y:
|
|
3084
|
-
} = n.value.getBoundingClientRect(),
|
|
2938
|
+
y: A
|
|
2939
|
+
} = n.value.getBoundingClientRect(), G = q.getTransformInfo(n.value);
|
|
3085
2940
|
return {
|
|
3086
2941
|
size: {
|
|
3087
|
-
width:
|
|
3088
|
-
height:
|
|
2942
|
+
width: I,
|
|
2943
|
+
height: D
|
|
3089
2944
|
},
|
|
3090
2945
|
position: {
|
|
3091
|
-
x: $ -
|
|
3092
|
-
y:
|
|
2946
|
+
x: $ - G.x,
|
|
2947
|
+
y: A - G.y
|
|
3093
2948
|
}
|
|
3094
2949
|
};
|
|
3095
2950
|
}
|
|
3096
2951
|
return null;
|
|
3097
2952
|
}
|
|
3098
|
-
function
|
|
2953
|
+
function P(I) {
|
|
3099
2954
|
if (n.value) {
|
|
3100
|
-
const
|
|
3101
|
-
m.value =
|
|
2955
|
+
const D = C();
|
|
2956
|
+
m.value = D;
|
|
3102
2957
|
}
|
|
3103
|
-
a.value = void 0, s.value = null, l.value = null, c.value = null, u.value = null,
|
|
2958
|
+
a.value = void 0, s.value = null, l.value = null, c.value = null, u.value = null, i.value = null, d.value = null, document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", P);
|
|
3104
2959
|
}
|
|
3105
|
-
function
|
|
3106
|
-
document.addEventListener("mousemove",
|
|
2960
|
+
function O() {
|
|
2961
|
+
document.addEventListener("mousemove", R), document.addEventListener("mouseup", P);
|
|
3107
2962
|
}
|
|
3108
|
-
function
|
|
3109
|
-
|
|
2963
|
+
function U(I) {
|
|
2964
|
+
I instanceof MouseEvent && I.button === 2 || h.value && (I.stopPropagation(), I.preventDefault(), a.value = q.fromEvent(I), d.value = I.target, M(I), O());
|
|
3110
2965
|
}
|
|
3111
|
-
function
|
|
3112
|
-
return n.value =
|
|
2966
|
+
function z(I) {
|
|
2967
|
+
return n.value = I, f(ae, null, [f("div", {
|
|
3113
2968
|
class: "fv-resizable-handle fv-resizable-n",
|
|
3114
2969
|
type: "n",
|
|
3115
|
-
onMousedown: (
|
|
2970
|
+
onMousedown: (D) => U(D)
|
|
3116
2971
|
}, null), f("div", {
|
|
3117
2972
|
class: "fv-resizable-handle fv-resizable-e",
|
|
3118
2973
|
type: "e",
|
|
3119
|
-
onMousedown: (
|
|
2974
|
+
onMousedown: (D) => U(D)
|
|
3120
2975
|
}, null), f("div", {
|
|
3121
2976
|
class: "fv-resizable-handle fv-resizable-s",
|
|
3122
2977
|
type: "s",
|
|
3123
|
-
onMousedown: (
|
|
2978
|
+
onMousedown: (D) => U(D)
|
|
3124
2979
|
}, null), f("div", {
|
|
3125
2980
|
class: "fv-resizable-handle fv-resizable-w",
|
|
3126
2981
|
type: "w",
|
|
3127
|
-
onMousedown: (
|
|
2982
|
+
onMousedown: (D) => U(D)
|
|
3128
2983
|
}, null), f("div", {
|
|
3129
2984
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
3130
2985
|
type: "ne",
|
|
3131
|
-
onMousedown: (
|
|
2986
|
+
onMousedown: (D) => U(D)
|
|
3132
2987
|
}, null), f("div", {
|
|
3133
2988
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
3134
2989
|
type: "se",
|
|
3135
|
-
onMousedown: (
|
|
2990
|
+
onMousedown: (D) => U(D)
|
|
3136
2991
|
}, null), f("div", {
|
|
3137
2992
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
3138
2993
|
type: "sw",
|
|
3139
|
-
onMousedown: (
|
|
2994
|
+
onMousedown: (D) => U(D)
|
|
3140
2995
|
}, null), f("div", {
|
|
3141
2996
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
3142
2997
|
type: "nw",
|
|
3143
|
-
onMousedown: (
|
|
2998
|
+
onMousedown: (D) => U(D)
|
|
3144
2999
|
}, null)]);
|
|
3145
3000
|
}
|
|
3146
|
-
function
|
|
3147
|
-
const
|
|
3148
|
-
|
|
3001
|
+
function Y(I = !0) {
|
|
3002
|
+
const D = o.value || document.body, $ = _.getCurrent(D), A = n.value;
|
|
3003
|
+
I && (v.value = C(), v.value.transform = A.style.transform), $ && A && (c.value = $, A.style.height = c.value.height - 14 + "px", A.style.width = c.value.width - 14 + "px", A.style.left = "7px", A.style.top = "7px", A.style.transform = "", m.value = {
|
|
3149
3004
|
size: c.value,
|
|
3150
3005
|
position: {
|
|
3151
3006
|
x: 0,
|
|
3152
3007
|
y: 0
|
|
3153
3008
|
}
|
|
3154
|
-
},
|
|
3009
|
+
}, h.value = !1, g.value = !0);
|
|
3155
3010
|
}
|
|
3156
|
-
function
|
|
3157
|
-
var
|
|
3158
|
-
if (
|
|
3011
|
+
function pe() {
|
|
3012
|
+
var I, D;
|
|
3013
|
+
if (v.value) {
|
|
3159
3014
|
const $ = {
|
|
3160
|
-
width:
|
|
3161
|
-
height:
|
|
3162
|
-
},
|
|
3015
|
+
width: v.value.size.width || 0,
|
|
3016
|
+
height: v.value.size.height || 0
|
|
3017
|
+
}, A = {
|
|
3163
3018
|
x: (window.innerWidth - $.width) / 2,
|
|
3164
3019
|
y: (window.innerHeight - $.height) / 2
|
|
3165
3020
|
};
|
|
3166
|
-
(
|
|
3167
|
-
const
|
|
3168
|
-
|
|
3021
|
+
(I = c.value) == null || I.set($), (D = u.value) == null || D.set(A);
|
|
3022
|
+
const G = n.value;
|
|
3023
|
+
G.style.height = $.height + "px", G.style.width = $.width + "px", G.style.left = `${A.x}px`, G.style.top = `${A.y}px`, G.style.transform = "", m.value = {
|
|
3169
3024
|
size: $,
|
|
3170
|
-
position:
|
|
3171
|
-
},
|
|
3025
|
+
position: A
|
|
3026
|
+
}, h.value = t.draggable, g.value = !1;
|
|
3172
3027
|
}
|
|
3173
3028
|
}
|
|
3174
|
-
function
|
|
3029
|
+
function me() {
|
|
3175
3030
|
if (n.value) {
|
|
3176
|
-
const
|
|
3177
|
-
if (
|
|
3031
|
+
const I = _.getCurrent(n.value);
|
|
3032
|
+
if (I) {
|
|
3178
3033
|
const {
|
|
3179
|
-
width:
|
|
3034
|
+
width: D,
|
|
3180
3035
|
height: $
|
|
3181
|
-
} =
|
|
3182
|
-
n.value.style.left = `${(window.innerWidth -
|
|
3036
|
+
} = I;
|
|
3037
|
+
n.value.style.left = `${(window.innerWidth - D) / 2}px`, n.value.style.top = `${(window.innerHeight - $) / 2}px`, n.value.style.transform = "";
|
|
3183
3038
|
}
|
|
3184
3039
|
}
|
|
3185
3040
|
}
|
|
3186
|
-
function
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3041
|
+
function fe() {
|
|
3042
|
+
const I = () => {
|
|
3043
|
+
g.value ? Y(!1) : me();
|
|
3189
3044
|
};
|
|
3190
|
-
return window.addEventListener("resize",
|
|
3191
|
-
window.removeEventListener("resize",
|
|
3045
|
+
return window.addEventListener("resize", I), () => {
|
|
3046
|
+
window.removeEventListener("resize", I);
|
|
3192
3047
|
};
|
|
3193
3048
|
}
|
|
3194
|
-
const
|
|
3049
|
+
const se = fe();
|
|
3195
3050
|
return {
|
|
3196
|
-
renderResizeBar:
|
|
3051
|
+
renderResizeBar: z,
|
|
3197
3052
|
boundingElement: o,
|
|
3198
3053
|
resizedEventParam: m,
|
|
3199
|
-
maximize:
|
|
3200
|
-
restore:
|
|
3201
|
-
allowDrag:
|
|
3202
|
-
isMaximized:
|
|
3203
|
-
unWindowResizeHandle:
|
|
3054
|
+
maximize: Y,
|
|
3055
|
+
restore: pe,
|
|
3056
|
+
allowDrag: h,
|
|
3057
|
+
isMaximized: g,
|
|
3058
|
+
unWindowResizeHandle: se
|
|
3204
3059
|
};
|
|
3205
3060
|
}
|
|
3206
|
-
function
|
|
3207
|
-
const o =
|
|
3208
|
-
|
|
3209
|
-
l.value.style.cursor =
|
|
3061
|
+
function Na(t, e, n) {
|
|
3062
|
+
const o = p(), a = p(t.draggable), s = p(t.lockAxis), l = p(), c = p(), u = p(!1), i = p(new q(0, 0)), d = p(new q(0, 0)), r = p(new q(0, 0)), m = p(new q(0, 0));
|
|
3063
|
+
W(() => n.value, (C) => {
|
|
3064
|
+
l.value.style.cursor = C ? "move" : "default";
|
|
3210
3065
|
});
|
|
3211
|
-
function
|
|
3212
|
-
if (
|
|
3066
|
+
function v(C, P) {
|
|
3067
|
+
if (P.tagName === "BUTTON")
|
|
3213
3068
|
return !1;
|
|
3214
|
-
if (
|
|
3069
|
+
if (P === C)
|
|
3215
3070
|
return !0;
|
|
3216
|
-
for (const
|
|
3217
|
-
if (
|
|
3071
|
+
for (const O in P.children)
|
|
3072
|
+
if (Object.prototype.hasOwnProperty.call(P.children, O) && v(C, P.children[O]))
|
|
3218
3073
|
return !0;
|
|
3219
3074
|
return !1;
|
|
3220
3075
|
}
|
|
3221
|
-
function
|
|
3222
|
-
var
|
|
3223
|
-
let
|
|
3224
|
-
s.value === "x" ? (
|
|
3225
|
-
const
|
|
3226
|
-
o.value && (o.value.style.transform =
|
|
3076
|
+
function h() {
|
|
3077
|
+
var U, z;
|
|
3078
|
+
let C = r.value.x + d.value.x, P = r.value.y + d.value.y;
|
|
3079
|
+
s.value === "x" ? (C = ((U = i.value) == null ? void 0 : U.x) || 0, r.value.x = 0) : s.value === "y" && (P = ((z = i.value) == null ? void 0 : z.y) || 0, r.value.y = 0);
|
|
3080
|
+
const O = `translate3d(${Math.round(C)}px, ${Math.round(P)}px, 0px)`;
|
|
3081
|
+
o.value && (o.value.style.transform = O), m.value.x = C, m.value.y = P;
|
|
3227
3082
|
}
|
|
3228
|
-
function
|
|
3083
|
+
function g() {
|
|
3229
3084
|
if (!c.value || !o.value)
|
|
3230
3085
|
return null;
|
|
3231
|
-
const
|
|
3232
|
-
top:
|
|
3233
|
-
right:
|
|
3234
|
-
bottom:
|
|
3235
|
-
left:
|
|
3086
|
+
const C = c.value.getBoundingClientRect(), P = o.value.getBoundingClientRect(), O = {
|
|
3087
|
+
top: C.top < P.top,
|
|
3088
|
+
right: C.right > P.right,
|
|
3089
|
+
bottom: C.bottom > P.bottom,
|
|
3090
|
+
left: C.left < P.left
|
|
3236
3091
|
};
|
|
3237
|
-
return
|
|
3092
|
+
return O.top || (r.value.y -= P.top - C.top), O.bottom || (r.value.y -= P.bottom - C.bottom), O.right || (r.value.x -= P.right - C.right), O.left || (r.value.x -= P.left - C.left), h(), O;
|
|
3238
3093
|
}
|
|
3239
|
-
function x(
|
|
3240
|
-
|
|
3094
|
+
function x(C) {
|
|
3095
|
+
C && (i.value && C.subtract(i.value), r.value.set(C), h(), g());
|
|
3241
3096
|
}
|
|
3242
|
-
function C
|
|
3243
|
-
u.value && a.value && (
|
|
3097
|
+
function M(C) {
|
|
3098
|
+
u.value && a.value && (C.stopPropagation(), C.preventDefault(), x(q.fromEvent(C, l.value)));
|
|
3244
3099
|
}
|
|
3245
|
-
function
|
|
3246
|
-
var
|
|
3247
|
-
u.value && (u.value = !1,
|
|
3100
|
+
function y() {
|
|
3101
|
+
var C;
|
|
3102
|
+
u.value && (u.value = !1, d.value.add(r.value), r.value.reset(), (C = o.value) == null || C.classList.remove("ng-dragging"), document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", y));
|
|
3248
3103
|
}
|
|
3249
|
-
function
|
|
3250
|
-
!u.value && l.value && (u.value = !0, l.value.classList.add("ng-dragging"), document.addEventListener("mousemove",
|
|
3104
|
+
function F() {
|
|
3105
|
+
!u.value && l.value && (u.value = !0, l.value.classList.add("ng-dragging"), document.addEventListener("mousemove", M), document.addEventListener("mouseup", y));
|
|
3251
3106
|
}
|
|
3252
|
-
function
|
|
3107
|
+
function b() {
|
|
3253
3108
|
if (o.value) {
|
|
3254
|
-
const
|
|
3255
|
-
|
|
3109
|
+
const C = q.getTransformInfo(o.value);
|
|
3110
|
+
d.value.set(C);
|
|
3256
3111
|
return;
|
|
3257
3112
|
}
|
|
3258
|
-
|
|
3113
|
+
d.value.reset();
|
|
3259
3114
|
}
|
|
3260
|
-
function
|
|
3261
|
-
if (!n.value ||
|
|
3115
|
+
function w(C) {
|
|
3116
|
+
if (!n.value || C instanceof MouseEvent && C.button === 2)
|
|
3262
3117
|
return;
|
|
3263
|
-
const
|
|
3264
|
-
l.value !== void 0 &&
|
|
3265
|
-
}
|
|
3266
|
-
function
|
|
3267
|
-
if (a.value &&
|
|
3268
|
-
if (
|
|
3269
|
-
l.value =
|
|
3270
|
-
else if (
|
|
3271
|
-
if (
|
|
3272
|
-
l.value =
|
|
3273
|
-
else if (typeof
|
|
3274
|
-
const
|
|
3275
|
-
|
|
3118
|
+
const P = C.target || C.srcElement;
|
|
3119
|
+
l.value !== void 0 && P && !v(P, l.value) || a.value !== !1 && (document.body.click(), C.stopPropagation(), C.preventDefault(), i.value = q.fromEvent(C, o.value), b(), F());
|
|
3120
|
+
}
|
|
3121
|
+
function R(C, P, O) {
|
|
3122
|
+
if (a.value && P) {
|
|
3123
|
+
if (C)
|
|
3124
|
+
l.value = C;
|
|
3125
|
+
else if (t.dragHandle) {
|
|
3126
|
+
if (t.dragHandle instanceof HTMLElement)
|
|
3127
|
+
l.value = t.dragHandle;
|
|
3128
|
+
else if (typeof t.dragHandle == "string") {
|
|
3129
|
+
const U = P.querySelector(t.dragHandle);
|
|
3130
|
+
U && (l.value = U);
|
|
3276
3131
|
}
|
|
3277
3132
|
}
|
|
3278
|
-
o.value =
|
|
3133
|
+
o.value = P, c.value = O, l.value.classList.add("ng-draggable"), l.value.addEventListener("mousedown", w);
|
|
3279
3134
|
}
|
|
3280
3135
|
}
|
|
3281
3136
|
return {
|
|
3282
|
-
registerDraggle:
|
|
3283
|
-
resetTranslate:
|
|
3137
|
+
registerDraggle: R,
|
|
3138
|
+
resetTranslate: b
|
|
3284
3139
|
};
|
|
3285
3140
|
}
|
|
3286
|
-
function it(
|
|
3287
|
-
if (
|
|
3141
|
+
function it(t, e) {
|
|
3142
|
+
if (t) {
|
|
3288
3143
|
const n = (o) => {
|
|
3289
|
-
o.key.toLowerCase() ===
|
|
3144
|
+
o.key.toLowerCase() === t.toLowerCase() && e({ event: o, key: t });
|
|
3290
3145
|
};
|
|
3291
3146
|
return document.addEventListener("keydown", n), () => {
|
|
3292
3147
|
document.removeEventListener("keydown", n);
|
|
3293
3148
|
};
|
|
3294
3149
|
}
|
|
3295
3150
|
}
|
|
3296
|
-
function
|
|
3297
|
-
const n =
|
|
3151
|
+
function Oa(t, e) {
|
|
3152
|
+
const n = p(t.enableEsc);
|
|
3298
3153
|
let o = null;
|
|
3299
3154
|
return n.value ? (o = it("Escape", (a) => {
|
|
3300
|
-
|
|
3155
|
+
e.emit("esc", { event: a.event, type: "esc" });
|
|
3301
3156
|
}), {
|
|
3302
3157
|
remove: o
|
|
3303
3158
|
}) : null;
|
|
3304
3159
|
}
|
|
3305
|
-
function
|
|
3306
|
-
const n =
|
|
3160
|
+
function Aa(t, e) {
|
|
3161
|
+
const n = p(t.enableEnter);
|
|
3307
3162
|
let o = null;
|
|
3308
3163
|
return n.value ? (o = it("Enter", (a) => {
|
|
3309
|
-
|
|
3164
|
+
e.emit("enter", { event: a.event, type: "enter" });
|
|
3310
3165
|
}), {
|
|
3311
3166
|
remove: o
|
|
3312
3167
|
}) : null;
|
|
3313
3168
|
}
|
|
3314
|
-
const ut = /* @__PURE__ */
|
|
3169
|
+
const ut = /* @__PURE__ */ H({
|
|
3315
3170
|
name: "FModal",
|
|
3316
|
-
props:
|
|
3171
|
+
props: Va,
|
|
3317
3172
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
3318
|
-
setup(
|
|
3319
|
-
const n =
|
|
3320
|
-
function
|
|
3321
|
-
a.value = !1,
|
|
3173
|
+
setup(t, e) {
|
|
3174
|
+
const n = p(t.width || 300), o = p(t.height || 200), a = p(t.modelValue), s = p(""), l = p(t.class), c = p(t.fitContent), u = p(t.showHeader), i = p(""), d = p(t.showCloseButton), r = p(t.showMaxButton), m = p(!1), v = p(""), h = p(""), g = p(""), x = p(t.showButtons), M = p(t.title), y = p(t.reiszeable), F = p(t.containment || null), b = p();
|
|
3175
|
+
function w(T, j) {
|
|
3176
|
+
a.value = !1, e.emit("update:modelValue", !1), j != null && e.emit(j ? "accept" : "cancel"), e.emit("closed", T);
|
|
3322
3177
|
}
|
|
3323
|
-
const
|
|
3178
|
+
const R = [{
|
|
3324
3179
|
name: "cancel",
|
|
3325
3180
|
text: "取消",
|
|
3326
3181
|
class: "btn btn-secondary",
|
|
3327
|
-
handle: (
|
|
3328
|
-
|
|
3182
|
+
handle: (T) => {
|
|
3183
|
+
w(T, !1);
|
|
3329
3184
|
}
|
|
3330
3185
|
}, {
|
|
3331
3186
|
name: "accept",
|
|
3332
3187
|
text: "确定",
|
|
3333
3188
|
class: "btn btn-primary",
|
|
3334
|
-
handle: (
|
|
3335
|
-
|
|
3189
|
+
handle: (T) => {
|
|
3190
|
+
w(T, !0);
|
|
3336
3191
|
}
|
|
3337
|
-
}],
|
|
3338
|
-
renderResizeBar:
|
|
3339
|
-
maximize:
|
|
3340
|
-
restore:
|
|
3341
|
-
boundingElement:
|
|
3342
|
-
resizedEventParam:
|
|
3343
|
-
allowDrag:
|
|
3192
|
+
}], C = p(t.buttons && t.buttons.length ? t.buttons : R), P = L(() => !!i.value), O = L(() => !!x.value && !!C.value), U = p(), z = p(), Y = p(!1), {
|
|
3193
|
+
renderResizeBar: pe,
|
|
3194
|
+
maximize: me,
|
|
3195
|
+
restore: fe,
|
|
3196
|
+
boundingElement: se,
|
|
3197
|
+
resizedEventParam: I,
|
|
3198
|
+
allowDrag: D,
|
|
3344
3199
|
unWindowResizeHandle: $
|
|
3345
|
-
} =
|
|
3346
|
-
registerDraggle:
|
|
3347
|
-
} =
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
}),
|
|
3351
|
-
|
|
3352
|
-
}),
|
|
3353
|
-
|
|
3354
|
-
}),
|
|
3355
|
-
|
|
3356
|
-
}),
|
|
3357
|
-
const
|
|
3358
|
-
JSON.stringify(
|
|
3359
|
-
newSize:
|
|
3360
|
-
oldSize:
|
|
3200
|
+
} = Ra(t), {
|
|
3201
|
+
registerDraggle: A
|
|
3202
|
+
} = Na(t, e, D);
|
|
3203
|
+
W(() => t.title, (T, j) => {
|
|
3204
|
+
T !== j && (M.value = T);
|
|
3205
|
+
}), W(() => t.modelValue, (T, j) => {
|
|
3206
|
+
T !== j && (a.value = T);
|
|
3207
|
+
}), W(() => t.showHeader, (T, j) => {
|
|
3208
|
+
T !== j && (u.value = T);
|
|
3209
|
+
}), W(() => t.showButtons, (T, j) => {
|
|
3210
|
+
T !== j && (x.value = T);
|
|
3211
|
+
}), W(() => I.value, (T, j) => {
|
|
3212
|
+
const ne = T || {}, re = j || {};
|
|
3213
|
+
JSON.stringify(ne) !== JSON.stringify(re) && e.emit("resize", {
|
|
3214
|
+
newSize: T,
|
|
3215
|
+
oldSize: j
|
|
3361
3216
|
});
|
|
3362
3217
|
});
|
|
3363
|
-
function
|
|
3364
|
-
const
|
|
3365
|
-
(!
|
|
3218
|
+
function G() {
|
|
3219
|
+
const T = document.querySelectorAll(".farris-modal").length;
|
|
3220
|
+
(!T || T - 1 <= 0) && document.body.classList.remove("modal-open"), b.value && b.value.classList.remove("show");
|
|
3366
3221
|
}
|
|
3367
|
-
const ve =
|
|
3368
|
-
const
|
|
3222
|
+
const ve = L(() => (a.value ? document.body.classList.add("modal-open") : G(), a.value)), dt = L(() => {
|
|
3223
|
+
const T = {
|
|
3369
3224
|
modal: !0,
|
|
3370
3225
|
"farris-modal": !0,
|
|
3371
3226
|
fade: !0
|
|
3372
3227
|
};
|
|
3373
|
-
return
|
|
3374
|
-
}), pt =
|
|
3375
|
-
var
|
|
3376
|
-
const
|
|
3228
|
+
return T["f-modal-fitContent"] = !!c.value, T.show = !!ve.value, T;
|
|
3229
|
+
}), pt = L(() => {
|
|
3230
|
+
var ne;
|
|
3231
|
+
const T = {
|
|
3377
3232
|
"modal-dialog": !0
|
|
3378
|
-
},
|
|
3379
|
-
return
|
|
3380
|
-
}), mt =
|
|
3233
|
+
}, j = (ne = l.value) == null ? void 0 : ne.split(" ");
|
|
3234
|
+
return j == null || j.reduce((re, Bt) => (re[Bt] = !0, re), T), T;
|
|
3235
|
+
}), mt = L(() => ({
|
|
3381
3236
|
position: "absolute",
|
|
3382
3237
|
top: `${(window.innerHeight - o.value) / 2}px`,
|
|
3383
3238
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
3384
3239
|
width: `${n.value}px`,
|
|
3385
3240
|
height: c.value ? "auto" : `${o.value}px`
|
|
3386
|
-
})), ft =
|
|
3241
|
+
})), ft = L(() => ({
|
|
3387
3242
|
"modal-content": !0,
|
|
3388
3243
|
"modal-content-has-header": u.value
|
|
3389
|
-
})), vt =
|
|
3390
|
-
const
|
|
3244
|
+
})), vt = L(() => {
|
|
3245
|
+
const T = {
|
|
3391
3246
|
display: u.value ? "" : "none"
|
|
3392
3247
|
};
|
|
3393
|
-
return
|
|
3394
|
-
}), ht =
|
|
3248
|
+
return T["pointer-events"] = D.value ? "auto" : "none", T;
|
|
3249
|
+
}), ht = L(() => ({
|
|
3395
3250
|
"f-icon": !0,
|
|
3396
3251
|
modal_maximize: !0,
|
|
3397
|
-
modalrevert:
|
|
3398
|
-
})),
|
|
3252
|
+
modalrevert: Y.value
|
|
3253
|
+
})), yt = L(() => ({
|
|
3399
3254
|
"modal-body": !0,
|
|
3400
|
-
"f-utils-flex-column":
|
|
3255
|
+
"f-utils-flex-column": v.value === "iframe"
|
|
3401
3256
|
}));
|
|
3402
|
-
function
|
|
3257
|
+
function gt() {
|
|
3403
3258
|
return {};
|
|
3404
3259
|
}
|
|
3405
|
-
const Ct =
|
|
3406
|
-
const
|
|
3407
|
-
textAlgin:
|
|
3408
|
-
},
|
|
3409
|
-
return Object.assign(
|
|
3260
|
+
const Ct = L(() => {
|
|
3261
|
+
const T = {
|
|
3262
|
+
textAlgin: g.value
|
|
3263
|
+
}, j = gt();
|
|
3264
|
+
return Object.assign(T, j);
|
|
3410
3265
|
});
|
|
3411
|
-
function
|
|
3412
|
-
if (
|
|
3413
|
-
|
|
3266
|
+
function Le(T) {
|
|
3267
|
+
if (T.stopPropagation(), Y.value) {
|
|
3268
|
+
Y.value = !1, fe();
|
|
3414
3269
|
return;
|
|
3415
3270
|
}
|
|
3416
|
-
|
|
3271
|
+
me(), Y.value = !0;
|
|
3417
3272
|
}
|
|
3418
|
-
async function bt(
|
|
3419
|
-
|
|
3273
|
+
async function bt(T, j) {
|
|
3274
|
+
T.handle && await T.handle(j, T) && e.emit("closed", j);
|
|
3420
3275
|
}
|
|
3421
|
-
function wt(
|
|
3422
|
-
|
|
3276
|
+
function wt(T) {
|
|
3277
|
+
T.width && (n.value = T.width), T.height && (o.value = T.height), T.buttons && (C.value = T.buttons), T.title && (M.value = T.title);
|
|
3423
3278
|
}
|
|
3424
|
-
let he = null,
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
}),
|
|
3428
|
-
|
|
3429
|
-
}),
|
|
3430
|
-
modalElementRef:
|
|
3279
|
+
let he = null, ye = null;
|
|
3280
|
+
J(() => {
|
|
3281
|
+
z.value && !F.value && (F.value = z.value.parentElement, se.value = F.value, A(U.value, z.value, se.value)), ve.value && document.body.classList.add("modal-open"), he = Oa(t, e), ye = Aa(t, e);
|
|
3282
|
+
}), Ue(() => {
|
|
3283
|
+
G(), $ && $(), he && he.remove(), ye && ye.remove();
|
|
3284
|
+
}), e.expose({
|
|
3285
|
+
modalElementRef: z,
|
|
3431
3286
|
updateModalOptions: wt,
|
|
3432
|
-
close:
|
|
3433
|
-
maxDialog:
|
|
3287
|
+
close: w,
|
|
3288
|
+
maxDialog: Le
|
|
3434
3289
|
});
|
|
3435
|
-
function
|
|
3290
|
+
function Mt() {
|
|
3436
3291
|
return f("ul", null, [m.value && f("li", {
|
|
3437
3292
|
class: "f-btn-icon f-bare"
|
|
3438
3293
|
}, [f("span", {
|
|
3439
3294
|
class: "f-icon modal_minimize"
|
|
3440
|
-
}, null)]),
|
|
3441
|
-
onClick:
|
|
3295
|
+
}, null)]), r.value && f("li", {
|
|
3296
|
+
onClick: Le,
|
|
3442
3297
|
class: "f-btn-icon f-bare",
|
|
3443
3298
|
style: "pointer-events: auto;"
|
|
3444
3299
|
}, [f("span", {
|
|
3445
3300
|
class: ht.value
|
|
3446
|
-
}, null)]),
|
|
3301
|
+
}, null)]), d.value && f("li", {
|
|
3447
3302
|
class: "f-btn-icon f-bare",
|
|
3448
|
-
onClick: (
|
|
3303
|
+
onClick: (T) => w(T, !1),
|
|
3449
3304
|
style: "pointer-events: auto;"
|
|
3450
3305
|
}, [f("span", {
|
|
3451
3306
|
class: "f-icon modal_close"
|
|
3452
3307
|
}, null)])]);
|
|
3453
3308
|
}
|
|
3454
|
-
function
|
|
3309
|
+
function xt() {
|
|
3455
3310
|
return f("div", {
|
|
3456
3311
|
class: "modal-footer",
|
|
3457
3312
|
style: Ct.value
|
|
3458
|
-
}, [
|
|
3459
|
-
name:
|
|
3313
|
+
}, [C.value && C.value.map((T) => f("button", {
|
|
3314
|
+
name: T.name,
|
|
3460
3315
|
type: "button",
|
|
3461
|
-
class:
|
|
3462
|
-
onClick: (
|
|
3463
|
-
bt(
|
|
3316
|
+
class: T.class + (T.iconClass ? " btn-icontext" : ""),
|
|
3317
|
+
onClick: (j) => {
|
|
3318
|
+
bt(T, j);
|
|
3464
3319
|
}
|
|
3465
|
-
}, [!!
|
|
3466
|
-
class:
|
|
3467
|
-
}, null),
|
|
3320
|
+
}, [!!T.iconClass && f("i", {
|
|
3321
|
+
class: T.iconClass
|
|
3322
|
+
}, null), T.text]))]);
|
|
3468
3323
|
}
|
|
3469
|
-
function
|
|
3324
|
+
function Ft() {
|
|
3470
3325
|
return f("div", {
|
|
3471
|
-
ref:
|
|
3326
|
+
ref: U,
|
|
3472
3327
|
class: "modal-header",
|
|
3473
3328
|
style: vt.value
|
|
3474
3329
|
}, [f("div", {
|
|
3475
3330
|
class: "modal-title"
|
|
3476
|
-
}, [
|
|
3477
|
-
class:
|
|
3331
|
+
}, [P.value && f("span", {
|
|
3332
|
+
class: i.value,
|
|
3478
3333
|
style: "margin-right: 8px"
|
|
3479
3334
|
}, null), f("span", {
|
|
3480
3335
|
class: "modal-title-label"
|
|
3481
|
-
}, [
|
|
3336
|
+
}, [M.value])]), f("div", {
|
|
3482
3337
|
class: "actions"
|
|
3483
|
-
}, [
|
|
3338
|
+
}, [Mt()])]);
|
|
3484
3339
|
}
|
|
3485
|
-
function
|
|
3486
|
-
|
|
3340
|
+
function Tt(T) {
|
|
3341
|
+
T.stopPropagation();
|
|
3487
3342
|
}
|
|
3488
3343
|
return () => f(It, {
|
|
3489
3344
|
to: "body"
|
|
3490
3345
|
}, {
|
|
3491
|
-
default: () => [ve.value && f(
|
|
3346
|
+
default: () => [ve.value && f(St, {
|
|
3492
3347
|
name: "fade",
|
|
3493
3348
|
appear: !0
|
|
3494
3349
|
}, {
|
|
3495
3350
|
default: () => {
|
|
3496
|
-
var
|
|
3351
|
+
var T, j;
|
|
3497
3352
|
return [f("div", {
|
|
3498
3353
|
class: dt.value,
|
|
3499
3354
|
style: "display: block",
|
|
3500
|
-
ref:
|
|
3501
|
-
onClick:
|
|
3355
|
+
ref: b,
|
|
3356
|
+
onClick: Tt
|
|
3502
3357
|
}, [f("div", {
|
|
3503
3358
|
id: s.value,
|
|
3504
3359
|
class: pt.value,
|
|
3505
3360
|
style: mt.value,
|
|
3506
|
-
ref:
|
|
3361
|
+
ref: z
|
|
3507
3362
|
}, [f("div", {
|
|
3508
3363
|
class: ft.value
|
|
3509
|
-
}, [u.value &&
|
|
3510
|
-
class:
|
|
3511
|
-
}, [(
|
|
3364
|
+
}, [u.value && Ft(), f("div", {
|
|
3365
|
+
class: yt.value
|
|
3366
|
+
}, [(j = (T = e.slots).default) == null ? void 0 : j.call(T), v.value === "iframe" && f("iframe", {
|
|
3512
3367
|
title: s.value,
|
|
3513
3368
|
class: "f-utils-fill",
|
|
3514
3369
|
width: "100%",
|
|
3515
3370
|
frameborder: "0",
|
|
3516
|
-
src:
|
|
3517
|
-
}, null)]),
|
|
3371
|
+
src: h.value
|
|
3372
|
+
}, null)]), O.value && xt()]), !c.value && y.value && z.value && pe(z.value)])])];
|
|
3518
3373
|
}
|
|
3519
3374
|
})]
|
|
3520
3375
|
});
|
|
3521
3376
|
}
|
|
3522
3377
|
});
|
|
3523
|
-
function ct(
|
|
3524
|
-
if (
|
|
3525
|
-
return
|
|
3526
|
-
if (
|
|
3527
|
-
return
|
|
3528
|
-
}
|
|
3529
|
-
function
|
|
3530
|
-
const
|
|
3531
|
-
|
|
3378
|
+
function ct(t) {
|
|
3379
|
+
if (t.content && t.content.render)
|
|
3380
|
+
return t.content.render;
|
|
3381
|
+
if (t.render && typeof t.render == "function")
|
|
3382
|
+
return t.render;
|
|
3383
|
+
}
|
|
3384
|
+
function $a(t) {
|
|
3385
|
+
const e = document.createElement("div");
|
|
3386
|
+
e.style.display = "contents";
|
|
3532
3387
|
const n = Dt({
|
|
3533
3388
|
setup(o, a) {
|
|
3534
|
-
|
|
3535
|
-
document.body.removeChild(
|
|
3389
|
+
Ue(() => {
|
|
3390
|
+
document.body.removeChild(e);
|
|
3536
3391
|
});
|
|
3537
|
-
const s =
|
|
3538
|
-
}),
|
|
3539
|
-
}),
|
|
3540
|
-
}),
|
|
3541
|
-
}), x = ct(
|
|
3542
|
-
|
|
3392
|
+
const s = p(), l = p(t.class || ""), c = p(!!t.showButtons), u = p(!!t.showHeader), i = p(t.showCloseButton == null ? !0 : t.showCloseButton), d = p(!0), r = p(t.title || ""), m = t.acceptCallback || (() => {
|
|
3393
|
+
}), v = t.rejectCallback || (() => {
|
|
3394
|
+
}), h = t.closedCallback || ((y) => {
|
|
3395
|
+
}), g = t.resizeHandle || ((y) => {
|
|
3396
|
+
}), x = ct(t), M = (y) => {
|
|
3397
|
+
d.value = !1, n.unmount(), h(y);
|
|
3543
3398
|
};
|
|
3544
|
-
return
|
|
3399
|
+
return J(() => {
|
|
3545
3400
|
}), a.expose({
|
|
3546
3401
|
modalRef: s
|
|
3547
3402
|
}), () => f(ut, {
|
|
3548
3403
|
ref: s,
|
|
3549
3404
|
class: l.value,
|
|
3550
|
-
modelValue:
|
|
3551
|
-
"onUpdate:modelValue": (
|
|
3552
|
-
title:
|
|
3553
|
-
width:
|
|
3554
|
-
height:
|
|
3555
|
-
buttons:
|
|
3405
|
+
modelValue: d.value,
|
|
3406
|
+
"onUpdate:modelValue": (y) => d.value = y,
|
|
3407
|
+
title: r.value,
|
|
3408
|
+
width: t.width,
|
|
3409
|
+
height: t.height,
|
|
3410
|
+
buttons: t.buttons,
|
|
3556
3411
|
"show-header": u.value,
|
|
3557
3412
|
"show-buttons": c.value,
|
|
3558
|
-
"show-close-button":
|
|
3413
|
+
"show-close-button": i.value,
|
|
3559
3414
|
"show-max-button": !1,
|
|
3560
3415
|
onAccept: m,
|
|
3561
|
-
onCancel:
|
|
3562
|
-
fitContent:
|
|
3563
|
-
onClosed:
|
|
3564
|
-
onResize:
|
|
3416
|
+
onCancel: v,
|
|
3417
|
+
fitContent: t.fitContent == null ? !0 : t.fitContent,
|
|
3418
|
+
onClosed: M,
|
|
3419
|
+
onResize: g
|
|
3565
3420
|
}, {
|
|
3566
3421
|
default: () => [x && x(n)]
|
|
3567
3422
|
});
|
|
3568
3423
|
}
|
|
3569
3424
|
});
|
|
3570
|
-
return document.body.appendChild(
|
|
3425
|
+
return document.body.appendChild(e), n.mount(e), n;
|
|
3571
3426
|
}
|
|
3572
|
-
class
|
|
3573
|
-
constructor(
|
|
3427
|
+
class Ua {
|
|
3428
|
+
constructor(e) {
|
|
3574
3429
|
N(this, "appContext", null);
|
|
3575
|
-
N(this, "modalRef",
|
|
3576
|
-
N(this, "activeModalIndex",
|
|
3430
|
+
N(this, "modalRef", p());
|
|
3431
|
+
N(this, "activeModalIndex", p(0));
|
|
3577
3432
|
N(this, "modalRefs", {});
|
|
3578
|
-
N(this, "isUseEscCloseModal",
|
|
3579
|
-
N(this, "activeModalInstance",
|
|
3580
|
-
this.appContext =
|
|
3433
|
+
N(this, "isUseEscCloseModal", p(!1));
|
|
3434
|
+
N(this, "activeModalInstance", L(() => this.modalRefs[this.activeModalIndex.value]));
|
|
3435
|
+
this.app = e, this.appContext = e ? e._context : null;
|
|
3581
3436
|
}
|
|
3582
3437
|
getCurrentModal() {
|
|
3583
3438
|
return this.activeModalInstance.value;
|
|
3584
3439
|
}
|
|
3585
|
-
static show(
|
|
3440
|
+
static show(e) {
|
|
3586
3441
|
const n = Object.assign({
|
|
3587
3442
|
title: "",
|
|
3588
3443
|
showButtons: !0,
|
|
3589
3444
|
showHeader: !0
|
|
3590
|
-
},
|
|
3591
|
-
return
|
|
3445
|
+
}, e);
|
|
3446
|
+
return $a(n);
|
|
3592
3447
|
}
|
|
3593
|
-
open(
|
|
3448
|
+
open(e) {
|
|
3594
3449
|
const n = document.createDocumentFragment();
|
|
3595
|
-
|
|
3450
|
+
e.showMaxButton && e.fitContent && (e.showMaxButton = !1);
|
|
3596
3451
|
const o = Lt(Object.assign({
|
|
3597
3452
|
title: "",
|
|
3598
3453
|
showButtons: !0,
|
|
3599
3454
|
showHeader: !0
|
|
3600
|
-
},
|
|
3455
|
+
}, e)), a = p(!0), s = o.value.acceptCallback || (() => {
|
|
3601
3456
|
}), l = o.value.rejectCallback || (() => {
|
|
3602
|
-
}), c = o.value.closedCallback || ((
|
|
3603
|
-
}), u = o.value.resizeHandle || ((
|
|
3457
|
+
}), c = o.value.closedCallback || ((M, y) => {
|
|
3458
|
+
}), u = o.value.resizeHandle || ((M) => {
|
|
3604
3459
|
});
|
|
3605
|
-
let
|
|
3606
|
-
const
|
|
3607
|
-
var
|
|
3460
|
+
let i;
|
|
3461
|
+
const d = ct(o.value), r = (M) => {
|
|
3462
|
+
var F;
|
|
3608
3463
|
a.value = !1;
|
|
3609
|
-
const
|
|
3610
|
-
c(
|
|
3611
|
-
}, m = (
|
|
3612
|
-
|
|
3613
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value],
|
|
3614
|
-
const
|
|
3615
|
-
|
|
3464
|
+
const y = (F = M == null ? void 0 : M.target) == null ? void 0 : F.classList.contains("modal_close");
|
|
3465
|
+
c(M, this.isUseEscCloseModal.value ? "esc" : y ? "icon" : "button");
|
|
3466
|
+
}, m = (M) => {
|
|
3467
|
+
r(M), i && ue(() => {
|
|
3468
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], ge(null, n), i = null, this.modalRef.value = null, this.modalRefs) {
|
|
3469
|
+
const y = Object.keys(this.modalRefs).map((F) => Number(F));
|
|
3470
|
+
y.length > 0 ? this.activeModalIndex.value = Math.max(...y) : this.activeModalIndex.value = 0;
|
|
3616
3471
|
}
|
|
3617
3472
|
this.isUseEscCloseModal.value = !1;
|
|
3618
3473
|
});
|
|
3619
|
-
},
|
|
3620
|
-
var
|
|
3621
|
-
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((
|
|
3622
|
-
},
|
|
3474
|
+
}, v = (M) => {
|
|
3475
|
+
var y;
|
|
3476
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((y = this.activeModalInstance.value) == null || y.close(M == null ? void 0 : M.event));
|
|
3477
|
+
}, h = () => f(ut, te({
|
|
3623
3478
|
ref: this.modalRef,
|
|
3624
3479
|
modelValue: a.value,
|
|
3625
|
-
"onUpdate:modelValue": (
|
|
3480
|
+
"onUpdate:modelValue": (M) => a.value = M
|
|
3626
3481
|
}, o.value, {
|
|
3627
3482
|
onAccept: s,
|
|
3628
3483
|
onCancel: l,
|
|
3629
3484
|
onClosed: m,
|
|
3630
3485
|
onResize: u,
|
|
3631
|
-
onEsc:
|
|
3486
|
+
onEsc: v
|
|
3632
3487
|
}), {
|
|
3633
|
-
default: () => [
|
|
3488
|
+
default: () => [d && d(this.app)]
|
|
3634
3489
|
});
|
|
3635
|
-
return
|
|
3636
|
-
const
|
|
3637
|
-
return
|
|
3490
|
+
return i = ((M) => {
|
|
3491
|
+
const y = Pt(h, M);
|
|
3492
|
+
return y.appContext = this.appContext, ge(y, n), y;
|
|
3638
3493
|
})({
|
|
3639
3494
|
...o.value
|
|
3640
3495
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
3641
3496
|
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
3642
|
-
update: (
|
|
3497
|
+
update: (M) => {
|
|
3643
3498
|
o.value = {
|
|
3644
3499
|
...o.value,
|
|
3645
|
-
...
|
|
3646
|
-
},
|
|
3500
|
+
...M
|
|
3501
|
+
}, i && ge(Vt(i, {
|
|
3647
3502
|
...o
|
|
3648
3503
|
}), n);
|
|
3649
3504
|
},
|
|
@@ -3652,250 +3507,257 @@ class $a {
|
|
|
3652
3507
|
};
|
|
3653
3508
|
}
|
|
3654
3509
|
}
|
|
3655
|
-
class
|
|
3656
|
-
static show(
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
}),
|
|
3661
|
-
}), u = o.rejectCallback || (() => {
|
|
3510
|
+
class Q {
|
|
3511
|
+
static show(e) {
|
|
3512
|
+
const n = Z({
|
|
3513
|
+
...e
|
|
3514
|
+
}), o = !1, a = n.type === "error" || n.type === "prompt", s = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", l = n.acceptCallback || (() => {
|
|
3515
|
+
}), c = n.rejectCallback || (() => {
|
|
3662
3516
|
});
|
|
3663
|
-
let
|
|
3664
|
-
const
|
|
3665
|
-
|
|
3517
|
+
let u = null, i = new Ua(u);
|
|
3518
|
+
const d = () => {
|
|
3519
|
+
u && (u == null || u.destroy(), i = null);
|
|
3666
3520
|
};
|
|
3667
|
-
|
|
3521
|
+
u = i == null ? void 0 : i.open({
|
|
3668
3522
|
class: "modal-message modal-message-type-info",
|
|
3669
|
-
title:
|
|
3670
|
-
showButtons:
|
|
3671
|
-
showHeader:
|
|
3672
|
-
width:
|
|
3523
|
+
title: s,
|
|
3524
|
+
showButtons: o,
|
|
3525
|
+
showHeader: a,
|
|
3526
|
+
width: n.width || 400,
|
|
3673
3527
|
fitContent: !0,
|
|
3674
3528
|
showMaxButton: !1,
|
|
3675
|
-
render: () => f(
|
|
3676
|
-
onAccept:
|
|
3677
|
-
onReject:
|
|
3678
|
-
onClose:
|
|
3529
|
+
render: () => f(ie, te(n, {
|
|
3530
|
+
onAccept: l,
|
|
3531
|
+
onReject: c,
|
|
3532
|
+
onClose: d
|
|
3679
3533
|
}), null)
|
|
3680
3534
|
});
|
|
3681
3535
|
}
|
|
3682
|
-
static info(
|
|
3683
|
-
const o =
|
|
3536
|
+
static info(e, n) {
|
|
3537
|
+
const o = Z({
|
|
3684
3538
|
type: "info",
|
|
3685
|
-
title:
|
|
3539
|
+
title: e,
|
|
3686
3540
|
detail: n,
|
|
3687
3541
|
okButtonText: "知道了",
|
|
3688
3542
|
cancelButtonText: ""
|
|
3689
3543
|
});
|
|
3690
|
-
|
|
3544
|
+
Q.show(o);
|
|
3691
3545
|
}
|
|
3692
|
-
static warning(
|
|
3693
|
-
const o =
|
|
3546
|
+
static warning(e, n) {
|
|
3547
|
+
const o = Z({
|
|
3694
3548
|
type: "warning",
|
|
3695
|
-
title:
|
|
3549
|
+
title: e,
|
|
3696
3550
|
detail: n,
|
|
3697
3551
|
okButtonText: "知道了",
|
|
3698
3552
|
cancelButtonText: ""
|
|
3699
3553
|
});
|
|
3700
|
-
|
|
3554
|
+
Q.show(o);
|
|
3701
3555
|
}
|
|
3702
|
-
static success(
|
|
3703
|
-
const o =
|
|
3556
|
+
static success(e, n) {
|
|
3557
|
+
const o = Z({
|
|
3704
3558
|
type: "success",
|
|
3705
|
-
title:
|
|
3559
|
+
title: e,
|
|
3706
3560
|
detail: n,
|
|
3707
3561
|
okButtonText: "关闭",
|
|
3708
3562
|
cancelButtonText: ""
|
|
3709
3563
|
});
|
|
3710
|
-
|
|
3564
|
+
Q.show(o);
|
|
3711
3565
|
}
|
|
3712
|
-
static error(
|
|
3713
|
-
const a =
|
|
3566
|
+
static error(e, n, o) {
|
|
3567
|
+
const a = Z({
|
|
3714
3568
|
width: 500,
|
|
3715
3569
|
type: "error",
|
|
3716
3570
|
okButtonText: "关闭",
|
|
3717
3571
|
cancelButtonText: "",
|
|
3718
3572
|
exceptionInfo: {
|
|
3719
3573
|
date: o,
|
|
3720
|
-
message:
|
|
3574
|
+
message: e,
|
|
3721
3575
|
detail: n
|
|
3722
3576
|
}
|
|
3723
3577
|
});
|
|
3724
|
-
|
|
3578
|
+
Q.show(a);
|
|
3725
3579
|
}
|
|
3726
|
-
static prompt(
|
|
3727
|
-
const o =
|
|
3580
|
+
static prompt(e, n) {
|
|
3581
|
+
const o = Z({
|
|
3728
3582
|
type: "prompt",
|
|
3729
|
-
title:
|
|
3583
|
+
title: e,
|
|
3730
3584
|
detail: n,
|
|
3731
3585
|
okButtonText: "确定",
|
|
3732
3586
|
cancelButtonText: "取消"
|
|
3733
3587
|
});
|
|
3734
|
-
|
|
3588
|
+
Q.show(o);
|
|
3735
3589
|
}
|
|
3736
|
-
static question(
|
|
3737
|
-
const s =
|
|
3590
|
+
static question(e, n, o, a) {
|
|
3591
|
+
const s = Z({
|
|
3738
3592
|
type: "question",
|
|
3739
|
-
title:
|
|
3593
|
+
title: e,
|
|
3740
3594
|
detail: n,
|
|
3741
3595
|
okButtonText: "确定",
|
|
3742
3596
|
cancelButtonText: "取消",
|
|
3743
3597
|
acceptCallback: o,
|
|
3744
3598
|
rejectCallback: a
|
|
3745
3599
|
});
|
|
3746
|
-
|
|
3600
|
+
Q.show(s);
|
|
3747
3601
|
}
|
|
3748
3602
|
}
|
|
3749
|
-
|
|
3750
|
-
|
|
3603
|
+
ie.install = (t) => {
|
|
3604
|
+
t.component(ie.name, ie), t.provide("FMessageBoxService", Q);
|
|
3751
3605
|
};
|
|
3752
|
-
const ja = /* @__PURE__ */
|
|
3606
|
+
const ja = /* @__PURE__ */ H({
|
|
3753
3607
|
name: "FResponseFormLayoutSetting",
|
|
3754
3608
|
props: rt,
|
|
3755
3609
|
emits: ["change"],
|
|
3756
|
-
setup(
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
const v = "自定义", T = 12 / p.value.uniqueColClassInSM;
|
|
3764
|
-
n.includes(T) ? i.value = T : (l.push({
|
|
3610
|
+
setup(t, e) {
|
|
3611
|
+
const n = [1], o = [1, 2], a = [1, 2, 3, 4], s = [1, 2, 3, 4, 6];
|
|
3612
|
+
let l = [], c = [], u = [], i = [];
|
|
3613
|
+
const d = p(t.initialState), r = p(0), m = p(0), v = p(0), h = p(0);
|
|
3614
|
+
function g() {
|
|
3615
|
+
const y = "自定义", F = 12 / d.value.uniqueColClassInSM;
|
|
3616
|
+
n.includes(F) ? r.value = F : (l.push({
|
|
3765
3617
|
value: 0,
|
|
3766
|
-
name:
|
|
3767
|
-
}),
|
|
3768
|
-
const
|
|
3769
|
-
o.includes(
|
|
3618
|
+
name: y
|
|
3619
|
+
}), r.value = 0);
|
|
3620
|
+
const b = 12 / d.value.uniqueColClassInMD;
|
|
3621
|
+
o.includes(b) ? m.value = b : (c.push({
|
|
3770
3622
|
value: 0,
|
|
3771
|
-
name:
|
|
3623
|
+
name: y
|
|
3772
3624
|
}), m.value = 0);
|
|
3773
|
-
const
|
|
3774
|
-
a.includes(
|
|
3625
|
+
const w = 12 / d.value.uniqueColClassInLG;
|
|
3626
|
+
a.includes(w) ? v.value = w : (u.push({
|
|
3775
3627
|
value: 0,
|
|
3776
|
-
name:
|
|
3777
|
-
}),
|
|
3778
|
-
const
|
|
3779
|
-
s.includes(
|
|
3628
|
+
name: y
|
|
3629
|
+
}), v.value = 0);
|
|
3630
|
+
const R = 12 / d.value.uniqueColClassInEL;
|
|
3631
|
+
s.includes(R) ? h.value = R : (i.push({
|
|
3780
3632
|
value: 0,
|
|
3781
|
-
name:
|
|
3782
|
-
}),
|
|
3633
|
+
name: y
|
|
3634
|
+
}), h.value = 0), l = [...l], c = [...c], u = [...u], i = [...i];
|
|
3783
3635
|
}
|
|
3784
3636
|
function x() {
|
|
3785
|
-
n.forEach((
|
|
3637
|
+
n.forEach((y) => {
|
|
3786
3638
|
l.push({
|
|
3787
|
-
value:
|
|
3788
|
-
name:
|
|
3639
|
+
value: y,
|
|
3640
|
+
name: y + ""
|
|
3789
3641
|
});
|
|
3790
|
-
}), o.forEach((
|
|
3642
|
+
}), o.forEach((y) => {
|
|
3791
3643
|
c.push({
|
|
3792
|
-
value:
|
|
3793
|
-
name:
|
|
3644
|
+
value: y,
|
|
3645
|
+
name: y + ""
|
|
3794
3646
|
});
|
|
3795
|
-
}), a.forEach((
|
|
3647
|
+
}), a.forEach((y) => {
|
|
3796
3648
|
u.push({
|
|
3797
|
-
value:
|
|
3798
|
-
name:
|
|
3649
|
+
value: y,
|
|
3650
|
+
name: y + ""
|
|
3799
3651
|
});
|
|
3800
|
-
}), s.forEach((
|
|
3801
|
-
|
|
3802
|
-
value:
|
|
3803
|
-
name:
|
|
3652
|
+
}), s.forEach((y) => {
|
|
3653
|
+
i.push({
|
|
3654
|
+
value: y,
|
|
3655
|
+
name: y + ""
|
|
3804
3656
|
});
|
|
3805
3657
|
});
|
|
3806
3658
|
}
|
|
3807
|
-
function
|
|
3808
|
-
|
|
3809
|
-
|
|
3659
|
+
function M() {
|
|
3660
|
+
Q.question("应用统一布局,将重置区域内部所有控件的宽度样式,确定应用?", "", () => {
|
|
3661
|
+
d.value.uniqueColClassInSM = r.value === 0 ? null : 12 / r.value, d.value.uniqueColClassInMD = m.value === 0 ? null : 12 / m.value, d.value.uniqueColClassInLG = v.value === 0 ? null : 12 / v.value, d.value.uniqueColClassInEL = h.value === 0 ? null : 12 / h.value, e.emit("change", d.value);
|
|
3810
3662
|
}, () => {
|
|
3811
3663
|
});
|
|
3812
3664
|
}
|
|
3813
|
-
return () =>
|
|
3665
|
+
return J(() => {
|
|
3666
|
+
x(), g();
|
|
3667
|
+
}), () => f("div", null, [f("div", {
|
|
3814
3668
|
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
3815
3669
|
}, [f("div", {
|
|
3816
3670
|
class: "form-group farris-form-group screenGroup"
|
|
3817
3671
|
}, [f("span", {
|
|
3818
3672
|
class: "screenName"
|
|
3819
|
-
}, [
|
|
3673
|
+
}, [X(" 小屏幕 ")]), f("div", {
|
|
3820
3674
|
class: "d-flex ml-2 screen-input"
|
|
3821
|
-
}, [f(
|
|
3675
|
+
}, [f(oe, {
|
|
3822
3676
|
data: l,
|
|
3823
3677
|
idField: "value",
|
|
3824
3678
|
valueField: "value",
|
|
3825
|
-
|
|
3826
|
-
|
|
3679
|
+
editable: !1,
|
|
3680
|
+
enableClear: !1,
|
|
3681
|
+
modelValue: r.value,
|
|
3682
|
+
"onUpdate:modelValue": (y) => r.value = y
|
|
3827
3683
|
}, null), f("span", {
|
|
3828
3684
|
class: "ml-2 columnText"
|
|
3829
|
-
}, [
|
|
3685
|
+
}, [X("列")])])]), f("div", {
|
|
3830
3686
|
class: "form-group farris-form-group screenGroup"
|
|
3831
3687
|
}, [f("span", {
|
|
3832
3688
|
class: "screenName"
|
|
3833
|
-
}, [
|
|
3689
|
+
}, [X("中等屏幕")]), f("div", {
|
|
3834
3690
|
class: "d-flex ml-2 screen-input"
|
|
3835
|
-
}, [f(
|
|
3691
|
+
}, [f(oe, {
|
|
3836
3692
|
data: c,
|
|
3837
3693
|
idField: "value",
|
|
3838
3694
|
valueField: "value",
|
|
3695
|
+
editable: !1,
|
|
3696
|
+
enableClear: !1,
|
|
3839
3697
|
modelValue: m.value,
|
|
3840
|
-
"onUpdate:modelValue": (
|
|
3698
|
+
"onUpdate:modelValue": (y) => m.value = y
|
|
3841
3699
|
}, null), f("span", {
|
|
3842
3700
|
class: "ml-2 columnText"
|
|
3843
|
-
}, [
|
|
3701
|
+
}, [X("列")])])]), f("div", {
|
|
3844
3702
|
class: "form-group farris-form-group screenGroup"
|
|
3845
3703
|
}, [f("span", {
|
|
3846
3704
|
class: "screenName"
|
|
3847
|
-
}, [
|
|
3705
|
+
}, [X("大屏幕")]), f("div", {
|
|
3848
3706
|
class: "d-flex ml-2 screen-input"
|
|
3849
|
-
}, [f(
|
|
3707
|
+
}, [f(oe, {
|
|
3850
3708
|
data: u,
|
|
3851
3709
|
idField: "value",
|
|
3852
3710
|
valueField: "value",
|
|
3853
|
-
|
|
3854
|
-
|
|
3711
|
+
editable: !1,
|
|
3712
|
+
enableClear: !1,
|
|
3713
|
+
modelValue: v.value,
|
|
3714
|
+
"onUpdate:modelValue": (y) => v.value = y
|
|
3855
3715
|
}, null), f("span", {
|
|
3856
3716
|
class: "ml-2 columnText"
|
|
3857
|
-
}, [
|
|
3717
|
+
}, [X("列")])])]), f("div", {
|
|
3858
3718
|
class: "form-group farris-form-group screenGroup"
|
|
3859
3719
|
}, [f("span", {
|
|
3860
3720
|
class: "screenName"
|
|
3861
|
-
}, [
|
|
3721
|
+
}, [X("极大屏幕")]), f("div", {
|
|
3862
3722
|
class: "d-flex ml-2 screen-input"
|
|
3863
|
-
}, [f(
|
|
3864
|
-
data:
|
|
3723
|
+
}, [f(oe, {
|
|
3724
|
+
data: i,
|
|
3865
3725
|
idField: "value",
|
|
3866
3726
|
valueField: "value",
|
|
3867
|
-
|
|
3868
|
-
|
|
3727
|
+
editable: !1,
|
|
3728
|
+
enableClear: !1,
|
|
3729
|
+
modelValue: h.value,
|
|
3730
|
+
"onUpdate:modelValue": (y) => h.value = y
|
|
3869
3731
|
}, null), f("span", {
|
|
3870
3732
|
class: "ml-2 columnText"
|
|
3871
|
-
}, [
|
|
3733
|
+
}, [X("列")])])])]), f("div", {
|
|
3872
3734
|
class: "applyBtn"
|
|
3873
3735
|
}, [f("button", {
|
|
3874
3736
|
class: "btn f-rt-btn btn-primary",
|
|
3875
3737
|
type: "button",
|
|
3876
|
-
onClick: () =>
|
|
3877
|
-
}, [
|
|
3738
|
+
onClick: () => M()
|
|
3739
|
+
}, [X("应用")])])]);
|
|
3878
3740
|
}
|
|
3879
|
-
}),
|
|
3880
|
-
install(
|
|
3881
|
-
|
|
3741
|
+
}), ns = {
|
|
3742
|
+
install(t) {
|
|
3743
|
+
t.component(Ce.name, Ce).component(we.name, we);
|
|
3882
3744
|
},
|
|
3883
|
-
register(
|
|
3884
|
-
|
|
3745
|
+
register(t, e, n, o) {
|
|
3746
|
+
t["form-group"] = we, e["form-group"] = Ve, t["response-form"] = Ce, e["response-form"] = Pe, t["form-input"] = ca, e["form-input"] = ua, o["form-group"] = { editorResolver: xo }, t["response-form-layout-setting"] = ja, e["response-form-layout-setting"] = Ca;
|
|
3885
3747
|
},
|
|
3886
|
-
registerDesigner(
|
|
3887
|
-
|
|
3748
|
+
registerDesigner(t, e, n) {
|
|
3749
|
+
t["form-group"] = ia, e["form-group"] = Ve, t["response-form"] = Do, e["response-form"] = Pe;
|
|
3888
3750
|
}
|
|
3889
3751
|
};
|
|
3890
3752
|
export {
|
|
3891
3753
|
we as FDynamicFormGroup,
|
|
3892
|
-
|
|
3754
|
+
ca as FDynamicFormInput,
|
|
3893
3755
|
Ce as FResponseForm,
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3756
|
+
ns as default,
|
|
3757
|
+
le as dynamicFormGroupProps,
|
|
3758
|
+
xo as editorResolver,
|
|
3759
|
+
Ve as formGroupPropsResolver,
|
|
3760
|
+
Pe as formPropsResolver,
|
|
3899
3761
|
He as responseFormProps,
|
|
3900
|
-
|
|
3762
|
+
Io as useDesignerRules
|
|
3901
3763
|
};
|