@farris/ui-vue 1.2.9 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +63 -63
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +402 -323
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +98 -96
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +66 -66
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +118 -118
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +539 -460
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +135 -135
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1007 -312
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +97 -97
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +472 -329
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2231 -1055
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +79 -79
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6408 -5034
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4762 -3511
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3442 -2742
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2597 -1141
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +114 -71
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +171 -171
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3075 -2586
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5272 -8511
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1726 -1822
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +126 -126
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +620 -540
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +88 -88
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +71 -71
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3582 -2356
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10752 -8972
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5601 -5329
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +535 -452
- package/components/nav/index.umd.cjs +2 -2
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +556 -477
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +504 -425
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1833 -1054
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +899 -870
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +576 -487
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +73 -73
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +1916 -1220
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +783 -886
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3632 -2556
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +484 -405
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +152 -152
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +73 -73
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1081 -1043
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +753 -738
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4418 -4177
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +119 -119
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +92 -91
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +59 -59
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +103 -103
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +85 -85
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +457 -378
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +1696 -1617
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +53 -53
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +268 -268
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +420 -341
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1062 -981
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +381 -379
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5252 -9560
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3920 -2692
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +373 -367
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +92 -92
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +597 -417
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +251 -251
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +17125 -16176
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +1 -1
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,162 +1,165 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
1
|
+
var yt = Object.defineProperty;
|
|
2
|
+
var ht = (e, t, n) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var G = (e, t, n) => ht(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as Z, ref as d, computed as x, createVNode as m, nextTick as ye, inject as ue, onMounted as K, watch as X, createTextVNode as _, reactive as te, withDirectives as bt, resolveDirective as Ct, Fragment as ce, mergeProps as ae, onUnmounted as $e, Teleport as wt, Transition as xt, shallowRef as Tt, createApp as Bt, render as Te, h as Mt, cloneVNode as Ft } from "vue";
|
|
5
|
+
import { isPlainObject as De, cloneDeep as Ee } from "lodash-es";
|
|
6
|
+
import { BaseControlProperty as kt } from "../property-panel/index.esm.js/src/composition/entity/base-property";
|
|
7
|
+
import { useResponseLayoutEditorSetting as qe } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
8
|
+
import { DgControl as Et } from "../designer-canvas/index.esm.js/src/composition/dg-control";
|
|
6
9
|
import "bignumber.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
10
|
+
import St, { useNumber as Pt, useFormat as jt, useSpinner as It, useTextBox as Lt } from "../number-spinner/index.esm.js";
|
|
11
|
+
import At from "../accordion/index.esm.js";
|
|
12
|
+
import Dt from "../avatar/index.esm.js";
|
|
13
|
+
import Ot from "../button-edit/index.esm.js";
|
|
14
|
+
import Vt from "../button-group/index.esm.js";
|
|
15
|
+
import Rt from "../calendar/index.esm.js";
|
|
16
|
+
import Nt from "../capsule/index.esm.js";
|
|
17
|
+
import $t from "../checkbox/index.esm.js";
|
|
18
|
+
import ie from "../combo-list/index.esm.js";
|
|
19
|
+
import qt from "../combo-tree/index.esm.js";
|
|
20
|
+
import Ut from "../component/index.esm.js";
|
|
21
|
+
import zt from "../color-picker/index.esm.js";
|
|
22
|
+
import Ht from "../content-container/index.esm.js";
|
|
23
|
+
import Gt from "../date-picker/index.esm.js";
|
|
24
|
+
import Wt from "../data-grid/index.esm.js";
|
|
25
|
+
import Xt from "../dropdown/index.esm.js";
|
|
26
|
+
import Yt from "../dynamic-form/index.esm.js";
|
|
27
|
+
import Jt from "../events-editor/index.esm.js";
|
|
28
|
+
import Qt from "../filter-bar/index.esm.js";
|
|
29
|
+
import Zt from "../field-selector/index.esm.js";
|
|
30
|
+
import _t from "../image-cropper/index.esm.js";
|
|
31
|
+
import Kt from "../input-group/index.esm.js";
|
|
32
|
+
import en from "../layout/index.esm.js";
|
|
33
|
+
import tn from "../list-nav/index.esm.js";
|
|
34
|
+
import nn from "../list-view/index.esm.js";
|
|
35
|
+
import on from "../lookup/index.esm.js";
|
|
36
|
+
import an from "../mapping-editor/index.esm.js";
|
|
37
|
+
import rn from "../nav/index.esm.js";
|
|
38
|
+
import sn from "../number-range/index.esm.js";
|
|
39
|
+
import ln from "../order/index.esm.js";
|
|
40
|
+
import un from "../page-header/index.esm.js";
|
|
41
|
+
import cn from "../page-footer/index.esm.js";
|
|
42
|
+
import dn from "../pagination/index.esm.js";
|
|
43
|
+
import pn from "../progress/index.esm.js";
|
|
44
|
+
import fn from "../query-solution/index.esm.js";
|
|
45
|
+
import mn from "../radio-group/index.esm.js";
|
|
46
|
+
import vn from "../rate/index.esm.js";
|
|
47
|
+
import gn from "../response-toolbar/index.esm.js";
|
|
48
|
+
import yn from "../response-layout/index.esm.js";
|
|
49
|
+
import hn from "../response-layout-editor/index.esm.js";
|
|
50
|
+
import bn from "../search-box/index.esm.js";
|
|
51
|
+
import Cn from "../section/index.esm.js";
|
|
52
|
+
import wn from "../smoke-detector/index.esm.js";
|
|
53
|
+
import xn from "../splitter/index.esm.js";
|
|
54
|
+
import Tn from "../step/index.esm.js";
|
|
55
|
+
import Bn from "../switch/index.esm.js";
|
|
56
|
+
import Mn from "../tabs/index.esm.js";
|
|
57
|
+
import Fn from "../tags/index.esm.js";
|
|
58
|
+
import kn from "../text/index.esm.js";
|
|
59
|
+
import En from "../time-picker/index.esm.js";
|
|
60
|
+
import Sn from "../transfer/index.esm.js";
|
|
61
|
+
import Pn from "../tree-view/index.esm.js";
|
|
62
|
+
import jn from "../uploader/index.esm.js";
|
|
63
|
+
import In from "../verify-detail/index.esm.js";
|
|
64
|
+
import Ln from "../weather/index.esm.js";
|
|
65
|
+
import An from "../video/index.esm.js";
|
|
66
|
+
import Dn from "../textarea/index.esm.js";
|
|
67
|
+
import On from "../schema-selector/index.esm.js";
|
|
68
|
+
import Vn from "../tree-grid/index.esm.js";
|
|
66
69
|
import "../external-container/index.esm.js";
|
|
67
|
-
import { getSchemaByType as
|
|
68
|
-
const
|
|
69
|
-
function
|
|
70
|
-
const { properties: t, title:
|
|
71
|
-
return (!
|
|
72
|
-
}
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
let
|
|
77
|
-
const s =
|
|
78
|
-
return
|
|
70
|
+
import { getSchemaByType as Oe, createPropsResolver as Rn } from "../dynamic-resolver/index.esm.js";
|
|
71
|
+
const Ue = {}, ze = {};
|
|
72
|
+
function Se(e) {
|
|
73
|
+
const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), s = Object.keys(t).reduce((l, u) => ((!a || !o.find((i) => i == u)) && (l[u] = t[u].type === "object" && t[u].properties ? Se(t[u]) : Ee(t[u].default)), l), {});
|
|
74
|
+
return (!a || !o.find((l) => l == "id")) && (s.id = `${n}-${Date.now()}`), s;
|
|
75
|
+
}
|
|
76
|
+
function de(e, t = {}, n) {
|
|
77
|
+
const o = Ue[e];
|
|
78
|
+
if (o) {
|
|
79
|
+
let a = Se(o);
|
|
80
|
+
const s = ze[e];
|
|
81
|
+
return a = s ? s({ getSchemaByType: de }, a, t, n) : a, a;
|
|
79
82
|
}
|
|
80
83
|
return null;
|
|
81
84
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
return Object.keys(e).reduce((
|
|
85
|
+
function Nn(e, t) {
|
|
86
|
+
const n = Se(t);
|
|
87
|
+
return Object.keys(e).reduce((o, a) => (o[a] && De(o[a]) && De(e[a]) ? Object.assign(o[a], e[a]) : o[a] = e[a], o), n), n;
|
|
85
88
|
}
|
|
86
|
-
function
|
|
87
|
-
return Object.keys(e).filter((
|
|
88
|
-
if (t.has(
|
|
89
|
-
const s = t.get(
|
|
89
|
+
function $n(e, t) {
|
|
90
|
+
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
91
|
+
if (t.has(a)) {
|
|
92
|
+
const s = t.get(a);
|
|
90
93
|
if (typeof s == "string")
|
|
91
|
-
|
|
94
|
+
o[s] = e[a];
|
|
92
95
|
else {
|
|
93
|
-
const
|
|
94
|
-
Object.assign(
|
|
96
|
+
const l = s(a, e[a], e);
|
|
97
|
+
Object.assign(o, l);
|
|
95
98
|
}
|
|
96
99
|
} else
|
|
97
|
-
|
|
98
|
-
return
|
|
100
|
+
o[a] = e[a];
|
|
101
|
+
return o;
|
|
99
102
|
}, {});
|
|
100
103
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
function
|
|
106
|
-
function t(
|
|
107
|
-
if (typeof
|
|
108
|
-
return
|
|
109
|
-
if (typeof
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
return Number(
|
|
113
|
-
if (
|
|
114
|
-
return Number(
|
|
115
|
-
if (
|
|
116
|
-
return Number(
|
|
104
|
+
function qn(e, t, n = /* @__PURE__ */ new Map()) {
|
|
105
|
+
const o = Nn(e, t);
|
|
106
|
+
return $n(o, n);
|
|
107
|
+
}
|
|
108
|
+
function Un(e = {}) {
|
|
109
|
+
function t(r, p, c, v) {
|
|
110
|
+
if (typeof c == "number")
|
|
111
|
+
return v[r].length === c;
|
|
112
|
+
if (typeof c == "object") {
|
|
113
|
+
const b = Object.keys(c)[0], f = c[b];
|
|
114
|
+
if (b === "not")
|
|
115
|
+
return Number(v[r].length) !== Number(f);
|
|
116
|
+
if (b === "moreThan")
|
|
117
|
+
return Number(v[r].length) >= Number(f);
|
|
118
|
+
if (b === "lessThan")
|
|
119
|
+
return Number(v[r].length) <= Number(f);
|
|
117
120
|
}
|
|
118
121
|
return !1;
|
|
119
122
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
123
|
+
function n(r, p, c, v) {
|
|
124
|
+
return v[r] && v[r].propertyValue && String(v[r].propertyValue.value) === String(c);
|
|
122
125
|
}
|
|
123
|
-
const
|
|
126
|
+
const o = /* @__PURE__ */ new Map([
|
|
124
127
|
["length", t],
|
|
125
|
-
["getProperty",
|
|
128
|
+
["getProperty", n]
|
|
126
129
|
]);
|
|
127
|
-
Object.keys(e).reduce((
|
|
128
|
-
function
|
|
129
|
-
const
|
|
130
|
-
return typeof
|
|
131
|
-
if (
|
|
132
|
-
return { target:
|
|
133
|
-
const
|
|
134
|
-
return { target:
|
|
130
|
+
Object.keys(e).reduce((r, p) => (r.set(p, e[p]), r), o);
|
|
131
|
+
function a(r, p) {
|
|
132
|
+
const c = r;
|
|
133
|
+
return typeof p == "number" ? [{ target: c, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: c, operator: "getProperty", param: r, value: !!p }] : typeof p == "object" ? Object.keys(p).map((v) => {
|
|
134
|
+
if (v === "length")
|
|
135
|
+
return { target: c, operator: "length", param: null, value: p[v] };
|
|
136
|
+
const b = v, f = p[v];
|
|
137
|
+
return { target: c, operator: "getProperty", param: b, value: f };
|
|
135
138
|
}) : [];
|
|
136
139
|
}
|
|
137
|
-
function s(
|
|
138
|
-
return Object.keys(
|
|
139
|
-
const
|
|
140
|
-
return
|
|
140
|
+
function s(r) {
|
|
141
|
+
return Object.keys(r).reduce((c, v) => {
|
|
142
|
+
const b = a(v, r[v]);
|
|
143
|
+
return c.push(...b), c;
|
|
141
144
|
}, []);
|
|
142
145
|
}
|
|
143
|
-
function
|
|
144
|
-
if (
|
|
145
|
-
const
|
|
146
|
-
return
|
|
146
|
+
function l(r, p) {
|
|
147
|
+
if (o.has(r.operator)) {
|
|
148
|
+
const c = o.get(r.operator);
|
|
149
|
+
return c && c(r.target, r.param, r.value, p) || !1;
|
|
147
150
|
}
|
|
148
151
|
return !1;
|
|
149
152
|
}
|
|
150
|
-
function
|
|
151
|
-
return s(
|
|
153
|
+
function u(r, p) {
|
|
154
|
+
return s(r).reduce((b, f) => b && l(f, p), !0);
|
|
152
155
|
}
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
+
function i(r, p) {
|
|
157
|
+
const c = Object.keys(r), v = c.includes("allOf"), b = c.includes("anyOf"), f = v || b, C = (f ? r[f ? v ? "allOf" : "anyOf" : "allOf"] : [r]).map((F) => u(F, p));
|
|
158
|
+
return v ? !C.includes(!1) : C.includes(!0);
|
|
156
159
|
}
|
|
157
|
-
return { parseValueSchema:
|
|
160
|
+
return { parseValueSchema: i };
|
|
158
161
|
}
|
|
159
|
-
const
|
|
162
|
+
const V = {
|
|
160
163
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
161
164
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
162
165
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -193,19 +196,20 @@ const k = {
|
|
|
193
196
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
194
197
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
195
198
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
196
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
200
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
201
|
+
}, He = {}, zn = {};
|
|
202
|
+
Un();
|
|
203
|
+
function be(e, t, n = /* @__PURE__ */ new Map(), o = (l, u, i) => u, a = {}, s = (l) => l) {
|
|
204
|
+
return Ue[t.title] = t, ze[t.title] = o, He[t.title] = a, zn[t.title] = s, (l = {}) => {
|
|
205
|
+
const u = qn(l, t, n), i = Object.keys(e).reduce((r, p) => (r[p] = e[p].default, r), {});
|
|
206
|
+
return Object.assign(i, u);
|
|
203
207
|
};
|
|
204
208
|
}
|
|
205
|
-
function
|
|
209
|
+
function Ge(e, t) {
|
|
206
210
|
return { customClass: t.class, customStyle: t.style };
|
|
207
211
|
}
|
|
208
|
-
function
|
|
212
|
+
function Hn() {
|
|
209
213
|
function e(t) {
|
|
210
214
|
return t.editor;
|
|
211
215
|
}
|
|
@@ -213,32 +217,32 @@ function to() {
|
|
|
213
217
|
resolve: e
|
|
214
218
|
};
|
|
215
219
|
}
|
|
216
|
-
const
|
|
217
|
-
["appearance",
|
|
218
|
-
]);
|
|
219
|
-
var
|
|
220
|
-
const
|
|
221
|
-
class
|
|
222
|
-
constructor(t,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
this.resolver = t, this.designerHostService =
|
|
220
|
+
const Pe = /* @__PURE__ */ new Map([
|
|
221
|
+
["appearance", Ge]
|
|
222
|
+
]), Gn = /* @__PURE__ */ new Map([]);
|
|
223
|
+
var ke = /* @__PURE__ */ ((e) => (e.String = "String", e.DateTime = "DateTime", e.Date = "Date", e.Enum = "Enum", e.Boolean = "Boolean", e.Number = "Number", e.Text = "Text", e.BigNumber = "BigNumber", e))(ke || {});
|
|
224
|
+
const Wn = "root-viewmodel";
|
|
225
|
+
class Xn {
|
|
226
|
+
constructor(t, n) {
|
|
227
|
+
G(this, "formSchemaUtils");
|
|
228
|
+
G(this, "controlCreatorUtils");
|
|
229
|
+
G(this, "designViewModelUtils");
|
|
230
|
+
this.resolver = t, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
227
231
|
}
|
|
228
232
|
createComponent(t) {
|
|
229
|
-
const
|
|
230
|
-
return s.module.viewmodels.push(
|
|
233
|
+
const n = this.createComponentRefNode(t), o = this.createComponentNode(t), a = this.createViewModeNode(t), s = this.formSchemaUtils.getFormSchema();
|
|
234
|
+
return s.module.viewmodels.push(a), s.module.components.push(o), this.designViewModelUtils.assembleDesignViewModel(), n;
|
|
231
235
|
}
|
|
232
236
|
createComponentRefNode(t) {
|
|
233
|
-
const
|
|
234
|
-
return Object.assign(
|
|
237
|
+
const n = this.resolver.getSchemaByType("component-ref");
|
|
238
|
+
return Object.assign(n, {
|
|
235
239
|
id: `${t.componentId}-component-ref`,
|
|
236
240
|
component: `${t.componentId}-component`
|
|
237
|
-
}),
|
|
241
|
+
}), n;
|
|
238
242
|
}
|
|
239
243
|
createComponentNode(t) {
|
|
240
|
-
const
|
|
241
|
-
return Object.assign(
|
|
244
|
+
const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(t);
|
|
245
|
+
return Object.assign(n, {
|
|
242
246
|
id: `${t.componentId}-component`,
|
|
243
247
|
viewModel: `${t.componentId}-component-viewmodel`,
|
|
244
248
|
componentType: t.componentType,
|
|
@@ -246,8 +250,8 @@ class no {
|
|
|
246
250
|
class: this.getFormComponentClass()
|
|
247
251
|
},
|
|
248
252
|
formColumns: t.formColumns,
|
|
249
|
-
contents:
|
|
250
|
-
}),
|
|
253
|
+
contents: o
|
|
254
|
+
}), n;
|
|
251
255
|
}
|
|
252
256
|
/**
|
|
253
257
|
* 获取卡片组件层级的class样式
|
|
@@ -256,49 +260,49 @@ class no {
|
|
|
256
260
|
return this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
257
261
|
}
|
|
258
262
|
createFormComponentContents(t) {
|
|
259
|
-
const
|
|
260
|
-
Object.assign(
|
|
263
|
+
const n = this.resolver.getSchemaByType("section");
|
|
264
|
+
Object.assign(n, {
|
|
261
265
|
id: t.componentId + "-form-section",
|
|
262
266
|
appearance: {
|
|
263
267
|
class: "f-section-form f-section-in-mainsubcard"
|
|
264
268
|
},
|
|
265
269
|
mainTitle: t.componentName
|
|
266
270
|
});
|
|
267
|
-
const
|
|
268
|
-
Object.assign(
|
|
271
|
+
const o = this.resolver.getSchemaByType("response-form"), a = [];
|
|
272
|
+
Object.assign(o, {
|
|
269
273
|
id: t.componentId + "-form",
|
|
270
274
|
appearance: {
|
|
271
275
|
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
272
276
|
},
|
|
273
|
-
contents:
|
|
274
|
-
}),
|
|
277
|
+
contents: a
|
|
278
|
+
}), n.contents = [o];
|
|
275
279
|
const { selectedFields: s } = t;
|
|
276
|
-
return s == null || s.forEach((
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
}), this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" && (
|
|
280
|
+
return s == null || s.forEach((u) => {
|
|
281
|
+
const i = Ee(u), r = this.resolveControlClassByFormColumns(t), p = this.controlCreatorUtils.setFormFieldProperty(i, "", r);
|
|
282
|
+
p && a.push(p);
|
|
283
|
+
}), this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0), [n];
|
|
280
284
|
}
|
|
281
285
|
resolveControlClassByFormColumns(t) {
|
|
282
|
-
let
|
|
286
|
+
let n = "";
|
|
283
287
|
switch (t.formColumns) {
|
|
284
288
|
case 1: {
|
|
285
|
-
|
|
289
|
+
n = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
286
290
|
break;
|
|
287
291
|
}
|
|
288
292
|
case 2: {
|
|
289
|
-
|
|
293
|
+
n = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
290
294
|
break;
|
|
291
295
|
}
|
|
292
296
|
case 3: {
|
|
293
|
-
|
|
297
|
+
n = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
294
298
|
break;
|
|
295
299
|
}
|
|
296
300
|
case 4: {
|
|
297
|
-
|
|
301
|
+
n = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
298
302
|
break;
|
|
299
303
|
}
|
|
300
304
|
}
|
|
301
|
-
return
|
|
305
|
+
return n;
|
|
302
306
|
}
|
|
303
307
|
/**
|
|
304
308
|
* 添加viewModel节点
|
|
@@ -309,7 +313,7 @@ class no {
|
|
|
309
313
|
code: `${t.componentId}-component-viewmodel`,
|
|
310
314
|
name: t.componentName,
|
|
311
315
|
bindTo: t.bindTo,
|
|
312
|
-
parent:
|
|
316
|
+
parent: Wn,
|
|
313
317
|
fields: this.assembleViewModelFields(t),
|
|
314
318
|
commands: [],
|
|
315
319
|
states: [],
|
|
@@ -323,38 +327,41 @@ class no {
|
|
|
323
327
|
* 组装viewModel fields 节点
|
|
324
328
|
*/
|
|
325
329
|
assembleViewModelFields(t) {
|
|
326
|
-
const
|
|
327
|
-
return
|
|
330
|
+
const n = [], { selectedFields: o } = t;
|
|
331
|
+
return o == null || o.forEach((a) => {
|
|
328
332
|
let s = "blur";
|
|
329
|
-
const
|
|
330
|
-
(
|
|
333
|
+
const l = a.type.name;
|
|
334
|
+
(l === ke.Enum || l === ke.Boolean) && (s = "change"), n.push({
|
|
331
335
|
type: "Form",
|
|
332
|
-
id:
|
|
333
|
-
fieldName:
|
|
336
|
+
id: a.id,
|
|
337
|
+
fieldName: a.bindingField,
|
|
334
338
|
groupId: null,
|
|
335
339
|
groupName: null,
|
|
336
340
|
updateOn: s,
|
|
337
341
|
fieldSchema: {}
|
|
338
342
|
});
|
|
339
|
-
}),
|
|
343
|
+
}), n;
|
|
340
344
|
}
|
|
341
345
|
}
|
|
342
|
-
function
|
|
343
|
-
const
|
|
344
|
-
if (
|
|
345
|
-
const
|
|
346
|
+
function Yn(e, t, n, o) {
|
|
347
|
+
const a = n.parentComponentInstance;
|
|
348
|
+
if (a) {
|
|
349
|
+
const l = {
|
|
346
350
|
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
347
351
|
componentName: "标题",
|
|
348
352
|
componentType: "form",
|
|
349
353
|
formColumns: 4,
|
|
350
|
-
parentContainerId:
|
|
354
|
+
parentContainerId: a.schema.id,
|
|
351
355
|
bindTo: "/"
|
|
352
356
|
};
|
|
353
|
-
return new
|
|
357
|
+
return new Xn(e, o).createComponent(l);
|
|
354
358
|
} else
|
|
355
359
|
return t;
|
|
356
360
|
}
|
|
357
|
-
|
|
361
|
+
function Jn(e, t, n) {
|
|
362
|
+
return t;
|
|
363
|
+
}
|
|
364
|
+
const Qn = "https://json-schema.org/draft/2020-12/schema", Zn = "https://farris-design.gitee.io/response-form.schema.json", _n = "response-form", Kn = "A Farris Data Collection Component", eo = "object", to = {
|
|
358
365
|
id: {
|
|
359
366
|
description: "The unique identifier for a form group",
|
|
360
367
|
type: "string"
|
|
@@ -382,63 +389,36 @@ const ao = "https://json-schema.org/draft/2020-12/schema", so = "https://farris-
|
|
|
382
389
|
type: "array",
|
|
383
390
|
default: []
|
|
384
391
|
}
|
|
385
|
-
},
|
|
392
|
+
}, no = [
|
|
386
393
|
"id",
|
|
387
394
|
"type"
|
|
388
|
-
],
|
|
389
|
-
$schema:
|
|
390
|
-
$id:
|
|
391
|
-
title:
|
|
392
|
-
description:
|
|
393
|
-
type:
|
|
394
|
-
properties:
|
|
395
|
-
required:
|
|
396
|
-
},
|
|
397
|
-
basic: {
|
|
398
|
-
description: "Basic Infomation",
|
|
399
|
-
title: "基本信息",
|
|
400
|
-
properties: {
|
|
401
|
-
id: {
|
|
402
|
-
description: "组件标识",
|
|
403
|
-
title: "标识",
|
|
404
|
-
type: "string",
|
|
405
|
-
readonly: !0
|
|
406
|
-
},
|
|
407
|
-
type: {
|
|
408
|
-
description: "组件类型",
|
|
409
|
-
title: "控件类型",
|
|
410
|
-
type: "select",
|
|
411
|
-
editor: {
|
|
412
|
-
type: "waiting for modification",
|
|
413
|
-
enum: []
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}, ho = {
|
|
419
|
-
title: fo,
|
|
420
|
-
description: yo,
|
|
421
|
-
type: go,
|
|
422
|
-
categories: bo
|
|
423
|
-
}, we = {
|
|
395
|
+
], oo = {
|
|
396
|
+
$schema: Qn,
|
|
397
|
+
$id: Zn,
|
|
398
|
+
title: _n,
|
|
399
|
+
description: Kn,
|
|
400
|
+
type: eo,
|
|
401
|
+
properties: to,
|
|
402
|
+
required: no
|
|
403
|
+
}, We = {
|
|
424
404
|
customClass: { type: String, default: "" }
|
|
425
|
-
},
|
|
405
|
+
}, Ve = be(We, oo, Pe, Yn), Be = /* @__PURE__ */ Z({
|
|
426
406
|
name: "FResponseForm",
|
|
427
|
-
props:
|
|
407
|
+
props: We,
|
|
428
408
|
emits: [],
|
|
429
409
|
setup(e, t) {
|
|
430
|
-
const
|
|
431
|
-
const
|
|
410
|
+
const n = d(), o = x(() => {
|
|
411
|
+
const a = e.customClass.split(" "), s = {
|
|
432
412
|
"drag-container": !0
|
|
433
413
|
};
|
|
434
|
-
return
|
|
414
|
+
return a.reduce((l, u) => (l[u] = !0, l), s), s;
|
|
435
415
|
});
|
|
436
|
-
return () =>
|
|
437
|
-
ref:
|
|
438
|
-
class:
|
|
416
|
+
return () => m("div", {
|
|
417
|
+
ref: n,
|
|
418
|
+
class: o.value
|
|
439
419
|
}, [t.slots.default && t.slots.default()]);
|
|
440
420
|
}
|
|
441
|
-
}),
|
|
421
|
+
}), ao = "https://json-schema.org/draft/2020-12/schema", ro = "https://farris-design.gitee.io/form-group.schema.json", so = "form-group", lo = "A Farris Input Component", io = "object", uo = {
|
|
442
422
|
id: {
|
|
443
423
|
description: "The unique identifier for a form group",
|
|
444
424
|
type: "string"
|
|
@@ -479,18 +459,18 @@ const ao = "https://json-schema.org/draft/2020-12/schema", so = "https://farris-
|
|
|
479
459
|
description: "",
|
|
480
460
|
type: "number"
|
|
481
461
|
}
|
|
482
|
-
},
|
|
462
|
+
}, co = [
|
|
483
463
|
"id",
|
|
484
464
|
"type"
|
|
485
|
-
],
|
|
486
|
-
$schema:
|
|
487
|
-
$id:
|
|
488
|
-
title:
|
|
489
|
-
description:
|
|
490
|
-
type:
|
|
491
|
-
properties:
|
|
492
|
-
required:
|
|
493
|
-
},
|
|
465
|
+
], Xe = {
|
|
466
|
+
$schema: ao,
|
|
467
|
+
$id: ro,
|
|
468
|
+
title: so,
|
|
469
|
+
description: lo,
|
|
470
|
+
type: io,
|
|
471
|
+
properties: uo,
|
|
472
|
+
required: co
|
|
473
|
+
}, pe = {
|
|
494
474
|
id: { type: String, default: "" },
|
|
495
475
|
customClass: { type: String, default: "" },
|
|
496
476
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
@@ -503,113 +483,113 @@ const ao = "https://json-schema.org/draft/2020-12/schema", so = "https://farris-
|
|
|
503
483
|
required: { type: Boolean, default: !1 },
|
|
504
484
|
showLabel: { type: Boolean, default: !0 },
|
|
505
485
|
type: { type: String, default: "input-group" }
|
|
506
|
-
},
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
486
|
+
}, Re = be(
|
|
487
|
+
pe,
|
|
488
|
+
Xe,
|
|
489
|
+
Pe,
|
|
510
490
|
void 0
|
|
511
|
-
),
|
|
512
|
-
function
|
|
513
|
-
var
|
|
514
|
-
function
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
function l() {
|
|
520
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : o && o.checkCanMoveComponent ? o.checkCanMoveComponent() : !0;
|
|
521
|
-
}
|
|
491
|
+
), po = Hn();
|
|
492
|
+
function je(e, t, n) {
|
|
493
|
+
var R;
|
|
494
|
+
function o() {
|
|
495
|
+
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
496
|
+
}
|
|
497
|
+
o();
|
|
498
|
+
const a = n && n.getStyles && n.getStyles() || "", s = n && n.getDesignerClass && n.getDesignerClass() || "", l = d();
|
|
522
499
|
function u() {
|
|
523
|
-
return !1;
|
|
500
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
524
501
|
}
|
|
525
502
|
function i() {
|
|
526
|
-
return
|
|
503
|
+
return !1;
|
|
504
|
+
}
|
|
505
|
+
function r() {
|
|
506
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
527
507
|
}
|
|
528
|
-
function
|
|
529
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 :
|
|
508
|
+
function p() {
|
|
509
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
530
510
|
}
|
|
531
|
-
function
|
|
532
|
-
if (!
|
|
511
|
+
function c(T) {
|
|
512
|
+
if (!T || !T.value)
|
|
533
513
|
return null;
|
|
534
|
-
if (
|
|
535
|
-
return
|
|
536
|
-
const
|
|
537
|
-
return
|
|
514
|
+
if (T.value.schema && T.value.schema.type === "component")
|
|
515
|
+
return T.value;
|
|
516
|
+
const w = d(T == null ? void 0 : T.value.parent), A = c(w);
|
|
517
|
+
return A || null;
|
|
538
518
|
}
|
|
539
|
-
function
|
|
540
|
-
const { componentInstance:
|
|
541
|
-
return !
|
|
519
|
+
function v(T = t) {
|
|
520
|
+
const { componentInstance: w, designerItemElementRef: A } = T;
|
|
521
|
+
return !w || !w.value ? null : w.value.canMove ? A : v(T.parent);
|
|
542
522
|
}
|
|
543
|
-
function
|
|
544
|
-
return !!
|
|
523
|
+
function b(T) {
|
|
524
|
+
return !!n && n.canAccepts(T);
|
|
545
525
|
}
|
|
546
|
-
function
|
|
526
|
+
function f() {
|
|
547
527
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
548
528
|
}
|
|
549
|
-
function
|
|
550
|
-
}
|
|
551
|
-
function
|
|
552
|
-
|
|
553
|
-
}
|
|
554
|
-
function T
|
|
555
|
-
const { componentType:
|
|
556
|
-
let
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
return
|
|
560
|
-
}
|
|
561
|
-
function
|
|
562
|
-
const
|
|
563
|
-
|
|
564
|
-
let N =
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
return N && !N.id && N.type ===
|
|
568
|
-
}
|
|
569
|
-
function
|
|
570
|
-
}
|
|
571
|
-
function
|
|
572
|
-
if (
|
|
573
|
-
return
|
|
574
|
-
}
|
|
575
|
-
return
|
|
576
|
-
canMove:
|
|
577
|
-
canSelectParent:
|
|
578
|
-
canDelete:
|
|
579
|
-
canNested: !
|
|
529
|
+
function g() {
|
|
530
|
+
}
|
|
531
|
+
function y(T, w) {
|
|
532
|
+
w && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(w);
|
|
533
|
+
}
|
|
534
|
+
function C(T, w) {
|
|
535
|
+
const { componentType: A } = T;
|
|
536
|
+
let E = de(A, T, w);
|
|
537
|
+
n && n.onResolveNewComponentSchema && (E = n.onResolveNewComponentSchema(T, E));
|
|
538
|
+
const O = A.toLowerCase().replace("-", "_");
|
|
539
|
+
return E && !E.id && E.type === A && (E.id = `${O}_${Math.random().toString().slice(2, 6)}`), E;
|
|
540
|
+
}
|
|
541
|
+
function h(T, w) {
|
|
542
|
+
const A = String(T.getAttribute("data-controltype")), E = T.getAttribute("data-feature"), O = E ? JSON.parse(E) : {};
|
|
543
|
+
O.parentComponentInstance = l.value;
|
|
544
|
+
let N = de(A, O);
|
|
545
|
+
n && n.onAcceptNewChildElement && (N = n.onAcceptNewChildElement(T, w, N));
|
|
546
|
+
const U = A.toLowerCase().replace("-", "_");
|
|
547
|
+
return N && !N.id && N.type === A && (N.id = `${U}_${Math.random().toString().slice(2, 6)}`), N;
|
|
548
|
+
}
|
|
549
|
+
function F(T) {
|
|
550
|
+
}
|
|
551
|
+
function k(...T) {
|
|
552
|
+
if (n && n.getPropsConfig)
|
|
553
|
+
return n.getPropsConfig(...T);
|
|
554
|
+
}
|
|
555
|
+
return l.value = {
|
|
556
|
+
canMove: u(),
|
|
557
|
+
canSelectParent: i(),
|
|
558
|
+
canDelete: r(),
|
|
559
|
+
canNested: !p(),
|
|
580
560
|
contents: t == null ? void 0 : t.schema.contents,
|
|
581
561
|
elementRef: e,
|
|
582
|
-
parent: (
|
|
562
|
+
parent: (R = t == null ? void 0 : t.parent) == null ? void 0 : R.componentInstance,
|
|
583
563
|
schema: t == null ? void 0 : t.schema,
|
|
584
|
-
styles:
|
|
564
|
+
styles: a,
|
|
585
565
|
designerClass: s,
|
|
586
|
-
canAccepts:
|
|
587
|
-
getBelongedComponentInstance:
|
|
588
|
-
getDraggableDesignItemElement:
|
|
589
|
-
getDraggingDisplayText:
|
|
590
|
-
getPropConfig:
|
|
591
|
-
getDragScopeElement:
|
|
592
|
-
onAcceptMovedChildElement:
|
|
593
|
-
onAcceptNewChildElement:
|
|
594
|
-
onChildElementMovedOut:
|
|
595
|
-
addNewChildComponentSchema:
|
|
596
|
-
updateDragAndDropRules:
|
|
597
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
598
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
599
|
-
},
|
|
600
|
-
}
|
|
601
|
-
function
|
|
566
|
+
canAccepts: b,
|
|
567
|
+
getBelongedComponentInstance: c,
|
|
568
|
+
getDraggableDesignItemElement: v,
|
|
569
|
+
getDraggingDisplayText: f,
|
|
570
|
+
getPropConfig: k,
|
|
571
|
+
getDragScopeElement: g,
|
|
572
|
+
onAcceptMovedChildElement: y,
|
|
573
|
+
onAcceptNewChildElement: h,
|
|
574
|
+
onChildElementMovedOut: F,
|
|
575
|
+
addNewChildComponentSchema: C,
|
|
576
|
+
updateDragAndDropRules: o,
|
|
577
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || d(!1),
|
|
578
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || d(!1)
|
|
579
|
+
}, l;
|
|
580
|
+
}
|
|
581
|
+
function fo() {
|
|
602
582
|
function e(t) {
|
|
603
|
-
var
|
|
583
|
+
var a, s;
|
|
604
584
|
if (!t)
|
|
605
585
|
return !1;
|
|
606
|
-
const
|
|
607
|
-
if (!
|
|
586
|
+
const n = ((a = t.targetContainer) == null ? void 0 : a.componentInstance) && t.targetContainer.componentInstance.value;
|
|
587
|
+
if (!n)
|
|
608
588
|
return !1;
|
|
609
|
-
const
|
|
589
|
+
const o = (s = n.schema.appearance) == null ? void 0 : s.class;
|
|
610
590
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
611
|
-
const
|
|
612
|
-
if (
|
|
591
|
+
const l = n.schema.type, u = (l === "response-form" || l === "content-container") && o && o.includes("farris-form");
|
|
592
|
+
if (n.schema.type !== "response-layout-item" && !u)
|
|
613
593
|
return !1;
|
|
614
594
|
}
|
|
615
595
|
return t.controlType !== "field-set";
|
|
@@ -618,7 +598,7 @@ function Po() {
|
|
|
618
598
|
basalDragulaRuleForContainer: e
|
|
619
599
|
};
|
|
620
600
|
}
|
|
621
|
-
const
|
|
601
|
+
const mo = "https://json-schema.org/draft/2020-12/schema", vo = "https://farris-design.gitee.io/dragging-rules.schema.json", go = "Dragging Rules", yo = "The rules of designer canvas", ho = "object", bo = {
|
|
622
602
|
"f-page": {
|
|
623
603
|
description: "The root class of page designed by farris.",
|
|
624
604
|
type: "object",
|
|
@@ -1256,265 +1236,343 @@ const xo = "https://json-schema.org/draft/2020-12/schema", So = "https://farris-
|
|
|
1256
1236
|
description: "",
|
|
1257
1237
|
type: "object"
|
|
1258
1238
|
}
|
|
1259
|
-
},
|
|
1260
|
-
$schema:
|
|
1261
|
-
$id:
|
|
1262
|
-
title:
|
|
1263
|
-
description:
|
|
1264
|
-
type:
|
|
1265
|
-
properties:
|
|
1266
|
-
},
|
|
1267
|
-
function
|
|
1268
|
-
function e(
|
|
1269
|
-
var
|
|
1270
|
-
if (typeof
|
|
1271
|
-
return ((
|
|
1272
|
-
if (typeof
|
|
1273
|
-
const
|
|
1274
|
-
if (
|
|
1275
|
-
return Number(
|
|
1276
|
-
if (
|
|
1277
|
-
return Number(
|
|
1278
|
-
if (
|
|
1279
|
-
return Number(
|
|
1239
|
+
}, Co = {
|
|
1240
|
+
$schema: mo,
|
|
1241
|
+
$id: vo,
|
|
1242
|
+
title: go,
|
|
1243
|
+
description: yo,
|
|
1244
|
+
type: ho,
|
|
1245
|
+
properties: bo
|
|
1246
|
+
}, Me = /* @__PURE__ */ new Map();
|
|
1247
|
+
function wo() {
|
|
1248
|
+
function e(f, g, y, C) {
|
|
1249
|
+
var h;
|
|
1250
|
+
if (typeof y == "number")
|
|
1251
|
+
return ((h = C[f]) == null ? void 0 : h.length) === y;
|
|
1252
|
+
if (typeof y == "object") {
|
|
1253
|
+
const F = Object.keys(y)[0], k = y[F];
|
|
1254
|
+
if (F === "not")
|
|
1255
|
+
return Number(C[f].length) !== Number(k);
|
|
1256
|
+
if (F === "moreThan")
|
|
1257
|
+
return Number(C[f].length) >= Number(k);
|
|
1258
|
+
if (F === "lessThan")
|
|
1259
|
+
return Number(C[f].length) <= Number(k);
|
|
1280
1260
|
}
|
|
1281
1261
|
return !1;
|
|
1282
1262
|
}
|
|
1283
|
-
function t(
|
|
1284
|
-
return typeof
|
|
1263
|
+
function t(f, g, y, C) {
|
|
1264
|
+
return typeof y == "boolean" ? C.childrenClassList.includes(g) === !!y : !1;
|
|
1285
1265
|
}
|
|
1286
|
-
function
|
|
1287
|
-
return typeof
|
|
1266
|
+
function n(f, g, y, C) {
|
|
1267
|
+
return typeof y == "boolean" ? C.parentClassList.includes(g) === !!y : !1;
|
|
1288
1268
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return typeof
|
|
1269
|
+
function o(f, g, y, C) {
|
|
1270
|
+
return typeof y == "boolean" ? C.parentClassList.includes(g) === !!y : !1;
|
|
1291
1271
|
}
|
|
1292
|
-
const
|
|
1272
|
+
const a = /* @__PURE__ */ new Map([
|
|
1293
1273
|
["length", e],
|
|
1294
1274
|
["hasChildren", t],
|
|
1295
|
-
["hasSibling",
|
|
1296
|
-
["hasParent",
|
|
1275
|
+
["hasSibling", o],
|
|
1276
|
+
["hasParent", n]
|
|
1297
1277
|
]);
|
|
1298
|
-
function s(
|
|
1299
|
-
const
|
|
1300
|
-
return typeof
|
|
1301
|
-
if (
|
|
1302
|
-
return { target:
|
|
1303
|
-
const
|
|
1304
|
-
return { target:
|
|
1278
|
+
function s(f, g) {
|
|
1279
|
+
const y = f;
|
|
1280
|
+
return typeof g == "number" ? [{ target: y, operator: "length", param: null, value: Number(g) }] : typeof g == "object" ? Object.keys(g).map((C) => {
|
|
1281
|
+
if (C === "length")
|
|
1282
|
+
return { target: y, operator: "length", param: null, value: g[C] };
|
|
1283
|
+
const h = C, F = g[C];
|
|
1284
|
+
return { target: y, operator: f === "children" ? "hasChildren" : f === "parent" ? "hasParent" : "hasSibling", param: h, value: F };
|
|
1305
1285
|
}) : [];
|
|
1306
1286
|
}
|
|
1307
|
-
function
|
|
1308
|
-
if (
|
|
1309
|
-
const
|
|
1310
|
-
return
|
|
1287
|
+
function l(f, g) {
|
|
1288
|
+
if (a.has(f.operator)) {
|
|
1289
|
+
const y = a.get(f.operator);
|
|
1290
|
+
return y && y(f.target, f.param, f.value, g) || !1;
|
|
1311
1291
|
}
|
|
1312
1292
|
return !1;
|
|
1313
1293
|
}
|
|
1314
|
-
function
|
|
1315
|
-
return Object.keys(
|
|
1316
|
-
const
|
|
1317
|
-
return
|
|
1318
|
-
}, []).reduce((
|
|
1319
|
-
}
|
|
1320
|
-
function
|
|
1321
|
-
const
|
|
1322
|
-
return
|
|
1323
|
-
}
|
|
1324
|
-
function
|
|
1325
|
-
const
|
|
1326
|
-
return
|
|
1327
|
-
}
|
|
1328
|
-
function
|
|
1329
|
-
return (
|
|
1330
|
-
const
|
|
1331
|
-
return
|
|
1332
|
-
const
|
|
1333
|
-
return
|
|
1334
|
-
},
|
|
1294
|
+
function u(f, g) {
|
|
1295
|
+
return Object.keys(f).reduce((F, k) => {
|
|
1296
|
+
const R = s(k, f[k]);
|
|
1297
|
+
return F.push(...R), F;
|
|
1298
|
+
}, []).reduce((F, k) => F && l(k, g), !0);
|
|
1299
|
+
}
|
|
1300
|
+
function i(f, g) {
|
|
1301
|
+
const y = Object.keys(f), C = y.includes("allOf"), h = y.includes("anyOf"), F = C || h, T = (F ? f[F ? C ? "allOf" : "anyOf" : "allOf"] : [f]).map((A) => u(A, g));
|
|
1302
|
+
return C ? !T.includes(!1) : T.includes(!0);
|
|
1303
|
+
}
|
|
1304
|
+
function r(f, g) {
|
|
1305
|
+
const y = f.const;
|
|
1306
|
+
return y ? typeof y == "boolean" ? y : typeof y == "object" ? i(y, g) : !1 : !1;
|
|
1307
|
+
}
|
|
1308
|
+
function p(f) {
|
|
1309
|
+
return (g) => {
|
|
1310
|
+
const y = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1311
|
+
return f && f.properties && Object.keys(f.properties).reduce((C, h) => {
|
|
1312
|
+
const F = f.properties[h];
|
|
1313
|
+
return C[h] = r(F, g), C;
|
|
1314
|
+
}, y), y;
|
|
1335
1315
|
};
|
|
1336
1316
|
}
|
|
1337
|
-
function
|
|
1338
|
-
if (
|
|
1339
|
-
const { rules:
|
|
1340
|
-
|
|
1341
|
-
(
|
|
1317
|
+
function c(f, g, y) {
|
|
1318
|
+
if (g.type === "object" && g.properties) {
|
|
1319
|
+
const { rules: C, contents: h } = g.properties;
|
|
1320
|
+
y.set(f, p(C)), h && Object.keys(h.properties).forEach(
|
|
1321
|
+
(F) => c(F, h.properties[F], y)
|
|
1342
1322
|
);
|
|
1343
1323
|
}
|
|
1344
1324
|
}
|
|
1345
|
-
function
|
|
1346
|
-
const { properties:
|
|
1347
|
-
Object.keys(
|
|
1348
|
-
|
|
1325
|
+
function v() {
|
|
1326
|
+
const { properties: f } = Co;
|
|
1327
|
+
Object.keys(f).forEach((g) => {
|
|
1328
|
+
c(g, f[g], Me);
|
|
1349
1329
|
});
|
|
1350
1330
|
}
|
|
1351
|
-
function
|
|
1352
|
-
const
|
|
1353
|
-
return
|
|
1331
|
+
function b(f, g) {
|
|
1332
|
+
const y = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1333
|
+
return Me.has(f) ? Me.get(f)(g) : y;
|
|
1354
1334
|
}
|
|
1355
|
-
return
|
|
1335
|
+
return v(), { getRuleValue: b };
|
|
1356
1336
|
}
|
|
1357
|
-
function
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1337
|
+
function xo(e, t) {
|
|
1338
|
+
function n(i, r = null) {
|
|
1339
|
+
if (r) return r;
|
|
1340
|
+
const p = e.getComponentById(t);
|
|
1341
|
+
return e.selectNode(p, (c) => c.id === i);
|
|
1342
|
+
}
|
|
1343
|
+
function o(i) {
|
|
1344
|
+
const r = e.getComponentById(i);
|
|
1345
|
+
return !(!r || !r.componentType || !r.componentType.startsWith("form"));
|
|
1346
|
+
}
|
|
1347
|
+
function a(i) {
|
|
1348
|
+
const r = n(i.id), p = qe(e), c = [];
|
|
1349
|
+
p.getResonseFormLayoutConfig(r, c, 1);
|
|
1350
|
+
const v = c.map((k) => k.columnInSM), b = c.map((k) => k.columnInMD), f = c.map((k) => k.columnInLG), g = c.map((k) => k.columnInEL), y = s(v) ? v[0] : 0, C = s(b) ? b[0] : 0, h = s(f) ? f[0] : 0, F = s(g) ? g[0] : 0;
|
|
1351
|
+
return {
|
|
1352
|
+
uniqueColClassInSM: y,
|
|
1353
|
+
uniqueColClassInMD: C,
|
|
1354
|
+
uniqueColClassInLG: h,
|
|
1355
|
+
uniqueColClassInEL: F
|
|
1356
|
+
};
|
|
1363
1357
|
}
|
|
1364
|
-
function
|
|
1365
|
-
|
|
1358
|
+
function s(i) {
|
|
1359
|
+
const r = new Set(i);
|
|
1360
|
+
return Array.from(r).length === 1;
|
|
1361
|
+
}
|
|
1362
|
+
function l(i, r, p) {
|
|
1363
|
+
i = n(p, i), i.contents.forEach((c) => {
|
|
1364
|
+
if (c.type === Et.fieldset.type) {
|
|
1365
|
+
l(c, r, c.id);
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
c.appearance || (c.appearance = {});
|
|
1369
|
+
const v = c.appearance.class;
|
|
1370
|
+
c.appearance.class = u(v, r);
|
|
1371
|
+
});
|
|
1366
1372
|
}
|
|
1367
|
-
function
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1373
|
+
function u(i, r) {
|
|
1374
|
+
let p, c, v, b, f = [];
|
|
1375
|
+
if (i) {
|
|
1376
|
+
const k = i.split(" "), R = k.filter((T) => T.startsWith("col-"));
|
|
1377
|
+
p = R.find((T) => /^col-([1-9]|10|11|12)$/.test(T)), c = R.find((T) => /^col-md-([1-9]|10|11|12)$/.test(T)), v = R.find((T) => /^col-xl-([1-9]|10|11|12)$/.test(T)), b = R.find((T) => /^col-el-([1-9]|10|11|12)$/.test(T)), f = k.filter((T) => !T.startsWith("col-"));
|
|
1378
|
+
}
|
|
1379
|
+
const g = r.uniqueColClassInSM ? "col-" + r.uniqueColClassInSM : p, y = r.uniqueColClassInMD ? "col-md-" + r.uniqueColClassInMD : c, C = r.uniqueColClassInLG ? "col-xl-" + r.uniqueColClassInLG : v, h = r.uniqueColClassInEL ? "col-el-" + r.uniqueColClassInEL : b;
|
|
1380
|
+
return [g, y, C, h].concat(f).join(" ");
|
|
1381
|
+
}
|
|
1382
|
+
return { checkIsInFormComponent: o, assembleUnifiedLayoutContext: a, changeFormControlsByUnifiedLayoutConfig: l };
|
|
1383
|
+
}
|
|
1384
|
+
class To extends kt {
|
|
1385
|
+
constructor(t, n) {
|
|
1386
|
+
super(t, n);
|
|
1387
|
+
}
|
|
1388
|
+
getPropertyConfig(t, n) {
|
|
1389
|
+
var o = this;
|
|
1390
|
+
this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
|
|
1391
|
+
const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: l } = xo(this.formSchemaUtils, this.componentId), u = this.getAppearanceConfig(t);
|
|
1392
|
+
return u.properties.unifiedLayout = {
|
|
1393
|
+
title: "统一布局配置",
|
|
1394
|
+
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
1395
|
+
visible: a(this.componentId),
|
|
1396
|
+
refreshPanelAfterChanged: !0,
|
|
1397
|
+
editor: {
|
|
1398
|
+
type: "response-form-layout-setting",
|
|
1399
|
+
initialState: s(t)
|
|
1400
|
+
}
|
|
1401
|
+
}, u.setPropertyRelates = function(i, r) {
|
|
1402
|
+
if (i)
|
|
1403
|
+
switch (i && i.propertyID) {
|
|
1404
|
+
case "unifiedLayout": {
|
|
1405
|
+
l(null, i.propertyValue, t.id), o.updateElementByParentContainer(t.id, n);
|
|
1406
|
+
break;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
}, this.propertyConfig.categories.appearance = u, this.propertyConfig;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
function Bo(e, t) {
|
|
1413
|
+
var A;
|
|
1414
|
+
const n = e.schema, o = (A = e.parent) == null ? void 0 : A.schema, a = wo(), s = d(!1), l = d(!1);
|
|
1415
|
+
let u = !0, i = !1, r, p = !1;
|
|
1416
|
+
function c(E) {
|
|
1417
|
+
return r && r.componentClassList && r.componentClassList.includes("f-form-layout") && r.componentClassList.includes("farris-form") ? E.sourceType === "control" && E.controlCategory === "input" || E.sourceType === "move" && E.controlType === "form-group" : !0;
|
|
1418
|
+
}
|
|
1419
|
+
function v(E) {
|
|
1420
|
+
return !(!fo().basalDragulaRuleForContainer(E) || !u || !c(E));
|
|
1421
|
+
}
|
|
1422
|
+
function b() {
|
|
1423
|
+
s.value = !1, l.value = !1;
|
|
1424
|
+
const E = n, O = E.appearance && E.appearance.class || "", N = O.split(" "), U = E.contents || [], D = U.length ? U[0] : null, H = D && D.appearance ? D.appearance.class : "", Y = H ? H.split(" ") : [], Q = U.length ? U.reduce((fe, se) => {
|
|
1425
|
+
const me = se && se.appearance ? se.appearance.class : "", Ce = me ? me.split(" ") : [];
|
|
1426
|
+
return fe.push(...Ce), fe;
|
|
1427
|
+
}, []) : [], M = o, S = M && M.appearance && M.appearance.class || "", q = S ? S.split(" ") : [];
|
|
1428
|
+
r = {
|
|
1429
|
+
componentClass: O,
|
|
1430
|
+
componentClassList: N,
|
|
1431
|
+
childContents: U,
|
|
1432
|
+
firstChildContent: D,
|
|
1433
|
+
firstChildClass: H,
|
|
1434
|
+
firstChildClassList: Y,
|
|
1435
|
+
parent: M,
|
|
1436
|
+
parentClass: S,
|
|
1437
|
+
parentClassList: q,
|
|
1438
|
+
children: U,
|
|
1439
|
+
childrenClassList: Q
|
|
1385
1440
|
};
|
|
1386
|
-
const { canAccept:
|
|
1387
|
-
return
|
|
1441
|
+
const { canAccept: $, fixed: W, hidePadding: re } = a.getRuleValue(N[0], r);
|
|
1442
|
+
return u = $, i = re, p = W, !0;
|
|
1388
1443
|
}
|
|
1389
|
-
function
|
|
1390
|
-
|
|
1444
|
+
function f(E) {
|
|
1445
|
+
ye();
|
|
1391
1446
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return
|
|
1447
|
+
function g() {
|
|
1448
|
+
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
1394
1449
|
}
|
|
1395
|
-
function
|
|
1396
|
-
const
|
|
1397
|
-
if ((
|
|
1398
|
-
const { label:
|
|
1399
|
-
return
|
|
1450
|
+
function y(E, O) {
|
|
1451
|
+
const N = n;
|
|
1452
|
+
if ((N.appearance && N.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1453
|
+
const { label: H } = E, Y = de("form-group");
|
|
1454
|
+
return Y.editor = O, Y.label = H, C(Y), delete Y.editor.id, delete Y.editor.binding, delete Y.editor.appearance, delete Y.editor.visible, Y;
|
|
1400
1455
|
}
|
|
1401
|
-
return
|
|
1402
|
-
}
|
|
1403
|
-
function
|
|
1404
|
-
const
|
|
1405
|
-
if (
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1456
|
+
return O;
|
|
1457
|
+
}
|
|
1458
|
+
function C(E) {
|
|
1459
|
+
const O = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
1460
|
+
if (O && O.schema && O.schema.componentType) {
|
|
1461
|
+
const N = O.schema.formColumns;
|
|
1462
|
+
let U = h(N);
|
|
1463
|
+
U = t.formSchemaUtils.getControlClassByFormUnifiedLayout(U, "", e.schema), E.appearance || (E.appearance = {}), E.appearance.class = U;
|
|
1408
1464
|
}
|
|
1409
1465
|
}
|
|
1410
|
-
function
|
|
1411
|
-
let
|
|
1412
|
-
switch (
|
|
1466
|
+
function h(E) {
|
|
1467
|
+
let O = "";
|
|
1468
|
+
switch (E) {
|
|
1413
1469
|
case 1: {
|
|
1414
|
-
|
|
1470
|
+
O = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1415
1471
|
break;
|
|
1416
1472
|
}
|
|
1417
1473
|
case 2: {
|
|
1418
|
-
|
|
1474
|
+
O = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1419
1475
|
break;
|
|
1420
1476
|
}
|
|
1421
1477
|
case 3: {
|
|
1422
|
-
|
|
1478
|
+
O = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1423
1479
|
break;
|
|
1424
1480
|
}
|
|
1425
1481
|
case 4: {
|
|
1426
|
-
|
|
1482
|
+
O = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1427
1483
|
break;
|
|
1428
1484
|
}
|
|
1429
1485
|
}
|
|
1430
|
-
return
|
|
1486
|
+
return O;
|
|
1431
1487
|
}
|
|
1432
|
-
function
|
|
1433
|
-
const
|
|
1434
|
-
if ((
|
|
1435
|
-
const
|
|
1436
|
-
return
|
|
1488
|
+
function F(E, O, N) {
|
|
1489
|
+
const U = n;
|
|
1490
|
+
if ((U.appearance && U.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1491
|
+
const Y = String(E.innerText), Q = de("form-group");
|
|
1492
|
+
return Q.editor = N, Q.label = Y, Q;
|
|
1437
1493
|
}
|
|
1438
|
-
return
|
|
1494
|
+
return N;
|
|
1439
1495
|
}
|
|
1440
|
-
function
|
|
1441
|
-
return !
|
|
1496
|
+
function k() {
|
|
1497
|
+
return !p;
|
|
1442
1498
|
}
|
|
1443
|
-
function
|
|
1444
|
-
return !
|
|
1499
|
+
function R() {
|
|
1500
|
+
return !p;
|
|
1445
1501
|
}
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1502
|
+
function T() {
|
|
1503
|
+
return i;
|
|
1504
|
+
}
|
|
1505
|
+
function w(E) {
|
|
1506
|
+
return new To(E, t).getPropertyConfig(n, e.componentInstance.value);
|
|
1448
1507
|
}
|
|
1449
1508
|
return {
|
|
1450
|
-
canAccepts:
|
|
1451
|
-
checkCanDeleteComponent:
|
|
1452
|
-
checkCanMoveComponent:
|
|
1453
|
-
getStyles:
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1509
|
+
canAccepts: v,
|
|
1510
|
+
checkCanDeleteComponent: R,
|
|
1511
|
+
checkCanMoveComponent: k,
|
|
1512
|
+
getStyles: g,
|
|
1513
|
+
getPropsConfig: w,
|
|
1514
|
+
hideNestedPaddingInDesginerView: T,
|
|
1515
|
+
onAcceptNewChildElement: F,
|
|
1516
|
+
onAcceptMovedChildElement: f,
|
|
1517
|
+
resolveComponentContext: b,
|
|
1518
|
+
onResolveNewComponentSchema: y,
|
|
1459
1519
|
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1460
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1520
|
+
triggerBelongedComponentToDeleteWhenDeleted: l
|
|
1461
1521
|
};
|
|
1462
1522
|
}
|
|
1463
|
-
const
|
|
1523
|
+
const Mo = /* @__PURE__ */ Z({
|
|
1464
1524
|
name: "FResponseFormDesign",
|
|
1465
|
-
props:
|
|
1525
|
+
props: pe,
|
|
1466
1526
|
emits: [],
|
|
1467
1527
|
setup(e, t) {
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
const a = B(() => {
|
|
1475
|
-
const l = e.customClass.split(" "), u = {
|
|
1528
|
+
const n = d(), o = ue("design-item-context"), a = ue("designer-host-service"), s = Bo(o, a), l = je(n, o, s);
|
|
1529
|
+
K(() => {
|
|
1530
|
+
n.value.componentInstance = l;
|
|
1531
|
+
}), t.expose(l.value);
|
|
1532
|
+
const u = x(() => {
|
|
1533
|
+
const i = e.customClass.split(" "), r = {
|
|
1476
1534
|
"drag-container": !0
|
|
1477
1535
|
};
|
|
1478
|
-
return
|
|
1536
|
+
return i.reduce((p, c) => (p[c] = !0, p), r), r;
|
|
1479
1537
|
});
|
|
1480
|
-
return () =>
|
|
1481
|
-
ref:
|
|
1482
|
-
class:
|
|
1483
|
-
"data-dragref": `${
|
|
1484
|
-
"data-associate": `${
|
|
1538
|
+
return () => m("div", {
|
|
1539
|
+
ref: n,
|
|
1540
|
+
class: u.value,
|
|
1541
|
+
"data-dragref": `${o.schema.id}-container`,
|
|
1542
|
+
"data-associate": `${o.schema.id}-component`
|
|
1485
1543
|
}, [t.slots.default && t.slots.default()]);
|
|
1486
1544
|
}
|
|
1487
|
-
}),
|
|
1545
|
+
}), Fo = {
|
|
1488
1546
|
id: { type: String },
|
|
1489
1547
|
required: { type: Boolean, default: !1 },
|
|
1490
1548
|
text: { type: String, default: "" },
|
|
1491
1549
|
title: { type: String }
|
|
1492
|
-
},
|
|
1550
|
+
}, Ye = /* @__PURE__ */ Z({
|
|
1493
1551
|
name: "FDynamicFormLabel",
|
|
1494
|
-
props:
|
|
1552
|
+
props: Fo,
|
|
1495
1553
|
emits: [],
|
|
1496
1554
|
setup(e, t) {
|
|
1497
|
-
const
|
|
1498
|
-
return
|
|
1499
|
-
|
|
1500
|
-
}),
|
|
1501
|
-
s !==
|
|
1502
|
-
}), () =>
|
|
1555
|
+
const n = d(e.title || e.text), o = d(e.required), a = d(e.text);
|
|
1556
|
+
return X(() => e.text, () => {
|
|
1557
|
+
a.value = e.text;
|
|
1558
|
+
}), X(() => e.required, (s, l) => {
|
|
1559
|
+
s !== l && (o.value = s);
|
|
1560
|
+
}), () => a.value && m("label", {
|
|
1503
1561
|
class: "col-form-label",
|
|
1504
|
-
title:
|
|
1505
|
-
}, [
|
|
1562
|
+
title: n.value
|
|
1563
|
+
}, [o.value && m("span", {
|
|
1506
1564
|
class: "farris-label-info text-danger"
|
|
1507
|
-
}, [
|
|
1565
|
+
}, [_("*")]), m("span", {
|
|
1508
1566
|
class: "farris-label-text"
|
|
1509
|
-
}, [
|
|
1567
|
+
}, [a.value])]);
|
|
1510
1568
|
}
|
|
1511
|
-
}),
|
|
1512
|
-
["appearance",
|
|
1569
|
+
}), ko = /* @__PURE__ */ new Map([
|
|
1570
|
+
["appearance", Ge]
|
|
1513
1571
|
]);
|
|
1514
|
-
function
|
|
1572
|
+
function Eo(e, t, n) {
|
|
1515
1573
|
return t;
|
|
1516
1574
|
}
|
|
1517
|
-
const
|
|
1575
|
+
const So = "https://json-schema.org/draft/2020-12/schema", Po = "https://farris-design.gitee.io/input-group.schema.json", jo = "input-group", Io = "A Farris Input Component", Lo = "object", Ao = {
|
|
1518
1576
|
id: {
|
|
1519
1577
|
description: "The unique identifier for a Input Group",
|
|
1520
1578
|
type: "string"
|
|
@@ -1716,18 +1774,19 @@ const Go = "https://json-schema.org/draft/2020-12/schema", Uo = "https://farris-
|
|
|
1716
1774
|
type: "string",
|
|
1717
1775
|
default: ""
|
|
1718
1776
|
}
|
|
1719
|
-
},
|
|
1777
|
+
}, Do = [
|
|
1720
1778
|
"id",
|
|
1721
1779
|
"type"
|
|
1722
|
-
],
|
|
1723
|
-
$schema:
|
|
1724
|
-
$id:
|
|
1725
|
-
title:
|
|
1726
|
-
description:
|
|
1727
|
-
type:
|
|
1728
|
-
properties:
|
|
1729
|
-
required:
|
|
1730
|
-
},
|
|
1780
|
+
], Oo = {
|
|
1781
|
+
$schema: So,
|
|
1782
|
+
$id: Po,
|
|
1783
|
+
title: jo,
|
|
1784
|
+
description: Io,
|
|
1785
|
+
type: Lo,
|
|
1786
|
+
properties: Ao,
|
|
1787
|
+
required: Do
|
|
1788
|
+
}, Ie = {
|
|
1789
|
+
id: { Type: String, default: "" },
|
|
1731
1790
|
/** 是否自动完成 */
|
|
1732
1791
|
autocomplete: { Type: String, default: "off" },
|
|
1733
1792
|
/** 自定义CLASS */
|
|
@@ -1794,118 +1853,118 @@ const Go = "https://json-schema.org/draft/2020-12/schema", Uo = "https://farris-
|
|
|
1794
1853
|
*/
|
|
1795
1854
|
updateOn: { type: String, default: "blur" }
|
|
1796
1855
|
};
|
|
1797
|
-
|
|
1798
|
-
function
|
|
1799
|
-
const
|
|
1856
|
+
be(Ie, Oo, ko, Eo);
|
|
1857
|
+
function Vo(e, t, n, o) {
|
|
1858
|
+
const a = d(e.disabled), s = d(!1), l = d("text"), u = d(e.showBorder), i = d(e.textAlign), r = d(e.updateOn), p = x(() => e.editable || !e.readonly), c = x(() => e.editable && !e.disabled && !e.readonly), v = x(() => !e.disabled && s.value), b = x(() => n.value === "" || n.value === null || n.value === void 0), f = x(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), g = x(() => e.readonly || !e.editable), y = x(() => e.enableTitle ? n.value : ""), C = x(() => ({
|
|
1800
1859
|
"form-control": !0,
|
|
1801
1860
|
"f-utils-fill": !0,
|
|
1802
|
-
"text-left":
|
|
1803
|
-
"text-center":
|
|
1804
|
-
"text-right":
|
|
1805
|
-
})),
|
|
1806
|
-
const
|
|
1861
|
+
"text-left": i.value === "left",
|
|
1862
|
+
"text-center": i.value === "center",
|
|
1863
|
+
"text-right": i.value === "right"
|
|
1864
|
+
})), h = x(() => {
|
|
1865
|
+
const D = {
|
|
1807
1866
|
"f-cmp-inputgroup": !0,
|
|
1808
1867
|
"input-group": !0,
|
|
1809
|
-
"f-state-disable":
|
|
1810
|
-
"f-state-editable":
|
|
1811
|
-
"f-state-readonly":
|
|
1812
|
-
"f-state-focus":
|
|
1868
|
+
"f-state-disable": a.value,
|
|
1869
|
+
"f-state-editable": c.value,
|
|
1870
|
+
"f-state-readonly": g.value,
|
|
1871
|
+
"f-state-focus": v.value
|
|
1813
1872
|
};
|
|
1814
|
-
return (e.customClass || "").split(" ").reduce((
|
|
1815
|
-
}),
|
|
1816
|
-
function
|
|
1817
|
-
|
|
1873
|
+
return (e.customClass || "").split(" ").reduce((Y, Q) => (Y[Q] = !0, Y), D), D;
|
|
1874
|
+
}), F = x(() => u.value ? "" : "border-width : 0 ");
|
|
1875
|
+
function k(D, H = !0) {
|
|
1876
|
+
n.value = D, o.value !== D && (o.value = D), H && t.emit("change", D), t.emit("update:modelValue", D), t.emit("update:value", D);
|
|
1818
1877
|
}
|
|
1819
|
-
|
|
1878
|
+
X(
|
|
1820
1879
|
() => e.modelValue,
|
|
1821
|
-
(
|
|
1822
|
-
|
|
1880
|
+
(D, H) => {
|
|
1881
|
+
D !== H && (n.value = D, o.value = D);
|
|
1823
1882
|
}
|
|
1824
|
-
),
|
|
1825
|
-
|
|
1883
|
+
), X(() => e.disabled, (D, H) => {
|
|
1884
|
+
D !== H && (a.value = D);
|
|
1826
1885
|
});
|
|
1827
|
-
function
|
|
1828
|
-
return s.value = !1, t.emit("blur",
|
|
1886
|
+
function R(D) {
|
|
1887
|
+
return s.value = !1, t.emit("blur", D), D.stopPropagation(), !1;
|
|
1829
1888
|
}
|
|
1830
|
-
function
|
|
1831
|
-
t.emit("click",
|
|
1889
|
+
function T(D) {
|
|
1890
|
+
t.emit("click", D);
|
|
1832
1891
|
}
|
|
1833
|
-
function
|
|
1834
|
-
e.disabled || (
|
|
1892
|
+
function w(D) {
|
|
1893
|
+
e.disabled || (u.value && (s.value = !0), p.value && t.emit("focus", D));
|
|
1835
1894
|
}
|
|
1836
|
-
function
|
|
1837
|
-
t.emit("input",
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1895
|
+
function A(D) {
|
|
1896
|
+
t.emit("input", D.target.value);
|
|
1897
|
+
const H = D.target.value;
|
|
1898
|
+
o.value = H, r.value === "change" && (t.emit("update:modelValue", H), t.emit("update:value", H));
|
|
1840
1899
|
}
|
|
1841
|
-
function
|
|
1842
|
-
t.emit("keydown",
|
|
1900
|
+
function E(D) {
|
|
1901
|
+
t.emit("keydown", D);
|
|
1843
1902
|
}
|
|
1844
|
-
function
|
|
1845
|
-
t.emit("keyup",
|
|
1903
|
+
function O(D) {
|
|
1904
|
+
t.emit("keyup", D);
|
|
1846
1905
|
}
|
|
1847
|
-
function N(
|
|
1848
|
-
|
|
1906
|
+
function N(D) {
|
|
1907
|
+
D.target.tagName !== "INPUT" && D.preventDefault(), D.stopPropagation();
|
|
1849
1908
|
}
|
|
1850
|
-
function
|
|
1851
|
-
if (
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1909
|
+
function U(D) {
|
|
1910
|
+
if (r.value === "blur") {
|
|
1911
|
+
const H = D.target.value;
|
|
1912
|
+
D.stopPropagation(), k(H);
|
|
1854
1913
|
}
|
|
1855
1914
|
}
|
|
1856
1915
|
return {
|
|
1857
|
-
changeTextBoxValue:
|
|
1858
|
-
disabled:
|
|
1859
|
-
displayText:
|
|
1860
|
-
editable:
|
|
1861
|
-
hasFocused:
|
|
1862
|
-
inputGroupClass:
|
|
1863
|
-
inputType:
|
|
1864
|
-
isEmpty:
|
|
1865
|
-
modelValue:
|
|
1866
|
-
readonly:
|
|
1867
|
-
onBlur:
|
|
1868
|
-
onClick:
|
|
1869
|
-
onFocus:
|
|
1870
|
-
onInput:
|
|
1871
|
-
onKeydown:
|
|
1872
|
-
onKeyup:
|
|
1916
|
+
changeTextBoxValue: k,
|
|
1917
|
+
disabled: a,
|
|
1918
|
+
displayText: o,
|
|
1919
|
+
editable: c,
|
|
1920
|
+
hasFocused: v,
|
|
1921
|
+
inputGroupClass: h,
|
|
1922
|
+
inputType: l,
|
|
1923
|
+
isEmpty: b,
|
|
1924
|
+
modelValue: n,
|
|
1925
|
+
readonly: g,
|
|
1926
|
+
onBlur: R,
|
|
1927
|
+
onClick: T,
|
|
1928
|
+
onFocus: w,
|
|
1929
|
+
onInput: A,
|
|
1930
|
+
onKeydown: E,
|
|
1931
|
+
onKeyup: O,
|
|
1873
1932
|
onMousedown: N,
|
|
1874
|
-
onTextBoxValueChange:
|
|
1875
|
-
placeholder:
|
|
1876
|
-
textBoxClass:
|
|
1877
|
-
textBoxTitle:
|
|
1878
|
-
inputGroupStyle:
|
|
1933
|
+
onTextBoxValueChange: U,
|
|
1934
|
+
placeholder: f,
|
|
1935
|
+
textBoxClass: C,
|
|
1936
|
+
textBoxTitle: y,
|
|
1937
|
+
inputGroupStyle: F
|
|
1879
1938
|
};
|
|
1880
1939
|
}
|
|
1881
|
-
function
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1884
|
-
const
|
|
1940
|
+
function Ro(e, t, n, o) {
|
|
1941
|
+
const a = d(e.disabled), s = d(!1), l = d("text"), u = d(e.showBorder), i = d(e.textAlign);
|
|
1942
|
+
x(() => e.editable || !e.readonly);
|
|
1943
|
+
const r = x(() => e.editable && !e.disabled && !e.readonly), p = x(() => !e.disabled && s.value), c = x(() => n.value === "" || n.value === null || n.value === void 0), v = x(() => e.placeholder), b = x(() => e.readonly || !e.editable), f = x(() => e.enableTitle ? n.value : ""), g = x(() => ({
|
|
1885
1944
|
"form-control": !0,
|
|
1886
1945
|
// 'f-utils-fill': true,
|
|
1887
|
-
"text-left":
|
|
1888
|
-
"text-center":
|
|
1889
|
-
"text-right":
|
|
1890
|
-
})),
|
|
1946
|
+
"text-left": i.value === "left",
|
|
1947
|
+
"text-center": i.value === "center",
|
|
1948
|
+
"text-right": i.value === "right"
|
|
1949
|
+
})), y = x(() => ({
|
|
1891
1950
|
"f-cmp-inputgroup": !0,
|
|
1892
1951
|
"input-group": !0,
|
|
1893
1952
|
"f-state-disable": !0,
|
|
1894
1953
|
"f-state-editable": !1,
|
|
1895
1954
|
"f-state-readonly": !0
|
|
1896
1955
|
// 'f-state-focus': hasFocused.value
|
|
1897
|
-
})),
|
|
1956
|
+
})), C = x(() => u.value ? "" : "border-width : 0 ");
|
|
1898
1957
|
return {
|
|
1899
1958
|
// changeTextBoxValue,
|
|
1900
|
-
disabled:
|
|
1901
|
-
displayText:
|
|
1902
|
-
editable:
|
|
1903
|
-
hasFocused:
|
|
1904
|
-
inputGroupClass:
|
|
1905
|
-
inputType:
|
|
1906
|
-
isEmpty:
|
|
1907
|
-
modelValue:
|
|
1908
|
-
readonly:
|
|
1959
|
+
disabled: a,
|
|
1960
|
+
displayText: o,
|
|
1961
|
+
editable: r,
|
|
1962
|
+
hasFocused: p,
|
|
1963
|
+
inputGroupClass: y,
|
|
1964
|
+
inputType: l,
|
|
1965
|
+
isEmpty: c,
|
|
1966
|
+
modelValue: n,
|
|
1967
|
+
readonly: b,
|
|
1909
1968
|
// onBlur,
|
|
1910
1969
|
// onClick,
|
|
1911
1970
|
// onFocus,
|
|
@@ -1914,343 +1973,343 @@ function Zo(e, t, o, r) {
|
|
|
1914
1973
|
// onKeyup,
|
|
1915
1974
|
// onMousedown,
|
|
1916
1975
|
// onTextBoxValueChange,
|
|
1917
|
-
placeholder:
|
|
1918
|
-
textBoxClass:
|
|
1919
|
-
textBoxTitle:
|
|
1920
|
-
inputGroupStyle:
|
|
1976
|
+
placeholder: v,
|
|
1977
|
+
textBoxClass: g,
|
|
1978
|
+
textBoxTitle: f,
|
|
1979
|
+
inputGroupStyle: C
|
|
1921
1980
|
};
|
|
1922
1981
|
}
|
|
1923
|
-
function
|
|
1924
|
-
const
|
|
1925
|
-
function
|
|
1926
|
-
|
|
1982
|
+
function Je(e, t, n) {
|
|
1983
|
+
const o = d(!1), a = x(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: s, displayText: l, hasFocused: u, isEmpty: i } = n;
|
|
1984
|
+
function r(g) {
|
|
1985
|
+
o.value = g;
|
|
1927
1986
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1987
|
+
X(l, () => {
|
|
1988
|
+
u != null && u.value ? r(!!(l != null && l.value)) : r(!1);
|
|
1930
1989
|
});
|
|
1931
|
-
const
|
|
1990
|
+
const p = x(() => ({
|
|
1932
1991
|
"input-group-text": !0,
|
|
1933
1992
|
"input-group-clear": !0
|
|
1934
|
-
})),
|
|
1993
|
+
})), c = x(() => ({
|
|
1935
1994
|
width: "24px",
|
|
1936
|
-
display:
|
|
1995
|
+
display: o.value ? "flex" : "none"
|
|
1937
1996
|
}));
|
|
1938
|
-
function
|
|
1939
|
-
|
|
1997
|
+
function v(g) {
|
|
1998
|
+
g.stopPropagation(), a.value && (s("", !0), r(!o.value), t.emit("clear"));
|
|
1940
1999
|
}
|
|
1941
|
-
function
|
|
1942
|
-
|
|
2000
|
+
function b(g) {
|
|
2001
|
+
a.value && !i.value && r(!0);
|
|
1943
2002
|
}
|
|
1944
|
-
function
|
|
1945
|
-
|
|
2003
|
+
function f(g) {
|
|
2004
|
+
a.value && r(!1);
|
|
1946
2005
|
}
|
|
1947
|
-
return { clearButtonClass:
|
|
2006
|
+
return { clearButtonClass: p, clearButtonStyle: c, hasShownClearButton: o, onClearValue: v, onMouseEnter: b, onMouseLeave: f, shouldShowClearButton: a };
|
|
1948
2007
|
}
|
|
1949
|
-
const
|
|
1950
|
-
function
|
|
2008
|
+
const No = ["moz", "ms", "webkit"];
|
|
2009
|
+
function $o() {
|
|
1951
2010
|
let e = 0;
|
|
1952
2011
|
return (t) => {
|
|
1953
|
-
const
|
|
1954
|
-
t(
|
|
1955
|
-
},
|
|
1956
|
-
return e =
|
|
2012
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), a = setTimeout(() => {
|
|
2013
|
+
t(n + o);
|
|
2014
|
+
}, o);
|
|
2015
|
+
return e = n + o, a;
|
|
1957
2016
|
};
|
|
1958
2017
|
}
|
|
1959
|
-
function
|
|
2018
|
+
function qo() {
|
|
1960
2019
|
if (typeof window > "u")
|
|
1961
2020
|
return () => 0;
|
|
1962
2021
|
if (window.requestAnimationFrame)
|
|
1963
2022
|
return window.requestAnimationFrame.bind(window);
|
|
1964
|
-
const e =
|
|
1965
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
2023
|
+
const e = No.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
2024
|
+
return e ? window[`${e}RequestAnimationFrame`] : $o();
|
|
1966
2025
|
}
|
|
1967
|
-
|
|
1968
|
-
function
|
|
1969
|
-
const
|
|
1970
|
-
return { appendedButtonClass:
|
|
2026
|
+
qo();
|
|
2027
|
+
function Qe(e, t) {
|
|
2028
|
+
const n = d(e.groupText), o = x(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), a = x(() => e.enableClear || !!e.groupText);
|
|
2029
|
+
return { appendedButtonClass: x(() => ({
|
|
1971
2030
|
"input-group-append": !0,
|
|
1972
|
-
"append-force-show":
|
|
1973
|
-
})), appendedContent:
|
|
2031
|
+
"append-force-show": o.value
|
|
2032
|
+
})), appendedContent: n, shouldShowAppendedButton: a };
|
|
1974
2033
|
}
|
|
1975
|
-
function
|
|
1976
|
-
const { appendedContent:
|
|
1977
|
-
|
|
1978
|
-
|
|
2034
|
+
function Ze(e, t, n, o) {
|
|
2035
|
+
const { appendedContent: a } = o, s = d(e.enableViewPassword), l = x(() => e.type === "password"), u = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', i = '<span class="f-icon f-icon-eye"></span>', r = d(!1);
|
|
2036
|
+
X(() => [e.readonly, e.disabled], ([v, b]) => {
|
|
2037
|
+
l.value && (n.value = v || b ? "password" : n.value, a.value = v || b ? i : a.value);
|
|
1979
2038
|
});
|
|
1980
|
-
function d() {
|
|
1981
|
-
return i.value = !i.value, o.value = i.value ? "text" : "password", n.value = i.value ? l : u, !1;
|
|
1982
|
-
}
|
|
1983
2039
|
function p() {
|
|
1984
|
-
|
|
2040
|
+
return r.value = !r.value, n.value = r.value ? "text" : "password", a.value = r.value ? u : i, !1;
|
|
2041
|
+
}
|
|
2042
|
+
function c() {
|
|
2043
|
+
n.value = l.value ? "password" : "text", a.value = l.value ? s.value ? i : "" : a.value;
|
|
1985
2044
|
}
|
|
1986
|
-
return
|
|
2045
|
+
return c(), { isPassword: l, onClickAppendedButton: p };
|
|
1987
2046
|
}
|
|
1988
|
-
function
|
|
1989
|
-
const
|
|
1990
|
-
onBlurTextBox:
|
|
2047
|
+
function Uo(e, t, n) {
|
|
2048
|
+
const o = d(), {
|
|
2049
|
+
onBlurTextBox: a,
|
|
1991
2050
|
onFocusTextBox: s,
|
|
1992
|
-
onInput:
|
|
1993
|
-
onKeyDown:
|
|
1994
|
-
textBoxValue:
|
|
1995
|
-
} =
|
|
2051
|
+
onInput: l,
|
|
2052
|
+
onKeyDown: u,
|
|
2053
|
+
textBoxValue: i
|
|
2054
|
+
} = n, r = x(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), p = x(() => ({
|
|
1996
2055
|
"form-control": !0,
|
|
1997
2056
|
"f-utils-fill": !0
|
|
1998
|
-
})),
|
|
2057
|
+
})), c = x(() => ({
|
|
1999
2058
|
"text-align": e.textAlign
|
|
2000
2059
|
}));
|
|
2001
|
-
function
|
|
2002
|
-
|
|
2060
|
+
function v(g) {
|
|
2061
|
+
g.stopPropagation();
|
|
2003
2062
|
}
|
|
2004
|
-
function
|
|
2063
|
+
function b() {
|
|
2005
2064
|
e.selectOnCreated, e.focusOnCreated;
|
|
2006
2065
|
}
|
|
2007
|
-
async function
|
|
2008
|
-
s(
|
|
2066
|
+
async function f(g) {
|
|
2067
|
+
s(g), await ye, b();
|
|
2009
2068
|
}
|
|
2010
|
-
return
|
|
2011
|
-
await
|
|
2012
|
-
}), () =>
|
|
2013
|
-
ref:
|
|
2014
|
-
class:
|
|
2015
|
-
style:
|
|
2069
|
+
return K(async () => {
|
|
2070
|
+
await ye, b();
|
|
2071
|
+
}), () => m("input", {
|
|
2072
|
+
ref: o,
|
|
2073
|
+
class: p.value,
|
|
2074
|
+
style: c.value,
|
|
2016
2075
|
type: "text",
|
|
2017
|
-
value:
|
|
2076
|
+
value: i.value,
|
|
2018
2077
|
disabled: e.disabled,
|
|
2019
2078
|
readonly: e.readonly || !e.editable,
|
|
2020
|
-
placeholder:
|
|
2021
|
-
onBlur:
|
|
2022
|
-
onChange:
|
|
2023
|
-
onFocus:
|
|
2024
|
-
onInput:
|
|
2025
|
-
onKeydown:
|
|
2079
|
+
placeholder: r.value,
|
|
2080
|
+
onBlur: a,
|
|
2081
|
+
onChange: v,
|
|
2082
|
+
onFocus: f,
|
|
2083
|
+
onInput: l,
|
|
2084
|
+
onKeydown: u
|
|
2026
2085
|
}, null);
|
|
2027
2086
|
}
|
|
2028
|
-
function
|
|
2087
|
+
function zo(e, t, n) {
|
|
2029
2088
|
const {
|
|
2030
|
-
canDownward:
|
|
2031
|
-
canUpward:
|
|
2089
|
+
canDownward: o,
|
|
2090
|
+
canUpward: a,
|
|
2032
2091
|
onClickDownButton: s,
|
|
2033
|
-
onClickUpButton:
|
|
2034
|
-
} =
|
|
2092
|
+
onClickUpButton: l
|
|
2093
|
+
} = n, u = x(() => ({
|
|
2035
2094
|
"input-group-append": !0,
|
|
2036
2095
|
"btn-group": !0,
|
|
2037
2096
|
"btn-group-number": !0
|
|
2038
|
-
})),
|
|
2097
|
+
})), i = x(() => ({
|
|
2039
2098
|
btn: !0,
|
|
2040
2099
|
"btn-secondary": !0,
|
|
2041
2100
|
"btn-number-flag": !0
|
|
2042
|
-
})),
|
|
2043
|
-
cursor:
|
|
2101
|
+
})), r = x(() => ({
|
|
2102
|
+
cursor: a() ? "pointer" : "not-allowed",
|
|
2044
2103
|
"margin-left": 0
|
|
2045
|
-
})),
|
|
2046
|
-
cursor:
|
|
2104
|
+
})), p = x(() => ({
|
|
2105
|
+
cursor: o() ? "pointer" : "not-allowed",
|
|
2047
2106
|
"margin-left": 0
|
|
2048
2107
|
}));
|
|
2049
|
-
return () =>
|
|
2050
|
-
class:
|
|
2051
|
-
}, [
|
|
2108
|
+
return () => m("div", {
|
|
2109
|
+
class: u.value
|
|
2110
|
+
}, [m("button", {
|
|
2052
2111
|
title: "upButton",
|
|
2053
|
-
class:
|
|
2054
|
-
style:
|
|
2055
|
-
onClick:
|
|
2056
|
-
disabled: !
|
|
2057
|
-
}, [
|
|
2112
|
+
class: i.value,
|
|
2113
|
+
style: r.value,
|
|
2114
|
+
onClick: l,
|
|
2115
|
+
disabled: !a()
|
|
2116
|
+
}, [m("span", {
|
|
2058
2117
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
2059
|
-
}, null)]),
|
|
2118
|
+
}, null)]), m("button", {
|
|
2060
2119
|
title: "downButton",
|
|
2061
|
-
class:
|
|
2062
|
-
style:
|
|
2120
|
+
class: i.value,
|
|
2121
|
+
style: p.value,
|
|
2063
2122
|
onClick: s,
|
|
2064
|
-
disabled: !
|
|
2065
|
-
}, [
|
|
2123
|
+
disabled: !o()
|
|
2124
|
+
}, [m("span", {
|
|
2066
2125
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
2067
2126
|
}, null)])]);
|
|
2068
2127
|
}
|
|
2069
|
-
function
|
|
2070
|
-
const
|
|
2071
|
-
displayValue:
|
|
2072
|
-
modelValue:
|
|
2073
|
-
getRealValue:
|
|
2074
|
-
} =
|
|
2075
|
-
format:
|
|
2076
|
-
} =
|
|
2077
|
-
isFocus:
|
|
2078
|
-
} = s,
|
|
2079
|
-
return
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2082
|
-
}),
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
}),
|
|
2086
|
-
|
|
2087
|
-
}),
|
|
2088
|
-
|
|
2089
|
-
}), () =>
|
|
2128
|
+
function Ho(e, t) {
|
|
2129
|
+
const n = Pt(e, t), o = jt(e, t, n), a = It(e, t, o, n), s = Lt(e, t, o, n, a), l = zo(e, t, a), {
|
|
2130
|
+
displayValue: u,
|
|
2131
|
+
modelValue: i,
|
|
2132
|
+
getRealValue: r
|
|
2133
|
+
} = n, p = Uo(e, t, s), {
|
|
2134
|
+
format: c
|
|
2135
|
+
} = o, {
|
|
2136
|
+
isFocus: v
|
|
2137
|
+
} = s, b = x(() => !e.disabled && !e.readonly);
|
|
2138
|
+
return K(() => {
|
|
2139
|
+
const f = r(e.modelValue);
|
|
2140
|
+
u.value = c(f);
|
|
2141
|
+
}), X(() => [e.value], ([f]) => {
|
|
2142
|
+
const g = r(f);
|
|
2143
|
+
i.value = g, u.value = c(g);
|
|
2144
|
+
}), X(() => [e.modelValue], ([f]) => {
|
|
2145
|
+
f !== i.value && (i.value = f, !v.value && (u.value = c(r(f))));
|
|
2146
|
+
}), X(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
2147
|
+
u.value = c(i.value);
|
|
2148
|
+
}), () => m("div", {
|
|
2090
2149
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
2091
|
-
}, [
|
|
2092
|
-
}
|
|
2093
|
-
function
|
|
2094
|
-
const
|
|
2095
|
-
isPassword:
|
|
2096
|
-
} =
|
|
2097
|
-
disabled:
|
|
2098
|
-
displayText:
|
|
2099
|
-
inputType:
|
|
2100
|
-
onBlur:
|
|
2101
|
-
onFocus:
|
|
2102
|
-
onInput:
|
|
2103
|
-
onClick:
|
|
2104
|
-
onKeydown:
|
|
2105
|
-
onKeyup:
|
|
2106
|
-
onMousedown:
|
|
2107
|
-
onTextBoxValueChange:
|
|
2108
|
-
readonly:
|
|
2109
|
-
placeholder:
|
|
2110
|
-
textBoxClass:
|
|
2111
|
-
textBoxTitle:
|
|
2112
|
-
} =
|
|
2113
|
-
return
|
|
2150
|
+
}, [p(), b.value && l()]);
|
|
2151
|
+
}
|
|
2152
|
+
function Go(e, t, n, o) {
|
|
2153
|
+
const a = d(), s = d(e.autocomplete), l = d(e.enableTitle), {
|
|
2154
|
+
isPassword: u
|
|
2155
|
+
} = n, i = d(e.minLength), r = d(e.maxLength), p = d(e.tabIndex), {
|
|
2156
|
+
disabled: c,
|
|
2157
|
+
displayText: v,
|
|
2158
|
+
inputType: b,
|
|
2159
|
+
onBlur: f,
|
|
2160
|
+
onFocus: g,
|
|
2161
|
+
onInput: y,
|
|
2162
|
+
onClick: C,
|
|
2163
|
+
onKeydown: h,
|
|
2164
|
+
onKeyup: F,
|
|
2165
|
+
onMousedown: k,
|
|
2166
|
+
onTextBoxValueChange: R,
|
|
2167
|
+
readonly: T,
|
|
2168
|
+
placeholder: w,
|
|
2169
|
+
textBoxClass: A,
|
|
2170
|
+
textBoxTitle: E
|
|
2171
|
+
} = o;
|
|
2172
|
+
return K(() => {
|
|
2114
2173
|
e.selectOnCreated, e.focusOnCreated;
|
|
2115
|
-
}), () =>
|
|
2116
|
-
ref:
|
|
2174
|
+
}), () => m("input", {
|
|
2175
|
+
ref: a,
|
|
2117
2176
|
name: "input-group-value",
|
|
2118
2177
|
autocomplete: s.value,
|
|
2119
|
-
class:
|
|
2120
|
-
disabled:
|
|
2121
|
-
maxlength:
|
|
2122
|
-
minlength:
|
|
2123
|
-
placeholder:
|
|
2124
|
-
readonly:
|
|
2125
|
-
tabindex:
|
|
2126
|
-
title:
|
|
2127
|
-
type:
|
|
2128
|
-
value:
|
|
2129
|
-
onBlur:
|
|
2130
|
-
onClick:
|
|
2131
|
-
onChange:
|
|
2132
|
-
onFocus:
|
|
2133
|
-
onInput:
|
|
2134
|
-
onKeydown:
|
|
2135
|
-
onKeyup:
|
|
2136
|
-
onMousedown:
|
|
2178
|
+
class: A.value,
|
|
2179
|
+
disabled: c == null ? void 0 : c.value,
|
|
2180
|
+
maxlength: r.value,
|
|
2181
|
+
minlength: i.value,
|
|
2182
|
+
placeholder: w.value,
|
|
2183
|
+
readonly: T == null ? void 0 : T.value,
|
|
2184
|
+
tabindex: p.value,
|
|
2185
|
+
title: l.value && !u.value ? E.value : "",
|
|
2186
|
+
type: b.value,
|
|
2187
|
+
value: v == null ? void 0 : v.value,
|
|
2188
|
+
onBlur: f,
|
|
2189
|
+
onClick: C,
|
|
2190
|
+
onChange: R,
|
|
2191
|
+
onFocus: g,
|
|
2192
|
+
onInput: y,
|
|
2193
|
+
onKeydown: h,
|
|
2194
|
+
onKeyup: F,
|
|
2195
|
+
onMousedown: k
|
|
2137
2196
|
}, null);
|
|
2138
2197
|
}
|
|
2139
|
-
function
|
|
2140
|
-
const
|
|
2198
|
+
function Wo(e, t) {
|
|
2199
|
+
const n = x(() => e.useExtendInfo && !!e.extendInfo), o = te({
|
|
2141
2200
|
content: e.extendInfo
|
|
2142
2201
|
});
|
|
2143
|
-
function
|
|
2202
|
+
function a() {
|
|
2144
2203
|
t.emit("updateExtendInfo");
|
|
2145
2204
|
}
|
|
2146
|
-
return () =>
|
|
2205
|
+
return () => n.value && bt(m("span", {
|
|
2147
2206
|
class: "input-group-before-tips",
|
|
2148
|
-
onMouseenter:
|
|
2149
|
-
}, [
|
|
2207
|
+
onMouseenter: a
|
|
2208
|
+
}, [m("i", {
|
|
2150
2209
|
class: "f-icon f-icon-info-circle"
|
|
2151
|
-
}, null),
|
|
2210
|
+
}, null), m("b", {
|
|
2152
2211
|
class: "tips-arrow"
|
|
2153
|
-
}, null)]), [[
|
|
2212
|
+
}, null)]), [[Ct("tooltip"), o]]);
|
|
2154
2213
|
}
|
|
2155
|
-
function
|
|
2214
|
+
function _e(e, t, n, o, a) {
|
|
2156
2215
|
const {
|
|
2157
2216
|
appendedButtonClass: s,
|
|
2158
|
-
appendedContent:
|
|
2159
|
-
} =
|
|
2160
|
-
clearButtonClass:
|
|
2161
|
-
clearButtonStyle:
|
|
2162
|
-
onClearValue:
|
|
2163
|
-
shouldShowClearButton:
|
|
2164
|
-
} =
|
|
2165
|
-
function
|
|
2166
|
-
return
|
|
2217
|
+
appendedContent: l
|
|
2218
|
+
} = n, u = x(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), i = x(() => l.value && !t.slots.groupTextTemplate), r = x(() => !!t.slots.groupTextTemplate), {
|
|
2219
|
+
clearButtonClass: p,
|
|
2220
|
+
clearButtonStyle: c,
|
|
2221
|
+
onClearValue: v,
|
|
2222
|
+
shouldShowClearButton: b
|
|
2223
|
+
} = o;
|
|
2224
|
+
function f() {
|
|
2225
|
+
return m("span", {
|
|
2167
2226
|
id: "clearIcon",
|
|
2168
|
-
class:
|
|
2169
|
-
style:
|
|
2170
|
-
onClick: (
|
|
2171
|
-
}, [
|
|
2227
|
+
class: p.value,
|
|
2228
|
+
style: c.value,
|
|
2229
|
+
onClick: (w) => v(w)
|
|
2230
|
+
}, [m("i", {
|
|
2172
2231
|
class: "f-icon modal_close"
|
|
2173
2232
|
}, null)]);
|
|
2174
2233
|
}
|
|
2175
|
-
function
|
|
2176
|
-
t.emit("iconMouseEnter",
|
|
2234
|
+
function g(w) {
|
|
2235
|
+
t.emit("iconMouseEnter", w);
|
|
2177
2236
|
}
|
|
2178
|
-
function
|
|
2179
|
-
t.emit("iconMouseLeave",
|
|
2237
|
+
function y(w) {
|
|
2238
|
+
t.emit("iconMouseLeave", w);
|
|
2180
2239
|
}
|
|
2181
|
-
function
|
|
2182
|
-
|
|
2183
|
-
originalEvent:
|
|
2184
|
-
}),
|
|
2240
|
+
function C(w) {
|
|
2241
|
+
u.value && t.emit("clickHandle", {
|
|
2242
|
+
originalEvent: w
|
|
2243
|
+
}), w.stopPropagation();
|
|
2185
2244
|
}
|
|
2186
|
-
const
|
|
2187
|
-
function
|
|
2188
|
-
return
|
|
2245
|
+
const h = e.type === "password" ? a.onClickAppendedButton : C;
|
|
2246
|
+
function F() {
|
|
2247
|
+
return m("span", {
|
|
2189
2248
|
class: "input-group-text",
|
|
2190
|
-
onMouseenter: (
|
|
2191
|
-
onMouseleave: (
|
|
2192
|
-
innerHTML:
|
|
2193
|
-
onClick: (
|
|
2249
|
+
onMouseenter: (w) => g(w),
|
|
2250
|
+
onMouseleave: (w) => y(w),
|
|
2251
|
+
innerHTML: l.value,
|
|
2252
|
+
onClick: (w) => h(w)
|
|
2194
2253
|
}, null);
|
|
2195
2254
|
}
|
|
2196
|
-
function
|
|
2255
|
+
function k() {
|
|
2197
2256
|
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
|
|
2198
2257
|
}
|
|
2199
|
-
function
|
|
2200
|
-
return
|
|
2258
|
+
function R() {
|
|
2259
|
+
return i.value ? F : r.value ? k : "";
|
|
2201
2260
|
}
|
|
2202
|
-
const
|
|
2203
|
-
return () =>
|
|
2261
|
+
const T = R();
|
|
2262
|
+
return () => m("div", {
|
|
2204
2263
|
class: s.value
|
|
2205
|
-
}, [
|
|
2264
|
+
}, [b.value && f(), T && T()]);
|
|
2206
2265
|
}
|
|
2207
|
-
const
|
|
2266
|
+
const Xo = /* @__PURE__ */ Z({
|
|
2208
2267
|
name: "FInputGroup",
|
|
2209
|
-
props:
|
|
2268
|
+
props: Ie,
|
|
2210
2269
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
2211
2270
|
setup(e, t) {
|
|
2212
|
-
const
|
|
2271
|
+
const n = d(e.modelValue), o = d(e.modelValue), a = Vo(e, t, n, o), {
|
|
2213
2272
|
inputGroupClass: s,
|
|
2214
|
-
inputType:
|
|
2215
|
-
inputGroupStyle:
|
|
2216
|
-
} =
|
|
2217
|
-
shouldShowAppendedButton:
|
|
2218
|
-
} =
|
|
2219
|
-
onMouseEnter:
|
|
2220
|
-
onMouseLeave:
|
|
2221
|
-
} =
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
}),
|
|
2225
|
-
|
|
2226
|
-
}),
|
|
2227
|
-
e.value && (
|
|
2273
|
+
inputType: l,
|
|
2274
|
+
inputGroupStyle: u
|
|
2275
|
+
} = a, i = Qe(e), {
|
|
2276
|
+
shouldShowAppendedButton: r
|
|
2277
|
+
} = i, p = Je(e, t, a), {
|
|
2278
|
+
onMouseEnter: c,
|
|
2279
|
+
onMouseLeave: v
|
|
2280
|
+
} = p, b = Ze(e, t, l, i), f = Ho(e, t), g = Go(e, t, b, a), y = _e(e, t, i, p, b), C = Wo(e, t), h = x(() => e.type === "number");
|
|
2281
|
+
X(() => [e.value], ([k]) => {
|
|
2282
|
+
n.value = k, o.value = k;
|
|
2283
|
+
}), X(() => [e.modelValue], ([k]) => {
|
|
2284
|
+
n.value = k, o.value = k;
|
|
2285
|
+
}), K(() => {
|
|
2286
|
+
e.value && (n.value = e.value, o.value = e.value);
|
|
2228
2287
|
});
|
|
2229
|
-
const
|
|
2230
|
-
id:
|
|
2288
|
+
const F = () => m(ce, null, [m("div", {
|
|
2289
|
+
id: e.id,
|
|
2231
2290
|
class: s.value,
|
|
2232
|
-
style:
|
|
2233
|
-
onMouseenter:
|
|
2234
|
-
onMouseleave:
|
|
2235
|
-
}, [
|
|
2236
|
-
return () =>
|
|
2237
|
-
}
|
|
2238
|
-
}),
|
|
2239
|
-
let
|
|
2240
|
-
function
|
|
2241
|
-
|
|
2242
|
-
}
|
|
2243
|
-
function
|
|
2244
|
-
|
|
2245
|
-
function e(
|
|
2246
|
-
const
|
|
2247
|
-
return
|
|
2291
|
+
style: u.value,
|
|
2292
|
+
onMouseenter: c,
|
|
2293
|
+
onMouseleave: v
|
|
2294
|
+
}, [h.value ? f() : m(ce, null, [C(), g(), r.value && y()])])]);
|
|
2295
|
+
return () => F();
|
|
2296
|
+
}
|
|
2297
|
+
}), P = {}, j = {}, I = {}, L = {};
|
|
2298
|
+
let Ne = !1;
|
|
2299
|
+
function Yo() {
|
|
2300
|
+
Ne || (Ne = !0, Dt.register(P, j, I, L), At.register(P, j, I, L), Ot.register(P, j, I, L), Vt.register(P, j, I, L), Rt.register(P, j, I, L), Nt.register(P, j, I, L), $t.register(P, j, I, L), ie.register(P, j, I, L), qt.register(P, j, I, L), Ut.register(P, j, I, L), Ht.register(P, j, I, L), zt.register(P, j, I, L), Gt.register(P, j, I, L), Wt.register(P, j, I, L), Xt.register(P, j, I, L), Yt.register(P, j, I, L), Jt.register(P, j, I, L), Qt.register(P, j, I, L), Zt.register(P, j, I, L), _t.register(P, j, I, L), Kt.register(P, j, I, L), en.register(P, j, I, L), nn.register(P, j, I, L), tn.register(P, j, I, L), on.register(P, j, I, L), an.register(P, j, I, L), rn.register(P, j, I, L), sn.register(P, j, I, L), St.register(P, j, I, L), ln.register(P, j, I, L), un.register(P, j, I, L), cn.register(P, j, I, L), dn.register(P, j, I, L), pn.register(P, j, I, L), fn.register(P, j, I, L), mn.register(P, j, I, L), vn.register(P, j, I, L), yn.register(P, j, I, L), hn.register(P, j, I, L), gn.register(P, j, I, L), On.register(P, j, I), bn.register(P, j, I, L), Cn.register(P, j, I, L), wn.register(P, j, I, L), xn.register(P, j, I, L), Tn.register(P, j, I, L), Bn.register(P, j, I, L), Mn.register(P, j, I, L), Fn.register(P, j, I, L), kn.register(P, j, I, L), En.register(P, j, I, L), Sn.register(P, j, I, L), Pn.register(P, j, I, L), In.register(P, j, I, L), jn.register(P, j, I, L), Ln.register(P, j, I, L), An.register(P, j, I, L), Dn.register(P, j, I, L), Vn.register(P, j, I, L));
|
|
2301
|
+
}
|
|
2302
|
+
function Ke() {
|
|
2303
|
+
Yo();
|
|
2304
|
+
function e(a, s) {
|
|
2305
|
+
const l = j[a];
|
|
2306
|
+
return l ? l(s) : {};
|
|
2248
2307
|
}
|
|
2249
|
-
function t(
|
|
2250
|
-
return
|
|
2308
|
+
function t(a) {
|
|
2309
|
+
return P[a] || Xo;
|
|
2251
2310
|
}
|
|
2252
|
-
function
|
|
2253
|
-
switch (
|
|
2311
|
+
function n(a) {
|
|
2312
|
+
switch (a) {
|
|
2254
2313
|
case "check-box":
|
|
2255
2314
|
return "onChangeValue";
|
|
2256
2315
|
case "switch":
|
|
@@ -2281,7 +2340,7 @@ function xe() {
|
|
|
2281
2340
|
case "input-group":
|
|
2282
2341
|
return "onChange";
|
|
2283
2342
|
case "lookup":
|
|
2284
|
-
return "";
|
|
2343
|
+
return "onUpdate:modelValue";
|
|
2285
2344
|
case "number-range":
|
|
2286
2345
|
return "onValueChange";
|
|
2287
2346
|
case "number-spinner":
|
|
@@ -2296,6 +2355,8 @@ function xe() {
|
|
|
2296
2355
|
return "onSavedCommandListChanged";
|
|
2297
2356
|
case "grid-field-editor":
|
|
2298
2357
|
return "onChange";
|
|
2358
|
+
case "response-form-layout-setting":
|
|
2359
|
+
return "onChange";
|
|
2299
2360
|
case "field-selector":
|
|
2300
2361
|
return "onFieldSelected";
|
|
2301
2362
|
case "schema-selector":
|
|
@@ -2306,139 +2367,139 @@ function xe() {
|
|
|
2306
2367
|
return "onValueChange";
|
|
2307
2368
|
}
|
|
2308
2369
|
}
|
|
2309
|
-
function
|
|
2310
|
-
switch (
|
|
2370
|
+
function o(a) {
|
|
2371
|
+
switch (a) {
|
|
2311
2372
|
case "combo-list":
|
|
2312
2373
|
case "input-group":
|
|
2313
2374
|
case "textarea":
|
|
2314
2375
|
return "onClear";
|
|
2315
2376
|
}
|
|
2316
2377
|
}
|
|
2317
|
-
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName:
|
|
2378
|
+
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: n, getClearFunctionName: o };
|
|
2318
2379
|
}
|
|
2319
|
-
const
|
|
2380
|
+
const Fe = /* @__PURE__ */ Z({
|
|
2320
2381
|
name: "FDynamicFormGroup",
|
|
2321
|
-
props:
|
|
2382
|
+
props: pe,
|
|
2322
2383
|
emits: ["change", "update:modelValue"],
|
|
2323
2384
|
setup(e, t) {
|
|
2324
|
-
const
|
|
2325
|
-
|
|
2326
|
-
const
|
|
2327
|
-
resolveEditorProps:
|
|
2328
|
-
resolveEditorType:
|
|
2329
|
-
getChangeFunctionName:
|
|
2330
|
-
getClearFunctionName:
|
|
2331
|
-
} =
|
|
2385
|
+
const n = d(e.id), o = d(e.customClass), a = d(e.editor), s = d(e.label), l = d(e.modelValue), u = d(e.readonly), i = d(e.required), r = d(e.showLabel), p = d(e.visible);
|
|
2386
|
+
d(e.type);
|
|
2387
|
+
const c = d(), {
|
|
2388
|
+
resolveEditorProps: v,
|
|
2389
|
+
resolveEditorType: b,
|
|
2390
|
+
getChangeFunctionName: f,
|
|
2391
|
+
getClearFunctionName: g
|
|
2392
|
+
} = Ke(), y = x(() => ({
|
|
2332
2393
|
"form-group": !0,
|
|
2333
2394
|
"farris-form-group": !0,
|
|
2334
2395
|
"common-group": !0,
|
|
2335
|
-
"q-state-readonly":
|
|
2396
|
+
"q-state-readonly": u.value
|
|
2336
2397
|
}));
|
|
2337
|
-
function
|
|
2338
|
-
|
|
2398
|
+
function C(k, R) {
|
|
2399
|
+
l.value = R !== void 0 ? R : k, t.emit("update:modelValue", l.value), t.emit("change", l.value);
|
|
2339
2400
|
}
|
|
2340
|
-
function
|
|
2401
|
+
function h() {
|
|
2341
2402
|
t.emit("update:modelValue", "");
|
|
2342
2403
|
}
|
|
2343
|
-
const
|
|
2344
|
-
const
|
|
2345
|
-
return
|
|
2346
|
-
ref:
|
|
2347
|
-
},
|
|
2348
|
-
modelValue:
|
|
2349
|
-
"onUpdate:modelValue": (
|
|
2404
|
+
const F = x(() => {
|
|
2405
|
+
const k = a.value.type || "input-group", R = b(k), T = v(k, a.value), w = f(k), A = g(a.value.type);
|
|
2406
|
+
return T[w] = C, T[A] = h, (T.id == null || T.id === "") && (T.id = n.value), () => m(R, ae({
|
|
2407
|
+
ref: c
|
|
2408
|
+
}, T, {
|
|
2409
|
+
modelValue: l.value,
|
|
2410
|
+
"onUpdate:modelValue": (E) => l.value = E
|
|
2350
2411
|
}), null);
|
|
2351
2412
|
});
|
|
2352
|
-
return
|
|
2353
|
-
|
|
2413
|
+
return X([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([k, R, T, w, A, E, O, N, U]) => {
|
|
2414
|
+
n.value = k, o.value = R, a.value = T, s.value = w, l.value = A, u.value = E, i.value = O, r.value = N, p.value = U;
|
|
2354
2415
|
}), t.expose({
|
|
2355
|
-
editorRef:
|
|
2356
|
-
}), () =>
|
|
2357
|
-
id: `${
|
|
2358
|
-
class:
|
|
2359
|
-
}, [
|
|
2416
|
+
editorRef: c
|
|
2417
|
+
}), () => p.value && m("div", {
|
|
2418
|
+
id: `${n.value}-input-group`,
|
|
2419
|
+
class: o.value
|
|
2420
|
+
}, [m("div", {
|
|
2360
2421
|
class: "farris-group-wrap"
|
|
2361
|
-
}, [
|
|
2362
|
-
class:
|
|
2363
|
-
}, [
|
|
2364
|
-
id: `${
|
|
2365
|
-
required:
|
|
2422
|
+
}, [m("div", {
|
|
2423
|
+
class: y.value
|
|
2424
|
+
}, [r.value && m(Ye, {
|
|
2425
|
+
id: `${n.value}-lable`,
|
|
2426
|
+
required: i.value,
|
|
2366
2427
|
text: s.value,
|
|
2367
2428
|
title: s.value
|
|
2368
|
-
}, null),
|
|
2429
|
+
}, null), m("div", {
|
|
2369
2430
|
class: "farris-input-wrap"
|
|
2370
|
-
}, [
|
|
2431
|
+
}, [F.value()])])])]);
|
|
2371
2432
|
}
|
|
2372
|
-
}),
|
|
2373
|
-
function
|
|
2433
|
+
}), Jo = {}, Qo = {};
|
|
2434
|
+
function Zo(e, t) {
|
|
2374
2435
|
e.schema;
|
|
2375
|
-
const
|
|
2376
|
-
function
|
|
2436
|
+
const n = d(!0), o = d(!0);
|
|
2437
|
+
function a(c) {
|
|
2377
2438
|
return !1;
|
|
2378
2439
|
}
|
|
2379
2440
|
function s() {
|
|
2380
2441
|
return !1;
|
|
2381
2442
|
}
|
|
2382
|
-
function
|
|
2443
|
+
function l() {
|
|
2383
2444
|
return !1;
|
|
2384
2445
|
}
|
|
2385
|
-
function
|
|
2446
|
+
function u() {
|
|
2386
2447
|
return !0;
|
|
2387
2448
|
}
|
|
2388
|
-
function
|
|
2449
|
+
function i(c) {
|
|
2389
2450
|
}
|
|
2390
|
-
function
|
|
2451
|
+
function r() {
|
|
2391
2452
|
}
|
|
2392
|
-
function
|
|
2453
|
+
function p(c) {
|
|
2393
2454
|
return null;
|
|
2394
2455
|
}
|
|
2395
2456
|
return {
|
|
2396
|
-
canAccepts:
|
|
2457
|
+
canAccepts: a,
|
|
2397
2458
|
checkCanDeleteComponent: s,
|
|
2398
|
-
checkCanMoveComponent:
|
|
2399
|
-
hideNestedPaddingInDesginerView:
|
|
2400
|
-
onAcceptMovedChildElement:
|
|
2401
|
-
resolveComponentContext:
|
|
2402
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2403
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2404
|
-
getPropsConfig:
|
|
2459
|
+
checkCanMoveComponent: l,
|
|
2460
|
+
hideNestedPaddingInDesginerView: u,
|
|
2461
|
+
onAcceptMovedChildElement: i,
|
|
2462
|
+
resolveComponentContext: r,
|
|
2463
|
+
triggerBelongedComponentToMoveWhenMoved: n,
|
|
2464
|
+
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
2465
|
+
getPropsConfig: p
|
|
2405
2466
|
};
|
|
2406
2467
|
}
|
|
2407
|
-
class
|
|
2408
|
-
constructor(t,
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2468
|
+
class _o {
|
|
2469
|
+
constructor(t, n) {
|
|
2470
|
+
G(this, "componentId");
|
|
2471
|
+
G(this, "viewModelId");
|
|
2472
|
+
G(this, "eventsEditorUtils");
|
|
2473
|
+
G(this, "formSchemaUtils");
|
|
2474
|
+
G(this, "formMetadataConverter");
|
|
2475
|
+
G(this, "designViewModelUtils");
|
|
2476
|
+
G(this, "designViewModelField");
|
|
2477
|
+
G(this, "controlCreatorUtils");
|
|
2478
|
+
G(this, "designerHostService");
|
|
2479
|
+
G(this, "schemaService", null);
|
|
2480
|
+
G(this, "metadataService", null);
|
|
2481
|
+
G(this, "propertyConfig", {
|
|
2421
2482
|
type: "object",
|
|
2422
2483
|
categories: {}
|
|
2423
2484
|
});
|
|
2424
|
-
var
|
|
2425
|
-
this.componentId = t, this.designerHostService =
|
|
2485
|
+
var o;
|
|
2486
|
+
this.componentId = t, 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(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
2426
2487
|
}
|
|
2427
2488
|
getTableInfo() {
|
|
2428
2489
|
var t;
|
|
2429
2490
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
2430
2491
|
}
|
|
2431
2492
|
setDesignViewModelField(t) {
|
|
2432
|
-
const
|
|
2433
|
-
if (
|
|
2493
|
+
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
2494
|
+
if (n) {
|
|
2434
2495
|
if (!this.designViewModelField) {
|
|
2435
|
-
const
|
|
2436
|
-
this.designViewModelField =
|
|
2496
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
2497
|
+
this.designViewModelField = o.fields.find((a) => a.id === n);
|
|
2437
2498
|
}
|
|
2438
2499
|
t.updateOn = this.designViewModelField.updateOn;
|
|
2439
2500
|
}
|
|
2440
2501
|
}
|
|
2441
|
-
changeFieldEditorType(t,
|
|
2502
|
+
changeFieldEditorType(t, n) {
|
|
2442
2503
|
}
|
|
2443
2504
|
getBasicPropConfig(t) {
|
|
2444
2505
|
return {
|
|
@@ -2459,7 +2520,7 @@ class pn {
|
|
|
2459
2520
|
type: "combo-list",
|
|
2460
2521
|
textField: "name",
|
|
2461
2522
|
valueField: "value",
|
|
2462
|
-
data: [{ value: t.type, name:
|
|
2523
|
+
data: [{ value: t.type, name: V[t.type].name }]
|
|
2463
2524
|
}
|
|
2464
2525
|
}
|
|
2465
2526
|
}
|
|
@@ -2485,23 +2546,36 @@ class pn {
|
|
|
2485
2546
|
}
|
|
2486
2547
|
};
|
|
2487
2548
|
}
|
|
2549
|
+
/**
|
|
2550
|
+
*
|
|
2551
|
+
* @param propertyId
|
|
2552
|
+
* @param componentInstance
|
|
2553
|
+
* @returns
|
|
2554
|
+
*/
|
|
2555
|
+
updateElementByParentContainer(t, n) {
|
|
2556
|
+
const o = n && n.parent && n.parent.schema;
|
|
2557
|
+
if (!o)
|
|
2558
|
+
return;
|
|
2559
|
+
const a = o.contents.findIndex((l) => l.id === t), s = Ee(o.contents[a]);
|
|
2560
|
+
o.contents.splice(a, 1), o.contents.splice(a, 0, s);
|
|
2561
|
+
}
|
|
2488
2562
|
}
|
|
2489
|
-
const
|
|
2563
|
+
const oe = class oe {
|
|
2490
2564
|
/**
|
|
2491
2565
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2492
2566
|
*/
|
|
2493
2567
|
static getEditorTypesByMDataType(t) {
|
|
2494
|
-
const
|
|
2495
|
-
return
|
|
2568
|
+
const n = oe.fieldControlTypeMapping[t];
|
|
2569
|
+
return n || [{ key: "", value: "" }];
|
|
2496
2570
|
}
|
|
2497
2571
|
/**
|
|
2498
2572
|
* 获取所有输入类控件
|
|
2499
2573
|
*/
|
|
2500
2574
|
static getAllInputTypes() {
|
|
2501
2575
|
const t = [];
|
|
2502
|
-
for (let
|
|
2503
|
-
|
|
2504
|
-
t.find((
|
|
2576
|
+
for (let n in oe.fieldControlTypeMapping)
|
|
2577
|
+
oe.fieldControlTypeMapping[n].forEach((o) => {
|
|
2578
|
+
t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
2505
2579
|
});
|
|
2506
2580
|
return t;
|
|
2507
2581
|
}
|
|
@@ -2509,66 +2583,68 @@ const H = class H {
|
|
|
2509
2583
|
/**
|
|
2510
2584
|
* <字段类型,可配置的控件类型列表>的映射
|
|
2511
2585
|
*/
|
|
2512
|
-
|
|
2586
|
+
G(oe, "fieldControlTypeMapping", {
|
|
2513
2587
|
String: [
|
|
2514
|
-
{ key:
|
|
2515
|
-
{ key:
|
|
2516
|
-
{ key:
|
|
2517
|
-
{ key:
|
|
2518
|
-
{ key:
|
|
2519
|
-
{ key:
|
|
2520
|
-
{ key:
|
|
2588
|
+
{ key: V["input-group"].type, value: V["input-group"].name },
|
|
2589
|
+
{ key: V.lookup.type, value: V.lookup.name },
|
|
2590
|
+
{ key: V["date-picker"].type, value: V["date-picker"].name },
|
|
2591
|
+
{ key: V["check-box"].type, value: V["check-box"].name },
|
|
2592
|
+
{ key: V["radio-group"].type, value: V["radio-group"].name },
|
|
2593
|
+
{ key: V["combo-list"].type, value: V["combo-list"].name },
|
|
2594
|
+
{ key: V.textarea.type, value: V.textarea.name }
|
|
2521
2595
|
],
|
|
2522
2596
|
Text: [
|
|
2523
|
-
{ key:
|
|
2524
|
-
{ key:
|
|
2597
|
+
{ key: V.textarea.type, value: V.textarea.name },
|
|
2598
|
+
{ key: V.lookup.type, value: V.lookup.name }
|
|
2525
2599
|
],
|
|
2526
2600
|
Decimal: [
|
|
2527
|
-
{ key:
|
|
2601
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2528
2602
|
],
|
|
2529
2603
|
Integer: [
|
|
2530
|
-
{ key:
|
|
2604
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2531
2605
|
],
|
|
2532
2606
|
Number: [
|
|
2533
|
-
{ key:
|
|
2607
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2534
2608
|
],
|
|
2535
2609
|
BigNumber: [
|
|
2536
|
-
{ key:
|
|
2610
|
+
{ key: V["number-spinner"].type, value: V["number-spinner"].name }
|
|
2537
2611
|
],
|
|
2538
2612
|
Date: [
|
|
2539
|
-
{ key:
|
|
2613
|
+
{ key: V["date-picker"].type, value: V["date-picker"].name }
|
|
2540
2614
|
],
|
|
2541
2615
|
DateTime: [
|
|
2542
|
-
{ key:
|
|
2616
|
+
{ key: V["date-picker"].type, value: V["date-picker"].name }
|
|
2543
2617
|
],
|
|
2544
2618
|
Boolean: [
|
|
2545
|
-
{ key:
|
|
2546
|
-
{ key:
|
|
2619
|
+
{ key: V.switch.type, value: V.switch.name },
|
|
2620
|
+
{ key: V["check-box"].type, value: V["check-box"].name }
|
|
2547
2621
|
],
|
|
2548
2622
|
Enum: [
|
|
2549
|
-
{ key:
|
|
2550
|
-
{ key:
|
|
2623
|
+
{ key: V["combo-list"].type, value: V["combo-list"].name },
|
|
2624
|
+
{ key: V["radio-group"].type, value: V["radio-group"].name }
|
|
2551
2625
|
],
|
|
2552
2626
|
Object: [
|
|
2553
|
-
{ key:
|
|
2554
|
-
{ key:
|
|
2555
|
-
{ key:
|
|
2627
|
+
{ key: V.lookup.type, value: V.lookup.name },
|
|
2628
|
+
{ key: V["combo-list"].type, value: V["combo-list"].name },
|
|
2629
|
+
{ key: V["radio-group"].type, value: V["radio-group"].name }
|
|
2556
2630
|
]
|
|
2557
2631
|
});
|
|
2558
|
-
let
|
|
2559
|
-
const
|
|
2560
|
-
class
|
|
2561
|
-
constructor(
|
|
2562
|
-
super(
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2632
|
+
let he = oe;
|
|
2633
|
+
const Ko = d(0);
|
|
2634
|
+
class ea extends _o {
|
|
2635
|
+
constructor(n, o) {
|
|
2636
|
+
super(n, o);
|
|
2637
|
+
G(this, "responseLayoutEditorFunction");
|
|
2638
|
+
this.responseLayoutEditorFunction = qe(this.formSchemaUtils);
|
|
2639
|
+
}
|
|
2640
|
+
getPropertyConfig(n, o) {
|
|
2641
|
+
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;
|
|
2642
|
+
}
|
|
2643
|
+
getBasicProperties(n, o) {
|
|
2644
|
+
var u;
|
|
2645
|
+
var a = this;
|
|
2646
|
+
this.setDesignViewModelField(n);
|
|
2647
|
+
const s = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
2572
2648
|
return {
|
|
2573
2649
|
description: "Basic Information",
|
|
2574
2650
|
title: "基本信息",
|
|
@@ -2590,7 +2666,7 @@ class mn extends pn {
|
|
|
2590
2666
|
textField: "value",
|
|
2591
2667
|
valueField: "key",
|
|
2592
2668
|
editable: !1,
|
|
2593
|
-
data:
|
|
2669
|
+
data: a.designViewModelField ? he.getEditorTypesByMDataType((u = a.designViewModelField.type) == null ? void 0 : u.name) : he.getAllInputTypes()
|
|
2594
2670
|
}
|
|
2595
2671
|
},
|
|
2596
2672
|
label: {
|
|
@@ -2606,8 +2682,8 @@ class mn extends pn {
|
|
|
2606
2682
|
type: "field-selector",
|
|
2607
2683
|
bindingType: { enable: !1 },
|
|
2608
2684
|
editorParams: {
|
|
2609
|
-
propertyData:
|
|
2610
|
-
formBasicInfo:
|
|
2685
|
+
propertyData: n,
|
|
2686
|
+
formBasicInfo: s
|
|
2611
2687
|
},
|
|
2612
2688
|
columns: [
|
|
2613
2689
|
{ field: "name", title: "字段名称" },
|
|
@@ -2615,26 +2691,27 @@ class mn extends pn {
|
|
|
2615
2691
|
{ field: "fieldType", title: "字段类型" }
|
|
2616
2692
|
],
|
|
2617
2693
|
textField: "bindingField",
|
|
2618
|
-
data:
|
|
2694
|
+
data: l
|
|
2619
2695
|
}
|
|
2620
2696
|
}
|
|
2621
2697
|
},
|
|
2622
|
-
setPropertyRelates(
|
|
2623
|
-
if (
|
|
2624
|
-
switch (
|
|
2698
|
+
setPropertyRelates(i, r) {
|
|
2699
|
+
if (i)
|
|
2700
|
+
switch (i && i.propertyID) {
|
|
2625
2701
|
case "type": {
|
|
2626
|
-
|
|
2702
|
+
a.changeControlType(n, i, o);
|
|
2627
2703
|
break;
|
|
2628
2704
|
}
|
|
2629
2705
|
case "label": {
|
|
2630
|
-
|
|
2706
|
+
i.needRefreshControlTree = !0;
|
|
2631
2707
|
break;
|
|
2632
2708
|
}
|
|
2633
2709
|
}
|
|
2634
2710
|
}
|
|
2635
2711
|
};
|
|
2636
2712
|
}
|
|
2637
|
-
getAppearanceProperties(
|
|
2713
|
+
getAppearanceProperties(n, o) {
|
|
2714
|
+
var a = this;
|
|
2638
2715
|
return {
|
|
2639
2716
|
title: "样式",
|
|
2640
2717
|
description: "Appearance",
|
|
@@ -2655,61 +2732,74 @@ class mn extends pn {
|
|
|
2655
2732
|
description: "响应式列宽",
|
|
2656
2733
|
title: "响应式列宽",
|
|
2657
2734
|
type: "boolean",
|
|
2658
|
-
visible: !
|
|
2735
|
+
visible: !0,
|
|
2736
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2737
|
+
refreshPanelAfterChanged: !0,
|
|
2659
2738
|
editor: {
|
|
2660
|
-
type: "response-layout-editor-setting"
|
|
2661
|
-
|
|
2662
|
-
|
|
2739
|
+
type: "response-layout-editor-setting",
|
|
2740
|
+
initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, a.componentId)
|
|
2741
|
+
}
|
|
2663
2742
|
}
|
|
2743
|
+
},
|
|
2744
|
+
setPropertyRelates(s, l) {
|
|
2745
|
+
if (s)
|
|
2746
|
+
switch (s && s.propertyID) {
|
|
2747
|
+
case "responseLayout":
|
|
2748
|
+
a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, a.componentId || n.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(n.id, o), delete n.responseLayout;
|
|
2749
|
+
break;
|
|
2750
|
+
case "class":
|
|
2751
|
+
a.updateUnifiedLayoutAfterControlChanged(s.propertyValue, n.id, this.componentId), a.updateElementByParentContainer(n.id, o);
|
|
2752
|
+
break;
|
|
2753
|
+
}
|
|
2664
2754
|
}
|
|
2665
2755
|
};
|
|
2666
2756
|
}
|
|
2667
|
-
getEditorProperties(
|
|
2668
|
-
return this.getComponentConfig(
|
|
2757
|
+
getEditorProperties(n) {
|
|
2758
|
+
return this.getComponentConfig(n);
|
|
2669
2759
|
}
|
|
2670
2760
|
/**
|
|
2671
2761
|
* 卡片控件:切换控件类型后事件
|
|
2672
2762
|
* @param propertyData 控件DOM属性
|
|
2673
2763
|
* @param newControlType 新控件类型
|
|
2674
2764
|
*/
|
|
2675
|
-
changeControlType(
|
|
2676
|
-
var
|
|
2677
|
-
const
|
|
2678
|
-
if (!
|
|
2765
|
+
changeControlType(n, o, a) {
|
|
2766
|
+
var p, c, v, b;
|
|
2767
|
+
const s = o.propertyValue, l = a && a.parent && a.parent.schema;
|
|
2768
|
+
if (!l)
|
|
2679
2769
|
return;
|
|
2680
|
-
const
|
|
2681
|
-
let
|
|
2770
|
+
const u = l.contents.findIndex((f) => f.id === n.id), i = l.contents[u];
|
|
2771
|
+
let r;
|
|
2682
2772
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2683
2773
|
editor: {
|
|
2684
|
-
$type:
|
|
2774
|
+
$type: s
|
|
2685
2775
|
},
|
|
2686
2776
|
name: this.designViewModelField.name,
|
|
2687
2777
|
require: this.designViewModelField.require,
|
|
2688
2778
|
readonly: this.designViewModelField.readonly
|
|
2689
|
-
}, !1),
|
|
2690
|
-
id:
|
|
2691
|
-
appearance:
|
|
2692
|
-
size:
|
|
2693
|
-
label:
|
|
2694
|
-
binding:
|
|
2695
|
-
visible:
|
|
2696
|
-
}), Object.assign(
|
|
2697
|
-
isTextArea:
|
|
2698
|
-
placeholder: (
|
|
2699
|
-
holdPlace: (
|
|
2700
|
-
readonly: (
|
|
2701
|
-
require: (
|
|
2702
|
-
}),
|
|
2703
|
-
(
|
|
2704
|
-
),
|
|
2705
|
-
}
|
|
2706
|
-
getComponentConfig(
|
|
2707
|
-
const
|
|
2779
|
+
}, !1), r = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), r || (r = Oe("form-group") || {}, r.editor = Oe(s) || {}, delete r.editor.id, delete r.editor.binding, delete r.editor.appearance), Object.assign(r, {
|
|
2780
|
+
id: i.id,
|
|
2781
|
+
appearance: i.appearance,
|
|
2782
|
+
size: i.size,
|
|
2783
|
+
label: i.label,
|
|
2784
|
+
binding: i.binding,
|
|
2785
|
+
visible: i.visible
|
|
2786
|
+
}), Object.assign(r.editor, {
|
|
2787
|
+
isTextArea: r.isTextArea && i.isTextArea,
|
|
2788
|
+
placeholder: (p = i.editor) == null ? void 0 : p.placeholder,
|
|
2789
|
+
holdPlace: (c = i.editor) == null ? void 0 : c.holdPlace,
|
|
2790
|
+
readonly: (v = i.editor) == null ? void 0 : v.readonly,
|
|
2791
|
+
require: (b = i.editor) == null ? void 0 : b.require
|
|
2792
|
+
}), l.contents.splice(u, 1), l.contents.splice(u, 0, r), a.schema = Object.assign(i, r), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2793
|
+
(f) => f.classList.remove("dgComponentSelected")
|
|
2794
|
+
), Ko.value++;
|
|
2795
|
+
}
|
|
2796
|
+
getComponentConfig(n, o = {}, a = {}) {
|
|
2797
|
+
const s = Object.assign({
|
|
2708
2798
|
description: "编辑器",
|
|
2709
2799
|
title: "编辑器",
|
|
2710
2800
|
type: "input-group",
|
|
2711
2801
|
$converter: "/converter/property-editor.converter"
|
|
2712
|
-
}, o),
|
|
2802
|
+
}, o), l = Object.assign({
|
|
2713
2803
|
readonly: {
|
|
2714
2804
|
description: "",
|
|
2715
2805
|
title: "只读",
|
|
@@ -2730,148 +2820,196 @@ class mn extends pn {
|
|
|
2730
2820
|
title: "提示文本",
|
|
2731
2821
|
type: "string"
|
|
2732
2822
|
}
|
|
2733
|
-
},
|
|
2734
|
-
return { ...
|
|
2823
|
+
}, a);
|
|
2824
|
+
return { ...s, properties: { ...l } };
|
|
2825
|
+
}
|
|
2826
|
+
/**
|
|
2827
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
2828
|
+
* @param controlClass 控件样式
|
|
2829
|
+
* @param controlId 控件Id
|
|
2830
|
+
* @param componentId 控件所在组件id
|
|
2831
|
+
*/
|
|
2832
|
+
updateUnifiedLayoutAfterControlChanged(n, o, a) {
|
|
2833
|
+
const s = n.split(" ");
|
|
2834
|
+
let l = s.find((c) => /^col-([1-9]|10|11|12)$/.test(c)), u = s.find((c) => /^col-md-([1-9]|10|11|12)$/.test(c)), i = s.find((c) => /^col-xl-([1-9]|10|11|12)$/.test(c)), r = s.find((c) => /^col-el-([1-9]|10|11|12)$/.test(c));
|
|
2835
|
+
l = l || "col-12", u = u || "col-md-" + l.replace("col-", ""), i = i || "col-xl-" + u.replace("col-md-", ""), r = r || "col-el-" + i.replace("col-xl-", "");
|
|
2836
|
+
const p = {
|
|
2837
|
+
id: o,
|
|
2838
|
+
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
2839
|
+
columnInMD: parseInt(u.replace("col-md-", ""), 10),
|
|
2840
|
+
columnInLG: parseInt(i.replace("col-xl-", ""), 10),
|
|
2841
|
+
columnInEL: parseInt(r.replace("col-el-", ""), 10)
|
|
2842
|
+
};
|
|
2843
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(a, p);
|
|
2844
|
+
}
|
|
2845
|
+
/**
|
|
2846
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
2847
|
+
* @param componentId 组件Id
|
|
2848
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
2849
|
+
*/
|
|
2850
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(n, o) {
|
|
2851
|
+
const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
2852
|
+
if (!a || !a.unifiedLayout)
|
|
2853
|
+
return;
|
|
2854
|
+
const s = [];
|
|
2855
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, s, 1), o) {
|
|
2856
|
+
const f = s.find((g) => g.id === o.id);
|
|
2857
|
+
Object.assign(f || {}, o);
|
|
2858
|
+
}
|
|
2859
|
+
const l = s.map((f) => f.columnInSM), u = s.map((f) => f.columnInMD), i = s.map((f) => f.columnInLG), r = s.map((f) => f.columnInEL), p = this.checkIsUniqueColumn(l) ? l[0] : null, c = this.checkIsUniqueColumn(u) ? u[0] : null, v = this.checkIsUniqueColumn(i) ? i[0] : null, b = this.checkIsUniqueColumn(r) ? r[0] : null;
|
|
2860
|
+
Object.assign(a.unifiedLayout, {
|
|
2861
|
+
uniqueColClassInSM: p,
|
|
2862
|
+
uniqueColClassInMD: c,
|
|
2863
|
+
uniqueColClassInLG: v,
|
|
2864
|
+
uniqueColClassInEL: b
|
|
2865
|
+
});
|
|
2866
|
+
}
|
|
2867
|
+
/**
|
|
2868
|
+
* 校验宽度样式值是否一致
|
|
2869
|
+
*/
|
|
2870
|
+
checkIsUniqueColumn(n) {
|
|
2871
|
+
const o = new Set(n);
|
|
2872
|
+
return Array.from(o).length === 1;
|
|
2735
2873
|
}
|
|
2736
2874
|
}
|
|
2737
|
-
class
|
|
2738
|
-
constructor(t,
|
|
2739
|
-
super(t,
|
|
2875
|
+
class ta extends ea {
|
|
2876
|
+
constructor(t, n) {
|
|
2877
|
+
super(t, n);
|
|
2740
2878
|
}
|
|
2741
2879
|
}
|
|
2742
|
-
function
|
|
2880
|
+
function na(e, t) {
|
|
2743
2881
|
const {
|
|
2744
|
-
canAccepts:
|
|
2745
|
-
checkCanDeleteComponent:
|
|
2746
|
-
checkCanMoveComponent:
|
|
2882
|
+
canAccepts: n,
|
|
2883
|
+
checkCanDeleteComponent: o,
|
|
2884
|
+
checkCanMoveComponent: a,
|
|
2747
2885
|
hideNestedPaddingInDesginerView: s,
|
|
2748
|
-
onAcceptMovedChildElement:
|
|
2749
|
-
resolveComponentContext:
|
|
2750
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2751
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2752
|
-
} =
|
|
2753
|
-
function
|
|
2754
|
-
return new
|
|
2886
|
+
onAcceptMovedChildElement: l,
|
|
2887
|
+
resolveComponentContext: u,
|
|
2888
|
+
triggerBelongedComponentToMoveWhenMoved: i,
|
|
2889
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
2890
|
+
} = Zo(e), p = e.schema;
|
|
2891
|
+
function c(v, b) {
|
|
2892
|
+
return new ta(v, t).getPropertyConfig(p, b);
|
|
2755
2893
|
}
|
|
2756
2894
|
return {
|
|
2757
|
-
canAccepts:
|
|
2758
|
-
checkCanDeleteComponent:
|
|
2759
|
-
checkCanMoveComponent:
|
|
2895
|
+
canAccepts: n,
|
|
2896
|
+
checkCanDeleteComponent: o,
|
|
2897
|
+
checkCanMoveComponent: a,
|
|
2760
2898
|
hideNestedPaddingInDesginerView: s,
|
|
2761
|
-
onAcceptMovedChildElement:
|
|
2762
|
-
resolveComponentContext:
|
|
2763
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2764
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2765
|
-
getPropsConfig:
|
|
2899
|
+
onAcceptMovedChildElement: l,
|
|
2900
|
+
resolveComponentContext: u,
|
|
2901
|
+
triggerBelongedComponentToMoveWhenMoved: i,
|
|
2902
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
2903
|
+
getPropsConfig: c
|
|
2766
2904
|
};
|
|
2767
2905
|
}
|
|
2768
|
-
const
|
|
2906
|
+
const oa = /* @__PURE__ */ Z({
|
|
2769
2907
|
name: "FInputGroupDesign",
|
|
2770
|
-
props:
|
|
2908
|
+
props: Ie,
|
|
2771
2909
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
2772
2910
|
setup(e, t) {
|
|
2773
|
-
const
|
|
2911
|
+
const n = d(e.modelValue), o = d(e.modelValue), a = Ro(e, t, n, o), {
|
|
2774
2912
|
inputGroupClass: s,
|
|
2775
|
-
inputType:
|
|
2776
|
-
inputGroupStyle:
|
|
2777
|
-
} =
|
|
2778
|
-
shouldShowAppendedButton:
|
|
2779
|
-
} =
|
|
2780
|
-
onMouseEnter:
|
|
2781
|
-
onMouseLeave:
|
|
2782
|
-
} =
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
}), t.expose(
|
|
2786
|
-
const
|
|
2787
|
-
return () =>
|
|
2913
|
+
inputType: l,
|
|
2914
|
+
inputGroupStyle: u
|
|
2915
|
+
} = a, i = Qe(e), {
|
|
2916
|
+
shouldShowAppendedButton: r
|
|
2917
|
+
} = i, p = Je(e, t, a), {
|
|
2918
|
+
onMouseEnter: c,
|
|
2919
|
+
onMouseLeave: v
|
|
2920
|
+
} = p, b = Ze(e, t, l, i), f = d(), g = ue("designer-host-service"), y = ue("design-item-context"), C = na(y, g), h = je(f, y, C);
|
|
2921
|
+
K(() => {
|
|
2922
|
+
f.value.componentInstance = h;
|
|
2923
|
+
}), t.expose(h.value);
|
|
2924
|
+
const F = _e(e, t, i, p, b), k = d();
|
|
2925
|
+
return () => m("div", {
|
|
2788
2926
|
id: "inputGroup",
|
|
2789
|
-
ref:
|
|
2927
|
+
ref: f,
|
|
2790
2928
|
class: s.value,
|
|
2791
|
-
style:
|
|
2792
|
-
onMouseenter:
|
|
2793
|
-
onMouseleave:
|
|
2794
|
-
}, [
|
|
2795
|
-
ref:
|
|
2929
|
+
style: u.value,
|
|
2930
|
+
onMouseenter: c,
|
|
2931
|
+
onMouseleave: v
|
|
2932
|
+
}, [m("input", {
|
|
2933
|
+
ref: k,
|
|
2796
2934
|
class: "form-control",
|
|
2797
2935
|
readonly: !0,
|
|
2798
2936
|
placeholder: e.placeholder
|
|
2799
|
-
}, null),
|
|
2937
|
+
}, null), r.value && F()]);
|
|
2800
2938
|
}
|
|
2801
2939
|
});
|
|
2802
|
-
function
|
|
2803
|
-
function e(
|
|
2804
|
-
const
|
|
2805
|
-
return
|
|
2940
|
+
function aa() {
|
|
2941
|
+
function e(n, o) {
|
|
2942
|
+
const a = Qo[n];
|
|
2943
|
+
return a ? a(o) : {};
|
|
2806
2944
|
}
|
|
2807
|
-
function t(
|
|
2808
|
-
return
|
|
2945
|
+
function t(n) {
|
|
2946
|
+
return Jo[n] || oa;
|
|
2809
2947
|
}
|
|
2810
2948
|
return { resolveEditorProps: e, resolveEditorType: t };
|
|
2811
2949
|
}
|
|
2812
|
-
const
|
|
2950
|
+
const ra = /* @__PURE__ */ Z({
|
|
2813
2951
|
name: "FDynamicFormGroupDesign",
|
|
2814
|
-
props:
|
|
2952
|
+
props: pe,
|
|
2815
2953
|
emits: ["change", "update:modelValue"],
|
|
2816
2954
|
setup(e, t) {
|
|
2817
|
-
const
|
|
2818
|
-
|
|
2819
|
-
const
|
|
2820
|
-
resolveEditorProps:
|
|
2821
|
-
resolveEditorType:
|
|
2822
|
-
} =
|
|
2955
|
+
const n = d(e.id), o = d(e.customClass), a = d(e.editor), s = d(e.label), l = d(e.modelValue), u = d(!0), i = d(e.required), r = d(e.showLabel);
|
|
2956
|
+
d(e.type);
|
|
2957
|
+
const p = d(), {
|
|
2958
|
+
resolveEditorProps: c,
|
|
2959
|
+
resolveEditorType: v
|
|
2960
|
+
} = aa(), b = x(() => ({
|
|
2823
2961
|
"form-group": !0,
|
|
2824
2962
|
"farris-form-group": !0,
|
|
2825
2963
|
"common-group": !0,
|
|
2826
|
-
"q-state-readonly":
|
|
2964
|
+
"q-state-readonly": u.value,
|
|
2827
2965
|
"form-group-in-canvas": !0
|
|
2828
|
-
})),
|
|
2829
|
-
const
|
|
2830
|
-
return () =>
|
|
2831
|
-
ref:
|
|
2832
|
-
},
|
|
2833
|
-
modelValue:
|
|
2834
|
-
"onUpdate:modelValue": (
|
|
2966
|
+
})), f = x(() => {
|
|
2967
|
+
const g = a.value.type || "input-group", y = v(g), C = c(g, a.value);
|
|
2968
|
+
return () => m(y, ae({
|
|
2969
|
+
ref: p
|
|
2970
|
+
}, C, {
|
|
2971
|
+
modelValue: l.value,
|
|
2972
|
+
"onUpdate:modelValue": (h) => l.value = h
|
|
2835
2973
|
}), null);
|
|
2836
2974
|
});
|
|
2837
|
-
return
|
|
2838
|
-
|
|
2975
|
+
return X([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel], ([g, y, C, h, F, k, R, T]) => {
|
|
2976
|
+
n.value = g, o.value = y, a.value = C, s.value = h, l.value = F, u.value = k, i.value = R, r.value = T;
|
|
2839
2977
|
}), t.expose({
|
|
2840
|
-
editorRef:
|
|
2841
|
-
}), () =>
|
|
2842
|
-
id: `${
|
|
2843
|
-
class:
|
|
2978
|
+
editorRef: p
|
|
2979
|
+
}), () => m("div", {
|
|
2980
|
+
id: `${n.value}-input-group`,
|
|
2981
|
+
class: o.value,
|
|
2844
2982
|
design_test: !0
|
|
2845
|
-
}, [
|
|
2983
|
+
}, [m("div", {
|
|
2846
2984
|
class: "farris-group-wrap"
|
|
2847
|
-
}, [
|
|
2848
|
-
class:
|
|
2849
|
-
}, [
|
|
2850
|
-
id: `${
|
|
2851
|
-
required:
|
|
2985
|
+
}, [m("div", {
|
|
2986
|
+
class: b.value
|
|
2987
|
+
}, [r.value && m(Ye, {
|
|
2988
|
+
id: `${n.value}-lable`,
|
|
2989
|
+
required: i.value,
|
|
2852
2990
|
text: s.value,
|
|
2853
2991
|
title: s.value
|
|
2854
|
-
}, null),
|
|
2992
|
+
}, null), m("div", {
|
|
2855
2993
|
class: "farris-input-wrap"
|
|
2856
|
-
}, [
|
|
2994
|
+
}, [f.value()])])])]);
|
|
2857
2995
|
}
|
|
2858
|
-
}),
|
|
2996
|
+
}), sa = /* @__PURE__ */ Z({
|
|
2859
2997
|
name: "FFormGroupDesign",
|
|
2860
|
-
props:
|
|
2998
|
+
props: pe,
|
|
2861
2999
|
emits: [],
|
|
2862
3000
|
setup(e, t) {
|
|
2863
|
-
const
|
|
2864
|
-
return
|
|
2865
|
-
|
|
2866
|
-
var
|
|
2867
|
-
let
|
|
2868
|
-
return
|
|
3001
|
+
const n = d(), o = ue("design-item-context"), a = je(n, o);
|
|
3002
|
+
return a.value.canNested = !1, a.value.canMove = !0, a.value.canDelete = !0, K(() => {
|
|
3003
|
+
n.value.componentInstance = a, a.value.getPropConfig = (...s) => {
|
|
3004
|
+
var u, i, r;
|
|
3005
|
+
let l = He[e.editor.type];
|
|
3006
|
+
return l && Object.keys(l).length === 0 && ((u = n.value) != null && u.editorRef) && ((r = (i = n.value) == null ? void 0 : i.editorRef) != null && r.getPropConfig) && (l = n.value.editorRef.getPropConfig(...s, a.value)), l;
|
|
2869
3007
|
};
|
|
2870
|
-
}), t.expose(
|
|
2871
|
-
ref:
|
|
3008
|
+
}), t.expose(a.value), () => m(ra, ae(e, {
|
|
3009
|
+
ref: n
|
|
2872
3010
|
}), null);
|
|
2873
3011
|
}
|
|
2874
|
-
}),
|
|
3012
|
+
}), et = {
|
|
2875
3013
|
id: { type: String, default: "" },
|
|
2876
3014
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
2877
3015
|
editor: { type: Object, default: {} },
|
|
@@ -2885,57 +3023,1375 @@ const hn = /* @__PURE__ */ G({
|
|
|
2885
3023
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
2886
3024
|
*/
|
|
2887
3025
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
2888
|
-
},
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
3026
|
+
}, la = be(
|
|
3027
|
+
et,
|
|
3028
|
+
Xe,
|
|
3029
|
+
Pe,
|
|
2892
3030
|
void 0
|
|
2893
|
-
),
|
|
3031
|
+
), ia = /* @__PURE__ */ Z({
|
|
2894
3032
|
name: "FDynamicFormInput",
|
|
2895
|
-
props:
|
|
3033
|
+
props: et,
|
|
2896
3034
|
emits: ["change", "update:modelValue"],
|
|
2897
3035
|
setup(e, t) {
|
|
2898
|
-
const
|
|
3036
|
+
const n = d(e.id), o = d(e.editor), a = d(e.modelValue), {
|
|
2899
3037
|
resolveEditorProps: s,
|
|
2900
|
-
resolveEditorType:
|
|
2901
|
-
getChangeFunctionName:
|
|
2902
|
-
} =
|
|
2903
|
-
function
|
|
2904
|
-
|
|
3038
|
+
resolveEditorType: l,
|
|
3039
|
+
getChangeFunctionName: u
|
|
3040
|
+
} = Ke();
|
|
3041
|
+
function i(p, c) {
|
|
3042
|
+
a.value = c !== void 0 ? c : p, t.emit("update:modelValue", a.value), t.emit("change", a.value);
|
|
2905
3043
|
}
|
|
2906
|
-
const
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2909
|
-
const
|
|
2910
|
-
return
|
|
2911
|
-
modelValue:
|
|
2912
|
-
"onUpdate:modelValue": (
|
|
3044
|
+
const r = x(() => {
|
|
3045
|
+
const p = l(o.value.type), c = s(o.value.type, o.value);
|
|
3046
|
+
c.focusOnCreated = e.focusOnCreated, c.selectOnCreated = e.selectOnCreated;
|
|
3047
|
+
const v = u(o.value.type);
|
|
3048
|
+
return c[v] = i, (c.id == null || c.id === "") && (c.id = n.value), () => m(p, ae(c, {
|
|
3049
|
+
modelValue: a.value,
|
|
3050
|
+
"onUpdate:modelValue": (b) => a.value = b
|
|
2913
3051
|
}), null);
|
|
2914
3052
|
});
|
|
2915
|
-
return
|
|
2916
|
-
|
|
2917
|
-
}), () =>
|
|
3053
|
+
return X([() => e.id, () => e.editor, () => e.modelValue], ([p, c, v]) => {
|
|
3054
|
+
n.value = p, o.value = c, a.value = v;
|
|
3055
|
+
}), () => r.value();
|
|
3056
|
+
}
|
|
3057
|
+
}), ua = "https://json-schema.org/draft/2020-12/schema", ca = "https://farris-design.gitee.io/grid-field-editor.schema.json", da = "response-form-layout-setting", pa = "A Farris Data Grid Component", fa = "object", ma = {
|
|
3058
|
+
id: {
|
|
3059
|
+
description: "The unique identifier for a Input Group",
|
|
3060
|
+
type: "string"
|
|
3061
|
+
},
|
|
3062
|
+
type: {
|
|
3063
|
+
description: "The type string of Input Group component",
|
|
3064
|
+
type: "string",
|
|
3065
|
+
default: "response-form-layout-setting"
|
|
3066
|
+
},
|
|
3067
|
+
viewModelId: {
|
|
3068
|
+
description: "",
|
|
3069
|
+
type: "string",
|
|
3070
|
+
default: ""
|
|
3071
|
+
},
|
|
3072
|
+
gridData: {
|
|
3073
|
+
description: "",
|
|
3074
|
+
type: "Object",
|
|
3075
|
+
default: null
|
|
3076
|
+
}
|
|
3077
|
+
}, va = [
|
|
3078
|
+
"id",
|
|
3079
|
+
"type"
|
|
3080
|
+
], ga = {
|
|
3081
|
+
$schema: ua,
|
|
3082
|
+
$id: ca,
|
|
3083
|
+
title: da,
|
|
3084
|
+
description: pa,
|
|
3085
|
+
type: fa,
|
|
3086
|
+
properties: ma,
|
|
3087
|
+
required: va
|
|
3088
|
+
}, tt = {
|
|
3089
|
+
initialState: {
|
|
3090
|
+
type: Object,
|
|
3091
|
+
default: {
|
|
3092
|
+
uniqueColClassInSM: 12,
|
|
3093
|
+
uniqueColClassInMD: 6,
|
|
3094
|
+
uniqueColClassInLG: 3,
|
|
3095
|
+
uniqueColClassInEL: 2
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
}, ya = Rn(tt, ga, Gn, Jn), ha = {
|
|
3099
|
+
width: { Type: Number, default: 400 },
|
|
3100
|
+
type: { Type: String, default: "info" },
|
|
3101
|
+
title: { Type: String, default: "" },
|
|
3102
|
+
detail: { Type: String, default: "" },
|
|
3103
|
+
okButtonText: { Type: String, default: "确定" },
|
|
3104
|
+
cancelButtonText: { Type: String, default: "取消" },
|
|
3105
|
+
exceptionInfo: { Type: Object, default: null },
|
|
3106
|
+
promptEditorType: { Type: String, default: "text-area" }
|
|
3107
|
+
};
|
|
3108
|
+
function Le() {
|
|
3109
|
+
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
3110
|
+
}
|
|
3111
|
+
async function ba(e) {
|
|
3112
|
+
if (!navigator.clipboard)
|
|
3113
|
+
throw Le();
|
|
3114
|
+
return navigator.clipboard.writeText(e);
|
|
3115
|
+
}
|
|
3116
|
+
async function Ca(e) {
|
|
3117
|
+
const t = document.createElement("span");
|
|
3118
|
+
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3119
|
+
const n = window.getSelection(), o = window.document.createRange();
|
|
3120
|
+
n == null || n.removeAllRanges(), o.selectNode(t), n == null || n.addRange(o);
|
|
3121
|
+
let a = !1;
|
|
3122
|
+
try {
|
|
3123
|
+
a = window.document.execCommand("copy");
|
|
3124
|
+
} finally {
|
|
3125
|
+
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
3126
|
+
}
|
|
3127
|
+
if (!a) throw Le();
|
|
3128
|
+
}
|
|
3129
|
+
async function wa(e) {
|
|
3130
|
+
try {
|
|
3131
|
+
await ba(e);
|
|
3132
|
+
} catch (t) {
|
|
3133
|
+
try {
|
|
3134
|
+
await Ca(e);
|
|
3135
|
+
} catch (n) {
|
|
3136
|
+
throw n || t || Le();
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
function xa() {
|
|
3141
|
+
async function e(t) {
|
|
3142
|
+
await wa(t);
|
|
3143
|
+
}
|
|
3144
|
+
return { onCopy: e };
|
|
3145
|
+
}
|
|
3146
|
+
function Ta(e, t, n, o) {
|
|
3147
|
+
const a = d(14), s = d(140), l = d(""), u = d(o.value.length), i = x(() => o.value), r = x(() => ({
|
|
3148
|
+
"font-size": `${a.value}px`,
|
|
3149
|
+
height: "100%"
|
|
3150
|
+
}));
|
|
3151
|
+
function p(c) {
|
|
3152
|
+
if (c.currentTarget) {
|
|
3153
|
+
const v = c.currentTarget.value || "";
|
|
3154
|
+
u.value = v.length;
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
return () => m(ce, null, [m("textarea", {
|
|
3158
|
+
title: "promptMessage",
|
|
3159
|
+
name: "promptMessage",
|
|
3160
|
+
class: "form-control",
|
|
3161
|
+
style: r.value,
|
|
3162
|
+
rows: "4",
|
|
3163
|
+
maxlength: s.value,
|
|
3164
|
+
onInput: (c) => p(c)
|
|
3165
|
+
}, [i.value]), m("span", {
|
|
3166
|
+
class: "textarea-wordcount",
|
|
3167
|
+
title: l.value,
|
|
3168
|
+
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3169
|
+
}, [u.value + " / " + s.value])]);
|
|
3170
|
+
}
|
|
3171
|
+
function Ba(e, t, n, o) {
|
|
3172
|
+
const a = Ta(e, t, n, o), s = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
3173
|
+
function l(u) {
|
|
3174
|
+
return s.get(u) || null;
|
|
3175
|
+
}
|
|
3176
|
+
return { getEditorRender: l };
|
|
3177
|
+
}
|
|
3178
|
+
function Ma() {
|
|
3179
|
+
const e = d(!1), t = d("复制成功");
|
|
3180
|
+
return {
|
|
3181
|
+
feedbackStyle: x(() => {
|
|
3182
|
+
const o = {
|
|
3183
|
+
position: "absolute",
|
|
3184
|
+
left: "50%",
|
|
3185
|
+
top: "50%",
|
|
3186
|
+
width: "100px",
|
|
3187
|
+
height: "40px",
|
|
3188
|
+
background: "#303C53",
|
|
3189
|
+
"line-height": "40px",
|
|
3190
|
+
"text-align": "center",
|
|
3191
|
+
"margin-left": "-30px",
|
|
3192
|
+
"margin-top": "-50px",
|
|
3193
|
+
"border-radius": "10px",
|
|
3194
|
+
"box-shadow": "0px 2px 8px 0px",
|
|
3195
|
+
color: "#fff",
|
|
3196
|
+
transition: "all .3s ease"
|
|
3197
|
+
};
|
|
3198
|
+
return o.opacity = e.value ? "0.8" : "0", o.display = e.value ? "" : "none", o;
|
|
3199
|
+
}),
|
|
3200
|
+
feedbackMessage: t,
|
|
3201
|
+
toShowFeedback: e
|
|
3202
|
+
};
|
|
3203
|
+
}
|
|
3204
|
+
function Fa(e, t) {
|
|
3205
|
+
const n = t.getEditorRender(e.promptEditorType);
|
|
3206
|
+
return () => n && n();
|
|
3207
|
+
}
|
|
3208
|
+
function ka(e) {
|
|
3209
|
+
const t = d(3), n = d(480), o = x(() => !!e.value && !!e.value.date), a = x(() => `发生时间 : ${e.value && e.value.date || ""}`), s = x(() => !!e.value && !!e.value.detail), l = x(() => {
|
|
3210
|
+
const y = `${n.value}px`;
|
|
3211
|
+
return {
|
|
3212
|
+
overflow: "hidden",
|
|
3213
|
+
"text-overflow": "ellipsis",
|
|
3214
|
+
display: "-webkit-box",
|
|
3215
|
+
"-webkit-box-orient": "vertical",
|
|
3216
|
+
"-webkit-line-clamp": t.value,
|
|
3217
|
+
"max-height": y
|
|
3218
|
+
};
|
|
3219
|
+
}), u = x(() => e.value && e.value.detail || ""), i = x(() => !0), r = d(!1), p = d("展开"), c = d("收起"), v = x(() => {
|
|
3220
|
+
const y = {
|
|
3221
|
+
display: "block",
|
|
3222
|
+
color: "#2A87FF"
|
|
3223
|
+
};
|
|
3224
|
+
return y["text-align"] = r.value ? "" : "right", y;
|
|
3225
|
+
});
|
|
3226
|
+
function b(y, C) {
|
|
3227
|
+
r.value = !r.value, t.value = r.value ? 20 : 3;
|
|
3228
|
+
}
|
|
3229
|
+
function f(y) {
|
|
3230
|
+
return b();
|
|
3231
|
+
}
|
|
3232
|
+
function g(y) {
|
|
3233
|
+
return b();
|
|
3234
|
+
}
|
|
3235
|
+
return () => m("div", {
|
|
3236
|
+
class: "toast-msg-detail"
|
|
3237
|
+
}, [o.value && m("div", null, [a.value]), s.value && m("div", {
|
|
3238
|
+
id: "exception_error_msg",
|
|
3239
|
+
ref: "exceptionMessageRef",
|
|
3240
|
+
style: l.value
|
|
3241
|
+
}, [_("详细信息 : "), m("span", {
|
|
3242
|
+
innerHTML: u.value
|
|
3243
|
+
}, null)]), i.value && m("span", {
|
|
3244
|
+
style: v.value
|
|
3245
|
+
}, [r.value && m("span", {
|
|
3246
|
+
onClick: f,
|
|
3247
|
+
style: "cursor: pointer;"
|
|
3248
|
+
}, [c.value]), !r.value && m("span", {
|
|
3249
|
+
onClick: g,
|
|
3250
|
+
style: "cursor: pointer;"
|
|
3251
|
+
}, [p.value])])]);
|
|
3252
|
+
}
|
|
3253
|
+
function Ea(e) {
|
|
3254
|
+
return () => m("p", {
|
|
3255
|
+
class: "toast-msg-detail",
|
|
3256
|
+
innerHTML: e.value
|
|
3257
|
+
}, null);
|
|
3258
|
+
}
|
|
3259
|
+
function Sa(e, t, n, o) {
|
|
3260
|
+
const a = d(e.exceptionInfo), s = x(() => {
|
|
3261
|
+
const v = {
|
|
3262
|
+
"f-icon": !0
|
|
3263
|
+
}, b = `f-icon-${t.value}`;
|
|
3264
|
+
return v[b] = !0, v;
|
|
3265
|
+
}), l = x(() => n.value || a.value && a.value.message), u = x(() => o.value), i = x(() => !!o.value), r = x(() => !!a.value);
|
|
3266
|
+
function p() {
|
|
3267
|
+
return r.value ? ka(a) : i.value ? Ea(u) : () => null;
|
|
3268
|
+
}
|
|
3269
|
+
const c = p();
|
|
3270
|
+
return () => m(ce, null, [m("div", {
|
|
3271
|
+
class: "float-left modal-tips-iconwrap"
|
|
3272
|
+
}, [m("span", {
|
|
3273
|
+
class: s.value
|
|
3274
|
+
}, null)]), m("div", {
|
|
3275
|
+
class: "modal-tips-content"
|
|
3276
|
+
}, [m("p", {
|
|
3277
|
+
class: "toast-msg-title",
|
|
3278
|
+
innerHTML: l.value
|
|
3279
|
+
}, null), c()])]);
|
|
3280
|
+
}
|
|
3281
|
+
function Pa(e, t, n) {
|
|
3282
|
+
const {
|
|
3283
|
+
onCopy: o
|
|
3284
|
+
} = t, {
|
|
3285
|
+
toShowFeedback: a
|
|
3286
|
+
} = n, s = d("复制成功"), l = d("复制详细信息"), u = d(e.exceptionInfo || {
|
|
3287
|
+
date: "",
|
|
3288
|
+
message: "",
|
|
3289
|
+
detail: ""
|
|
3290
|
+
}), i = x(() => u.value && u.value.detail || "");
|
|
3291
|
+
function r(p) {
|
|
3292
|
+
o(i.value).catch((c) => {
|
|
3293
|
+
s.value = "复制失败";
|
|
3294
|
+
}).finally(() => {
|
|
3295
|
+
a.value = !0, setTimeout(() => {
|
|
3296
|
+
a.value = !1;
|
|
3297
|
+
}, 700);
|
|
3298
|
+
});
|
|
2918
3299
|
}
|
|
2919
|
-
|
|
3300
|
+
return () => m("span", {
|
|
3301
|
+
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
3302
|
+
}, [m("span", {
|
|
3303
|
+
onClick: r,
|
|
3304
|
+
style: "cursor: pointer;"
|
|
3305
|
+
}, [l.value])]);
|
|
3306
|
+
}
|
|
3307
|
+
function ja(e, t, n, o) {
|
|
3308
|
+
const a = d(e.type), s = d([]), l = d(e.exceptionInfo), u = d(e.okButtonText), i = d(e.cancelButtonText), r = d(!0), p = d(!0), c = x(() => !!(s.value && s.value.length)), v = x(() => l.value && l.value.date && l.value.message && l.value.detail), b = x(() => !(s.value && s.value.length) && (u.value || i.value)), f = x(() => p.value && u.value), g = x(() => r.value && i.value), y = Pa(e, n, o);
|
|
3309
|
+
function C(F) {
|
|
3310
|
+
a.value === "question" && t.emit("reject"), t.emit("close");
|
|
3311
|
+
}
|
|
3312
|
+
function h(F) {
|
|
3313
|
+
a.value === "question" && t.emit("accept"), t.emit("close");
|
|
3314
|
+
}
|
|
3315
|
+
return () => m("div", {
|
|
3316
|
+
class: "modal-footer"
|
|
3317
|
+
}, [v.value && y(), b.value && g.value && m("button", {
|
|
3318
|
+
type: "button",
|
|
3319
|
+
class: "btn btn-secondary btn-lg",
|
|
3320
|
+
onClick: C
|
|
3321
|
+
}, [i.value]), b.value && f.value && m("button", {
|
|
3322
|
+
type: "button",
|
|
3323
|
+
class: "btn btn-primary btn-lg",
|
|
3324
|
+
onClick: h
|
|
3325
|
+
}, [u.value]), c.value && s.value.length && s.value.map((F) => m("button", {
|
|
3326
|
+
type: "button",
|
|
3327
|
+
onClick: F.handle,
|
|
3328
|
+
class: F.class
|
|
3329
|
+
}, [F.iconClass && m("span", {
|
|
3330
|
+
class: F.iconClass
|
|
3331
|
+
}, null), F.text]))]);
|
|
3332
|
+
}
|
|
3333
|
+
const ge = /* @__PURE__ */ Z({
|
|
3334
|
+
name: "FMessageBox",
|
|
3335
|
+
props: ha,
|
|
3336
|
+
emits: ["accept", "reject", "close"],
|
|
3337
|
+
setup(e, t) {
|
|
3338
|
+
const n = d(e.type), o = d(e.title), a = d(e.detail), s = x(() => {
|
|
3339
|
+
const y = {
|
|
3340
|
+
"modal-tips": !0,
|
|
3341
|
+
"d-flex": !0,
|
|
3342
|
+
"flex-row": !0
|
|
3343
|
+
}, C = `messager-type-${n.value}`;
|
|
3344
|
+
return y[C] = !0, y;
|
|
3345
|
+
}), l = x(() => {
|
|
3346
|
+
const y = {};
|
|
3347
|
+
return n.value === "prompt" ? y.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (y.padding = "0.5rem 1.5rem 1rem 1.5rem"), y;
|
|
3348
|
+
}), u = xa(), i = Ba(e, n, o, a), r = Ma(), {
|
|
3349
|
+
feedbackStyle: p,
|
|
3350
|
+
feedbackMessage: c
|
|
3351
|
+
} = r;
|
|
3352
|
+
function v() {
|
|
3353
|
+
return m("div", {
|
|
3354
|
+
style: p.value
|
|
3355
|
+
}, [c.value]);
|
|
3356
|
+
}
|
|
3357
|
+
function b() {
|
|
3358
|
+
switch (n.value) {
|
|
3359
|
+
case "prompt":
|
|
3360
|
+
return Fa(e, i);
|
|
3361
|
+
default:
|
|
3362
|
+
return Sa(e, n, o, a);
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
const f = b(), g = ja(e, t, u, r);
|
|
3366
|
+
return () => m("div", {
|
|
3367
|
+
class: "farris-messager"
|
|
3368
|
+
}, [m("section", {
|
|
3369
|
+
class: s.value,
|
|
3370
|
+
style: l.value
|
|
3371
|
+
}, [f()]), g(), v()]);
|
|
3372
|
+
}
|
|
3373
|
+
}), Ia = {
|
|
3374
|
+
/**
|
|
3375
|
+
* 自定义类
|
|
3376
|
+
*/
|
|
3377
|
+
class: { type: String, default: "" },
|
|
3378
|
+
/**
|
|
3379
|
+
* 模态框标题
|
|
3380
|
+
*/
|
|
3381
|
+
title: { type: String, default: "" },
|
|
3382
|
+
/**
|
|
3383
|
+
* 模态框宽度
|
|
3384
|
+
*/
|
|
3385
|
+
width: { type: Number, default: 500 },
|
|
3386
|
+
/**
|
|
3387
|
+
* 模态框高度
|
|
3388
|
+
*/
|
|
3389
|
+
height: { type: Number, default: 320 },
|
|
3390
|
+
/**
|
|
3391
|
+
* 自定义按钮列表
|
|
3392
|
+
*/
|
|
3393
|
+
buttons: {
|
|
3394
|
+
type: Array,
|
|
3395
|
+
default: []
|
|
3396
|
+
},
|
|
3397
|
+
/**
|
|
3398
|
+
* 是否展示模态框
|
|
3399
|
+
*/
|
|
3400
|
+
modelValue: { type: Boolean, default: !1 },
|
|
3401
|
+
/**
|
|
3402
|
+
* 是否展示头部
|
|
3403
|
+
*/
|
|
3404
|
+
showHeader: { type: Boolean, default: !0 },
|
|
3405
|
+
/**
|
|
3406
|
+
* 是否展示默认按钮
|
|
3407
|
+
*/
|
|
3408
|
+
showButtons: { type: Boolean, default: !0 },
|
|
3409
|
+
/**
|
|
3410
|
+
* 是否启用自适应样式
|
|
3411
|
+
*/
|
|
3412
|
+
fitContent: { type: Boolean, default: !0 },
|
|
3413
|
+
/**
|
|
3414
|
+
* 是否展示右上角按钮
|
|
3415
|
+
*/
|
|
3416
|
+
showCloseButton: { type: Boolean, default: !0 },
|
|
3417
|
+
showMaxButton: { type: Boolean, default: !1 },
|
|
3418
|
+
minHeight: { type: Number },
|
|
3419
|
+
maxHeight: { type: Number },
|
|
3420
|
+
minWidth: { type: Number },
|
|
3421
|
+
maxWidth: { type: Number },
|
|
3422
|
+
containment: { type: Object, default: null },
|
|
3423
|
+
reiszeable: { type: Boolean, default: !1 },
|
|
3424
|
+
draggable: { type: Boolean, default: !1 },
|
|
3425
|
+
dragHandle: { type: Object, default: null },
|
|
3426
|
+
closedCallback: { type: Function, default: null },
|
|
3427
|
+
resizeHandle: { type: Function, default: null },
|
|
3428
|
+
render: { type: Function, default: null },
|
|
3429
|
+
acceptCallback: { type: Function, default: null },
|
|
3430
|
+
rejectCallback: { type: Function, default: null },
|
|
3431
|
+
enableEsc: { type: Boolean, default: !0 },
|
|
3432
|
+
enableEnter: { type: Boolean, default: !1 }
|
|
3433
|
+
};
|
|
3434
|
+
class J {
|
|
3435
|
+
constructor(t, n) {
|
|
3436
|
+
this.x = t, this.y = n;
|
|
3437
|
+
}
|
|
3438
|
+
static getTransformInfo(t) {
|
|
3439
|
+
const o = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
3440
|
+
if (o.length >= 6) {
|
|
3441
|
+
const a = parseInt(o[4], 10), s = parseInt(o[5], 10);
|
|
3442
|
+
return { x: a, y: s };
|
|
3443
|
+
}
|
|
3444
|
+
return { x: 0, y: 0 };
|
|
3445
|
+
}
|
|
3446
|
+
static fromEvent(t, n = null) {
|
|
3447
|
+
if (this.isMouseEvent(t))
|
|
3448
|
+
return new J(t.clientX, t.clientY);
|
|
3449
|
+
if (n === null || t.changedTouches.length === 1)
|
|
3450
|
+
return new J(t.changedTouches[0].clientX, t.changedTouches[0].clientY);
|
|
3451
|
+
for (let o = 0; o < t.changedTouches.length; o++)
|
|
3452
|
+
if (t.changedTouches[o].target === n)
|
|
3453
|
+
return new J(t.changedTouches[o].clientX, t.changedTouches[o].clientY);
|
|
3454
|
+
}
|
|
3455
|
+
static isMouseEvent(t) {
|
|
3456
|
+
return Object.prototype.toString.apply(t).indexOf("MouseEvent") === 8;
|
|
3457
|
+
}
|
|
3458
|
+
static isIPosition(t) {
|
|
3459
|
+
return !!t && "x" in t && "y" in t;
|
|
3460
|
+
}
|
|
3461
|
+
static getCurrent(t) {
|
|
3462
|
+
const n = new J(0, 0);
|
|
3463
|
+
if (window) {
|
|
3464
|
+
const o = window.getComputedStyle(t);
|
|
3465
|
+
if (o) {
|
|
3466
|
+
const a = parseInt(o.getPropertyValue("left"), 10), s = parseInt(o.getPropertyValue("top"), 10);
|
|
3467
|
+
n.x = isNaN(a) ? 0 : a, n.y = isNaN(s) ? 0 : s;
|
|
3468
|
+
}
|
|
3469
|
+
return n;
|
|
3470
|
+
}
|
|
3471
|
+
return null;
|
|
3472
|
+
}
|
|
3473
|
+
static copy(t) {
|
|
3474
|
+
return new J(0, 0).set(t);
|
|
3475
|
+
}
|
|
3476
|
+
get value() {
|
|
3477
|
+
return { x: this.x, y: this.y };
|
|
3478
|
+
}
|
|
3479
|
+
add(t) {
|
|
3480
|
+
return this.x += t.x, this.y += t.y, this;
|
|
3481
|
+
}
|
|
3482
|
+
subtract(t) {
|
|
3483
|
+
return this.x -= t.x, this.y -= t.y, this;
|
|
3484
|
+
}
|
|
3485
|
+
multiply(t) {
|
|
3486
|
+
this.x *= t, this.y *= t;
|
|
3487
|
+
}
|
|
3488
|
+
divide(t) {
|
|
3489
|
+
this.x /= t, this.y /= t;
|
|
3490
|
+
}
|
|
3491
|
+
reset() {
|
|
3492
|
+
return this.x = 0, this.y = 0, this;
|
|
3493
|
+
}
|
|
3494
|
+
set(t) {
|
|
3495
|
+
return this.x = t.x, this.y = t.y, this;
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
class ne {
|
|
3499
|
+
constructor(t, n) {
|
|
3500
|
+
this.width = t, this.height = n;
|
|
3501
|
+
}
|
|
3502
|
+
static getCurrent(t) {
|
|
3503
|
+
const n = new ne(0, 0);
|
|
3504
|
+
if (window) {
|
|
3505
|
+
const o = window.getComputedStyle(t);
|
|
3506
|
+
return o && (n.width = parseInt(o.getPropertyValue("width"), 10), n.height = parseInt(o.getPropertyValue("height"), 10)), n;
|
|
3507
|
+
}
|
|
3508
|
+
return null;
|
|
3509
|
+
}
|
|
3510
|
+
static copy(t) {
|
|
3511
|
+
return new ne(0, 0).set(t);
|
|
3512
|
+
}
|
|
3513
|
+
set(t) {
|
|
3514
|
+
return this.width = t.width, this.height = t.height, this;
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
function La(e, t) {
|
|
3518
|
+
const n = d(), o = d(), a = d(), s = d(), l = d(), u = d(), i = d(), r = d(), p = d(), c = d(), v = d(), b = d(), f = d(e.draggable), g = d(!1);
|
|
3519
|
+
function y() {
|
|
3520
|
+
const M = o.value || document.body, S = window.getComputedStyle(M);
|
|
3521
|
+
if (!S || !n.value)
|
|
3522
|
+
return;
|
|
3523
|
+
const q = J.getTransformInfo(n.value), $ = {};
|
|
3524
|
+
i.value && ($.deltaL = n.value.offsetLeft - i.value.x, $.deltaT = n.value.offsetTop - i.value.y);
|
|
3525
|
+
const W = S.getPropertyValue("position");
|
|
3526
|
+
$.width = M.clientWidth, $.height = M.clientHeight, $.pr = parseInt(S.getPropertyValue("padding-right"), 10), $.pb = parseInt(S.getPropertyValue("padding-bottom"), 10), $.position = S.getPropertyValue("position"), W === "static" && (M.style.position = "relative"), $.translateX = q.x, $.translateY = q.y, c.value = $;
|
|
3527
|
+
}
|
|
3528
|
+
function C(M) {
|
|
3529
|
+
if (n.value) {
|
|
3530
|
+
s.value = ne.getCurrent(n.value), l.value = J.getCurrent(n.value), u.value = s.value ? ne.copy(s.value) : null, i.value = l.value ? J.copy(l.value) : null, y();
|
|
3531
|
+
const S = M.target.getAttribute("type") || "";
|
|
3532
|
+
r.value = {
|
|
3533
|
+
n: !!S.match(/n/),
|
|
3534
|
+
s: !!S.match(/s/),
|
|
3535
|
+
w: !!S.match(/w/),
|
|
3536
|
+
e: !!S.match(/e/)
|
|
3537
|
+
};
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
function h() {
|
|
3541
|
+
var M, S, q, $;
|
|
3542
|
+
if (n.value) {
|
|
3543
|
+
const W = n.value;
|
|
3544
|
+
r.value && ((r.value.n || r.value.s) && ((M = u.value) != null && M.height) && (W.style.height = u.value.height + "px"), (r.value.w || r.value.e) && ((S = u.value) != null && S.width) && (W.style.width = u.value.width + "px"), i.value && ((q = i.value) != null && q.x && (W.style.left = i.value.x + "px"), ($ = i.value) != null && $.y && (W.style.top = i.value.y + "px")));
|
|
3545
|
+
}
|
|
3546
|
+
}
|
|
3547
|
+
function F() {
|
|
3548
|
+
const M = e.minHeight ? e.minHeight : 1, S = e.minWidth ? e.minWidth : 1;
|
|
3549
|
+
u.value && i.value && r.value && s.value && (u.value.height < M && (u.value.height = M, r.value.n && l.value && (i.value.y = l.value.y + (s.value.height - M))), u.value.width < S && (u.value.width = S, r.value.w && l.value && (i.value.x = l.value.x + (s.value.width - S))), e.maxHeight && u.value.height > e.maxHeight && (u.value.height = e.maxHeight, l.value && r.value.n && (i.value.y = l.value.y + (s.value.height - e.maxHeight))), e.maxWidth && u.value.width > e.maxWidth && (u.value.width = e.maxWidth, r.value.w && l.value && (i.value.x = l.value.x + (s.value.width - e.maxWidth))));
|
|
3550
|
+
}
|
|
3551
|
+
function k() {
|
|
3552
|
+
if (o.value) {
|
|
3553
|
+
const M = c.value;
|
|
3554
|
+
if (i.value && u.value && r.value && s.value) {
|
|
3555
|
+
const S = M.width - M.pr - M.deltaL - M.translateX - i.value.x, q = M.height - M.pb - M.deltaT - M.translateY - i.value.y;
|
|
3556
|
+
r.value.n && i.value.y + M.translateY < 0 && l.value && (i.value.y = -M.translateY, u.value.height = s.value.height + l.value.y + M.translateY), r.value.w && i.value.x + M.translateX < 0 && l.value && (i.value.x = -M.translateX, u.value.width = s.value.width + l.value.x + M.translateX), u.value.width > S && (u.value.width = S), u.value.height > q && (u.value.height = q);
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
function R(M) {
|
|
3561
|
+
if (!a.value || !s.value || !l.value || !r.value)
|
|
3562
|
+
return;
|
|
3563
|
+
M.subtract(a.value);
|
|
3564
|
+
const S = M.x, q = M.y;
|
|
3565
|
+
r.value.n ? (i.value.y = l.value.y + q, u.value.height = s.value.height - q) : r.value.s && (u.value.height = s.value.height + q), r.value.e ? u.value.width = s.value.width + S : r.value.w && (u.value.width = s.value.width - S, i.value.x = l.value.x + S), k(), F(), h();
|
|
3566
|
+
}
|
|
3567
|
+
function T(M) {
|
|
3568
|
+
if (!p.value)
|
|
3569
|
+
return;
|
|
3570
|
+
const S = J.fromEvent(M);
|
|
3571
|
+
S && R(S);
|
|
3572
|
+
}
|
|
3573
|
+
function w() {
|
|
3574
|
+
if (n.value) {
|
|
3575
|
+
const {
|
|
3576
|
+
width: M,
|
|
3577
|
+
height: S,
|
|
3578
|
+
x: q,
|
|
3579
|
+
y: $
|
|
3580
|
+
} = n.value.getBoundingClientRect(), W = J.getTransformInfo(n.value);
|
|
3581
|
+
return {
|
|
3582
|
+
size: {
|
|
3583
|
+
width: M,
|
|
3584
|
+
height: S
|
|
3585
|
+
},
|
|
3586
|
+
position: {
|
|
3587
|
+
x: q - W.x,
|
|
3588
|
+
y: $ - W.y
|
|
3589
|
+
}
|
|
3590
|
+
};
|
|
3591
|
+
}
|
|
3592
|
+
return null;
|
|
3593
|
+
}
|
|
3594
|
+
function A(M) {
|
|
3595
|
+
if (n.value) {
|
|
3596
|
+
const S = w();
|
|
3597
|
+
v.value = S;
|
|
3598
|
+
}
|
|
3599
|
+
a.value = void 0, s.value = null, l.value = null, u.value = null, i.value = null, r.value = null, p.value = null, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", A);
|
|
3600
|
+
}
|
|
3601
|
+
function E() {
|
|
3602
|
+
document.addEventListener("mousemove", T), document.addEventListener("mouseup", A);
|
|
3603
|
+
}
|
|
3604
|
+
function O(M) {
|
|
3605
|
+
M instanceof MouseEvent && M.button === 2 || f.value && (M.stopPropagation(), M.preventDefault(), a.value = J.fromEvent(M), p.value = M.target, C(M), E());
|
|
3606
|
+
}
|
|
3607
|
+
function N(M) {
|
|
3608
|
+
return n.value = M, m(ce, null, [m("div", {
|
|
3609
|
+
class: "fv-resizable-handle fv-resizable-n",
|
|
3610
|
+
type: "n",
|
|
3611
|
+
onMousedown: (S) => O(S)
|
|
3612
|
+
}, null), m("div", {
|
|
3613
|
+
class: "fv-resizable-handle fv-resizable-e",
|
|
3614
|
+
type: "e",
|
|
3615
|
+
onMousedown: (S) => O(S)
|
|
3616
|
+
}, null), m("div", {
|
|
3617
|
+
class: "fv-resizable-handle fv-resizable-s",
|
|
3618
|
+
type: "s",
|
|
3619
|
+
onMousedown: (S) => O(S)
|
|
3620
|
+
}, null), m("div", {
|
|
3621
|
+
class: "fv-resizable-handle fv-resizable-w",
|
|
3622
|
+
type: "w",
|
|
3623
|
+
onMousedown: (S) => O(S)
|
|
3624
|
+
}, null), m("div", {
|
|
3625
|
+
class: "fv-resizable-handle fv-resizable-ne",
|
|
3626
|
+
type: "ne",
|
|
3627
|
+
onMousedown: (S) => O(S)
|
|
3628
|
+
}, null), m("div", {
|
|
3629
|
+
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
3630
|
+
type: "se",
|
|
3631
|
+
onMousedown: (S) => O(S)
|
|
3632
|
+
}, null), m("div", {
|
|
3633
|
+
class: "fv-resizable-handle fv-resizable-sw",
|
|
3634
|
+
type: "sw",
|
|
3635
|
+
onMousedown: (S) => O(S)
|
|
3636
|
+
}, null), m("div", {
|
|
3637
|
+
class: "fv-resizable-handle fv-resizable-nw",
|
|
3638
|
+
type: "nw",
|
|
3639
|
+
onMousedown: (S) => O(S)
|
|
3640
|
+
}, null)]);
|
|
3641
|
+
}
|
|
3642
|
+
function U(M = !0) {
|
|
3643
|
+
const S = o.value || document.body, q = ne.getCurrent(S), $ = n.value;
|
|
3644
|
+
M && (b.value = w(), b.value.transform = $.style.transform), q && $ && (u.value = q, $.style.height = u.value.height - 14 + "px", $.style.width = u.value.width - 14 + "px", $.style.left = "7px", $.style.top = "7px", $.style.transform = "", v.value = {
|
|
3645
|
+
size: u.value,
|
|
3646
|
+
position: {
|
|
3647
|
+
x: 0,
|
|
3648
|
+
y: 0
|
|
3649
|
+
}
|
|
3650
|
+
}, f.value = !1, g.value = !0);
|
|
3651
|
+
}
|
|
3652
|
+
function D() {
|
|
3653
|
+
var M, S;
|
|
3654
|
+
if (b.value) {
|
|
3655
|
+
const q = {
|
|
3656
|
+
width: b.value.size.width || 0,
|
|
3657
|
+
height: b.value.size.height || 0
|
|
3658
|
+
}, $ = {
|
|
3659
|
+
x: (window.innerWidth - q.width) / 2,
|
|
3660
|
+
y: (window.innerHeight - q.height) / 2
|
|
3661
|
+
};
|
|
3662
|
+
(M = u.value) == null || M.set(q), (S = i.value) == null || S.set($);
|
|
3663
|
+
const W = n.value;
|
|
3664
|
+
W.style.height = q.height + "px", W.style.width = q.width + "px", W.style.left = `${$.x}px`, W.style.top = `${$.y}px`, W.style.transform = "", v.value = {
|
|
3665
|
+
size: q,
|
|
3666
|
+
position: $
|
|
3667
|
+
}, f.value = e.draggable, g.value = !1;
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
function H() {
|
|
3671
|
+
if (n.value) {
|
|
3672
|
+
const M = ne.getCurrent(n.value);
|
|
3673
|
+
if (M) {
|
|
3674
|
+
const {
|
|
3675
|
+
width: S,
|
|
3676
|
+
height: q
|
|
3677
|
+
} = M;
|
|
3678
|
+
n.value.style.left = `${(window.innerWidth - S) / 2}px`, n.value.style.top = `${(window.innerHeight - q) / 2}px`, n.value.style.transform = "";
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3682
|
+
function Y() {
|
|
3683
|
+
const M = () => {
|
|
3684
|
+
g.value ? U(!1) : H();
|
|
3685
|
+
};
|
|
3686
|
+
return window.addEventListener("resize", M), () => {
|
|
3687
|
+
window.removeEventListener("resize", M);
|
|
3688
|
+
};
|
|
3689
|
+
}
|
|
3690
|
+
const Q = Y();
|
|
3691
|
+
return {
|
|
3692
|
+
renderResizeBar: N,
|
|
3693
|
+
boundingElement: o,
|
|
3694
|
+
resizedEventParam: v,
|
|
3695
|
+
maximize: U,
|
|
3696
|
+
restore: D,
|
|
3697
|
+
allowDrag: f,
|
|
3698
|
+
isMaximized: g,
|
|
3699
|
+
unWindowResizeHandle: Q
|
|
3700
|
+
};
|
|
3701
|
+
}
|
|
3702
|
+
function Aa(e, t, n) {
|
|
3703
|
+
const o = d(), a = d(e.draggable), s = d(e.lockAxis), l = d(), u = d(), i = d(!1), r = d(new J(0, 0)), p = d(new J(0, 0)), c = d(new J(0, 0)), v = d(new J(0, 0));
|
|
3704
|
+
X(() => n.value, (w) => {
|
|
3705
|
+
l.value.style.cursor = w ? "move" : "default";
|
|
3706
|
+
});
|
|
3707
|
+
function b(w, A) {
|
|
3708
|
+
if (A.tagName === "BUTTON")
|
|
3709
|
+
return !1;
|
|
3710
|
+
if (A === w)
|
|
3711
|
+
return !0;
|
|
3712
|
+
for (const E in A.children)
|
|
3713
|
+
if (A.children.hasOwnProperty(E) && b(w, A.children[E]))
|
|
3714
|
+
return !0;
|
|
3715
|
+
return !1;
|
|
3716
|
+
}
|
|
3717
|
+
function f() {
|
|
3718
|
+
var O, N;
|
|
3719
|
+
let w = c.value.x + p.value.x, A = c.value.y + p.value.y;
|
|
3720
|
+
s.value === "x" ? (w = ((O = r.value) == null ? void 0 : O.x) || 0, c.value.x = 0) : s.value === "y" && (A = ((N = r.value) == null ? void 0 : N.y) || 0, c.value.y = 0);
|
|
3721
|
+
const E = `translate3d(${Math.round(w)}px, ${Math.round(A)}px, 0px)`;
|
|
3722
|
+
o.value && (o.value.style.transform = E), v.value.x = w, v.value.y = A;
|
|
3723
|
+
}
|
|
3724
|
+
function g() {
|
|
3725
|
+
if (!u.value || !o.value)
|
|
3726
|
+
return null;
|
|
3727
|
+
const w = u.value.getBoundingClientRect(), A = o.value.getBoundingClientRect(), E = {
|
|
3728
|
+
top: w.top < A.top,
|
|
3729
|
+
right: w.right > A.right,
|
|
3730
|
+
bottom: w.bottom > A.bottom,
|
|
3731
|
+
left: w.left < A.left
|
|
3732
|
+
};
|
|
3733
|
+
return E.top || (c.value.y -= A.top - w.top), E.bottom || (c.value.y -= A.bottom - w.bottom), E.right || (c.value.x -= A.right - w.right), E.left || (c.value.x -= A.left - w.left), f(), E;
|
|
3734
|
+
}
|
|
3735
|
+
function y(w) {
|
|
3736
|
+
w && (r.value && w.subtract(r.value), c.value.set(w), f(), g());
|
|
3737
|
+
}
|
|
3738
|
+
function C(w) {
|
|
3739
|
+
i.value && a.value && (w.stopPropagation(), w.preventDefault(), y(J.fromEvent(w, l.value)));
|
|
3740
|
+
}
|
|
3741
|
+
function h() {
|
|
3742
|
+
var w;
|
|
3743
|
+
i.value && (i.value = !1, p.value.add(c.value), c.value.reset(), (w = o.value) == null || w.classList.remove("ng-dragging"), document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", h));
|
|
3744
|
+
}
|
|
3745
|
+
function F() {
|
|
3746
|
+
!i.value && l.value && (i.value = !0, l.value.classList.add("ng-dragging"), document.addEventListener("mousemove", C), document.addEventListener("mouseup", h));
|
|
3747
|
+
}
|
|
3748
|
+
function k() {
|
|
3749
|
+
if (o.value) {
|
|
3750
|
+
const w = J.getTransformInfo(o.value);
|
|
3751
|
+
p.value.set(w);
|
|
3752
|
+
return;
|
|
3753
|
+
}
|
|
3754
|
+
p.value.reset();
|
|
3755
|
+
}
|
|
3756
|
+
function R(w) {
|
|
3757
|
+
if (!n.value || w instanceof MouseEvent && w.button === 2)
|
|
3758
|
+
return;
|
|
3759
|
+
const A = w.target || w.srcElement;
|
|
3760
|
+
l.value !== void 0 && A && !b(A, l.value) || a.value !== !1 && (document.body.click(), w.stopPropagation(), w.preventDefault(), r.value = J.fromEvent(w, o.value), k(), F());
|
|
3761
|
+
}
|
|
3762
|
+
function T(w, A, E) {
|
|
3763
|
+
if (a.value && A) {
|
|
3764
|
+
if (w)
|
|
3765
|
+
l.value = w;
|
|
3766
|
+
else if (e.dragHandle) {
|
|
3767
|
+
if (e.dragHandle instanceof HTMLElement)
|
|
3768
|
+
l.value = e.dragHandle;
|
|
3769
|
+
else if (typeof e.dragHandle == "string") {
|
|
3770
|
+
const O = A.querySelector(e.dragHandle);
|
|
3771
|
+
O && (l.value = O);
|
|
3772
|
+
}
|
|
3773
|
+
}
|
|
3774
|
+
o.value = A, u.value = E, l.value.classList.add("ng-draggable"), l.value.addEventListener("mousedown", R);
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
return {
|
|
3778
|
+
registerDraggle: T,
|
|
3779
|
+
resetTranslate: k
|
|
3780
|
+
};
|
|
3781
|
+
}
|
|
3782
|
+
function nt(e, t) {
|
|
3783
|
+
if (e) {
|
|
3784
|
+
const n = (o) => {
|
|
3785
|
+
o.key.toLowerCase() === e.toLowerCase() && t({ event: o, key: e });
|
|
3786
|
+
};
|
|
3787
|
+
return document.addEventListener("keydown", n), () => {
|
|
3788
|
+
document.removeEventListener("keydown", n);
|
|
3789
|
+
};
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3792
|
+
function Da(e, t) {
|
|
3793
|
+
const n = d(e.enableEsc);
|
|
3794
|
+
let o = null;
|
|
3795
|
+
return n.value ? (o = nt("Escape", (a) => {
|
|
3796
|
+
t.emit("esc", { event: a.event, type: "esc" });
|
|
3797
|
+
}), {
|
|
3798
|
+
remove: o
|
|
3799
|
+
}) : null;
|
|
3800
|
+
}
|
|
3801
|
+
function Oa(e, t) {
|
|
3802
|
+
const n = d(e.enableEnter);
|
|
3803
|
+
let o = null;
|
|
3804
|
+
return n.value ? (o = nt("Enter", (a) => {
|
|
3805
|
+
t.emit("enter", { event: a.event, type: "enter" });
|
|
3806
|
+
}), {
|
|
3807
|
+
remove: o
|
|
3808
|
+
}) : null;
|
|
3809
|
+
}
|
|
3810
|
+
const ot = /* @__PURE__ */ Z({
|
|
3811
|
+
name: "FModal",
|
|
3812
|
+
props: Ia,
|
|
3813
|
+
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
3814
|
+
setup(e, t) {
|
|
3815
|
+
const n = d(e.width || 300), o = d(e.height || 200), a = d(e.modelValue), s = d(""), l = d(e.class), u = d(e.fitContent), i = d(e.showHeader), r = d(""), p = d(e.showCloseButton), c = d(e.showMaxButton), v = d(!1), b = d(""), f = d(""), g = d(""), y = d(e.showButtons), C = d(e.title), h = d(e.reiszeable), F = d(e.containment || null), k = d();
|
|
3816
|
+
function R(B, z) {
|
|
3817
|
+
a.value = !1, t.emit("update:modelValue", !1), z != null && t.emit(z ? "accept" : "cancel"), t.emit("closed", B);
|
|
3818
|
+
}
|
|
3819
|
+
const T = [{
|
|
3820
|
+
name: "cancel",
|
|
3821
|
+
text: "取消",
|
|
3822
|
+
class: "btn btn-secondary",
|
|
3823
|
+
handle: (B) => {
|
|
3824
|
+
R(B, !1);
|
|
3825
|
+
}
|
|
3826
|
+
}, {
|
|
3827
|
+
name: "accept",
|
|
3828
|
+
text: "确定",
|
|
3829
|
+
class: "btn btn-primary",
|
|
3830
|
+
handle: (B) => {
|
|
3831
|
+
R(B, !0);
|
|
3832
|
+
}
|
|
3833
|
+
}], w = d(e.buttons && e.buttons.length ? e.buttons : T), A = x(() => !!r.value), E = x(() => !!y.value && !!w.value), O = d(), N = d(), U = d(!1), {
|
|
3834
|
+
renderResizeBar: D,
|
|
3835
|
+
maximize: H,
|
|
3836
|
+
restore: Y,
|
|
3837
|
+
boundingElement: Q,
|
|
3838
|
+
resizedEventParam: M,
|
|
3839
|
+
allowDrag: S,
|
|
3840
|
+
unWindowResizeHandle: q
|
|
3841
|
+
} = La(e), {
|
|
3842
|
+
registerDraggle: $
|
|
3843
|
+
} = Aa(e, t, S);
|
|
3844
|
+
X(() => e.title, (B, z) => {
|
|
3845
|
+
B !== z && (C.value = B);
|
|
3846
|
+
}), X(() => e.modelValue, (B, z) => {
|
|
3847
|
+
B !== z && (a.value = B);
|
|
3848
|
+
}), X(() => e.showHeader, (B, z) => {
|
|
3849
|
+
B !== z && (i.value = B);
|
|
3850
|
+
}), X(() => e.showButtons, (B, z) => {
|
|
3851
|
+
B !== z && (y.value = B);
|
|
3852
|
+
}), X(() => M.value, (B, z) => {
|
|
3853
|
+
const le = B || {}, ve = z || {};
|
|
3854
|
+
JSON.stringify(le) !== JSON.stringify(ve) && t.emit("resize", {
|
|
3855
|
+
newSize: B,
|
|
3856
|
+
oldSize: z
|
|
3857
|
+
});
|
|
3858
|
+
});
|
|
3859
|
+
function W() {
|
|
3860
|
+
const B = document.querySelectorAll(".farris-modal").length;
|
|
3861
|
+
(!B || B - 1 <= 0) && document.body.classList.remove("modal-open"), k.value && k.value.classList.remove("show");
|
|
3862
|
+
}
|
|
3863
|
+
const re = x(() => (a.value ? document.body.classList.add("modal-open") : W(), a.value)), fe = x(() => {
|
|
3864
|
+
const B = {
|
|
3865
|
+
modal: !0,
|
|
3866
|
+
"farris-modal": !0,
|
|
3867
|
+
fade: !0
|
|
3868
|
+
};
|
|
3869
|
+
return B["f-modal-fitContent"] = !!u.value, B.show = !!re.value, B;
|
|
3870
|
+
}), se = x(() => {
|
|
3871
|
+
var le;
|
|
3872
|
+
const B = {
|
|
3873
|
+
"modal-dialog": !0
|
|
3874
|
+
}, z = (le = l.value) == null ? void 0 : le.split(" ");
|
|
3875
|
+
return z == null || z.reduce((ve, gt) => (ve[gt] = !0, ve), B), B;
|
|
3876
|
+
}), me = x(() => ({
|
|
3877
|
+
position: "absolute",
|
|
3878
|
+
top: `${(window.innerHeight - o.value) / 2}px`,
|
|
3879
|
+
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
3880
|
+
width: `${n.value}px`,
|
|
3881
|
+
height: u.value ? "auto" : `${o.value}px`
|
|
3882
|
+
})), Ce = x(() => ({
|
|
3883
|
+
"modal-content": !0,
|
|
3884
|
+
"modal-content-has-header": i.value
|
|
3885
|
+
})), rt = x(() => {
|
|
3886
|
+
const B = {
|
|
3887
|
+
display: i.value ? "" : "none"
|
|
3888
|
+
};
|
|
3889
|
+
return B["pointer-events"] = S.value ? "auto" : "none", B;
|
|
3890
|
+
}), st = x(() => ({
|
|
3891
|
+
"f-icon": !0,
|
|
3892
|
+
modal_maximize: !0,
|
|
3893
|
+
modalrevert: U.value
|
|
3894
|
+
})), lt = x(() => ({
|
|
3895
|
+
"modal-body": !0,
|
|
3896
|
+
"f-utils-flex-column": b.value === "iframe"
|
|
3897
|
+
}));
|
|
3898
|
+
function it() {
|
|
3899
|
+
return {};
|
|
3900
|
+
}
|
|
3901
|
+
const ut = x(() => {
|
|
3902
|
+
const B = {
|
|
3903
|
+
textAlgin: g.value
|
|
3904
|
+
}, z = it();
|
|
3905
|
+
return Object.assign(B, z);
|
|
3906
|
+
});
|
|
3907
|
+
function Ae(B) {
|
|
3908
|
+
if (B.stopPropagation(), U.value) {
|
|
3909
|
+
U.value = !1, Y();
|
|
3910
|
+
return;
|
|
3911
|
+
}
|
|
3912
|
+
H(), U.value = !0;
|
|
3913
|
+
}
|
|
3914
|
+
async function ct(B, z) {
|
|
3915
|
+
B.handle && await B.handle(z, B) && t.emit("closed", z);
|
|
3916
|
+
}
|
|
3917
|
+
function dt(B) {
|
|
3918
|
+
B.width && (n.value = B.width), B.height && (o.value = B.height), B.buttons && (w.value = B.buttons), B.title && (C.value = B.title);
|
|
3919
|
+
}
|
|
3920
|
+
let we = null, xe = null;
|
|
3921
|
+
K(() => {
|
|
3922
|
+
N.value && !F.value && (F.value = N.value.parentElement, Q.value = F.value, $(O.value, N.value, Q.value)), re.value && document.body.classList.add("modal-open"), we = Da(e, t), xe = Oa(e, t);
|
|
3923
|
+
}), $e(() => {
|
|
3924
|
+
W(), q && q(), we && we.remove(), xe && xe.remove();
|
|
3925
|
+
}), t.expose({
|
|
3926
|
+
modalElementRef: N,
|
|
3927
|
+
updateModalOptions: dt,
|
|
3928
|
+
close: R,
|
|
3929
|
+
maxDialog: Ae
|
|
3930
|
+
});
|
|
3931
|
+
function pt() {
|
|
3932
|
+
return m("ul", null, [v.value && m("li", {
|
|
3933
|
+
class: "f-btn-icon f-bare"
|
|
3934
|
+
}, [m("span", {
|
|
3935
|
+
class: "f-icon modal_minimize"
|
|
3936
|
+
}, null)]), c.value && m("li", {
|
|
3937
|
+
onClick: Ae,
|
|
3938
|
+
class: "f-btn-icon f-bare",
|
|
3939
|
+
style: "pointer-events: auto;"
|
|
3940
|
+
}, [m("span", {
|
|
3941
|
+
class: st.value
|
|
3942
|
+
}, null)]), p.value && m("li", {
|
|
3943
|
+
class: "f-btn-icon f-bare",
|
|
3944
|
+
onClick: (B) => R(B, !1),
|
|
3945
|
+
style: "pointer-events: auto;"
|
|
3946
|
+
}, [m("span", {
|
|
3947
|
+
class: "f-icon modal_close"
|
|
3948
|
+
}, null)])]);
|
|
3949
|
+
}
|
|
3950
|
+
function ft() {
|
|
3951
|
+
return m("div", {
|
|
3952
|
+
class: "modal-footer",
|
|
3953
|
+
style: ut.value
|
|
3954
|
+
}, [w.value && w.value.map((B) => m("button", {
|
|
3955
|
+
name: B.name,
|
|
3956
|
+
type: "button",
|
|
3957
|
+
class: B.class + (B.iconClass ? " btn-icontext" : ""),
|
|
3958
|
+
onClick: (z) => {
|
|
3959
|
+
ct(B, z);
|
|
3960
|
+
}
|
|
3961
|
+
}, [!!B.iconClass && m("i", {
|
|
3962
|
+
class: B.iconClass
|
|
3963
|
+
}, null), B.text]))]);
|
|
3964
|
+
}
|
|
3965
|
+
function mt() {
|
|
3966
|
+
return m("div", {
|
|
3967
|
+
ref: O,
|
|
3968
|
+
class: "modal-header",
|
|
3969
|
+
style: rt.value
|
|
3970
|
+
}, [m("div", {
|
|
3971
|
+
class: "modal-title"
|
|
3972
|
+
}, [A.value && m("span", {
|
|
3973
|
+
class: r.value,
|
|
3974
|
+
style: "margin-right: 8px"
|
|
3975
|
+
}, null), m("span", {
|
|
3976
|
+
class: "modal-title-label"
|
|
3977
|
+
}, [C.value])]), m("div", {
|
|
3978
|
+
class: "actions"
|
|
3979
|
+
}, [pt()])]);
|
|
3980
|
+
}
|
|
3981
|
+
function vt(B) {
|
|
3982
|
+
B.stopPropagation();
|
|
3983
|
+
}
|
|
3984
|
+
return () => m(wt, {
|
|
3985
|
+
to: "body"
|
|
3986
|
+
}, {
|
|
3987
|
+
default: () => [re.value && m(xt, {
|
|
3988
|
+
name: "fade",
|
|
3989
|
+
appear: !0
|
|
3990
|
+
}, {
|
|
3991
|
+
default: () => {
|
|
3992
|
+
var B, z;
|
|
3993
|
+
return [m("div", {
|
|
3994
|
+
class: fe.value,
|
|
3995
|
+
style: "display: block",
|
|
3996
|
+
ref: k,
|
|
3997
|
+
onClick: vt
|
|
3998
|
+
}, [m("div", {
|
|
3999
|
+
id: s.value,
|
|
4000
|
+
class: se.value,
|
|
4001
|
+
style: me.value,
|
|
4002
|
+
ref: N
|
|
4003
|
+
}, [m("div", {
|
|
4004
|
+
class: Ce.value
|
|
4005
|
+
}, [i.value && mt(), m("div", {
|
|
4006
|
+
class: lt.value
|
|
4007
|
+
}, [(z = (B = t.slots).default) == null ? void 0 : z.call(B), b.value === "iframe" && m("iframe", {
|
|
4008
|
+
title: s.value,
|
|
4009
|
+
class: "f-utils-fill",
|
|
4010
|
+
width: "100%",
|
|
4011
|
+
frameborder: "0",
|
|
4012
|
+
src: f.value
|
|
4013
|
+
}, null)]), E.value && ft()]), !u.value && h.value && N.value && D(N.value)])])];
|
|
4014
|
+
}
|
|
4015
|
+
})]
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
});
|
|
4019
|
+
function at(e) {
|
|
4020
|
+
if (e.content && e.content.render)
|
|
4021
|
+
return e.content.render;
|
|
4022
|
+
if (e.render && typeof e.render == "function")
|
|
4023
|
+
return e.render;
|
|
4024
|
+
}
|
|
4025
|
+
function Va(e) {
|
|
4026
|
+
const t = document.createElement("div");
|
|
4027
|
+
t.style.display = "contents";
|
|
4028
|
+
const n = Bt({
|
|
4029
|
+
setup(o, a) {
|
|
4030
|
+
$e(() => {
|
|
4031
|
+
document.body.removeChild(t);
|
|
4032
|
+
});
|
|
4033
|
+
const s = d(), l = d(e.class || ""), u = d(!!e.showButtons), i = d(!!e.showHeader), r = d(e.showCloseButton == null ? !0 : e.showCloseButton), p = d(!0), c = d(e.title || ""), v = e.acceptCallback || (() => {
|
|
4034
|
+
}), b = e.rejectCallback || (() => {
|
|
4035
|
+
}), f = e.closedCallback || ((h) => {
|
|
4036
|
+
}), g = e.resizeHandle || ((h) => {
|
|
4037
|
+
}), y = at(e), C = (h) => {
|
|
4038
|
+
p.value = !1, n.unmount(), f(h);
|
|
4039
|
+
};
|
|
4040
|
+
return K(() => {
|
|
4041
|
+
}), a.expose({
|
|
4042
|
+
modalRef: s
|
|
4043
|
+
}), () => m(ot, {
|
|
4044
|
+
ref: s,
|
|
4045
|
+
class: l.value,
|
|
4046
|
+
modelValue: p.value,
|
|
4047
|
+
"onUpdate:modelValue": (h) => p.value = h,
|
|
4048
|
+
title: c.value,
|
|
4049
|
+
width: e.width,
|
|
4050
|
+
height: e.height,
|
|
4051
|
+
buttons: e.buttons,
|
|
4052
|
+
"show-header": i.value,
|
|
4053
|
+
"show-buttons": u.value,
|
|
4054
|
+
"show-close-button": r.value,
|
|
4055
|
+
"show-max-button": !1,
|
|
4056
|
+
onAccept: v,
|
|
4057
|
+
onCancel: b,
|
|
4058
|
+
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
4059
|
+
onClosed: C,
|
|
4060
|
+
onResize: g
|
|
4061
|
+
}, {
|
|
4062
|
+
default: () => [y && y(n)]
|
|
4063
|
+
});
|
|
4064
|
+
}
|
|
4065
|
+
});
|
|
4066
|
+
return document.body.appendChild(t), n.mount(t), n;
|
|
4067
|
+
}
|
|
4068
|
+
class Ra {
|
|
4069
|
+
constructor(t) {
|
|
4070
|
+
G(this, "appContext", null);
|
|
4071
|
+
G(this, "modalRef", d());
|
|
4072
|
+
G(this, "activeModalIndex", d(0));
|
|
4073
|
+
G(this, "modalRefs", {});
|
|
4074
|
+
G(this, "isUseEscCloseModal", d(!1));
|
|
4075
|
+
G(this, "activeModalInstance", x(() => this.modalRefs[this.activeModalIndex.value]));
|
|
4076
|
+
this.appContext = t ? t._context : null;
|
|
4077
|
+
}
|
|
4078
|
+
getCurrentModal() {
|
|
4079
|
+
return this.activeModalInstance.value;
|
|
4080
|
+
}
|
|
4081
|
+
static show(t) {
|
|
4082
|
+
const n = Object.assign({
|
|
4083
|
+
title: "",
|
|
4084
|
+
showButtons: !0,
|
|
4085
|
+
showHeader: !0
|
|
4086
|
+
}, t);
|
|
4087
|
+
return Va(n);
|
|
4088
|
+
}
|
|
4089
|
+
open(t) {
|
|
4090
|
+
const n = document.createDocumentFragment();
|
|
4091
|
+
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
4092
|
+
const o = Tt(Object.assign({
|
|
4093
|
+
title: "",
|
|
4094
|
+
showButtons: !0,
|
|
4095
|
+
showHeader: !0
|
|
4096
|
+
}, t)), a = d(!0), s = o.value.acceptCallback || (() => {
|
|
4097
|
+
}), l = o.value.rejectCallback || (() => {
|
|
4098
|
+
}), u = o.value.closedCallback || ((C, h) => {
|
|
4099
|
+
}), i = o.value.resizeHandle || ((C) => {
|
|
4100
|
+
});
|
|
4101
|
+
let r;
|
|
4102
|
+
const p = at(o.value), c = (C) => {
|
|
4103
|
+
var F;
|
|
4104
|
+
a.value = !1;
|
|
4105
|
+
const h = (F = C == null ? void 0 : C.target) == null ? void 0 : F.classList.contains("modal_close");
|
|
4106
|
+
u(C, this.isUseEscCloseModal.value ? "esc" : h ? "icon" : "button");
|
|
4107
|
+
}, v = (C) => {
|
|
4108
|
+
c(C), r && ye(() => {
|
|
4109
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], Te(null, n), r = null, this.modalRef.value = null, this.modalRefs) {
|
|
4110
|
+
const h = Object.keys(this.modalRefs);
|
|
4111
|
+
h.length > 0 ? this.activeModalIndex.value = Math.max(...h) : this.activeModalIndex.value = 0;
|
|
4112
|
+
}
|
|
4113
|
+
this.isUseEscCloseModal.value = !1;
|
|
4114
|
+
});
|
|
4115
|
+
}, b = (C) => {
|
|
4116
|
+
var h;
|
|
4117
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((h = this.activeModalInstance.value) == null || h.close(C == null ? void 0 : C.event));
|
|
4118
|
+
}, f = () => m(ot, ae({
|
|
4119
|
+
ref: this.modalRef,
|
|
4120
|
+
modelValue: a.value,
|
|
4121
|
+
"onUpdate:modelValue": (C) => a.value = C
|
|
4122
|
+
}, o.value, {
|
|
4123
|
+
onAccept: s,
|
|
4124
|
+
onCancel: l,
|
|
4125
|
+
onClosed: v,
|
|
4126
|
+
onResize: i,
|
|
4127
|
+
onEsc: b
|
|
4128
|
+
}), {
|
|
4129
|
+
default: () => [p && p()]
|
|
4130
|
+
});
|
|
4131
|
+
return r = ((C) => {
|
|
4132
|
+
const h = Mt(f, C);
|
|
4133
|
+
return h.appContext = this.appContext, Te(h, n), h;
|
|
4134
|
+
})({
|
|
4135
|
+
...o.value
|
|
4136
|
+
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
4137
|
+
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
4138
|
+
update: (C) => {
|
|
4139
|
+
o.value = {
|
|
4140
|
+
...o.value,
|
|
4141
|
+
...C
|
|
4142
|
+
}, r && Te(Ft(r, {
|
|
4143
|
+
...o
|
|
4144
|
+
}), n);
|
|
4145
|
+
},
|
|
4146
|
+
destroy: v,
|
|
4147
|
+
modalRef: this.activeModalInstance
|
|
4148
|
+
};
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4151
|
+
class ee {
|
|
4152
|
+
static show(t) {
|
|
4153
|
+
let n = new Ra();
|
|
4154
|
+
const o = te({
|
|
4155
|
+
...t
|
|
4156
|
+
}), a = !1, s = o.type === "error" || o.type === "prompt", l = o.type === "error" ? "错误提示" : o.type === "prompt" && o.title || "", u = o.acceptCallback || (() => {
|
|
4157
|
+
}), i = o.rejectCallback || (() => {
|
|
4158
|
+
});
|
|
4159
|
+
let r = null;
|
|
4160
|
+
const p = () => {
|
|
4161
|
+
r && (r == null || r.destroy(), n = null);
|
|
4162
|
+
};
|
|
4163
|
+
r = n == null ? void 0 : n.open({
|
|
4164
|
+
class: "modal-message modal-message-type-info",
|
|
4165
|
+
title: l,
|
|
4166
|
+
showButtons: a,
|
|
4167
|
+
showHeader: s,
|
|
4168
|
+
width: o.width || 400,
|
|
4169
|
+
fitContent: !0,
|
|
4170
|
+
showMaxButton: !1,
|
|
4171
|
+
render: () => m(ge, ae(o, {
|
|
4172
|
+
onAccept: u,
|
|
4173
|
+
onReject: i,
|
|
4174
|
+
onClose: p
|
|
4175
|
+
}), null)
|
|
4176
|
+
});
|
|
4177
|
+
}
|
|
4178
|
+
static info(t, n) {
|
|
4179
|
+
const o = te({
|
|
4180
|
+
type: "info",
|
|
4181
|
+
title: t,
|
|
4182
|
+
detail: n,
|
|
4183
|
+
okButtonText: "知道了",
|
|
4184
|
+
cancelButtonText: ""
|
|
4185
|
+
});
|
|
4186
|
+
ee.show(o);
|
|
4187
|
+
}
|
|
4188
|
+
static warning(t, n) {
|
|
4189
|
+
const o = te({
|
|
4190
|
+
type: "warning",
|
|
4191
|
+
title: t,
|
|
4192
|
+
detail: n,
|
|
4193
|
+
okButtonText: "知道了",
|
|
4194
|
+
cancelButtonText: ""
|
|
4195
|
+
});
|
|
4196
|
+
ee.show(o);
|
|
4197
|
+
}
|
|
4198
|
+
static success(t, n) {
|
|
4199
|
+
const o = te({
|
|
4200
|
+
type: "success",
|
|
4201
|
+
title: t,
|
|
4202
|
+
detail: n,
|
|
4203
|
+
okButtonText: "关闭",
|
|
4204
|
+
cancelButtonText: ""
|
|
4205
|
+
});
|
|
4206
|
+
ee.show(o);
|
|
4207
|
+
}
|
|
4208
|
+
static error(t, n, o) {
|
|
4209
|
+
const a = te({
|
|
4210
|
+
width: 500,
|
|
4211
|
+
type: "error",
|
|
4212
|
+
okButtonText: "关闭",
|
|
4213
|
+
cancelButtonText: "",
|
|
4214
|
+
exceptionInfo: {
|
|
4215
|
+
date: o,
|
|
4216
|
+
message: t,
|
|
4217
|
+
detail: n
|
|
4218
|
+
}
|
|
4219
|
+
});
|
|
4220
|
+
ee.show(a);
|
|
4221
|
+
}
|
|
4222
|
+
static prompt(t, n) {
|
|
4223
|
+
const o = te({
|
|
4224
|
+
type: "prompt",
|
|
4225
|
+
title: t,
|
|
4226
|
+
detail: n,
|
|
4227
|
+
okButtonText: "确定",
|
|
4228
|
+
cancelButtonText: "取消"
|
|
4229
|
+
});
|
|
4230
|
+
ee.show(o);
|
|
4231
|
+
}
|
|
4232
|
+
static question(t, n, o, a) {
|
|
4233
|
+
const s = te({
|
|
4234
|
+
type: "question",
|
|
4235
|
+
title: t,
|
|
4236
|
+
detail: n,
|
|
4237
|
+
okButtonText: "确定",
|
|
4238
|
+
cancelButtonText: "取消",
|
|
4239
|
+
acceptCallback: o,
|
|
4240
|
+
rejectCallback: a
|
|
4241
|
+
});
|
|
4242
|
+
ee.show(s);
|
|
4243
|
+
}
|
|
4244
|
+
}
|
|
4245
|
+
ge.install = (e) => {
|
|
4246
|
+
e.component(ge.name, ge), e.provide("FMessageBoxService", ee);
|
|
4247
|
+
};
|
|
4248
|
+
const Na = /* @__PURE__ */ Z({
|
|
4249
|
+
name: "FResponseFormLayoutSetting",
|
|
4250
|
+
props: tt,
|
|
4251
|
+
emits: ["change"],
|
|
4252
|
+
setup(e, t) {
|
|
4253
|
+
let n = [1], o = [1, 2], a = [1, 2, 3, 4], s = [1, 2, 3, 4, 6], l = [], u = [], i = [], r = [];
|
|
4254
|
+
const p = d(e.initialState), c = d(0), v = d(0), b = d(0), f = d(0);
|
|
4255
|
+
K(() => {
|
|
4256
|
+
y(), g();
|
|
4257
|
+
});
|
|
4258
|
+
function g() {
|
|
4259
|
+
const h = "自定义", F = 12 / p.value.uniqueColClassInSM;
|
|
4260
|
+
n.includes(F) ? c.value = F : (l.push({
|
|
4261
|
+
value: 0,
|
|
4262
|
+
name: h
|
|
4263
|
+
}), c.value = 0);
|
|
4264
|
+
const k = 12 / p.value.uniqueColClassInMD;
|
|
4265
|
+
o.includes(k) ? v.value = k : (u.push({
|
|
4266
|
+
value: 0,
|
|
4267
|
+
name: h
|
|
4268
|
+
}), v.value = 0);
|
|
4269
|
+
const R = 12 / p.value.uniqueColClassInLG;
|
|
4270
|
+
a.includes(R) ? b.value = R : (i.push({
|
|
4271
|
+
value: 0,
|
|
4272
|
+
name: h
|
|
4273
|
+
}), b.value = 0);
|
|
4274
|
+
const T = 12 / p.value.uniqueColClassInEL;
|
|
4275
|
+
s.includes(T) ? f.value = T : (r.push({
|
|
4276
|
+
value: 0,
|
|
4277
|
+
name: h
|
|
4278
|
+
}), f.value = 0), l = [...l], u = [...u], i = [...i], r = [...r];
|
|
4279
|
+
}
|
|
4280
|
+
function y() {
|
|
4281
|
+
n.forEach((h) => {
|
|
4282
|
+
l.push({
|
|
4283
|
+
value: h,
|
|
4284
|
+
name: h + ""
|
|
4285
|
+
});
|
|
4286
|
+
}), o.forEach((h) => {
|
|
4287
|
+
u.push({
|
|
4288
|
+
value: h,
|
|
4289
|
+
name: h + ""
|
|
4290
|
+
});
|
|
4291
|
+
}), a.forEach((h) => {
|
|
4292
|
+
i.push({
|
|
4293
|
+
value: h,
|
|
4294
|
+
name: h + ""
|
|
4295
|
+
});
|
|
4296
|
+
}), s.forEach((h) => {
|
|
4297
|
+
r.push({
|
|
4298
|
+
value: h,
|
|
4299
|
+
name: h + ""
|
|
4300
|
+
});
|
|
4301
|
+
});
|
|
4302
|
+
}
|
|
4303
|
+
function C() {
|
|
4304
|
+
ee.question("应用统一布局,将重置区域内部所有控件的宽度样式,确定应用?", "", () => {
|
|
4305
|
+
p.value.uniqueColClassInSM = c.value === 0 ? null : 12 / c.value, p.value.uniqueColClassInMD = v.value === 0 ? null : 12 / v.value, p.value.uniqueColClassInLG = b.value === 0 ? null : 12 / b.value, p.value.uniqueColClassInEL = f.value === 0 ? null : 12 / f.value, t.emit("change", p.value);
|
|
4306
|
+
}, () => {
|
|
4307
|
+
});
|
|
4308
|
+
}
|
|
4309
|
+
return () => m("div", null, [m("div", {
|
|
4310
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
4311
|
+
}, [m("div", {
|
|
4312
|
+
class: "form-group farris-form-group screenGroup"
|
|
4313
|
+
}, [m("span", {
|
|
4314
|
+
class: "screenName"
|
|
4315
|
+
}, [_(" 小屏幕 ")]), m("div", {
|
|
4316
|
+
class: "d-flex ml-2 screen-input"
|
|
4317
|
+
}, [m(ie, {
|
|
4318
|
+
data: l,
|
|
4319
|
+
idField: "value",
|
|
4320
|
+
valueField: "value",
|
|
4321
|
+
modelValue: c.value,
|
|
4322
|
+
"onUpdate:modelValue": (h) => c.value = h
|
|
4323
|
+
}, null), m("span", {
|
|
4324
|
+
class: "ml-2 columnText"
|
|
4325
|
+
}, [_("列")])])]), m("div", {
|
|
4326
|
+
class: "form-group farris-form-group screenGroup"
|
|
4327
|
+
}, [m("span", {
|
|
4328
|
+
class: "screenName"
|
|
4329
|
+
}, [_("中等屏幕")]), m("div", {
|
|
4330
|
+
class: "d-flex ml-2 screen-input"
|
|
4331
|
+
}, [m(ie, {
|
|
4332
|
+
data: u,
|
|
4333
|
+
idField: "value",
|
|
4334
|
+
valueField: "value",
|
|
4335
|
+
modelValue: v.value,
|
|
4336
|
+
"onUpdate:modelValue": (h) => v.value = h
|
|
4337
|
+
}, null), m("span", {
|
|
4338
|
+
class: "ml-2 columnText"
|
|
4339
|
+
}, [_("列")])])]), m("div", {
|
|
4340
|
+
class: "form-group farris-form-group screenGroup"
|
|
4341
|
+
}, [m("span", {
|
|
4342
|
+
class: "screenName"
|
|
4343
|
+
}, [_("大屏幕")]), m("div", {
|
|
4344
|
+
class: "d-flex ml-2 screen-input"
|
|
4345
|
+
}, [m(ie, {
|
|
4346
|
+
data: i,
|
|
4347
|
+
idField: "value",
|
|
4348
|
+
valueField: "value",
|
|
4349
|
+
modelValue: b.value,
|
|
4350
|
+
"onUpdate:modelValue": (h) => b.value = h
|
|
4351
|
+
}, null), m("span", {
|
|
4352
|
+
class: "ml-2 columnText"
|
|
4353
|
+
}, [_("列")])])]), m("div", {
|
|
4354
|
+
class: "form-group farris-form-group screenGroup"
|
|
4355
|
+
}, [m("span", {
|
|
4356
|
+
class: "screenName"
|
|
4357
|
+
}, [_("极大屏幕")]), m("div", {
|
|
4358
|
+
class: "d-flex ml-2 screen-input"
|
|
4359
|
+
}, [m(ie, {
|
|
4360
|
+
data: r,
|
|
4361
|
+
idField: "value",
|
|
4362
|
+
valueField: "value",
|
|
4363
|
+
modelValue: f.value,
|
|
4364
|
+
"onUpdate:modelValue": (h) => f.value = h
|
|
4365
|
+
}, null), m("span", {
|
|
4366
|
+
class: "ml-2 columnText"
|
|
4367
|
+
}, [_("列")])])])]), m("div", {
|
|
4368
|
+
class: "applyBtn"
|
|
4369
|
+
}, [m("button", {
|
|
4370
|
+
class: "btn f-rt-btn btn-primary",
|
|
4371
|
+
type: "button",
|
|
4372
|
+
onClick: () => C()
|
|
4373
|
+
}, [_("应用")])])]);
|
|
4374
|
+
}
|
|
4375
|
+
}), es = {
|
|
2920
4376
|
install(e) {
|
|
2921
|
-
e.component(
|
|
4377
|
+
e.component(Be.name, Be).component(Fe.name, Fe);
|
|
2922
4378
|
},
|
|
2923
|
-
register(e, t,
|
|
2924
|
-
e["form-group"] =
|
|
4379
|
+
register(e, t, n, o) {
|
|
4380
|
+
e["form-group"] = Fe, t["form-group"] = Re, e["response-form"] = Be, t["response-form"] = Ve, e["form-input"] = ia, t["form-input"] = la, o["form-group"] = { editorResolver: po }, e["response-form-layout-setting"] = Na, t["response-form-layout-setting"] = ya;
|
|
2925
4381
|
},
|
|
2926
|
-
registerDesigner(e, t,
|
|
2927
|
-
e["form-group"] =
|
|
4382
|
+
registerDesigner(e, t, n) {
|
|
4383
|
+
e["form-group"] = sa, t["form-group"] = Re, e["response-form"] = Mo, t["response-form"] = Ve;
|
|
2928
4384
|
}
|
|
2929
4385
|
};
|
|
2930
4386
|
export {
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
4387
|
+
Fe as FDynamicFormGroup,
|
|
4388
|
+
ia as FDynamicFormInput,
|
|
4389
|
+
Be as FResponseForm,
|
|
4390
|
+
es as default,
|
|
4391
|
+
pe as dynamicFormGroupProps,
|
|
4392
|
+
po as editorResolver,
|
|
4393
|
+
Re as formGroupPropsResolver,
|
|
4394
|
+
Ve as formPropsResolver,
|
|
4395
|
+
We as responseFormProps,
|
|
4396
|
+
Bo as useDesignerRules
|
|
2941
4397
|
};
|