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