@maxelms/create-plugin-cli 1.1.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.
Files changed (274) hide show
  1. package/README.en.md +36 -0
  2. package/README.md +12 -0
  3. package/bin/build.js +29 -0
  4. package/bin/compress.js +35 -0
  5. package/bin/copy.js +39 -0
  6. package/bin/index.js +53 -0
  7. package/configuration-schema.json +829 -0
  8. package/lib/index.d.ts +21 -0
  9. package/lib/index.js +242 -0
  10. package/lib/utils.d.ts +18 -0
  11. package/lib/utils.js +114 -0
  12. package/package.json +50 -0
  13. package/templates/jQuery-micro-app/package.json.tpl +19 -0
  14. package/templates/jQuery-micro-app/src/README.md +5 -0
  15. package/templates/jQuery-micro-app/src/configuration.json +30 -0
  16. package/templates/jQuery-micro-app/src/index.html +17 -0
  17. package/templates/jQuery-micro-app/src/main.js.tpl +31 -0
  18. package/templates/jQuery-micro-app/src/manifest.json.tpl +9 -0
  19. package/templates/jQuery-micro-app/src/style.css +11 -0
  20. package/templates/maxelms-navigation/.babelrc +7 -0
  21. package/templates/maxelms-navigation/.gitignore.tpl +23 -0
  22. package/templates/maxelms-navigation/README.md +15 -0
  23. package/templates/maxelms-navigation/global.d.ts +2 -0
  24. package/templates/maxelms-navigation/index.html +16 -0
  25. package/templates/maxelms-navigation/package.json +65 -0
  26. package/templates/maxelms-navigation/patches/live2d-widget@3.1.4.patch +4534 -0
  27. package/templates/maxelms-navigation/pnpm-lock.yaml +7993 -0
  28. package/templates/maxelms-navigation/src/App.tsx +47 -0
  29. package/templates/maxelms-navigation/src/components/Actions/ColorPicker.tsx +86 -0
  30. package/templates/maxelms-navigation/src/components/Actions/SwitchApps.tsx +83 -0
  31. package/templates/maxelms-navigation/src/components/Actions/index.tsx +95 -0
  32. package/templates/maxelms-navigation/src/components/Cutie.tsx +24 -0
  33. package/templates/maxelms-navigation/src/components/Enterprises.tsx +46 -0
  34. package/templates/maxelms-navigation/src/components/Logo.tsx +29 -0
  35. package/templates/maxelms-navigation/src/components/Menus/MenuPanel.tsx +55 -0
  36. package/templates/maxelms-navigation/src/components/Menus/index.tsx +50 -0
  37. package/templates/maxelms-navigation/src/components/Search.tsx +77 -0
  38. package/templates/maxelms-navigation/src/imgs/corp-admin.svg +1 -0
  39. package/templates/maxelms-navigation/src/imgs/saas-admin.svg +1 -0
  40. package/templates/maxelms-navigation/src/imgs/skin.svg +1 -0
  41. package/templates/maxelms-navigation/src/imgs/tenant-admin.svg +1 -0
  42. package/templates/maxelms-navigation/src/imgs/user-center.svg +1 -0
  43. package/templates/maxelms-navigation/src/index.tsx +14 -0
  44. package/templates/maxelms-navigation/src/interface.ts +27 -0
  45. package/templates/maxelms-navigation/src/style.less.tpl +278 -0
  46. package/templates/maxelms-navigation/src/utils.ts.tpl +40 -0
  47. package/templates/maxelms-navigation/tsconfig.json +111 -0
  48. package/templates/maxelms-navigation/webpack.config.js +119 -0
  49. package/templates/maxelms-script/.babelrc +5 -0
  50. package/templates/maxelms-script/.gitignore.tpl +23 -0
  51. package/templates/maxelms-script/README.md +0 -0
  52. package/templates/maxelms-script/global.d.ts +2 -0
  53. package/templates/maxelms-script/index.html +10 -0
  54. package/templates/maxelms-script/package.json.tpl +55 -0
  55. package/templates/maxelms-script/pnpm-lock.yaml +7699 -0
  56. package/templates/maxelms-script/src/App.tsx +15 -0
  57. package/templates/maxelms-script/src/index.tsx +15 -0
  58. package/templates/maxelms-script/src/style.less.tpl +8 -0
  59. package/templates/maxelms-script/src/utils.ts.tpl +2 -0
  60. package/templates/maxelms-script/tsconfig.json +111 -0
  61. package/templates/maxelms-script/webpack.config.js +92 -0
  62. package/templates/maxelms-style/.gitignore.tpl +38 -0
  63. package/templates/maxelms-style/README.md +0 -0
  64. package/templates/maxelms-style/index.css +3 -0
  65. package/templates/maxelms-style/index.less +4 -0
  66. package/templates/maxelms-style/package.json.tpl +17 -0
  67. package/templates/playground/dist/main.css +2 -0
  68. package/templates/playground/dist/main.js +2 -0
  69. package/templates/playground/dist/main.js.LICENSE.txt +52 -0
  70. package/templates/playground/dist/playground.html +1 -0
  71. package/templates/playground/dist/react-dom.production.min.js +2 -0
  72. package/templates/playground/dist/react-dom.production.min.js.LICENSE.txt +8 -0
  73. package/templates/playground/dist/react.production.min.js +2 -0
  74. package/templates/playground/dist/react.production.min.js.LICENSE.txt +8 -0
  75. package/templates/playground/dist/zone.umd.min.js +2 -0
  76. package/templates/playground/dist/zone.umd.min.js.LICENSE.txt +29 -0
  77. package/templates/project/package.json +17 -0
  78. package/templates/react-micro-app/.babelrc +6 -0
  79. package/templates/react-micro-app/.gitignore.tpl +23 -0
  80. package/templates/react-micro-app/README.md +5 -0
  81. package/templates/react-micro-app/manifest.json.tpl +21 -0
  82. package/templates/react-micro-app/package.json.tpl +53 -0
  83. package/templates/react-micro-app/public/configuration.json +30 -0
  84. package/templates/react-micro-app/public/index.html +10 -0
  85. package/templates/react-micro-app/src/components/NoMatch.tsx +15 -0
  86. package/templates/react-micro-app/src/context/masterContext.ts +11 -0
  87. package/templates/react-micro-app/src/index.tsx +52 -0
  88. package/templates/react-micro-app/src/layouts/BasicLayout.less +16 -0
  89. package/templates/react-micro-app/src/layouts/BasicLayout.tsx +21 -0
  90. package/templates/react-micro-app/src/pages/Home/index.less +15 -0
  91. package/templates/react-micro-app/src/pages/Home/index.tsx +33 -0
  92. package/templates/react-micro-app/src/pages/List/index.less +12 -0
  93. package/templates/react-micro-app/src/pages/List/index.tsx +12 -0
  94. package/templates/react-micro-app/src/pages/New/index.less +12 -0
  95. package/templates/react-micro-app/src/pages/New/index.tsx +12 -0
  96. package/templates/react-micro-app/src/pages/View/index.less +12 -0
  97. package/templates/react-micro-app/src/pages/View/index.tsx +12 -0
  98. package/templates/react-micro-app/src/public-path.js +4 -0
  99. package/templates/react-micro-app/src/router.tsx +44 -0
  100. package/templates/react-micro-app/tsconfig.json +102 -0
  101. package/templates/react-micro-app/typings.d.ts +11 -0
  102. package/templates/react-micro-app/webpack.config.js.tpl +178 -0
  103. package/templates/react-micro-app-umi/.editorconfig +16 -0
  104. package/templates/react-micro-app-umi/.env +1 -0
  105. package/templates/react-micro-app-umi/.gitignore.tpl +23 -0
  106. package/templates/react-micro-app-umi/.prettierignore +8 -0
  107. package/templates/react-micro-app-umi/.prettierrc +11 -0
  108. package/templates/react-micro-app-umi/.umirc.ts.tpl +31 -0
  109. package/templates/react-micro-app-umi/README.md +5 -0
  110. package/templates/react-micro-app-umi/manifest.json.tpl +21 -0
  111. package/templates/react-micro-app-umi/package.json.tpl +42 -0
  112. package/templates/react-micro-app-umi/public/basicConfiguration.json +30 -0
  113. package/templates/react-micro-app-umi/public/configuration.json +30 -0
  114. package/templates/react-micro-app-umi/src/layout/BasicLayout.tsx +16 -0
  115. package/templates/react-micro-app-umi/src/pages/about.tsx +11 -0
  116. package/templates/react-micro-app-umi/src/pages/home.tsx +19 -0
  117. package/templates/react-micro-app-umi/tsconfig.json +36 -0
  118. package/templates/react-micro-app-umi/typings.d.ts +8 -0
  119. package/templates/react-micro-button/.gitignore.tpl +23 -0
  120. package/templates/react-micro-button/README.md +5 -0
  121. package/templates/react-micro-button/configuration/Configuration.tsx +113 -0
  122. package/templates/react-micro-button/configuration/index.css +8 -0
  123. package/templates/react-micro-button/configuration/index.tsx +6 -0
  124. package/templates/react-micro-button/manifest.json.tpl +3 -0
  125. package/templates/react-micro-button/package.json.tpl +49 -0
  126. package/templates/react-micro-button/postcss.config.js +5 -0
  127. package/templates/react-micro-button/public/basicConfiguration.json +30 -0
  128. package/templates/react-micro-button/public/configuration.html +10 -0
  129. package/templates/react-micro-button/public/configuration.json +30 -0
  130. package/templates/react-micro-button/public/index.html +10 -0
  131. package/templates/react-micro-button/src/App.tsx +41 -0
  132. package/templates/react-micro-button/src/app.less +0 -0
  133. package/templates/react-micro-button/src/index.less +0 -0
  134. package/templates/react-micro-button/src/index.tsx +30 -0
  135. package/templates/react-micro-button/tsconfig.json +11 -0
  136. package/templates/react-micro-button/webpack.config.js.tpl +150 -0
  137. package/templates/react-micro-field/.babelrc +5 -0
  138. package/templates/react-micro-field/.gitignore.tpl +23 -0
  139. package/templates/react-micro-field/README.md +5 -0
  140. package/templates/react-micro-field/configuration/Configuration.tsx +113 -0
  141. package/templates/react-micro-field/configuration/index.css +8 -0
  142. package/templates/react-micro-field/configuration/index.tsx +6 -0
  143. package/templates/react-micro-field/manifest.json.tpl +7 -0
  144. package/templates/react-micro-field/package.json.tpl +50 -0
  145. package/templates/react-micro-field/postcss.config.js +5 -0
  146. package/templates/react-micro-field/public/basicConfiguration.json +30 -0
  147. package/templates/react-micro-field/public/configuration.html +10 -0
  148. package/templates/react-micro-field/public/configuration.json +30 -0
  149. package/templates/react-micro-field/public/index.html +10 -0
  150. package/templates/react-micro-field/src/App.tsx.tpl +51 -0
  151. package/templates/react-micro-field/src/index.tsx +29 -0
  152. package/templates/react-micro-field/src/style.less.tpl +12 -0
  153. package/templates/react-micro-field/tsconfig.json +11 -0
  154. package/templates/react-micro-field/webpack.config.js.tpl +157 -0
  155. package/templates/react-micro-field-umi/.editorconfig +16 -0
  156. package/templates/react-micro-field-umi/.gitignore.tpl +24 -0
  157. package/templates/react-micro-field-umi/.prettierignore +8 -0
  158. package/templates/react-micro-field-umi/.prettierrc +11 -0
  159. package/templates/react-micro-field-umi/README.md +5 -0
  160. package/templates/react-micro-field-umi/config/config.ts.tpl +41 -0
  161. package/templates/react-micro-field-umi/config/plugin.ts +18 -0
  162. package/templates/react-micro-field-umi/manifest.json.tpl +7 -0
  163. package/templates/react-micro-field-umi/package.json.tpl +48 -0
  164. package/templates/react-micro-field-umi/public/basicConfiguration.json +30 -0
  165. package/templates/react-micro-field-umi/public/configuration.json +30 -0
  166. package/templates/react-micro-field-umi/src/app.tsx +46 -0
  167. package/templates/react-micro-field-umi/src/global.tsx +0 -0
  168. package/templates/react-micro-field-umi/src/hooks/masterProps.ts +33 -0
  169. package/templates/react-micro-field-umi/src/layouts/BasicLayout.tsx +17 -0
  170. package/templates/react-micro-field-umi/src/pages/configuration/index.tsx +90 -0
  171. package/templates/react-micro-field-umi/src/pages/index.tsx.tpl +54 -0
  172. package/templates/react-micro-field-umi/src/pages/interface.ts +12 -0
  173. package/templates/react-micro-field-umi/src/pages/style.less.tpl +15 -0
  174. package/templates/react-micro-field-umi/src/public-path.js +5 -0
  175. package/templates/react-micro-field-umi/tsconfig.json +37 -0
  176. package/templates/react-micro-field-umi/typings.d.ts +10 -0
  177. package/templates/react-micro-plugin/.babelrc +5 -0
  178. package/templates/react-micro-plugin/.gitignore.tpl +23 -0
  179. package/templates/react-micro-plugin/README.md +5 -0
  180. package/templates/react-micro-plugin/configuration/Configuration.tsx +114 -0
  181. package/templates/react-micro-plugin/configuration/index.css +8 -0
  182. package/templates/react-micro-plugin/configuration/index.tsx +6 -0
  183. package/templates/react-micro-plugin/manifest.json.tpl +3 -0
  184. package/templates/react-micro-plugin/package.json.tpl +50 -0
  185. package/templates/react-micro-plugin/postcss.config.js +5 -0
  186. package/templates/react-micro-plugin/public/configuration.html +10 -0
  187. package/templates/react-micro-plugin/public/configuration.json +30 -0
  188. package/templates/react-micro-plugin/public/index.html +10 -0
  189. package/templates/react-micro-plugin/src/App.tsx.tpl +32 -0
  190. package/templates/react-micro-plugin/src/index.tsx +29 -0
  191. package/templates/react-micro-plugin/src/style.less.tpl +12 -0
  192. package/templates/react-micro-plugin/tsconfig.json +11 -0
  193. package/templates/react-micro-plugin/webpack.config.js.tpl +156 -0
  194. package/templates/react-micro-plugin-umi/.editorconfig +16 -0
  195. package/templates/react-micro-plugin-umi/.gitignore.tpl +24 -0
  196. package/templates/react-micro-plugin-umi/.prettierignore +8 -0
  197. package/templates/react-micro-plugin-umi/.prettierrc +11 -0
  198. package/templates/react-micro-plugin-umi/README.md +5 -0
  199. package/templates/react-micro-plugin-umi/config/config.ts +29 -0
  200. package/templates/react-micro-plugin-umi/config/plugin.ts +18 -0
  201. package/templates/react-micro-plugin-umi/manifest.json.tpl +3 -0
  202. package/templates/react-micro-plugin-umi/package.json.tpl +48 -0
  203. package/templates/react-micro-plugin-umi/public/configuration.json +30 -0
  204. package/templates/react-micro-plugin-umi/src/app.tsx +46 -0
  205. package/templates/react-micro-plugin-umi/src/global.tsx +0 -0
  206. package/templates/react-micro-plugin-umi/src/hooks/masterProps.ts +34 -0
  207. package/templates/react-micro-plugin-umi/src/layouts/BasicLayout.tsx +17 -0
  208. package/templates/react-micro-plugin-umi/src/pages/configuration/index.tsx +113 -0
  209. package/templates/react-micro-plugin-umi/src/pages/index.tsx +21 -0
  210. package/templates/react-micro-plugin-umi/src/public-path.js +5 -0
  211. package/templates/react-micro-plugin-umi/tsconfig.json +37 -0
  212. package/templates/react-micro-plugin-umi/typings.d.ts +10 -0
  213. package/templates/vue-micro-app/.gitignore.tpl +23 -0
  214. package/templates/vue-micro-app/README.md +5 -0
  215. package/templates/vue-micro-app/babel.config.js +15 -0
  216. package/templates/vue-micro-app/manifest.json.tpl +21 -0
  217. package/templates/vue-micro-app/package.json.tpl +54 -0
  218. package/templates/vue-micro-app/public/configuration.json +30 -0
  219. package/templates/vue-micro-app/public/favicon.ico +0 -0
  220. package/templates/vue-micro-app/public/index.html +10 -0
  221. package/templates/vue-micro-app/src/App.vue +35 -0
  222. package/templates/vue-micro-app/src/assets/logo.png +0 -0
  223. package/templates/vue-micro-app/src/components/HelloWorld.vue +32 -0
  224. package/templates/vue-micro-app/src/main.js +80 -0
  225. package/templates/vue-micro-app/src/public-path.js +5 -0
  226. package/templates/vue-micro-app/src/routes.js +19 -0
  227. package/templates/vue-micro-app/src/views/About.vue +13 -0
  228. package/templates/vue-micro-app/src/views/Home.vue +21 -0
  229. package/templates/vue-micro-app/vue.config.js.tpl +35 -0
  230. package/templates/vue-micro-button/.gitignore.tpl +23 -0
  231. package/templates/vue-micro-button/README.md +5 -0
  232. package/templates/vue-micro-button/babel.config.js +8 -0
  233. package/templates/vue-micro-button/configuration/App.vue +78 -0
  234. package/templates/vue-micro-button/configuration/main.js +11 -0
  235. package/templates/vue-micro-button/manifest.json.tpl +3 -0
  236. package/templates/vue-micro-button/package.json.tpl +51 -0
  237. package/templates/vue-micro-button/public/basicConfiguration.json +30 -0
  238. package/templates/vue-micro-button/public/configuration.html +10 -0
  239. package/templates/vue-micro-button/public/configuration.json +30 -0
  240. package/templates/vue-micro-button/public/index.html +12 -0
  241. package/templates/vue-micro-button/src/App.vue +46 -0
  242. package/templates/vue-micro-button/src/main.js +44 -0
  243. package/templates/vue-micro-button/vue.config.js.tpl +51 -0
  244. package/templates/vue-micro-field/.gitignore.tpl +23 -0
  245. package/templates/vue-micro-field/README.md +5 -0
  246. package/templates/vue-micro-field/babel.config.js +8 -0
  247. package/templates/vue-micro-field/configuration/App.vue +78 -0
  248. package/templates/vue-micro-field/configuration/main.js +11 -0
  249. package/templates/vue-micro-field/manifest.json.tpl +7 -0
  250. package/templates/vue-micro-field/package.json.tpl +53 -0
  251. package/templates/vue-micro-field/public/basicConfiguration.json +30 -0
  252. package/templates/vue-micro-field/public/configuration.html +10 -0
  253. package/templates/vue-micro-field/public/configuration.json +30 -0
  254. package/templates/vue-micro-field/public/index.html +10 -0
  255. package/templates/vue-micro-field/scripts/compress.js +32 -0
  256. package/templates/vue-micro-field/src/App.vue.tpl +55 -0
  257. package/templates/vue-micro-field/src/main.js +38 -0
  258. package/templates/vue-micro-field/src/style.less.tpl +16 -0
  259. package/templates/vue-micro-field/vue.config.js.tpl +51 -0
  260. package/templates/vue-micro-plugin/.gitignore.tpl +23 -0
  261. package/templates/vue-micro-plugin/README.md +24 -0
  262. package/templates/vue-micro-plugin/babel.config.js +8 -0
  263. package/templates/vue-micro-plugin/configuration/App.vue +100 -0
  264. package/templates/vue-micro-plugin/configuration/main.js +11 -0
  265. package/templates/vue-micro-plugin/manifest.json.tpl +3 -0
  266. package/templates/vue-micro-plugin/package.json.tpl +56 -0
  267. package/templates/vue-micro-plugin/public/configuration.html +10 -0
  268. package/templates/vue-micro-plugin/public/configuration.json +30 -0
  269. package/templates/vue-micro-plugin/public/index.html +10 -0
  270. package/templates/vue-micro-plugin/scripts/compress.js +32 -0
  271. package/templates/vue-micro-plugin/src/App.vue.tpl +42 -0
  272. package/templates/vue-micro-plugin/src/main.js +38 -0
  273. package/templates/vue-micro-plugin/src/style.less.tpl +16 -0
  274. package/templates/vue-micro-plugin/vue.config.js.tpl +53 -0
@@ -0,0 +1,829 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "type": "object",
4
+ "title": "自定义组件配置",
5
+ "description": "自定义组件配置",
6
+
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string"
10
+ }
11
+ },
12
+ "patternProperties": {
13
+ "^[a-zA-Z0-9$][a-zA-Z0-9_-]*$": {
14
+ "$ref": "#/definitions/config"
15
+ }
16
+ },
17
+ "additionalProperties": false,
18
+ "definitions": {
19
+ "config": {
20
+ "type": "object",
21
+ "properties": {
22
+ "type" : {
23
+ "description": "配置项类型",
24
+ "enum": [
25
+ "input",
26
+ "switch",
27
+ "radio",
28
+ "checkbox",
29
+ "slider",
30
+ "select",
31
+ "location",
32
+ "upload",
33
+ "textarea"
34
+ ]
35
+ },
36
+ "label" : {
37
+ "type": "string",
38
+ "description": "配置项名称",
39
+ "minLength": 1
40
+ },
41
+ "help": {
42
+ "type": "string",
43
+ "description": "配置项说明"
44
+ },
45
+ "tooltip": {
46
+ "type": "string",
47
+ "description": "配置项提示"
48
+ },
49
+ "dependencies": {
50
+ "$ref": "#/definitions/dependencies"
51
+ },
52
+ "defaultValue": {
53
+ "description": "默认值"
54
+ }
55
+ },
56
+ "required": ["type", "label"],
57
+ "allOf": [
58
+ {
59
+ "if": {
60
+ "properties": {
61
+ "type": {
62
+ "const": "input"
63
+ }
64
+ }
65
+ },
66
+ "then": {
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "type": true,
70
+ "label": true,
71
+ "help": true,
72
+ "tooltip": true,
73
+ "placeholder": {
74
+ "type": "string"
75
+ },
76
+ "dependencies": true,
77
+ "defaultValue": {
78
+ "type": "string"
79
+ },
80
+ "prefix": {
81
+ "type": "string"
82
+ },
83
+ "suffix": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ }
88
+ }, {
89
+ "if": {
90
+ "properties": {
91
+ "type": {
92
+ "const": "input-number"
93
+ }
94
+ }
95
+ },
96
+ "then": {
97
+ "additionalProperties": false,
98
+ "properties": {
99
+ "type": true,
100
+ "label": true,
101
+ "help": true,
102
+ "tooltip": true,
103
+ "placeholder": {
104
+ "type": "string"
105
+ },
106
+ "dependencies": true,
107
+ "min": {
108
+ "type": "number",
109
+ "description": "最小值"
110
+ },
111
+ "max": {
112
+ "type": "number",
113
+ "description": "最大值"
114
+ },
115
+ "defaultValue": {
116
+ "type": "number"
117
+ },
118
+ "prefix": {
119
+ "type": "string"
120
+ }
121
+ }
122
+ }
123
+ }, {
124
+ "if": {
125
+ "properties": {
126
+ "type": {
127
+ "const": "switch"
128
+ }
129
+ }
130
+ },
131
+ "then": {
132
+ "additionalProperties": false,
133
+ "properties": {
134
+ "type": true,
135
+ "label": true,
136
+ "help": true,
137
+ "tooltip": true,
138
+ "dependencies": true,
139
+ "defaultValue": {
140
+ "type": "boolean"
141
+ },
142
+ "checkedText": {
143
+ "type": "string"
144
+ },
145
+ "unCheckedText": {
146
+ "type": "string"
147
+ }
148
+ }
149
+ }
150
+ }, {
151
+ "if": {
152
+ "properties": {
153
+ "type": {
154
+ "const": "select"
155
+ }
156
+ }
157
+ },
158
+ "then": {
159
+ "additionalProperties": false,
160
+ "properties": {
161
+ "type": true,
162
+ "label": true,
163
+ "help": true,
164
+ "tooltip": true,
165
+ "dependencies": true,
166
+ "placeholder": {
167
+ "type": "string"
168
+ },
169
+ "multiple": {
170
+ "type": "boolean"
171
+ },
172
+ "defaultValue": {
173
+ "$ref": "#/definitions/selectOptions"
174
+ },
175
+ "options": {
176
+ "$ref": "#/definitions/selectOptions"
177
+ },
178
+ "allowClear": {
179
+ "type": "boolean"
180
+ }
181
+ },
182
+ "required": ["options"]
183
+ }
184
+ }, {
185
+ "if": {
186
+ "properties": {
187
+ "type": {
188
+ "const": "color-picker"
189
+ }
190
+ }
191
+ },
192
+ "then": {
193
+ "additionalProperties": false,
194
+ "properties": {
195
+ "type": true,
196
+ "label": true,
197
+ "help": true,
198
+ "tooltip": true,
199
+ "dependencies": true,
200
+ "defaultValue": {
201
+ "type": "string"
202
+ }
203
+ }
204
+ }
205
+ }, {
206
+ "if": {
207
+ "properties": {
208
+ "type": {
209
+ "const": "field-select"
210
+ }
211
+ }
212
+ },
213
+ "then": {
214
+ "additionalProperties": false,
215
+ "properties": {
216
+ "type": true,
217
+ "label": true,
218
+ "help": true,
219
+ "tooltip": true,
220
+ "dependencies": true,
221
+ "multiple": {
222
+ "type": "boolean"
223
+ },
224
+ "maxCount": {
225
+ "type": "number"
226
+ },
227
+ "placeholder": {
228
+ "type": "string"
229
+ },
230
+ "defaultValue": {
231
+ "$ref": "#/definitions/fieldData"
232
+ },
233
+ "filters": {
234
+ "type": "array",
235
+ "items": {
236
+ "enum": ["TEXT", "TEXTAREA", "INT", "DOUBLE", "BOOLEAN", "CURRENCY", "CURRENCYI18N", "PERCENTAGE", "DATE", "TIMESTAMP", "RADIO", "MULTISELECT", "RADIOTREE", "MULTISELECTTREE", "URL", "EMAIL", "TELPHONEI18N", "CELLPHONEI18N", "ADDRESS", "ADDRESSVER", "ADDRESSI18N", "AUTONUMBER", "FORMULA", "ENCLOSURE", "IMAGE_SINGLE", "RICHTEXT", "MAP", "IDRELATIONSHIP", "MULTITOONE", "COUNTRIESANDREGIONS", "LABEL", "SIGNATURE", "COLLECT", "CELLPHONE", "TELPHONE", "SUBOBJROUTE", "METADATARELATIONSHIP", "PATH", "LIST", "SET", "VALUEFROMOUT", "STRING", "VIEW", "EXTEND", "ANYTHING"]
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }, {
242
+ "if": {
243
+ "properties": {
244
+ "type": {
245
+ "const": "slider"
246
+ }
247
+ }
248
+ },
249
+ "then": {
250
+ "additionalProperties": false,
251
+ "properties": {
252
+ "type": true,
253
+ "label": true,
254
+ "help": true,
255
+ "tooltip": true,
256
+ "dependencies": true,
257
+ "min": {
258
+ "type": "number"
259
+ },
260
+ "max": {
261
+ "type": "number"
262
+ },
263
+ "range": {
264
+ "type": "boolean"
265
+ },
266
+ "defaultValue": true,
267
+ "dots": {
268
+ "type": "boolean"
269
+ },
270
+ "marks": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "patternProperties": {
274
+ "^[0-9]+$": {
275
+ "type": "string"
276
+ }
277
+ }
278
+ },
279
+ "step": true
280
+ },
281
+ "if": {
282
+ "properties": {
283
+ "range": {
284
+ "const": true
285
+ }
286
+ }
287
+ },
288
+ "then": {
289
+ "properties": {
290
+ "defaultValue": {
291
+ "type": "array",
292
+ "items": {
293
+ "type": "number"
294
+ },
295
+ "maxItems": 2,
296
+ "minItems": 2
297
+ },
298
+ "step": {
299
+ "type": ["number", "null"]
300
+ }
301
+ }
302
+ },
303
+ "else": {
304
+ "properties": {
305
+ "defaultValue": {
306
+ "type": "number"
307
+ },
308
+ "step": {
309
+ "type": "number"
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }, {
315
+ "if": {
316
+ "properties": {
317
+ "type": {
318
+ "const": "tree-select"
319
+ }
320
+ }
321
+ },
322
+ "then": {
323
+ "additionalProperties": false,
324
+ "properties": {
325
+ "type": true,
326
+ "label": true,
327
+ "help": true,
328
+ "tooltip": true,
329
+ "dependencies": true,
330
+ "multiple": {
331
+ "type": "boolean"
332
+ },
333
+ "placeholder": {
334
+ "type": "string"
335
+ },
336
+ "allowClear": {
337
+ "type": "boolean"
338
+ },
339
+ "defaultValue": {
340
+ "$ref": "#/definitions/stringOrArray"
341
+ },
342
+ "treeData": {
343
+ "$ref": "#/definitions/treeData"
344
+ }
345
+ },
346
+ "required": ["treeData"]
347
+ }
348
+ }, {
349
+ "if": {
350
+ "properties": {
351
+ "type": {
352
+ "const": "object-select"
353
+ }
354
+ }
355
+ },
356
+ "then": {
357
+ "additionalProperties": false,
358
+ "properties": {
359
+ "type": true,
360
+ "label": true,
361
+ "help": true,
362
+ "tooltip": true,
363
+ "dependencies": true,
364
+ "placeholder": {
365
+ "type": "string"
366
+ },
367
+ "maxCount": {
368
+ "type": "number"
369
+ },
370
+ "multiple": {
371
+ "type": "boolean"
372
+ },
373
+ "defaultValue": {
374
+ "oneOf": [{
375
+ "$ref" : "#/definitions/objectData"
376
+ }, {
377
+ "type": "array",
378
+ "items": {
379
+ "$ref" : "#/definitions/objectData"
380
+ }
381
+ }]
382
+ }
383
+ }
384
+ }
385
+ }, {
386
+ "if": {
387
+ "properties": {
388
+ "type": {
389
+ "const": "radio"
390
+ }
391
+ }
392
+ },
393
+ "then": {
394
+ "additionalProperties": false,
395
+ "properties": {
396
+ "type": true,
397
+ "label": true,
398
+ "help": true,
399
+ "tooltip": true,
400
+ "dependencies": true,
401
+ "defaultValue": {
402
+ "$ref": "#/definitions/selectOption"
403
+ },
404
+ "options": {
405
+ "$ref": "#/definitions/selectOptions"
406
+ }
407
+ },
408
+ "required": ["options"]
409
+ }
410
+ }, {
411
+ "if": {
412
+ "properties": {
413
+ "type": {
414
+ "const": "checkbox"
415
+ }
416
+ }
417
+ },
418
+ "then": {
419
+ "additionalProperties": false,
420
+ "properties": {
421
+ "type": true,
422
+ "label": true,
423
+ "help": true,
424
+ "tooltip": true,
425
+ "dependencies": true,
426
+ "defaultValue": {
427
+ "$ref": "#/definitions/selectOptions"
428
+ },
429
+ "options": {
430
+ "$ref": "#/definitions/selectOptions"
431
+ }
432
+ },
433
+ "required": ["options"]
434
+ }
435
+ }, {
436
+ "if": {
437
+ "properties": {
438
+ "type": {
439
+ "const": "location"
440
+ }
441
+ }
442
+ },
443
+ "then": {
444
+ "additionalProperties": false,
445
+ "properties": {
446
+ "type": true,
447
+ "label": true,
448
+ "help": true,
449
+ "tooltip": true,
450
+ "dependencies": true,
451
+ "placeholder": {
452
+ "type": "string"
453
+ },
454
+ "defaultValue": {
455
+ "$ref": "#/definitions/locationData"
456
+ }
457
+ }
458
+ }
459
+ }, {
460
+ "if": {
461
+ "properties": {
462
+ "type": {
463
+ "const": "upload"
464
+ }
465
+ }
466
+ },
467
+ "then": {
468
+ "additionalProperties": false,
469
+ "properties": {
470
+ "type": true,
471
+ "label": true,
472
+ "help": true,
473
+ "tooltip": true,
474
+ "dependencies": true,
475
+ "maxCount": {
476
+ "type": "number"
477
+ },
478
+ "accept": {
479
+ "type": "string"
480
+ },
481
+ "defaultValue": {
482
+ "oneOf": [{
483
+ "$ref" : "#/definitions/attachmentData"
484
+ }, {
485
+ "type": "array",
486
+ "items": {
487
+ "$ref" : "#/definitions/attachmentData"
488
+ }
489
+ }]
490
+ }
491
+ }
492
+ }
493
+ }, {
494
+ "if": {
495
+ "properties": {
496
+ "type": {
497
+ "const": "multi-input"
498
+ }
499
+ }
500
+ },
501
+ "then": {
502
+ "additionalProperties": false,
503
+ "properties": {
504
+ "type": true,
505
+ "label": true,
506
+ "help": true,
507
+ "tooltip": true,
508
+ "dependencies": true,
509
+ "buttonName": {
510
+ "type": "string",
511
+ "description": "新建按钮名称"
512
+ },
513
+ "defaultValue": {
514
+ "type": "array",
515
+ "items": {
516
+ "type": "string"
517
+ }
518
+ }
519
+ }
520
+ }
521
+ }, {
522
+ "if": {
523
+ "properties": {
524
+ "type": {
525
+ "const": "date-picker"
526
+ }
527
+ }
528
+ },
529
+ "then": {
530
+ "additionalProperties": false,
531
+ "properties": {
532
+ "type": true,
533
+ "label": true,
534
+ "help": true,
535
+ "tooltip": true,
536
+ "dependencies": true,
537
+ "placeholder": {
538
+ "type": "string"
539
+ },
540
+ "defaultValue": {
541
+ "type": "string"
542
+ },
543
+ "showTime": {
544
+ "type": "boolean"
545
+ }
546
+ }
547
+ }
548
+ }, {
549
+ "if": {
550
+ "properties": {
551
+ "type": {
552
+ "const": "time-picker"
553
+ }
554
+ }
555
+ },
556
+ "then": {
557
+ "additionalProperties": false,
558
+ "properties": {
559
+ "type": true,
560
+ "label": true,
561
+ "help": true,
562
+ "tooltip": true,
563
+ "dependencies": true,
564
+ "placeholder": {
565
+ "type": "string"
566
+ },
567
+ "defaultValue": {
568
+ "type": "string"
569
+ }
570
+ }
571
+ }
572
+ }, {
573
+ "if": {
574
+ "properties": {
575
+ "type": {
576
+ "const": "textarea"
577
+ }
578
+ }
579
+ },
580
+ "then": {
581
+ "additionalProperties": false,
582
+ "properties": {
583
+ "type": true,
584
+ "label": true,
585
+ "help": true,
586
+ "tooltip": true,
587
+ "dependencies": true,
588
+ "placeholder": {
589
+ "type": "string"
590
+ },
591
+ "defaultValue": {
592
+ "type": "string"
593
+ }
594
+ }
595
+ }
596
+ }]
597
+ },
598
+ "dependencies": {
599
+ "type": "object",
600
+ "description": "配置项依赖",
601
+ "additionalProperties": false,
602
+ "properties": {
603
+ "visible": {
604
+ "type": "object",
605
+ "description": "依赖变化时, 更新配置项显示隐藏",
606
+ "additionalProperties": false,
607
+ "properties": {
608
+ "data": {
609
+ "type": "boolean"
610
+ },
611
+ "conditions": {
612
+ "$ref": "#/definitions/conditions"
613
+ }
614
+ }
615
+ },
616
+ "update": {
617
+ "oneOf": [{
618
+ "$ref" : "#/definitions/updateDependence"
619
+ }, {
620
+ "type": "array",
621
+ "items": {
622
+ "$ref" : "#/definitions/updateDependence"
623
+ }
624
+ }]
625
+ }
626
+ }
627
+ },
628
+ "updateDependence": {
629
+ "type": "object",
630
+ "additionalProperties": false,
631
+ "properties": {
632
+ "data": true,
633
+ "conditions": {
634
+ "$ref": "#/definitions/conditions"
635
+ }
636
+ }
637
+ },
638
+ "conditions": {
639
+ "oneOf": [{
640
+ "$ref" : "#/definitions/condition"
641
+ }, {
642
+ "type": "array",
643
+ "items": {
644
+ "$ref" : "#/definitions/condition"
645
+ }
646
+ }]
647
+ },
648
+ "condition": {
649
+ "type": "object",
650
+ "additionalProperties": false,
651
+ "patternProperties": {
652
+ "^[a-zA-Z0-9$][a-zA-Z0-9_-]*$": {
653
+ "type": "object",
654
+ "additionalProperties": false,
655
+ "properties": {
656
+ "value": true,
657
+ "operator": {
658
+ "enum": ["=", ">", ">=", "<", "<=", "!=", "in"]
659
+ }
660
+ },
661
+ "required": ["value", "operator"]
662
+ }
663
+ }
664
+ },
665
+ "selectOptions": {
666
+ "oneOf": [{
667
+ "$ref" : "#/definitions/selectOption"
668
+ }, {
669
+ "type": "array",
670
+ "items": {
671
+ "$ref" : "#/definitions/selectOption"
672
+ },
673
+ "minItems": 1
674
+ }]
675
+ },
676
+ "selectOption": {
677
+ "oneOf": [{
678
+ "type": "string"
679
+ }, {
680
+ "type": "number"
681
+ }, {
682
+ "type": "object",
683
+ "properties": {
684
+ "label": {
685
+ "type": ["string", "number"]
686
+ },
687
+ "value": {
688
+ "type": ["string", "number"]
689
+ }
690
+ },
691
+ "required": ["value", "label"]
692
+ }]
693
+ },
694
+ "stringOrArray": {
695
+ "oneOf": [{
696
+ "type": "string"
697
+ }, {
698
+ "type": "array",
699
+ "items": {
700
+ "type": "string"
701
+ }
702
+ }]
703
+ },
704
+ "fieldData": {
705
+ "type": "object",
706
+ "additionalProperties": false,
707
+ "properties": {
708
+ "pathChain": {
709
+ "type": "string"
710
+ },
711
+ "fieldId": {
712
+ "type": "string"
713
+ },
714
+ "fieldName": {
715
+ "type": "string"
716
+ },
717
+ "objId": {
718
+ "type": "string"
719
+ },
720
+ "objName": {
721
+ "type": "string"
722
+ },
723
+ "objProperty": {
724
+ "type": "string"
725
+ },
726
+ "type": {
727
+ "type": "string"
728
+ },
729
+ "apiName": {
730
+ "type": "string"
731
+ },
732
+ "dataSource": {
733
+ "type": "string"
734
+ },
735
+ "dataSourceType": {
736
+ "type": "string"
737
+ }
738
+ },
739
+ "required": ["pathChain", "fieldId", "fieldName", "objId", "objName", "type"]
740
+ },
741
+ "treeData": {
742
+ "type": "array",
743
+ "items": {
744
+ "type": "object",
745
+ "additionalProperties": false,
746
+ "properties": {
747
+ "value": {
748
+ "type": "string"
749
+ },
750
+ "title": {
751
+ "type": "string"
752
+ },
753
+ "children": {
754
+ "$ref": "#/definitions/treeData"
755
+ }
756
+ },
757
+ "required": ["value"]
758
+ }
759
+ },
760
+ "objectData": {
761
+ "type": "object",
762
+ "additionalProperties": false,
763
+ "properties": {
764
+ "objId": {
765
+ "type": "string"
766
+ },
767
+ "objName": {
768
+ "type": "string"
769
+ },
770
+ "objProperty": {
771
+ "type": "string"
772
+ },
773
+ "objCode": {
774
+ "type": "string"
775
+ }
776
+ },
777
+ "required": ["objId", "objName", "objProperty", "objCode"]
778
+ },
779
+ "locationData": {
780
+ "type": "object",
781
+ "additionalProperties": false,
782
+ "properties": {
783
+ "poiaddress": {
784
+ "type": "string"
785
+ },
786
+ "poiname": {
787
+ "type": "string"
788
+ },
789
+ "latlng": {
790
+ "type": "object",
791
+ "additionalProperties": false,
792
+ "properties": {
793
+ "lat": {
794
+ "type": "number"
795
+ },
796
+ "lng": {
797
+ "type": "number"
798
+ }
799
+ },
800
+ "required": ["lat", "lon"]
801
+ }
802
+ },
803
+ "required": ["poiaddress", "poiname", "latlng"]
804
+ },
805
+ "attachmentData": {
806
+ "type": "object",
807
+ "additionalProperties": false,
808
+ "properties": {
809
+ "name": {
810
+ "type": "string"
811
+ },
812
+ "size": {
813
+ "type": "number"
814
+ },
815
+ "type": {
816
+ "type": "string"
817
+ },
818
+ "fileId": {
819
+ "type": "number"
820
+ },
821
+ "url": {
822
+ "type": "string",
823
+ "format": "uri-format"
824
+ }
825
+ },
826
+ "required": ["name", "size", "type", "fileId", "url"]
827
+ }
828
+ }
829
+ }