@farris/ui-vue 1.2.7 → 1.2.9
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 +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,70 +1,71 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as I, computed as
|
|
5
|
-
import
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var ke = (t, e, n) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var y = (t, e, n) => ke(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { ref as I, computed as O, watch as W, defineComponent as X, onBeforeUnmount as we, createVNode as k, createTextVNode as Y, onMounted as _, nextTick as re, reactive as xe, withDirectives as Fe, resolveDirective as Be, Fragment as ae, mergeProps as Ie } from "vue";
|
|
5
|
+
import Se, { FDynamicFormGroup as Ve } from "../dynamic-form/index.esm.js";
|
|
6
|
+
import { cloneDeep as J } from "lodash-es";
|
|
7
|
+
import te from "../combo-list/index.esm.js";
|
|
8
8
|
import "bignumber.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import Ft from "
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import "
|
|
67
|
-
|
|
9
|
+
import Ee, { useNumber as Me, useFormat as Ne, useSpinner as Oe, useTextBox as Pe } from "../number-spinner/index.esm.js";
|
|
10
|
+
import je from "../accordion/index.esm.js";
|
|
11
|
+
import Le from "../avatar/index.esm.js";
|
|
12
|
+
import Re from "../button-edit/index.esm.js";
|
|
13
|
+
import Ae from "../button-group/index.esm.js";
|
|
14
|
+
import $e from "../calendar/index.esm.js";
|
|
15
|
+
import Ge from "../capsule/index.esm.js";
|
|
16
|
+
import qe from "../checkbox/index.esm.js";
|
|
17
|
+
import De from "../combo-tree/index.esm.js";
|
|
18
|
+
import Ue from "../component/index.esm.js";
|
|
19
|
+
import We from "../color-picker/index.esm.js";
|
|
20
|
+
import He from "../content-container/index.esm.js";
|
|
21
|
+
import ze from "../date-picker/index.esm.js";
|
|
22
|
+
import Qe from "../data-grid/index.esm.js";
|
|
23
|
+
import Ze from "../dropdown/index.esm.js";
|
|
24
|
+
import Je from "../events-editor/index.esm.js";
|
|
25
|
+
import Xe from "../filter-bar/index.esm.js";
|
|
26
|
+
import Ye from "../field-selector/index.esm.js";
|
|
27
|
+
import _e from "../image-cropper/index.esm.js";
|
|
28
|
+
import Ke from "../input-group/index.esm.js";
|
|
29
|
+
import et from "../layout/index.esm.js";
|
|
30
|
+
import tt from "../list-nav/index.esm.js";
|
|
31
|
+
import nt from "../list-view/index.esm.js";
|
|
32
|
+
import ot from "../lookup/index.esm.js";
|
|
33
|
+
import rt from "../mapping-editor/index.esm.js";
|
|
34
|
+
import at from "../nav/index.esm.js";
|
|
35
|
+
import it from "../number-range/index.esm.js";
|
|
36
|
+
import st from "../order/index.esm.js";
|
|
37
|
+
import lt from "../page-header/index.esm.js";
|
|
38
|
+
import ut from "../page-footer/index.esm.js";
|
|
39
|
+
import ct from "../pagination/index.esm.js";
|
|
40
|
+
import dt from "../progress/index.esm.js";
|
|
41
|
+
import pt from "../query-solution/index.esm.js";
|
|
42
|
+
import mt from "../radio-group/index.esm.js";
|
|
43
|
+
import ft from "../rate/index.esm.js";
|
|
44
|
+
import gt from "../response-toolbar/index.esm.js";
|
|
45
|
+
import ht from "../response-layout/index.esm.js";
|
|
46
|
+
import vt from "../response-layout-editor/index.esm.js";
|
|
47
|
+
import yt from "../search-box/index.esm.js";
|
|
48
|
+
import bt from "../section/index.esm.js";
|
|
49
|
+
import Ct from "../smoke-detector/index.esm.js";
|
|
50
|
+
import Tt from "../splitter/index.esm.js";
|
|
51
|
+
import kt from "../step/index.esm.js";
|
|
52
|
+
import wt from "../switch/index.esm.js";
|
|
53
|
+
import xt from "../tabs/index.esm.js";
|
|
54
|
+
import Ft from "../tags/index.esm.js";
|
|
55
|
+
import Bt from "../text/index.esm.js";
|
|
56
|
+
import It from "../time-picker/index.esm.js";
|
|
57
|
+
import St from "../transfer/index.esm.js";
|
|
58
|
+
import Vt from "../tree-view/index.esm.js";
|
|
59
|
+
import Et from "../uploader/index.esm.js";
|
|
60
|
+
import Mt from "../verify-detail/index.esm.js";
|
|
61
|
+
import Nt from "../weather/index.esm.js";
|
|
62
|
+
import Ot from "../video/index.esm.js";
|
|
63
|
+
import Pt from "../textarea/index.esm.js";
|
|
64
|
+
import jt from "../schema-selector/index.esm.js";
|
|
65
|
+
import Lt from "../tree-grid/index.esm.js";
|
|
66
|
+
import "../external-container/index.esm.js";
|
|
67
|
+
import "../dynamic-resolver/index.esm.js";
|
|
68
|
+
const ce = {
|
|
68
69
|
conditions: { type: Array, default: [] },
|
|
69
70
|
fields: { type: Array, default: [] },
|
|
70
71
|
key: { type: String, default: "" },
|
|
@@ -73,18 +74,18 @@ const ae = {
|
|
|
73
74
|
*/
|
|
74
75
|
isControlInline: { type: Boolean, default: !0 }
|
|
75
76
|
};
|
|
76
|
-
class
|
|
77
|
-
constructor(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.value =
|
|
77
|
+
class Rt {
|
|
78
|
+
constructor(e = { value: [] }) {
|
|
79
|
+
y(this, "editorType", "check-box");
|
|
80
|
+
y(this, "value");
|
|
81
|
+
y(this, "valueType", "boolean");
|
|
82
|
+
this.value = e.value;
|
|
82
83
|
}
|
|
83
84
|
clear() {
|
|
84
85
|
this.value = [];
|
|
85
86
|
}
|
|
86
|
-
setValue(
|
|
87
|
-
this.value =
|
|
87
|
+
setValue(e) {
|
|
88
|
+
this.value = e;
|
|
88
89
|
}
|
|
89
90
|
getValue() {
|
|
90
91
|
return this.value;
|
|
@@ -93,49 +94,49 @@ class Ot {
|
|
|
93
94
|
return this.value.length === 0;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
class
|
|
97
|
-
constructor(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.textValue =
|
|
97
|
+
class At {
|
|
98
|
+
constructor(e = { textValue: "", value: "", valueField: "" }) {
|
|
99
|
+
y(this, "editorType", "combo-lookup");
|
|
100
|
+
y(this, "textValue");
|
|
101
|
+
y(this, "value");
|
|
102
|
+
y(this, "valueField");
|
|
103
|
+
y(this, "valueType", "text");
|
|
104
|
+
this.textValue = e.textValue, this.value = e.value, this.valueField = e.valueField;
|
|
104
105
|
}
|
|
105
106
|
clear() {
|
|
106
107
|
this.value = "", this.valueField = "", this.textValue = "";
|
|
107
108
|
}
|
|
108
|
-
getPropValue(
|
|
109
|
+
getPropValue(e, n) {
|
|
109
110
|
if (n.length > 1) {
|
|
110
111
|
const o = n.shift();
|
|
111
|
-
return
|
|
112
|
+
return e[o] ? this.getPropValue(e[o], n) : null;
|
|
112
113
|
}
|
|
113
|
-
return
|
|
114
|
+
return e[n[0]];
|
|
114
115
|
}
|
|
115
|
-
getTextValue(
|
|
116
|
-
const n =
|
|
116
|
+
getTextValue(e) {
|
|
117
|
+
const n = e.split("."), o = this.value.split(",").map((r) => this.getPropValue(r, J(n)));
|
|
117
118
|
return o && o.length ? o.join(",") : "";
|
|
118
119
|
}
|
|
119
120
|
getValue() {
|
|
120
|
-
const
|
|
121
|
+
const e = this.valueField.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, J(e)));
|
|
121
122
|
return n && n.length ? n.join(",") : "";
|
|
122
123
|
}
|
|
123
|
-
setValue(
|
|
124
|
+
setValue(e) {
|
|
124
125
|
throw new Error("Method not implemented.");
|
|
125
126
|
}
|
|
126
127
|
isEmpty() {
|
|
127
128
|
return !this.valueField;
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
|
-
class
|
|
131
|
-
constructor(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
this.value =
|
|
131
|
+
class $t {
|
|
132
|
+
constructor(e = { value: "" }) {
|
|
133
|
+
y(this, "editorType", "date-picker");
|
|
134
|
+
y(this, "value");
|
|
135
|
+
y(this, "valueType", "datetime");
|
|
136
|
+
this.value = e.value;
|
|
136
137
|
}
|
|
137
|
-
setValue(
|
|
138
|
-
this.value =
|
|
138
|
+
setValue(e) {
|
|
139
|
+
this.value = e.formatted;
|
|
139
140
|
}
|
|
140
141
|
getValue() {
|
|
141
142
|
return this.value;
|
|
@@ -147,13 +148,13 @@ class Lt {
|
|
|
147
148
|
this.value = void 0;
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
|
-
class
|
|
151
|
-
constructor(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.begin =
|
|
151
|
+
class ie {
|
|
152
|
+
constructor(e = { begin: "", end: "" }) {
|
|
153
|
+
y(this, "editorType", "date-range");
|
|
154
|
+
y(this, "begin", "");
|
|
155
|
+
y(this, "end", "");
|
|
156
|
+
y(this, "valueType", "datetime");
|
|
157
|
+
this.begin = e.begin, this.end = e.end;
|
|
157
158
|
}
|
|
158
159
|
clear() {
|
|
159
160
|
this.begin = "", this.end = "";
|
|
@@ -161,19 +162,19 @@ class oe {
|
|
|
161
162
|
getValue() {
|
|
162
163
|
return !this.begin || !this.end ? "" : `${this.begin}~${this.end}`;
|
|
163
164
|
}
|
|
164
|
-
setValue(
|
|
165
|
-
|
|
165
|
+
setValue(e) {
|
|
166
|
+
e.dataRange ? (this.begin = e.dataRange.split(e.delimiter)[0], this.end = e.dataRange.split(e.delimiter)[1]) : this.clear();
|
|
166
167
|
}
|
|
167
168
|
isEmpty() {
|
|
168
169
|
return !this.begin || !this.end;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
|
-
class
|
|
172
|
-
constructor(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this.value =
|
|
172
|
+
class Gt {
|
|
173
|
+
constructor(e = { value: "" }) {
|
|
174
|
+
y(this, "editorType", "datetime-picker");
|
|
175
|
+
y(this, "value");
|
|
176
|
+
y(this, "valueType", "datetime");
|
|
177
|
+
this.value = e.value;
|
|
177
178
|
}
|
|
178
179
|
clear() {
|
|
179
180
|
this.value = void 0;
|
|
@@ -181,22 +182,22 @@ class At {
|
|
|
181
182
|
getValue() {
|
|
182
183
|
return this.value;
|
|
183
184
|
}
|
|
184
|
-
setValue(
|
|
185
|
-
this.value =
|
|
185
|
+
setValue(e) {
|
|
186
|
+
this.value = e.formatted;
|
|
186
187
|
}
|
|
187
188
|
isEmpty() {
|
|
188
189
|
return !this.value;
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
|
-
class
|
|
192
|
+
class qt {
|
|
192
193
|
// 旧结构无,新结构为选中的value值,多选是以,分割的字符串
|
|
193
|
-
constructor(
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
constructor(e = { value: "", dispalyText: "" }) {
|
|
195
|
+
y(this, "editorType", "combo-list");
|
|
196
|
+
y(this, "value");
|
|
196
197
|
// 旧结构{Type: '', Content: {value: string, name: string}} 新结构Array[{value: string, name: string}]
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this.displayText =
|
|
198
|
+
y(this, "valueType", "enum");
|
|
199
|
+
y(this, "displayText");
|
|
200
|
+
this.displayText = e.dispalyText, this.value = e.value;
|
|
200
201
|
}
|
|
201
202
|
clear() {
|
|
202
203
|
this.value = "", this.displayText = "";
|
|
@@ -204,97 +205,97 @@ class Nt {
|
|
|
204
205
|
getValue() {
|
|
205
206
|
return this.displayText;
|
|
206
207
|
}
|
|
207
|
-
setValue(
|
|
208
|
-
this.displayText =
|
|
208
|
+
setValue(e) {
|
|
209
|
+
this.displayText = e.dispalyText, this.value = e.value;
|
|
209
210
|
}
|
|
210
211
|
isEmpty() {
|
|
211
212
|
return !this.displayText;
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
|
-
class
|
|
215
|
-
constructor(
|
|
216
|
-
|
|
215
|
+
class Dt {
|
|
216
|
+
constructor(e = { value: [], displayText: "", displayField: "", isInputText: !1 }) {
|
|
217
|
+
y(this, "editorType", "input-group");
|
|
217
218
|
// 通过弹窗返回的若干个值对象构成的数组
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
y(this, "value");
|
|
220
|
+
y(this, "valueType", "text");
|
|
220
221
|
// 控件内显示的值
|
|
221
|
-
|
|
222
|
+
y(this, "displayText");
|
|
222
223
|
// 弹窗模式下,取列表中哪个字段的值映射到当前字段
|
|
223
|
-
|
|
224
|
+
y(this, "valueField");
|
|
224
225
|
// 是否是手动输入的值
|
|
225
|
-
|
|
226
|
-
this.value =
|
|
226
|
+
y(this, "isInputText");
|
|
227
|
+
this.value = e.value, this.displayText = e.displayText, this.valueField = e.displayField, this.isInputText = e.isInputText;
|
|
227
228
|
}
|
|
228
229
|
clear() {
|
|
229
230
|
this.value = [], this.displayText = "", this.valueField = "";
|
|
230
231
|
}
|
|
231
|
-
getPropValue(
|
|
232
|
+
getPropValue(e, n) {
|
|
232
233
|
if (n.length > 1) {
|
|
233
234
|
const o = n.shift();
|
|
234
|
-
return
|
|
235
|
+
return e[o] ? this.getPropValue(e[o], n) : "";
|
|
235
236
|
}
|
|
236
|
-
return
|
|
237
|
+
return e[n[0]];
|
|
237
238
|
}
|
|
238
|
-
getTextValue(
|
|
239
|
-
const n =
|
|
239
|
+
getTextValue(e) {
|
|
240
|
+
const n = e.split("."), o = this.value.map((r) => this.getPropValue(r, J(n)));
|
|
240
241
|
return o && o.length ? o.join(",") : "";
|
|
241
242
|
}
|
|
242
243
|
getValue() {
|
|
243
|
-
const
|
|
244
|
+
const e = this.valueField.split(".") || [], n = this.value.map((o) => this.getPropValue(o, J(e)));
|
|
244
245
|
return n && n.length ? n.join(",") : "";
|
|
245
246
|
}
|
|
246
|
-
setValue(
|
|
247
|
+
setValue(e) {
|
|
247
248
|
throw new Error("Method not implemented.");
|
|
248
249
|
}
|
|
249
250
|
isEmpty() {
|
|
250
251
|
return !this.displayText;
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
|
-
class
|
|
254
|
-
constructor(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
254
|
+
class Ut {
|
|
255
|
+
constructor(e = { textValue: "", value: [], valueField: "", isInputText: !1 }) {
|
|
256
|
+
y(this, "editorType", "lookup");
|
|
257
|
+
y(this, "textValue");
|
|
258
|
+
y(this, "value");
|
|
259
|
+
y(this, "valueField");
|
|
260
|
+
y(this, "valueType", "text");
|
|
260
261
|
// 帮助的值是否为手动输入的任意值,对应帮助的任意输入属性nosearch
|
|
261
|
-
|
|
262
|
-
this.value =
|
|
262
|
+
y(this, "isInputText");
|
|
263
|
+
this.value = e.value, this.valueField = e.valueField, this.textValue = e.textValue, this.isInputText = e.isInputText;
|
|
263
264
|
}
|
|
264
265
|
clear() {
|
|
265
266
|
this.value = [], this.valueField = "", this.textValue = "";
|
|
266
267
|
}
|
|
267
|
-
getPropValue(
|
|
268
|
+
getPropValue(e, n) {
|
|
268
269
|
if (n.length > 1) {
|
|
269
270
|
const o = n.shift();
|
|
270
|
-
return
|
|
271
|
+
return e[o] ? this.getPropValue(e[o], n) : null;
|
|
271
272
|
}
|
|
272
|
-
return
|
|
273
|
+
return e[n[0]];
|
|
273
274
|
}
|
|
274
|
-
getTextValue(
|
|
275
|
-
const n =
|
|
275
|
+
getTextValue(e) {
|
|
276
|
+
const n = e.split("."), o = this.value.map((r) => this.getPropValue(r, n));
|
|
276
277
|
return o && o.length ? o.join(",") : "";
|
|
277
278
|
}
|
|
278
279
|
getValue() {
|
|
279
|
-
const
|
|
280
|
+
const e = this.valueField.split("."), n = this.value.map((o) => this.getPropValue(o, e));
|
|
280
281
|
return n && n.length ? n.join(",") : "";
|
|
281
282
|
}
|
|
282
|
-
setValue(
|
|
283
|
+
setValue(e) {
|
|
283
284
|
throw new Error("Method not implemented.");
|
|
284
285
|
}
|
|
285
286
|
isEmpty() {
|
|
286
287
|
return !this.value.length;
|
|
287
288
|
}
|
|
288
289
|
}
|
|
289
|
-
class
|
|
290
|
-
constructor(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
this.value =
|
|
290
|
+
class Wt {
|
|
291
|
+
constructor(e = { value: "" }) {
|
|
292
|
+
y(this, "editorType", "month-picker");
|
|
293
|
+
y(this, "value");
|
|
294
|
+
y(this, "valueType", "datetime");
|
|
295
|
+
this.value = e.value;
|
|
295
296
|
}
|
|
296
|
-
setValue(
|
|
297
|
-
this.value =
|
|
297
|
+
setValue(e) {
|
|
298
|
+
this.value = e.formatted;
|
|
298
299
|
}
|
|
299
300
|
getValue() {
|
|
300
301
|
return this.value;
|
|
@@ -306,13 +307,13 @@ class Rt {
|
|
|
306
307
|
return !this.value;
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
|
-
class
|
|
310
|
-
constructor(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
this.begin =
|
|
310
|
+
class Ht {
|
|
311
|
+
constructor(e = { begin: "", end: "" }) {
|
|
312
|
+
y(this, "editorType", "month-range");
|
|
313
|
+
y(this, "begin");
|
|
314
|
+
y(this, "end");
|
|
315
|
+
y(this, "valueType", "datetime");
|
|
316
|
+
this.begin = e.begin, this.end = e.end;
|
|
316
317
|
}
|
|
317
318
|
clear() {
|
|
318
319
|
this.begin = "", this.end = "";
|
|
@@ -320,20 +321,20 @@ class qt {
|
|
|
320
321
|
getValue() {
|
|
321
322
|
return !this.begin || !this.end ? "" : `${this.begin}~${this.end}`;
|
|
322
323
|
}
|
|
323
|
-
setValue(
|
|
324
|
-
|
|
324
|
+
setValue(e) {
|
|
325
|
+
e.dataRange ? (this.begin = e.dataRange.split(e.delimiter)[0], this.end = e.dataRange.split(e.delimiter)[1]) : this.clear();
|
|
325
326
|
}
|
|
326
327
|
isEmpty() {
|
|
327
328
|
return !this.begin || !this.end;
|
|
328
329
|
}
|
|
329
330
|
}
|
|
330
|
-
class
|
|
331
|
-
constructor(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.begin =
|
|
331
|
+
class zt {
|
|
332
|
+
constructor(e = { begin: null, end: null }) {
|
|
333
|
+
y(this, "editorType", "number-range");
|
|
334
|
+
y(this, "begin");
|
|
335
|
+
y(this, "end");
|
|
336
|
+
y(this, "valueType", "number");
|
|
337
|
+
this.begin = e.begin == null ? null : parseFloat(e.begin), this.end = e.end == null ? null : parseFloat(e.end);
|
|
337
338
|
}
|
|
338
339
|
clear() {
|
|
339
340
|
this.begin = null, this.end = null;
|
|
@@ -344,19 +345,19 @@ class Dt {
|
|
|
344
345
|
end: this.end
|
|
345
346
|
};
|
|
346
347
|
}
|
|
347
|
-
setValue(
|
|
348
|
-
this.begin =
|
|
348
|
+
setValue(e) {
|
|
349
|
+
this.begin = e.begin == null ? null : parseFloat(e.begin), this.end = e.end == null ? null : parseFloat(e.end);
|
|
349
350
|
}
|
|
350
351
|
isEmpty() {
|
|
351
352
|
return this.begin == null && this.end == null;
|
|
352
353
|
}
|
|
353
354
|
}
|
|
354
|
-
class
|
|
355
|
-
constructor(
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
this.value =
|
|
355
|
+
class Qt {
|
|
356
|
+
constructor(e = { value: "" }) {
|
|
357
|
+
y(this, "editorType", "number-spinner");
|
|
358
|
+
y(this, "value");
|
|
359
|
+
y(this, "valueType", "number");
|
|
360
|
+
this.value = e.value == null ? null : parseFloat(e.value);
|
|
360
361
|
}
|
|
361
362
|
clear() {
|
|
362
363
|
this.value = void 0;
|
|
@@ -364,19 +365,19 @@ class Wt {
|
|
|
364
365
|
getValue() {
|
|
365
366
|
return this.value;
|
|
366
367
|
}
|
|
367
|
-
setValue(
|
|
368
|
-
this.value = isNaN(parseFloat(
|
|
368
|
+
setValue(e) {
|
|
369
|
+
this.value = isNaN(parseFloat(e)) ? null : e;
|
|
369
370
|
}
|
|
370
371
|
isEmpty() {
|
|
371
372
|
return this.value == null;
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
|
-
class
|
|
375
|
-
constructor(
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
this.value =
|
|
375
|
+
class Zt {
|
|
376
|
+
constructor(e = { value: null }) {
|
|
377
|
+
y(this, "editorType", "radio-group");
|
|
378
|
+
y(this, "value");
|
|
379
|
+
y(this, "valueType", "enum");
|
|
380
|
+
this.value = e.value;
|
|
380
381
|
}
|
|
381
382
|
clear() {
|
|
382
383
|
this.value = void 0;
|
|
@@ -384,19 +385,19 @@ class zt {
|
|
|
384
385
|
getValue() {
|
|
385
386
|
return this.value;
|
|
386
387
|
}
|
|
387
|
-
setValue(
|
|
388
|
-
this.value =
|
|
388
|
+
setValue(e) {
|
|
389
|
+
this.value = e;
|
|
389
390
|
}
|
|
390
391
|
isEmpty() {
|
|
391
392
|
return !this.value;
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
|
-
class
|
|
395
|
-
constructor(
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
this.value =
|
|
395
|
+
class de {
|
|
396
|
+
constructor(e = { value: "" }) {
|
|
397
|
+
y(this, "editorType", "text");
|
|
398
|
+
y(this, "value");
|
|
399
|
+
y(this, "valueType", "text");
|
|
400
|
+
this.value = e.value;
|
|
400
401
|
}
|
|
401
402
|
clear() {
|
|
402
403
|
this.value = void 0;
|
|
@@ -404,271 +405,432 @@ class le {
|
|
|
404
405
|
getValue() {
|
|
405
406
|
return this.value;
|
|
406
407
|
}
|
|
407
|
-
setValue(
|
|
408
|
-
this.value =
|
|
408
|
+
setValue(e) {
|
|
409
|
+
this.value = e;
|
|
409
410
|
}
|
|
410
411
|
isEmpty() {
|
|
411
412
|
return !this.value;
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
-
function e
|
|
416
|
-
switch (
|
|
415
|
+
function pe() {
|
|
416
|
+
function t(e, n) {
|
|
417
|
+
switch (e) {
|
|
417
418
|
case "check-box":
|
|
418
|
-
return new
|
|
419
|
+
return new Rt(n);
|
|
419
420
|
case "combo-list":
|
|
420
|
-
return new
|
|
421
|
+
return new qt(n);
|
|
421
422
|
case "combo-lookup":
|
|
422
|
-
return new
|
|
423
|
+
return new At(n);
|
|
423
424
|
case "input-group":
|
|
424
|
-
return new
|
|
425
|
+
return new Dt(n);
|
|
425
426
|
case "date-picker":
|
|
426
|
-
return new
|
|
427
|
+
return new $t(n);
|
|
427
428
|
case "date-range":
|
|
428
|
-
return new
|
|
429
|
+
return new ie(n);
|
|
429
430
|
case "datetime-picker":
|
|
430
|
-
return new
|
|
431
|
+
return new Gt(n);
|
|
431
432
|
case "datetime-range":
|
|
432
|
-
return new
|
|
433
|
+
return new ie(n);
|
|
433
434
|
case "lookup":
|
|
434
|
-
return new
|
|
435
|
+
return new Ut(n);
|
|
435
436
|
case "month-picker":
|
|
436
|
-
return new
|
|
437
|
+
return new Wt(n);
|
|
437
438
|
case "month-range":
|
|
438
|
-
return new
|
|
439
|
+
return new Ht(n);
|
|
439
440
|
case "number-range":
|
|
440
|
-
return new
|
|
441
|
+
return new zt(n);
|
|
441
442
|
case "number-spinner":
|
|
442
|
-
return new
|
|
443
|
+
return new Qt(n);
|
|
443
444
|
case "radio-group":
|
|
444
|
-
return new
|
|
445
|
+
return new Zt(n);
|
|
445
446
|
default:
|
|
446
|
-
return new
|
|
447
|
+
return new de(n);
|
|
447
448
|
}
|
|
448
449
|
}
|
|
449
|
-
return { createConditionValue:
|
|
450
|
+
return { createConditionValue: t };
|
|
450
451
|
}
|
|
451
|
-
function
|
|
452
|
-
const n = I(
|
|
453
|
-
function
|
|
454
|
-
switch (
|
|
452
|
+
function me(t, e) {
|
|
453
|
+
const n = I(t.fields), o = I([]), r = /* @__PURE__ */ new Map(), { createConditionValue: c } = pe();
|
|
454
|
+
function l(s) {
|
|
455
|
+
switch (s.editor ? s.editor.type : "input-group") {
|
|
455
456
|
case "date-range":
|
|
456
|
-
|
|
457
|
+
s.editor.type = "date-picker";
|
|
457
458
|
break;
|
|
458
459
|
case "datetime-range":
|
|
459
|
-
|
|
460
|
+
s.editor.type = "datetime-picker";
|
|
460
461
|
break;
|
|
461
462
|
case "number-range":
|
|
462
|
-
|
|
463
|
+
s.editor.type = "number-spinner";
|
|
463
464
|
break;
|
|
464
465
|
}
|
|
465
|
-
return
|
|
466
|
+
return s.editor;
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
-
return
|
|
468
|
+
function m(s) {
|
|
469
|
+
return s.map((p) => Object.assign({}, p)).map((p) => (p.editor = l(p), p));
|
|
469
470
|
}
|
|
470
|
-
function
|
|
471
|
-
n.value.reduce((
|
|
471
|
+
function w(s = !0) {
|
|
472
|
+
n.value.reduce((d, p) => (s || (p.editor = l(p)), d.set(p.labelCode, p), d), r);
|
|
472
473
|
}
|
|
473
|
-
function s
|
|
474
|
-
return
|
|
475
|
-
if (
|
|
476
|
-
const
|
|
477
|
-
|
|
474
|
+
function u(s) {
|
|
475
|
+
return s.forEach((d) => {
|
|
476
|
+
if (d && typeof d.valueConfig == "object") {
|
|
477
|
+
const p = r.get(d.fieldCode);
|
|
478
|
+
d.value = c(p.editor.type, d.valueConfig.content);
|
|
478
479
|
}
|
|
479
|
-
}),
|
|
480
|
+
}), s;
|
|
480
481
|
}
|
|
481
|
-
return { convertToSingleControl:
|
|
482
|
+
return { convertToSingleControl: m, fields: n, fieldMap: r, fieldConditions: o, loadFieldConfigs: w, initialConditionValue: u };
|
|
482
483
|
}
|
|
483
|
-
function
|
|
484
|
-
const o = I(null), r = I(n),
|
|
485
|
-
function
|
|
486
|
-
r.value && (o.value = new ResizeObserver(
|
|
487
|
-
const
|
|
488
|
-
|
|
484
|
+
function Jt(t, e, n) {
|
|
485
|
+
const o = I(null), r = I(n), c = I(0), l = O(() => u(c.value));
|
|
486
|
+
function m() {
|
|
487
|
+
r.value && (o.value = new ResizeObserver(w((s) => {
|
|
488
|
+
const d = s[0];
|
|
489
|
+
c.value = d.contentRect.width;
|
|
489
490
|
})), o.value.observe(r.value));
|
|
490
491
|
}
|
|
491
|
-
function
|
|
492
|
-
let
|
|
492
|
+
function w(s, d) {
|
|
493
|
+
let p = null;
|
|
493
494
|
return function() {
|
|
494
495
|
const V = arguments;
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}, 500),
|
|
496
|
+
p || (p = setTimeout(() => {
|
|
497
|
+
p = null;
|
|
498
|
+
}, 500), s(...V));
|
|
498
499
|
};
|
|
499
500
|
}
|
|
500
|
-
function s
|
|
501
|
-
let
|
|
502
|
-
return
|
|
501
|
+
function u(s) {
|
|
502
|
+
let p = "col-12";
|
|
503
|
+
return s > 250 * 6 ? p = "col-2" : s > 250 * 4 ? p = "col-3" : s > 250 * 3 ? p = "col-4" : s > 250 * 2 && (p = "col-6"), p;
|
|
503
504
|
}
|
|
504
|
-
return W([n], ([
|
|
505
|
-
r.value =
|
|
505
|
+
return W([n], ([s]) => {
|
|
506
|
+
r.value = s, m();
|
|
506
507
|
}), {
|
|
507
|
-
conditionClass:
|
|
508
|
+
conditionClass: l,
|
|
508
509
|
resizeObserver: o
|
|
509
510
|
};
|
|
510
511
|
}
|
|
511
|
-
const
|
|
512
|
+
const se = /* @__PURE__ */ X({
|
|
512
513
|
name: "FConditionFields",
|
|
513
|
-
props:
|
|
514
|
+
props: ce,
|
|
514
515
|
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
515
|
-
setup(
|
|
516
|
-
const n = I(), o = I(
|
|
517
|
-
initialConditionValue:
|
|
518
|
-
fieldMap:
|
|
519
|
-
loadFieldConfigs:
|
|
520
|
-
} =
|
|
521
|
-
conditionClass:
|
|
522
|
-
resizeObserver:
|
|
523
|
-
} =
|
|
524
|
-
|
|
525
|
-
var
|
|
526
|
-
(
|
|
527
|
-
}), W(() =>
|
|
528
|
-
|
|
516
|
+
setup(t, e) {
|
|
517
|
+
const n = I(), o = I(t.key), r = I(t.isControlInline), c = I(t.conditions), l = me(t), {
|
|
518
|
+
initialConditionValue: m,
|
|
519
|
+
fieldMap: w,
|
|
520
|
+
loadFieldConfigs: u
|
|
521
|
+
} = l, s = Jt(t, e, n), {
|
|
522
|
+
conditionClass: d,
|
|
523
|
+
resizeObserver: p
|
|
524
|
+
} = s;
|
|
525
|
+
u(!0), m(c.value), we(() => {
|
|
526
|
+
var x;
|
|
527
|
+
(x = p.value) == null || x.unobserve(n.value);
|
|
528
|
+
}), W(() => t.conditions, () => {
|
|
529
|
+
c.value = t.conditions;
|
|
529
530
|
});
|
|
530
|
-
const V =
|
|
531
|
+
const V = O(() => ({
|
|
531
532
|
// row: true,
|
|
532
533
|
"f-utils-flex-row-wrap": !0,
|
|
533
534
|
"farris-form": !0,
|
|
534
535
|
"farris-form-controls-inline": r.value
|
|
535
|
-
})),
|
|
536
|
-
function
|
|
537
|
-
|
|
536
|
+
})), M = O(() => d.value);
|
|
537
|
+
function P(x, F) {
|
|
538
|
+
e.emit("valueChange", x, F);
|
|
538
539
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
541
|
-
var
|
|
542
|
-
return
|
|
543
|
-
customClass:
|
|
544
|
-
label:
|
|
545
|
-
editor: (
|
|
546
|
-
modelValue:
|
|
547
|
-
"onUpdate:modelValue": (
|
|
548
|
-
onChange: (
|
|
549
|
-
|
|
540
|
+
function D() {
|
|
541
|
+
return c.value.map((x) => {
|
|
542
|
+
var F;
|
|
543
|
+
return k(Ve, {
|
|
544
|
+
customClass: M.value,
|
|
545
|
+
label: x.fieldName,
|
|
546
|
+
editor: (F = w.get(x.fieldCode)) == null ? void 0 : F.editor,
|
|
547
|
+
modelValue: x.value.value,
|
|
548
|
+
"onUpdate:modelValue": (N) => x.value.value = N,
|
|
549
|
+
onChange: (N) => {
|
|
550
|
+
P(N, x);
|
|
550
551
|
}
|
|
551
552
|
}, null);
|
|
552
553
|
});
|
|
553
554
|
}
|
|
554
|
-
return () =>
|
|
555
|
+
return () => k("div", {
|
|
555
556
|
class: V.value,
|
|
556
557
|
key: o.value,
|
|
557
558
|
ref: n
|
|
558
|
-
}, [
|
|
559
|
+
}, [D()]);
|
|
559
560
|
}
|
|
560
|
-
}),
|
|
561
|
-
function
|
|
562
|
-
const { properties:
|
|
563
|
-
return o.id = `${n}-${Date.now()}
|
|
561
|
+
}), Xt = {}, Yt = {};
|
|
562
|
+
function fe(t) {
|
|
563
|
+
const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), c = Object.keys(e).reduce((l, m) => ((!r || !o.find((w) => w == m)) && (l[m] = e[m].type === "object" && e[m].properties ? fe(e[m]) : J(e[m].default)), l), {});
|
|
564
|
+
return (!r || !o.find((l) => l == "id")) && (c.id = `${n}-${Date.now()}`), c;
|
|
564
565
|
}
|
|
565
|
-
function
|
|
566
|
-
const n =
|
|
567
|
-
return Object.keys(
|
|
566
|
+
function _t(t, e) {
|
|
567
|
+
const n = fe(e);
|
|
568
|
+
return Object.keys(t).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], t[r]) : o[r] = t[r], o), n), n;
|
|
568
569
|
}
|
|
569
|
-
function
|
|
570
|
-
return Object.keys(
|
|
571
|
-
if (
|
|
572
|
-
const
|
|
573
|
-
if (typeof
|
|
574
|
-
o[
|
|
570
|
+
function Kt(t, e) {
|
|
571
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
|
|
572
|
+
if (e.has(r)) {
|
|
573
|
+
const c = e.get(r);
|
|
574
|
+
if (typeof c == "string")
|
|
575
|
+
o[c] = t[r];
|
|
575
576
|
else {
|
|
576
|
-
const
|
|
577
|
-
Object.assign(o,
|
|
577
|
+
const l = c(r, t[r], t);
|
|
578
|
+
Object.assign(o, l);
|
|
578
579
|
}
|
|
579
580
|
} else
|
|
580
|
-
o[r] =
|
|
581
|
+
o[r] = t[r];
|
|
581
582
|
return o;
|
|
582
583
|
}, {});
|
|
583
584
|
}
|
|
584
|
-
function
|
|
585
|
-
const o =
|
|
586
|
-
return
|
|
585
|
+
function en(t, e, n = /* @__PURE__ */ new Map()) {
|
|
586
|
+
const o = _t(t, e);
|
|
587
|
+
return Kt(o, n);
|
|
587
588
|
}
|
|
588
|
-
function
|
|
589
|
-
function
|
|
590
|
-
if (typeof
|
|
591
|
-
return
|
|
592
|
-
if (typeof
|
|
593
|
-
const V = Object.keys(
|
|
589
|
+
function tn(t = {}) {
|
|
590
|
+
function e(u, s, d, p) {
|
|
591
|
+
if (typeof d == "number")
|
|
592
|
+
return p[u].length === d;
|
|
593
|
+
if (typeof d == "object") {
|
|
594
|
+
const V = Object.keys(d)[0], M = d[V];
|
|
594
595
|
if (V === "not")
|
|
595
|
-
return Number(
|
|
596
|
+
return Number(p[u].length) !== Number(M);
|
|
596
597
|
if (V === "moreThan")
|
|
597
|
-
return Number(
|
|
598
|
+
return Number(p[u].length) >= Number(M);
|
|
598
599
|
if (V === "lessThan")
|
|
599
|
-
return Number(
|
|
600
|
+
return Number(p[u].length) <= Number(M);
|
|
600
601
|
}
|
|
601
602
|
return !1;
|
|
602
603
|
}
|
|
603
|
-
function n(
|
|
604
|
-
return
|
|
604
|
+
function n(u, s, d, p) {
|
|
605
|
+
return p[u] && p[u].propertyValue && String(p[u].propertyValue.value) === String(d);
|
|
605
606
|
}
|
|
606
607
|
const o = /* @__PURE__ */ new Map([
|
|
607
|
-
["length",
|
|
608
|
+
["length", e],
|
|
608
609
|
["getProperty", n]
|
|
609
610
|
]);
|
|
610
|
-
Object.keys(
|
|
611
|
-
function r(
|
|
612
|
-
const
|
|
613
|
-
return typeof
|
|
614
|
-
if (
|
|
615
|
-
return { target:
|
|
616
|
-
const V =
|
|
617
|
-
return { target:
|
|
611
|
+
Object.keys(t).reduce((u, s) => (u.set(s, t[s]), u), o);
|
|
612
|
+
function r(u, s) {
|
|
613
|
+
const d = u;
|
|
614
|
+
return typeof s == "number" ? [{ target: d, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: d, operator: "getProperty", param: u, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
|
|
615
|
+
if (p === "length")
|
|
616
|
+
return { target: d, operator: "length", param: null, value: s[p] };
|
|
617
|
+
const V = p, M = s[p];
|
|
618
|
+
return { target: d, operator: "getProperty", param: V, value: M };
|
|
618
619
|
}) : [];
|
|
619
620
|
}
|
|
620
|
-
function
|
|
621
|
-
return Object.keys(
|
|
622
|
-
const V = r(
|
|
623
|
-
return
|
|
621
|
+
function c(u) {
|
|
622
|
+
return Object.keys(u).reduce((d, p) => {
|
|
623
|
+
const V = r(p, u[p]);
|
|
624
|
+
return d.push(...V), d;
|
|
624
625
|
}, []);
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
-
if (o.has(
|
|
628
|
-
const
|
|
629
|
-
return
|
|
627
|
+
function l(u, s) {
|
|
628
|
+
if (o.has(u.operator)) {
|
|
629
|
+
const d = o.get(u.operator);
|
|
630
|
+
return d && d(u.target, u.param, u.value, s) || !1;
|
|
630
631
|
}
|
|
631
632
|
return !1;
|
|
632
633
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
634
|
+
function m(u, s) {
|
|
635
|
+
return c(u).reduce((V, M) => V && l(M, s), !0);
|
|
635
636
|
}
|
|
636
|
-
function
|
|
637
|
-
const
|
|
638
|
-
return
|
|
637
|
+
function w(u, s) {
|
|
638
|
+
const d = Object.keys(u), p = d.includes("allOf"), V = d.includes("anyOf"), M = p || V, x = (M ? u[M ? p ? "allOf" : "anyOf" : "allOf"] : [u]).map((N) => m(N, s));
|
|
639
|
+
return p ? !x.includes(!1) : x.includes(!0);
|
|
639
640
|
}
|
|
640
|
-
return { parseValueSchema:
|
|
641
|
+
return { parseValueSchema: w };
|
|
641
642
|
}
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
643
|
+
const E = {
|
|
644
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
645
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
646
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
647
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
648
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
649
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
650
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
651
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
652
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
653
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
654
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
655
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
656
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
657
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
658
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
659
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
660
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
661
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
662
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
663
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
664
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
665
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
666
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
667
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
668
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
669
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
670
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
671
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
672
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
673
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
674
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
675
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
676
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
677
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
678
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
679
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
680
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
681
|
+
}, nn = {}, on = {};
|
|
682
|
+
tn();
|
|
683
|
+
function K(t, e, n = /* @__PURE__ */ new Map(), o = (l, m, w) => m, r = {}, c = (l) => l) {
|
|
684
|
+
return Xt[e.title] = e, Yt[e.title] = o, nn[e.title] = r, on[e.title] = c, (l = {}) => {
|
|
685
|
+
const m = en(l, e, n), w = Object.keys(t).reduce((u, s) => (u[s] = t[s].default, u), {});
|
|
686
|
+
return Object.assign(w, m);
|
|
648
687
|
};
|
|
649
688
|
}
|
|
650
|
-
function
|
|
651
|
-
return { customClass:
|
|
689
|
+
function ge(t, e) {
|
|
690
|
+
return { customClass: e.class, customStyle: e.style };
|
|
652
691
|
}
|
|
653
|
-
const
|
|
654
|
-
["appearance",
|
|
692
|
+
const oe = /* @__PURE__ */ new Map([
|
|
693
|
+
["appearance", ge]
|
|
655
694
|
]);
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
}
|
|
695
|
+
var ne = /* @__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))(ne || {});
|
|
696
|
+
const rn = "root-viewmodel";
|
|
697
|
+
class an {
|
|
698
|
+
constructor(e, n) {
|
|
699
|
+
y(this, "formSchemaUtils");
|
|
700
|
+
y(this, "controlCreatorUtils");
|
|
701
|
+
y(this, "designViewModelUtils");
|
|
702
|
+
this.resolver = e, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
703
|
+
}
|
|
704
|
+
createComponent(e) {
|
|
705
|
+
const n = this.createComponentRefNode(e), o = this.createComponentNode(e), r = this.createViewModeNode(e), c = this.formSchemaUtils.getFormSchema();
|
|
706
|
+
return c.module.viewmodels.push(r), c.module.components.push(o), this.designViewModelUtils.assembleDesignViewModel(), n;
|
|
707
|
+
}
|
|
708
|
+
createComponentRefNode(e) {
|
|
709
|
+
const n = this.resolver.getSchemaByType("component-ref");
|
|
710
|
+
return Object.assign(n, {
|
|
711
|
+
id: `${e.componentId}-component-ref`,
|
|
712
|
+
component: `${e.componentId}-component`
|
|
713
|
+
}), n;
|
|
714
|
+
}
|
|
715
|
+
createComponentNode(e) {
|
|
716
|
+
const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(e);
|
|
717
|
+
return Object.assign(n, {
|
|
718
|
+
id: `${e.componentId}-component`,
|
|
719
|
+
viewModel: `${e.componentId}-component-viewmodel`,
|
|
720
|
+
componentType: e.componentType,
|
|
721
|
+
appearance: {
|
|
722
|
+
class: this.getFormComponentClass()
|
|
723
|
+
},
|
|
724
|
+
formColumns: e.formColumns,
|
|
725
|
+
contents: o
|
|
726
|
+
}), n;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* 获取卡片组件层级的class样式
|
|
730
|
+
*/
|
|
731
|
+
getFormComponentClass() {
|
|
732
|
+
return this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
733
|
+
}
|
|
734
|
+
createFormComponentContents(e) {
|
|
735
|
+
const n = this.resolver.getSchemaByType("section");
|
|
736
|
+
Object.assign(n, {
|
|
737
|
+
id: e.componentId + "-form-section",
|
|
738
|
+
appearance: {
|
|
739
|
+
class: "f-section-form f-section-in-mainsubcard"
|
|
740
|
+
},
|
|
741
|
+
mainTitle: e.componentName
|
|
742
|
+
});
|
|
743
|
+
const o = this.resolver.getSchemaByType("response-form"), r = [];
|
|
744
|
+
Object.assign(o, {
|
|
745
|
+
id: e.componentId + "-form",
|
|
746
|
+
appearance: {
|
|
747
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
748
|
+
},
|
|
749
|
+
contents: r
|
|
750
|
+
}), n.contents = [o];
|
|
751
|
+
const { selectedFields: c } = e;
|
|
752
|
+
return c == null || c.forEach((m) => {
|
|
753
|
+
const w = J(m), u = this.resolveControlClassByFormColumns(e), s = this.controlCreatorUtils.setFormFieldProperty(w, "", u);
|
|
754
|
+
s && r.push(s);
|
|
755
|
+
}), this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0), [n];
|
|
756
|
+
}
|
|
757
|
+
resolveControlClassByFormColumns(e) {
|
|
758
|
+
let n = "";
|
|
759
|
+
switch (e.formColumns) {
|
|
760
|
+
case 1: {
|
|
761
|
+
n = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
762
|
+
break;
|
|
763
|
+
}
|
|
764
|
+
case 2: {
|
|
765
|
+
n = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
766
|
+
break;
|
|
767
|
+
}
|
|
768
|
+
case 3: {
|
|
769
|
+
n = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
case 4: {
|
|
773
|
+
n = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return n;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* 添加viewModel节点
|
|
781
|
+
*/
|
|
782
|
+
createViewModeNode(e) {
|
|
783
|
+
return {
|
|
784
|
+
id: `${e.componentId}-component-viewmodel`,
|
|
785
|
+
code: `${e.componentId}-component-viewmodel`,
|
|
786
|
+
name: e.componentName,
|
|
787
|
+
bindTo: e.bindTo,
|
|
788
|
+
parent: rn,
|
|
789
|
+
fields: this.assembleViewModelFields(e),
|
|
790
|
+
commands: [],
|
|
791
|
+
states: [],
|
|
792
|
+
enableValidation: !0,
|
|
793
|
+
pagination: {
|
|
794
|
+
enable: !1
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* 组装viewModel fields 节点
|
|
800
|
+
*/
|
|
801
|
+
assembleViewModelFields(e) {
|
|
802
|
+
const n = [], { selectedFields: o } = e;
|
|
803
|
+
return o == null || o.forEach((r) => {
|
|
804
|
+
let c = "blur";
|
|
805
|
+
const l = r.type.name;
|
|
806
|
+
(l === ne.Enum || l === ne.Boolean) && (c = "change"), n.push({
|
|
807
|
+
type: "Form",
|
|
808
|
+
id: r.id,
|
|
809
|
+
fieldName: r.bindingField,
|
|
810
|
+
groupId: null,
|
|
811
|
+
groupName: null,
|
|
812
|
+
updateOn: c,
|
|
813
|
+
fieldSchema: {}
|
|
814
|
+
});
|
|
815
|
+
}), n;
|
|
816
|
+
}
|
|
665
817
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
818
|
+
function sn(t, e, n, o) {
|
|
819
|
+
const r = n.parentComponentInstance;
|
|
820
|
+
if (r) {
|
|
821
|
+
const l = {
|
|
822
|
+
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
823
|
+
componentName: "标题",
|
|
824
|
+
componentType: "form",
|
|
825
|
+
formColumns: 4,
|
|
826
|
+
parentContainerId: r.schema.id,
|
|
827
|
+
bindTo: "/"
|
|
828
|
+
};
|
|
829
|
+
return new an(t, o).createComponent(l);
|
|
830
|
+
} else
|
|
831
|
+
return e;
|
|
670
832
|
}
|
|
671
|
-
const
|
|
833
|
+
const ln = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-design.gitee.io/response-form.schema.json", cn = "response-form", dn = "A Farris Data Collection Component", pn = "object", mn = {
|
|
672
834
|
id: {
|
|
673
835
|
description: "The unique identifier for a form group",
|
|
674
836
|
type: "string"
|
|
@@ -696,18 +858,18 @@ const on = "https://json-schema.org/draft/2020-12/schema", rn = "https://farris-
|
|
|
696
858
|
type: "array",
|
|
697
859
|
default: []
|
|
698
860
|
}
|
|
699
|
-
},
|
|
861
|
+
}, fn = [
|
|
700
862
|
"id",
|
|
701
863
|
"type"
|
|
702
|
-
],
|
|
703
|
-
$schema:
|
|
704
|
-
$id:
|
|
705
|
-
title:
|
|
706
|
-
description:
|
|
707
|
-
type:
|
|
708
|
-
properties:
|
|
709
|
-
required:
|
|
710
|
-
},
|
|
864
|
+
], gn = {
|
|
865
|
+
$schema: ln,
|
|
866
|
+
$id: un,
|
|
867
|
+
title: cn,
|
|
868
|
+
description: dn,
|
|
869
|
+
type: pn,
|
|
870
|
+
properties: mn,
|
|
871
|
+
required: fn
|
|
872
|
+
}, hn = "response-form", vn = "A Farris Component", yn = "object", bn = {
|
|
711
873
|
basic: {
|
|
712
874
|
description: "Basic Infomation",
|
|
713
875
|
title: "基本信息",
|
|
@@ -729,16 +891,16 @@ const on = "https://json-schema.org/draft/2020-12/schema", rn = "https://farris-
|
|
|
729
891
|
}
|
|
730
892
|
}
|
|
731
893
|
}
|
|
732
|
-
},
|
|
733
|
-
title:
|
|
734
|
-
description:
|
|
735
|
-
type:
|
|
736
|
-
categories:
|
|
737
|
-
},
|
|
894
|
+
}, Cn = {
|
|
895
|
+
title: hn,
|
|
896
|
+
description: vn,
|
|
897
|
+
type: yn,
|
|
898
|
+
categories: bn
|
|
899
|
+
}, Tn = {
|
|
738
900
|
customClass: { type: String, default: "" }
|
|
739
901
|
};
|
|
740
|
-
|
|
741
|
-
const
|
|
902
|
+
K(Tn, gn, oe, sn, Cn);
|
|
903
|
+
const kn = "https://json-schema.org/draft/2020-12/schema", wn = "https://farris-design.gitee.io/form-group.schema.json", xn = "form-group", Fn = "A Farris Input Component", Bn = "object", In = {
|
|
742
904
|
id: {
|
|
743
905
|
description: "The unique identifier for a form group",
|
|
744
906
|
type: "string"
|
|
@@ -779,18 +941,18 @@ const yn = "https://json-schema.org/draft/2020-12/schema", bn = "https://farris-
|
|
|
779
941
|
description: "",
|
|
780
942
|
type: "number"
|
|
781
943
|
}
|
|
782
|
-
},
|
|
944
|
+
}, Sn = [
|
|
783
945
|
"id",
|
|
784
946
|
"type"
|
|
785
|
-
],
|
|
786
|
-
$schema:
|
|
787
|
-
$id:
|
|
788
|
-
title:
|
|
947
|
+
], he = {
|
|
948
|
+
$schema: kn,
|
|
949
|
+
$id: wn,
|
|
950
|
+
title: xn,
|
|
789
951
|
description: Fn,
|
|
790
|
-
type:
|
|
791
|
-
properties:
|
|
792
|
-
required:
|
|
793
|
-
},
|
|
952
|
+
type: Bn,
|
|
953
|
+
properties: In,
|
|
954
|
+
required: Sn
|
|
955
|
+
}, ve = {
|
|
794
956
|
id: { type: String, default: "" },
|
|
795
957
|
customClass: { type: String, default: "" },
|
|
796
958
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
@@ -804,43 +966,43 @@ const yn = "https://json-schema.org/draft/2020-12/schema", bn = "https://farris-
|
|
|
804
966
|
showLabel: { type: Boolean, default: !0 },
|
|
805
967
|
type: { type: String, default: "input-group" }
|
|
806
968
|
};
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
969
|
+
K(
|
|
970
|
+
ve,
|
|
971
|
+
he,
|
|
972
|
+
oe,
|
|
811
973
|
void 0
|
|
812
974
|
);
|
|
813
|
-
const
|
|
975
|
+
const Vn = {
|
|
814
976
|
id: { type: String },
|
|
815
977
|
required: { type: Boolean, default: !1 },
|
|
816
978
|
text: { type: String, default: "" },
|
|
817
979
|
title: { type: String }
|
|
818
|
-
},
|
|
980
|
+
}, En = /* @__PURE__ */ X({
|
|
819
981
|
name: "FDynamicFormLabel",
|
|
820
|
-
props:
|
|
982
|
+
props: Vn,
|
|
821
983
|
emits: [],
|
|
822
|
-
setup(
|
|
823
|
-
const n = I(
|
|
824
|
-
return W(() =>
|
|
825
|
-
r.value =
|
|
826
|
-
}), W(() =>
|
|
827
|
-
|
|
828
|
-
}), () =>
|
|
984
|
+
setup(t, e) {
|
|
985
|
+
const n = I(t.title || t.text), o = I(t.required), r = I(t.text);
|
|
986
|
+
return W(() => t.text, () => {
|
|
987
|
+
r.value = t.text;
|
|
988
|
+
}), W(() => t.required, (c, l) => {
|
|
989
|
+
c !== l && (o.value = c);
|
|
990
|
+
}), () => k("label", {
|
|
829
991
|
class: "col-form-label",
|
|
830
992
|
title: n.value
|
|
831
|
-
}, [o.value &&
|
|
993
|
+
}, [o.value && k("span", {
|
|
832
994
|
class: "farris-label-info text-danger"
|
|
833
|
-
}, [
|
|
995
|
+
}, [Y("*")]), k("span", {
|
|
834
996
|
class: "farris-label-text"
|
|
835
997
|
}, [r.value])]);
|
|
836
998
|
}
|
|
837
|
-
}),
|
|
838
|
-
["appearance",
|
|
999
|
+
}), Mn = /* @__PURE__ */ new Map([
|
|
1000
|
+
["appearance", ge]
|
|
839
1001
|
]);
|
|
840
|
-
function
|
|
841
|
-
return
|
|
1002
|
+
function Nn(t, e, n) {
|
|
1003
|
+
return e;
|
|
842
1004
|
}
|
|
843
|
-
const
|
|
1005
|
+
const On = "https://json-schema.org/draft/2020-12/schema", Pn = "https://farris-design.gitee.io/input-group.schema.json", jn = "input-group", Ln = "A Farris Input Component", Rn = "object", An = {
|
|
844
1006
|
id: {
|
|
845
1007
|
description: "The unique identifier for a Input Group",
|
|
846
1008
|
type: "string"
|
|
@@ -1042,18 +1204,18 @@ const Vn = "https://json-schema.org/draft/2020-12/schema", En = "https://farris-
|
|
|
1042
1204
|
type: "string",
|
|
1043
1205
|
default: ""
|
|
1044
1206
|
}
|
|
1045
|
-
},
|
|
1207
|
+
}, $n = [
|
|
1046
1208
|
"id",
|
|
1047
1209
|
"type"
|
|
1048
|
-
],
|
|
1049
|
-
$schema:
|
|
1050
|
-
$id:
|
|
1051
|
-
title:
|
|
1052
|
-
description:
|
|
1053
|
-
type:
|
|
1054
|
-
properties:
|
|
1055
|
-
required:
|
|
1056
|
-
},
|
|
1210
|
+
], Gn = {
|
|
1211
|
+
$schema: On,
|
|
1212
|
+
$id: Pn,
|
|
1213
|
+
title: jn,
|
|
1214
|
+
description: Ln,
|
|
1215
|
+
type: Rn,
|
|
1216
|
+
properties: An,
|
|
1217
|
+
required: $n
|
|
1218
|
+
}, ye = {
|
|
1057
1219
|
/** 是否自动完成 */
|
|
1058
1220
|
autocomplete: { Type: String, default: "off" },
|
|
1059
1221
|
/** 自定义CLASS */
|
|
@@ -1120,418 +1282,418 @@ const Vn = "https://json-schema.org/draft/2020-12/schema", En = "https://farris-
|
|
|
1120
1282
|
*/
|
|
1121
1283
|
updateOn: { type: String, default: "blur" }
|
|
1122
1284
|
};
|
|
1123
|
-
|
|
1124
|
-
function
|
|
1125
|
-
const r = I(
|
|
1285
|
+
K(ye, Gn, Mn, Nn);
|
|
1286
|
+
function qn(t, e, n, o) {
|
|
1287
|
+
const r = I(t.disabled), c = I(!1), l = I("text"), m = I(t.showBorder), w = I(t.textAlign), u = I(t.updateOn), s = O(() => t.editable || !t.readonly), d = O(() => t.editable && !t.disabled && !t.readonly), p = O(() => !t.disabled && c.value), V = O(() => n.value === "" || n.value === null || n.value === void 0), M = O(() => (t.disabled || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), P = O(() => t.readonly || !t.editable), D = O(() => t.enableTitle ? n.value : ""), x = O(() => ({
|
|
1126
1288
|
"form-control": !0,
|
|
1127
1289
|
"f-utils-fill": !0,
|
|
1128
|
-
"text-left":
|
|
1129
|
-
"text-center":
|
|
1130
|
-
"text-right":
|
|
1131
|
-
})),
|
|
1132
|
-
const
|
|
1290
|
+
"text-left": w.value === "left",
|
|
1291
|
+
"text-center": w.value === "center",
|
|
1292
|
+
"text-right": w.value === "right"
|
|
1293
|
+
})), F = O(() => {
|
|
1294
|
+
const i = {
|
|
1133
1295
|
"f-cmp-inputgroup": !0,
|
|
1134
1296
|
"input-group": !0,
|
|
1135
1297
|
"f-state-disable": r.value,
|
|
1136
|
-
"f-state-editable":
|
|
1137
|
-
"f-state-readonly":
|
|
1138
|
-
"f-state-focus":
|
|
1298
|
+
"f-state-editable": d.value,
|
|
1299
|
+
"f-state-readonly": P.value,
|
|
1300
|
+
"f-state-focus": p.value
|
|
1139
1301
|
};
|
|
1140
|
-
return (
|
|
1141
|
-
}),
|
|
1142
|
-
function j(
|
|
1143
|
-
n.value =
|
|
1302
|
+
return (t.customClass || "").split(" ").reduce((S, U) => (S[U] = !0, S), i), i;
|
|
1303
|
+
}), N = O(() => m.value ? "" : "border-width : 0 ");
|
|
1304
|
+
function j(i, T = !0) {
|
|
1305
|
+
n.value = i, o.value !== i && (o.value = i), T && e.emit("change", i), e.emit("update:modelValue", i), e.emit("update:value", i);
|
|
1144
1306
|
}
|
|
1145
1307
|
W(
|
|
1146
|
-
() =>
|
|
1147
|
-
(
|
|
1148
|
-
|
|
1308
|
+
() => t.modelValue,
|
|
1309
|
+
(i, T) => {
|
|
1310
|
+
i !== T && (n.value = i, o.value = i);
|
|
1149
1311
|
}
|
|
1150
|
-
), W(() =>
|
|
1151
|
-
|
|
1312
|
+
), W(() => t.disabled, (i, T) => {
|
|
1313
|
+
i !== T && (r.value = i);
|
|
1152
1314
|
});
|
|
1153
|
-
function $(
|
|
1154
|
-
return
|
|
1315
|
+
function $(i) {
|
|
1316
|
+
return c.value = !1, e.emit("blur", i), i.stopPropagation(), !1;
|
|
1155
1317
|
}
|
|
1156
|
-
function G(
|
|
1157
|
-
|
|
1318
|
+
function G(i) {
|
|
1319
|
+
e.emit("click", i);
|
|
1158
1320
|
}
|
|
1159
|
-
function
|
|
1160
|
-
|
|
1321
|
+
function R(i) {
|
|
1322
|
+
t.disabled || (m.value && (c.value = !0), s.value && e.emit("focus", i));
|
|
1161
1323
|
}
|
|
1162
|
-
function
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
o.value =
|
|
1324
|
+
function H(i) {
|
|
1325
|
+
e.emit("input", i.target.value);
|
|
1326
|
+
const T = i.target.value;
|
|
1327
|
+
o.value = T, u.value === "input" && (e.emit("update:modelValue", T), e.emit("update:value", T));
|
|
1166
1328
|
}
|
|
1167
|
-
function i
|
|
1168
|
-
|
|
1329
|
+
function a(i) {
|
|
1330
|
+
e.emit("keydown", i);
|
|
1169
1331
|
}
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1332
|
+
function g(i) {
|
|
1333
|
+
e.emit("keyup", i);
|
|
1172
1334
|
}
|
|
1173
|
-
function f(
|
|
1174
|
-
|
|
1335
|
+
function f(i) {
|
|
1336
|
+
i.target.tagName !== "INPUT" && i.preventDefault(), i.stopPropagation();
|
|
1175
1337
|
}
|
|
1176
|
-
function B(
|
|
1177
|
-
if (
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1338
|
+
function B(i) {
|
|
1339
|
+
if (u.value === "blur") {
|
|
1340
|
+
const T = i.target.value;
|
|
1341
|
+
i.stopPropagation(), j(T);
|
|
1180
1342
|
}
|
|
1181
1343
|
}
|
|
1182
1344
|
return {
|
|
1183
1345
|
changeTextBoxValue: j,
|
|
1184
1346
|
disabled: r,
|
|
1185
1347
|
displayText: o,
|
|
1186
|
-
editable:
|
|
1187
|
-
hasFocused:
|
|
1188
|
-
inputGroupClass:
|
|
1189
|
-
inputType:
|
|
1348
|
+
editable: d,
|
|
1349
|
+
hasFocused: p,
|
|
1350
|
+
inputGroupClass: F,
|
|
1351
|
+
inputType: l,
|
|
1190
1352
|
isEmpty: V,
|
|
1191
1353
|
modelValue: n,
|
|
1192
|
-
readonly:
|
|
1354
|
+
readonly: P,
|
|
1193
1355
|
onBlur: $,
|
|
1194
1356
|
onClick: G,
|
|
1195
|
-
onFocus:
|
|
1196
|
-
onInput:
|
|
1197
|
-
onKeydown:
|
|
1198
|
-
onKeyup:
|
|
1357
|
+
onFocus: R,
|
|
1358
|
+
onInput: H,
|
|
1359
|
+
onKeydown: a,
|
|
1360
|
+
onKeyup: g,
|
|
1199
1361
|
onMousedown: f,
|
|
1200
1362
|
onTextBoxValueChange: B,
|
|
1201
|
-
placeholder:
|
|
1202
|
-
textBoxClass:
|
|
1203
|
-
textBoxTitle:
|
|
1204
|
-
inputGroupStyle:
|
|
1363
|
+
placeholder: M,
|
|
1364
|
+
textBoxClass: x,
|
|
1365
|
+
textBoxTitle: D,
|
|
1366
|
+
inputGroupStyle: N
|
|
1205
1367
|
};
|
|
1206
1368
|
}
|
|
1207
|
-
function
|
|
1208
|
-
const o = I(!1), r =
|
|
1209
|
-
function
|
|
1210
|
-
o.value =
|
|
1369
|
+
function Dn(t, e, n) {
|
|
1370
|
+
const o = I(!1), r = O(() => t.enableClear && !t.readonly && !t.disabled), { changeTextBoxValue: c, displayText: l, hasFocused: m, isEmpty: w } = n;
|
|
1371
|
+
function u(P) {
|
|
1372
|
+
o.value = P;
|
|
1211
1373
|
}
|
|
1212
|
-
W(
|
|
1213
|
-
|
|
1374
|
+
W(l, () => {
|
|
1375
|
+
m != null && m.value ? u(!!(l != null && l.value)) : u(!1);
|
|
1214
1376
|
});
|
|
1215
|
-
const
|
|
1377
|
+
const s = O(() => ({
|
|
1216
1378
|
"input-group-text": !0,
|
|
1217
1379
|
"input-group-clear": !0
|
|
1218
|
-
})),
|
|
1380
|
+
})), d = O(() => ({
|
|
1219
1381
|
width: "24px",
|
|
1220
1382
|
display: o.value ? "flex" : "none"
|
|
1221
1383
|
}));
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1384
|
+
function p(P) {
|
|
1385
|
+
P.stopPropagation(), r.value && (c("", !0), u(!o.value), e.emit("clear"));
|
|
1224
1386
|
}
|
|
1225
|
-
function V(
|
|
1226
|
-
r.value && !
|
|
1387
|
+
function V(P) {
|
|
1388
|
+
r.value && !w.value && u(!0);
|
|
1227
1389
|
}
|
|
1228
|
-
function
|
|
1229
|
-
r.value &&
|
|
1390
|
+
function M(P) {
|
|
1391
|
+
r.value && u(!1);
|
|
1230
1392
|
}
|
|
1231
|
-
return { clearButtonClass:
|
|
1393
|
+
return { clearButtonClass: s, clearButtonStyle: d, hasShownClearButton: o, onClearValue: p, onMouseEnter: V, onMouseLeave: M, shouldShowClearButton: r };
|
|
1232
1394
|
}
|
|
1233
|
-
const
|
|
1234
|
-
function
|
|
1235
|
-
let
|
|
1236
|
-
return (
|
|
1237
|
-
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n -
|
|
1238
|
-
|
|
1395
|
+
const Un = ["moz", "ms", "webkit"];
|
|
1396
|
+
function Wn() {
|
|
1397
|
+
let t = 0;
|
|
1398
|
+
return (e) => {
|
|
1399
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
|
|
1400
|
+
e(n + o);
|
|
1239
1401
|
}, o);
|
|
1240
|
-
return
|
|
1402
|
+
return t = n + o, r;
|
|
1241
1403
|
};
|
|
1242
1404
|
}
|
|
1243
|
-
function
|
|
1405
|
+
function Hn() {
|
|
1244
1406
|
if (typeof window > "u")
|
|
1245
1407
|
return () => 0;
|
|
1246
1408
|
if (window.requestAnimationFrame)
|
|
1247
1409
|
return window.requestAnimationFrame.bind(window);
|
|
1248
|
-
const
|
|
1249
|
-
return
|
|
1410
|
+
const t = Un.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
1411
|
+
return t ? window[`${t}RequestAnimationFrame`] : Wn();
|
|
1250
1412
|
}
|
|
1251
|
-
|
|
1252
|
-
function
|
|
1253
|
-
const n = I(
|
|
1254
|
-
return { appendedButtonClass:
|
|
1413
|
+
Hn();
|
|
1414
|
+
function zn(t, e) {
|
|
1415
|
+
const n = I(t.groupText), o = O(() => t.showButtonWhenDisabled && (t.readonly || t.disabled)), r = O(() => t.enableClear || !!t.groupText);
|
|
1416
|
+
return { appendedButtonClass: O(() => ({
|
|
1255
1417
|
"input-group-append": !0,
|
|
1256
1418
|
"append-force-show": o.value
|
|
1257
1419
|
})), appendedContent: n, shouldShowAppendedButton: r };
|
|
1258
1420
|
}
|
|
1259
|
-
function
|
|
1260
|
-
const { appendedContent: r } = o,
|
|
1261
|
-
W(() => [
|
|
1262
|
-
|
|
1421
|
+
function Qn(t, e, n, o) {
|
|
1422
|
+
const { appendedContent: r } = o, c = I(t.enableViewPassword), l = O(() => t.type === "password"), m = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', w = '<span class="f-icon f-icon-eye"></span>', u = I(!1);
|
|
1423
|
+
W(() => [t.readonly, t.disabled], ([p, V]) => {
|
|
1424
|
+
l.value && (n.value = p || V ? "password" : n.value, r.value = p || V ? w : r.value);
|
|
1263
1425
|
});
|
|
1264
|
-
function
|
|
1265
|
-
return
|
|
1426
|
+
function s() {
|
|
1427
|
+
return u.value = !u.value, n.value = u.value ? "text" : "password", r.value = u.value ? m : w, !1;
|
|
1266
1428
|
}
|
|
1267
|
-
function
|
|
1268
|
-
n.value =
|
|
1429
|
+
function d() {
|
|
1430
|
+
n.value = l.value ? "password" : "text", r.value = l.value ? c.value ? w : "" : r.value;
|
|
1269
1431
|
}
|
|
1270
|
-
return
|
|
1432
|
+
return d(), { isPassword: l, onClickAppendedButton: s };
|
|
1271
1433
|
}
|
|
1272
|
-
function
|
|
1434
|
+
function Zn(t, e, n) {
|
|
1273
1435
|
const o = I(), {
|
|
1274
1436
|
onBlurTextBox: r,
|
|
1275
|
-
onFocusTextBox:
|
|
1276
|
-
onInput:
|
|
1277
|
-
onKeyDown:
|
|
1278
|
-
textBoxValue:
|
|
1279
|
-
} = n,
|
|
1437
|
+
onFocusTextBox: c,
|
|
1438
|
+
onInput: l,
|
|
1439
|
+
onKeyDown: m,
|
|
1440
|
+
textBoxValue: w
|
|
1441
|
+
} = n, u = O(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), s = O(() => ({
|
|
1280
1442
|
"form-control": !0,
|
|
1281
1443
|
"f-utils-fill": !0
|
|
1282
|
-
})),
|
|
1283
|
-
"text-align":
|
|
1444
|
+
})), d = O(() => ({
|
|
1445
|
+
"text-align": t.textAlign
|
|
1284
1446
|
}));
|
|
1285
|
-
function
|
|
1286
|
-
|
|
1447
|
+
function p(P) {
|
|
1448
|
+
P.stopPropagation();
|
|
1287
1449
|
}
|
|
1288
1450
|
function V() {
|
|
1289
|
-
|
|
1451
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
1290
1452
|
}
|
|
1291
|
-
async function
|
|
1292
|
-
|
|
1453
|
+
async function M(P) {
|
|
1454
|
+
c(P), await re, V();
|
|
1293
1455
|
}
|
|
1294
|
-
return
|
|
1295
|
-
await
|
|
1296
|
-
}), () =>
|
|
1456
|
+
return _(async () => {
|
|
1457
|
+
await re, V();
|
|
1458
|
+
}), () => k("input", {
|
|
1297
1459
|
ref: o,
|
|
1298
|
-
class:
|
|
1299
|
-
style:
|
|
1460
|
+
class: s.value,
|
|
1461
|
+
style: d.value,
|
|
1300
1462
|
type: "text",
|
|
1301
|
-
value:
|
|
1302
|
-
disabled:
|
|
1303
|
-
readonly:
|
|
1304
|
-
placeholder:
|
|
1463
|
+
value: w.value,
|
|
1464
|
+
disabled: t.disabled,
|
|
1465
|
+
readonly: t.readonly || !t.editable,
|
|
1466
|
+
placeholder: u.value,
|
|
1305
1467
|
onBlur: r,
|
|
1306
|
-
onChange:
|
|
1307
|
-
onFocus:
|
|
1308
|
-
onInput:
|
|
1309
|
-
onKeydown:
|
|
1468
|
+
onChange: p,
|
|
1469
|
+
onFocus: M,
|
|
1470
|
+
onInput: l,
|
|
1471
|
+
onKeydown: m
|
|
1310
1472
|
}, null);
|
|
1311
1473
|
}
|
|
1312
|
-
function
|
|
1474
|
+
function Jn(t, e, n) {
|
|
1313
1475
|
const {
|
|
1314
1476
|
canDownward: o,
|
|
1315
1477
|
canUpward: r,
|
|
1316
|
-
onClickDownButton:
|
|
1317
|
-
onClickUpButton:
|
|
1318
|
-
} = n,
|
|
1478
|
+
onClickDownButton: c,
|
|
1479
|
+
onClickUpButton: l
|
|
1480
|
+
} = n, m = O(() => ({
|
|
1319
1481
|
"input-group-append": !0,
|
|
1320
1482
|
"btn-group": !0,
|
|
1321
1483
|
"btn-group-number": !0
|
|
1322
|
-
})),
|
|
1484
|
+
})), w = O(() => ({
|
|
1323
1485
|
btn: !0,
|
|
1324
1486
|
"btn-secondary": !0,
|
|
1325
1487
|
"btn-number-flag": !0
|
|
1326
|
-
})),
|
|
1488
|
+
})), u = O(() => ({
|
|
1327
1489
|
cursor: r() ? "pointer" : "not-allowed",
|
|
1328
1490
|
"margin-left": 0
|
|
1329
|
-
})),
|
|
1491
|
+
})), s = O(() => ({
|
|
1330
1492
|
cursor: o() ? "pointer" : "not-allowed",
|
|
1331
1493
|
"margin-left": 0
|
|
1332
1494
|
}));
|
|
1333
|
-
return () =>
|
|
1334
|
-
class:
|
|
1335
|
-
}, [
|
|
1495
|
+
return () => k("div", {
|
|
1496
|
+
class: m.value
|
|
1497
|
+
}, [k("button", {
|
|
1336
1498
|
title: "upButton",
|
|
1337
|
-
class:
|
|
1338
|
-
style:
|
|
1339
|
-
onClick:
|
|
1499
|
+
class: w.value,
|
|
1500
|
+
style: u.value,
|
|
1501
|
+
onClick: l,
|
|
1340
1502
|
disabled: !r()
|
|
1341
|
-
}, [
|
|
1503
|
+
}, [k("span", {
|
|
1342
1504
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
1343
|
-
}, null)]),
|
|
1505
|
+
}, null)]), k("button", {
|
|
1344
1506
|
title: "downButton",
|
|
1345
|
-
class:
|
|
1346
|
-
style:
|
|
1347
|
-
onClick:
|
|
1507
|
+
class: w.value,
|
|
1508
|
+
style: s.value,
|
|
1509
|
+
onClick: c,
|
|
1348
1510
|
disabled: !o()
|
|
1349
|
-
}, [
|
|
1511
|
+
}, [k("span", {
|
|
1350
1512
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1351
1513
|
}, null)])]);
|
|
1352
1514
|
}
|
|
1353
|
-
function
|
|
1354
|
-
const n =
|
|
1355
|
-
displayValue:
|
|
1356
|
-
modelValue:
|
|
1357
|
-
getRealValue:
|
|
1358
|
-
} = n,
|
|
1359
|
-
format:
|
|
1515
|
+
function Xn(t, e) {
|
|
1516
|
+
const n = Me(t, e), o = Ne(t, e, n), r = Oe(t, e, o, n), c = Pe(t, e, o, n, r), l = Jn(t, e, r), {
|
|
1517
|
+
displayValue: m,
|
|
1518
|
+
modelValue: w,
|
|
1519
|
+
getRealValue: u
|
|
1520
|
+
} = n, s = Zn(t, e, c), {
|
|
1521
|
+
format: d
|
|
1360
1522
|
} = o, {
|
|
1361
|
-
isFocus:
|
|
1362
|
-
} =
|
|
1363
|
-
return
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
}), W(() => [
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1369
|
-
}), W(() => [
|
|
1370
|
-
|
|
1371
|
-
}), W(() => [
|
|
1372
|
-
|
|
1373
|
-
}), () =>
|
|
1523
|
+
isFocus: p
|
|
1524
|
+
} = c, V = O(() => !t.disabled && !t.readonly);
|
|
1525
|
+
return _(() => {
|
|
1526
|
+
const M = u(t.modelValue);
|
|
1527
|
+
m.value = d(M);
|
|
1528
|
+
}), W(() => [t.value], ([M]) => {
|
|
1529
|
+
const P = u(M);
|
|
1530
|
+
w.value = P, m.value = d(P);
|
|
1531
|
+
}), W(() => [t.modelValue], ([M]) => {
|
|
1532
|
+
M !== w.value && (w.value = M, !p.value && (m.value = d(u(M))));
|
|
1533
|
+
}), W(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
|
|
1534
|
+
m.value = d(w.value);
|
|
1535
|
+
}), () => k("div", {
|
|
1374
1536
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1375
|
-
}, [
|
|
1537
|
+
}, [s(), V.value && l()]);
|
|
1376
1538
|
}
|
|
1377
|
-
function
|
|
1378
|
-
const r = I(),
|
|
1379
|
-
isPassword:
|
|
1380
|
-
} = n,
|
|
1381
|
-
disabled:
|
|
1382
|
-
displayText:
|
|
1539
|
+
function Yn(t, e, n, o) {
|
|
1540
|
+
const r = I(), c = I(t.autocomplete), l = I(t.enableTitle), {
|
|
1541
|
+
isPassword: m
|
|
1542
|
+
} = n, w = I(t.minLength), u = I(t.maxLength), s = I(t.tabIndex), {
|
|
1543
|
+
disabled: d,
|
|
1544
|
+
displayText: p,
|
|
1383
1545
|
inputType: V,
|
|
1384
|
-
onBlur:
|
|
1385
|
-
onFocus:
|
|
1386
|
-
onInput:
|
|
1387
|
-
onClick:
|
|
1388
|
-
onKeydown:
|
|
1389
|
-
onKeyup:
|
|
1546
|
+
onBlur: M,
|
|
1547
|
+
onFocus: P,
|
|
1548
|
+
onInput: D,
|
|
1549
|
+
onClick: x,
|
|
1550
|
+
onKeydown: F,
|
|
1551
|
+
onKeyup: N,
|
|
1390
1552
|
onMousedown: j,
|
|
1391
1553
|
onTextBoxValueChange: $,
|
|
1392
1554
|
readonly: G,
|
|
1393
|
-
placeholder:
|
|
1394
|
-
textBoxClass:
|
|
1395
|
-
textBoxTitle:
|
|
1555
|
+
placeholder: R,
|
|
1556
|
+
textBoxClass: H,
|
|
1557
|
+
textBoxTitle: a
|
|
1396
1558
|
} = o;
|
|
1397
|
-
return
|
|
1398
|
-
|
|
1399
|
-
}), () =>
|
|
1559
|
+
return _(() => {
|
|
1560
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
1561
|
+
}), () => k("input", {
|
|
1400
1562
|
ref: r,
|
|
1401
1563
|
name: "input-group-value",
|
|
1402
|
-
autocomplete:
|
|
1403
|
-
class:
|
|
1404
|
-
disabled:
|
|
1405
|
-
maxlength:
|
|
1406
|
-
minlength:
|
|
1407
|
-
placeholder:
|
|
1564
|
+
autocomplete: c.value,
|
|
1565
|
+
class: H.value,
|
|
1566
|
+
disabled: d == null ? void 0 : d.value,
|
|
1567
|
+
maxlength: u.value,
|
|
1568
|
+
minlength: w.value,
|
|
1569
|
+
placeholder: R.value,
|
|
1408
1570
|
readonly: G == null ? void 0 : G.value,
|
|
1409
|
-
tabindex:
|
|
1410
|
-
title:
|
|
1571
|
+
tabindex: s.value,
|
|
1572
|
+
title: l.value && !m.value ? a.value : "",
|
|
1411
1573
|
type: V.value,
|
|
1412
|
-
value:
|
|
1413
|
-
onBlur:
|
|
1414
|
-
onClick:
|
|
1574
|
+
value: p == null ? void 0 : p.value,
|
|
1575
|
+
onBlur: M,
|
|
1576
|
+
onClick: x,
|
|
1415
1577
|
onChange: $,
|
|
1416
|
-
onFocus:
|
|
1417
|
-
onInput:
|
|
1418
|
-
onKeydown:
|
|
1419
|
-
onKeyup:
|
|
1578
|
+
onFocus: P,
|
|
1579
|
+
onInput: D,
|
|
1580
|
+
onKeydown: F,
|
|
1581
|
+
onKeyup: N,
|
|
1420
1582
|
onMousedown: j
|
|
1421
1583
|
}, null);
|
|
1422
1584
|
}
|
|
1423
|
-
function
|
|
1424
|
-
const n =
|
|
1425
|
-
content:
|
|
1585
|
+
function _n(t, e) {
|
|
1586
|
+
const n = O(() => t.useExtendInfo && !!t.extendInfo), o = xe({
|
|
1587
|
+
content: t.extendInfo
|
|
1426
1588
|
});
|
|
1427
1589
|
function r() {
|
|
1428
|
-
|
|
1590
|
+
e.emit("updateExtendInfo");
|
|
1429
1591
|
}
|
|
1430
|
-
return () => n.value && Fe(
|
|
1592
|
+
return () => n.value && Fe(k("span", {
|
|
1431
1593
|
class: "input-group-before-tips",
|
|
1432
1594
|
onMouseenter: r
|
|
1433
|
-
}, [
|
|
1595
|
+
}, [k("i", {
|
|
1434
1596
|
class: "f-icon f-icon-info-circle"
|
|
1435
|
-
}, null),
|
|
1597
|
+
}, null), k("b", {
|
|
1436
1598
|
class: "tips-arrow"
|
|
1437
|
-
}, null)]), [[
|
|
1599
|
+
}, null)]), [[Be("tooltip"), o]]);
|
|
1438
1600
|
}
|
|
1439
|
-
function
|
|
1601
|
+
function Kn(t, e, n, o, r) {
|
|
1440
1602
|
const {
|
|
1441
|
-
appendedButtonClass:
|
|
1442
|
-
appendedContent:
|
|
1443
|
-
} = n,
|
|
1444
|
-
clearButtonClass:
|
|
1445
|
-
clearButtonStyle:
|
|
1446
|
-
onClearValue:
|
|
1603
|
+
appendedButtonClass: c,
|
|
1604
|
+
appendedContent: l
|
|
1605
|
+
} = n, m = O(() => t.showButtonWhenDisabled && (!t.editable || !t.readonly) && !t.disabled), w = O(() => l.value && !e.slots.groupTextTemplate), u = O(() => !!e.slots.groupTextTemplate), {
|
|
1606
|
+
clearButtonClass: s,
|
|
1607
|
+
clearButtonStyle: d,
|
|
1608
|
+
onClearValue: p,
|
|
1447
1609
|
shouldShowClearButton: V
|
|
1448
1610
|
} = o;
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1611
|
+
function M() {
|
|
1612
|
+
return k("span", {
|
|
1451
1613
|
id: "clearIcon",
|
|
1452
|
-
class:
|
|
1453
|
-
style:
|
|
1454
|
-
onClick: (
|
|
1455
|
-
}, [
|
|
1614
|
+
class: s.value,
|
|
1615
|
+
style: d.value,
|
|
1616
|
+
onClick: (R) => p(R)
|
|
1617
|
+
}, [k("i", {
|
|
1456
1618
|
class: "f-icon modal_close"
|
|
1457
1619
|
}, null)]);
|
|
1458
1620
|
}
|
|
1459
|
-
function
|
|
1460
|
-
|
|
1621
|
+
function P(R) {
|
|
1622
|
+
e.emit("iconMouseEnter", R);
|
|
1461
1623
|
}
|
|
1462
|
-
function
|
|
1463
|
-
|
|
1624
|
+
function D(R) {
|
|
1625
|
+
e.emit("iconMouseLeave", R);
|
|
1464
1626
|
}
|
|
1465
|
-
function
|
|
1466
|
-
|
|
1467
|
-
originalEvent:
|
|
1468
|
-
}),
|
|
1627
|
+
function x(R) {
|
|
1628
|
+
m.value && e.emit("clickHandle", {
|
|
1629
|
+
originalEvent: R
|
|
1630
|
+
}), R.stopPropagation();
|
|
1469
1631
|
}
|
|
1470
|
-
const
|
|
1471
|
-
function
|
|
1472
|
-
return
|
|
1632
|
+
const F = t.type === "password" ? r.onClickAppendedButton : x;
|
|
1633
|
+
function N() {
|
|
1634
|
+
return k("span", {
|
|
1473
1635
|
class: "input-group-text",
|
|
1474
|
-
onMouseenter: (
|
|
1475
|
-
onMouseleave: (
|
|
1476
|
-
innerHTML:
|
|
1477
|
-
onClick: (
|
|
1636
|
+
onMouseenter: (R) => P(R),
|
|
1637
|
+
onMouseleave: (R) => D(R),
|
|
1638
|
+
innerHTML: l.value,
|
|
1639
|
+
onClick: (R) => F(R)
|
|
1478
1640
|
}, null);
|
|
1479
1641
|
}
|
|
1480
1642
|
function j() {
|
|
1481
|
-
return
|
|
1643
|
+
return e.slots.groupTextTemplate && e.slots.groupTextTemplate();
|
|
1482
1644
|
}
|
|
1483
1645
|
function $() {
|
|
1484
|
-
return
|
|
1646
|
+
return w.value ? N : u.value ? j : "";
|
|
1485
1647
|
}
|
|
1486
1648
|
const G = $();
|
|
1487
|
-
return () =>
|
|
1488
|
-
class:
|
|
1489
|
-
}, [V.value &&
|
|
1649
|
+
return () => k("div", {
|
|
1650
|
+
class: c.value
|
|
1651
|
+
}, [V.value && M(), G && G()]);
|
|
1490
1652
|
}
|
|
1491
|
-
const
|
|
1653
|
+
const eo = /* @__PURE__ */ X({
|
|
1492
1654
|
name: "FInputGroup",
|
|
1493
|
-
props:
|
|
1655
|
+
props: ye,
|
|
1494
1656
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
1495
|
-
setup(
|
|
1496
|
-
const n = I(
|
|
1497
|
-
inputGroupClass:
|
|
1498
|
-
inputType:
|
|
1499
|
-
inputGroupStyle:
|
|
1500
|
-
} = r,
|
|
1501
|
-
shouldShowAppendedButton:
|
|
1502
|
-
} =
|
|
1503
|
-
onMouseEnter:
|
|
1504
|
-
onMouseLeave:
|
|
1505
|
-
} =
|
|
1506
|
-
W(() => [
|
|
1657
|
+
setup(t, e) {
|
|
1658
|
+
const n = I(t.modelValue), o = I(t.modelValue), r = qn(t, e, n, o), {
|
|
1659
|
+
inputGroupClass: c,
|
|
1660
|
+
inputType: l,
|
|
1661
|
+
inputGroupStyle: m
|
|
1662
|
+
} = r, w = zn(t), {
|
|
1663
|
+
shouldShowAppendedButton: u
|
|
1664
|
+
} = w, s = Dn(t, e, r), {
|
|
1665
|
+
onMouseEnter: d,
|
|
1666
|
+
onMouseLeave: p
|
|
1667
|
+
} = s, V = Qn(t, e, l, w), M = Xn(t, e), P = Yn(t, e, V, r), D = Kn(t, e, w, s, V), x = _n(t, e), F = O(() => t.type === "number");
|
|
1668
|
+
W(() => [t.value], ([j]) => {
|
|
1507
1669
|
n.value = j, o.value = j;
|
|
1508
|
-
}), W(() => [
|
|
1670
|
+
}), W(() => [t.modelValue], ([j]) => {
|
|
1509
1671
|
n.value = j, o.value = j;
|
|
1510
|
-
}),
|
|
1511
|
-
|
|
1672
|
+
}), _(() => {
|
|
1673
|
+
t.value && (n.value = t.value, o.value = t.value);
|
|
1512
1674
|
});
|
|
1513
|
-
const
|
|
1675
|
+
const N = () => k(ae, null, [k("div", {
|
|
1514
1676
|
id: "inputGroup",
|
|
1515
|
-
class:
|
|
1516
|
-
style:
|
|
1517
|
-
onMouseenter:
|
|
1518
|
-
onMouseleave:
|
|
1519
|
-
}, [
|
|
1520
|
-
return () =>
|
|
1521
|
-
}
|
|
1522
|
-
}),
|
|
1523
|
-
let
|
|
1524
|
-
function
|
|
1525
|
-
|
|
1677
|
+
class: c.value,
|
|
1678
|
+
style: m.value,
|
|
1679
|
+
onMouseenter: d,
|
|
1680
|
+
onMouseleave: p
|
|
1681
|
+
}, [F.value ? M() : k(ae, null, [x(), P(), u.value && D()])])]);
|
|
1682
|
+
return () => N();
|
|
1683
|
+
}
|
|
1684
|
+
}), h = {}, v = {}, b = {}, C = {};
|
|
1685
|
+
let le = !1;
|
|
1686
|
+
function to() {
|
|
1687
|
+
le || (le = !0, Le.register(h, v, b, C), je.register(h, v, b, C), Re.register(h, v, b, C), Ae.register(h, v, b, C), $e.register(h, v, b, C), Ge.register(h, v, b, C), qe.register(h, v, b, C), te.register(h, v, b, C), De.register(h, v, b, C), Ue.register(h, v, b, C), He.register(h, v, b, C), We.register(h, v, b, C), ze.register(h, v, b, C), Qe.register(h, v, b, C), Ze.register(h, v, b, C), Se.register(h, v, b, C), Je.register(h, v, b, C), Xe.register(h, v, b, C), Ye.register(h, v, b, C), _e.register(h, v, b, C), Ke.register(h, v, b, C), et.register(h, v, b, C), nt.register(h, v, b, C), tt.register(h, v, b, C), ot.register(h, v, b, C), rt.register(h, v, b, C), at.register(h, v, b, C), it.register(h, v, b, C), Ee.register(h, v, b, C), st.register(h, v, b, C), lt.register(h, v, b, C), ut.register(h, v, b, C), ct.register(h, v, b, C), dt.register(h, v, b, C), pt.register(h, v, b, C), mt.register(h, v, b, C), ft.register(h, v, b, C), ht.register(h, v, b, C), vt.register(h, v, b, C), gt.register(h, v, b, C), jt.register(h, v, b), yt.register(h, v, b, C), bt.register(h, v, b, C), Ct.register(h, v, b, C), Tt.register(h, v, b, C), kt.register(h, v, b, C), wt.register(h, v, b, C), xt.register(h, v, b, C), Ft.register(h, v, b, C), Bt.register(h, v, b, C), It.register(h, v, b, C), St.register(h, v, b, C), Vt.register(h, v, b, C), Mt.register(h, v, b, C), Et.register(h, v, b, C), Nt.register(h, v, b, C), Ot.register(h, v, b, C), Pt.register(h, v, b, C), Lt.register(h, v, b, C));
|
|
1526
1688
|
}
|
|
1527
|
-
function
|
|
1528
|
-
|
|
1529
|
-
function
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1689
|
+
function no() {
|
|
1690
|
+
to();
|
|
1691
|
+
function t(r, c) {
|
|
1692
|
+
const l = v[r];
|
|
1693
|
+
return l ? l(c) : {};
|
|
1532
1694
|
}
|
|
1533
|
-
function
|
|
1534
|
-
return
|
|
1695
|
+
function e(r) {
|
|
1696
|
+
return h[r] || eo;
|
|
1535
1697
|
}
|
|
1536
1698
|
function n(r) {
|
|
1537
1699
|
switch (r) {
|
|
@@ -1586,71 +1748,145 @@ function Yn() {
|
|
|
1586
1748
|
return "onSchemaSelected";
|
|
1587
1749
|
case "mapping-editor":
|
|
1588
1750
|
return "onMappingFieldsChanged";
|
|
1751
|
+
case "textarea":
|
|
1752
|
+
return "onValueChange";
|
|
1589
1753
|
}
|
|
1590
1754
|
}
|
|
1591
1755
|
function o(r) {
|
|
1592
1756
|
switch (r) {
|
|
1593
1757
|
case "combo-list":
|
|
1594
1758
|
case "input-group":
|
|
1759
|
+
case "textarea":
|
|
1595
1760
|
return "onClear";
|
|
1596
1761
|
}
|
|
1597
1762
|
}
|
|
1598
|
-
return { resolveEditorProps:
|
|
1763
|
+
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: o };
|
|
1599
1764
|
}
|
|
1600
|
-
const
|
|
1765
|
+
const oo = /* @__PURE__ */ X({
|
|
1601
1766
|
name: "FDynamicFormGroup",
|
|
1602
|
-
props:
|
|
1767
|
+
props: ve,
|
|
1603
1768
|
emits: ["change", "update:modelValue"],
|
|
1604
|
-
setup(
|
|
1605
|
-
const n = I(
|
|
1606
|
-
I(
|
|
1607
|
-
const
|
|
1608
|
-
resolveEditorProps:
|
|
1769
|
+
setup(t, e) {
|
|
1770
|
+
const n = I(t.id), o = I(t.customClass), r = I(t.editor), c = I(t.label), l = I(t.modelValue), m = I(t.readonly), w = I(t.required), u = I(t.showLabel), s = I(t.visible);
|
|
1771
|
+
I(t.type);
|
|
1772
|
+
const d = I(), {
|
|
1773
|
+
resolveEditorProps: p,
|
|
1609
1774
|
resolveEditorType: V,
|
|
1610
|
-
getChangeFunctionName:
|
|
1611
|
-
getClearFunctionName:
|
|
1612
|
-
} =
|
|
1775
|
+
getChangeFunctionName: M,
|
|
1776
|
+
getClearFunctionName: P
|
|
1777
|
+
} = no(), D = O(() => ({
|
|
1613
1778
|
"form-group": !0,
|
|
1614
1779
|
"farris-form-group": !0,
|
|
1615
1780
|
"common-group": !0,
|
|
1616
|
-
"q-state-readonly":
|
|
1781
|
+
"q-state-readonly": m.value
|
|
1617
1782
|
}));
|
|
1618
|
-
function
|
|
1619
|
-
|
|
1783
|
+
function x(j, $) {
|
|
1784
|
+
l.value = $ !== void 0 ? $ : j, e.emit("update:modelValue", l.value), e.emit("change", l.value);
|
|
1620
1785
|
}
|
|
1621
|
-
function
|
|
1622
|
-
|
|
1786
|
+
function F() {
|
|
1787
|
+
e.emit("update:modelValue", "");
|
|
1623
1788
|
}
|
|
1624
|
-
const
|
|
1625
|
-
const j = r.value.type || "input-group", $ = V(j), G =
|
|
1626
|
-
return G[
|
|
1627
|
-
ref:
|
|
1789
|
+
const N = O(() => {
|
|
1790
|
+
const j = r.value.type || "input-group", $ = V(j), G = p(j, r.value), R = M(j), H = P(r.value.type);
|
|
1791
|
+
return G[R] = x, G[H] = F, () => k($, Ie({
|
|
1792
|
+
ref: d
|
|
1628
1793
|
}, G, {
|
|
1629
|
-
modelValue:
|
|
1630
|
-
"onUpdate:modelValue": (
|
|
1794
|
+
modelValue: l.value,
|
|
1795
|
+
"onUpdate:modelValue": (a) => l.value = a
|
|
1631
1796
|
}), null);
|
|
1632
1797
|
});
|
|
1633
|
-
return W([() =>
|
|
1634
|
-
n.value = j, o.value = $, r.value = G,
|
|
1635
|
-
}),
|
|
1636
|
-
editorRef:
|
|
1637
|
-
}), () =>
|
|
1798
|
+
return W([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible], ([j, $, G, R, H, a, g, f, B]) => {
|
|
1799
|
+
n.value = j, o.value = $, r.value = G, c.value = R, l.value = H, m.value = a, w.value = g, u.value = f, s.value = B;
|
|
1800
|
+
}), e.expose({
|
|
1801
|
+
editorRef: d
|
|
1802
|
+
}), () => s.value && k("div", {
|
|
1638
1803
|
id: `${n.value}-input-group`,
|
|
1639
1804
|
class: o.value
|
|
1640
|
-
}, [
|
|
1805
|
+
}, [k("div", {
|
|
1641
1806
|
class: "farris-group-wrap"
|
|
1642
|
-
}, [
|
|
1643
|
-
class:
|
|
1644
|
-
}, [
|
|
1807
|
+
}, [k("div", {
|
|
1808
|
+
class: D.value
|
|
1809
|
+
}, [u.value && k(En, {
|
|
1645
1810
|
id: `${n.value}-lable`,
|
|
1646
|
-
required:
|
|
1647
|
-
text:
|
|
1648
|
-
title:
|
|
1649
|
-
}, null),
|
|
1811
|
+
required: w.value,
|
|
1812
|
+
text: c.value,
|
|
1813
|
+
title: c.value
|
|
1814
|
+
}, null), k("div", {
|
|
1650
1815
|
class: "farris-input-wrap"
|
|
1651
|
-
}, [
|
|
1816
|
+
}, [N.value()])])])]);
|
|
1652
1817
|
}
|
|
1653
|
-
}),
|
|
1818
|
+
}), Z = class Z {
|
|
1819
|
+
/**
|
|
1820
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
1821
|
+
*/
|
|
1822
|
+
static getEditorTypesByMDataType(e) {
|
|
1823
|
+
const n = Z.fieldControlTypeMapping[e];
|
|
1824
|
+
return n || [{ key: "", value: "" }];
|
|
1825
|
+
}
|
|
1826
|
+
/**
|
|
1827
|
+
* 获取所有输入类控件
|
|
1828
|
+
*/
|
|
1829
|
+
static getAllInputTypes() {
|
|
1830
|
+
const e = [];
|
|
1831
|
+
for (let n in Z.fieldControlTypeMapping)
|
|
1832
|
+
Z.fieldControlTypeMapping[n].forEach((o) => {
|
|
1833
|
+
e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
1834
|
+
});
|
|
1835
|
+
return e;
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
/**
|
|
1839
|
+
* <字段类型,可配置的控件类型列表>的映射
|
|
1840
|
+
*/
|
|
1841
|
+
y(Z, "fieldControlTypeMapping", {
|
|
1842
|
+
String: [
|
|
1843
|
+
{ key: E["input-group"].type, value: E["input-group"].name },
|
|
1844
|
+
{ key: E.lookup.type, value: E.lookup.name },
|
|
1845
|
+
{ key: E["date-picker"].type, value: E["date-picker"].name },
|
|
1846
|
+
{ key: E["check-box"].type, value: E["check-box"].name },
|
|
1847
|
+
{ key: E["radio-group"].type, value: E["radio-group"].name },
|
|
1848
|
+
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
1849
|
+
{ key: E.textarea.type, value: E.textarea.name }
|
|
1850
|
+
],
|
|
1851
|
+
Text: [
|
|
1852
|
+
{ key: E.textarea.type, value: E.textarea.name },
|
|
1853
|
+
{ key: E.lookup.type, value: E.lookup.name }
|
|
1854
|
+
],
|
|
1855
|
+
Decimal: [
|
|
1856
|
+
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
1857
|
+
],
|
|
1858
|
+
Integer: [
|
|
1859
|
+
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
1860
|
+
],
|
|
1861
|
+
Number: [
|
|
1862
|
+
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
1863
|
+
],
|
|
1864
|
+
BigNumber: [
|
|
1865
|
+
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
1866
|
+
],
|
|
1867
|
+
Date: [
|
|
1868
|
+
{ key: E["date-picker"].type, value: E["date-picker"].name }
|
|
1869
|
+
],
|
|
1870
|
+
DateTime: [
|
|
1871
|
+
{ key: E["date-picker"].type, value: E["date-picker"].name }
|
|
1872
|
+
],
|
|
1873
|
+
Boolean: [
|
|
1874
|
+
{ key: E.switch.type, value: E.switch.name },
|
|
1875
|
+
{ key: E["check-box"].type, value: E["check-box"].name }
|
|
1876
|
+
],
|
|
1877
|
+
Enum: [
|
|
1878
|
+
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
1879
|
+
{ key: E["radio-group"].type, value: E["radio-group"].name }
|
|
1880
|
+
],
|
|
1881
|
+
Object: [
|
|
1882
|
+
{ key: E.lookup.type, value: E.lookup.name },
|
|
1883
|
+
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
1884
|
+
{ key: E["radio-group"].type, value: E["radio-group"].name }
|
|
1885
|
+
]
|
|
1886
|
+
});
|
|
1887
|
+
let ue = Z;
|
|
1888
|
+
I(0);
|
|
1889
|
+
const ro = {
|
|
1654
1890
|
id: { type: String, default: "" },
|
|
1655
1891
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
1656
1892
|
editor: { type: Object, default: {} },
|
|
@@ -1665,14 +1901,14 @@ const Kn = /* @__PURE__ */ Z({
|
|
|
1665
1901
|
*/
|
|
1666
1902
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
1667
1903
|
};
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1904
|
+
K(
|
|
1905
|
+
ro,
|
|
1906
|
+
he,
|
|
1907
|
+
oe,
|
|
1672
1908
|
void 0
|
|
1673
1909
|
);
|
|
1674
|
-
var
|
|
1675
|
-
const
|
|
1910
|
+
var ao = /* @__PURE__ */ ((t) => (t[t.IntType = 0] = "IntType", t[t.StringType = 1] = "StringType", t[t.BoolType = 2] = "BoolType", t))(ao || {}), be = /* @__PURE__ */ ((t) => (t[t.Value = 0] = "Value", t[t.SmartHelp = 1] = "SmartHelp", t[t.Enum = 2] = "Enum", t[t.Express = 3] = "Express", t))(be || {}), Ce = /* @__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))(Ce || {});
|
|
1911
|
+
const io = [
|
|
1676
1912
|
{
|
|
1677
1913
|
value: "0",
|
|
1678
1914
|
name: "等于"
|
|
@@ -1709,7 +1945,7 @@ const no = [
|
|
|
1709
1945
|
value: "8",
|
|
1710
1946
|
name: "结束是"
|
|
1711
1947
|
}
|
|
1712
|
-
],
|
|
1948
|
+
], so = {
|
|
1713
1949
|
"button-edit": ["0", "1", " 6", "7", "8"],
|
|
1714
1950
|
"check-box": ["0"],
|
|
1715
1951
|
"combo-list": ["0", "1"],
|
|
@@ -1729,395 +1965,395 @@ const no = [
|
|
|
1729
1965
|
"radio-group": ["0"],
|
|
1730
1966
|
text: ["0", "1", " 6", "7", "8"]
|
|
1731
1967
|
};
|
|
1732
|
-
function
|
|
1968
|
+
function lo(t, e, n) {
|
|
1733
1969
|
const { fieldMap: o } = n;
|
|
1734
|
-
function r(
|
|
1735
|
-
const
|
|
1736
|
-
if (!
|
|
1970
|
+
function r(c) {
|
|
1971
|
+
const l = o.get(c.fieldCode);
|
|
1972
|
+
if (!l)
|
|
1737
1973
|
return [];
|
|
1738
|
-
const
|
|
1739
|
-
return
|
|
1974
|
+
const m = l.editor.type, w = new Set(so[m]);
|
|
1975
|
+
return io.filter((s) => w.has(s.value));
|
|
1740
1976
|
}
|
|
1741
1977
|
return { getCompareOperators: r };
|
|
1742
1978
|
}
|
|
1743
|
-
function
|
|
1744
|
-
const
|
|
1979
|
+
function uo() {
|
|
1980
|
+
const t = I({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
1745
1981
|
let o = 0;
|
|
1746
1982
|
function r() {
|
|
1747
1983
|
return {
|
|
1748
1984
|
id: "",
|
|
1749
1985
|
fieldCode: "",
|
|
1750
1986
|
fieldName: "",
|
|
1751
|
-
compareType:
|
|
1752
|
-
valueType:
|
|
1753
|
-
value: new
|
|
1987
|
+
compareType: Ce.Equal,
|
|
1988
|
+
valueType: be.Value,
|
|
1989
|
+
value: new de(),
|
|
1754
1990
|
relation: 0,
|
|
1755
1991
|
conditionId: Date.now()
|
|
1756
1992
|
};
|
|
1757
1993
|
}
|
|
1758
|
-
function
|
|
1759
|
-
return { relation:
|
|
1994
|
+
function c(a, g) {
|
|
1995
|
+
return { relation: a, items: [], children: [], path: [], groupId: ++o, level: g };
|
|
1760
1996
|
}
|
|
1761
|
-
function
|
|
1762
|
-
const
|
|
1763
|
-
n.forEach((
|
|
1764
|
-
|
|
1765
|
-
}),
|
|
1766
|
-
|
|
1767
|
-
}),
|
|
1768
|
-
}
|
|
1769
|
-
function
|
|
1770
|
-
const
|
|
1997
|
+
function l() {
|
|
1998
|
+
const a = Object.assign({}, t.value);
|
|
1999
|
+
n.forEach((g, f) => {
|
|
2000
|
+
g.groupId === a.groupId && n.set(f, a);
|
|
2001
|
+
}), e.forEach((g, f) => {
|
|
2002
|
+
g.groupId === a.groupId && e.set(f, a);
|
|
2003
|
+
}), t.value = a;
|
|
2004
|
+
}
|
|
2005
|
+
function m(a) {
|
|
2006
|
+
const g = /* @__PURE__ */ new Map();
|
|
1771
2007
|
let f = 0;
|
|
1772
|
-
return
|
|
1773
|
-
var
|
|
1774
|
-
if (f += ((
|
|
2008
|
+
return a.forEach((B, i) => {
|
|
2009
|
+
var T, S;
|
|
2010
|
+
if (f += ((T = B.lBracket) == null ? void 0 : T.length) || 0, g.set(i, f), f -= ((S = B.rBracket) == null ? void 0 : S.length) || 0, f < 0)
|
|
1775
2011
|
throw new Error("The right bracket is out of range.");
|
|
1776
|
-
}),
|
|
2012
|
+
}), g;
|
|
1777
2013
|
}
|
|
1778
|
-
function
|
|
1779
|
-
for (let
|
|
1780
|
-
const S =
|
|
1781
|
-
f.children.push(
|
|
2014
|
+
function w(a, g, f, B, i) {
|
|
2015
|
+
for (let T = 0; T < g; T++) {
|
|
2016
|
+
const S = a + (T + 1), U = c(i, S);
|
|
2017
|
+
f.children.push(U), n.set(U.groupId, f), f = f.children[f.children.length - 1], B.push(f);
|
|
1782
2018
|
}
|
|
1783
2019
|
return f;
|
|
1784
2020
|
}
|
|
1785
|
-
function
|
|
1786
|
-
for (let
|
|
2021
|
+
function u(a, g, f, B, i) {
|
|
2022
|
+
for (let q = g; q <= 0; q++)
|
|
1787
2023
|
B.pop();
|
|
1788
|
-
const
|
|
1789
|
-
if (!
|
|
2024
|
+
const T = B[B.length - 1];
|
|
2025
|
+
if (!T)
|
|
1790
2026
|
throw new Error("The group path is out of range");
|
|
1791
|
-
const S =
|
|
1792
|
-
return
|
|
2027
|
+
const S = a + g, U = c(i, S);
|
|
2028
|
+
return T.children.push(U), n.set(U.groupId, T), f = T.children[T.children.length - 1], B.push(f), f;
|
|
1793
2029
|
}
|
|
1794
|
-
function
|
|
2030
|
+
function s(a, g, f, B) {
|
|
1795
2031
|
f.pop();
|
|
1796
|
-
const
|
|
1797
|
-
return
|
|
2032
|
+
const i = f[f.length - 1], T = c(B, a);
|
|
2033
|
+
return i.children.push(T), n.set(T.groupId, i), g = i.children[i.children.length - 1], f.push(g), g;
|
|
1798
2034
|
}
|
|
1799
|
-
function
|
|
1800
|
-
let S =
|
|
2035
|
+
function d(a, g, f, B, i, T) {
|
|
2036
|
+
let S = a[a.length - 1];
|
|
1801
2037
|
if (!S)
|
|
1802
2038
|
throw new Error("The group path is out of range");
|
|
1803
|
-
const
|
|
2039
|
+
const U = g.get(B) || 0, q = g.get(f) || 0;
|
|
1804
2040
|
if (f < 0 || f === B)
|
|
1805
|
-
return
|
|
1806
|
-
const
|
|
1807
|
-
return S =
|
|
2041
|
+
return a[a.length - 1];
|
|
2042
|
+
const A = U - q, L = i && i.relation !== void 0 ? i.relation : 1;
|
|
2043
|
+
return S = A > 0 ? w(q, A, S, a, L) : S, S = A < 0 ? u(q, A, S, a, L) : S, S = A === 0 && q > 0 && U > 0 && i && T && !!i.rBracket && !!T.lBracket ? s(q, S, a, L) : S, S;
|
|
1808
2044
|
}
|
|
1809
|
-
function
|
|
1810
|
-
const f = { relation:
|
|
1811
|
-
return
|
|
1812
|
-
const
|
|
1813
|
-
|
|
1814
|
-
}),
|
|
2045
|
+
function p(a) {
|
|
2046
|
+
const f = { relation: a.length && a[0].relation !== void 0 ? a[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, B = [f], i = m(a);
|
|
2047
|
+
return a.forEach((T, S) => {
|
|
2048
|
+
const U = S - 1, q = a[U], A = d(B, i, U, S, q, T);
|
|
2049
|
+
A.items.push(T), e.set(T.conditionId, A);
|
|
2050
|
+
}), t.value = f, f;
|
|
1815
2051
|
}
|
|
1816
2052
|
function V() {
|
|
1817
|
-
const
|
|
1818
|
-
|
|
2053
|
+
const a = r();
|
|
2054
|
+
e.set(a.conditionId, t.value), t.value.items.push(a);
|
|
1819
2055
|
}
|
|
1820
|
-
function
|
|
1821
|
-
if (!
|
|
2056
|
+
function M(a) {
|
|
2057
|
+
if (!a)
|
|
1822
2058
|
return;
|
|
1823
|
-
const
|
|
1824
|
-
if (
|
|
1825
|
-
const f =
|
|
1826
|
-
|
|
2059
|
+
const g = e.get(a.conditionId);
|
|
2060
|
+
if (g) {
|
|
2061
|
+
const f = g.items.findIndex((i) => i.conditionId === a.conditionId) + 1, B = r();
|
|
2062
|
+
e.set(B.conditionId, g), g.items.splice(f, 0, B), l();
|
|
1827
2063
|
}
|
|
1828
2064
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const
|
|
1831
|
-
|
|
2065
|
+
function P(a) {
|
|
2066
|
+
const g = e.get(a.conditionId);
|
|
2067
|
+
g && (g.items = g.items.filter((f) => f.conditionId !== a.conditionId), e.delete(a.conditionId), H(), l());
|
|
1832
2068
|
}
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1835
|
-
const S =
|
|
2069
|
+
function D(a, g, f, B) {
|
|
2070
|
+
a.reduce((i, T) => {
|
|
2071
|
+
const S = T.conditionId !== void 0, U = T.groupId !== void 0;
|
|
1836
2072
|
if (S) {
|
|
1837
|
-
const
|
|
1838
|
-
f.push(
|
|
2073
|
+
const q = T;
|
|
2074
|
+
f.push(q), i.items.set(q.conditionId, q);
|
|
1839
2075
|
}
|
|
1840
|
-
if (
|
|
1841
|
-
const
|
|
1842
|
-
B.push(
|
|
2076
|
+
if (U) {
|
|
2077
|
+
const q = T;
|
|
2078
|
+
B.push(q), i.groups.set(q.groupId, q);
|
|
1843
2079
|
}
|
|
1844
|
-
return
|
|
1845
|
-
},
|
|
2080
|
+
return i;
|
|
2081
|
+
}, g);
|
|
1846
2082
|
}
|
|
1847
|
-
function
|
|
1848
|
-
|
|
2083
|
+
function x(a, g, f, B, i) {
|
|
2084
|
+
a && (a.items = g.length ? a.items.filter((T) => !f.has(T.conditionId)) : a.items, a.children = B.length ? a.children.filter((T) => !i.has(T.groupId)) : a.children);
|
|
1849
2085
|
}
|
|
1850
|
-
function
|
|
1851
|
-
|
|
1852
|
-
|
|
2086
|
+
function F(a, g, f) {
|
|
2087
|
+
g.forEach((B) => {
|
|
2088
|
+
a.items.push(B), e.set(B.conditionId, a);
|
|
1853
2089
|
}), f.forEach((B) => {
|
|
1854
|
-
|
|
2090
|
+
a.children.push(B), n.set(B.groupId, a);
|
|
1855
2091
|
});
|
|
1856
2092
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const
|
|
2093
|
+
function N(a) {
|
|
2094
|
+
const g = a[0], f = g.conditionId !== void 0 ? e.get(g.conditionId) : n.get(g.groupId), B = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, i = [], T = [];
|
|
1859
2095
|
if (f) {
|
|
1860
|
-
|
|
1861
|
-
const S =
|
|
1862
|
-
|
|
2096
|
+
D(a, B, i, T), x(f, i, B.items, T, B.groups);
|
|
2097
|
+
const S = c(f.relation, f.level + 1);
|
|
2098
|
+
F(S, i, T), f.children.push(S), n.set(S.groupId, f), l();
|
|
1863
2099
|
}
|
|
1864
2100
|
}
|
|
1865
|
-
function j(
|
|
1866
|
-
const
|
|
1867
|
-
B && (B.children = B.children.filter((
|
|
1868
|
-
B.items.push(
|
|
1869
|
-
}), f.forEach((
|
|
1870
|
-
B.children.push(
|
|
1871
|
-
}),
|
|
2101
|
+
function j(a) {
|
|
2102
|
+
const g = [...a.items], f = [...a.children], B = n.get(a.groupId);
|
|
2103
|
+
B && (B.children = B.children.filter((i) => i.groupId !== a.groupId), n.delete(a.groupId), g.forEach((i) => {
|
|
2104
|
+
B.items.push(i), e.set(i.conditionId, B);
|
|
2105
|
+
}), f.forEach((i) => {
|
|
2106
|
+
B.children.push(i), n.set(i.groupId, B);
|
|
2107
|
+
}), l());
|
|
1872
2108
|
}
|
|
1873
|
-
function $(
|
|
1874
|
-
|
|
2109
|
+
function $(a) {
|
|
2110
|
+
a.relation = a.relation === 1 ? 2 : 1, l();
|
|
1875
2111
|
}
|
|
1876
2112
|
let G;
|
|
1877
|
-
function
|
|
1878
|
-
const { relation:
|
|
1879
|
-
return (
|
|
2113
|
+
function R(a) {
|
|
2114
|
+
const { relation: g } = a;
|
|
2115
|
+
return (a.children && a.children.length ? a.children.map((B, i, T) => {
|
|
1880
2116
|
const S = G(B);
|
|
1881
|
-
return S[0].lBracket = (S[0].lBracket || "") + "(", S[S.length - 1].rBracket = (S[S.length - 1].rBracket || "") + ")", S[S.length - 1].relation =
|
|
2117
|
+
return S[0].lBracket = (S[0].lBracket || "") + "(", S[S.length - 1].rBracket = (S[S.length - 1].rBracket || "") + ")", S[S.length - 1].relation = i < T.length - 1 ? g : 0, S;
|
|
1882
2118
|
}) : []).flat();
|
|
1883
2119
|
}
|
|
1884
|
-
G = (
|
|
1885
|
-
const { relation:
|
|
2120
|
+
G = (a = t.value) => {
|
|
2121
|
+
const { relation: g } = a, f = a.items.map((i, T, S) => (i.lBracket = T === 0 ? "(" : "", i.rBracket = T === S.length - 1 ? ")" : "", i.relation = T < S.length - 1 ? g || 1 : 0, i)), B = R(a);
|
|
1886
2122
|
return [...f, ...B];
|
|
1887
2123
|
};
|
|
1888
|
-
function
|
|
1889
|
-
const
|
|
1890
|
-
if (
|
|
1891
|
-
|
|
1892
|
-
}),
|
|
1893
|
-
const f =
|
|
1894
|
-
|
|
1895
|
-
} else
|
|
2124
|
+
function H(a) {
|
|
2125
|
+
const g = a || t.value;
|
|
2126
|
+
if (g.children.length && g.children.forEach((f) => {
|
|
2127
|
+
H(f);
|
|
2128
|
+
}), g.level === 0 && !g.items.length && g.children.length === 1) {
|
|
2129
|
+
const f = g.children[0];
|
|
2130
|
+
t.value.relation = f.relation, j(f);
|
|
2131
|
+
} else g.items.length === 0 && g.children.length <= 1 && j(g);
|
|
1896
2132
|
}
|
|
1897
2133
|
return {
|
|
1898
2134
|
addCondition: V,
|
|
1899
2135
|
changeGroupRelation: $,
|
|
1900
|
-
conditionGroupMap:
|
|
2136
|
+
conditionGroupMap: e,
|
|
1901
2137
|
getConditions: G,
|
|
1902
|
-
group:
|
|
2138
|
+
group: N,
|
|
1903
2139
|
groupParentMap: n,
|
|
1904
|
-
insertConditionTo:
|
|
1905
|
-
loadConditionGroup:
|
|
1906
|
-
refresh:
|
|
1907
|
-
removeCondition:
|
|
1908
|
-
rootGroup:
|
|
2140
|
+
insertConditionTo: M,
|
|
2141
|
+
loadConditionGroup: p,
|
|
2142
|
+
refresh: l,
|
|
2143
|
+
removeCondition: P,
|
|
2144
|
+
rootGroup: t,
|
|
1909
2145
|
unGroup: j
|
|
1910
2146
|
};
|
|
1911
2147
|
}
|
|
1912
|
-
function
|
|
1913
|
-
const o = I(/* @__PURE__ */ new Set()), r = I(/* @__PURE__ */ new Set()), { conditionGroupMap:
|
|
1914
|
-
let
|
|
1915
|
-
function
|
|
1916
|
-
let
|
|
2148
|
+
function co(t, e, n) {
|
|
2149
|
+
const o = I(/* @__PURE__ */ new Set()), r = I(/* @__PURE__ */ new Set()), { conditionGroupMap: c, groupParentMap: l } = n;
|
|
2150
|
+
let m, w;
|
|
2151
|
+
function u(x) {
|
|
2152
|
+
let F = m.level <= x.level ? m : x, N = m.level > x.level ? m : x;
|
|
1917
2153
|
const j = [];
|
|
1918
|
-
for (;
|
|
1919
|
-
|
|
2154
|
+
for (; N && F && N !== F; )
|
|
2155
|
+
N.level > F.level ? (j.push(N), N = l.get(N.groupId)) : N.level === F.level && (F = l.get(F.groupId), F && j.unshift(F));
|
|
1920
2156
|
return j;
|
|
1921
2157
|
}
|
|
1922
|
-
function
|
|
1923
|
-
r.value.add(
|
|
2158
|
+
function s(x) {
|
|
2159
|
+
r.value.add(x.groupId), x.items.forEach((F) => o.value.add(F.conditionId)), x.children.forEach((F) => s(F));
|
|
1924
2160
|
}
|
|
1925
|
-
function
|
|
1926
|
-
const { conditionId:
|
|
1927
|
-
o.value.add(
|
|
1928
|
-
const
|
|
1929
|
-
|
|
2161
|
+
function d(x) {
|
|
2162
|
+
const { conditionId: F } = x;
|
|
2163
|
+
o.value.add(F), m = o.value.size === 0 ? c.get(F) : m;
|
|
2164
|
+
const N = c.get(x.conditionId);
|
|
2165
|
+
u(N).forEach(($) => s($));
|
|
1930
2166
|
}
|
|
1931
|
-
const
|
|
1932
|
-
r.value.delete(
|
|
1933
|
-
const
|
|
1934
|
-
|
|
2167
|
+
const p = O(() => o.value.size === 0 && r.value.size === 1), V = function(x) {
|
|
2168
|
+
r.value.delete(x.groupId), x.items.forEach((N) => w(N)), x.children.forEach((N) => !p.value && V(N));
|
|
2169
|
+
const F = l.get(x.groupId);
|
|
2170
|
+
F && r.value.has(F.groupId) && V(F);
|
|
1935
2171
|
};
|
|
1936
|
-
|
|
1937
|
-
const { conditionId:
|
|
1938
|
-
if (o.value.has(
|
|
1939
|
-
const
|
|
1940
|
-
|
|
2172
|
+
w = function(x) {
|
|
2173
|
+
const { conditionId: F } = x;
|
|
2174
|
+
if (o.value.has(F) && o.value.delete(F), r.value.size > 0) {
|
|
2175
|
+
const N = c.get(F);
|
|
2176
|
+
N && r.value.has(N.groupId) && V(N);
|
|
1941
2177
|
}
|
|
1942
2178
|
};
|
|
1943
|
-
function
|
|
1944
|
-
const { conditionId:
|
|
1945
|
-
o.value.size === 0 && (
|
|
2179
|
+
function M(x) {
|
|
2180
|
+
const { conditionId: F } = x;
|
|
2181
|
+
o.value.size === 0 && (m = c.get(F)), o.value.has(F) ? w(x) : d(x);
|
|
1946
2182
|
}
|
|
1947
|
-
function
|
|
1948
|
-
const
|
|
1949
|
-
return
|
|
2183
|
+
function P() {
|
|
2184
|
+
const x = [];
|
|
2185
|
+
return m && (m.items.filter((F) => o.value.has(F.conditionId)).forEach((F) => x.push(F)), m.children.filter((F) => r.value.has(F.groupId)).forEach((F) => x.push(F))), x;
|
|
1950
2186
|
}
|
|
1951
|
-
function
|
|
2187
|
+
function D() {
|
|
1952
2188
|
o.value.clear(), r.value.clear();
|
|
1953
2189
|
}
|
|
1954
|
-
return { clear:
|
|
2190
|
+
return { clear: D, getSelectedGroupItem: P, selectedItems: o, toggleSelect: M };
|
|
1955
2191
|
}
|
|
1956
|
-
const
|
|
2192
|
+
const ee = /* @__PURE__ */ X({
|
|
1957
2193
|
name: "FConditionList",
|
|
1958
|
-
props:
|
|
2194
|
+
props: ce,
|
|
1959
2195
|
emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
|
|
1960
|
-
setup(
|
|
1961
|
-
const n = I(
|
|
1962
|
-
convertToSingleControl:
|
|
1963
|
-
fields:
|
|
1964
|
-
fieldMap:
|
|
1965
|
-
loadFieldConfigs:
|
|
1966
|
-
} = r,
|
|
1967
|
-
addCondition:
|
|
1968
|
-
changeGroupRelation:
|
|
1969
|
-
getConditions:
|
|
2196
|
+
setup(t, e) {
|
|
2197
|
+
const n = I(t.key), o = I(t.conditions), r = me(t), {
|
|
2198
|
+
convertToSingleControl: c,
|
|
2199
|
+
fields: l,
|
|
2200
|
+
fieldMap: m,
|
|
2201
|
+
loadFieldConfigs: w
|
|
2202
|
+
} = r, u = uo(), {
|
|
2203
|
+
addCondition: s,
|
|
2204
|
+
changeGroupRelation: d,
|
|
2205
|
+
getConditions: p,
|
|
1970
2206
|
group: V,
|
|
1971
|
-
insertConditionTo:
|
|
1972
|
-
loadConditionGroup:
|
|
1973
|
-
refresh:
|
|
1974
|
-
removeCondition:
|
|
1975
|
-
rootGroup:
|
|
1976
|
-
unGroup:
|
|
1977
|
-
} =
|
|
2207
|
+
insertConditionTo: M,
|
|
2208
|
+
loadConditionGroup: P,
|
|
2209
|
+
refresh: D,
|
|
2210
|
+
removeCondition: x,
|
|
2211
|
+
rootGroup: F,
|
|
2212
|
+
unGroup: N
|
|
2213
|
+
} = u, {
|
|
1978
2214
|
createConditionValue: j
|
|
1979
|
-
} =
|
|
2215
|
+
} = pe(), $ = co(t, e, u), {
|
|
1980
2216
|
selectedItems: G,
|
|
1981
|
-
toggleSelect:
|
|
2217
|
+
toggleSelect: R
|
|
1982
2218
|
} = $, {
|
|
1983
|
-
getCompareOperators:
|
|
1984
|
-
} =
|
|
1985
|
-
|
|
1986
|
-
function
|
|
1987
|
-
var
|
|
1988
|
-
const L = ((
|
|
2219
|
+
getCompareOperators: H
|
|
2220
|
+
} = lo(t, e, r);
|
|
2221
|
+
w(!1), l.value = c(l.value), P(o.value);
|
|
2222
|
+
function a(A) {
|
|
2223
|
+
var Q;
|
|
2224
|
+
const L = ((Q = m.get(A.fieldCode)) == null ? void 0 : Q.editor) || {
|
|
1989
2225
|
type: "text"
|
|
1990
2226
|
};
|
|
1991
|
-
|
|
2227
|
+
A.value = j(L.type, void 0), e.emit("labelCodeChange", A);
|
|
1992
2228
|
}
|
|
1993
|
-
function
|
|
1994
|
-
|
|
2229
|
+
function g(A, L) {
|
|
2230
|
+
e.emit("compareTypeChange", L);
|
|
1995
2231
|
}
|
|
1996
2232
|
function f() {
|
|
1997
2233
|
}
|
|
1998
|
-
|
|
1999
|
-
getConditions:
|
|
2234
|
+
e.expose({
|
|
2235
|
+
getConditions: p
|
|
2000
2236
|
});
|
|
2001
|
-
function B(
|
|
2002
|
-
|
|
2237
|
+
function B(A, L) {
|
|
2238
|
+
e.emit("valueChange", A, L);
|
|
2003
2239
|
}
|
|
2004
|
-
function
|
|
2005
|
-
return
|
|
2006
|
-
var
|
|
2007
|
-
return
|
|
2240
|
+
function i(A) {
|
|
2241
|
+
return A.items.map((L) => {
|
|
2242
|
+
var Q;
|
|
2243
|
+
return k("div", {
|
|
2008
2244
|
class: "condition-list-item",
|
|
2009
2245
|
key: L.conditionId
|
|
2010
|
-
}, [
|
|
2246
|
+
}, [k("div", {
|
|
2011
2247
|
class: "condition-list-item-type mr-3"
|
|
2012
|
-
}, [
|
|
2248
|
+
}, [k(te, {
|
|
2013
2249
|
"value-field": "labelCode",
|
|
2014
2250
|
"text-field": "name",
|
|
2015
2251
|
"id-field": "id",
|
|
2016
|
-
data:
|
|
2252
|
+
data: l.value,
|
|
2017
2253
|
modelValue: L.fieldCode,
|
|
2018
|
-
"onUpdate:modelValue": (
|
|
2019
|
-
onChange: (
|
|
2020
|
-
}, null)]),
|
|
2254
|
+
"onUpdate:modelValue": (z) => L.fieldCode = z,
|
|
2255
|
+
onChange: (z) => a(L)
|
|
2256
|
+
}, null)]), k("div", {
|
|
2021
2257
|
class: "condition-list-item-compare mr-3"
|
|
2022
|
-
}, [
|
|
2258
|
+
}, [k(te, {
|
|
2023
2259
|
"value-field": "value",
|
|
2024
2260
|
"text-field": "name",
|
|
2025
2261
|
"id-field": "id",
|
|
2026
|
-
data:
|
|
2262
|
+
data: H(L),
|
|
2027
2263
|
modelValue: L.compareType,
|
|
2028
|
-
"onUpdate:modelValue": (
|
|
2029
|
-
onChange: (
|
|
2030
|
-
}, null)]),
|
|
2264
|
+
"onUpdate:modelValue": (z) => L.compareType = z,
|
|
2265
|
+
onChange: (z) => g(z, L)
|
|
2266
|
+
}, null)]), k("div", {
|
|
2031
2267
|
class: "condition-list-item-control mr-3"
|
|
2032
|
-
}, [
|
|
2033
|
-
editor: (
|
|
2268
|
+
}, [k(oo, {
|
|
2269
|
+
editor: (Q = m.get(L.fieldCode)) == null ? void 0 : Q.editor,
|
|
2034
2270
|
showLabel: !1,
|
|
2035
2271
|
modelValue: L.value.value,
|
|
2036
|
-
"onUpdate:modelValue": (
|
|
2037
|
-
onChange: (
|
|
2038
|
-
B(
|
|
2272
|
+
"onUpdate:modelValue": (z) => L.value.value = z,
|
|
2273
|
+
onChange: (z) => {
|
|
2274
|
+
B(z, L);
|
|
2039
2275
|
}
|
|
2040
|
-
}, null)]),
|
|
2276
|
+
}, null)]), k("div", {
|
|
2041
2277
|
class: "condition-list-item-extend"
|
|
2042
|
-
}, [
|
|
2278
|
+
}, [k("span", {
|
|
2043
2279
|
class: "f-icon f-icon-plus-sm mr-2",
|
|
2044
|
-
onClick: () =>
|
|
2045
|
-
}, null),
|
|
2280
|
+
onClick: () => M(L)
|
|
2281
|
+
}, null), k("span", {
|
|
2046
2282
|
class: "f-icon f-icon-minus-sm",
|
|
2047
|
-
onClick: () =>
|
|
2048
|
-
}, null)]),
|
|
2283
|
+
onClick: () => x(L)
|
|
2284
|
+
}, null)]), k("div", {
|
|
2049
2285
|
class: "custom-control custom-checkbox"
|
|
2050
|
-
}, [
|
|
2286
|
+
}, [k("input", {
|
|
2051
2287
|
title: "selection",
|
|
2052
2288
|
class: "custom-control-input",
|
|
2053
2289
|
type: "checkbox",
|
|
2054
2290
|
checked: G.value.has(L.conditionId)
|
|
2055
|
-
}, null),
|
|
2291
|
+
}, null), k("label", {
|
|
2056
2292
|
class: "custom-control-label",
|
|
2057
|
-
onClick: () =>
|
|
2293
|
+
onClick: () => R(L)
|
|
2058
2294
|
}, null)])]);
|
|
2059
2295
|
});
|
|
2060
2296
|
}
|
|
2061
|
-
function
|
|
2062
|
-
return
|
|
2297
|
+
function T(A) {
|
|
2298
|
+
return k("div", {
|
|
2063
2299
|
class: "condition-list-relation"
|
|
2064
|
-
}, [
|
|
2300
|
+
}, [k("span", {
|
|
2065
2301
|
class: "condition-list-relation-close f-icon-filter-cancel btn-link",
|
|
2066
|
-
onClick: () =>
|
|
2067
|
-
}, null),
|
|
2302
|
+
onClick: () => N(A)
|
|
2303
|
+
}, null), k("span", {
|
|
2068
2304
|
class: "condition-list-relation-text btn-link",
|
|
2069
|
-
onClick: () =>
|
|
2070
|
-
}, [
|
|
2305
|
+
onClick: () => d(A)
|
|
2306
|
+
}, [A.relation === 1 ? "与" : "或"])]);
|
|
2071
2307
|
}
|
|
2072
|
-
function S(
|
|
2073
|
-
return
|
|
2308
|
+
function S(A) {
|
|
2309
|
+
return k("div", {
|
|
2074
2310
|
class: "condition-list-content"
|
|
2075
|
-
}, [
|
|
2311
|
+
}, [k("div", {
|
|
2076
2312
|
class: "condition-list-content-group"
|
|
2077
|
-
}, [
|
|
2313
|
+
}, [i(A), A.children && A.children.map((L) => S(L))]), T(A)]);
|
|
2078
2314
|
}
|
|
2079
|
-
function
|
|
2315
|
+
function U() {
|
|
2080
2316
|
V($.getSelectedGroupItem()), $.clear();
|
|
2081
2317
|
}
|
|
2082
|
-
function
|
|
2083
|
-
return
|
|
2318
|
+
function q() {
|
|
2319
|
+
return k("div", {
|
|
2084
2320
|
class: "condition-list-bottom"
|
|
2085
|
-
}, [
|
|
2321
|
+
}, [k("div", {
|
|
2086
2322
|
class: "add-condition-btn mb-1 mr-3",
|
|
2087
|
-
onClick:
|
|
2088
|
-
}, [
|
|
2323
|
+
onClick: s
|
|
2324
|
+
}, [k("span", {
|
|
2089
2325
|
class: "f-icon f-icon-filter-add"
|
|
2090
|
-
}, null),
|
|
2326
|
+
}, null), k("span", {
|
|
2091
2327
|
class: "ml-1"
|
|
2092
|
-
}, [
|
|
2328
|
+
}, [Y("添加条件")])]), k("div", {
|
|
2093
2329
|
class: "add-condition-btn mb-1",
|
|
2094
|
-
onClick:
|
|
2095
|
-
}, [
|
|
2330
|
+
onClick: U
|
|
2331
|
+
}, [k("span", {
|
|
2096
2332
|
class: "f-icon f-icon-filter-grouping"
|
|
2097
|
-
}, null),
|
|
2333
|
+
}, null), k("span", {
|
|
2098
2334
|
class: "ml-1"
|
|
2099
|
-
}, [
|
|
2335
|
+
}, [Y("生成条件组")])]), k("div", {
|
|
2100
2336
|
class: "condition-list-reset add-condition-btn",
|
|
2101
2337
|
onClick: f
|
|
2102
|
-
}, [
|
|
2338
|
+
}, [Y("重置")])]);
|
|
2103
2339
|
}
|
|
2104
|
-
return () =>
|
|
2340
|
+
return () => k("div", {
|
|
2105
2341
|
class: "condition-list",
|
|
2106
2342
|
key: n.value
|
|
2107
|
-
}, [
|
|
2343
|
+
}, [k("div", {
|
|
2108
2344
|
class: "condition-list-body"
|
|
2109
|
-
}, [S(
|
|
2345
|
+
}, [S(F.value)]), q()]);
|
|
2110
2346
|
}
|
|
2111
2347
|
});
|
|
2112
|
-
|
|
2113
|
-
|
|
2348
|
+
ee.install = (t) => {
|
|
2349
|
+
t.component(se.name, se).component(ee.name, ee);
|
|
2114
2350
|
};
|
|
2115
2351
|
export {
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2352
|
+
ao as EnumType,
|
|
2353
|
+
se as FConditionFields,
|
|
2354
|
+
ee as FConditionList,
|
|
2355
|
+
be as ValueType,
|
|
2356
|
+
ce as conditionProps,
|
|
2357
|
+
ee as default,
|
|
2358
|
+
uo as useCondition
|
|
2123
2359
|
};
|