@farris/ui-vue 1.7.0-beta.3 → 1.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +10 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +178 -176
- package/components/calendar/index.umd.cjs +2 -2
- package/components/collection-property-editor/index.esm.js +48 -46
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +319 -300
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +2287 -1161
- package/components/comment/index.umd.cjs +7 -7
- package/components/component/index.esm.js +3 -1
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +926 -901
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +898 -899
- package/components/data-view/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +3 -1
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +239 -221
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +11 -9
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/expression-editor/index.esm.js +1299 -1279
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +731 -678
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +1792 -1772
- package/components/filter-condition-editor/index.umd.cjs +4 -4
- package/components/image/index.esm.js +246 -240
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +9 -7
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +1 -1
- package/components/list-view/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +2009 -886
- package/components/locale/index.umd.cjs +6 -6
- package/components/number-range/index.esm.js +190 -181
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +734 -714
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +60 -49
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +2461 -2500
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +238 -238
- package/components/schema-selector/index.umd.cjs +4 -4
- package/components/section/index.esm.js +217 -302
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +1793 -1773
- package/components/sort-condition-editor/index.umd.cjs +4 -4
- package/components/transfer/index.esm.js +155 -155
- package/components/transfer/index.umd.cjs +3 -3
- package/designer/data-grid/index.esm.js +895 -867
- package/designer/data-grid/index.umd.cjs +5 -5
- package/designer/data-view/index.esm.js +145 -144
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/drawer/index.esm.js +73 -71
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +87 -65
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +14 -3
- package/designer/farris-designer.all.umd.cjs +3 -3
- package/designer/input-group/index.esm.js +34 -14
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1 -1
- package/designer/list-view/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +15 -2
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +129 -119
- package/designer/section/index.umd.cjs +1 -1
- package/designer/time-picker/index.esm.js +140 -131
- package/designer/time-picker/index.umd.cjs +1 -1
- package/farris.all.esm.js +13578 -12394
- package/farris.all.umd.cjs +26 -26
- package/index.css +1 -1
- package/locales/data-grid/ui/en.json +2 -1
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +12 -10
- package/locales/designer/zh-CHS.json +19 -17
- package/locales/designer/zh-CHT.json +19 -17
- package/locales/ui/en.json +4 -2
- package/locales/ui/zh-CHS.json +11 -9
- package/locales/ui/zh-CHT.json +11 -9
- package/package.json +1 -1
- package/package.zip +0 -0
- package/types/combo-list/src/composition/types.d.ts +1 -0
- package/types/condition/src/composition/condition-value/number-spinner-value.d.ts +1 -1
- package/types/condition/src/composition/use-field-config.d.ts +1 -1
- package/types/condition/src/condition.props.d.ts +1 -1
- package/types/data-view/designer/property-config/use-command-option.d.ts +12 -0
- package/types/image/src/property-config/image.property-config.d.ts +5 -5
- package/types/locale/src/lib/locale.service.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +7 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +0 -20
- package/types/section/src/designer/section.design.props.d.ts +17 -0
- package/types/section/src/section.props.d.ts +0 -25
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
var Ae = Object.defineProperty;
|
|
2
|
-
var $e = (e, t,
|
|
3
|
-
var I = (e, t,
|
|
4
|
-
import { ref as M, computed as W, watch as Y, defineComponent as _, onBeforeUnmount as
|
|
2
|
+
var $e = (e, t, r) => t in e ? Ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var I = (e, t, r) => $e(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { ref as M, computed as W, watch as Y, defineComponent as _, onBeforeUnmount as ke, withDirectives as ce, createVNode as O, resolveDirective as de, createTextVNode as Re, mergeProps as me, inject as K, onMounted as we } from "vue";
|
|
5
5
|
import { FDynamicFormGroup as Ue, dynamicFormGroupProps as ze, FDynamicFormLabel as We } from "../dynamic-form/index.esm.js";
|
|
6
|
-
import { LocaleService as re } from "../locale/index.esm.js";
|
|
7
6
|
import { cloneDeep as te, isPlainObject as ve } from "lodash-es";
|
|
8
|
-
import { useDateFormat as xe, resolveField as Ze, useThirdComponent as Ve, useTextBoxDesign as
|
|
9
|
-
import
|
|
10
|
-
import Xe from "../
|
|
11
|
-
import Ye from "
|
|
12
|
-
import He from "
|
|
13
|
-
import De from "../
|
|
14
|
-
import Ke from "
|
|
7
|
+
import { useDateFormat as xe, resolveField as Ze, useNumberFormat as Je, useThirdComponent as Ve, useTextBoxDesign as _e, areaResponseDirective as Qe } from "../common/index.esm.js";
|
|
8
|
+
import { LocaleService as re } from "../locale/index.esm.js";
|
|
9
|
+
import Xe from "../accordion/index.esm.js";
|
|
10
|
+
import Ye from "../avatar/index.esm.js";
|
|
11
|
+
import He from "../../designer/button-edit/index.esm.js";
|
|
12
|
+
import De from "../button-group/index.esm.js";
|
|
13
|
+
import Ke from "../calendar/index.esm.js";
|
|
14
|
+
import et from "../../designer/capsule/index.esm.js";
|
|
15
15
|
import he from "../../designer/checkbox/index.esm.js";
|
|
16
16
|
import ye from "../../designer/checkbox-group/index.esm.js";
|
|
17
17
|
import le from "../combo-list/index.esm.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import tt from "../combo-tree/index.esm.js";
|
|
19
|
+
import rt from "../component/index.esm.js";
|
|
20
20
|
import nt from "../color-picker/index.esm.js";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
21
|
+
import ot from "../content-container/index.esm.js";
|
|
22
|
+
import it from "../../designer/date-picker/index.esm.js";
|
|
23
|
+
import at from "../../designer/data-grid/index.esm.js";
|
|
24
|
+
import lt from "../dropdown/index.esm.js";
|
|
25
|
+
import st from "../../designer/dynamic-form/index.esm.js";
|
|
26
|
+
import ut from "../events-editor/index.esm.js";
|
|
27
|
+
import ct from "../filter-bar/index.esm.js";
|
|
28
|
+
import dt from "../field-selector/index.esm.js";
|
|
29
|
+
import mt from "../binding-selector/index.esm.js";
|
|
30
30
|
import pt from "../image-cropper/index.esm.js";
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
31
|
+
import ft from "../../designer/input-group/index.esm.js";
|
|
32
|
+
import gt from "../layout/index.esm.js";
|
|
33
|
+
import vt from "../list-nav/index.esm.js";
|
|
34
|
+
import ht from "../../designer/list-view/index.esm.js";
|
|
35
|
+
import yt from "../lookup/index.esm.js";
|
|
36
|
+
import bt from "../mapping-editor/index.esm.js";
|
|
37
|
+
import Ft from "../nav/index.esm.js";
|
|
38
|
+
import Ct from "../number-range/index.esm.js";
|
|
39
|
+
import Tt from "../../designer/number-spinner/index.esm.js";
|
|
40
40
|
import kt from "../order/index.esm.js";
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import { createPropsResolver as
|
|
41
|
+
import wt from "../page-header/index.esm.js";
|
|
42
|
+
import xt from "../page-footer/index.esm.js";
|
|
43
|
+
import Vt from "../pagination/index.esm.js";
|
|
44
|
+
import St from "../progress/index.esm.js";
|
|
45
|
+
import Et from "../query-solution/index.esm.js";
|
|
46
|
+
import It from "../../designer/radio-group/index.esm.js";
|
|
47
|
+
import Lt from "../../designer/rate/index.esm.js";
|
|
48
|
+
import Pt from "../../designer/response-toolbar/index.esm.js";
|
|
49
|
+
import Ot from "../response-layout/index.esm.js";
|
|
50
|
+
import Bt from "../../designer/response-layout-editor/index.esm.js";
|
|
51
|
+
import Mt from "../search-box/index.esm.js";
|
|
52
|
+
import Nt from "../../designer/section/index.esm.js";
|
|
53
|
+
import jt from "../smoke-detector/index.esm.js";
|
|
54
|
+
import Gt from "../splitter/index.esm.js";
|
|
55
|
+
import qt from "../step/index.esm.js";
|
|
56
|
+
import At from "../../designer/switch/index.esm.js";
|
|
57
|
+
import $t from "../../designer/tabs/index.esm.js";
|
|
58
|
+
import Rt from "../../designer/tags/index.esm.js";
|
|
59
|
+
import Ut from "../text/index.esm.js";
|
|
60
|
+
import zt from "../../designer/time-picker/index.esm.js";
|
|
61
|
+
import Wt from "../transfer/index.esm.js";
|
|
62
|
+
import Zt from "../tree-view/index.esm.js";
|
|
63
|
+
import Jt from "../uploader/index.esm.js";
|
|
64
|
+
import _t from "../verify-detail/index.esm.js";
|
|
65
|
+
import Qt from "../video/index.esm.js";
|
|
66
|
+
import Xt from "../../designer/textarea/index.esm.js";
|
|
67
|
+
import Yt from "../schema-selector/index.esm.js";
|
|
68
|
+
import Ht from "../../designer/tree-grid/index.esm.js";
|
|
69
|
+
import Dt from "../event-parameter/index.esm.js";
|
|
70
|
+
import Kt from "../filter-condition-editor/index.esm.js";
|
|
71
|
+
import er from "../fieldset/index.esm.js";
|
|
72
|
+
import tr from "../sort-condition-editor/index.esm.js";
|
|
73
|
+
import rr from "../menu-lookup/index.esm.js";
|
|
74
|
+
import nr from "../../designer/drawer/index.esm.js";
|
|
75
|
+
import or from "../json-editor/index.esm.js";
|
|
76
|
+
import ir from "../property-editor/index.esm.js";
|
|
77
|
+
import ar from "../expression-editor/index.esm.js";
|
|
78
|
+
import lr from "../code-editor/index.esm.js";
|
|
79
|
+
import sr from "../html-template/index.esm.js";
|
|
80
|
+
import ur from "../collection-property-editor/index.esm.js";
|
|
81
|
+
import cr from "../../designer/modal/index.esm.js";
|
|
82
|
+
import dr from "../external-container/index.esm.js";
|
|
83
|
+
import mr from "../language-textbox/index.esm.js";
|
|
84
|
+
import pr from "../image/index.esm.js";
|
|
85
|
+
import fr from "../comment/index.esm.js";
|
|
86
|
+
import { createPropsResolver as gr, propertyConfigSchemaMapForDesigner as vr } from "../dynamic-resolver/index.esm.js";
|
|
87
87
|
import { useDesignerComponent as Se, DgControl as y } from "../designer-canvas/index.esm.js";
|
|
88
|
-
import { InputBaseProperty as
|
|
89
|
-
const
|
|
88
|
+
import { InputBaseProperty as hr } from "../property-panel/index.esm.js";
|
|
89
|
+
const pe = {
|
|
90
90
|
conditions: { type: Array, default: [] },
|
|
91
91
|
fields: { type: Array, default: [] },
|
|
92
92
|
key: { type: String, default: "" },
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* 控件标签同行展示
|
|
95
95
|
*/
|
|
96
96
|
isControlInline: {
|
|
97
97
|
type: [Boolean, String],
|
|
@@ -103,15 +103,15 @@ const me = {
|
|
|
103
103
|
*/
|
|
104
104
|
itemClass: { type: Boolean, default: "col-12 col-md-6 col-xl-3 col-el-2" }
|
|
105
105
|
};
|
|
106
|
-
class
|
|
107
|
-
constructor(t = { value: [] },
|
|
106
|
+
class yr {
|
|
107
|
+
constructor(t = { value: [] }, r) {
|
|
108
108
|
I(this, "editorType", "check-box");
|
|
109
109
|
I(this, "value");
|
|
110
110
|
I(this, "valueType", "boolean");
|
|
111
111
|
// 编辑器配置
|
|
112
112
|
I(this, "editiorConfig");
|
|
113
|
-
const o = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((
|
|
114
|
-
this.value = o, this.editiorConfig = Object.assign({},
|
|
113
|
+
const o = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((m) => JSON.parse(m));
|
|
114
|
+
this.value = o, this.editiorConfig = Object.assign({}, r);
|
|
115
115
|
}
|
|
116
116
|
clear() {
|
|
117
117
|
this.value = [];
|
|
@@ -129,8 +129,8 @@ class yn {
|
|
|
129
129
|
return this.value.length === 0;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
class
|
|
133
|
-
constructor(t = { textValue: "", value: "", valueField: "" },
|
|
132
|
+
class br {
|
|
133
|
+
constructor(t = { textValue: "", value: "", valueField: "" }, r) {
|
|
134
134
|
I(this, "editorType", "combo-lookup");
|
|
135
135
|
I(this, "textValue");
|
|
136
136
|
I(this, "value");
|
|
@@ -138,25 +138,25 @@ class bn {
|
|
|
138
138
|
I(this, "valueType", "text");
|
|
139
139
|
// 编辑器配置
|
|
140
140
|
I(this, "editiorConfig");
|
|
141
|
-
this.textValue = t == null ? void 0 : t.textValue, this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({},
|
|
141
|
+
this.textValue = t == null ? void 0 : t.textValue, this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.valueField = t == null ? void 0 : t.valueField;
|
|
142
142
|
}
|
|
143
143
|
clear() {
|
|
144
144
|
this.value = "", this.valueField = "", this.textValue = "";
|
|
145
145
|
}
|
|
146
|
-
getPropValue(t,
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
return t[
|
|
146
|
+
getPropValue(t, r) {
|
|
147
|
+
if (r.length > 1) {
|
|
148
|
+
const n = r.shift();
|
|
149
|
+
return t[n] ? this.getPropValue(t[n], r) : null;
|
|
150
150
|
}
|
|
151
|
-
return t[
|
|
151
|
+
return t[r[0]];
|
|
152
152
|
}
|
|
153
153
|
getTextValue(t) {
|
|
154
|
-
const
|
|
155
|
-
return
|
|
154
|
+
const r = t.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, te(r)));
|
|
155
|
+
return n && n.length ? n.join(",") : "";
|
|
156
156
|
}
|
|
157
157
|
getValue() {
|
|
158
|
-
const t = this.valueField.split("."),
|
|
159
|
-
return
|
|
158
|
+
const t = this.valueField.split("."), r = this.value.split(",").map((n) => this.getPropValue(n, te(t)));
|
|
159
|
+
return r && r.length ? r.join(",") : "";
|
|
160
160
|
}
|
|
161
161
|
getDisplayText() {
|
|
162
162
|
return this.getValue();
|
|
@@ -169,7 +169,7 @@ class bn {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
class oe {
|
|
172
|
-
constructor(t = { value: "", displayFormat: "", valueFormat: "" },
|
|
172
|
+
constructor(t = { value: "", displayFormat: "", valueFormat: "" }, r) {
|
|
173
173
|
I(this, "editorType", "date-picker");
|
|
174
174
|
I(this, "value");
|
|
175
175
|
I(this, "valueType", "datetime");
|
|
@@ -177,14 +177,14 @@ class oe {
|
|
|
177
177
|
I(this, "valueFormat", "");
|
|
178
178
|
// 编辑器配置
|
|
179
179
|
I(this, "editiorConfig");
|
|
180
|
-
this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({},
|
|
180
|
+
this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "";
|
|
181
181
|
}
|
|
182
182
|
formatValue() {
|
|
183
|
-
const { formatTo: t, parseToDate:
|
|
183
|
+
const { formatTo: t, parseToDate: r } = xe();
|
|
184
184
|
if (!this.value)
|
|
185
185
|
return "";
|
|
186
|
-
const
|
|
187
|
-
return t(
|
|
186
|
+
const n = r(this.value, this.valueFormat);
|
|
187
|
+
return t(n, this.displayFormat);
|
|
188
188
|
}
|
|
189
189
|
setValue(t) {
|
|
190
190
|
this.value = t;
|
|
@@ -203,7 +203,7 @@ class oe {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
class fe {
|
|
206
|
-
constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" },
|
|
206
|
+
constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, r = {}) {
|
|
207
207
|
I(this, "editorType", "date-range");
|
|
208
208
|
I(this, "begin", "");
|
|
209
209
|
I(this, "end", "");
|
|
@@ -213,17 +213,17 @@ class fe {
|
|
|
213
213
|
I(this, "editiorConfig");
|
|
214
214
|
I(this, "displayFormat", "");
|
|
215
215
|
I(this, "valueFormat", "");
|
|
216
|
-
this.begin = (t == null ? void 0 : t.begin) || "", this.end = (t == null ? void 0 : t.end) || "", this.editiorConfig = Object.assign({},
|
|
216
|
+
this.begin = (t == null ? void 0 : t.begin) || "", this.end = (t == null ? void 0 : t.end) || "", this.editiorConfig = Object.assign({}, r, { delimiter: "~" }), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "", this.value = (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
|
|
217
217
|
}
|
|
218
218
|
clear() {
|
|
219
219
|
this.begin = "", this.end = "", this.value = "";
|
|
220
220
|
}
|
|
221
221
|
formatValue(t) {
|
|
222
|
-
const { formatTo:
|
|
222
|
+
const { formatTo: r, parseToDate: n } = xe();
|
|
223
223
|
if (!t)
|
|
224
224
|
return "";
|
|
225
|
-
const o =
|
|
226
|
-
return
|
|
225
|
+
const o = n(t, this.valueFormat);
|
|
226
|
+
return r(o, this.displayFormat);
|
|
227
227
|
}
|
|
228
228
|
getValue() {
|
|
229
229
|
return {
|
|
@@ -237,8 +237,8 @@ class fe {
|
|
|
237
237
|
}
|
|
238
238
|
setValue(t) {
|
|
239
239
|
if (t) {
|
|
240
|
-
const
|
|
241
|
-
this.begin =
|
|
240
|
+
const r = t.split(this.editiorConfig.delimiter);
|
|
241
|
+
this.begin = r[0] || "", this.end = r[1] || "", this.value = t;
|
|
242
242
|
} else
|
|
243
243
|
this.clear();
|
|
244
244
|
}
|
|
@@ -247,37 +247,37 @@ class fe {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
class Ee {
|
|
250
|
-
constructor(t = { value: "", valueList: [] },
|
|
250
|
+
constructor(t = { value: "", valueList: [] }, r) {
|
|
251
251
|
I(this, "editorType", "combo-list");
|
|
252
252
|
I(this, "value");
|
|
253
253
|
I(this, "valueType", "enum");
|
|
254
254
|
I(this, "valueList", []);
|
|
255
255
|
// 编辑器配置
|
|
256
256
|
I(this, "editiorConfig");
|
|
257
|
-
this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({},
|
|
257
|
+
this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
|
|
258
258
|
}
|
|
259
259
|
clear() {
|
|
260
|
-
this.value = ""
|
|
260
|
+
this.value = "";
|
|
261
261
|
}
|
|
262
262
|
getValue() {
|
|
263
263
|
return this.value;
|
|
264
264
|
}
|
|
265
265
|
getDisplayText() {
|
|
266
|
-
var o,
|
|
266
|
+
var o, m;
|
|
267
267
|
const t = typeof this.value;
|
|
268
|
-
let
|
|
268
|
+
let r = "", n = [];
|
|
269
269
|
switch (t) {
|
|
270
270
|
case "string":
|
|
271
|
-
|
|
271
|
+
n = this.value.split(",") || [], r = this.valueList.filter((i) => n.indexOf(i.value + "") > -1).map((i) => i.name).join(",");
|
|
272
272
|
break;
|
|
273
273
|
case "boolean":
|
|
274
|
-
|
|
274
|
+
r = ((o = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : o.name) || "";
|
|
275
275
|
break;
|
|
276
276
|
case "number":
|
|
277
|
-
|
|
277
|
+
r = ((m = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : m.name) || "";
|
|
278
278
|
break;
|
|
279
279
|
}
|
|
280
|
-
return
|
|
280
|
+
return r;
|
|
281
281
|
}
|
|
282
282
|
// setValue(data: { value: string; displayText: string }) {
|
|
283
283
|
// // this.displayText = data.dispalyText;
|
|
@@ -292,8 +292,8 @@ class Ee {
|
|
|
292
292
|
return !this.value && this.value !== !1 && this.value !== 0;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
class
|
|
296
|
-
constructor(t = { value: "", displayText: "", displayField: "", isInputText: !1 },
|
|
295
|
+
class Fr {
|
|
296
|
+
constructor(t = { value: "", displayText: "", displayField: "", isInputText: !1 }, r) {
|
|
297
297
|
I(this, "editorType", "input-group");
|
|
298
298
|
// 通过弹窗返回的若干个值对象构成的数组
|
|
299
299
|
I(this, "value");
|
|
@@ -306,21 +306,21 @@ class Fn {
|
|
|
306
306
|
I(this, "isInputText");
|
|
307
307
|
// 编辑器配置
|
|
308
308
|
I(this, "editiorConfig");
|
|
309
|
-
this.value = t == null ? void 0 : t.value, this.displayText = t == null ? void 0 : t.displayText, this.valueField = t == null ? void 0 : t.displayField, this.isInputText = t == null ? void 0 : t.isInputText, this.editiorConfig = Object.assign({},
|
|
309
|
+
this.value = t == null ? void 0 : t.value, this.displayText = t == null ? void 0 : t.displayText, this.valueField = t == null ? void 0 : t.displayField, this.isInputText = t == null ? void 0 : t.isInputText, this.editiorConfig = Object.assign({}, r);
|
|
310
310
|
}
|
|
311
311
|
clear() {
|
|
312
312
|
this.value = "", this.displayText = "", this.valueField = "";
|
|
313
313
|
}
|
|
314
|
-
getPropValue(t,
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
317
|
-
return t[
|
|
314
|
+
getPropValue(t, r) {
|
|
315
|
+
if (r.length > 1) {
|
|
316
|
+
const n = r.shift();
|
|
317
|
+
return t[n] ? this.getPropValue(t[n], r) : "";
|
|
318
318
|
}
|
|
319
|
-
return t[
|
|
319
|
+
return t[r[0]];
|
|
320
320
|
}
|
|
321
321
|
getTextValue(t) {
|
|
322
|
-
const
|
|
323
|
-
return
|
|
322
|
+
const r = t.split("."), n = this.value.map((o) => this.getPropValue(o, te(r)));
|
|
323
|
+
return n && n.length ? n.join(",") : "";
|
|
324
324
|
}
|
|
325
325
|
getValue() {
|
|
326
326
|
return this.value;
|
|
@@ -336,8 +336,8 @@ class Fn {
|
|
|
336
336
|
return !this.displayText && (this.value == null || !((t = this.value) != null && t.length));
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
class
|
|
340
|
-
constructor(t = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" },
|
|
339
|
+
class Cr {
|
|
340
|
+
constructor(t = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" }, r) {
|
|
341
341
|
I(this, "editorType", "lookup");
|
|
342
342
|
I(this, "helpId");
|
|
343
343
|
I(this, "mapFields");
|
|
@@ -348,7 +348,7 @@ class Cn {
|
|
|
348
348
|
I(this, "isInputText");
|
|
349
349
|
// 编辑器配置
|
|
350
350
|
I(this, "editiorConfig");
|
|
351
|
-
this.editiorConfig = Object.assign({},
|
|
351
|
+
this.editiorConfig = Object.assign({}, r), this.value = (t == null ? void 0 : t.value) || "", this.valueField = (t == null ? void 0 : t.valueField) || (r == null ? void 0 : r.valueField), this.mapFields = t.mapFields, this.isInputText = (t == null ? void 0 : t.isInputText) || (r == null ? void 0 : r.isInputText), this.helpId = (t == null ? void 0 : t.helpId) || (r == null ? void 0 : r.helpId);
|
|
352
352
|
}
|
|
353
353
|
clear() {
|
|
354
354
|
this.value = "", this.mapFields = [];
|
|
@@ -366,27 +366,27 @@ class Cn {
|
|
|
366
366
|
return !this.mapFields.length;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
class
|
|
370
|
-
constructor(
|
|
371
|
-
super(
|
|
369
|
+
class Tr extends oe {
|
|
370
|
+
constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
|
|
371
|
+
super(r, n);
|
|
372
372
|
I(this, "editorType", "month-picker");
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
class
|
|
376
|
-
constructor(
|
|
377
|
-
super(
|
|
375
|
+
class kr extends fe {
|
|
376
|
+
constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n) {
|
|
377
|
+
super(r, n);
|
|
378
378
|
I(this, "editorType", "month-range");
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
class
|
|
382
|
-
constructor(t = { begin: null, end: null },
|
|
381
|
+
class wr {
|
|
382
|
+
constructor(t = { begin: null, end: null }, r) {
|
|
383
383
|
I(this, "editorType", "number-range");
|
|
384
384
|
I(this, "begin");
|
|
385
385
|
I(this, "end");
|
|
386
386
|
I(this, "valueType", "number");
|
|
387
387
|
// 编辑器配置
|
|
388
388
|
I(this, "editiorConfig");
|
|
389
|
-
this.editiorConfig = Object.assign({},
|
|
389
|
+
this.editiorConfig = Object.assign({}, r), this.begin = (t == null ? void 0 : t.begin) == null ? null : parseFloat(t.begin), this.end = (t == null ? void 0 : t.end) == null ? null : parseFloat(t.end);
|
|
390
390
|
}
|
|
391
391
|
clear() {
|
|
392
392
|
this.begin = null, this.end = null;
|
|
@@ -407,16 +407,16 @@ class wn {
|
|
|
407
407
|
return this.begin == null && this.end == null;
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
class
|
|
411
|
-
constructor(t = { value: "" },
|
|
410
|
+
class xr {
|
|
411
|
+
constructor(t = { value: "" }, r) {
|
|
412
412
|
I(this, "editorType", "number-spinner");
|
|
413
413
|
I(this, "value");
|
|
414
414
|
I(this, "valueType", "number");
|
|
415
415
|
// 编辑器配置
|
|
416
416
|
I(this, "editiorConfig");
|
|
417
|
-
this.editiorConfig = Object.assign({},
|
|
418
|
-
const
|
|
419
|
-
this.value = isNaN(
|
|
417
|
+
this.editiorConfig = Object.assign({}, r);
|
|
418
|
+
const n = parseFloat(t.value);
|
|
419
|
+
this.value = isNaN(n) ? null : n;
|
|
420
420
|
}
|
|
421
421
|
clear() {
|
|
422
422
|
this.value = null;
|
|
@@ -425,7 +425,10 @@ class xn {
|
|
|
425
425
|
return this.value;
|
|
426
426
|
}
|
|
427
427
|
getDisplayText() {
|
|
428
|
-
|
|
428
|
+
if (this.isEmpty())
|
|
429
|
+
return "";
|
|
430
|
+
const { formatTo: t } = Je();
|
|
431
|
+
return t(this.value, this.editiorConfig);
|
|
429
432
|
}
|
|
430
433
|
setValue(t) {
|
|
431
434
|
this.value = isNaN(parseFloat(t)) ? null : t;
|
|
@@ -434,15 +437,15 @@ class xn {
|
|
|
434
437
|
return this.value == null || isNaN(this.value);
|
|
435
438
|
}
|
|
436
439
|
}
|
|
437
|
-
class
|
|
438
|
-
constructor(t = { value: null, valueList: [] },
|
|
440
|
+
class Vr {
|
|
441
|
+
constructor(t = { value: null, valueList: [] }, r) {
|
|
439
442
|
I(this, "editorType", "radio-group");
|
|
440
443
|
I(this, "value");
|
|
441
444
|
I(this, "valueType", "enum");
|
|
442
445
|
I(this, "valueList", []);
|
|
443
446
|
// 编辑器配置
|
|
444
447
|
I(this, "editiorConfig");
|
|
445
|
-
this.editiorConfig = Object.assign({},
|
|
448
|
+
this.editiorConfig = Object.assign({}, r), this.value = t == null ? void 0 : t.value, this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
|
|
446
449
|
}
|
|
447
450
|
clear() {
|
|
448
451
|
this.value = void 0, this.valueList = [];
|
|
@@ -452,7 +455,7 @@ class Vn {
|
|
|
452
455
|
}
|
|
453
456
|
getDisplayText() {
|
|
454
457
|
var t;
|
|
455
|
-
return ((t = this.valueList.find((
|
|
458
|
+
return ((t = this.valueList.find((r) => r.value === this.value)) == null ? void 0 : t.name) || "";
|
|
456
459
|
}
|
|
457
460
|
setValue(t) {
|
|
458
461
|
this.value = t;
|
|
@@ -461,14 +464,14 @@ class Vn {
|
|
|
461
464
|
return !this.value && this.value !== 0 && this.value !== !1;
|
|
462
465
|
}
|
|
463
466
|
}
|
|
464
|
-
class
|
|
465
|
-
constructor(
|
|
466
|
-
super(
|
|
467
|
+
class Sr extends oe {
|
|
468
|
+
constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
|
|
469
|
+
super(r, n);
|
|
467
470
|
I(this, "editorType", "year-picker");
|
|
468
471
|
}
|
|
469
472
|
}
|
|
470
473
|
class Ie {
|
|
471
|
-
constructor(t = { value: "" },
|
|
474
|
+
constructor(t = { value: "" }, r) {
|
|
472
475
|
I(this, "editorType", "text");
|
|
473
476
|
I(this, "value");
|
|
474
477
|
I(this, "valueType", "text");
|
|
@@ -492,70 +495,70 @@ class Ie {
|
|
|
492
495
|
return !this.value;
|
|
493
496
|
}
|
|
494
497
|
}
|
|
495
|
-
class
|
|
496
|
-
constructor(
|
|
497
|
-
super(
|
|
498
|
+
class Er extends oe {
|
|
499
|
+
constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
|
|
500
|
+
super(r, n);
|
|
498
501
|
I(this, "editorType", "datetime-picker");
|
|
499
502
|
}
|
|
500
503
|
}
|
|
501
|
-
class
|
|
502
|
-
constructor(
|
|
503
|
-
super(
|
|
504
|
+
class Ir extends fe {
|
|
505
|
+
constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n = {}) {
|
|
506
|
+
super(r, n);
|
|
504
507
|
// 这个属性会在后面进行比对
|
|
505
508
|
I(this, "editorType", "datetime-range");
|
|
506
509
|
I(this, "valueType", "datetime");
|
|
507
510
|
}
|
|
508
511
|
}
|
|
509
|
-
class
|
|
510
|
-
constructor(
|
|
511
|
-
super(
|
|
512
|
+
class Lr extends Ee {
|
|
513
|
+
constructor(r = { value: "", valueList: [] }, n) {
|
|
514
|
+
super(r, n);
|
|
512
515
|
I(this, "editorType", "check-group");
|
|
513
516
|
}
|
|
514
517
|
}
|
|
515
518
|
function Le() {
|
|
516
|
-
function e(t,
|
|
519
|
+
function e(t, r, n) {
|
|
517
520
|
switch (t) {
|
|
518
521
|
case "check-box":
|
|
519
|
-
return new
|
|
522
|
+
return new yr(r, n);
|
|
520
523
|
case "combo-list":
|
|
521
|
-
return new Ee(
|
|
524
|
+
return new Ee(r, n);
|
|
522
525
|
case "combo-lookup":
|
|
523
|
-
return new
|
|
526
|
+
return new br(r, n);
|
|
524
527
|
case "input-group":
|
|
525
|
-
return new
|
|
528
|
+
return new Fr(r, n);
|
|
526
529
|
case "year-picker":
|
|
527
|
-
return new
|
|
530
|
+
return new Sr(r, n);
|
|
528
531
|
case "date-picker":
|
|
529
|
-
return new oe(
|
|
532
|
+
return new oe(r, n);
|
|
530
533
|
case "datetime-range":
|
|
531
|
-
return new
|
|
534
|
+
return new Ir(r, n);
|
|
532
535
|
case "date-range":
|
|
533
|
-
return new fe(
|
|
536
|
+
return new fe(r, n);
|
|
534
537
|
case "datetime-picker":
|
|
535
|
-
return new
|
|
538
|
+
return new Er(r, n);
|
|
536
539
|
case "lookup":
|
|
537
|
-
return new
|
|
540
|
+
return new Cr(r, n);
|
|
538
541
|
case "month-picker":
|
|
539
|
-
return new
|
|
542
|
+
return new Tr(r, n);
|
|
540
543
|
case "month-range":
|
|
541
|
-
return new
|
|
544
|
+
return new kr(r, n);
|
|
542
545
|
case "number-range":
|
|
543
|
-
return new
|
|
546
|
+
return new wr(r, n);
|
|
544
547
|
case "number-spinner":
|
|
545
|
-
return new
|
|
548
|
+
return new xr(r, n);
|
|
546
549
|
case "radio-group":
|
|
547
|
-
return new
|
|
550
|
+
return new Vr(r, n);
|
|
548
551
|
case "check-group":
|
|
549
|
-
return new
|
|
552
|
+
return new Lr(r, n);
|
|
550
553
|
default:
|
|
551
|
-
return new Ie(
|
|
554
|
+
return new Ie(r, n);
|
|
552
555
|
}
|
|
553
556
|
}
|
|
554
557
|
return { createConditionValue: e };
|
|
555
558
|
}
|
|
556
559
|
function Pe(e = "query-solution") {
|
|
557
560
|
function t(i) {
|
|
558
|
-
let
|
|
561
|
+
let u = "input-group";
|
|
559
562
|
switch (i) {
|
|
560
563
|
case "year-picker":
|
|
561
564
|
case "month-picker":
|
|
@@ -563,141 +566,141 @@ function Pe(e = "query-solution") {
|
|
|
563
566
|
case "date-range":
|
|
564
567
|
case "datetime-range":
|
|
565
568
|
case "datetime-picker":
|
|
566
|
-
|
|
569
|
+
u = "date-picker";
|
|
567
570
|
break;
|
|
568
571
|
default:
|
|
569
|
-
|
|
572
|
+
u = i;
|
|
570
573
|
}
|
|
571
|
-
return
|
|
572
|
-
}
|
|
573
|
-
function n(i) {
|
|
574
|
-
const s = i.editor ? i.editor.type : "input-group";
|
|
575
|
-
return i.editor.type = t(s), i.editor.type === "date-picker" ? (s.indexOf("range") > -1 && (i.editor.enablePeriod = !0), s.indexOf("datetime") > -1 && (i.editor.showTime = !0), s.indexOf("year") > -1 && (i.editor.selectMode = "year"), s.indexOf("month") > -1 && (i.editor.selectMode = "month"), i.editor.weekSelect && (i.editor.selectMode = "week")) : i.editor.type === "number-spinner" || i.editor.type === "number-range" ? (i.editor.showZero = !0, i.editor.nullable = !0) : i.editor.type === "combo-list" ? i.editor.enableClear = !0 : i.editor.type === "check-group" && e === "filter-bar" && (i.editor.direction = "vertical"), s === "input-group" && (i.editor.placeholder = "请输入"), i.editor;
|
|
574
|
+
return u;
|
|
576
575
|
}
|
|
577
576
|
function r(i) {
|
|
578
|
-
|
|
577
|
+
const u = i.editor ? i.editor.type : "input-group";
|
|
578
|
+
return i.editor.type = t(u), i.editor.type === "date-picker" ? (u.indexOf("range") > -1 && (i.editor.enablePeriod = !0), u.indexOf("datetime") > -1 && (i.editor.showTime = !0), u.indexOf("year") > -1 && (i.editor.selectMode = "year"), u.indexOf("month") > -1 && (i.editor.selectMode = "month"), i.editor.weekSelect && (i.editor.selectMode = "week")) : i.editor.type === "number-spinner" || i.editor.type === "number-range" ? (i.editor.showZero = !0, i.editor.nullable = !0, i.editor.needValid = !0) : i.editor.type === "combo-list" ? i.editor.enableClear = !0 : i.editor.type === "check-group" && e === "filter-bar" && (i.editor.direction = "vertical"), u === "input-group" && !i.editor.placeholder && (i.editor.placeholder = re.getLocaleValue("input-group.placeholder")), i.editor;
|
|
579
|
+
}
|
|
580
|
+
function n(i) {
|
|
581
|
+
return i.map((S) => Object.assign({}, S)).map((S) => (S.visible = Object.prototype.hasOwnProperty.call(S, "visible") ? S.visible : !0, S.editor = r(S), S));
|
|
579
582
|
}
|
|
580
|
-
function o(i,
|
|
583
|
+
function o(i, u, S, g) {
|
|
581
584
|
switch (i.value.editorType) {
|
|
582
585
|
case "combo-list":
|
|
583
|
-
|
|
586
|
+
g.newValue && (i.value.valueList = g.newValue.map((v) => ({ name: v.name, value: v.value })));
|
|
584
587
|
break;
|
|
585
588
|
case "radio-group":
|
|
586
|
-
i.value.valueList = [S.data.find((
|
|
589
|
+
i.value.valueList = [S.data.find((v) => v.value === u)];
|
|
587
590
|
break;
|
|
588
591
|
case "year-range":
|
|
589
592
|
case "month-range":
|
|
590
593
|
case "date-range":
|
|
591
594
|
case "datetime-range":
|
|
592
|
-
i.value.setValue(
|
|
595
|
+
i.value.setValue(u);
|
|
593
596
|
break;
|
|
594
597
|
}
|
|
595
598
|
}
|
|
596
|
-
function
|
|
597
|
-
var h,
|
|
598
|
-
const
|
|
599
|
-
let
|
|
600
|
-
return ((E =
|
|
601
|
-
|
|
602
|
-
},
|
|
603
|
-
|
|
604
|
-
},
|
|
605
|
-
|
|
606
|
-
},
|
|
607
|
-
|
|
608
|
-
},
|
|
599
|
+
function m(i, u, S) {
|
|
600
|
+
var h, p, f, E, c, b;
|
|
601
|
+
const g = te((h = i.get(u.fieldCode)) == null ? void 0 : h.editor), v = (p = i.get(u.fieldCode)) == null ? void 0 : p.id, l = (f = i.get(u.fieldCode)) == null ? void 0 : f.visible;
|
|
602
|
+
let s = !0;
|
|
603
|
+
return ((E = u.value) == null ? void 0 : E.editorType) === "lookup" && g ? (g.idValue = (c = u.value.mapFields) == null ? void 0 : c.map((w) => w.id).join(","), g.onClear = () => {
|
|
604
|
+
u.value.mapFields = [], S(u, "");
|
|
605
|
+
}, g["onUpdate:dataMapping"] = (w) => {
|
|
606
|
+
u.value.mapFields = w.items, S(u, u.value.getValue());
|
|
607
|
+
}, s = !1) : ((b = u.value) == null ? void 0 : b.editorType) === "number-range" && g ? (g.beginValue = u.value.begin, g.onBeginValueChange = (w) => {
|
|
608
|
+
u.value.begin = w, S(u, w);
|
|
609
|
+
}, g.endValue = u.value.end, g.onEndValueChange = (w) => {
|
|
610
|
+
u.value.end = w, S(u, w);
|
|
611
|
+
}, s = !1) : g && ["year-range", "month-range", "date-range", "datetime-range"].find((w) => {
|
|
609
612
|
var j;
|
|
610
|
-
return w === ((j =
|
|
611
|
-
}) && (
|
|
613
|
+
return w === ((j = u.value) == null ? void 0 : j.editorType);
|
|
614
|
+
}) && (g.beginValue = u.value.begin, g.endValue = u.value.end), Object.prototype.hasOwnProperty.call(u, "disabled") && (g.disabled = u.disabled), { id: v, editor: g, visible: l, needEmitChange: s };
|
|
612
615
|
}
|
|
613
|
-
return { getSingleControlType:
|
|
616
|
+
return { getSingleControlType: r, convertToControls: n, conditionChangeHandler: o, renderFieldConditionEditor: m };
|
|
614
617
|
}
|
|
615
|
-
function ge(e, t) {
|
|
616
|
-
const { convertToControls: n } = Pe(),
|
|
617
|
-
function
|
|
618
|
-
|
|
619
|
-
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
622
|
-
if (
|
|
623
|
-
const
|
|
624
|
-
|
|
618
|
+
function ge(e, t, r = "query-solution") {
|
|
619
|
+
const { convertToControls: n } = Pe(r), o = M(e.fields), m = M([]), i = /* @__PURE__ */ new Map(), { createConditionValue: u } = Le();
|
|
620
|
+
function S(v = !0) {
|
|
621
|
+
v && (o.value = n(o.value)), o.value.reduce((l, s) => (l.set(s.labelCode, s), l), i);
|
|
622
|
+
}
|
|
623
|
+
function g(v) {
|
|
624
|
+
return v.forEach((l) => {
|
|
625
|
+
if (l) {
|
|
626
|
+
const s = i.get(l.fieldCode);
|
|
627
|
+
s.controlType && (l.value = u(s.controlType, l.value, s.editor));
|
|
625
628
|
}
|
|
626
|
-
}),
|
|
629
|
+
}), v;
|
|
627
630
|
}
|
|
628
|
-
return { convertToControls: n, fields:
|
|
631
|
+
return { convertToControls: n, fields: o, fieldMap: i, fieldConditions: m, loadFieldConfigs: S, initialConditionValue: g };
|
|
629
632
|
}
|
|
630
|
-
function Oe(e, t,
|
|
631
|
-
const
|
|
632
|
-
function i(
|
|
633
|
-
let
|
|
633
|
+
function Oe(e, t, r) {
|
|
634
|
+
const n = M(null), o = M(r), m = M(0);
|
|
635
|
+
function i(v, l) {
|
|
636
|
+
let s = null;
|
|
634
637
|
return function() {
|
|
635
638
|
const h = arguments;
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
}, 200)) : (
|
|
639
|
-
|
|
639
|
+
s ? (clearTimeout(s), s = setTimeout(() => {
|
|
640
|
+
s = null, v(...h);
|
|
641
|
+
}, 200)) : (v(...h), s = setTimeout(() => {
|
|
642
|
+
s = null;
|
|
640
643
|
}, 200));
|
|
641
644
|
};
|
|
642
645
|
}
|
|
643
|
-
function
|
|
644
|
-
o.value && (
|
|
645
|
-
const l =
|
|
646
|
-
|
|
647
|
-
})),
|
|
646
|
+
function u() {
|
|
647
|
+
o.value && (n.value = new ResizeObserver(i((v) => {
|
|
648
|
+
const l = v[0];
|
|
649
|
+
m.value = l.contentRect.width;
|
|
650
|
+
})), n.value.observe(o.value));
|
|
648
651
|
}
|
|
649
|
-
function S(
|
|
650
|
-
let
|
|
651
|
-
return
|
|
652
|
+
function S(v) {
|
|
653
|
+
let s = "col-12";
|
|
654
|
+
return v > 250 * 6 ? s = "col-2" : v > 250 * 4 ? s = "col-3" : v > 250 * 3 ? s = "col-4" : v > 250 * 2 && (s = "col-6"), s;
|
|
652
655
|
}
|
|
653
|
-
const
|
|
654
|
-
return Y([
|
|
655
|
-
o.value =
|
|
656
|
+
const g = W(() => S(m.value));
|
|
657
|
+
return Y([r], ([v]) => {
|
|
658
|
+
o.value = v, u();
|
|
656
659
|
}), {
|
|
657
|
-
conditionClass:
|
|
658
|
-
resizeObserver:
|
|
660
|
+
conditionClass: g,
|
|
661
|
+
resizeObserver: n
|
|
659
662
|
};
|
|
660
663
|
}
|
|
661
664
|
const be = /* @__PURE__ */ _({
|
|
662
665
|
name: "FConditionFields",
|
|
663
|
-
props:
|
|
666
|
+
props: pe,
|
|
664
667
|
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
665
668
|
setup(e, t) {
|
|
666
|
-
const
|
|
669
|
+
const r = M(), n = re.getLocale(), o = M(e.key), m = M(e.conditions), {
|
|
667
670
|
renderFieldConditionEditor: i,
|
|
668
|
-
conditionChangeHandler:
|
|
671
|
+
conditionChangeHandler: u
|
|
669
672
|
} = Pe(), S = ge(e), {
|
|
670
|
-
initialConditionValue:
|
|
671
|
-
fieldMap:
|
|
673
|
+
initialConditionValue: g,
|
|
674
|
+
fieldMap: v,
|
|
672
675
|
loadFieldConfigs: l
|
|
673
|
-
} = S,
|
|
676
|
+
} = S, s = Oe(e, t, r), {
|
|
674
677
|
resizeObserver: h
|
|
675
|
-
} =
|
|
676
|
-
l(!0), m
|
|
678
|
+
} = s;
|
|
679
|
+
l(!0), g(m.value), ke(() => {
|
|
677
680
|
var c;
|
|
678
|
-
(c = h.value) == null || c.unobserve(
|
|
681
|
+
(c = h.value) == null || c.unobserve(r.value);
|
|
679
682
|
}), Y(() => e.conditions, () => {
|
|
680
|
-
|
|
683
|
+
m.value = e.conditions, g(m.value);
|
|
681
684
|
});
|
|
682
|
-
const
|
|
685
|
+
const p = W(() => ({
|
|
683
686
|
// row: true,
|
|
684
687
|
"f-utils-flex-row-wrap": !0,
|
|
685
688
|
"farris-form": !0,
|
|
686
689
|
"condition-div": !0,
|
|
687
|
-
"farris-form-controls-inline": !
|
|
690
|
+
"farris-form-controls-inline": !n || e.isControlInline === !0 || e.isControlInline === "auto" && n !== "en"
|
|
688
691
|
}));
|
|
689
|
-
function
|
|
690
|
-
|
|
692
|
+
function f(c, b, w, j) {
|
|
693
|
+
u(c, b, w, j), t.emit("valueChange", b, c);
|
|
691
694
|
}
|
|
692
695
|
function E() {
|
|
693
|
-
return
|
|
696
|
+
return m.value.map((c) => {
|
|
694
697
|
var z;
|
|
695
698
|
const {
|
|
696
699
|
id: b,
|
|
697
700
|
editor: w,
|
|
698
701
|
needEmitChange: j,
|
|
699
702
|
visible: q
|
|
700
|
-
} = i(
|
|
703
|
+
} = i(v, c, f);
|
|
701
704
|
let G = ((z = w == null ? void 0 : w.appearance) == null ? void 0 : z.class) || e.itemClass;
|
|
702
705
|
return w != null && w.multiLineLabel && (G = G + " farris-group-multi-label"), O(Ue, {
|
|
703
706
|
id: b,
|
|
@@ -710,18 +713,18 @@ const be = /* @__PURE__ */ _({
|
|
|
710
713
|
modelValue: c.value.value,
|
|
711
714
|
"onUpdate:modelValue": (A) => c.value.value = A,
|
|
712
715
|
onChange: (A, a) => {
|
|
713
|
-
j &&
|
|
716
|
+
j && f(c, A, w, a);
|
|
714
717
|
}
|
|
715
718
|
}, null);
|
|
716
719
|
});
|
|
717
720
|
}
|
|
718
721
|
return () => ce(O("div", {
|
|
719
|
-
class:
|
|
722
|
+
class: p.value,
|
|
720
723
|
key: o.value,
|
|
721
|
-
ref:
|
|
724
|
+
ref: r
|
|
722
725
|
}, [E()]), [[de("area-response")]]);
|
|
723
726
|
}
|
|
724
|
-
}),
|
|
727
|
+
}), Pr = {
|
|
725
728
|
customClass: { type: String, default: "" },
|
|
726
729
|
customStyle: { type: String, defaut: "" },
|
|
727
730
|
/** 控制是否可见 */
|
|
@@ -730,18 +733,18 @@ const be = /* @__PURE__ */ _({
|
|
|
730
733
|
adaptForLanguage: { type: Boolean, default: !0 }
|
|
731
734
|
}, ie = /* @__PURE__ */ _({
|
|
732
735
|
name: "FResponseForm",
|
|
733
|
-
props:
|
|
736
|
+
props: Pr,
|
|
734
737
|
emits: [],
|
|
735
738
|
setup(e, t) {
|
|
736
|
-
const
|
|
737
|
-
const o = re.getLocale(),
|
|
739
|
+
const r = M(), n = W(() => {
|
|
740
|
+
const o = re.getLocale(), m = e.customClass.split(" "), i = {
|
|
738
741
|
"drag-container": !0
|
|
739
742
|
};
|
|
740
|
-
return
|
|
743
|
+
return m.reduce((u, S) => (u[S] = !0, u), i), e.adaptForLanguage && o && (i["farris-form-controls-inline"] = o !== "en"), i;
|
|
741
744
|
});
|
|
742
745
|
return () => e.visible && ce(O("div", {
|
|
743
|
-
ref:
|
|
744
|
-
class:
|
|
746
|
+
ref: r,
|
|
747
|
+
class: n.value,
|
|
745
748
|
style: e.customStyle
|
|
746
749
|
}, [t.slots.default && t.slots.default()]), [[de("area-response")]]);
|
|
747
750
|
}
|
|
@@ -766,7 +769,7 @@ const be = /* @__PURE__ */ _({
|
|
|
766
769
|
componentId: { type: String, default: "" },
|
|
767
770
|
errors: { type: Object, default: null },
|
|
768
771
|
fill: { type: Boolean, default: !1 }
|
|
769
|
-
},
|
|
772
|
+
}, Or = {
|
|
770
773
|
id: { type: String },
|
|
771
774
|
required: { type: Boolean, default: !1 },
|
|
772
775
|
text: { type: String, default: "" },
|
|
@@ -777,63 +780,63 @@ const be = /* @__PURE__ */ _({
|
|
|
777
780
|
* 实际支持 'visible'可见 | 'reserve-space' 占位不显示
|
|
778
781
|
*/
|
|
779
782
|
showType: { type: String, default: "visible" }
|
|
780
|
-
},
|
|
783
|
+
}, Br = /* @__PURE__ */ _({
|
|
781
784
|
name: "FDynamicFormLabel",
|
|
782
|
-
props:
|
|
785
|
+
props: Or,
|
|
783
786
|
emits: [],
|
|
784
787
|
setup(e, t) {
|
|
785
788
|
M(e.title || e.text);
|
|
786
|
-
const
|
|
789
|
+
const r = M(e.required), n = M(e.text), o = M(e.valid), m = M(e.inValidTip);
|
|
787
790
|
Y(() => e.text, () => {
|
|
788
|
-
|
|
789
|
-
}), Y(() => e.required, (
|
|
790
|
-
|
|
791
|
-
}), Y([() => e.valid, () => e.inValidTip], ([
|
|
792
|
-
o.value =
|
|
791
|
+
n.value = e.text;
|
|
792
|
+
}), Y(() => e.required, (v, l) => {
|
|
793
|
+
v !== l && (r.value = v);
|
|
794
|
+
}), Y([() => e.valid, () => e.inValidTip], ([v, l]) => {
|
|
795
|
+
o.value = v, m.value = l;
|
|
793
796
|
});
|
|
794
|
-
const i = W(() => o.value ?
|
|
797
|
+
const i = W(() => o.value ? n.value : m.value), u = W(() => o.value ? "" : "color:red"), S = W(() => ({
|
|
795
798
|
"col-form-label": !0,
|
|
796
799
|
// 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
|
|
797
|
-
"f-width-auto":
|
|
798
|
-
})),
|
|
799
|
-
return () =>
|
|
800
|
+
"f-width-auto": r.value && (e.showType === "none" || !n.value)
|
|
801
|
+
})), g = W(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || r.value || !!n.value && e.showType !== "none");
|
|
802
|
+
return () => g.value && O("label", {
|
|
800
803
|
class: S.value,
|
|
801
804
|
title: i.value,
|
|
802
|
-
style:
|
|
805
|
+
style: u.value
|
|
803
806
|
}, [!o.value && O("span", {
|
|
804
807
|
class: "f-icon f-icon-warning mr-1",
|
|
805
808
|
style: "color: red; min-width: 16px;",
|
|
806
|
-
title:
|
|
809
|
+
title: m.value
|
|
807
810
|
}, null), O("span", {
|
|
808
811
|
class: "farris-label-text"
|
|
809
|
-
}, [
|
|
812
|
+
}, [r.value && O("span", {
|
|
810
813
|
class: "farris-label-info text-danger"
|
|
811
|
-
}, [Re("*")]), e.showType === "visible" &&
|
|
814
|
+
}, [Re("*")]), e.showType === "visible" && n.value])]);
|
|
812
815
|
}
|
|
813
|
-
}), { globalStorageKey:
|
|
816
|
+
}), { globalStorageKey: Mr } = Ve(), F = {}, C = {}, T = {}, V = {};
|
|
814
817
|
let Fe = !1;
|
|
815
|
-
async function
|
|
818
|
+
async function Nr() {
|
|
816
819
|
if (!Fe) {
|
|
817
|
-
Fe = !0,
|
|
818
|
-
const e = window[
|
|
820
|
+
Fe = !0, Ye.register(F, C, T, V), Xe.register(F, C, T, V), He.register(F, C, T, V), De.register(F, C, T, V), Ke.register(F, C, T, V), et.register(F, C, T, V), he.register(F, C, T, V), ye.register(F, C, T, V), he.register(F, C, T, V), ye.register(F, C, T, V), le.register(F, C, T, V), tt.register(F, C, T, V), rt.register(F, C, T, V), ot.register(F, C, T, V), nt.register(F, C, T, V), it.register(F, C, T, V), at.register(F, C, T, V), lt.register(F, C, T, V), st.register(F, C, T, V), ut.register(F, C, T, V), ar.register(F, C, T, V), ct.register(F, C, T, V), dt.register(F, C, T, V), Kt.register(F, C, T, V), pt.register(F, C, T, V), ft.register(F, C, T, V), gt.register(F, C, T, V), ht.register(F, C, T, V), vt.register(F, C, T, V), yt.register(F, C, T, V), bt.register(F, C, T, V), Ft.register(F, C, T, V), Ct.register(F, C, T, V), Tt.register(F, C, T, V), kt.register(F, C, T, V), wt.register(F, C, T, V), xt.register(F, C, T, V), Vt.register(F, C, T, V), St.register(F, C, T, V), Et.register(F, C, T, V), It.register(F, C, T, V), Lt.register(F, C, T, V), Ot.register(F, C, T, V), Bt.register(F, C, T, V), Pt.register(F, C, T, V), Yt.register(F, C, T), Mt.register(F, C, T, V), Nt.register(F, C, T, V), jt.register(F, C, T, V), Gt.register(F, C, T, V), qt.register(F, C, T, V), At.register(F, C, T, V), tr.register(F, C, T, V), $t.register(F, C, T, V), Rt.register(F, C, T, V), Ut.register(F, C, T, V), zt.register(F, C, T, V), Wt.register(F, C, T, V), Zt.register(F, C, T, V), _t.register(F, C, T, V), Jt.register(F, C, T, V), Qt.register(F, C, T, V), Xt.register(F, C, T, V), Ht.register(F, C, T, V), mt.register(F, C, T, V), Dt.register(F, C, T, V), er.register(F, C, T, V), rr.register(F, C, T, V), nr.register(F, C, T, V), or.register(F, C, T, V), ir.register(F, C, T, V), lr.register(F, C, T, V), sr.register(F, C, T, V), ur.register(F, C, T, V), cr.register(F, C, T, V), dr.register(F, C, T, V), mr.register(F, C, T, V), pr.register(F, C, T, V), fr.register(F, C, T, V);
|
|
821
|
+
const e = window[Mr];
|
|
819
822
|
if (e)
|
|
820
823
|
for (const t in e)
|
|
821
|
-
e[t].createPropsResolver =
|
|
824
|
+
e[t].createPropsResolver = gr, e[t].register(F, C, T);
|
|
822
825
|
}
|
|
823
826
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
827
|
+
function jr() {
|
|
828
|
+
Nr();
|
|
826
829
|
function e(i) {
|
|
827
|
-
const
|
|
828
|
-
if (!
|
|
830
|
+
const u = F[i];
|
|
831
|
+
if (!u)
|
|
829
832
|
throw new Error(`Could not find the editor of type '${i}'`);
|
|
830
|
-
return
|
|
833
|
+
return u;
|
|
831
834
|
}
|
|
832
|
-
function t(i,
|
|
835
|
+
function t(i, u) {
|
|
833
836
|
const S = C[i];
|
|
834
|
-
return S ? S(
|
|
837
|
+
return S ? S(u) : {};
|
|
835
838
|
}
|
|
836
|
-
function
|
|
839
|
+
function r(i) {
|
|
837
840
|
switch (i) {
|
|
838
841
|
case "check-box":
|
|
839
842
|
return "onChangeValue";
|
|
@@ -908,7 +911,7 @@ function jn() {
|
|
|
908
911
|
return "onUpdate:modelValue";
|
|
909
912
|
}
|
|
910
913
|
}
|
|
911
|
-
function
|
|
914
|
+
function n(i) {
|
|
912
915
|
switch (i) {
|
|
913
916
|
case "combo-list":
|
|
914
917
|
case "input-group":
|
|
@@ -923,16 +926,16 @@ function jn() {
|
|
|
923
926
|
return "onMousedownEvent";
|
|
924
927
|
}
|
|
925
928
|
}
|
|
926
|
-
function
|
|
929
|
+
function m(i) {
|
|
927
930
|
switch (i) {
|
|
928
931
|
case "input-group":
|
|
929
932
|
case "textarea":
|
|
930
933
|
return "onMouseupEvent";
|
|
931
934
|
}
|
|
932
935
|
}
|
|
933
|
-
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName:
|
|
936
|
+
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: r, getClearFunctionName: n, getMousedownFunctionName: o, getMouseupFunctionName: m };
|
|
934
937
|
}
|
|
935
|
-
const
|
|
938
|
+
const Gr = {
|
|
936
939
|
/**
|
|
937
940
|
* 显示的错误信息
|
|
938
941
|
*/
|
|
@@ -940,31 +943,31 @@ const Gn = {
|
|
|
940
943
|
type: Object,
|
|
941
944
|
default: null
|
|
942
945
|
}
|
|
943
|
-
},
|
|
946
|
+
}, qr = /* @__PURE__ */ _({
|
|
944
947
|
name: "FValidationMessage",
|
|
945
|
-
props:
|
|
948
|
+
props: Gr,
|
|
946
949
|
emits: [],
|
|
947
950
|
setup(e, t) {
|
|
948
|
-
const
|
|
949
|
-
Y(() => e.errors, (
|
|
950
|
-
|
|
951
|
+
const r = M(e.errors);
|
|
952
|
+
Y(() => e.errors, (m) => {
|
|
953
|
+
r.value = m;
|
|
951
954
|
});
|
|
952
|
-
const
|
|
953
|
-
if (
|
|
954
|
-
const
|
|
955
|
-
var
|
|
956
|
-
return (
|
|
955
|
+
const n = M(!0), o = W(() => {
|
|
956
|
+
if (r.value) {
|
|
957
|
+
const m = Object.keys(r.value).map((i) => {
|
|
958
|
+
var u;
|
|
959
|
+
return (u = r.value[i]) == null ? void 0 : u.name;
|
|
957
960
|
});
|
|
958
|
-
return
|
|
961
|
+
return m.length ? m.join(" ") : "";
|
|
959
962
|
}
|
|
960
963
|
return "";
|
|
961
964
|
});
|
|
962
965
|
return () => o.value && O("div", {
|
|
963
966
|
class: "farris-feedback f-state-invalid",
|
|
964
|
-
onClick: () =>
|
|
965
|
-
}, [!
|
|
967
|
+
onClick: () => n.value = !n.value
|
|
968
|
+
}, [!n.value && O("span", {
|
|
966
969
|
class: "f-icon f-icon-message_warning f-feedback-icon"
|
|
967
|
-
}, null),
|
|
970
|
+
}, null), n.value && O("span", {
|
|
968
971
|
class: "f-feedback-message"
|
|
969
972
|
}, [o.value])]);
|
|
970
973
|
}
|
|
@@ -973,28 +976,28 @@ const Gn = {
|
|
|
973
976
|
props: Be,
|
|
974
977
|
emits: ["change", "update:modelValue"],
|
|
975
978
|
setup(e, t) {
|
|
976
|
-
var
|
|
977
|
-
const
|
|
979
|
+
var k;
|
|
980
|
+
const r = M(e.id), n = M(e.customClass), o = M(e.editor), m = M(e.label), i = M(e.modelValue), u = M(e.readonly), S = M(((k = e.editor) == null ? void 0 : k.required) || e.required), g = M(e.showLabel), v = M(e.visible);
|
|
978
981
|
M(e.type);
|
|
979
|
-
const l = M(),
|
|
980
|
-
resolveEditorProps:
|
|
981
|
-
resolveEditorType:
|
|
982
|
+
const l = M(), s = M(e.errors), h = W(() => g.value ? e.showLabelType : "none"), {
|
|
983
|
+
resolveEditorProps: p,
|
|
984
|
+
resolveEditorType: f,
|
|
982
985
|
getChangeFunctionName: E,
|
|
983
986
|
getClearFunctionName: c
|
|
984
|
-
} =
|
|
987
|
+
} = jr(), b = W(() => ({
|
|
985
988
|
"form-group": !0,
|
|
986
989
|
"farris-form-group": !0,
|
|
987
990
|
"common-group": !0,
|
|
988
|
-
"q-state-readonly":
|
|
991
|
+
"q-state-readonly": u.value
|
|
989
992
|
})), w = W(() => {
|
|
990
993
|
if (e.fill)
|
|
991
994
|
return {
|
|
992
995
|
maxWidth: "none"
|
|
993
996
|
};
|
|
994
997
|
});
|
|
995
|
-
function j(
|
|
996
|
-
i.value = L !== void 0 ? L :
|
|
997
|
-
newValue:
|
|
998
|
+
function j(d, L, x) {
|
|
999
|
+
i.value = L !== void 0 ? L : d, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
|
|
1000
|
+
newValue: d,
|
|
998
1001
|
newModelValue: L,
|
|
999
1002
|
parameters: x
|
|
1000
1003
|
});
|
|
@@ -1002,19 +1005,19 @@ const Gn = {
|
|
|
1002
1005
|
function q() {
|
|
1003
1006
|
t.emit("update:modelValue", "");
|
|
1004
1007
|
}
|
|
1005
|
-
function G(
|
|
1008
|
+
function G(d) {
|
|
1006
1009
|
return (...L) => {
|
|
1007
|
-
q(), typeof
|
|
1010
|
+
q(), typeof d == "function" && d(...L);
|
|
1008
1011
|
};
|
|
1009
1012
|
}
|
|
1010
|
-
function z(
|
|
1013
|
+
function z(d) {
|
|
1011
1014
|
return (L, x, P) => {
|
|
1012
|
-
j(L, x, P), typeof
|
|
1015
|
+
j(L, x, P), typeof d == "function" && d(L, x, P);
|
|
1013
1016
|
};
|
|
1014
1017
|
}
|
|
1015
1018
|
const A = W(() => {
|
|
1016
|
-
const
|
|
1017
|
-
return B && (x[B] = G(x[B])), P && (x[P] = z(x[P])), (x.id == null || x.id === "") && (x.id =
|
|
1019
|
+
const d = o.value.type || "input-group", L = f(d), x = p(d, o.value), P = E(d), B = c(o.value.type);
|
|
1020
|
+
return B && (x[B] = G(x[B])), P && (x[P] = z(x[P])), (x.id == null || x.id === "") && (x.id = r.value), d === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (x.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (x.onEndValueChange = o.value.onEndValueChange)) : d === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? (x["onUpdate:idValue"] = o.value["onUpdate:idValue"], x.id = r.value) : d === "collection-property-editor" && o.value.onSelectionChange && typeof o.value.onSelectionChange == "function" ? x.onSelectionChange = o.value.onSelectionChange : d === "property-editor" && (x.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => O(L, me({
|
|
1018
1021
|
ref: l
|
|
1019
1022
|
}, x, {
|
|
1020
1023
|
modelValue: i.value,
|
|
@@ -1022,31 +1025,31 @@ const Gn = {
|
|
|
1022
1025
|
}), t.slots);
|
|
1023
1026
|
});
|
|
1024
1027
|
function a() {
|
|
1025
|
-
return O(
|
|
1026
|
-
id: `${
|
|
1027
|
-
errors:
|
|
1028
|
+
return O(qr, {
|
|
1029
|
+
id: `${r.value}-validation-message`,
|
|
1030
|
+
errors: s.value
|
|
1028
1031
|
}, null);
|
|
1029
1032
|
}
|
|
1030
|
-
return Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([
|
|
1033
|
+
return Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([d, L, x, P, B, U, $, J, Z, H]) => {
|
|
1031
1034
|
var D;
|
|
1032
|
-
|
|
1035
|
+
r.value = d, n.value = L, o.value = x, m.value = P, i.value = B, u.value = U, S.value = ((D = o.value) == null ? void 0 : D.required) || $, g.value = J, v.value = Z, s.value = H;
|
|
1033
1036
|
}), t.expose({
|
|
1034
1037
|
editorRef: l
|
|
1035
|
-
}), () =>
|
|
1036
|
-
id: `${
|
|
1037
|
-
class:
|
|
1038
|
+
}), () => v.value && O("div", {
|
|
1039
|
+
id: `${r.value}-form-group`,
|
|
1040
|
+
class: n.value,
|
|
1038
1041
|
style: e.customStyle
|
|
1039
1042
|
}, [O("div", {
|
|
1040
1043
|
class: "farris-group-wrap",
|
|
1041
1044
|
style: w.value
|
|
1042
1045
|
}, [O("div", {
|
|
1043
1046
|
class: b.value
|
|
1044
|
-
}, [O(
|
|
1045
|
-
id: `${
|
|
1047
|
+
}, [O(Br, {
|
|
1048
|
+
id: `${r.value}-lable`,
|
|
1046
1049
|
showType: h.value,
|
|
1047
1050
|
required: S.value,
|
|
1048
|
-
text:
|
|
1049
|
-
title:
|
|
1051
|
+
text: m.value,
|
|
1052
|
+
title: m.value
|
|
1050
1053
|
}, null), O("div", {
|
|
1051
1054
|
class: "farris-input-wrap"
|
|
1052
1055
|
}, [A.value(), a()])])])]);
|
|
@@ -1055,8 +1058,8 @@ const Gn = {
|
|
|
1055
1058
|
ie.install = (e) => {
|
|
1056
1059
|
e.component(ie.name, ie).component(se.name, se);
|
|
1057
1060
|
};
|
|
1058
|
-
var
|
|
1059
|
-
function $
|
|
1061
|
+
var Ar = /* @__PURE__ */ ((e) => (e[e.IntType = 0] = "IntType", e[e.StringType = 1] = "StringType", e[e.BoolType = 2] = "BoolType", e))(Ar || {}), Me = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.SmartHelp = 1] = "SmartHelp", e[e.Enum = 2] = "Enum", e[e.Express = 3] = "Express", e))(Me || {});
|
|
1062
|
+
function $r() {
|
|
1060
1063
|
const { getLocaleValue: e } = re;
|
|
1061
1064
|
return { conditionListLocale: {
|
|
1062
1065
|
// 添加条件
|
|
@@ -1069,7 +1072,7 @@ function $n() {
|
|
|
1069
1072
|
or: e("condition.or")
|
|
1070
1073
|
} };
|
|
1071
1074
|
}
|
|
1072
|
-
function
|
|
1075
|
+
function Rr() {
|
|
1073
1076
|
const { getLocaleValue: e } = re;
|
|
1074
1077
|
return { operatorsLocale: {
|
|
1075
1078
|
equal: e("operators.equal"),
|
|
@@ -1084,8 +1087,8 @@ function Rn() {
|
|
|
1084
1087
|
} };
|
|
1085
1088
|
}
|
|
1086
1089
|
var Ne = /* @__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.In = "9", e.NotIn = "10", e))(Ne || {});
|
|
1087
|
-
function
|
|
1088
|
-
const { operatorsLocale: e } =
|
|
1090
|
+
function Ur() {
|
|
1091
|
+
const { operatorsLocale: e } = Rr();
|
|
1089
1092
|
return [
|
|
1090
1093
|
{
|
|
1091
1094
|
value: "0",
|
|
@@ -1134,7 +1137,7 @@ function Un() {
|
|
|
1134
1137
|
}
|
|
1135
1138
|
];
|
|
1136
1139
|
}
|
|
1137
|
-
const
|
|
1140
|
+
const zr = {
|
|
1138
1141
|
"button-edit": ["0", "1", " 6", "7", "8"],
|
|
1139
1142
|
"check-box": ["0"],
|
|
1140
1143
|
"combo-list": ["0", "1"],
|
|
@@ -1154,20 +1157,20 @@ const zn = {
|
|
|
1154
1157
|
"radio-group": ["0"],
|
|
1155
1158
|
text: ["0", "1", " 6", "7", "8"]
|
|
1156
1159
|
};
|
|
1157
|
-
function
|
|
1158
|
-
const { fieldMap:
|
|
1159
|
-
function o(
|
|
1160
|
-
const i =
|
|
1160
|
+
function Wr(e, t, r) {
|
|
1161
|
+
const { fieldMap: n } = r;
|
|
1162
|
+
function o(m) {
|
|
1163
|
+
const i = n.get(m.fieldCode);
|
|
1161
1164
|
if (!i)
|
|
1162
1165
|
return [];
|
|
1163
|
-
const
|
|
1164
|
-
return
|
|
1166
|
+
const u = i.editor.type, S = new Set(zr[u]);
|
|
1167
|
+
return Ur().filter((v) => S.has(v.value));
|
|
1165
1168
|
}
|
|
1166
1169
|
return { getCompareOperators: o };
|
|
1167
1170
|
}
|
|
1168
|
-
function
|
|
1169
|
-
const e = M({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(),
|
|
1170
|
-
let
|
|
1171
|
+
function Zr() {
|
|
1172
|
+
const e = M({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
1173
|
+
let n = 0;
|
|
1171
1174
|
function o() {
|
|
1172
1175
|
return {
|
|
1173
1176
|
id: "",
|
|
@@ -1180,115 +1183,115 @@ function Zn() {
|
|
|
1180
1183
|
conditionId: Date.now()
|
|
1181
1184
|
};
|
|
1182
1185
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return { relation: a, items: [], children: [], path: [], groupId: ++
|
|
1186
|
+
function m(a, k) {
|
|
1187
|
+
return { relation: a, items: [], children: [], path: [], groupId: ++n, level: k };
|
|
1185
1188
|
}
|
|
1186
1189
|
function i() {
|
|
1187
1190
|
const a = Object.assign({}, e.value);
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
}), t.forEach((
|
|
1191
|
-
|
|
1191
|
+
r.forEach((k, d) => {
|
|
1192
|
+
k.groupId === a.groupId && r.set(d, a);
|
|
1193
|
+
}), t.forEach((k, d) => {
|
|
1194
|
+
k.groupId === a.groupId && t.set(d, a);
|
|
1192
1195
|
}), e.value = a;
|
|
1193
1196
|
}
|
|
1194
|
-
function
|
|
1195
|
-
const
|
|
1196
|
-
let
|
|
1197
|
+
function u(a) {
|
|
1198
|
+
const k = /* @__PURE__ */ new Map();
|
|
1199
|
+
let d = 0;
|
|
1197
1200
|
return a.forEach((L, x) => {
|
|
1198
1201
|
var P, B;
|
|
1199
|
-
if (
|
|
1202
|
+
if (d += ((P = L.lBracket) == null ? void 0 : P.length) || 0, k.set(x, d), d -= ((B = L.rBracket) == null ? void 0 : B.length) || 0, d < 0)
|
|
1200
1203
|
throw new Error("The right bracket is out of range.");
|
|
1201
|
-
}),
|
|
1204
|
+
}), k;
|
|
1202
1205
|
}
|
|
1203
|
-
function S(a,
|
|
1204
|
-
for (let P = 0; P <
|
|
1205
|
-
const B = a + (P + 1), U =
|
|
1206
|
-
|
|
1206
|
+
function S(a, k, d, L, x) {
|
|
1207
|
+
for (let P = 0; P < k; P++) {
|
|
1208
|
+
const B = a + (P + 1), U = m(x, B);
|
|
1209
|
+
d.children.push(U), r.set(U.groupId, d), d = d.children[d.children.length - 1], L.push(d);
|
|
1207
1210
|
}
|
|
1208
|
-
return
|
|
1211
|
+
return d;
|
|
1209
1212
|
}
|
|
1210
|
-
function
|
|
1211
|
-
for (let $ =
|
|
1213
|
+
function g(a, k, d, L, x) {
|
|
1214
|
+
for (let $ = k; $ <= 0; $++)
|
|
1212
1215
|
L.pop();
|
|
1213
1216
|
const P = L[L.length - 1];
|
|
1214
1217
|
if (!P)
|
|
1215
1218
|
throw new Error("The group path is out of range");
|
|
1216
|
-
const B = a +
|
|
1217
|
-
return P.children.push(U),
|
|
1219
|
+
const B = a + k, U = m(x, B);
|
|
1220
|
+
return P.children.push(U), r.set(U.groupId, P), d = P.children[P.children.length - 1], L.push(d), d;
|
|
1218
1221
|
}
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1221
|
-
const x =
|
|
1222
|
-
return x.children.push(P),
|
|
1222
|
+
function v(a, k, d, L) {
|
|
1223
|
+
d.pop();
|
|
1224
|
+
const x = d[d.length - 1], P = m(L, a);
|
|
1225
|
+
return x.children.push(P), r.set(P.groupId, x), k = x.children[x.children.length - 1], d.push(k), k;
|
|
1223
1226
|
}
|
|
1224
|
-
function l(a,
|
|
1227
|
+
function l(a, k, d, L, x, P) {
|
|
1225
1228
|
let B = a[a.length - 1];
|
|
1226
1229
|
if (!B)
|
|
1227
1230
|
throw new Error("The group path is out of range");
|
|
1228
|
-
const U =
|
|
1229
|
-
if (
|
|
1231
|
+
const U = k.get(L) || 0, $ = k.get(d) || 0;
|
|
1232
|
+
if (d < 0 || d === L)
|
|
1230
1233
|
return a[a.length - 1];
|
|
1231
1234
|
const J = U - $, Z = x && x.relation !== void 0 ? x.relation : 1;
|
|
1232
|
-
return B = J > 0 ? S($, J, B, a, Z) : B, B = J < 0 ?
|
|
1235
|
+
return B = J > 0 ? S($, J, B, a, Z) : B, B = J < 0 ? g($, J, B, a, Z) : B, B = J === 0 && $ > 0 && U > 0 && x && P && !!x.rBracket && !!P.lBracket ? v($, B, a, Z) : B, B;
|
|
1233
1236
|
}
|
|
1234
|
-
function
|
|
1235
|
-
const
|
|
1237
|
+
function s(a) {
|
|
1238
|
+
const d = { relation: a.length && a[0].relation !== void 0 ? a[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, L = [d], x = u(a);
|
|
1236
1239
|
return a.forEach((P, B) => {
|
|
1237
1240
|
const U = B - 1, $ = a[U], J = l(L, x, U, B, $, P);
|
|
1238
1241
|
J.items.push(P), t.set(P.conditionId, J);
|
|
1239
|
-
}), e.value =
|
|
1242
|
+
}), e.value = d, d;
|
|
1240
1243
|
}
|
|
1241
1244
|
function h() {
|
|
1242
1245
|
const a = o();
|
|
1243
1246
|
t.set(a.conditionId, e.value), e.value.items.push(a);
|
|
1244
1247
|
}
|
|
1245
|
-
function
|
|
1248
|
+
function p(a) {
|
|
1246
1249
|
if (!a)
|
|
1247
1250
|
return;
|
|
1248
|
-
const
|
|
1249
|
-
if (
|
|
1250
|
-
const
|
|
1251
|
-
t.set(L.conditionId,
|
|
1251
|
+
const k = t.get(a.conditionId);
|
|
1252
|
+
if (k) {
|
|
1253
|
+
const d = k.items.findIndex((x) => x.conditionId === a.conditionId) + 1, L = o();
|
|
1254
|
+
t.set(L.conditionId, k), k.items.splice(d, 0, L), i();
|
|
1252
1255
|
}
|
|
1253
1256
|
}
|
|
1254
|
-
function
|
|
1257
|
+
function f(a, k, d, L) {
|
|
1255
1258
|
a.reduce((x, P) => {
|
|
1256
1259
|
const B = P.conditionId !== void 0, U = P.groupId !== void 0;
|
|
1257
1260
|
if (B) {
|
|
1258
1261
|
const $ = P;
|
|
1259
|
-
|
|
1262
|
+
d.push($), x.items.set($.conditionId, $);
|
|
1260
1263
|
}
|
|
1261
1264
|
if (U) {
|
|
1262
1265
|
const $ = P;
|
|
1263
1266
|
L.push($), x.groups.set($.groupId, $);
|
|
1264
1267
|
}
|
|
1265
1268
|
return x;
|
|
1266
|
-
},
|
|
1269
|
+
}, k);
|
|
1267
1270
|
}
|
|
1268
|
-
function E(a,
|
|
1269
|
-
a && (a.items =
|
|
1271
|
+
function E(a, k, d, L, x) {
|
|
1272
|
+
a && (a.items = k.length ? a.items.filter((P) => !d.has(P.conditionId)) : a.items, a.children = L.length ? a.children.filter((P) => !x.has(P.groupId)) : a.children);
|
|
1270
1273
|
}
|
|
1271
|
-
function c(a,
|
|
1272
|
-
|
|
1274
|
+
function c(a, k, d) {
|
|
1275
|
+
k.forEach((L) => {
|
|
1273
1276
|
a.items.push(L), t.set(L.conditionId, a);
|
|
1274
|
-
}),
|
|
1275
|
-
a.children.push(L),
|
|
1277
|
+
}), d.forEach((L) => {
|
|
1278
|
+
a.children.push(L), r.set(L.groupId, a);
|
|
1276
1279
|
});
|
|
1277
1280
|
}
|
|
1278
1281
|
function b(a) {
|
|
1279
|
-
const
|
|
1280
|
-
if (
|
|
1281
|
-
|
|
1282
|
-
const B = d
|
|
1283
|
-
c(B, x, P),
|
|
1282
|
+
const k = a[0], d = k.conditionId !== void 0 ? t.get(k.conditionId) : r.get(k.groupId), L = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, x = [], P = [];
|
|
1283
|
+
if (d) {
|
|
1284
|
+
f(a, L, x, P), E(d, x, L.items, P, L.groups);
|
|
1285
|
+
const B = m(d.relation, d.level + 1);
|
|
1286
|
+
c(B, x, P), d.children.push(B), r.set(B.groupId, d), i();
|
|
1284
1287
|
}
|
|
1285
1288
|
}
|
|
1286
1289
|
function w(a) {
|
|
1287
|
-
const
|
|
1288
|
-
L && (L.children = L.children.filter((x) => x.groupId !== a.groupId),
|
|
1290
|
+
const k = [...a.items], d = [...a.children], L = r.get(a.groupId);
|
|
1291
|
+
L && (L.children = L.children.filter((x) => x.groupId !== a.groupId), r.delete(a.groupId), k.forEach((x) => {
|
|
1289
1292
|
L.items.push(x), t.set(x.conditionId, L);
|
|
1290
|
-
}),
|
|
1291
|
-
L.children.push(x),
|
|
1293
|
+
}), d.forEach((x) => {
|
|
1294
|
+
L.children.push(x), r.set(x.groupId, L);
|
|
1292
1295
|
}), i());
|
|
1293
1296
|
}
|
|
1294
1297
|
function j(a) {
|
|
@@ -1296,28 +1299,28 @@ function Zn() {
|
|
|
1296
1299
|
}
|
|
1297
1300
|
let q;
|
|
1298
1301
|
function G(a) {
|
|
1299
|
-
const { relation:
|
|
1302
|
+
const { relation: k } = a;
|
|
1300
1303
|
return (a.children && a.children.length ? a.children.map((L, x, P) => {
|
|
1301
1304
|
const B = q(L);
|
|
1302
|
-
return B[0].lBracket = (B[0].lBracket || "") + "(", B[B.length - 1].rBracket = (B[B.length - 1].rBracket || "") + ")", B[B.length - 1].relation = x < P.length - 1 ?
|
|
1305
|
+
return B[0].lBracket = (B[0].lBracket || "") + "(", B[B.length - 1].rBracket = (B[B.length - 1].rBracket || "") + ")", B[B.length - 1].relation = x < P.length - 1 ? k : 0, B;
|
|
1303
1306
|
}) : []).flat();
|
|
1304
1307
|
}
|
|
1305
1308
|
q = (a = e.value) => {
|
|
1306
|
-
const { relation:
|
|
1307
|
-
return [...
|
|
1309
|
+
const { relation: k } = a, d = a.items.map((x, P, B) => (x.lBracket = P === 0 ? "(" : "", x.rBracket = P === B.length - 1 ? ")" : "", x.relation = P < B.length - 1 ? k || 1 : 0, x)), L = G(a);
|
|
1310
|
+
return [...d, ...L];
|
|
1308
1311
|
};
|
|
1309
1312
|
function z(a) {
|
|
1310
|
-
const
|
|
1311
|
-
if (
|
|
1312
|
-
z(
|
|
1313
|
-
}),
|
|
1314
|
-
const
|
|
1315
|
-
e.value.relation =
|
|
1316
|
-
} else
|
|
1313
|
+
const k = a || e.value;
|
|
1314
|
+
if (k.children.length && k.children.forEach((d) => {
|
|
1315
|
+
z(d);
|
|
1316
|
+
}), k.level === 0 && !k.items.length && k.children.length === 1) {
|
|
1317
|
+
const d = k.children[0];
|
|
1318
|
+
e.value.relation = d.relation, w(d);
|
|
1319
|
+
} else k.items.length === 0 && k.children.length <= 1 && w(k);
|
|
1317
1320
|
}
|
|
1318
1321
|
function A(a) {
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1322
|
+
const k = t.get(a.conditionId);
|
|
1323
|
+
k && (k.items = k.items.filter((d) => d.conditionId !== a.conditionId), t.delete(a.conditionId), z(), i());
|
|
1321
1324
|
}
|
|
1322
1325
|
return {
|
|
1323
1326
|
addCondition: h,
|
|
@@ -1325,105 +1328,105 @@ function Zn() {
|
|
|
1325
1328
|
conditionGroupMap: t,
|
|
1326
1329
|
getConditions: q,
|
|
1327
1330
|
group: b,
|
|
1328
|
-
groupParentMap:
|
|
1329
|
-
insertConditionTo:
|
|
1330
|
-
loadConditionGroup:
|
|
1331
|
+
groupParentMap: r,
|
|
1332
|
+
insertConditionTo: p,
|
|
1333
|
+
loadConditionGroup: s,
|
|
1331
1334
|
refresh: i,
|
|
1332
1335
|
removeCondition: A,
|
|
1333
1336
|
rootGroup: e,
|
|
1334
1337
|
unGroup: w
|
|
1335
1338
|
};
|
|
1336
1339
|
}
|
|
1337
|
-
function
|
|
1338
|
-
const
|
|
1339
|
-
let
|
|
1340
|
-
function
|
|
1341
|
-
let b =
|
|
1340
|
+
function Jr(e, t, r) {
|
|
1341
|
+
const n = M(/* @__PURE__ */ new Set()), o = M(/* @__PURE__ */ new Set()), { conditionGroupMap: m, groupParentMap: i } = r;
|
|
1342
|
+
let u, S;
|
|
1343
|
+
function g(c) {
|
|
1344
|
+
let b = u.level <= c.level ? u : c, w = u.level > c.level ? u : c;
|
|
1342
1345
|
const j = [];
|
|
1343
1346
|
for (; w && b && w !== b; )
|
|
1344
1347
|
w.level > b.level ? (j.push(w), w = i.get(w.groupId)) : w.level === b.level && (b = i.get(b.groupId), b && j.unshift(b));
|
|
1345
1348
|
return j;
|
|
1346
1349
|
}
|
|
1347
|
-
function
|
|
1348
|
-
o.value.add(c.groupId), c.items.forEach((b) =>
|
|
1350
|
+
function v(c) {
|
|
1351
|
+
o.value.add(c.groupId), c.items.forEach((b) => n.value.add(b.conditionId)), c.children.forEach((b) => v(b));
|
|
1349
1352
|
}
|
|
1350
1353
|
function l(c) {
|
|
1351
1354
|
const { conditionId: b } = c;
|
|
1352
|
-
|
|
1353
|
-
const w =
|
|
1354
|
-
|
|
1355
|
+
n.value.add(b), u = n.value.size === 0 ? m.get(b) : u;
|
|
1356
|
+
const w = m.get(c.conditionId);
|
|
1357
|
+
g(w).forEach((q) => v(q));
|
|
1355
1358
|
}
|
|
1356
|
-
const
|
|
1357
|
-
o.value.delete(c.groupId), c.items.forEach((w) => S(w)), c.children.forEach((w) => !
|
|
1359
|
+
const s = W(() => n.value.size === 0 && o.value.size === 1), h = function(c) {
|
|
1360
|
+
o.value.delete(c.groupId), c.items.forEach((w) => S(w)), c.children.forEach((w) => !s.value && h(w));
|
|
1358
1361
|
const b = i.get(c.groupId);
|
|
1359
1362
|
b && o.value.has(b.groupId) && h(b);
|
|
1360
1363
|
};
|
|
1361
1364
|
S = function(c) {
|
|
1362
1365
|
const { conditionId: b } = c;
|
|
1363
|
-
if (
|
|
1364
|
-
const w =
|
|
1366
|
+
if (n.value.has(b) && n.value.delete(b), o.value.size > 0) {
|
|
1367
|
+
const w = m.get(b);
|
|
1365
1368
|
w && o.value.has(w.groupId) && h(w);
|
|
1366
1369
|
}
|
|
1367
1370
|
};
|
|
1368
|
-
function
|
|
1371
|
+
function p(c) {
|
|
1369
1372
|
const { conditionId: b } = c;
|
|
1370
|
-
|
|
1373
|
+
n.value.size === 0 && (u = m.get(b)), n.value.has(b) ? S(c) : l(c);
|
|
1371
1374
|
}
|
|
1372
|
-
function
|
|
1375
|
+
function f() {
|
|
1373
1376
|
const c = [];
|
|
1374
|
-
return
|
|
1377
|
+
return u && (u.items.filter((b) => n.value.has(b.conditionId)).forEach((b) => c.push(b)), u.children.filter((b) => o.value.has(b.groupId)).forEach((b) => c.push(b))), c;
|
|
1375
1378
|
}
|
|
1376
1379
|
function E() {
|
|
1377
|
-
|
|
1380
|
+
n.value.clear(), o.value.clear();
|
|
1378
1381
|
}
|
|
1379
|
-
return { clear: E, getSelectedGroupItem:
|
|
1382
|
+
return { clear: E, getSelectedGroupItem: f, selectedItems: n, toggleSelect: p };
|
|
1380
1383
|
}
|
|
1381
1384
|
const ae = /* @__PURE__ */ _({
|
|
1382
1385
|
name: "FConditionList",
|
|
1383
|
-
props:
|
|
1386
|
+
props: pe,
|
|
1384
1387
|
emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
|
|
1385
1388
|
setup(e, t) {
|
|
1386
|
-
const
|
|
1387
|
-
convertToControls:
|
|
1389
|
+
const r = M(e.key), n = M(e.conditions), o = ge(e, t, "filter-bar"), {
|
|
1390
|
+
convertToControls: m,
|
|
1388
1391
|
fields: i,
|
|
1389
|
-
fieldMap:
|
|
1392
|
+
fieldMap: u,
|
|
1390
1393
|
loadFieldConfigs: S
|
|
1391
|
-
} = o,
|
|
1392
|
-
addCondition:
|
|
1394
|
+
} = o, g = Zr(), {
|
|
1395
|
+
addCondition: v,
|
|
1393
1396
|
changeGroupRelation: l,
|
|
1394
|
-
getConditions:
|
|
1397
|
+
getConditions: s,
|
|
1395
1398
|
group: h,
|
|
1396
|
-
insertConditionTo:
|
|
1397
|
-
loadConditionGroup:
|
|
1399
|
+
insertConditionTo: p,
|
|
1400
|
+
loadConditionGroup: f,
|
|
1398
1401
|
refresh: E,
|
|
1399
1402
|
removeCondition: c,
|
|
1400
1403
|
rootGroup: b,
|
|
1401
1404
|
unGroup: w
|
|
1402
|
-
} =
|
|
1405
|
+
} = g, {
|
|
1403
1406
|
createConditionValue: j
|
|
1404
|
-
} = Le(), q =
|
|
1407
|
+
} = Le(), q = Jr(e, t, g), {
|
|
1405
1408
|
selectedItems: G,
|
|
1406
1409
|
toggleSelect: z
|
|
1407
1410
|
} = q, {
|
|
1408
1411
|
getCompareOperators: A
|
|
1409
|
-
} =
|
|
1412
|
+
} = Wr(e, t, o), {
|
|
1410
1413
|
conditionListLocale: a
|
|
1411
|
-
} = $
|
|
1412
|
-
S(!1), i.value =
|
|
1413
|
-
function
|
|
1414
|
+
} = $r();
|
|
1415
|
+
S(!1), i.value = m(i.value), f(n.value);
|
|
1416
|
+
function k(N) {
|
|
1414
1417
|
var Q;
|
|
1415
|
-
const R = ((Q =
|
|
1418
|
+
const R = ((Q = u.get(N.fieldCode)) == null ? void 0 : Q.editor) || {
|
|
1416
1419
|
type: "text"
|
|
1417
1420
|
};
|
|
1418
1421
|
N.value = j(R.type, void 0), t.emit("labelCodeChange", N);
|
|
1419
1422
|
}
|
|
1420
|
-
function
|
|
1423
|
+
function d(N, R) {
|
|
1421
1424
|
t.emit("compareTypeChange", R);
|
|
1422
1425
|
}
|
|
1423
1426
|
function L() {
|
|
1424
1427
|
}
|
|
1425
1428
|
t.expose({
|
|
1426
|
-
getConditions:
|
|
1429
|
+
getConditions: s
|
|
1427
1430
|
});
|
|
1428
1431
|
function x(N, R) {
|
|
1429
1432
|
t.emit("valueChange", N, R);
|
|
@@ -1438,7 +1441,7 @@ const ae = /* @__PURE__ */ _({
|
|
|
1438
1441
|
data: i.value,
|
|
1439
1442
|
modelValue: N.fieldCode,
|
|
1440
1443
|
"onUpdate:modelValue": (R) => N.fieldCode = R,
|
|
1441
|
-
onChange: (R) =>
|
|
1444
|
+
onChange: (R) => k(N)
|
|
1442
1445
|
}, null)]);
|
|
1443
1446
|
}
|
|
1444
1447
|
function B(N) {
|
|
@@ -1451,7 +1454,7 @@ const ae = /* @__PURE__ */ _({
|
|
|
1451
1454
|
data: A(N),
|
|
1452
1455
|
modelValue: N.compareType,
|
|
1453
1456
|
"onUpdate:modelValue": (R) => N.compareType = R,
|
|
1454
|
-
onChange: (R) =>
|
|
1457
|
+
onChange: (R) => d(R, N)
|
|
1455
1458
|
}, null)]);
|
|
1456
1459
|
}
|
|
1457
1460
|
function U(N) {
|
|
@@ -1459,7 +1462,7 @@ const ae = /* @__PURE__ */ _({
|
|
|
1459
1462
|
return O("div", {
|
|
1460
1463
|
class: "condition-list-item-control mr-3"
|
|
1461
1464
|
}, [O(se, {
|
|
1462
|
-
editor: (R =
|
|
1465
|
+
editor: (R = u.get(N.fieldCode)) == null ? void 0 : R.editor,
|
|
1463
1466
|
showLabel: !1,
|
|
1464
1467
|
modelValue: N.value.value,
|
|
1465
1468
|
"onUpdate:modelValue": (Q) => N.value.value = Q,
|
|
@@ -1473,7 +1476,7 @@ const ae = /* @__PURE__ */ _({
|
|
|
1473
1476
|
class: "condition-list-item-extend"
|
|
1474
1477
|
}, [O("span", {
|
|
1475
1478
|
class: "f-icon f-icon-plus-sm mr-2",
|
|
1476
|
-
onClick: () =>
|
|
1479
|
+
onClick: () => p(N)
|
|
1477
1480
|
}, null), O("span", {
|
|
1478
1481
|
class: "f-icon f-icon-minus-sm",
|
|
1479
1482
|
onClick: () => c(N)
|
|
@@ -1521,7 +1524,7 @@ const ae = /* @__PURE__ */ _({
|
|
|
1521
1524
|
class: "condition-list-bottom"
|
|
1522
1525
|
}, [O("div", {
|
|
1523
1526
|
class: "add-condition-btn mb-1 mr-3",
|
|
1524
|
-
onClick:
|
|
1527
|
+
onClick: v
|
|
1525
1528
|
}, [O("span", {
|
|
1526
1529
|
class: "f-icon f-icon-filter-add"
|
|
1527
1530
|
}, null), O("span", {
|
|
@@ -1540,12 +1543,12 @@ const ae = /* @__PURE__ */ _({
|
|
|
1540
1543
|
}
|
|
1541
1544
|
return () => O("div", {
|
|
1542
1545
|
class: "condition-list",
|
|
1543
|
-
key:
|
|
1546
|
+
key: r.value
|
|
1544
1547
|
}, [O("div", {
|
|
1545
1548
|
class: "condition-list-body"
|
|
1546
1549
|
}, [H(b.value)]), ne()]);
|
|
1547
1550
|
}
|
|
1548
|
-
}),
|
|
1551
|
+
}), _r = {}, Qr = {}, { globalStorageKey: yi } = Ve(), Xr = {
|
|
1549
1552
|
id: { Type: String, default: "" },
|
|
1550
1553
|
/** 是否自动完成 */
|
|
1551
1554
|
autocomplete: { Type: String, default: "off" },
|
|
@@ -1640,7 +1643,7 @@ const ae = /* @__PURE__ */ _({
|
|
|
1640
1643
|
{ key: "subjectCode", value: "10位数字会计科目代码" },
|
|
1641
1644
|
{ key: "custom", value: "自定义" }
|
|
1642
1645
|
];
|
|
1643
|
-
function
|
|
1646
|
+
function Yr(e) {
|
|
1644
1647
|
switch (e) {
|
|
1645
1648
|
case "none":
|
|
1646
1649
|
return "";
|
|
@@ -1667,34 +1670,34 @@ function Yn(e) {
|
|
|
1667
1670
|
}
|
|
1668
1671
|
return "";
|
|
1669
1672
|
}
|
|
1670
|
-
function
|
|
1673
|
+
function Hr(e) {
|
|
1671
1674
|
var t;
|
|
1672
|
-
return "请输入正确的" + ((t = je.find((
|
|
1675
|
+
return "请输入正确的" + ((t = je.find((r) => r.key === e)) == null ? void 0 : t.value);
|
|
1673
1676
|
}
|
|
1674
|
-
const
|
|
1675
|
-
convertTo: (e, t,
|
|
1676
|
-
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type =
|
|
1677
|
+
const Dr = {
|
|
1678
|
+
convertTo: (e, t, r, n) => {
|
|
1679
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = r, e.editor.formatValidation.expression = Yr(r), e.editor.formatValidation.message = Hr(r);
|
|
1677
1680
|
},
|
|
1678
|
-
convertFrom: (e, t,
|
|
1681
|
+
convertFrom: (e, t, r) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
|
|
1679
1682
|
}, Ce = {
|
|
1680
|
-
convertTo: (e, t,
|
|
1681
|
-
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] =
|
|
1683
|
+
convertTo: (e, t, r, n) => {
|
|
1684
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = r;
|
|
1682
1685
|
},
|
|
1683
|
-
convertFrom: (e, t,
|
|
1686
|
+
convertFrom: (e, t, r) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
|
|
1684
1687
|
};
|
|
1685
|
-
class
|
|
1686
|
-
constructor(t,
|
|
1687
|
-
super(t,
|
|
1688
|
+
class Kr extends hr {
|
|
1689
|
+
constructor(t, r) {
|
|
1690
|
+
super(t, r);
|
|
1688
1691
|
}
|
|
1689
|
-
getPropertyConfig(t,
|
|
1690
|
-
return super.getPropertyConfig(t,
|
|
1692
|
+
getPropertyConfig(t, r) {
|
|
1693
|
+
return super.getPropertyConfig(t, r), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
|
|
1691
1694
|
}
|
|
1692
1695
|
getEditorProperties(t) {
|
|
1693
|
-
var
|
|
1694
|
-
let
|
|
1695
|
-
if (((
|
|
1696
|
-
const
|
|
1697
|
-
(o =
|
|
1696
|
+
var n, o;
|
|
1697
|
+
let r;
|
|
1698
|
+
if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
|
|
1699
|
+
const m = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1700
|
+
(o = m == null ? void 0 : m.schemaField) != null && o.type && (r = m.schemaField.type.length);
|
|
1698
1701
|
}
|
|
1699
1702
|
return this.getComponentConfig(t, {}, {
|
|
1700
1703
|
maxLength: {
|
|
@@ -1705,7 +1708,7 @@ class Kn extends hn {
|
|
|
1705
1708
|
nullable: !0,
|
|
1706
1709
|
min: 0,
|
|
1707
1710
|
useThousands: !1,
|
|
1708
|
-
max:
|
|
1711
|
+
max: r,
|
|
1709
1712
|
needValid: !0
|
|
1710
1713
|
}
|
|
1711
1714
|
},
|
|
@@ -1732,11 +1735,11 @@ class Kn extends hn {
|
|
|
1732
1735
|
});
|
|
1733
1736
|
}
|
|
1734
1737
|
getGridFieldEdtiorProperties(t) {
|
|
1735
|
-
var
|
|
1736
|
-
let
|
|
1737
|
-
if (((
|
|
1738
|
-
const
|
|
1739
|
-
(o =
|
|
1738
|
+
var n, o;
|
|
1739
|
+
let r;
|
|
1740
|
+
if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
|
|
1741
|
+
const m = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1742
|
+
(o = m == null ? void 0 : m.schemaField) != null && o.type && (r = m.schemaField.type.length);
|
|
1740
1743
|
}
|
|
1741
1744
|
return this.getComponentConfig(t, {}, {
|
|
1742
1745
|
maxLength: {
|
|
@@ -1747,17 +1750,37 @@ class Kn extends hn {
|
|
|
1747
1750
|
nullable: !0,
|
|
1748
1751
|
min: 0,
|
|
1749
1752
|
useThousands: !1,
|
|
1750
|
-
max:
|
|
1753
|
+
max: r
|
|
1751
1754
|
}
|
|
1755
|
+
},
|
|
1756
|
+
showType: {
|
|
1757
|
+
description: "指定是文本框还是密码框",
|
|
1758
|
+
title: "展示类型",
|
|
1759
|
+
type: "enum",
|
|
1760
|
+
editor: {
|
|
1761
|
+
type: "combo-list",
|
|
1762
|
+
data: [
|
|
1763
|
+
{ id: "text", name: "文本框" },
|
|
1764
|
+
{ id: "password", name: "密码框" }
|
|
1765
|
+
]
|
|
1766
|
+
},
|
|
1767
|
+
refreshPanelAfterChanged: !0,
|
|
1768
|
+
defaultValue: "text"
|
|
1769
|
+
},
|
|
1770
|
+
enableViewPassword: {
|
|
1771
|
+
description: "",
|
|
1772
|
+
title: "能否查看密码",
|
|
1773
|
+
visible: t.editor.showType === "password",
|
|
1774
|
+
type: "boolean"
|
|
1752
1775
|
}
|
|
1753
1776
|
});
|
|
1754
1777
|
}
|
|
1755
1778
|
getFormatValidation(t) {
|
|
1756
|
-
var
|
|
1757
|
-
const
|
|
1779
|
+
var n, o, m, i;
|
|
1780
|
+
const r = {
|
|
1758
1781
|
title: "输入格式校验",
|
|
1759
1782
|
description: "输入校验",
|
|
1760
|
-
hide: !((
|
|
1783
|
+
hide: !((n = t.binding) != null && n.field),
|
|
1761
1784
|
properties: {
|
|
1762
1785
|
type: {
|
|
1763
1786
|
title: "格式类型",
|
|
@@ -1773,50 +1796,50 @@ class Kn extends hn {
|
|
|
1773
1796
|
data: je
|
|
1774
1797
|
},
|
|
1775
1798
|
refreshPanelAfterChanged: !0,
|
|
1776
|
-
$converter:
|
|
1799
|
+
$converter: Dr,
|
|
1777
1800
|
parentPropertyID: "formatValidation"
|
|
1778
1801
|
}
|
|
1779
1802
|
}
|
|
1780
1803
|
};
|
|
1781
|
-
return (o = t.editor.formatValidation) != null && o.type && ((
|
|
1804
|
+
return (o = t.editor.formatValidation) != null && o.type && ((m = t.editor.formatValidation) == null ? void 0 : m.type) !== "none" && (r.properties.message = {
|
|
1782
1805
|
title: "输入错误提示",
|
|
1783
1806
|
type: "string",
|
|
1784
1807
|
description: "输入错误提示",
|
|
1785
1808
|
$converter: Ce,
|
|
1786
1809
|
parentPropertyID: "formatValidation"
|
|
1787
|
-
}), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (
|
|
1810
|
+
}), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (r.properties.expression = {
|
|
1788
1811
|
title: "匹配正则",
|
|
1789
1812
|
type: "string",
|
|
1790
1813
|
description: "匹配正则",
|
|
1791
1814
|
$converter: Ce,
|
|
1792
1815
|
parentPropertyID: "formatValidation"
|
|
1793
|
-
}),
|
|
1816
|
+
}), r;
|
|
1794
1817
|
}
|
|
1795
1818
|
}
|
|
1796
|
-
function
|
|
1797
|
-
const
|
|
1798
|
-
function
|
|
1799
|
-
return new
|
|
1819
|
+
function en(e, t) {
|
|
1820
|
+
const r = e.schema;
|
|
1821
|
+
function n(o, m) {
|
|
1822
|
+
return new Kr(o, t).getPropertyConfig(r, m);
|
|
1800
1823
|
}
|
|
1801
|
-
return { getPropsConfig:
|
|
1824
|
+
return { getPropsConfig: n };
|
|
1802
1825
|
}
|
|
1803
|
-
const
|
|
1826
|
+
const tn = /* @__PURE__ */ _({
|
|
1804
1827
|
name: "FInputGroupDesign",
|
|
1805
|
-
props:
|
|
1828
|
+
props: Xr,
|
|
1806
1829
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1807
1830
|
setup(e, t) {
|
|
1808
|
-
const
|
|
1809
|
-
inputGroupClass:
|
|
1831
|
+
const r = M(e.modelValue), n = M(e.modelValue), o = _e(e, t, r, n), {
|
|
1832
|
+
inputGroupClass: m,
|
|
1810
1833
|
inputType: i,
|
|
1811
|
-
inputGroupStyle:
|
|
1812
|
-
} = o, S = M(),
|
|
1834
|
+
inputGroupStyle: u
|
|
1835
|
+
} = o, S = M(), g = K("designer-host-service"), v = K("design-item-context"), l = en(v, g), s = Se(S, v, l), h = W(() => e.showType === "password" ? "password" : "");
|
|
1813
1836
|
return we(() => {
|
|
1814
|
-
S.value.componentInstance =
|
|
1815
|
-
}), t.expose(
|
|
1837
|
+
S.value.componentInstance = s;
|
|
1838
|
+
}), t.expose(s.value), () => O("div", {
|
|
1816
1839
|
id: "inputGroup",
|
|
1817
1840
|
ref: S,
|
|
1818
|
-
class:
|
|
1819
|
-
style:
|
|
1841
|
+
class: m.value,
|
|
1842
|
+
style: u.value
|
|
1820
1843
|
}, [O("input", {
|
|
1821
1844
|
class: "form-control",
|
|
1822
1845
|
type: e.showType,
|
|
@@ -1831,91 +1854,91 @@ const tr = /* @__PURE__ */ _({
|
|
|
1831
1854
|
}, null)])])]);
|
|
1832
1855
|
}
|
|
1833
1856
|
});
|
|
1834
|
-
function
|
|
1835
|
-
function e(i,
|
|
1836
|
-
const S =
|
|
1837
|
-
return S ? S(
|
|
1857
|
+
function rn() {
|
|
1858
|
+
function e(i, u) {
|
|
1859
|
+
const S = Qr[i];
|
|
1860
|
+
return S ? S(u) : {};
|
|
1838
1861
|
}
|
|
1839
1862
|
function t(i) {
|
|
1840
|
-
return
|
|
1841
|
-
}
|
|
1842
|
-
function n(i) {
|
|
1863
|
+
return _r[i] || tn;
|
|
1843
1864
|
}
|
|
1844
1865
|
function r(i) {
|
|
1845
1866
|
}
|
|
1867
|
+
function n(i) {
|
|
1868
|
+
}
|
|
1846
1869
|
function o(i) {
|
|
1847
1870
|
}
|
|
1848
|
-
function
|
|
1871
|
+
function m(i) {
|
|
1849
1872
|
}
|
|
1850
|
-
return { getChangeFunctionName:
|
|
1873
|
+
return { getChangeFunctionName: r, getClearFunctionName: n, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: o, getMouseupFunctionName: m };
|
|
1851
1874
|
}
|
|
1852
|
-
function
|
|
1853
|
-
function t(
|
|
1875
|
+
function nn(e = {}) {
|
|
1876
|
+
function t(g, v, l, s) {
|
|
1854
1877
|
if (typeof l == "number")
|
|
1855
|
-
return
|
|
1878
|
+
return s[g].length === l;
|
|
1856
1879
|
if (typeof l == "object") {
|
|
1857
|
-
const h = Object.keys(l)[0],
|
|
1880
|
+
const h = Object.keys(l)[0], p = l[h];
|
|
1858
1881
|
if (h === "not")
|
|
1859
|
-
return Number(
|
|
1882
|
+
return Number(s[g].length) !== Number(p);
|
|
1860
1883
|
if (h === "moreThan")
|
|
1861
|
-
return Number(
|
|
1884
|
+
return Number(s[g].length) >= Number(p);
|
|
1862
1885
|
if (h === "lessThan")
|
|
1863
|
-
return Number(
|
|
1886
|
+
return Number(s[g].length) <= Number(p);
|
|
1864
1887
|
}
|
|
1865
1888
|
return !1;
|
|
1866
1889
|
}
|
|
1867
|
-
function
|
|
1868
|
-
return
|
|
1890
|
+
function r(g, v, l, s) {
|
|
1891
|
+
return s[g] && s[g].propertyValue && String(s[g].propertyValue.value) === String(l);
|
|
1869
1892
|
}
|
|
1870
|
-
const
|
|
1893
|
+
const n = /* @__PURE__ */ new Map([
|
|
1871
1894
|
["length", t],
|
|
1872
|
-
["getProperty",
|
|
1895
|
+
["getProperty", r]
|
|
1873
1896
|
]);
|
|
1874
|
-
Object.keys(e).reduce((
|
|
1875
|
-
function o(
|
|
1876
|
-
const l =
|
|
1877
|
-
return typeof
|
|
1878
|
-
if (
|
|
1879
|
-
return { target: l, operator: "length", param: null, value:
|
|
1880
|
-
const h =
|
|
1881
|
-
return { target: l, operator: "getProperty", param: h, value:
|
|
1897
|
+
Object.keys(e).reduce((g, v) => (g.set(v, e[v]), g), n);
|
|
1898
|
+
function o(g, v) {
|
|
1899
|
+
const l = g;
|
|
1900
|
+
return typeof v == "number" ? [{ target: l, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!v }] : typeof v == "object" ? Object.keys(v).map((s) => {
|
|
1901
|
+
if (s === "length")
|
|
1902
|
+
return { target: l, operator: "length", param: null, value: v[s] };
|
|
1903
|
+
const h = s, p = v[s];
|
|
1904
|
+
return { target: l, operator: "getProperty", param: h, value: p };
|
|
1882
1905
|
}) : [];
|
|
1883
1906
|
}
|
|
1884
|
-
function
|
|
1885
|
-
return Object.keys(
|
|
1886
|
-
const h = o(
|
|
1907
|
+
function m(g) {
|
|
1908
|
+
return Object.keys(g).reduce((l, s) => {
|
|
1909
|
+
const h = o(s, g[s]);
|
|
1887
1910
|
return l.push(...h), l;
|
|
1888
1911
|
}, []);
|
|
1889
1912
|
}
|
|
1890
|
-
function i(
|
|
1891
|
-
if (
|
|
1892
|
-
const l =
|
|
1893
|
-
return l && l(
|
|
1913
|
+
function i(g, v) {
|
|
1914
|
+
if (n.has(g.operator)) {
|
|
1915
|
+
const l = n.get(g.operator);
|
|
1916
|
+
return l && l(g.target, g.param, g.value, v) || !1;
|
|
1894
1917
|
}
|
|
1895
1918
|
return !1;
|
|
1896
1919
|
}
|
|
1897
|
-
function
|
|
1898
|
-
return
|
|
1920
|
+
function u(g, v) {
|
|
1921
|
+
return m(g).reduce((h, p) => h && i(p, v), !0);
|
|
1899
1922
|
}
|
|
1900
|
-
function S(
|
|
1901
|
-
const l = Object.keys(
|
|
1902
|
-
return
|
|
1923
|
+
function S(g, v) {
|
|
1924
|
+
const l = Object.keys(g), s = l.includes("allOf"), h = l.includes("anyOf"), p = s || h, c = (p ? g[p ? s ? "allOf" : "anyOf" : "allOf"] : [g]).map((w) => u(w, v));
|
|
1925
|
+
return s ? !c.includes(!1) : c.includes(!0);
|
|
1903
1926
|
}
|
|
1904
1927
|
return { parseValueSchema: S };
|
|
1905
1928
|
}
|
|
1906
|
-
const
|
|
1907
|
-
convertTo: (e, t,
|
|
1908
|
-
e.appearance || (e.appearance = {}), e.appearance[t] =
|
|
1929
|
+
const on = {
|
|
1930
|
+
convertTo: (e, t, r, n) => {
|
|
1931
|
+
e.appearance || (e.appearance = {}), e.appearance[t] = r;
|
|
1909
1932
|
},
|
|
1910
|
-
convertFrom: (e, t,
|
|
1911
|
-
},
|
|
1912
|
-
convertFrom: (e, t,
|
|
1913
|
-
},
|
|
1914
|
-
convertTo: (e, t,
|
|
1915
|
-
e.editor && (e.editor[t] =
|
|
1933
|
+
convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
|
|
1934
|
+
}, an = {
|
|
1935
|
+
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
1936
|
+
}, ln = {
|
|
1937
|
+
convertTo: (e, t, r, n) => {
|
|
1938
|
+
e.editor && (e.editor[t] = r);
|
|
1916
1939
|
},
|
|
1917
|
-
convertFrom: (e, t,
|
|
1918
|
-
},
|
|
1940
|
+
convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
1941
|
+
}, sn = {
|
|
1919
1942
|
button: { type: "button", name: "按钮" },
|
|
1920
1943
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
1921
1944
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -1968,24 +1991,24 @@ const or = {
|
|
|
1968
1991
|
comment: { type: "comment", name: "评论区" },
|
|
1969
1992
|
"rich-text-editor": { type: "rich-text-editor", name: "富文本编辑器", icon: "rich-text-box" },
|
|
1970
1993
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
1971
|
-
},
|
|
1972
|
-
convertFrom: (e, t,
|
|
1994
|
+
}, un = {
|
|
1995
|
+
convertFrom: (e, t, r) => {
|
|
1973
1996
|
var o;
|
|
1974
|
-
const
|
|
1975
|
-
return ((o =
|
|
1997
|
+
const n = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
1998
|
+
return ((o = sn[n]) == null ? void 0 : o.name) || n;
|
|
1976
1999
|
}
|
|
1977
|
-
},
|
|
1978
|
-
convertTo: (e, t,
|
|
2000
|
+
}, cn = {
|
|
2001
|
+
convertTo: (e, t, r, n) => {
|
|
1979
2002
|
e[t] = e[t];
|
|
1980
2003
|
},
|
|
1981
|
-
convertFrom: (e, t,
|
|
1982
|
-
},
|
|
1983
|
-
convertTo: (e, t,
|
|
1984
|
-
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] =
|
|
1985
|
-
[t]:
|
|
2004
|
+
convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
|
|
2005
|
+
}, dn = {
|
|
2006
|
+
convertTo: (e, t, r, n) => {
|
|
2007
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
|
|
2008
|
+
[t]: r
|
|
1986
2009
|
});
|
|
1987
2010
|
},
|
|
1988
|
-
convertFrom: (e, t,
|
|
2011
|
+
convertFrom: (e, t, r) => {
|
|
1989
2012
|
if (e.formatter) {
|
|
1990
2013
|
if (t === "trueText")
|
|
1991
2014
|
return e.formatter.trueText;
|
|
@@ -2010,11 +2033,11 @@ const or = {
|
|
|
2010
2033
|
}
|
|
2011
2034
|
return "none";
|
|
2012
2035
|
}
|
|
2013
|
-
},
|
|
2014
|
-
convertTo: (e, t,
|
|
2015
|
-
e.command ? e.command[t] =
|
|
2016
|
-
[t]:
|
|
2017
|
-
}, t === "enableType" &&
|
|
2036
|
+
}, mn = {
|
|
2037
|
+
convertTo: (e, t, r, n) => {
|
|
2038
|
+
e.command ? e.command[t] = r : e.command = {
|
|
2039
|
+
[t]: r
|
|
2040
|
+
}, t === "enableType" && r === "default" && (e.command.enable = !0, e.command.commands = [
|
|
2018
2041
|
{
|
|
2019
2042
|
text: "编辑",
|
|
2020
2043
|
type: "primary",
|
|
@@ -2025,7 +2048,7 @@ const or = {
|
|
|
2025
2048
|
type: "danger",
|
|
2026
2049
|
command: "remove"
|
|
2027
2050
|
}
|
|
2028
|
-
]), t === "enableType" &&
|
|
2051
|
+
]), t === "enableType" && r === "custom" && (e.command.enable = !0, e.command.commands = [
|
|
2029
2052
|
{
|
|
2030
2053
|
value: "add",
|
|
2031
2054
|
text: "增加",
|
|
@@ -2041,27 +2064,29 @@ const or = {
|
|
|
2041
2064
|
text: "删除",
|
|
2042
2065
|
type: "remove"
|
|
2043
2066
|
}
|
|
2044
|
-
]), t === "enableType" &&
|
|
2067
|
+
]), t === "enableType" && r === "unable" && (e.command.enable = !1);
|
|
2045
2068
|
},
|
|
2046
|
-
convertFrom: (e, t,
|
|
2047
|
-
var
|
|
2069
|
+
convertFrom: (e, t, r) => {
|
|
2070
|
+
var n, o;
|
|
2048
2071
|
if (e.command) {
|
|
2049
2072
|
if (t === "enableType") {
|
|
2050
|
-
const
|
|
2051
|
-
return e.command.enable ?
|
|
2073
|
+
const m = (o = (n = e.command) == null ? void 0 : n.commands) == null ? void 0 : o.find((i) => i.command === "edit" && i.type === "primary");
|
|
2074
|
+
return e.command.enable ? m ? "default" : "custom" : "unable";
|
|
2052
2075
|
}
|
|
2053
2076
|
if (t === "commands")
|
|
2054
2077
|
return e.command.enableType === "custom" ? e.command.commands : [];
|
|
2078
|
+
if (t === "formatter")
|
|
2079
|
+
return e.command.formatter;
|
|
2055
2080
|
}
|
|
2056
2081
|
return "";
|
|
2057
2082
|
}
|
|
2058
|
-
},
|
|
2059
|
-
convertTo: (e, t,
|
|
2060
|
-
e.column ? e.column[t] =
|
|
2061
|
-
[t]:
|
|
2062
|
-
}, t === "fitColumns" &&
|
|
2083
|
+
}, pn = {
|
|
2084
|
+
convertTo: (e, t, r, n) => {
|
|
2085
|
+
e.column ? e.column[t] = r : e.column = {
|
|
2086
|
+
[t]: r
|
|
2087
|
+
}, t === "fitColumns" && r && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
2063
2088
|
},
|
|
2064
|
-
convertFrom: (e, t,
|
|
2089
|
+
convertFrom: (e, t, r) => {
|
|
2065
2090
|
if (e.column) {
|
|
2066
2091
|
if (t === "fitColumns")
|
|
2067
2092
|
return e.column.fitColumns;
|
|
@@ -2070,27 +2095,27 @@ const or = {
|
|
|
2070
2095
|
}
|
|
2071
2096
|
return "";
|
|
2072
2097
|
}
|
|
2073
|
-
},
|
|
2074
|
-
convertTo: (e, t,
|
|
2075
|
-
e.summary ? e.summary[t] =
|
|
2076
|
-
[t]:
|
|
2077
|
-
}, t === "enable" &&
|
|
2078
|
-
enable:
|
|
2098
|
+
}, fn = {
|
|
2099
|
+
convertTo: (e, t, r, n) => {
|
|
2100
|
+
e.summary ? e.summary[t] = r : e.summary = {
|
|
2101
|
+
[t]: r
|
|
2102
|
+
}, t === "enable" && r && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
2103
|
+
enable: r,
|
|
2079
2104
|
groupFields: []
|
|
2080
2105
|
});
|
|
2081
2106
|
},
|
|
2082
|
-
convertFrom: (e, t,
|
|
2083
|
-
},
|
|
2084
|
-
convertTo: (e, t,
|
|
2085
|
-
e.group ? e.group[t] =
|
|
2086
|
-
[t]:
|
|
2087
|
-
}, t === "enable" &&
|
|
2088
|
-
enable:
|
|
2107
|
+
convertFrom: (e, t, r) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
2108
|
+
}, gn = {
|
|
2109
|
+
convertTo: (e, t, r, n) => {
|
|
2110
|
+
e.group ? e.group[t] = r : e.group = {
|
|
2111
|
+
[t]: r
|
|
2112
|
+
}, t === "enable" && r && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
2113
|
+
enable: r,
|
|
2089
2114
|
groupFields: [],
|
|
2090
2115
|
showSummary: !1
|
|
2091
2116
|
});
|
|
2092
2117
|
},
|
|
2093
|
-
convertFrom: (e, t,
|
|
2118
|
+
convertFrom: (e, t, r) => {
|
|
2094
2119
|
if (e.group) {
|
|
2095
2120
|
if (t === "enable")
|
|
2096
2121
|
return e.group.enable;
|
|
@@ -2098,76 +2123,76 @@ const or = {
|
|
|
2098
2123
|
return e.group.showSummary;
|
|
2099
2124
|
}
|
|
2100
2125
|
}
|
|
2101
|
-
},
|
|
2126
|
+
}, vn = {
|
|
2102
2127
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
2103
|
-
convertTo: (e, t,
|
|
2104
|
-
if (
|
|
2105
|
-
const
|
|
2106
|
-
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path =
|
|
2128
|
+
convertTo: (e, t, r) => {
|
|
2129
|
+
if (r && r.length > 0) {
|
|
2130
|
+
const n = r[0];
|
|
2131
|
+
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = n.bindingField, e.binding.field = n.id, e.binding.fullPath = n.path, e.path = n.bindingPath;
|
|
2107
2132
|
}
|
|
2108
2133
|
}
|
|
2109
|
-
},
|
|
2110
|
-
convertTo: (e, t,
|
|
2111
|
-
e.pagination || (e.pagination = {}), e.pagination[t] =
|
|
2134
|
+
}, hn = {
|
|
2135
|
+
convertTo: (e, t, r, n) => {
|
|
2136
|
+
e.pagination || (e.pagination = {}), e.pagination[t] = r;
|
|
2112
2137
|
},
|
|
2113
|
-
convertFrom: (e, t,
|
|
2114
|
-
},
|
|
2115
|
-
convertTo: (e, t,
|
|
2116
|
-
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] =
|
|
2138
|
+
convertFrom: (e, t, r) => e.pagination ? e.pagination[t] : e[t]
|
|
2139
|
+
}, yn = {
|
|
2140
|
+
convertTo: (e, t, r, n) => {
|
|
2141
|
+
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
|
|
2117
2142
|
},
|
|
2118
|
-
convertFrom: (e, t,
|
|
2119
|
-
},
|
|
2120
|
-
convertTo: (e, t,
|
|
2121
|
-
e.selection || (e.selection = {}), e.selection[t] =
|
|
2143
|
+
convertFrom: (e, t, r) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
2144
|
+
}, bn = {
|
|
2145
|
+
convertTo: (e, t, r, n) => {
|
|
2146
|
+
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
2122
2147
|
},
|
|
2123
|
-
convertFrom: (e, t,
|
|
2124
|
-
var
|
|
2125
|
-
return t === "showCheckbox" ? (
|
|
2148
|
+
convertFrom: (e, t, r) => {
|
|
2149
|
+
var n, o;
|
|
2150
|
+
return t === "showCheckbox" ? (n = e.selection) != null && n.multiSelect ? !0 : (o = e.selection) == null ? void 0 : o.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
2126
2151
|
}
|
|
2127
|
-
},
|
|
2128
|
-
convertFrom: (e, t,
|
|
2129
|
-
},
|
|
2152
|
+
}, Fn = {
|
|
2153
|
+
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
2154
|
+
}, Cn = {
|
|
2130
2155
|
convertFrom: (e, t) => e[t] || "",
|
|
2131
|
-
convertTo: (e, t,
|
|
2132
|
-
e[t] =
|
|
2156
|
+
convertTo: (e, t, r) => {
|
|
2157
|
+
e[t] = r;
|
|
2133
2158
|
}
|
|
2134
|
-
},
|
|
2135
|
-
convertTo: (e, t,
|
|
2136
|
-
e.size || (e.size = {}), e.size[t] =
|
|
2159
|
+
}, Tn = {
|
|
2160
|
+
convertTo: (e, t, r, n) => {
|
|
2161
|
+
e.size || (e.size = {}), e.size[t] = r;
|
|
2137
2162
|
},
|
|
2138
|
-
convertFrom: (e, t,
|
|
2139
|
-
},
|
|
2140
|
-
convertFrom: (e, t,
|
|
2141
|
-
var
|
|
2142
|
-
return (
|
|
2143
|
-
}
|
|
2144
|
-
},
|
|
2145
|
-
convertTo: (e, t,
|
|
2146
|
-
e.sort || (e.sort = {}), e.sort[t] =
|
|
2163
|
+
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
2164
|
+
}, kn = {
|
|
2165
|
+
convertFrom: (e, t, r) => {
|
|
2166
|
+
var n, o;
|
|
2167
|
+
return (n = e.formatter) != null && n.data && t === "formatterEnumData" && !e.formatterEnumData ? (o = e.formatter) == null ? void 0 : o.data : e.formatterEnumData;
|
|
2168
|
+
}
|
|
2169
|
+
}, wn = {
|
|
2170
|
+
convertTo: (e, t, r, n) => {
|
|
2171
|
+
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
2147
2172
|
},
|
|
2148
|
-
convertFrom: (e, t,
|
|
2149
|
-
var
|
|
2173
|
+
convertFrom: (e, t, r) => {
|
|
2174
|
+
var n, o;
|
|
2150
2175
|
if (t === "mode")
|
|
2151
|
-
return ((
|
|
2176
|
+
return ((n = e.sort) == null ? void 0 : n.mode) || "client";
|
|
2152
2177
|
if (t === "multiSort")
|
|
2153
2178
|
return !!((o = e.sort) != null && o.multiSort);
|
|
2154
2179
|
}
|
|
2155
|
-
},
|
|
2156
|
-
convertTo: (e, t,
|
|
2157
|
-
e.filter || (e.filter = {}), e.filter[t] =
|
|
2180
|
+
}, xn = {
|
|
2181
|
+
convertTo: (e, t, r, n) => {
|
|
2182
|
+
e.filter || (e.filter = {}), e.filter[t] = r;
|
|
2158
2183
|
},
|
|
2159
|
-
convertFrom: (e, t,
|
|
2160
|
-
var
|
|
2184
|
+
convertFrom: (e, t, r) => {
|
|
2185
|
+
var n;
|
|
2161
2186
|
if (t === "mode")
|
|
2162
|
-
return ((
|
|
2187
|
+
return ((n = e.filter) == null ? void 0 : n.mode) || "client";
|
|
2163
2188
|
}
|
|
2164
|
-
},
|
|
2165
|
-
convertTo: (e, t,
|
|
2166
|
-
e.rowOption ? e.rowOption[t] =
|
|
2167
|
-
[t]:
|
|
2189
|
+
}, Vn = {
|
|
2190
|
+
convertTo: (e, t, r, n) => {
|
|
2191
|
+
e.rowOption ? e.rowOption[t] = r : e.rowOption = {
|
|
2192
|
+
[t]: r
|
|
2168
2193
|
};
|
|
2169
2194
|
},
|
|
2170
|
-
convertFrom: (e, t,
|
|
2195
|
+
convertFrom: (e, t, r) => {
|
|
2171
2196
|
if (e.rowOption) {
|
|
2172
2197
|
if (t === "customRowStyle")
|
|
2173
2198
|
return e.rowOption.customRowStyle;
|
|
@@ -2176,43 +2201,43 @@ const or = {
|
|
|
2176
2201
|
}
|
|
2177
2202
|
return "";
|
|
2178
2203
|
}
|
|
2179
|
-
},
|
|
2180
|
-
convertTo: (e, t,
|
|
2181
|
-
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] =
|
|
2204
|
+
}, Sn = {
|
|
2205
|
+
convertTo: (e, t, r, n) => {
|
|
2206
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = r, t === "columnTemplateType" && r === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
2182
2207
|
<span class="f-pretend-link f-cursor-pointer"
|
|
2183
2208
|
@click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})">
|
|
2184
2209
|
{{rowData.${e.field}}}
|
|
2185
2210
|
</span>` : e.columnTemplate = `
|
|
2186
2211
|
<span class="f-pretend-link f-cursor-pointer">
|
|
2187
2212
|
{{rowData.${e.field}}}
|
|
2188
|
-
</span>`), t === "columnTemplateType" &&
|
|
2213
|
+
</span>`), t === "columnTemplateType" && r === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && r === "custom" && (e.columnTemplate = ""));
|
|
2189
2214
|
},
|
|
2190
|
-
convertFrom: (e, t,
|
|
2215
|
+
convertFrom: (e, t, r) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
2191
2216
|
};
|
|
2192
|
-
function
|
|
2193
|
-
const
|
|
2194
|
-
["/converter/appearance.converter",
|
|
2195
|
-
["/converter/buttons.converter",
|
|
2196
|
-
["/converter/property-editor.converter",
|
|
2197
|
-
["/converter/items-count.converter",
|
|
2198
|
-
["/converter/type.converter",
|
|
2199
|
-
["/converter/change-editor.converter",
|
|
2200
|
-
["/converter/change-formatter.converter",
|
|
2201
|
-
["/converter/column-command.converter",
|
|
2202
|
-
["/converter/column-option.converter",
|
|
2203
|
-
["/converter/summary.converter",
|
|
2204
|
-
["/converter/group.converter",
|
|
2205
|
-
["/converter/form-group-label.converter",
|
|
2206
|
-
["/converter/field-selector.converter",
|
|
2207
|
-
["/converter/pagination.converter",
|
|
2208
|
-
["/converter/row-number.converter",
|
|
2209
|
-
["/converter/grid-selection.converter",
|
|
2210
|
-
["/converter/size.converter",
|
|
2211
|
-
["/converter/change-formatter-enum.converter",
|
|
2212
|
-
["/converter/grid-sort.converter",
|
|
2213
|
-
["/converter/grid-filter.converter",
|
|
2214
|
-
["/converter/row-option.converter",
|
|
2215
|
-
["/converter/change-formatter-type.converter",
|
|
2217
|
+
function En(e, t, r) {
|
|
2218
|
+
const n = /* @__PURE__ */ new Map([
|
|
2219
|
+
["/converter/appearance.converter", on],
|
|
2220
|
+
["/converter/buttons.converter", an],
|
|
2221
|
+
["/converter/property-editor.converter", ln],
|
|
2222
|
+
["/converter/items-count.converter", Fn],
|
|
2223
|
+
["/converter/type.converter", un],
|
|
2224
|
+
["/converter/change-editor.converter", cn],
|
|
2225
|
+
["/converter/change-formatter.converter", dn],
|
|
2226
|
+
["/converter/column-command.converter", mn],
|
|
2227
|
+
["/converter/column-option.converter", pn],
|
|
2228
|
+
["/converter/summary.converter", fn],
|
|
2229
|
+
["/converter/group.converter", gn],
|
|
2230
|
+
["/converter/form-group-label.converter", Cn],
|
|
2231
|
+
["/converter/field-selector.converter", vn],
|
|
2232
|
+
["/converter/pagination.converter", hn],
|
|
2233
|
+
["/converter/row-number.converter", yn],
|
|
2234
|
+
["/converter/grid-selection.converter", bn],
|
|
2235
|
+
["/converter/size.converter", Tn],
|
|
2236
|
+
["/converter/change-formatter-enum.converter", kn],
|
|
2237
|
+
["/converter/grid-sort.converter", wn],
|
|
2238
|
+
["/converter/grid-filter.converter", xn],
|
|
2239
|
+
["/converter/row-option.converter", Vn],
|
|
2240
|
+
["/converter/change-formatter-type.converter", Sn]
|
|
2216
2241
|
]), o = /* @__PURE__ */ new Map([
|
|
2217
2242
|
["string", { type: "input-group", enableClear: !1 }],
|
|
2218
2243
|
["boolean", {
|
|
@@ -2237,30 +2262,30 @@ function Sr(e, t, n) {
|
|
|
2237
2262
|
["array", { type: "button-edit" }],
|
|
2238
2263
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
2239
2264
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
2240
|
-
]),
|
|
2241
|
-
function i(
|
|
2242
|
-
return () =>
|
|
2265
|
+
]), m = nn();
|
|
2266
|
+
function i(p, f) {
|
|
2267
|
+
return () => m.parseValueSchema(p, f);
|
|
2243
2268
|
}
|
|
2244
|
-
function
|
|
2245
|
-
return
|
|
2269
|
+
function u(p, f, E) {
|
|
2270
|
+
return p.includes("visible") && f.visible !== void 0 ? typeof f.visible == "boolean" ? () => !!f.visible : f.visible === void 0 ? !0 : i(f.visible, E) : () => !0;
|
|
2246
2271
|
}
|
|
2247
|
-
function S(
|
|
2248
|
-
return
|
|
2272
|
+
function S(p, f, E) {
|
|
2273
|
+
return p.includes("readonly") && f.readonly !== void 0 ? typeof f.readonly == "boolean" ? () => !!f.readonly : i(f.readonly, E) : () => !1;
|
|
2249
2274
|
}
|
|
2250
|
-
function
|
|
2251
|
-
const E =
|
|
2252
|
-
return typeof E == "string" && E &&
|
|
2275
|
+
function g(p, f) {
|
|
2276
|
+
const E = p.$converter || f;
|
|
2277
|
+
return typeof E == "string" && E && n.has(E) ? n.get(E) || null : E || null;
|
|
2253
2278
|
}
|
|
2254
|
-
function
|
|
2255
|
-
return Object.keys(
|
|
2256
|
-
const z = M(1), A = G, a =
|
|
2279
|
+
function v(p, f, E, c, b, w = "", j = "") {
|
|
2280
|
+
return Object.keys(p).map((G) => {
|
|
2281
|
+
const z = M(1), A = G, a = p[G], k = Object.keys(a), d = a.title, L = a.type, x = o.get(L) || { type: "input-group", enableClear: !1 }, P = a.editor ? Object.assign({}, x, a.editor) : Object.assign({}, x), B = u(k, a, f), U = S(k, a, f);
|
|
2257
2282
|
P.readonly = P.readonly === void 0 ? U() : P.readonly;
|
|
2258
|
-
const $ = a.type === "cascade" ?
|
|
2259
|
-
let Z =
|
|
2283
|
+
const $ = a.type === "cascade" ? v(a.properties, f, E, c, b, w, j) : [], J = !0;
|
|
2284
|
+
let Z = g(a, j);
|
|
2260
2285
|
const H = W({
|
|
2261
2286
|
get() {
|
|
2262
2287
|
if (z.value) {
|
|
2263
|
-
if (["class", "style"].find((qe) => qe === A) && !Z && (Z =
|
|
2288
|
+
if (["class", "style"].find((qe) => qe === A) && !Z && (Z = n.get("/converter/appearance.converter") || null), Z && Z.convertFrom)
|
|
2264
2289
|
return Z.convertFrom(E, G, b, w);
|
|
2265
2290
|
const X = E[G];
|
|
2266
2291
|
return Object.prototype.hasOwnProperty.call(a, "defaultValue") && (X === void 0 || typeof X == "string" && X === "") ? a.type === "boolean" ? a.defaultValue : a.defaultValue || "" : X;
|
|
@@ -2270,42 +2295,42 @@ function Sr(e, t, n) {
|
|
|
2270
2295
|
set(X) {
|
|
2271
2296
|
z.value += 1, Z && Z.convertTo ? (Z.convertTo(c, G, X, b, w), Z.convertTo(E, G, X, b, w)) : (c[G] = X, E[G] = X);
|
|
2272
2297
|
}
|
|
2273
|
-
}), { refreshPanelAfterChanged: D, description: ne, isExpand: N, parentPropertyID: R } = a, Q = { propertyID: A, propertyName:
|
|
2274
|
-
return
|
|
2298
|
+
}), { refreshPanelAfterChanged: D, description: ne, isExpand: N, parentPropertyID: R } = a, Q = { propertyID: A, propertyName: d, propertyType: L, propertyValue: H, editor: P, visible: B, readonly: U, cascadeConfig: $, hideCascadeTitle: J, refreshPanelAfterChanged: D, description: ne, isExpand: N, parentPropertyID: R };
|
|
2299
|
+
return f[A] = Q, Q;
|
|
2275
2300
|
});
|
|
2276
2301
|
}
|
|
2277
|
-
function l(
|
|
2278
|
-
const c = {}, b = e[
|
|
2302
|
+
function l(p, f, E = {}) {
|
|
2303
|
+
const c = {}, b = e[p];
|
|
2279
2304
|
return b && b.categories ? Object.keys(b.categories).map((j) => {
|
|
2280
|
-
const q = b.categories[j], G = q == null ? void 0 : q.title, z =
|
|
2305
|
+
const q = b.categories[j], G = q == null ? void 0 : q.title, z = v(q.properties || {}, c, {}, E, f);
|
|
2281
2306
|
return { categoryId: j, categoryName: G, properties: z };
|
|
2282
2307
|
}) : [];
|
|
2283
2308
|
}
|
|
2284
|
-
function
|
|
2285
|
-
const w =
|
|
2309
|
+
function s(p, f, E, c, b = "") {
|
|
2310
|
+
const w = f.$ref.schema, j = f.$ref.converter, q = E[w], G = q.type, z = r(q), A = {}, a = e[G];
|
|
2286
2311
|
if (a && a.categories) {
|
|
2287
|
-
const
|
|
2288
|
-
j && Object.keys(
|
|
2289
|
-
|
|
2312
|
+
const k = a.categories[p], d = k == null ? void 0 : k.title;
|
|
2313
|
+
j && Object.keys(k.properties).forEach((P) => {
|
|
2314
|
+
k.properties[P].$converter = j;
|
|
2290
2315
|
});
|
|
2291
|
-
const L = (
|
|
2292
|
-
return { categoryId:
|
|
2316
|
+
const L = (k == null ? void 0 : k.properties) || {}, x = v(L, A, z, q, c, b);
|
|
2317
|
+
return { categoryId: p, categoryName: d, properties: x };
|
|
2293
2318
|
}
|
|
2294
|
-
return { categoryId:
|
|
2319
|
+
return { categoryId: p, categoryName: "", properties: [] };
|
|
2295
2320
|
}
|
|
2296
|
-
function h(
|
|
2297
|
-
const w =
|
|
2321
|
+
function h(p, f, E, c, b) {
|
|
2322
|
+
const w = p.type, j = r(p), q = {};
|
|
2298
2323
|
let G = b || e[w];
|
|
2299
2324
|
if (G && Object.keys(G).length === 0 && E && E.getPropConfig && (G = E.getPropConfig(c)), G && G.categories) {
|
|
2300
2325
|
const z = [];
|
|
2301
2326
|
return Object.keys(G.categories).map((A) => {
|
|
2302
2327
|
const a = G.categories[A];
|
|
2303
2328
|
if (a.$ref) {
|
|
2304
|
-
z.push(
|
|
2329
|
+
z.push(s(A, a, p, f, c));
|
|
2305
2330
|
return;
|
|
2306
2331
|
}
|
|
2307
|
-
const
|
|
2308
|
-
z.push({ categoryId: A, categoryName:
|
|
2332
|
+
const k = a == null ? void 0 : a.title, d = a == null ? void 0 : a.tabId, L = a == null ? void 0 : a.tabName, x = a == null ? void 0 : a.hide, P = a == null ? void 0 : a.hideTitle, B = v(a.properties || {}, q, j, p, f, c, a.$converter), { setPropertyRelates: U } = a, $ = a == null ? void 0 : a.parentPropertyID;
|
|
2333
|
+
z.push({ categoryId: A, categoryName: k, tabId: d, tabName: L, hide: x, properties: B, hideTitle: P, setPropertyRelates: U, parentPropertyID: $ });
|
|
2309
2334
|
}), z;
|
|
2310
2335
|
}
|
|
2311
2336
|
return [];
|
|
@@ -2313,99 +2338,99 @@ function Sr(e, t, n) {
|
|
|
2313
2338
|
return {
|
|
2314
2339
|
getPropertyConfigBySchema: h,
|
|
2315
2340
|
getPropertyConfigByType: l,
|
|
2316
|
-
propertyConverterMap:
|
|
2341
|
+
propertyConverterMap: n
|
|
2317
2342
|
};
|
|
2318
2343
|
}
|
|
2319
|
-
function
|
|
2320
|
-
let
|
|
2321
|
-
function
|
|
2322
|
-
const { properties:
|
|
2323
|
-
if (h && (!
|
|
2344
|
+
function In(e, t) {
|
|
2345
|
+
let r;
|
|
2346
|
+
function n(l) {
|
|
2347
|
+
const { properties: s, title: h, ignore: p } = l, f = p && Array.isArray(p), E = Object.keys(s).reduce((c, b) => ((!f || !p.find((w) => w === b)) && (c[b] = s[b].type === "object" && s[b].properties ? n(s[b]) : te(s[b].default)), c), {});
|
|
2348
|
+
if (h && (!f || !p.find((c) => c === "id"))) {
|
|
2324
2349
|
const c = h.toLowerCase().replace(/-/g, "_");
|
|
2325
2350
|
E.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
2326
2351
|
}
|
|
2327
2352
|
return E;
|
|
2328
2353
|
}
|
|
2329
2354
|
function o(l) {
|
|
2330
|
-
const { properties:
|
|
2331
|
-
if (
|
|
2332
|
-
const
|
|
2333
|
-
if (h &&
|
|
2355
|
+
const { properties: s, title: h, required: p } = l;
|
|
2356
|
+
if (p && Array.isArray(p)) {
|
|
2357
|
+
const f = p.reduce((E, c) => (E[c] = s[c].type === "object" && s[c].properties ? n(s[c]) : te(s[c].default), E), {});
|
|
2358
|
+
if (h && p.find((E) => E === "id")) {
|
|
2334
2359
|
const E = h.toLowerCase().replace(/-/g, "_");
|
|
2335
|
-
|
|
2360
|
+
f.id = `${E}_${Math.random().toString().slice(2, 6)}`;
|
|
2336
2361
|
}
|
|
2337
|
-
return
|
|
2362
|
+
return f;
|
|
2338
2363
|
}
|
|
2339
2364
|
return {
|
|
2340
2365
|
type: h
|
|
2341
2366
|
};
|
|
2342
2367
|
}
|
|
2343
|
-
function
|
|
2344
|
-
const
|
|
2345
|
-
if (
|
|
2346
|
-
let
|
|
2368
|
+
function m(l, s = {}, h) {
|
|
2369
|
+
const p = e[l];
|
|
2370
|
+
if (p) {
|
|
2371
|
+
let f = o(p);
|
|
2347
2372
|
const E = t[l];
|
|
2348
|
-
return
|
|
2373
|
+
return f = E ? E({ getSchemaByType: m }, f, s, h) : f, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(f), f;
|
|
2349
2374
|
}
|
|
2350
2375
|
return null;
|
|
2351
2376
|
}
|
|
2352
|
-
function i(l,
|
|
2353
|
-
const h =
|
|
2354
|
-
return Object.keys(h).reduce((
|
|
2377
|
+
function i(l, s) {
|
|
2378
|
+
const h = n(s);
|
|
2379
|
+
return Object.keys(h).reduce((p, f) => (Object.prototype.hasOwnProperty.call(l, f) && (p[f] && ve(p[f]) && ve(l[f] || !l[f]) ? Object.assign(p[f], l[f] || {}) : p[f] = l[f]), p), h), h;
|
|
2355
2380
|
}
|
|
2356
|
-
function
|
|
2357
|
-
return Object.keys(l).filter((
|
|
2358
|
-
if (
|
|
2359
|
-
const E =
|
|
2381
|
+
function u(l, s) {
|
|
2382
|
+
return Object.keys(l).filter((p) => l[p] != null).reduce((p, f) => {
|
|
2383
|
+
if (s.has(f)) {
|
|
2384
|
+
const E = s.get(f);
|
|
2360
2385
|
if (typeof E == "string")
|
|
2361
|
-
|
|
2386
|
+
p[E] = l[f];
|
|
2362
2387
|
else {
|
|
2363
|
-
const c = E(
|
|
2364
|
-
Object.assign(
|
|
2388
|
+
const c = E(f, l[f], l);
|
|
2389
|
+
Object.assign(p, c);
|
|
2365
2390
|
}
|
|
2366
2391
|
} else
|
|
2367
|
-
|
|
2368
|
-
return
|
|
2392
|
+
p[f] = l[f];
|
|
2393
|
+
return p;
|
|
2369
2394
|
}, {});
|
|
2370
2395
|
}
|
|
2371
|
-
function S(l,
|
|
2372
|
-
const
|
|
2373
|
-
return
|
|
2396
|
+
function S(l, s, h = /* @__PURE__ */ new Map()) {
|
|
2397
|
+
const p = i(l, s);
|
|
2398
|
+
return u(p, h);
|
|
2374
2399
|
}
|
|
2375
|
-
function
|
|
2400
|
+
function g(l) {
|
|
2376
2401
|
var h;
|
|
2377
|
-
const
|
|
2378
|
-
if (
|
|
2379
|
-
const
|
|
2380
|
-
if (!
|
|
2402
|
+
const s = l.type;
|
|
2403
|
+
if (s) {
|
|
2404
|
+
const p = e[s];
|
|
2405
|
+
if (!p)
|
|
2381
2406
|
return l;
|
|
2382
|
-
const
|
|
2407
|
+
const f = i(l, p), E = ((h = l.editor) == null ? void 0 : h.type) || "";
|
|
2383
2408
|
if (E) {
|
|
2384
2409
|
const c = e[E], b = i(l.editor, c);
|
|
2385
|
-
|
|
2410
|
+
f.editor = b;
|
|
2386
2411
|
}
|
|
2387
|
-
return
|
|
2412
|
+
return f;
|
|
2388
2413
|
}
|
|
2389
2414
|
return l;
|
|
2390
2415
|
}
|
|
2391
|
-
function
|
|
2392
|
-
|
|
2416
|
+
function v(l) {
|
|
2417
|
+
r = l;
|
|
2393
2418
|
}
|
|
2394
|
-
return { getSchemaByType:
|
|
2419
|
+
return { getSchemaByType: m, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: S, mappingSchemaToProps: u, setDesignerContext: v };
|
|
2395
2420
|
}
|
|
2396
|
-
const
|
|
2397
|
-
|
|
2421
|
+
const Ln = {}, Pn = {}, { resolveSchemaWithDefaultValue: On } = In(Ln, Pn), Bn = {}, Mn = {};
|
|
2422
|
+
En(Bn, Mn, On);
|
|
2398
2423
|
const ee = class ee {
|
|
2399
2424
|
/**
|
|
2400
2425
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2401
2426
|
*/
|
|
2402
|
-
static getEditorTypesByMDataType(t,
|
|
2403
|
-
if (
|
|
2427
|
+
static getEditorTypesByMDataType(t, r = !1, n = "") {
|
|
2428
|
+
if (r)
|
|
2404
2429
|
return [{ key: y["language-textbox"].type, value: y["language-textbox"].name }];
|
|
2405
2430
|
let o = ee.fieldControlTypeMapping[t];
|
|
2406
|
-
if (
|
|
2407
|
-
const
|
|
2408
|
-
o = o.filter((i) => !
|
|
2431
|
+
if (n === "data-grid-column" && (o != null && o.length)) {
|
|
2432
|
+
const m = [y["check-group"].type, y["radio-group"].type, y.image.type];
|
|
2433
|
+
o = o.filter((i) => !m.includes(i.key));
|
|
2409
2434
|
}
|
|
2410
2435
|
return o;
|
|
2411
2436
|
}
|
|
@@ -2414,9 +2439,9 @@ const ee = class ee {
|
|
|
2414
2439
|
*/
|
|
2415
2440
|
static getAllInputTypes() {
|
|
2416
2441
|
const t = [];
|
|
2417
|
-
for (const
|
|
2418
|
-
ee.fieldControlTypeMapping[
|
|
2419
|
-
t.find((o) => o.key ===
|
|
2442
|
+
for (const r in ee.fieldControlTypeMapping)
|
|
2443
|
+
ee.fieldControlTypeMapping[r].forEach((n) => {
|
|
2444
|
+
t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
|
|
2420
2445
|
});
|
|
2421
2446
|
return t;
|
|
2422
2447
|
}
|
|
@@ -2424,10 +2449,10 @@ const ee = class ee {
|
|
|
2424
2449
|
* 提供schema字段基础属性和DOM控件属性的映射
|
|
2425
2450
|
* @param control 控件元数据
|
|
2426
2451
|
*/
|
|
2427
|
-
static mappingDomPropAndSchemaProp(t,
|
|
2428
|
-
var
|
|
2429
|
-
const
|
|
2430
|
-
return (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) &&
|
|
2452
|
+
static mappingDomPropAndSchemaProp(t, r) {
|
|
2453
|
+
var m;
|
|
2454
|
+
const n = (m = t.editor) == null ? void 0 : m.type, o = [];
|
|
2455
|
+
return (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && r && r.categoryId && r.categoryId.indexOf("gridFieldEditor") < 0 && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === y["input-group"].type || n === y.textarea.type || n === y["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === y["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === y["combo-list"].type || n === y["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === y["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === y["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === y.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
|
|
2431
2456
|
}
|
|
2432
2457
|
};
|
|
2433
2458
|
/**
|
|
@@ -2487,86 +2512,86 @@ I(ee, "fieldControlTypeMapping", {
|
|
|
2487
2512
|
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
2488
2513
|
]
|
|
2489
2514
|
});
|
|
2490
|
-
let
|
|
2515
|
+
let Te = ee;
|
|
2491
2516
|
var ue = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ue || {}), Ge = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(Ge || {});
|
|
2492
|
-
function
|
|
2493
|
-
function
|
|
2494
|
-
const i =
|
|
2517
|
+
function Nn(e, t, r) {
|
|
2518
|
+
function n() {
|
|
2519
|
+
const i = r.componentId;
|
|
2495
2520
|
if (!i)
|
|
2496
2521
|
return !1;
|
|
2497
|
-
const
|
|
2498
|
-
if (!
|
|
2522
|
+
const u = e.formSchemaUtils.getViewModelIdByComponentId(i);
|
|
2523
|
+
if (!u)
|
|
2499
2524
|
return !1;
|
|
2500
|
-
const { schema: S } = t, { designViewModelUtils:
|
|
2525
|
+
const { schema: S } = t, { designViewModelUtils: g } = e, v = g.getDgViewModel(u), l = v == null ? void 0 : v.fields.find((s) => s.id === S.binding.field);
|
|
2501
2526
|
return !(!l || l.$type !== Ge.SimpleField);
|
|
2502
2527
|
}
|
|
2503
2528
|
function o() {
|
|
2504
2529
|
const { schema: i } = t;
|
|
2505
2530
|
return !!e.formSchemaUtils.getVariableById(i.binding.field);
|
|
2506
2531
|
}
|
|
2507
|
-
function
|
|
2532
|
+
function m() {
|
|
2508
2533
|
var S;
|
|
2509
2534
|
const { schema: i } = t;
|
|
2510
|
-
let
|
|
2535
|
+
let u = !0;
|
|
2511
2536
|
if (!e || !((S = i.binding) != null && S.field))
|
|
2512
|
-
return
|
|
2537
|
+
return u;
|
|
2513
2538
|
switch (i.binding.type) {
|
|
2514
2539
|
case ue.Form: {
|
|
2515
|
-
|
|
2540
|
+
u = n();
|
|
2516
2541
|
break;
|
|
2517
2542
|
}
|
|
2518
2543
|
case ue.Variable:
|
|
2519
|
-
|
|
2544
|
+
u = o();
|
|
2520
2545
|
}
|
|
2521
|
-
return
|
|
2546
|
+
return u;
|
|
2522
2547
|
}
|
|
2523
|
-
return { checkBindingFieldValidation:
|
|
2548
|
+
return { checkBindingFieldValidation: m };
|
|
2524
2549
|
}
|
|
2525
|
-
const
|
|
2550
|
+
const jn = /* @__PURE__ */ _({
|
|
2526
2551
|
name: "FDynamicFormGroupDesign",
|
|
2527
2552
|
props: ze,
|
|
2528
2553
|
emits: ["change", "update:modelValue"],
|
|
2529
2554
|
setup(e, t) {
|
|
2530
2555
|
var z;
|
|
2531
|
-
const
|
|
2556
|
+
const r = M(e.id), n = M(e.customClass), o = M(e.editor), m = M(e.label), i = M(e.modelValue), u = M(!0), S = M(((z = e.editor) == null ? void 0 : z.required) === !0), g = M(e.showLabel);
|
|
2532
2557
|
M(e.type);
|
|
2533
|
-
const
|
|
2534
|
-
resolveEditorProps:
|
|
2535
|
-
resolveEditorType:
|
|
2536
|
-
} =
|
|
2558
|
+
const v = M(), l = K("designer-host-service"), s = K("design-item-context"), h = W(() => g.value ? e.showLabelType : "none"), {
|
|
2559
|
+
resolveEditorProps: p,
|
|
2560
|
+
resolveEditorType: f
|
|
2561
|
+
} = rn(), E = W(() => ({
|
|
2537
2562
|
"form-group": !0,
|
|
2538
2563
|
"farris-form-group": !0,
|
|
2539
2564
|
"common-group": !0,
|
|
2540
|
-
"q-state-readonly":
|
|
2565
|
+
"q-state-readonly": u.value,
|
|
2541
2566
|
"form-group-in-canvas": !0
|
|
2542
2567
|
})), c = W(() => {
|
|
2543
|
-
const A = o.value.type || "input-group", a =
|
|
2544
|
-
return () => O(a,
|
|
2545
|
-
ref:
|
|
2546
|
-
},
|
|
2568
|
+
const A = o.value.type || "input-group", a = f(A), k = p(A, o.value);
|
|
2569
|
+
return () => O(a, me({
|
|
2570
|
+
ref: v
|
|
2571
|
+
}, k, {
|
|
2547
2572
|
modelValue: i.value,
|
|
2548
|
-
"onUpdate:modelValue": (
|
|
2573
|
+
"onUpdate:modelValue": (d) => i.value = d
|
|
2549
2574
|
}), null);
|
|
2550
2575
|
});
|
|
2551
|
-
Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([A, a,
|
|
2576
|
+
Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([A, a, k, d, L, x, P]) => {
|
|
2552
2577
|
var B;
|
|
2553
|
-
|
|
2554
|
-
...
|
|
2555
|
-
},
|
|
2578
|
+
r.value = A, n.value = a, o.value = {
|
|
2579
|
+
...k
|
|
2580
|
+
}, m.value = d, i.value = L, u.value = x, S.value = ((B = o.value) == null ? void 0 : B.required) === !0, g.value = P;
|
|
2556
2581
|
}, {
|
|
2557
2582
|
deep: !0
|
|
2558
2583
|
});
|
|
2559
2584
|
const w = !K("external-container-id"), {
|
|
2560
2585
|
checkBindingFieldValidation: j
|
|
2561
|
-
} =
|
|
2586
|
+
} = Nn(l, s, e);
|
|
2562
2587
|
function q() {
|
|
2563
2588
|
const A = w ? j() : !0;
|
|
2564
2589
|
return O(We, {
|
|
2565
|
-
id: `${
|
|
2590
|
+
id: `${r.value}-lable`,
|
|
2566
2591
|
showType: h.value,
|
|
2567
2592
|
required: S.value,
|
|
2568
|
-
text:
|
|
2569
|
-
title:
|
|
2593
|
+
text: m.value,
|
|
2594
|
+
title: m.value,
|
|
2570
2595
|
valid: A,
|
|
2571
2596
|
inValidTip: "绑定信息已失效,请切换绑定或移除控件"
|
|
2572
2597
|
}, null);
|
|
@@ -2578,10 +2603,10 @@ const Nr = /* @__PURE__ */ _({
|
|
|
2578
2603
|
};
|
|
2579
2604
|
});
|
|
2580
2605
|
return t.expose({
|
|
2581
|
-
editorRef:
|
|
2606
|
+
editorRef: v
|
|
2582
2607
|
}), () => O("div", {
|
|
2583
|
-
id: `${
|
|
2584
|
-
class:
|
|
2608
|
+
id: `${r.value}-input-group`,
|
|
2609
|
+
class: n.value
|
|
2585
2610
|
}, [O("div", {
|
|
2586
2611
|
class: "farris-group-wrap",
|
|
2587
2612
|
style: G.value
|
|
@@ -2592,37 +2617,37 @@ const Nr = /* @__PURE__ */ _({
|
|
|
2592
2617
|
}, [c.value()])])])]);
|
|
2593
2618
|
}
|
|
2594
2619
|
});
|
|
2595
|
-
function
|
|
2596
|
-
function
|
|
2620
|
+
function Gn(e, t) {
|
|
2621
|
+
function r() {
|
|
2597
2622
|
return !0;
|
|
2598
2623
|
}
|
|
2599
|
-
function
|
|
2624
|
+
function n() {
|
|
2600
2625
|
return !0;
|
|
2601
2626
|
}
|
|
2602
2627
|
function o() {
|
|
2603
2628
|
return !1;
|
|
2604
2629
|
}
|
|
2605
|
-
function
|
|
2630
|
+
function m() {
|
|
2606
2631
|
return !0;
|
|
2607
2632
|
}
|
|
2608
2633
|
function i(l) {
|
|
2609
2634
|
var c;
|
|
2610
|
-
const
|
|
2611
|
-
if (!
|
|
2635
|
+
const s = t == null ? void 0 : t.designViewModelUtils, h = t == null ? void 0 : t.formSchemaUtils, p = (c = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : c.belongedComponentId;
|
|
2636
|
+
if (!p || !s || !h)
|
|
2612
2637
|
return;
|
|
2613
|
-
const
|
|
2638
|
+
const f = h.getViewModelIdByComponentId(p), E = s.getDgViewModel(f);
|
|
2614
2639
|
E && E.removeField([l]);
|
|
2615
2640
|
}
|
|
2616
|
-
function
|
|
2617
|
-
const h = t == null ? void 0 : t.formSchemaUtils, { schema:
|
|
2641
|
+
function u(l, s) {
|
|
2642
|
+
const h = t == null ? void 0 : t.formSchemaUtils, { schema: p } = e;
|
|
2618
2643
|
if (h.getComponents().find((E) => {
|
|
2619
2644
|
let c = h.getControlsInCmpWidthBinding(E.viewModel, l);
|
|
2620
2645
|
if (c = c.filter((b) => {
|
|
2621
2646
|
var j;
|
|
2622
|
-
if (b.id ===
|
|
2647
|
+
if (b.id === p.id)
|
|
2623
2648
|
return !1;
|
|
2624
|
-
const w =
|
|
2625
|
-
if (w && w.type === "Expression" && w.expressionId ===
|
|
2649
|
+
const w = s.type === "visible" ? b[s.type] : (j = b.editor) == null ? void 0 : j[s.type];
|
|
2650
|
+
if (w && w.type === "Expression" && w.expressionId === s.id)
|
|
2626
2651
|
return !0;
|
|
2627
2652
|
}), c.length)
|
|
2628
2653
|
return !0;
|
|
@@ -2630,94 +2655,94 @@ function jr(e, t) {
|
|
|
2630
2655
|
return !0;
|
|
2631
2656
|
}
|
|
2632
2657
|
function S(l) {
|
|
2633
|
-
var
|
|
2634
|
-
const
|
|
2635
|
-
if (
|
|
2636
|
-
const
|
|
2637
|
-
E > -1 && ((
|
|
2658
|
+
var p;
|
|
2659
|
+
const s = t == null ? void 0 : t.formSchemaUtils, { schema: h } = e;
|
|
2660
|
+
if (s.getExpressions().length) {
|
|
2661
|
+
const f = s.getExpressions(), E = f.findIndex((c) => c.target === l);
|
|
2662
|
+
E > -1 && ((p = f[E].rules) == null || p.map((c) => {
|
|
2638
2663
|
var b;
|
|
2639
2664
|
switch (c.type) {
|
|
2640
2665
|
case "visible":
|
|
2641
2666
|
case "readonly":
|
|
2642
2667
|
case "required": {
|
|
2643
2668
|
const w = c.type === "visible" ? h[c.type] : (b = h.editor) == null ? void 0 : b[c.type];
|
|
2644
|
-
w && w.type === "Expression" && w.expressionId === c.id && (
|
|
2669
|
+
w && w.type === "Expression" && w.expressionId === c.id && (u(l, c) || (c.needDelete = !0));
|
|
2645
2670
|
break;
|
|
2646
2671
|
}
|
|
2647
2672
|
default:
|
|
2648
|
-
|
|
2673
|
+
u(l, c) || (c.needDelete = !0);
|
|
2649
2674
|
}
|
|
2650
|
-
}),
|
|
2675
|
+
}), f[E].rules = f[E].rules.filter((c) => !c.needDelete));
|
|
2651
2676
|
}
|
|
2652
2677
|
}
|
|
2653
|
-
function
|
|
2654
|
-
var
|
|
2655
|
-
const l = (
|
|
2678
|
+
function g() {
|
|
2679
|
+
var s, h;
|
|
2680
|
+
const l = (s = e == null ? void 0 : e.parent) == null ? void 0 : s.componentInstance.value;
|
|
2656
2681
|
((h = l == null ? void 0 : l.schema) == null ? void 0 : h.type) === y["response-layout-item"].type && (l != null && l.schema.appearance.class) && (l.schema.appearance.class = l.schema.appearance.class.replace("f-form-layout", ""), l.schema.appearance.class = l.schema.appearance.class.replace("farris-form", ""), l.schema.appearance.class = l.schema.appearance.class.replace("farris-form-controls-inline", ""), l.schema.appearance.class = l.schema.appearance.class.replace("farris-form-auto", ""), l.schema.appearance.class = l.schema.appearance.class.trim().replace(" ", " "));
|
|
2657
2682
|
}
|
|
2658
|
-
function
|
|
2659
|
-
const { schema: l } = e,
|
|
2660
|
-
|
|
2683
|
+
function v() {
|
|
2684
|
+
const { schema: l } = e, s = l.binding && l.binding.field;
|
|
2685
|
+
s && (i(s), S(s)), g();
|
|
2661
2686
|
}
|
|
2662
2687
|
return {
|
|
2663
2688
|
canAccepts: o,
|
|
2664
|
-
checkCanDeleteComponent:
|
|
2665
|
-
checkCanMoveComponent:
|
|
2666
|
-
hideNestedPaddingInDesginerView:
|
|
2667
|
-
onRemoveComponent:
|
|
2689
|
+
checkCanDeleteComponent: n,
|
|
2690
|
+
checkCanMoveComponent: r,
|
|
2691
|
+
hideNestedPaddingInDesginerView: m,
|
|
2692
|
+
onRemoveComponent: v
|
|
2668
2693
|
};
|
|
2669
2694
|
}
|
|
2670
|
-
const
|
|
2695
|
+
const qn = /* @__PURE__ */ _({
|
|
2671
2696
|
name: "FFormGroupDesign",
|
|
2672
2697
|
props: Be,
|
|
2673
2698
|
emits: [],
|
|
2674
2699
|
setup(e, t) {
|
|
2675
|
-
const
|
|
2700
|
+
const r = M(), n = K("design-item-context"), o = K("designer-host-service"), m = Gn(n, o), i = Se(r, n, m);
|
|
2676
2701
|
return we(() => {
|
|
2677
|
-
|
|
2678
|
-
var
|
|
2679
|
-
let S =
|
|
2680
|
-
return S && Object.keys(S).length === 0 && ((
|
|
2702
|
+
r.value.componentInstance = i, i.value.getPropConfig = (...u) => {
|
|
2703
|
+
var g, v, l;
|
|
2704
|
+
let S = vr[e.editor.type];
|
|
2705
|
+
return S && Object.keys(S).length === 0 && ((g = r.value) != null && g.editorRef) && ((l = (v = r.value) == null ? void 0 : v.editorRef) != null && l.getPropConfig) && (S = r.value.editorRef.getPropConfig(...u, i.value)), S;
|
|
2681
2706
|
};
|
|
2682
|
-
}), t.expose(i.value), () => O(
|
|
2683
|
-
ref:
|
|
2707
|
+
}), t.expose(i.value), () => O(jn, me(e, {
|
|
2708
|
+
ref: r
|
|
2684
2709
|
}), null);
|
|
2685
2710
|
}
|
|
2686
|
-
}),
|
|
2711
|
+
}), bi = /* @__PURE__ */ _({
|
|
2687
2712
|
name: "FConditionFieldsDesign",
|
|
2688
2713
|
directives: {
|
|
2689
|
-
"area-response":
|
|
2714
|
+
"area-response": Qe
|
|
2690
2715
|
},
|
|
2691
|
-
props:
|
|
2716
|
+
props: pe,
|
|
2692
2717
|
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
2693
2718
|
setup(e, t) {
|
|
2694
|
-
const
|
|
2719
|
+
const r = M(), n = M(e.key), o = M(e.conditions), m = ge(e), {
|
|
2695
2720
|
fieldMap: i,
|
|
2696
|
-
loadFieldConfigs:
|
|
2697
|
-
} =
|
|
2698
|
-
resizeObserver:
|
|
2721
|
+
loadFieldConfigs: u
|
|
2722
|
+
} = m, S = Oe(e, t, r), {
|
|
2723
|
+
resizeObserver: g
|
|
2699
2724
|
} = S;
|
|
2700
|
-
|
|
2701
|
-
var
|
|
2702
|
-
(
|
|
2725
|
+
u(!0), ke(() => {
|
|
2726
|
+
var s;
|
|
2727
|
+
(s = g.value) == null || s.unobserve(r.value);
|
|
2703
2728
|
}), Y(() => e.conditions, () => {
|
|
2704
2729
|
o.value = e.conditions;
|
|
2705
2730
|
});
|
|
2706
|
-
const
|
|
2731
|
+
const v = W(() => ({
|
|
2707
2732
|
// row: true,
|
|
2708
2733
|
"f-utils-flex-row-wrap": !0,
|
|
2709
2734
|
"farris-form": !0,
|
|
2710
2735
|
"condition-div": !0
|
|
2711
2736
|
}));
|
|
2712
2737
|
function l() {
|
|
2713
|
-
return o.value.map((
|
|
2714
|
-
var
|
|
2715
|
-
const h = (
|
|
2738
|
+
return o.value.map((s) => {
|
|
2739
|
+
var f, E;
|
|
2740
|
+
const h = (f = i.get(s.fieldCode)) == null ? void 0 : f.editor;
|
|
2716
2741
|
h && (h.disabled = !0);
|
|
2717
|
-
let
|
|
2718
|
-
return h != null && h.multiLineLabel && (
|
|
2719
|
-
customClass:
|
|
2720
|
-
label: (h == null ? void 0 : h.showLabel) === !1 ? " " :
|
|
2742
|
+
let p = ((E = h == null ? void 0 : h.appearance) == null ? void 0 : E.class) || e.itemClass;
|
|
2743
|
+
return h != null && h.multiLineLabel && (p = p + " farris-group-multi-label"), O(qn, {
|
|
2744
|
+
customClass: p,
|
|
2745
|
+
label: (h == null ? void 0 : h.showLabel) === !1 ? " " : s.fieldName,
|
|
2721
2746
|
required: h == null ? void 0 : h.required,
|
|
2722
2747
|
editor: h,
|
|
2723
2748
|
type: "form-group"
|
|
@@ -2725,9 +2750,9 @@ const Gr = /* @__PURE__ */ _({
|
|
|
2725
2750
|
});
|
|
2726
2751
|
}
|
|
2727
2752
|
return () => ce(O("div", {
|
|
2728
|
-
class:
|
|
2729
|
-
key:
|
|
2730
|
-
ref:
|
|
2753
|
+
class: v.value,
|
|
2754
|
+
key: n.value,
|
|
2755
|
+
ref: r
|
|
2731
2756
|
}, [l()]), [[de("area-response")]]);
|
|
2732
2757
|
}
|
|
2733
2758
|
});
|
|
@@ -2735,33 +2760,33 @@ ae.install = (e) => {
|
|
|
2735
2760
|
e.component(be.name, be).component(ae.name, ae);
|
|
2736
2761
|
};
|
|
2737
2762
|
export {
|
|
2738
|
-
|
|
2763
|
+
yr as CheckBoxValue,
|
|
2739
2764
|
Ee as ComboListValue,
|
|
2740
|
-
|
|
2765
|
+
br as ComboLookupValue,
|
|
2741
2766
|
Ne as CompareType,
|
|
2742
|
-
|
|
2767
|
+
zr as CompareTypeInEditor,
|
|
2743
2768
|
oe as DatePickerValue,
|
|
2744
2769
|
fe as DateRangeValue,
|
|
2745
|
-
|
|
2746
|
-
|
|
2770
|
+
Er as DateTimePickerValue,
|
|
2771
|
+
Ar as EnumType,
|
|
2747
2772
|
be as FConditionFields,
|
|
2748
|
-
|
|
2773
|
+
bi as FConditionFieldsDesign,
|
|
2749
2774
|
ae as FConditionList,
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2775
|
+
Fr as InputGroupValue,
|
|
2776
|
+
Cr as LookupValue,
|
|
2777
|
+
Tr as MonthPickerValue,
|
|
2778
|
+
kr as MonthRangeValue,
|
|
2779
|
+
wr as NumberRangeValue,
|
|
2780
|
+
xr as NumberSpinnerValue,
|
|
2781
|
+
Vr as RadioGroupValue,
|
|
2757
2782
|
Ie as TextValue,
|
|
2758
2783
|
Me as ValueType,
|
|
2759
|
-
|
|
2760
|
-
|
|
2784
|
+
Sr as YearPickerValue,
|
|
2785
|
+
pe as conditionProps,
|
|
2761
2786
|
ae as default,
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2787
|
+
Ur as getCompareTypeName,
|
|
2788
|
+
Wr as useCompare,
|
|
2789
|
+
Zr as useCondition,
|
|
2765
2790
|
Pe as useConditionUtils,
|
|
2766
2791
|
Le as useConditionValue
|
|
2767
2792
|
};
|