@cloudbase/weda-ui 3.2.0 → 3.3.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 (356) hide show
  1. package/dist/cypress/support/commands.d.ts +1 -0
  2. package/dist/cypress/support/commands.js +40 -0
  3. package/dist/cypress/support/e2e.d.ts +24 -0
  4. package/dist/cypress/support/e2e.js +22 -0
  5. package/dist/src/configs/actions/showModal.json +48 -0
  6. package/dist/src/configs/actions/showToast.json +41 -0
  7. package/dist/src/configs/components/auth.json +16 -0
  8. package/dist/src/configs/components/button.json +239 -0
  9. package/dist/src/configs/components/calendar.json +81 -0
  10. package/dist/src/configs/components/carousel.json +292 -0
  11. package/dist/src/configs/components/chart/bar.json +962 -0
  12. package/dist/src/configs/components/chart/line.json +878 -0
  13. package/dist/src/configs/components/chart/pie.json +685 -0
  14. package/dist/src/configs/components/chart/statisticsCard.json +376 -0
  15. package/dist/src/configs/components/container.json +50 -0
  16. package/dist/src/configs/components/dataView.json +247 -0
  17. package/dist/src/configs/components/drawer.json +115 -0
  18. package/dist/src/configs/components/form/checkbox.json +179 -0
  19. package/dist/src/configs/components/form/departTreeSelect.json +124 -0
  20. package/dist/src/configs/components/form/form.json +73 -0
  21. package/dist/src/configs/components/form/input.json +154 -0
  22. package/dist/src/configs/components/form/location.json +216 -0
  23. package/dist/src/configs/components/form/radio.json +203 -0
  24. package/dist/src/configs/components/form/richText.json +133 -0
  25. package/dist/src/configs/components/form/select.json +449 -0
  26. package/dist/src/configs/components/form/switch.json +58 -0
  27. package/dist/src/configs/components/form/textarea.json +116 -0
  28. package/dist/src/configs/components/form/tips.json +34 -0
  29. package/dist/src/configs/components/form/uploader.json +171 -0
  30. package/dist/src/configs/components/form/uploaderFile.json +158 -0
  31. package/dist/src/configs/components/form/userTreeSelect.json +128 -0
  32. package/dist/src/configs/components/formdetail.json +105 -0
  33. package/dist/src/configs/components/graphicCard.json +413 -0
  34. package/dist/src/configs/components/image.json +187 -0
  35. package/dist/src/configs/components/link.json +79 -0
  36. package/dist/src/configs/components/listView.json +378 -0
  37. package/dist/src/configs/components/lottery.json +163 -0
  38. package/dist/src/configs/components/modal.json +72 -0
  39. package/dist/src/configs/components/navLayout.json +368 -0
  40. package/dist/src/configs/components/navigationBar.json +62 -0
  41. package/dist/src/configs/components/richtextview.json +26 -0
  42. package/dist/src/configs/components/scrollVeiw.json +253 -0
  43. package/dist/src/configs/components/slot.json +17 -0
  44. package/dist/src/configs/components/swiper.json +90 -0
  45. package/dist/src/configs/components/tabs.json +122 -0
  46. package/dist/src/configs/components/text.json +95 -0
  47. package/dist/src/configs/components/wedaVideo.json +89 -0
  48. package/dist/src/configs/components/wxOpenApi/phone.json +127 -0
  49. package/dist/src/configs/components/wxOpenApi/phoneCode.json +109 -0
  50. package/dist/src/configs/components/wxOpenApi/share.json +160 -0
  51. package/dist/src/configs/components/wxOpenApi/userInfo.json +156 -0
  52. package/dist/src/configs/index.d.ts +103 -0
  53. package/dist/src/configs/index.js +111 -0
  54. package/dist/src/docs/common/format.d.ts +13 -0
  55. package/dist/src/docs/common/format.js +122 -0
  56. package/dist/src/docs/common/tableView.d.ts +30 -0
  57. package/dist/src/docs/common/tableView.js +156 -0
  58. package/dist/src/index.d.ts +2 -0
  59. package/dist/src/index.js +3 -0
  60. package/dist/src/setupTests.d.ts +2 -0
  61. package/dist/src/setupTests.js +19 -0
  62. package/dist/src/web/actions/index.d.ts +2 -0
  63. package/dist/src/web/actions/index.js +2 -0
  64. package/dist/src/web/actions/showModal/index.d.ts +4 -0
  65. package/dist/src/web/actions/showModal/index.js +66 -0
  66. package/dist/src/web/actions/showToast/index.d.ts +1 -0
  67. package/dist/src/web/actions/showToast/index.js +3 -0
  68. package/dist/src/web/components/button/index.d.ts +32 -0
  69. package/dist/src/web/components/button/index.js +48 -0
  70. package/dist/src/web/components/calendar/index.d.ts +19 -0
  71. package/dist/src/web/components/calendar/index.js +191 -0
  72. package/dist/src/web/components/calendar/util.d.ts +13 -0
  73. package/dist/src/web/components/calendar/util.js +74 -0
  74. package/dist/src/web/components/carousel/index.d.ts +41 -0
  75. package/dist/src/web/components/carousel/index.js +244 -0
  76. package/dist/src/web/components/chart/bar/index.d.ts +3 -0
  77. package/dist/src/web/components/chart/bar/index.js +45 -0
  78. package/dist/src/web/components/chart/bar/index.old.d.ts +40 -0
  79. package/dist/src/web/components/chart/bar/index.old.js +56 -0
  80. package/dist/src/web/components/chart/common/Chart.d.ts +10 -0
  81. package/dist/src/web/components/chart/common/Chart.js +31 -0
  82. package/dist/src/web/components/chart/common/chart-custom-connector.d.ts +6 -0
  83. package/dist/src/web/components/chart/common/chart-custom-connector.js +35 -0
  84. package/dist/src/web/components/chart/common/chart-error.d.ts +2 -0
  85. package/dist/src/web/components/chart/common/chart-error.js +2 -0
  86. package/dist/src/web/components/chart/common/config/bar.d.ts +48 -0
  87. package/dist/src/web/components/chart/common/config/bar.js +49 -0
  88. package/dist/src/web/components/chart/common/config/global.d.ts +13 -0
  89. package/dist/src/web/components/chart/common/config/global.js +16 -0
  90. package/dist/src/web/components/chart/common/config/line.d.ts +46 -0
  91. package/dist/src/web/components/chart/common/config/line.js +49 -0
  92. package/dist/src/web/components/chart/common/config/pie.d.ts +29 -0
  93. package/dist/src/web/components/chart/common/config/pie.js +36 -0
  94. package/dist/src/web/components/chart/common/core/eChartBar.d.ts +66 -0
  95. package/dist/src/web/components/chart/common/core/eChartBar.js +201 -0
  96. package/dist/src/web/components/chart/common/core/eChartBase.d.ts +127 -0
  97. package/dist/src/web/components/chart/common/core/eChartBase.js +394 -0
  98. package/dist/src/web/components/chart/common/core/eChartLine.d.ts +60 -0
  99. package/dist/src/web/components/chart/common/core/eChartLine.js +173 -0
  100. package/dist/src/web/components/chart/common/core/eChartPie.d.ts +48 -0
  101. package/dist/src/web/components/chart/common/core/eChartPie.js +135 -0
  102. package/dist/src/web/components/chart/common/core/type.d.ts +35 -0
  103. package/dist/src/web/components/chart/common/core/type.js +9 -0
  104. package/dist/src/web/components/chart/common/data-transform.d.ts +6 -0
  105. package/dist/src/web/components/chart/common/data-transform.js +248 -0
  106. package/dist/src/web/components/chart/common/echarts.d.ts +5 -0
  107. package/dist/src/web/components/chart/common/echarts.js +24 -0
  108. package/dist/src/web/components/chart/common/error-boundary.d.ts +5 -0
  109. package/dist/src/web/components/chart/common/error-boundary.js +26 -0
  110. package/dist/src/web/components/chart/common/useChart.d.ts +8 -0
  111. package/dist/src/web/components/chart/common/useChart.js +72 -0
  112. package/dist/src/web/components/chart/line/index.d.ts +3 -0
  113. package/dist/src/web/components/chart/line/index.js +42 -0
  114. package/dist/src/web/components/chart/line/index.old.d.ts +38 -0
  115. package/dist/src/web/components/chart/line/index.old.js +53 -0
  116. package/dist/src/web/components/chart/pie/index.d.ts +3 -0
  117. package/dist/src/web/components/chart/pie/index.js +42 -0
  118. package/dist/src/web/components/chart/pie/index.old.d.ts +27 -0
  119. package/dist/src/web/components/chart/pie/index.old.js +40 -0
  120. package/dist/src/web/components/chart/statisticsCard/index.d.ts +85 -0
  121. package/dist/src/web/components/chart/statisticsCard/index.js +203 -0
  122. package/dist/src/web/components/chart/statisticsCard/interface.d.ts +13 -0
  123. package/dist/src/web/components/chart/statisticsCard/interface.js +1 -0
  124. package/dist/src/web/components/common/error-boundary.d.ts +5 -0
  125. package/dist/src/web/components/common/error-boundary.js +33 -0
  126. package/dist/src/web/components/common/portal.d.ts +7 -0
  127. package/dist/src/web/components/common/portal.js +14 -0
  128. package/dist/src/web/components/common/use-loop-render-detect.d.ts +11 -0
  129. package/dist/src/web/components/common/use-loop-render-detect.js +124 -0
  130. package/dist/src/web/components/container/index.d.ts +6 -0
  131. package/dist/src/web/components/container/index.js +6 -0
  132. package/dist/src/web/components/dataView/index.d.ts +6 -0
  133. package/dist/src/web/components/dataView/index.js +8 -0
  134. package/dist/src/web/components/dataView/interface.d.ts +5 -0
  135. package/dist/src/web/components/dataView/interface.js +1 -0
  136. package/dist/src/web/components/drawer/index.d.ts +13 -0
  137. package/dist/src/web/components/drawer/index.js +12 -0
  138. package/dist/src/web/components/form/checkbox/index.d.ts +13 -0
  139. package/dist/src/web/components/form/checkbox/index.js +167 -0
  140. package/dist/src/web/components/form/enumSelect/MultipleSelect.d.ts +78 -0
  141. package/dist/src/web/components/form/enumSelect/MultipleSelect.js +52 -0
  142. package/dist/src/web/components/form/enumSelect/NormalSelect.d.ts +83 -0
  143. package/dist/src/web/components/form/enumSelect/NormalSelect.js +52 -0
  144. package/dist/src/web/components/form/enumSelect/SelectContainer.d.ts +16 -0
  145. package/dist/src/web/components/form/enumSelect/SelectContainer.js +30 -0
  146. package/dist/src/web/components/form/enumSelect/index.d.ts +82 -0
  147. package/dist/src/web/components/form/enumSelect/index.js +6 -0
  148. package/dist/src/web/components/form/enumSelect/props/defaultProps.d.ts +34 -0
  149. package/dist/src/web/components/form/enumSelect/props/defaultProps.js +40 -0
  150. package/dist/src/web/components/form/enumSelect/props/propsTypes.d.ts +39 -0
  151. package/dist/src/web/components/form/enumSelect/props/propsTypes.js +47 -0
  152. package/dist/src/web/components/form/form/index.d.ts +32 -0
  153. package/dist/src/web/components/form/form/index.js +150 -0
  154. package/dist/src/web/components/form/formcell/index.d.ts +8 -0
  155. package/dist/src/web/components/form/formcell/index.js +40 -0
  156. package/dist/src/web/components/form/input/index.d.ts +14 -0
  157. package/dist/src/web/components/form/input/index.js +94 -0
  158. package/dist/src/web/components/form/location/common/mapChoose.d.ts +15 -0
  159. package/dist/src/web/components/form/location/common/mapChoose.js +496 -0
  160. package/dist/src/web/components/form/location/common/mapView.d.ts +19 -0
  161. package/dist/src/web/components/form/location/common/mapView.js +175 -0
  162. package/dist/src/web/components/form/location/common/propsConfig.d.ts +59 -0
  163. package/dist/src/web/components/form/location/common/propsConfig.js +50 -0
  164. package/dist/src/web/components/form/location/common/selectModal.d.ts +21 -0
  165. package/dist/src/web/components/form/location/common/selectModal.js +44 -0
  166. package/dist/src/web/components/form/location/common/tmap.d.ts +3 -0
  167. package/dist/src/web/components/form/location/common/tmap.js +21 -0
  168. package/dist/src/web/components/form/location/common/useLocationInfo.d.ts +36 -0
  169. package/dist/src/web/components/form/location/common/useLocationInfo.js +105 -0
  170. package/dist/src/web/components/form/location/components/LocationH5/location.h5.d.ts +8 -0
  171. package/dist/src/web/components/form/location/components/LocationH5/location.h5.js +328 -0
  172. package/dist/src/web/components/form/location/components/LocationPC/Header.d.ts +12 -0
  173. package/dist/src/web/components/form/location/components/LocationPC/Header.js +43 -0
  174. package/dist/src/web/components/form/location/components/LocationPC/location.PC.d.ts +8 -0
  175. package/dist/src/web/components/form/location/components/LocationPC/location.PC.js +228 -0
  176. package/dist/src/web/components/form/location/constants.d.ts +2 -0
  177. package/dist/src/web/components/form/location/constants.js +3 -0
  178. package/dist/src/web/components/form/location/index.d.ts +1 -0
  179. package/dist/src/web/components/form/location/index.js +24 -0
  180. package/dist/src/web/components/form/radio/index.d.ts +11 -0
  181. package/dist/src/web/components/form/radio/index.js +115 -0
  182. package/dist/src/web/components/form/renderDecorator.d.ts +6 -0
  183. package/dist/src/web/components/form/renderDecorator.js +20 -0
  184. package/dist/src/web/components/form/select/allTimePicker/calendar.d.ts +13 -0
  185. package/dist/src/web/components/form/select/allTimePicker/calendar.js +104 -0
  186. package/dist/src/web/components/form/select/allTimePicker/dataUtils.d.ts +24 -0
  187. package/dist/src/web/components/form/select/allTimePicker/dataUtils.js +265 -0
  188. package/dist/src/web/components/form/select/allTimePicker/index.d.ts +14 -0
  189. package/dist/src/web/components/form/select/allTimePicker/index.js +944 -0
  190. package/dist/src/web/components/form/select/dropdown-select/ui.d.ts +15 -0
  191. package/dist/src/web/components/form/select/dropdown-select/ui.js +55 -0
  192. package/dist/src/web/components/form/select/h5.d.ts +16 -0
  193. package/dist/src/web/components/form/select/h5.js +466 -0
  194. package/dist/src/web/components/form/select/index.d.ts +66 -0
  195. package/dist/src/web/components/form/select/index.js +255 -0
  196. package/dist/src/web/components/form/select/region/index.d.ts +6 -0
  197. package/dist/src/web/components/form/select/region/index.js +147 -0
  198. package/dist/src/web/components/form/select/time.d.ts +9 -0
  199. package/dist/src/web/components/form/select/time.js +146 -0
  200. package/dist/src/web/components/form/select/use-options.d.ts +26 -0
  201. package/dist/src/web/components/form/select/use-options.js +103 -0
  202. package/dist/src/web/components/form/select/year.d.ts +7 -0
  203. package/dist/src/web/components/form/select/year.js +72 -0
  204. package/dist/src/web/components/form/switch/index.d.ts +6 -0
  205. package/dist/src/web/components/form/switch/index.js +58 -0
  206. package/dist/src/web/components/form/textarea/index.d.ts +12 -0
  207. package/dist/src/web/components/form/textarea/index.js +66 -0
  208. package/dist/src/web/components/form/tips/index.d.ts +8 -0
  209. package/dist/src/web/components/form/tips/index.js +17 -0
  210. package/dist/src/web/components/form/uploader/index.d.ts +3 -0
  211. package/dist/src/web/components/form/uploader/index.js +42 -0
  212. package/dist/src/web/components/form/uploader/uploader.h5.d.ts +20 -0
  213. package/dist/src/web/components/form/uploader/uploader.h5.js +199 -0
  214. package/dist/src/web/components/form/uploader/uploader.pc.d.ts +29 -0
  215. package/dist/src/web/components/form/uploader/uploader.pc.js +208 -0
  216. package/dist/src/web/components/form/uploaderFile/index.d.ts +4 -0
  217. package/dist/src/web/components/form/uploaderFile/index.js +19 -0
  218. package/dist/src/web/components/form/uploaderFile/uploadFile.h5.d.ts +23 -0
  219. package/dist/src/web/components/form/uploaderFile/uploadFile.h5.js +330 -0
  220. package/dist/src/web/components/form/uploaderFile/uploadFile.pc.d.ts +24 -0
  221. package/dist/src/web/components/form/uploaderFile/uploadFile.pc.js +302 -0
  222. package/dist/src/web/components/form/userOrgSelect/comTool.d.ts +8 -0
  223. package/dist/src/web/components/form/userOrgSelect/comTool.js +101 -0
  224. package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +19 -0
  225. package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +252 -0
  226. package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +4 -0
  227. package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +157 -0
  228. package/dist/src/web/components/form/userOrgSelect/departTreeSelect/index.d.ts +2 -0
  229. package/dist/src/web/components/form/userOrgSelect/departTreeSelect/index.js +17 -0
  230. package/dist/src/web/components/form/userOrgSelect/getUserService.d.ts +11 -0
  231. package/dist/src/web/components/form/userOrgSelect/getUserService.js +159 -0
  232. package/dist/src/web/components/form/userOrgSelect/index.d.ts +2 -0
  233. package/dist/src/web/components/form/userOrgSelect/index.js +17 -0
  234. package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +27 -0
  235. package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.js +276 -0
  236. package/dist/src/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +9 -0
  237. package/dist/src/web/components/form/userOrgSelect/userTreeSelect.pc.js +253 -0
  238. package/dist/src/web/components/form/userOrgSelect/utils.d.ts +36 -0
  239. package/dist/src/web/components/form/userOrgSelect/utils.js +80 -0
  240. package/dist/src/web/components/formdetail/index.d.ts +28 -0
  241. package/dist/src/web/components/formdetail/index.js +173 -0
  242. package/dist/src/web/components/graphicCard/index.d.ts +46 -0
  243. package/dist/src/web/components/graphicCard/index.js +178 -0
  244. package/dist/src/web/components/image/image.d.ts +9 -0
  245. package/dist/src/web/components/image/image.js +119 -0
  246. package/dist/src/web/components/image/index.d.ts +13 -0
  247. package/dist/src/web/components/image/index.js +77 -0
  248. package/dist/src/web/components/index.d.ts +50 -0
  249. package/dist/src/web/components/index.js +99 -0
  250. package/dist/src/web/components/link/index.d.ts +24 -0
  251. package/dist/src/web/components/link/index.js +71 -0
  252. package/dist/src/web/components/listView/index.d.ts +7 -0
  253. package/dist/src/web/components/listView/index.js +297 -0
  254. package/dist/src/web/components/listView/interface.d.ts +127 -0
  255. package/dist/src/web/components/listView/interface.js +1 -0
  256. package/dist/src/web/components/lottery/index.d.ts +22 -0
  257. package/dist/src/web/components/lottery/index.js +385 -0
  258. package/dist/src/web/components/lottery/lotteryUtil.d.ts +23 -0
  259. package/dist/src/web/components/lottery/lotteryUtil.js +181 -0
  260. package/dist/src/web/components/modal/index.d.ts +17 -0
  261. package/dist/src/web/components/modal/index.js +11 -0
  262. package/dist/src/web/components/modal/modal.h5.d.ts +4 -0
  263. package/dist/src/web/components/modal/modal.h5.js +46 -0
  264. package/dist/src/web/components/modal/modal.pc.d.ts +3 -0
  265. package/dist/src/web/components/modal/modal.pc.js +31 -0
  266. package/dist/src/web/components/navLayout/index.d.ts +61 -0
  267. package/dist/src/web/components/navLayout/index.js +127 -0
  268. package/dist/src/web/components/navigationBar/common.d.ts +15 -0
  269. package/dist/src/web/components/navigationBar/common.js +127 -0
  270. package/dist/src/web/components/navigationBar/h5Menu.d.ts +14 -0
  271. package/dist/src/web/components/navigationBar/h5Menu.js +72 -0
  272. package/dist/src/web/components/navigationBar/horizontalMenu.d.ts +12 -0
  273. package/dist/src/web/components/navigationBar/horizontalMenu.js +99 -0
  274. package/dist/src/web/components/navigationBar/index.d.ts +13 -0
  275. package/dist/src/web/components/navigationBar/index.js +157 -0
  276. package/dist/src/web/components/navigationBar/verticalMenu.d.ts +13 -0
  277. package/dist/src/web/components/navigationBar/verticalMenu.js +38 -0
  278. package/dist/src/web/components/phone/index.d.ts +18 -0
  279. package/dist/src/web/components/phone/index.js +4 -0
  280. package/dist/src/web/components/phoneCode/index.d.ts +18 -0
  281. package/dist/src/web/components/phoneCode/index.js +4 -0
  282. package/dist/src/web/components/picker/datePicker.d.ts +10 -0
  283. package/dist/src/web/components/picker/datePicker.js +31 -0
  284. package/dist/src/web/components/picker/picker.d.ts +6 -0
  285. package/dist/src/web/components/picker/picker.js +45 -0
  286. package/dist/src/web/components/picker/timePicker.d.ts +7 -0
  287. package/dist/src/web/components/picker/timePicker.js +42 -0
  288. package/dist/src/web/components/richText/const.d.ts +1 -0
  289. package/dist/src/web/components/richText/const.js +2 -0
  290. package/dist/src/web/components/richText/index.d.ts +50 -0
  291. package/dist/src/web/components/richText/index.js +351 -0
  292. package/dist/src/web/components/richTextView/index.d.ts +7 -0
  293. package/dist/src/web/components/richTextView/index.js +46 -0
  294. package/dist/src/web/components/scrollView/index.d.ts +26 -0
  295. package/dist/src/web/components/scrollView/index.js +97 -0
  296. package/dist/src/web/components/share/index.d.ts +34 -0
  297. package/dist/src/web/components/share/index.js +4 -0
  298. package/dist/src/web/components/slot/index.d.ts +6 -0
  299. package/dist/src/web/components/slot/index.js +9 -0
  300. package/dist/src/web/components/swiper/index.d.ts +24 -0
  301. package/dist/src/web/components/swiper/index.js +153 -0
  302. package/dist/src/web/components/tabs/index.d.ts +13 -0
  303. package/dist/src/web/components/tabs/index.js +20 -0
  304. package/dist/src/web/components/tabs/tabs.h5.d.ts +4 -0
  305. package/dist/src/web/components/tabs/tabs.h5.js +44 -0
  306. package/dist/src/web/components/tabs/tabs.pc.d.ts +3 -0
  307. package/dist/src/web/components/tabs/tabs.pc.js +40 -0
  308. package/dist/src/web/components/text/index.d.ts +14 -0
  309. package/dist/src/web/components/text/index.js +19 -0
  310. package/dist/src/web/components/uploaderFileView/index.d.ts +10 -0
  311. package/dist/src/web/components/uploaderFileView/index.js +46 -0
  312. package/dist/src/web/components/uploaderView/index.d.ts +17 -0
  313. package/dist/src/web/components/uploaderView/index.js +48 -0
  314. package/dist/src/web/components/userInfo/index.d.ts +26 -0
  315. package/dist/src/web/components/userInfo/index.js +4 -0
  316. package/dist/src/web/components/wedaVideo/index.d.ts +17 -0
  317. package/dist/src/web/components/wedaVideo/index.js +156 -0
  318. package/dist/src/web/index.d.ts +8 -0
  319. package/dist/src/web/index.js +4 -0
  320. package/dist/src/web/utils/classnames.d.ts +2 -0
  321. package/dist/src/web/utils/classnames.js +37 -0
  322. package/dist/src/web/utils/console.d.ts +3 -0
  323. package/dist/src/web/utils/console.js +26 -0
  324. package/dist/src/web/utils/constant.d.ts +23 -0
  325. package/dist/src/web/utils/constant.js +24 -0
  326. package/dist/src/web/utils/debounce.d.ts +2 -0
  327. package/dist/src/web/utils/debounce.js +92 -0
  328. package/dist/src/web/utils/getLocalCounter.d.ts +1 -0
  329. package/dist/src/web/utils/getLocalCounter.js +4 -0
  330. package/dist/src/web/utils/getUserService.d.ts +11 -0
  331. package/dist/src/web/utils/getUserService.js +156 -0
  332. package/dist/src/web/utils/isObjectEqual.d.ts +2 -0
  333. package/dist/src/web/utils/isObjectEqual.js +12 -0
  334. package/dist/src/web/utils/loading-fallback.d.ts +2 -0
  335. package/dist/src/web/utils/loading-fallback.js +2 -0
  336. package/dist/src/web/utils/lodash.d.ts +1 -0
  337. package/dist/src/web/utils/lodash.js +2 -0
  338. package/dist/src/web/utils/platform.d.ts +18 -0
  339. package/dist/src/web/utils/platform.js +193 -0
  340. package/dist/src/web/utils/tcb.d.ts +33 -0
  341. package/dist/src/web/utils/tcb.js +118 -0
  342. package/dist/src/web/utils/tmap.d.ts +3 -0
  343. package/dist/src/web/utils/tmap.js +21 -0
  344. package/dist/src/web/utils/use-cloud-id-temp-url.d.ts +1 -0
  345. package/dist/src/web/utils/use-cloud-id-temp-url.js +15 -0
  346. package/dist/src/web/utils/useSetState.d.ts +1 -0
  347. package/dist/src/web/utils/useSetState.js +8 -0
  348. package/dist/src/web/utils/useSyncValue.d.ts +4 -0
  349. package/dist/src/web/utils/useSyncValue.js +16 -0
  350. package/dist/src/web/utils/weui.d.ts +1 -0
  351. package/dist/src/web/utils/weui.js +2 -0
  352. package/dist/web/components/form/input/index.css +16 -0
  353. package/dist/web/components/form/select/allTimePicker/calendar.css +114 -0
  354. package/dist/web/components/form/select/allTimePicker/index.css +136 -0
  355. package/dist/web/components/form/userOrgSelect/userOrgSelect.css +809 -0
  356. package/package.json +34 -21
@@ -0,0 +1,50 @@
1
+ export { default as Button } from "./button";
2
+ export const Text: any;
3
+ export { default as Container } from "./container";
4
+ export const Image: any;
5
+ export { default as Slot } from "./slot";
6
+ export { default as ScrollView } from "./scrollView";
7
+ export { default as Swiper } from "./swiper";
8
+ export { default as Carousel } from "./carousel";
9
+ export { default as Modal } from "./modal";
10
+ export const RichText: any;
11
+ export { default as RichTextView } from "./richTextView";
12
+ export { default as Link } from "./link";
13
+ export { default as Drawer } from "./drawer";
14
+ export { default as UploaderView } from "./uploaderView";
15
+ export { default as UploaderFileView } from "./uploaderFileView";
16
+ export const WedaVideo: any;
17
+ export { default as Picker } from "./picker/picker";
18
+ export { default as DatePicker } from "./picker/datePicker";
19
+ export { default as TimePicker } from "./picker/timePicker";
20
+ export { default as Form } from "./form/form";
21
+ export { default as Input } from "./form/input";
22
+ export { default as Textarea } from "./form/textarea";
23
+ export { default as Checkbox } from "./form/checkbox";
24
+ export { default as Radio } from "./form/radio";
25
+ export { default as Switch } from "./form/switch";
26
+ export { default as Select } from "./form/select";
27
+ export { default as Uploader } from "./form/uploader";
28
+ export { default as UploaderFile } from "./form/uploaderFile";
29
+ export { default as Tips } from "./form/tips";
30
+ export { default as Tabs } from "./tabs";
31
+ export { default as Location } from "./form/location";
32
+ export const EnumSelect: any;
33
+ export const Calendar: any;
34
+ export { default as NavLayout } from "./navLayout";
35
+ export { default as ListView } from "./listView";
36
+ export { default as NavigationBar } from "./navigationBar";
37
+ export const Line: any;
38
+ export const Bar: any;
39
+ export const Pie: any;
40
+ export { default as DataView } from "./dataView";
41
+ export { default as StatisticsCard } from "./chart/statisticsCard";
42
+ export { default as GraphicCard } from "./graphicCard";
43
+ export { default as UserInfo } from "./userInfo";
44
+ export { default as Phone } from "./phone";
45
+ export { default as PhoneCode } from "./phoneCode";
46
+ export { default as Share } from "./share";
47
+ export { default as Lottery } from "./lottery";
48
+ export { default as UserTreeSelect } from "./form/userOrgSelect/index";
49
+ export { default as DepartTreeSelect } from "./form/userOrgSelect/departTreeSelect/index";
50
+ export { default as FormDetail } from "./formdetail";
@@ -0,0 +1,99 @@
1
+ import '@tcwd/style-wedatheme/index.css';
2
+ import loadable from '@loadable/component';
3
+ import { fallback } from '../utils/loading-fallback';
4
+ // export const Button = loadable(() => import('./button'), {fallback});
5
+ // export const Container = loadable(() => import('./container'), {fallback});
6
+ // export const Slot = loadable(() => import('./slot'), {fallback});
7
+ // export const ScrollView = loadable(() => import('./scrollView'), {fallback});
8
+ // export const Swiper = loadable(() => import('./swiper'), {fallback});
9
+ // export const Modal = loadable(() => import('./modal'), {fallback});
10
+ // export const RichText = loadable(() => import('./richText'), {fallback});
11
+ // export const RichTextView = loadable(() => import('./richTextView'), {fallback});
12
+ // export const Link = loadable(() => import('./link'), {fallback});
13
+ // export const Drawer = loadable(() => import('./drawer'), {fallback});
14
+ // export const UploaderView = loadable(() => import('./uploaderView'), {fallback});
15
+ // // picker
16
+ // export const Picker = loadable(() => import('./picker/picker'), {fallback});
17
+ // export const DatePicker = loadable(() => import('./picker/datePicker'), {fallback});
18
+ // export const TimePicker = loadable(() => import('./picker/timePicker'), {fallback});
19
+ // // form
20
+ // export const Form = loadable(() => import('./form/form'), {fallback});
21
+ // export const Input = loadable(() => import('./form/input'), {fallback});
22
+ // export const Textarea = loadable(() => import('./form/textarea'), {fallback});
23
+ // export const Checkbox = loadable(() => import('./form/checkbox'), {fallback});
24
+ // export const Radio = loadable(() => import('./form/radio'), {fallback});
25
+ // export const Switch = loadable(() => import('./form/switch'), {fallback});
26
+ // export const Uploader = loadable(() => import('./form/uploader'), {fallback});
27
+ // export const Tips = loadable(() => import('./form/tips'), {fallback});
28
+ // export const EnumSelect = loadable(() => import('./form/enumSelect'), {fallback});
29
+ // export const Tabs = loadable(() => import('./tabs'), {fallback});
30
+ export { default as Button } from './button';
31
+ // export { default as Text } from './text';
32
+ export const Text = loadable(() => import('./text'), { fallback });
33
+ export { default as Container } from './container';
34
+ // export { default as Image } from './image';
35
+ export const Image = loadable(() => import('./image'), { fallback });
36
+ export { default as Slot } from './slot';
37
+ export { default as ScrollView } from './scrollView';
38
+ export { default as Swiper } from './swiper';
39
+ export { default as Carousel } from './carousel';
40
+ export { default as Modal } from './modal';
41
+ // export { default as RichText } from './richText';
42
+ export const RichText = loadable(() => import('./richText'), { fallback });
43
+ export { default as RichTextView } from './richTextView';
44
+ export { default as Link } from './link';
45
+ export { default as Drawer } from './drawer';
46
+ export { default as UploaderView } from './uploaderView';
47
+ export { default as UploaderFileView } from './uploaderFileView';
48
+ // export { default as WedaVideo } from './wedaVideo/index';
49
+ export const WedaVideo = loadable(() => import('./wedaVideo/index'), {
50
+ fallback,
51
+ });
52
+ export { default as Picker } from './picker/picker';
53
+ export { default as DatePicker } from './picker/datePicker';
54
+ export { default as TimePicker } from './picker/timePicker';
55
+ // form
56
+ export { default as Form } from './form/form';
57
+ export { default as Input } from './form/input';
58
+ export { default as Textarea } from './form/textarea';
59
+ export { default as Checkbox } from './form/checkbox';
60
+ export { default as Radio } from './form/radio';
61
+ export { default as Switch } from './form/switch';
62
+ export { default as Select } from './form/select';
63
+ // export const Select = loadable(() => import('./form/select'), { fallback });
64
+ export { default as Uploader } from './form/uploader';
65
+ export { default as UploaderFile } from './form/uploaderFile';
66
+ export { default as Tips } from './form/tips';
67
+ export { default as Tabs } from './tabs';
68
+ export { default as Location } from './form/location';
69
+ // export { default as EnumSelect } from './form/enumSelect';
70
+ export const EnumSelect = loadable(() => import('./form/enumSelect'), {
71
+ fallback,
72
+ });
73
+ // export { default as Calendar } from './calendar';
74
+ export const Calendar = loadable(() => import('./calendar'), { fallback });
75
+ export { default as NavLayout } from './navLayout';
76
+ // Data Contaier
77
+ export { default as ListView } from './listView';
78
+ export { default as NavigationBar } from './navigationBar';
79
+ // export { default as Line } from './chart/line';
80
+ // export { default as Bar } from './chart/bar';
81
+ // export { default as Pie } from './chart/pie';
82
+ export const Line = loadable(() => import('./chart/line'), { fallback });
83
+ export const Bar = loadable(() => import('./chart/bar/index'), {
84
+ fallback,
85
+ });
86
+ export const Pie = loadable(() => import('./chart/pie'), { fallback });
87
+ export { default as DataView } from './dataView';
88
+ export { default as StatisticsCard } from './chart/statisticsCard';
89
+ export { default as GraphicCard } from './graphicCard';
90
+ export { default as UserInfo } from './userInfo';
91
+ export { default as Phone } from './phone';
92
+ export { default as PhoneCode } from './phoneCode';
93
+ export { default as Share } from './share';
94
+ export { default as Lottery } from './lottery';
95
+ export { default as UserTreeSelect } from './form/userOrgSelect/index';
96
+ export { default as DepartTreeSelect } from './form/userOrgSelect/departTreeSelect/index';
97
+ export { default as FormDetail } from './formdetail';
98
+ import 'weui/dist/style/weui.css';
99
+ import '../weda-ui.css';
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import type { CommonPropsType } from '../../types';
3
+ import './index.css';
4
+ export interface PropsType extends CommonPropsType {
5
+ /**
6
+ * 内容
7
+ */
8
+ content?: string;
9
+ /**
10
+ * 链接地址
11
+ */
12
+ url?: string;
13
+ /**
14
+ * 参数
15
+ */
16
+ params?: Readonly<{
17
+ key: string;
18
+ value: string;
19
+ }[]>;
20
+ contentSlot?: React.ReactNode;
21
+ isOpenInNewWindow?: boolean;
22
+ }
23
+ export default function Link({ content, url, events, style, className, contentSlot, params, // TODO 格式定义,
24
+ isOpenInNewWindow, }: PropsType): JSX.Element;
@@ -0,0 +1,71 @@
1
+ import * as React from 'react';
2
+ import classNames from '../../utils/classnames';
3
+ import { emptyArray, emptyObject } from '../../utils/constant';
4
+ import './index.css';
5
+ // 所有绝对地址直接交由浏览器,新开窗口交由浏览器
6
+ // 当前窗口相对地址交给平台
7
+ export default function Link({ content, url = '', events = emptyObject, style, className, contentSlot, params = emptyArray, // TODO 格式定义,
8
+ isOpenInNewWindow, }) {
9
+ url = url.trim();
10
+ const cls = classNames({
11
+ 'weda-link': true,
12
+ 'weda-ui': true,
13
+ [className]: className,
14
+ });
15
+ // URL 构造函数不支持 '//xxx.com' 的格式
16
+ if (url.indexOf('//') === 0) {
17
+ url = location.protocol + url;
18
+ }
19
+ // "proto:" 或 "//" 起头的是绝对路径
20
+ let isAbosolutePath = /^(?:[a-z]+:)/i.test(url);
21
+ let base, path, href, paramObj = {}, urlObj;
22
+ if (!isAbosolutePath) {
23
+ // 相对地址使用站位域名,不实际使用
24
+ base =
25
+ location.origin && location.origin !== 'null'
26
+ ? location.origin
27
+ : 'https://we.da';
28
+ }
29
+ try {
30
+ urlObj = new URL(url, base);
31
+ params.forEach((x) => {
32
+ urlObj.searchParams.append(x.key, x.value);
33
+ });
34
+ href = urlObj.href;
35
+ path = urlObj.pathname;
36
+ for (const [key, value] of urlObj.searchParams) {
37
+ paramObj[key] = value;
38
+ }
39
+ // 相对地址去掉站位域名
40
+ if (!isAbosolutePath) {
41
+ href = urlObj.pathname + urlObj.search + urlObj.hash;
42
+ href = href.replace(/^\//, '');
43
+ }
44
+ }
45
+ catch (e) {
46
+ // 非法 url
47
+ isAbosolutePath = true;
48
+ href = url;
49
+ path = '';
50
+ paramObj = params.reduce((p, x) => {
51
+ p[x.key] = x.value;
52
+ return p;
53
+ }, {});
54
+ }
55
+ return (React.createElement("a", { style: { ...style }, className: cls, target: isOpenInNewWindow ? '_blank' : '_self', href: href, onClick: (e) => {
56
+ events.tap && events.tap({}, { originEvent: e });
57
+ if (!e.defaultPrevented) {
58
+ if (!isAbosolutePath) {
59
+ e.preventDefault();
60
+ app.navigateTo({
61
+ pageId: path,
62
+ packageName: '',
63
+ mode: 'weDa',
64
+ params: paramObj,
65
+ });
66
+ }
67
+ }
68
+ }, rel: "noopener noreferrer" },
69
+ contentSlot && React.createElement("div", { className: "weda-link-slot" }, contentSlot),
70
+ content));
71
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { IListView } from './interface';
3
+ import './index.css';
4
+ /**
5
+ * 数据容器-列表视图
6
+ */
7
+ export default function ListView(props: IListView): JSX.Element;
@@ -0,0 +1,297 @@
1
+ /* eslint-disable react-hooks/exhaustive-deps */
2
+ import React, { useState, useEffect, useRef, useCallback } from 'react';
3
+ import { callDataSource } from '../../utils/tcb';
4
+ import { isInIde, getWhereList } from '../../utils/platform';
5
+ import classNames from '../../utils/classnames';
6
+ import isequal from 'lodash.isequal';
7
+ import './index.css';
8
+ import { isNil } from '../../utils/lodash';
9
+ const ORDERTYPE = ['asc', 'desc'];
10
+ const BLOCK_NAME = 'weda-list-view';
11
+ const getIdeMockData = (length = 3) => Array.from({ length }).map(() => Object.create(null));
12
+ /**
13
+ * 数据容器-列表视图
14
+ */
15
+ export default function ListView(props) {
16
+ var _a, _b, _c;
17
+ const { dataSourceType, bindConnectMetadata, connectorMethod, connectorParams, datasource, orderBy, orderType, where, template, pageSize = 5, pagination, events, className, children, isRecords = true, //是否展示回调recoreds字段
18
+ isSetStatus = false, //是否开启加载状态
19
+ appCloud = { callDataSource, isInIde }, beforeDataChange = (v) => v, ...rest } = props;
20
+ const isModel = dataSourceType !== 'custom-connector';
21
+ const methodName = isModel
22
+ ? ((_a = datasource === null || datasource === void 0 ? void 0 : datasource.extra) === null || _a === void 0 ? void 0 : _a.methodName) || 'wedaGetRecords'
23
+ : connectorMethod === null || connectorMethod === void 0 ? void 0 : connectorMethod.name; // 默认方法名
24
+ const dataSourceName = isModel
25
+ ? datasource === null || datasource === void 0 ? void 0 : datasource.name
26
+ : (_b = bindConnectMetadata === null || bindConnectMetadata === void 0 ? void 0 : bindConnectMetadata.datasource) === null || _b === void 0 ? void 0 : _b.name;
27
+ const [pageNo, setPageNo] = useState(1); // 分页状态
28
+ const [entry, setEntry] = useState(null); // 触底的observer对象
29
+ const [status, setStatus] = useState(''); // 查询状态
30
+ const paramRef = useRef({
31
+ dataSourceName,
32
+ methodName,
33
+ params: { orderBy, orderType, where, pageNo: 1, pageSize, connectorParams },
34
+ pagination,
35
+ }); // 最新请求参数
36
+ const dataRef = useRef({ total: 0, records: [] }); // 最新数据列表
37
+ const observeRef = useRef(null); // 当前监听对象
38
+ const isIdeMockData = !(dataSourceName && methodName) && ((_c = appCloud === null || appCloud === void 0 ? void 0 : appCloud.isInIde) === null || _c === void 0 ? void 0 : _c.call(appCloud)); // 在ide环境且未绑定数据源时,存在mock数据逻辑
39
+ const shouldBottomLoad = pagination === 'bottomLoad' &&
40
+ (entry === null || entry === void 0 ? void 0 : entry.isIntersecting) &&
41
+ ['', 'success'].includes(status); // 能否触底加载
42
+ // 组件卸载时触发
43
+ useEffect(() => {
44
+ return () => {
45
+ var _a, _b;
46
+ (_a = observeRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
47
+ (_b = events === null || events === void 0 ? void 0 : events.onDataChange) === null || _b === void 0 ? void 0 : _b.call(events, { data: beforeDataChange([]) });
48
+ };
49
+ }, []);
50
+ // props 基本类型监听,需重新分页;处于 ide 且未绑定数据源时返回mock数据
51
+ useEffect(() => {
52
+ var _a, _b;
53
+ dataRef.current = { total: 0, records: [] };
54
+ if (!isIdeMockData) {
55
+ fetchData({
56
+ dataSourceName,
57
+ methodName,
58
+ params: {
59
+ ...(_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params,
60
+ orderBy,
61
+ orderType,
62
+ pageNo: 1,
63
+ pageSize,
64
+ },
65
+ pagination,
66
+ });
67
+ }
68
+ else {
69
+ (_b = events === null || events === void 0 ? void 0 : events.onDataChange) === null || _b === void 0 ? void 0 : _b.call(events, {
70
+ data: beforeDataChange(getIdeMockData(pageSize)),
71
+ });
72
+ }
73
+ }, [
74
+ methodName,
75
+ dataSourceName,
76
+ pageSize,
77
+ pagination,
78
+ orderBy,
79
+ orderType,
80
+ isModel,
81
+ ]);
82
+ // props 对象类型监听,需重新分页
83
+ useEffect(() => {
84
+ var _a, _b, _c, _d;
85
+ if (isModel) {
86
+ if (!isequal((_b = (_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params) === null || _b === void 0 ? void 0 : _b.where, where)) {
87
+ dataRef.current = { total: 0, records: [] };
88
+ fetchData({
89
+ params: { pageNo: 1, where },
90
+ });
91
+ }
92
+ }
93
+ else {
94
+ if (!isequal((_d = (_c = paramRef.current) === null || _c === void 0 ? void 0 : _c.params) === null || _d === void 0 ? void 0 : _d.connectorParams, connectorParams)) {
95
+ dataRef.current = { total: 0, records: [] };
96
+ fetchData({
97
+ params: { pageNo: 1, connectorParams },
98
+ });
99
+ }
100
+ }
101
+ });
102
+ // 监听触底加载事件
103
+ useEffect(() => {
104
+ var _a, _b;
105
+ if (shouldBottomLoad && hasNextPage()) {
106
+ fetchData({
107
+ params: { pageNo: (((_b = (_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params) === null || _b === void 0 ? void 0 : _b.pageNo) || 1) + 1 },
108
+ });
109
+ }
110
+ }, [shouldBottomLoad]);
111
+ // 触底监控对象
112
+ const nodeRefCallback = useCallback((node) => {
113
+ var _a;
114
+ if (node) {
115
+ (_a = observeRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
116
+ observeRef.current = new IntersectionObserver((entries) => {
117
+ setEntry(entries === null || entries === void 0 ? void 0 : entries[0]);
118
+ });
119
+ observeRef.current.observe(node);
120
+ }
121
+ }, []);
122
+ // 能否点击下一页
123
+ const hasNextPage = () => {
124
+ var _a;
125
+ const { pageNo = 1, pageSize = 5 } = ((_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params) || {};
126
+ const { total = 0 } = dataRef.current || {};
127
+ return pageNo * pageSize < total;
128
+ };
129
+ /**
130
+ * 列表视图拉取数据
131
+ * 方法仅依赖入参和paramRef的参数
132
+ */
133
+ const fetchData = async (param) => {
134
+ var _a;
135
+ // 合并参数
136
+ const fetchParam = {
137
+ ...paramRef.current,
138
+ ...param,
139
+ params: { ...paramRef.current.params, ...param === null || param === void 0 ? void 0 : param.params },
140
+ };
141
+ const { dataSourceName, methodName, params } = fetchParam;
142
+ const { orderBy, orderType, pageNo, pageSize, where, connectorParams } = params || {};
143
+ if (status === 'loading' || !(dataSourceName && methodName))
144
+ return;
145
+ setStatus('loading');
146
+ let tcbParams = {};
147
+ // tcb分页参数
148
+ if (!isNil(pageNo) && !isNil(pageSize)) {
149
+ tcbParams['pageNo'] = pageNo;
150
+ tcbParams['pageSize'] = pageSize;
151
+ }
152
+ if (isModel) {
153
+ // tcb排序参数
154
+ if (orderBy && ORDERTYPE.includes(orderType)) {
155
+ tcbParams['orderBy'] = orderBy;
156
+ tcbParams['orderType'] = orderType;
157
+ }
158
+ // tcb过滤参数
159
+ const whereEffected = [].concat(getWhereList(where));
160
+ whereEffected.length > 0 && (tcbParams['where'] = whereEffected);
161
+ }
162
+ else {
163
+ tcbParams = Object.assign({}, tcbParams, connectorParams);
164
+ }
165
+ // tcb结果和事件
166
+ let data = [];
167
+ const eventDatasource = isModel
168
+ ? datasource
169
+ : { ...bindConnectMetadata, ...connectorMethod };
170
+ try {
171
+ data = await (appCloud === null || appCloud === void 0 ? void 0 : appCloud.callDataSource({
172
+ dataSourceName,
173
+ methodName,
174
+ params: tcbParams,
175
+ }, true));
176
+ paramRef.current = fetchParam;
177
+ onEnvets(data, eventDatasource);
178
+ }
179
+ catch (e) {
180
+ setStatus(isModel ? 'fail' : '');
181
+ (_a = events === null || events === void 0 ? void 0 : events.queryFail) === null || _a === void 0 ? void 0 : _a.call(events, { datasource: eventDatasource, data: null });
182
+ }
183
+ };
184
+ /**
185
+ * 根据fetchData方法返回值,回调给外部事件
186
+ */
187
+ const onEnvets = (data, datasource) => {
188
+ var _a, _b, _c, _d, _e;
189
+ const bottomLoadTimer = 150;
190
+ const fetchRecords = [].concat(!isRecords && !isModel ? data : (data === null || data === void 0 ? void 0 : data.records) || []);
191
+ const total = (_a = data === null || data === void 0 ? void 0 : data.total) !== null && _a !== void 0 ? _a : fetchRecords.length;
192
+ if (['loadMoreButton', 'bottomLoad'].includes(paramRef.current.pagination)) {
193
+ dataRef.current = {
194
+ total,
195
+ records: [...dataRef.current.records, ...fetchRecords],
196
+ };
197
+ }
198
+ else {
199
+ dataRef.current = { total, records: fetchRecords };
200
+ }
201
+ (_b = events === null || events === void 0 ? void 0 : events.onDataChange) === null || _b === void 0 ? void 0 : _b.call(events, {
202
+ data: beforeDataChange(dataRef.current.records || []),
203
+ });
204
+ if (total === 0) {
205
+ setStatus(isModel ? 'empty' : '');
206
+ (_c = events === null || events === void 0 ? void 0 : events.queryEmpty) === null || _c === void 0 ? void 0 : _c.call(events, {
207
+ datasource,
208
+ data: beforeDataChange([]),
209
+ });
210
+ }
211
+ else {
212
+ const statusCb = () => setStatus('success');
213
+ pagination === 'bottomLoad'
214
+ ? window.setTimeout(statusCb, bottomLoadTimer)
215
+ : statusCb();
216
+ }
217
+ const successCb = () => {
218
+ var _a;
219
+ (_a = events === null || events === void 0 ? void 0 : events.querySuccess) === null || _a === void 0 ? void 0 : _a.call(events, {
220
+ datasource,
221
+ data: beforeDataChange(dataRef.current.records),
222
+ });
223
+ };
224
+ pagination === 'bottomLoad'
225
+ ? window.setTimeout(successCb, bottomLoadTimer + 50)
226
+ : successCb();
227
+ setPageNo(((_e = (_d = paramRef.current) === null || _d === void 0 ? void 0 : _d.params) === null || _e === void 0 ? void 0 : _e.pageNo) || 1);
228
+ };
229
+ /**
230
+ * 分页,加载更多
231
+ */
232
+ const renderLoadMore = () => {
233
+ let disabled = !hasNextPage();
234
+ if (isIdeMockData) {
235
+ disabled = false;
236
+ }
237
+ if (status === 'loading')
238
+ return LoadingSymbol;
239
+ return (!disabled && (React.createElement("div", { className: `${BLOCK_NAME}__more-text`, onClick: () => fetchData({ params: { pageNo: pageNo + 1 } }) }, "\u52A0\u8F7D\u66F4\u591A")));
240
+ };
241
+ /**
242
+ * 分页,底部刷新
243
+ */
244
+ const renderBottomLoad = () => {
245
+ return (React.createElement("div", { ref: nodeRefCallback, className: `${BLOCK_NAME}__bottom-load` }, status === 'loading' ? LoadingSymbol : !hasNextPage() && LoadEnd));
246
+ };
247
+ /**
248
+ * 分页,分页器,含ideMockData的判断
249
+ */
250
+ const renderPagination = () => {
251
+ var _a, _b;
252
+ const preDisabeld = pageNo <= 1;
253
+ const nextDisabeld = !hasNextPage();
254
+ const total = (_b = (_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.total) !== null && _b !== void 0 ? _b : 0;
255
+ return (React.createElement("div", { className: `${BLOCK_NAME}__more-pagination` },
256
+ React.createElement("div", { className: classNames(`${BLOCK_NAME}__pagination-pre`, preDisabeld ? '' : 'active'), onClick: () => !preDisabeld && fetchData({ params: { pageNo: pageNo - 1 } }) }, "\u4E0A\u4E00\u9875"),
257
+ React.createElement("div", { className: classNames(`${BLOCK_NAME}__pagination-text`) },
258
+ React.createElement("span", { className: "active" }, isIdeMockData ? 1 : total ? pageNo : 0),
259
+ "/",
260
+ isIdeMockData ? 1 : Math.ceil(total / pageSize)),
261
+ React.createElement("div", { className: classNames(`${BLOCK_NAME}__pagination-next`, nextDisabeld ? '' : 'active'), onClick: () => !nextDisabeld && fetchData({ params: { pageNo: pageNo + 1 } }) }, "\u4E0B\u4E00\u9875")));
262
+ };
263
+ /**
264
+ * 查询状态展示
265
+ */
266
+ const renderStatus = () => {
267
+ switch (status) {
268
+ case 'empty':
269
+ return React.createElement("div", { className: `${BLOCK_NAME}__empty` }, "\u6682\u65E0\u6570\u636E");
270
+ case 'fail':
271
+ return React.createElement("div", { className: `${BLOCK_NAME}__fail` }, "\u52A0\u8F7D\u5931\u8D25");
272
+ case 'loading':
273
+ return (pagination === 'pagination' && (React.createElement("div", { className: classNames(`${BLOCK_NAME}__more`, `${BLOCK_NAME}__content-loading`) }, LoadingSymbol)));
274
+ }
275
+ };
276
+ /**
277
+ * 加载中状态组件
278
+ */
279
+ const LoadingSymbol = (React.createElement("div", { className: `${BLOCK_NAME}__more-symbol` },
280
+ React.createElement("div", { className: `${BLOCK_NAME}__symbol-item` }),
281
+ React.createElement("div", { className: `${BLOCK_NAME}__symbol-item` }),
282
+ React.createElement("div", { className: `${BLOCK_NAME}__symbol-item` })));
283
+ /**
284
+ * 加载到底状态组件
285
+ */
286
+ const LoadEnd = React.createElement("div", null);
287
+ return (React.createElement("div", { ...rest, className: classNames('weda-ui', `${BLOCK_NAME}__containor`, className) },
288
+ children && (React.createElement("div", { className: classNames(template === 'cardList' ? `${BLOCK_NAME}-card` : '', `${BLOCK_NAME}__content`, ['empty', 'fail'].includes(status) && isSetStatus
289
+ ? `${BLOCK_NAME}__content-blank`
290
+ : '') },
291
+ children,
292
+ isSetStatus && renderStatus())),
293
+ React.createElement("div", { className: classNames(`${BLOCK_NAME}__more`, `${BLOCK_NAME}__more-${pagination}`) },
294
+ pagination === 'bottomLoad' && renderBottomLoad(),
295
+ pagination === 'loadMoreButton' && renderLoadMore(),
296
+ pagination === 'pagination' && renderPagination())));
297
+ }