@cloudbase/weda-ui 2.0.11 → 2.0.27

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 (262) hide show
  1. package/README.md +1 -0
  2. package/package.json +39 -35
  3. package/src/configs/components/button.json +60 -13
  4. package/src/configs/components/calendar.json +3 -3
  5. package/src/configs/components/carousel.json +57 -47
  6. package/src/configs/components/chart/bar.json +4 -13
  7. package/src/configs/components/chart/line.json +4 -13
  8. package/src/configs/components/chart/pie.json +3 -10
  9. package/src/configs/components/chart/statisticsCard.json +1 -4
  10. package/src/configs/components/container.json +1 -3
  11. package/src/configs/components/dataView.json +7 -15
  12. package/src/configs/components/drawer.json +24 -6
  13. package/src/configs/components/form/form.json +19 -0
  14. package/src/configs/components/form/input.json +20 -5
  15. package/src/configs/components/form/location.json +51 -48
  16. package/src/configs/components/form/radio.json +1 -3
  17. package/src/configs/components/form/richText.json +14 -14
  18. package/src/configs/components/form/select.json +62 -82
  19. package/src/configs/components/form/textarea.json +14 -1
  20. package/src/configs/components/form/uploader.json +64 -64
  21. package/src/configs/components/form/uploaderFile.json +1 -2
  22. package/src/configs/components/graphicCard.json +44 -45
  23. package/src/configs/components/image.json +44 -40
  24. package/src/configs/components/link.json +5 -10
  25. package/src/configs/components/listView.json +2 -8
  26. package/src/configs/components/lottery.json +7 -3
  27. package/src/configs/components/modal.json +26 -21
  28. package/src/configs/components/navLayout.json +68 -68
  29. package/src/configs/components/navigationBar.json +4 -1
  30. package/src/configs/components/richtextview.json +1 -1
  31. package/src/configs/components/scrollVeiw.json +14 -42
  32. package/src/configs/components/swiper.json +9 -9
  33. package/src/configs/components/wedaVideo.json +89 -0
  34. package/src/configs/components/wxOpenApi/phone.json +7 -21
  35. package/src/configs/components/wxOpenApi/phoneCode.json +7 -19
  36. package/src/configs/components/wxOpenApi/share.json +14 -24
  37. package/src/configs/components/wxOpenApi/userInfo.json +9 -27
  38. package/src/configs/index.js +2 -0
  39. package/src/mp/components/calendar/index.js +4 -1
  40. package/src/mp/components/calendar/index.json +3 -2
  41. package/src/mp/components/calendar/index.wxml +6 -28
  42. package/src/mp/components/calendar/index.wxss +17 -16
  43. package/src/mp/components/carousel/index.json +1 -1
  44. package/src/mp/components/carousel/index.wxml +3 -30
  45. package/src/mp/components/chart/bar/index.wxml +1 -6
  46. package/src/mp/components/chart/ec-canvas/ec-canvas.json +1 -1
  47. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +2 -19
  48. package/src/mp/components/chart/line/index.wxml +1 -6
  49. package/src/mp/components/chart/pie/index.wxml +1 -6
  50. package/src/mp/components/chart/statisticsCard/index.wxml +1 -5
  51. package/src/mp/components/chart/statisticsCard/index.wxss +7 -10
  52. package/src/mp/components/dataView/index.wxml +1 -13
  53. package/src/mp/components/form/checkbox/index.js +5 -1
  54. package/src/mp/components/form/checkbox/index.wxml +3 -18
  55. package/src/mp/components/form/formcell/index.wxss +5 -0
  56. package/src/mp/components/form/input/index.js +1 -1
  57. package/src/mp/components/form/input/index.wxml +3 -16
  58. package/src/mp/components/form/input/index.wxss +7 -1
  59. package/src/mp/components/form/location/components/mapChoose/index.json +1 -1
  60. package/src/mp/components/form/location/components/mapChoose/index.wxml +11 -58
  61. package/src/mp/components/form/location/index.js +7 -1
  62. package/src/mp/components/form/location/index.json +1 -1
  63. package/src/mp/components/form/location/index.wxml +7 -43
  64. package/src/mp/components/form/radio/index.js +5 -1
  65. package/src/mp/components/form/radio/index.wxml +2 -14
  66. package/src/mp/components/form/select/index.js +2 -2
  67. package/src/mp/components/form/select/index.wxml +3 -33
  68. package/src/mp/components/form/select/index.wxss +9 -0
  69. package/src/mp/components/form/switch/index.wxml +2 -13
  70. package/src/mp/components/form/textarea/index.js +6 -0
  71. package/src/mp/components/form/textarea/index.wxml +4 -23
  72. package/src/mp/components/form/textarea/index.wxss +5 -0
  73. package/src/mp/components/form/uploader/index.wxml +2 -20
  74. package/src/mp/components/form/uploader/weui-uploader.json +6 -6
  75. package/src/mp/components/form/uploader/weui-uploader.wxml +10 -53
  76. package/src/mp/components/form/uploaderFile/index.wxml +14 -71
  77. package/src/mp/components/graphicCard/index.js +9 -11
  78. package/src/mp/components/graphicCard/index.wxml +6 -34
  79. package/src/mp/components/graphicCard/index.wxss +6 -6
  80. package/src/mp/components/image/index.wxml +3 -21
  81. package/src/mp/components/listView/index.wxml +8 -33
  82. package/src/mp/components/listView/index.wxss +2 -2
  83. package/src/mp/components/lottery/index.wxml +7 -31
  84. package/src/mp/components/navLayout/index.js +9 -12
  85. package/src/mp/components/navLayout/index.wxml +6 -30
  86. package/src/mp/components/navLayout/index.wxss +10 -10
  87. package/src/mp/components/navigationBar/index.json +1 -2
  88. package/src/mp/components/navigationBar/index.wxml +29 -146
  89. package/src/mp/components/navigationBar/index.wxss +10 -10
  90. package/src/mp/components/richText/index.wxml +1 -1
  91. package/src/mp/components/richText/index.wxss +7 -5
  92. package/src/mp/components/swiper/index.wxml +1 -14
  93. package/src/mp/components/tabs/index.json +1 -1
  94. package/src/mp/components/tabs/index.wxml +3 -22
  95. package/src/mp/components/tabs/index.wxss +1 -2
  96. package/src/mp/components/text/index.wxml +1 -7
  97. package/src/mp/components/wedaVideo/index.js +86 -0
  98. package/src/mp/components/wedaVideo/index.json +4 -0
  99. package/src/mp/components/wedaVideo/index.wxml +4 -0
  100. package/src/mp/components/wedaVideo/index.wxss +20 -0
  101. package/src/mp/components/wxOpenApi/phone/index.js +1 -9
  102. package/src/mp/components/wxOpenApi/phone/index.wxml +1 -11
  103. package/src/mp/components/wxOpenApi/phoneCode/index.json +1 -1
  104. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +1 -11
  105. package/src/mp/components/wxOpenApi/share/index.wxml +1 -11
  106. package/src/mp/components/wxOpenApi/userInfo/index.wxml +1 -10
  107. package/src/mp/index.json +1 -0
  108. package/src/mp/style/weda-ui.wxss +16 -6
  109. package/src/web/actions/showModal/index.tsx +5 -4
  110. package/src/web/components/calendar/index.css +99 -65
  111. package/src/web/components/chart/common/core/eChartBase.ts +55 -42
  112. package/src/web/components/chart/common/core/type.ts +23 -23
  113. package/src/web/components/chart/common/echart.css +12 -12
  114. package/src/web/components/chart/common/echarts.ts +3 -5
  115. package/src/web/components/chart/common/useChart.tsx +34 -16
  116. package/src/web/components/chart/statisticsCard/index.css +9 -8
  117. package/src/web/components/container/index.tsx +3 -4
  118. package/src/web/components/drawer/index.tsx +15 -4
  119. package/src/web/components/form/checkbox/index.tsx +32 -31
  120. package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -2
  121. package/src/web/components/form/form/index.css +3 -6
  122. package/src/web/components/form/form/index.tsx +2 -1
  123. package/src/web/components/form/formcell/index.css +6 -17
  124. package/src/web/components/form/formcell/index.tsx +2 -6
  125. package/src/web/components/form/input/index.css +8 -4
  126. package/src/web/components/form/input/index.tsx +61 -53
  127. package/src/web/components/form/location/common/mapChoose.css +13 -11
  128. package/src/web/components/form/location/common/selectModal.jsx +2 -11
  129. package/src/web/components/form/location/common/useLocationInfo.js +4 -0
  130. package/src/web/components/form/location/components/LocationH5/index.css +19 -20
  131. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +11 -1
  132. package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -13
  133. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +14 -5
  134. package/src/web/components/form/radio/index.tsx +32 -26
  135. package/src/web/components/form/renderDecorator.tsx +23 -26
  136. package/src/web/components/form/select/h5.tsx +2 -2
  137. package/src/web/components/form/select/index.css +9 -0
  138. package/src/web/components/form/select/index.tsx +76 -49
  139. package/src/web/components/form/select/region/index.ts +101 -80
  140. package/src/web/components/form/select/year.tsx +2 -0
  141. package/src/web/components/form/switch/index.tsx +40 -40
  142. package/src/web/components/form/textarea/index.css +4 -0
  143. package/src/web/components/form/textarea/index.tsx +38 -25
  144. package/src/web/components/form/types.d.ts +10 -10
  145. package/src/web/components/form/uploader/index.css +10 -0
  146. package/src/web/components/form/uploader/uploader.h5.tsx +3 -6
  147. package/src/web/components/form/uploader/uploader.pc.tsx +3 -6
  148. package/src/web/components/form/uploaderFile/index.css +24 -23
  149. package/src/web/components/form/uploaderFile/index.jsx +0 -5
  150. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +24 -15
  151. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +21 -13
  152. package/src/web/components/graphicCard/index.css +6 -6
  153. package/src/web/components/image/image.tsx +2 -2
  154. package/src/web/components/image/index.css +9 -7
  155. package/src/web/components/image/index.tsx +28 -11
  156. package/src/web/components/index.js +1 -0
  157. package/src/web/components/link/index.tsx +12 -12
  158. package/src/web/components/listView/index.css +8 -8
  159. package/src/web/components/lottery/index.css +43 -37
  160. package/src/web/components/lottery/index.tsx +3 -3
  161. package/src/web/components/modal/index.tsx +34 -34
  162. package/src/web/components/navLayout/index.css +25 -25
  163. package/src/web/components/navigationBar/index.css +26 -26
  164. package/src/web/components/picker/datePicker.tsx +3 -3
  165. package/src/web/components/picker/picker.tsx +3 -3
  166. package/src/web/components/richText/index.jsx +41 -46
  167. package/src/web/components/richTextView/index.css +7 -3
  168. package/src/web/components/richTextView/index.tsx +4 -6
  169. package/src/web/components/scrollView/index.tsx +2 -2
  170. package/src/web/components/slot/index.tsx +3 -4
  171. package/src/web/components/swiper/index.css +1 -1
  172. package/src/web/components/swiper/index.tsx +33 -15
  173. package/src/web/components/tabs/index.css +2 -3
  174. package/src/web/components/tabs/index.tsx +6 -6
  175. package/src/web/components/tabs/tabs.h5.tsx +17 -12
  176. package/src/web/components/tabs/tabs.pc.tsx +45 -34
  177. package/src/web/components/text/index.css +1 -1
  178. package/src/web/components/wedaVideo/index.css +42 -0
  179. package/src/web/components/wedaVideo/index.tsx +208 -0
  180. package/src/web/utils/constant.ts +2 -1
  181. package/src/web/utils/loading-fallback.tsx +2 -2
  182. package/src/web/utils/lodash.ts +1 -1
  183. package/src/web/utils/platform.js +13 -0
  184. package/src/web/utils/useSetState.ts +6 -2
  185. package/src/web/weda-ui.css +23 -8
  186. package/src/docs/common/format.tsx +0 -112
  187. package/src/docs/common/tableView.css +0 -164
  188. package/src/docs/common/tableView.tsx +0 -273
  189. package/src/docs/compsdocs/chart/Bar.mdx +0 -159
  190. package/src/docs/compsdocs/chart/Line.mdx +0 -100
  191. package/src/docs/compsdocs/chart/Pie.mdx +0 -83
  192. package/src/docs/compsdocs/chart/_category_.json +0 -1
  193. package/src/docs/compsdocs/chart/statisticsCard.mdx +0 -51
  194. package/src/docs/compsdocs/database/DataView.mdx +0 -33
  195. package/src/docs/compsdocs/database/ListView.mdx +0 -33
  196. package/src/docs/compsdocs/database/_category_.json +0 -1
  197. package/src/docs/compsdocs/form/Form.mdx +0 -35
  198. package/src/docs/compsdocs/form/FormCheckbox.mdx +0 -35
  199. package/src/docs/compsdocs/form/FormDate.mdx +0 -30
  200. package/src/docs/compsdocs/form/FormEmail.mdx +0 -30
  201. package/src/docs/compsdocs/form/FormImageUploader.mdx +0 -31
  202. package/src/docs/compsdocs/form/FormInput.mdx +0 -30
  203. package/src/docs/compsdocs/form/FormLocation.mdx +0 -64
  204. package/src/docs/compsdocs/form/FormPhone.mdx +0 -30
  205. package/src/docs/compsdocs/form/FormRadio.mdx +0 -35
  206. package/src/docs/compsdocs/form/FormRegion.mdx +0 -30
  207. package/src/docs/compsdocs/form/FormSelect.mdx +0 -36
  208. package/src/docs/compsdocs/form/FormSwitch.mdx +0 -30
  209. package/src/docs/compsdocs/form/FormTextarea.mdx +0 -30
  210. package/src/docs/compsdocs/form/FormTime.mdx +0 -30
  211. package/src/docs/compsdocs/form/FormUploadFile.mdx +0 -30
  212. package/src/docs/compsdocs/form/FormUrl.mdx +0 -30
  213. package/src/docs/compsdocs/form/_category_.json +0 -1
  214. package/src/docs/compsdocs/grid/Card.mdx +0 -32
  215. package/src/docs/compsdocs/grid/Container.mdx +0 -42
  216. package/src/docs/compsdocs/grid/Footer.mdx +0 -31
  217. package/src/docs/compsdocs/grid/GridLayout.mdx +0 -32
  218. package/src/docs/compsdocs/grid/Header.mdx +0 -31
  219. package/src/docs/compsdocs/grid/Layout.mdx +0 -25
  220. package/src/docs/compsdocs/grid/List.mdx +0 -31
  221. package/src/docs/compsdocs/grid/ScrollView.mdx +0 -37
  222. package/src/docs/compsdocs/grid/Swiper.mdx +0 -58
  223. package/src/docs/compsdocs/grid/_category_.json +0 -1
  224. package/src/docs/compsdocs/media/Icon.mdx +0 -31
  225. package/src/docs/compsdocs/media/Image.mdx +0 -55
  226. package/src/docs/compsdocs/media/_category_.json +0 -1
  227. package/src/docs/compsdocs/model/ModelCreate.mdx +0 -20
  228. package/src/docs/compsdocs/model/ModelDetail.mdx +0 -20
  229. package/src/docs/compsdocs/model/ModelTable.mdx +0 -24
  230. package/src/docs/compsdocs/model/ModelUpdate.mdx +0 -21
  231. package/src/docs/compsdocs/model/PageLayout.mdx +0 -21
  232. package/src/docs/compsdocs/model/_category_.json +0 -1
  233. package/src/docs/compsdocs/navmenu/Classification.mdx +0 -38
  234. package/src/docs/compsdocs/navmenu/NavBar.mdx +0 -43
  235. package/src/docs/compsdocs/navmenu/NavLayout.mdx +0 -30
  236. package/src/docs/compsdocs/navmenu/TabBar.mdx +0 -43
  237. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +0 -29
  238. package/src/docs/compsdocs/navmenu/_category_.json +0 -1
  239. package/src/docs/compsdocs/senior/Lottery.mdx +0 -48
  240. package/src/docs/compsdocs/senior/Modal.mdx +0 -58
  241. package/src/docs/compsdocs/senior/SlotMachine.mdx +0 -52
  242. package/src/docs/compsdocs/senior/_category_.json +0 -1
  243. package/src/docs/compsdocs/show/Calendar.mdx +0 -29
  244. package/src/docs/compsdocs/show/Divider.mdx +0 -31
  245. package/src/docs/compsdocs/show/GraphicCard.mdx +0 -30
  246. package/src/docs/compsdocs/show/Item.mdx +0 -32
  247. package/src/docs/compsdocs/show/ItemList.mdx +0 -47
  248. package/src/docs/compsdocs/show/Media.mdx +0 -25
  249. package/src/docs/compsdocs/show/StatusTip.mdx +0 -25
  250. package/src/docs/compsdocs/show/Swiper.mdx +0 -33
  251. package/src/docs/compsdocs/show/Tabs.mdx +0 -38
  252. package/src/docs/compsdocs/show/_category_.json +0 -1
  253. package/src/docs/compsdocs/show/button.mdx +0 -25
  254. package/src/docs/compsdocs/text/Link.mdx +0 -43
  255. package/src/docs/compsdocs/text/RichTextView.mdx +0 -36
  256. package/src/docs/compsdocs/text/Text.mdx +0 -31
  257. package/src/docs/compsdocs/text/Title.mdx +0 -32
  258. package/src/docs/compsdocs/text/_category_.json +0 -1
  259. package/src/docs/compsdocs/wxOpen/Phone.mdx +0 -60
  260. package/src/docs/compsdocs/wxOpen/Share.mdx +0 -46
  261. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +0 -60
  262. package/src/docs/compsdocs/wxOpen/_category_.json +0 -4
package/README.md CHANGED
@@ -122,6 +122,7 @@ export default function Container({ children, events, ...args }) {
122
122
  组件配置默认存放在 `src/configs` 目录下。
123
123
 
124
124
  #### 组件代码模版生成
125
+
125
126
  可以通过 `npm run new` 生成上述文件
126
127
 
127
128
  ### 调试组件库
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "2.0.11",
3
+ "version": "2.0.27",
4
4
  "main": "./src/index.js",
5
5
  "module": "./src/index",
6
6
  "miniprogram": "mpdist",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "files": [
11
11
  "src",
12
+ "!src/docs",
12
13
  "!src/test",
13
14
  "!src/stories",
14
15
  "!src/web/wedatheme/postcss.config.js",
@@ -22,8 +23,8 @@
22
23
  "dev": "tcb lowcode debug",
23
24
  "build:cli": "tcb lowcode build",
24
25
  "build:analyze": "cross-env ANALYZER=1 tcb lowcode build",
25
- "test": "jest test --env=jsdom --detectOpenHandles",
26
- "test:jest": "jest test --env=jsdom --detectOpenHandles",
26
+ "test": "npm run test:jest",
27
+ "test:jest": "jest test --env=jsdom",
27
28
  "test:watch": "jest test --env=jsdom --watch",
28
29
  "test:e2e": "npx cypress run-ct",
29
30
  "test:all": "npm run test && npm run test:e2e",
@@ -58,9 +59,9 @@
58
59
  "dependencies": {
59
60
  "@cloudbase/ui-react": "^1.0.4",
60
61
  "@loadable/component": "^5.15.2",
61
- "@react-hookz/web": "^12.3.0",
62
- "@tcwd/style-wedatheme": "^1.0.1",
63
- "@use-gesture/react": "^10.2.4",
62
+ "@react-hookz/web": "^14.2.2",
63
+ "@tcwd/style-wedatheme": "^1.0.4",
64
+ "@use-gesture/react": "^10.2.14",
64
65
  "braft-editor": "^2.3.9",
65
66
  "braft-utils": "^3.0.12",
66
67
  "dayjs": "^1.10.7",
@@ -74,6 +75,7 @@
74
75
  "tdesign-icons-react": "0.0.8",
75
76
  "tea-component": "^2.7.3",
76
77
  "uuid": "8.3.2",
78
+ "video.js": "^7.18.1",
77
79
  "weui": "^2.4.4",
78
80
  "weui.js": "1.2.2"
79
81
  },
@@ -81,52 +83,53 @@
81
83
  "react": ">=16.8.0"
82
84
  },
83
85
  "devDependencies": {
84
- "@babel/preset-env": "^7.16.5",
85
- "@babel/preset-react": "^7.16.5",
86
- "@babel/preset-typescript": "^7.16.5",
87
- "@cloudbase/cli": "^1.12.4",
86
+ "@babel/preset-env": "^7.17.2",
87
+ "@babel/preset-react": "^7.17.2",
88
+ "@babel/preset-typescript": "^7.17.2",
88
89
  "@cloudbase/lowcode-build-dependence": "^0.9.0",
89
90
  "@commitlint/cli": "^16.0.2",
90
- "@commitlint/config-conventional": "^13.2.0",
91
+ "@commitlint/config-conventional": "^17.0.0",
92
+ "@craco/craco": "^6.4.3",
91
93
  "@cypress/code-coverage": "^3.9.12",
92
- "@cypress/react": "^5.12.1",
93
- "@cypress/webpack-dev-server": "~1.8.0",
94
+ "@cypress/react": "^5.12.5",
95
+ "@cypress/webpack-dev-server": "~1.8.4",
94
96
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
95
- "@size-limit/preset-big-lib": "^7.0.5",
97
+ "@size-limit/preset-big-lib": "^7.0.8",
96
98
  "@storybook/addon-actions": "^6.4.9",
97
99
  "@storybook/addon-essentials": "^6.4.9",
98
100
  "@storybook/addon-links": "^6.4.9",
99
101
  "@storybook/addon-storyshots": "^6.4.9",
100
102
  "@storybook/react": "^6.4.9",
103
+ "@swc-node/jest": "^1.5.2",
101
104
  "@testing-library/jest-dom": "^5.16.1",
102
105
  "@testing-library/react": "^12.1.2",
103
106
  "@testing-library/react-hooks": "^7.0.2",
104
- "@types/jest": "^27.0.3",
105
- "@types/resize-observer-browser": "^0.1.6",
106
- "@typescript-eslint/eslint-plugin": "^5.9.0",
107
- "@typescript-eslint/parser": "^5.21.0",
108
- "babel-jest": "^27.4.5",
109
- "babel-loader": "^8.2.3",
107
+ "@types/jest": "^27.5.1",
108
+ "@types/resize-observer-browser": "^0.1.7",
109
+ "@typescript-eslint/eslint-plugin": "^5.25.0",
110
+ "@typescript-eslint/parser": "^5.25.0",
111
+ "babel-loader": "^8.2.5",
110
112
  "babel-plugin-istanbul": "^6.1.1",
111
- "canvas": "^2.9.0",
112
113
  "cross-env": "^7.0.3",
113
- "cypress": "~9.5.1",
114
- "eslint": "^8.9.0",
114
+ "cypress": "~9.6.1",
115
+ "eslint": "^8.15.0",
115
116
  "eslint-config-prettier": "^8.5.0",
116
- "eslint-config-tencent": "^1.0.3",
117
+ "eslint-config-tencent": "^1.0.4",
117
118
  "eslint-import-resolver-typescript": "^2.7.1",
118
119
  "eslint-plugin-cypress": "^2.12.1",
119
120
  "eslint-plugin-import": "^2.26.0",
120
- "eslint-plugin-jest": "^26.1.2",
121
+ "eslint-plugin-jest": "^26.2.2",
121
122
  "eslint-plugin-prettier": "^4.0.0",
122
- "eslint-plugin-react": "^7.28.0",
123
+ "eslint-plugin-react": "^7.30.0",
123
124
  "eslint-plugin-rulesdir": "^0.2.1",
124
- "husky": "^7.0.4",
125
+ "husky": "^8.0.1",
125
126
  "identity-obj-proxy": "^3.0.0",
126
127
  "jest": "^27.5.1",
128
+ "jest-canvas-mock": "^2.4.0",
129
+ "jest-environment-jsdom": "^27",
127
130
  "less": "^4.1.2",
128
- "miniprogram-simulate": "^1.4.3",
129
- "nano-staged": "^0.5.0",
131
+ "miniprogram-simulate": "^1.5.7",
132
+ "nano-staged": "^0.8.0",
130
133
  "prettier": "^2.6.2",
131
134
  "react": "^17.0.2",
132
135
  "react-dom": "^17.0.2",
@@ -134,13 +137,14 @@
134
137
  "react-test-renderer": "^17.0.2",
135
138
  "regenerator-runtime": "^0.13.9",
136
139
  "rimraf": "^3.0.2",
137
- "size-limit": "^7.0.5",
138
- "ts-jest": "^27.1.1",
140
+ "size-limit": "^7.0.8",
141
+ "swc-loader": "0.1.15",
142
+ "swc-plugin-coverage-instrument": "^0.0.6",
139
143
  "ts-loader": "^8.2.0",
140
- "typescript": "^4.5.4",
144
+ "typescript": "^4.6.4",
141
145
  "webpack": "4.44.2",
142
- "webpack-cli": "^4.9.1",
143
- "webpack-dev-server": "^4.7.3",
146
+ "webpack-cli": "^4.9.2",
147
+ "webpack-dev-server": "^4.9.0",
144
148
  "zx": "^5.2.0"
145
149
  },
146
150
  "nano-staged": {
@@ -156,7 +160,7 @@
156
160
  {
157
161
  "path": ".temp/dist/*.main.*",
158
162
  "webpack": false,
159
- "limit": "1000 KB"
163
+ "limit": "1300 KB"
160
164
  }
161
165
  ],
162
166
  "nyc": {
@@ -102,12 +102,30 @@
102
102
  }
103
103
  ],
104
104
  "enum": [
105
- { "label": "无", "value": "" },
106
- { "label": "打开客服会话", "value": "contact" },
107
- { "label": "转发", "value": "share" },
108
- { "label": "打开App", "value": "launchApp" },
109
- { "label": "打开授权设置", "value": "openSetting" },
110
- { "label": "打开意见反馈", "value": "feedback" }
105
+ {
106
+ "label": "",
107
+ "value": ""
108
+ },
109
+ {
110
+ "label": "打开客服会话",
111
+ "value": "contact"
112
+ },
113
+ {
114
+ "label": "转发",
115
+ "value": "share"
116
+ },
117
+ {
118
+ "label": "打开App",
119
+ "value": "launchApp"
120
+ },
121
+ {
122
+ "label": "打开授权设置",
123
+ "value": "openSetting"
124
+ },
125
+ {
126
+ "label": "打开意见反馈",
127
+ "value": "feedback"
128
+ }
111
129
  ],
112
130
  "x-platforms": ["MP"],
113
131
  "x-category": "高级属性"
@@ -151,7 +169,13 @@
151
169
  "sendMessageImg": {
152
170
  "title": "会话内消息卡片图片",
153
171
  "type": "string",
154
- "x-coMPonent": "image",
172
+ "x-component": "image",
173
+ "x-rules": [
174
+ {
175
+ "message": "请输入合法的图片地址",
176
+ "pattern": "^(((https?)://)|/resources/)[^\\s]+$"
177
+ }
178
+ ],
155
179
  "default": "",
156
180
  "x-platforms": ["MP"],
157
181
  "x-category": "高级属性"
@@ -173,12 +197,35 @@
173
197
  }
174
198
  },
175
199
  "events": [
176
- { "title": "点击", "name": "tap" },
177
- { "title": "获取手机号", "name": "getPhoneNumber", "x-platforms": ["MP"] },
178
- { "title": "打开客服会话", "name": "contact", "x-platforms": ["MP"] },
179
- { "title": "获取用户信息", "name": "getUserInfo", "x-platforms": ["MP"] },
180
- { "title": "打开App", "name": "launchApp", "x-platforms": ["MP"] },
181
- { "title": "打开授权设置", "name": "openSetting", "x-platforms": ["MP"] }
200
+ {
201
+ "title": "点击",
202
+ "name": "tap"
203
+ },
204
+ {
205
+ "title": "获取手机号",
206
+ "name": "getPhoneNumber",
207
+ "x-platforms": ["MP"]
208
+ },
209
+ {
210
+ "title": "打开客服会话",
211
+ "name": "contact",
212
+ "x-platforms": ["MP"]
213
+ },
214
+ {
215
+ "title": "获取用户信息",
216
+ "name": "getUserInfo",
217
+ "x-platforms": ["MP"]
218
+ },
219
+ {
220
+ "title": "打开App",
221
+ "name": "launchApp",
222
+ "x-platforms": ["MP"]
223
+ },
224
+ {
225
+ "title": "打开授权设置",
226
+ "name": "openSetting",
227
+ "x-platforms": ["MP"]
228
+ }
182
229
  ],
183
230
  "meta": {
184
231
  "name": "Button",
@@ -7,13 +7,13 @@
7
7
  "title": "日历展示时间",
8
8
  "x-category": "基础属性",
9
9
  "x-index": 1,
10
- "remarks":"已选中效果展示的日期"
10
+ "remarks": "已选中效果展示的日期"
11
11
  },
12
12
  "configData": {
13
13
  "type": "array",
14
14
  "title": "展示配置",
15
15
  "x-category": "基础属性",
16
- "remarks":"可设置多个不同日期的特殊显示效果",
16
+ "remarks": "可设置多个不同日期的特殊显示效果",
17
17
  "x-index": 2,
18
18
  "items": {
19
19
  "type": "object",
@@ -64,7 +64,7 @@
64
64
  "title": "时间控制器",
65
65
  "x-category": "基础属性",
66
66
  "x-index": 3,
67
- "remarks":"显示切换年月的操作按钮"
67
+ "remarks": "显示切换年月的操作按钮"
68
68
  }
69
69
  }
70
70
  },
@@ -7,49 +7,49 @@
7
7
  "default": true,
8
8
  "type": "boolean",
9
9
  "x-category": "基础属性",
10
- "remarks":"开启后,轮播图将会自动根据配置的时间间隔进行自动滚动,关闭后则轮播图仅支持通过点击锚点的方式进行切换"
10
+ "remarks": "开启后,轮播图将会自动根据配置的时间间隔进行自动滚动,关闭后则轮播图仅支持通过点击锚点的方式进行切换"
11
11
  },
12
12
  "indicatorDots": {
13
13
  "title": "导航锚点",
14
14
  "default": true,
15
15
  "type": "boolean",
16
16
  "x-category": "高级属性",
17
- "remarks":"开启/关闭轮播图锚点"
17
+ "remarks": "开启/关闭轮播图锚点"
18
18
  },
19
19
  "current": {
20
20
  "title": "当前所在滑块的 index",
21
21
  "default": 0,
22
22
  "type": "number",
23
23
  "x-category": "高级属性",
24
- "remarks":"更改轮播图的默认展示位置,0为默认展示第一张轮播图,以此类推"
24
+ "remarks": "更改轮播图的默认展示位置,0为默认展示第一张轮播图,以此类推"
25
25
  },
26
26
  "interval": {
27
27
  "title": "自动切换时间间隔",
28
28
  "default": 5000,
29
29
  "type": "number",
30
30
  "x-category": "基础属性",
31
- "remarks":"配置轮播图滚动的时间间隔,时间单位为ms"
31
+ "remarks": "配置轮播图滚动的时间间隔,时间单位为ms"
32
32
  },
33
33
  "duration": {
34
34
  "title": "滑动动画时长",
35
35
  "default": 500,
36
36
  "type": "number",
37
37
  "x-category": "高级属性",
38
- "remarks":"更改轮播图切换时的滑动动画时长"
38
+ "remarks": "更改轮播图切换时的滑动动画时长"
39
39
  },
40
40
  "circular": {
41
41
  "title": "衔接滑动",
42
42
  "default": true,
43
43
  "type": "boolean",
44
44
  "x-category": "高级属性",
45
- "remarks":"更改轮播图切换时动画的滑动方式"
45
+ "remarks": "更改轮播图切换时动画的滑动方式"
46
46
  },
47
47
  "vertical": {
48
48
  "title": "纵向轮播",
49
49
  "default": false,
50
50
  "type": "boolean",
51
51
  "x-category": "基础属性",
52
- "remarks":"开启后,轮播的滚动方式将会由横向滚动变更为纵向滚动"
52
+ "remarks": "开启后,轮播的滚动方式将会由横向滚动变更为纵向滚动"
53
53
  },
54
54
  "indicatorColor": {
55
55
  "title": "锚点颜色",
@@ -57,7 +57,7 @@
57
57
  "x-component": "color",
58
58
  "default": "rgba(200, 200, 200, 0.9)",
59
59
  "x-category": "高级属性",
60
- "remarks":"更改锚点普通状态下的颜色"
60
+ "remarks": "更改锚点普通状态下的颜色"
61
61
  },
62
62
  "indicatorActiveColor": {
63
63
  "title": "锚点激活色",
@@ -65,7 +65,7 @@
65
65
  "x-component": "color",
66
66
  "default": "rgba(0, 0, 0, 0.9)",
67
67
  "x-category": "高级属性",
68
- "remarks":"更改锚点选中时的颜色"
68
+ "remarks": "更改锚点选中时的颜色"
69
69
  },
70
70
  "images": {
71
71
  "type": "array",
@@ -77,8 +77,8 @@
77
77
  "title": "图片1",
78
78
  "height": "160px",
79
79
  "width": "100%",
80
- "tapMode":"tap",
81
- "fit":"cover"
80
+ "tapMode": "tap",
81
+ "fit": "cover"
82
82
  },
83
83
  "properties": {
84
84
  "title": {
@@ -89,6 +89,12 @@
89
89
  },
90
90
  "image": {
91
91
  "type": "image",
92
+ "x-rules": [
93
+ {
94
+ "message": "请输入合法的图片地址",
95
+ "pattern": "^(((https?)://)|/resources/)[^\\s]+$"
96
+ }
97
+ ],
92
98
  "title": "图片1",
93
99
  "default": "https://main.qcloudimg.com/raw/828ee6644f137d166b063ad7f5dda842.png",
94
100
  "x-index": 30
@@ -145,13 +151,17 @@
145
151
  "value": "outer",
146
152
  "label": "外部链接",
147
153
  "icon": "weda-editor-icon-link",
148
- "tooltip":[{
149
- "platform":["ALL","MP"],
150
- "text":"小程序平台不支持跳转外部链接"
151
- }],
152
- "disabled": [{
153
- "platform":["MP"]
154
- }]
154
+ "tooltip": [
155
+ {
156
+ "platform": ["ALL", "MP"],
157
+ "text": "小程序平台不支持跳转外部链接"
158
+ }
159
+ ],
160
+ "disabled": [
161
+ {
162
+ "platform": ["MP"]
163
+ }
164
+ ]
155
165
  }
156
166
  ],
157
167
  "x-component": "icon-text-radio",
@@ -188,17 +198,17 @@
188
198
  "x-index": 120,
189
199
  "x-component-props": {
190
200
  "hideAddPlatform": ["MP"],
191
- "addHidden":true
201
+ "addHidden": true
192
202
  },
193
203
  "x-linkages": [
194
- {
195
- "type": "value:state",
196
- "target": "*(dataForm.params)",
197
- "condition": "{{$self.value && $self.value.length>0}}",
198
- "state":{
199
- "pageId":"{{$self.value}}"
200
- }
204
+ {
205
+ "type": "value:state",
206
+ "target": "*(dataForm.params)",
207
+ "condition": "{{$self.value && $self.value.length>0}}",
208
+ "state": {
209
+ "pageId": "{{$self.value}}"
201
210
  }
211
+ }
202
212
  ]
203
213
  },
204
214
  "outerUrl": {
@@ -206,7 +216,7 @@
206
216
  "default": "",
207
217
  "type": "string",
208
218
  "placeholder": "外部链接请以http://或https://开头",
209
- "description":"当前页面打开只支持https"
219
+ "description": "当前页面打开只支持https"
210
220
  },
211
221
  "newPage": {
212
222
  "title": "打开新页面",
@@ -218,19 +228,19 @@
218
228
  "default": false,
219
229
  "type": "boolean",
220
230
  "x-linkages": [
221
- {
222
- "type": "value:visible",
223
- "target": "*(dataForm.params)",
224
- "condition": "{{$self.value==true}}"
225
- }
231
+ {
232
+ "type": "value:visible",
233
+ "target": "*(dataForm.params)",
234
+ "condition": "{{$self.value==true}}"
235
+ }
226
236
  ]
227
237
  },
228
238
  "params": {
229
239
  "type": "array",
230
240
  "title": "参数",
231
- "pageId":"",
232
- "default":[],
233
- "x-component":"page-params"
241
+ "pageId": "",
242
+ "default": [],
243
+ "x-component": "page-params"
234
244
  }
235
245
  }
236
246
  },
@@ -239,26 +249,26 @@
239
249
  {
240
250
  "image": "https://main.qcloudimg.com/raw/828ee6644f137d166b063ad7f5dda842.png",
241
251
  "title": "图片1",
242
- "fit":"cover",
243
- "tapMode":"tap",
244
- "height":"160px",
245
- "width":"100%"
252
+ "fit": "cover",
253
+ "tapMode": "tap",
254
+ "height": "160px",
255
+ "width": "100%"
246
256
  },
247
257
  {
248
258
  "image": "https://main.qcloudimg.com/raw/880b5277dc7d8f62fd6b5f964bee3af4.png",
249
259
  "title": "图片2",
250
- "fit":"cover",
251
- "tapMode":"tap",
252
- "height":"160px",
253
- "width":"100%"
260
+ "fit": "cover",
261
+ "tapMode": "tap",
262
+ "height": "160px",
263
+ "width": "100%"
254
264
  },
255
265
  {
256
266
  "image": "https://main.qcloudimg.com/raw/af8d7dff73fea17aa099876bc3a811fa.png",
257
267
  "title": "图片3",
258
- "fit":"cover",
259
- "tapMode":"tap",
260
- "height":"160px",
261
- "width":"100%"
268
+ "fit": "cover",
269
+ "tapMode": "tap",
270
+ "height": "160px",
271
+ "width": "100%"
262
272
  }
263
273
  ],
264
274
  "x-component": "list"
@@ -272,9 +272,7 @@
272
272
  "x-component-props": {
273
273
  "dataSourceNamePropKey": "dataSource",
274
274
  "isMethod": true,
275
- "disabledTypes": [
276
- "time"
277
- ]
275
+ "disabledTypes": ["time"]
278
276
  },
279
277
  "x-linkages": [
280
278
  {
@@ -417,9 +415,7 @@
417
415
  "default": "bottom",
418
416
  "x-category": "基础属性",
419
417
  "x-index": 160,
420
- "x-platforms": [
421
- "PCWEB"
422
- ],
418
+ "x-platforms": ["PCWEB"],
423
419
  "enum": [
424
420
  {
425
421
  "value": "top",
@@ -445,10 +441,7 @@
445
441
  "default": "bottom",
446
442
  "x-category": "基础属性",
447
443
  "x-index": 170,
448
- "x-platforms": [
449
- "MOBILEWEB",
450
- "MP"
451
- ],
444
+ "x-platforms": ["MOBILEWEB", "MP"],
452
445
  "enum": [
453
446
  {
454
447
  "value": "top",
@@ -720,9 +713,7 @@
720
713
  "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Histogram.svg",
721
714
  "category": "图表组件",
722
715
  "componentOrder": 1,
723
- "visible": [
724
- "APP"
725
- ]
716
+ "visible": ["APP"]
726
717
  },
727
718
  "configMeta": {
728
719
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/chart/Bar"
@@ -215,9 +215,7 @@
215
215
  "x-component-props": {
216
216
  "dataSourceNamePropKey": "dataSource",
217
217
  "isMethod": true,
218
- "disabledTypes": [
219
- "time"
220
- ]
218
+ "disabledTypes": ["time"]
221
219
  },
222
220
  "x-linkages": [
223
221
  {
@@ -359,9 +357,7 @@
359
357
  "default": "bottom",
360
358
  "x-category": "基础属性",
361
359
  "x-index": 150,
362
- "x-platforms": [
363
- "PCWEB"
364
- ],
360
+ "x-platforms": ["PCWEB"],
365
361
  "enum": [
366
362
  {
367
363
  "value": "top",
@@ -388,10 +384,7 @@
388
384
  "default": "bottom",
389
385
  "x-category": "基础属性",
390
386
  "x-index": 160,
391
- "x-platforms": [
392
- "MOBILEWEB",
393
- "MP"
394
- ],
387
+ "x-platforms": ["MOBILEWEB", "MP"],
395
388
  "enum": [
396
389
  {
397
390
  "value": "top",
@@ -673,9 +666,7 @@
673
666
  "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/LineChart.svg",
674
667
  "category": "图表组件",
675
668
  "componentOrder": 1,
676
- "visible": [
677
- "APP"
678
- ]
669
+ "visible": ["APP"]
679
670
  },
680
671
  "configMeta": {
681
672
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/chart/Line"
@@ -304,9 +304,7 @@
304
304
  "default": "bottom",
305
305
  "x-category": "基础属性",
306
306
  "x-index": 140,
307
- "x-platforms": [
308
- "PCWEB"
309
- ],
307
+ "x-platforms": ["PCWEB"],
310
308
  "enum": [
311
309
  {
312
310
  "value": "top",
@@ -332,10 +330,7 @@
332
330
  "default": "bottom",
333
331
  "x-category": "基础属性",
334
332
  "x-index": 150,
335
- "x-platforms": [
336
- "MOBILEWEB",
337
- "MP"
338
- ],
333
+ "x-platforms": ["MOBILEWEB", "MP"],
339
334
  "enum": [
340
335
  {
341
336
  "value": "top",
@@ -491,9 +486,7 @@
491
486
  "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/PieChart.svg",
492
487
  "category": "图表组件",
493
488
  "componentOrder": 1,
494
- "visible": [
495
- "APP"
496
- ]
489
+ "visible": ["APP"]
497
490
  },
498
491
  "configMeta": {
499
492
  "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/chart/Pie"
@@ -58,10 +58,7 @@
58
58
  "x-component-props": {
59
59
  "dataSourceNamePropKey": "dataSource",
60
60
  "blackListConfig": {
61
- "type": [
62
- "object",
63
- "array"
64
- ]
61
+ "type": ["object", "array"]
65
62
  },
66
63
  "customRelOptions": {
67
64
  "string": [
@@ -6,9 +6,7 @@
6
6
  "title": "容器备注",
7
7
  "type": "string",
8
8
  "description": "鼠标 hover 后的提示",
9
- "x-platforms": [
10
- "PCWEB"
11
- ]
9
+ "x-platforms": ["PCWEB"]
12
10
  }
13
11
  }
14
12
  },