@gct-paas/schema 0.1.4-dev.9 → 0.1.5-dev.0
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 +1 -0
- package/es/constants/design.d.ts +26 -0
- package/es/constants/design.mjs +30 -0
- package/es/constants/index.d.ts +24 -1
- package/es/constants/index.mjs +410 -18
- package/es/index.d.ts +1 -1
- package/es/index.mjs +13 -19
- package/es/interface/design/i-design-container-node.d.ts +13 -0
- package/es/interface/design/i-design-data.d.ts +44 -0
- package/es/interface/design/i-design-editor-data.d.ts +20 -0
- package/es/interface/design/i-design-editor-node.d.ts +15 -0
- package/es/interface/design/i-design-node-data.d.ts +19 -0
- package/es/interface/design/i-design-node.d.ts +80 -0
- package/es/interface/design/i-design-page-node-data.d.ts +15 -0
- package/es/interface/design/i-design-tree-item.d.ts +26 -0
- package/es/interface/design/i-drag-data-item.d.ts +46 -0
- package/es/interface/design/index.d.ts +9 -0
- package/es/interface/designer.d.ts +1 -1
- package/es/interface/index.d.ts +2 -0
- package/es/interface/modal/i-modal-body.d.ts +1 -1
- package/es/interface/relationship-diagram-config/i-relationship-diagram-node.d.ts +82 -0
- package/es/interface/relationship-diagram-config/i-rule-config.d.ts +135 -0
- package/es/interface/relationship-diagram-config/index.d.ts +2 -0
- package/es/interface/schema/widget-props/i-card-list-props.d.ts +79 -0
- package/es/interface/schema/widget-props/i-form-container-props.d.ts +19 -5
- package/es/interface/schema/widget-props/i-form-input-props.d.ts +1 -1
- package/es/interface/schema/widget-props/i-search-widget-props.d.ts +6 -0
- package/es/interface/schema/widget-props/i-table-props.d.ts +6 -6
- package/es/interface/schema/widget-props/index.d.ts +1 -0
- package/es/interface/schema/widget-types.d.ts +36 -7
- package/es/interface/widget/i-common.d.ts +2 -1
- package/es/interface/widget/i-editors.d.ts +3 -2
- package/es/interface/widget/i-props.d.ts +13 -32
- package/es/interface/widget/i-schemas.d.ts +2 -0
- package/es/interface/widget/i-styles.d.ts +1 -0
- package/es/interface/widget/index.d.ts +3 -1
- package/es/utils/field-editor-override-registry/field-editor-override-registry.d.ts +36 -0
- package/es/utils/field-editor-override-registry/field-editor-override-registry.mjs +29 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +6 -0
- package/es/utils/schema/index.d.ts +4 -1
- package/es/utils/schema/index.mjs +75 -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 +132 -57
- package/package.json +12 -13
- package/dist/index.esm.min.mjs +0 -898
- 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,76 +1,151 @@
|
|
|
1
|
-
import { Platform } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { Platform } from "@gct-paas/core";
|
|
2
|
+
//#region src/utils/widget-info/widget-info.ts
|
|
3
|
+
/**
|
|
4
|
+
* 设计界面所有组件配置信息
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class WidgetInfo
|
|
8
|
+
* @implements {IWidgetInfo}
|
|
9
|
+
*/
|
|
10
|
+
var WidgetInfo = class {
|
|
11
|
+
events = {};
|
|
12
|
+
propEditors = {};
|
|
13
|
+
schema = {};
|
|
14
|
+
callback = {};
|
|
15
|
+
beforeCreate = {};
|
|
16
|
+
styleEditors = {};
|
|
17
|
+
designerConfig = {};
|
|
18
|
+
hooks = {};
|
|
19
|
+
whiteList = {};
|
|
20
|
+
blackList = {};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 网页端组件配置信息
|
|
24
|
+
*/
|
|
25
|
+
var webWidgetInfo = new WidgetInfo();
|
|
26
|
+
/**
|
|
27
|
+
* 移动端组件配置信息
|
|
28
|
+
*/
|
|
29
|
+
var mobileWidgetInfo = new WidgetInfo();
|
|
30
|
+
/**
|
|
31
|
+
* 平板端组件配置信息
|
|
32
|
+
*/
|
|
33
|
+
var padWidgetInfo = new WidgetInfo();
|
|
34
|
+
/**
|
|
35
|
+
* 获取指定平台的组件配置信息
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @param {Platform} [platform] 平台类型
|
|
39
|
+
* @return {*} {IWidgetInfo} 组件配置信息
|
|
40
|
+
*/
|
|
18
41
|
function getWidgetInfo(platform) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return webWidgetInfo;
|
|
28
|
-
}
|
|
42
|
+
switch (platform) {
|
|
43
|
+
case Platform.WEB: return webWidgetInfo;
|
|
44
|
+
case Platform.MOBILE: return mobileWidgetInfo;
|
|
45
|
+
case Platform.PAD: return padWidgetInfo;
|
|
46
|
+
default:
|
|
47
|
+
console.warn(`Unknown platform "${platform}", returning webWidgetInfo by default.`);
|
|
48
|
+
return webWidgetInfo;
|
|
49
|
+
}
|
|
29
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* 注册单一组件信息
|
|
53
|
+
*
|
|
54
|
+
* @export
|
|
55
|
+
* @param {IWidgetInfo} widgetInfo
|
|
56
|
+
* @param {string} type
|
|
57
|
+
* @param {IObject} module
|
|
58
|
+
*/
|
|
30
59
|
function registerWidgetItem(widgetInfo, type, module) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
60
|
+
widgetInfo.events[type] = module.eventList;
|
|
61
|
+
widgetInfo.hooks[type] = module.hooks;
|
|
62
|
+
widgetInfo.whiteList[type] = module.whiteList;
|
|
63
|
+
widgetInfo.blackList[type] = module.blackList;
|
|
64
|
+
widgetInfo.propEditors[type] = module.propEditorList;
|
|
65
|
+
widgetInfo.schema[type] = module.widget;
|
|
66
|
+
widgetInfo.callback[type] = module.runCallback;
|
|
67
|
+
widgetInfo.beforeCreate[type] = module.beforeCreate;
|
|
68
|
+
widgetInfo.styleEditors[type] = module.styleEditorList;
|
|
69
|
+
widgetInfo.designerConfig[type] = module.designerConfig;
|
|
41
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* 注册网页端单一组件信息
|
|
73
|
+
*
|
|
74
|
+
* @export
|
|
75
|
+
* @param {IObject} module
|
|
76
|
+
* @param {string} type
|
|
77
|
+
*/
|
|
42
78
|
function registerWebWidgetItem(module, type) {
|
|
43
|
-
|
|
79
|
+
registerWidgetItem(webWidgetInfo, type, module);
|
|
44
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* 注册移动端单一组件信息
|
|
83
|
+
*
|
|
84
|
+
* @export
|
|
85
|
+
* @param {IObject} module
|
|
86
|
+
* @param {string} type
|
|
87
|
+
*/
|
|
45
88
|
function registerMobileWidgetItem(module, type) {
|
|
46
|
-
|
|
89
|
+
registerWidgetItem(mobileWidgetInfo, type, module);
|
|
47
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* 注册平板端单一组件信息
|
|
93
|
+
*
|
|
94
|
+
* @export
|
|
95
|
+
* @param {IObject} module
|
|
96
|
+
* @param {string} type
|
|
97
|
+
*/
|
|
48
98
|
function registerPadWidgetItem(module, type) {
|
|
49
|
-
|
|
99
|
+
registerWidgetItem(padWidgetInfo, type, module);
|
|
50
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* 注册单一组件信息(插件方式)
|
|
103
|
+
*
|
|
104
|
+
* @export
|
|
105
|
+
* @param {IWidgetInfo} widgetInfo
|
|
106
|
+
* @param {IWidgetInfoItem} designer
|
|
107
|
+
*/
|
|
51
108
|
function registerPluginWidgetItem(widgetInfo, designer) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
109
|
+
if (designer) {
|
|
110
|
+
const { type } = designer.schema;
|
|
111
|
+
widgetInfo.events[type] = designer.events;
|
|
112
|
+
widgetInfo.hooks[type] = designer.hooks;
|
|
113
|
+
widgetInfo.whiteList[type] = designer.whiteList;
|
|
114
|
+
widgetInfo.blackList[type] = designer.blackList;
|
|
115
|
+
widgetInfo.propEditors[type] = designer.propEditors;
|
|
116
|
+
widgetInfo.schema[type] = designer.schema;
|
|
117
|
+
widgetInfo.callback[type] = designer.callback;
|
|
118
|
+
widgetInfo.beforeCreate[type] = designer.beforeCreate;
|
|
119
|
+
widgetInfo.styleEditors[type] = designer.styleEditors;
|
|
120
|
+
widgetInfo.designerConfig[type] = designer.designerConfig;
|
|
121
|
+
}
|
|
65
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* 注册网页端插件组件配置
|
|
125
|
+
*
|
|
126
|
+
* @export
|
|
127
|
+
* @param {IWidgetInfoItem} designer
|
|
128
|
+
*/
|
|
66
129
|
function registerWebPluginWidgetItem(designer) {
|
|
67
|
-
|
|
130
|
+
registerPluginWidgetItem(webWidgetInfo, designer);
|
|
68
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* 注册移动端插件组件配置
|
|
134
|
+
*
|
|
135
|
+
* @export
|
|
136
|
+
* @param {IWidgetInfoItem} designer
|
|
137
|
+
*/
|
|
69
138
|
function registerMobilePluginWidgetItem(designer) {
|
|
70
|
-
|
|
139
|
+
registerPluginWidgetItem(mobileWidgetInfo, designer);
|
|
71
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* 注册平板端插件组件配置
|
|
143
|
+
*
|
|
144
|
+
* @export
|
|
145
|
+
* @param {IWidgetInfoItem} designer
|
|
146
|
+
*/
|
|
72
147
|
function registerPadPluginWidgetItem(designer) {
|
|
73
|
-
|
|
148
|
+
registerPluginWidgetItem(padWidgetInfo, designer);
|
|
74
149
|
}
|
|
75
|
-
|
|
150
|
+
//#endregion
|
|
76
151
|
export { getWidgetInfo, mobileWidgetInfo, padWidgetInfo, registerMobilePluginWidgetItem, registerMobileWidgetItem, registerPadPluginWidgetItem, registerPadWidgetItem, registerPluginWidgetItem, registerWebPluginWidgetItem, registerWebWidgetItem, registerWidgetItem, webWidgetInfo };
|
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/schema",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5-dev.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台 schema 架构包",
|
|
6
|
-
"
|
|
7
|
-
"module": "es/index.mjs",
|
|
6
|
+
"loader": "dist/index.esm.min.js",
|
|
8
7
|
"types": "es/index.d.ts",
|
|
9
|
-
"system": "dist/index.system.min.js",
|
|
10
8
|
"exports": {
|
|
11
9
|
".": {
|
|
12
10
|
"types": "./es/index.d.ts",
|
|
13
|
-
"import": "./es/index.mjs"
|
|
14
|
-
"require": "./dist/index.min.cjs"
|
|
11
|
+
"import": "./es/index.mjs"
|
|
15
12
|
},
|
|
16
13
|
"./types": {
|
|
17
14
|
"types": "./es/types/index.d.ts"
|
|
@@ -51,13 +48,15 @@
|
|
|
51
48
|
"gen-api:platform": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=platform -t ../cli/hbs-temp -o ./src/service/gct-platform && prettier './src/service/gct-platform' --write"
|
|
52
49
|
},
|
|
53
50
|
"dependencies": {
|
|
54
|
-
"@gct-paas/api": "0.1.
|
|
55
|
-
"@gct-paas/core": "0.1.
|
|
56
|
-
"
|
|
51
|
+
"@gct-paas/api": "^0.1.2-dev.3",
|
|
52
|
+
"@gct-paas/core": "0.1.5-dev.0",
|
|
53
|
+
"lodash-es": "^4.17.23",
|
|
54
|
+
"vue": "^3.5.30"
|
|
57
55
|
},
|
|
58
|
-
"
|
|
59
|
-
"@gct-paas/
|
|
60
|
-
"
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@gct-paas/api": "*",
|
|
58
|
+
"@gct-paas/core": "*",
|
|
59
|
+
"vue": ">=3"
|
|
61
60
|
},
|
|
62
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "d5a1badfd34c55ceefd2cf33f2ee659454076e37"
|
|
63
62
|
}
|