@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,193 @@
1
+ import { useMediaQuery } from '@react-hookz/web';
2
+ import { REL_DICT } from './constant';
3
+ /**
4
+ * 当前环境是否为 H5 端
5
+ */
6
+ export const isH5Platform = () => {
7
+ var _a;
8
+ if (window.matchMedia) {
9
+ return (_a = window.matchMedia('(max-width: 1024px)')) === null || _a === void 0 ? void 0 : _a.matches;
10
+ }
11
+ else {
12
+ let is = false;
13
+ try {
14
+ const ua = navigator && navigator.userAgent;
15
+ is = /Android|webOS|BlackBerry|iPhone|iPad|iPod|iOS/i.test(ua);
16
+ }
17
+ catch (e) {
18
+ null;
19
+ }
20
+ return is;
21
+ }
22
+ };
23
+ /**
24
+ * 判断当前是否是 cloud 开头的文件协议
25
+ */
26
+ export const isCloudFileID = (url) => {
27
+ return /^cloud:\/\/.*/.test(url);
28
+ };
29
+ /**
30
+ * 判断当前是否是 http/https 开头的文件协议
31
+ */
32
+ export const isHttpFileID = (url) => {
33
+ return /^http(s?):\/\/.*/.test(url);
34
+ };
35
+ export function usePlatform() {
36
+ var _a, _b;
37
+ const smallScreen = (_a = useMediaQuery('(max-width: 992px)')) !== null && _a !== void 0 ? _a : isH5Platform();
38
+ const touchDevice = (_b = useMediaQuery('(pointer:coarse)')) !== null && _b !== void 0 ? _b : smallScreen;
39
+ // 非高精度指针(鼠标)就直接 h5, 否则当屏幕小于992 时用h5
40
+ return touchDevice || smallScreen ? 'h5' : 'pc';
41
+ }
42
+ /**
43
+ * 在h5下,判断当前是否是移动浏览器
44
+ */
45
+ export function inH5IsMobile() {
46
+ try {
47
+ // 区分h5是在编辑器还是移动浏览器
48
+ let is_mobile_ua = false;
49
+ const ua = navigator && navigator.userAgent;
50
+ is_mobile_ua = /Android|webOS|BlackBerry|iPhone|iPad|iPod|iOS/i.test(ua);
51
+ return is_mobile_ua;
52
+ }
53
+ catch (e) {
54
+ console.error('isMobile checker err', e);
55
+ }
56
+ }
57
+ /**
58
+ * 过滤非字符串,返回字符串数组
59
+ * 用于兼容单个组件和组件数组
60
+ */
61
+ export const filterStrList = (value) => {
62
+ return [].concat(value).filter((d) => typeof d === 'string' && d !== '');
63
+ };
64
+ /**
65
+ * 文件字节转换
66
+ */
67
+ export const transSize = (size) => {
68
+ const b = parseInt(size) || 0;
69
+ const getBig = (d) => Math.ceil(d / 1024) || 0;
70
+ if (b < 1024) {
71
+ return `${size}B`;
72
+ }
73
+ const k = getBig(size);
74
+ if (k < 1024) {
75
+ return `${k}K`;
76
+ }
77
+ const m = getBig(k);
78
+ if (m < 1024) {
79
+ return `${m}M`;
80
+ }
81
+ const g = getBig(m);
82
+ return `${g}G`;
83
+ };
84
+ /**
85
+ * 链接转换为下载
86
+ */
87
+ export const downloadFile = (url) => {
88
+ if (!url) {
89
+ return;
90
+ }
91
+ const urlObj = new URL(url);
92
+ urlObj.searchParams.append('response-content-disposition', 'attawchment');
93
+ const urls = urlObj.toString();
94
+ window.open(urls);
95
+ // 定时清object https://github.com/eligrey/FileSaver.js/blob/9806041b0e800979dddabbaa1b5f6ce6952d7cd7/src/FileSaver.js#L106
96
+ // eslint-disable-next-line rulesdir/no-timer
97
+ setTimeout(() => {
98
+ window.URL.revokeObjectURL(urls);
99
+ }, 0);
100
+ };
101
+ /**
102
+ * 文件名截取,保留后缀类型
103
+ */
104
+ export const cutFileTitle = (str = '', count = 10) => {
105
+ let [title, type] = [str, ''];
106
+ const dotIndex = `${str}`.lastIndexOf('.');
107
+ if (dotIndex > -1) {
108
+ type = str.slice(dotIndex + 1);
109
+ title = str.slice(0, dotIndex);
110
+ }
111
+ if (title.length > count) {
112
+ title = `${title.slice(0, 7)}...${title.slice(-3)}`;
113
+ }
114
+ if (type) {
115
+ title = `${title}.${type}`;
116
+ }
117
+ return title;
118
+ };
119
+ /**
120
+ * 判断是否在 ide 中
121
+ */
122
+ export const isInIde = () => { var _a, _b; return !!((_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.cloud) === null || _b === void 0 ? void 0 : _b.IS_WEDA_IDE); };
123
+ /**
124
+ * 解析素材资源
125
+ */
126
+ export const resolveStaticResourceUrl = (path) => {
127
+ var _a, _b;
128
+ try {
129
+ // eslint-disable-next-line no-unsafe-optional-chaining
130
+ const resourceUrl = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.__internal__) === null || _b === void 0 ? void 0 : _b.resolveStaticResourceUrl(path);
131
+ return resourceUrl;
132
+ }
133
+ catch (error) {
134
+ return '';
135
+ }
136
+ };
137
+ /**
138
+ * cloudid和文件名转换
139
+ */
140
+ export const transFileCloudidToName = (fileID) => {
141
+ const uuidReg = /(file-)?[0-9a-f]{8}((-)?[0-9a-f]{4}){3}(-)?[0-9a-f]{12}-/;
142
+ const lastIndex = `${fileID}`.lastIndexOf('/');
143
+ const name = `${fileID}`.slice(lastIndex + 1);
144
+ const title = name.replace(uuidReg, '');
145
+ return title;
146
+ };
147
+ /**
148
+ * 判断是否是url
149
+ */
150
+ const reg =
151
+ // eslint-disable-next-line no-useless-escape
152
+ /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
153
+ export const isUrl = (path) => reg.test(path);
154
+ /**
155
+ * 生成随机数
156
+ */
157
+ export const randomStr = (len = 32) => {
158
+ const s = [];
159
+ const hexDigits = '0123456789abcdef';
160
+ const dictLen = hexDigits.length;
161
+ for (var i = 0; i < len; i++) {
162
+ const index = Math.floor(Math.random() * dictLen);
163
+ s[i] = hexDigits[index];
164
+ }
165
+ const result = s.join('');
166
+ return result;
167
+ };
168
+ /**
169
+ * 根据编辑器传入数据筛选条件,转换接口参数条件
170
+ */
171
+ export const getWhereList = (where) => {
172
+ const result = [];
173
+ Array.isArray(where) &&
174
+ where.forEach((item1) => {
175
+ if ((item1 === null || item1 === void 0 ? void 0 : item1.groupLogic) !== 'or' && Array.isArray(item1 === null || item1 === void 0 ? void 0 : item1.logicData)) {
176
+ item1 === null || item1 === void 0 ? void 0 : item1.logicData.forEach((item2) => {
177
+ let [rel, val] = [REL_DICT[item2 === null || item2 === void 0 ? void 0 : item2.rel], item2 === null || item2 === void 0 ? void 0 : item2.value];
178
+ if ('_begin_with' === rel) {
179
+ rel = 'regex';
180
+ val = `^${val}`;
181
+ }
182
+ if ('_exclude' === rel) {
183
+ rel = 'regex';
184
+ val = `^((?!${val}).)*$`;
185
+ }
186
+ if ((item2 === null || item2 === void 0 ? void 0 : item2.logic) !== 'or' && (item2 === null || item2 === void 0 ? void 0 : item2.key) && rel && val !== undefined) {
187
+ result.push({ key: item2.key, rel, val });
188
+ }
189
+ });
190
+ }
191
+ });
192
+ return result;
193
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 云存储/云函数相关
3
+ */
4
+ export declare function getCloudInstance(): Promise<any>;
5
+ /**
6
+ * 获取单个临时链接
7
+ * 单个cos文件,返回字符串
8
+ * 多个cos文件,返回 {fileID: src} 这样的对象
9
+ */
10
+ export declare function getTempFileURL(data: any): Promise<any>;
11
+ /**
12
+ * 云函数获取数据
13
+ */
14
+ export declare function callDataSource(param: {
15
+ dataSourceName: string;
16
+ methodName: string;
17
+ params: Record<string, unknown>;
18
+ viewId?: string;
19
+ }, throwError?: boolean): Promise<any>;
20
+ /**
21
+ * 云函数获取连接器数据
22
+ */
23
+ export declare function callConnector(param: any, throwError?: boolean): Promise<any>;
24
+ /**
25
+ * 云API:获取用户自定义导航内容
26
+ * param
27
+ * WeAppId: string,
28
+ * EnvId: string,
29
+ * PublishType?: string,
30
+ */
31
+ export declare function getAppCustomNav(): Promise<any>;
32
+ export declare function callWedaApi(...args: any[]): any;
33
+ export declare const getDataSourceByName: (dbName: any) => Promise<any>;
@@ -0,0 +1,118 @@
1
+ import { isInIde } from './platform';
2
+ /**
3
+ * 云存储/云函数相关
4
+ */
5
+ // cloudbase._useDefaultAdapter();
6
+ // const tcb = cloudbase.init({
7
+ // env: 'hole-2ggmiaj108259587',
8
+ // });
9
+ // export default app;
10
+ // import cloudbase from '@cloudbase/js-sdk';
11
+ // cloudbase._useDefaultAdapter();
12
+ // const tcb = cloudbase.init({
13
+ // env: 'hole-2ggmiaj108259587',
14
+ // });
15
+ // export function getNativeCloudInstance() {
16
+ // return tcb;
17
+ // }
18
+ export async function getCloudInstance() {
19
+ var _a, _b;
20
+ const tcb = await ((_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.cloud) === null || _b === void 0 ? void 0 : _b.getCloudInstance());
21
+ return tcb;
22
+ }
23
+ /**
24
+ * 获取单个临时链接
25
+ * 单个cos文件,返回字符串
26
+ * 多个cos文件,返回 {fileID: src} 这样的对象
27
+ */
28
+ export async function getTempFileURL(data) {
29
+ var _a, _b, _c, _d;
30
+ if ((_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.cloud) === null || _b === void 0 ? void 0 : _b.getTempFileURL) {
31
+ return await ((_d = (_c = window === null || window === void 0 ? void 0 : window.app) === null || _c === void 0 ? void 0 : _c.cloud) === null || _d === void 0 ? void 0 : _d.getTempFileURL(data));
32
+ }
33
+ }
34
+ /**
35
+ * 云函数获取数据
36
+ */
37
+ export async function callDataSource(param, throwError = false) {
38
+ var _a, _b, _c;
39
+ const { dataSourceName, methodName, params } = param;
40
+ try {
41
+ const res = await ((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.cloud) === null || _b === void 0 ? void 0 : _b.callDataSource) === null || _c === void 0 ? void 0 : _c.call(_b, {
42
+ dataSourceName,
43
+ methodName,
44
+ params,
45
+ }));
46
+ return res;
47
+ }
48
+ catch (error) {
49
+ console.error('callDataSource: ', error);
50
+ if (throwError)
51
+ throw error;
52
+ return {};
53
+ }
54
+ }
55
+ /**
56
+ * 云函数获取连接器数据
57
+ */
58
+ export async function callConnector(param, throwError = false) {
59
+ var _a, _b, _c;
60
+ const { dataSourceName, methodName, params } = param;
61
+ try {
62
+ const res = await ((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.cloud) === null || _b === void 0 ? void 0 : _b.callConnector) === null || _c === void 0 ? void 0 : _c.call(_b, {
63
+ dataSourceName,
64
+ methodName,
65
+ params,
66
+ }));
67
+ return res;
68
+ }
69
+ catch (error) {
70
+ console.error('callConnector: ', error);
71
+ if (throwError)
72
+ throw error;
73
+ return {};
74
+ }
75
+ }
76
+ /**
77
+ * 云API:获取用户自定义导航内容
78
+ * param
79
+ * WeAppId: string,
80
+ * EnvId: string,
81
+ * PublishType?: string,
82
+ */
83
+ export async function getAppCustomNav() {
84
+ var _a;
85
+ try {
86
+ const PublishType = isInIde() ? 'preview' : '';
87
+ const WeAppId = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.id;
88
+ const res = await callWedaApi({
89
+ action: 'DescribeAppCustomNav',
90
+ serviceType: 'lowcode',
91
+ data: {
92
+ WeAppId,
93
+ PublishType,
94
+ },
95
+ });
96
+ return res;
97
+ }
98
+ catch (error) {
99
+ console.error('错误', error);
100
+ return {};
101
+ }
102
+ }
103
+ export function callWedaApi(...args) {
104
+ return window.app.cloud.callWedaApi(...args);
105
+ }
106
+ /*
107
+ 获取数据源字段权限
108
+ */
109
+ export const getDataSourceByName = async (dbName) => {
110
+ // dbName 为空时
111
+ if (!dbName)
112
+ return;
113
+ const datasource = await window.app.cloud.getDataSourceProfileAsync({
114
+ Name: dbName,
115
+ GetColumnAuth: true,
116
+ });
117
+ return datasource;
118
+ };
@@ -0,0 +1,3 @@
1
+ export function getTMap(): any;
2
+ export function calculateDistance(latlng1: any, latlng2: any): number;
3
+ export const base64LocationIcon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4NCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC45OCIgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRkXzI0NDdfNTc0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TYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTIiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDQgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QyX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQgZHk9IjYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDUgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0Ml9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QzX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0M19kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K";
@@ -0,0 +1,21 @@
1
+ export function getTMap() {
2
+ const TMap = window === null || window === void 0 ? void 0 : window.TMap;
3
+ return TMap;
4
+ }
5
+ export function calculateDistance(latlng1, latlng2) {
6
+ let lat1 = latlng1.latitude;
7
+ let lng1 = latlng1.longitude;
8
+ let lat2 = latlng2.latitude;
9
+ let lng2 = latlng2.longitude;
10
+ var radLat1 = (lat1 * Math.PI) / 180.0;
11
+ var radLat2 = (lat2 * Math.PI) / 180.0;
12
+ var a = radLat1 - radLat2;
13
+ var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
14
+ var s = 2 *
15
+ Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
16
+ Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
17
+ s = s * 6378.137; // EARTH_RADIUS;
18
+ s = Math.round(s * 10000) / 10000;
19
+ return s * 1000;
20
+ }
21
+ export const base64LocationIcon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4NCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC45OCIgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRkXzI0NDdfNTc0OSkiPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSIxMiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSI3IiBmaWxsPSIjMDA1MkQ5Ii8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RkZF8yNDQ3XzU3NDkiIHg9IjAiIHk9IjAiIHdpZHRoPSI4NCIgaGVpZ2h0PSI4OCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCB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N1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQgZHk9IjYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDUgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0Ml9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QzX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0M19kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K';
@@ -0,0 +1 @@
1
+ export declare function useTempUrl(cloudId: string): import("swr").SWRResponse<any, any>;
@@ -0,0 +1,15 @@
1
+ import useSWR from 'swr';
2
+ import { getTempFileURL } from './tcb';
3
+ export function useTempUrl(cloudId) {
4
+ const prefix = 'tcb:cloud-id:temp-url';
5
+ const key = `${prefix}:${cloudId}`;
6
+ return useSWR(key, async () => {
7
+ if (!cloudId.startsWith('cloud://')) {
8
+ return cloudId;
9
+ }
10
+ const tempUrl = await getTempFileURL(cloudId);
11
+ return tempUrl;
12
+ },
13
+ // 8秒dedupe
14
+ { dedupingInterval: 8 * 1000 });
15
+ }
@@ -0,0 +1 @@
1
+ export declare const useSetState: <T extends object>(initialState?: T) => [T, (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void];
@@ -0,0 +1,8 @@
1
+ import { useCallback, useState } from 'react';
2
+ export const useSetState = (initialState = {}) => {
3
+ const [state, set] = useState(initialState);
4
+ const setState = useCallback((patch) => {
5
+ set((prevState) => Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch));
6
+ }, []);
7
+ return [state, setState];
8
+ };
@@ -0,0 +1,4 @@
1
+ declare type TComparotor<T = unknown> = (a: T, b: T) => boolean;
2
+ declare type INextState<T> = T | ((prevState: T) => T);
3
+ export declare function useSyncValue<T>(defaultValue: T, comparotor?: TComparotor): [T, (nextState: INextState<T>) => void];
4
+ export {};
@@ -0,0 +1,16 @@
1
+ import { useCallback, useEffect, useState } from 'react';
2
+ import { usePrevious } from '@react-hookz/web';
3
+ export function useSyncValue(defaultValue, comparotor = Object.is) {
4
+ const [stateValue, setStateValue] = useState(defaultValue);
5
+ const prevValue = usePrevious(defaultValue);
6
+ useEffect(() => {
7
+ if (!comparotor(prevValue, defaultValue)) {
8
+ setStateValue(defaultValue);
9
+ }
10
+ // eslint-disable-next-line react-hooks/exhaustive-deps
11
+ }, [defaultValue]);
12
+ const setter = useCallback((next) => {
13
+ setStateValue(next);
14
+ }, [setStateValue]);
15
+ return [stateValue, setter];
16
+ }
@@ -0,0 +1 @@
1
+ export default weui;
@@ -0,0 +1,2 @@
1
+ import * as weui from 'weui.js';
2
+ export default weui;
@@ -38,3 +38,19 @@
38
38
  .weda-input .weui-input {
39
39
  font-weight: inherit;
40
40
  }
41
+
42
+ .weui-pc-input {
43
+ white-space: nowrap;
44
+ }
45
+
46
+ .weui-pc-input .pc-clear {
47
+ position: relative;
48
+ right: 1.78571rem;
49
+ top: 25%;
50
+ display: inline-block;
51
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzg4OCIgZD0iTTggMWE3IDcgMCAxIDAgMCAxNEE3IDcgMCAwIDAgOCAxem0zLjUzNiA5LjEyMWwtMS40MTQgMS40MTRMOCA5LjQxNGwtMi4xMjEgMi4xMjEtMS40MTQtMS40MTRMNi41ODYgOCA0LjQ2NCA1Ljg3OWwxLjQxNC0xLjQxNEw4IDYuNTg2bDIuMTIxLTIuMTIxIDEuNDE0IDEuNDE0TDkuNDE0IDhsMi4xMjIgMi4xMjF6Ii8+PC9zdmc+) !important;
52
+ }
53
+
54
+ .weui-pc-input .pc-input {
55
+ padding-right: 2.14286rem;
56
+ }
@@ -0,0 +1,114 @@
1
+ /* 几个图标 */
2
+ .weda-ui-icon-arrow-right {
3
+ display: inline-block;
4
+ width: 1.71429rem;
5
+ height: 1.71429rem;
6
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkuNjkwNTggMTguNjlMOC4zMTE3MiAxNy4zMTExTDEzLjYyMjMgMTIuMDAwNkw4LjMxMTcyIDYuNjlMOS42OTA1OCA1LjMxMTE0TDE2LjM4IDEyLjAwMDZMOS42OTA1OCAxOC42OVoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuNiIvPgo8L3N2Zz4K);
7
+ }
8
+
9
+ .weda-ui-icon-turn-pre {
10
+ display: inline-block;
11
+ width: 1.71429rem;
12
+ height: 1.71429rem;
13
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03Ljg3OTE3IDEyLjU3NjhMMTUuNTQwMSAyMEwxNi40Nzk3IDE5LjA4NzVMOS4xNjM3OCAxMS45OTg2TDE2LjQ3OTcgNC45MTI0OUwxNS41NDAxIDRMNy45MDQxMyAxMS4zOTYxQzcuODk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3N2Zz4K);
21
+ }
22
+
23
+ /* 年/月份操作区的样式 */
24
+ .weda-ui-custom-calendar-op {
25
+ display: flex;
26
+ justify-content: space-between;
27
+ padding: 0.85714rem 1.42857rem;
28
+ }
29
+
30
+ .weda-ui-custom-calendar-op__start {
31
+ display: flex;
32
+ align-items: center;
33
+ }
34
+
35
+ .weda-ui-custom-calendar-op__end {
36
+ display: flex;
37
+ align-items: center;
38
+ }
39
+
40
+ .weda-ui-custom-calendar-op__end .weda-ui-icon-turn-next {
41
+ margin-left: 0.57143rem;
42
+ }
43
+
44
+ .weda-ui-custom-calendar-op__select {
45
+ font-size: 1.14286rem;
46
+ color: rgba(0, 0, 0, 0.9);
47
+ font-weight: 500;
48
+ display: flex;
49
+ align-items: center;
50
+ }
51
+
52
+ .weda-ui-custom-calendar-op__select.is-active {
53
+ color: #0052d9;
54
+ }
55
+
56
+ .weda-ui-custom-calendar-op__select.is-active .weda-ui-icon-arrow-right {
57
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuMzEwMDYgOS42OTA1N0w2LjY4ODkyIDguMzExNzFMMTEuOTk5NSAxMy42MjIzTDE3LjMxMDEgOC4zMTE3MUwxOC42ODg5IDkuNjkwNTdMMTEuOTk5NSAxNi4zOEw1LjMxMDA2IDkuNjkwNTdaIiBmaWxsPSIjMDA1MkQ5Ii8+Cjwvc3ZnPgo=);
58
+ }
59
+
60
+ /* 日历展开模式 */
61
+ .weda-ui-custom-calendar {
62
+ display: flex;
63
+ flex-direction: column;
64
+ }
65
+
66
+ .weda-ui-custom-calendar__weeks {
67
+ display: flex;
68
+ color: rgba(0, 0, 0, 0.4);
69
+ padding: 0 1.42857rem;
70
+ width: 100%;
71
+ box-sizing: border-box;
72
+ justify-content: space-between;
73
+ }
74
+
75
+ .weda-ui-custom-calendar__weeks-item {
76
+ /* flex: 1; */
77
+ line-height: 2.14286rem;
78
+ min-width: 2.85714rem;
79
+ display: flex;
80
+ justify-content: center;
81
+ }
82
+
83
+ .weda-ui-custom-calendar__days-row {
84
+ display: flex;
85
+ color: rgba(0, 0, 0, 0.9);
86
+ padding: 0 1.42857rem;
87
+ width: 100%;
88
+ box-sizing: border-box;
89
+ flex-wrap: wrap;
90
+ justify-content: space-between;
91
+ }
92
+
93
+ .weda-ui-custom-calendar__days-item {
94
+ /* flex: 1; */
95
+ min-width: 2.85714rem;
96
+ height: 2.85714rem;
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ border-radius: 50%;
101
+ }
102
+
103
+ .weda-ui-custom-calendar__days-item:hover {
104
+ background-color: #f3f3f3;
105
+ }
106
+
107
+ .weda-ui-custom-calendar__days-item.is-current {
108
+ background-color: #0052d9;
109
+ color: #fff;
110
+ }
111
+
112
+ .weda-ui-custom-calendar__days-item.no-select {
113
+ color: #c1c1c1;
114
+ }