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