@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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/index.esm.min.mjs +1250 -0
  4. package/dist/index.min.cjs +1 -0
  5. package/dist/index.system.min.js +1 -0
  6. package/es/constants/index.d.ts +14 -0
  7. package/es/constants/index.mjs +370 -0
  8. package/es/index.d.ts +8 -0
  9. package/es/index.mjs +20 -0
  10. package/es/interface/common/data-linkage-config.d.ts +17 -0
  11. package/es/interface/designer.d.ts +99 -0
  12. package/es/interface/index.d.ts +6 -0
  13. package/es/interface/modal/i-modal-body.d.ts +15 -0
  14. package/es/interface/modal/i-modal-bottom-button.d.ts +15 -0
  15. package/es/interface/modal/i-modal-footer.d.ts +15 -0
  16. package/es/interface/modal/i-modal-props.d.ts +26 -0
  17. package/es/interface/modal/i-modal.d.ts +52 -0
  18. package/es/interface/modal/index.d.ts +17 -0
  19. package/es/interface/schema/index.d.ts +2 -0
  20. package/es/interface/schema/widget-props/i-button-props.d.ts +170 -0
  21. package/es/interface/schema/widget-props/i-display-props.d.ts +48 -0
  22. package/es/interface/schema/widget-props/i-form-container-props.d.ts +77 -0
  23. package/es/interface/schema/widget-props/i-form-input-props.d.ts +409 -0
  24. package/es/interface/schema/widget-props/i-layout-props.d.ts +77 -0
  25. package/es/interface/schema/widget-props/i-search-widget-props.d.ts +126 -0
  26. package/es/interface/schema/widget-props/i-table-column-props.d.ts +54 -0
  27. package/es/interface/schema/widget-props/i-table-props.d.ts +384 -0
  28. package/es/interface/schema/widget-props/index.d.ts +8 -0
  29. package/es/interface/schema/widget-types.d.ts +370 -0
  30. package/es/interface/widget/i-common.d.ts +42 -0
  31. package/es/interface/widget/i-editors.d.ts +240 -0
  32. package/es/interface/widget/i-events.d.ts +55 -0
  33. package/es/interface/widget/i-hooks-and-misc.d.ts +59 -0
  34. package/es/interface/widget/i-props.d.ts +177 -0
  35. package/es/interface/widget/i-schemas.d.ts +135 -0
  36. package/es/interface/widget/i-styles.d.ts +114 -0
  37. package/es/interface/widget/index.d.ts +53 -0
  38. package/es/interface/widget-info/i-designer-item-hooks.d.ts +21 -0
  39. package/es/interface/widget-info/i-designer-schema-exports.d.ts +13 -0
  40. package/es/interface/widget-info/i-widget-info-item.d.ts +78 -0
  41. package/es/interface/widget-info/i-widget-info.d.ts +19 -0
  42. package/es/interface/widget-info/index.d.ts +4 -0
  43. package/es/schema/common-config/base-button-config.d.ts +3 -0
  44. package/es/schema/common-config/base-button-config.mjs +84 -0
  45. package/es/schema/common-config/button-editor-config.d.ts +4 -0
  46. package/es/schema/common-config/button-editor-config.mjs +206 -0
  47. package/es/schema/common-config/button-props-func.d.ts +5 -0
  48. package/es/schema/common-config/button-props-func.mjs +11 -0
  49. package/es/schema/common-config/common-field-editor-config.d.ts +10 -0
  50. package/es/schema/common-config/common-field-editor-config.mjs +61 -0
  51. package/es/schema/common-config/common-style.d.ts +3 -0
  52. package/es/schema/common-config/common-style.mjs +85 -0
  53. package/es/schema/common-config/display-editor-config.d.ts +3 -0
  54. package/es/schema/common-config/display-editor-config.mjs +89 -0
  55. package/es/schema/common-config/permission-editor-config.d.ts +2 -0
  56. package/es/schema/common-config/permission-editor-config.mjs +23 -0
  57. package/es/schema/index.d.ts +9 -0
  58. package/es/schema/modal/modal-body.d.ts +2 -0
  59. package/es/schema/modal/modal-body.mjs +9 -0
  60. package/es/schema/modal/modal-footer.d.ts +2 -0
  61. package/es/schema/modal/modal-footer.mjs +9 -0
  62. package/es/schema/modal/modal.d.ts +8 -0
  63. package/es/schema/modal/modal.mjs +182 -0
  64. package/es/types/index.d.ts +1 -0
  65. package/es/utils/index.d.ts +3 -0
  66. package/es/utils/schema/index.d.ts +45 -0
  67. package/es/utils/schema/index.mjs +49 -0
  68. package/es/utils/schema-style/index.d.ts +108 -0
  69. package/es/utils/schema-style/index.mjs +155 -0
  70. package/es/utils/widget-info/widget-info.d.ts +104 -0
  71. package/es/utils/widget-info/widget-info.mjs +76 -0
  72. package/package.json +63 -0
@@ -0,0 +1,76 @@
1
+ import { Platform } from '@gct-paas/core';
2
+
3
+ class WidgetInfo {
4
+ events = {};
5
+ propEditors = {};
6
+ schema = {};
7
+ callback = {};
8
+ beforeCreate = {};
9
+ styleEditors = {};
10
+ designerConfig = {};
11
+ hooks = {};
12
+ whiteList = {};
13
+ blackList = {};
14
+ }
15
+ const webWidgetInfo = new WidgetInfo();
16
+ const mobileWidgetInfo = new WidgetInfo();
17
+ const padWidgetInfo = new WidgetInfo();
18
+ function getWidgetInfo(platform) {
19
+ switch (platform) {
20
+ case Platform.WEB:
21
+ return webWidgetInfo;
22
+ case Platform.MOBILE:
23
+ return mobileWidgetInfo;
24
+ case Platform.PAD:
25
+ return padWidgetInfo;
26
+ default:
27
+ return webWidgetInfo;
28
+ }
29
+ }
30
+ function registerWidgetItem(widgetInfo, type, module) {
31
+ widgetInfo.events[type] = module.eventList;
32
+ widgetInfo.hooks[type] = module.hooks;
33
+ widgetInfo.whiteList[type] = module.whiteList;
34
+ widgetInfo.blackList[type] = module.blackList;
35
+ widgetInfo.propEditors[type] = module.propEditorList;
36
+ widgetInfo.schema[type] = module.widget;
37
+ widgetInfo.callback[type] = module.runCallback;
38
+ widgetInfo.beforeCreate[type] = module.beforeCreate;
39
+ widgetInfo.styleEditors[type] = module.styleEditorList;
40
+ widgetInfo.designerConfig[type] = module.designerConfig;
41
+ }
42
+ function registerWebWidgetItem(module, type) {
43
+ registerWidgetItem(webWidgetInfo, type, module);
44
+ }
45
+ function registerMobileWidgetItem(module, type) {
46
+ registerWidgetItem(mobileWidgetInfo, type, module);
47
+ }
48
+ function registerPadWidgetItem(module, type) {
49
+ registerWidgetItem(padWidgetInfo, type, module);
50
+ }
51
+ function registerPluginWidgetItem(widgetInfo, designer) {
52
+ if (designer) {
53
+ const { type } = designer.schema;
54
+ widgetInfo.events[type] = designer.events;
55
+ widgetInfo.hooks[type] = designer.hooks;
56
+ widgetInfo.whiteList[type] = designer.whiteList;
57
+ widgetInfo.blackList[type] = designer.blackList;
58
+ widgetInfo.propEditors[type] = designer.propEditors;
59
+ widgetInfo.schema[type] = designer.schema;
60
+ widgetInfo.callback[type] = designer.callback;
61
+ widgetInfo.beforeCreate[type] = designer.beforeCreate;
62
+ widgetInfo.styleEditors[type] = designer.styleEditors;
63
+ widgetInfo.designerConfig[type] = designer.designerConfig;
64
+ }
65
+ }
66
+ function registerWebPluginWidgetItem(designer) {
67
+ registerPluginWidgetItem(webWidgetInfo, designer);
68
+ }
69
+ function registerMobilePluginWidgetItem(designer) {
70
+ registerPluginWidgetItem(mobileWidgetInfo, designer);
71
+ }
72
+ function registerPadPluginWidgetItem(designer) {
73
+ registerPluginWidgetItem(padWidgetInfo, designer);
74
+ }
75
+
76
+ export { getWidgetInfo, mobileWidgetInfo, padWidgetInfo, registerMobilePluginWidgetItem, registerMobileWidgetItem, registerPadPluginWidgetItem, registerPadWidgetItem, registerPluginWidgetItem, registerWebPluginWidgetItem, registerWebWidgetItem, registerWidgetItem, webWidgetInfo };
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@gct-paas/schema",
3
+ "version": "0.1.4-dev.10",
4
+ "type": "module",
5
+ "description": "paas 平台 schema 架构包",
6
+ "main": "dist/index.min.cjs",
7
+ "module": "es/index.mjs",
8
+ "types": "es/index.d.ts",
9
+ "system": "dist/index.system.min.js",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./es/index.d.ts",
13
+ "import": "./es/index.mjs",
14
+ "require": "./dist/index.min.cjs"
15
+ },
16
+ "./types": {
17
+ "types": "./es/types/index.d.ts"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "es",
23
+ "CHANGELOG.md",
24
+ "README.md"
25
+ ],
26
+ "keywords": [
27
+ "paas",
28
+ "gct"
29
+ ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://git.gct-china.com/paas/frontend/paas-package.git"
33
+ },
34
+ "license": "MIT",
35
+ "author": "gct",
36
+ "scripts": {
37
+ "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
38
+ "es:build": "vite build --config vite.dev.config.ts",
39
+ "build": "npm run lint && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
40
+ "lint": "eslint src/",
41
+ "test": "vitest",
42
+ "test:run": "vitest run",
43
+ "test:coverage": "vitest run --coverage",
44
+ "publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
45
+ "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
46
+ "publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
47
+ "publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
48
+ "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/",
49
+ "gen-api": "npm run gen-api:apaas && npm run gen-api:platform",
50
+ "gen-api:apaas": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=apaas -t ../cli/hbs-temp -o ./src/service/gct-apaas && prettier './src/service/gct-apaas' --write",
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
+ },
53
+ "dependencies": {
54
+ "@gct-paas/api": "0.1.0-dev.8",
55
+ "@gct-paas/core": "0.1.4-dev.10",
56
+ "vue": "^3.5.29"
57
+ },
58
+ "devDependencies": {
59
+ "@gct-paas/build": "^0.1.5-dev.8",
60
+ "vitest": "^4.0.18"
61
+ },
62
+ "gitHead": "e707c6d6332e7e83a3d5df97b37f619065d8ea39"
63
+ }