@cloudbase/weda-ui 2.0.28 → 3.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 (411) hide show
  1. package/package.json +12 -13
  2. package/src/configs/actions/showModal.json +0 -48
  3. package/src/configs/actions/showToast.json +0 -41
  4. package/src/configs/components/auth.json +0 -16
  5. package/src/configs/components/button.json +0 -239
  6. package/src/configs/components/calendar.json +0 -81
  7. package/src/configs/components/carousel.json +0 -292
  8. package/src/configs/components/chart/bar.json +0 -721
  9. package/src/configs/components/chart/line.json +0 -674
  10. package/src/configs/components/chart/pie.json +0 -494
  11. package/src/configs/components/chart/statisticsCard.json +0 -376
  12. package/src/configs/components/container.json +0 -50
  13. package/src/configs/components/dataView.json +0 -151
  14. package/src/configs/components/drawer.json +0 -115
  15. package/src/configs/components/form/checkbox.json +0 -173
  16. package/src/configs/components/form/form.json +0 -45
  17. package/src/configs/components/form/input.json +0 -154
  18. package/src/configs/components/form/label.json +0 -22
  19. package/src/configs/components/form/location.json +0 -155
  20. package/src/configs/components/form/radio.json +0 -203
  21. package/src/configs/components/form/richText.json +0 -125
  22. package/src/configs/components/form/select.json +0 -411
  23. package/src/configs/components/form/switch.json +0 -58
  24. package/src/configs/components/form/textarea.json +0 -116
  25. package/src/configs/components/form/tips.json +0 -34
  26. package/src/configs/components/form/uploader.json +0 -169
  27. package/src/configs/components/form/uploaderFile.json +0 -158
  28. package/src/configs/components/graphicCard.json +0 -413
  29. package/src/configs/components/image.json +0 -179
  30. package/src/configs/components/link.json +0 -79
  31. package/src/configs/components/listView.json +0 -281
  32. package/src/configs/components/lottery.json +0 -157
  33. package/src/configs/components/modal.json +0 -83
  34. package/src/configs/components/navLayout.json +0 -368
  35. package/src/configs/components/navigationBar.json +0 -62
  36. package/src/configs/components/picker/datePicker.json +0 -33
  37. package/src/configs/components/picker/picker.json +0 -18
  38. package/src/configs/components/picker/timePicker.json +0 -23
  39. package/src/configs/components/richtextview.json +0 -26
  40. package/src/configs/components/scrollVeiw.json +0 -253
  41. package/src/configs/components/slot.json +0 -17
  42. package/src/configs/components/swiper.json +0 -90
  43. package/src/configs/components/tabs.json +0 -121
  44. package/src/configs/components/text.json +0 -95
  45. package/src/configs/components/wedaVideo.json +0 -89
  46. package/src/configs/components/wxOpenApi/phone.json +0 -127
  47. package/src/configs/components/wxOpenApi/phoneCode.json +0 -109
  48. package/src/configs/components/wxOpenApi/share.json +0 -157
  49. package/src/configs/components/wxOpenApi/userInfo.json +0 -156
  50. package/src/configs/index.js +0 -111
  51. package/src/index.js +0 -4
  52. package/src/mp/README.md +0 -1
  53. package/src/mp/actions/showModal/index.js +0 -3
  54. package/src/mp/actions/showToast/index.js +0 -3
  55. package/src/mp/components/button/index.js +0 -91
  56. package/src/mp/components/button/index.json +0 -4
  57. package/src/mp/components/button/index.wxml +0 -22
  58. package/src/mp/components/button/index.wxss +0 -13
  59. package/src/mp/components/calendar/arrowright--line.svg +0 -11
  60. package/src/mp/components/calendar/index.js +0 -268
  61. package/src/mp/components/calendar/index.json +0 -5
  62. package/src/mp/components/calendar/index.wxml +0 -35
  63. package/src/mp/components/calendar/index.wxss +0 -179
  64. package/src/mp/components/carousel/index.js +0 -88
  65. package/src/mp/components/carousel/index.json +0 -7
  66. package/src/mp/components/carousel/index.wxml +0 -6
  67. package/src/mp/components/chart/bar/index.js +0 -257
  68. package/src/mp/components/chart/bar/index.json +0 -6
  69. package/src/mp/components/chart/bar/index.wxml +0 -3
  70. package/src/mp/components/chart/bar/index.wxss +0 -9
  71. package/src/mp/components/chart/common/config/bar.js +0 -50
  72. package/src/mp/components/chart/common/config/global.js +0 -16
  73. package/src/mp/components/chart/common/config/line.js +0 -48
  74. package/src/mp/components/chart/common/config/pie.js +0 -36
  75. package/src/mp/components/chart/common/core/eChartBar.js +0 -258
  76. package/src/mp/components/chart/common/core/eChartBase.js +0 -389
  77. package/src/mp/components/chart/common/core/eChartLine.js +0 -223
  78. package/src/mp/components/chart/common/core/eChartPie.js +0 -169
  79. package/src/mp/components/chart/common/lib/echarts.min.js +0 -18
  80. package/src/mp/components/chart/ec-canvas/ec-canvas.js +0 -277
  81. package/src/mp/components/chart/ec-canvas/ec-canvas.json +0 -4
  82. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +0 -4
  83. package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +0 -4
  84. package/src/mp/components/chart/ec-canvas/wx-canvas.js +0 -109
  85. package/src/mp/components/chart/line/index.js +0 -247
  86. package/src/mp/components/chart/line/index.json +0 -6
  87. package/src/mp/components/chart/line/index.wxml +0 -3
  88. package/src/mp/components/chart/line/index.wxss +0 -9
  89. package/src/mp/components/chart/pie/index.js +0 -182
  90. package/src/mp/components/chart/pie/index.json +0 -6
  91. package/src/mp/components/chart/pie/index.wxml +0 -3
  92. package/src/mp/components/chart/pie/index.wxss +0 -9
  93. package/src/mp/components/chart/statisticsCard/index.js +0 -253
  94. package/src/mp/components/chart/statisticsCard/index.json +0 -4
  95. package/src/mp/components/chart/statisticsCard/index.wxml +0 -9
  96. package/src/mp/components/chart/statisticsCard/index.wxss +0 -42
  97. package/src/mp/components/container/index.js +0 -20
  98. package/src/mp/components/container/index.json +0 -4
  99. package/src/mp/components/container/index.wxml +0 -3
  100. package/src/mp/components/dataView/index.js +0 -34
  101. package/src/mp/components/dataView/index.json +0 -7
  102. package/src/mp/components/dataView/index.wxml +0 -3
  103. package/src/mp/components/dataView/index.wxss +0 -0
  104. package/src/mp/components/form/checkbox/index.js +0 -124
  105. package/src/mp/components/form/checkbox/index.json +0 -7
  106. package/src/mp/components/form/checkbox/index.wxml +0 -13
  107. package/src/mp/components/form/checkbox/index.wxss +0 -1
  108. package/src/mp/components/form/form/index.js +0 -18
  109. package/src/mp/components/form/form/index.json +0 -4
  110. package/src/mp/components/form/form/index.wxml +0 -5
  111. package/src/mp/components/form/form/index.wxss +0 -1
  112. package/src/mp/components/form/formcell/index.js +0 -54
  113. package/src/mp/components/form/formcell/index.json +0 -4
  114. package/src/mp/components/form/formcell/index.wxml +0 -11
  115. package/src/mp/components/form/formcell/index.wxss +0 -31
  116. package/src/mp/components/form/input/index.js +0 -110
  117. package/src/mp/components/form/input/index.json +0 -7
  118. package/src/mp/components/form/input/index.wxml +0 -24
  119. package/src/mp/components/form/input/index.wxss +0 -22
  120. package/src/mp/components/form/location/components/mapChoose/index.js +0 -201
  121. package/src/mp/components/form/location/components/mapChoose/index.json +0 -4
  122. package/src/mp/components/form/location/components/mapChoose/index.wxml +0 -42
  123. package/src/mp/components/form/location/components/mapChoose/index.wxss +0 -188
  124. package/src/mp/components/form/location/index.js +0 -388
  125. package/src/mp/components/form/location/index.json +0 -6
  126. package/src/mp/components/form/location/index.wxml +0 -21
  127. package/src/mp/components/form/location/index.wxss +0 -89
  128. package/src/mp/components/form/radio/index.js +0 -124
  129. package/src/mp/components/form/radio/index.json +0 -7
  130. package/src/mp/components/form/radio/index.wxml +0 -13
  131. package/src/mp/components/form/radio/index.wxss +0 -1
  132. package/src/mp/components/form/select/index.js +0 -677
  133. package/src/mp/components/form/select/index.json +0 -7
  134. package/src/mp/components/form/select/index.wxml +0 -12
  135. package/src/mp/components/form/select/index.wxss +0 -16
  136. package/src/mp/components/form/select/region/index.js +0 -107
  137. package/src/mp/components/form/switch/index.js +0 -75
  138. package/src/mp/components/form/switch/index.json +0 -7
  139. package/src/mp/components/form/switch/index.wxml +0 -11
  140. package/src/mp/components/form/switch/index.wxss +0 -1
  141. package/src/mp/components/form/textarea/index.js +0 -90
  142. package/src/mp/components/form/textarea/index.json +0 -7
  143. package/src/mp/components/form/textarea/index.wxml +0 -8
  144. package/src/mp/components/form/textarea/index.wxss +0 -10
  145. package/src/mp/components/form/tips/index.js +0 -41
  146. package/src/mp/components/form/tips/index.json +0 -4
  147. package/src/mp/components/form/tips/index.wxml +0 -1
  148. package/src/mp/components/form/tips/index.wxss +0 -1
  149. package/src/mp/components/form/uploader/index.js +0 -158
  150. package/src/mp/components/form/uploader/index.json +0 -10
  151. package/src/mp/components/form/uploader/index.wxml +0 -14
  152. package/src/mp/components/form/uploader/index.wxss +0 -36
  153. package/src/mp/components/form/uploader/weui-uploader.js +0 -219
  154. package/src/mp/components/form/uploader/weui-uploader.json +0 -7
  155. package/src/mp/components/form/uploader/weui-uploader.wxml +0 -45
  156. package/src/mp/components/form/uploader/weui-uploader.wxss +0 -1
  157. package/src/mp/components/form/uploaderFile/index.js +0 -313
  158. package/src/mp/components/form/uploaderFile/index.json +0 -9
  159. package/src/mp/components/form/uploaderFile/index.wxml +0 -45
  160. package/src/mp/components/form/uploaderFile/index.wxss +0 -105
  161. package/src/mp/components/graphicCard/chevron-right.svg +0 -3
  162. package/src/mp/components/graphicCard/index.js +0 -203
  163. package/src/mp/components/graphicCard/index.json +0 -4
  164. package/src/mp/components/graphicCard/index.wxml +0 -25
  165. package/src/mp/components/graphicCard/index.wxss +0 -157
  166. package/src/mp/components/image/index.js +0 -182
  167. package/src/mp/components/image/index.json +0 -7
  168. package/src/mp/components/image/index.wxml +0 -9
  169. package/src/mp/components/image/index.wxss +0 -49
  170. package/src/mp/components/listView/arrow-right-line.svg +0 -3
  171. package/src/mp/components/listView/index.js +0 -274
  172. package/src/mp/components/listView/index.json +0 -4
  173. package/src/mp/components/listView/index.wxml +0 -38
  174. package/src/mp/components/listView/index.wxss +0 -155
  175. package/src/mp/components/listView/more-line.svg +0 -3
  176. package/src/mp/components/lottery/index.js +0 -270
  177. package/src/mp/components/lottery/index.json +0 -4
  178. package/src/mp/components/lottery/index.wxml +0 -41
  179. package/src/mp/components/lottery/index.wxss +0 -323
  180. package/src/mp/components/modal/index.js +0 -39
  181. package/src/mp/components/modal/index.json +0 -4
  182. package/src/mp/components/modal/index.wxml +0 -1
  183. package/src/mp/components/navLayout/index.js +0 -120
  184. package/src/mp/components/navLayout/index.json +0 -7
  185. package/src/mp/components/navLayout/index.wxml +0 -23
  186. package/src/mp/components/navLayout/index.wxss +0 -1193
  187. package/src/mp/components/navigationBar/index.js +0 -204
  188. package/src/mp/components/navigationBar/index.json +0 -5
  189. package/src/mp/components/navigationBar/index.wxml +0 -80
  190. package/src/mp/components/navigationBar/index.wxss +0 -1257
  191. package/src/mp/components/richText/index.js +0 -67
  192. package/src/mp/components/richText/index.json +0 -4
  193. package/src/mp/components/richText/index.wxml +0 -3
  194. package/src/mp/components/richText/index.wxss +0 -27
  195. package/src/mp/components/scrollView/index.js +0 -119
  196. package/src/mp/components/scrollView/index.json +0 -4
  197. package/src/mp/components/scrollView/index.wxml +0 -38
  198. package/src/mp/components/slot/index.js +0 -20
  199. package/src/mp/components/slot/index.json +0 -4
  200. package/src/mp/components/slot/index.wxml +0 -3
  201. package/src/mp/components/swiper/index.js +0 -65
  202. package/src/mp/components/swiper/index.json +0 -4
  203. package/src/mp/components/swiper/index.wxml +0 -3
  204. package/src/mp/components/tabs/index.js +0 -59
  205. package/src/mp/components/tabs/index.json +0 -4
  206. package/src/mp/components/tabs/index.wxml +0 -12
  207. package/src/mp/components/tabs/index.wxss +0 -57
  208. package/src/mp/components/text/index.js +0 -40
  209. package/src/mp/components/text/index.json +0 -4
  210. package/src/mp/components/text/index.wxml +0 -1
  211. package/src/mp/components/text/index.wxss +0 -26
  212. package/src/mp/components/wedaVideo/index.js +0 -86
  213. package/src/mp/components/wedaVideo/index.json +0 -4
  214. package/src/mp/components/wedaVideo/index.wxml +0 -4
  215. package/src/mp/components/wedaVideo/index.wxss +0 -20
  216. package/src/mp/components/wxOpenApi/phone/index.js +0 -109
  217. package/src/mp/components/wxOpenApi/phone/index.json +0 -4
  218. package/src/mp/components/wxOpenApi/phone/index.wxml +0 -4
  219. package/src/mp/components/wxOpenApi/phone/index.wxss +0 -22
  220. package/src/mp/components/wxOpenApi/phoneCode/index.js +0 -89
  221. package/src/mp/components/wxOpenApi/phoneCode/index.json +0 -4
  222. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +0 -4
  223. package/src/mp/components/wxOpenApi/phoneCode/index.wxss +0 -22
  224. package/src/mp/components/wxOpenApi/share/index.js +0 -117
  225. package/src/mp/components/wxOpenApi/share/index.json +0 -4
  226. package/src/mp/components/wxOpenApi/share/index.wxml +0 -4
  227. package/src/mp/components/wxOpenApi/share/index.wxss +0 -22
  228. package/src/mp/components/wxOpenApi/userInfo/index.js +0 -88
  229. package/src/mp/components/wxOpenApi/userInfo/index.json +0 -4
  230. package/src/mp/components/wxOpenApi/userInfo/index.wxml +0 -4
  231. package/src/mp/components/wxOpenApi/userInfo/index.wxss +0 -22
  232. package/src/mp/index.json +0 -52
  233. package/src/mp/package.json +0 -6
  234. package/src/mp/style/weda-ui.wxss +0 -71
  235. package/src/mp/utils/classnames.js +0 -39
  236. package/src/mp/utils/constant.js +0 -20
  237. package/src/mp/utils/dayjs.min.js +0 -1
  238. package/src/mp/utils/debounce.js +0 -133
  239. package/src/mp/utils/deepEqual.js +0 -42
  240. package/src/mp/utils/destr.js +0 -49
  241. package/src/mp/utils/dr_square_point.js +0 -29
  242. package/src/mp/utils/handleEvents.js +0 -32
  243. package/src/mp/utils/lodash.js +0 -2
  244. package/src/mp/utils/platform.js +0 -45
  245. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +0 -1336
  246. package/src/mp/utils/spark-md5.js +0 -776
  247. package/src/mp/utils/tcb.js +0 -90
  248. package/src/setupTests.js +0 -14
  249. package/src/web/actions/index.js +0 -2
  250. package/src/web/actions/showModal/index.tsx +0 -118
  251. package/src/web/actions/showToast/index.js +0 -3
  252. package/src/web/components/auth/index.css +0 -0
  253. package/src/web/components/auth/index.js +0 -66
  254. package/src/web/components/button/index.css +0 -27
  255. package/src/web/components/button/index.tsx +0 -119
  256. package/src/web/components/calendar/index.css +0 -416
  257. package/src/web/components/calendar/index.jsx +0 -312
  258. package/src/web/components/calendar/util.js +0 -90
  259. package/src/web/components/carousel/index.css +0 -119
  260. package/src/web/components/carousel/index.tsx +0 -417
  261. package/src/web/components/chart/bar/index.tsx +0 -140
  262. package/src/web/components/chart/common/config/bar.js +0 -49
  263. package/src/web/components/chart/common/config/global.js +0 -16
  264. package/src/web/components/chart/common/config/line.js +0 -50
  265. package/src/web/components/chart/common/config/pie.js +0 -37
  266. package/src/web/components/chart/common/core/eChartBar.js +0 -259
  267. package/src/web/components/chart/common/core/eChartBase.ts +0 -396
  268. package/src/web/components/chart/common/core/eChartLine.js +0 -225
  269. package/src/web/components/chart/common/core/eChartPie.js +0 -173
  270. package/src/web/components/chart/common/core/type.ts +0 -34
  271. package/src/web/components/chart/common/echart.css +0 -106
  272. package/src/web/components/chart/common/echarts.ts +0 -31
  273. package/src/web/components/chart/common/useChart.tsx +0 -87
  274. package/src/web/components/chart/line/index.tsx +0 -136
  275. package/src/web/components/chart/pie/index.tsx +0 -99
  276. package/src/web/components/chart/statisticsCard/index.css +0 -63
  277. package/src/web/components/chart/statisticsCard/index.tsx +0 -307
  278. package/src/web/components/chart/statisticsCard/interface.ts +0 -14
  279. package/src/web/components/container/index.tsx +0 -34
  280. package/src/web/components/dataView/index.tsx +0 -20
  281. package/src/web/components/dataView/interface.ts +0 -6
  282. package/src/web/components/drawer/index.tsx +0 -68
  283. package/src/web/components/form/checkbox/index.tsx +0 -210
  284. package/src/web/components/form/enumSelect/MultipleSelect.jsx +0 -89
  285. package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -92
  286. package/src/web/components/form/enumSelect/SelectContainer.jsx +0 -43
  287. package/src/web/components/form/enumSelect/index.jsx +0 -9
  288. package/src/web/components/form/enumSelect/props/defaultProps.js +0 -39
  289. package/src/web/components/form/enumSelect/props/propsTypes.js +0 -50
  290. package/src/web/components/form/form/index.css +0 -9
  291. package/src/web/components/form/form/index.tsx +0 -51
  292. package/src/web/components/form/formcell/index.css +0 -85
  293. package/src/web/components/form/formcell/index.tsx +0 -85
  294. package/src/web/components/form/input/index.css +0 -40
  295. package/src/web/components/form/input/index.tsx +0 -166
  296. package/src/web/components/form/location/common/mapChoose.css +0 -180
  297. package/src/web/components/form/location/common/mapChoose.jsx +0 -343
  298. package/src/web/components/form/location/common/mapView.jsx +0 -190
  299. package/src/web/components/form/location/common/propsConfig.js +0 -54
  300. package/src/web/components/form/location/common/selectModal.css +0 -44
  301. package/src/web/components/form/location/common/selectModal.jsx +0 -73
  302. package/src/web/components/form/location/common/useLocationInfo.js +0 -104
  303. package/src/web/components/form/location/components/LocationH5/index.css +0 -239
  304. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +0 -413
  305. package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -96
  306. package/src/web/components/form/location/components/LocationPC/index.css +0 -44
  307. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +0 -332
  308. package/src/web/components/form/location/constants.js +0 -4
  309. package/src/web/components/form/location/index.css +0 -0
  310. package/src/web/components/form/location/index.jsx +0 -25
  311. package/src/web/components/form/radio/index.css +0 -12
  312. package/src/web/components/form/radio/index.tsx +0 -179
  313. package/src/web/components/form/renderDecorator.tsx +0 -28
  314. package/src/web/components/form/select/h5.tsx +0 -602
  315. package/src/web/components/form/select/index.css +0 -27
  316. package/src/web/components/form/select/index.tsx +0 -510
  317. package/src/web/components/form/select/region/index.ts +0 -152
  318. package/src/web/components/form/select/time.jsx +0 -145
  319. package/src/web/components/form/select/year.tsx +0 -172
  320. package/src/web/components/form/switch/index.tsx +0 -100
  321. package/src/web/components/form/textarea/index.css +0 -11
  322. package/src/web/components/form/textarea/index.tsx +0 -127
  323. package/src/web/components/form/tips/index.css +0 -4
  324. package/src/web/components/form/tips/index.tsx +0 -34
  325. package/src/web/components/form/types.d.ts +0 -12
  326. package/src/web/components/form/uploader/index.css +0 -118
  327. package/src/web/components/form/uploader/index.tsx +0 -65
  328. package/src/web/components/form/uploader/uploader.h5.tsx +0 -290
  329. package/src/web/components/form/uploader/uploader.pc.tsx +0 -287
  330. package/src/web/components/form/uploaderFile/fail.svg +0 -12
  331. package/src/web/components/form/uploaderFile/index.css +0 -422
  332. package/src/web/components/form/uploaderFile/index.jsx +0 -25
  333. package/src/web/components/form/uploaderFile/pending.svg +0 -18
  334. package/src/web/components/form/uploaderFile/success.svg +0 -12
  335. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +0 -606
  336. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +0 -520
  337. package/src/web/components/graphicCard/index.css +0 -159
  338. package/src/web/components/graphicCard/index.tsx +0 -310
  339. package/src/web/components/image/image.tsx +0 -187
  340. package/src/web/components/image/index.css +0 -54
  341. package/src/web/components/image/index.tsx +0 -121
  342. package/src/web/components/index.js +0 -95
  343. package/src/web/components/link/index.css +0 -8
  344. package/src/web/components/link/index.tsx +0 -119
  345. package/src/web/components/listView/arrow-right-line.svg +0 -3
  346. package/src/web/components/listView/index.css +0 -143
  347. package/src/web/components/listView/index.tsx +0 -346
  348. package/src/web/components/listView/interface.ts +0 -98
  349. package/src/web/components/lottery/index.css +0 -333
  350. package/src/web/components/lottery/index.tsx +0 -567
  351. package/src/web/components/lottery/lotteryUtil.ts +0 -130
  352. package/src/web/components/modal/index.tsx +0 -60
  353. package/src/web/components/navLayout/index.css +0 -332
  354. package/src/web/components/navLayout/index.tsx +0 -247
  355. package/src/web/components/navigationBar/chevron-right--double.svg +0 -3
  356. package/src/web/components/navigationBar/common.tsx +0 -203
  357. package/src/web/components/navigationBar/h5Menu.tsx +0 -179
  358. package/src/web/components/navigationBar/horizontalMenu.tsx +0 -201
  359. package/src/web/components/navigationBar/index.css +0 -762
  360. package/src/web/components/navigationBar/index.tsx +0 -231
  361. package/src/web/components/navigationBar/type.d.ts +0 -118
  362. package/src/web/components/navigationBar/verticalMenu.tsx +0 -81
  363. package/src/web/components/phone/index.css +0 -0
  364. package/src/web/components/phone/index.tsx +0 -22
  365. package/src/web/components/phoneCode/index.css +0 -0
  366. package/src/web/components/phoneCode/index.tsx +0 -22
  367. package/src/web/components/picker/datePicker.tsx +0 -48
  368. package/src/web/components/picker/picker.tsx +0 -59
  369. package/src/web/components/picker/timePicker.tsx +0 -56
  370. package/src/web/components/richText/const.ts +0 -3
  371. package/src/web/components/richText/index.css +0 -93
  372. package/src/web/components/richText/index.jsx +0 -473
  373. package/src/web/components/richTextView/index.css +0 -63
  374. package/src/web/components/richTextView/index.tsx +0 -63
  375. package/src/web/components/scrollView/index.tsx +0 -148
  376. package/src/web/components/share/index.css +0 -0
  377. package/src/web/components/share/index.tsx +0 -38
  378. package/src/web/components/slot/index.tsx +0 -19
  379. package/src/web/components/swiper/index.css +0 -106
  380. package/src/web/components/swiper/index.tsx +0 -291
  381. package/src/web/components/tabs/index.css +0 -64
  382. package/src/web/components/tabs/index.tsx +0 -35
  383. package/src/web/components/tabs/tabs.h5.tsx +0 -84
  384. package/src/web/components/tabs/tabs.pc.tsx +0 -74
  385. package/src/web/components/text/index.css +0 -26
  386. package/src/web/components/text/index.tsx +0 -60
  387. package/src/web/components/uploaderFileView/index.css +0 -11
  388. package/src/web/components/uploaderFileView/index.jsx +0 -84
  389. package/src/web/components/uploaderView/index.css +0 -31
  390. package/src/web/components/uploaderView/index.tsx +0 -92
  391. package/src/web/components/userInfo/index.css +0 -0
  392. package/src/web/components/userInfo/index.tsx +0 -30
  393. package/src/web/components/wedaVideo/index.css +0 -42
  394. package/src/web/components/wedaVideo/index.tsx +0 -208
  395. package/src/web/index.js +0 -4
  396. package/src/web/types.d.ts +0 -21
  397. package/src/web/utils/classnames.js +0 -39
  398. package/src/web/utils/constant.ts +0 -23
  399. package/src/web/utils/debounce.js +0 -98
  400. package/src/web/utils/events.js +0 -2
  401. package/src/web/utils/getLocalCounter.js +0 -5
  402. package/src/web/utils/isObjectEqual.js +0 -15
  403. package/src/web/utils/loading-fallback.tsx +0 -2
  404. package/src/web/utils/lodash.ts +0 -2
  405. package/src/web/utils/platform.js +0 -170
  406. package/src/web/utils/tcb.js +0 -86
  407. package/src/web/utils/tmap.js +0 -4
  408. package/src/web/utils/useSetState.ts +0 -18
  409. package/src/web/utils/useSyncValue.ts +0 -17
  410. package/src/web/utils/weui.js +0 -3
  411. package/src/web/weda-ui.css +0 -90
@@ -1,203 +0,0 @@
1
- import React from 'react';
2
- import type { IMenuItem, INavigationStyle } from './type';
3
- import { isUrl, resolveStaticResourceUrl } from '../../utils/platform';
4
- import { IconFont } from 'tdesign-icons-react';
5
- const CLASS_PREFIX = 'weda-menu';
6
-
7
- // 标题
8
- export const renderTitle = (navigationStyle: INavigationStyle) => {
9
- const { title, titleColor, showTitle, titleFontSize } = navigationStyle;
10
- return (
11
- showTitle && (
12
- <span
13
- data-testid="navigationBar-title"
14
- style={{
15
- display: 'inline-block',
16
- color: titleColor,
17
- fontSize: titleFontSize,
18
- }}
19
- >
20
- {title}
21
- </span>
22
- )
23
- );
24
- };
25
-
26
- // 菜单
27
- export const renderMenuTitle = (
28
- navigationStyle: INavigationStyle,
29
- item: Partial<IMenuItem>,
30
- hasIcon: boolean
31
- ) => {
32
- const { menuColor, menuFontSize, showMenuIcon } = navigationStyle;
33
- const { title, level, iconUrl, iconPath } = item;
34
- return (
35
- <span
36
- className="menu-text"
37
- style={{
38
- color: menuColor,
39
- fontSize: menuFontSize,
40
- }}
41
- data-testid="navigationBar-menu"
42
- >
43
- {showMenuIcon &&
44
- level === 0 &&
45
- hasIcon &&
46
- renderMenuIcon(iconUrl, iconPath, navigationStyle)}
47
- {title}
48
- </span>
49
- );
50
- };
51
- // 默认logo
52
- const defaultLogoUrl =
53
- 'https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/43d3b2b7-445c-4858-8eb0-50ac5d5cc08e.svg';
54
-
55
- // logo
56
- export const renderLogo = (
57
- navigationStyle: INavigationStyle,
58
- className: string
59
- ) => {
60
- const { showLogo, logoHeight, logoWidth, logoUrl, logoPath } =
61
- navigationStyle;
62
- const src = resolveStaticResourceUrl(logoPath) || logoUrl;
63
- return (
64
- showLogo && (
65
- <img
66
- data-testid="navigationBar-logo"
67
- className={className}
68
- style={{ width: `${logoWidth}px`, height: `${logoHeight}px` }}
69
- src={src || defaultLogoUrl}
70
- alt="logo"
71
- />
72
- )
73
- );
74
- };
75
-
76
- // icon回显
77
- export const IconShow = ({ onIcon, menuColor, menuFontSize }) => {
78
- return (
79
- <>
80
- {onIcon?.includes('td:') ? (
81
- <IconFont
82
- name={onIcon?.split(':')[1]}
83
- className={`${CLASS_PREFIX}__fonticon`}
84
- style={{ color: menuColor, fontSize: menuFontSize }}
85
- />
86
- ) : (
87
- <div
88
- className={`${CLASS_PREFIX}__fonticon lcap-icon lcap-icon-${onIcon}`}
89
- style={{ color: menuColor, fontSize: menuFontSize }}
90
- ></div>
91
- )}
92
- </>
93
- );
94
- };
95
- // 菜单图标
96
- export const renderMenuIcon = (
97
- iconUrl: string,
98
- iconPath: string,
99
- navigationStyle: INavigationStyle
100
- ) => {
101
- const { menuColor, menuFontSize } = navigationStyle;
102
- let icon = iconUrl || 'td:view-module';
103
-
104
- if (iconUrl && isUrl(iconUrl)) {
105
- icon = resolveStaticResourceUrl(iconPath) || iconUrl;
106
- return (
107
- <img
108
- className={`${CLASS_PREFIX}__item-icon`}
109
- style={{ width: 16, height: 16, marginRight: 4 }}
110
- src={icon}
111
- alt="logo"
112
- />
113
- );
114
- } else {
115
- return (
116
- <IconShow
117
- onIcon={icon}
118
- menuColor={menuColor}
119
- menuFontSize={menuFontSize}
120
- />
121
- );
122
- }
123
- };
124
-
125
- // 页面跳转
126
- export const navigateTo = (menu: IMenuItem) => {
127
- const { path, linkTargetBlank, linkUrl, type, key } = menu;
128
- localStorage.setItem('selectedKey', key);
129
- // 存储跳转页面的id
130
- if (linkUrl && type === 'link') {
131
- if (linkTargetBlank) {
132
- window.open(linkUrl);
133
- } else {
134
- window.location.href = linkUrl;
135
- }
136
- } else {
137
- app.navigateTo({
138
- pageId: path?.replace('/', ''),
139
- packageName: '',
140
- mode: 'weDa',
141
- });
142
- }
143
- };
144
- // 菜单是否展开
145
- export const hasSelectedMenu = (menu: IMenuItem, selectedkey: string) => {
146
- let opened = false;
147
- if (menu.key === selectedkey) {
148
- return true;
149
- }
150
- menu?.children?.forEach((i) => {
151
- if (i.key === selectedkey) {
152
- opened = true;
153
- }
154
- if (i?.children?.length) {
155
- opened = hasSelectedMenu(i, selectedkey);
156
- }
157
- });
158
- return opened;
159
- };
160
- // 点击展开/收起菜单
161
- export const expandMenu = (
162
- menuData: IMenuItem[],
163
- menuItem: Partial<IMenuItem>,
164
- init = false
165
- ) => {
166
- let menus = JSON.parse(JSON.stringify(menuData));
167
- return menus.map((i) => {
168
- if (init) {
169
- i.opened = hasSelectedMenu(i, menuItem.key);
170
- } else if (i.key === menuItem.key) {
171
- i.opened = menuItem.opened;
172
- }
173
- if (i.children) {
174
- return { ...i, children: expandMenu(i?.children, menuItem, init) };
175
- }
176
- return i;
177
- });
178
- };
179
-
180
- // 根据path查找菜单
181
- export const findMenuItemByPath = (
182
- menus: IMenuItem[],
183
- targetPath: string
184
- ): IMenuItem | null => {
185
- const queue: IMenuItem[] = [];
186
- let targetNode: IMenuItem | null = null;
187
- menus.forEach((node) => queue.push(node));
188
-
189
- while (queue.length) {
190
- const node = queue.shift();
191
- if (!node) return null;
192
-
193
- if (node.path === targetPath) {
194
- // 添加节点
195
- targetNode = node;
196
- break;
197
- } else {
198
- node.children?.forEach((node) => queue.push(node));
199
- }
200
- }
201
-
202
- return targetNode;
203
- };
@@ -1,179 +0,0 @@
1
- /* eslint-disable react/jsx-key */
2
- import React, { useState } from 'react';
3
- import { Menu, Drawer } from 'tea-component';
4
- import type { IMenuItem, INavigationStyle } from './type';
5
- import classNames from '../../utils/classnames';
6
- import {
7
- renderMenuTitle,
8
- renderLogo,
9
- renderTitle,
10
- navigateTo,
11
- expandMenu,
12
- } from './common';
13
- const CLASS_PREFIX = 'weda-menu';
14
-
15
- /**
16
- * 移动端导航
17
- */
18
-
19
- const H5Menu: React.FC<{
20
- menuData: IMenuItem[];
21
- navigationStyle: INavigationStyle;
22
- setMenuData: (menus: IMenuItem[]) => void;
23
- className: string;
24
- selected: string;
25
- setSelected: (selectedKey: string) => void;
26
- }> = ({
27
- menuData,
28
- navigationStyle,
29
- setMenuData,
30
- className,
31
- selected,
32
- setSelected,
33
- }) => {
34
- // 平台
35
- const cls = classNames({
36
- [CLASS_PREFIX]: true,
37
- [className]: className,
38
- [`${CLASS_PREFIX}-mobile`]: true,
39
- });
40
- // h5 弹框
41
- const [visible, setVisible] = useState<boolean>(false);
42
- // 菜单背景色
43
- const menuStyle: React.CSSProperties = {
44
- background: navigationStyle.menuBackgroundColor || '#fff',
45
- };
46
- // 渲染subMenu
47
- const renderSubMenu = (item: IMenuItem, hasThereNode = false) => {
48
- const { key, children, opened } = item;
49
- return children.length > 0 ? (
50
- <Menu.SubMenu
51
- className={hasThereNode ? `${CLASS_PREFIX}__submenu` : ''}
52
- key={key}
53
- title={renderMenuTitle(navigationStyle, item, true)}
54
- opened={opened}
55
- onOpenedChange={(opened) => {
56
- const menus = expandMenu(menuData, { ...item, opened });
57
- setMenuData(menus);
58
- }}
59
- >
60
- {children?.map((el: any) => renderSubMenu(el, true))}
61
- </Menu.SubMenu>
62
- ) : (
63
- renderMenuItem(item)
64
- );
65
- };
66
- // 渲染MenuItem
67
- const renderMenuItem = (item: IMenuItem) => {
68
- const { key } = item;
69
- return (
70
- <Menu.Item
71
- key={key}
72
- title={renderMenuTitle(navigationStyle, item, true)}
73
- selected={item.key === selected}
74
- onClick={() => {
75
- if (item.key !== selected) {
76
- setSelected(item.key);
77
- navigateTo(item);
78
- }
79
- setVisible(false);
80
- }}
81
- />
82
- );
83
- };
84
- const renderH5Title = (navigationStyle: INavigationStyle) => (
85
- <>
86
- <div className={`${CLASS_PREFIX}__bar-main`}>
87
- <span className={`${CLASS_PREFIX}__main-logo`}>
88
- {renderLogo(navigationStyle, `${CLASS_PREFIX}__main-icon`)}
89
- {renderTitle(navigationStyle)}
90
- </span>
91
- </div>
92
- <div className={`${CLASS_PREFIX}__bar-extra`}>
93
- {!visible && (
94
- <i
95
- className={`${CLASS_PREFIX}__bar-btn`}
96
- onClick={() => setVisible(true)}
97
- >
98
- <svg
99
- width="24"
100
- height="24"
101
- viewBox="0 0 24 24"
102
- fill="none"
103
- xmlns="http://www.w3.org/2000/svg"
104
- >
105
- <path
106
- d="M3 4H21V6H3V4ZM3 11H21V13H3V11ZM3 18H21V20H3V18Z"
107
- fill={navigationStyle.titleColor}
108
- fillOpacity="0.9"
109
- />
110
- </svg>
111
- </i>
112
- )}
113
- {visible && (
114
- <i
115
- className={`${CLASS_PREFIX}__bar-btn--close`}
116
- onClick={() => setVisible(false)}
117
- >
118
- <svg
119
- width="24"
120
- height="24"
121
- viewBox="0 0 24 24"
122
- fill="none"
123
- xmlns="http://www.w3.org/2000/svg"
124
- >
125
- <path
126
- fillRule="evenodd"
127
- clipRule="evenodd"
128
- d="M10.6219 11.9998L3.88672 5.2646L5.26558 3.88574L12.0008 10.6209L18.736 3.88574L20.1148 5.2646L13.3796 11.9998L20.1148 18.735L18.736 20.1138L12.0008 13.3786L5.26558 20.1138L3.88672 18.735L10.6219 11.9998Z"
129
- fill={navigationStyle.titleColor}
130
- fillOpacity="0.9"
131
- />
132
- </svg>
133
- </i>
134
- )}
135
- </div>
136
- </>
137
- );
138
- return (
139
- <>
140
- {renderH5Title(navigationStyle)}
141
- <Drawer
142
- size={'m'}
143
- placement={'left'}
144
- disableAnimation={true}
145
- outerClickClosable={false}
146
- visible={visible}
147
- onClose={() => setVisible(false)}
148
- className={`${CLASS_PREFIX}__drawer`}
149
- >
150
- <div
151
- className={cls}
152
- style={{
153
- display: 'flex',
154
- flexDirection: 'column',
155
- position: 'relative',
156
- }}
157
- >
158
- <div
159
- className={`${CLASS_PREFIX}__wrapper`}
160
- style={{
161
- background: navigationStyle?.menuBackgroundColor || '#fff',
162
- }}
163
- >
164
- {renderH5Title(navigationStyle)}
165
- </div>
166
- </div>
167
- <Menu className={`${CLASS_PREFIX}__drawer-menu`} style={menuStyle}>
168
- {menuData?.map((item: any) => {
169
- return item?.children?.length > 0
170
- ? renderSubMenu(item)
171
- : renderMenuItem(item);
172
- })}
173
- </Menu>
174
- </Drawer>
175
- </>
176
- );
177
- };
178
-
179
- export default H5Menu;
@@ -1,201 +0,0 @@
1
- /* eslint-disable react/jsx-key */
2
- import React, { useState, useRef, useEffect, useCallback } from 'react';
3
- import { NavMenu, List, Dropdown } from 'tea-component';
4
- import type { IMenuItem, INavigationStyle } from './type';
5
- import { usePlatform } from '../../utils/platform';
6
- import classNames from '../../utils/classnames';
7
- import {
8
- renderMenuTitle,
9
- renderMenuIcon,
10
- renderLogo,
11
- renderTitle,
12
- navigateTo,
13
- } from './common';
14
- const CLASS_PREFIX = 'weda-menu';
15
- /**
16
- * pc端横向导航
17
- */
18
-
19
- const HorizontalMenu: React.FC<{
20
- menuData: IMenuItem[];
21
- navigationStyle: INavigationStyle;
22
- selected: string;
23
- setSelected: (selectedKey: string) => void;
24
- }> = ({ menuData, navigationStyle, selected, setSelected }) => {
25
- // 导航样式
26
- const { isHorizontal = false, showMenuIcon } = navigationStyle;
27
- // 菜单背景色
28
- const menuStyle: React.CSSProperties = {
29
- background: navigationStyle.menuBackgroundColor || '#fff',
30
- };
31
- // 平台
32
- const platform = usePlatform();
33
- // 横向导航, 判断是否出现右侧的滚动按钮
34
- const [showButton, setShowButton] = useState<boolean>(true);
35
- // 横行导航移动
36
- const [position, setPosition] = useState({ index: 0, offset: 0 });
37
- const [menuOffset, setMenuOffset] = useState({});
38
- const navWrapRef = useRef<HTMLDivElement>();
39
-
40
- const getMenuOffset = useCallback(() => {
41
- const parentWidth = navWrapRef?.current?.parentElement?.clientWidth;
42
- const contentWidth = navWrapRef?.current?.clientWidth;
43
- const menuItem = navWrapRef?.current?.children;
44
- let data = { 0: 0, 1: 0 };
45
- let index = 1;
46
- for (let i of menuItem) {
47
- if (data[index] + i?.clientWidth + 8 > parentWidth) {
48
- index = index + 1;
49
- data[index] = i?.clientWidth + 8;
50
- } else {
51
- data[index] += i?.clientWidth + 8;
52
- }
53
- }
54
- setMenuOffset(data);
55
- const showButton = contentWidth > parentWidth;
56
- setShowButton(showButton);
57
- }, [navWrapRef]);
58
-
59
- useEffect(() => {
60
- if (platform !== 'h5' && isHorizontal && navWrapRef?.current?.children) {
61
- getMenuOffset();
62
- }
63
- }, [platform, isHorizontal, navWrapRef]);
64
-
65
- // 渲染下拉菜单
66
- const renderMenuList = (
67
- item: IMenuItem[],
68
- navigationStyle: INavigationStyle
69
- ) => {
70
- return (
71
- <List
72
- type="option"
73
- className={`${CLASS_PREFIX}__dropdown-menu-list`}
74
- style={{ background: navigationStyle.menuBackgroundColor }}
75
- >
76
- {item?.map((menu) => {
77
- const { title, children, key } = menu;
78
- return !children?.length ? (
79
- <List.Item
80
- key={key}
81
- className={`${CLASS_PREFIX}__dropdown-list-item`}
82
- selected={key === selected}
83
- onClick={() => {
84
- if (key !== selected) {
85
- setSelected(key);
86
- navigateTo(menu);
87
- }
88
- }}
89
- >
90
- {renderMenuTitle(navigationStyle, { title }, false)}
91
- </List.Item>
92
- ) : (
93
- <List.SubMenu
94
- key={key}
95
- className={`${CLASS_PREFIX}__dropdown-list-item`}
96
- label={renderMenuTitle(navigationStyle, { title }, false)}
97
- >
98
- {renderMenuList(children, navigationStyle)}
99
- </List.SubMenu>
100
- );
101
- })}
102
- </List>
103
- );
104
- };
105
-
106
- return (
107
- <NavMenu
108
- style={menuStyle}
109
- className={`${CLASS_PREFIX}__nav`}
110
- left={
111
- <>
112
- <NavMenu.Item type="logo" className={`${CLASS_PREFIX}__nav-logo`}>
113
- {renderLogo(navigationStyle, `${CLASS_PREFIX}__nav-logo--img`)}
114
- </NavMenu.Item>
115
-
116
- <NavMenu.Item className={`${CLASS_PREFIX}__nav-title`}>
117
- <span className={`${CLASS_PREFIX}__title`}>
118
- {renderTitle(navigationStyle)}
119
- </span>
120
- </NavMenu.Item>
121
- </>
122
- }
123
- right={
124
- <div className={`${CLASS_PREFIX}__nav-wrap`}>
125
- {showButton && position.index > 0 && (
126
- <div
127
- className={`${CLASS_PREFIX}__nav-shadow leftButton`}
128
- onClick={() => {
129
- const result = position.offset + menuOffset[position.index];
130
- setPosition({ index: position.index - 1, offset: result });
131
- }}
132
- >
133
- <div className={`${CLASS_PREFIX}__shadow--icon`}></div>
134
- <div className={`${CLASS_PREFIX}__shadow`}></div>
135
- <div className={`${CLASS_PREFIX}__shadow--white`}></div>
136
- </div>
137
- )}
138
- <div className={`${CLASS_PREFIX}__nav-content box`}>
139
- <div
140
- ref={navWrapRef}
141
- className={`${CLASS_PREFIX}__nav-content`}
142
- style={{ transform: `translate(${position.offset}px, 0px)` }}
143
- >
144
- {menuData?.map((i) => (
145
- <div
146
- className={classNames(
147
- `${CLASS_PREFIX}__nav-item`,
148
- i.key === selected && i.level === 0
149
- ? `${CLASS_PREFIX}__item-open`
150
- : ''
151
- )}
152
- key={i.key}
153
- onClick={() => {
154
- if (!i?.children?.length && i.key !== selected) {
155
- setSelected(i.key);
156
- navigateTo(i);
157
- }
158
- }}
159
- >
160
- {showMenuIcon &&
161
- renderMenuIcon(i?.iconUrl, i?.iconPath, navigationStyle)}
162
- {i?.children?.length ? (
163
- <Dropdown
164
- trigger={'hover'}
165
- overlayClassName={`${CLASS_PREFIX}__dropdown`}
166
- button={renderMenuTitle(navigationStyle, i, false)}
167
- >
168
- {renderMenuList(i.children, navigationStyle)}
169
- </Dropdown>
170
- ) : (
171
- <NavMenu.Item
172
- className={`${CLASS_PREFIX}__item-val`}
173
- selected={i.key === selected}
174
- >
175
- {renderMenuTitle(navigationStyle, i, false)}
176
- </NavMenu.Item>
177
- )}
178
- </div>
179
- ))}
180
- </div>
181
- </div>
182
- {showButton && position.index + 2 < Object.keys(menuOffset).length && (
183
- <div
184
- className={`${CLASS_PREFIX}__nav-shadow`}
185
- onClick={() => {
186
- const result = position.offset - menuOffset[position.index + 1];
187
- setPosition({ index: position.index + 1, offset: result });
188
- }}
189
- >
190
- <div className={`${CLASS_PREFIX}__shadow`}></div>
191
- <div className={`${CLASS_PREFIX}__shadow--white`}></div>
192
- <div className={`${CLASS_PREFIX}__shadow--icon`}></div>
193
- </div>
194
- )}
195
- </div>
196
- }
197
- />
198
- );
199
- };
200
-
201
- export default HorizontalMenu;