@farris/ui-vue 1.6.5-beta.8 → 1.6.5
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 +334 -334
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +4 -4
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +136 -133
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/component/index.esm.js +300 -300
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +4 -4
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +295 -295
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3416 -3350
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +4 -4
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +170 -170
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +637 -637
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +699 -696
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +446 -446
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +377 -374
- package/components/filter-condition-editor/index.umd.cjs +2 -2
- package/components/flow-canvas/index.esm.js +204 -204
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +42 -40
- package/components/list-view/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +427 -427
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +212 -212
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +276 -276
- package/components/modal/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +160 -160
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +314 -314
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +468 -463
- package/components/order/index.umd.cjs +2 -2
- package/components/popover/index.esm.js +58 -56
- package/components/popover/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +215 -215
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4 -4
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +282 -282
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +944 -941
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +498 -492
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/search-box/index.esm.js +76 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +211 -211
- package/components/section/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +377 -374
- package/components/sort-condition-editor/index.umd.cjs +2 -2
- package/components/switch/index.esm.js +78 -77
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +579 -579
- package/components/tabs/index.umd.cjs +2 -2
- package/components/textarea/index.esm.js +362 -362
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +9799 -0
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/time-picker/package.json +8 -0
- package/components/time-picker/style.js +6 -0
- package/components/transfer/index.esm.js +81 -79
- package/components/transfer/index.umd.cjs +2 -2
- package/components/tree-grid/index.esm.js +100 -100
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2361 -2279
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/video/index.esm.js +219 -219
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +4856 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +254 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +382 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +15439 -0
- package/designer/data-grid/index.umd.cjs +23 -0
- package/designer/data-view/index.esm.js +854 -0
- package/designer/data-view/index.umd.cjs +38 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +525 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +22330 -0
- package/designer/farris-designer.all.umd.cjs +34 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +1098 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/list-view/index.css +1 -0
- package/designer/list-view/index.esm.js +4689 -0
- package/designer/list-view/index.umd.cjs +40 -0
- package/designer/radio-group/index.css +1 -0
- package/designer/radio-group/index.esm.js +6985 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +1099 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +9619 -9535
- package/farris.all.umd.cjs +24 -24
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
|
@@ -0,0 +1,1098 @@
|
|
|
1
|
+
import { useTextBoxDesign as ne, useClear as oe, withInstall as re } from "../../components/common/index.esm.js";
|
|
2
|
+
import { createPropsResolver as ie } from "../../components/dynamic-resolver/index.esm.js";
|
|
3
|
+
import ae, { inputGroupProps as se } from "../../components/input-group/index.esm.js";
|
|
4
|
+
import { ref as A, computed as E, watch as le, createVNode as N, defineComponent as ue, inject as Z, onMounted as ce } from "vue";
|
|
5
|
+
import { useDesignerComponent as de } from "../../components/designer-canvas/index.esm.js";
|
|
6
|
+
import { InputBaseProperty as pe } from "../../components/property-panel/index.esm.js";
|
|
7
|
+
import { cloneDeep as H, isPlainObject as L } from "lodash-es";
|
|
8
|
+
const fe = {
|
|
9
|
+
id: { Type: String, default: "" },
|
|
10
|
+
/** 是否自动完成 */
|
|
11
|
+
autocomplete: { Type: String, default: "off" },
|
|
12
|
+
/** 自定义CLASS */
|
|
13
|
+
customClass: { Type: String, default: "" },
|
|
14
|
+
/** 禁用 */
|
|
15
|
+
disabled: { Type: Boolean, default: !1 },
|
|
16
|
+
/** 允许编辑 */
|
|
17
|
+
editable: { Type: Boolean, default: !0 },
|
|
18
|
+
/** 启用清除按钮 */
|
|
19
|
+
enableClear: { Type: Boolean, default: !0 },
|
|
20
|
+
/** 启用提示文本 */
|
|
21
|
+
enableTitle: { Type: Boolean, default: !0 },
|
|
22
|
+
/** 启用密码 */
|
|
23
|
+
enableViewPassword: { Type: Boolean, default: !0 },
|
|
24
|
+
/** 始终显示占位符文本 */
|
|
25
|
+
forcePlaceholder: { Type: Boolean, default: !1 },
|
|
26
|
+
/** 扩展按钮 */
|
|
27
|
+
groupText: { Type: String, default: "" },
|
|
28
|
+
/** 密码模式 */
|
|
29
|
+
type: { Type: String, default: "text" },
|
|
30
|
+
/** 最大值 */
|
|
31
|
+
max: { type: [Number, String] },
|
|
32
|
+
/** 最小值 */
|
|
33
|
+
min: { type: [Number, String] },
|
|
34
|
+
/** 最大长度 */
|
|
35
|
+
maxLength: { Type: Number || void 0, default: void 0 },
|
|
36
|
+
/** 最小长度 */
|
|
37
|
+
minLength: { Type: Number || void 0, default: void 0 },
|
|
38
|
+
/** 组件值 */
|
|
39
|
+
modelValue: { Type: String || Boolean, default: "" },
|
|
40
|
+
/** 隐藏边线 */
|
|
41
|
+
showBorder: { Type: Boolean, default: !0 },
|
|
42
|
+
/** 步长 */
|
|
43
|
+
step: { Type: Number, default: 1 },
|
|
44
|
+
/** 启用提示信息 */
|
|
45
|
+
placeholder: { Type: String, default: "" },
|
|
46
|
+
precision: { Type: Number, default: 0 },
|
|
47
|
+
/** 只读 */
|
|
48
|
+
readonly: { Type: Boolean, default: !1 },
|
|
49
|
+
/** 当组件禁用或只读时显示后边的按钮 */
|
|
50
|
+
showButtonWhenDisabled: { Type: Boolean, default: !1 },
|
|
51
|
+
/** tab索引 */
|
|
52
|
+
tabIndex: { Type: Number, default: 0 },
|
|
53
|
+
/** 文本在输入框中的对齐方式 */
|
|
54
|
+
textAlign: { Type: String, default: "left" },
|
|
55
|
+
/** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
|
|
56
|
+
useExtendInfo: { Type: Boolean, default: !1 },
|
|
57
|
+
/** 前置扩展信息 */
|
|
58
|
+
extendInfo: { Type: String, default: "" },
|
|
59
|
+
/** 输入值 */
|
|
60
|
+
value: { Type: String, default: "" },
|
|
61
|
+
/** 是否撑开高度 */
|
|
62
|
+
autoHeight: { type: Boolean, default: !1 },
|
|
63
|
+
/** 自动聚焦 */
|
|
64
|
+
autofocus: { type: Boolean, default: !1 },
|
|
65
|
+
/** 文本区域可见的行数 */
|
|
66
|
+
rows: { type: Number, default: 2 },
|
|
67
|
+
/** 展示输入文本数量 */
|
|
68
|
+
showCount: { type: Boolean, default: !1 },
|
|
69
|
+
showZero: { type: Boolean, default: !1 },
|
|
70
|
+
/**
|
|
71
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
72
|
+
*/
|
|
73
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
74
|
+
/**
|
|
75
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
76
|
+
*/
|
|
77
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
78
|
+
/**
|
|
79
|
+
* modelValue 更新时机, 默认 blur; 可选值:blur | input
|
|
80
|
+
* - blur: 离开焦点时更新
|
|
81
|
+
* - change: 输入时更新
|
|
82
|
+
*/
|
|
83
|
+
updateOn: { type: String, default: "blur" },
|
|
84
|
+
formatValidation: { type: Object, default: {} },
|
|
85
|
+
/**
|
|
86
|
+
* 是否启用快捷键
|
|
87
|
+
*/
|
|
88
|
+
keyboard: { type: Boolean, default: !0 }
|
|
89
|
+
};
|
|
90
|
+
function me(e, t) {
|
|
91
|
+
const n = A(e.groupText), r = E(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), p = E(() => e.type === "password" || e.enableClear || !!e.groupText || r.value);
|
|
92
|
+
return { appendedButtonClass: E(() => ({
|
|
93
|
+
"input-group-append": !0,
|
|
94
|
+
"append-force-show": r.value
|
|
95
|
+
})), appendedContent: n, shouldShowAppendedButton: p };
|
|
96
|
+
}
|
|
97
|
+
function ge(e, t, n, r) {
|
|
98
|
+
const { appendedContent: p } = r, b = A(e.enableViewPassword), C = E(() => e.type === "password"), P = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', S = '<span class="f-icon f-icon-eye"></span>', c = A(!1);
|
|
99
|
+
le(() => [e.readonly, e.disabled], ([s, d]) => {
|
|
100
|
+
C.value && (n.value = s || d ? "password" : n.value, p.value = s || d ? S : p.value);
|
|
101
|
+
});
|
|
102
|
+
function m() {
|
|
103
|
+
return c.value = !c.value, n.value = c.value ? "text" : "password", p.value = c.value ? P : S, !1;
|
|
104
|
+
}
|
|
105
|
+
function a() {
|
|
106
|
+
n.value = C.value ? "password" : "text", p.value = C.value ? b.value ? S : "" : p.value;
|
|
107
|
+
}
|
|
108
|
+
return a(), { isPassword: C, onClickAppendedButton: m };
|
|
109
|
+
}
|
|
110
|
+
function ve(e, t, n, r, p) {
|
|
111
|
+
const {
|
|
112
|
+
appendedButtonClass: b,
|
|
113
|
+
appendedContent: C
|
|
114
|
+
} = n, P = E(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), S = E(() => C.value && !t.slots.groupTextTemplate), c = E(() => !!t.slots.groupTextTemplate), {
|
|
115
|
+
clearButtonClass: m,
|
|
116
|
+
clearButtonStyle: a,
|
|
117
|
+
onClearValue: s,
|
|
118
|
+
shouldShowClearButton: d
|
|
119
|
+
} = r;
|
|
120
|
+
function o() {
|
|
121
|
+
return N("span", {
|
|
122
|
+
id: "clearIcon",
|
|
123
|
+
class: m.value,
|
|
124
|
+
style: a.value,
|
|
125
|
+
onClick: (v) => s(v)
|
|
126
|
+
}, [N("i", {
|
|
127
|
+
class: "f-icon modal_close"
|
|
128
|
+
}, null)]);
|
|
129
|
+
}
|
|
130
|
+
function i(v) {
|
|
131
|
+
t.emit("iconMouseEnter", v);
|
|
132
|
+
}
|
|
133
|
+
function l(v) {
|
|
134
|
+
t.emit("iconMouseLeave", v);
|
|
135
|
+
}
|
|
136
|
+
function f(v) {
|
|
137
|
+
P.value && t.emit("clickHandle", {
|
|
138
|
+
originalEvent: v
|
|
139
|
+
}), v.stopPropagation();
|
|
140
|
+
}
|
|
141
|
+
const g = e.type === "password" ? p.onClickAppendedButton : f;
|
|
142
|
+
function T() {
|
|
143
|
+
return N("span", {
|
|
144
|
+
class: "input-group-text",
|
|
145
|
+
onMouseenter: (v) => i(v),
|
|
146
|
+
onMouseleave: (v) => l(v),
|
|
147
|
+
innerHTML: C.value,
|
|
148
|
+
onClick: (v) => g(v)
|
|
149
|
+
}, null);
|
|
150
|
+
}
|
|
151
|
+
function h() {
|
|
152
|
+
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
|
|
153
|
+
}
|
|
154
|
+
function w() {
|
|
155
|
+
return S.value ? T : c.value ? h : "";
|
|
156
|
+
}
|
|
157
|
+
const y = w();
|
|
158
|
+
return () => N("div", {
|
|
159
|
+
class: b.value
|
|
160
|
+
}, [d.value && o(), y && y()]);
|
|
161
|
+
}
|
|
162
|
+
const q = [
|
|
163
|
+
{ key: "none", value: "无" },
|
|
164
|
+
{ key: "cellNumber", value: "手机号" },
|
|
165
|
+
{ key: "tel", value: "座机号/传真号" },
|
|
166
|
+
{ key: "telOrCell", value: "手机号/座机号/传真号" },
|
|
167
|
+
{ key: "postCode", value: "邮编" },
|
|
168
|
+
{ key: "email", value: "电子邮箱" },
|
|
169
|
+
{ key: "idCode", value: "身份证号" },
|
|
170
|
+
{ key: "carCode", value: "车牌号" },
|
|
171
|
+
{ key: "subjectCode", value: "10位数字会计科目代码" },
|
|
172
|
+
{ key: "custom", value: "自定义" }
|
|
173
|
+
];
|
|
174
|
+
function be(e) {
|
|
175
|
+
switch (e) {
|
|
176
|
+
case "none":
|
|
177
|
+
return "";
|
|
178
|
+
case "cellNumber":
|
|
179
|
+
return "^1[0-9]{10}$";
|
|
180
|
+
case "tel":
|
|
181
|
+
return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$";
|
|
182
|
+
case "telOrCell":
|
|
183
|
+
return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$";
|
|
184
|
+
case "postCode":
|
|
185
|
+
return "^[1-9]\\d{5}(?!\\d)$";
|
|
186
|
+
case "workCode":
|
|
187
|
+
return "^\\d{8}$";
|
|
188
|
+
case "email":
|
|
189
|
+
return "^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$";
|
|
190
|
+
case "idCode":
|
|
191
|
+
return "^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$";
|
|
192
|
+
case "carCode":
|
|
193
|
+
return "^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][·\\s]?[A-HJ-NP-Z0-9]{4,5}[挂学警港澳]?|粤[Z港澳][·\\s]?[港澳][0-9A-HJ-NP-Z]{4}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?([DF][0-9A-HJ-NP-Z][0-9]{4}|[0-9]{5}[DF])[挂港澳]?|[使领][0-9]{3}[·\\s]?[0-9]{3}|临[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?[0-9A-Z]{4,5}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z]?[·\\s]?警[0-9A-Z]{4}|[军海空][A-Z][·\\s]?[0-9]{4,5}|WJ(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]|\\d{2})[·\\s]?[0-9A-Z]{4,5})$";
|
|
194
|
+
case "carCodeNew":
|
|
195
|
+
return "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$";
|
|
196
|
+
case "subjectCode":
|
|
197
|
+
return "^\\d{10}$";
|
|
198
|
+
}
|
|
199
|
+
return "";
|
|
200
|
+
}
|
|
201
|
+
function ye(e) {
|
|
202
|
+
var t;
|
|
203
|
+
return "请输入正确的" + ((t = q.find((n) => n.key === e)) == null ? void 0 : t.value);
|
|
204
|
+
}
|
|
205
|
+
const Ce = {
|
|
206
|
+
convertTo: (e, t, n, r) => {
|
|
207
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = n, e.editor.formatValidation.expression = be(n), e.editor.formatValidation.message = ye(n);
|
|
208
|
+
},
|
|
209
|
+
convertFrom: (e, t, n) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
|
|
210
|
+
}, z = {
|
|
211
|
+
convertTo: (e, t, n, r) => {
|
|
212
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = n;
|
|
213
|
+
},
|
|
214
|
+
convertFrom: (e, t, n) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
|
|
215
|
+
};
|
|
216
|
+
class Te extends pe {
|
|
217
|
+
constructor(t, n) {
|
|
218
|
+
super(t, n);
|
|
219
|
+
}
|
|
220
|
+
getPropertyConfig(t, n) {
|
|
221
|
+
return super.getPropertyConfig(t, n), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
|
|
222
|
+
}
|
|
223
|
+
getEditorProperties(t) {
|
|
224
|
+
var r, p;
|
|
225
|
+
let n;
|
|
226
|
+
if (((r = t == null ? void 0 : t.binding) == null ? void 0 : r.type) === "Form") {
|
|
227
|
+
const b = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
228
|
+
(p = b == null ? void 0 : b.schemaField) != null && p.type && (n = b.schemaField.type.length);
|
|
229
|
+
}
|
|
230
|
+
return this.getComponentConfig(t, {}, {
|
|
231
|
+
maxLength: {
|
|
232
|
+
description: "文本字数最大长度",
|
|
233
|
+
title: "最大长度",
|
|
234
|
+
type: "number",
|
|
235
|
+
editor: {
|
|
236
|
+
nullable: !0,
|
|
237
|
+
min: 0,
|
|
238
|
+
useThousands: !1,
|
|
239
|
+
max: n
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
enableViewPassword: {
|
|
243
|
+
description: "",
|
|
244
|
+
title: "启用密码",
|
|
245
|
+
visible: !1,
|
|
246
|
+
type: "boolean"
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
getFormatValidation(t) {
|
|
251
|
+
var r, p, b;
|
|
252
|
+
const n = {
|
|
253
|
+
title: "输入格式校验",
|
|
254
|
+
description: "输入格式校验",
|
|
255
|
+
properties: {
|
|
256
|
+
type: {
|
|
257
|
+
title: "输入类型",
|
|
258
|
+
type: "enum",
|
|
259
|
+
description: "输入类型",
|
|
260
|
+
defaultValue: "",
|
|
261
|
+
editor: {
|
|
262
|
+
type: "combo-list",
|
|
263
|
+
textField: "value",
|
|
264
|
+
valueField: "key",
|
|
265
|
+
idField: "key",
|
|
266
|
+
editable: !1,
|
|
267
|
+
data: q
|
|
268
|
+
},
|
|
269
|
+
refreshPanelAfterChanged: !0,
|
|
270
|
+
$converter: Ce,
|
|
271
|
+
parentPropertyID: "formatValidation"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
return (r = t.editor.formatValidation) != null && r.type && ((p = t.editor.formatValidation) == null ? void 0 : p.type) !== "none" && (n.properties.message = {
|
|
276
|
+
title: "输入错误提示",
|
|
277
|
+
type: "string",
|
|
278
|
+
description: "输入错误提示",
|
|
279
|
+
$converter: z,
|
|
280
|
+
parentPropertyID: "formatValidation"
|
|
281
|
+
}), ((b = t.editor.formatValidation) == null ? void 0 : b.type) === "custom" && (n.properties.expression = {
|
|
282
|
+
title: "匹配正则",
|
|
283
|
+
type: "string",
|
|
284
|
+
description: "匹配正则",
|
|
285
|
+
$converter: z,
|
|
286
|
+
parentPropertyID: "formatValidation"
|
|
287
|
+
}), n;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function Se(e, t) {
|
|
291
|
+
const n = e.schema;
|
|
292
|
+
function r(p, b) {
|
|
293
|
+
return new Te(p, t).getPropertyConfig(n, b);
|
|
294
|
+
}
|
|
295
|
+
return { getPropsConfig: r };
|
|
296
|
+
}
|
|
297
|
+
const V = /* @__PURE__ */ ue({
|
|
298
|
+
name: "FInputGroupDesign",
|
|
299
|
+
props: fe,
|
|
300
|
+
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
301
|
+
setup(e, t) {
|
|
302
|
+
const n = A(e.modelValue), r = A(e.modelValue), p = ne(e, t, n, r), {
|
|
303
|
+
inputGroupClass: b,
|
|
304
|
+
inputType: C,
|
|
305
|
+
inputGroupStyle: P
|
|
306
|
+
} = p, S = me(e), {
|
|
307
|
+
shouldShowAppendedButton: c
|
|
308
|
+
} = S, m = oe(e, t, p), {
|
|
309
|
+
onMouseEnter: a,
|
|
310
|
+
onMouseLeave: s
|
|
311
|
+
} = m, d = ge(e, t, C, S), o = A(), i = Z("designer-host-service"), l = Z("design-item-context"), f = Se(l, i), g = de(o, l, f);
|
|
312
|
+
ce(() => {
|
|
313
|
+
o.value.componentInstance = g;
|
|
314
|
+
}), t.expose(g.value);
|
|
315
|
+
const T = ve(e, t, S, m, d), h = A();
|
|
316
|
+
return () => N("div", {
|
|
317
|
+
id: "inputGroup",
|
|
318
|
+
ref: o,
|
|
319
|
+
class: b.value,
|
|
320
|
+
style: P.value,
|
|
321
|
+
onMouseenter: a,
|
|
322
|
+
onMouseleave: s
|
|
323
|
+
}, [N("input", {
|
|
324
|
+
ref: h,
|
|
325
|
+
class: "form-control",
|
|
326
|
+
readonly: !0,
|
|
327
|
+
placeholder: e.placeholder
|
|
328
|
+
}, null), c.value && T()]);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
function W(e, t) {
|
|
332
|
+
let n;
|
|
333
|
+
function r(a) {
|
|
334
|
+
const { properties: s, title: d, ignore: o } = a, i = o && Array.isArray(o), l = Object.keys(s).reduce((f, g) => ((!i || !o.find((T) => T === g)) && (f[g] = s[g].type === "object" && s[g].properties ? r(s[g]) : H(s[g].default)), f), {});
|
|
335
|
+
if (d && (!i || !o.find((f) => f === "id"))) {
|
|
336
|
+
const f = d.toLowerCase().replace(/-/g, "_");
|
|
337
|
+
l.id = `${f}_${Math.random().toString().slice(2, 6)}`;
|
|
338
|
+
}
|
|
339
|
+
return l;
|
|
340
|
+
}
|
|
341
|
+
function p(a) {
|
|
342
|
+
const { properties: s, title: d, required: o } = a;
|
|
343
|
+
if (o && Array.isArray(o)) {
|
|
344
|
+
const i = o.reduce((l, f) => (l[f] = s[f].type === "object" && s[f].properties ? r(s[f]) : H(s[f].default), l), {});
|
|
345
|
+
if (d && o.find((l) => l === "id")) {
|
|
346
|
+
const l = d.toLowerCase().replace(/-/g, "_");
|
|
347
|
+
i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
348
|
+
}
|
|
349
|
+
return i;
|
|
350
|
+
}
|
|
351
|
+
return {
|
|
352
|
+
type: d
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function b(a, s = {}, d) {
|
|
356
|
+
const o = e[a];
|
|
357
|
+
if (o) {
|
|
358
|
+
let i = p(o);
|
|
359
|
+
const l = t[a];
|
|
360
|
+
return i = l ? l({ getSchemaByType: b }, i, s, d) : i, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(i), i;
|
|
361
|
+
}
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
function C(a, s) {
|
|
365
|
+
const d = r(s);
|
|
366
|
+
return Object.keys(d).reduce((o, i) => (Object.prototype.hasOwnProperty.call(a, i) && (o[i] && L(o[i]) && L(a[i] || !a[i]) ? Object.assign(o[i], a[i] || {}) : o[i] = a[i]), o), d), d;
|
|
367
|
+
}
|
|
368
|
+
function P(a, s) {
|
|
369
|
+
return Object.keys(a).filter((o) => a[o] != null).reduce((o, i) => {
|
|
370
|
+
if (s.has(i)) {
|
|
371
|
+
const l = s.get(i);
|
|
372
|
+
if (typeof l == "string")
|
|
373
|
+
o[l] = a[i];
|
|
374
|
+
else {
|
|
375
|
+
const f = l(i, a[i], a);
|
|
376
|
+
Object.assign(o, f);
|
|
377
|
+
}
|
|
378
|
+
} else
|
|
379
|
+
o[i] = a[i];
|
|
380
|
+
return o;
|
|
381
|
+
}, {});
|
|
382
|
+
}
|
|
383
|
+
function S(a, s, d = /* @__PURE__ */ new Map()) {
|
|
384
|
+
const o = C(a, s);
|
|
385
|
+
return P(o, d);
|
|
386
|
+
}
|
|
387
|
+
function c(a) {
|
|
388
|
+
var d;
|
|
389
|
+
const s = a.type;
|
|
390
|
+
if (s) {
|
|
391
|
+
const o = e[s];
|
|
392
|
+
if (!o)
|
|
393
|
+
return a;
|
|
394
|
+
const i = C(a, o), l = ((d = a.editor) == null ? void 0 : d.type) || "";
|
|
395
|
+
if (l) {
|
|
396
|
+
const f = e[l], g = C(a.editor, f);
|
|
397
|
+
i.editor = g;
|
|
398
|
+
}
|
|
399
|
+
return i;
|
|
400
|
+
}
|
|
401
|
+
return a;
|
|
402
|
+
}
|
|
403
|
+
function m(a) {
|
|
404
|
+
n = a;
|
|
405
|
+
}
|
|
406
|
+
return { getSchemaByType: b, resolveSchemaWithDefaultValue: c, resolveSchemaToProps: S, mappingSchemaToProps: P, setDesignerContext: m };
|
|
407
|
+
}
|
|
408
|
+
const he = {}, we = {}, { getSchemaByType: Tt, resolveSchemaWithDefaultValue: Fe, resolveSchemaToProps: St, mappingSchemaToProps: ht, setDesignerContext: wt } = W(he, we);
|
|
409
|
+
function Pe(e = {}) {
|
|
410
|
+
function t(c, m, a, s) {
|
|
411
|
+
if (typeof a == "number")
|
|
412
|
+
return s[c].length === a;
|
|
413
|
+
if (typeof a == "object") {
|
|
414
|
+
const d = Object.keys(a)[0], o = a[d];
|
|
415
|
+
if (d === "not")
|
|
416
|
+
return Number(s[c].length) !== Number(o);
|
|
417
|
+
if (d === "moreThan")
|
|
418
|
+
return Number(s[c].length) >= Number(o);
|
|
419
|
+
if (d === "lessThan")
|
|
420
|
+
return Number(s[c].length) <= Number(o);
|
|
421
|
+
}
|
|
422
|
+
return !1;
|
|
423
|
+
}
|
|
424
|
+
function n(c, m, a, s) {
|
|
425
|
+
return s[c] && s[c].propertyValue && String(s[c].propertyValue.value) === String(a);
|
|
426
|
+
}
|
|
427
|
+
const r = /* @__PURE__ */ new Map([
|
|
428
|
+
["length", t],
|
|
429
|
+
["getProperty", n]
|
|
430
|
+
]);
|
|
431
|
+
Object.keys(e).reduce((c, m) => (c.set(m, e[m]), c), r);
|
|
432
|
+
function p(c, m) {
|
|
433
|
+
const a = c;
|
|
434
|
+
return typeof m == "number" ? [{ target: a, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: a, operator: "getProperty", param: c, value: !!m }] : typeof m == "object" ? Object.keys(m).map((s) => {
|
|
435
|
+
if (s === "length")
|
|
436
|
+
return { target: a, operator: "length", param: null, value: m[s] };
|
|
437
|
+
const d = s, o = m[s];
|
|
438
|
+
return { target: a, operator: "getProperty", param: d, value: o };
|
|
439
|
+
}) : [];
|
|
440
|
+
}
|
|
441
|
+
function b(c) {
|
|
442
|
+
return Object.keys(c).reduce((a, s) => {
|
|
443
|
+
const d = p(s, c[s]);
|
|
444
|
+
return a.push(...d), a;
|
|
445
|
+
}, []);
|
|
446
|
+
}
|
|
447
|
+
function C(c, m) {
|
|
448
|
+
if (r.has(c.operator)) {
|
|
449
|
+
const a = r.get(c.operator);
|
|
450
|
+
return a && a(c.target, c.param, c.value, m) || !1;
|
|
451
|
+
}
|
|
452
|
+
return !1;
|
|
453
|
+
}
|
|
454
|
+
function P(c, m) {
|
|
455
|
+
return b(c).reduce((d, o) => d && C(o, m), !0);
|
|
456
|
+
}
|
|
457
|
+
function S(c, m) {
|
|
458
|
+
const a = Object.keys(c), s = a.includes("allOf"), d = a.includes("anyOf"), o = s || d, f = (o ? c[o ? s ? "allOf" : "anyOf" : "allOf"] : [c]).map((T) => P(T, m));
|
|
459
|
+
return s ? !f.includes(!1) : f.includes(!0);
|
|
460
|
+
}
|
|
461
|
+
return { parseValueSchema: S };
|
|
462
|
+
}
|
|
463
|
+
const xe = {
|
|
464
|
+
convertTo: (e, t, n, r) => {
|
|
465
|
+
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
466
|
+
},
|
|
467
|
+
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
468
|
+
}, Be = {
|
|
469
|
+
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
470
|
+
}, ke = {
|
|
471
|
+
convertTo: (e, t, n, r) => {
|
|
472
|
+
e.editor && (e.editor[t] = n);
|
|
473
|
+
},
|
|
474
|
+
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
475
|
+
}, Oe = {
|
|
476
|
+
button: { type: "button", name: "按钮" },
|
|
477
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
478
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
479
|
+
"content-container": { type: "content-container", name: "容器" },
|
|
480
|
+
"input-group": { type: "input-group", name: "文本" },
|
|
481
|
+
textarea: { type: "textarea", name: "多行文本" },
|
|
482
|
+
lookup: { type: "lookup", name: "帮助" },
|
|
483
|
+
"number-spinner": { type: "number-spinner", name: "数值" },
|
|
484
|
+
"date-picker": { type: "date-picker", name: "日期" },
|
|
485
|
+
switch: { type: "switch", name: "开关" },
|
|
486
|
+
"radio-group": { type: "radio-group", name: "单选组" },
|
|
487
|
+
"check-box": { type: "check-box", name: "复选框" },
|
|
488
|
+
"check-group": { type: "check-group", name: "复选框组" },
|
|
489
|
+
"combo-list": { type: "combo-list", name: "下拉列表" },
|
|
490
|
+
"response-form": { type: "response-form", name: "卡片面板" },
|
|
491
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
|
|
492
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
|
|
493
|
+
"tree-grid": { type: "tree-grid", name: "树表格" },
|
|
494
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
495
|
+
"data-grid": { type: "data-grid", name: "表格" },
|
|
496
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
497
|
+
module: { type: "Module", name: "模块" },
|
|
498
|
+
component: { type: "component", name: "组件" },
|
|
499
|
+
tabs: { type: "tabs", name: "标签页" },
|
|
500
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
501
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
502
|
+
"html-template": { type: "html-template", name: "模板容器" },
|
|
503
|
+
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
504
|
+
section: { type: "section", name: "分组面板" },
|
|
505
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
506
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
507
|
+
splitter: { type: "splitter", name: "分栏面板" },
|
|
508
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
509
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
510
|
+
uploader: { type: "uploader", name: "附件上传" },
|
|
511
|
+
"page-header": { type: "page-header", name: "页头" },
|
|
512
|
+
"page-footer": { type: "page-footer", name: "页脚" },
|
|
513
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
514
|
+
fieldset: { type: "fieldset", name: "分组" },
|
|
515
|
+
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
516
|
+
drawer: { type: "drawer", name: "抽屉" },
|
|
517
|
+
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
518
|
+
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
519
|
+
"list-view": { type: "list-view", name: "列表" },
|
|
520
|
+
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
521
|
+
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
522
|
+
}, Ae = {
|
|
523
|
+
convertFrom: (e, t, n) => {
|
|
524
|
+
var p;
|
|
525
|
+
const r = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
526
|
+
return ((p = Oe[r]) == null ? void 0 : p.name) || r;
|
|
527
|
+
}
|
|
528
|
+
}, Ee = {
|
|
529
|
+
convertTo: (e, t, n, r) => {
|
|
530
|
+
e[t] = e[t];
|
|
531
|
+
},
|
|
532
|
+
convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
|
|
533
|
+
}, Me = {
|
|
534
|
+
convertTo: (e, t, n, r) => {
|
|
535
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
|
|
536
|
+
[t]: n
|
|
537
|
+
});
|
|
538
|
+
},
|
|
539
|
+
convertFrom: (e, t, n) => {
|
|
540
|
+
if (e.formatter) {
|
|
541
|
+
if (t === "trueText")
|
|
542
|
+
return e.formatter.trueText;
|
|
543
|
+
if (t === "falseText")
|
|
544
|
+
return e.formatter.falseText;
|
|
545
|
+
if (t === "prefix")
|
|
546
|
+
return e.formatter.prefix;
|
|
547
|
+
if (t === "suffix")
|
|
548
|
+
return e.formatter.suffix;
|
|
549
|
+
if (t === "precision")
|
|
550
|
+
return e.formatter.precision;
|
|
551
|
+
if (t === "decimal")
|
|
552
|
+
return e.formatter.decimal;
|
|
553
|
+
if (t === "thousand")
|
|
554
|
+
return e.formatter.thousand;
|
|
555
|
+
if (t === "dateFormat")
|
|
556
|
+
return e.formatter.dateFormat || "yyyy-MM-dd";
|
|
557
|
+
if (t === "customFormat")
|
|
558
|
+
return e.formatter.customFormat;
|
|
559
|
+
if (t === "type")
|
|
560
|
+
return e.formatter.type || "none";
|
|
561
|
+
}
|
|
562
|
+
return "none";
|
|
563
|
+
}
|
|
564
|
+
}, $e = {
|
|
565
|
+
convertTo: (e, t, n, r) => {
|
|
566
|
+
e.command ? e.command[t] = n : e.command = {
|
|
567
|
+
[t]: n
|
|
568
|
+
}, t === "enable" && n && (e.command.commands || (e.command.commands = [
|
|
569
|
+
{
|
|
570
|
+
text: "编辑",
|
|
571
|
+
type: "primary",
|
|
572
|
+
command: "edit"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
text: "删除",
|
|
576
|
+
type: "danger",
|
|
577
|
+
command: "remove"
|
|
578
|
+
}
|
|
579
|
+
]));
|
|
580
|
+
},
|
|
581
|
+
convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : ""
|
|
582
|
+
}, Ne = {
|
|
583
|
+
convertTo: (e, t, n, r) => {
|
|
584
|
+
e.column ? e.column[t] = n : e.column = {
|
|
585
|
+
[t]: n
|
|
586
|
+
}, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
587
|
+
},
|
|
588
|
+
convertFrom: (e, t, n) => {
|
|
589
|
+
if (e.column) {
|
|
590
|
+
if (t === "fitColumns")
|
|
591
|
+
return e.column.fitColumns;
|
|
592
|
+
if (t === "fitMode")
|
|
593
|
+
return e.column.fitMode;
|
|
594
|
+
}
|
|
595
|
+
return "";
|
|
596
|
+
}
|
|
597
|
+
}, je = {
|
|
598
|
+
convertTo: (e, t, n, r) => {
|
|
599
|
+
e.summary ? e.summary[t] = n : e.summary = {
|
|
600
|
+
[t]: n
|
|
601
|
+
}, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
602
|
+
enable: n,
|
|
603
|
+
groupFields: []
|
|
604
|
+
});
|
|
605
|
+
},
|
|
606
|
+
convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
607
|
+
}, De = {
|
|
608
|
+
convertTo: (e, t, n, r) => {
|
|
609
|
+
e.group ? e.group[t] = n : e.group = {
|
|
610
|
+
[t]: n
|
|
611
|
+
}, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
612
|
+
enable: n,
|
|
613
|
+
groupFields: [],
|
|
614
|
+
showSummary: !1
|
|
615
|
+
});
|
|
616
|
+
},
|
|
617
|
+
convertFrom: (e, t, n) => {
|
|
618
|
+
if (e.group) {
|
|
619
|
+
if (t === "enable")
|
|
620
|
+
return e.group.enable;
|
|
621
|
+
if (t === "showSummary")
|
|
622
|
+
return e.group.showSummary;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}, Ve = {
|
|
626
|
+
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
627
|
+
convertTo: (e, t, n) => {
|
|
628
|
+
if (n && n.length > 0) {
|
|
629
|
+
const r = n[0];
|
|
630
|
+
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = r.bindingField, e.binding.field = r.id, e.binding.fullPath = r.path, e.path = r.bindingPath;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}, Ie = {
|
|
634
|
+
convertTo: (e, t, n, r) => {
|
|
635
|
+
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
636
|
+
},
|
|
637
|
+
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
638
|
+
}, Re = {
|
|
639
|
+
convertTo: (e, t, n, r) => {
|
|
640
|
+
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
641
|
+
},
|
|
642
|
+
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
643
|
+
}, Ge = {
|
|
644
|
+
convertTo: (e, t, n, r) => {
|
|
645
|
+
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
646
|
+
},
|
|
647
|
+
convertFrom: (e, t, n) => {
|
|
648
|
+
var r, p;
|
|
649
|
+
return t === "showCheckbox" ? (r = e.selection) != null && r.multiSelect ? !0 : (p = e.selection) == null ? void 0 : p.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
650
|
+
}
|
|
651
|
+
}, Ze = {
|
|
652
|
+
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
653
|
+
}, He = {
|
|
654
|
+
convertFrom: (e, t) => e[t] || "",
|
|
655
|
+
convertTo: (e, t, n) => {
|
|
656
|
+
e[t] = n;
|
|
657
|
+
}
|
|
658
|
+
}, Le = {
|
|
659
|
+
convertTo: (e, t, n, r) => {
|
|
660
|
+
e.size || (e.size = {}), e.size[t] = n;
|
|
661
|
+
},
|
|
662
|
+
convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
|
|
663
|
+
}, ze = {
|
|
664
|
+
convertFrom: (e, t, n) => {
|
|
665
|
+
var r, p;
|
|
666
|
+
return (r = e.formatter) != null && r.data && t === "formatterEnumData" && !e.formatterEnumData ? (p = e.formatter) == null ? void 0 : p.data : e.formatterEnumData;
|
|
667
|
+
}
|
|
668
|
+
}, qe = {
|
|
669
|
+
convertTo: (e, t, n, r) => {
|
|
670
|
+
e.sort || (e.sort = {}), e.sort[t] = n;
|
|
671
|
+
},
|
|
672
|
+
convertFrom: (e, t, n) => {
|
|
673
|
+
var r, p;
|
|
674
|
+
if (t === "mode")
|
|
675
|
+
return ((r = e.sort) == null ? void 0 : r.mode) || "client";
|
|
676
|
+
if (t === "multiSort")
|
|
677
|
+
return !!((p = e.sort) != null && p.multiSort);
|
|
678
|
+
}
|
|
679
|
+
}, We = {
|
|
680
|
+
convertTo: (e, t, n, r) => {
|
|
681
|
+
e.filter || (e.filter = {}), e.filter[t] = n;
|
|
682
|
+
},
|
|
683
|
+
convertFrom: (e, t, n) => {
|
|
684
|
+
var r;
|
|
685
|
+
if (t === "mode")
|
|
686
|
+
return ((r = e.filter) == null ? void 0 : r.mode) || "client";
|
|
687
|
+
}
|
|
688
|
+
}, _e = {
|
|
689
|
+
convertTo: (e, t, n, r) => {
|
|
690
|
+
e.rowOption ? e.rowOption[t] = n : e.rowOption = {
|
|
691
|
+
[t]: n
|
|
692
|
+
};
|
|
693
|
+
},
|
|
694
|
+
convertFrom: (e, t, n) => {
|
|
695
|
+
if (e.rowOption) {
|
|
696
|
+
if (t === "customRowStyle")
|
|
697
|
+
return e.rowOption.customRowStyle;
|
|
698
|
+
if (t === "customCellStyle")
|
|
699
|
+
return e.rowOption.customCellStyle;
|
|
700
|
+
}
|
|
701
|
+
return "";
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
function _(e, t, n) {
|
|
705
|
+
const r = /* @__PURE__ */ new Map([
|
|
706
|
+
["/converter/appearance.converter", xe],
|
|
707
|
+
["/converter/buttons.converter", Be],
|
|
708
|
+
["/converter/property-editor.converter", ke],
|
|
709
|
+
["/converter/items-count.converter", Ze],
|
|
710
|
+
["/converter/type.converter", Ae],
|
|
711
|
+
["/converter/change-editor.converter", Ee],
|
|
712
|
+
["/converter/change-formatter.converter", Me],
|
|
713
|
+
["/converter/column-command.converter", $e],
|
|
714
|
+
["/converter/column-option.converter", Ne],
|
|
715
|
+
["/converter/summary.converter", je],
|
|
716
|
+
["/converter/group.converter", De],
|
|
717
|
+
["/converter/form-group-label.converter", He],
|
|
718
|
+
["/converter/field-selector.converter", Ve],
|
|
719
|
+
["/converter/pagination.converter", Ie],
|
|
720
|
+
["/converter/row-number.converter", Re],
|
|
721
|
+
["/converter/grid-selection.converter", Ge],
|
|
722
|
+
["/converter/size.converter", Le],
|
|
723
|
+
["/converter/change-formatter-enum.converter", ze],
|
|
724
|
+
["/converter/grid-sort.converter", qe],
|
|
725
|
+
["/converter/grid-filter.converter", We],
|
|
726
|
+
["/converter/row-option.converter", _e]
|
|
727
|
+
]), p = /* @__PURE__ */ new Map([
|
|
728
|
+
["string", { type: "input-group", enableClear: !1 }],
|
|
729
|
+
["boolean", {
|
|
730
|
+
type: "combo-list",
|
|
731
|
+
textField: "name",
|
|
732
|
+
valueField: "value",
|
|
733
|
+
idField: "value",
|
|
734
|
+
enableClear: !1,
|
|
735
|
+
editable: !1,
|
|
736
|
+
data: [
|
|
737
|
+
{
|
|
738
|
+
value: !0,
|
|
739
|
+
name: "是"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
value: !1,
|
|
743
|
+
name: "否"
|
|
744
|
+
}
|
|
745
|
+
]
|
|
746
|
+
}],
|
|
747
|
+
["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }],
|
|
748
|
+
["array", { type: "button-edit" }],
|
|
749
|
+
["number", { type: "number-spinner", placeholder: "" }],
|
|
750
|
+
["events-editor", { type: "events-editor", hide: !0 }]
|
|
751
|
+
]), b = Pe();
|
|
752
|
+
function C(o, i) {
|
|
753
|
+
return () => b.parseValueSchema(o, i);
|
|
754
|
+
}
|
|
755
|
+
function P(o, i, l) {
|
|
756
|
+
return o.includes("visible") && i.visible !== void 0 ? typeof i.visible == "boolean" ? () => !!i.visible : i.visible === void 0 ? !0 : C(i.visible, l) : () => !0;
|
|
757
|
+
}
|
|
758
|
+
function S(o, i, l) {
|
|
759
|
+
return o.includes("readonly") && i.readonly !== void 0 ? typeof i.readonly == "boolean" ? () => !!i.readonly : C(i.readonly, l) : () => !1;
|
|
760
|
+
}
|
|
761
|
+
function c(o, i) {
|
|
762
|
+
const l = o.$converter || i;
|
|
763
|
+
return typeof l == "string" && l && r.has(l) ? r.get(l) || null : l || null;
|
|
764
|
+
}
|
|
765
|
+
function m(o, i, l, f, g, T = "", h = "") {
|
|
766
|
+
return Object.keys(o).map((y) => {
|
|
767
|
+
const v = A(1), x = y, u = o[y], F = Object.keys(u), j = u.title, M = u.type, $ = p.get(M) || { type: "input-group", enableClear: !1 }, O = u.editor ? Object.assign({}, $, u.editor) : Object.assign({}, $), I = P(F, u, i), D = S(F, u, i);
|
|
768
|
+
O.readonly = O.readonly === void 0 ? D() : O.readonly;
|
|
769
|
+
const R = u.type === "cascade" ? m(u.properties, i, l, f, g, T, h) : [], U = !0;
|
|
770
|
+
let B = c(u, h);
|
|
771
|
+
const X = E({
|
|
772
|
+
get() {
|
|
773
|
+
if (v.value) {
|
|
774
|
+
if (["class", "style"].find((te) => te === x) && !B && (B = r.get("/converter/appearance.converter") || null), B && B.convertFrom)
|
|
775
|
+
return B.convertFrom(l, y, g, T);
|
|
776
|
+
const k = l[y];
|
|
777
|
+
return Object.prototype.hasOwnProperty.call(u, "defaultValue") && (k === void 0 || typeof k == "string" && k === "") ? u.type === "boolean" ? u.defaultValue : u.defaultValue || "" : k;
|
|
778
|
+
}
|
|
779
|
+
return null;
|
|
780
|
+
},
|
|
781
|
+
set(k) {
|
|
782
|
+
v.value += 1, B && B.convertTo ? (B.convertTo(f, y, k, g, T), B.convertTo(l, y, k, g, T)) : (f[y] = k, l[y] = k);
|
|
783
|
+
}
|
|
784
|
+
}), { refreshPanelAfterChanged: Q, description: Y, isExpand: K, parentPropertyID: ee } = u, G = { propertyID: x, propertyName: j, propertyType: M, propertyValue: X, editor: O, visible: I, readonly: D, cascadeConfig: R, hideCascadeTitle: U, refreshPanelAfterChanged: Q, description: Y, isExpand: K, parentPropertyID: ee };
|
|
785
|
+
return i[x] = G, G;
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
function a(o, i, l = {}) {
|
|
789
|
+
const f = {}, g = e[o];
|
|
790
|
+
return g && g.categories ? Object.keys(g.categories).map((h) => {
|
|
791
|
+
const w = g.categories[h], y = w == null ? void 0 : w.title, v = m(w.properties || {}, f, {}, l, i);
|
|
792
|
+
return { categoryId: h, categoryName: y, properties: v };
|
|
793
|
+
}) : [];
|
|
794
|
+
}
|
|
795
|
+
function s(o, i, l, f, g = "") {
|
|
796
|
+
const T = i.$ref.schema, h = i.$ref.converter, w = l[T], y = w.type, v = n(w), x = {}, u = e[y];
|
|
797
|
+
if (u && u.categories) {
|
|
798
|
+
const F = u.categories[o], j = F == null ? void 0 : F.title;
|
|
799
|
+
h && Object.keys(F.properties).forEach((O) => {
|
|
800
|
+
F.properties[O].$converter = h;
|
|
801
|
+
});
|
|
802
|
+
const M = (F == null ? void 0 : F.properties) || {}, $ = m(M, x, v, w, f, g);
|
|
803
|
+
return { categoryId: o, categoryName: j, properties: $ };
|
|
804
|
+
}
|
|
805
|
+
return { categoryId: o, categoryName: "", properties: [] };
|
|
806
|
+
}
|
|
807
|
+
function d(o, i, l, f, g) {
|
|
808
|
+
const T = o.type, h = n(o), w = {};
|
|
809
|
+
let y = g || e[T];
|
|
810
|
+
if (y && Object.keys(y).length === 0 && l && l.getPropConfig && (y = l.getPropConfig(f)), y && y.categories) {
|
|
811
|
+
const v = [];
|
|
812
|
+
return Object.keys(y.categories).map((x) => {
|
|
813
|
+
const u = y.categories[x];
|
|
814
|
+
if (u.$ref) {
|
|
815
|
+
v.push(s(x, u, o, i, f));
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
const F = u == null ? void 0 : u.title, j = u == null ? void 0 : u.tabId, M = u == null ? void 0 : u.tabName, $ = u == null ? void 0 : u.hide, O = u == null ? void 0 : u.hideTitle, I = m(u.properties || {}, w, h, o, i, f, u.$converter), { setPropertyRelates: D } = u, R = u == null ? void 0 : u.parentPropertyID;
|
|
819
|
+
v.push({ categoryId: x, categoryName: F, tabId: j, tabName: M, hide: $, properties: I, hideTitle: O, setPropertyRelates: D, parentPropertyID: R });
|
|
820
|
+
}), v;
|
|
821
|
+
}
|
|
822
|
+
return [];
|
|
823
|
+
}
|
|
824
|
+
return {
|
|
825
|
+
getPropertyConfigBySchema: d,
|
|
826
|
+
getPropertyConfigByType: a,
|
|
827
|
+
propertyConverterMap: r
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
const Je = {}, Ue = {};
|
|
831
|
+
_(Je, Ue, Fe);
|
|
832
|
+
const Xe = {}, Qe = {}, { getSchemaByType: Ft, resolveSchemaWithDefaultValue: Ye, resolveSchemaToProps: Pt, mappingSchemaToProps: xt, setDesignerContext: Bt } = W(Xe, Qe), Ke = {}, et = {};
|
|
833
|
+
_(Ke, et, Ye);
|
|
834
|
+
function tt(e, t) {
|
|
835
|
+
return { customClass: t.class, customStyle: t.style };
|
|
836
|
+
}
|
|
837
|
+
const nt = /* @__PURE__ */ new Map([
|
|
838
|
+
["appearance", tt]
|
|
839
|
+
]);
|
|
840
|
+
function ot(e, t, n) {
|
|
841
|
+
return t;
|
|
842
|
+
}
|
|
843
|
+
const rt = "https://json-schema.org/draft/2020-12/schema", it = "https://farris-design.gitee.io/input-group.schema.json", at = "input-group", st = "A Farris Input Component", lt = "object", ut = {
|
|
844
|
+
id: {
|
|
845
|
+
description: "The unique identifier for a Input Group",
|
|
846
|
+
type: "string"
|
|
847
|
+
},
|
|
848
|
+
type: {
|
|
849
|
+
description: "The type string of Input Group component",
|
|
850
|
+
type: "string",
|
|
851
|
+
default: "input-group"
|
|
852
|
+
},
|
|
853
|
+
appearance: {
|
|
854
|
+
description: "",
|
|
855
|
+
type: "object",
|
|
856
|
+
properties: {
|
|
857
|
+
class: {
|
|
858
|
+
type: "string"
|
|
859
|
+
},
|
|
860
|
+
style: {
|
|
861
|
+
type: "string"
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
default: {}
|
|
865
|
+
},
|
|
866
|
+
binding: {
|
|
867
|
+
description: "",
|
|
868
|
+
type: "object",
|
|
869
|
+
default: {}
|
|
870
|
+
},
|
|
871
|
+
formatValidation: {
|
|
872
|
+
description: "",
|
|
873
|
+
type: "object",
|
|
874
|
+
default: {}
|
|
875
|
+
},
|
|
876
|
+
editable: {
|
|
877
|
+
description: "",
|
|
878
|
+
type: "boolean",
|
|
879
|
+
default: !0
|
|
880
|
+
},
|
|
881
|
+
enableLinkLabel: {
|
|
882
|
+
description: "",
|
|
883
|
+
type: "boolean",
|
|
884
|
+
default: !1
|
|
885
|
+
},
|
|
886
|
+
label: {
|
|
887
|
+
description: "",
|
|
888
|
+
type: "string",
|
|
889
|
+
default: ""
|
|
890
|
+
},
|
|
891
|
+
labelWidth: {
|
|
892
|
+
description: "",
|
|
893
|
+
type: "number"
|
|
894
|
+
},
|
|
895
|
+
placeholder: {
|
|
896
|
+
description: "",
|
|
897
|
+
type: "string",
|
|
898
|
+
default: ""
|
|
899
|
+
},
|
|
900
|
+
readonly: {
|
|
901
|
+
description: "",
|
|
902
|
+
type: "boolean",
|
|
903
|
+
default: !1
|
|
904
|
+
},
|
|
905
|
+
disabled: {
|
|
906
|
+
description: "",
|
|
907
|
+
type: "boolean",
|
|
908
|
+
default: !1
|
|
909
|
+
},
|
|
910
|
+
required: {
|
|
911
|
+
description: "",
|
|
912
|
+
type: "boolean",
|
|
913
|
+
default: !1
|
|
914
|
+
},
|
|
915
|
+
tabIndex: {
|
|
916
|
+
description: "",
|
|
917
|
+
type: "number",
|
|
918
|
+
default: -1
|
|
919
|
+
},
|
|
920
|
+
maxLength: {
|
|
921
|
+
description: "",
|
|
922
|
+
type: "number",
|
|
923
|
+
default: ""
|
|
924
|
+
},
|
|
925
|
+
textAlign: {
|
|
926
|
+
description: "",
|
|
927
|
+
type: "enum",
|
|
928
|
+
enum: [
|
|
929
|
+
"left",
|
|
930
|
+
"middle",
|
|
931
|
+
"right"
|
|
932
|
+
],
|
|
933
|
+
default: "left"
|
|
934
|
+
},
|
|
935
|
+
visible: {
|
|
936
|
+
description: "",
|
|
937
|
+
type: "boolean",
|
|
938
|
+
default: !0
|
|
939
|
+
},
|
|
940
|
+
onBlur: {
|
|
941
|
+
description: "",
|
|
942
|
+
type: "string",
|
|
943
|
+
default: ""
|
|
944
|
+
},
|
|
945
|
+
onClickLinkLabel: {
|
|
946
|
+
description: "",
|
|
947
|
+
type: "sting",
|
|
948
|
+
default: ""
|
|
949
|
+
},
|
|
950
|
+
addonDisabled: {
|
|
951
|
+
description: "",
|
|
952
|
+
type: "boolean",
|
|
953
|
+
default: !1
|
|
954
|
+
},
|
|
955
|
+
addonContent: {
|
|
956
|
+
description: "",
|
|
957
|
+
type: "string",
|
|
958
|
+
default: ""
|
|
959
|
+
},
|
|
960
|
+
autoHeight: {
|
|
961
|
+
description: "",
|
|
962
|
+
type: "boolean",
|
|
963
|
+
default: !1
|
|
964
|
+
},
|
|
965
|
+
enableAddon: {
|
|
966
|
+
description: "",
|
|
967
|
+
type: "boolean",
|
|
968
|
+
default: !1
|
|
969
|
+
},
|
|
970
|
+
addonType: {
|
|
971
|
+
description: "",
|
|
972
|
+
type: "string",
|
|
973
|
+
enum: [
|
|
974
|
+
"button",
|
|
975
|
+
"static"
|
|
976
|
+
],
|
|
977
|
+
default: "button"
|
|
978
|
+
},
|
|
979
|
+
enableClear: {
|
|
980
|
+
description: "",
|
|
981
|
+
type: "boolean",
|
|
982
|
+
default: !0
|
|
983
|
+
},
|
|
984
|
+
enableViewPassword: {
|
|
985
|
+
description: "",
|
|
986
|
+
type: "boolean",
|
|
987
|
+
default: !1
|
|
988
|
+
},
|
|
989
|
+
inputType: {
|
|
990
|
+
description: "",
|
|
991
|
+
type: "string",
|
|
992
|
+
enum: [
|
|
993
|
+
"input",
|
|
994
|
+
"password",
|
|
995
|
+
"text"
|
|
996
|
+
],
|
|
997
|
+
default: "input"
|
|
998
|
+
},
|
|
999
|
+
maxHeight: {
|
|
1000
|
+
description: "",
|
|
1001
|
+
type: "number",
|
|
1002
|
+
default: 500
|
|
1003
|
+
},
|
|
1004
|
+
popUp: {
|
|
1005
|
+
description: "",
|
|
1006
|
+
type: "object",
|
|
1007
|
+
properties: {
|
|
1008
|
+
footerButtons: {
|
|
1009
|
+
type: "array",
|
|
1010
|
+
default: []
|
|
1011
|
+
},
|
|
1012
|
+
height: {
|
|
1013
|
+
type: "number",
|
|
1014
|
+
default: 600
|
|
1015
|
+
},
|
|
1016
|
+
dataMapping: {
|
|
1017
|
+
type: "object"
|
|
1018
|
+
},
|
|
1019
|
+
contents: {
|
|
1020
|
+
type: "array",
|
|
1021
|
+
default: []
|
|
1022
|
+
},
|
|
1023
|
+
showMaxButton: {
|
|
1024
|
+
type: "boolean",
|
|
1025
|
+
default: !0
|
|
1026
|
+
},
|
|
1027
|
+
showCloseButton: {
|
|
1028
|
+
type: "boolean",
|
|
1029
|
+
default: !0
|
|
1030
|
+
},
|
|
1031
|
+
showFooter: {
|
|
1032
|
+
type: "boolean",
|
|
1033
|
+
default: !0
|
|
1034
|
+
},
|
|
1035
|
+
title: {
|
|
1036
|
+
type: "string",
|
|
1037
|
+
default: ""
|
|
1038
|
+
},
|
|
1039
|
+
width: {
|
|
1040
|
+
type: "number",
|
|
1041
|
+
default: 800
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
groupText: {
|
|
1046
|
+
description: "",
|
|
1047
|
+
type: "string",
|
|
1048
|
+
default: ""
|
|
1049
|
+
},
|
|
1050
|
+
onClickHandle: {
|
|
1051
|
+
description: "",
|
|
1052
|
+
type: "string",
|
|
1053
|
+
default: ""
|
|
1054
|
+
},
|
|
1055
|
+
showButtonWhenDisabled: {
|
|
1056
|
+
description: "",
|
|
1057
|
+
type: "boolean",
|
|
1058
|
+
default: !1
|
|
1059
|
+
},
|
|
1060
|
+
onClear: {
|
|
1061
|
+
description: "",
|
|
1062
|
+
type: "string",
|
|
1063
|
+
default: ""
|
|
1064
|
+
},
|
|
1065
|
+
updateOn: {
|
|
1066
|
+
description: "",
|
|
1067
|
+
type: "string",
|
|
1068
|
+
default: "blur"
|
|
1069
|
+
}
|
|
1070
|
+
}, ct = [
|
|
1071
|
+
"type"
|
|
1072
|
+
], dt = [
|
|
1073
|
+
"id",
|
|
1074
|
+
"appearance",
|
|
1075
|
+
"binding",
|
|
1076
|
+
"visible"
|
|
1077
|
+
], pt = {
|
|
1078
|
+
$schema: rt,
|
|
1079
|
+
$id: it,
|
|
1080
|
+
title: at,
|
|
1081
|
+
description: st,
|
|
1082
|
+
type: lt,
|
|
1083
|
+
properties: ut,
|
|
1084
|
+
required: ct,
|
|
1085
|
+
ignore: dt
|
|
1086
|
+
}, J = ie(se, pt, nt, ot);
|
|
1087
|
+
V.register = (e, t, n, r) => {
|
|
1088
|
+
e["input-group"] = ae, t["input-group"] = J;
|
|
1089
|
+
};
|
|
1090
|
+
V.registerDesigner = (e, t, n) => {
|
|
1091
|
+
e["input-group"] = V, t["input-group"] = J;
|
|
1092
|
+
};
|
|
1093
|
+
const kt = re(V);
|
|
1094
|
+
export {
|
|
1095
|
+
V as FInputGroupDesgin,
|
|
1096
|
+
kt as default,
|
|
1097
|
+
J as propsResolver
|
|
1098
|
+
};
|