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