@gct-paas/schema 0.1.4-dev.10
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.esm.min.mjs +1250 -0
- package/dist/index.min.cjs +1 -0
- package/dist/index.system.min.js +1 -0
- package/es/constants/index.d.ts +14 -0
- package/es/constants/index.mjs +370 -0
- package/es/index.d.ts +8 -0
- package/es/index.mjs +20 -0
- package/es/interface/common/data-linkage-config.d.ts +17 -0
- package/es/interface/designer.d.ts +99 -0
- package/es/interface/index.d.ts +6 -0
- package/es/interface/modal/i-modal-body.d.ts +15 -0
- package/es/interface/modal/i-modal-bottom-button.d.ts +15 -0
- package/es/interface/modal/i-modal-footer.d.ts +15 -0
- package/es/interface/modal/i-modal-props.d.ts +26 -0
- package/es/interface/modal/i-modal.d.ts +52 -0
- package/es/interface/modal/index.d.ts +17 -0
- package/es/interface/schema/index.d.ts +2 -0
- package/es/interface/schema/widget-props/i-button-props.d.ts +170 -0
- package/es/interface/schema/widget-props/i-display-props.d.ts +48 -0
- package/es/interface/schema/widget-props/i-form-container-props.d.ts +77 -0
- package/es/interface/schema/widget-props/i-form-input-props.d.ts +409 -0
- package/es/interface/schema/widget-props/i-layout-props.d.ts +77 -0
- package/es/interface/schema/widget-props/i-search-widget-props.d.ts +126 -0
- package/es/interface/schema/widget-props/i-table-column-props.d.ts +54 -0
- package/es/interface/schema/widget-props/i-table-props.d.ts +384 -0
- package/es/interface/schema/widget-props/index.d.ts +8 -0
- package/es/interface/schema/widget-types.d.ts +370 -0
- package/es/interface/widget/i-common.d.ts +42 -0
- package/es/interface/widget/i-editors.d.ts +240 -0
- package/es/interface/widget/i-events.d.ts +55 -0
- package/es/interface/widget/i-hooks-and-misc.d.ts +59 -0
- package/es/interface/widget/i-props.d.ts +177 -0
- package/es/interface/widget/i-schemas.d.ts +135 -0
- package/es/interface/widget/i-styles.d.ts +114 -0
- package/es/interface/widget/index.d.ts +53 -0
- package/es/interface/widget-info/i-designer-item-hooks.d.ts +21 -0
- package/es/interface/widget-info/i-designer-schema-exports.d.ts +13 -0
- package/es/interface/widget-info/i-widget-info-item.d.ts +78 -0
- package/es/interface/widget-info/i-widget-info.d.ts +19 -0
- package/es/interface/widget-info/index.d.ts +4 -0
- package/es/schema/common-config/base-button-config.d.ts +3 -0
- package/es/schema/common-config/base-button-config.mjs +84 -0
- package/es/schema/common-config/button-editor-config.d.ts +4 -0
- package/es/schema/common-config/button-editor-config.mjs +206 -0
- package/es/schema/common-config/button-props-func.d.ts +5 -0
- package/es/schema/common-config/button-props-func.mjs +11 -0
- package/es/schema/common-config/common-field-editor-config.d.ts +10 -0
- package/es/schema/common-config/common-field-editor-config.mjs +61 -0
- package/es/schema/common-config/common-style.d.ts +3 -0
- package/es/schema/common-config/common-style.mjs +85 -0
- package/es/schema/common-config/display-editor-config.d.ts +3 -0
- package/es/schema/common-config/display-editor-config.mjs +89 -0
- package/es/schema/common-config/permission-editor-config.d.ts +2 -0
- package/es/schema/common-config/permission-editor-config.mjs +23 -0
- package/es/schema/index.d.ts +9 -0
- package/es/schema/modal/modal-body.d.ts +2 -0
- package/es/schema/modal/modal-body.mjs +9 -0
- package/es/schema/modal/modal-footer.d.ts +2 -0
- package/es/schema/modal/modal-footer.mjs +9 -0
- package/es/schema/modal/modal.d.ts +8 -0
- package/es/schema/modal/modal.mjs +182 -0
- package/es/types/index.d.ts +1 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/schema/index.d.ts +45 -0
- package/es/utils/schema/index.mjs +49 -0
- package/es/utils/schema-style/index.d.ts +108 -0
- package/es/utils/schema-style/index.mjs +155 -0
- package/es/utils/widget-info/widget-info.d.ts +104 -0
- package/es/utils/widget-info/widget-info.mjs +76 -0
- package/package.json +63 -0
|
@@ -0,0 +1,1250 @@
|
|
|
1
|
+
import { BuiltinType as L, Platform as s, PropGroup as i, StyleGroup as T, buildShortUUID as I, BorderStyle as u, TagTypeEnum as F, TextDecoration as D, FIELD_TYPE as n, SEARCH_SERVICE as e, Dependency_ENUM as f, ASSIGNMENTSTRATEGY_ENUM as B, MaterialEnum as c, FormComponents as G, t as b, ButtonSize as R, ButtonType as Q, ButtonStyle as x, ButtonColorType as U, ButtonColorTheme as P } from "@gct-paas/core";
|
|
2
|
+
import { cloneDeep as W, has as k, isEmpty as N, pick as K, isNil as M } from "lodash-es";
|
|
3
|
+
const Y = {
|
|
4
|
+
id: "",
|
|
5
|
+
type: L.MODAL_BODY,
|
|
6
|
+
children: []
|
|
7
|
+
}, V = {
|
|
8
|
+
id: "",
|
|
9
|
+
type: L.MODAL_FOOTER,
|
|
10
|
+
children: []
|
|
11
|
+
}, v = {
|
|
12
|
+
id: "",
|
|
13
|
+
/**默认是WEB 添加的时候会根据当前环境改变 */
|
|
14
|
+
platform: s.WEB,
|
|
15
|
+
/**系统用的name */
|
|
16
|
+
name: "sys.pageDesigner.modal",
|
|
17
|
+
alias: "",
|
|
18
|
+
/**用户新建编辑的name */
|
|
19
|
+
modalName: "",
|
|
20
|
+
type: L.MODAL,
|
|
21
|
+
js: "",
|
|
22
|
+
css: "",
|
|
23
|
+
children: [Y, V],
|
|
24
|
+
props: {
|
|
25
|
+
modalTitle: "弹窗",
|
|
26
|
+
unitType: "px",
|
|
27
|
+
modalWidth: 800,
|
|
28
|
+
isSubTableModal: !1,
|
|
29
|
+
bindSubTableId: "",
|
|
30
|
+
createModalTitle: "新建弹窗",
|
|
31
|
+
editModalTitle: "编辑弹窗",
|
|
32
|
+
hasFooter: !0,
|
|
33
|
+
openMode: "modal",
|
|
34
|
+
/**just mobile */
|
|
35
|
+
mUnitType: "%",
|
|
36
|
+
mModalWidth: 80
|
|
37
|
+
},
|
|
38
|
+
style: {
|
|
39
|
+
paddingAll: "16",
|
|
40
|
+
paddingTop: "16",
|
|
41
|
+
paddingRight: "16",
|
|
42
|
+
paddingBottom: "16",
|
|
43
|
+
paddingLeft: "16"
|
|
44
|
+
},
|
|
45
|
+
events: {},
|
|
46
|
+
i18n: {},
|
|
47
|
+
runJs: "",
|
|
48
|
+
los: {},
|
|
49
|
+
icon: "icon-motaikuang1",
|
|
50
|
+
isField: !1
|
|
51
|
+
}, H = [
|
|
52
|
+
{
|
|
53
|
+
component: "text-editor",
|
|
54
|
+
name: "modalTitle",
|
|
55
|
+
label: "sys.pageDesigner.modalTitleName",
|
|
56
|
+
group: i.BASIC,
|
|
57
|
+
_config: {
|
|
58
|
+
showCount: !0,
|
|
59
|
+
maxlength: 32
|
|
60
|
+
},
|
|
61
|
+
hidden: (t) => t.props.isSubTableModal
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
component: "input-unit-editor",
|
|
65
|
+
name: { unitType: "unitType", modalWidth: "modalWidth" },
|
|
66
|
+
label: "sys.pageDesigner.modalWidthProp",
|
|
67
|
+
group: i.MODAL,
|
|
68
|
+
hidden: (t) => t.platform === s.MOBILE
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
component: "input-unit-editor",
|
|
72
|
+
name: { unitType: "mUnitType", modalWidth: "mModalWidth" },
|
|
73
|
+
label: "sys.pageDesigner.modalHeightProp",
|
|
74
|
+
group: i.MODAL,
|
|
75
|
+
hidden: (t) => t.platform !== s.MOBILE,
|
|
76
|
+
_config: {
|
|
77
|
+
filterUnitType: "px"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
component: "text-editor",
|
|
82
|
+
name: "createModalTitle",
|
|
83
|
+
label: "sys.pageDesigner.createModalTitle",
|
|
84
|
+
group: i.MODALTITLECONFIG,
|
|
85
|
+
_config: {
|
|
86
|
+
i18n: !0
|
|
87
|
+
},
|
|
88
|
+
hidden: (t) => !t.props.isSubTableModal
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
component: "text-editor",
|
|
92
|
+
name: "editModalTitle",
|
|
93
|
+
label: "sys.pageDesigner.editModalTitle",
|
|
94
|
+
group: i.MODALTITLECONFIG,
|
|
95
|
+
_config: {
|
|
96
|
+
i18n: !0
|
|
97
|
+
},
|
|
98
|
+
hidden: (t) => !t.props.isSubTableModal
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
component: "select-editor",
|
|
102
|
+
name: "openMode",
|
|
103
|
+
label: "sys.appDesigner.openMode",
|
|
104
|
+
group: i.MODAL,
|
|
105
|
+
hidden: (t) => t.platform !== s.WEB,
|
|
106
|
+
_config: {
|
|
107
|
+
options: () => [
|
|
108
|
+
{
|
|
109
|
+
label: "打开弹窗页面",
|
|
110
|
+
value: "modal"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: "右侧划入页面",
|
|
114
|
+
value: "drawer"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
changeCallback: (t, o) => {
|
|
119
|
+
o === "drawer" ? (t.props.unitType = "%", t.props.modalWidth = 80) : (t.props.unitType = "px", t.props.modalWidth = 800);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
component: "switch-editor",
|
|
124
|
+
name: "hasFooter",
|
|
125
|
+
label: "sys.pageDesigner.operateButton",
|
|
126
|
+
group: i.BUTTON,
|
|
127
|
+
hidden: (t) => t.props.isSubTableModal
|
|
128
|
+
}
|
|
129
|
+
], z = [
|
|
130
|
+
{
|
|
131
|
+
component: "color-editor",
|
|
132
|
+
name: "backgroundColor",
|
|
133
|
+
label: "sys.pageDesigner.backgroundColor",
|
|
134
|
+
group: T.BACKGROUND
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
component: "margin-editor",
|
|
138
|
+
group: T.MARGIN,
|
|
139
|
+
_config: {
|
|
140
|
+
hiddenMarginOrPadding: "margin"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
], j = [
|
|
144
|
+
{
|
|
145
|
+
name: "onMounted",
|
|
146
|
+
title: "sys.pageDesigner.onMounted",
|
|
147
|
+
params: []
|
|
148
|
+
}
|
|
149
|
+
], X = () => {
|
|
150
|
+
}, $ = (t) => {
|
|
151
|
+
t.children[0].id = I(t.children[0].type), t.children[1].id = I(t.children[1].type);
|
|
152
|
+
}, J = {
|
|
153
|
+
basicProps: {
|
|
154
|
+
key_label: "弹窗",
|
|
155
|
+
alias_hidden: !0
|
|
156
|
+
}
|
|
157
|
+
}, fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
158
|
+
__proto__: null,
|
|
159
|
+
beforeCreate: $,
|
|
160
|
+
designerConfig: J,
|
|
161
|
+
eventList: j,
|
|
162
|
+
propEditorList: H,
|
|
163
|
+
runCallback: X,
|
|
164
|
+
styleEditorList: z,
|
|
165
|
+
widget: v
|
|
166
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
167
|
+
function d(t) {
|
|
168
|
+
return Object.prototype.hasOwnProperty.call(t.props, "model") ? !t.props.model : Object.prototype.hasOwnProperty.call(t.props, "refForm") ? !t.props.refForm : !1;
|
|
169
|
+
}
|
|
170
|
+
const Ne = {
|
|
171
|
+
position: "",
|
|
172
|
+
top: "",
|
|
173
|
+
left: "",
|
|
174
|
+
right: "",
|
|
175
|
+
bottom: "",
|
|
176
|
+
width: "",
|
|
177
|
+
height: "",
|
|
178
|
+
backgroundColor: "",
|
|
179
|
+
marginAll: "",
|
|
180
|
+
marginTop: "",
|
|
181
|
+
marginRight: "",
|
|
182
|
+
marginBottom: "",
|
|
183
|
+
marginLeft: "",
|
|
184
|
+
paddingAll: "",
|
|
185
|
+
paddingTop: "",
|
|
186
|
+
paddingRight: "",
|
|
187
|
+
paddingBottom: "",
|
|
188
|
+
paddingLeft: "",
|
|
189
|
+
labelFont: {
|
|
190
|
+
align: "left",
|
|
191
|
+
fontSize: "",
|
|
192
|
+
bold: !1,
|
|
193
|
+
italic: !1,
|
|
194
|
+
textDecoration: D.NONE,
|
|
195
|
+
color: ""
|
|
196
|
+
},
|
|
197
|
+
contentFont: {
|
|
198
|
+
align: "left",
|
|
199
|
+
fontSize: "",
|
|
200
|
+
bold: !1,
|
|
201
|
+
italic: !1,
|
|
202
|
+
textDecoration: D.NONE,
|
|
203
|
+
color: ""
|
|
204
|
+
},
|
|
205
|
+
tagStyle: {
|
|
206
|
+
color: "",
|
|
207
|
+
tagType: F.RADIUS
|
|
208
|
+
},
|
|
209
|
+
tagStyleOpen: !1,
|
|
210
|
+
borderAll: {
|
|
211
|
+
borderStyle: u.NONE,
|
|
212
|
+
borderColor: "#F0F0F0",
|
|
213
|
+
borderWidth: "1"
|
|
214
|
+
},
|
|
215
|
+
borderLeft: {
|
|
216
|
+
borderStyle: u.NONE,
|
|
217
|
+
borderColor: "#F0F0F0",
|
|
218
|
+
borderWidth: "1"
|
|
219
|
+
},
|
|
220
|
+
borderRight: {
|
|
221
|
+
borderStyle: u.NONE,
|
|
222
|
+
borderColor: "#F0F0F0",
|
|
223
|
+
borderWidth: "1"
|
|
224
|
+
},
|
|
225
|
+
borderBottom: {
|
|
226
|
+
borderStyle: u.NONE,
|
|
227
|
+
borderColor: "#F0F0F0",
|
|
228
|
+
borderWidth: "1"
|
|
229
|
+
},
|
|
230
|
+
borderTop: {
|
|
231
|
+
borderStyle: u.NONE,
|
|
232
|
+
borderColor: "#F0F0F0",
|
|
233
|
+
borderWidth: "1"
|
|
234
|
+
},
|
|
235
|
+
borderTopRightRadius: "0",
|
|
236
|
+
borderTopLeftRadius: "0",
|
|
237
|
+
borderBottomRightRadius: "0",
|
|
238
|
+
borderBottomLeftRadius: "0",
|
|
239
|
+
borderAllRadius: "0"
|
|
240
|
+
}, ge = [
|
|
241
|
+
"position",
|
|
242
|
+
"backgroundColor",
|
|
243
|
+
"bold",
|
|
244
|
+
"italic",
|
|
245
|
+
"textDecoration",
|
|
246
|
+
"color",
|
|
247
|
+
"borderStyle",
|
|
248
|
+
"borderColor"
|
|
249
|
+
], q = [
|
|
250
|
+
n.TEXT,
|
|
251
|
+
n.LONG_TEXT,
|
|
252
|
+
n.INTEGER,
|
|
253
|
+
n.LONG,
|
|
254
|
+
n.DOUBLE,
|
|
255
|
+
n.DECIMAL,
|
|
256
|
+
n.BOOLEAN,
|
|
257
|
+
n.DATE,
|
|
258
|
+
n.TIME,
|
|
259
|
+
n.DATE_TIME,
|
|
260
|
+
n.USER,
|
|
261
|
+
n.USER_MULTI,
|
|
262
|
+
n.SERIAL
|
|
263
|
+
], Te = {
|
|
264
|
+
[n.PRIMARY_KEY]: {
|
|
265
|
+
filter: [
|
|
266
|
+
e.EQ,
|
|
267
|
+
e.NE,
|
|
268
|
+
e.IN,
|
|
269
|
+
e.NOTIN
|
|
270
|
+
],
|
|
271
|
+
default: [e.EQ],
|
|
272
|
+
noRangDefaultExp: e.EQ
|
|
273
|
+
},
|
|
274
|
+
[n.TEXT]: {
|
|
275
|
+
filter: [
|
|
276
|
+
e.EQ,
|
|
277
|
+
e.IEQ,
|
|
278
|
+
e.NE,
|
|
279
|
+
e.INE,
|
|
280
|
+
e.LIKE,
|
|
281
|
+
e.ILIKE,
|
|
282
|
+
e.NOTLIKE,
|
|
283
|
+
e.NOTILIKE,
|
|
284
|
+
e.LEFTLIKE,
|
|
285
|
+
e.ILEFTLIKE,
|
|
286
|
+
e.RIGHTLIKE,
|
|
287
|
+
e.IRIGHTLIKE
|
|
288
|
+
],
|
|
289
|
+
default: [e.LIKE],
|
|
290
|
+
noRangDefaultExp: e.LIKE
|
|
291
|
+
},
|
|
292
|
+
[n.LONG_TEXT]: {
|
|
293
|
+
filter: [
|
|
294
|
+
e.EQ,
|
|
295
|
+
e.IEQ,
|
|
296
|
+
e.NE,
|
|
297
|
+
e.INE,
|
|
298
|
+
e.LIKE,
|
|
299
|
+
e.ILIKE,
|
|
300
|
+
e.NOTLIKE,
|
|
301
|
+
e.NOTILIKE,
|
|
302
|
+
e.LEFTLIKE,
|
|
303
|
+
e.ILEFTLIKE,
|
|
304
|
+
e.RIGHTLIKE,
|
|
305
|
+
e.IRIGHTLIKE
|
|
306
|
+
],
|
|
307
|
+
default: [e.LIKE],
|
|
308
|
+
noRangDefaultExp: e.LIKE
|
|
309
|
+
},
|
|
310
|
+
[n.SERIAL]: {
|
|
311
|
+
filter: [
|
|
312
|
+
e.EQ,
|
|
313
|
+
e.IEQ,
|
|
314
|
+
e.NE,
|
|
315
|
+
e.INE,
|
|
316
|
+
e.LIKE,
|
|
317
|
+
e.ILIKE,
|
|
318
|
+
e.NOTLIKE,
|
|
319
|
+
e.NOTILIKE,
|
|
320
|
+
e.LEFTLIKE,
|
|
321
|
+
e.ILEFTLIKE,
|
|
322
|
+
e.RIGHTLIKE,
|
|
323
|
+
e.IRIGHTLIKE
|
|
324
|
+
],
|
|
325
|
+
default: [e.LIKE],
|
|
326
|
+
noRangDefaultExp: e.LIKE
|
|
327
|
+
},
|
|
328
|
+
[n.INTEGER]: {
|
|
329
|
+
filter: [
|
|
330
|
+
e.EQ,
|
|
331
|
+
e.NE,
|
|
332
|
+
e.GT,
|
|
333
|
+
e.GE,
|
|
334
|
+
e.LT,
|
|
335
|
+
e.LE
|
|
336
|
+
],
|
|
337
|
+
contain: ["rangtype"],
|
|
338
|
+
default: [e.RANGE],
|
|
339
|
+
noRangDefaultExp: e.EQ
|
|
340
|
+
},
|
|
341
|
+
[n.LONG]: {
|
|
342
|
+
filter: [
|
|
343
|
+
e.EQ,
|
|
344
|
+
e.NE,
|
|
345
|
+
e.GT,
|
|
346
|
+
e.GE,
|
|
347
|
+
e.LT,
|
|
348
|
+
e.LE
|
|
349
|
+
],
|
|
350
|
+
contain: ["rangtype"],
|
|
351
|
+
default: [e.RANGE],
|
|
352
|
+
noRangDefaultExp: e.EQ
|
|
353
|
+
},
|
|
354
|
+
[n.DECIMAL]: {
|
|
355
|
+
filter: [
|
|
356
|
+
e.EQ,
|
|
357
|
+
e.NE,
|
|
358
|
+
e.GT,
|
|
359
|
+
e.GE,
|
|
360
|
+
e.LT,
|
|
361
|
+
e.LE
|
|
362
|
+
],
|
|
363
|
+
contain: ["rangtype"],
|
|
364
|
+
default: [e.RANGE],
|
|
365
|
+
noRangDefaultExp: e.EQ
|
|
366
|
+
},
|
|
367
|
+
[n.DOUBLE]: {
|
|
368
|
+
filter: [
|
|
369
|
+
e.EQ,
|
|
370
|
+
e.NE,
|
|
371
|
+
e.GT,
|
|
372
|
+
e.GE,
|
|
373
|
+
e.LT,
|
|
374
|
+
e.LE
|
|
375
|
+
],
|
|
376
|
+
contain: ["rangtype"],
|
|
377
|
+
default: [e.RANGE],
|
|
378
|
+
noRangDefaultExp: e.EQ
|
|
379
|
+
},
|
|
380
|
+
[n.BOOLEAN]: {
|
|
381
|
+
filter: [e.EQ],
|
|
382
|
+
// contain: ['more'],
|
|
383
|
+
default: [e.EQ],
|
|
384
|
+
noRangDefaultExp: e.EQ
|
|
385
|
+
},
|
|
386
|
+
[n.DATE]: {
|
|
387
|
+
filter: [
|
|
388
|
+
e.EQ,
|
|
389
|
+
e.NE,
|
|
390
|
+
e.GT,
|
|
391
|
+
e.GE,
|
|
392
|
+
e.LT,
|
|
393
|
+
e.LE
|
|
394
|
+
],
|
|
395
|
+
contain: ["rangtype", "more"],
|
|
396
|
+
default: [e.RANGE],
|
|
397
|
+
noRangDefaultExp: e.EQ
|
|
398
|
+
},
|
|
399
|
+
[n.TIME]: {
|
|
400
|
+
filter: [
|
|
401
|
+
e.EQ,
|
|
402
|
+
e.NE,
|
|
403
|
+
e.GT,
|
|
404
|
+
e.GE,
|
|
405
|
+
e.LT,
|
|
406
|
+
e.LE
|
|
407
|
+
],
|
|
408
|
+
contain: ["rangtype", "more"],
|
|
409
|
+
default: [e.RANGE],
|
|
410
|
+
noRangDefaultExp: e.EQ
|
|
411
|
+
},
|
|
412
|
+
[n.DATE_TIME]: {
|
|
413
|
+
filter: [
|
|
414
|
+
e.EQ,
|
|
415
|
+
e.NE,
|
|
416
|
+
e.GT,
|
|
417
|
+
e.GE,
|
|
418
|
+
e.LT,
|
|
419
|
+
e.LE
|
|
420
|
+
],
|
|
421
|
+
contain: ["rangtype", "more"],
|
|
422
|
+
default: [e.RANGE],
|
|
423
|
+
noRangDefaultExp: e.EQ
|
|
424
|
+
},
|
|
425
|
+
[n.ENUM]: {
|
|
426
|
+
filter: [
|
|
427
|
+
e.EQ,
|
|
428
|
+
e.NE,
|
|
429
|
+
e.IN,
|
|
430
|
+
e.NOTIN
|
|
431
|
+
],
|
|
432
|
+
contain: ["more", "ignoreCase"],
|
|
433
|
+
default: [e.EQ],
|
|
434
|
+
noRangDefaultExp: e.EQ
|
|
435
|
+
},
|
|
436
|
+
[n.ENUM_MULTI]: {
|
|
437
|
+
filter: [e.CONTAINANY, e.CONTAINALL],
|
|
438
|
+
contain: ["more", "ignoreCase"],
|
|
439
|
+
default: [e.CONTAINANY],
|
|
440
|
+
noRangDefaultExp: e.CONTAINANY
|
|
441
|
+
},
|
|
442
|
+
[n.OPTION]: {
|
|
443
|
+
filter: [e.EQ, e.NE],
|
|
444
|
+
contain: ["more"],
|
|
445
|
+
default: [e.EQ],
|
|
446
|
+
noRangDefaultExp: e.EQ
|
|
447
|
+
},
|
|
448
|
+
[n.OPTION_MULTI]: {
|
|
449
|
+
filter: [e.CONTAINANY, e.CONTAINALL],
|
|
450
|
+
contain: ["more"],
|
|
451
|
+
default: [e.CONTAINANY],
|
|
452
|
+
noRangDefaultExp: e.CONTAINANY
|
|
453
|
+
},
|
|
454
|
+
[n.USER]: {
|
|
455
|
+
filter: [
|
|
456
|
+
e.EQ,
|
|
457
|
+
e.NE,
|
|
458
|
+
e.IN,
|
|
459
|
+
e.NOTIN
|
|
460
|
+
],
|
|
461
|
+
contain: ["more", "ignoreCase"],
|
|
462
|
+
default: [e.EQ]
|
|
463
|
+
},
|
|
464
|
+
[n.USER_MULTI]: {
|
|
465
|
+
filter: [e.CONTAINANY, e.CONTAINALL],
|
|
466
|
+
contain: ["more", "ignoreCase"],
|
|
467
|
+
default: [e.CONTAINANY],
|
|
468
|
+
noRangDefaultExp: e.CONTAINANY
|
|
469
|
+
},
|
|
470
|
+
[n.ORG]: {
|
|
471
|
+
filter: [
|
|
472
|
+
e.EQ,
|
|
473
|
+
e.NE,
|
|
474
|
+
e.IN,
|
|
475
|
+
e.NOTIN
|
|
476
|
+
],
|
|
477
|
+
contain: ["more", "ignoreCase"],
|
|
478
|
+
default: [e.EQ],
|
|
479
|
+
noRangDefaultExp: e.EQ
|
|
480
|
+
},
|
|
481
|
+
[n.ORG_MULTI]: {
|
|
482
|
+
filter: [e.CONTAINANY, e.CONTAINALL],
|
|
483
|
+
contain: ["more", "ignoreCase"],
|
|
484
|
+
default: [e.CONTAINANY],
|
|
485
|
+
noRangDefaultExp: e.CONTAINANY
|
|
486
|
+
},
|
|
487
|
+
[n.REF_MULTI]: {
|
|
488
|
+
filter: [e.CONTAINANY, e.CONTAINALL],
|
|
489
|
+
contain: ["more", "ignoreCase"],
|
|
490
|
+
default: [e.CONTAINANY],
|
|
491
|
+
noRangDefaultExp: e.CONTAINANY
|
|
492
|
+
},
|
|
493
|
+
[n.ASSOCIATED_PRIMARY_KEY]: {
|
|
494
|
+
filter: [
|
|
495
|
+
e.EQ,
|
|
496
|
+
e.NE,
|
|
497
|
+
e.IN,
|
|
498
|
+
e.NOTIN
|
|
499
|
+
],
|
|
500
|
+
contain: ["more"],
|
|
501
|
+
default: [e.EQ],
|
|
502
|
+
noRangDefaultExp: e.EQ
|
|
503
|
+
},
|
|
504
|
+
[n.REF]: {
|
|
505
|
+
filter: [
|
|
506
|
+
e.EQ,
|
|
507
|
+
e.NE,
|
|
508
|
+
e.IN,
|
|
509
|
+
e.NOTIN
|
|
510
|
+
],
|
|
511
|
+
contain: ["more", "ignoreCase"],
|
|
512
|
+
default: [e.EQ],
|
|
513
|
+
noRangDefaultExp: e.EQ
|
|
514
|
+
},
|
|
515
|
+
[n.RDO_REF]: {
|
|
516
|
+
filter: [
|
|
517
|
+
e.VERSIONEQ,
|
|
518
|
+
e.VERSIONNE,
|
|
519
|
+
e.VERSIONIN,
|
|
520
|
+
e.VERSIONNOTIN
|
|
521
|
+
],
|
|
522
|
+
contain: ["more", "ignoreCase"],
|
|
523
|
+
default: [e.VERSIONIN],
|
|
524
|
+
noRangDefaultExp: e.VERSIONIN
|
|
525
|
+
},
|
|
526
|
+
[n.E_DHR_TEMPLATE]: {
|
|
527
|
+
filter: [e.VERSIONIN],
|
|
528
|
+
contain: ["more"],
|
|
529
|
+
default: [e.VERSIONIN],
|
|
530
|
+
noRangDefaultExp: e.VERSIONIN
|
|
531
|
+
},
|
|
532
|
+
[n.ONLINE_FORM_TEMPLATE]: {
|
|
533
|
+
filter: [e.VERSIONIN],
|
|
534
|
+
contain: ["more"],
|
|
535
|
+
default: [e.VERSIONIN],
|
|
536
|
+
noRangDefaultExp: e.VERSIONIN
|
|
537
|
+
},
|
|
538
|
+
[n.TRANSACTION]: {
|
|
539
|
+
filter: [
|
|
540
|
+
e.EQ,
|
|
541
|
+
e.NE,
|
|
542
|
+
e.IN,
|
|
543
|
+
e.NOTIN
|
|
544
|
+
],
|
|
545
|
+
contain: ["more", "ignoreCase"],
|
|
546
|
+
default: [e.EQ],
|
|
547
|
+
noRangDefaultExp: e.EQ
|
|
548
|
+
},
|
|
549
|
+
[n.PRINTER]: {
|
|
550
|
+
filter: [
|
|
551
|
+
e.EQ,
|
|
552
|
+
e.NE,
|
|
553
|
+
e.IN,
|
|
554
|
+
e.NOTIN
|
|
555
|
+
],
|
|
556
|
+
contain: ["more", "ignoreCase"],
|
|
557
|
+
default: [e.EQ],
|
|
558
|
+
noRangDefaultExp: e.EQ
|
|
559
|
+
},
|
|
560
|
+
[n.LABEL_TEMPLATE_REF]: {
|
|
561
|
+
filter: [
|
|
562
|
+
e.VERSIONEQ,
|
|
563
|
+
e.VERSIONNE,
|
|
564
|
+
e.VERSIONIN,
|
|
565
|
+
e.VERSIONNOTIN
|
|
566
|
+
],
|
|
567
|
+
contain: ["more", "ignoreCase"],
|
|
568
|
+
default: [e.VERSIONIN],
|
|
569
|
+
noRangDefaultExp: e.EQ
|
|
570
|
+
},
|
|
571
|
+
// [FIELD_TYPE.DOCUMENT_TEMPLATE]: {
|
|
572
|
+
document_template: {
|
|
573
|
+
filter: [e.VERSIONIN],
|
|
574
|
+
contain: ["more", "ignoreCase"],
|
|
575
|
+
default: [e.VERSIONIN],
|
|
576
|
+
noRangDefaultExp: e.EQ
|
|
577
|
+
},
|
|
578
|
+
[n.MESSAGE_TMPL]: {
|
|
579
|
+
filter: [
|
|
580
|
+
e.EQ,
|
|
581
|
+
e.NE,
|
|
582
|
+
e.IN,
|
|
583
|
+
e.NOTIN
|
|
584
|
+
],
|
|
585
|
+
default: [e.EQ],
|
|
586
|
+
noRangDefaultExp: e.EQ
|
|
587
|
+
},
|
|
588
|
+
[n.RANGE_USER]: {
|
|
589
|
+
filter: [e.CONTAINANY, e.CONTAINALL],
|
|
590
|
+
contain: ["more", "ignoreCase"],
|
|
591
|
+
default: [e.CONTAINANY],
|
|
592
|
+
noRangDefaultExp: e.CONTAINANY
|
|
593
|
+
},
|
|
594
|
+
more: {
|
|
595
|
+
filter: [e.ISNULL, e.ISNOTNULL]
|
|
596
|
+
},
|
|
597
|
+
rangtype: {
|
|
598
|
+
filter: [
|
|
599
|
+
e.RANGE,
|
|
600
|
+
e.ORANGE,
|
|
601
|
+
e.RORANGE,
|
|
602
|
+
e.LORANGE
|
|
603
|
+
]
|
|
604
|
+
},
|
|
605
|
+
[n.Biz_Process]: {
|
|
606
|
+
filter: [e.IN],
|
|
607
|
+
default: [e.IN],
|
|
608
|
+
noRangDefaultExp: e.IN
|
|
609
|
+
},
|
|
610
|
+
ignore: {
|
|
611
|
+
filter: ["ignoreCase"]
|
|
612
|
+
}
|
|
613
|
+
}, Z = {
|
|
614
|
+
deviceConnectivity: !1,
|
|
615
|
+
////显隐配置start
|
|
616
|
+
hidden: !1,
|
|
617
|
+
// displayType: DisplayType.CONFIG,
|
|
618
|
+
// displayRule: '',
|
|
619
|
+
componentDependency: {
|
|
620
|
+
sortDependency: [],
|
|
621
|
+
configDependency: {
|
|
622
|
+
/**隐藏 */
|
|
623
|
+
[f.HIDDEN]: {
|
|
624
|
+
expression: ""
|
|
625
|
+
},
|
|
626
|
+
/**只读 */
|
|
627
|
+
[f.READONLY]: {
|
|
628
|
+
expression: ""
|
|
629
|
+
},
|
|
630
|
+
/**禁用 */
|
|
631
|
+
[f.DISABLED]: {
|
|
632
|
+
expression: ""
|
|
633
|
+
},
|
|
634
|
+
/**必填 */
|
|
635
|
+
[f.REQUIRED]: {
|
|
636
|
+
expression: ""
|
|
637
|
+
},
|
|
638
|
+
[f.ASSIGNMENT]: {
|
|
639
|
+
expression: "",
|
|
640
|
+
strategy: B.alwaysCover
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}, w = [
|
|
645
|
+
n.TEXT,
|
|
646
|
+
n.LONG_TEXT,
|
|
647
|
+
n.INTEGER,
|
|
648
|
+
n.LONG,
|
|
649
|
+
n.DOUBLE,
|
|
650
|
+
n.DECIMAL,
|
|
651
|
+
n.BOOLEAN,
|
|
652
|
+
n.DATE,
|
|
653
|
+
n.DATE_TIME,
|
|
654
|
+
n.MASTERSLAVE
|
|
655
|
+
], me = [
|
|
656
|
+
{
|
|
657
|
+
component: "dependency-editor",
|
|
658
|
+
name: "componentDependency",
|
|
659
|
+
label: "",
|
|
660
|
+
group: i.COMPONENTDEPENDENCY,
|
|
661
|
+
hidden: (t) => t.materialType === c.MaterialEmbedTableField || t.type === G.Form && t.preLocation ? !0 : d(t) || t.props.field === "operating_state_"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
component: "switch-editor",
|
|
665
|
+
name: "notSubmitInHide",
|
|
666
|
+
label: "sys.pageDesigner.submitWhenHidden",
|
|
667
|
+
group: i.FIELD_CONFIG,
|
|
668
|
+
hidden(t) {
|
|
669
|
+
return !t.isField || !t.props.field || t.props.bindFieldKey || t.props.fieldReadonly || t.materialType === c.cardListFormField || [
|
|
670
|
+
n.EXPRESSION_CONDITION,
|
|
671
|
+
n.SERIALRULE,
|
|
672
|
+
n.LABEL_TEMPLATE
|
|
673
|
+
].includes(t.props.fieldType) || !q.includes(t.props.fieldType);
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
component: "switch-editor",
|
|
678
|
+
name: "deviceConnectivity",
|
|
679
|
+
label: "sys.pageDesigner.deviceConnectivity",
|
|
680
|
+
group: i.FIELD_CONFIG,
|
|
681
|
+
hidden: (t) => t.platform !== s.WEB || ![c.MaterialFormField].includes(t.materialType) || !w.includes(t.props.fieldType)
|
|
682
|
+
}
|
|
683
|
+
];
|
|
684
|
+
class O {
|
|
685
|
+
events = {};
|
|
686
|
+
propEditors = {};
|
|
687
|
+
schema = {};
|
|
688
|
+
callback = {};
|
|
689
|
+
beforeCreate = {};
|
|
690
|
+
styleEditors = {};
|
|
691
|
+
designerConfig = {};
|
|
692
|
+
hooks = {};
|
|
693
|
+
whiteList = {};
|
|
694
|
+
blackList = {};
|
|
695
|
+
}
|
|
696
|
+
const m = new O(), A = new O(), h = new O();
|
|
697
|
+
function ee(t) {
|
|
698
|
+
switch (t) {
|
|
699
|
+
case s.WEB:
|
|
700
|
+
return m;
|
|
701
|
+
case s.MOBILE:
|
|
702
|
+
return A;
|
|
703
|
+
case s.PAD:
|
|
704
|
+
return h;
|
|
705
|
+
default:
|
|
706
|
+
return m;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
function y(t, o, r) {
|
|
710
|
+
t.events[o] = r.eventList, t.hooks[o] = r.hooks, t.whiteList[o] = r.whiteList, t.blackList[o] = r.blackList, t.propEditors[o] = r.propEditorList, t.schema[o] = r.widget, t.callback[o] = r.runCallback, t.beforeCreate[o] = r.beforeCreate, t.styleEditors[o] = r.styleEditorList, t.designerConfig[o] = r.designerConfig;
|
|
711
|
+
}
|
|
712
|
+
function Ie(t, o) {
|
|
713
|
+
y(m, o, t);
|
|
714
|
+
}
|
|
715
|
+
function be(t, o) {
|
|
716
|
+
y(A, o, t);
|
|
717
|
+
}
|
|
718
|
+
function Le(t, o) {
|
|
719
|
+
y(h, o, t);
|
|
720
|
+
}
|
|
721
|
+
function C(t, o) {
|
|
722
|
+
if (o) {
|
|
723
|
+
const { type: r } = o.schema;
|
|
724
|
+
t.events[r] = o.events, t.hooks[r] = o.hooks, t.whiteList[r] = o.whiteList, t.blackList[r] = o.blackList, t.propEditors[r] = o.propEditors, t.schema[r] = o.schema, t.callback[r] = o.callback, t.beforeCreate[r] = o.beforeCreate, t.styleEditors[r] = o.styleEditors, t.designerConfig[r] = o.designerConfig;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
function Re(t) {
|
|
728
|
+
C(m, t);
|
|
729
|
+
}
|
|
730
|
+
function Oe(t) {
|
|
731
|
+
C(A, t);
|
|
732
|
+
}
|
|
733
|
+
function Ae(t) {
|
|
734
|
+
C(h, t);
|
|
735
|
+
}
|
|
736
|
+
function he(t, o, r) {
|
|
737
|
+
return t.type === r && k(t, "preLocation") && new RegExp(`^${o}_`).test(t.preLocation);
|
|
738
|
+
}
|
|
739
|
+
function te(t) {
|
|
740
|
+
return [
|
|
741
|
+
c.MaterialFormField,
|
|
742
|
+
c.MaterialSubTableModalField,
|
|
743
|
+
c.DescriptionsFormField
|
|
744
|
+
].includes(t.materialType);
|
|
745
|
+
}
|
|
746
|
+
function oe(t) {
|
|
747
|
+
const o = /^\$\{(\S+)\}$/;
|
|
748
|
+
for (const r in t) {
|
|
749
|
+
const l = t[r];
|
|
750
|
+
o.test(l) && (t[r] = b(l.match(o)?.[1]));
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
function ye(t) {
|
|
754
|
+
const o = W(t);
|
|
755
|
+
o.id = I(o.type), o.alias = b(o.name), o.formItem && (o.props.label = b(o.name));
|
|
756
|
+
const r = ee(o.platform);
|
|
757
|
+
return r && r.beforeCreate?.[o.type]?.(o), oe(o.props), o;
|
|
758
|
+
}
|
|
759
|
+
function ne(t) {
|
|
760
|
+
return t.map((o) => ({ ...o })).filter((o) => (o.props?.model || (o.children = o.children && ne(o.children)), S(o)));
|
|
761
|
+
}
|
|
762
|
+
const S = (t) => !t.formItem;
|
|
763
|
+
function re(t) {
|
|
764
|
+
return t + "px";
|
|
765
|
+
}
|
|
766
|
+
function a(t) {
|
|
767
|
+
return N(t) ? "" : `${t}px !important`;
|
|
768
|
+
}
|
|
769
|
+
function _(t) {
|
|
770
|
+
return N(t) ? "" : `${t} !important`;
|
|
771
|
+
}
|
|
772
|
+
function g(t) {
|
|
773
|
+
return !t || N(t.borderWidth) ? "" : `${t.borderWidth}px ${t.borderStyle || "solid"} ${t.borderColor || "transparent"} !important`;
|
|
774
|
+
}
|
|
775
|
+
const ie = {
|
|
776
|
+
fontAttrs: [
|
|
777
|
+
"fontWeight",
|
|
778
|
+
"fontSize",
|
|
779
|
+
"color",
|
|
780
|
+
"textDecorationLine",
|
|
781
|
+
"textAlign"
|
|
782
|
+
],
|
|
783
|
+
mapAttrs: {
|
|
784
|
+
bold: {
|
|
785
|
+
attr: "fontWeight",
|
|
786
|
+
callback: (t) => t ? 700 : 400
|
|
787
|
+
},
|
|
788
|
+
italic: {
|
|
789
|
+
attr: "fontStyle",
|
|
790
|
+
callback: (t) => t ? "italic" : "normal"
|
|
791
|
+
},
|
|
792
|
+
textDecoration: {
|
|
793
|
+
attr: "textDecorationLine"
|
|
794
|
+
},
|
|
795
|
+
fontSize: {
|
|
796
|
+
attr: "fontSize",
|
|
797
|
+
callback: (t) => t ? re(t) : ""
|
|
798
|
+
},
|
|
799
|
+
align: {
|
|
800
|
+
attr: "textAlign"
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
function Ce(t, o = ie) {
|
|
805
|
+
if (!t) return {};
|
|
806
|
+
const r = {};
|
|
807
|
+
return Object.assign(r, K(t, o.fontAttrs)), typeof o.mapAttrs == "object" && Object.keys(o.mapAttrs).forEach((l) => {
|
|
808
|
+
const { attr: E, callback: p } = o.mapAttrs[l];
|
|
809
|
+
r[E] = typeof p == "function" ? p(t[l]) : t[l];
|
|
810
|
+
}), r;
|
|
811
|
+
}
|
|
812
|
+
function De(t = {}) {
|
|
813
|
+
const o = {};
|
|
814
|
+
for (const r in t)
|
|
815
|
+
o[r] = le(r, t[r]);
|
|
816
|
+
return o;
|
|
817
|
+
}
|
|
818
|
+
const ae = [
|
|
819
|
+
"opacity",
|
|
820
|
+
"zIndex",
|
|
821
|
+
"fontWeight",
|
|
822
|
+
"lineHeight",
|
|
823
|
+
"letterSpacing",
|
|
824
|
+
"wordSpacing",
|
|
825
|
+
"textAlign",
|
|
826
|
+
"textDecoration",
|
|
827
|
+
"textTransform",
|
|
828
|
+
"fontStyle",
|
|
829
|
+
"textDecorationLine"
|
|
830
|
+
];
|
|
831
|
+
function le(t, o) {
|
|
832
|
+
return M(o) || N(o) ? "" : ae.includes(t) ? o + " !important" : o + "px !important";
|
|
833
|
+
}
|
|
834
|
+
const pe = {
|
|
835
|
+
left: "flex-start",
|
|
836
|
+
center: "center",
|
|
837
|
+
right: "flex-end",
|
|
838
|
+
justify: "space-between"
|
|
839
|
+
};
|
|
840
|
+
function Se(t) {
|
|
841
|
+
return pe[t] || t;
|
|
842
|
+
}
|
|
843
|
+
function se(t) {
|
|
844
|
+
return {
|
|
845
|
+
position: _(t.position),
|
|
846
|
+
top: a(t.top),
|
|
847
|
+
left: a(t.left),
|
|
848
|
+
right: a(t.right),
|
|
849
|
+
bottom: a(t.bottom),
|
|
850
|
+
width: a(t.width),
|
|
851
|
+
height: a(t.height)
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
function de(t) {
|
|
855
|
+
return {
|
|
856
|
+
backgroundColor: _(t.backgroundColor),
|
|
857
|
+
marginTop: a(t.marginTop),
|
|
858
|
+
marginRight: a(t.marginRight),
|
|
859
|
+
marginBottom: a(t.marginBottom),
|
|
860
|
+
marginLeft: a(t.marginLeft),
|
|
861
|
+
paddingTop: a(t.paddingTop),
|
|
862
|
+
paddingRight: a(t.paddingRight),
|
|
863
|
+
paddingBottom: a(t.paddingBottom),
|
|
864
|
+
paddingLeft: a(t.paddingLeft)
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
function Ee(t) {
|
|
868
|
+
return {
|
|
869
|
+
borderLeft: g(t.borderLeft),
|
|
870
|
+
borderRight: g(t.borderRight),
|
|
871
|
+
borderBottom: g(t.borderBottom),
|
|
872
|
+
borderTop: g(t.borderTop),
|
|
873
|
+
borderTopRightRadius: a(t.borderTopRightRadius),
|
|
874
|
+
borderTopLeftRadius: a(t.borderTopLeftRadius),
|
|
875
|
+
borderBottomRightRadius: a(t.borderBottomRightRadius),
|
|
876
|
+
borderBottomLeftRadius: a(t.borderBottomLeftRadius)
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
function xe(t, o = []) {
|
|
880
|
+
const r = {
|
|
881
|
+
...se(t),
|
|
882
|
+
...de(t),
|
|
883
|
+
...Ee(t)
|
|
884
|
+
};
|
|
885
|
+
return o.forEach((l) => {
|
|
886
|
+
delete r[l];
|
|
887
|
+
}), Object.keys(r).forEach((l) => {
|
|
888
|
+
const E = r[l];
|
|
889
|
+
(M(E) || N(E)) && delete r[l];
|
|
890
|
+
}), r;
|
|
891
|
+
}
|
|
892
|
+
const Me = ({
|
|
893
|
+
name: t,
|
|
894
|
+
type: o,
|
|
895
|
+
hiddenCallback: r,
|
|
896
|
+
filterOptionsCallback: l,
|
|
897
|
+
groupName: E
|
|
898
|
+
}) => [
|
|
899
|
+
// 组件类型
|
|
900
|
+
{
|
|
901
|
+
component: "bind-cmp-type-editor",
|
|
902
|
+
name: t,
|
|
903
|
+
label: "sys.pageDesigner.bindCmpStyleLabel",
|
|
904
|
+
group: E || i.FIELD_CONFIG,
|
|
905
|
+
hidden: r || ((p) => [
|
|
906
|
+
n.TEXT,
|
|
907
|
+
n.USER,
|
|
908
|
+
n.USER_MULTI,
|
|
909
|
+
n.ORG,
|
|
910
|
+
n.ORG_MULTI
|
|
911
|
+
].includes(p.props.fieldType) && (p.props.bindFieldKey || !te(p) || p.props.fieldReadonly) ? !0 : t === "selectType" && p.platform !== s.WEB),
|
|
912
|
+
_config: {
|
|
913
|
+
bindCmpStyleKey: o,
|
|
914
|
+
filterOptionsCallback: l
|
|
915
|
+
},
|
|
916
|
+
changeCallback(p) {
|
|
917
|
+
if (![
|
|
918
|
+
n.BOOLEAN,
|
|
919
|
+
n.USER,
|
|
920
|
+
n.USER_MULTI,
|
|
921
|
+
n.ORG,
|
|
922
|
+
n.ORG_MULTI,
|
|
923
|
+
n.DATA_TABLE_FORMULA
|
|
924
|
+
].includes(p.props.fieldType) && [
|
|
925
|
+
n.EXPRESSION,
|
|
926
|
+
n.AGG,
|
|
927
|
+
n.INTEGER,
|
|
928
|
+
n.LONG
|
|
929
|
+
].includes(p.props.fieldType)) {
|
|
930
|
+
p.props.currency = "¥", p.props.displayTimeType = "d:h:m:s";
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
], _e = {
|
|
936
|
+
disabled: !1,
|
|
937
|
+
icon: "icon-park:all-application",
|
|
938
|
+
iconColor: "",
|
|
939
|
+
/**标题 */
|
|
940
|
+
title: "${sys.pageDesigner.button}",
|
|
941
|
+
buttonStyle: x.ORDINARY,
|
|
942
|
+
/**二次确认 */
|
|
943
|
+
confirm: !1,
|
|
944
|
+
confirmText: "",
|
|
945
|
+
// /**内置事件 */
|
|
946
|
+
// innerEvent: true,
|
|
947
|
+
/**系统事件类型 */
|
|
948
|
+
// sysMethedType: undefined,
|
|
949
|
+
// linkPage: '',
|
|
950
|
+
/**事件名称 */
|
|
951
|
+
// eventName: '',
|
|
952
|
+
hasIcon: !1,
|
|
953
|
+
hasText: !0,
|
|
954
|
+
type: Q.PRIMARY,
|
|
955
|
+
danger: !1,
|
|
956
|
+
size: R.DEFAULT,
|
|
957
|
+
enableCustomColor: !1,
|
|
958
|
+
backgroundColor: "",
|
|
959
|
+
fontColor: "",
|
|
960
|
+
...Z
|
|
961
|
+
}, Fe = [
|
|
962
|
+
{
|
|
963
|
+
component: "text-editor",
|
|
964
|
+
name: "title",
|
|
965
|
+
label: "sys.pageDesigner.buttonName",
|
|
966
|
+
group: i.BASIC,
|
|
967
|
+
_config: {
|
|
968
|
+
i18n: !0,
|
|
969
|
+
showCount: !0,
|
|
970
|
+
maxlength: 32
|
|
971
|
+
},
|
|
972
|
+
changeCallback: (t, o) => {
|
|
973
|
+
t.alias = o;
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
component: "button-type-editor",
|
|
978
|
+
name: {
|
|
979
|
+
type: "type",
|
|
980
|
+
danger: "danger",
|
|
981
|
+
icon: "icon",
|
|
982
|
+
label: "label",
|
|
983
|
+
hasText: "hasText",
|
|
984
|
+
hasIcon: "hasIcon"
|
|
985
|
+
},
|
|
986
|
+
label: "sys.pageDesigner.buttonType",
|
|
987
|
+
group: i.BUTTON
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
component: "icon-editor",
|
|
991
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
992
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
993
|
+
group: i.BUTTON,
|
|
994
|
+
// _config: {
|
|
995
|
+
// showColor: true,
|
|
996
|
+
// },
|
|
997
|
+
hidden: (t) => !t.props.hasIcon
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
component: "radio-bgc-editor",
|
|
1001
|
+
name: "size",
|
|
1002
|
+
label: "sys.pageDesigner.buttonSize",
|
|
1003
|
+
group: i.BUTTON,
|
|
1004
|
+
_config: {
|
|
1005
|
+
options: Object.values(R).map((t) => ({ value: t, label: "sys.pageDesigner." + t }))
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
], Be = [
|
|
1009
|
+
// {
|
|
1010
|
+
// component: 'permission-switch-editor',
|
|
1011
|
+
// label: 'sys.permission',
|
|
1012
|
+
// group: PropGroup.PERMISSION,
|
|
1013
|
+
// hidden: (widget) => {
|
|
1014
|
+
// return hiddenButtonProps(widget);
|
|
1015
|
+
// },
|
|
1016
|
+
// },
|
|
1017
|
+
{
|
|
1018
|
+
component: "permission-editor",
|
|
1019
|
+
label: "",
|
|
1020
|
+
group: i.PERMISSION,
|
|
1021
|
+
hidden: (t) => d(t)
|
|
1022
|
+
}
|
|
1023
|
+
], Ge = {
|
|
1024
|
+
disabled: !1,
|
|
1025
|
+
buttonTheme: P.DEFAULT,
|
|
1026
|
+
buttonType: U.DEFAULT,
|
|
1027
|
+
icon: "",
|
|
1028
|
+
iconColor: "",
|
|
1029
|
+
confirm: !1,
|
|
1030
|
+
confirmText: "",
|
|
1031
|
+
buttonStyle: x.ORDINARY,
|
|
1032
|
+
enableCustomColor: !1,
|
|
1033
|
+
backgroundColor: "",
|
|
1034
|
+
fontColor: ""
|
|
1035
|
+
}, Qe = [
|
|
1036
|
+
// {
|
|
1037
|
+
// component: 'switch-editor',
|
|
1038
|
+
// name: 'disabled',
|
|
1039
|
+
// label: 'sys.pageDesigner.disabled',
|
|
1040
|
+
// group: PropGroup.DISPLAY,
|
|
1041
|
+
// hidden: (widget): boolean => {
|
|
1042
|
+
// return hiddenButtonProps(widget);
|
|
1043
|
+
// },
|
|
1044
|
+
// },
|
|
1045
|
+
// {
|
|
1046
|
+
// component: 'radio-editor',
|
|
1047
|
+
// name: 'basic.buttonType',
|
|
1048
|
+
// label: 'sys.pageDesigner.buttonType',
|
|
1049
|
+
// group: PropGroup.ButtonStyle,
|
|
1050
|
+
// _config: {
|
|
1051
|
+
// options: Object.values(ButtonColorType).map((i) => {
|
|
1052
|
+
// return { value: i, label: 'sys.pageDesigner.' + i };
|
|
1053
|
+
// }),
|
|
1054
|
+
// },
|
|
1055
|
+
// hidden: (widget): boolean => {
|
|
1056
|
+
// return hiddenButtonProps(widget);
|
|
1057
|
+
// },
|
|
1058
|
+
// },
|
|
1059
|
+
// {
|
|
1060
|
+
// component: 'radio-editor',
|
|
1061
|
+
// name: 'buttonStyle',
|
|
1062
|
+
// label: 'sys.pageDesigner.buttonStyle',
|
|
1063
|
+
// group: PropGroup.ButtonStyle,
|
|
1064
|
+
// hidden: (widget): boolean => {
|
|
1065
|
+
// return hiddenButtonProps(widget) || platform.value === Platform.MOBILE;
|
|
1066
|
+
// },
|
|
1067
|
+
// _config: {
|
|
1068
|
+
// options: Object.values(ButtonStyle).map((key) => {
|
|
1069
|
+
// return { label: 'sys.pageDesigner.' + key, value: key };
|
|
1070
|
+
// }),
|
|
1071
|
+
// },
|
|
1072
|
+
// },
|
|
1073
|
+
{
|
|
1074
|
+
component: "button-type-editor",
|
|
1075
|
+
name: {
|
|
1076
|
+
type: "type",
|
|
1077
|
+
danger: "danger",
|
|
1078
|
+
icon: "icon",
|
|
1079
|
+
label: "label",
|
|
1080
|
+
hasText: "hasText",
|
|
1081
|
+
hasIcon: "hasIcon"
|
|
1082
|
+
},
|
|
1083
|
+
label: "sys.pageDesigner.buttonType",
|
|
1084
|
+
group: i.ButtonStyle,
|
|
1085
|
+
hidden: (t) => d(t)
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
component: "icon-editor",
|
|
1089
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
1090
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
1091
|
+
group: i.ButtonStyle,
|
|
1092
|
+
hidden: (t) => !t.props.hasIcon || d(t),
|
|
1093
|
+
_config: {
|
|
1094
|
+
clearable: !1
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
component: "switch-editor",
|
|
1099
|
+
name: "enableCustomColor",
|
|
1100
|
+
label: "sys.pageDesigner.customBtnColor",
|
|
1101
|
+
group: i.ButtonStyle,
|
|
1102
|
+
hidden: (t) => d(t)
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
component: "button-color-editor",
|
|
1106
|
+
name: "fontColor",
|
|
1107
|
+
label: "sys.pageDesigner.buttonNameColor",
|
|
1108
|
+
group: i.ButtonStyle,
|
|
1109
|
+
_config: {
|
|
1110
|
+
isInRow: !0
|
|
1111
|
+
},
|
|
1112
|
+
hidden: (t) => !t.props.enableCustomColor
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
component: "button-color-editor",
|
|
1116
|
+
name: "backgroundColor",
|
|
1117
|
+
label: "sys.pageDesigner.buttonStyleColor",
|
|
1118
|
+
group: i.ButtonStyle,
|
|
1119
|
+
_config: {
|
|
1120
|
+
isInRow: !0
|
|
1121
|
+
},
|
|
1122
|
+
hidden: (t) => !t.props.enableCustomColor || t.props.type === "link"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
component: "radio-bgc-editor",
|
|
1126
|
+
name: "size",
|
|
1127
|
+
label: "sys.pageDesigner.buttonSize",
|
|
1128
|
+
group: i.ButtonStyle,
|
|
1129
|
+
hidden: (t) => d(t),
|
|
1130
|
+
_config: {
|
|
1131
|
+
options: Object.values(R).map((t) => ({ value: t, label: "sys.pageDesigner." + t }))
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
component: "switch-editor",
|
|
1136
|
+
name: "confirm",
|
|
1137
|
+
label: "sys.pageDesigner.confirm",
|
|
1138
|
+
group: i.ButtonStyle,
|
|
1139
|
+
hidden: (t) => d(t),
|
|
1140
|
+
_config: {
|
|
1141
|
+
tooltip: "sys.pageDesigner.buttonConfirm"
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
component: "texteare-editor",
|
|
1146
|
+
name: "confirmText",
|
|
1147
|
+
label: "sys.pageDesigner.regHint",
|
|
1148
|
+
group: i.ButtonStyle,
|
|
1149
|
+
_config: {
|
|
1150
|
+
i18n: !0,
|
|
1151
|
+
placeholder: "sys.pageDesigner.confirmTodo"
|
|
1152
|
+
},
|
|
1153
|
+
hidden: (t) => !t.props.confirm || d(t)
|
|
1154
|
+
}
|
|
1155
|
+
// {
|
|
1156
|
+
// component: 'select-editor',
|
|
1157
|
+
// name: 'basic.buttonTheme',
|
|
1158
|
+
// label: 'sys.pageDesigner.buttonTheme',
|
|
1159
|
+
// group: PropGroup.ButtonStyle,
|
|
1160
|
+
// _config: {
|
|
1161
|
+
// options: Object.values(ButtonColorTheme).map((i) => {
|
|
1162
|
+
// return { value: i, label: 'sys.pageDesigner.' + i };
|
|
1163
|
+
// }),
|
|
1164
|
+
// },
|
|
1165
|
+
// hidden: (widget): boolean => {
|
|
1166
|
+
// return hiddenButtonProps(widget);
|
|
1167
|
+
// },
|
|
1168
|
+
// },
|
|
1169
|
+
// {
|
|
1170
|
+
// component: 'icon-editor',
|
|
1171
|
+
// name: { icon: 'basic.icon', iconColor: 'basic.iconColor' },
|
|
1172
|
+
// label: 'sys.pageDesigner.icon',
|
|
1173
|
+
// group: PropGroup.ButtonStyle,
|
|
1174
|
+
// _config: {
|
|
1175
|
+
// showColor: true,
|
|
1176
|
+
// },
|
|
1177
|
+
// hidden: (widget): boolean => {
|
|
1178
|
+
// return hiddenButtonProps(widget);
|
|
1179
|
+
// },
|
|
1180
|
+
// },
|
|
1181
|
+
], Ue = [
|
|
1182
|
+
{
|
|
1183
|
+
component: "position-editor",
|
|
1184
|
+
name: "position",
|
|
1185
|
+
label: "sys.pageDesigner.position",
|
|
1186
|
+
group: T.LAYOUT,
|
|
1187
|
+
// 按钮容器中的按钮不需要样式属性
|
|
1188
|
+
hidden: (t) => !!t.props.parentWidgetId || !!t.preLocation
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
component: "margin-editor",
|
|
1192
|
+
group: T.MARGIN,
|
|
1193
|
+
// 按钮容器中的按钮不需要样式属性
|
|
1194
|
+
hidden: (t) => !!t.props.parentWidgetId || !!t.preLocation,
|
|
1195
|
+
_config: {
|
|
1196
|
+
hiddenMarginOrPadding: "padding"
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
], Pe = {
|
|
1200
|
+
install() {
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
1203
|
+
export {
|
|
1204
|
+
pe as ALIGN_TO_FLEX_MAP,
|
|
1205
|
+
Te as SEARCH_TYPE,
|
|
1206
|
+
_ as addImportant,
|
|
1207
|
+
a as addPxUnit,
|
|
1208
|
+
Fe as baseBtnEditor,
|
|
1209
|
+
_e as baseBtnProp,
|
|
1210
|
+
Qe as buttonEditor,
|
|
1211
|
+
Ge as buttonProps,
|
|
1212
|
+
Ue as buttonStyleEditor,
|
|
1213
|
+
ye as cloneWidget,
|
|
1214
|
+
Ne as commonStyle,
|
|
1215
|
+
ne as deepFindNotField,
|
|
1216
|
+
Pe as default,
|
|
1217
|
+
me as displayEditor,
|
|
1218
|
+
Z as displayProps,
|
|
1219
|
+
Ce as extractFontStyle,
|
|
1220
|
+
g as formatBorder,
|
|
1221
|
+
Ee as generateBorderStyles,
|
|
1222
|
+
se as generatePositionStyles,
|
|
1223
|
+
de as generateSpacingStyles,
|
|
1224
|
+
xe as generateWrapperStyle,
|
|
1225
|
+
Me as getBindCmpTypeEditor,
|
|
1226
|
+
he as getCompPos,
|
|
1227
|
+
ee as getWidgetInfo,
|
|
1228
|
+
d as hiddenButtonProps,
|
|
1229
|
+
te as isFormFieldType,
|
|
1230
|
+
le as makeStyleProp,
|
|
1231
|
+
A as mobileWidgetInfo,
|
|
1232
|
+
fe as modalCfg,
|
|
1233
|
+
ge as notNeedPxStyle,
|
|
1234
|
+
q as padVTableSupportEditFieldTypes,
|
|
1235
|
+
h as padWidgetInfo,
|
|
1236
|
+
Be as permissionEditor,
|
|
1237
|
+
De as propsToStyle,
|
|
1238
|
+
re as pxToVw,
|
|
1239
|
+
Oe as registerMobilePluginWidgetItem,
|
|
1240
|
+
be as registerMobileWidgetItem,
|
|
1241
|
+
Ae as registerPadPluginWidgetItem,
|
|
1242
|
+
Le as registerPadWidgetItem,
|
|
1243
|
+
C as registerPluginWidgetItem,
|
|
1244
|
+
Re as registerWebPluginWidgetItem,
|
|
1245
|
+
Ie as registerWebWidgetItem,
|
|
1246
|
+
y as registerWidgetItem,
|
|
1247
|
+
Se as transAlign2flex,
|
|
1248
|
+
oe as transformI18n,
|
|
1249
|
+
m as webWidgetInfo
|
|
1250
|
+
};
|