@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,76 +1,149 @@
|
|
|
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
|
-
return padWidgetInfo;
|
|
26
|
-
default:
|
|
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: return webWidgetInfo;
|
|
47
|
+
}
|
|
29
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* 注册单一组件信息
|
|
51
|
+
*
|
|
52
|
+
* @export
|
|
53
|
+
* @param {IWidgetInfo} widgetInfo
|
|
54
|
+
* @param {string} type
|
|
55
|
+
* @param {IObject} module
|
|
56
|
+
*/
|
|
30
57
|
function registerWidgetItem(widgetInfo, type, module) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
widgetInfo.events[type] = module.eventList;
|
|
59
|
+
widgetInfo.hooks[type] = module.hooks;
|
|
60
|
+
widgetInfo.whiteList[type] = module.whiteList;
|
|
61
|
+
widgetInfo.blackList[type] = module.blackList;
|
|
62
|
+
widgetInfo.propEditors[type] = module.propEditorList;
|
|
63
|
+
widgetInfo.schema[type] = module.widget;
|
|
64
|
+
widgetInfo.callback[type] = module.runCallback;
|
|
65
|
+
widgetInfo.beforeCreate[type] = module.beforeCreate;
|
|
66
|
+
widgetInfo.styleEditors[type] = module.styleEditorList;
|
|
67
|
+
widgetInfo.designerConfig[type] = module.designerConfig;
|
|
41
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* 注册网页端单一组件信息
|
|
71
|
+
*
|
|
72
|
+
* @export
|
|
73
|
+
* @param {IObject} module
|
|
74
|
+
* @param {string} type
|
|
75
|
+
*/
|
|
42
76
|
function registerWebWidgetItem(module, type) {
|
|
43
|
-
|
|
77
|
+
registerWidgetItem(webWidgetInfo, type, module);
|
|
44
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* 注册移动端单一组件信息
|
|
81
|
+
*
|
|
82
|
+
* @export
|
|
83
|
+
* @param {IObject} module
|
|
84
|
+
* @param {string} type
|
|
85
|
+
*/
|
|
45
86
|
function registerMobileWidgetItem(module, type) {
|
|
46
|
-
|
|
87
|
+
registerWidgetItem(mobileWidgetInfo, type, module);
|
|
47
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* 注册平板端单一组件信息
|
|
91
|
+
*
|
|
92
|
+
* @export
|
|
93
|
+
* @param {IObject} module
|
|
94
|
+
* @param {string} type
|
|
95
|
+
*/
|
|
48
96
|
function registerPadWidgetItem(module, type) {
|
|
49
|
-
|
|
97
|
+
registerWidgetItem(padWidgetInfo, type, module);
|
|
50
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* 注册单一组件信息(插件方式)
|
|
101
|
+
*
|
|
102
|
+
* @export
|
|
103
|
+
* @param {IWidgetInfo} widgetInfo
|
|
104
|
+
* @param {IWidgetInfoItem} designer
|
|
105
|
+
*/
|
|
51
106
|
function registerPluginWidgetItem(widgetInfo, designer) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
107
|
+
if (designer) {
|
|
108
|
+
const { type } = designer.schema;
|
|
109
|
+
widgetInfo.events[type] = designer.events;
|
|
110
|
+
widgetInfo.hooks[type] = designer.hooks;
|
|
111
|
+
widgetInfo.whiteList[type] = designer.whiteList;
|
|
112
|
+
widgetInfo.blackList[type] = designer.blackList;
|
|
113
|
+
widgetInfo.propEditors[type] = designer.propEditors;
|
|
114
|
+
widgetInfo.schema[type] = designer.schema;
|
|
115
|
+
widgetInfo.callback[type] = designer.callback;
|
|
116
|
+
widgetInfo.beforeCreate[type] = designer.beforeCreate;
|
|
117
|
+
widgetInfo.styleEditors[type] = designer.styleEditors;
|
|
118
|
+
widgetInfo.designerConfig[type] = designer.designerConfig;
|
|
119
|
+
}
|
|
65
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* 注册网页端插件组件配置
|
|
123
|
+
*
|
|
124
|
+
* @export
|
|
125
|
+
* @param {IWidgetInfoItem} designer
|
|
126
|
+
*/
|
|
66
127
|
function registerWebPluginWidgetItem(designer) {
|
|
67
|
-
|
|
128
|
+
registerPluginWidgetItem(webWidgetInfo, designer);
|
|
68
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* 注册移动端插件组件配置
|
|
132
|
+
*
|
|
133
|
+
* @export
|
|
134
|
+
* @param {IWidgetInfoItem} designer
|
|
135
|
+
*/
|
|
69
136
|
function registerMobilePluginWidgetItem(designer) {
|
|
70
|
-
|
|
137
|
+
registerPluginWidgetItem(mobileWidgetInfo, designer);
|
|
71
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* 注册平板端插件组件配置
|
|
141
|
+
*
|
|
142
|
+
* @export
|
|
143
|
+
* @param {IWidgetInfoItem} designer
|
|
144
|
+
*/
|
|
72
145
|
function registerPadPluginWidgetItem(designer) {
|
|
73
|
-
|
|
146
|
+
registerPluginWidgetItem(padWidgetInfo, designer);
|
|
74
147
|
}
|
|
75
|
-
|
|
148
|
+
//#endregion
|
|
76
149
|
export { getWidgetInfo, mobileWidgetInfo, padWidgetInfo, registerMobilePluginWidgetItem, registerMobileWidgetItem, registerPadPluginWidgetItem, registerPadWidgetItem, registerPluginWidgetItem, registerWebPluginWidgetItem, registerWebWidgetItem, registerWidgetItem, webWidgetInfo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/schema",
|
|
3
|
-
"version": "0.1.4-dev.
|
|
3
|
+
"version": "0.1.4-dev.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台 schema 架构包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -51,13 +51,14 @@
|
|
|
51
51
|
"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
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@gct-paas/api": "0.1.
|
|
55
|
-
"@gct-paas/core": "0.1.4-dev.
|
|
54
|
+
"@gct-paas/api": "0.1.1",
|
|
55
|
+
"@gct-paas/core": "0.1.4-dev.12",
|
|
56
|
+
"lodash-es": "^4.17.23",
|
|
56
57
|
"vue": "^3.5.29"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@gct-paas/build": "^0.1.
|
|
60
|
+
"@gct-paas/build": "^0.1.6-dev.1",
|
|
60
61
|
"vitest": "^4.0.18"
|
|
61
62
|
},
|
|
62
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "0a7f1a0388cb21eb1c3a4868b14d664a5a3152ed"
|
|
63
64
|
}
|