@gct-paas/schema 0.1.4-dev.10 → 0.1.4-dev.12
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/dist/index.esm.min.js +941 -0
- package/es/constants/index.d.ts +15 -1
- package/es/constants/index.mjs +408 -368
- package/es/index.d.ts +0 -1
- package/es/index.mjs +10 -20
- package/es/interface/designer.d.ts +0 -1
- package/es/interface/modal/i-modal-body.d.ts +1 -1
- package/es/interface/schema/widget-props/i-search-widget-props.d.ts +6 -0
- package/es/interface/schema/widget-types.d.ts +16 -6
- package/es/interface/widget/i-common.d.ts +2 -1
- package/es/interface/widget/i-editors.d.ts +2 -2
- package/es/interface/widget/i-props.d.ts +1 -10
- package/es/interface/widget/i-schemas.d.ts +1 -0
- package/es/utils/index.mjs +4 -0
- package/es/utils/schema/index.d.ts +9 -1
- package/es/utils/schema/index.mjs +118 -39
- package/es/utils/schema/search.d.ts +9 -0
- package/es/utils/schema/search.mjs +146 -0
- package/es/utils/schema/utils.d.ts +21 -0
- package/es/utils/schema/utils.mjs +182 -0
- package/es/utils/schema-style/index.mjs +203 -127
- package/es/utils/widget-info/widget-info.mjs +130 -57
- package/package.json +6 -5
- package/dist/index.esm.min.mjs +0 -1250
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
- package/es/schema/common-config/base-button-config.d.ts +0 -3
- package/es/schema/common-config/base-button-config.mjs +0 -84
- package/es/schema/common-config/button-editor-config.d.ts +0 -4
- package/es/schema/common-config/button-editor-config.mjs +0 -206
- package/es/schema/common-config/button-props-func.d.ts +0 -5
- package/es/schema/common-config/button-props-func.mjs +0 -11
- package/es/schema/common-config/common-field-editor-config.d.ts +0 -10
- package/es/schema/common-config/common-field-editor-config.mjs +0 -61
- package/es/schema/common-config/common-style.d.ts +0 -3
- package/es/schema/common-config/common-style.mjs +0 -85
- package/es/schema/common-config/display-editor-config.d.ts +0 -3
- package/es/schema/common-config/display-editor-config.mjs +0 -89
- package/es/schema/common-config/permission-editor-config.d.ts +0 -2
- package/es/schema/common-config/permission-editor-config.mjs +0 -23
- package/es/schema/index.d.ts +0 -9
- package/es/schema/modal/modal-body.d.ts +0 -2
- package/es/schema/modal/modal-body.mjs +0 -9
- package/es/schema/modal/modal-footer.d.ts +0 -2
- package/es/schema/modal/modal-footer.mjs +0 -9
- package/es/schema/modal/modal.d.ts +0 -8
- package/es/schema/modal/modal.mjs +0 -182
|
@@ -1,89 +0,0 @@
|
|
|
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 };
|
|
@@ -1,23 +0,0 @@
|
|
|
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 };
|
package/es/schema/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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';
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { BuiltinType, Platform, PropGroup, StyleGroup, buildShortUUID } from '@gct-paas/core';
|
|
2
|
-
import { widget as widget$1 } from './modal-body.mjs';
|
|
3
|
-
import { widget as widget$2 } from './modal-footer.mjs';
|
|
4
|
-
|
|
5
|
-
const widget = {
|
|
6
|
-
id: "",
|
|
7
|
-
/**默认是WEB 添加的时候会根据当前环境改变 */
|
|
8
|
-
platform: Platform.WEB,
|
|
9
|
-
/**系统用的name */
|
|
10
|
-
name: "sys.pageDesigner.modal",
|
|
11
|
-
alias: "",
|
|
12
|
-
/**用户新建编辑的name */
|
|
13
|
-
modalName: "",
|
|
14
|
-
type: BuiltinType.MODAL,
|
|
15
|
-
js: "",
|
|
16
|
-
css: "",
|
|
17
|
-
children: [widget$1, widget$2],
|
|
18
|
-
props: {
|
|
19
|
-
modalTitle: "弹窗",
|
|
20
|
-
unitType: "px",
|
|
21
|
-
modalWidth: 800,
|
|
22
|
-
isSubTableModal: false,
|
|
23
|
-
bindSubTableId: "",
|
|
24
|
-
createModalTitle: "新建弹窗",
|
|
25
|
-
editModalTitle: "编辑弹窗",
|
|
26
|
-
hasFooter: true,
|
|
27
|
-
openMode: "modal",
|
|
28
|
-
/**just mobile */
|
|
29
|
-
mUnitType: "%",
|
|
30
|
-
mModalWidth: 80
|
|
31
|
-
},
|
|
32
|
-
style: {
|
|
33
|
-
paddingAll: "16",
|
|
34
|
-
paddingTop: "16",
|
|
35
|
-
paddingRight: "16",
|
|
36
|
-
paddingBottom: "16",
|
|
37
|
-
paddingLeft: "16"
|
|
38
|
-
},
|
|
39
|
-
events: {},
|
|
40
|
-
i18n: {},
|
|
41
|
-
runJs: "",
|
|
42
|
-
los: {},
|
|
43
|
-
icon: "icon-motaikuang1",
|
|
44
|
-
isField: false
|
|
45
|
-
};
|
|
46
|
-
const propEditorList = [
|
|
47
|
-
{
|
|
48
|
-
component: "text-editor",
|
|
49
|
-
name: "modalTitle",
|
|
50
|
-
label: "sys.pageDesigner.modalTitleName",
|
|
51
|
-
group: PropGroup.BASIC,
|
|
52
|
-
_config: {
|
|
53
|
-
showCount: true,
|
|
54
|
-
maxlength: 32
|
|
55
|
-
},
|
|
56
|
-
hidden: (widget2) => {
|
|
57
|
-
return widget2.props.isSubTableModal;
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
component: "input-unit-editor",
|
|
62
|
-
name: { unitType: "unitType", modalWidth: "modalWidth" },
|
|
63
|
-
label: "sys.pageDesigner.modalWidthProp",
|
|
64
|
-
group: PropGroup.MODAL,
|
|
65
|
-
hidden: (widget2) => {
|
|
66
|
-
return widget2.platform === Platform.MOBILE;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
component: "input-unit-editor",
|
|
71
|
-
name: { unitType: "mUnitType", modalWidth: "mModalWidth" },
|
|
72
|
-
label: "sys.pageDesigner.modalHeightProp",
|
|
73
|
-
group: PropGroup.MODAL,
|
|
74
|
-
hidden: (widget2) => {
|
|
75
|
-
return widget2.platform !== Platform.MOBILE;
|
|
76
|
-
},
|
|
77
|
-
_config: {
|
|
78
|
-
filterUnitType: "px"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
component: "text-editor",
|
|
83
|
-
name: "createModalTitle",
|
|
84
|
-
label: "sys.pageDesigner.createModalTitle",
|
|
85
|
-
group: PropGroup.MODALTITLECONFIG,
|
|
86
|
-
_config: {
|
|
87
|
-
i18n: true
|
|
88
|
-
},
|
|
89
|
-
hidden: (widget2) => {
|
|
90
|
-
return !widget2.props.isSubTableModal;
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
component: "text-editor",
|
|
95
|
-
name: "editModalTitle",
|
|
96
|
-
label: "sys.pageDesigner.editModalTitle",
|
|
97
|
-
group: PropGroup.MODALTITLECONFIG,
|
|
98
|
-
_config: {
|
|
99
|
-
i18n: true
|
|
100
|
-
},
|
|
101
|
-
hidden: (widget2) => {
|
|
102
|
-
return !widget2.props.isSubTableModal;
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
component: "select-editor",
|
|
107
|
-
name: "openMode",
|
|
108
|
-
label: "sys.appDesigner.openMode",
|
|
109
|
-
group: PropGroup.MODAL,
|
|
110
|
-
hidden: (widget2) => {
|
|
111
|
-
return widget2.platform !== Platform.WEB;
|
|
112
|
-
},
|
|
113
|
-
_config: {
|
|
114
|
-
options: () => {
|
|
115
|
-
return [
|
|
116
|
-
{
|
|
117
|
-
label: "打开弹窗页面",
|
|
118
|
-
value: "modal"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: "右侧划入页面",
|
|
122
|
-
value: "drawer"
|
|
123
|
-
}
|
|
124
|
-
];
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
changeCallback: (widget2, value) => {
|
|
128
|
-
if (value === "drawer") {
|
|
129
|
-
widget2.props.unitType = "%";
|
|
130
|
-
widget2.props.modalWidth = 80;
|
|
131
|
-
} else {
|
|
132
|
-
widget2.props.unitType = "px";
|
|
133
|
-
widget2.props.modalWidth = 800;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
component: "switch-editor",
|
|
139
|
-
name: "hasFooter",
|
|
140
|
-
label: "sys.pageDesigner.operateButton",
|
|
141
|
-
group: PropGroup.BUTTON,
|
|
142
|
-
hidden: (widget2) => {
|
|
143
|
-
return widget2.props.isSubTableModal;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
];
|
|
147
|
-
const styleEditorList = [
|
|
148
|
-
{
|
|
149
|
-
component: "color-editor",
|
|
150
|
-
name: "backgroundColor",
|
|
151
|
-
label: "sys.pageDesigner.backgroundColor",
|
|
152
|
-
group: StyleGroup.BACKGROUND
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
component: "margin-editor",
|
|
156
|
-
group: StyleGroup.MARGIN,
|
|
157
|
-
_config: {
|
|
158
|
-
hiddenMarginOrPadding: "margin"
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
];
|
|
162
|
-
const eventList = [
|
|
163
|
-
{
|
|
164
|
-
name: "onMounted",
|
|
165
|
-
title: "sys.pageDesigner.onMounted",
|
|
166
|
-
params: []
|
|
167
|
-
}
|
|
168
|
-
];
|
|
169
|
-
const runCallback = () => {
|
|
170
|
-
};
|
|
171
|
-
const beforeCreate = (widget2) => {
|
|
172
|
-
widget2.children[0].id = buildShortUUID(widget2.children[0].type);
|
|
173
|
-
widget2.children[1].id = buildShortUUID(widget2.children[1].type);
|
|
174
|
-
};
|
|
175
|
-
const designerConfig = {
|
|
176
|
-
basicProps: {
|
|
177
|
-
key_label: "弹窗",
|
|
178
|
-
alias_hidden: true
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
export { beforeCreate, designerConfig, eventList, propEditorList, runCallback, styleEditorList, widget };
|