@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,84 @@
|
|
|
1
|
+
import { ButtonSize, ButtonType, ButtonStyle, PropGroup } from '@gct-paas/core';
|
|
2
|
+
import { displayProps } from './display-editor-config.mjs';
|
|
3
|
+
|
|
4
|
+
const baseBtnProp = {
|
|
5
|
+
disabled: false,
|
|
6
|
+
icon: "icon-park:all-application",
|
|
7
|
+
iconColor: "",
|
|
8
|
+
/**标题 */
|
|
9
|
+
title: "${sys.pageDesigner.button}",
|
|
10
|
+
buttonStyle: ButtonStyle.ORDINARY,
|
|
11
|
+
/**二次确认 */
|
|
12
|
+
confirm: false,
|
|
13
|
+
confirmText: "",
|
|
14
|
+
// /**内置事件 */
|
|
15
|
+
// innerEvent: true,
|
|
16
|
+
/**系统事件类型 */
|
|
17
|
+
// sysMethedType: undefined,
|
|
18
|
+
// linkPage: '',
|
|
19
|
+
/**事件名称 */
|
|
20
|
+
// eventName: '',
|
|
21
|
+
hasIcon: false,
|
|
22
|
+
hasText: true,
|
|
23
|
+
type: ButtonType.PRIMARY,
|
|
24
|
+
danger: false,
|
|
25
|
+
size: ButtonSize.DEFAULT,
|
|
26
|
+
enableCustomColor: false,
|
|
27
|
+
backgroundColor: "",
|
|
28
|
+
fontColor: "",
|
|
29
|
+
...displayProps
|
|
30
|
+
};
|
|
31
|
+
const baseBtnEditor = [
|
|
32
|
+
{
|
|
33
|
+
component: "text-editor",
|
|
34
|
+
name: "title",
|
|
35
|
+
label: "sys.pageDesigner.buttonName",
|
|
36
|
+
group: PropGroup.BASIC,
|
|
37
|
+
_config: {
|
|
38
|
+
i18n: true,
|
|
39
|
+
showCount: true,
|
|
40
|
+
maxlength: 32
|
|
41
|
+
},
|
|
42
|
+
changeCallback: (widget, val) => {
|
|
43
|
+
widget.alias = val;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
component: "button-type-editor",
|
|
48
|
+
name: {
|
|
49
|
+
type: "type",
|
|
50
|
+
danger: "danger",
|
|
51
|
+
icon: "icon",
|
|
52
|
+
label: "label",
|
|
53
|
+
hasText: "hasText",
|
|
54
|
+
hasIcon: "hasIcon"
|
|
55
|
+
},
|
|
56
|
+
label: "sys.pageDesigner.buttonType",
|
|
57
|
+
group: PropGroup.BUTTON
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
component: "icon-editor",
|
|
61
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
62
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
63
|
+
group: PropGroup.BUTTON,
|
|
64
|
+
// _config: {
|
|
65
|
+
// showColor: true,
|
|
66
|
+
// },
|
|
67
|
+
hidden: (widget) => {
|
|
68
|
+
return !widget.props.hasIcon;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
component: "radio-bgc-editor",
|
|
73
|
+
name: "size",
|
|
74
|
+
label: "sys.pageDesigner.buttonSize",
|
|
75
|
+
group: PropGroup.BUTTON,
|
|
76
|
+
_config: {
|
|
77
|
+
options: Object.values(ButtonSize).map((i) => {
|
|
78
|
+
return { value: i, label: "sys.pageDesigner." + i };
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
export { baseBtnEditor, baseBtnProp };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { ButtonStyle, ButtonColorType, ButtonColorTheme, PropGroup, ButtonSize, StyleGroup } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
const buttonProps = {
|
|
5
|
+
disabled: false,
|
|
6
|
+
buttonTheme: ButtonColorTheme.DEFAULT,
|
|
7
|
+
buttonType: ButtonColorType.DEFAULT,
|
|
8
|
+
icon: "",
|
|
9
|
+
iconColor: "",
|
|
10
|
+
confirm: false,
|
|
11
|
+
confirmText: "",
|
|
12
|
+
buttonStyle: ButtonStyle.ORDINARY,
|
|
13
|
+
enableCustomColor: false,
|
|
14
|
+
backgroundColor: "",
|
|
15
|
+
fontColor: ""
|
|
16
|
+
};
|
|
17
|
+
const buttonEditor = [
|
|
18
|
+
// {
|
|
19
|
+
// component: 'switch-editor',
|
|
20
|
+
// name: 'disabled',
|
|
21
|
+
// label: 'sys.pageDesigner.disabled',
|
|
22
|
+
// group: PropGroup.DISPLAY,
|
|
23
|
+
// hidden: (widget): boolean => {
|
|
24
|
+
// return hiddenButtonProps(widget);
|
|
25
|
+
// },
|
|
26
|
+
// },
|
|
27
|
+
// {
|
|
28
|
+
// component: 'radio-editor',
|
|
29
|
+
// name: 'basic.buttonType',
|
|
30
|
+
// label: 'sys.pageDesigner.buttonType',
|
|
31
|
+
// group: PropGroup.ButtonStyle,
|
|
32
|
+
// _config: {
|
|
33
|
+
// options: Object.values(ButtonColorType).map((i) => {
|
|
34
|
+
// return { value: i, label: 'sys.pageDesigner.' + i };
|
|
35
|
+
// }),
|
|
36
|
+
// },
|
|
37
|
+
// hidden: (widget): boolean => {
|
|
38
|
+
// return hiddenButtonProps(widget);
|
|
39
|
+
// },
|
|
40
|
+
// },
|
|
41
|
+
// {
|
|
42
|
+
// component: 'radio-editor',
|
|
43
|
+
// name: 'buttonStyle',
|
|
44
|
+
// label: 'sys.pageDesigner.buttonStyle',
|
|
45
|
+
// group: PropGroup.ButtonStyle,
|
|
46
|
+
// hidden: (widget): boolean => {
|
|
47
|
+
// return hiddenButtonProps(widget) || platform.value === Platform.MOBILE;
|
|
48
|
+
// },
|
|
49
|
+
// _config: {
|
|
50
|
+
// options: Object.values(ButtonStyle).map((key) => {
|
|
51
|
+
// return { label: 'sys.pageDesigner.' + key, value: key };
|
|
52
|
+
// }),
|
|
53
|
+
// },
|
|
54
|
+
// },
|
|
55
|
+
{
|
|
56
|
+
component: "button-type-editor",
|
|
57
|
+
name: {
|
|
58
|
+
type: "type",
|
|
59
|
+
danger: "danger",
|
|
60
|
+
icon: "icon",
|
|
61
|
+
label: "label",
|
|
62
|
+
hasText: "hasText",
|
|
63
|
+
hasIcon: "hasIcon"
|
|
64
|
+
},
|
|
65
|
+
label: "sys.pageDesigner.buttonType",
|
|
66
|
+
group: PropGroup.ButtonStyle,
|
|
67
|
+
hidden: (widget) => {
|
|
68
|
+
return hiddenButtonProps(widget);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
component: "icon-editor",
|
|
73
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
74
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
75
|
+
group: PropGroup.ButtonStyle,
|
|
76
|
+
hidden: (widget) => {
|
|
77
|
+
return !widget.props.hasIcon || hiddenButtonProps(widget);
|
|
78
|
+
},
|
|
79
|
+
_config: {
|
|
80
|
+
clearable: false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
component: "switch-editor",
|
|
85
|
+
name: "enableCustomColor",
|
|
86
|
+
label: "sys.pageDesigner.customBtnColor",
|
|
87
|
+
group: PropGroup.ButtonStyle,
|
|
88
|
+
hidden: (widget) => {
|
|
89
|
+
return hiddenButtonProps(widget);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
component: "button-color-editor",
|
|
94
|
+
name: "fontColor",
|
|
95
|
+
label: "sys.pageDesigner.buttonNameColor",
|
|
96
|
+
group: PropGroup.ButtonStyle,
|
|
97
|
+
_config: {
|
|
98
|
+
isInRow: true
|
|
99
|
+
},
|
|
100
|
+
hidden: (widget) => {
|
|
101
|
+
return !widget.props.enableCustomColor;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
component: "button-color-editor",
|
|
106
|
+
name: "backgroundColor",
|
|
107
|
+
label: "sys.pageDesigner.buttonStyleColor",
|
|
108
|
+
group: PropGroup.ButtonStyle,
|
|
109
|
+
_config: {
|
|
110
|
+
isInRow: true
|
|
111
|
+
},
|
|
112
|
+
hidden: (widget) => {
|
|
113
|
+
return !widget.props.enableCustomColor || widget.props.type === "link";
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
component: "radio-bgc-editor",
|
|
118
|
+
name: "size",
|
|
119
|
+
label: "sys.pageDesigner.buttonSize",
|
|
120
|
+
group: PropGroup.ButtonStyle,
|
|
121
|
+
hidden: (widget) => {
|
|
122
|
+
return hiddenButtonProps(widget);
|
|
123
|
+
},
|
|
124
|
+
_config: {
|
|
125
|
+
options: Object.values(ButtonSize).map((i) => {
|
|
126
|
+
return { value: i, label: "sys.pageDesigner." + i };
|
|
127
|
+
})
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
component: "switch-editor",
|
|
132
|
+
name: "confirm",
|
|
133
|
+
label: "sys.pageDesigner.confirm",
|
|
134
|
+
group: PropGroup.ButtonStyle,
|
|
135
|
+
hidden: (widget) => {
|
|
136
|
+
return hiddenButtonProps(widget);
|
|
137
|
+
},
|
|
138
|
+
_config: {
|
|
139
|
+
tooltip: "sys.pageDesigner.buttonConfirm"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
component: "texteare-editor",
|
|
144
|
+
name: "confirmText",
|
|
145
|
+
label: "sys.pageDesigner.regHint",
|
|
146
|
+
group: PropGroup.ButtonStyle,
|
|
147
|
+
_config: {
|
|
148
|
+
i18n: true,
|
|
149
|
+
placeholder: "sys.pageDesigner.confirmTodo"
|
|
150
|
+
},
|
|
151
|
+
hidden: (widget) => {
|
|
152
|
+
return !widget.props.confirm || hiddenButtonProps(widget);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// {
|
|
156
|
+
// component: 'select-editor',
|
|
157
|
+
// name: 'basic.buttonTheme',
|
|
158
|
+
// label: 'sys.pageDesigner.buttonTheme',
|
|
159
|
+
// group: PropGroup.ButtonStyle,
|
|
160
|
+
// _config: {
|
|
161
|
+
// options: Object.values(ButtonColorTheme).map((i) => {
|
|
162
|
+
// return { value: i, label: 'sys.pageDesigner.' + i };
|
|
163
|
+
// }),
|
|
164
|
+
// },
|
|
165
|
+
// hidden: (widget): boolean => {
|
|
166
|
+
// return hiddenButtonProps(widget);
|
|
167
|
+
// },
|
|
168
|
+
// },
|
|
169
|
+
// {
|
|
170
|
+
// component: 'icon-editor',
|
|
171
|
+
// name: { icon: 'basic.icon', iconColor: 'basic.iconColor' },
|
|
172
|
+
// label: 'sys.pageDesigner.icon',
|
|
173
|
+
// group: PropGroup.ButtonStyle,
|
|
174
|
+
// _config: {
|
|
175
|
+
// showColor: true,
|
|
176
|
+
// },
|
|
177
|
+
// hidden: (widget): boolean => {
|
|
178
|
+
// return hiddenButtonProps(widget);
|
|
179
|
+
// },
|
|
180
|
+
// },
|
|
181
|
+
];
|
|
182
|
+
const buttonStyleEditor = [
|
|
183
|
+
{
|
|
184
|
+
component: "position-editor",
|
|
185
|
+
name: "position",
|
|
186
|
+
label: "sys.pageDesigner.position",
|
|
187
|
+
group: StyleGroup.LAYOUT,
|
|
188
|
+
// 按钮容器中的按钮不需要样式属性
|
|
189
|
+
hidden: (widget) => {
|
|
190
|
+
return !!widget.props.parentWidgetId || !!widget.preLocation;
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
component: "margin-editor",
|
|
195
|
+
group: StyleGroup.MARGIN,
|
|
196
|
+
// 按钮容器中的按钮不需要样式属性
|
|
197
|
+
hidden: (widget) => {
|
|
198
|
+
return !!widget.props.parentWidgetId || !!widget.preLocation;
|
|
199
|
+
},
|
|
200
|
+
_config: {
|
|
201
|
+
hiddenMarginOrPadding: "padding"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
export { buttonEditor, buttonProps, buttonStyleEditor };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function hiddenButtonProps(widget) {
|
|
2
|
+
if (Object.prototype.hasOwnProperty.call(widget.props, "model")) {
|
|
3
|
+
return !widget.props.model;
|
|
4
|
+
}
|
|
5
|
+
if (Object.prototype.hasOwnProperty.call(widget.props, "refForm")) {
|
|
6
|
+
return !widget.props.refForm;
|
|
7
|
+
}
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { hiddenButtonProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LowCodeModal, LowCodeWidget } from '../../interface';
|
|
2
|
+
import { BindCmpStyleEnum, BindCmpStyleTypeEnum } from '@gct-paas/core';
|
|
3
|
+
/** 获取组件类型config */
|
|
4
|
+
export declare const getBindCmpTypeEditor: ({ name, type, hiddenCallback, filterOptionsCallback, groupName, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
type: BindCmpStyleTypeEnum | ((arg: LowCodeWidget.BasicSchema) => BindCmpStyleTypeEnum);
|
|
7
|
+
hiddenCallback?: (arg: LowCodeWidget.BasicSchema | LowCodeModal.Modal) => boolean;
|
|
8
|
+
filterOptionsCallback?: (arg: BindCmpStyleEnum, widget?: LowCodeWidget.BasicSchema) => boolean;
|
|
9
|
+
groupName?: string;
|
|
10
|
+
}) => LowCodeWidget.PropEditor[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { isFormFieldType } from '../../utils/schema/index.mjs';
|
|
2
|
+
import 'lodash-es';
|
|
3
|
+
import { PropGroup, FIELD_TYPE, Platform } from '@gct-paas/core';
|
|
4
|
+
|
|
5
|
+
const getBindCmpTypeEditor = ({
|
|
6
|
+
name,
|
|
7
|
+
type,
|
|
8
|
+
hiddenCallback,
|
|
9
|
+
filterOptionsCallback,
|
|
10
|
+
groupName
|
|
11
|
+
}) => {
|
|
12
|
+
return [
|
|
13
|
+
// 组件类型
|
|
14
|
+
{
|
|
15
|
+
component: "bind-cmp-type-editor",
|
|
16
|
+
name,
|
|
17
|
+
label: "sys.pageDesigner.bindCmpStyleLabel",
|
|
18
|
+
group: groupName ? groupName : PropGroup.FIELD_CONFIG,
|
|
19
|
+
hidden: hiddenCallback ? hiddenCallback : (widget) => {
|
|
20
|
+
if ([
|
|
21
|
+
FIELD_TYPE.TEXT,
|
|
22
|
+
FIELD_TYPE.USER,
|
|
23
|
+
FIELD_TYPE.USER_MULTI,
|
|
24
|
+
FIELD_TYPE.ORG,
|
|
25
|
+
FIELD_TYPE.ORG_MULTI
|
|
26
|
+
].includes(widget.props.fieldType) && (widget.props.bindFieldKey || !isFormFieldType(widget) || widget.props.fieldReadonly)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return name === "selectType" && widget.platform !== Platform.WEB;
|
|
30
|
+
},
|
|
31
|
+
_config: {
|
|
32
|
+
bindCmpStyleKey: type,
|
|
33
|
+
filterOptionsCallback
|
|
34
|
+
},
|
|
35
|
+
changeCallback(widget) {
|
|
36
|
+
if ([
|
|
37
|
+
FIELD_TYPE.BOOLEAN,
|
|
38
|
+
FIELD_TYPE.USER,
|
|
39
|
+
FIELD_TYPE.USER_MULTI,
|
|
40
|
+
FIELD_TYPE.ORG,
|
|
41
|
+
FIELD_TYPE.ORG_MULTI,
|
|
42
|
+
FIELD_TYPE.DATA_TABLE_FORMULA
|
|
43
|
+
].includes(widget.props.fieldType)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if ([
|
|
47
|
+
FIELD_TYPE.EXPRESSION,
|
|
48
|
+
FIELD_TYPE.AGG,
|
|
49
|
+
FIELD_TYPE.INTEGER,
|
|
50
|
+
FIELD_TYPE.LONG
|
|
51
|
+
].includes(widget.props.fieldType)) {
|
|
52
|
+
widget.props.currency = "¥";
|
|
53
|
+
widget.props.displayTimeType = "d:h:m:s";
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { getBindCmpTypeEditor };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { BorderStyle, TagTypeEnum, TextDecoration } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
const commonStyle = {
|
|
4
|
+
position: "",
|
|
5
|
+
top: "",
|
|
6
|
+
left: "",
|
|
7
|
+
right: "",
|
|
8
|
+
bottom: "",
|
|
9
|
+
width: "",
|
|
10
|
+
height: "",
|
|
11
|
+
backgroundColor: "",
|
|
12
|
+
marginAll: "",
|
|
13
|
+
marginTop: "",
|
|
14
|
+
marginRight: "",
|
|
15
|
+
marginBottom: "",
|
|
16
|
+
marginLeft: "",
|
|
17
|
+
paddingAll: "",
|
|
18
|
+
paddingTop: "",
|
|
19
|
+
paddingRight: "",
|
|
20
|
+
paddingBottom: "",
|
|
21
|
+
paddingLeft: "",
|
|
22
|
+
labelFont: {
|
|
23
|
+
align: "left",
|
|
24
|
+
fontSize: "",
|
|
25
|
+
bold: false,
|
|
26
|
+
italic: false,
|
|
27
|
+
textDecoration: TextDecoration.NONE,
|
|
28
|
+
color: ""
|
|
29
|
+
},
|
|
30
|
+
contentFont: {
|
|
31
|
+
align: "left",
|
|
32
|
+
fontSize: "",
|
|
33
|
+
bold: false,
|
|
34
|
+
italic: false,
|
|
35
|
+
textDecoration: TextDecoration.NONE,
|
|
36
|
+
color: ""
|
|
37
|
+
},
|
|
38
|
+
tagStyle: {
|
|
39
|
+
color: "",
|
|
40
|
+
tagType: TagTypeEnum.RADIUS
|
|
41
|
+
},
|
|
42
|
+
tagStyleOpen: false,
|
|
43
|
+
borderAll: {
|
|
44
|
+
borderStyle: BorderStyle.NONE,
|
|
45
|
+
borderColor: "#F0F0F0",
|
|
46
|
+
borderWidth: "1"
|
|
47
|
+
},
|
|
48
|
+
borderLeft: {
|
|
49
|
+
borderStyle: BorderStyle.NONE,
|
|
50
|
+
borderColor: "#F0F0F0",
|
|
51
|
+
borderWidth: "1"
|
|
52
|
+
},
|
|
53
|
+
borderRight: {
|
|
54
|
+
borderStyle: BorderStyle.NONE,
|
|
55
|
+
borderColor: "#F0F0F0",
|
|
56
|
+
borderWidth: "1"
|
|
57
|
+
},
|
|
58
|
+
borderBottom: {
|
|
59
|
+
borderStyle: BorderStyle.NONE,
|
|
60
|
+
borderColor: "#F0F0F0",
|
|
61
|
+
borderWidth: "1"
|
|
62
|
+
},
|
|
63
|
+
borderTop: {
|
|
64
|
+
borderStyle: BorderStyle.NONE,
|
|
65
|
+
borderColor: "#F0F0F0",
|
|
66
|
+
borderWidth: "1"
|
|
67
|
+
},
|
|
68
|
+
borderTopRightRadius: "0",
|
|
69
|
+
borderTopLeftRadius: "0",
|
|
70
|
+
borderBottomRightRadius: "0",
|
|
71
|
+
borderBottomLeftRadius: "0",
|
|
72
|
+
borderAllRadius: "0"
|
|
73
|
+
};
|
|
74
|
+
const notNeedPxStyle = [
|
|
75
|
+
"position",
|
|
76
|
+
"backgroundColor",
|
|
77
|
+
"bold",
|
|
78
|
+
"italic",
|
|
79
|
+
"textDecoration",
|
|
80
|
+
"color",
|
|
81
|
+
"borderStyle",
|
|
82
|
+
"borderColor"
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export { commonStyle, notNeedPxStyle };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Dependency_ENUM, ASSIGNMENTSTRATEGY_ENUM, FIELD_TYPE, PropGroup, MaterialEnum, FormComponents, Platform } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
import { padVTableSupportEditFieldTypes } from '../../constants/index.mjs';
|
|
4
|
+
|
|
5
|
+
const displayProps = {
|
|
6
|
+
deviceConnectivity: false,
|
|
7
|
+
////显隐配置start
|
|
8
|
+
hidden: false,
|
|
9
|
+
// displayType: DisplayType.CONFIG,
|
|
10
|
+
// displayRule: '',
|
|
11
|
+
componentDependency: {
|
|
12
|
+
sortDependency: [],
|
|
13
|
+
configDependency: {
|
|
14
|
+
/**隐藏 */
|
|
15
|
+
[Dependency_ENUM.HIDDEN]: {
|
|
16
|
+
expression: ""
|
|
17
|
+
},
|
|
18
|
+
/**只读 */
|
|
19
|
+
[Dependency_ENUM.READONLY]: {
|
|
20
|
+
expression: ""
|
|
21
|
+
},
|
|
22
|
+
/**禁用 */
|
|
23
|
+
[Dependency_ENUM.DISABLED]: {
|
|
24
|
+
expression: ""
|
|
25
|
+
},
|
|
26
|
+
/**必填 */
|
|
27
|
+
[Dependency_ENUM.REQUIRED]: {
|
|
28
|
+
expression: ""
|
|
29
|
+
},
|
|
30
|
+
[Dependency_ENUM.ASSIGNMENT]: {
|
|
31
|
+
expression: "",
|
|
32
|
+
strategy: ASSIGNMENTSTRATEGY_ENUM.alwaysCover
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const deviceFields = [
|
|
38
|
+
FIELD_TYPE.TEXT,
|
|
39
|
+
FIELD_TYPE.LONG_TEXT,
|
|
40
|
+
FIELD_TYPE.INTEGER,
|
|
41
|
+
FIELD_TYPE.LONG,
|
|
42
|
+
FIELD_TYPE.DOUBLE,
|
|
43
|
+
FIELD_TYPE.DECIMAL,
|
|
44
|
+
FIELD_TYPE.BOOLEAN,
|
|
45
|
+
FIELD_TYPE.DATE,
|
|
46
|
+
FIELD_TYPE.DATE_TIME,
|
|
47
|
+
FIELD_TYPE.MASTERSLAVE
|
|
48
|
+
];
|
|
49
|
+
const displayEditor = [
|
|
50
|
+
{
|
|
51
|
+
component: "dependency-editor",
|
|
52
|
+
name: "componentDependency",
|
|
53
|
+
label: "",
|
|
54
|
+
group: PropGroup.COMPONENTDEPENDENCY,
|
|
55
|
+
hidden: (widget) => {
|
|
56
|
+
if (widget.materialType === MaterialEnum.MaterialEmbedTableField) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
if (widget.type === FormComponents.Form && widget.preLocation) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
return hiddenButtonProps(widget) || widget.props.field === "operating_state_";
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
component: "switch-editor",
|
|
67
|
+
name: "notSubmitInHide",
|
|
68
|
+
label: "sys.pageDesigner.submitWhenHidden",
|
|
69
|
+
group: PropGroup.FIELD_CONFIG,
|
|
70
|
+
hidden(widget) {
|
|
71
|
+
return !widget.isField || !widget.props.field || widget.props.bindFieldKey || widget.props.fieldReadonly || widget.materialType === MaterialEnum.cardListFormField || [
|
|
72
|
+
FIELD_TYPE.EXPRESSION_CONDITION,
|
|
73
|
+
FIELD_TYPE.SERIALRULE,
|
|
74
|
+
FIELD_TYPE.LABEL_TEMPLATE
|
|
75
|
+
].includes(widget.props.fieldType) || !padVTableSupportEditFieldTypes.includes(widget.props.fieldType);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
component: "switch-editor",
|
|
80
|
+
name: "deviceConnectivity",
|
|
81
|
+
label: "sys.pageDesigner.deviceConnectivity",
|
|
82
|
+
group: PropGroup.FIELD_CONFIG,
|
|
83
|
+
hidden: (widget) => {
|
|
84
|
+
return widget.platform !== Platform.WEB || ![MaterialEnum.MaterialFormField].includes(widget.materialType) || !deviceFields.includes(widget.props.fieldType);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
export { displayEditor, displayProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PropGroup } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
const permissionEditor = [
|
|
5
|
+
// {
|
|
6
|
+
// component: 'permission-switch-editor',
|
|
7
|
+
// label: 'sys.permission',
|
|
8
|
+
// group: PropGroup.PERMISSION,
|
|
9
|
+
// hidden: (widget) => {
|
|
10
|
+
// return hiddenButtonProps(widget);
|
|
11
|
+
// },
|
|
12
|
+
// },
|
|
13
|
+
{
|
|
14
|
+
component: "permission-editor",
|
|
15
|
+
label: "",
|
|
16
|
+
group: PropGroup.PERMISSION,
|
|
17
|
+
hidden: (widget) => {
|
|
18
|
+
return hiddenButtonProps(widget);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export { permissionEditor };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as modalCfg from './modal/modal';
|
|
2
|
+
export { modalCfg };
|
|
3
|
+
export * from './common-config/button-props-func';
|
|
4
|
+
export * from './common-config/common-style';
|
|
5
|
+
export * from './common-config/display-editor-config';
|
|
6
|
+
export * from './common-config/common-field-editor-config';
|
|
7
|
+
export * from './common-config/base-button-config';
|
|
8
|
+
export * from './common-config/permission-editor-config';
|
|
9
|
+
export * from './common-config/button-editor-config';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LowCodeModal, LowCodeWidget } from '../../interface';
|
|
2
|
+
export declare const widget: LowCodeModal.Modal;
|
|
3
|
+
export declare const propEditorList: LowCodeWidget.PropEditor[];
|
|
4
|
+
export declare const styleEditorList: LowCodeWidget.StyleEditor[];
|
|
5
|
+
export declare const eventList: LowCodeWidget.EventsType[];
|
|
6
|
+
export declare const runCallback: LowCodeWidget.RunCallback;
|
|
7
|
+
export declare const beforeCreate: (widget: LowCodeModal.Modal) => void;
|
|
8
|
+
export declare const designerConfig: LowCodeWidget.DesignerConfig;
|