@farris/ui-vue 1.3.1 → 1.3.4
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 +1175 -1280
- 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 +4658 -4555
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2891 -2994
- 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 +9912 -1191
- 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 +1595 -1725
- 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 +355 -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 +622 -633
- 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 +2079 -2178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3062 -3322
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10581 -3225
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +10182 -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 +1909 -2007
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6292 -6244
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5165 -5062
- 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.css +1 -1
- 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 +12607 -5080
- 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 +5002 -5272
- 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 +2128 -427
- 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 +2223 -2203
- 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 +399 -421
- 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 +2992 -3101
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2350 -2448
- 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 +46910 -42804
- 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 +2 -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 +18 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +28 -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/composition/use-general-editor.d.ts +26 -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/events-editor/src/composition/types.d.ts +1 -1
- 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 +90 -4
- package/types/query-solution/src/composition/use-condition.d.ts +19 -0
- 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 +18 -16
- package/types/query-solution/src/designer/query-solution-config/converter/query-solution-config-property.converter.d.ts +4 -0
- 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/index.d.ts +15 -0
- package/types/section/src/designer/section-header.design.component.d.ts +4 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +19 -0
- package/types/section/src/designer/section-toolbar.design.component.d.ts +3 -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() {
|
|
@@ -210,21 +212,21 @@ class In {
|
|
|
210
212
|
this.displayText = e.dispalyText, this.value = e.value;
|
|
211
213
|
}
|
|
212
214
|
isEmpty() {
|
|
213
|
-
return !this.displayText;
|
|
215
|
+
return !this.displayText && !this.value;
|
|
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() {
|
|
@@ -249,18 +251,18 @@ class Vn {
|
|
|
249
251
|
throw new Error("Method not implemented.");
|
|
250
252
|
}
|
|
251
253
|
isEmpty() {
|
|
252
|
-
return !this.displayText;
|
|
254
|
+
return !this.displayText && !this.value;
|
|
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
|
+
})), O = 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: O.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], O = m[k];
|
|
596
603
|
if (k === "not")
|
|
597
|
-
return Number(v[
|
|
604
|
+
return Number(v[s].length) !== Number(O);
|
|
598
605
|
if (k === "moreThan")
|
|
599
|
-
return Number(v[
|
|
606
|
+
return Number(v[s].length) >= Number(O);
|
|
600
607
|
if (k === "lessThan")
|
|
601
|
-
return Number(v[
|
|
608
|
+
return Number(v[s].length) <= Number(O);
|
|
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, O = p[v];
|
|
626
|
+
return { target: m, operator: "getProperty", param: k, value: O };
|
|
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, O) => k && l(O, 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"), O = v || k, h = (O ? s[O ? 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,27 @@ 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, s;
|
|
822
830
|
const a = n.parentComponentInstance;
|
|
823
|
-
if (a) {
|
|
824
|
-
const
|
|
831
|
+
if (a && o) {
|
|
832
|
+
const p = (r = a.schema) == null ? void 0 : r.type, v = {
|
|
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
|
-
formColumns:
|
|
836
|
+
formColumns: p === "splitter-pane" ? 1 : 4,
|
|
829
837
|
parentContainerId: a.schema.id,
|
|
830
|
-
bindTo: "/"
|
|
838
|
+
bindTo: ((d = n.bindingSourceContext) == null ? void 0 : d.bindTo) || "/",
|
|
839
|
+
selectedFields: (s = n.bindingSourceContext) == null ? void 0 : s.bindingEntityFields
|
|
831
840
|
};
|
|
832
|
-
return new
|
|
841
|
+
return new Kn(t, o).createComponent(v);
|
|
833
842
|
} else
|
|
834
843
|
return e;
|
|
835
844
|
}
|
|
836
|
-
function
|
|
845
|
+
function to(t, e, n) {
|
|
837
846
|
return e;
|
|
838
847
|
}
|
|
839
|
-
const
|
|
848
|
+
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
849
|
id: {
|
|
841
850
|
description: "The unique identifier for a form group",
|
|
842
851
|
type: "string"
|
|
@@ -864,22 +873,23 @@ const Kn = "https://json-schema.org/draft/2020-12/schema", _n = "https://farris-
|
|
|
864
873
|
type: "array",
|
|
865
874
|
default: []
|
|
866
875
|
}
|
|
867
|
-
},
|
|
876
|
+
}, io = [
|
|
868
877
|
"id",
|
|
869
878
|
"type"
|
|
870
|
-
],
|
|
871
|
-
$schema:
|
|
872
|
-
$id:
|
|
873
|
-
title:
|
|
874
|
-
description:
|
|
875
|
-
type:
|
|
876
|
-
properties:
|
|
877
|
-
required:
|
|
878
|
-
},
|
|
879
|
-
customClass: { type: String, default: "" }
|
|
879
|
+
], uo = {
|
|
880
|
+
$schema: no,
|
|
881
|
+
$id: oo,
|
|
882
|
+
title: ao,
|
|
883
|
+
description: lo,
|
|
884
|
+
type: so,
|
|
885
|
+
properties: ro,
|
|
886
|
+
required: io
|
|
887
|
+
}, co = {
|
|
888
|
+
customClass: { type: String, default: "" },
|
|
889
|
+
customStyle: { type: String, defaut: "" }
|
|
880
890
|
};
|
|
881
|
-
ce(
|
|
882
|
-
const
|
|
891
|
+
ce(co, uo, be, eo);
|
|
892
|
+
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
893
|
id: {
|
|
884
894
|
description: "The unique identifier for a form group",
|
|
885
895
|
type: "string"
|
|
@@ -919,21 +929,27 @@ const ro = "https://json-schema.org/draft/2020-12/schema", io = "https://farris-
|
|
|
919
929
|
lableWidth: {
|
|
920
930
|
description: "",
|
|
921
931
|
type: "number"
|
|
932
|
+
},
|
|
933
|
+
binding: {
|
|
934
|
+
description: "",
|
|
935
|
+
type: "object",
|
|
936
|
+
default: {}
|
|
922
937
|
}
|
|
923
|
-
},
|
|
938
|
+
}, yo = [
|
|
924
939
|
"id",
|
|
925
940
|
"type"
|
|
926
941
|
], je = {
|
|
927
|
-
$schema:
|
|
928
|
-
$id:
|
|
929
|
-
title:
|
|
930
|
-
description:
|
|
931
|
-
type:
|
|
932
|
-
properties:
|
|
933
|
-
required:
|
|
942
|
+
$schema: po,
|
|
943
|
+
$id: mo,
|
|
944
|
+
title: fo,
|
|
945
|
+
description: vo,
|
|
946
|
+
type: ho,
|
|
947
|
+
properties: go,
|
|
948
|
+
required: yo
|
|
934
949
|
}, Le = {
|
|
935
950
|
id: { type: String, default: "" },
|
|
936
951
|
customClass: { type: String, default: "" },
|
|
952
|
+
customStyle: { type: String, default: "" },
|
|
937
953
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
938
954
|
editor: { type: Object, default: {} },
|
|
939
955
|
label: { type: String, default: "" },
|
|
@@ -951,37 +967,37 @@ ce(
|
|
|
951
967
|
be,
|
|
952
968
|
void 0
|
|
953
969
|
);
|
|
954
|
-
const
|
|
970
|
+
const bo = {
|
|
955
971
|
id: { type: String },
|
|
956
972
|
required: { type: Boolean, default: !1 },
|
|
957
973
|
text: { type: String, default: "" },
|
|
958
974
|
title: { type: String }
|
|
959
|
-
},
|
|
975
|
+
}, Co = /* @__PURE__ */ ee({
|
|
960
976
|
name: "FDynamicFormLabel",
|
|
961
|
-
props:
|
|
977
|
+
props: bo,
|
|
962
978
|
emits: [],
|
|
963
979
|
setup(t, e) {
|
|
964
|
-
const n =
|
|
980
|
+
const n = u(t.title || t.text), o = u(t.required), a = u(t.text);
|
|
965
981
|
return J(() => t.text, () => {
|
|
966
982
|
a.value = t.text;
|
|
967
|
-
}), J(() => t.required, (r,
|
|
968
|
-
r !==
|
|
969
|
-
}), () => a.value &&
|
|
983
|
+
}), J(() => t.required, (r, l) => {
|
|
984
|
+
r !== l && (o.value = r);
|
|
985
|
+
}), () => a.value && c("label", {
|
|
970
986
|
class: "col-form-label",
|
|
971
987
|
title: n.value
|
|
972
|
-
}, [o.value &&
|
|
988
|
+
}, [o.value && c("span", {
|
|
973
989
|
class: "farris-label-info text-danger"
|
|
974
|
-
}, [le("*")]),
|
|
990
|
+
}, [le("*")]), c("span", {
|
|
975
991
|
class: "farris-label-text"
|
|
976
992
|
}, [a.value])]);
|
|
977
993
|
}
|
|
978
|
-
}),
|
|
994
|
+
}), wo = /* @__PURE__ */ new Map([
|
|
979
995
|
["appearance", Oe]
|
|
980
996
|
]);
|
|
981
|
-
function
|
|
997
|
+
function xo(t, e, n) {
|
|
982
998
|
return e;
|
|
983
999
|
}
|
|
984
|
-
const
|
|
1000
|
+
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
1001
|
id: {
|
|
986
1002
|
description: "The unique identifier for a Input Group",
|
|
987
1003
|
type: "string"
|
|
@@ -1043,11 +1059,6 @@ const bo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
1043
1059
|
type: "boolean",
|
|
1044
1060
|
default: !1
|
|
1045
1061
|
},
|
|
1046
|
-
required: {
|
|
1047
|
-
description: "",
|
|
1048
|
-
type: "boolean",
|
|
1049
|
-
default: !1
|
|
1050
|
-
},
|
|
1051
1062
|
tabIndex: {
|
|
1052
1063
|
description: "",
|
|
1053
1064
|
type: "number",
|
|
@@ -1183,18 +1194,24 @@ const bo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
1183
1194
|
type: "string",
|
|
1184
1195
|
default: ""
|
|
1185
1196
|
}
|
|
1186
|
-
},
|
|
1197
|
+
}, Eo = [
|
|
1187
1198
|
"id",
|
|
1188
1199
|
"type"
|
|
1189
|
-
],
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1200
|
+
], Io = [
|
|
1201
|
+
"id",
|
|
1202
|
+
"appearance",
|
|
1203
|
+
"binding",
|
|
1204
|
+
"visible"
|
|
1205
|
+
], Vo = {
|
|
1206
|
+
$schema: To,
|
|
1207
|
+
$id: ko,
|
|
1208
|
+
title: Bo,
|
|
1209
|
+
description: Fo,
|
|
1210
|
+
type: So,
|
|
1211
|
+
properties: Mo,
|
|
1212
|
+
required: Eo,
|
|
1213
|
+
ignore: Io
|
|
1214
|
+
}, Ne = {
|
|
1198
1215
|
id: { Type: String, default: "" },
|
|
1199
1216
|
/** 是否自动完成 */
|
|
1200
1217
|
autocomplete: { Type: String, default: "off" },
|
|
@@ -1262,193 +1279,65 @@ const bo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
1262
1279
|
*/
|
|
1263
1280
|
updateOn: { type: String, default: "blur" }
|
|
1264
1281
|
};
|
|
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();
|
|
1282
|
+
ce(Ne, Vo, wo, xo);
|
|
1394
1283
|
function Ro(t, e) {
|
|
1395
|
-
const n =
|
|
1396
|
-
return { appendedButtonClass:
|
|
1284
|
+
const n = u(t.groupText), o = R(() => t.showButtonWhenDisabled && (t.readonly || t.disabled)), a = R(() => t.enableClear || !!t.groupText);
|
|
1285
|
+
return { appendedButtonClass: R(() => ({
|
|
1397
1286
|
"input-group-append": !0,
|
|
1398
1287
|
"append-force-show": o.value
|
|
1399
1288
|
})), appendedContent: n, shouldShowAppendedButton: a };
|
|
1400
1289
|
}
|
|
1401
1290
|
function Oo(t, e, n, o) {
|
|
1402
|
-
const { appendedContent: a } = o, r =
|
|
1291
|
+
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
1292
|
J(() => [t.readonly, t.disabled], ([v, k]) => {
|
|
1404
|
-
|
|
1293
|
+
l.value && (n.value = v || k ? "password" : n.value, a.value = v || k ? d : a.value);
|
|
1405
1294
|
});
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1295
|
+
function p() {
|
|
1296
|
+
return s.value = !s.value, n.value = s.value ? "text" : "password", a.value = s.value ? i : d, !1;
|
|
1408
1297
|
}
|
|
1409
1298
|
function m() {
|
|
1410
|
-
n.value =
|
|
1299
|
+
n.value = l.value ? "password" : "text", a.value = l.value ? r.value ? d : "" : a.value;
|
|
1411
1300
|
}
|
|
1412
|
-
return m(), { isPassword:
|
|
1301
|
+
return m(), { isPassword: l, onClickAppendedButton: p };
|
|
1413
1302
|
}
|
|
1414
1303
|
function jo(t, e, n) {
|
|
1415
|
-
const o =
|
|
1304
|
+
const o = u(), {
|
|
1416
1305
|
onBlurTextBox: a,
|
|
1417
1306
|
onFocusTextBox: r,
|
|
1418
|
-
onInput:
|
|
1419
|
-
onKeyDown:
|
|
1420
|
-
textBoxValue:
|
|
1421
|
-
} = n,
|
|
1307
|
+
onInput: l,
|
|
1308
|
+
onKeyDown: i,
|
|
1309
|
+
textBoxValue: d
|
|
1310
|
+
} = n, s = R(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), p = R(() => ({
|
|
1422
1311
|
"form-control": !0,
|
|
1423
1312
|
"f-utils-fill": !0
|
|
1424
|
-
})), m =
|
|
1313
|
+
})), m = R(() => ({
|
|
1425
1314
|
"text-align": t.textAlign
|
|
1426
1315
|
}));
|
|
1427
|
-
function v(
|
|
1428
|
-
|
|
1316
|
+
function v(H) {
|
|
1317
|
+
H.stopPropagation();
|
|
1429
1318
|
}
|
|
1430
1319
|
function k() {
|
|
1431
1320
|
t.selectOnCreated, t.focusOnCreated;
|
|
1432
1321
|
}
|
|
1433
|
-
async function
|
|
1434
|
-
r(
|
|
1322
|
+
async function O(H) {
|
|
1323
|
+
r(H), await ve, k();
|
|
1435
1324
|
}
|
|
1436
1325
|
return oe(async () => {
|
|
1437
1326
|
await ve, k();
|
|
1438
|
-
}), () =>
|
|
1327
|
+
}), () => c("input", {
|
|
1439
1328
|
ref: o,
|
|
1440
|
-
class:
|
|
1329
|
+
class: p.value,
|
|
1441
1330
|
style: m.value,
|
|
1442
1331
|
type: "text",
|
|
1443
|
-
value:
|
|
1332
|
+
value: d.value,
|
|
1444
1333
|
disabled: t.disabled,
|
|
1445
1334
|
readonly: t.readonly || !t.editable,
|
|
1446
|
-
placeholder:
|
|
1335
|
+
placeholder: s.value,
|
|
1447
1336
|
onBlur: a,
|
|
1448
1337
|
onChange: v,
|
|
1449
|
-
onFocus:
|
|
1450
|
-
onInput:
|
|
1451
|
-
onKeydown:
|
|
1338
|
+
onFocus: O,
|
|
1339
|
+
onInput: l,
|
|
1340
|
+
onKeydown: i
|
|
1452
1341
|
}, null);
|
|
1453
1342
|
}
|
|
1454
1343
|
function Lo(t, e, n) {
|
|
@@ -1456,224 +1345,224 @@ function Lo(t, e, n) {
|
|
|
1456
1345
|
canDownward: o,
|
|
1457
1346
|
canUpward: a,
|
|
1458
1347
|
onClickDownButton: r,
|
|
1459
|
-
onClickUpButton:
|
|
1460
|
-
} = n,
|
|
1348
|
+
onClickUpButton: l
|
|
1349
|
+
} = n, i = R(() => ({
|
|
1461
1350
|
"input-group-append": !0,
|
|
1462
1351
|
"btn-group": !0,
|
|
1463
1352
|
"btn-group-number": !0
|
|
1464
|
-
})),
|
|
1353
|
+
})), d = R(() => ({
|
|
1465
1354
|
btn: !0,
|
|
1466
1355
|
"btn-secondary": !0,
|
|
1467
1356
|
"btn-number-flag": !0
|
|
1468
|
-
})),
|
|
1357
|
+
})), s = R(() => ({
|
|
1469
1358
|
cursor: a() ? "pointer" : "not-allowed",
|
|
1470
1359
|
"margin-left": 0
|
|
1471
|
-
})),
|
|
1360
|
+
})), p = R(() => ({
|
|
1472
1361
|
cursor: o() ? "pointer" : "not-allowed",
|
|
1473
1362
|
"margin-left": 0
|
|
1474
1363
|
}));
|
|
1475
|
-
return () =>
|
|
1476
|
-
class:
|
|
1477
|
-
}, [
|
|
1364
|
+
return () => c("div", {
|
|
1365
|
+
class: i.value
|
|
1366
|
+
}, [c("button", {
|
|
1478
1367
|
title: "upButton",
|
|
1479
|
-
class:
|
|
1480
|
-
style:
|
|
1481
|
-
onClick:
|
|
1368
|
+
class: d.value,
|
|
1369
|
+
style: s.value,
|
|
1370
|
+
onClick: l,
|
|
1482
1371
|
disabled: !a()
|
|
1483
|
-
}, [
|
|
1372
|
+
}, [c("span", {
|
|
1484
1373
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
1485
|
-
}, null)]),
|
|
1374
|
+
}, null)]), c("button", {
|
|
1486
1375
|
title: "downButton",
|
|
1487
|
-
class:
|
|
1488
|
-
style:
|
|
1376
|
+
class: d.value,
|
|
1377
|
+
style: p.value,
|
|
1489
1378
|
onClick: r,
|
|
1490
1379
|
disabled: !o()
|
|
1491
|
-
}, [
|
|
1380
|
+
}, [c("span", {
|
|
1492
1381
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1493
1382
|
}, null)])]);
|
|
1494
1383
|
}
|
|
1495
|
-
function
|
|
1496
|
-
const n =
|
|
1497
|
-
displayValue:
|
|
1498
|
-
modelValue:
|
|
1499
|
-
getRealValue:
|
|
1500
|
-
} = n,
|
|
1384
|
+
function No(t, e) {
|
|
1385
|
+
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), {
|
|
1386
|
+
displayValue: i,
|
|
1387
|
+
modelValue: d,
|
|
1388
|
+
getRealValue: s
|
|
1389
|
+
} = n, p = jo(t, e, r), {
|
|
1501
1390
|
format: m
|
|
1502
1391
|
} = o, {
|
|
1503
1392
|
isFocus: v
|
|
1504
|
-
} = r, k =
|
|
1393
|
+
} = r, k = R(() => !t.disabled && !t.readonly);
|
|
1505
1394
|
return oe(() => {
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1508
|
-
}), J(() => [t.value], ([
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
}), J(() => [t.modelValue], ([
|
|
1512
|
-
|
|
1395
|
+
const O = s(t.modelValue);
|
|
1396
|
+
i.value = m(O);
|
|
1397
|
+
}), J(() => [t.value], ([O]) => {
|
|
1398
|
+
const H = s(O);
|
|
1399
|
+
d.value = H, i.value = m(H);
|
|
1400
|
+
}), J(() => [t.modelValue], ([O]) => {
|
|
1401
|
+
O !== d.value && (d.value = O, !v.value && (i.value = m(s(O))));
|
|
1513
1402
|
}), J(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
|
|
1514
|
-
|
|
1515
|
-
}), () =>
|
|
1403
|
+
i.value = m(d.value);
|
|
1404
|
+
}), () => c("div", {
|
|
1516
1405
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1517
|
-
}, [
|
|
1406
|
+
}, [p(), k.value && l()]);
|
|
1518
1407
|
}
|
|
1519
|
-
function
|
|
1520
|
-
const a =
|
|
1521
|
-
isPassword:
|
|
1522
|
-
} = n,
|
|
1408
|
+
function Po(t, e, n, o) {
|
|
1409
|
+
const a = u(), r = u(t.autocomplete), l = u(t.enableTitle), {
|
|
1410
|
+
isPassword: i
|
|
1411
|
+
} = n, d = u(t.minLength), s = u(t.maxLength), p = u(t.tabIndex), {
|
|
1523
1412
|
disabled: m,
|
|
1524
1413
|
displayText: v,
|
|
1525
1414
|
inputType: k,
|
|
1526
|
-
onBlur:
|
|
1527
|
-
onFocus:
|
|
1415
|
+
onBlur: O,
|
|
1416
|
+
onFocus: H,
|
|
1528
1417
|
onInput: $,
|
|
1529
1418
|
onClick: h,
|
|
1530
1419
|
onKeydown: b,
|
|
1531
|
-
onKeyup:
|
|
1532
|
-
onMousedown:
|
|
1533
|
-
onTextBoxValueChange:
|
|
1534
|
-
readonly:
|
|
1535
|
-
placeholder:
|
|
1536
|
-
textBoxClass:
|
|
1420
|
+
onKeyup: I,
|
|
1421
|
+
onMousedown: G,
|
|
1422
|
+
onTextBoxValueChange: U,
|
|
1423
|
+
readonly: X,
|
|
1424
|
+
placeholder: x,
|
|
1425
|
+
textBoxClass: D,
|
|
1537
1426
|
textBoxTitle: f
|
|
1538
1427
|
} = o;
|
|
1539
1428
|
return oe(() => {
|
|
1540
1429
|
t.selectOnCreated, t.focusOnCreated;
|
|
1541
|
-
}), () =>
|
|
1430
|
+
}), () => c("input", {
|
|
1542
1431
|
ref: a,
|
|
1543
1432
|
name: "input-group-value",
|
|
1544
1433
|
autocomplete: r.value,
|
|
1545
|
-
class:
|
|
1434
|
+
class: D.value,
|
|
1546
1435
|
disabled: m == null ? void 0 : m.value,
|
|
1547
|
-
maxlength:
|
|
1548
|
-
minlength:
|
|
1549
|
-
placeholder:
|
|
1550
|
-
readonly:
|
|
1551
|
-
tabindex:
|
|
1552
|
-
title:
|
|
1436
|
+
maxlength: s.value,
|
|
1437
|
+
minlength: d.value,
|
|
1438
|
+
placeholder: x.value,
|
|
1439
|
+
readonly: X == null ? void 0 : X.value,
|
|
1440
|
+
tabindex: p.value,
|
|
1441
|
+
title: l.value && !i.value ? f.value : "",
|
|
1553
1442
|
type: k.value,
|
|
1554
1443
|
value: v == null ? void 0 : v.value,
|
|
1555
|
-
onBlur:
|
|
1444
|
+
onBlur: O,
|
|
1556
1445
|
onClick: h,
|
|
1557
|
-
onChange:
|
|
1558
|
-
onFocus:
|
|
1446
|
+
onChange: U,
|
|
1447
|
+
onFocus: H,
|
|
1559
1448
|
onInput: $,
|
|
1560
1449
|
onKeydown: b,
|
|
1561
|
-
onKeyup:
|
|
1562
|
-
onMousedown:
|
|
1450
|
+
onKeyup: I,
|
|
1451
|
+
onMousedown: G
|
|
1563
1452
|
}, null);
|
|
1564
1453
|
}
|
|
1565
1454
|
function zo(t, e) {
|
|
1566
|
-
const n =
|
|
1455
|
+
const n = R(() => t.useExtendInfo && !!t.extendInfo), o = Z({
|
|
1567
1456
|
content: t.extendInfo
|
|
1568
1457
|
});
|
|
1569
1458
|
function a() {
|
|
1570
1459
|
e.emit("updateExtendInfo");
|
|
1571
1460
|
}
|
|
1572
|
-
return () => n.value && rt(
|
|
1461
|
+
return () => n.value && rt(c("span", {
|
|
1573
1462
|
class: "input-group-before-tips",
|
|
1574
1463
|
onMouseenter: a
|
|
1575
|
-
}, [
|
|
1464
|
+
}, [c("i", {
|
|
1576
1465
|
class: "f-icon f-icon-info-circle"
|
|
1577
|
-
}, null),
|
|
1466
|
+
}, null), c("b", {
|
|
1578
1467
|
class: "tips-arrow"
|
|
1579
1468
|
}, null)]), [[it("tooltip"), o]]);
|
|
1580
1469
|
}
|
|
1581
1470
|
function $o(t, e, n, o, a) {
|
|
1582
1471
|
const {
|
|
1583
1472
|
appendedButtonClass: r,
|
|
1584
|
-
appendedContent:
|
|
1585
|
-
} = n,
|
|
1586
|
-
clearButtonClass:
|
|
1473
|
+
appendedContent: l
|
|
1474
|
+
} = n, i = R(() => t.showButtonWhenDisabled && (!t.editable || !t.readonly) && !t.disabled), d = R(() => l.value && !e.slots.groupTextTemplate), s = R(() => !!e.slots.groupTextTemplate), {
|
|
1475
|
+
clearButtonClass: p,
|
|
1587
1476
|
clearButtonStyle: m,
|
|
1588
1477
|
onClearValue: v,
|
|
1589
1478
|
shouldShowClearButton: k
|
|
1590
1479
|
} = o;
|
|
1591
|
-
function
|
|
1592
|
-
return
|
|
1480
|
+
function O() {
|
|
1481
|
+
return c("span", {
|
|
1593
1482
|
id: "clearIcon",
|
|
1594
|
-
class:
|
|
1483
|
+
class: p.value,
|
|
1595
1484
|
style: m.value,
|
|
1596
|
-
onClick: (
|
|
1597
|
-
}, [
|
|
1485
|
+
onClick: (x) => v(x)
|
|
1486
|
+
}, [c("i", {
|
|
1598
1487
|
class: "f-icon modal_close"
|
|
1599
1488
|
}, null)]);
|
|
1600
1489
|
}
|
|
1601
|
-
function
|
|
1602
|
-
e.emit("iconMouseEnter",
|
|
1490
|
+
function H(x) {
|
|
1491
|
+
e.emit("iconMouseEnter", x);
|
|
1603
1492
|
}
|
|
1604
|
-
function $(
|
|
1605
|
-
e.emit("iconMouseLeave",
|
|
1493
|
+
function $(x) {
|
|
1494
|
+
e.emit("iconMouseLeave", x);
|
|
1606
1495
|
}
|
|
1607
|
-
function h(
|
|
1608
|
-
|
|
1609
|
-
originalEvent:
|
|
1610
|
-
}),
|
|
1496
|
+
function h(x) {
|
|
1497
|
+
i.value && e.emit("clickHandle", {
|
|
1498
|
+
originalEvent: x
|
|
1499
|
+
}), x.stopPropagation();
|
|
1611
1500
|
}
|
|
1612
1501
|
const b = t.type === "password" ? a.onClickAppendedButton : h;
|
|
1613
|
-
function
|
|
1614
|
-
return
|
|
1502
|
+
function I() {
|
|
1503
|
+
return c("span", {
|
|
1615
1504
|
class: "input-group-text",
|
|
1616
|
-
onMouseenter: (
|
|
1617
|
-
onMouseleave: (
|
|
1618
|
-
innerHTML:
|
|
1619
|
-
onClick: (
|
|
1505
|
+
onMouseenter: (x) => H(x),
|
|
1506
|
+
onMouseleave: (x) => $(x),
|
|
1507
|
+
innerHTML: l.value,
|
|
1508
|
+
onClick: (x) => b(x)
|
|
1620
1509
|
}, null);
|
|
1621
1510
|
}
|
|
1622
|
-
function
|
|
1511
|
+
function G() {
|
|
1623
1512
|
return e.slots.groupTextTemplate && e.slots.groupTextTemplate();
|
|
1624
1513
|
}
|
|
1625
|
-
function
|
|
1626
|
-
return
|
|
1514
|
+
function U() {
|
|
1515
|
+
return d.value ? I : s.value ? G : "";
|
|
1627
1516
|
}
|
|
1628
|
-
const
|
|
1629
|
-
return () =>
|
|
1517
|
+
const X = U();
|
|
1518
|
+
return () => c("div", {
|
|
1630
1519
|
class: r.value
|
|
1631
|
-
}, [k.value &&
|
|
1520
|
+
}, [k.value && O(), X && X()]);
|
|
1632
1521
|
}
|
|
1633
|
-
const
|
|
1522
|
+
const Ho = /* @__PURE__ */ ee({
|
|
1634
1523
|
name: "FInputGroup",
|
|
1635
|
-
props:
|
|
1524
|
+
props: Ne,
|
|
1636
1525
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
1637
1526
|
setup(t, e) {
|
|
1638
|
-
const n =
|
|
1527
|
+
const n = u(t.modelValue), o = u(t.modelValue), a = gt(t, e, n, o), {
|
|
1639
1528
|
inputGroupClass: r,
|
|
1640
|
-
inputType:
|
|
1641
|
-
inputGroupStyle:
|
|
1642
|
-
} = a,
|
|
1643
|
-
shouldShowAppendedButton:
|
|
1644
|
-
} =
|
|
1529
|
+
inputType: l,
|
|
1530
|
+
inputGroupStyle: i
|
|
1531
|
+
} = a, d = Ro(t), {
|
|
1532
|
+
shouldShowAppendedButton: s
|
|
1533
|
+
} = d, p = yt(t, e, a), {
|
|
1645
1534
|
onMouseEnter: m,
|
|
1646
1535
|
onMouseLeave: v
|
|
1647
|
-
} =
|
|
1648
|
-
J(() => [t.value], ([
|
|
1649
|
-
n.value =
|
|
1650
|
-
}), J(() => [t.modelValue], ([
|
|
1651
|
-
n.value =
|
|
1536
|
+
} = p, k = Oo(t, e, l, d), O = No(t, e), H = Po(t, e, k, a), $ = $o(t, e, d, p, k), h = zo(t, e), b = R(() => t.type === "number");
|
|
1537
|
+
J(() => [t.value], ([G]) => {
|
|
1538
|
+
n.value = G, o.value = G;
|
|
1539
|
+
}), J(() => [t.modelValue], ([G]) => {
|
|
1540
|
+
n.value = G, o.value = G;
|
|
1652
1541
|
}), oe(() => {
|
|
1653
1542
|
t.value && (n.value = t.value, o.value = t.value);
|
|
1654
1543
|
});
|
|
1655
|
-
const
|
|
1544
|
+
const I = () => c(se, null, [c("div", {
|
|
1656
1545
|
id: t.id,
|
|
1657
1546
|
class: r.value,
|
|
1658
|
-
style:
|
|
1547
|
+
style: i.value,
|
|
1659
1548
|
onMouseenter: m,
|
|
1660
1549
|
onMouseleave: v
|
|
1661
|
-
}, [b.value ?
|
|
1662
|
-
return () =>
|
|
1550
|
+
}, [b.value ? O() : c(se, null, [h(), H(), s.value && $()])])]);
|
|
1551
|
+
return () => I();
|
|
1663
1552
|
}
|
|
1664
|
-
}),
|
|
1553
|
+
}), F = {}, S = {}, M = {}, E = {};
|
|
1665
1554
|
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
1555
|
function Do() {
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1556
|
+
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));
|
|
1557
|
+
}
|
|
1558
|
+
function Ao() {
|
|
1559
|
+
Do();
|
|
1560
|
+
function t(a) {
|
|
1561
|
+
return F[a] || Ho;
|
|
1674
1562
|
}
|
|
1675
|
-
function e(a) {
|
|
1676
|
-
|
|
1563
|
+
function e(a, r) {
|
|
1564
|
+
const l = S[a];
|
|
1565
|
+
return l ? l(r) : {};
|
|
1677
1566
|
}
|
|
1678
1567
|
function n(a) {
|
|
1679
1568
|
switch (a) {
|
|
@@ -1722,9 +1611,12 @@ function Do() {
|
|
|
1722
1611
|
return "onSavedCommandListChanged";
|
|
1723
1612
|
case "grid-field-editor":
|
|
1724
1613
|
return "onChange";
|
|
1614
|
+
case "item-collection-editor":
|
|
1615
|
+
return "onChange";
|
|
1725
1616
|
case "response-form-layout-setting":
|
|
1726
1617
|
return "onChange";
|
|
1727
1618
|
case "field-selector":
|
|
1619
|
+
case "binding-selector":
|
|
1728
1620
|
return "onFieldSelected";
|
|
1729
1621
|
case "schema-selector":
|
|
1730
1622
|
return "onSchemaSelected";
|
|
@@ -1732,6 +1624,8 @@ function Do() {
|
|
|
1732
1624
|
return "onMappingFieldsChanged";
|
|
1733
1625
|
case "textarea":
|
|
1734
1626
|
return "onValueChange";
|
|
1627
|
+
case "query-solution-config":
|
|
1628
|
+
return "onFieldsChanged";
|
|
1735
1629
|
}
|
|
1736
1630
|
}
|
|
1737
1631
|
function o(a) {
|
|
@@ -1742,60 +1636,61 @@ function Do() {
|
|
|
1742
1636
|
return "onClear";
|
|
1743
1637
|
}
|
|
1744
1638
|
}
|
|
1745
|
-
return { resolveEditorProps:
|
|
1639
|
+
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: n, getClearFunctionName: o };
|
|
1746
1640
|
}
|
|
1747
1641
|
const Go = /* @__PURE__ */ ee({
|
|
1748
1642
|
name: "FDynamicFormGroup",
|
|
1749
1643
|
props: Le,
|
|
1750
1644
|
emits: ["change", "update:modelValue"],
|
|
1751
1645
|
setup(t, e) {
|
|
1752
|
-
const n =
|
|
1753
|
-
|
|
1754
|
-
const m =
|
|
1646
|
+
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);
|
|
1647
|
+
u(t.type);
|
|
1648
|
+
const m = u(), {
|
|
1755
1649
|
resolveEditorProps: v,
|
|
1756
1650
|
resolveEditorType: k,
|
|
1757
|
-
getChangeFunctionName:
|
|
1758
|
-
getClearFunctionName:
|
|
1759
|
-
} =
|
|
1651
|
+
getChangeFunctionName: O,
|
|
1652
|
+
getClearFunctionName: H
|
|
1653
|
+
} = Ao(), $ = R(() => ({
|
|
1760
1654
|
"form-group": !0,
|
|
1761
1655
|
"farris-form-group": !0,
|
|
1762
1656
|
"common-group": !0,
|
|
1763
|
-
"q-state-readonly":
|
|
1657
|
+
"q-state-readonly": i.value
|
|
1764
1658
|
}));
|
|
1765
|
-
function h(
|
|
1766
|
-
|
|
1659
|
+
function h(G, U) {
|
|
1660
|
+
l.value = U !== void 0 ? U : G, e.emit("update:modelValue", l.value), e.emit("change", l.value);
|
|
1767
1661
|
}
|
|
1768
1662
|
function b() {
|
|
1769
1663
|
e.emit("update:modelValue", "");
|
|
1770
1664
|
}
|
|
1771
|
-
const
|
|
1772
|
-
const
|
|
1773
|
-
return
|
|
1665
|
+
const I = R(() => {
|
|
1666
|
+
const G = a.value.type || "input-group", U = k(G), X = v(G, a.value), x = O(G), D = H(a.value.type);
|
|
1667
|
+
return D && (X[D] = b), X[x] = h, (X.id == null || X.id === "") && (X.id = n.value), () => c(U, ye({
|
|
1774
1668
|
ref: m
|
|
1775
|
-
},
|
|
1776
|
-
modelValue:
|
|
1777
|
-
"onUpdate:modelValue": (f) =>
|
|
1778
|
-
}),
|
|
1669
|
+
}, X, {
|
|
1670
|
+
modelValue: l.value,
|
|
1671
|
+
"onUpdate:modelValue": (f) => l.value = f
|
|
1672
|
+
}), e.slots);
|
|
1779
1673
|
});
|
|
1780
|
-
return J([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible], ([
|
|
1781
|
-
n.value =
|
|
1674
|
+
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, j]) => {
|
|
1675
|
+
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 = j;
|
|
1782
1676
|
}), e.expose({
|
|
1783
1677
|
editorRef: m
|
|
1784
|
-
}), () =>
|
|
1678
|
+
}), () => p.value && c("div", {
|
|
1785
1679
|
id: `${n.value}-input-group`,
|
|
1786
|
-
class: o.value
|
|
1787
|
-
|
|
1680
|
+
class: o.value,
|
|
1681
|
+
style: t.customStyle
|
|
1682
|
+
}, [c("div", {
|
|
1788
1683
|
class: "farris-group-wrap"
|
|
1789
|
-
}, [
|
|
1684
|
+
}, [c("div", {
|
|
1790
1685
|
class: $.value
|
|
1791
|
-
}, [
|
|
1686
|
+
}, [s.value && c(Co, {
|
|
1792
1687
|
id: `${n.value}-lable`,
|
|
1793
|
-
required:
|
|
1688
|
+
required: d.value,
|
|
1794
1689
|
text: r.value,
|
|
1795
1690
|
title: r.value
|
|
1796
|
-
}, null),
|
|
1691
|
+
}, null), c("div", {
|
|
1797
1692
|
class: "farris-input-wrap"
|
|
1798
|
-
}, [
|
|
1693
|
+
}, [I.value()])])])]);
|
|
1799
1694
|
}
|
|
1800
1695
|
}), te = class te {
|
|
1801
1696
|
/**
|
|
@@ -1810,7 +1705,7 @@ const Go = /* @__PURE__ */ ee({
|
|
|
1810
1705
|
*/
|
|
1811
1706
|
static getAllInputTypes() {
|
|
1812
1707
|
const e = [];
|
|
1813
|
-
for (
|
|
1708
|
+
for (const n in te.fieldControlTypeMapping)
|
|
1814
1709
|
te.fieldControlTypeMapping[n].forEach((o) => {
|
|
1815
1710
|
e.find((a) => a.key === o.key && a.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
1816
1711
|
});
|
|
@@ -1820,55 +1715,55 @@ const Go = /* @__PURE__ */ ee({
|
|
|
1820
1715
|
/**
|
|
1821
1716
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1822
1717
|
*/
|
|
1823
|
-
|
|
1718
|
+
B(te, "fieldControlTypeMapping", {
|
|
1824
1719
|
String: [
|
|
1825
|
-
{ key:
|
|
1826
|
-
{ key:
|
|
1827
|
-
{ key:
|
|
1828
|
-
{ key:
|
|
1829
|
-
{ key:
|
|
1830
|
-
{ key:
|
|
1831
|
-
{ key:
|
|
1832
|
-
{ key:
|
|
1720
|
+
{ key: z["input-group"].type, value: z["input-group"].name },
|
|
1721
|
+
{ key: z.lookup.type, value: z.lookup.name },
|
|
1722
|
+
{ key: z["date-picker"].type, value: z["date-picker"].name },
|
|
1723
|
+
{ key: z["check-box"].type, value: z["check-box"].name },
|
|
1724
|
+
{ key: z["check-group"].type, value: z["check-group"].name },
|
|
1725
|
+
{ key: z["radio-group"].type, value: z["radio-group"].name },
|
|
1726
|
+
{ key: z["combo-list"].type, value: z["combo-list"].name },
|
|
1727
|
+
{ key: z.textarea.type, value: z.textarea.name }
|
|
1833
1728
|
],
|
|
1834
1729
|
Text: [
|
|
1835
|
-
{ key:
|
|
1836
|
-
{ key:
|
|
1730
|
+
{ key: z.textarea.type, value: z.textarea.name },
|
|
1731
|
+
{ key: z.lookup.type, value: z.lookup.name }
|
|
1837
1732
|
],
|
|
1838
1733
|
Decimal: [
|
|
1839
|
-
{ key:
|
|
1734
|
+
{ key: z["number-spinner"].type, value: z["number-spinner"].name }
|
|
1840
1735
|
],
|
|
1841
1736
|
Integer: [
|
|
1842
|
-
{ key:
|
|
1737
|
+
{ key: z["number-spinner"].type, value: z["number-spinner"].name }
|
|
1843
1738
|
],
|
|
1844
1739
|
Number: [
|
|
1845
|
-
{ key:
|
|
1740
|
+
{ key: z["number-spinner"].type, value: z["number-spinner"].name }
|
|
1846
1741
|
],
|
|
1847
1742
|
BigNumber: [
|
|
1848
|
-
{ key:
|
|
1743
|
+
{ key: z["number-spinner"].type, value: z["number-spinner"].name }
|
|
1849
1744
|
],
|
|
1850
1745
|
Date: [
|
|
1851
|
-
{ key:
|
|
1746
|
+
{ key: z["date-picker"].type, value: z["date-picker"].name }
|
|
1852
1747
|
],
|
|
1853
1748
|
DateTime: [
|
|
1854
|
-
{ key:
|
|
1749
|
+
{ key: z["date-picker"].type, value: z["date-picker"].name }
|
|
1855
1750
|
],
|
|
1856
1751
|
Boolean: [
|
|
1857
|
-
{ key:
|
|
1858
|
-
{ key:
|
|
1752
|
+
{ key: z.switch.type, value: z.switch.name },
|
|
1753
|
+
{ key: z["check-box"].type, value: z["check-box"].name }
|
|
1859
1754
|
],
|
|
1860
1755
|
Enum: [
|
|
1861
|
-
{ key:
|
|
1862
|
-
{ key:
|
|
1756
|
+
{ key: z["combo-list"].type, value: z["combo-list"].name },
|
|
1757
|
+
{ key: z["radio-group"].type, value: z["radio-group"].name }
|
|
1863
1758
|
],
|
|
1864
1759
|
Object: [
|
|
1865
|
-
{ key:
|
|
1866
|
-
{ key:
|
|
1867
|
-
{ key:
|
|
1760
|
+
{ key: z.lookup.type, value: z.lookup.name },
|
|
1761
|
+
{ key: z["combo-list"].type, value: z["combo-list"].name },
|
|
1762
|
+
{ key: z["radio-group"].type, value: z["radio-group"].name }
|
|
1868
1763
|
]
|
|
1869
1764
|
});
|
|
1870
1765
|
let Fe = te;
|
|
1871
|
-
|
|
1766
|
+
u(0);
|
|
1872
1767
|
const qo = {
|
|
1873
1768
|
id: { type: String, default: "" },
|
|
1874
1769
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
@@ -1890,7 +1785,7 @@ ce(
|
|
|
1890
1785
|
be,
|
|
1891
1786
|
void 0
|
|
1892
1787
|
);
|
|
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",
|
|
1788
|
+
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
1789
|
id: {
|
|
1895
1790
|
description: "The unique identifier for a Input Group",
|
|
1896
1791
|
type: "string"
|
|
@@ -1913,15 +1808,15 @@ const Uo = "https://json-schema.org/draft/2020-12/schema", Wo = "https://farris-
|
|
|
1913
1808
|
}, Zo = [
|
|
1914
1809
|
"id",
|
|
1915
1810
|
"type"
|
|
1916
|
-
],
|
|
1811
|
+
], _o = {
|
|
1917
1812
|
$schema: Uo,
|
|
1918
1813
|
$id: Wo,
|
|
1919
1814
|
title: Xo,
|
|
1920
1815
|
description: Yo,
|
|
1921
|
-
type:
|
|
1922
|
-
properties:
|
|
1816
|
+
type: Qo,
|
|
1817
|
+
properties: Jo,
|
|
1923
1818
|
required: Zo
|
|
1924
|
-
},
|
|
1819
|
+
}, Ko = {
|
|
1925
1820
|
initialState: {
|
|
1926
1821
|
type: Object,
|
|
1927
1822
|
default: {
|
|
@@ -1932,7 +1827,7 @@ const Uo = "https://json-schema.org/draft/2020-12/schema", Wo = "https://farris-
|
|
|
1932
1827
|
}
|
|
1933
1828
|
}
|
|
1934
1829
|
};
|
|
1935
|
-
|
|
1830
|
+
En(Ko, _o, Zn, to);
|
|
1936
1831
|
const ea = {
|
|
1937
1832
|
width: { Type: Number, default: 400 },
|
|
1938
1833
|
type: { Type: String, default: "info" },
|
|
@@ -1962,7 +1857,8 @@ async function na(t) {
|
|
|
1962
1857
|
} finally {
|
|
1963
1858
|
n == null || n.removeAllRanges(), window.document.body.removeChild(e);
|
|
1964
1859
|
}
|
|
1965
|
-
if (!a)
|
|
1860
|
+
if (!a)
|
|
1861
|
+
throw Ce();
|
|
1966
1862
|
}
|
|
1967
1863
|
async function oa(t) {
|
|
1968
1864
|
try {
|
|
@@ -1982,41 +1878,41 @@ function aa() {
|
|
|
1982
1878
|
return { onCopy: t };
|
|
1983
1879
|
}
|
|
1984
1880
|
function la(t, e, n, o) {
|
|
1985
|
-
const a =
|
|
1881
|
+
const a = u(14), r = u(140), l = u(""), i = u(o.value.length), d = R(() => o.value), s = R(() => ({
|
|
1986
1882
|
"font-size": `${a.value}px`,
|
|
1987
1883
|
height: "100%"
|
|
1988
1884
|
}));
|
|
1989
|
-
function
|
|
1885
|
+
function p(m) {
|
|
1990
1886
|
if (m.currentTarget) {
|
|
1991
1887
|
const v = m.currentTarget.value || "";
|
|
1992
|
-
|
|
1888
|
+
i.value = v.length;
|
|
1993
1889
|
}
|
|
1994
1890
|
}
|
|
1995
|
-
return () =>
|
|
1891
|
+
return () => c(se, null, [c("textarea", {
|
|
1996
1892
|
title: "promptMessage",
|
|
1997
1893
|
name: "promptMessage",
|
|
1998
1894
|
class: "form-control",
|
|
1999
|
-
style:
|
|
1895
|
+
style: s.value,
|
|
2000
1896
|
rows: "4",
|
|
2001
1897
|
maxlength: r.value,
|
|
2002
|
-
onInput: (m) =>
|
|
2003
|
-
}, [
|
|
1898
|
+
onInput: (m) => p(m)
|
|
1899
|
+
}, [d.value]), c("span", {
|
|
2004
1900
|
class: "textarea-wordcount",
|
|
2005
|
-
title:
|
|
1901
|
+
title: l.value,
|
|
2006
1902
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
2007
|
-
}, [
|
|
1903
|
+
}, [i.value + " / " + r.value])]);
|
|
2008
1904
|
}
|
|
2009
1905
|
function sa(t, e, n, o) {
|
|
2010
1906
|
const a = la(t, e, n, o), r = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
2011
|
-
function
|
|
2012
|
-
return r.get(
|
|
1907
|
+
function l(i) {
|
|
1908
|
+
return r.get(i) || null;
|
|
2013
1909
|
}
|
|
2014
|
-
return { getEditorRender:
|
|
1910
|
+
return { getEditorRender: l };
|
|
2015
1911
|
}
|
|
2016
1912
|
function ra() {
|
|
2017
|
-
const t =
|
|
1913
|
+
const t = u(!1), e = u("复制成功");
|
|
2018
1914
|
return {
|
|
2019
|
-
feedbackStyle:
|
|
1915
|
+
feedbackStyle: R(() => {
|
|
2020
1916
|
const o = {
|
|
2021
1917
|
position: "absolute",
|
|
2022
1918
|
left: "50%",
|
|
@@ -2044,7 +1940,7 @@ function ia(t, e) {
|
|
|
2044
1940
|
return () => n && n();
|
|
2045
1941
|
}
|
|
2046
1942
|
function ua(t) {
|
|
2047
|
-
const e =
|
|
1943
|
+
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
1944
|
const $ = `${n.value}px`;
|
|
2049
1945
|
return {
|
|
2050
1946
|
overflow: "hidden",
|
|
@@ -2054,66 +1950,66 @@ function ua(t) {
|
|
|
2054
1950
|
"-webkit-line-clamp": e.value,
|
|
2055
1951
|
"max-height": $
|
|
2056
1952
|
};
|
|
2057
|
-
}),
|
|
1953
|
+
}), i = R(() => t.value && t.value.detail || ""), d = R(() => !0), s = u(!1), p = u("展开"), m = u("收起"), v = R(() => {
|
|
2058
1954
|
const $ = {
|
|
2059
1955
|
display: "block",
|
|
2060
1956
|
color: "#2A87FF"
|
|
2061
1957
|
};
|
|
2062
|
-
return $["text-align"] =
|
|
1958
|
+
return $["text-align"] = s.value ? "" : "right", $;
|
|
2063
1959
|
});
|
|
2064
1960
|
function k($, h) {
|
|
2065
|
-
|
|
1961
|
+
s.value = !s.value, e.value = s.value ? 20 : 3;
|
|
2066
1962
|
}
|
|
2067
|
-
function
|
|
1963
|
+
function O($) {
|
|
2068
1964
|
return k();
|
|
2069
1965
|
}
|
|
2070
|
-
function
|
|
1966
|
+
function H($) {
|
|
2071
1967
|
return k();
|
|
2072
1968
|
}
|
|
2073
|
-
return () =>
|
|
1969
|
+
return () => c("div", {
|
|
2074
1970
|
class: "toast-msg-detail"
|
|
2075
|
-
}, [o.value &&
|
|
1971
|
+
}, [o.value && c("div", null, [a.value]), r.value && c("div", {
|
|
2076
1972
|
id: "exception_error_msg",
|
|
2077
1973
|
ref: "exceptionMessageRef",
|
|
2078
|
-
style:
|
|
2079
|
-
}, [le("详细信息 : "),
|
|
2080
|
-
innerHTML:
|
|
2081
|
-
}, null)]),
|
|
1974
|
+
style: l.value
|
|
1975
|
+
}, [le("详细信息 : "), c("span", {
|
|
1976
|
+
innerHTML: i.value
|
|
1977
|
+
}, null)]), d.value && c("span", {
|
|
2082
1978
|
style: v.value
|
|
2083
|
-
}, [
|
|
2084
|
-
onClick:
|
|
1979
|
+
}, [s.value && c("span", {
|
|
1980
|
+
onClick: O,
|
|
2085
1981
|
style: "cursor: pointer;"
|
|
2086
|
-
}, [m.value]), !
|
|
2087
|
-
onClick:
|
|
1982
|
+
}, [m.value]), !s.value && c("span", {
|
|
1983
|
+
onClick: H,
|
|
2088
1984
|
style: "cursor: pointer;"
|
|
2089
|
-
}, [
|
|
1985
|
+
}, [p.value])])]);
|
|
2090
1986
|
}
|
|
2091
1987
|
function ca(t) {
|
|
2092
|
-
return () =>
|
|
1988
|
+
return () => c("p", {
|
|
2093
1989
|
class: "toast-msg-detail",
|
|
2094
1990
|
innerHTML: t.value
|
|
2095
1991
|
}, null);
|
|
2096
1992
|
}
|
|
2097
1993
|
function da(t, e, n, o) {
|
|
2098
|
-
const a =
|
|
1994
|
+
const a = u(t.exceptionInfo), r = R(() => {
|
|
2099
1995
|
const v = {
|
|
2100
1996
|
"f-icon": !0
|
|
2101
1997
|
}, k = `f-icon-${e.value}`;
|
|
2102
1998
|
return v[k] = !0, v;
|
|
2103
|
-
}),
|
|
2104
|
-
function
|
|
2105
|
-
return
|
|
1999
|
+
}), l = R(() => n.value || a.value && a.value.message), i = R(() => o.value), d = R(() => !!o.value), s = R(() => !!a.value);
|
|
2000
|
+
function p() {
|
|
2001
|
+
return s.value ? ua(a) : d.value ? ca(i) : () => null;
|
|
2106
2002
|
}
|
|
2107
|
-
const m =
|
|
2108
|
-
return () =>
|
|
2003
|
+
const m = p();
|
|
2004
|
+
return () => c(se, null, [c("div", {
|
|
2109
2005
|
class: "float-left modal-tips-iconwrap"
|
|
2110
|
-
}, [
|
|
2006
|
+
}, [c("span", {
|
|
2111
2007
|
class: r.value
|
|
2112
|
-
}, null)]),
|
|
2008
|
+
}, null)]), c("div", {
|
|
2113
2009
|
class: "modal-tips-content"
|
|
2114
|
-
}, [
|
|
2010
|
+
}, [c("p", {
|
|
2115
2011
|
class: "toast-msg-title",
|
|
2116
|
-
innerHTML:
|
|
2012
|
+
innerHTML: l.value
|
|
2117
2013
|
}, null), m()])]);
|
|
2118
2014
|
}
|
|
2119
2015
|
function pa(t, e, n) {
|
|
@@ -2121,13 +2017,13 @@ function pa(t, e, n) {
|
|
|
2121
2017
|
onCopy: o
|
|
2122
2018
|
} = e, {
|
|
2123
2019
|
toShowFeedback: a
|
|
2124
|
-
} = n, r =
|
|
2020
|
+
} = n, r = u("复制成功"), l = u("复制详细信息"), i = u(t.exceptionInfo || {
|
|
2125
2021
|
date: "",
|
|
2126
2022
|
message: "",
|
|
2127
2023
|
detail: ""
|
|
2128
|
-
}),
|
|
2129
|
-
function
|
|
2130
|
-
o(
|
|
2024
|
+
}), d = R(() => i.value && i.value.detail || "");
|
|
2025
|
+
function s(p) {
|
|
2026
|
+
o(d.value).catch((m) => {
|
|
2131
2027
|
r.value = "复制失败";
|
|
2132
2028
|
}).finally(() => {
|
|
2133
2029
|
a.value = !0, setTimeout(() => {
|
|
@@ -2135,78 +2031,78 @@ function pa(t, e, n) {
|
|
|
2135
2031
|
}, 700);
|
|
2136
2032
|
});
|
|
2137
2033
|
}
|
|
2138
|
-
return () =>
|
|
2034
|
+
return () => c("span", {
|
|
2139
2035
|
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
2140
|
-
}, [
|
|
2141
|
-
onClick:
|
|
2036
|
+
}, [c("span", {
|
|
2037
|
+
onClick: s,
|
|
2142
2038
|
style: "cursor: pointer;"
|
|
2143
|
-
}, [
|
|
2039
|
+
}, [l.value])]);
|
|
2144
2040
|
}
|
|
2145
2041
|
function ma(t, e, n, o) {
|
|
2146
|
-
const a =
|
|
2147
|
-
function h(
|
|
2042
|
+
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)), O = R(() => p.value && i.value), H = R(() => s.value && d.value), $ = pa(t, n, o);
|
|
2043
|
+
function h(I) {
|
|
2148
2044
|
a.value === "question" && e.emit("reject"), e.emit("close");
|
|
2149
2045
|
}
|
|
2150
|
-
function b(
|
|
2046
|
+
function b(I) {
|
|
2151
2047
|
a.value === "question" && e.emit("accept"), e.emit("close");
|
|
2152
2048
|
}
|
|
2153
|
-
return () =>
|
|
2049
|
+
return () => c("div", {
|
|
2154
2050
|
class: "modal-footer"
|
|
2155
|
-
}, [v.value && $(), k.value &&
|
|
2051
|
+
}, [v.value && $(), k.value && H.value && c("button", {
|
|
2156
2052
|
type: "button",
|
|
2157
2053
|
class: "btn btn-secondary btn-lg",
|
|
2158
2054
|
onClick: h
|
|
2159
|
-
}, [
|
|
2055
|
+
}, [d.value]), k.value && O.value && c("button", {
|
|
2160
2056
|
type: "button",
|
|
2161
2057
|
class: "btn btn-primary btn-lg",
|
|
2162
2058
|
onClick: b
|
|
2163
|
-
}, [
|
|
2059
|
+
}, [i.value]), m.value && r.value.length && r.value.map((I) => c("button", {
|
|
2164
2060
|
type: "button",
|
|
2165
|
-
onClick:
|
|
2166
|
-
class:
|
|
2167
|
-
}, [
|
|
2168
|
-
class:
|
|
2169
|
-
}, null),
|
|
2061
|
+
onClick: I.handle,
|
|
2062
|
+
class: I.class
|
|
2063
|
+
}, [I.iconClass && c("span", {
|
|
2064
|
+
class: I.iconClass
|
|
2065
|
+
}, null), I.text]))]);
|
|
2170
2066
|
}
|
|
2171
2067
|
const ue = /* @__PURE__ */ ee({
|
|
2172
2068
|
name: "FMessageBox",
|
|
2173
2069
|
props: ea,
|
|
2174
2070
|
emits: ["accept", "reject", "close"],
|
|
2175
2071
|
setup(t, e) {
|
|
2176
|
-
const n =
|
|
2072
|
+
const n = u(t.type), o = u(t.title), a = u(t.detail), r = R(() => {
|
|
2177
2073
|
const $ = {
|
|
2178
2074
|
"modal-tips": !0,
|
|
2179
2075
|
"d-flex": !0,
|
|
2180
2076
|
"flex-row": !0
|
|
2181
2077
|
}, h = `messager-type-${n.value}`;
|
|
2182
2078
|
return $[h] = !0, $;
|
|
2183
|
-
}),
|
|
2079
|
+
}), l = R(() => {
|
|
2184
2080
|
const $ = {};
|
|
2185
2081
|
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:
|
|
2082
|
+
}), i = aa(), d = sa(t, n, o, a), s = ra(), {
|
|
2083
|
+
feedbackStyle: p,
|
|
2188
2084
|
feedbackMessage: m
|
|
2189
|
-
} =
|
|
2085
|
+
} = s;
|
|
2190
2086
|
function v() {
|
|
2191
|
-
return
|
|
2192
|
-
style:
|
|
2087
|
+
return c("div", {
|
|
2088
|
+
style: p.value
|
|
2193
2089
|
}, [m.value]);
|
|
2194
2090
|
}
|
|
2195
2091
|
function k() {
|
|
2196
2092
|
switch (n.value) {
|
|
2197
2093
|
case "prompt":
|
|
2198
|
-
return ia(t,
|
|
2094
|
+
return ia(t, d);
|
|
2199
2095
|
default:
|
|
2200
2096
|
return da(t, n, o, a);
|
|
2201
2097
|
}
|
|
2202
2098
|
}
|
|
2203
|
-
const
|
|
2204
|
-
return () =>
|
|
2099
|
+
const O = k(), H = ma(t, e, i, s);
|
|
2100
|
+
return () => c("div", {
|
|
2205
2101
|
class: "farris-messager"
|
|
2206
|
-
}, [
|
|
2102
|
+
}, [c("section", {
|
|
2207
2103
|
class: r.value,
|
|
2208
|
-
style:
|
|
2209
|
-
}, [
|
|
2104
|
+
style: l.value
|
|
2105
|
+
}, [O()]), H(), v()]);
|
|
2210
2106
|
}
|
|
2211
2107
|
}), fa = {
|
|
2212
2108
|
/**
|
|
@@ -2333,12 +2229,12 @@ class Q {
|
|
|
2333
2229
|
return this.x = e.x, this.y = e.y, this;
|
|
2334
2230
|
}
|
|
2335
2231
|
}
|
|
2336
|
-
class
|
|
2232
|
+
class K {
|
|
2337
2233
|
constructor(e, n) {
|
|
2338
2234
|
this.width = e, this.height = n;
|
|
2339
2235
|
}
|
|
2340
2236
|
static getCurrent(e) {
|
|
2341
|
-
const n = new
|
|
2237
|
+
const n = new K(0, 0);
|
|
2342
2238
|
if (window) {
|
|
2343
2239
|
const o = window.getComputedStyle(e);
|
|
2344
2240
|
return o && (n.width = parseInt(o.getPropertyValue("width"), 10), n.height = parseInt(o.getPropertyValue("height"), 10)), n;
|
|
@@ -2346,278 +2242,278 @@ class _ {
|
|
|
2346
2242
|
return null;
|
|
2347
2243
|
}
|
|
2348
2244
|
static copy(e) {
|
|
2349
|
-
return new
|
|
2245
|
+
return new K(0, 0).set(e);
|
|
2350
2246
|
}
|
|
2351
2247
|
set(e) {
|
|
2352
2248
|
return this.width = e.width, this.height = e.height, this;
|
|
2353
2249
|
}
|
|
2354
2250
|
}
|
|
2355
2251
|
function va(t, e) {
|
|
2356
|
-
const n =
|
|
2252
|
+
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(), O = u(t.draggable), H = u(!1);
|
|
2357
2253
|
function $() {
|
|
2358
|
-
const
|
|
2359
|
-
if (!
|
|
2254
|
+
const y = o.value || document.body, g = window.getComputedStyle(y);
|
|
2255
|
+
if (!g || !n.value)
|
|
2360
2256
|
return;
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2257
|
+
const V = Q.getTransformInfo(n.value), A = {};
|
|
2258
|
+
d.value && (A.deltaL = n.value.offsetLeft - d.value.x, A.deltaT = n.value.offsetTop - d.value.y);
|
|
2259
|
+
const q = g.getPropertyValue("position");
|
|
2260
|
+
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
2261
|
}
|
|
2366
|
-
function h(
|
|
2262
|
+
function h(y) {
|
|
2367
2263
|
if (n.value) {
|
|
2368
|
-
r.value =
|
|
2369
|
-
const
|
|
2370
|
-
|
|
2371
|
-
n: !!
|
|
2372
|
-
s: !!
|
|
2373
|
-
w: !!
|
|
2374
|
-
e: !!
|
|
2264
|
+
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, $();
|
|
2265
|
+
const g = y.target.getAttribute("type") || "";
|
|
2266
|
+
s.value = {
|
|
2267
|
+
n: !!g.match(/n/),
|
|
2268
|
+
s: !!g.match(/s/),
|
|
2269
|
+
w: !!g.match(/w/),
|
|
2270
|
+
e: !!g.match(/e/)
|
|
2375
2271
|
};
|
|
2376
2272
|
}
|
|
2377
2273
|
}
|
|
2378
2274
|
function b() {
|
|
2379
|
-
var
|
|
2275
|
+
var y, g, V, A;
|
|
2380
2276
|
if (n.value) {
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2277
|
+
const q = n.value;
|
|
2278
|
+
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
2279
|
}
|
|
2384
2280
|
}
|
|
2385
|
-
function
|
|
2386
|
-
const
|
|
2387
|
-
|
|
2281
|
+
function I() {
|
|
2282
|
+
const y = t.minHeight ? t.minHeight : 1, g = t.minWidth ? t.minWidth : 1;
|
|
2283
|
+
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
2284
|
}
|
|
2389
|
-
function
|
|
2285
|
+
function G() {
|
|
2390
2286
|
if (o.value) {
|
|
2391
|
-
const
|
|
2392
|
-
if (
|
|
2393
|
-
const
|
|
2394
|
-
|
|
2287
|
+
const y = m.value;
|
|
2288
|
+
if (d.value && i.value && s.value && r.value) {
|
|
2289
|
+
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;
|
|
2290
|
+
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
2291
|
}
|
|
2396
2292
|
}
|
|
2397
2293
|
}
|
|
2398
|
-
function
|
|
2399
|
-
if (!a.value || !r.value || !
|
|
2294
|
+
function U(y) {
|
|
2295
|
+
if (!a.value || !r.value || !l.value || !s.value)
|
|
2400
2296
|
return;
|
|
2401
|
-
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2297
|
+
y.subtract(a.value);
|
|
2298
|
+
const g = y.x, V = y.y;
|
|
2299
|
+
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
2300
|
}
|
|
2405
|
-
function
|
|
2406
|
-
if (!
|
|
2301
|
+
function X(y) {
|
|
2302
|
+
if (!p.value)
|
|
2407
2303
|
return;
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2304
|
+
const g = Q.fromEvent(y);
|
|
2305
|
+
g && U(g);
|
|
2410
2306
|
}
|
|
2411
|
-
function
|
|
2307
|
+
function x() {
|
|
2412
2308
|
if (n.value) {
|
|
2413
2309
|
const {
|
|
2414
|
-
width:
|
|
2415
|
-
height:
|
|
2416
|
-
x:
|
|
2417
|
-
y:
|
|
2418
|
-
} = n.value.getBoundingClientRect(),
|
|
2310
|
+
width: y,
|
|
2311
|
+
height: g,
|
|
2312
|
+
x: V,
|
|
2313
|
+
y: A
|
|
2314
|
+
} = n.value.getBoundingClientRect(), q = Q.getTransformInfo(n.value);
|
|
2419
2315
|
return {
|
|
2420
2316
|
size: {
|
|
2421
|
-
width:
|
|
2422
|
-
height:
|
|
2317
|
+
width: y,
|
|
2318
|
+
height: g
|
|
2423
2319
|
},
|
|
2424
2320
|
position: {
|
|
2425
|
-
x:
|
|
2426
|
-
y:
|
|
2321
|
+
x: V - q.x,
|
|
2322
|
+
y: A - q.y
|
|
2427
2323
|
}
|
|
2428
2324
|
};
|
|
2429
2325
|
}
|
|
2430
2326
|
return null;
|
|
2431
2327
|
}
|
|
2432
|
-
function
|
|
2328
|
+
function D(y) {
|
|
2433
2329
|
if (n.value) {
|
|
2434
|
-
const
|
|
2435
|
-
v.value =
|
|
2330
|
+
const g = x();
|
|
2331
|
+
v.value = g;
|
|
2436
2332
|
}
|
|
2437
|
-
a.value = void 0, r.value = null,
|
|
2333
|
+
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
2334
|
}
|
|
2439
2335
|
function f() {
|
|
2440
|
-
document.addEventListener("mousemove",
|
|
2336
|
+
document.addEventListener("mousemove", X), document.addEventListener("mouseup", D);
|
|
2441
2337
|
}
|
|
2442
|
-
function
|
|
2443
|
-
|
|
2338
|
+
function C(y) {
|
|
2339
|
+
y instanceof MouseEvent && y.button === 2 || O.value && (y.stopPropagation(), y.preventDefault(), a.value = Q.fromEvent(y), p.value = y.target, h(y), f());
|
|
2444
2340
|
}
|
|
2445
|
-
function
|
|
2446
|
-
return n.value =
|
|
2341
|
+
function w(y) {
|
|
2342
|
+
return n.value = y, c(se, null, [c("div", {
|
|
2447
2343
|
class: "fv-resizable-handle fv-resizable-n",
|
|
2448
2344
|
type: "n",
|
|
2449
|
-
onMousedown: (
|
|
2450
|
-
}, null),
|
|
2345
|
+
onMousedown: (g) => C(g)
|
|
2346
|
+
}, null), c("div", {
|
|
2451
2347
|
class: "fv-resizable-handle fv-resizable-e",
|
|
2452
2348
|
type: "e",
|
|
2453
|
-
onMousedown: (
|
|
2454
|
-
}, null),
|
|
2349
|
+
onMousedown: (g) => C(g)
|
|
2350
|
+
}, null), c("div", {
|
|
2455
2351
|
class: "fv-resizable-handle fv-resizable-s",
|
|
2456
2352
|
type: "s",
|
|
2457
|
-
onMousedown: (
|
|
2458
|
-
}, null),
|
|
2353
|
+
onMousedown: (g) => C(g)
|
|
2354
|
+
}, null), c("div", {
|
|
2459
2355
|
class: "fv-resizable-handle fv-resizable-w",
|
|
2460
2356
|
type: "w",
|
|
2461
|
-
onMousedown: (
|
|
2462
|
-
}, null),
|
|
2357
|
+
onMousedown: (g) => C(g)
|
|
2358
|
+
}, null), c("div", {
|
|
2463
2359
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
2464
2360
|
type: "ne",
|
|
2465
|
-
onMousedown: (
|
|
2466
|
-
}, null),
|
|
2361
|
+
onMousedown: (g) => C(g)
|
|
2362
|
+
}, null), c("div", {
|
|
2467
2363
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
2468
2364
|
type: "se",
|
|
2469
|
-
onMousedown: (
|
|
2470
|
-
}, null),
|
|
2365
|
+
onMousedown: (g) => C(g)
|
|
2366
|
+
}, null), c("div", {
|
|
2471
2367
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
2472
2368
|
type: "sw",
|
|
2473
|
-
onMousedown: (
|
|
2474
|
-
}, null),
|
|
2369
|
+
onMousedown: (g) => C(g)
|
|
2370
|
+
}, null), c("div", {
|
|
2475
2371
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
2476
2372
|
type: "nw",
|
|
2477
|
-
onMousedown: (
|
|
2373
|
+
onMousedown: (g) => C(g)
|
|
2478
2374
|
}, null)]);
|
|
2479
2375
|
}
|
|
2480
|
-
function
|
|
2481
|
-
const
|
|
2482
|
-
|
|
2483
|
-
size:
|
|
2376
|
+
function j(y = !0) {
|
|
2377
|
+
const g = o.value || document.body, V = K.getCurrent(g), A = n.value;
|
|
2378
|
+
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 = {
|
|
2379
|
+
size: i.value,
|
|
2484
2380
|
position: {
|
|
2485
2381
|
x: 0,
|
|
2486
2382
|
y: 0
|
|
2487
2383
|
}
|
|
2488
|
-
},
|
|
2384
|
+
}, O.value = !1, H.value = !0);
|
|
2489
2385
|
}
|
|
2490
|
-
function
|
|
2491
|
-
var
|
|
2386
|
+
function L() {
|
|
2387
|
+
var y, g;
|
|
2492
2388
|
if (k.value) {
|
|
2493
|
-
const
|
|
2389
|
+
const V = {
|
|
2494
2390
|
width: k.value.size.width || 0,
|
|
2495
2391
|
height: k.value.size.height || 0
|
|
2496
|
-
},
|
|
2497
|
-
x: (window.innerWidth -
|
|
2498
|
-
y: (window.innerHeight -
|
|
2392
|
+
}, A = {
|
|
2393
|
+
x: (window.innerWidth - V.width) / 2,
|
|
2394
|
+
y: (window.innerHeight - V.height) / 2
|
|
2499
2395
|
};
|
|
2500
|
-
(
|
|
2501
|
-
const
|
|
2502
|
-
|
|
2503
|
-
size:
|
|
2504
|
-
position:
|
|
2505
|
-
},
|
|
2396
|
+
(y = i.value) == null || y.set(V), (g = d.value) == null || g.set(A);
|
|
2397
|
+
const q = n.value;
|
|
2398
|
+
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 = {
|
|
2399
|
+
size: V,
|
|
2400
|
+
position: A
|
|
2401
|
+
}, O.value = t.draggable, H.value = !1;
|
|
2506
2402
|
}
|
|
2507
2403
|
}
|
|
2508
|
-
function
|
|
2404
|
+
function N() {
|
|
2509
2405
|
if (n.value) {
|
|
2510
|
-
const
|
|
2511
|
-
if (
|
|
2406
|
+
const y = K.getCurrent(n.value);
|
|
2407
|
+
if (y) {
|
|
2512
2408
|
const {
|
|
2513
|
-
width:
|
|
2514
|
-
height:
|
|
2515
|
-
} =
|
|
2516
|
-
n.value.style.left = `${(window.innerWidth -
|
|
2409
|
+
width: g,
|
|
2410
|
+
height: V
|
|
2411
|
+
} = y;
|
|
2412
|
+
n.value.style.left = `${(window.innerWidth - g) / 2}px`, n.value.style.top = `${(window.innerHeight - V) / 2}px`, n.value.style.transform = "";
|
|
2517
2413
|
}
|
|
2518
2414
|
}
|
|
2519
2415
|
}
|
|
2520
|
-
function
|
|
2521
|
-
const
|
|
2522
|
-
|
|
2416
|
+
function P() {
|
|
2417
|
+
const y = () => {
|
|
2418
|
+
H.value ? j(!1) : N();
|
|
2523
2419
|
};
|
|
2524
|
-
return window.addEventListener("resize",
|
|
2525
|
-
window.removeEventListener("resize",
|
|
2420
|
+
return window.addEventListener("resize", y), () => {
|
|
2421
|
+
window.removeEventListener("resize", y);
|
|
2526
2422
|
};
|
|
2527
2423
|
}
|
|
2528
|
-
const Y =
|
|
2424
|
+
const Y = P();
|
|
2529
2425
|
return {
|
|
2530
|
-
renderResizeBar:
|
|
2426
|
+
renderResizeBar: w,
|
|
2531
2427
|
boundingElement: o,
|
|
2532
2428
|
resizedEventParam: v,
|
|
2533
|
-
maximize:
|
|
2534
|
-
restore:
|
|
2535
|
-
allowDrag:
|
|
2536
|
-
isMaximized:
|
|
2429
|
+
maximize: j,
|
|
2430
|
+
restore: L,
|
|
2431
|
+
allowDrag: O,
|
|
2432
|
+
isMaximized: H,
|
|
2537
2433
|
unWindowResizeHandle: Y
|
|
2538
2434
|
};
|
|
2539
2435
|
}
|
|
2540
2436
|
function ha(t, e, n) {
|
|
2541
|
-
const o =
|
|
2542
|
-
J(() => n.value, (
|
|
2543
|
-
|
|
2437
|
+
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));
|
|
2438
|
+
J(() => n.value, (x) => {
|
|
2439
|
+
l.value.style.cursor = x ? "move" : "default";
|
|
2544
2440
|
});
|
|
2545
|
-
function k(
|
|
2546
|
-
if (
|
|
2441
|
+
function k(x, D) {
|
|
2442
|
+
if (D.tagName === "BUTTON")
|
|
2547
2443
|
return !1;
|
|
2548
|
-
if (
|
|
2444
|
+
if (D === x)
|
|
2549
2445
|
return !0;
|
|
2550
|
-
for (const f in
|
|
2551
|
-
if (
|
|
2446
|
+
for (const f in D.children)
|
|
2447
|
+
if (Object.prototype.hasOwnProperty.call(D.children, f) && k(x, D.children[f]))
|
|
2552
2448
|
return !0;
|
|
2553
2449
|
return !1;
|
|
2554
2450
|
}
|
|
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 =
|
|
2451
|
+
function O() {
|
|
2452
|
+
var C, w;
|
|
2453
|
+
let x = m.value.x + p.value.x, D = m.value.y + p.value.y;
|
|
2454
|
+
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);
|
|
2455
|
+
const f = `translate3d(${Math.round(x)}px, ${Math.round(D)}px, 0px)`;
|
|
2456
|
+
o.value && (o.value.style.transform = f), v.value.x = x, v.value.y = D;
|
|
2561
2457
|
}
|
|
2562
|
-
function
|
|
2563
|
-
if (!
|
|
2458
|
+
function H() {
|
|
2459
|
+
if (!i.value || !o.value)
|
|
2564
2460
|
return null;
|
|
2565
|
-
const
|
|
2566
|
-
top:
|
|
2567
|
-
right:
|
|
2568
|
-
bottom:
|
|
2569
|
-
left:
|
|
2461
|
+
const x = i.value.getBoundingClientRect(), D = o.value.getBoundingClientRect(), f = {
|
|
2462
|
+
top: x.top < D.top,
|
|
2463
|
+
right: x.right > D.right,
|
|
2464
|
+
bottom: x.bottom > D.bottom,
|
|
2465
|
+
left: x.left < D.left
|
|
2570
2466
|
};
|
|
2571
|
-
return f.top || (m.value.y -=
|
|
2467
|
+
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), O(), f;
|
|
2572
2468
|
}
|
|
2573
|
-
function $(
|
|
2574
|
-
|
|
2469
|
+
function $(x) {
|
|
2470
|
+
x && (s.value && x.subtract(s.value), m.value.set(x), O(), H());
|
|
2575
2471
|
}
|
|
2576
|
-
function h(
|
|
2577
|
-
|
|
2472
|
+
function h(x) {
|
|
2473
|
+
d.value && a.value && (x.stopPropagation(), x.preventDefault(), $(Q.fromEvent(x, l.value)));
|
|
2578
2474
|
}
|
|
2579
2475
|
function b() {
|
|
2580
|
-
var
|
|
2581
|
-
|
|
2476
|
+
var x;
|
|
2477
|
+
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
2478
|
}
|
|
2583
|
-
function
|
|
2584
|
-
!
|
|
2479
|
+
function I() {
|
|
2480
|
+
!d.value && l.value && (d.value = !0, l.value.classList.add("ng-dragging"), document.addEventListener("mousemove", h), document.addEventListener("mouseup", b));
|
|
2585
2481
|
}
|
|
2586
|
-
function
|
|
2482
|
+
function G() {
|
|
2587
2483
|
if (o.value) {
|
|
2588
|
-
const
|
|
2589
|
-
|
|
2484
|
+
const x = Q.getTransformInfo(o.value);
|
|
2485
|
+
p.value.set(x);
|
|
2590
2486
|
return;
|
|
2591
2487
|
}
|
|
2592
|
-
|
|
2488
|
+
p.value.reset();
|
|
2593
2489
|
}
|
|
2594
|
-
function
|
|
2595
|
-
if (!n.value ||
|
|
2490
|
+
function U(x) {
|
|
2491
|
+
if (!n.value || x instanceof MouseEvent && x.button === 2)
|
|
2596
2492
|
return;
|
|
2597
|
-
const
|
|
2598
|
-
|
|
2493
|
+
const D = x.target || x.srcElement;
|
|
2494
|
+
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
2495
|
}
|
|
2600
|
-
function
|
|
2601
|
-
if (a.value &&
|
|
2602
|
-
if (
|
|
2603
|
-
|
|
2496
|
+
function X(x, D, f) {
|
|
2497
|
+
if (a.value && D) {
|
|
2498
|
+
if (x)
|
|
2499
|
+
l.value = x;
|
|
2604
2500
|
else if (t.dragHandle) {
|
|
2605
2501
|
if (t.dragHandle instanceof HTMLElement)
|
|
2606
|
-
|
|
2502
|
+
l.value = t.dragHandle;
|
|
2607
2503
|
else if (typeof t.dragHandle == "string") {
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2504
|
+
const C = D.querySelector(t.dragHandle);
|
|
2505
|
+
C && (l.value = C);
|
|
2610
2506
|
}
|
|
2611
2507
|
}
|
|
2612
|
-
o.value =
|
|
2508
|
+
o.value = D, i.value = f, l.value.classList.add("ng-draggable"), l.value.addEventListener("mousedown", U);
|
|
2613
2509
|
}
|
|
2614
2510
|
}
|
|
2615
2511
|
return {
|
|
2616
|
-
registerDraggle:
|
|
2617
|
-
resetTranslate:
|
|
2512
|
+
registerDraggle: X,
|
|
2513
|
+
resetTranslate: G
|
|
2618
2514
|
};
|
|
2619
2515
|
}
|
|
2620
|
-
function
|
|
2516
|
+
function Pe(t, e) {
|
|
2621
2517
|
if (t) {
|
|
2622
2518
|
const n = (o) => {
|
|
2623
2519
|
o.key.toLowerCase() === t.toLowerCase() && e({ event: o, key: t });
|
|
@@ -2628,18 +2524,18 @@ function Ne(t, e) {
|
|
|
2628
2524
|
}
|
|
2629
2525
|
}
|
|
2630
2526
|
function ga(t, e) {
|
|
2631
|
-
const n =
|
|
2527
|
+
const n = u(t.enableEsc);
|
|
2632
2528
|
let o = null;
|
|
2633
|
-
return n.value ? (o =
|
|
2529
|
+
return n.value ? (o = Pe("Escape", (a) => {
|
|
2634
2530
|
e.emit("esc", { event: a.event, type: "esc" });
|
|
2635
2531
|
}), {
|
|
2636
2532
|
remove: o
|
|
2637
2533
|
}) : null;
|
|
2638
2534
|
}
|
|
2639
2535
|
function ya(t, e) {
|
|
2640
|
-
const n =
|
|
2536
|
+
const n = u(t.enableEnter);
|
|
2641
2537
|
let o = null;
|
|
2642
|
-
return n.value ? (o =
|
|
2538
|
+
return n.value ? (o = Pe("Enter", (a) => {
|
|
2643
2539
|
e.emit("enter", { event: a.event, type: "enter" });
|
|
2644
2540
|
}), {
|
|
2645
2541
|
remove: o
|
|
@@ -2650,205 +2546,205 @@ const ze = /* @__PURE__ */ ee({
|
|
|
2650
2546
|
props: fa,
|
|
2651
2547
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
2652
2548
|
setup(t, e) {
|
|
2653
|
-
const n =
|
|
2654
|
-
function
|
|
2655
|
-
a.value = !1, e.emit("update:modelValue", !1),
|
|
2549
|
+
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(""), O = u(""), H = u(""), $ = u(t.showButtons), h = u(t.title), b = u(t.reiszeable), I = u(t.containment || null), G = u();
|
|
2550
|
+
function U(T, W) {
|
|
2551
|
+
a.value = !1, e.emit("update:modelValue", !1), W != null && e.emit(W ? "accept" : "cancel"), e.emit("closed", T);
|
|
2656
2552
|
}
|
|
2657
|
-
const
|
|
2553
|
+
const X = [{
|
|
2658
2554
|
name: "cancel",
|
|
2659
2555
|
text: "取消",
|
|
2660
2556
|
class: "btn btn-secondary",
|
|
2661
|
-
handle: (
|
|
2662
|
-
|
|
2557
|
+
handle: (T) => {
|
|
2558
|
+
U(T, !1);
|
|
2663
2559
|
}
|
|
2664
2560
|
}, {
|
|
2665
2561
|
name: "accept",
|
|
2666
2562
|
text: "确定",
|
|
2667
2563
|
class: "btn btn-primary",
|
|
2668
|
-
handle: (
|
|
2669
|
-
|
|
2564
|
+
handle: (T) => {
|
|
2565
|
+
U(T, !0);
|
|
2670
2566
|
}
|
|
2671
|
-
}],
|
|
2672
|
-
renderResizeBar:
|
|
2673
|
-
maximize:
|
|
2674
|
-
restore:
|
|
2567
|
+
}], x = u(t.buttons && t.buttons.length ? t.buttons : X), D = R(() => !!s.value), f = R(() => !!$.value && !!x.value), C = u(), w = u(), j = u(!1), {
|
|
2568
|
+
renderResizeBar: L,
|
|
2569
|
+
maximize: N,
|
|
2570
|
+
restore: P,
|
|
2675
2571
|
boundingElement: Y,
|
|
2676
|
-
resizedEventParam:
|
|
2677
|
-
allowDrag:
|
|
2678
|
-
unWindowResizeHandle:
|
|
2572
|
+
resizedEventParam: y,
|
|
2573
|
+
allowDrag: g,
|
|
2574
|
+
unWindowResizeHandle: V
|
|
2679
2575
|
} = 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 =
|
|
2576
|
+
registerDraggle: A
|
|
2577
|
+
} = ha(t, e, g);
|
|
2578
|
+
J(() => t.title, (T, W) => {
|
|
2579
|
+
T !== W && (h.value = T);
|
|
2580
|
+
}), J(() => t.modelValue, (T, W) => {
|
|
2581
|
+
T !== W && (a.value = T);
|
|
2582
|
+
}), J(() => t.showHeader, (T, W) => {
|
|
2583
|
+
T !== W && (d.value = T);
|
|
2584
|
+
}), J(() => t.showButtons, (T, W) => {
|
|
2585
|
+
T !== W && ($.value = T);
|
|
2586
|
+
}), J(() => y.value, (T, W) => {
|
|
2587
|
+
const ae = T || {}, ie = W || {};
|
|
2692
2588
|
JSON.stringify(ae) !== JSON.stringify(ie) && e.emit("resize", {
|
|
2693
|
-
newSize:
|
|
2694
|
-
oldSize:
|
|
2589
|
+
newSize: T,
|
|
2590
|
+
oldSize: W
|
|
2695
2591
|
});
|
|
2696
2592
|
});
|
|
2697
|
-
function
|
|
2698
|
-
const
|
|
2699
|
-
(!
|
|
2593
|
+
function q() {
|
|
2594
|
+
const T = document.querySelectorAll(".farris-modal").length;
|
|
2595
|
+
(!T || T - 1 <= 0) && document.body.classList.remove("modal-open"), G.value && G.value.classList.remove("show");
|
|
2700
2596
|
}
|
|
2701
|
-
const re =
|
|
2702
|
-
const
|
|
2597
|
+
const re = R(() => (a.value ? document.body.classList.add("modal-open") : q(), a.value)), Ae = R(() => {
|
|
2598
|
+
const T = {
|
|
2703
2599
|
modal: !0,
|
|
2704
2600
|
"farris-modal": !0,
|
|
2705
2601
|
fade: !0
|
|
2706
2602
|
};
|
|
2707
|
-
return
|
|
2708
|
-
}), Ge =
|
|
2603
|
+
return T["f-modal-fitContent"] = !!i.value, T.show = !!re.value, T;
|
|
2604
|
+
}), Ge = R(() => {
|
|
2709
2605
|
var ae;
|
|
2710
|
-
const
|
|
2606
|
+
const T = {
|
|
2711
2607
|
"modal-dialog": !0
|
|
2712
|
-
},
|
|
2713
|
-
return
|
|
2714
|
-
}), qe =
|
|
2608
|
+
}, W = (ae = l.value) == null ? void 0 : ae.split(" ");
|
|
2609
|
+
return W == null || W.reduce((ie, ot) => (ie[ot] = !0, ie), T), T;
|
|
2610
|
+
}), qe = R(() => ({
|
|
2715
2611
|
position: "absolute",
|
|
2716
2612
|
top: `${(window.innerHeight - o.value) / 2}px`,
|
|
2717
2613
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
2718
2614
|
width: `${n.value}px`,
|
|
2719
|
-
height:
|
|
2720
|
-
})), Ue =
|
|
2615
|
+
height: i.value ? "auto" : `${o.value}px`
|
|
2616
|
+
})), Ue = R(() => ({
|
|
2721
2617
|
"modal-content": !0,
|
|
2722
|
-
"modal-content-has-header":
|
|
2723
|
-
})), We =
|
|
2724
|
-
const
|
|
2725
|
-
display:
|
|
2618
|
+
"modal-content-has-header": d.value
|
|
2619
|
+
})), We = R(() => {
|
|
2620
|
+
const T = {
|
|
2621
|
+
display: d.value ? "" : "none"
|
|
2726
2622
|
};
|
|
2727
|
-
return
|
|
2728
|
-
}), Xe =
|
|
2623
|
+
return T["pointer-events"] = g.value ? "auto" : "none", T;
|
|
2624
|
+
}), Xe = R(() => ({
|
|
2729
2625
|
"f-icon": !0,
|
|
2730
2626
|
modal_maximize: !0,
|
|
2731
|
-
modalrevert:
|
|
2732
|
-
})), Ye =
|
|
2627
|
+
modalrevert: j.value
|
|
2628
|
+
})), Ye = R(() => ({
|
|
2733
2629
|
"modal-body": !0,
|
|
2734
2630
|
"f-utils-flex-column": k.value === "iframe"
|
|
2735
2631
|
}));
|
|
2736
|
-
function
|
|
2632
|
+
function Qe() {
|
|
2737
2633
|
return {};
|
|
2738
2634
|
}
|
|
2739
|
-
const
|
|
2740
|
-
const
|
|
2741
|
-
textAlgin:
|
|
2742
|
-
},
|
|
2743
|
-
return Object.assign(
|
|
2635
|
+
const Je = R(() => {
|
|
2636
|
+
const T = {
|
|
2637
|
+
textAlgin: H.value
|
|
2638
|
+
}, W = Qe();
|
|
2639
|
+
return Object.assign(T, W);
|
|
2744
2640
|
});
|
|
2745
|
-
function we(
|
|
2746
|
-
if (
|
|
2747
|
-
|
|
2641
|
+
function we(T) {
|
|
2642
|
+
if (T.stopPropagation(), j.value) {
|
|
2643
|
+
j.value = !1, P();
|
|
2748
2644
|
return;
|
|
2749
2645
|
}
|
|
2750
|
-
|
|
2646
|
+
N(), j.value = !0;
|
|
2751
2647
|
}
|
|
2752
|
-
async function Ze(
|
|
2753
|
-
|
|
2648
|
+
async function Ze(T, W) {
|
|
2649
|
+
T.handle && await T.handle(W, T) && e.emit("closed", W);
|
|
2754
2650
|
}
|
|
2755
|
-
function
|
|
2756
|
-
|
|
2651
|
+
function _e(T) {
|
|
2652
|
+
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
2653
|
}
|
|
2758
2654
|
let de = null, pe = null;
|
|
2759
2655
|
oe(() => {
|
|
2760
|
-
|
|
2656
|
+
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
2657
|
}), Se(() => {
|
|
2762
|
-
|
|
2658
|
+
q(), V && V(), de && de.remove(), pe && pe.remove();
|
|
2763
2659
|
}), e.expose({
|
|
2764
|
-
modalElementRef:
|
|
2765
|
-
updateModalOptions:
|
|
2766
|
-
close:
|
|
2660
|
+
modalElementRef: w,
|
|
2661
|
+
updateModalOptions: _e,
|
|
2662
|
+
close: U,
|
|
2767
2663
|
maxDialog: we
|
|
2768
2664
|
});
|
|
2769
|
-
function
|
|
2770
|
-
return
|
|
2665
|
+
function Ke() {
|
|
2666
|
+
return c("ul", null, [v.value && c("li", {
|
|
2771
2667
|
class: "f-btn-icon f-bare"
|
|
2772
|
-
}, [
|
|
2668
|
+
}, [c("span", {
|
|
2773
2669
|
class: "f-icon modal_minimize"
|
|
2774
|
-
}, null)]), m.value &&
|
|
2670
|
+
}, null)]), m.value && c("li", {
|
|
2775
2671
|
onClick: we,
|
|
2776
2672
|
class: "f-btn-icon f-bare",
|
|
2777
2673
|
style: "pointer-events: auto;"
|
|
2778
|
-
}, [
|
|
2674
|
+
}, [c("span", {
|
|
2779
2675
|
class: Xe.value
|
|
2780
|
-
}, null)]),
|
|
2676
|
+
}, null)]), p.value && c("li", {
|
|
2781
2677
|
class: "f-btn-icon f-bare",
|
|
2782
|
-
onClick: (
|
|
2678
|
+
onClick: (T) => U(T, !1),
|
|
2783
2679
|
style: "pointer-events: auto;"
|
|
2784
|
-
}, [
|
|
2680
|
+
}, [c("span", {
|
|
2785
2681
|
class: "f-icon modal_close"
|
|
2786
2682
|
}, null)])]);
|
|
2787
2683
|
}
|
|
2788
2684
|
function et() {
|
|
2789
|
-
return
|
|
2685
|
+
return c("div", {
|
|
2790
2686
|
class: "modal-footer",
|
|
2791
|
-
style:
|
|
2792
|
-
}, [
|
|
2793
|
-
name:
|
|
2687
|
+
style: Je.value
|
|
2688
|
+
}, [x.value && x.value.map((T) => c("button", {
|
|
2689
|
+
name: T.name,
|
|
2794
2690
|
type: "button",
|
|
2795
|
-
class:
|
|
2796
|
-
onClick: (
|
|
2797
|
-
Ze(
|
|
2691
|
+
class: T.class + (T.iconClass ? " btn-icontext" : ""),
|
|
2692
|
+
onClick: (W) => {
|
|
2693
|
+
Ze(T, W);
|
|
2798
2694
|
}
|
|
2799
|
-
}, [!!
|
|
2800
|
-
class:
|
|
2801
|
-
}, null),
|
|
2695
|
+
}, [!!T.iconClass && c("i", {
|
|
2696
|
+
class: T.iconClass
|
|
2697
|
+
}, null), T.text]))]);
|
|
2802
2698
|
}
|
|
2803
2699
|
function tt() {
|
|
2804
|
-
return
|
|
2805
|
-
ref:
|
|
2700
|
+
return c("div", {
|
|
2701
|
+
ref: C,
|
|
2806
2702
|
class: "modal-header",
|
|
2807
2703
|
style: We.value
|
|
2808
|
-
}, [
|
|
2704
|
+
}, [c("div", {
|
|
2809
2705
|
class: "modal-title"
|
|
2810
|
-
}, [
|
|
2811
|
-
class:
|
|
2706
|
+
}, [D.value && c("span", {
|
|
2707
|
+
class: s.value,
|
|
2812
2708
|
style: "margin-right: 8px"
|
|
2813
|
-
}, null),
|
|
2709
|
+
}, null), c("span", {
|
|
2814
2710
|
class: "modal-title-label"
|
|
2815
|
-
}, [h.value])]),
|
|
2711
|
+
}, [h.value])]), c("div", {
|
|
2816
2712
|
class: "actions"
|
|
2817
|
-
}, [
|
|
2713
|
+
}, [Ke()])]);
|
|
2818
2714
|
}
|
|
2819
|
-
function nt(
|
|
2820
|
-
|
|
2715
|
+
function nt(T) {
|
|
2716
|
+
T.stopPropagation();
|
|
2821
2717
|
}
|
|
2822
|
-
return () =>
|
|
2718
|
+
return () => c(ut, {
|
|
2823
2719
|
to: "body"
|
|
2824
2720
|
}, {
|
|
2825
|
-
default: () => [re.value &&
|
|
2721
|
+
default: () => [re.value && c(ct, {
|
|
2826
2722
|
name: "fade",
|
|
2827
2723
|
appear: !0
|
|
2828
2724
|
}, {
|
|
2829
2725
|
default: () => {
|
|
2830
|
-
var
|
|
2831
|
-
return [
|
|
2832
|
-
class:
|
|
2726
|
+
var T, W;
|
|
2727
|
+
return [c("div", {
|
|
2728
|
+
class: Ae.value,
|
|
2833
2729
|
style: "display: block",
|
|
2834
|
-
ref:
|
|
2730
|
+
ref: G,
|
|
2835
2731
|
onClick: nt
|
|
2836
|
-
}, [
|
|
2732
|
+
}, [c("div", {
|
|
2837
2733
|
id: r.value,
|
|
2838
2734
|
class: Ge.value,
|
|
2839
2735
|
style: qe.value,
|
|
2840
|
-
ref:
|
|
2841
|
-
}, [
|
|
2736
|
+
ref: w
|
|
2737
|
+
}, [c("div", {
|
|
2842
2738
|
class: Ue.value
|
|
2843
|
-
}, [
|
|
2739
|
+
}, [d.value && tt(), c("div", {
|
|
2844
2740
|
class: Ye.value
|
|
2845
|
-
}, [(
|
|
2741
|
+
}, [(W = (T = e.slots).default) == null ? void 0 : W.call(T), k.value === "iframe" && c("iframe", {
|
|
2846
2742
|
title: r.value,
|
|
2847
2743
|
class: "f-utils-fill",
|
|
2848
2744
|
width: "100%",
|
|
2849
2745
|
frameborder: "0",
|
|
2850
|
-
src:
|
|
2851
|
-
}, null)]), f.value && et()]), !
|
|
2746
|
+
src: O.value
|
|
2747
|
+
}, null)]), f.value && et()]), !i.value && b.value && w.value && L(w.value)])])];
|
|
2852
2748
|
}
|
|
2853
2749
|
})]
|
|
2854
2750
|
});
|
|
@@ -2868,34 +2764,34 @@ function ba(t) {
|
|
|
2868
2764
|
Se(() => {
|
|
2869
2765
|
document.body.removeChild(e);
|
|
2870
2766
|
});
|
|
2871
|
-
const r =
|
|
2767
|
+
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
2768
|
}), k = t.rejectCallback || (() => {
|
|
2873
|
-
}),
|
|
2874
|
-
}),
|
|
2769
|
+
}), O = t.closedCallback || ((b) => {
|
|
2770
|
+
}), H = t.resizeHandle || ((b) => {
|
|
2875
2771
|
}), $ = $e(t), h = (b) => {
|
|
2876
|
-
|
|
2772
|
+
p.value = !1, n.unmount(), O(b);
|
|
2877
2773
|
};
|
|
2878
2774
|
return oe(() => {
|
|
2879
2775
|
}), a.expose({
|
|
2880
2776
|
modalRef: r
|
|
2881
|
-
}), () =>
|
|
2777
|
+
}), () => c(ze, {
|
|
2882
2778
|
ref: r,
|
|
2883
|
-
class:
|
|
2884
|
-
modelValue:
|
|
2885
|
-
"onUpdate:modelValue": (b) =>
|
|
2779
|
+
class: l.value,
|
|
2780
|
+
modelValue: p.value,
|
|
2781
|
+
"onUpdate:modelValue": (b) => p.value = b,
|
|
2886
2782
|
title: m.value,
|
|
2887
2783
|
width: t.width,
|
|
2888
2784
|
height: t.height,
|
|
2889
2785
|
buttons: t.buttons,
|
|
2890
|
-
"show-header":
|
|
2891
|
-
"show-buttons":
|
|
2892
|
-
"show-close-button":
|
|
2786
|
+
"show-header": d.value,
|
|
2787
|
+
"show-buttons": i.value,
|
|
2788
|
+
"show-close-button": s.value,
|
|
2893
2789
|
"show-max-button": !1,
|
|
2894
2790
|
onAccept: v,
|
|
2895
2791
|
onCancel: k,
|
|
2896
2792
|
fitContent: t.fitContent == null ? !0 : t.fitContent,
|
|
2897
2793
|
onClosed: h,
|
|
2898
|
-
onResize:
|
|
2794
|
+
onResize: H
|
|
2899
2795
|
}, {
|
|
2900
2796
|
default: () => [$ && $(n)]
|
|
2901
2797
|
});
|
|
@@ -2905,13 +2801,13 @@ function ba(t) {
|
|
|
2905
2801
|
}
|
|
2906
2802
|
class Ca {
|
|
2907
2803
|
constructor(e) {
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
this.appContext = e ? e._context : null;
|
|
2804
|
+
B(this, "appContext", null);
|
|
2805
|
+
B(this, "modalRef", u());
|
|
2806
|
+
B(this, "activeModalIndex", u(0));
|
|
2807
|
+
B(this, "modalRefs", {});
|
|
2808
|
+
B(this, "isUseEscCloseModal", u(!1));
|
|
2809
|
+
B(this, "activeModalInstance", R(() => this.modalRefs[this.activeModalIndex.value]));
|
|
2810
|
+
this.app = e, this.appContext = e ? e._context : null;
|
|
2915
2811
|
}
|
|
2916
2812
|
getCurrentModal() {
|
|
2917
2813
|
return this.activeModalInstance.value;
|
|
@@ -2931,21 +2827,21 @@ class Ca {
|
|
|
2931
2827
|
title: "",
|
|
2932
2828
|
showButtons: !0,
|
|
2933
2829
|
showHeader: !0
|
|
2934
|
-
}, e)), a =
|
|
2935
|
-
}),
|
|
2936
|
-
}),
|
|
2937
|
-
}),
|
|
2830
|
+
}, e)), a = u(!0), r = o.value.acceptCallback || (() => {
|
|
2831
|
+
}), l = o.value.rejectCallback || (() => {
|
|
2832
|
+
}), i = o.value.closedCallback || ((h, b) => {
|
|
2833
|
+
}), d = o.value.resizeHandle || ((h) => {
|
|
2938
2834
|
});
|
|
2939
|
-
let
|
|
2940
|
-
const
|
|
2941
|
-
var
|
|
2835
|
+
let s;
|
|
2836
|
+
const p = $e(o.value), m = (h) => {
|
|
2837
|
+
var I;
|
|
2942
2838
|
a.value = !1;
|
|
2943
|
-
const b = (
|
|
2944
|
-
|
|
2839
|
+
const b = (I = h == null ? void 0 : h.target) == null ? void 0 : I.classList.contains("modal_close");
|
|
2840
|
+
i(h, this.isUseEscCloseModal.value ? "esc" : b ? "icon" : "button");
|
|
2945
2841
|
}, 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);
|
|
2842
|
+
m(h), s && ve(() => {
|
|
2843
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], me(null, n), s = null, this.modalRef.value = null, this.modalRefs) {
|
|
2844
|
+
const b = Object.keys(this.modalRefs).map((I) => Number(I));
|
|
2949
2845
|
b.length > 0 ? this.activeModalIndex.value = Math.max(...b) : this.activeModalIndex.value = 0;
|
|
2950
2846
|
}
|
|
2951
2847
|
this.isUseEscCloseModal.value = !1;
|
|
@@ -2953,21 +2849,21 @@ class Ca {
|
|
|
2953
2849
|
}, k = (h) => {
|
|
2954
2850
|
var b;
|
|
2955
2851
|
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((b = this.activeModalInstance.value) == null || b.close(h == null ? void 0 : h.event));
|
|
2956
|
-
},
|
|
2852
|
+
}, O = () => c(ze, ye({
|
|
2957
2853
|
ref: this.modalRef,
|
|
2958
2854
|
modelValue: a.value,
|
|
2959
2855
|
"onUpdate:modelValue": (h) => a.value = h
|
|
2960
2856
|
}, o.value, {
|
|
2961
2857
|
onAccept: r,
|
|
2962
|
-
onCancel:
|
|
2858
|
+
onCancel: l,
|
|
2963
2859
|
onClosed: v,
|
|
2964
|
-
onResize:
|
|
2860
|
+
onResize: d,
|
|
2965
2861
|
onEsc: k
|
|
2966
2862
|
}), {
|
|
2967
|
-
default: () => [
|
|
2863
|
+
default: () => [p && p(this.app)]
|
|
2968
2864
|
});
|
|
2969
|
-
return
|
|
2970
|
-
const b = mt(
|
|
2865
|
+
return s = ((h) => {
|
|
2866
|
+
const b = mt(O, h);
|
|
2971
2867
|
return b.appContext = this.appContext, me(b, n), b;
|
|
2972
2868
|
})({
|
|
2973
2869
|
...o.value
|
|
@@ -2977,7 +2873,7 @@ class Ca {
|
|
|
2977
2873
|
o.value = {
|
|
2978
2874
|
...o.value,
|
|
2979
2875
|
...h
|
|
2980
|
-
},
|
|
2876
|
+
}, s && me(ft(s, {
|
|
2981
2877
|
...o
|
|
2982
2878
|
}), n);
|
|
2983
2879
|
},
|
|
@@ -2986,30 +2882,29 @@ class Ca {
|
|
|
2986
2882
|
};
|
|
2987
2883
|
}
|
|
2988
2884
|
}
|
|
2989
|
-
class
|
|
2885
|
+
class _ {
|
|
2990
2886
|
static show(e) {
|
|
2991
|
-
|
|
2992
|
-
const o = Z({
|
|
2887
|
+
const n = Z({
|
|
2993
2888
|
...e
|
|
2994
|
-
}),
|
|
2995
|
-
}),
|
|
2889
|
+
}), o = !1, a = n.type === "error" || n.type === "prompt", r = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", l = n.acceptCallback || (() => {
|
|
2890
|
+
}), i = n.rejectCallback || (() => {
|
|
2996
2891
|
});
|
|
2997
|
-
let
|
|
2998
|
-
const
|
|
2999
|
-
|
|
2892
|
+
let d = null, s = new Ca(d);
|
|
2893
|
+
const p = () => {
|
|
2894
|
+
d && (d == null || d.destroy(), s = null);
|
|
3000
2895
|
};
|
|
3001
|
-
|
|
2896
|
+
d = s == null ? void 0 : s.open({
|
|
3002
2897
|
class: "modal-message modal-message-type-info",
|
|
3003
|
-
title:
|
|
3004
|
-
showButtons:
|
|
3005
|
-
showHeader:
|
|
3006
|
-
width:
|
|
2898
|
+
title: r,
|
|
2899
|
+
showButtons: o,
|
|
2900
|
+
showHeader: a,
|
|
2901
|
+
width: n.width || 400,
|
|
3007
2902
|
fitContent: !0,
|
|
3008
2903
|
showMaxButton: !1,
|
|
3009
|
-
render: () =>
|
|
3010
|
-
onAccept:
|
|
3011
|
-
onReject:
|
|
3012
|
-
onClose:
|
|
2904
|
+
render: () => c(ue, ye(n, {
|
|
2905
|
+
onAccept: l,
|
|
2906
|
+
onReject: i,
|
|
2907
|
+
onClose: p
|
|
3013
2908
|
}), null)
|
|
3014
2909
|
});
|
|
3015
2910
|
}
|
|
@@ -3021,7 +2916,7 @@ class K {
|
|
|
3021
2916
|
okButtonText: "知道了",
|
|
3022
2917
|
cancelButtonText: ""
|
|
3023
2918
|
});
|
|
3024
|
-
|
|
2919
|
+
_.show(o);
|
|
3025
2920
|
}
|
|
3026
2921
|
static warning(e, n) {
|
|
3027
2922
|
const o = Z({
|
|
@@ -3031,7 +2926,7 @@ class K {
|
|
|
3031
2926
|
okButtonText: "知道了",
|
|
3032
2927
|
cancelButtonText: ""
|
|
3033
2928
|
});
|
|
3034
|
-
|
|
2929
|
+
_.show(o);
|
|
3035
2930
|
}
|
|
3036
2931
|
static success(e, n) {
|
|
3037
2932
|
const o = Z({
|
|
@@ -3041,7 +2936,7 @@ class K {
|
|
|
3041
2936
|
okButtonText: "关闭",
|
|
3042
2937
|
cancelButtonText: ""
|
|
3043
2938
|
});
|
|
3044
|
-
|
|
2939
|
+
_.show(o);
|
|
3045
2940
|
}
|
|
3046
2941
|
static error(e, n, o) {
|
|
3047
2942
|
const a = Z({
|
|
@@ -3055,7 +2950,7 @@ class K {
|
|
|
3055
2950
|
detail: n
|
|
3056
2951
|
}
|
|
3057
2952
|
});
|
|
3058
|
-
|
|
2953
|
+
_.show(a);
|
|
3059
2954
|
}
|
|
3060
2955
|
static prompt(e, n) {
|
|
3061
2956
|
const o = Z({
|
|
@@ -3065,7 +2960,7 @@ class K {
|
|
|
3065
2960
|
okButtonText: "确定",
|
|
3066
2961
|
cancelButtonText: "取消"
|
|
3067
2962
|
});
|
|
3068
|
-
|
|
2963
|
+
_.show(o);
|
|
3069
2964
|
}
|
|
3070
2965
|
static question(e, n, o, a) {
|
|
3071
2966
|
const r = Z({
|
|
@@ -3077,13 +2972,13 @@ class K {
|
|
|
3077
2972
|
acceptCallback: o,
|
|
3078
2973
|
rejectCallback: a
|
|
3079
2974
|
});
|
|
3080
|
-
|
|
2975
|
+
_.show(r);
|
|
3081
2976
|
}
|
|
3082
2977
|
}
|
|
3083
2978
|
ue.install = (t) => {
|
|
3084
|
-
t.component(ue.name, ue), t.provide("FMessageBoxService",
|
|
2979
|
+
t.component(ue.name, ue), t.provide("FMessageBoxService", _);
|
|
3085
2980
|
};
|
|
3086
|
-
var wa = /* @__PURE__ */ ((t) => (t[t.IntType = 0] = "IntType", t[t.StringType = 1] = "StringType", t[t.BoolType = 2] = "BoolType", t))(wa || {}),
|
|
2981
|
+
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
2982
|
const xa = [
|
|
3088
2983
|
{
|
|
3089
2984
|
value: "0",
|
|
@@ -3144,381 +3039,381 @@ const xa = [
|
|
|
3144
3039
|
function ka(t, e, n) {
|
|
3145
3040
|
const { fieldMap: o } = n;
|
|
3146
3041
|
function a(r) {
|
|
3147
|
-
const
|
|
3148
|
-
if (!
|
|
3042
|
+
const l = o.get(r.fieldCode);
|
|
3043
|
+
if (!l)
|
|
3149
3044
|
return [];
|
|
3150
|
-
const
|
|
3151
|
-
return xa.filter((
|
|
3045
|
+
const i = l.editor.type, d = new Set(Ta[i]);
|
|
3046
|
+
return xa.filter((p) => d.has(p.value));
|
|
3152
3047
|
}
|
|
3153
3048
|
return { getCompareOperators: a };
|
|
3154
3049
|
}
|
|
3155
3050
|
function Ba() {
|
|
3156
|
-
const t =
|
|
3051
|
+
const t = u({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
3157
3052
|
let o = 0;
|
|
3158
3053
|
function a() {
|
|
3159
3054
|
return {
|
|
3160
3055
|
id: "",
|
|
3161
3056
|
fieldCode: "",
|
|
3162
3057
|
fieldName: "",
|
|
3163
|
-
compareType:
|
|
3164
|
-
valueType:
|
|
3058
|
+
compareType: De.Equal,
|
|
3059
|
+
valueType: He.Value,
|
|
3165
3060
|
value: new Ee(),
|
|
3166
3061
|
relation: 0,
|
|
3167
3062
|
conditionId: Date.now()
|
|
3168
3063
|
};
|
|
3169
3064
|
}
|
|
3170
|
-
function r(f,
|
|
3171
|
-
return { relation: f, items: [], children: [], path: [], groupId: ++o, level:
|
|
3065
|
+
function r(f, C) {
|
|
3066
|
+
return { relation: f, items: [], children: [], path: [], groupId: ++o, level: C };
|
|
3172
3067
|
}
|
|
3173
|
-
function
|
|
3068
|
+
function l() {
|
|
3174
3069
|
const f = Object.assign({}, t.value);
|
|
3175
|
-
n.forEach((
|
|
3176
|
-
|
|
3177
|
-
}), e.forEach((
|
|
3178
|
-
|
|
3070
|
+
n.forEach((C, w) => {
|
|
3071
|
+
C.groupId === f.groupId && n.set(w, f);
|
|
3072
|
+
}), e.forEach((C, w) => {
|
|
3073
|
+
C.groupId === f.groupId && e.set(w, f);
|
|
3179
3074
|
}), t.value = f;
|
|
3180
3075
|
}
|
|
3181
|
-
function
|
|
3182
|
-
const
|
|
3183
|
-
let
|
|
3184
|
-
return f.forEach((
|
|
3185
|
-
var
|
|
3186
|
-
if (
|
|
3076
|
+
function i(f) {
|
|
3077
|
+
const C = /* @__PURE__ */ new Map();
|
|
3078
|
+
let w = 0;
|
|
3079
|
+
return f.forEach((j, L) => {
|
|
3080
|
+
var N, P;
|
|
3081
|
+
if (w += ((N = j.lBracket) == null ? void 0 : N.length) || 0, C.set(L, w), w -= ((P = j.rBracket) == null ? void 0 : P.length) || 0, w < 0)
|
|
3187
3082
|
throw new Error("The right bracket is out of range.");
|
|
3188
|
-
}),
|
|
3083
|
+
}), C;
|
|
3189
3084
|
}
|
|
3190
|
-
function
|
|
3191
|
-
for (let
|
|
3192
|
-
const
|
|
3193
|
-
|
|
3085
|
+
function d(f, C, w, j, L) {
|
|
3086
|
+
for (let N = 0; N < C; N++) {
|
|
3087
|
+
const P = f + (N + 1), Y = r(L, P);
|
|
3088
|
+
w.children.push(Y), n.set(Y.groupId, w), w = w.children[w.children.length - 1], j.push(w);
|
|
3194
3089
|
}
|
|
3195
|
-
return
|
|
3090
|
+
return w;
|
|
3196
3091
|
}
|
|
3197
|
-
function
|
|
3198
|
-
for (let
|
|
3199
|
-
|
|
3200
|
-
const
|
|
3201
|
-
if (!
|
|
3092
|
+
function s(f, C, w, j, L) {
|
|
3093
|
+
for (let y = C; y <= 0; y++)
|
|
3094
|
+
j.pop();
|
|
3095
|
+
const N = j[j.length - 1];
|
|
3096
|
+
if (!N)
|
|
3202
3097
|
throw new Error("The group path is out of range");
|
|
3203
|
-
const
|
|
3204
|
-
return
|
|
3098
|
+
const P = f + C, Y = r(L, P);
|
|
3099
|
+
return N.children.push(Y), n.set(Y.groupId, N), w = N.children[N.children.length - 1], j.push(w), w;
|
|
3205
3100
|
}
|
|
3206
|
-
function
|
|
3207
|
-
|
|
3208
|
-
const
|
|
3209
|
-
return
|
|
3101
|
+
function p(f, C, w, j) {
|
|
3102
|
+
w.pop();
|
|
3103
|
+
const L = w[w.length - 1], N = r(j, f);
|
|
3104
|
+
return L.children.push(N), n.set(N.groupId, L), C = L.children[L.children.length - 1], w.push(C), C;
|
|
3210
3105
|
}
|
|
3211
|
-
function m(f,
|
|
3212
|
-
let
|
|
3213
|
-
if (!
|
|
3106
|
+
function m(f, C, w, j, L, N) {
|
|
3107
|
+
let P = f[f.length - 1];
|
|
3108
|
+
if (!P)
|
|
3214
3109
|
throw new Error("The group path is out of range");
|
|
3215
|
-
const Y =
|
|
3216
|
-
if (
|
|
3110
|
+
const Y = C.get(j) || 0, y = C.get(w) || 0;
|
|
3111
|
+
if (w < 0 || w === j)
|
|
3217
3112
|
return f[f.length - 1];
|
|
3218
|
-
const
|
|
3219
|
-
return
|
|
3113
|
+
const g = Y - y, V = L && L.relation !== void 0 ? L.relation : 1;
|
|
3114
|
+
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
3115
|
}
|
|
3221
3116
|
function v(f) {
|
|
3222
|
-
const
|
|
3223
|
-
return f.forEach((
|
|
3224
|
-
const Y =
|
|
3225
|
-
|
|
3226
|
-
}), t.value =
|
|
3117
|
+
const w = { relation: f.length && f[0].relation !== void 0 ? f[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, j = [w], L = i(f);
|
|
3118
|
+
return f.forEach((N, P) => {
|
|
3119
|
+
const Y = P - 1, y = f[Y], g = m(j, L, Y, P, y, N);
|
|
3120
|
+
g.items.push(N), e.set(N.conditionId, g);
|
|
3121
|
+
}), t.value = w, w;
|
|
3227
3122
|
}
|
|
3228
3123
|
function k() {
|
|
3229
3124
|
const f = a();
|
|
3230
3125
|
e.set(f.conditionId, t.value), t.value.items.push(f);
|
|
3231
3126
|
}
|
|
3232
|
-
function
|
|
3127
|
+
function O(f) {
|
|
3233
3128
|
if (!f)
|
|
3234
3129
|
return;
|
|
3235
|
-
const
|
|
3236
|
-
if (
|
|
3237
|
-
const
|
|
3238
|
-
e.set(
|
|
3130
|
+
const C = e.get(f.conditionId);
|
|
3131
|
+
if (C) {
|
|
3132
|
+
const w = C.items.findIndex((L) => L.conditionId === f.conditionId) + 1, j = a();
|
|
3133
|
+
e.set(j.conditionId, C), C.items.splice(w, 0, j), l();
|
|
3239
3134
|
}
|
|
3240
3135
|
}
|
|
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);
|
|
3136
|
+
function H(f, C, w, j) {
|
|
3137
|
+
f.reduce((L, N) => {
|
|
3138
|
+
const P = N.conditionId !== void 0, Y = N.groupId !== void 0;
|
|
3139
|
+
if (P) {
|
|
3140
|
+
const y = N;
|
|
3141
|
+
w.push(y), L.items.set(y.conditionId, y);
|
|
3251
3142
|
}
|
|
3252
3143
|
if (Y) {
|
|
3253
|
-
const
|
|
3254
|
-
|
|
3144
|
+
const y = N;
|
|
3145
|
+
j.push(y), L.groups.set(y.groupId, y);
|
|
3255
3146
|
}
|
|
3256
|
-
return
|
|
3257
|
-
},
|
|
3147
|
+
return L;
|
|
3148
|
+
}, C);
|
|
3258
3149
|
}
|
|
3259
|
-
function
|
|
3260
|
-
f && (f.items =
|
|
3150
|
+
function $(f, C, w, j, L) {
|
|
3151
|
+
f && (f.items = C.length ? f.items.filter((N) => !w.has(N.conditionId)) : f.items, f.children = j.length ? f.children.filter((N) => !L.has(N.groupId)) : f.children);
|
|
3261
3152
|
}
|
|
3262
|
-
function
|
|
3263
|
-
|
|
3264
|
-
f.items.push(
|
|
3265
|
-
}),
|
|
3266
|
-
f.children.push(
|
|
3153
|
+
function h(f, C, w) {
|
|
3154
|
+
C.forEach((j) => {
|
|
3155
|
+
f.items.push(j), e.set(j.conditionId, f);
|
|
3156
|
+
}), w.forEach((j) => {
|
|
3157
|
+
f.children.push(j), n.set(j.groupId, f);
|
|
3267
3158
|
});
|
|
3268
3159
|
}
|
|
3269
|
-
function
|
|
3270
|
-
const
|
|
3271
|
-
if (
|
|
3272
|
-
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3160
|
+
function b(f) {
|
|
3161
|
+
const C = f[0], w = C.conditionId !== void 0 ? e.get(C.conditionId) : n.get(C.groupId), j = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, L = [], N = [];
|
|
3162
|
+
if (w) {
|
|
3163
|
+
H(f, j, L, N), $(w, L, j.items, N, j.groups);
|
|
3164
|
+
const P = r(w.relation, w.level + 1);
|
|
3165
|
+
h(P, L, N), w.children.push(P), n.set(P.groupId, w), l();
|
|
3275
3166
|
}
|
|
3276
3167
|
}
|
|
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
|
|
3168
|
+
function I(f) {
|
|
3169
|
+
const C = [...f.items], w = [...f.children], j = n.get(f.groupId);
|
|
3170
|
+
j && (j.children = j.children.filter((L) => L.groupId !== f.groupId), n.delete(f.groupId), C.forEach((L) => {
|
|
3171
|
+
j.items.push(L), e.set(L.conditionId, j);
|
|
3172
|
+
}), w.forEach((L) => {
|
|
3173
|
+
j.children.push(L), n.set(L.groupId, j);
|
|
3174
|
+
}), l());
|
|
3175
|
+
}
|
|
3176
|
+
function G(f) {
|
|
3177
|
+
f.relation = f.relation === 1 ? 2 : 1, l();
|
|
3178
|
+
}
|
|
3179
|
+
let U;
|
|
3180
|
+
function X(f) {
|
|
3181
|
+
const { relation: C } = f;
|
|
3182
|
+
return (f.children && f.children.length ? f.children.map((j, L, N) => {
|
|
3183
|
+
const P = U(j);
|
|
3184
|
+
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
3185
|
}) : []).flat();
|
|
3295
3186
|
}
|
|
3296
|
-
|
|
3297
|
-
const { relation:
|
|
3298
|
-
return [...
|
|
3187
|
+
U = (f = t.value) => {
|
|
3188
|
+
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)), j = X(f);
|
|
3189
|
+
return [...w, ...j];
|
|
3299
3190
|
};
|
|
3300
|
-
function
|
|
3301
|
-
const
|
|
3302
|
-
if (
|
|
3303
|
-
|
|
3304
|
-
}),
|
|
3305
|
-
const
|
|
3306
|
-
t.value.relation =
|
|
3307
|
-
} else
|
|
3191
|
+
function x(f) {
|
|
3192
|
+
const C = f || t.value;
|
|
3193
|
+
if (C.children.length && C.children.forEach((w) => {
|
|
3194
|
+
x(w);
|
|
3195
|
+
}), C.level === 0 && !C.items.length && C.children.length === 1) {
|
|
3196
|
+
const w = C.children[0];
|
|
3197
|
+
t.value.relation = w.relation, I(w);
|
|
3198
|
+
} else C.items.length === 0 && C.children.length <= 1 && I(C);
|
|
3199
|
+
}
|
|
3200
|
+
function D(f) {
|
|
3201
|
+
const C = e.get(f.conditionId);
|
|
3202
|
+
C && (C.items = C.items.filter((w) => w.conditionId !== f.conditionId), e.delete(f.conditionId), x(), l());
|
|
3308
3203
|
}
|
|
3309
3204
|
return {
|
|
3310
3205
|
addCondition: k,
|
|
3311
|
-
changeGroupRelation:
|
|
3206
|
+
changeGroupRelation: G,
|
|
3312
3207
|
conditionGroupMap: e,
|
|
3313
|
-
getConditions:
|
|
3314
|
-
group:
|
|
3208
|
+
getConditions: U,
|
|
3209
|
+
group: b,
|
|
3315
3210
|
groupParentMap: n,
|
|
3316
|
-
insertConditionTo:
|
|
3211
|
+
insertConditionTo: O,
|
|
3317
3212
|
loadConditionGroup: v,
|
|
3318
|
-
refresh:
|
|
3319
|
-
removeCondition:
|
|
3213
|
+
refresh: l,
|
|
3214
|
+
removeCondition: D,
|
|
3320
3215
|
rootGroup: t,
|
|
3321
|
-
unGroup:
|
|
3216
|
+
unGroup: I
|
|
3322
3217
|
};
|
|
3323
3218
|
}
|
|
3324
3219
|
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) =>
|
|
3220
|
+
const o = u(/* @__PURE__ */ new Set()), a = u(/* @__PURE__ */ new Set()), { conditionGroupMap: r, groupParentMap: l } = n;
|
|
3221
|
+
let i, d;
|
|
3222
|
+
function s(h) {
|
|
3223
|
+
let b = i.level <= h.level ? i : h, I = i.level > h.level ? i : h;
|
|
3224
|
+
const G = [];
|
|
3225
|
+
for (; I && b && I !== b; )
|
|
3226
|
+
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));
|
|
3227
|
+
return G;
|
|
3228
|
+
}
|
|
3229
|
+
function p(h) {
|
|
3230
|
+
a.value.add(h.groupId), h.items.forEach((b) => o.value.add(b.conditionId)), h.children.forEach((b) => p(b));
|
|
3336
3231
|
}
|
|
3337
3232
|
function m(h) {
|
|
3338
3233
|
const { conditionId: b } = h;
|
|
3339
|
-
o.value.add(b),
|
|
3340
|
-
const
|
|
3341
|
-
|
|
3234
|
+
o.value.add(b), i = o.value.size === 0 ? r.get(b) : i;
|
|
3235
|
+
const I = r.get(h.conditionId);
|
|
3236
|
+
s(I).forEach((U) => p(U));
|
|
3342
3237
|
}
|
|
3343
|
-
const v =
|
|
3344
|
-
a.value.delete(h.groupId), h.items.forEach((
|
|
3345
|
-
const b =
|
|
3238
|
+
const v = R(() => o.value.size === 0 && a.value.size === 1), k = function(h) {
|
|
3239
|
+
a.value.delete(h.groupId), h.items.forEach((I) => d(I)), h.children.forEach((I) => !v.value && k(I));
|
|
3240
|
+
const b = l.get(h.groupId);
|
|
3346
3241
|
b && a.value.has(b.groupId) && k(b);
|
|
3347
3242
|
};
|
|
3348
|
-
|
|
3243
|
+
d = function(h) {
|
|
3349
3244
|
const { conditionId: b } = h;
|
|
3350
3245
|
if (o.value.has(b) && o.value.delete(b), a.value.size > 0) {
|
|
3351
|
-
const
|
|
3352
|
-
|
|
3246
|
+
const I = r.get(b);
|
|
3247
|
+
I && a.value.has(I.groupId) && k(I);
|
|
3353
3248
|
}
|
|
3354
3249
|
};
|
|
3355
|
-
function
|
|
3250
|
+
function O(h) {
|
|
3356
3251
|
const { conditionId: b } = h;
|
|
3357
|
-
o.value.size === 0 && (
|
|
3252
|
+
o.value.size === 0 && (i = r.get(b)), o.value.has(b) ? d(h) : m(h);
|
|
3358
3253
|
}
|
|
3359
|
-
function
|
|
3254
|
+
function H() {
|
|
3360
3255
|
const h = [];
|
|
3361
|
-
return
|
|
3256
|
+
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
3257
|
}
|
|
3363
3258
|
function $() {
|
|
3364
3259
|
o.value.clear(), a.value.clear();
|
|
3365
3260
|
}
|
|
3366
|
-
return { clear: $, getSelectedGroupItem:
|
|
3261
|
+
return { clear: $, getSelectedGroupItem: H, selectedItems: o, toggleSelect: O };
|
|
3367
3262
|
}
|
|
3368
3263
|
const fe = /* @__PURE__ */ ee({
|
|
3369
3264
|
name: "FConditionList",
|
|
3370
3265
|
props: Me,
|
|
3371
3266
|
emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
|
|
3372
3267
|
setup(t, e) {
|
|
3373
|
-
const n =
|
|
3268
|
+
const n = u(t.key), o = u(t.conditions), a = Ve(t), {
|
|
3374
3269
|
convertToSingleControl: r,
|
|
3375
|
-
fields:
|
|
3376
|
-
fieldMap:
|
|
3377
|
-
loadFieldConfigs:
|
|
3378
|
-
} = a,
|
|
3379
|
-
addCondition:
|
|
3270
|
+
fields: l,
|
|
3271
|
+
fieldMap: i,
|
|
3272
|
+
loadFieldConfigs: d
|
|
3273
|
+
} = a, s = Ba(), {
|
|
3274
|
+
addCondition: p,
|
|
3380
3275
|
changeGroupRelation: m,
|
|
3381
3276
|
getConditions: v,
|
|
3382
3277
|
group: k,
|
|
3383
|
-
insertConditionTo:
|
|
3384
|
-
loadConditionGroup:
|
|
3278
|
+
insertConditionTo: O,
|
|
3279
|
+
loadConditionGroup: H,
|
|
3385
3280
|
refresh: $,
|
|
3386
3281
|
removeCondition: h,
|
|
3387
3282
|
rootGroup: b,
|
|
3388
|
-
unGroup:
|
|
3389
|
-
} =
|
|
3390
|
-
createConditionValue:
|
|
3391
|
-
} = Ie(),
|
|
3392
|
-
selectedItems:
|
|
3393
|
-
toggleSelect:
|
|
3394
|
-
} =
|
|
3395
|
-
getCompareOperators:
|
|
3283
|
+
unGroup: I
|
|
3284
|
+
} = s, {
|
|
3285
|
+
createConditionValue: G
|
|
3286
|
+
} = Ie(), U = Fa(t, e, s), {
|
|
3287
|
+
selectedItems: X,
|
|
3288
|
+
toggleSelect: x
|
|
3289
|
+
} = U, {
|
|
3290
|
+
getCompareOperators: D
|
|
3396
3291
|
} = ka(t, e, a);
|
|
3397
|
-
|
|
3398
|
-
function f(
|
|
3399
|
-
var
|
|
3400
|
-
const
|
|
3292
|
+
d(!1), l.value = r(l.value), H(o.value);
|
|
3293
|
+
function f(g) {
|
|
3294
|
+
var A;
|
|
3295
|
+
const V = ((A = i.get(g.fieldCode)) == null ? void 0 : A.editor) || {
|
|
3401
3296
|
type: "text"
|
|
3402
3297
|
};
|
|
3403
|
-
|
|
3298
|
+
g.value = G(V.type, void 0), e.emit("labelCodeChange", g);
|
|
3404
3299
|
}
|
|
3405
|
-
function
|
|
3406
|
-
e.emit("compareTypeChange",
|
|
3300
|
+
function C(g, V) {
|
|
3301
|
+
e.emit("compareTypeChange", V);
|
|
3407
3302
|
}
|
|
3408
|
-
function
|
|
3303
|
+
function w() {
|
|
3409
3304
|
}
|
|
3410
3305
|
e.expose({
|
|
3411
3306
|
getConditions: v
|
|
3412
3307
|
});
|
|
3413
|
-
function
|
|
3414
|
-
e.emit("valueChange",
|
|
3308
|
+
function j(g, V) {
|
|
3309
|
+
e.emit("valueChange", g, V);
|
|
3415
3310
|
}
|
|
3416
|
-
function g
|
|
3417
|
-
return
|
|
3418
|
-
var
|
|
3419
|
-
return
|
|
3311
|
+
function L(g) {
|
|
3312
|
+
return g.items.map((V) => {
|
|
3313
|
+
var A;
|
|
3314
|
+
return c("div", {
|
|
3420
3315
|
class: "condition-list-item",
|
|
3421
|
-
key:
|
|
3422
|
-
}, [
|
|
3316
|
+
key: V.conditionId
|
|
3317
|
+
}, [c("div", {
|
|
3423
3318
|
class: "condition-list-item-type mr-3"
|
|
3424
|
-
}, [
|
|
3319
|
+
}, [c(he, {
|
|
3425
3320
|
"value-field": "labelCode",
|
|
3426
3321
|
"text-field": "name",
|
|
3427
3322
|
"id-field": "id",
|
|
3428
|
-
data:
|
|
3429
|
-
modelValue:
|
|
3430
|
-
"onUpdate:modelValue": (
|
|
3431
|
-
onChange: (
|
|
3432
|
-
}, null)]),
|
|
3323
|
+
data: l.value,
|
|
3324
|
+
modelValue: V.fieldCode,
|
|
3325
|
+
"onUpdate:modelValue": (q) => V.fieldCode = q,
|
|
3326
|
+
onChange: (q) => f(V)
|
|
3327
|
+
}, null)]), c("div", {
|
|
3433
3328
|
class: "condition-list-item-compare mr-3"
|
|
3434
|
-
}, [
|
|
3329
|
+
}, [c(he, {
|
|
3435
3330
|
"value-field": "value",
|
|
3436
3331
|
"text-field": "name",
|
|
3437
3332
|
"id-field": "id",
|
|
3438
|
-
data:
|
|
3439
|
-
modelValue:
|
|
3440
|
-
"onUpdate:modelValue": (
|
|
3441
|
-
onChange: (
|
|
3442
|
-
}, null)]),
|
|
3333
|
+
data: D(V),
|
|
3334
|
+
modelValue: V.compareType,
|
|
3335
|
+
"onUpdate:modelValue": (q) => V.compareType = q,
|
|
3336
|
+
onChange: (q) => C(q, V)
|
|
3337
|
+
}, null)]), c("div", {
|
|
3443
3338
|
class: "condition-list-item-control mr-3"
|
|
3444
|
-
}, [
|
|
3445
|
-
editor: (
|
|
3339
|
+
}, [c(Go, {
|
|
3340
|
+
editor: (A = i.get(V.fieldCode)) == null ? void 0 : A.editor,
|
|
3446
3341
|
showLabel: !1,
|
|
3447
|
-
modelValue:
|
|
3448
|
-
"onUpdate:modelValue": (
|
|
3449
|
-
onChange: (
|
|
3450
|
-
|
|
3342
|
+
modelValue: V.value.value,
|
|
3343
|
+
"onUpdate:modelValue": (q) => V.value.value = q,
|
|
3344
|
+
onChange: (q) => {
|
|
3345
|
+
j(q, V);
|
|
3451
3346
|
}
|
|
3452
|
-
}, null)]),
|
|
3347
|
+
}, null)]), c("div", {
|
|
3453
3348
|
class: "condition-list-item-extend"
|
|
3454
|
-
}, [
|
|
3349
|
+
}, [c("span", {
|
|
3455
3350
|
class: "f-icon f-icon-plus-sm mr-2",
|
|
3456
|
-
onClick: () =>
|
|
3457
|
-
}, null),
|
|
3351
|
+
onClick: () => O(V)
|
|
3352
|
+
}, null), c("span", {
|
|
3458
3353
|
class: "f-icon f-icon-minus-sm",
|
|
3459
|
-
onClick: () => h(
|
|
3460
|
-
}, null)]),
|
|
3354
|
+
onClick: () => h(V)
|
|
3355
|
+
}, null)]), c("div", {
|
|
3461
3356
|
class: "custom-control custom-checkbox"
|
|
3462
|
-
}, [
|
|
3357
|
+
}, [c("input", {
|
|
3463
3358
|
title: "selection",
|
|
3464
3359
|
class: "custom-control-input",
|
|
3465
3360
|
type: "checkbox",
|
|
3466
|
-
checked:
|
|
3467
|
-
}, null),
|
|
3361
|
+
checked: X.value.has(V.conditionId)
|
|
3362
|
+
}, null), c("label", {
|
|
3468
3363
|
class: "custom-control-label",
|
|
3469
|
-
onClick: () =>
|
|
3364
|
+
onClick: () => x(V)
|
|
3470
3365
|
}, null)])]);
|
|
3471
3366
|
});
|
|
3472
3367
|
}
|
|
3473
|
-
function
|
|
3474
|
-
return
|
|
3368
|
+
function N(g) {
|
|
3369
|
+
return c("div", {
|
|
3475
3370
|
class: "condition-list-relation"
|
|
3476
|
-
}, [
|
|
3371
|
+
}, [c("span", {
|
|
3477
3372
|
class: "condition-list-relation-close f-icon-filter-cancel btn-link",
|
|
3478
|
-
onClick: () =>
|
|
3479
|
-
}, null),
|
|
3373
|
+
onClick: () => I(g)
|
|
3374
|
+
}, null), c("span", {
|
|
3480
3375
|
class: "condition-list-relation-text btn-link",
|
|
3481
|
-
onClick: () => m(
|
|
3482
|
-
}, [
|
|
3376
|
+
onClick: () => m(g)
|
|
3377
|
+
}, [g.relation === 1 ? "与" : "或"])]);
|
|
3483
3378
|
}
|
|
3484
|
-
function
|
|
3485
|
-
return
|
|
3379
|
+
function P(g) {
|
|
3380
|
+
return c("div", {
|
|
3486
3381
|
class: "condition-list-content"
|
|
3487
|
-
}, [
|
|
3382
|
+
}, [c("div", {
|
|
3488
3383
|
class: "condition-list-content-group"
|
|
3489
|
-
}, [g
|
|
3384
|
+
}, [L(g), g.children && g.children.map((V) => P(V))]), N(g)]);
|
|
3490
3385
|
}
|
|
3491
3386
|
function Y() {
|
|
3492
|
-
k(
|
|
3387
|
+
k(U.getSelectedGroupItem()), U.clear();
|
|
3493
3388
|
}
|
|
3494
|
-
function
|
|
3495
|
-
return
|
|
3389
|
+
function y() {
|
|
3390
|
+
return c("div", {
|
|
3496
3391
|
class: "condition-list-bottom"
|
|
3497
|
-
}, [
|
|
3392
|
+
}, [c("div", {
|
|
3498
3393
|
class: "add-condition-btn mb-1 mr-3",
|
|
3499
|
-
onClick:
|
|
3500
|
-
}, [
|
|
3394
|
+
onClick: p
|
|
3395
|
+
}, [c("span", {
|
|
3501
3396
|
class: "f-icon f-icon-filter-add"
|
|
3502
|
-
}, null),
|
|
3397
|
+
}, null), c("span", {
|
|
3503
3398
|
class: "ml-1"
|
|
3504
|
-
}, [le("添加条件")])]),
|
|
3399
|
+
}, [le("添加条件")])]), c("div", {
|
|
3505
3400
|
class: "add-condition-btn mb-1",
|
|
3506
3401
|
onClick: Y
|
|
3507
|
-
}, [
|
|
3402
|
+
}, [c("span", {
|
|
3508
3403
|
class: "f-icon f-icon-filter-grouping"
|
|
3509
|
-
}, null),
|
|
3404
|
+
}, null), c("span", {
|
|
3510
3405
|
class: "ml-1"
|
|
3511
|
-
}, [le("生成条件组")])]),
|
|
3406
|
+
}, [le("生成条件组")])]), c("div", {
|
|
3512
3407
|
class: "condition-list-reset add-condition-btn",
|
|
3513
|
-
onClick:
|
|
3408
|
+
onClick: w
|
|
3514
3409
|
}, [le("重置")])]);
|
|
3515
3410
|
}
|
|
3516
|
-
return () =>
|
|
3411
|
+
return () => c("div", {
|
|
3517
3412
|
class: "condition-list",
|
|
3518
3413
|
key: n.value
|
|
3519
|
-
}, [
|
|
3414
|
+
}, [c("div", {
|
|
3520
3415
|
class: "condition-list-body"
|
|
3521
|
-
}, [
|
|
3416
|
+
}, [P(b.value)]), y()]);
|
|
3522
3417
|
}
|
|
3523
3418
|
});
|
|
3524
3419
|
fe.install = (t) => {
|
|
@@ -3528,7 +3423,7 @@ export {
|
|
|
3528
3423
|
wa as EnumType,
|
|
3529
3424
|
ke as FConditionFields,
|
|
3530
3425
|
fe as FConditionList,
|
|
3531
|
-
|
|
3426
|
+
He as ValueType,
|
|
3532
3427
|
Me as conditionProps,
|
|
3533
3428
|
fe as default,
|
|
3534
3429
|
Ba as useCondition
|