@farris/ui-vue 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,71 +1,74 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import
|
|
1
|
+
var at = Object.defineProperty;
|
|
2
|
+
var lt = (t, e, n) => e in t ? at(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var S = (t, e, n) => lt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { ref as i, computed as B, watch as J, defineComponent as ee, onBeforeUnmount as st, createVNode as d, createTextVNode as le, onMounted as oe, nextTick as ve, reactive as Z, withDirectives as rt, resolveDirective as it, Fragment as se, mergeProps as ye, onUnmounted as Se, Teleport as ut, Transition as ct, shallowRef as dt, createApp as pt, render as me, h as mt, cloneVNode as ft } from "vue";
|
|
5
|
+
import vt, { FDynamicFormGroup as ht } from "../dynamic-form/index.esm.js";
|
|
6
|
+
import { cloneDeep as ne, isPlainObject as xe } from "lodash-es";
|
|
7
|
+
import he from "../combo-list/index.esm.js";
|
|
8
|
+
import "../property-panel/index.esm.js/src/composition/entity/base-property";
|
|
9
|
+
import "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
10
|
+
import "../designer-canvas/index.esm.js/src/composition/dg-control";
|
|
8
11
|
import "bignumber.js";
|
|
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
|
|
12
|
+
import gt, { useNumber as yt, useFormat as bt, useSpinner as Ct, useTextBox as wt } from "../number-spinner/index.esm.js";
|
|
13
|
+
import xt from "../accordion/index.esm.js";
|
|
14
|
+
import Tt from "../avatar/index.esm.js";
|
|
15
|
+
import kt from "../button-edit/index.esm.js";
|
|
16
|
+
import Bt from "../button-group/index.esm.js";
|
|
17
|
+
import Ft from "../calendar/index.esm.js";
|
|
18
|
+
import St from "../capsule/index.esm.js";
|
|
19
|
+
import Mt from "../checkbox/index.esm.js";
|
|
20
|
+
import Et from "../combo-tree/index.esm.js";
|
|
21
|
+
import It from "../component/index.esm.js";
|
|
22
|
+
import Vt from "../color-picker/index.esm.js";
|
|
23
|
+
import Rt from "../content-container/index.esm.js";
|
|
24
|
+
import Ot from "../date-picker/index.esm.js";
|
|
25
|
+
import jt from "../data-grid/index.esm.js";
|
|
26
|
+
import Lt from "../dropdown/index.esm.js";
|
|
27
|
+
import Pt from "../events-editor/index.esm.js";
|
|
28
|
+
import Nt 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 At from "../input-group/index.esm.js";
|
|
32
|
+
import Ht from "../layout/index.esm.js";
|
|
33
|
+
import Dt from "../list-nav/index.esm.js";
|
|
34
|
+
import Gt from "../list-view/index.esm.js";
|
|
35
|
+
import qt from "../lookup/index.esm.js";
|
|
36
|
+
import Ut from "../mapping-editor/index.esm.js";
|
|
37
|
+
import Wt from "../nav/index.esm.js";
|
|
38
|
+
import Xt from "../number-range/index.esm.js";
|
|
39
|
+
import Yt from "../order/index.esm.js";
|
|
40
|
+
import Jt from "../page-header/index.esm.js";
|
|
41
|
+
import Qt from "../page-footer/index.esm.js";
|
|
42
|
+
import Zt from "../pagination/index.esm.js";
|
|
43
|
+
import Kt from "../progress/index.esm.js";
|
|
44
|
+
import _t from "../query-solution/index.esm.js";
|
|
45
|
+
import en from "../radio-group/index.esm.js";
|
|
46
|
+
import tn from "../rate/index.esm.js";
|
|
47
|
+
import nn from "../response-toolbar/index.esm.js";
|
|
48
|
+
import on from "../response-layout/index.esm.js";
|
|
49
|
+
import an from "../response-layout-editor/index.esm.js";
|
|
50
|
+
import ln from "../search-box/index.esm.js";
|
|
51
|
+
import sn from "../section/index.esm.js";
|
|
52
|
+
import rn from "../smoke-detector/index.esm.js";
|
|
53
|
+
import un from "../splitter/index.esm.js";
|
|
54
|
+
import cn from "../step/index.esm.js";
|
|
55
|
+
import dn from "../switch/index.esm.js";
|
|
56
|
+
import pn from "../tabs/index.esm.js";
|
|
57
|
+
import mn from "../tags/index.esm.js";
|
|
58
|
+
import fn from "../text/index.esm.js";
|
|
59
|
+
import vn from "../time-picker/index.esm.js";
|
|
60
|
+
import hn from "../transfer/index.esm.js";
|
|
61
|
+
import gn from "../tree-view/index.esm.js";
|
|
62
|
+
import yn from "../uploader/index.esm.js";
|
|
63
|
+
import bn from "../verify-detail/index.esm.js";
|
|
64
|
+
import Cn from "../weather/index.esm.js";
|
|
65
|
+
import wn from "../video/index.esm.js";
|
|
66
|
+
import xn from "../textarea/index.esm.js";
|
|
67
|
+
import Tn from "../schema-selector/index.esm.js";
|
|
68
|
+
import kn from "../tree-grid/index.esm.js";
|
|
66
69
|
import "../external-container/index.esm.js";
|
|
67
|
-
import "../dynamic-resolver/index.esm.js";
|
|
68
|
-
const
|
|
70
|
+
import { createPropsResolver as Bn } from "../dynamic-resolver/index.esm.js";
|
|
71
|
+
const Me = {
|
|
69
72
|
conditions: { type: Array, default: [] },
|
|
70
73
|
fields: { type: Array, default: [] },
|
|
71
74
|
key: { type: String, default: "" },
|
|
@@ -74,18 +77,18 @@ const ue = {
|
|
|
74
77
|
*/
|
|
75
78
|
isControlInline: { type: Boolean, default: !0 }
|
|
76
79
|
};
|
|
77
|
-
class
|
|
78
|
-
constructor(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
this.value =
|
|
80
|
+
class Fn {
|
|
81
|
+
constructor(e = { value: [] }) {
|
|
82
|
+
S(this, "editorType", "check-box");
|
|
83
|
+
S(this, "value");
|
|
84
|
+
S(this, "valueType", "boolean");
|
|
85
|
+
this.value = e.value;
|
|
83
86
|
}
|
|
84
87
|
clear() {
|
|
85
88
|
this.value = [];
|
|
86
89
|
}
|
|
87
|
-
setValue(
|
|
88
|
-
this.value =
|
|
90
|
+
setValue(e) {
|
|
91
|
+
this.value = e;
|
|
89
92
|
}
|
|
90
93
|
getValue() {
|
|
91
94
|
return this.value;
|
|
@@ -94,49 +97,49 @@ class Nt {
|
|
|
94
97
|
return this.value.length === 0;
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
|
-
class
|
|
98
|
-
constructor(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.textValue =
|
|
100
|
+
class Sn {
|
|
101
|
+
constructor(e = { textValue: "", value: "", valueField: "" }) {
|
|
102
|
+
S(this, "editorType", "combo-lookup");
|
|
103
|
+
S(this, "textValue");
|
|
104
|
+
S(this, "value");
|
|
105
|
+
S(this, "valueField");
|
|
106
|
+
S(this, "valueType", "text");
|
|
107
|
+
this.textValue = e.textValue, this.value = e.value, this.valueField = e.valueField;
|
|
105
108
|
}
|
|
106
109
|
clear() {
|
|
107
110
|
this.value = "", this.valueField = "", this.textValue = "";
|
|
108
111
|
}
|
|
109
|
-
getPropValue(
|
|
112
|
+
getPropValue(e, n) {
|
|
110
113
|
if (n.length > 1) {
|
|
111
114
|
const o = n.shift();
|
|
112
|
-
return
|
|
115
|
+
return e[o] ? this.getPropValue(e[o], n) : null;
|
|
113
116
|
}
|
|
114
|
-
return
|
|
117
|
+
return e[n[0]];
|
|
115
118
|
}
|
|
116
|
-
getTextValue(
|
|
117
|
-
const n =
|
|
119
|
+
getTextValue(e) {
|
|
120
|
+
const n = e.split("."), o = this.value.split(",").map((a) => this.getPropValue(a, ne(n)));
|
|
118
121
|
return o && o.length ? o.join(",") : "";
|
|
119
122
|
}
|
|
120
123
|
getValue() {
|
|
121
|
-
const
|
|
124
|
+
const e = this.valueField.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, ne(e)));
|
|
122
125
|
return n && n.length ? n.join(",") : "";
|
|
123
126
|
}
|
|
124
|
-
setValue(
|
|
127
|
+
setValue(e) {
|
|
125
128
|
throw new Error("Method not implemented.");
|
|
126
129
|
}
|
|
127
130
|
isEmpty() {
|
|
128
131
|
return !this.valueField;
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
|
-
class
|
|
132
|
-
constructor(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.value =
|
|
134
|
+
class Mn {
|
|
135
|
+
constructor(e = { value: "" }) {
|
|
136
|
+
S(this, "editorType", "date-picker");
|
|
137
|
+
S(this, "value");
|
|
138
|
+
S(this, "valueType", "datetime");
|
|
139
|
+
this.value = e.value;
|
|
137
140
|
}
|
|
138
|
-
setValue(
|
|
139
|
-
this.value =
|
|
141
|
+
setValue(e) {
|
|
142
|
+
this.value = e.formatted;
|
|
140
143
|
}
|
|
141
144
|
getValue() {
|
|
142
145
|
return this.value;
|
|
@@ -148,13 +151,13 @@ class Gt {
|
|
|
148
151
|
this.value = void 0;
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
|
-
class
|
|
152
|
-
constructor(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
this.begin =
|
|
154
|
+
class Te {
|
|
155
|
+
constructor(e = { begin: "", end: "" }) {
|
|
156
|
+
S(this, "editorType", "date-range");
|
|
157
|
+
S(this, "begin", "");
|
|
158
|
+
S(this, "end", "");
|
|
159
|
+
S(this, "valueType", "datetime");
|
|
160
|
+
this.begin = e.begin, this.end = e.end;
|
|
158
161
|
}
|
|
159
162
|
clear() {
|
|
160
163
|
this.begin = "", this.end = "";
|
|
@@ -162,19 +165,19 @@ class ae {
|
|
|
162
165
|
getValue() {
|
|
163
166
|
return !this.begin || !this.end ? "" : `${this.begin}~${this.end}`;
|
|
164
167
|
}
|
|
165
|
-
setValue(
|
|
166
|
-
|
|
168
|
+
setValue(e) {
|
|
169
|
+
e.dataRange ? (this.begin = e.dataRange.split(e.delimiter)[0], this.end = e.dataRange.split(e.delimiter)[1]) : this.clear();
|
|
167
170
|
}
|
|
168
171
|
isEmpty() {
|
|
169
172
|
return !this.begin || !this.end;
|
|
170
173
|
}
|
|
171
174
|
}
|
|
172
|
-
class
|
|
173
|
-
constructor(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.value =
|
|
175
|
+
class En {
|
|
176
|
+
constructor(e = { value: "" }) {
|
|
177
|
+
S(this, "editorType", "datetime-picker");
|
|
178
|
+
S(this, "value");
|
|
179
|
+
S(this, "valueType", "datetime");
|
|
180
|
+
this.value = e.value;
|
|
178
181
|
}
|
|
179
182
|
clear() {
|
|
180
183
|
this.value = void 0;
|
|
@@ -182,22 +185,22 @@ class $t {
|
|
|
182
185
|
getValue() {
|
|
183
186
|
return this.value;
|
|
184
187
|
}
|
|
185
|
-
setValue(
|
|
186
|
-
this.value =
|
|
188
|
+
setValue(e) {
|
|
189
|
+
this.value = e.formatted;
|
|
187
190
|
}
|
|
188
191
|
isEmpty() {
|
|
189
192
|
return !this.value;
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
|
-
class
|
|
195
|
+
class In {
|
|
193
196
|
// 旧结构无,新结构为选中的value值,多选是以,分割的字符串
|
|
194
|
-
constructor(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
constructor(e = { value: "", dispalyText: "" }) {
|
|
198
|
+
S(this, "editorType", "combo-list");
|
|
199
|
+
S(this, "value");
|
|
197
200
|
// 旧结构{Type: '', Content: {value: string, name: string}} 新结构Array[{value: string, name: string}]
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
this.displayText =
|
|
201
|
+
S(this, "valueType", "enum");
|
|
202
|
+
S(this, "displayText");
|
|
203
|
+
this.displayText = e.dispalyText, this.value = e.value;
|
|
201
204
|
}
|
|
202
205
|
clear() {
|
|
203
206
|
this.value = "", this.displayText = "";
|
|
@@ -205,97 +208,97 @@ class Rt {
|
|
|
205
208
|
getValue() {
|
|
206
209
|
return this.displayText;
|
|
207
210
|
}
|
|
208
|
-
setValue(
|
|
209
|
-
this.displayText =
|
|
211
|
+
setValue(e) {
|
|
212
|
+
this.displayText = e.dispalyText, this.value = e.value;
|
|
210
213
|
}
|
|
211
214
|
isEmpty() {
|
|
212
215
|
return !this.displayText;
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
|
-
class
|
|
216
|
-
constructor(
|
|
217
|
-
|
|
218
|
+
class Vn {
|
|
219
|
+
constructor(e = { value: [], displayText: "", displayField: "", isInputText: !1 }) {
|
|
220
|
+
S(this, "editorType", "input-group");
|
|
218
221
|
// 通过弹窗返回的若干个值对象构成的数组
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
S(this, "value");
|
|
223
|
+
S(this, "valueType", "text");
|
|
221
224
|
// 控件内显示的值
|
|
222
|
-
|
|
225
|
+
S(this, "displayText");
|
|
223
226
|
// 弹窗模式下,取列表中哪个字段的值映射到当前字段
|
|
224
|
-
|
|
227
|
+
S(this, "valueField");
|
|
225
228
|
// 是否是手动输入的值
|
|
226
|
-
|
|
227
|
-
this.value =
|
|
229
|
+
S(this, "isInputText");
|
|
230
|
+
this.value = e.value, this.displayText = e.displayText, this.valueField = e.displayField, this.isInputText = e.isInputText;
|
|
228
231
|
}
|
|
229
232
|
clear() {
|
|
230
233
|
this.value = [], this.displayText = "", this.valueField = "";
|
|
231
234
|
}
|
|
232
|
-
getPropValue(
|
|
235
|
+
getPropValue(e, n) {
|
|
233
236
|
if (n.length > 1) {
|
|
234
237
|
const o = n.shift();
|
|
235
|
-
return
|
|
238
|
+
return e[o] ? this.getPropValue(e[o], n) : "";
|
|
236
239
|
}
|
|
237
|
-
return
|
|
240
|
+
return e[n[0]];
|
|
238
241
|
}
|
|
239
|
-
getTextValue(
|
|
240
|
-
const n =
|
|
242
|
+
getTextValue(e) {
|
|
243
|
+
const n = e.split("."), o = this.value.map((a) => this.getPropValue(a, ne(n)));
|
|
241
244
|
return o && o.length ? o.join(",") : "";
|
|
242
245
|
}
|
|
243
246
|
getValue() {
|
|
244
|
-
const
|
|
247
|
+
const e = this.valueField.split(".") || [], n = this.value.map((o) => this.getPropValue(o, ne(e)));
|
|
245
248
|
return n && n.length ? n.join(",") : "";
|
|
246
249
|
}
|
|
247
|
-
setValue(
|
|
250
|
+
setValue(e) {
|
|
248
251
|
throw new Error("Method not implemented.");
|
|
249
252
|
}
|
|
250
253
|
isEmpty() {
|
|
251
254
|
return !this.displayText;
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
|
-
class
|
|
255
|
-
constructor(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
257
|
+
class Rn {
|
|
258
|
+
constructor(e = { textValue: "", value: [], valueField: "", isInputText: !1 }) {
|
|
259
|
+
S(this, "editorType", "lookup");
|
|
260
|
+
S(this, "textValue");
|
|
261
|
+
S(this, "value");
|
|
262
|
+
S(this, "valueField");
|
|
263
|
+
S(this, "valueType", "text");
|
|
261
264
|
// 帮助的值是否为手动输入的任意值,对应帮助的任意输入属性nosearch
|
|
262
|
-
|
|
263
|
-
this.value =
|
|
265
|
+
S(this, "isInputText");
|
|
266
|
+
this.value = e.value, this.valueField = e.valueField, this.textValue = e.textValue, this.isInputText = e.isInputText;
|
|
264
267
|
}
|
|
265
268
|
clear() {
|
|
266
269
|
this.value = [], this.valueField = "", this.textValue = "";
|
|
267
270
|
}
|
|
268
|
-
getPropValue(
|
|
271
|
+
getPropValue(e, n) {
|
|
269
272
|
if (n.length > 1) {
|
|
270
273
|
const o = n.shift();
|
|
271
|
-
return
|
|
274
|
+
return e[o] ? this.getPropValue(e[o], n) : null;
|
|
272
275
|
}
|
|
273
|
-
return
|
|
276
|
+
return e[n[0]];
|
|
274
277
|
}
|
|
275
|
-
getTextValue(
|
|
276
|
-
const n =
|
|
278
|
+
getTextValue(e) {
|
|
279
|
+
const n = e.split("."), o = this.value.map((a) => this.getPropValue(a, n));
|
|
277
280
|
return o && o.length ? o.join(",") : "";
|
|
278
281
|
}
|
|
279
282
|
getValue() {
|
|
280
|
-
const
|
|
283
|
+
const e = this.valueField.split("."), n = this.value.map((o) => this.getPropValue(o, e));
|
|
281
284
|
return n && n.length ? n.join(",") : "";
|
|
282
285
|
}
|
|
283
|
-
setValue(
|
|
286
|
+
setValue(e) {
|
|
284
287
|
throw new Error("Method not implemented.");
|
|
285
288
|
}
|
|
286
289
|
isEmpty() {
|
|
287
290
|
return !this.value.length;
|
|
288
291
|
}
|
|
289
292
|
}
|
|
290
|
-
class
|
|
291
|
-
constructor(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
this.value =
|
|
293
|
+
class On {
|
|
294
|
+
constructor(e = { value: "" }) {
|
|
295
|
+
S(this, "editorType", "month-picker");
|
|
296
|
+
S(this, "value");
|
|
297
|
+
S(this, "valueType", "datetime");
|
|
298
|
+
this.value = e.value;
|
|
296
299
|
}
|
|
297
|
-
setValue(
|
|
298
|
-
this.value =
|
|
300
|
+
setValue(e) {
|
|
301
|
+
this.value = e.formatted;
|
|
299
302
|
}
|
|
300
303
|
getValue() {
|
|
301
304
|
return this.value;
|
|
@@ -307,13 +310,13 @@ class Wt {
|
|
|
307
310
|
return !this.value;
|
|
308
311
|
}
|
|
309
312
|
}
|
|
310
|
-
class
|
|
311
|
-
constructor(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
this.begin =
|
|
313
|
+
class jn {
|
|
314
|
+
constructor(e = { begin: "", end: "" }) {
|
|
315
|
+
S(this, "editorType", "month-range");
|
|
316
|
+
S(this, "begin");
|
|
317
|
+
S(this, "end");
|
|
318
|
+
S(this, "valueType", "datetime");
|
|
319
|
+
this.begin = e.begin, this.end = e.end;
|
|
317
320
|
}
|
|
318
321
|
clear() {
|
|
319
322
|
this.begin = "", this.end = "";
|
|
@@ -321,20 +324,20 @@ class zt {
|
|
|
321
324
|
getValue() {
|
|
322
325
|
return !this.begin || !this.end ? "" : `${this.begin}~${this.end}`;
|
|
323
326
|
}
|
|
324
|
-
setValue(
|
|
325
|
-
|
|
327
|
+
setValue(e) {
|
|
328
|
+
e.dataRange ? (this.begin = e.dataRange.split(e.delimiter)[0], this.end = e.dataRange.split(e.delimiter)[1]) : this.clear();
|
|
326
329
|
}
|
|
327
330
|
isEmpty() {
|
|
328
331
|
return !this.begin || !this.end;
|
|
329
332
|
}
|
|
330
333
|
}
|
|
331
|
-
class
|
|
332
|
-
constructor(
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
this.begin =
|
|
334
|
+
class Ln {
|
|
335
|
+
constructor(e = { begin: null, end: null }) {
|
|
336
|
+
S(this, "editorType", "number-range");
|
|
337
|
+
S(this, "begin");
|
|
338
|
+
S(this, "end");
|
|
339
|
+
S(this, "valueType", "number");
|
|
340
|
+
this.begin = e.begin == null ? null : parseFloat(e.begin), this.end = e.end == null ? null : parseFloat(e.end);
|
|
338
341
|
}
|
|
339
342
|
clear() {
|
|
340
343
|
this.begin = null, this.end = null;
|
|
@@ -345,19 +348,19 @@ class Ut {
|
|
|
345
348
|
end: this.end
|
|
346
349
|
};
|
|
347
350
|
}
|
|
348
|
-
setValue(
|
|
349
|
-
this.begin =
|
|
351
|
+
setValue(e) {
|
|
352
|
+
this.begin = e.begin == null ? null : parseFloat(e.begin), this.end = e.end == null ? null : parseFloat(e.end);
|
|
350
353
|
}
|
|
351
354
|
isEmpty() {
|
|
352
355
|
return this.begin == null && this.end == null;
|
|
353
356
|
}
|
|
354
357
|
}
|
|
355
|
-
class
|
|
356
|
-
constructor(
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
this.value =
|
|
358
|
+
class Pn {
|
|
359
|
+
constructor(e = { value: "" }) {
|
|
360
|
+
S(this, "editorType", "number-spinner");
|
|
361
|
+
S(this, "value");
|
|
362
|
+
S(this, "valueType", "number");
|
|
363
|
+
this.value = e.value == null ? null : parseFloat(e.value);
|
|
361
364
|
}
|
|
362
365
|
clear() {
|
|
363
366
|
this.value = void 0;
|
|
@@ -365,19 +368,19 @@ class Ht {
|
|
|
365
368
|
getValue() {
|
|
366
369
|
return this.value;
|
|
367
370
|
}
|
|
368
|
-
setValue(
|
|
369
|
-
this.value = isNaN(parseFloat(
|
|
371
|
+
setValue(e) {
|
|
372
|
+
this.value = isNaN(parseFloat(e)) ? null : e;
|
|
370
373
|
}
|
|
371
374
|
isEmpty() {
|
|
372
375
|
return this.value == null;
|
|
373
376
|
}
|
|
374
377
|
}
|
|
375
|
-
class
|
|
376
|
-
constructor(
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
this.value =
|
|
378
|
+
class Nn {
|
|
379
|
+
constructor(e = { value: null }) {
|
|
380
|
+
S(this, "editorType", "radio-group");
|
|
381
|
+
S(this, "value");
|
|
382
|
+
S(this, "valueType", "enum");
|
|
383
|
+
this.value = e.value;
|
|
381
384
|
}
|
|
382
385
|
clear() {
|
|
383
386
|
this.value = void 0;
|
|
@@ -385,19 +388,19 @@ class Qt {
|
|
|
385
388
|
getValue() {
|
|
386
389
|
return this.value;
|
|
387
390
|
}
|
|
388
|
-
setValue(
|
|
389
|
-
this.value =
|
|
391
|
+
setValue(e) {
|
|
392
|
+
this.value = e;
|
|
390
393
|
}
|
|
391
394
|
isEmpty() {
|
|
392
395
|
return !this.value;
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
|
-
class
|
|
396
|
-
constructor(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
this.value =
|
|
398
|
+
class Ee {
|
|
399
|
+
constructor(e = { value: "" }) {
|
|
400
|
+
S(this, "editorType", "text");
|
|
401
|
+
S(this, "value");
|
|
402
|
+
S(this, "valueType", "text");
|
|
403
|
+
this.value = e.value;
|
|
401
404
|
}
|
|
402
405
|
clear() {
|
|
403
406
|
this.value = void 0;
|
|
@@ -405,242 +408,242 @@ class ce {
|
|
|
405
408
|
getValue() {
|
|
406
409
|
return this.value;
|
|
407
410
|
}
|
|
408
|
-
setValue(
|
|
409
|
-
this.value =
|
|
411
|
+
setValue(e) {
|
|
412
|
+
this.value = e;
|
|
410
413
|
}
|
|
411
414
|
isEmpty() {
|
|
412
415
|
return !this.value;
|
|
413
416
|
}
|
|
414
417
|
}
|
|
415
|
-
function
|
|
416
|
-
function e
|
|
417
|
-
switch (
|
|
418
|
+
function Ie() {
|
|
419
|
+
function t(e, n) {
|
|
420
|
+
switch (e) {
|
|
418
421
|
case "check-box":
|
|
419
|
-
return new
|
|
422
|
+
return new Fn(n);
|
|
420
423
|
case "combo-list":
|
|
421
|
-
return new
|
|
424
|
+
return new In(n);
|
|
422
425
|
case "combo-lookup":
|
|
423
|
-
return new
|
|
426
|
+
return new Sn(n);
|
|
424
427
|
case "input-group":
|
|
425
|
-
return new
|
|
428
|
+
return new Vn(n);
|
|
426
429
|
case "date-picker":
|
|
427
|
-
return new
|
|
430
|
+
return new Mn(n);
|
|
428
431
|
case "date-range":
|
|
429
|
-
return new
|
|
432
|
+
return new Te(n);
|
|
430
433
|
case "datetime-picker":
|
|
431
|
-
return new
|
|
434
|
+
return new En(n);
|
|
432
435
|
case "datetime-range":
|
|
433
|
-
return new
|
|
436
|
+
return new Te(n);
|
|
434
437
|
case "lookup":
|
|
435
|
-
return new
|
|
438
|
+
return new Rn(n);
|
|
436
439
|
case "month-picker":
|
|
437
|
-
return new
|
|
440
|
+
return new On(n);
|
|
438
441
|
case "month-range":
|
|
439
|
-
return new
|
|
442
|
+
return new jn(n);
|
|
440
443
|
case "number-range":
|
|
441
|
-
return new
|
|
444
|
+
return new Ln(n);
|
|
442
445
|
case "number-spinner":
|
|
443
|
-
return new
|
|
446
|
+
return new Pn(n);
|
|
444
447
|
case "radio-group":
|
|
445
|
-
return new
|
|
448
|
+
return new Nn(n);
|
|
446
449
|
default:
|
|
447
|
-
return new
|
|
450
|
+
return new Ee(n);
|
|
448
451
|
}
|
|
449
452
|
}
|
|
450
|
-
return { createConditionValue:
|
|
453
|
+
return { createConditionValue: t };
|
|
451
454
|
}
|
|
452
|
-
function
|
|
453
|
-
const n =
|
|
454
|
-
function
|
|
455
|
-
switch (
|
|
455
|
+
function Ve(t, e) {
|
|
456
|
+
const n = i(t.fields), o = i([]), a = /* @__PURE__ */ new Map(), { createConditionValue: r } = Ie();
|
|
457
|
+
function s(c) {
|
|
458
|
+
switch (c.editor ? c.editor.type : "input-group") {
|
|
456
459
|
case "date-range":
|
|
457
|
-
|
|
460
|
+
c.editor.type = "date-picker";
|
|
458
461
|
break;
|
|
459
462
|
case "datetime-range":
|
|
460
|
-
|
|
463
|
+
c.editor.type = "datetime-picker";
|
|
461
464
|
break;
|
|
462
465
|
case "number-range":
|
|
463
|
-
|
|
466
|
+
c.editor.type = "number-spinner";
|
|
464
467
|
break;
|
|
465
468
|
}
|
|
466
|
-
return
|
|
469
|
+
return c.editor;
|
|
467
470
|
}
|
|
468
|
-
function
|
|
469
|
-
return
|
|
471
|
+
function u(c) {
|
|
472
|
+
return c.map((v) => Object.assign({}, v)).map((v) => (v.editor = s(v), v));
|
|
470
473
|
}
|
|
471
|
-
function
|
|
472
|
-
n.value.reduce((
|
|
474
|
+
function p(c = !0) {
|
|
475
|
+
n.value.reduce((m, v) => (c || (v.editor = s(v)), m.set(v.labelCode, v), m), a);
|
|
473
476
|
}
|
|
474
|
-
function
|
|
475
|
-
return
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
478
|
-
|
|
477
|
+
function l(c) {
|
|
478
|
+
return c.forEach((m) => {
|
|
479
|
+
if (m && typeof m.valueConfig == "object") {
|
|
480
|
+
const v = a.get(m.fieldCode);
|
|
481
|
+
m.value = r(v.editor.type, m.valueConfig.content);
|
|
479
482
|
}
|
|
480
|
-
}),
|
|
483
|
+
}), c;
|
|
481
484
|
}
|
|
482
|
-
return { convertToSingleControl:
|
|
485
|
+
return { convertToSingleControl: u, fields: n, fieldMap: a, fieldConditions: o, loadFieldConfigs: p, initialConditionValue: l };
|
|
483
486
|
}
|
|
484
|
-
function
|
|
485
|
-
const o =
|
|
486
|
-
function
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
})), o.value.observe(
|
|
487
|
+
function zn(t, e, n) {
|
|
488
|
+
const o = i(null), a = i(n), r = i(0), s = B(() => l(r.value));
|
|
489
|
+
function u() {
|
|
490
|
+
a.value && (o.value = new ResizeObserver(p((c) => {
|
|
491
|
+
const m = c[0];
|
|
492
|
+
r.value = m.contentRect.width;
|
|
493
|
+
})), o.value.observe(a.value));
|
|
491
494
|
}
|
|
492
|
-
function
|
|
493
|
-
let
|
|
495
|
+
function p(c, m) {
|
|
496
|
+
let v = null;
|
|
494
497
|
return function() {
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}, 500),
|
|
498
|
+
const k = arguments;
|
|
499
|
+
v || (v = setTimeout(() => {
|
|
500
|
+
v = null;
|
|
501
|
+
}, 500), c(...k));
|
|
499
502
|
};
|
|
500
503
|
}
|
|
501
|
-
function
|
|
502
|
-
let
|
|
503
|
-
return
|
|
504
|
+
function l(c) {
|
|
505
|
+
let v = "col-12";
|
|
506
|
+
return c > 250 * 6 ? v = "col-2" : c > 250 * 4 ? v = "col-3" : c > 250 * 3 ? v = "col-4" : c > 250 * 2 && (v = "col-6"), v;
|
|
504
507
|
}
|
|
505
|
-
return
|
|
506
|
-
|
|
508
|
+
return J([n], ([c]) => {
|
|
509
|
+
a.value = c, u();
|
|
507
510
|
}), {
|
|
508
|
-
conditionClass:
|
|
511
|
+
conditionClass: s,
|
|
509
512
|
resizeObserver: o
|
|
510
513
|
};
|
|
511
514
|
}
|
|
512
|
-
const
|
|
515
|
+
const ke = /* @__PURE__ */ ee({
|
|
513
516
|
name: "FConditionFields",
|
|
514
|
-
props:
|
|
517
|
+
props: Me,
|
|
515
518
|
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
516
|
-
setup(
|
|
517
|
-
const n =
|
|
518
|
-
initialConditionValue:
|
|
519
|
-
fieldMap:
|
|
520
|
-
loadFieldConfigs:
|
|
521
|
-
} =
|
|
522
|
-
conditionClass:
|
|
523
|
-
resizeObserver:
|
|
524
|
-
} =
|
|
525
|
-
|
|
526
|
-
var
|
|
527
|
-
(
|
|
528
|
-
}),
|
|
529
|
-
|
|
519
|
+
setup(t, e) {
|
|
520
|
+
const n = i(), o = i(t.key), a = i(t.isControlInline), r = i(t.conditions), s = Ve(t), {
|
|
521
|
+
initialConditionValue: u,
|
|
522
|
+
fieldMap: p,
|
|
523
|
+
loadFieldConfigs: l
|
|
524
|
+
} = s, c = zn(t, e, n), {
|
|
525
|
+
conditionClass: m,
|
|
526
|
+
resizeObserver: v
|
|
527
|
+
} = c;
|
|
528
|
+
l(!0), u(r.value), st(() => {
|
|
529
|
+
var h;
|
|
530
|
+
(h = v.value) == null || h.unobserve(n.value);
|
|
531
|
+
}), J(() => t.conditions, () => {
|
|
532
|
+
r.value = t.conditions;
|
|
530
533
|
});
|
|
531
|
-
const
|
|
534
|
+
const k = B(() => ({
|
|
532
535
|
// row: true,
|
|
533
536
|
"f-utils-flex-row-wrap": !0,
|
|
534
537
|
"farris-form": !0,
|
|
535
|
-
"farris-form-controls-inline":
|
|
536
|
-
})),
|
|
537
|
-
function
|
|
538
|
-
|
|
538
|
+
"farris-form-controls-inline": a.value
|
|
539
|
+
})), E = B(() => m.value);
|
|
540
|
+
function N(h, b) {
|
|
541
|
+
e.emit("valueChange", h, b);
|
|
539
542
|
}
|
|
540
|
-
function
|
|
541
|
-
return
|
|
542
|
-
var
|
|
543
|
-
return
|
|
544
|
-
customClass:
|
|
545
|
-
label:
|
|
546
|
-
editor: (
|
|
547
|
-
modelValue:
|
|
548
|
-
"onUpdate:modelValue": (P) =>
|
|
543
|
+
function $() {
|
|
544
|
+
return r.value.map((h) => {
|
|
545
|
+
var b;
|
|
546
|
+
return d(ht, {
|
|
547
|
+
customClass: E.value,
|
|
548
|
+
label: h.fieldName,
|
|
549
|
+
editor: (b = p.get(h.fieldCode)) == null ? void 0 : b.editor,
|
|
550
|
+
modelValue: h.value.value,
|
|
551
|
+
"onUpdate:modelValue": (P) => h.value.value = P,
|
|
549
552
|
onChange: (P) => {
|
|
550
|
-
|
|
553
|
+
N(P, h);
|
|
551
554
|
}
|
|
552
555
|
}, null);
|
|
553
556
|
});
|
|
554
557
|
}
|
|
555
|
-
return () =>
|
|
556
|
-
class:
|
|
558
|
+
return () => d("div", {
|
|
559
|
+
class: k.value,
|
|
557
560
|
key: o.value,
|
|
558
561
|
ref: n
|
|
559
|
-
}, [
|
|
560
|
-
}
|
|
561
|
-
}),
|
|
562
|
-
function
|
|
563
|
-
const { properties:
|
|
564
|
-
return o.id = `${n}-${Date.now()}
|
|
565
|
-
}
|
|
566
|
-
function
|
|
567
|
-
const n =
|
|
568
|
-
return Object.keys(
|
|
569
|
-
}
|
|
570
|
-
function
|
|
571
|
-
return Object.keys(
|
|
572
|
-
if (
|
|
573
|
-
const
|
|
574
|
-
if (typeof
|
|
575
|
-
o[
|
|
562
|
+
}, [$()]);
|
|
563
|
+
}
|
|
564
|
+
}), $n = {}, An = {};
|
|
565
|
+
function Re(t) {
|
|
566
|
+
const { properties: e, title: n, ignore: o } = t, a = o && Array.isArray(o), r = Object.keys(e).reduce((s, u) => ((!a || !o.find((p) => p == u)) && (s[u] = e[u].type === "object" && e[u].properties ? Re(e[u]) : ne(e[u].default)), s), {});
|
|
567
|
+
return (!a || !o.find((s) => s == "id")) && (r.id = `${n}-${Date.now()}`), r;
|
|
568
|
+
}
|
|
569
|
+
function Hn(t, e) {
|
|
570
|
+
const n = Re(e);
|
|
571
|
+
return Object.keys(t).reduce((o, a) => (o[a] && xe(o[a]) && xe(t[a]) ? Object.assign(o[a], t[a]) : o[a] = t[a], o), n), n;
|
|
572
|
+
}
|
|
573
|
+
function Dn(t, e) {
|
|
574
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, a) => {
|
|
575
|
+
if (e.has(a)) {
|
|
576
|
+
const r = e.get(a);
|
|
577
|
+
if (typeof r == "string")
|
|
578
|
+
o[r] = t[a];
|
|
576
579
|
else {
|
|
577
|
-
const
|
|
578
|
-
Object.assign(o,
|
|
580
|
+
const s = r(a, t[a], t);
|
|
581
|
+
Object.assign(o, s);
|
|
579
582
|
}
|
|
580
583
|
} else
|
|
581
|
-
o[
|
|
584
|
+
o[a] = t[a];
|
|
582
585
|
return o;
|
|
583
586
|
}, {});
|
|
584
587
|
}
|
|
585
|
-
function
|
|
586
|
-
const o =
|
|
587
|
-
return
|
|
588
|
-
}
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
if (typeof
|
|
592
|
-
return
|
|
593
|
-
if (typeof
|
|
594
|
-
const
|
|
595
|
-
if (
|
|
596
|
-
return Number(
|
|
597
|
-
if (
|
|
598
|
-
return Number(
|
|
599
|
-
if (
|
|
600
|
-
return Number(
|
|
588
|
+
function Gn(t, e, n = /* @__PURE__ */ new Map()) {
|
|
589
|
+
const o = Hn(t, e);
|
|
590
|
+
return Dn(o, n);
|
|
591
|
+
}
|
|
592
|
+
function qn(t = {}) {
|
|
593
|
+
function e(l, c, m, v) {
|
|
594
|
+
if (typeof m == "number")
|
|
595
|
+
return v[l].length === m;
|
|
596
|
+
if (typeof m == "object") {
|
|
597
|
+
const k = Object.keys(m)[0], E = m[k];
|
|
598
|
+
if (k === "not")
|
|
599
|
+
return Number(v[l].length) !== Number(E);
|
|
600
|
+
if (k === "moreThan")
|
|
601
|
+
return Number(v[l].length) >= Number(E);
|
|
602
|
+
if (k === "lessThan")
|
|
603
|
+
return Number(v[l].length) <= Number(E);
|
|
601
604
|
}
|
|
602
605
|
return !1;
|
|
603
606
|
}
|
|
604
|
-
function n(
|
|
605
|
-
return
|
|
607
|
+
function n(l, c, m, v) {
|
|
608
|
+
return v[l] && v[l].propertyValue && String(v[l].propertyValue.value) === String(m);
|
|
606
609
|
}
|
|
607
610
|
const o = /* @__PURE__ */ new Map([
|
|
608
|
-
["length",
|
|
611
|
+
["length", e],
|
|
609
612
|
["getProperty", n]
|
|
610
613
|
]);
|
|
611
|
-
Object.keys(
|
|
612
|
-
function
|
|
613
|
-
const
|
|
614
|
-
return typeof
|
|
615
|
-
if (
|
|
616
|
-
return { target:
|
|
617
|
-
const
|
|
618
|
-
return { target:
|
|
614
|
+
Object.keys(t).reduce((l, c) => (l.set(c, t[c]), l), o);
|
|
615
|
+
function a(l, c) {
|
|
616
|
+
const m = l;
|
|
617
|
+
return typeof c == "number" ? [{ target: m, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: m, operator: "getProperty", param: l, value: !!c }] : typeof c == "object" ? Object.keys(c).map((v) => {
|
|
618
|
+
if (v === "length")
|
|
619
|
+
return { target: m, operator: "length", param: null, value: c[v] };
|
|
620
|
+
const k = v, E = c[v];
|
|
621
|
+
return { target: m, operator: "getProperty", param: k, value: E };
|
|
619
622
|
}) : [];
|
|
620
623
|
}
|
|
621
|
-
function
|
|
622
|
-
return Object.keys(
|
|
623
|
-
const
|
|
624
|
-
return
|
|
624
|
+
function r(l) {
|
|
625
|
+
return Object.keys(l).reduce((m, v) => {
|
|
626
|
+
const k = a(v, l[v]);
|
|
627
|
+
return m.push(...k), m;
|
|
625
628
|
}, []);
|
|
626
629
|
}
|
|
627
|
-
function
|
|
628
|
-
if (o.has(
|
|
629
|
-
const
|
|
630
|
-
return
|
|
630
|
+
function s(l, c) {
|
|
631
|
+
if (o.has(l.operator)) {
|
|
632
|
+
const m = o.get(l.operator);
|
|
633
|
+
return m && m(l.target, l.param, l.value, c) || !1;
|
|
631
634
|
}
|
|
632
635
|
return !1;
|
|
633
636
|
}
|
|
634
|
-
function
|
|
635
|
-
return
|
|
637
|
+
function u(l, c) {
|
|
638
|
+
return r(l).reduce((k, E) => k && s(E, c), !0);
|
|
636
639
|
}
|
|
637
|
-
function
|
|
638
|
-
const
|
|
639
|
-
return
|
|
640
|
+
function p(l, c) {
|
|
641
|
+
const m = Object.keys(l), v = m.includes("allOf"), k = m.includes("anyOf"), E = v || k, h = (E ? l[E ? v ? "allOf" : "anyOf" : "allOf"] : [l]).map((P) => u(P, c));
|
|
642
|
+
return v ? !h.includes(!1) : h.includes(!0);
|
|
640
643
|
}
|
|
641
|
-
return { parseValueSchema:
|
|
644
|
+
return { parseValueSchema: p };
|
|
642
645
|
}
|
|
643
|
-
const
|
|
646
|
+
const A = {
|
|
644
647
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
645
648
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
646
649
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -677,37 +680,164 @@ const E = {
|
|
|
677
680
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
678
681
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
679
682
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
680
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
683
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
684
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
685
|
+
}, Un = {}, Wn = {};
|
|
686
|
+
qn();
|
|
687
|
+
function ce(t, e, n = /* @__PURE__ */ new Map(), o = (s, u, p) => u, a = {}, r = (s) => s) {
|
|
688
|
+
return $n[e.title] = e, An[e.title] = o, Un[e.title] = a, Wn[e.title] = r, (s = {}) => {
|
|
689
|
+
const u = Gn(s, e, n), p = Object.keys(t).reduce((l, c) => (l[c] = t[c].default, l), {});
|
|
690
|
+
return Object.assign(p, u);
|
|
687
691
|
};
|
|
688
692
|
}
|
|
689
|
-
function
|
|
690
|
-
return { customClass:
|
|
693
|
+
function Oe(t, e) {
|
|
694
|
+
return { customClass: e.class, customStyle: e.style };
|
|
691
695
|
}
|
|
692
|
-
const
|
|
693
|
-
["appearance",
|
|
694
|
-
]);
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
696
|
+
const be = /* @__PURE__ */ new Map([
|
|
697
|
+
["appearance", Oe]
|
|
698
|
+
]), Xn = /* @__PURE__ */ new Map([]);
|
|
699
|
+
var ge = /* @__PURE__ */ ((t) => (t.String = "String", t.DateTime = "DateTime", t.Date = "Date", t.Enum = "Enum", t.Boolean = "Boolean", t.Number = "Number", t.Text = "Text", t.BigNumber = "BigNumber", t))(ge || {});
|
|
700
|
+
const Yn = "root-viewmodel";
|
|
701
|
+
class Jn {
|
|
702
|
+
constructor(e, n) {
|
|
703
|
+
S(this, "formSchemaUtils");
|
|
704
|
+
S(this, "controlCreatorUtils");
|
|
705
|
+
S(this, "designViewModelUtils");
|
|
706
|
+
this.resolver = e, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
707
|
+
}
|
|
708
|
+
createComponent(e) {
|
|
709
|
+
const n = this.createComponentRefNode(e), o = this.createComponentNode(e), a = this.createViewModeNode(e), r = this.formSchemaUtils.getFormSchema();
|
|
710
|
+
return r.module.viewmodels.push(a), r.module.components.push(o), this.designViewModelUtils.assembleDesignViewModel(), n;
|
|
711
|
+
}
|
|
712
|
+
createComponentRefNode(e) {
|
|
713
|
+
const n = this.resolver.getSchemaByType("component-ref");
|
|
714
|
+
return Object.assign(n, {
|
|
715
|
+
id: `${e.componentId}-component-ref`,
|
|
716
|
+
component: `${e.componentId}-component`
|
|
717
|
+
}), n;
|
|
718
|
+
}
|
|
719
|
+
createComponentNode(e) {
|
|
720
|
+
const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(e);
|
|
721
|
+
return Object.assign(n, {
|
|
722
|
+
id: `${e.componentId}-component`,
|
|
723
|
+
viewModel: `${e.componentId}-component-viewmodel`,
|
|
724
|
+
componentType: e.componentType,
|
|
725
|
+
appearance: {
|
|
726
|
+
class: this.getFormComponentClass()
|
|
727
|
+
},
|
|
728
|
+
formColumns: e.formColumns,
|
|
729
|
+
contents: o
|
|
730
|
+
}), n;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* 获取卡片组件层级的class样式
|
|
734
|
+
*/
|
|
735
|
+
getFormComponentClass() {
|
|
736
|
+
return this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
737
|
+
}
|
|
738
|
+
createFormComponentContents(e) {
|
|
739
|
+
const n = this.resolver.getSchemaByType("section");
|
|
740
|
+
Object.assign(n, {
|
|
741
|
+
id: e.componentId + "-form-section",
|
|
742
|
+
appearance: {
|
|
743
|
+
class: "f-section-form f-section-in-mainsubcard"
|
|
744
|
+
},
|
|
745
|
+
mainTitle: e.componentName
|
|
746
|
+
});
|
|
747
|
+
const o = this.resolver.getSchemaByType("response-form"), a = [];
|
|
748
|
+
Object.assign(o, {
|
|
749
|
+
id: e.componentId + "-form",
|
|
750
|
+
appearance: {
|
|
751
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
752
|
+
},
|
|
753
|
+
contents: a
|
|
754
|
+
}), n.contents = [o];
|
|
755
|
+
const { selectedFields: r } = e;
|
|
756
|
+
return r == null || r.forEach((u) => {
|
|
757
|
+
const p = ne(u), l = this.resolveControlClassByFormColumns(e), c = this.controlCreatorUtils.setFormFieldProperty(p, "", l);
|
|
758
|
+
c && a.push(c);
|
|
759
|
+
}), 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];
|
|
760
|
+
}
|
|
761
|
+
resolveControlClassByFormColumns(e) {
|
|
762
|
+
let n = "";
|
|
763
|
+
switch (e.formColumns) {
|
|
764
|
+
case 1: {
|
|
765
|
+
n = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
766
|
+
break;
|
|
767
|
+
}
|
|
768
|
+
case 2: {
|
|
769
|
+
n = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
case 3: {
|
|
773
|
+
n = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
case 4: {
|
|
777
|
+
n = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
778
|
+
break;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
return n;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* 添加viewModel节点
|
|
785
|
+
*/
|
|
786
|
+
createViewModeNode(e) {
|
|
787
|
+
return {
|
|
788
|
+
id: `${e.componentId}-component-viewmodel`,
|
|
789
|
+
code: `${e.componentId}-component-viewmodel`,
|
|
790
|
+
name: e.componentName,
|
|
791
|
+
bindTo: e.bindTo,
|
|
792
|
+
parent: Yn,
|
|
793
|
+
fields: this.assembleViewModelFields(e),
|
|
794
|
+
commands: [],
|
|
795
|
+
states: [],
|
|
796
|
+
enableValidation: !0,
|
|
797
|
+
pagination: {
|
|
798
|
+
enable: !1
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* 组装viewModel fields 节点
|
|
804
|
+
*/
|
|
805
|
+
assembleViewModelFields(e) {
|
|
806
|
+
const n = [], { selectedFields: o } = e;
|
|
807
|
+
return o == null || o.forEach((a) => {
|
|
808
|
+
let r = "blur";
|
|
809
|
+
const s = a.type.name;
|
|
810
|
+
(s === ge.Enum || s === ge.Boolean) && (r = "change"), n.push({
|
|
811
|
+
type: "Form",
|
|
812
|
+
id: a.id,
|
|
813
|
+
fieldName: a.bindingField,
|
|
814
|
+
groupId: null,
|
|
815
|
+
groupName: null,
|
|
816
|
+
updateOn: r,
|
|
817
|
+
fieldSchema: {}
|
|
818
|
+
});
|
|
819
|
+
}), n;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
function Qn(t, e, n, o) {
|
|
823
|
+
const a = n.parentComponentInstance;
|
|
824
|
+
if (a) {
|
|
825
|
+
const s = {
|
|
826
|
+
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
827
|
+
componentName: "标题",
|
|
828
|
+
componentType: "form",
|
|
829
|
+
formColumns: 4,
|
|
830
|
+
parentContainerId: a.schema.id,
|
|
831
|
+
bindTo: "/"
|
|
832
|
+
};
|
|
833
|
+
return new Jn(t, o).createComponent(s);
|
|
834
|
+
} else
|
|
835
|
+
return e;
|
|
836
|
+
}
|
|
837
|
+
function Zn(t, e, n) {
|
|
838
|
+
return e;
|
|
839
|
+
}
|
|
840
|
+
const Kn = "https://json-schema.org/draft/2020-12/schema", _n = "https://farris-design.gitee.io/response-form.schema.json", eo = "response-form", to = "A Farris Data Collection Component", no = "object", oo = {
|
|
711
841
|
id: {
|
|
712
842
|
description: "The unique identifier for a form group",
|
|
713
843
|
type: "string"
|
|
@@ -735,49 +865,22 @@ const ln = "https://json-schema.org/draft/2020-12/schema", sn = "https://farris-
|
|
|
735
865
|
type: "array",
|
|
736
866
|
default: []
|
|
737
867
|
}
|
|
738
|
-
},
|
|
868
|
+
}, ao = [
|
|
739
869
|
"id",
|
|
740
870
|
"type"
|
|
741
|
-
],
|
|
742
|
-
$schema:
|
|
743
|
-
$id:
|
|
744
|
-
title:
|
|
745
|
-
description:
|
|
746
|
-
type:
|
|
747
|
-
properties:
|
|
748
|
-
required:
|
|
749
|
-
},
|
|
750
|
-
basic: {
|
|
751
|
-
description: "Basic Infomation",
|
|
752
|
-
title: "基本信息",
|
|
753
|
-
properties: {
|
|
754
|
-
id: {
|
|
755
|
-
description: "组件标识",
|
|
756
|
-
title: "标识",
|
|
757
|
-
type: "string",
|
|
758
|
-
readonly: !0
|
|
759
|
-
},
|
|
760
|
-
type: {
|
|
761
|
-
description: "组件类型",
|
|
762
|
-
title: "控件类型",
|
|
763
|
-
type: "select",
|
|
764
|
-
editor: {
|
|
765
|
-
type: "waiting for modification",
|
|
766
|
-
enum: []
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}, bn = {
|
|
772
|
-
title: gn,
|
|
773
|
-
description: hn,
|
|
774
|
-
type: vn,
|
|
775
|
-
categories: yn
|
|
776
|
-
}, Cn = {
|
|
871
|
+
], lo = {
|
|
872
|
+
$schema: Kn,
|
|
873
|
+
$id: _n,
|
|
874
|
+
title: eo,
|
|
875
|
+
description: to,
|
|
876
|
+
type: no,
|
|
877
|
+
properties: oo,
|
|
878
|
+
required: ao
|
|
879
|
+
}, so = {
|
|
777
880
|
customClass: { type: String, default: "" }
|
|
778
881
|
};
|
|
779
|
-
|
|
780
|
-
const
|
|
882
|
+
ce(so, lo, be, Qn);
|
|
883
|
+
const ro = "https://json-schema.org/draft/2020-12/schema", io = "https://farris-design.gitee.io/form-group.schema.json", uo = "form-group", co = "A Farris Input Component", po = "object", mo = {
|
|
781
884
|
id: {
|
|
782
885
|
description: "The unique identifier for a form group",
|
|
783
886
|
type: "string"
|
|
@@ -818,18 +921,18 @@ const kn = "https://json-schema.org/draft/2020-12/schema", Tn = "https://farris-
|
|
|
818
921
|
description: "",
|
|
819
922
|
type: "number"
|
|
820
923
|
}
|
|
821
|
-
},
|
|
924
|
+
}, fo = [
|
|
822
925
|
"id",
|
|
823
926
|
"type"
|
|
824
|
-
],
|
|
825
|
-
$schema:
|
|
826
|
-
$id:
|
|
827
|
-
title:
|
|
828
|
-
description:
|
|
829
|
-
type:
|
|
830
|
-
properties:
|
|
831
|
-
required:
|
|
832
|
-
},
|
|
927
|
+
], je = {
|
|
928
|
+
$schema: ro,
|
|
929
|
+
$id: io,
|
|
930
|
+
title: uo,
|
|
931
|
+
description: co,
|
|
932
|
+
type: po,
|
|
933
|
+
properties: mo,
|
|
934
|
+
required: fo
|
|
935
|
+
}, Le = {
|
|
833
936
|
id: { type: String, default: "" },
|
|
834
937
|
customClass: { type: String, default: "" },
|
|
835
938
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
@@ -843,43 +946,43 @@ const kn = "https://json-schema.org/draft/2020-12/schema", Tn = "https://farris-
|
|
|
843
946
|
showLabel: { type: Boolean, default: !0 },
|
|
844
947
|
type: { type: String, default: "input-group" }
|
|
845
948
|
};
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
949
|
+
ce(
|
|
950
|
+
Le,
|
|
951
|
+
je,
|
|
952
|
+
be,
|
|
850
953
|
void 0
|
|
851
954
|
);
|
|
852
|
-
const
|
|
955
|
+
const vo = {
|
|
853
956
|
id: { type: String },
|
|
854
957
|
required: { type: Boolean, default: !1 },
|
|
855
958
|
text: { type: String, default: "" },
|
|
856
959
|
title: { type: String }
|
|
857
|
-
},
|
|
960
|
+
}, ho = /* @__PURE__ */ ee({
|
|
858
961
|
name: "FDynamicFormLabel",
|
|
859
|
-
props:
|
|
962
|
+
props: vo,
|
|
860
963
|
emits: [],
|
|
861
|
-
setup(
|
|
862
|
-
const n =
|
|
863
|
-
return
|
|
864
|
-
|
|
865
|
-
}),
|
|
866
|
-
|
|
867
|
-
}), () =>
|
|
964
|
+
setup(t, e) {
|
|
965
|
+
const n = i(t.title || t.text), o = i(t.required), a = i(t.text);
|
|
966
|
+
return J(() => t.text, () => {
|
|
967
|
+
a.value = t.text;
|
|
968
|
+
}), J(() => t.required, (r, s) => {
|
|
969
|
+
r !== s && (o.value = r);
|
|
970
|
+
}), () => a.value && d("label", {
|
|
868
971
|
class: "col-form-label",
|
|
869
972
|
title: n.value
|
|
870
|
-
}, [o.value &&
|
|
973
|
+
}, [o.value && d("span", {
|
|
871
974
|
class: "farris-label-info text-danger"
|
|
872
|
-
}, [
|
|
975
|
+
}, [le("*")]), d("span", {
|
|
873
976
|
class: "farris-label-text"
|
|
874
|
-
}, [
|
|
977
|
+
}, [a.value])]);
|
|
875
978
|
}
|
|
876
|
-
}),
|
|
877
|
-
["appearance",
|
|
979
|
+
}), go = /* @__PURE__ */ new Map([
|
|
980
|
+
["appearance", Oe]
|
|
878
981
|
]);
|
|
879
|
-
function
|
|
880
|
-
return
|
|
982
|
+
function yo(t, e, n) {
|
|
983
|
+
return e;
|
|
881
984
|
}
|
|
882
|
-
const
|
|
985
|
+
const bo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-design.gitee.io/input-group.schema.json", wo = "input-group", xo = "A Farris Input Component", To = "object", ko = {
|
|
883
986
|
id: {
|
|
884
987
|
description: "The unique identifier for a Input Group",
|
|
885
988
|
type: "string"
|
|
@@ -1081,18 +1184,19 @@ const Pn = "https://json-schema.org/draft/2020-12/schema", On = "https://farris-
|
|
|
1081
1184
|
type: "string",
|
|
1082
1185
|
default: ""
|
|
1083
1186
|
}
|
|
1084
|
-
},
|
|
1187
|
+
}, Bo = [
|
|
1085
1188
|
"id",
|
|
1086
1189
|
"type"
|
|
1087
|
-
],
|
|
1088
|
-
$schema:
|
|
1089
|
-
$id:
|
|
1090
|
-
title:
|
|
1091
|
-
description:
|
|
1092
|
-
type:
|
|
1093
|
-
properties:
|
|
1094
|
-
required:
|
|
1095
|
-
},
|
|
1190
|
+
], Fo = {
|
|
1191
|
+
$schema: bo,
|
|
1192
|
+
$id: Co,
|
|
1193
|
+
title: wo,
|
|
1194
|
+
description: xo,
|
|
1195
|
+
type: To,
|
|
1196
|
+
properties: ko,
|
|
1197
|
+
required: Bo
|
|
1198
|
+
}, Pe = {
|
|
1199
|
+
id: { Type: String, default: "" },
|
|
1096
1200
|
/** 是否自动完成 */
|
|
1097
1201
|
autocomplete: { Type: String, default: "off" },
|
|
1098
1202
|
/** 自定义CLASS */
|
|
@@ -1159,421 +1263,421 @@ const Pn = "https://json-schema.org/draft/2020-12/schema", On = "https://farris-
|
|
|
1159
1263
|
*/
|
|
1160
1264
|
updateOn: { type: String, default: "blur" }
|
|
1161
1265
|
};
|
|
1162
|
-
|
|
1163
|
-
function
|
|
1164
|
-
const
|
|
1266
|
+
ce(Pe, Fo, go, yo);
|
|
1267
|
+
function So(t, e, n, o) {
|
|
1268
|
+
const a = i(t.disabled), r = i(!1), s = i("text"), u = i(t.showBorder), p = i(t.textAlign), l = i(t.updateOn), c = B(() => t.editable || !t.readonly), m = B(() => t.editable && !t.disabled && !t.readonly), v = B(() => !t.disabled && r.value), k = B(() => n.value === "" || n.value === null || n.value === void 0), E = B(() => (t.disabled || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), N = B(() => t.readonly || !t.editable), $ = B(() => t.enableTitle ? n.value : ""), h = B(() => ({
|
|
1165
1269
|
"form-control": !0,
|
|
1166
1270
|
"f-utils-fill": !0,
|
|
1167
|
-
"text-left":
|
|
1168
|
-
"text-center":
|
|
1169
|
-
"text-right":
|
|
1170
|
-
})),
|
|
1171
|
-
const
|
|
1271
|
+
"text-left": p.value === "left",
|
|
1272
|
+
"text-center": p.value === "center",
|
|
1273
|
+
"text-right": p.value === "right"
|
|
1274
|
+
})), b = B(() => {
|
|
1275
|
+
const g = {
|
|
1172
1276
|
"f-cmp-inputgroup": !0,
|
|
1173
1277
|
"input-group": !0,
|
|
1174
|
-
"f-state-disable":
|
|
1175
|
-
"f-state-editable":
|
|
1176
|
-
"f-state-readonly":
|
|
1177
|
-
"f-state-focus":
|
|
1278
|
+
"f-state-disable": a.value,
|
|
1279
|
+
"f-state-editable": m.value,
|
|
1280
|
+
"f-state-readonly": N.value,
|
|
1281
|
+
"f-state-focus": v.value
|
|
1178
1282
|
};
|
|
1179
|
-
return (
|
|
1180
|
-
}), P =
|
|
1181
|
-
function
|
|
1182
|
-
n.value =
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
() =>
|
|
1186
|
-
(
|
|
1187
|
-
|
|
1283
|
+
return (t.customClass || "").split(" ").reduce((z, Y) => (z[Y] = !0, z), g), g;
|
|
1284
|
+
}), P = B(() => u.value ? "" : "border-width : 0 ");
|
|
1285
|
+
function D(g, M = !0) {
|
|
1286
|
+
n.value = g, o.value !== g && (o.value = g), M && e.emit("change", g), e.emit("update:modelValue", g), e.emit("update:value", g);
|
|
1287
|
+
}
|
|
1288
|
+
J(
|
|
1289
|
+
() => t.modelValue,
|
|
1290
|
+
(g, M) => {
|
|
1291
|
+
g !== M && (n.value = g, o.value = g);
|
|
1188
1292
|
}
|
|
1189
|
-
),
|
|
1190
|
-
|
|
1293
|
+
), J(() => t.disabled, (g, M) => {
|
|
1294
|
+
g !== M && (a.value = g);
|
|
1191
1295
|
});
|
|
1192
|
-
function
|
|
1193
|
-
return
|
|
1296
|
+
function W(g) {
|
|
1297
|
+
return r.value = !1, e.emit("blur", g), g.stopPropagation(), !1;
|
|
1194
1298
|
}
|
|
1195
|
-
function
|
|
1196
|
-
|
|
1299
|
+
function q(g) {
|
|
1300
|
+
e.emit("click", g);
|
|
1197
1301
|
}
|
|
1198
|
-
function
|
|
1199
|
-
|
|
1302
|
+
function T(g) {
|
|
1303
|
+
t.disabled || (u.value && (r.value = !0), c.value && e.emit("focus", g));
|
|
1200
1304
|
}
|
|
1201
|
-
function
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1204
|
-
o.value =
|
|
1305
|
+
function H(g) {
|
|
1306
|
+
e.emit("input", g.target.value);
|
|
1307
|
+
const M = g.target.value;
|
|
1308
|
+
o.value = M, l.value === "change" && (e.emit("update:modelValue", M), e.emit("update:value", M));
|
|
1205
1309
|
}
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1310
|
+
function f(g) {
|
|
1311
|
+
e.emit("keydown", g);
|
|
1208
1312
|
}
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1313
|
+
function w(g) {
|
|
1314
|
+
e.emit("keyup", g);
|
|
1211
1315
|
}
|
|
1212
|
-
function
|
|
1213
|
-
|
|
1316
|
+
function x(g) {
|
|
1317
|
+
g.target.tagName !== "INPUT" && g.preventDefault(), g.stopPropagation();
|
|
1214
1318
|
}
|
|
1215
|
-
function
|
|
1216
|
-
if (
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1319
|
+
function R(g) {
|
|
1320
|
+
if (l.value === "blur") {
|
|
1321
|
+
const M = g.target.value;
|
|
1322
|
+
g.stopPropagation(), D(M);
|
|
1219
1323
|
}
|
|
1220
1324
|
}
|
|
1221
1325
|
return {
|
|
1222
|
-
changeTextBoxValue:
|
|
1223
|
-
disabled:
|
|
1326
|
+
changeTextBoxValue: D,
|
|
1327
|
+
disabled: a,
|
|
1224
1328
|
displayText: o,
|
|
1225
|
-
editable:
|
|
1226
|
-
hasFocused:
|
|
1227
|
-
inputGroupClass:
|
|
1228
|
-
inputType:
|
|
1229
|
-
isEmpty:
|
|
1329
|
+
editable: m,
|
|
1330
|
+
hasFocused: v,
|
|
1331
|
+
inputGroupClass: b,
|
|
1332
|
+
inputType: s,
|
|
1333
|
+
isEmpty: k,
|
|
1230
1334
|
modelValue: n,
|
|
1231
|
-
readonly:
|
|
1232
|
-
onBlur:
|
|
1233
|
-
onClick:
|
|
1234
|
-
onFocus:
|
|
1235
|
-
onInput:
|
|
1236
|
-
onKeydown:
|
|
1237
|
-
onKeyup:
|
|
1238
|
-
onMousedown:
|
|
1239
|
-
onTextBoxValueChange:
|
|
1240
|
-
placeholder:
|
|
1241
|
-
textBoxClass:
|
|
1242
|
-
textBoxTitle:
|
|
1335
|
+
readonly: N,
|
|
1336
|
+
onBlur: W,
|
|
1337
|
+
onClick: q,
|
|
1338
|
+
onFocus: T,
|
|
1339
|
+
onInput: H,
|
|
1340
|
+
onKeydown: f,
|
|
1341
|
+
onKeyup: w,
|
|
1342
|
+
onMousedown: x,
|
|
1343
|
+
onTextBoxValueChange: R,
|
|
1344
|
+
placeholder: E,
|
|
1345
|
+
textBoxClass: h,
|
|
1346
|
+
textBoxTitle: $,
|
|
1243
1347
|
inputGroupStyle: P
|
|
1244
1348
|
};
|
|
1245
1349
|
}
|
|
1246
|
-
function
|
|
1247
|
-
const o =
|
|
1248
|
-
function
|
|
1249
|
-
o.value =
|
|
1350
|
+
function Mo(t, e, n) {
|
|
1351
|
+
const o = i(!1), a = B(() => t.enableClear && !t.readonly && !t.disabled), { changeTextBoxValue: r, displayText: s, hasFocused: u, isEmpty: p } = n;
|
|
1352
|
+
function l(N) {
|
|
1353
|
+
o.value = N;
|
|
1250
1354
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1355
|
+
J(s, () => {
|
|
1356
|
+
u != null && u.value ? l(!!(s != null && s.value)) : l(!1);
|
|
1253
1357
|
});
|
|
1254
|
-
const
|
|
1358
|
+
const c = B(() => ({
|
|
1255
1359
|
"input-group-text": !0,
|
|
1256
1360
|
"input-group-clear": !0
|
|
1257
|
-
})),
|
|
1361
|
+
})), m = B(() => ({
|
|
1258
1362
|
width: "24px",
|
|
1259
1363
|
display: o.value ? "flex" : "none"
|
|
1260
1364
|
}));
|
|
1261
|
-
function
|
|
1262
|
-
|
|
1365
|
+
function v(N) {
|
|
1366
|
+
N.stopPropagation(), a.value && (r("", !0), l(!o.value), e.emit("clear"));
|
|
1263
1367
|
}
|
|
1264
|
-
function
|
|
1265
|
-
|
|
1368
|
+
function k(N) {
|
|
1369
|
+
a.value && !p.value && l(!0);
|
|
1266
1370
|
}
|
|
1267
|
-
function
|
|
1268
|
-
|
|
1371
|
+
function E(N) {
|
|
1372
|
+
a.value && l(!1);
|
|
1269
1373
|
}
|
|
1270
|
-
return { clearButtonClass:
|
|
1374
|
+
return { clearButtonClass: c, clearButtonStyle: m, hasShownClearButton: o, onClearValue: v, onMouseEnter: k, onMouseLeave: E, shouldShowClearButton: a };
|
|
1271
1375
|
}
|
|
1272
|
-
const
|
|
1273
|
-
function
|
|
1274
|
-
let
|
|
1275
|
-
return (
|
|
1276
|
-
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n -
|
|
1277
|
-
|
|
1376
|
+
const Eo = ["moz", "ms", "webkit"];
|
|
1377
|
+
function Io() {
|
|
1378
|
+
let t = 0;
|
|
1379
|
+
return (e) => {
|
|
1380
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), a = setTimeout(() => {
|
|
1381
|
+
e(n + o);
|
|
1278
1382
|
}, o);
|
|
1279
|
-
return
|
|
1383
|
+
return t = n + o, a;
|
|
1280
1384
|
};
|
|
1281
1385
|
}
|
|
1282
|
-
function
|
|
1386
|
+
function Vo() {
|
|
1283
1387
|
if (typeof window > "u")
|
|
1284
1388
|
return () => 0;
|
|
1285
1389
|
if (window.requestAnimationFrame)
|
|
1286
1390
|
return window.requestAnimationFrame.bind(window);
|
|
1287
|
-
const
|
|
1288
|
-
return
|
|
1391
|
+
const t = Eo.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
1392
|
+
return t ? window[`${t}RequestAnimationFrame`] : Io();
|
|
1289
1393
|
}
|
|
1290
|
-
|
|
1291
|
-
function
|
|
1292
|
-
const n =
|
|
1293
|
-
return { appendedButtonClass:
|
|
1394
|
+
Vo();
|
|
1395
|
+
function Ro(t, e) {
|
|
1396
|
+
const n = i(t.groupText), o = B(() => t.showButtonWhenDisabled && (t.readonly || t.disabled)), a = B(() => t.enableClear || !!t.groupText);
|
|
1397
|
+
return { appendedButtonClass: B(() => ({
|
|
1294
1398
|
"input-group-append": !0,
|
|
1295
1399
|
"append-force-show": o.value
|
|
1296
|
-
})), appendedContent: n, shouldShowAppendedButton:
|
|
1400
|
+
})), appendedContent: n, shouldShowAppendedButton: a };
|
|
1297
1401
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const { appendedContent:
|
|
1300
|
-
|
|
1301
|
-
|
|
1402
|
+
function Oo(t, e, n, o) {
|
|
1403
|
+
const { appendedContent: a } = o, r = i(t.enableViewPassword), s = B(() => t.type === "password"), u = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', p = '<span class="f-icon f-icon-eye"></span>', l = i(!1);
|
|
1404
|
+
J(() => [t.readonly, t.disabled], ([v, k]) => {
|
|
1405
|
+
s.value && (n.value = v || k ? "password" : n.value, a.value = v || k ? p : a.value);
|
|
1302
1406
|
});
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1407
|
+
function c() {
|
|
1408
|
+
return l.value = !l.value, n.value = l.value ? "text" : "password", a.value = l.value ? u : p, !1;
|
|
1305
1409
|
}
|
|
1306
|
-
function
|
|
1307
|
-
n.value =
|
|
1308
|
-
}
|
|
1309
|
-
return
|
|
1310
|
-
}
|
|
1311
|
-
function
|
|
1312
|
-
const o =
|
|
1313
|
-
onBlurTextBox:
|
|
1314
|
-
onFocusTextBox:
|
|
1315
|
-
onInput:
|
|
1316
|
-
onKeyDown:
|
|
1317
|
-
textBoxValue:
|
|
1318
|
-
} = n,
|
|
1410
|
+
function m() {
|
|
1411
|
+
n.value = s.value ? "password" : "text", a.value = s.value ? r.value ? p : "" : a.value;
|
|
1412
|
+
}
|
|
1413
|
+
return m(), { isPassword: s, onClickAppendedButton: c };
|
|
1414
|
+
}
|
|
1415
|
+
function jo(t, e, n) {
|
|
1416
|
+
const o = i(), {
|
|
1417
|
+
onBlurTextBox: a,
|
|
1418
|
+
onFocusTextBox: r,
|
|
1419
|
+
onInput: s,
|
|
1420
|
+
onKeyDown: u,
|
|
1421
|
+
textBoxValue: p
|
|
1422
|
+
} = n, l = B(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), c = B(() => ({
|
|
1319
1423
|
"form-control": !0,
|
|
1320
1424
|
"f-utils-fill": !0
|
|
1321
|
-
})),
|
|
1322
|
-
"text-align":
|
|
1425
|
+
})), m = B(() => ({
|
|
1426
|
+
"text-align": t.textAlign
|
|
1323
1427
|
}));
|
|
1324
|
-
function
|
|
1325
|
-
|
|
1428
|
+
function v(N) {
|
|
1429
|
+
N.stopPropagation();
|
|
1326
1430
|
}
|
|
1327
|
-
function
|
|
1328
|
-
|
|
1431
|
+
function k() {
|
|
1432
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
1329
1433
|
}
|
|
1330
|
-
async function
|
|
1331
|
-
|
|
1434
|
+
async function E(N) {
|
|
1435
|
+
r(N), await ve, k();
|
|
1332
1436
|
}
|
|
1333
|
-
return
|
|
1334
|
-
await
|
|
1335
|
-
}), () =>
|
|
1437
|
+
return oe(async () => {
|
|
1438
|
+
await ve, k();
|
|
1439
|
+
}), () => d("input", {
|
|
1336
1440
|
ref: o,
|
|
1337
|
-
class:
|
|
1338
|
-
style:
|
|
1441
|
+
class: c.value,
|
|
1442
|
+
style: m.value,
|
|
1339
1443
|
type: "text",
|
|
1340
|
-
value:
|
|
1341
|
-
disabled:
|
|
1342
|
-
readonly:
|
|
1343
|
-
placeholder:
|
|
1344
|
-
onBlur:
|
|
1345
|
-
onChange:
|
|
1346
|
-
onFocus:
|
|
1347
|
-
onInput:
|
|
1348
|
-
onKeydown:
|
|
1444
|
+
value: p.value,
|
|
1445
|
+
disabled: t.disabled,
|
|
1446
|
+
readonly: t.readonly || !t.editable,
|
|
1447
|
+
placeholder: l.value,
|
|
1448
|
+
onBlur: a,
|
|
1449
|
+
onChange: v,
|
|
1450
|
+
onFocus: E,
|
|
1451
|
+
onInput: s,
|
|
1452
|
+
onKeydown: u
|
|
1349
1453
|
}, null);
|
|
1350
1454
|
}
|
|
1351
|
-
function
|
|
1455
|
+
function Lo(t, e, n) {
|
|
1352
1456
|
const {
|
|
1353
1457
|
canDownward: o,
|
|
1354
|
-
canUpward:
|
|
1355
|
-
onClickDownButton:
|
|
1356
|
-
onClickUpButton:
|
|
1357
|
-
} = n,
|
|
1458
|
+
canUpward: a,
|
|
1459
|
+
onClickDownButton: r,
|
|
1460
|
+
onClickUpButton: s
|
|
1461
|
+
} = n, u = B(() => ({
|
|
1358
1462
|
"input-group-append": !0,
|
|
1359
1463
|
"btn-group": !0,
|
|
1360
1464
|
"btn-group-number": !0
|
|
1361
|
-
})),
|
|
1465
|
+
})), p = B(() => ({
|
|
1362
1466
|
btn: !0,
|
|
1363
1467
|
"btn-secondary": !0,
|
|
1364
1468
|
"btn-number-flag": !0
|
|
1365
|
-
})),
|
|
1366
|
-
cursor:
|
|
1469
|
+
})), l = B(() => ({
|
|
1470
|
+
cursor: a() ? "pointer" : "not-allowed",
|
|
1367
1471
|
"margin-left": 0
|
|
1368
|
-
})),
|
|
1472
|
+
})), c = B(() => ({
|
|
1369
1473
|
cursor: o() ? "pointer" : "not-allowed",
|
|
1370
1474
|
"margin-left": 0
|
|
1371
1475
|
}));
|
|
1372
|
-
return () =>
|
|
1373
|
-
class:
|
|
1374
|
-
}, [
|
|
1476
|
+
return () => d("div", {
|
|
1477
|
+
class: u.value
|
|
1478
|
+
}, [d("button", {
|
|
1375
1479
|
title: "upButton",
|
|
1376
|
-
class:
|
|
1377
|
-
style:
|
|
1378
|
-
onClick:
|
|
1379
|
-
disabled: !
|
|
1380
|
-
}, [
|
|
1480
|
+
class: p.value,
|
|
1481
|
+
style: l.value,
|
|
1482
|
+
onClick: s,
|
|
1483
|
+
disabled: !a()
|
|
1484
|
+
}, [d("span", {
|
|
1381
1485
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
1382
|
-
}, null)]),
|
|
1486
|
+
}, null)]), d("button", {
|
|
1383
1487
|
title: "downButton",
|
|
1384
|
-
class:
|
|
1385
|
-
style:
|
|
1386
|
-
onClick:
|
|
1488
|
+
class: p.value,
|
|
1489
|
+
style: c.value,
|
|
1490
|
+
onClick: r,
|
|
1387
1491
|
disabled: !o()
|
|
1388
|
-
}, [
|
|
1492
|
+
}, [d("span", {
|
|
1389
1493
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1390
1494
|
}, null)])]);
|
|
1391
1495
|
}
|
|
1392
|
-
function
|
|
1393
|
-
const n =
|
|
1394
|
-
displayValue:
|
|
1395
|
-
modelValue:
|
|
1396
|
-
getRealValue:
|
|
1397
|
-
} = n,
|
|
1398
|
-
format:
|
|
1496
|
+
function Po(t, e) {
|
|
1497
|
+
const n = yt(t, e), o = bt(t, e, n), a = Ct(t, e, o, n), r = wt(t, e, o, n, a), s = Lo(t, e, a), {
|
|
1498
|
+
displayValue: u,
|
|
1499
|
+
modelValue: p,
|
|
1500
|
+
getRealValue: l
|
|
1501
|
+
} = n, c = jo(t, e, r), {
|
|
1502
|
+
format: m
|
|
1399
1503
|
} = o, {
|
|
1400
|
-
isFocus:
|
|
1401
|
-
} =
|
|
1402
|
-
return
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
}),
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1408
|
-
}),
|
|
1409
|
-
|
|
1410
|
-
}),
|
|
1411
|
-
|
|
1412
|
-
}), () =>
|
|
1504
|
+
isFocus: v
|
|
1505
|
+
} = r, k = B(() => !t.disabled && !t.readonly);
|
|
1506
|
+
return oe(() => {
|
|
1507
|
+
const E = l(t.modelValue);
|
|
1508
|
+
u.value = m(E);
|
|
1509
|
+
}), J(() => [t.value], ([E]) => {
|
|
1510
|
+
const N = l(E);
|
|
1511
|
+
p.value = N, u.value = m(N);
|
|
1512
|
+
}), J(() => [t.modelValue], ([E]) => {
|
|
1513
|
+
E !== p.value && (p.value = E, !v.value && (u.value = m(l(E))));
|
|
1514
|
+
}), J(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
|
|
1515
|
+
u.value = m(p.value);
|
|
1516
|
+
}), () => d("div", {
|
|
1413
1517
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1414
|
-
}, [
|
|
1415
|
-
}
|
|
1416
|
-
function
|
|
1417
|
-
const
|
|
1418
|
-
isPassword:
|
|
1419
|
-
} = n,
|
|
1420
|
-
disabled:
|
|
1421
|
-
displayText:
|
|
1422
|
-
inputType:
|
|
1423
|
-
onBlur:
|
|
1424
|
-
onFocus:
|
|
1425
|
-
onInput:
|
|
1426
|
-
onClick:
|
|
1427
|
-
onKeydown:
|
|
1518
|
+
}, [c(), k.value && s()]);
|
|
1519
|
+
}
|
|
1520
|
+
function No(t, e, n, o) {
|
|
1521
|
+
const a = i(), r = i(t.autocomplete), s = i(t.enableTitle), {
|
|
1522
|
+
isPassword: u
|
|
1523
|
+
} = n, p = i(t.minLength), l = i(t.maxLength), c = i(t.tabIndex), {
|
|
1524
|
+
disabled: m,
|
|
1525
|
+
displayText: v,
|
|
1526
|
+
inputType: k,
|
|
1527
|
+
onBlur: E,
|
|
1528
|
+
onFocus: N,
|
|
1529
|
+
onInput: $,
|
|
1530
|
+
onClick: h,
|
|
1531
|
+
onKeydown: b,
|
|
1428
1532
|
onKeyup: P,
|
|
1429
|
-
onMousedown:
|
|
1430
|
-
onTextBoxValueChange:
|
|
1431
|
-
readonly:
|
|
1432
|
-
placeholder:
|
|
1433
|
-
textBoxClass:
|
|
1434
|
-
textBoxTitle:
|
|
1533
|
+
onMousedown: D,
|
|
1534
|
+
onTextBoxValueChange: W,
|
|
1535
|
+
readonly: q,
|
|
1536
|
+
placeholder: T,
|
|
1537
|
+
textBoxClass: H,
|
|
1538
|
+
textBoxTitle: f
|
|
1435
1539
|
} = o;
|
|
1436
|
-
return
|
|
1437
|
-
|
|
1438
|
-
}), () =>
|
|
1439
|
-
ref:
|
|
1540
|
+
return oe(() => {
|
|
1541
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
1542
|
+
}), () => d("input", {
|
|
1543
|
+
ref: a,
|
|
1440
1544
|
name: "input-group-value",
|
|
1441
|
-
autocomplete:
|
|
1442
|
-
class:
|
|
1443
|
-
disabled:
|
|
1444
|
-
maxlength:
|
|
1445
|
-
minlength:
|
|
1446
|
-
placeholder:
|
|
1447
|
-
readonly:
|
|
1448
|
-
tabindex:
|
|
1449
|
-
title:
|
|
1450
|
-
type:
|
|
1451
|
-
value:
|
|
1452
|
-
onBlur:
|
|
1453
|
-
onClick:
|
|
1454
|
-
onChange:
|
|
1455
|
-
onFocus:
|
|
1456
|
-
onInput:
|
|
1457
|
-
onKeydown:
|
|
1545
|
+
autocomplete: r.value,
|
|
1546
|
+
class: H.value,
|
|
1547
|
+
disabled: m == null ? void 0 : m.value,
|
|
1548
|
+
maxlength: l.value,
|
|
1549
|
+
minlength: p.value,
|
|
1550
|
+
placeholder: T.value,
|
|
1551
|
+
readonly: q == null ? void 0 : q.value,
|
|
1552
|
+
tabindex: c.value,
|
|
1553
|
+
title: s.value && !u.value ? f.value : "",
|
|
1554
|
+
type: k.value,
|
|
1555
|
+
value: v == null ? void 0 : v.value,
|
|
1556
|
+
onBlur: E,
|
|
1557
|
+
onClick: h,
|
|
1558
|
+
onChange: W,
|
|
1559
|
+
onFocus: N,
|
|
1560
|
+
onInput: $,
|
|
1561
|
+
onKeydown: b,
|
|
1458
1562
|
onKeyup: P,
|
|
1459
|
-
onMousedown:
|
|
1563
|
+
onMousedown: D
|
|
1460
1564
|
}, null);
|
|
1461
1565
|
}
|
|
1462
|
-
function
|
|
1463
|
-
const n =
|
|
1464
|
-
content:
|
|
1566
|
+
function zo(t, e) {
|
|
1567
|
+
const n = B(() => t.useExtendInfo && !!t.extendInfo), o = Z({
|
|
1568
|
+
content: t.extendInfo
|
|
1465
1569
|
});
|
|
1466
|
-
function
|
|
1467
|
-
|
|
1570
|
+
function a() {
|
|
1571
|
+
e.emit("updateExtendInfo");
|
|
1468
1572
|
}
|
|
1469
|
-
return () => n.value &&
|
|
1573
|
+
return () => n.value && rt(d("span", {
|
|
1470
1574
|
class: "input-group-before-tips",
|
|
1471
|
-
onMouseenter:
|
|
1472
|
-
}, [
|
|
1575
|
+
onMouseenter: a
|
|
1576
|
+
}, [d("i", {
|
|
1473
1577
|
class: "f-icon f-icon-info-circle"
|
|
1474
|
-
}, null),
|
|
1578
|
+
}, null), d("b", {
|
|
1475
1579
|
class: "tips-arrow"
|
|
1476
|
-
}, null)]), [[
|
|
1580
|
+
}, null)]), [[it("tooltip"), o]]);
|
|
1477
1581
|
}
|
|
1478
|
-
function
|
|
1582
|
+
function $o(t, e, n, o, a) {
|
|
1479
1583
|
const {
|
|
1480
|
-
appendedButtonClass:
|
|
1481
|
-
appendedContent:
|
|
1482
|
-
} = n,
|
|
1483
|
-
clearButtonClass:
|
|
1484
|
-
clearButtonStyle:
|
|
1485
|
-
onClearValue:
|
|
1486
|
-
shouldShowClearButton:
|
|
1584
|
+
appendedButtonClass: r,
|
|
1585
|
+
appendedContent: s
|
|
1586
|
+
} = n, u = B(() => t.showButtonWhenDisabled && (!t.editable || !t.readonly) && !t.disabled), p = B(() => s.value && !e.slots.groupTextTemplate), l = B(() => !!e.slots.groupTextTemplate), {
|
|
1587
|
+
clearButtonClass: c,
|
|
1588
|
+
clearButtonStyle: m,
|
|
1589
|
+
onClearValue: v,
|
|
1590
|
+
shouldShowClearButton: k
|
|
1487
1591
|
} = o;
|
|
1488
|
-
function
|
|
1489
|
-
return
|
|
1592
|
+
function E() {
|
|
1593
|
+
return d("span", {
|
|
1490
1594
|
id: "clearIcon",
|
|
1491
|
-
class:
|
|
1492
|
-
style:
|
|
1493
|
-
onClick: (
|
|
1494
|
-
}, [
|
|
1595
|
+
class: c.value,
|
|
1596
|
+
style: m.value,
|
|
1597
|
+
onClick: (T) => v(T)
|
|
1598
|
+
}, [d("i", {
|
|
1495
1599
|
class: "f-icon modal_close"
|
|
1496
1600
|
}, null)]);
|
|
1497
1601
|
}
|
|
1498
|
-
function
|
|
1499
|
-
|
|
1602
|
+
function N(T) {
|
|
1603
|
+
e.emit("iconMouseEnter", T);
|
|
1500
1604
|
}
|
|
1501
|
-
function
|
|
1502
|
-
|
|
1605
|
+
function $(T) {
|
|
1606
|
+
e.emit("iconMouseLeave", T);
|
|
1503
1607
|
}
|
|
1504
|
-
function
|
|
1505
|
-
|
|
1506
|
-
originalEvent:
|
|
1507
|
-
}),
|
|
1608
|
+
function h(T) {
|
|
1609
|
+
u.value && e.emit("clickHandle", {
|
|
1610
|
+
originalEvent: T
|
|
1611
|
+
}), T.stopPropagation();
|
|
1508
1612
|
}
|
|
1509
|
-
const
|
|
1613
|
+
const b = t.type === "password" ? a.onClickAppendedButton : h;
|
|
1510
1614
|
function P() {
|
|
1511
|
-
return
|
|
1615
|
+
return d("span", {
|
|
1512
1616
|
class: "input-group-text",
|
|
1513
|
-
onMouseenter: (
|
|
1514
|
-
onMouseleave: (
|
|
1515
|
-
innerHTML:
|
|
1516
|
-
onClick: (
|
|
1617
|
+
onMouseenter: (T) => N(T),
|
|
1618
|
+
onMouseleave: (T) => $(T),
|
|
1619
|
+
innerHTML: s.value,
|
|
1620
|
+
onClick: (T) => b(T)
|
|
1517
1621
|
}, null);
|
|
1518
1622
|
}
|
|
1519
|
-
function
|
|
1520
|
-
return
|
|
1623
|
+
function D() {
|
|
1624
|
+
return e.slots.groupTextTemplate && e.slots.groupTextTemplate();
|
|
1521
1625
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1626
|
+
function W() {
|
|
1627
|
+
return p.value ? P : l.value ? D : "";
|
|
1524
1628
|
}
|
|
1525
|
-
const
|
|
1526
|
-
return () =>
|
|
1527
|
-
class:
|
|
1528
|
-
}, [
|
|
1629
|
+
const q = W();
|
|
1630
|
+
return () => d("div", {
|
|
1631
|
+
class: r.value
|
|
1632
|
+
}, [k.value && E(), q && q()]);
|
|
1529
1633
|
}
|
|
1530
|
-
const
|
|
1634
|
+
const Ao = /* @__PURE__ */ ee({
|
|
1531
1635
|
name: "FInputGroup",
|
|
1532
|
-
props:
|
|
1636
|
+
props: Pe,
|
|
1533
1637
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
1534
|
-
setup(
|
|
1535
|
-
const n =
|
|
1536
|
-
inputGroupClass:
|
|
1537
|
-
inputType:
|
|
1538
|
-
inputGroupStyle:
|
|
1539
|
-
} =
|
|
1540
|
-
shouldShowAppendedButton:
|
|
1541
|
-
} =
|
|
1542
|
-
onMouseEnter:
|
|
1543
|
-
onMouseLeave:
|
|
1544
|
-
} =
|
|
1545
|
-
|
|
1546
|
-
n.value =
|
|
1547
|
-
}),
|
|
1548
|
-
n.value =
|
|
1549
|
-
}),
|
|
1550
|
-
|
|
1638
|
+
setup(t, e) {
|
|
1639
|
+
const n = i(t.modelValue), o = i(t.modelValue), a = So(t, e, n, o), {
|
|
1640
|
+
inputGroupClass: r,
|
|
1641
|
+
inputType: s,
|
|
1642
|
+
inputGroupStyle: u
|
|
1643
|
+
} = a, p = Ro(t), {
|
|
1644
|
+
shouldShowAppendedButton: l
|
|
1645
|
+
} = p, c = Mo(t, e, a), {
|
|
1646
|
+
onMouseEnter: m,
|
|
1647
|
+
onMouseLeave: v
|
|
1648
|
+
} = c, k = Oo(t, e, s, p), E = Po(t, e), N = No(t, e, k, a), $ = $o(t, e, p, c, k), h = zo(t, e), b = B(() => t.type === "number");
|
|
1649
|
+
J(() => [t.value], ([D]) => {
|
|
1650
|
+
n.value = D, o.value = D;
|
|
1651
|
+
}), J(() => [t.modelValue], ([D]) => {
|
|
1652
|
+
n.value = D, o.value = D;
|
|
1653
|
+
}), oe(() => {
|
|
1654
|
+
t.value && (n.value = t.value, o.value = t.value);
|
|
1551
1655
|
});
|
|
1552
|
-
const P = () =>
|
|
1553
|
-
id:
|
|
1554
|
-
class:
|
|
1555
|
-
style:
|
|
1556
|
-
onMouseenter:
|
|
1557
|
-
onMouseleave:
|
|
1558
|
-
}, [
|
|
1656
|
+
const P = () => d(se, null, [d("div", {
|
|
1657
|
+
id: t.id,
|
|
1658
|
+
class: r.value,
|
|
1659
|
+
style: u.value,
|
|
1660
|
+
onMouseenter: m,
|
|
1661
|
+
onMouseleave: v
|
|
1662
|
+
}, [b.value ? E() : d(se, null, [h(), N(), l.value && $()])])]);
|
|
1559
1663
|
return () => P();
|
|
1560
1664
|
}
|
|
1561
|
-
}),
|
|
1562
|
-
let
|
|
1563
|
-
function
|
|
1564
|
-
|
|
1665
|
+
}), I = {}, V = {}, O = {}, L = {};
|
|
1666
|
+
let Be = !1;
|
|
1667
|
+
function Ho() {
|
|
1668
|
+
Be || (Be = !0, Tt.register(I, V, O, L), xt.register(I, V, O, L), kt.register(I, V, O, L), Bt.register(I, V, O, L), Ft.register(I, V, O, L), St.register(I, V, O, L), Mt.register(I, V, O, L), he.register(I, V, O, L), Et.register(I, V, O, L), It.register(I, V, O, L), Rt.register(I, V, O, L), Vt.register(I, V, O, L), Ot.register(I, V, O, L), jt.register(I, V, O, L), Lt.register(I, V, O, L), vt.register(I, V, O, L), Pt.register(I, V, O, L), Nt.register(I, V, O, L), zt.register(I, V, O, L), $t.register(I, V, O, L), At.register(I, V, O, L), Ht.register(I, V, O, L), Gt.register(I, V, O, L), Dt.register(I, V, O, L), qt.register(I, V, O, L), Ut.register(I, V, O, L), Wt.register(I, V, O, L), Xt.register(I, V, O, L), gt.register(I, V, O, L), Yt.register(I, V, O, L), Jt.register(I, V, O, L), Qt.register(I, V, O, L), Zt.register(I, V, O, L), Kt.register(I, V, O, L), _t.register(I, V, O, L), en.register(I, V, O, L), tn.register(I, V, O, L), on.register(I, V, O, L), an.register(I, V, O, L), nn.register(I, V, O, L), Tn.register(I, V, O), ln.register(I, V, O, L), sn.register(I, V, O, L), rn.register(I, V, O, L), un.register(I, V, O, L), cn.register(I, V, O, L), dn.register(I, V, O, L), pn.register(I, V, O, L), mn.register(I, V, O, L), fn.register(I, V, O, L), vn.register(I, V, O, L), hn.register(I, V, O, L), gn.register(I, V, O, L), bn.register(I, V, O, L), yn.register(I, V, O, L), Cn.register(I, V, O, L), wn.register(I, V, O, L), xn.register(I, V, O, L), kn.register(I, V, O, L));
|
|
1565
1669
|
}
|
|
1566
|
-
function
|
|
1567
|
-
|
|
1568
|
-
function
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1670
|
+
function Do() {
|
|
1671
|
+
Ho();
|
|
1672
|
+
function t(a, r) {
|
|
1673
|
+
const s = V[a];
|
|
1674
|
+
return s ? s(r) : {};
|
|
1571
1675
|
}
|
|
1572
|
-
function
|
|
1573
|
-
return
|
|
1676
|
+
function e(a) {
|
|
1677
|
+
return I[a] || Ao;
|
|
1574
1678
|
}
|
|
1575
|
-
function n(
|
|
1576
|
-
switch (
|
|
1679
|
+
function n(a) {
|
|
1680
|
+
switch (a) {
|
|
1577
1681
|
case "check-box":
|
|
1578
1682
|
return "onChangeValue";
|
|
1579
1683
|
case "switch":
|
|
@@ -1604,7 +1708,7 @@ function to() {
|
|
|
1604
1708
|
case "input-group":
|
|
1605
1709
|
return "onChange";
|
|
1606
1710
|
case "lookup":
|
|
1607
|
-
return "";
|
|
1711
|
+
return "onUpdate:modelValue";
|
|
1608
1712
|
case "number-range":
|
|
1609
1713
|
return "onValueChange";
|
|
1610
1714
|
case "number-spinner":
|
|
@@ -1619,6 +1723,8 @@ function to() {
|
|
|
1619
1723
|
return "onSavedCommandListChanged";
|
|
1620
1724
|
case "grid-field-editor":
|
|
1621
1725
|
return "onChange";
|
|
1726
|
+
case "response-form-layout-setting":
|
|
1727
|
+
return "onChange";
|
|
1622
1728
|
case "field-selector":
|
|
1623
1729
|
return "onFieldSelected";
|
|
1624
1730
|
case "schema-selector":
|
|
@@ -1629,141 +1735,141 @@ function to() {
|
|
|
1629
1735
|
return "onValueChange";
|
|
1630
1736
|
}
|
|
1631
1737
|
}
|
|
1632
|
-
function o(
|
|
1633
|
-
switch (
|
|
1738
|
+
function o(a) {
|
|
1739
|
+
switch (a) {
|
|
1634
1740
|
case "combo-list":
|
|
1635
1741
|
case "input-group":
|
|
1636
1742
|
case "textarea":
|
|
1637
1743
|
return "onClear";
|
|
1638
1744
|
}
|
|
1639
1745
|
}
|
|
1640
|
-
return { resolveEditorProps:
|
|
1746
|
+
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: o };
|
|
1641
1747
|
}
|
|
1642
|
-
const
|
|
1748
|
+
const Go = /* @__PURE__ */ ee({
|
|
1643
1749
|
name: "FDynamicFormGroup",
|
|
1644
|
-
props:
|
|
1750
|
+
props: Le,
|
|
1645
1751
|
emits: ["change", "update:modelValue"],
|
|
1646
|
-
setup(
|
|
1647
|
-
const n =
|
|
1648
|
-
|
|
1649
|
-
const
|
|
1650
|
-
resolveEditorProps:
|
|
1651
|
-
resolveEditorType:
|
|
1652
|
-
getChangeFunctionName:
|
|
1653
|
-
getClearFunctionName:
|
|
1654
|
-
} =
|
|
1752
|
+
setup(t, e) {
|
|
1753
|
+
const n = i(t.id), o = i(t.customClass), a = i(t.editor), r = i(t.label), s = i(t.modelValue), u = i(t.readonly), p = i(t.required), l = i(t.showLabel), c = i(t.visible);
|
|
1754
|
+
i(t.type);
|
|
1755
|
+
const m = i(), {
|
|
1756
|
+
resolveEditorProps: v,
|
|
1757
|
+
resolveEditorType: k,
|
|
1758
|
+
getChangeFunctionName: E,
|
|
1759
|
+
getClearFunctionName: N
|
|
1760
|
+
} = Do(), $ = B(() => ({
|
|
1655
1761
|
"form-group": !0,
|
|
1656
1762
|
"farris-form-group": !0,
|
|
1657
1763
|
"common-group": !0,
|
|
1658
|
-
"q-state-readonly":
|
|
1764
|
+
"q-state-readonly": u.value
|
|
1659
1765
|
}));
|
|
1660
|
-
function
|
|
1661
|
-
|
|
1766
|
+
function h(D, W) {
|
|
1767
|
+
s.value = W !== void 0 ? W : D, e.emit("update:modelValue", s.value), e.emit("change", s.value);
|
|
1662
1768
|
}
|
|
1663
|
-
function
|
|
1664
|
-
|
|
1769
|
+
function b() {
|
|
1770
|
+
e.emit("update:modelValue", "");
|
|
1665
1771
|
}
|
|
1666
|
-
const P =
|
|
1667
|
-
const
|
|
1668
|
-
return
|
|
1669
|
-
ref:
|
|
1670
|
-
},
|
|
1671
|
-
modelValue:
|
|
1672
|
-
"onUpdate:modelValue": (
|
|
1772
|
+
const P = B(() => {
|
|
1773
|
+
const D = a.value.type || "input-group", W = k(D), q = v(D, a.value), T = E(D), H = N(a.value.type);
|
|
1774
|
+
return q[T] = h, q[H] = b, (q.id == null || q.id === "") && (q.id = n.value), () => d(W, ye({
|
|
1775
|
+
ref: m
|
|
1776
|
+
}, q, {
|
|
1777
|
+
modelValue: s.value,
|
|
1778
|
+
"onUpdate:modelValue": (f) => s.value = f
|
|
1673
1779
|
}), null);
|
|
1674
1780
|
});
|
|
1675
|
-
return
|
|
1676
|
-
n.value =
|
|
1677
|
-
}),
|
|
1678
|
-
editorRef:
|
|
1679
|
-
}), () =>
|
|
1781
|
+
return J([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible], ([D, W, q, T, H, f, w, x, R]) => {
|
|
1782
|
+
n.value = D, o.value = W, a.value = q, r.value = T, s.value = H, u.value = f, p.value = w, l.value = x, c.value = R;
|
|
1783
|
+
}), e.expose({
|
|
1784
|
+
editorRef: m
|
|
1785
|
+
}), () => c.value && d("div", {
|
|
1680
1786
|
id: `${n.value}-input-group`,
|
|
1681
1787
|
class: o.value
|
|
1682
|
-
}, [
|
|
1788
|
+
}, [d("div", {
|
|
1683
1789
|
class: "farris-group-wrap"
|
|
1684
|
-
}, [
|
|
1685
|
-
class:
|
|
1686
|
-
}, [
|
|
1790
|
+
}, [d("div", {
|
|
1791
|
+
class: $.value
|
|
1792
|
+
}, [l.value && d(ho, {
|
|
1687
1793
|
id: `${n.value}-lable`,
|
|
1688
|
-
required:
|
|
1689
|
-
text:
|
|
1690
|
-
title:
|
|
1691
|
-
}, null),
|
|
1794
|
+
required: p.value,
|
|
1795
|
+
text: r.value,
|
|
1796
|
+
title: r.value
|
|
1797
|
+
}, null), d("div", {
|
|
1692
1798
|
class: "farris-input-wrap"
|
|
1693
1799
|
}, [P.value()])])])]);
|
|
1694
1800
|
}
|
|
1695
|
-
}),
|
|
1801
|
+
}), te = class te {
|
|
1696
1802
|
/**
|
|
1697
1803
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1698
1804
|
*/
|
|
1699
|
-
static getEditorTypesByMDataType(
|
|
1700
|
-
const n =
|
|
1805
|
+
static getEditorTypesByMDataType(e) {
|
|
1806
|
+
const n = te.fieldControlTypeMapping[e];
|
|
1701
1807
|
return n || [{ key: "", value: "" }];
|
|
1702
1808
|
}
|
|
1703
1809
|
/**
|
|
1704
1810
|
* 获取所有输入类控件
|
|
1705
1811
|
*/
|
|
1706
1812
|
static getAllInputTypes() {
|
|
1707
|
-
const
|
|
1708
|
-
for (let n in
|
|
1709
|
-
|
|
1710
|
-
|
|
1813
|
+
const e = [];
|
|
1814
|
+
for (let n in te.fieldControlTypeMapping)
|
|
1815
|
+
te.fieldControlTypeMapping[n].forEach((o) => {
|
|
1816
|
+
e.find((a) => a.key === o.key && a.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
1711
1817
|
});
|
|
1712
|
-
return
|
|
1818
|
+
return e;
|
|
1713
1819
|
}
|
|
1714
1820
|
};
|
|
1715
1821
|
/**
|
|
1716
1822
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1717
1823
|
*/
|
|
1718
|
-
|
|
1824
|
+
S(te, "fieldControlTypeMapping", {
|
|
1719
1825
|
String: [
|
|
1720
|
-
{ key:
|
|
1721
|
-
{ key:
|
|
1722
|
-
{ key:
|
|
1723
|
-
{ key:
|
|
1724
|
-
{ key:
|
|
1725
|
-
{ key:
|
|
1726
|
-
{ key:
|
|
1826
|
+
{ key: A["input-group"].type, value: A["input-group"].name },
|
|
1827
|
+
{ key: A.lookup.type, value: A.lookup.name },
|
|
1828
|
+
{ key: A["date-picker"].type, value: A["date-picker"].name },
|
|
1829
|
+
{ key: A["check-box"].type, value: A["check-box"].name },
|
|
1830
|
+
{ key: A["radio-group"].type, value: A["radio-group"].name },
|
|
1831
|
+
{ key: A["combo-list"].type, value: A["combo-list"].name },
|
|
1832
|
+
{ key: A.textarea.type, value: A.textarea.name }
|
|
1727
1833
|
],
|
|
1728
1834
|
Text: [
|
|
1729
|
-
{ key:
|
|
1730
|
-
{ key:
|
|
1835
|
+
{ key: A.textarea.type, value: A.textarea.name },
|
|
1836
|
+
{ key: A.lookup.type, value: A.lookup.name }
|
|
1731
1837
|
],
|
|
1732
1838
|
Decimal: [
|
|
1733
|
-
{ key:
|
|
1839
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
1734
1840
|
],
|
|
1735
1841
|
Integer: [
|
|
1736
|
-
{ key:
|
|
1842
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
1737
1843
|
],
|
|
1738
1844
|
Number: [
|
|
1739
|
-
{ key:
|
|
1845
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
1740
1846
|
],
|
|
1741
1847
|
BigNumber: [
|
|
1742
|
-
{ key:
|
|
1848
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
1743
1849
|
],
|
|
1744
1850
|
Date: [
|
|
1745
|
-
{ key:
|
|
1851
|
+
{ key: A["date-picker"].type, value: A["date-picker"].name }
|
|
1746
1852
|
],
|
|
1747
1853
|
DateTime: [
|
|
1748
|
-
{ key:
|
|
1854
|
+
{ key: A["date-picker"].type, value: A["date-picker"].name }
|
|
1749
1855
|
],
|
|
1750
1856
|
Boolean: [
|
|
1751
|
-
{ key:
|
|
1752
|
-
{ key:
|
|
1857
|
+
{ key: A.switch.type, value: A.switch.name },
|
|
1858
|
+
{ key: A["check-box"].type, value: A["check-box"].name }
|
|
1753
1859
|
],
|
|
1754
1860
|
Enum: [
|
|
1755
|
-
{ key:
|
|
1756
|
-
{ key:
|
|
1861
|
+
{ key: A["combo-list"].type, value: A["combo-list"].name },
|
|
1862
|
+
{ key: A["radio-group"].type, value: A["radio-group"].name }
|
|
1757
1863
|
],
|
|
1758
1864
|
Object: [
|
|
1759
|
-
{ key:
|
|
1760
|
-
{ key:
|
|
1761
|
-
{ key:
|
|
1865
|
+
{ key: A.lookup.type, value: A.lookup.name },
|
|
1866
|
+
{ key: A["combo-list"].type, value: A["combo-list"].name },
|
|
1867
|
+
{ key: A["radio-group"].type, value: A["radio-group"].name }
|
|
1762
1868
|
]
|
|
1763
1869
|
});
|
|
1764
|
-
let
|
|
1765
|
-
|
|
1766
|
-
const
|
|
1870
|
+
let Fe = te;
|
|
1871
|
+
i(0);
|
|
1872
|
+
const qo = {
|
|
1767
1873
|
id: { type: String, default: "" },
|
|
1768
1874
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
1769
1875
|
editor: { type: Object, default: {} },
|
|
@@ -1778,14 +1884,1207 @@ const oo = {
|
|
|
1778
1884
|
*/
|
|
1779
1885
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
1780
1886
|
};
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1887
|
+
ce(
|
|
1888
|
+
qo,
|
|
1889
|
+
je,
|
|
1890
|
+
be,
|
|
1785
1891
|
void 0
|
|
1786
1892
|
);
|
|
1787
|
-
|
|
1788
|
-
|
|
1893
|
+
const Uo = "https://json-schema.org/draft/2020-12/schema", Wo = "https://farris-design.gitee.io/grid-field-editor.schema.json", Xo = "response-form-layout-setting", Yo = "A Farris Data Grid Component", Jo = "object", Qo = {
|
|
1894
|
+
id: {
|
|
1895
|
+
description: "The unique identifier for a Input Group",
|
|
1896
|
+
type: "string"
|
|
1897
|
+
},
|
|
1898
|
+
type: {
|
|
1899
|
+
description: "The type string of Input Group component",
|
|
1900
|
+
type: "string",
|
|
1901
|
+
default: "response-form-layout-setting"
|
|
1902
|
+
},
|
|
1903
|
+
viewModelId: {
|
|
1904
|
+
description: "",
|
|
1905
|
+
type: "string",
|
|
1906
|
+
default: ""
|
|
1907
|
+
},
|
|
1908
|
+
gridData: {
|
|
1909
|
+
description: "",
|
|
1910
|
+
type: "Object",
|
|
1911
|
+
default: null
|
|
1912
|
+
}
|
|
1913
|
+
}, Zo = [
|
|
1914
|
+
"id",
|
|
1915
|
+
"type"
|
|
1916
|
+
], Ko = {
|
|
1917
|
+
$schema: Uo,
|
|
1918
|
+
$id: Wo,
|
|
1919
|
+
title: Xo,
|
|
1920
|
+
description: Yo,
|
|
1921
|
+
type: Jo,
|
|
1922
|
+
properties: Qo,
|
|
1923
|
+
required: Zo
|
|
1924
|
+
}, _o = {
|
|
1925
|
+
initialState: {
|
|
1926
|
+
type: Object,
|
|
1927
|
+
default: {
|
|
1928
|
+
uniqueColClassInSM: 12,
|
|
1929
|
+
uniqueColClassInMD: 6,
|
|
1930
|
+
uniqueColClassInLG: 3,
|
|
1931
|
+
uniqueColClassInEL: 2
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
};
|
|
1935
|
+
Bn(_o, Ko, Xn, Zn);
|
|
1936
|
+
const ea = {
|
|
1937
|
+
width: { Type: Number, default: 400 },
|
|
1938
|
+
type: { Type: String, default: "info" },
|
|
1939
|
+
title: { Type: String, default: "" },
|
|
1940
|
+
detail: { Type: String, default: "" },
|
|
1941
|
+
okButtonText: { Type: String, default: "确定" },
|
|
1942
|
+
cancelButtonText: { Type: String, default: "取消" },
|
|
1943
|
+
exceptionInfo: { Type: Object, default: null },
|
|
1944
|
+
promptEditorType: { Type: String, default: "text-area" }
|
|
1945
|
+
};
|
|
1946
|
+
function Ce() {
|
|
1947
|
+
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
1948
|
+
}
|
|
1949
|
+
async function ta(t) {
|
|
1950
|
+
if (!navigator.clipboard)
|
|
1951
|
+
throw Ce();
|
|
1952
|
+
return navigator.clipboard.writeText(t);
|
|
1953
|
+
}
|
|
1954
|
+
async function na(t) {
|
|
1955
|
+
const e = document.createElement("span");
|
|
1956
|
+
e.textContent = t, e.style.whiteSpace = "pre", e.style.webkitUserSelect = "auto", e.style.userSelect = "all", document.body.appendChild(e);
|
|
1957
|
+
const n = window.getSelection(), o = window.document.createRange();
|
|
1958
|
+
n == null || n.removeAllRanges(), o.selectNode(e), n == null || n.addRange(o);
|
|
1959
|
+
let a = !1;
|
|
1960
|
+
try {
|
|
1961
|
+
a = window.document.execCommand("copy");
|
|
1962
|
+
} finally {
|
|
1963
|
+
n == null || n.removeAllRanges(), window.document.body.removeChild(e);
|
|
1964
|
+
}
|
|
1965
|
+
if (!a) throw Ce();
|
|
1966
|
+
}
|
|
1967
|
+
async function oa(t) {
|
|
1968
|
+
try {
|
|
1969
|
+
await ta(t);
|
|
1970
|
+
} catch (e) {
|
|
1971
|
+
try {
|
|
1972
|
+
await na(t);
|
|
1973
|
+
} catch (n) {
|
|
1974
|
+
throw n || e || Ce();
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
function aa() {
|
|
1979
|
+
async function t(e) {
|
|
1980
|
+
await oa(e);
|
|
1981
|
+
}
|
|
1982
|
+
return { onCopy: t };
|
|
1983
|
+
}
|
|
1984
|
+
function la(t, e, n, o) {
|
|
1985
|
+
const a = i(14), r = i(140), s = i(""), u = i(o.value.length), p = B(() => o.value), l = B(() => ({
|
|
1986
|
+
"font-size": `${a.value}px`,
|
|
1987
|
+
height: "100%"
|
|
1988
|
+
}));
|
|
1989
|
+
function c(m) {
|
|
1990
|
+
if (m.currentTarget) {
|
|
1991
|
+
const v = m.currentTarget.value || "";
|
|
1992
|
+
u.value = v.length;
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
return () => d(se, null, [d("textarea", {
|
|
1996
|
+
title: "promptMessage",
|
|
1997
|
+
name: "promptMessage",
|
|
1998
|
+
class: "form-control",
|
|
1999
|
+
style: l.value,
|
|
2000
|
+
rows: "4",
|
|
2001
|
+
maxlength: r.value,
|
|
2002
|
+
onInput: (m) => c(m)
|
|
2003
|
+
}, [p.value]), d("span", {
|
|
2004
|
+
class: "textarea-wordcount",
|
|
2005
|
+
title: s.value,
|
|
2006
|
+
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
2007
|
+
}, [u.value + " / " + r.value])]);
|
|
2008
|
+
}
|
|
2009
|
+
function sa(t, e, n, o) {
|
|
2010
|
+
const a = la(t, e, n, o), r = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
2011
|
+
function s(u) {
|
|
2012
|
+
return r.get(u) || null;
|
|
2013
|
+
}
|
|
2014
|
+
return { getEditorRender: s };
|
|
2015
|
+
}
|
|
2016
|
+
function ra() {
|
|
2017
|
+
const t = i(!1), e = i("复制成功");
|
|
2018
|
+
return {
|
|
2019
|
+
feedbackStyle: B(() => {
|
|
2020
|
+
const o = {
|
|
2021
|
+
position: "absolute",
|
|
2022
|
+
left: "50%",
|
|
2023
|
+
top: "50%",
|
|
2024
|
+
width: "100px",
|
|
2025
|
+
height: "40px",
|
|
2026
|
+
background: "#303C53",
|
|
2027
|
+
"line-height": "40px",
|
|
2028
|
+
"text-align": "center",
|
|
2029
|
+
"margin-left": "-30px",
|
|
2030
|
+
"margin-top": "-50px",
|
|
2031
|
+
"border-radius": "10px",
|
|
2032
|
+
"box-shadow": "0px 2px 8px 0px",
|
|
2033
|
+
color: "#fff",
|
|
2034
|
+
transition: "all .3s ease"
|
|
2035
|
+
};
|
|
2036
|
+
return o.opacity = t.value ? "0.8" : "0", o.display = t.value ? "" : "none", o;
|
|
2037
|
+
}),
|
|
2038
|
+
feedbackMessage: e,
|
|
2039
|
+
toShowFeedback: t
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
function ia(t, e) {
|
|
2043
|
+
const n = e.getEditorRender(t.promptEditorType);
|
|
2044
|
+
return () => n && n();
|
|
2045
|
+
}
|
|
2046
|
+
function ua(t) {
|
|
2047
|
+
const e = i(3), n = i(480), o = B(() => !!t.value && !!t.value.date), a = B(() => `发生时间 : ${t.value && t.value.date || ""}`), r = B(() => !!t.value && !!t.value.detail), s = B(() => {
|
|
2048
|
+
const $ = `${n.value}px`;
|
|
2049
|
+
return {
|
|
2050
|
+
overflow: "hidden",
|
|
2051
|
+
"text-overflow": "ellipsis",
|
|
2052
|
+
display: "-webkit-box",
|
|
2053
|
+
"-webkit-box-orient": "vertical",
|
|
2054
|
+
"-webkit-line-clamp": e.value,
|
|
2055
|
+
"max-height": $
|
|
2056
|
+
};
|
|
2057
|
+
}), u = B(() => t.value && t.value.detail || ""), p = B(() => !0), l = i(!1), c = i("展开"), m = i("收起"), v = B(() => {
|
|
2058
|
+
const $ = {
|
|
2059
|
+
display: "block",
|
|
2060
|
+
color: "#2A87FF"
|
|
2061
|
+
};
|
|
2062
|
+
return $["text-align"] = l.value ? "" : "right", $;
|
|
2063
|
+
});
|
|
2064
|
+
function k($, h) {
|
|
2065
|
+
l.value = !l.value, e.value = l.value ? 20 : 3;
|
|
2066
|
+
}
|
|
2067
|
+
function E($) {
|
|
2068
|
+
return k();
|
|
2069
|
+
}
|
|
2070
|
+
function N($) {
|
|
2071
|
+
return k();
|
|
2072
|
+
}
|
|
2073
|
+
return () => d("div", {
|
|
2074
|
+
class: "toast-msg-detail"
|
|
2075
|
+
}, [o.value && d("div", null, [a.value]), r.value && d("div", {
|
|
2076
|
+
id: "exception_error_msg",
|
|
2077
|
+
ref: "exceptionMessageRef",
|
|
2078
|
+
style: s.value
|
|
2079
|
+
}, [le("详细信息 : "), d("span", {
|
|
2080
|
+
innerHTML: u.value
|
|
2081
|
+
}, null)]), p.value && d("span", {
|
|
2082
|
+
style: v.value
|
|
2083
|
+
}, [l.value && d("span", {
|
|
2084
|
+
onClick: E,
|
|
2085
|
+
style: "cursor: pointer;"
|
|
2086
|
+
}, [m.value]), !l.value && d("span", {
|
|
2087
|
+
onClick: N,
|
|
2088
|
+
style: "cursor: pointer;"
|
|
2089
|
+
}, [c.value])])]);
|
|
2090
|
+
}
|
|
2091
|
+
function ca(t) {
|
|
2092
|
+
return () => d("p", {
|
|
2093
|
+
class: "toast-msg-detail",
|
|
2094
|
+
innerHTML: t.value
|
|
2095
|
+
}, null);
|
|
2096
|
+
}
|
|
2097
|
+
function da(t, e, n, o) {
|
|
2098
|
+
const a = i(t.exceptionInfo), r = B(() => {
|
|
2099
|
+
const v = {
|
|
2100
|
+
"f-icon": !0
|
|
2101
|
+
}, k = `f-icon-${e.value}`;
|
|
2102
|
+
return v[k] = !0, v;
|
|
2103
|
+
}), s = B(() => n.value || a.value && a.value.message), u = B(() => o.value), p = B(() => !!o.value), l = B(() => !!a.value);
|
|
2104
|
+
function c() {
|
|
2105
|
+
return l.value ? ua(a) : p.value ? ca(u) : () => null;
|
|
2106
|
+
}
|
|
2107
|
+
const m = c();
|
|
2108
|
+
return () => d(se, null, [d("div", {
|
|
2109
|
+
class: "float-left modal-tips-iconwrap"
|
|
2110
|
+
}, [d("span", {
|
|
2111
|
+
class: r.value
|
|
2112
|
+
}, null)]), d("div", {
|
|
2113
|
+
class: "modal-tips-content"
|
|
2114
|
+
}, [d("p", {
|
|
2115
|
+
class: "toast-msg-title",
|
|
2116
|
+
innerHTML: s.value
|
|
2117
|
+
}, null), m()])]);
|
|
2118
|
+
}
|
|
2119
|
+
function pa(t, e, n) {
|
|
2120
|
+
const {
|
|
2121
|
+
onCopy: o
|
|
2122
|
+
} = e, {
|
|
2123
|
+
toShowFeedback: a
|
|
2124
|
+
} = n, r = i("复制成功"), s = i("复制详细信息"), u = i(t.exceptionInfo || {
|
|
2125
|
+
date: "",
|
|
2126
|
+
message: "",
|
|
2127
|
+
detail: ""
|
|
2128
|
+
}), p = B(() => u.value && u.value.detail || "");
|
|
2129
|
+
function l(c) {
|
|
2130
|
+
o(p.value).catch((m) => {
|
|
2131
|
+
r.value = "复制失败";
|
|
2132
|
+
}).finally(() => {
|
|
2133
|
+
a.value = !0, setTimeout(() => {
|
|
2134
|
+
a.value = !1;
|
|
2135
|
+
}, 700);
|
|
2136
|
+
});
|
|
2137
|
+
}
|
|
2138
|
+
return () => d("span", {
|
|
2139
|
+
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
2140
|
+
}, [d("span", {
|
|
2141
|
+
onClick: l,
|
|
2142
|
+
style: "cursor: pointer;"
|
|
2143
|
+
}, [s.value])]);
|
|
2144
|
+
}
|
|
2145
|
+
function ma(t, e, n, o) {
|
|
2146
|
+
const a = i(t.type), r = i([]), s = i(t.exceptionInfo), u = i(t.okButtonText), p = i(t.cancelButtonText), l = i(!0), c = i(!0), m = B(() => !!(r.value && r.value.length)), v = B(() => s.value && s.value.date && s.value.message && s.value.detail), k = B(() => !(r.value && r.value.length) && (u.value || p.value)), E = B(() => c.value && u.value), N = B(() => l.value && p.value), $ = pa(t, n, o);
|
|
2147
|
+
function h(P) {
|
|
2148
|
+
a.value === "question" && e.emit("reject"), e.emit("close");
|
|
2149
|
+
}
|
|
2150
|
+
function b(P) {
|
|
2151
|
+
a.value === "question" && e.emit("accept"), e.emit("close");
|
|
2152
|
+
}
|
|
2153
|
+
return () => d("div", {
|
|
2154
|
+
class: "modal-footer"
|
|
2155
|
+
}, [v.value && $(), k.value && N.value && d("button", {
|
|
2156
|
+
type: "button",
|
|
2157
|
+
class: "btn btn-secondary btn-lg",
|
|
2158
|
+
onClick: h
|
|
2159
|
+
}, [p.value]), k.value && E.value && d("button", {
|
|
2160
|
+
type: "button",
|
|
2161
|
+
class: "btn btn-primary btn-lg",
|
|
2162
|
+
onClick: b
|
|
2163
|
+
}, [u.value]), m.value && r.value.length && r.value.map((P) => d("button", {
|
|
2164
|
+
type: "button",
|
|
2165
|
+
onClick: P.handle,
|
|
2166
|
+
class: P.class
|
|
2167
|
+
}, [P.iconClass && d("span", {
|
|
2168
|
+
class: P.iconClass
|
|
2169
|
+
}, null), P.text]))]);
|
|
2170
|
+
}
|
|
2171
|
+
const ue = /* @__PURE__ */ ee({
|
|
2172
|
+
name: "FMessageBox",
|
|
2173
|
+
props: ea,
|
|
2174
|
+
emits: ["accept", "reject", "close"],
|
|
2175
|
+
setup(t, e) {
|
|
2176
|
+
const n = i(t.type), o = i(t.title), a = i(t.detail), r = B(() => {
|
|
2177
|
+
const $ = {
|
|
2178
|
+
"modal-tips": !0,
|
|
2179
|
+
"d-flex": !0,
|
|
2180
|
+
"flex-row": !0
|
|
2181
|
+
}, h = `messager-type-${n.value}`;
|
|
2182
|
+
return $[h] = !0, $;
|
|
2183
|
+
}), s = B(() => {
|
|
2184
|
+
const $ = {};
|
|
2185
|
+
return n.value === "prompt" ? $.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && ($.padding = "0.5rem 1.5rem 1rem 1.5rem"), $;
|
|
2186
|
+
}), u = aa(), p = sa(t, n, o, a), l = ra(), {
|
|
2187
|
+
feedbackStyle: c,
|
|
2188
|
+
feedbackMessage: m
|
|
2189
|
+
} = l;
|
|
2190
|
+
function v() {
|
|
2191
|
+
return d("div", {
|
|
2192
|
+
style: c.value
|
|
2193
|
+
}, [m.value]);
|
|
2194
|
+
}
|
|
2195
|
+
function k() {
|
|
2196
|
+
switch (n.value) {
|
|
2197
|
+
case "prompt":
|
|
2198
|
+
return ia(t, p);
|
|
2199
|
+
default:
|
|
2200
|
+
return da(t, n, o, a);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
const E = k(), N = ma(t, e, u, l);
|
|
2204
|
+
return () => d("div", {
|
|
2205
|
+
class: "farris-messager"
|
|
2206
|
+
}, [d("section", {
|
|
2207
|
+
class: r.value,
|
|
2208
|
+
style: s.value
|
|
2209
|
+
}, [E()]), N(), v()]);
|
|
2210
|
+
}
|
|
2211
|
+
}), fa = {
|
|
2212
|
+
/**
|
|
2213
|
+
* 自定义类
|
|
2214
|
+
*/
|
|
2215
|
+
class: { type: String, default: "" },
|
|
2216
|
+
/**
|
|
2217
|
+
* 模态框标题
|
|
2218
|
+
*/
|
|
2219
|
+
title: { type: String, default: "" },
|
|
2220
|
+
/**
|
|
2221
|
+
* 模态框宽度
|
|
2222
|
+
*/
|
|
2223
|
+
width: { type: Number, default: 500 },
|
|
2224
|
+
/**
|
|
2225
|
+
* 模态框高度
|
|
2226
|
+
*/
|
|
2227
|
+
height: { type: Number, default: 320 },
|
|
2228
|
+
/**
|
|
2229
|
+
* 自定义按钮列表
|
|
2230
|
+
*/
|
|
2231
|
+
buttons: {
|
|
2232
|
+
type: Array,
|
|
2233
|
+
default: []
|
|
2234
|
+
},
|
|
2235
|
+
/**
|
|
2236
|
+
* 是否展示模态框
|
|
2237
|
+
*/
|
|
2238
|
+
modelValue: { type: Boolean, default: !1 },
|
|
2239
|
+
/**
|
|
2240
|
+
* 是否展示头部
|
|
2241
|
+
*/
|
|
2242
|
+
showHeader: { type: Boolean, default: !0 },
|
|
2243
|
+
/**
|
|
2244
|
+
* 是否展示默认按钮
|
|
2245
|
+
*/
|
|
2246
|
+
showButtons: { type: Boolean, default: !0 },
|
|
2247
|
+
/**
|
|
2248
|
+
* 是否启用自适应样式
|
|
2249
|
+
*/
|
|
2250
|
+
fitContent: { type: Boolean, default: !0 },
|
|
2251
|
+
/**
|
|
2252
|
+
* 是否展示右上角按钮
|
|
2253
|
+
*/
|
|
2254
|
+
showCloseButton: { type: Boolean, default: !0 },
|
|
2255
|
+
showMaxButton: { type: Boolean, default: !1 },
|
|
2256
|
+
minHeight: { type: Number },
|
|
2257
|
+
maxHeight: { type: Number },
|
|
2258
|
+
minWidth: { type: Number },
|
|
2259
|
+
maxWidth: { type: Number },
|
|
2260
|
+
containment: { type: Object, default: null },
|
|
2261
|
+
reiszeable: { type: Boolean, default: !1 },
|
|
2262
|
+
draggable: { type: Boolean, default: !1 },
|
|
2263
|
+
dragHandle: { type: Object, default: null },
|
|
2264
|
+
closedCallback: { type: Function, default: null },
|
|
2265
|
+
resizeHandle: { type: Function, default: null },
|
|
2266
|
+
render: { type: Function, default: null },
|
|
2267
|
+
acceptCallback: { type: Function, default: null },
|
|
2268
|
+
rejectCallback: { type: Function, default: null },
|
|
2269
|
+
enableEsc: { type: Boolean, default: !0 },
|
|
2270
|
+
enableEnter: { type: Boolean, default: !1 }
|
|
2271
|
+
};
|
|
2272
|
+
class Q {
|
|
2273
|
+
constructor(e, n) {
|
|
2274
|
+
this.x = e, this.y = n;
|
|
2275
|
+
}
|
|
2276
|
+
static getTransformInfo(e) {
|
|
2277
|
+
const o = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
2278
|
+
if (o.length >= 6) {
|
|
2279
|
+
const a = parseInt(o[4], 10), r = parseInt(o[5], 10);
|
|
2280
|
+
return { x: a, y: r };
|
|
2281
|
+
}
|
|
2282
|
+
return { x: 0, y: 0 };
|
|
2283
|
+
}
|
|
2284
|
+
static fromEvent(e, n = null) {
|
|
2285
|
+
if (this.isMouseEvent(e))
|
|
2286
|
+
return new Q(e.clientX, e.clientY);
|
|
2287
|
+
if (n === null || e.changedTouches.length === 1)
|
|
2288
|
+
return new Q(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
|
|
2289
|
+
for (let o = 0; o < e.changedTouches.length; o++)
|
|
2290
|
+
if (e.changedTouches[o].target === n)
|
|
2291
|
+
return new Q(e.changedTouches[o].clientX, e.changedTouches[o].clientY);
|
|
2292
|
+
}
|
|
2293
|
+
static isMouseEvent(e) {
|
|
2294
|
+
return Object.prototype.toString.apply(e).indexOf("MouseEvent") === 8;
|
|
2295
|
+
}
|
|
2296
|
+
static isIPosition(e) {
|
|
2297
|
+
return !!e && "x" in e && "y" in e;
|
|
2298
|
+
}
|
|
2299
|
+
static getCurrent(e) {
|
|
2300
|
+
const n = new Q(0, 0);
|
|
2301
|
+
if (window) {
|
|
2302
|
+
const o = window.getComputedStyle(e);
|
|
2303
|
+
if (o) {
|
|
2304
|
+
const a = parseInt(o.getPropertyValue("left"), 10), r = parseInt(o.getPropertyValue("top"), 10);
|
|
2305
|
+
n.x = isNaN(a) ? 0 : a, n.y = isNaN(r) ? 0 : r;
|
|
2306
|
+
}
|
|
2307
|
+
return n;
|
|
2308
|
+
}
|
|
2309
|
+
return null;
|
|
2310
|
+
}
|
|
2311
|
+
static copy(e) {
|
|
2312
|
+
return new Q(0, 0).set(e);
|
|
2313
|
+
}
|
|
2314
|
+
get value() {
|
|
2315
|
+
return { x: this.x, y: this.y };
|
|
2316
|
+
}
|
|
2317
|
+
add(e) {
|
|
2318
|
+
return this.x += e.x, this.y += e.y, this;
|
|
2319
|
+
}
|
|
2320
|
+
subtract(e) {
|
|
2321
|
+
return this.x -= e.x, this.y -= e.y, this;
|
|
2322
|
+
}
|
|
2323
|
+
multiply(e) {
|
|
2324
|
+
this.x *= e, this.y *= e;
|
|
2325
|
+
}
|
|
2326
|
+
divide(e) {
|
|
2327
|
+
this.x /= e, this.y /= e;
|
|
2328
|
+
}
|
|
2329
|
+
reset() {
|
|
2330
|
+
return this.x = 0, this.y = 0, this;
|
|
2331
|
+
}
|
|
2332
|
+
set(e) {
|
|
2333
|
+
return this.x = e.x, this.y = e.y, this;
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
class _ {
|
|
2337
|
+
constructor(e, n) {
|
|
2338
|
+
this.width = e, this.height = n;
|
|
2339
|
+
}
|
|
2340
|
+
static getCurrent(e) {
|
|
2341
|
+
const n = new _(0, 0);
|
|
2342
|
+
if (window) {
|
|
2343
|
+
const o = window.getComputedStyle(e);
|
|
2344
|
+
return o && (n.width = parseInt(o.getPropertyValue("width"), 10), n.height = parseInt(o.getPropertyValue("height"), 10)), n;
|
|
2345
|
+
}
|
|
2346
|
+
return null;
|
|
2347
|
+
}
|
|
2348
|
+
static copy(e) {
|
|
2349
|
+
return new _(0, 0).set(e);
|
|
2350
|
+
}
|
|
2351
|
+
set(e) {
|
|
2352
|
+
return this.width = e.width, this.height = e.height, this;
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
function va(t, e) {
|
|
2356
|
+
const n = i(), o = i(), a = i(), r = i(), s = i(), u = i(), p = i(), l = i(), c = i(), m = i(), v = i(), k = i(), E = i(t.draggable), N = i(!1);
|
|
2357
|
+
function $() {
|
|
2358
|
+
const C = o.value || document.body, y = window.getComputedStyle(C);
|
|
2359
|
+
if (!y || !n.value)
|
|
2360
|
+
return;
|
|
2361
|
+
const j = Q.getTransformInfo(n.value), G = {};
|
|
2362
|
+
p.value && (G.deltaL = n.value.offsetLeft - p.value.x, G.deltaT = n.value.offsetTop - p.value.y);
|
|
2363
|
+
const U = y.getPropertyValue("position");
|
|
2364
|
+
G.width = C.clientWidth, G.height = C.clientHeight, G.pr = parseInt(y.getPropertyValue("padding-right"), 10), G.pb = parseInt(y.getPropertyValue("padding-bottom"), 10), G.position = y.getPropertyValue("position"), U === "static" && (C.style.position = "relative"), G.translateX = j.x, G.translateY = j.y, m.value = G;
|
|
2365
|
+
}
|
|
2366
|
+
function h(C) {
|
|
2367
|
+
if (n.value) {
|
|
2368
|
+
r.value = _.getCurrent(n.value), s.value = Q.getCurrent(n.value), u.value = r.value ? _.copy(r.value) : null, p.value = s.value ? Q.copy(s.value) : null, $();
|
|
2369
|
+
const y = C.target.getAttribute("type") || "";
|
|
2370
|
+
l.value = {
|
|
2371
|
+
n: !!y.match(/n/),
|
|
2372
|
+
s: !!y.match(/s/),
|
|
2373
|
+
w: !!y.match(/w/),
|
|
2374
|
+
e: !!y.match(/e/)
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
function b() {
|
|
2379
|
+
var C, y, j, G;
|
|
2380
|
+
if (n.value) {
|
|
2381
|
+
const U = n.value;
|
|
2382
|
+
l.value && ((l.value.n || l.value.s) && ((C = u.value) != null && C.height) && (U.style.height = u.value.height + "px"), (l.value.w || l.value.e) && ((y = u.value) != null && y.width) && (U.style.width = u.value.width + "px"), p.value && ((j = p.value) != null && j.x && (U.style.left = p.value.x + "px"), (G = p.value) != null && G.y && (U.style.top = p.value.y + "px")));
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
function P() {
|
|
2386
|
+
const C = t.minHeight ? t.minHeight : 1, y = t.minWidth ? t.minWidth : 1;
|
|
2387
|
+
u.value && p.value && l.value && r.value && (u.value.height < C && (u.value.height = C, l.value.n && s.value && (p.value.y = s.value.y + (r.value.height - C))), u.value.width < y && (u.value.width = y, l.value.w && s.value && (p.value.x = s.value.x + (r.value.width - y))), t.maxHeight && u.value.height > t.maxHeight && (u.value.height = t.maxHeight, s.value && l.value.n && (p.value.y = s.value.y + (r.value.height - t.maxHeight))), t.maxWidth && u.value.width > t.maxWidth && (u.value.width = t.maxWidth, l.value.w && s.value && (p.value.x = s.value.x + (r.value.width - t.maxWidth))));
|
|
2388
|
+
}
|
|
2389
|
+
function D() {
|
|
2390
|
+
if (o.value) {
|
|
2391
|
+
const C = m.value;
|
|
2392
|
+
if (p.value && u.value && l.value && r.value) {
|
|
2393
|
+
const y = C.width - C.pr - C.deltaL - C.translateX - p.value.x, j = C.height - C.pb - C.deltaT - C.translateY - p.value.y;
|
|
2394
|
+
l.value.n && p.value.y + C.translateY < 0 && s.value && (p.value.y = -C.translateY, u.value.height = r.value.height + s.value.y + C.translateY), l.value.w && p.value.x + C.translateX < 0 && s.value && (p.value.x = -C.translateX, u.value.width = r.value.width + s.value.x + C.translateX), u.value.width > y && (u.value.width = y), u.value.height > j && (u.value.height = j);
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
function W(C) {
|
|
2399
|
+
if (!a.value || !r.value || !s.value || !l.value)
|
|
2400
|
+
return;
|
|
2401
|
+
C.subtract(a.value);
|
|
2402
|
+
const y = C.x, j = C.y;
|
|
2403
|
+
l.value.n ? (p.value.y = s.value.y + j, u.value.height = r.value.height - j) : l.value.s && (u.value.height = r.value.height + j), l.value.e ? u.value.width = r.value.width + y : l.value.w && (u.value.width = r.value.width - y, p.value.x = s.value.x + y), D(), P(), b();
|
|
2404
|
+
}
|
|
2405
|
+
function q(C) {
|
|
2406
|
+
if (!c.value)
|
|
2407
|
+
return;
|
|
2408
|
+
const y = Q.fromEvent(C);
|
|
2409
|
+
y && W(y);
|
|
2410
|
+
}
|
|
2411
|
+
function T() {
|
|
2412
|
+
if (n.value) {
|
|
2413
|
+
const {
|
|
2414
|
+
width: C,
|
|
2415
|
+
height: y,
|
|
2416
|
+
x: j,
|
|
2417
|
+
y: G
|
|
2418
|
+
} = n.value.getBoundingClientRect(), U = Q.getTransformInfo(n.value);
|
|
2419
|
+
return {
|
|
2420
|
+
size: {
|
|
2421
|
+
width: C,
|
|
2422
|
+
height: y
|
|
2423
|
+
},
|
|
2424
|
+
position: {
|
|
2425
|
+
x: j - U.x,
|
|
2426
|
+
y: G - U.y
|
|
2427
|
+
}
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
return null;
|
|
2431
|
+
}
|
|
2432
|
+
function H(C) {
|
|
2433
|
+
if (n.value) {
|
|
2434
|
+
const y = T();
|
|
2435
|
+
v.value = y;
|
|
2436
|
+
}
|
|
2437
|
+
a.value = void 0, r.value = null, s.value = null, u.value = null, p.value = null, l.value = null, c.value = null, document.removeEventListener("mousemove", q), document.removeEventListener("mouseup", H);
|
|
2438
|
+
}
|
|
2439
|
+
function f() {
|
|
2440
|
+
document.addEventListener("mousemove", q), document.addEventListener("mouseup", H);
|
|
2441
|
+
}
|
|
2442
|
+
function w(C) {
|
|
2443
|
+
C instanceof MouseEvent && C.button === 2 || E.value && (C.stopPropagation(), C.preventDefault(), a.value = Q.fromEvent(C), c.value = C.target, h(C), f());
|
|
2444
|
+
}
|
|
2445
|
+
function x(C) {
|
|
2446
|
+
return n.value = C, d(se, null, [d("div", {
|
|
2447
|
+
class: "fv-resizable-handle fv-resizable-n",
|
|
2448
|
+
type: "n",
|
|
2449
|
+
onMousedown: (y) => w(y)
|
|
2450
|
+
}, null), d("div", {
|
|
2451
|
+
class: "fv-resizable-handle fv-resizable-e",
|
|
2452
|
+
type: "e",
|
|
2453
|
+
onMousedown: (y) => w(y)
|
|
2454
|
+
}, null), d("div", {
|
|
2455
|
+
class: "fv-resizable-handle fv-resizable-s",
|
|
2456
|
+
type: "s",
|
|
2457
|
+
onMousedown: (y) => w(y)
|
|
2458
|
+
}, null), d("div", {
|
|
2459
|
+
class: "fv-resizable-handle fv-resizable-w",
|
|
2460
|
+
type: "w",
|
|
2461
|
+
onMousedown: (y) => w(y)
|
|
2462
|
+
}, null), d("div", {
|
|
2463
|
+
class: "fv-resizable-handle fv-resizable-ne",
|
|
2464
|
+
type: "ne",
|
|
2465
|
+
onMousedown: (y) => w(y)
|
|
2466
|
+
}, null), d("div", {
|
|
2467
|
+
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
2468
|
+
type: "se",
|
|
2469
|
+
onMousedown: (y) => w(y)
|
|
2470
|
+
}, null), d("div", {
|
|
2471
|
+
class: "fv-resizable-handle fv-resizable-sw",
|
|
2472
|
+
type: "sw",
|
|
2473
|
+
onMousedown: (y) => w(y)
|
|
2474
|
+
}, null), d("div", {
|
|
2475
|
+
class: "fv-resizable-handle fv-resizable-nw",
|
|
2476
|
+
type: "nw",
|
|
2477
|
+
onMousedown: (y) => w(y)
|
|
2478
|
+
}, null)]);
|
|
2479
|
+
}
|
|
2480
|
+
function R(C = !0) {
|
|
2481
|
+
const y = o.value || document.body, j = _.getCurrent(y), G = n.value;
|
|
2482
|
+
C && (k.value = T(), k.value.transform = G.style.transform), j && G && (u.value = j, G.style.height = u.value.height - 14 + "px", G.style.width = u.value.width - 14 + "px", G.style.left = "7px", G.style.top = "7px", G.style.transform = "", v.value = {
|
|
2483
|
+
size: u.value,
|
|
2484
|
+
position: {
|
|
2485
|
+
x: 0,
|
|
2486
|
+
y: 0
|
|
2487
|
+
}
|
|
2488
|
+
}, E.value = !1, N.value = !0);
|
|
2489
|
+
}
|
|
2490
|
+
function g() {
|
|
2491
|
+
var C, y;
|
|
2492
|
+
if (k.value) {
|
|
2493
|
+
const j = {
|
|
2494
|
+
width: k.value.size.width || 0,
|
|
2495
|
+
height: k.value.size.height || 0
|
|
2496
|
+
}, G = {
|
|
2497
|
+
x: (window.innerWidth - j.width) / 2,
|
|
2498
|
+
y: (window.innerHeight - j.height) / 2
|
|
2499
|
+
};
|
|
2500
|
+
(C = u.value) == null || C.set(j), (y = p.value) == null || y.set(G);
|
|
2501
|
+
const U = n.value;
|
|
2502
|
+
U.style.height = j.height + "px", U.style.width = j.width + "px", U.style.left = `${G.x}px`, U.style.top = `${G.y}px`, U.style.transform = "", v.value = {
|
|
2503
|
+
size: j,
|
|
2504
|
+
position: G
|
|
2505
|
+
}, E.value = t.draggable, N.value = !1;
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
function M() {
|
|
2509
|
+
if (n.value) {
|
|
2510
|
+
const C = _.getCurrent(n.value);
|
|
2511
|
+
if (C) {
|
|
2512
|
+
const {
|
|
2513
|
+
width: y,
|
|
2514
|
+
height: j
|
|
2515
|
+
} = C;
|
|
2516
|
+
n.value.style.left = `${(window.innerWidth - y) / 2}px`, n.value.style.top = `${(window.innerHeight - j) / 2}px`, n.value.style.transform = "";
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
function z() {
|
|
2521
|
+
const C = () => {
|
|
2522
|
+
N.value ? R(!1) : M();
|
|
2523
|
+
};
|
|
2524
|
+
return window.addEventListener("resize", C), () => {
|
|
2525
|
+
window.removeEventListener("resize", C);
|
|
2526
|
+
};
|
|
2527
|
+
}
|
|
2528
|
+
const Y = z();
|
|
2529
|
+
return {
|
|
2530
|
+
renderResizeBar: x,
|
|
2531
|
+
boundingElement: o,
|
|
2532
|
+
resizedEventParam: v,
|
|
2533
|
+
maximize: R,
|
|
2534
|
+
restore: g,
|
|
2535
|
+
allowDrag: E,
|
|
2536
|
+
isMaximized: N,
|
|
2537
|
+
unWindowResizeHandle: Y
|
|
2538
|
+
};
|
|
2539
|
+
}
|
|
2540
|
+
function ha(t, e, n) {
|
|
2541
|
+
const o = i(), a = i(t.draggable), r = i(t.lockAxis), s = i(), u = i(), p = i(!1), l = i(new Q(0, 0)), c = i(new Q(0, 0)), m = i(new Q(0, 0)), v = i(new Q(0, 0));
|
|
2542
|
+
J(() => n.value, (T) => {
|
|
2543
|
+
s.value.style.cursor = T ? "move" : "default";
|
|
2544
|
+
});
|
|
2545
|
+
function k(T, H) {
|
|
2546
|
+
if (H.tagName === "BUTTON")
|
|
2547
|
+
return !1;
|
|
2548
|
+
if (H === T)
|
|
2549
|
+
return !0;
|
|
2550
|
+
for (const f in H.children)
|
|
2551
|
+
if (H.children.hasOwnProperty(f) && k(T, H.children[f]))
|
|
2552
|
+
return !0;
|
|
2553
|
+
return !1;
|
|
2554
|
+
}
|
|
2555
|
+
function E() {
|
|
2556
|
+
var w, x;
|
|
2557
|
+
let T = m.value.x + c.value.x, H = m.value.y + c.value.y;
|
|
2558
|
+
r.value === "x" ? (T = ((w = l.value) == null ? void 0 : w.x) || 0, m.value.x = 0) : r.value === "y" && (H = ((x = l.value) == null ? void 0 : x.y) || 0, m.value.y = 0);
|
|
2559
|
+
const f = `translate3d(${Math.round(T)}px, ${Math.round(H)}px, 0px)`;
|
|
2560
|
+
o.value && (o.value.style.transform = f), v.value.x = T, v.value.y = H;
|
|
2561
|
+
}
|
|
2562
|
+
function N() {
|
|
2563
|
+
if (!u.value || !o.value)
|
|
2564
|
+
return null;
|
|
2565
|
+
const T = u.value.getBoundingClientRect(), H = o.value.getBoundingClientRect(), f = {
|
|
2566
|
+
top: T.top < H.top,
|
|
2567
|
+
right: T.right > H.right,
|
|
2568
|
+
bottom: T.bottom > H.bottom,
|
|
2569
|
+
left: T.left < H.left
|
|
2570
|
+
};
|
|
2571
|
+
return f.top || (m.value.y -= H.top - T.top), f.bottom || (m.value.y -= H.bottom - T.bottom), f.right || (m.value.x -= H.right - T.right), f.left || (m.value.x -= H.left - T.left), E(), f;
|
|
2572
|
+
}
|
|
2573
|
+
function $(T) {
|
|
2574
|
+
T && (l.value && T.subtract(l.value), m.value.set(T), E(), N());
|
|
2575
|
+
}
|
|
2576
|
+
function h(T) {
|
|
2577
|
+
p.value && a.value && (T.stopPropagation(), T.preventDefault(), $(Q.fromEvent(T, s.value)));
|
|
2578
|
+
}
|
|
2579
|
+
function b() {
|
|
2580
|
+
var T;
|
|
2581
|
+
p.value && (p.value = !1, c.value.add(m.value), m.value.reset(), (T = o.value) == null || T.classList.remove("ng-dragging"), document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", b));
|
|
2582
|
+
}
|
|
2583
|
+
function P() {
|
|
2584
|
+
!p.value && s.value && (p.value = !0, s.value.classList.add("ng-dragging"), document.addEventListener("mousemove", h), document.addEventListener("mouseup", b));
|
|
2585
|
+
}
|
|
2586
|
+
function D() {
|
|
2587
|
+
if (o.value) {
|
|
2588
|
+
const T = Q.getTransformInfo(o.value);
|
|
2589
|
+
c.value.set(T);
|
|
2590
|
+
return;
|
|
2591
|
+
}
|
|
2592
|
+
c.value.reset();
|
|
2593
|
+
}
|
|
2594
|
+
function W(T) {
|
|
2595
|
+
if (!n.value || T instanceof MouseEvent && T.button === 2)
|
|
2596
|
+
return;
|
|
2597
|
+
const H = T.target || T.srcElement;
|
|
2598
|
+
s.value !== void 0 && H && !k(H, s.value) || a.value !== !1 && (document.body.click(), T.stopPropagation(), T.preventDefault(), l.value = Q.fromEvent(T, o.value), D(), P());
|
|
2599
|
+
}
|
|
2600
|
+
function q(T, H, f) {
|
|
2601
|
+
if (a.value && H) {
|
|
2602
|
+
if (T)
|
|
2603
|
+
s.value = T;
|
|
2604
|
+
else if (t.dragHandle) {
|
|
2605
|
+
if (t.dragHandle instanceof HTMLElement)
|
|
2606
|
+
s.value = t.dragHandle;
|
|
2607
|
+
else if (typeof t.dragHandle == "string") {
|
|
2608
|
+
const w = H.querySelector(t.dragHandle);
|
|
2609
|
+
w && (s.value = w);
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
o.value = H, u.value = f, s.value.classList.add("ng-draggable"), s.value.addEventListener("mousedown", W);
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
return {
|
|
2616
|
+
registerDraggle: q,
|
|
2617
|
+
resetTranslate: D
|
|
2618
|
+
};
|
|
2619
|
+
}
|
|
2620
|
+
function Ne(t, e) {
|
|
2621
|
+
if (t) {
|
|
2622
|
+
const n = (o) => {
|
|
2623
|
+
o.key.toLowerCase() === t.toLowerCase() && e({ event: o, key: t });
|
|
2624
|
+
};
|
|
2625
|
+
return document.addEventListener("keydown", n), () => {
|
|
2626
|
+
document.removeEventListener("keydown", n);
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
function ga(t, e) {
|
|
2631
|
+
const n = i(t.enableEsc);
|
|
2632
|
+
let o = null;
|
|
2633
|
+
return n.value ? (o = Ne("Escape", (a) => {
|
|
2634
|
+
e.emit("esc", { event: a.event, type: "esc" });
|
|
2635
|
+
}), {
|
|
2636
|
+
remove: o
|
|
2637
|
+
}) : null;
|
|
2638
|
+
}
|
|
2639
|
+
function ya(t, e) {
|
|
2640
|
+
const n = i(t.enableEnter);
|
|
2641
|
+
let o = null;
|
|
2642
|
+
return n.value ? (o = Ne("Enter", (a) => {
|
|
2643
|
+
e.emit("enter", { event: a.event, type: "enter" });
|
|
2644
|
+
}), {
|
|
2645
|
+
remove: o
|
|
2646
|
+
}) : null;
|
|
2647
|
+
}
|
|
2648
|
+
const ze = /* @__PURE__ */ ee({
|
|
2649
|
+
name: "FModal",
|
|
2650
|
+
props: fa,
|
|
2651
|
+
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
2652
|
+
setup(t, e) {
|
|
2653
|
+
const n = i(t.width || 300), o = i(t.height || 200), a = i(t.modelValue), r = i(""), s = i(t.class), u = i(t.fitContent), p = i(t.showHeader), l = i(""), c = i(t.showCloseButton), m = i(t.showMaxButton), v = i(!1), k = i(""), E = i(""), N = i(""), $ = i(t.showButtons), h = i(t.title), b = i(t.reiszeable), P = i(t.containment || null), D = i();
|
|
2654
|
+
function W(F, X) {
|
|
2655
|
+
a.value = !1, e.emit("update:modelValue", !1), X != null && e.emit(X ? "accept" : "cancel"), e.emit("closed", F);
|
|
2656
|
+
}
|
|
2657
|
+
const q = [{
|
|
2658
|
+
name: "cancel",
|
|
2659
|
+
text: "取消",
|
|
2660
|
+
class: "btn btn-secondary",
|
|
2661
|
+
handle: (F) => {
|
|
2662
|
+
W(F, !1);
|
|
2663
|
+
}
|
|
2664
|
+
}, {
|
|
2665
|
+
name: "accept",
|
|
2666
|
+
text: "确定",
|
|
2667
|
+
class: "btn btn-primary",
|
|
2668
|
+
handle: (F) => {
|
|
2669
|
+
W(F, !0);
|
|
2670
|
+
}
|
|
2671
|
+
}], T = i(t.buttons && t.buttons.length ? t.buttons : q), H = B(() => !!l.value), f = B(() => !!$.value && !!T.value), w = i(), x = i(), R = i(!1), {
|
|
2672
|
+
renderResizeBar: g,
|
|
2673
|
+
maximize: M,
|
|
2674
|
+
restore: z,
|
|
2675
|
+
boundingElement: Y,
|
|
2676
|
+
resizedEventParam: C,
|
|
2677
|
+
allowDrag: y,
|
|
2678
|
+
unWindowResizeHandle: j
|
|
2679
|
+
} = va(t), {
|
|
2680
|
+
registerDraggle: G
|
|
2681
|
+
} = ha(t, e, y);
|
|
2682
|
+
J(() => t.title, (F, X) => {
|
|
2683
|
+
F !== X && (h.value = F);
|
|
2684
|
+
}), J(() => t.modelValue, (F, X) => {
|
|
2685
|
+
F !== X && (a.value = F);
|
|
2686
|
+
}), J(() => t.showHeader, (F, X) => {
|
|
2687
|
+
F !== X && (p.value = F);
|
|
2688
|
+
}), J(() => t.showButtons, (F, X) => {
|
|
2689
|
+
F !== X && ($.value = F);
|
|
2690
|
+
}), J(() => C.value, (F, X) => {
|
|
2691
|
+
const ae = F || {}, ie = X || {};
|
|
2692
|
+
JSON.stringify(ae) !== JSON.stringify(ie) && e.emit("resize", {
|
|
2693
|
+
newSize: F,
|
|
2694
|
+
oldSize: X
|
|
2695
|
+
});
|
|
2696
|
+
});
|
|
2697
|
+
function U() {
|
|
2698
|
+
const F = document.querySelectorAll(".farris-modal").length;
|
|
2699
|
+
(!F || F - 1 <= 0) && document.body.classList.remove("modal-open"), D.value && D.value.classList.remove("show");
|
|
2700
|
+
}
|
|
2701
|
+
const re = B(() => (a.value ? document.body.classList.add("modal-open") : U(), a.value)), De = B(() => {
|
|
2702
|
+
const F = {
|
|
2703
|
+
modal: !0,
|
|
2704
|
+
"farris-modal": !0,
|
|
2705
|
+
fade: !0
|
|
2706
|
+
};
|
|
2707
|
+
return F["f-modal-fitContent"] = !!u.value, F.show = !!re.value, F;
|
|
2708
|
+
}), Ge = B(() => {
|
|
2709
|
+
var ae;
|
|
2710
|
+
const F = {
|
|
2711
|
+
"modal-dialog": !0
|
|
2712
|
+
}, X = (ae = s.value) == null ? void 0 : ae.split(" ");
|
|
2713
|
+
return X == null || X.reduce((ie, ot) => (ie[ot] = !0, ie), F), F;
|
|
2714
|
+
}), qe = B(() => ({
|
|
2715
|
+
position: "absolute",
|
|
2716
|
+
top: `${(window.innerHeight - o.value) / 2}px`,
|
|
2717
|
+
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
2718
|
+
width: `${n.value}px`,
|
|
2719
|
+
height: u.value ? "auto" : `${o.value}px`
|
|
2720
|
+
})), Ue = B(() => ({
|
|
2721
|
+
"modal-content": !0,
|
|
2722
|
+
"modal-content-has-header": p.value
|
|
2723
|
+
})), We = B(() => {
|
|
2724
|
+
const F = {
|
|
2725
|
+
display: p.value ? "" : "none"
|
|
2726
|
+
};
|
|
2727
|
+
return F["pointer-events"] = y.value ? "auto" : "none", F;
|
|
2728
|
+
}), Xe = B(() => ({
|
|
2729
|
+
"f-icon": !0,
|
|
2730
|
+
modal_maximize: !0,
|
|
2731
|
+
modalrevert: R.value
|
|
2732
|
+
})), Ye = B(() => ({
|
|
2733
|
+
"modal-body": !0,
|
|
2734
|
+
"f-utils-flex-column": k.value === "iframe"
|
|
2735
|
+
}));
|
|
2736
|
+
function Je() {
|
|
2737
|
+
return {};
|
|
2738
|
+
}
|
|
2739
|
+
const Qe = B(() => {
|
|
2740
|
+
const F = {
|
|
2741
|
+
textAlgin: N.value
|
|
2742
|
+
}, X = Je();
|
|
2743
|
+
return Object.assign(F, X);
|
|
2744
|
+
});
|
|
2745
|
+
function we(F) {
|
|
2746
|
+
if (F.stopPropagation(), R.value) {
|
|
2747
|
+
R.value = !1, z();
|
|
2748
|
+
return;
|
|
2749
|
+
}
|
|
2750
|
+
M(), R.value = !0;
|
|
2751
|
+
}
|
|
2752
|
+
async function Ze(F, X) {
|
|
2753
|
+
F.handle && await F.handle(X, F) && e.emit("closed", X);
|
|
2754
|
+
}
|
|
2755
|
+
function Ke(F) {
|
|
2756
|
+
F.width && (n.value = F.width), F.height && (o.value = F.height), F.buttons && (T.value = F.buttons), F.title && (h.value = F.title);
|
|
2757
|
+
}
|
|
2758
|
+
let de = null, pe = null;
|
|
2759
|
+
oe(() => {
|
|
2760
|
+
x.value && !P.value && (P.value = x.value.parentElement, Y.value = P.value, G(w.value, x.value, Y.value)), re.value && document.body.classList.add("modal-open"), de = ga(t, e), pe = ya(t, e);
|
|
2761
|
+
}), Se(() => {
|
|
2762
|
+
U(), j && j(), de && de.remove(), pe && pe.remove();
|
|
2763
|
+
}), e.expose({
|
|
2764
|
+
modalElementRef: x,
|
|
2765
|
+
updateModalOptions: Ke,
|
|
2766
|
+
close: W,
|
|
2767
|
+
maxDialog: we
|
|
2768
|
+
});
|
|
2769
|
+
function _e() {
|
|
2770
|
+
return d("ul", null, [v.value && d("li", {
|
|
2771
|
+
class: "f-btn-icon f-bare"
|
|
2772
|
+
}, [d("span", {
|
|
2773
|
+
class: "f-icon modal_minimize"
|
|
2774
|
+
}, null)]), m.value && d("li", {
|
|
2775
|
+
onClick: we,
|
|
2776
|
+
class: "f-btn-icon f-bare",
|
|
2777
|
+
style: "pointer-events: auto;"
|
|
2778
|
+
}, [d("span", {
|
|
2779
|
+
class: Xe.value
|
|
2780
|
+
}, null)]), c.value && d("li", {
|
|
2781
|
+
class: "f-btn-icon f-bare",
|
|
2782
|
+
onClick: (F) => W(F, !1),
|
|
2783
|
+
style: "pointer-events: auto;"
|
|
2784
|
+
}, [d("span", {
|
|
2785
|
+
class: "f-icon modal_close"
|
|
2786
|
+
}, null)])]);
|
|
2787
|
+
}
|
|
2788
|
+
function et() {
|
|
2789
|
+
return d("div", {
|
|
2790
|
+
class: "modal-footer",
|
|
2791
|
+
style: Qe.value
|
|
2792
|
+
}, [T.value && T.value.map((F) => d("button", {
|
|
2793
|
+
name: F.name,
|
|
2794
|
+
type: "button",
|
|
2795
|
+
class: F.class + (F.iconClass ? " btn-icontext" : ""),
|
|
2796
|
+
onClick: (X) => {
|
|
2797
|
+
Ze(F, X);
|
|
2798
|
+
}
|
|
2799
|
+
}, [!!F.iconClass && d("i", {
|
|
2800
|
+
class: F.iconClass
|
|
2801
|
+
}, null), F.text]))]);
|
|
2802
|
+
}
|
|
2803
|
+
function tt() {
|
|
2804
|
+
return d("div", {
|
|
2805
|
+
ref: w,
|
|
2806
|
+
class: "modal-header",
|
|
2807
|
+
style: We.value
|
|
2808
|
+
}, [d("div", {
|
|
2809
|
+
class: "modal-title"
|
|
2810
|
+
}, [H.value && d("span", {
|
|
2811
|
+
class: l.value,
|
|
2812
|
+
style: "margin-right: 8px"
|
|
2813
|
+
}, null), d("span", {
|
|
2814
|
+
class: "modal-title-label"
|
|
2815
|
+
}, [h.value])]), d("div", {
|
|
2816
|
+
class: "actions"
|
|
2817
|
+
}, [_e()])]);
|
|
2818
|
+
}
|
|
2819
|
+
function nt(F) {
|
|
2820
|
+
F.stopPropagation();
|
|
2821
|
+
}
|
|
2822
|
+
return () => d(ut, {
|
|
2823
|
+
to: "body"
|
|
2824
|
+
}, {
|
|
2825
|
+
default: () => [re.value && d(ct, {
|
|
2826
|
+
name: "fade",
|
|
2827
|
+
appear: !0
|
|
2828
|
+
}, {
|
|
2829
|
+
default: () => {
|
|
2830
|
+
var F, X;
|
|
2831
|
+
return [d("div", {
|
|
2832
|
+
class: De.value,
|
|
2833
|
+
style: "display: block",
|
|
2834
|
+
ref: D,
|
|
2835
|
+
onClick: nt
|
|
2836
|
+
}, [d("div", {
|
|
2837
|
+
id: r.value,
|
|
2838
|
+
class: Ge.value,
|
|
2839
|
+
style: qe.value,
|
|
2840
|
+
ref: x
|
|
2841
|
+
}, [d("div", {
|
|
2842
|
+
class: Ue.value
|
|
2843
|
+
}, [p.value && tt(), d("div", {
|
|
2844
|
+
class: Ye.value
|
|
2845
|
+
}, [(X = (F = e.slots).default) == null ? void 0 : X.call(F), k.value === "iframe" && d("iframe", {
|
|
2846
|
+
title: r.value,
|
|
2847
|
+
class: "f-utils-fill",
|
|
2848
|
+
width: "100%",
|
|
2849
|
+
frameborder: "0",
|
|
2850
|
+
src: E.value
|
|
2851
|
+
}, null)]), f.value && et()]), !u.value && b.value && x.value && g(x.value)])])];
|
|
2852
|
+
}
|
|
2853
|
+
})]
|
|
2854
|
+
});
|
|
2855
|
+
}
|
|
2856
|
+
});
|
|
2857
|
+
function $e(t) {
|
|
2858
|
+
if (t.content && t.content.render)
|
|
2859
|
+
return t.content.render;
|
|
2860
|
+
if (t.render && typeof t.render == "function")
|
|
2861
|
+
return t.render;
|
|
2862
|
+
}
|
|
2863
|
+
function ba(t) {
|
|
2864
|
+
const e = document.createElement("div");
|
|
2865
|
+
e.style.display = "contents";
|
|
2866
|
+
const n = pt({
|
|
2867
|
+
setup(o, a) {
|
|
2868
|
+
Se(() => {
|
|
2869
|
+
document.body.removeChild(e);
|
|
2870
|
+
});
|
|
2871
|
+
const r = i(), s = i(t.class || ""), u = i(!!t.showButtons), p = i(!!t.showHeader), l = i(t.showCloseButton == null ? !0 : t.showCloseButton), c = i(!0), m = i(t.title || ""), v = t.acceptCallback || (() => {
|
|
2872
|
+
}), k = t.rejectCallback || (() => {
|
|
2873
|
+
}), E = t.closedCallback || ((b) => {
|
|
2874
|
+
}), N = t.resizeHandle || ((b) => {
|
|
2875
|
+
}), $ = $e(t), h = (b) => {
|
|
2876
|
+
c.value = !1, n.unmount(), E(b);
|
|
2877
|
+
};
|
|
2878
|
+
return oe(() => {
|
|
2879
|
+
}), a.expose({
|
|
2880
|
+
modalRef: r
|
|
2881
|
+
}), () => d(ze, {
|
|
2882
|
+
ref: r,
|
|
2883
|
+
class: s.value,
|
|
2884
|
+
modelValue: c.value,
|
|
2885
|
+
"onUpdate:modelValue": (b) => c.value = b,
|
|
2886
|
+
title: m.value,
|
|
2887
|
+
width: t.width,
|
|
2888
|
+
height: t.height,
|
|
2889
|
+
buttons: t.buttons,
|
|
2890
|
+
"show-header": p.value,
|
|
2891
|
+
"show-buttons": u.value,
|
|
2892
|
+
"show-close-button": l.value,
|
|
2893
|
+
"show-max-button": !1,
|
|
2894
|
+
onAccept: v,
|
|
2895
|
+
onCancel: k,
|
|
2896
|
+
fitContent: t.fitContent == null ? !0 : t.fitContent,
|
|
2897
|
+
onClosed: h,
|
|
2898
|
+
onResize: N
|
|
2899
|
+
}, {
|
|
2900
|
+
default: () => [$ && $(n)]
|
|
2901
|
+
});
|
|
2902
|
+
}
|
|
2903
|
+
});
|
|
2904
|
+
return document.body.appendChild(e), n.mount(e), n;
|
|
2905
|
+
}
|
|
2906
|
+
class Ca {
|
|
2907
|
+
constructor(e) {
|
|
2908
|
+
S(this, "appContext", null);
|
|
2909
|
+
S(this, "modalRef", i());
|
|
2910
|
+
S(this, "activeModalIndex", i(0));
|
|
2911
|
+
S(this, "modalRefs", {});
|
|
2912
|
+
S(this, "isUseEscCloseModal", i(!1));
|
|
2913
|
+
S(this, "activeModalInstance", B(() => this.modalRefs[this.activeModalIndex.value]));
|
|
2914
|
+
this.appContext = e ? e._context : null;
|
|
2915
|
+
}
|
|
2916
|
+
getCurrentModal() {
|
|
2917
|
+
return this.activeModalInstance.value;
|
|
2918
|
+
}
|
|
2919
|
+
static show(e) {
|
|
2920
|
+
const n = Object.assign({
|
|
2921
|
+
title: "",
|
|
2922
|
+
showButtons: !0,
|
|
2923
|
+
showHeader: !0
|
|
2924
|
+
}, e);
|
|
2925
|
+
return ba(n);
|
|
2926
|
+
}
|
|
2927
|
+
open(e) {
|
|
2928
|
+
const n = document.createDocumentFragment();
|
|
2929
|
+
e.showMaxButton && e.fitContent && (e.showMaxButton = !1);
|
|
2930
|
+
const o = dt(Object.assign({
|
|
2931
|
+
title: "",
|
|
2932
|
+
showButtons: !0,
|
|
2933
|
+
showHeader: !0
|
|
2934
|
+
}, e)), a = i(!0), r = o.value.acceptCallback || (() => {
|
|
2935
|
+
}), s = o.value.rejectCallback || (() => {
|
|
2936
|
+
}), u = o.value.closedCallback || ((h, b) => {
|
|
2937
|
+
}), p = o.value.resizeHandle || ((h) => {
|
|
2938
|
+
});
|
|
2939
|
+
let l;
|
|
2940
|
+
const c = $e(o.value), m = (h) => {
|
|
2941
|
+
var P;
|
|
2942
|
+
a.value = !1;
|
|
2943
|
+
const b = (P = h == null ? void 0 : h.target) == null ? void 0 : P.classList.contains("modal_close");
|
|
2944
|
+
u(h, this.isUseEscCloseModal.value ? "esc" : b ? "icon" : "button");
|
|
2945
|
+
}, v = (h) => {
|
|
2946
|
+
m(h), l && ve(() => {
|
|
2947
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], me(null, n), l = null, this.modalRef.value = null, this.modalRefs) {
|
|
2948
|
+
const b = Object.keys(this.modalRefs);
|
|
2949
|
+
b.length > 0 ? this.activeModalIndex.value = Math.max(...b) : this.activeModalIndex.value = 0;
|
|
2950
|
+
}
|
|
2951
|
+
this.isUseEscCloseModal.value = !1;
|
|
2952
|
+
});
|
|
2953
|
+
}, k = (h) => {
|
|
2954
|
+
var b;
|
|
2955
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((b = this.activeModalInstance.value) == null || b.close(h == null ? void 0 : h.event));
|
|
2956
|
+
}, E = () => d(ze, ye({
|
|
2957
|
+
ref: this.modalRef,
|
|
2958
|
+
modelValue: a.value,
|
|
2959
|
+
"onUpdate:modelValue": (h) => a.value = h
|
|
2960
|
+
}, o.value, {
|
|
2961
|
+
onAccept: r,
|
|
2962
|
+
onCancel: s,
|
|
2963
|
+
onClosed: v,
|
|
2964
|
+
onResize: p,
|
|
2965
|
+
onEsc: k
|
|
2966
|
+
}), {
|
|
2967
|
+
default: () => [c && c()]
|
|
2968
|
+
});
|
|
2969
|
+
return l = ((h) => {
|
|
2970
|
+
const b = mt(E, h);
|
|
2971
|
+
return b.appContext = this.appContext, me(b, n), b;
|
|
2972
|
+
})({
|
|
2973
|
+
...o.value
|
|
2974
|
+
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
2975
|
+
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
2976
|
+
update: (h) => {
|
|
2977
|
+
o.value = {
|
|
2978
|
+
...o.value,
|
|
2979
|
+
...h
|
|
2980
|
+
}, l && me(ft(l, {
|
|
2981
|
+
...o
|
|
2982
|
+
}), n);
|
|
2983
|
+
},
|
|
2984
|
+
destroy: v,
|
|
2985
|
+
modalRef: this.activeModalInstance
|
|
2986
|
+
};
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
class K {
|
|
2990
|
+
static show(e) {
|
|
2991
|
+
let n = new Ca();
|
|
2992
|
+
const o = Z({
|
|
2993
|
+
...e
|
|
2994
|
+
}), a = !1, r = o.type === "error" || o.type === "prompt", s = o.type === "error" ? "错误提示" : o.type === "prompt" && o.title || "", u = o.acceptCallback || (() => {
|
|
2995
|
+
}), p = o.rejectCallback || (() => {
|
|
2996
|
+
});
|
|
2997
|
+
let l = null;
|
|
2998
|
+
const c = () => {
|
|
2999
|
+
l && (l == null || l.destroy(), n = null);
|
|
3000
|
+
};
|
|
3001
|
+
l = n == null ? void 0 : n.open({
|
|
3002
|
+
class: "modal-message modal-message-type-info",
|
|
3003
|
+
title: s,
|
|
3004
|
+
showButtons: a,
|
|
3005
|
+
showHeader: r,
|
|
3006
|
+
width: o.width || 400,
|
|
3007
|
+
fitContent: !0,
|
|
3008
|
+
showMaxButton: !1,
|
|
3009
|
+
render: () => d(ue, ye(o, {
|
|
3010
|
+
onAccept: u,
|
|
3011
|
+
onReject: p,
|
|
3012
|
+
onClose: c
|
|
3013
|
+
}), null)
|
|
3014
|
+
});
|
|
3015
|
+
}
|
|
3016
|
+
static info(e, n) {
|
|
3017
|
+
const o = Z({
|
|
3018
|
+
type: "info",
|
|
3019
|
+
title: e,
|
|
3020
|
+
detail: n,
|
|
3021
|
+
okButtonText: "知道了",
|
|
3022
|
+
cancelButtonText: ""
|
|
3023
|
+
});
|
|
3024
|
+
K.show(o);
|
|
3025
|
+
}
|
|
3026
|
+
static warning(e, n) {
|
|
3027
|
+
const o = Z({
|
|
3028
|
+
type: "warning",
|
|
3029
|
+
title: e,
|
|
3030
|
+
detail: n,
|
|
3031
|
+
okButtonText: "知道了",
|
|
3032
|
+
cancelButtonText: ""
|
|
3033
|
+
});
|
|
3034
|
+
K.show(o);
|
|
3035
|
+
}
|
|
3036
|
+
static success(e, n) {
|
|
3037
|
+
const o = Z({
|
|
3038
|
+
type: "success",
|
|
3039
|
+
title: e,
|
|
3040
|
+
detail: n,
|
|
3041
|
+
okButtonText: "关闭",
|
|
3042
|
+
cancelButtonText: ""
|
|
3043
|
+
});
|
|
3044
|
+
K.show(o);
|
|
3045
|
+
}
|
|
3046
|
+
static error(e, n, o) {
|
|
3047
|
+
const a = Z({
|
|
3048
|
+
width: 500,
|
|
3049
|
+
type: "error",
|
|
3050
|
+
okButtonText: "关闭",
|
|
3051
|
+
cancelButtonText: "",
|
|
3052
|
+
exceptionInfo: {
|
|
3053
|
+
date: o,
|
|
3054
|
+
message: e,
|
|
3055
|
+
detail: n
|
|
3056
|
+
}
|
|
3057
|
+
});
|
|
3058
|
+
K.show(a);
|
|
3059
|
+
}
|
|
3060
|
+
static prompt(e, n) {
|
|
3061
|
+
const o = Z({
|
|
3062
|
+
type: "prompt",
|
|
3063
|
+
title: e,
|
|
3064
|
+
detail: n,
|
|
3065
|
+
okButtonText: "确定",
|
|
3066
|
+
cancelButtonText: "取消"
|
|
3067
|
+
});
|
|
3068
|
+
K.show(o);
|
|
3069
|
+
}
|
|
3070
|
+
static question(e, n, o, a) {
|
|
3071
|
+
const r = Z({
|
|
3072
|
+
type: "question",
|
|
3073
|
+
title: e,
|
|
3074
|
+
detail: n,
|
|
3075
|
+
okButtonText: "确定",
|
|
3076
|
+
cancelButtonText: "取消",
|
|
3077
|
+
acceptCallback: o,
|
|
3078
|
+
rejectCallback: a
|
|
3079
|
+
});
|
|
3080
|
+
K.show(r);
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
ue.install = (t) => {
|
|
3084
|
+
t.component(ue.name, ue), t.provide("FMessageBoxService", K);
|
|
3085
|
+
};
|
|
3086
|
+
var wa = /* @__PURE__ */ ((t) => (t[t.IntType = 0] = "IntType", t[t.StringType = 1] = "StringType", t[t.BoolType = 2] = "BoolType", t))(wa || {}), Ae = /* @__PURE__ */ ((t) => (t[t.Value = 0] = "Value", t[t.SmartHelp = 1] = "SmartHelp", t[t.Enum = 2] = "Enum", t[t.Express = 3] = "Express", t))(Ae || {}), He = /* @__PURE__ */ ((t) => (t.Equal = "0", t.NotEqual = "1", t.Greater = "2", t.GreaterOrEqual = "3", t.Less = "4", t.LessOrEqual = "5", t.Like = "6", t.LikeStartWith = "7", t.LikeEndWith = "8", t))(He || {});
|
|
3087
|
+
const xa = [
|
|
1789
3088
|
{
|
|
1790
3089
|
value: "0",
|
|
1791
3090
|
name: "等于"
|
|
@@ -1822,7 +3121,7 @@ const ao = [
|
|
|
1822
3121
|
value: "8",
|
|
1823
3122
|
name: "结束是"
|
|
1824
3123
|
}
|
|
1825
|
-
],
|
|
3124
|
+
], Ta = {
|
|
1826
3125
|
"button-edit": ["0", "1", " 6", "7", "8"],
|
|
1827
3126
|
"check-box": ["0"],
|
|
1828
3127
|
"combo-list": ["0", "1"],
|
|
@@ -1842,395 +3141,395 @@ const ao = [
|
|
|
1842
3141
|
"radio-group": ["0"],
|
|
1843
3142
|
text: ["0", "1", " 6", "7", "8"]
|
|
1844
3143
|
};
|
|
1845
|
-
function
|
|
3144
|
+
function ka(t, e, n) {
|
|
1846
3145
|
const { fieldMap: o } = n;
|
|
1847
|
-
function r
|
|
1848
|
-
const
|
|
1849
|
-
if (!
|
|
3146
|
+
function a(r) {
|
|
3147
|
+
const s = o.get(r.fieldCode);
|
|
3148
|
+
if (!s)
|
|
1850
3149
|
return [];
|
|
1851
|
-
const
|
|
1852
|
-
return
|
|
3150
|
+
const u = s.editor.type, p = new Set(Ta[u]);
|
|
3151
|
+
return xa.filter((c) => p.has(c.value));
|
|
1853
3152
|
}
|
|
1854
|
-
return { getCompareOperators:
|
|
3153
|
+
return { getCompareOperators: a };
|
|
1855
3154
|
}
|
|
1856
|
-
function
|
|
1857
|
-
const
|
|
3155
|
+
function Ba() {
|
|
3156
|
+
const t = i({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
1858
3157
|
let o = 0;
|
|
1859
|
-
function
|
|
3158
|
+
function a() {
|
|
1860
3159
|
return {
|
|
1861
3160
|
id: "",
|
|
1862
3161
|
fieldCode: "",
|
|
1863
3162
|
fieldName: "",
|
|
1864
|
-
compareType:
|
|
1865
|
-
valueType:
|
|
1866
|
-
value: new
|
|
3163
|
+
compareType: He.Equal,
|
|
3164
|
+
valueType: Ae.Value,
|
|
3165
|
+
value: new Ee(),
|
|
1867
3166
|
relation: 0,
|
|
1868
3167
|
conditionId: Date.now()
|
|
1869
3168
|
};
|
|
1870
3169
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return { relation:
|
|
1873
|
-
}
|
|
1874
|
-
function
|
|
1875
|
-
const
|
|
1876
|
-
n.forEach((
|
|
1877
|
-
|
|
1878
|
-
}),
|
|
1879
|
-
|
|
1880
|
-
}),
|
|
1881
|
-
}
|
|
1882
|
-
function
|
|
1883
|
-
const
|
|
1884
|
-
let
|
|
1885
|
-
return
|
|
1886
|
-
var
|
|
1887
|
-
if (
|
|
3170
|
+
function r(f, w) {
|
|
3171
|
+
return { relation: f, items: [], children: [], path: [], groupId: ++o, level: w };
|
|
3172
|
+
}
|
|
3173
|
+
function s() {
|
|
3174
|
+
const f = Object.assign({}, t.value);
|
|
3175
|
+
n.forEach((w, x) => {
|
|
3176
|
+
w.groupId === f.groupId && n.set(x, f);
|
|
3177
|
+
}), e.forEach((w, x) => {
|
|
3178
|
+
w.groupId === f.groupId && e.set(x, f);
|
|
3179
|
+
}), t.value = f;
|
|
3180
|
+
}
|
|
3181
|
+
function u(f) {
|
|
3182
|
+
const w = /* @__PURE__ */ new Map();
|
|
3183
|
+
let x = 0;
|
|
3184
|
+
return f.forEach((R, g) => {
|
|
3185
|
+
var M, z;
|
|
3186
|
+
if (x += ((M = R.lBracket) == null ? void 0 : M.length) || 0, w.set(g, x), x -= ((z = R.rBracket) == null ? void 0 : z.length) || 0, x < 0)
|
|
1888
3187
|
throw new Error("The right bracket is out of range.");
|
|
1889
|
-
}),
|
|
3188
|
+
}), w;
|
|
1890
3189
|
}
|
|
1891
|
-
function
|
|
1892
|
-
for (let
|
|
1893
|
-
const
|
|
1894
|
-
|
|
3190
|
+
function p(f, w, x, R, g) {
|
|
3191
|
+
for (let M = 0; M < w; M++) {
|
|
3192
|
+
const z = f + (M + 1), Y = r(g, z);
|
|
3193
|
+
x.children.push(Y), n.set(Y.groupId, x), x = x.children[x.children.length - 1], R.push(x);
|
|
1895
3194
|
}
|
|
1896
|
-
return
|
|
3195
|
+
return x;
|
|
1897
3196
|
}
|
|
1898
|
-
function
|
|
1899
|
-
for (let
|
|
1900
|
-
|
|
1901
|
-
const
|
|
1902
|
-
if (!
|
|
3197
|
+
function l(f, w, x, R, g) {
|
|
3198
|
+
for (let C = w; C <= 0; C++)
|
|
3199
|
+
R.pop();
|
|
3200
|
+
const M = R[R.length - 1];
|
|
3201
|
+
if (!M)
|
|
1903
3202
|
throw new Error("The group path is out of range");
|
|
1904
|
-
const
|
|
1905
|
-
return
|
|
3203
|
+
const z = f + w, Y = r(g, z);
|
|
3204
|
+
return M.children.push(Y), n.set(Y.groupId, M), x = M.children[M.children.length - 1], R.push(x), x;
|
|
1906
3205
|
}
|
|
1907
|
-
function
|
|
1908
|
-
|
|
1909
|
-
const
|
|
1910
|
-
return
|
|
3206
|
+
function c(f, w, x, R) {
|
|
3207
|
+
x.pop();
|
|
3208
|
+
const g = x[x.length - 1], M = r(R, f);
|
|
3209
|
+
return g.children.push(M), n.set(M.groupId, g), w = g.children[g.children.length - 1], x.push(w), w;
|
|
1911
3210
|
}
|
|
1912
|
-
function
|
|
1913
|
-
let
|
|
1914
|
-
if (!
|
|
3211
|
+
function m(f, w, x, R, g, M) {
|
|
3212
|
+
let z = f[f.length - 1];
|
|
3213
|
+
if (!z)
|
|
1915
3214
|
throw new Error("The group path is out of range");
|
|
1916
|
-
const
|
|
1917
|
-
if (
|
|
1918
|
-
return
|
|
1919
|
-
const
|
|
1920
|
-
return
|
|
1921
|
-
}
|
|
1922
|
-
function
|
|
1923
|
-
const
|
|
1924
|
-
return
|
|
1925
|
-
const
|
|
1926
|
-
|
|
1927
|
-
}),
|
|
1928
|
-
}
|
|
1929
|
-
function
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1932
|
-
}
|
|
1933
|
-
function
|
|
1934
|
-
if (!
|
|
3215
|
+
const Y = w.get(R) || 0, C = w.get(x) || 0;
|
|
3216
|
+
if (x < 0 || x === R)
|
|
3217
|
+
return f[f.length - 1];
|
|
3218
|
+
const y = Y - C, j = g && g.relation !== void 0 ? g.relation : 1;
|
|
3219
|
+
return z = y > 0 ? p(C, y, z, f, j) : z, z = y < 0 ? l(C, y, z, f, j) : z, z = y === 0 && C > 0 && Y > 0 && g && M && !!g.rBracket && !!M.lBracket ? c(C, z, f, j) : z, z;
|
|
3220
|
+
}
|
|
3221
|
+
function v(f) {
|
|
3222
|
+
const x = { relation: f.length && f[0].relation !== void 0 ? f[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, R = [x], g = u(f);
|
|
3223
|
+
return f.forEach((M, z) => {
|
|
3224
|
+
const Y = z - 1, C = f[Y], y = m(R, g, Y, z, C, M);
|
|
3225
|
+
y.items.push(M), e.set(M.conditionId, y);
|
|
3226
|
+
}), t.value = x, x;
|
|
3227
|
+
}
|
|
3228
|
+
function k() {
|
|
3229
|
+
const f = a();
|
|
3230
|
+
e.set(f.conditionId, t.value), t.value.items.push(f);
|
|
3231
|
+
}
|
|
3232
|
+
function E(f) {
|
|
3233
|
+
if (!f)
|
|
1935
3234
|
return;
|
|
1936
|
-
const
|
|
1937
|
-
if (
|
|
1938
|
-
const
|
|
1939
|
-
|
|
3235
|
+
const w = e.get(f.conditionId);
|
|
3236
|
+
if (w) {
|
|
3237
|
+
const x = w.items.findIndex((g) => g.conditionId === f.conditionId) + 1, R = a();
|
|
3238
|
+
e.set(R.conditionId, w), w.items.splice(x, 0, R), s();
|
|
1940
3239
|
}
|
|
1941
3240
|
}
|
|
1942
|
-
function
|
|
1943
|
-
const
|
|
1944
|
-
|
|
3241
|
+
function N(f) {
|
|
3242
|
+
const w = e.get(f.conditionId);
|
|
3243
|
+
w && (w.items = w.items.filter((x) => x.conditionId !== f.conditionId), e.delete(f.conditionId), H(), s());
|
|
1945
3244
|
}
|
|
1946
|
-
function
|
|
1947
|
-
|
|
1948
|
-
const
|
|
1949
|
-
if (
|
|
1950
|
-
const
|
|
1951
|
-
|
|
3245
|
+
function $(f, w, x, R) {
|
|
3246
|
+
f.reduce((g, M) => {
|
|
3247
|
+
const z = M.conditionId !== void 0, Y = M.groupId !== void 0;
|
|
3248
|
+
if (z) {
|
|
3249
|
+
const C = M;
|
|
3250
|
+
x.push(C), g.items.set(C.conditionId, C);
|
|
1952
3251
|
}
|
|
1953
|
-
if (
|
|
1954
|
-
const
|
|
1955
|
-
|
|
3252
|
+
if (Y) {
|
|
3253
|
+
const C = M;
|
|
3254
|
+
R.push(C), g.groups.set(C.groupId, C);
|
|
1956
3255
|
}
|
|
1957
|
-
return
|
|
1958
|
-
},
|
|
3256
|
+
return g;
|
|
3257
|
+
}, w);
|
|
1959
3258
|
}
|
|
1960
|
-
function
|
|
1961
|
-
|
|
3259
|
+
function h(f, w, x, R, g) {
|
|
3260
|
+
f && (f.items = w.length ? f.items.filter((M) => !x.has(M.conditionId)) : f.items, f.children = R.length ? f.children.filter((M) => !g.has(M.groupId)) : f.children);
|
|
1962
3261
|
}
|
|
1963
|
-
function
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
}),
|
|
1967
|
-
|
|
3262
|
+
function b(f, w, x) {
|
|
3263
|
+
w.forEach((R) => {
|
|
3264
|
+
f.items.push(R), e.set(R.conditionId, f);
|
|
3265
|
+
}), x.forEach((R) => {
|
|
3266
|
+
f.children.push(R), n.set(R.groupId, f);
|
|
1968
3267
|
});
|
|
1969
3268
|
}
|
|
1970
|
-
function P(
|
|
1971
|
-
const
|
|
1972
|
-
if (
|
|
1973
|
-
|
|
1974
|
-
const
|
|
1975
|
-
|
|
3269
|
+
function P(f) {
|
|
3270
|
+
const w = f[0], x = w.conditionId !== void 0 ? e.get(w.conditionId) : n.get(w.groupId), R = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, g = [], M = [];
|
|
3271
|
+
if (x) {
|
|
3272
|
+
$(f, R, g, M), h(x, g, R.items, M, R.groups);
|
|
3273
|
+
const z = r(x.relation, x.level + 1);
|
|
3274
|
+
b(z, g, M), x.children.push(z), n.set(z.groupId, x), s();
|
|
1976
3275
|
}
|
|
1977
3276
|
}
|
|
1978
|
-
function
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
}),
|
|
1983
|
-
|
|
1984
|
-
}),
|
|
1985
|
-
}
|
|
1986
|
-
function
|
|
1987
|
-
|
|
1988
|
-
}
|
|
1989
|
-
let
|
|
1990
|
-
function
|
|
1991
|
-
const { relation:
|
|
1992
|
-
return (
|
|
1993
|
-
const
|
|
1994
|
-
return
|
|
3277
|
+
function D(f) {
|
|
3278
|
+
const w = [...f.items], x = [...f.children], R = n.get(f.groupId);
|
|
3279
|
+
R && (R.children = R.children.filter((g) => g.groupId !== f.groupId), n.delete(f.groupId), w.forEach((g) => {
|
|
3280
|
+
R.items.push(g), e.set(g.conditionId, R);
|
|
3281
|
+
}), x.forEach((g) => {
|
|
3282
|
+
R.children.push(g), n.set(g.groupId, R);
|
|
3283
|
+
}), s());
|
|
3284
|
+
}
|
|
3285
|
+
function W(f) {
|
|
3286
|
+
f.relation = f.relation === 1 ? 2 : 1, s();
|
|
3287
|
+
}
|
|
3288
|
+
let q;
|
|
3289
|
+
function T(f) {
|
|
3290
|
+
const { relation: w } = f;
|
|
3291
|
+
return (f.children && f.children.length ? f.children.map((R, g, M) => {
|
|
3292
|
+
const z = q(R);
|
|
3293
|
+
return z[0].lBracket = (z[0].lBracket || "") + "(", z[z.length - 1].rBracket = (z[z.length - 1].rBracket || "") + ")", z[z.length - 1].relation = g < M.length - 1 ? w : 0, z;
|
|
1995
3294
|
}) : []).flat();
|
|
1996
3295
|
}
|
|
1997
|
-
|
|
1998
|
-
const { relation:
|
|
1999
|
-
return [...
|
|
3296
|
+
q = (f = t.value) => {
|
|
3297
|
+
const { relation: w } = f, x = f.items.map((g, M, z) => (g.lBracket = M === 0 ? "(" : "", g.rBracket = M === z.length - 1 ? ")" : "", g.relation = M < z.length - 1 ? w || 1 : 0, g)), R = T(f);
|
|
3298
|
+
return [...x, ...R];
|
|
2000
3299
|
};
|
|
2001
|
-
function
|
|
2002
|
-
const
|
|
2003
|
-
if (
|
|
2004
|
-
|
|
2005
|
-
}),
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2008
|
-
} else
|
|
3300
|
+
function H(f) {
|
|
3301
|
+
const w = f || t.value;
|
|
3302
|
+
if (w.children.length && w.children.forEach((x) => {
|
|
3303
|
+
H(x);
|
|
3304
|
+
}), w.level === 0 && !w.items.length && w.children.length === 1) {
|
|
3305
|
+
const x = w.children[0];
|
|
3306
|
+
t.value.relation = x.relation, D(x);
|
|
3307
|
+
} else w.items.length === 0 && w.children.length <= 1 && D(w);
|
|
2009
3308
|
}
|
|
2010
3309
|
return {
|
|
2011
|
-
addCondition:
|
|
2012
|
-
changeGroupRelation:
|
|
2013
|
-
conditionGroupMap:
|
|
2014
|
-
getConditions:
|
|
3310
|
+
addCondition: k,
|
|
3311
|
+
changeGroupRelation: W,
|
|
3312
|
+
conditionGroupMap: e,
|
|
3313
|
+
getConditions: q,
|
|
2015
3314
|
group: P,
|
|
2016
3315
|
groupParentMap: n,
|
|
2017
|
-
insertConditionTo:
|
|
2018
|
-
loadConditionGroup:
|
|
2019
|
-
refresh:
|
|
2020
|
-
removeCondition:
|
|
2021
|
-
rootGroup:
|
|
2022
|
-
unGroup:
|
|
3316
|
+
insertConditionTo: E,
|
|
3317
|
+
loadConditionGroup: v,
|
|
3318
|
+
refresh: s,
|
|
3319
|
+
removeCondition: N,
|
|
3320
|
+
rootGroup: t,
|
|
3321
|
+
unGroup: D
|
|
2023
3322
|
};
|
|
2024
3323
|
}
|
|
2025
|
-
function
|
|
2026
|
-
const o =
|
|
2027
|
-
let
|
|
2028
|
-
function
|
|
2029
|
-
let
|
|
2030
|
-
const
|
|
2031
|
-
for (; P &&
|
|
2032
|
-
P.level >
|
|
2033
|
-
return
|
|
2034
|
-
}
|
|
2035
|
-
function
|
|
2036
|
-
|
|
2037
|
-
}
|
|
2038
|
-
function
|
|
2039
|
-
const { conditionId:
|
|
2040
|
-
o.value.add(
|
|
2041
|
-
const P =
|
|
2042
|
-
|
|
2043
|
-
}
|
|
2044
|
-
const
|
|
2045
|
-
|
|
2046
|
-
const
|
|
2047
|
-
|
|
3324
|
+
function Fa(t, e, n) {
|
|
3325
|
+
const o = i(/* @__PURE__ */ new Set()), a = i(/* @__PURE__ */ new Set()), { conditionGroupMap: r, groupParentMap: s } = n;
|
|
3326
|
+
let u, p;
|
|
3327
|
+
function l(h) {
|
|
3328
|
+
let b = u.level <= h.level ? u : h, P = u.level > h.level ? u : h;
|
|
3329
|
+
const D = [];
|
|
3330
|
+
for (; P && b && P !== b; )
|
|
3331
|
+
P.level > b.level ? (D.push(P), P = s.get(P.groupId)) : P.level === b.level && (b = s.get(b.groupId), b && D.unshift(b));
|
|
3332
|
+
return D;
|
|
3333
|
+
}
|
|
3334
|
+
function c(h) {
|
|
3335
|
+
a.value.add(h.groupId), h.items.forEach((b) => o.value.add(b.conditionId)), h.children.forEach((b) => c(b));
|
|
3336
|
+
}
|
|
3337
|
+
function m(h) {
|
|
3338
|
+
const { conditionId: b } = h;
|
|
3339
|
+
o.value.add(b), u = o.value.size === 0 ? r.get(b) : u;
|
|
3340
|
+
const P = r.get(h.conditionId);
|
|
3341
|
+
l(P).forEach((W) => c(W));
|
|
3342
|
+
}
|
|
3343
|
+
const v = B(() => o.value.size === 0 && a.value.size === 1), k = function(h) {
|
|
3344
|
+
a.value.delete(h.groupId), h.items.forEach((P) => p(P)), h.children.forEach((P) => !v.value && k(P));
|
|
3345
|
+
const b = s.get(h.groupId);
|
|
3346
|
+
b && a.value.has(b.groupId) && k(b);
|
|
2048
3347
|
};
|
|
2049
|
-
|
|
2050
|
-
const { conditionId:
|
|
2051
|
-
if (o.value.has(
|
|
2052
|
-
const P =
|
|
2053
|
-
P &&
|
|
3348
|
+
p = function(h) {
|
|
3349
|
+
const { conditionId: b } = h;
|
|
3350
|
+
if (o.value.has(b) && o.value.delete(b), a.value.size > 0) {
|
|
3351
|
+
const P = r.get(b);
|
|
3352
|
+
P && a.value.has(P.groupId) && k(P);
|
|
2054
3353
|
}
|
|
2055
3354
|
};
|
|
2056
|
-
function
|
|
2057
|
-
const { conditionId:
|
|
2058
|
-
o.value.size === 0 && (
|
|
3355
|
+
function E(h) {
|
|
3356
|
+
const { conditionId: b } = h;
|
|
3357
|
+
o.value.size === 0 && (u = r.get(b)), o.value.has(b) ? p(h) : m(h);
|
|
2059
3358
|
}
|
|
2060
|
-
function
|
|
2061
|
-
const
|
|
2062
|
-
return
|
|
3359
|
+
function N() {
|
|
3360
|
+
const h = [];
|
|
3361
|
+
return u && (u.items.filter((b) => o.value.has(b.conditionId)).forEach((b) => h.push(b)), u.children.filter((b) => a.value.has(b.groupId)).forEach((b) => h.push(b))), h;
|
|
2063
3362
|
}
|
|
2064
|
-
function
|
|
2065
|
-
o.value.clear(),
|
|
3363
|
+
function $() {
|
|
3364
|
+
o.value.clear(), a.value.clear();
|
|
2066
3365
|
}
|
|
2067
|
-
return { clear:
|
|
3366
|
+
return { clear: $, getSelectedGroupItem: N, selectedItems: o, toggleSelect: E };
|
|
2068
3367
|
}
|
|
2069
|
-
const
|
|
3368
|
+
const fe = /* @__PURE__ */ ee({
|
|
2070
3369
|
name: "FConditionList",
|
|
2071
|
-
props:
|
|
3370
|
+
props: Me,
|
|
2072
3371
|
emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
|
|
2073
|
-
setup(
|
|
2074
|
-
const n =
|
|
2075
|
-
convertToSingleControl:
|
|
2076
|
-
fields:
|
|
2077
|
-
fieldMap:
|
|
2078
|
-
loadFieldConfigs:
|
|
2079
|
-
} =
|
|
2080
|
-
addCondition:
|
|
2081
|
-
changeGroupRelation:
|
|
2082
|
-
getConditions:
|
|
2083
|
-
group:
|
|
2084
|
-
insertConditionTo:
|
|
2085
|
-
loadConditionGroup:
|
|
2086
|
-
refresh:
|
|
2087
|
-
removeCondition:
|
|
2088
|
-
rootGroup:
|
|
3372
|
+
setup(t, e) {
|
|
3373
|
+
const n = i(t.key), o = i(t.conditions), a = Ve(t), {
|
|
3374
|
+
convertToSingleControl: r,
|
|
3375
|
+
fields: s,
|
|
3376
|
+
fieldMap: u,
|
|
3377
|
+
loadFieldConfigs: p
|
|
3378
|
+
} = a, l = Ba(), {
|
|
3379
|
+
addCondition: c,
|
|
3380
|
+
changeGroupRelation: m,
|
|
3381
|
+
getConditions: v,
|
|
3382
|
+
group: k,
|
|
3383
|
+
insertConditionTo: E,
|
|
3384
|
+
loadConditionGroup: N,
|
|
3385
|
+
refresh: $,
|
|
3386
|
+
removeCondition: h,
|
|
3387
|
+
rootGroup: b,
|
|
2089
3388
|
unGroup: P
|
|
2090
|
-
} =
|
|
2091
|
-
createConditionValue:
|
|
2092
|
-
} =
|
|
2093
|
-
selectedItems:
|
|
2094
|
-
toggleSelect:
|
|
2095
|
-
} =
|
|
2096
|
-
getCompareOperators:
|
|
2097
|
-
} =
|
|
2098
|
-
|
|
2099
|
-
function
|
|
2100
|
-
var
|
|
2101
|
-
const
|
|
3389
|
+
} = l, {
|
|
3390
|
+
createConditionValue: D
|
|
3391
|
+
} = Ie(), W = Fa(t, e, l), {
|
|
3392
|
+
selectedItems: q,
|
|
3393
|
+
toggleSelect: T
|
|
3394
|
+
} = W, {
|
|
3395
|
+
getCompareOperators: H
|
|
3396
|
+
} = ka(t, e, a);
|
|
3397
|
+
p(!1), s.value = r(s.value), N(o.value);
|
|
3398
|
+
function f(y) {
|
|
3399
|
+
var G;
|
|
3400
|
+
const j = ((G = u.get(y.fieldCode)) == null ? void 0 : G.editor) || {
|
|
2102
3401
|
type: "text"
|
|
2103
3402
|
};
|
|
2104
|
-
|
|
3403
|
+
y.value = D(j.type, void 0), e.emit("labelCodeChange", y);
|
|
2105
3404
|
}
|
|
2106
|
-
function
|
|
2107
|
-
|
|
3405
|
+
function w(y, j) {
|
|
3406
|
+
e.emit("compareTypeChange", j);
|
|
2108
3407
|
}
|
|
2109
|
-
function
|
|
3408
|
+
function x() {
|
|
2110
3409
|
}
|
|
2111
|
-
|
|
2112
|
-
getConditions:
|
|
3410
|
+
e.expose({
|
|
3411
|
+
getConditions: v
|
|
2113
3412
|
});
|
|
2114
|
-
function
|
|
2115
|
-
|
|
3413
|
+
function R(y, j) {
|
|
3414
|
+
e.emit("valueChange", y, j);
|
|
2116
3415
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2119
|
-
var
|
|
2120
|
-
return
|
|
3416
|
+
function g(y) {
|
|
3417
|
+
return y.items.map((j) => {
|
|
3418
|
+
var G;
|
|
3419
|
+
return d("div", {
|
|
2121
3420
|
class: "condition-list-item",
|
|
2122
|
-
key:
|
|
2123
|
-
}, [
|
|
3421
|
+
key: j.conditionId
|
|
3422
|
+
}, [d("div", {
|
|
2124
3423
|
class: "condition-list-item-type mr-3"
|
|
2125
|
-
}, [
|
|
3424
|
+
}, [d(he, {
|
|
2126
3425
|
"value-field": "labelCode",
|
|
2127
3426
|
"text-field": "name",
|
|
2128
3427
|
"id-field": "id",
|
|
2129
|
-
data:
|
|
2130
|
-
modelValue:
|
|
2131
|
-
"onUpdate:modelValue": (
|
|
2132
|
-
onChange: (
|
|
2133
|
-
}, null)]),
|
|
3428
|
+
data: s.value,
|
|
3429
|
+
modelValue: j.fieldCode,
|
|
3430
|
+
"onUpdate:modelValue": (U) => j.fieldCode = U,
|
|
3431
|
+
onChange: (U) => f(j)
|
|
3432
|
+
}, null)]), d("div", {
|
|
2134
3433
|
class: "condition-list-item-compare mr-3"
|
|
2135
|
-
}, [
|
|
3434
|
+
}, [d(he, {
|
|
2136
3435
|
"value-field": "value",
|
|
2137
3436
|
"text-field": "name",
|
|
2138
3437
|
"id-field": "id",
|
|
2139
|
-
data:
|
|
2140
|
-
modelValue:
|
|
2141
|
-
"onUpdate:modelValue": (
|
|
2142
|
-
onChange: (
|
|
2143
|
-
}, null)]),
|
|
3438
|
+
data: H(j),
|
|
3439
|
+
modelValue: j.compareType,
|
|
3440
|
+
"onUpdate:modelValue": (U) => j.compareType = U,
|
|
3441
|
+
onChange: (U) => w(U, j)
|
|
3442
|
+
}, null)]), d("div", {
|
|
2144
3443
|
class: "condition-list-item-control mr-3"
|
|
2145
|
-
}, [
|
|
2146
|
-
editor: (
|
|
3444
|
+
}, [d(Go, {
|
|
3445
|
+
editor: (G = u.get(j.fieldCode)) == null ? void 0 : G.editor,
|
|
2147
3446
|
showLabel: !1,
|
|
2148
|
-
modelValue:
|
|
2149
|
-
"onUpdate:modelValue": (
|
|
2150
|
-
onChange: (
|
|
2151
|
-
|
|
3447
|
+
modelValue: j.value.value,
|
|
3448
|
+
"onUpdate:modelValue": (U) => j.value.value = U,
|
|
3449
|
+
onChange: (U) => {
|
|
3450
|
+
R(U, j);
|
|
2152
3451
|
}
|
|
2153
|
-
}, null)]),
|
|
3452
|
+
}, null)]), d("div", {
|
|
2154
3453
|
class: "condition-list-item-extend"
|
|
2155
|
-
}, [
|
|
3454
|
+
}, [d("span", {
|
|
2156
3455
|
class: "f-icon f-icon-plus-sm mr-2",
|
|
2157
|
-
onClick: () =>
|
|
2158
|
-
}, null),
|
|
3456
|
+
onClick: () => E(j)
|
|
3457
|
+
}, null), d("span", {
|
|
2159
3458
|
class: "f-icon f-icon-minus-sm",
|
|
2160
|
-
onClick: () =>
|
|
2161
|
-
}, null)]),
|
|
3459
|
+
onClick: () => h(j)
|
|
3460
|
+
}, null)]), d("div", {
|
|
2162
3461
|
class: "custom-control custom-checkbox"
|
|
2163
|
-
}, [
|
|
3462
|
+
}, [d("input", {
|
|
2164
3463
|
title: "selection",
|
|
2165
3464
|
class: "custom-control-input",
|
|
2166
3465
|
type: "checkbox",
|
|
2167
|
-
checked:
|
|
2168
|
-
}, null),
|
|
3466
|
+
checked: q.value.has(j.conditionId)
|
|
3467
|
+
}, null), d("label", {
|
|
2169
3468
|
class: "custom-control-label",
|
|
2170
|
-
onClick: () =>
|
|
3469
|
+
onClick: () => T(j)
|
|
2171
3470
|
}, null)])]);
|
|
2172
3471
|
});
|
|
2173
3472
|
}
|
|
2174
|
-
function
|
|
2175
|
-
return
|
|
3473
|
+
function M(y) {
|
|
3474
|
+
return d("div", {
|
|
2176
3475
|
class: "condition-list-relation"
|
|
2177
|
-
}, [
|
|
3476
|
+
}, [d("span", {
|
|
2178
3477
|
class: "condition-list-relation-close f-icon-filter-cancel btn-link",
|
|
2179
|
-
onClick: () => P(
|
|
2180
|
-
}, null),
|
|
3478
|
+
onClick: () => P(y)
|
|
3479
|
+
}, null), d("span", {
|
|
2181
3480
|
class: "condition-list-relation-text btn-link",
|
|
2182
|
-
onClick: () =>
|
|
2183
|
-
}, [
|
|
3481
|
+
onClick: () => m(y)
|
|
3482
|
+
}, [y.relation === 1 ? "与" : "或"])]);
|
|
2184
3483
|
}
|
|
2185
|
-
function
|
|
2186
|
-
return
|
|
3484
|
+
function z(y) {
|
|
3485
|
+
return d("div", {
|
|
2187
3486
|
class: "condition-list-content"
|
|
2188
|
-
}, [
|
|
3487
|
+
}, [d("div", {
|
|
2189
3488
|
class: "condition-list-content-group"
|
|
2190
|
-
}, [
|
|
3489
|
+
}, [g(y), y.children && y.children.map((j) => z(j))]), M(y)]);
|
|
2191
3490
|
}
|
|
2192
|
-
function
|
|
2193
|
-
|
|
3491
|
+
function Y() {
|
|
3492
|
+
k(W.getSelectedGroupItem()), W.clear();
|
|
2194
3493
|
}
|
|
2195
|
-
function
|
|
2196
|
-
return
|
|
3494
|
+
function C() {
|
|
3495
|
+
return d("div", {
|
|
2197
3496
|
class: "condition-list-bottom"
|
|
2198
|
-
}, [
|
|
3497
|
+
}, [d("div", {
|
|
2199
3498
|
class: "add-condition-btn mb-1 mr-3",
|
|
2200
|
-
onClick:
|
|
2201
|
-
}, [
|
|
3499
|
+
onClick: c
|
|
3500
|
+
}, [d("span", {
|
|
2202
3501
|
class: "f-icon f-icon-filter-add"
|
|
2203
|
-
}, null),
|
|
3502
|
+
}, null), d("span", {
|
|
2204
3503
|
class: "ml-1"
|
|
2205
|
-
}, [
|
|
3504
|
+
}, [le("添加条件")])]), d("div", {
|
|
2206
3505
|
class: "add-condition-btn mb-1",
|
|
2207
|
-
onClick:
|
|
2208
|
-
}, [
|
|
3506
|
+
onClick: Y
|
|
3507
|
+
}, [d("span", {
|
|
2209
3508
|
class: "f-icon f-icon-filter-grouping"
|
|
2210
|
-
}, null),
|
|
3509
|
+
}, null), d("span", {
|
|
2211
3510
|
class: "ml-1"
|
|
2212
|
-
}, [
|
|
3511
|
+
}, [le("生成条件组")])]), d("div", {
|
|
2213
3512
|
class: "condition-list-reset add-condition-btn",
|
|
2214
|
-
onClick:
|
|
2215
|
-
}, [
|
|
3513
|
+
onClick: x
|
|
3514
|
+
}, [le("重置")])]);
|
|
2216
3515
|
}
|
|
2217
|
-
return () =>
|
|
3516
|
+
return () => d("div", {
|
|
2218
3517
|
class: "condition-list",
|
|
2219
3518
|
key: n.value
|
|
2220
|
-
}, [
|
|
3519
|
+
}, [d("div", {
|
|
2221
3520
|
class: "condition-list-body"
|
|
2222
|
-
}, [
|
|
3521
|
+
}, [z(b.value)]), C()]);
|
|
2223
3522
|
}
|
|
2224
3523
|
});
|
|
2225
|
-
|
|
2226
|
-
|
|
3524
|
+
fe.install = (t) => {
|
|
3525
|
+
t.component(ke.name, ke).component(fe.name, fe);
|
|
2227
3526
|
};
|
|
2228
3527
|
export {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
3528
|
+
wa as EnumType,
|
|
3529
|
+
ke as FConditionFields,
|
|
3530
|
+
fe as FConditionList,
|
|
3531
|
+
Ae as ValueType,
|
|
3532
|
+
Me as conditionProps,
|
|
3533
|
+
fe as default,
|
|
3534
|
+
Ba as useCondition
|
|
2236
3535
|
};
|