@gct-paas/schema 0.1.4-dev.9 → 0.1.5-dev.1

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.
Files changed (73) hide show
  1. package/dist/index.esm.min.js +1 -0
  2. package/es/constants/design.d.ts +26 -0
  3. package/es/constants/design.mjs +30 -0
  4. package/es/constants/index.d.ts +24 -1
  5. package/es/constants/index.mjs +410 -18
  6. package/es/index.d.ts +1 -1
  7. package/es/index.mjs +13 -19
  8. package/es/interface/design/i-design-container-node.d.ts +13 -0
  9. package/es/interface/design/i-design-data.d.ts +44 -0
  10. package/es/interface/design/i-design-editor-data.d.ts +20 -0
  11. package/es/interface/design/i-design-editor-node.d.ts +15 -0
  12. package/es/interface/design/i-design-node-data.d.ts +19 -0
  13. package/es/interface/design/i-design-node.d.ts +80 -0
  14. package/es/interface/design/i-design-page-node-data.d.ts +15 -0
  15. package/es/interface/design/i-design-tree-item.d.ts +26 -0
  16. package/es/interface/design/i-drag-data-item.d.ts +46 -0
  17. package/es/interface/design/index.d.ts +9 -0
  18. package/es/interface/designer.d.ts +1 -1
  19. package/es/interface/index.d.ts +2 -0
  20. package/es/interface/modal/i-modal-body.d.ts +1 -1
  21. package/es/interface/relationship-diagram-config/i-relationship-diagram-node.d.ts +82 -0
  22. package/es/interface/relationship-diagram-config/i-rule-config.d.ts +135 -0
  23. package/es/interface/relationship-diagram-config/index.d.ts +2 -0
  24. package/es/interface/schema/widget-props/i-card-list-props.d.ts +79 -0
  25. package/es/interface/schema/widget-props/i-form-container-props.d.ts +19 -5
  26. package/es/interface/schema/widget-props/i-form-input-props.d.ts +1 -1
  27. package/es/interface/schema/widget-props/i-search-widget-props.d.ts +6 -0
  28. package/es/interface/schema/widget-props/i-table-props.d.ts +6 -6
  29. package/es/interface/schema/widget-props/index.d.ts +1 -0
  30. package/es/interface/schema/widget-types.d.ts +36 -7
  31. package/es/interface/widget/i-common.d.ts +2 -1
  32. package/es/interface/widget/i-editors.d.ts +3 -2
  33. package/es/interface/widget/i-props.d.ts +13 -32
  34. package/es/interface/widget/i-schemas.d.ts +2 -0
  35. package/es/interface/widget/i-styles.d.ts +1 -0
  36. package/es/interface/widget/index.d.ts +3 -1
  37. package/es/utils/field-editor-override-registry/field-editor-override-registry.d.ts +36 -0
  38. package/es/utils/field-editor-override-registry/field-editor-override-registry.mjs +29 -0
  39. package/es/utils/index.d.ts +1 -0
  40. package/es/utils/index.mjs +6 -0
  41. package/es/utils/schema/index.d.ts +4 -1
  42. package/es/utils/schema/index.mjs +75 -39
  43. package/es/utils/schema/search.d.ts +9 -0
  44. package/es/utils/schema/search.mjs +146 -0
  45. package/es/utils/schema/utils.d.ts +21 -0
  46. package/es/utils/schema/utils.mjs +182 -0
  47. package/es/utils/schema-style/index.mjs +203 -127
  48. package/es/utils/widget-info/widget-info.mjs +132 -57
  49. package/package.json +12 -13
  50. package/dist/index.esm.min.mjs +0 -898
  51. package/dist/index.min.cjs +0 -1
  52. package/dist/index.system.min.js +0 -1
  53. package/es/schema/common-config/base-button-config.d.ts +0 -3
  54. package/es/schema/common-config/base-button-config.mjs +0 -84
  55. package/es/schema/common-config/button-editor-config.d.ts +0 -4
  56. package/es/schema/common-config/button-editor-config.mjs +0 -206
  57. package/es/schema/common-config/button-props-func.d.ts +0 -5
  58. package/es/schema/common-config/button-props-func.mjs +0 -11
  59. package/es/schema/common-config/common-field-editor-config.d.ts +0 -10
  60. package/es/schema/common-config/common-field-editor-config.mjs +0 -61
  61. package/es/schema/common-config/common-style.d.ts +0 -3
  62. package/es/schema/common-config/common-style.mjs +0 -85
  63. package/es/schema/common-config/display-editor-config.d.ts +0 -3
  64. package/es/schema/common-config/display-editor-config.mjs +0 -89
  65. package/es/schema/common-config/permission-editor-config.d.ts +0 -2
  66. package/es/schema/common-config/permission-editor-config.mjs +0 -23
  67. package/es/schema/index.d.ts +0 -9
  68. package/es/schema/modal/modal-body.d.ts +0 -2
  69. package/es/schema/modal/modal-body.mjs +0 -9
  70. package/es/schema/modal/modal-footer.d.ts +0 -2
  71. package/es/schema/modal/modal-footer.mjs +0 -9
  72. package/es/schema/modal/modal.d.ts +0 -8
  73. package/es/schema/modal/modal.mjs +0 -182
@@ -1,898 +0,0 @@
1
- import { BuiltinType as E, Platform as s, PropGroup as n, StyleGroup as f, buildShortUUID as h, BorderStyle as u, TagTypeEnum as F, TextDecoration as I, FIELD_TYPE as r, Dependency_ENUM as m, ASSIGNMENTSTRATEGY_ENUM as _, MaterialEnum as c, FormComponents as x, t as y, ButtonSize as L, ButtonType as W, ButtonStyle as A, ButtonColorType as k, ButtonColorTheme as P } from "@gct-paas/core";
2
- import { cloneDeep as U, has as G, isEmpty as g, pick as v, isNil as B } from "lodash-es";
3
- const z = {
4
- id: "",
5
- type: E.MODAL_BODY,
6
- children: []
7
- }, j = {
8
- id: "",
9
- type: E.MODAL_FOOTER,
10
- children: []
11
- }, $ = {
12
- id: "",
13
- /**默认是WEB 添加的时候会根据当前环境改变 */
14
- platform: s.WEB,
15
- /**系统用的name */
16
- name: "sys.pageDesigner.modal",
17
- alias: "",
18
- /**用户新建编辑的name */
19
- modalName: "",
20
- type: E.MODAL,
21
- js: "",
22
- css: "",
23
- children: [z, j],
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
- }, Y = [
52
- {
53
- component: "text-editor",
54
- name: "modalTitle",
55
- label: "sys.pageDesigner.modalTitleName",
56
- group: n.BASIC,
57
- _config: {
58
- showCount: !0,
59
- maxlength: 32
60
- },
61
- hidden: (e) => e.props.isSubTableModal
62
- },
63
- {
64
- component: "input-unit-editor",
65
- name: { unitType: "unitType", modalWidth: "modalWidth" },
66
- label: "sys.pageDesigner.modalWidthProp",
67
- group: n.MODAL,
68
- hidden: (e) => e.platform === s.MOBILE
69
- },
70
- {
71
- component: "input-unit-editor",
72
- name: { unitType: "mUnitType", modalWidth: "mModalWidth" },
73
- label: "sys.pageDesigner.modalHeightProp",
74
- group: n.MODAL,
75
- hidden: (e) => e.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: n.MODALTITLECONFIG,
85
- _config: {
86
- i18n: !0
87
- },
88
- hidden: (e) => !e.props.isSubTableModal
89
- },
90
- {
91
- component: "text-editor",
92
- name: "editModalTitle",
93
- label: "sys.pageDesigner.editModalTitle",
94
- group: n.MODALTITLECONFIG,
95
- _config: {
96
- i18n: !0
97
- },
98
- hidden: (e) => !e.props.isSubTableModal
99
- },
100
- {
101
- component: "select-editor",
102
- name: "openMode",
103
- label: "sys.appDesigner.openMode",
104
- group: n.MODAL,
105
- hidden: (e) => e.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: (e, o) => {
119
- o === "drawer" ? (e.props.unitType = "%", e.props.modalWidth = 80) : (e.props.unitType = "px", e.props.modalWidth = 800);
120
- }
121
- },
122
- {
123
- component: "switch-editor",
124
- name: "hasFooter",
125
- label: "sys.pageDesigner.operateButton",
126
- group: n.BUTTON,
127
- hidden: (e) => e.props.isSubTableModal
128
- }
129
- ], X = [
130
- {
131
- component: "color-editor",
132
- name: "backgroundColor",
133
- label: "sys.pageDesigner.backgroundColor",
134
- group: f.BACKGROUND
135
- },
136
- {
137
- component: "margin-editor",
138
- group: f.MARGIN,
139
- _config: {
140
- hiddenMarginOrPadding: "margin"
141
- }
142
- }
143
- ], H = [
144
- {
145
- name: "onMounted",
146
- title: "sys.pageDesigner.onMounted",
147
- params: []
148
- }
149
- ], K = () => {
150
- }, V = (e) => {
151
- e.children[0].id = h(e.children[0].type), e.children[1].id = h(e.children[1].type);
152
- }, J = {
153
- basicProps: {
154
- key_label: "弹窗",
155
- alias_hidden: !0
156
- }
157
- }, me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
158
- __proto__: null,
159
- beforeCreate: V,
160
- designerConfig: J,
161
- eventList: H,
162
- propEditorList: Y,
163
- runCallback: K,
164
- styleEditorList: X,
165
- widget: $
166
- }, Symbol.toStringTag, { value: "Module" }));
167
- function p(e) {
168
- return Object.prototype.hasOwnProperty.call(e.props, "model") ? !e.props.model : Object.prototype.hasOwnProperty.call(e.props, "refForm") ? !e.props.refForm : !1;
169
- }
170
- const ge = {
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: I.NONE,
195
- color: ""
196
- },
197
- contentFont: {
198
- align: "left",
199
- fontSize: "",
200
- bold: !1,
201
- italic: !1,
202
- textDecoration: I.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
- }, be = [
241
- "position",
242
- "backgroundColor",
243
- "bold",
244
- "italic",
245
- "textDecoration",
246
- "color",
247
- "borderStyle",
248
- "borderColor"
249
- ], Q = [
250
- r.TEXT,
251
- r.LONG_TEXT,
252
- r.INTEGER,
253
- r.LONG,
254
- r.DOUBLE,
255
- r.DECIMAL,
256
- r.BOOLEAN,
257
- r.DATE,
258
- r.TIME,
259
- r.DATE_TIME,
260
- r.USER,
261
- r.USER_MULTI,
262
- r.SERIAL
263
- ], q = {
264
- deviceConnectivity: !1,
265
- ////显隐配置start
266
- hidden: !1,
267
- // displayType: DisplayType.CONFIG,
268
- // displayRule: '',
269
- componentDependency: {
270
- sortDependency: [],
271
- configDependency: {
272
- /**隐藏 */
273
- [m.HIDDEN]: {
274
- expression: ""
275
- },
276
- /**只读 */
277
- [m.READONLY]: {
278
- expression: ""
279
- },
280
- /**禁用 */
281
- [m.DISABLED]: {
282
- expression: ""
283
- },
284
- /**必填 */
285
- [m.REQUIRED]: {
286
- expression: ""
287
- },
288
- [m.ASSIGNMENT]: {
289
- expression: "",
290
- strategy: _.alwaysCover
291
- }
292
- }
293
- }
294
- }, Z = [
295
- r.TEXT,
296
- r.LONG_TEXT,
297
- r.INTEGER,
298
- r.LONG,
299
- r.DOUBLE,
300
- r.DECIMAL,
301
- r.BOOLEAN,
302
- r.DATE,
303
- r.DATE_TIME,
304
- r.MASTERSLAVE
305
- ], fe = [
306
- {
307
- component: "dependency-editor",
308
- name: "componentDependency",
309
- label: "",
310
- group: n.COMPONENTDEPENDENCY,
311
- hidden: (e) => e.materialType === c.MaterialEmbedTableField || e.type === x.Form && e.preLocation ? !0 : p(e) || e.props.field === "operating_state_"
312
- },
313
- {
314
- component: "switch-editor",
315
- name: "notSubmitInHide",
316
- label: "sys.pageDesigner.submitWhenHidden",
317
- group: n.FIELD_CONFIG,
318
- hidden(e) {
319
- return !e.isField || !e.props.field || e.props.bindFieldKey || e.props.fieldReadonly || e.materialType === c.cardListFormField || [
320
- r.EXPRESSION_CONDITION,
321
- r.SERIALRULE,
322
- r.LABEL_TEMPLATE
323
- ].includes(e.props.fieldType) || !Q.includes(e.props.fieldType);
324
- }
325
- },
326
- {
327
- component: "switch-editor",
328
- name: "deviceConnectivity",
329
- label: "sys.pageDesigner.deviceConnectivity",
330
- group: n.FIELD_CONFIG,
331
- hidden: (e) => e.platform !== s.WEB || ![c.MaterialFormField].includes(e.materialType) || !Z.includes(e.props.fieldType)
332
- }
333
- ];
334
- class D {
335
- events = {};
336
- propEditors = {};
337
- schema = {};
338
- callback = {};
339
- beforeCreate = {};
340
- styleEditors = {};
341
- designerConfig = {};
342
- hooks = {};
343
- whiteList = {};
344
- blackList = {};
345
- }
346
- const T = new D(), S = new D(), C = new D();
347
- function w(e) {
348
- switch (e) {
349
- case s.WEB:
350
- return T;
351
- case s.MOBILE:
352
- return S;
353
- case s.PAD:
354
- return C;
355
- default:
356
- return T;
357
- }
358
- }
359
- function O(e, o, t) {
360
- e.events[o] = t.eventList, e.hooks[o] = t.hooks, e.whiteList[o] = t.whiteList, e.blackList[o] = t.blackList, e.propEditors[o] = t.propEditorList, e.schema[o] = t.widget, e.callback[o] = t.runCallback, e.beforeCreate[o] = t.beforeCreate, e.styleEditors[o] = t.styleEditorList, e.designerConfig[o] = t.designerConfig;
361
- }
362
- function Te(e, o) {
363
- O(T, o, e);
364
- }
365
- function he(e, o) {
366
- O(S, o, e);
367
- }
368
- function ye(e, o) {
369
- O(C, o, e);
370
- }
371
- function R(e, o) {
372
- if (o) {
373
- const { type: t } = o.schema;
374
- e.events[t] = o.events, e.hooks[t] = o.hooks, e.whiteList[t] = o.whiteList, e.blackList[t] = o.blackList, e.propEditors[t] = o.propEditors, e.schema[t] = o.schema, e.callback[t] = o.callback, e.beforeCreate[t] = o.beforeCreate, e.styleEditors[t] = o.styleEditors, e.designerConfig[t] = o.designerConfig;
375
- }
376
- }
377
- function Ee(e) {
378
- R(T, e);
379
- }
380
- function Le(e) {
381
- R(S, e);
382
- }
383
- function De(e) {
384
- R(C, e);
385
- }
386
- function Se(e, o, t) {
387
- return e.type === t && G(e, "preLocation") && new RegExp(`^${o}_`).test(e.preLocation);
388
- }
389
- function ee(e) {
390
- return [
391
- c.MaterialFormField,
392
- c.MaterialSubTableModalField,
393
- c.DescriptionsFormField
394
- ].includes(e.materialType);
395
- }
396
- function oe(e) {
397
- const o = /^\$\{(\S+)\}$/;
398
- for (const t in e) {
399
- const a = e[t];
400
- o.test(a) && (e[t] = y(a.match(o)?.[1]));
401
- }
402
- }
403
- function Ce(e) {
404
- const o = U(e);
405
- o.id = h(o.type), o.alias = y(o.name), o.formItem && (o.props.label = y(o.name));
406
- const t = w(o.platform);
407
- return t && t.beforeCreate?.[o.type]?.(o), oe(o.props), o;
408
- }
409
- function te(e) {
410
- return e.map((o) => ({ ...o })).filter((o) => (o.props?.model || (o.children = o.children && te(o.children)), N(o)));
411
- }
412
- const N = (e) => !e.formItem;
413
- function re(e) {
414
- return e + "px";
415
- }
416
- function i(e) {
417
- return g(e) ? "" : `${e}px !important`;
418
- }
419
- function M(e) {
420
- return g(e) ? "" : `${e} !important`;
421
- }
422
- function b(e) {
423
- return !e || g(e.borderWidth) ? "" : `${e.borderWidth}px ${e.borderStyle || "solid"} ${e.borderColor || "transparent"} !important`;
424
- }
425
- const ne = {
426
- fontAttrs: [
427
- "fontWeight",
428
- "fontSize",
429
- "color",
430
- "textDecorationLine",
431
- "textAlign"
432
- ],
433
- mapAttrs: {
434
- bold: {
435
- attr: "fontWeight",
436
- callback: (e) => e ? 700 : 400
437
- },
438
- italic: {
439
- attr: "fontStyle",
440
- callback: (e) => e ? "italic" : "normal"
441
- },
442
- textDecoration: {
443
- attr: "textDecorationLine"
444
- },
445
- fontSize: {
446
- attr: "fontSize",
447
- callback: (e) => e ? re(e) : ""
448
- },
449
- align: {
450
- attr: "textAlign"
451
- }
452
- }
453
- };
454
- function Oe(e, o = ne) {
455
- if (!e) return {};
456
- const t = {};
457
- return Object.assign(t, v(e, o.fontAttrs)), typeof o.mapAttrs == "object" && Object.keys(o.mapAttrs).forEach((a) => {
458
- const { attr: d, callback: l } = o.mapAttrs[a];
459
- t[d] = typeof l == "function" ? l(e[a]) : e[a];
460
- }), t;
461
- }
462
- function Re(e = {}) {
463
- const o = {};
464
- for (const t in e)
465
- o[t] = ae(t, e[t]);
466
- return o;
467
- }
468
- const ie = [
469
- "opacity",
470
- "zIndex",
471
- "fontWeight",
472
- "lineHeight",
473
- "letterSpacing",
474
- "wordSpacing",
475
- "textAlign",
476
- "textDecoration",
477
- "textTransform",
478
- "fontStyle",
479
- "textDecorationLine"
480
- ];
481
- function ae(e, o) {
482
- return B(o) || g(o) ? "" : ie.includes(e) ? o + " !important" : o + "px !important";
483
- }
484
- const le = {
485
- left: "flex-start",
486
- center: "center",
487
- right: "flex-end",
488
- justify: "space-between"
489
- };
490
- function Ie(e) {
491
- return le[e] || e;
492
- }
493
- function se(e) {
494
- return {
495
- position: M(e.position),
496
- top: i(e.top),
497
- left: i(e.left),
498
- right: i(e.right),
499
- bottom: i(e.bottom),
500
- width: i(e.width),
501
- height: i(e.height)
502
- };
503
- }
504
- function pe(e) {
505
- return {
506
- backgroundColor: M(e.backgroundColor),
507
- marginTop: i(e.marginTop),
508
- marginRight: i(e.marginRight),
509
- marginBottom: i(e.marginBottom),
510
- marginLeft: i(e.marginLeft),
511
- paddingTop: i(e.paddingTop),
512
- paddingRight: i(e.paddingRight),
513
- paddingBottom: i(e.paddingBottom),
514
- paddingLeft: i(e.paddingLeft)
515
- };
516
- }
517
- function de(e) {
518
- return {
519
- borderLeft: b(e.borderLeft),
520
- borderRight: b(e.borderRight),
521
- borderBottom: b(e.borderBottom),
522
- borderTop: b(e.borderTop),
523
- borderTopRightRadius: i(e.borderTopRightRadius),
524
- borderTopLeftRadius: i(e.borderTopLeftRadius),
525
- borderBottomRightRadius: i(e.borderBottomRightRadius),
526
- borderBottomLeftRadius: i(e.borderBottomLeftRadius)
527
- };
528
- }
529
- function Ne(e, o = []) {
530
- const t = {
531
- ...se(e),
532
- ...pe(e),
533
- ...de(e)
534
- };
535
- return o.forEach((a) => {
536
- delete t[a];
537
- }), Object.keys(t).forEach((a) => {
538
- const d = t[a];
539
- (B(d) || g(d)) && delete t[a];
540
- }), t;
541
- }
542
- const Ae = ({
543
- name: e,
544
- type: o,
545
- hiddenCallback: t,
546
- filterOptionsCallback: a,
547
- groupName: d
548
- }) => [
549
- // 组件类型
550
- {
551
- component: "bind-cmp-type-editor",
552
- name: e,
553
- label: "sys.pageDesigner.bindCmpStyleLabel",
554
- group: d || n.FIELD_CONFIG,
555
- hidden: t || ((l) => [
556
- r.TEXT,
557
- r.USER,
558
- r.USER_MULTI,
559
- r.ORG,
560
- r.ORG_MULTI
561
- ].includes(l.props.fieldType) && (l.props.bindFieldKey || !ee(l) || l.props.fieldReadonly) ? !0 : e === "selectType" && l.platform !== s.WEB),
562
- _config: {
563
- bindCmpStyleKey: o,
564
- filterOptionsCallback: a
565
- },
566
- changeCallback(l) {
567
- if (![
568
- r.BOOLEAN,
569
- r.USER,
570
- r.USER_MULTI,
571
- r.ORG,
572
- r.ORG_MULTI,
573
- r.DATA_TABLE_FORMULA
574
- ].includes(l.props.fieldType) && [
575
- r.EXPRESSION,
576
- r.AGG,
577
- r.INTEGER,
578
- r.LONG
579
- ].includes(l.props.fieldType)) {
580
- l.props.currency = "¥", l.props.displayTimeType = "d:h:m:s";
581
- return;
582
- }
583
- }
584
- }
585
- ], Be = {
586
- disabled: !1,
587
- icon: "icon-park:all-application",
588
- iconColor: "",
589
- /**标题 */
590
- title: "${sys.pageDesigner.button}",
591
- buttonStyle: A.ORDINARY,
592
- /**二次确认 */
593
- confirm: !1,
594
- confirmText: "",
595
- // /**内置事件 */
596
- // innerEvent: true,
597
- /**系统事件类型 */
598
- // sysMethedType: undefined,
599
- // linkPage: '',
600
- /**事件名称 */
601
- // eventName: '',
602
- hasIcon: !1,
603
- hasText: !0,
604
- type: W.PRIMARY,
605
- danger: !1,
606
- size: L.DEFAULT,
607
- enableCustomColor: !1,
608
- backgroundColor: "",
609
- fontColor: "",
610
- ...q
611
- }, Me = [
612
- {
613
- component: "text-editor",
614
- name: "title",
615
- label: "sys.pageDesigner.buttonName",
616
- group: n.BASIC,
617
- _config: {
618
- i18n: !0,
619
- showCount: !0,
620
- maxlength: 32
621
- },
622
- changeCallback: (e, o) => {
623
- e.alias = o;
624
- }
625
- },
626
- {
627
- component: "button-type-editor",
628
- name: {
629
- type: "type",
630
- danger: "danger",
631
- icon: "icon",
632
- label: "label",
633
- hasText: "hasText",
634
- hasIcon: "hasIcon"
635
- },
636
- label: "sys.pageDesigner.buttonType",
637
- group: n.BUTTON
638
- },
639
- {
640
- component: "icon-editor",
641
- name: { icon: "icon", iconColor: "iconColor" },
642
- label: "sys.pageDesigner.buttonIcon",
643
- group: n.BUTTON,
644
- // _config: {
645
- // showColor: true,
646
- // },
647
- hidden: (e) => !e.props.hasIcon
648
- },
649
- {
650
- component: "radio-bgc-editor",
651
- name: "size",
652
- label: "sys.pageDesigner.buttonSize",
653
- group: n.BUTTON,
654
- _config: {
655
- options: Object.values(L).map((e) => ({ value: e, label: "sys.pageDesigner." + e }))
656
- }
657
- }
658
- ], Fe = [
659
- // {
660
- // component: 'permission-switch-editor',
661
- // label: 'sys.permission',
662
- // group: PropGroup.PERMISSION,
663
- // hidden: (widget) => {
664
- // return hiddenButtonProps(widget);
665
- // },
666
- // },
667
- {
668
- component: "permission-editor",
669
- label: "",
670
- group: n.PERMISSION,
671
- hidden: (e) => p(e)
672
- }
673
- ], _e = {
674
- disabled: !1,
675
- buttonTheme: P.DEFAULT,
676
- buttonType: k.DEFAULT,
677
- icon: "",
678
- iconColor: "",
679
- confirm: !1,
680
- confirmText: "",
681
- buttonStyle: A.ORDINARY,
682
- enableCustomColor: !1,
683
- backgroundColor: "",
684
- fontColor: ""
685
- }, xe = [
686
- // {
687
- // component: 'switch-editor',
688
- // name: 'disabled',
689
- // label: 'sys.pageDesigner.disabled',
690
- // group: PropGroup.DISPLAY,
691
- // hidden: (widget): boolean => {
692
- // return hiddenButtonProps(widget);
693
- // },
694
- // },
695
- // {
696
- // component: 'radio-editor',
697
- // name: 'basic.buttonType',
698
- // label: 'sys.pageDesigner.buttonType',
699
- // group: PropGroup.ButtonStyle,
700
- // _config: {
701
- // options: Object.values(ButtonColorType).map((i) => {
702
- // return { value: i, label: 'sys.pageDesigner.' + i };
703
- // }),
704
- // },
705
- // hidden: (widget): boolean => {
706
- // return hiddenButtonProps(widget);
707
- // },
708
- // },
709
- // {
710
- // component: 'radio-editor',
711
- // name: 'buttonStyle',
712
- // label: 'sys.pageDesigner.buttonStyle',
713
- // group: PropGroup.ButtonStyle,
714
- // hidden: (widget): boolean => {
715
- // return hiddenButtonProps(widget) || platform.value === Platform.MOBILE;
716
- // },
717
- // _config: {
718
- // options: Object.values(ButtonStyle).map((key) => {
719
- // return { label: 'sys.pageDesigner.' + key, value: key };
720
- // }),
721
- // },
722
- // },
723
- {
724
- component: "button-type-editor",
725
- name: {
726
- type: "type",
727
- danger: "danger",
728
- icon: "icon",
729
- label: "label",
730
- hasText: "hasText",
731
- hasIcon: "hasIcon"
732
- },
733
- label: "sys.pageDesigner.buttonType",
734
- group: n.ButtonStyle,
735
- hidden: (e) => p(e)
736
- },
737
- {
738
- component: "icon-editor",
739
- name: { icon: "icon", iconColor: "iconColor" },
740
- label: "sys.pageDesigner.buttonIcon",
741
- group: n.ButtonStyle,
742
- hidden: (e) => !e.props.hasIcon || p(e),
743
- _config: {
744
- clearable: !1
745
- }
746
- },
747
- {
748
- component: "switch-editor",
749
- name: "enableCustomColor",
750
- label: "sys.pageDesigner.customBtnColor",
751
- group: n.ButtonStyle,
752
- hidden: (e) => p(e)
753
- },
754
- {
755
- component: "button-color-editor",
756
- name: "fontColor",
757
- label: "sys.pageDesigner.buttonNameColor",
758
- group: n.ButtonStyle,
759
- _config: {
760
- isInRow: !0
761
- },
762
- hidden: (e) => !e.props.enableCustomColor
763
- },
764
- {
765
- component: "button-color-editor",
766
- name: "backgroundColor",
767
- label: "sys.pageDesigner.buttonStyleColor",
768
- group: n.ButtonStyle,
769
- _config: {
770
- isInRow: !0
771
- },
772
- hidden: (e) => !e.props.enableCustomColor || e.props.type === "link"
773
- },
774
- {
775
- component: "radio-bgc-editor",
776
- name: "size",
777
- label: "sys.pageDesigner.buttonSize",
778
- group: n.ButtonStyle,
779
- hidden: (e) => p(e),
780
- _config: {
781
- options: Object.values(L).map((e) => ({ value: e, label: "sys.pageDesigner." + e }))
782
- }
783
- },
784
- {
785
- component: "switch-editor",
786
- name: "confirm",
787
- label: "sys.pageDesigner.confirm",
788
- group: n.ButtonStyle,
789
- hidden: (e) => p(e),
790
- _config: {
791
- tooltip: "sys.pageDesigner.buttonConfirm"
792
- }
793
- },
794
- {
795
- component: "texteare-editor",
796
- name: "confirmText",
797
- label: "sys.pageDesigner.regHint",
798
- group: n.ButtonStyle,
799
- _config: {
800
- i18n: !0,
801
- placeholder: "sys.pageDesigner.confirmTodo"
802
- },
803
- hidden: (e) => !e.props.confirm || p(e)
804
- }
805
- // {
806
- // component: 'select-editor',
807
- // name: 'basic.buttonTheme',
808
- // label: 'sys.pageDesigner.buttonTheme',
809
- // group: PropGroup.ButtonStyle,
810
- // _config: {
811
- // options: Object.values(ButtonColorTheme).map((i) => {
812
- // return { value: i, label: 'sys.pageDesigner.' + i };
813
- // }),
814
- // },
815
- // hidden: (widget): boolean => {
816
- // return hiddenButtonProps(widget);
817
- // },
818
- // },
819
- // {
820
- // component: 'icon-editor',
821
- // name: { icon: 'basic.icon', iconColor: 'basic.iconColor' },
822
- // label: 'sys.pageDesigner.icon',
823
- // group: PropGroup.ButtonStyle,
824
- // _config: {
825
- // showColor: true,
826
- // },
827
- // hidden: (widget): boolean => {
828
- // return hiddenButtonProps(widget);
829
- // },
830
- // },
831
- ], We = [
832
- {
833
- component: "position-editor",
834
- name: "position",
835
- label: "sys.pageDesigner.position",
836
- group: f.LAYOUT,
837
- // 按钮容器中的按钮不需要样式属性
838
- hidden: (e) => !!e.props.parentWidgetId || !!e.preLocation
839
- },
840
- {
841
- component: "margin-editor",
842
- group: f.MARGIN,
843
- // 按钮容器中的按钮不需要样式属性
844
- hidden: (e) => !!e.props.parentWidgetId || !!e.preLocation,
845
- _config: {
846
- hiddenMarginOrPadding: "padding"
847
- }
848
- }
849
- ], ke = {
850
- install() {
851
- }
852
- };
853
- export {
854
- le as ALIGN_TO_FLEX_MAP,
855
- M as addImportant,
856
- i as addPxUnit,
857
- Me as baseBtnEditor,
858
- Be as baseBtnProp,
859
- xe as buttonEditor,
860
- _e as buttonProps,
861
- We as buttonStyleEditor,
862
- Ce as cloneWidget,
863
- ge as commonStyle,
864
- te as deepFindNotField,
865
- ke as default,
866
- fe as displayEditor,
867
- q as displayProps,
868
- Oe as extractFontStyle,
869
- b as formatBorder,
870
- de as generateBorderStyles,
871
- se as generatePositionStyles,
872
- pe as generateSpacingStyles,
873
- Ne as generateWrapperStyle,
874
- Ae as getBindCmpTypeEditor,
875
- Se as getCompPos,
876
- w as getWidgetInfo,
877
- p as hiddenButtonProps,
878
- ee as isFormFieldType,
879
- ae as makeStyleProp,
880
- S as mobileWidgetInfo,
881
- me as modalCfg,
882
- be as notNeedPxStyle,
883
- C as padWidgetInfo,
884
- Fe as permissionEditor,
885
- Re as propsToStyle,
886
- re as pxToVw,
887
- Le as registerMobilePluginWidgetItem,
888
- he as registerMobileWidgetItem,
889
- De as registerPadPluginWidgetItem,
890
- ye as registerPadWidgetItem,
891
- R as registerPluginWidgetItem,
892
- Ee as registerWebPluginWidgetItem,
893
- Te as registerWebWidgetItem,
894
- O as registerWidgetItem,
895
- Ie as transAlign2flex,
896
- oe as transformI18n,
897
- T as webWidgetInfo
898
- };