@cloudbase/weda-ui 0.2.6-alhpa.0 → 0.2.9

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 (379) hide show
  1. package/CHANGELOG.md +240 -0
  2. package/package.json +5 -5
  3. package/src/configs/components/container.json +2 -1
  4. package/src/configs/components/form/input.json +6 -0
  5. package/src/configs/components/form/richText.json +2 -1
  6. package/src/configs/components/form/uploader.json +9 -4
  7. package/src/configs/components/image.json +2 -1
  8. package/src/configs/components/link.json +2 -1
  9. package/src/configs/components/richtextview.json +2 -1
  10. package/src/configs/components/scrollVeiw.json +2 -1
  11. package/src/configs/components/swiper.json +2 -1
  12. package/src/configs/components/tabs.json +31 -86
  13. package/src/configs/components/text.json +2 -1
  14. package/src/configs/index.js +3 -7
  15. package/src/index.js +2 -3
  16. package/src/mp/.gitignore +10 -0
  17. package/src/mp/components/form/input/index.js +5 -1
  18. package/src/mp/components/form/input/index.wxml +2 -1
  19. package/src/mp/components/form/select/index.js +2 -2
  20. package/src/mp/components/form/textarea/index.wxml +1 -0
  21. package/src/mp/components/form/uploader/index.js +48 -14
  22. package/src/mp/components/form/uploader/index.wxml +9 -2
  23. package/src/mp/components/image/index.js +57 -8
  24. package/src/mp/components/image/index.json +4 -1
  25. package/src/mp/components/image/index.wxml +4 -2
  26. package/src/mp/components/image/index.wxss +14 -0
  27. package/src/mp/components/richText/index.wxml +3 -1
  28. package/src/mp/components/tabs/index.js +22 -6
  29. package/src/mp/utils/deepEqual.js +42 -0
  30. package/src/web/actions/index.js +2 -4
  31. package/src/web/components/form/checkbox/index.jsx +8 -10
  32. package/src/web/components/form/enumSelect/MultipleSelect.jsx +12 -23
  33. package/src/web/components/form/enumSelect/NormalSelect.jsx +12 -12
  34. package/src/web/components/form/enumSelect/SelectContainer.jsx +43 -0
  35. package/src/web/components/form/enumSelect/hooks/index.js +7 -4
  36. package/src/web/components/form/enumSelect/props/propsTypes.js +7 -0
  37. package/src/web/components/form/formcell/index.jsx +1 -1
  38. package/src/web/components/form/input/index.jsx +16 -18
  39. package/src/web/components/form/radio/index.jsx +7 -7
  40. package/src/web/components/form/select/h5.jsx +1 -1
  41. package/src/web/components/form/select/region/{cities.json → cities.js} +2 -2
  42. package/src/web/components/form/select/region/index.js +3 -3
  43. package/src/web/components/form/select/region/{provinces.json → provinces.js} +2 -2
  44. package/src/web/components/form/select/region/{regions.json → regions.js} +2 -2
  45. package/src/web/components/form/switch/index.jsx +4 -9
  46. package/src/web/components/form/textarea/index.jsx +4 -12
  47. package/src/web/components/form/uploader/index.css +15 -0
  48. package/src/web/components/form/uploader/index.jsx +2 -2
  49. package/src/web/components/form/uploader/uploader.h5.jsx +237 -0
  50. package/src/web/components/form/uploader/{uploaderPc.jsx → uploader.pc.jsx} +69 -56
  51. package/src/web/components/image/image.jsx +79 -5
  52. package/src/web/components/image/index.css +17 -0
  53. package/src/web/components/image/index.jsx +1 -0
  54. package/src/web/components/index.js +27 -62
  55. package/src/web/components/richTextView/index.css +0 -10
  56. package/src/web/components/richTextView/index.jsx +1 -12
  57. package/src/web/components/tabs/{index.js → index.jsx} +3 -3
  58. package/src/web/components/tabs/{tabsH5.js → tabs.h5.jsx} +9 -47
  59. package/src/web/components/tabs/{tabsPc.js → tabs.pc.jsx} +13 -47
  60. package/src/web/components/uploaderView/index.jsx +1 -1
  61. package/src/web/index.js +2 -3
  62. package/src/web/utils/isObjectEqual.js +10 -1
  63. package/src/web/utils/useSyncValue.js +14 -0
  64. package/src/web/weda-ui.css +8 -0
  65. package/src/configs/components/form/enumSelect.json +0 -127
  66. package/src/configs/components/form/mapPosition.json +0 -33
  67. package/src/configs/components/markdown.json +0 -17
  68. package/src/mp/components/markdown/index.js +0 -27
  69. package/src/mp/components/markdown/index.json +0 -6
  70. package/src/mp/components/markdown/index.wxml +0 -1
  71. package/src/mp/components/markdown/towxml/audio-player/Audio.js +0 -99
  72. package/src/mp/components/markdown/towxml/audio-player/audio-player.js +0 -102
  73. package/src/mp/components/markdown/towxml/audio-player/audio-player.json +0 -5
  74. package/src/mp/components/markdown/towxml/audio-player/audio-player.wxml +0 -14
  75. package/src/mp/components/markdown/towxml/audio-player/audio-player.wxss +0 -175
  76. package/src/mp/components/markdown/towxml/audio-player/loading.svg +0 -1
  77. package/src/mp/components/markdown/towxml/config.js +0 -285
  78. package/src/mp/components/markdown/towxml/decode.js +0 -26
  79. package/src/mp/components/markdown/towxml/decode.json +0 -12
  80. package/src/mp/components/markdown/towxml/decode.wxml +0 -1
  81. package/src/mp/components/markdown/towxml/decode.wxss +0 -0
  82. package/src/mp/components/markdown/towxml/img/img.js +0 -98
  83. package/src/mp/components/markdown/towxml/img/img.json +0 -3
  84. package/src/mp/components/markdown/towxml/img/img.wxml +0 -1
  85. package/src/mp/components/markdown/towxml/img/img.wxss +0 -0
  86. package/src/mp/components/markdown/towxml/index.js +0 -19
  87. package/src/mp/components/markdown/towxml/latex/latex.js +0 -53
  88. package/src/mp/components/markdown/towxml/latex/latex.json +0 -5
  89. package/src/mp/components/markdown/towxml/latex/latex.wxml +0 -1
  90. package/src/mp/components/markdown/towxml/latex/latex.wxss +0 -0
  91. package/src/mp/components/markdown/towxml/parse/highlight/highlight.js +0 -729
  92. package/src/mp/components/markdown/towxml/parse/highlight/index.js +0 -7
  93. package/src/mp/components/markdown/towxml/parse/highlight/languages/bash.js +0 -91
  94. package/src/mp/components/markdown/towxml/parse/highlight/languages/c-like.js +0 -244
  95. package/src/mp/components/markdown/towxml/parse/highlight/languages/c.js +0 -20
  96. package/src/mp/components/markdown/towxml/parse/highlight/languages/css.js +0 -138
  97. package/src/mp/components/markdown/towxml/parse/highlight/languages/dart.js +0 -135
  98. package/src/mp/components/markdown/towxml/parse/highlight/languages/go.js +0 -57
  99. package/src/mp/components/markdown/towxml/parse/highlight/languages/htmlbars.js +0 -79
  100. package/src/mp/components/markdown/towxml/parse/highlight/languages/java.js +0 -126
  101. package/src/mp/components/markdown/towxml/parse/highlight/languages/javascript.js +0 -263
  102. package/src/mp/components/markdown/towxml/parse/highlight/languages/json.js +0 -51
  103. package/src/mp/components/markdown/towxml/parse/highlight/languages/less.js +0 -177
  104. package/src/mp/components/markdown/towxml/parse/highlight/languages/nginx.js +0 -103
  105. package/src/mp/components/markdown/towxml/parse/highlight/languages/php.js +0 -152
  106. package/src/mp/components/markdown/towxml/parse/highlight/languages/python-repl.js +0 -27
  107. package/src/mp/components/markdown/towxml/parse/highlight/languages/python.js +0 -146
  108. package/src/mp/components/markdown/towxml/parse/highlight/languages/scss.js +0 -137
  109. package/src/mp/components/markdown/towxml/parse/highlight/languages/shell.js +0 -23
  110. package/src/mp/components/markdown/towxml/parse/highlight/languages/typescript.js +0 -198
  111. package/src/mp/components/markdown/towxml/parse/highlight/languages/xml.js +0 -143
  112. package/src/mp/components/markdown/towxml/parse/highlight/style/github.wxss +0 -99
  113. package/src/mp/components/markdown/towxml/parse/highlight/style/monokai.wxss +0 -70
  114. package/src/mp/components/markdown/towxml/parse/index.js +0 -106
  115. package/src/mp/components/markdown/towxml/parse/markdown/index.js +0 -53
  116. package/src/mp/components/markdown/towxml/parse/markdown/markdown.js +0 -5834
  117. package/src/mp/components/markdown/towxml/parse/markdown/plugins/emoji.js +0 -1773
  118. package/src/mp/components/markdown/towxml/parse/markdown/plugins/ins.js +0 -120
  119. package/src/mp/components/markdown/towxml/parse/markdown/plugins/latex.js +0 -193
  120. package/src/mp/components/markdown/towxml/parse/markdown/plugins/mark.js +0 -120
  121. package/src/mp/components/markdown/towxml/parse/markdown/plugins/sub.js +0 -95
  122. package/src/mp/components/markdown/towxml/parse/markdown/plugins/sup.js +0 -95
  123. package/src/mp/components/markdown/towxml/parse/markdown/plugins/todo.js +0 -220
  124. package/src/mp/components/markdown/towxml/parse/markdown/plugins/yuml.js +0 -18
  125. package/src/mp/components/markdown/towxml/parse/parse2/Parser.js +0 -263
  126. package/src/mp/components/markdown/towxml/parse/parse2/Tokenizer.js +0 -507
  127. package/src/mp/components/markdown/towxml/parse/parse2/domhandler/index.js +0 -104
  128. package/src/mp/components/markdown/towxml/parse/parse2/domhandler/node.js +0 -169
  129. package/src/mp/components/markdown/towxml/parse/parse2/entities/decode.js +0 -54
  130. package/src/mp/components/markdown/towxml/parse/parse2/entities/decode_codepoint.js +0 -19
  131. package/src/mp/components/markdown/towxml/parse/parse2/entities/encode.js +0 -54
  132. package/src/mp/components/markdown/towxml/parse/parse2/entities/index.js +0 -30
  133. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/decode.js +0 -31
  134. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/entities.js +0 -2128
  135. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/legacy.js +0 -109
  136. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/xml.js +0 -2
  137. package/src/mp/components/markdown/towxml/parse/parse2/index.js +0 -8
  138. package/src/mp/components/markdown/towxml/style/main.wxss +0 -378
  139. package/src/mp/components/markdown/towxml/style/theme/dark.wxss +0 -73
  140. package/src/mp/components/markdown/towxml/style/theme/light.wxss +0 -63
  141. package/src/mp/components/markdown/towxml/table/table.js +0 -11
  142. package/src/mp/components/markdown/towxml/table/table.json +0 -6
  143. package/src/mp/components/markdown/towxml/table/table.wxml +0 -24
  144. package/src/mp/components/markdown/towxml/table/table.wxss +0 -0
  145. package/src/mp/components/markdown/towxml/todogroup/todogroup.js +0 -19
  146. package/src/mp/components/markdown/towxml/todogroup/todogroup.json +0 -6
  147. package/src/mp/components/markdown/towxml/todogroup/todogroup.wxml +0 -13
  148. package/src/mp/components/markdown/towxml/todogroup/todogroup.wxss +0 -3
  149. package/src/mp/components/markdown/towxml/towxml.js +0 -17
  150. package/src/mp/components/markdown/towxml/towxml.json +0 -6
  151. package/src/mp/components/markdown/towxml/towxml.wxml +0 -5
  152. package/src/mp/components/markdown/towxml/towxml.wxss +0 -8
  153. package/src/mp/components/markdown/towxml/yuml/yuml.js +0 -51
  154. package/src/mp/components/markdown/towxml/yuml/yuml.json +0 -5
  155. package/src/mp/components/markdown/towxml/yuml/yuml.wxml +0 -5
  156. package/src/mp/components/markdown/towxml/yuml/yuml.wxss +0 -0
  157. package/src/web/components/form/enumSelect/FormContainer.jsx +0 -41
  158. package/src/web/components/form/position/MapView.jsx +0 -124
  159. package/src/web/components/form/position/SelectModal.css +0 -3
  160. package/src/web/components/form/position/SelectModal.jsx +0 -112
  161. package/src/web/components/form/position/constants.js +0 -7
  162. package/src/web/components/form/position/index.jsx +0 -68
  163. package/src/web/components/form/uploader/uploaderH5.jsx +0 -196
  164. package/src/web/components/link/test/__snapshots__/storybook.test.js.snap +0 -754
  165. package/src/web/components/markdown/index.jsx +0 -40
  166. package/src/web/wedatheme/.code.yml +0 -16
  167. package/src/web/wedatheme/.editorconfig +0 -9
  168. package/src/web/wedatheme/.eslintrc +0 -20
  169. package/src/web/wedatheme/.orange-ci.yml +0 -55
  170. package/src/web/wedatheme/.vscode/extensions.json +0 -3
  171. package/src/web/wedatheme/.vscode/settings.json +0 -11
  172. package/src/web/wedatheme/README.md +0 -50
  173. package/src/web/wedatheme/i18n/README.md +0 -4
  174. package/src/web/wedatheme/i18n/translation/index.js +0 -10
  175. package/src/web/wedatheme/i18n/translation/zh.js +0 -15
  176. package/src/web/wedatheme/jsconfig.json +0 -15
  177. package/src/web/wedatheme/mock/app.js +0 -42
  178. package/src/web/wedatheme/mock/history-context.js +0 -8
  179. package/src/web/wedatheme/mock/index.js +0 -3
  180. package/src/web/wedatheme/mock/layout/AppLayout.jsx +0 -28
  181. package/src/web/wedatheme/mock/layout/MenuWithRouter.jsx +0 -50
  182. package/src/web/wedatheme/mock/layout/index.js +0 -1
  183. package/src/web/wedatheme/package.json +0 -61
  184. package/src/web/wedatheme/public/index.html +0 -19
  185. package/src/web/wedatheme/src/app.js +0 -22
  186. package/src/web/wedatheme/src/components/README.md +0 -4
  187. package/src/web/wedatheme/src/configs/menu.js +0 -9
  188. package/src/web/wedatheme/src/routes/wedatheme-index/Component.jsx +0 -402
  189. package/src/web/wedatheme/src/routes/wedatheme-index/Form.jsx +0 -729
  190. package/src/web/wedatheme/src/routes/wedatheme-index/FormItem.jsx +0 -18
  191. package/src/web/wedatheme/src/routes/wedatheme-index/WedathemeIndex.jsx +0 -1276
  192. package/src/web/wedatheme/src/routes/wedatheme-index/index.js +0 -1
  193. package/src/web/wedatheme/src/routes/weui2td/WEUI2TD.jsx +0 -3
  194. package/src/web/wedatheme/src/routes/weui2td/index.js +0 -1
  195. package/src/web/wedatheme/src/styles/_btn.scss +0 -24
  196. package/src/web/wedatheme/src/styles/_icon.scss +0 -653
  197. package/src/web/wedatheme/src/styles/_map.scss +0 -12
  198. package/src/web/wedatheme/src/styles/_middle.scss +0 -340
  199. package/src/web/wedatheme/src/styles/_upload.scss +0 -47
  200. package/src/web/wedatheme/src/styles/assets/alert-close.svg +0 -3
  201. package/src/web/wedatheme/src/styles/assets/and.svg +0 -12
  202. package/src/web/wedatheme/src/styles/assets/arrowdown--line.svg +0 -12
  203. package/src/web/wedatheme/src/styles/assets/arrowdown.svg +0 -12
  204. package/src/web/wedatheme/src/styles/assets/arrowleft--line.svg +0 -12
  205. package/src/web/wedatheme/src/styles/assets/arrowleft.svg +0 -12
  206. package/src/web/wedatheme/src/styles/assets/arrowright--line.svg +0 -12
  207. package/src/web/wedatheme/src/styles/assets/arrowright-blue--line.svg +0 -12
  208. package/src/web/wedatheme/src/styles/assets/arrowright.svg +0 -12
  209. package/src/web/wedatheme/src/styles/assets/arrowup--line.svg +0 -12
  210. package/src/web/wedatheme/src/styles/assets/arrowup.svg +0 -12
  211. package/src/web/wedatheme/src/styles/assets/bell-warning.svg +0 -3
  212. package/src/web/wedatheme/src/styles/assets/btnback.svg +0 -12
  213. package/src/web/wedatheme/src/styles/assets/calendar.svg +0 -12
  214. package/src/web/wedatheme/src/styles/assets/chartcolumn-1.svg +0 -12
  215. package/src/web/wedatheme/src/styles/assets/chartcolumn.svg +0 -12
  216. package/src/web/wedatheme/src/styles/assets/chartline-1.svg +0 -9
  217. package/src/web/wedatheme/src/styles/assets/chartline.svg +0 -9
  218. package/src/web/wedatheme/src/styles/assets/chartpie-1.svg +0 -12
  219. package/src/web/wedatheme/src/styles/assets/chartpie.svg +0 -12
  220. package/src/web/wedatheme/src/styles/assets/check-1.svg +0 -8
  221. package/src/web/wedatheme/src/styles/assets/check-2.svg +0 -1
  222. package/src/web/wedatheme/src/styles/assets/check.svg +0 -8
  223. package/src/web/wedatheme/src/styles/assets/close-1.svg +0 -8
  224. package/src/web/wedatheme/src/styles/assets/close.svg +0 -8
  225. package/src/web/wedatheme/src/styles/assets/consult.svg +0 -8
  226. package/src/web/wedatheme/src/styles/assets/convertip--blue.svg +0 -12
  227. package/src/web/wedatheme/src/styles/assets/convertip.svg +0 -12
  228. package/src/web/wedatheme/src/styles/assets/copy.svg +0 -12
  229. package/src/web/wedatheme/src/styles/assets/cur-active.svg +0 -12
  230. package/src/web/wedatheme/src/styles/assets/cur.svg +0 -12
  231. package/src/web/wedatheme/src/styles/assets/daily.svg +0 -13
  232. package/src/web/wedatheme/src/styles/assets/database.svg +0 -12
  233. package/src/web/wedatheme/src/styles/assets/datasheet.svg +0 -12
  234. package/src/web/wedatheme/src/styles/assets/delete-white.svg +0 -8
  235. package/src/web/wedatheme/src/styles/assets/delete.svg +0 -8
  236. package/src/web/wedatheme/src/styles/assets/detail.svg +0 -13
  237. package/src/web/wedatheme/src/styles/assets/dismiss.svg +0 -8
  238. package/src/web/wedatheme/src/styles/assets/download.svg +0 -12
  239. package/src/web/wedatheme/src/styles/assets/drop.svg +0 -15
  240. package/src/web/wedatheme/src/styles/assets/email-error.svg +0 -14
  241. package/src/web/wedatheme/src/styles/assets/email-warning.svg +0 -12
  242. package/src/web/wedatheme/src/styles/assets/email.svg +0 -14
  243. package/src/web/wedatheme/src/styles/assets/emailv.svg +0 -12
  244. package/src/web/wedatheme/src/styles/assets/error-1.svg +0 -8
  245. package/src/web/wedatheme/src/styles/assets/error-filled.svg +0 -3
  246. package/src/web/wedatheme/src/styles/assets/error.svg +0 -8
  247. package/src/web/wedatheme/src/styles/assets/externallink.svg +0 -12
  248. package/src/web/wedatheme/src/styles/assets/favorable.svg +0 -9
  249. package/src/web/wedatheme/src/styles/assets/filter.svg +0 -12
  250. package/src/web/wedatheme/src/styles/assets/firstpage.svg +0 -13
  251. package/src/web/wedatheme/src/styles/assets/folderclose.svg +0 -8
  252. package/src/web/wedatheme/src/styles/assets/folderopen.svg +0 -8
  253. package/src/web/wedatheme/src/styles/assets/fullscreenquit.svg +0 -12
  254. package/src/web/wedatheme/src/styles/assets/fullsreen.svg +0 -12
  255. package/src/web/wedatheme/src/styles/assets/globe-gray.svg +0 -12
  256. package/src/web/wedatheme/src/styles/assets/guide.svg +0 -9
  257. package/src/web/wedatheme/src/styles/assets/help.svg +0 -8
  258. package/src/web/wedatheme/src/styles/assets/hide.svg +0 -8
  259. package/src/web/wedatheme/src/styles/assets/info.svg +0 -8
  260. package/src/web/wedatheme/src/styles/assets/infoblue-1.svg +0 -8
  261. package/src/web/wedatheme/src/styles/assets/infoblue-filled.svg +0 -3
  262. package/src/web/wedatheme/src/styles/assets/infoblue.svg +0 -8
  263. package/src/web/wedatheme/src/styles/assets/jump-black.svg +0 -12
  264. package/src/web/wedatheme/src/styles/assets/jump.svg +0 -12
  265. package/src/web/wedatheme/src/styles/assets/lastpage.svg +0 -13
  266. package/src/web/wedatheme/src/styles/assets/loading.svg +0 -12
  267. package/src/web/wedatheme/src/styles/assets/local.svg +0 -10
  268. package/src/web/wedatheme/src/styles/assets/menu-fold-white.svg +0 -6
  269. package/src/web/wedatheme/src/styles/assets/menu-fold.svg +0 -6
  270. package/src/web/wedatheme/src/styles/assets/minus.svg +0 -12
  271. package/src/web/wedatheme/src/styles/assets/monitor.svg +0 -12
  272. package/src/web/wedatheme/src/styles/assets/more.svg +0 -8
  273. package/src/web/wedatheme/src/styles/assets/multi-line.svg +0 -12
  274. package/src/web/wedatheme/src/styles/assets/news.svg +0 -3
  275. package/src/web/wedatheme/src/styles/assets/not.svg +0 -12
  276. package/src/web/wedatheme/src/styles/assets/notice.svg +0 -8
  277. package/src/web/wedatheme/src/styles/assets/pencil.svg +0 -12
  278. package/src/web/wedatheme/src/styles/assets/pending-1.svg +0 -8
  279. package/src/web/wedatheme/src/styles/assets/pending-gray.svg +0 -8
  280. package/src/web/wedatheme/src/styles/assets/pending.svg +0 -8
  281. package/src/web/wedatheme/src/styles/assets/percent-blue.svg +0 -16
  282. package/src/web/wedatheme/src/styles/assets/percent.svg +0 -16
  283. package/src/web/wedatheme/src/styles/assets/phone-error.svg +0 -11
  284. package/src/web/wedatheme/src/styles/assets/phone-warning.svg +0 -9
  285. package/src/web/wedatheme/src/styles/assets/phone.svg +0 -12
  286. package/src/web/wedatheme/src/styles/assets/phonev.svg +0 -9
  287. package/src/web/wedatheme/src/styles/assets/plus.svg +0 -12
  288. package/src/web/wedatheme/src/styles/assets/qq.svg +0 -11
  289. package/src/web/wedatheme/src/styles/assets/realname.svg +0 -8
  290. package/src/web/wedatheme/src/styles/assets/realnamev.svg +0 -9
  291. package/src/web/wedatheme/src/styles/assets/refresh-blue.svg +0 -12
  292. package/src/web/wedatheme/src/styles/assets/refresh.svg +0 -12
  293. package/src/web/wedatheme/src/styles/assets/relationship-1.svg +0 -12
  294. package/src/web/wedatheme/src/styles/assets/relationship.svg +0 -12
  295. package/src/web/wedatheme/src/styles/assets/remind.svg +0 -8
  296. package/src/web/wedatheme/src/styles/assets/search.svg +0 -8
  297. package/src/web/wedatheme/src/styles/assets/setting.svg +0 -12
  298. package/src/web/wedatheme/src/styles/assets/shopcart.svg +0 -8
  299. package/src/web/wedatheme/src/styles/assets/show.svg +0 -8
  300. package/src/web/wedatheme/src/styles/assets/sort.svg +0 -12
  301. package/src/web/wedatheme/src/styles/assets/sortdown.svg +0 -12
  302. package/src/web/wedatheme/src/styles/assets/sortup.svg +0 -12
  303. package/src/web/wedatheme/src/styles/assets/success-1.svg +0 -8
  304. package/src/web/wedatheme/src/styles/assets/success-filled.svg +0 -3
  305. package/src/web/wedatheme/src/styles/assets/success.svg +0 -8
  306. package/src/web/wedatheme/src/styles/assets/table-1.svg +0 -12
  307. package/src/web/wedatheme/src/styles/assets/table.svg +0 -12
  308. package/src/web/wedatheme/src/styles/assets/tag.svg +0 -12
  309. package/src/web/wedatheme/src/styles/assets/time.svg +0 -12
  310. package/src/web/wedatheme/src/styles/assets/transfer.svg +0 -8
  311. package/src/web/wedatheme/src/styles/assets/trenddown.svg +0 -12
  312. package/src/web/wedatheme/src/styles/assets/trendup.svg +0 -12
  313. package/src/web/wedatheme/src/styles/assets/viewgrid.svg +0 -12
  314. package/src/web/wedatheme/src/styles/assets/viewlist.svg +0 -12
  315. package/src/web/wedatheme/src/styles/assets/warning-1.svg +0 -8
  316. package/src/web/wedatheme/src/styles/assets/warning-filled.svg +0 -3
  317. package/src/web/wedatheme/src/styles/assets/warning.svg +0 -8
  318. package/src/web/wedatheme/src/styles/assets/wechat-error.svg +0 -14
  319. package/src/web/wedatheme/src/styles/assets/wechat-warning.svg +0 -12
  320. package/src/web/wedatheme/src/styles/assets/wechat.svg +0 -12
  321. package/src/web/wedatheme/src/styles/assets/wechatv.svg +0 -12
  322. package/src/web/wedatheme/src/styles/assets/zoom-in-white.svg +0 -4
  323. package/src/web/wedatheme/src/styles/assets/zoom-in.svg +0 -4
  324. package/src/web/wedatheme/src/styles/assets/zoom-out-white.svg +0 -4
  325. package/src/web/wedatheme/src/styles/assets/zoom-out.svg +0 -4
  326. package/src/web/wedatheme/src/styles/index.scss +0 -18
  327. package/src/web/wedatheme/src/styles/main.css +0 -166
  328. package/src/web/wedatheme/src/styles/theme/_alert.scss +0 -73
  329. package/src/web/wedatheme/src/styles/theme/_badge.scss +0 -38
  330. package/src/web/wedatheme/src/styles/theme/_blank-page-v2.scss +0 -7
  331. package/src/web/wedatheme/src/styles/theme/_breadcrumb.scss +0 -8
  332. package/src/web/wedatheme/src/styles/theme/_bubble.scss +0 -24
  333. package/src/web/wedatheme/src/styles/theme/_button.scss +0 -212
  334. package/src/web/wedatheme/src/styles/theme/_card.scss +0 -12
  335. package/src/web/wedatheme/src/styles/theme/_cascader.scss +0 -43
  336. package/src/web/wedatheme/src/styles/theme/_checkbox&radio.scss +0 -83
  337. package/src/web/wedatheme/src/styles/theme/_datepicker.scss +0 -36
  338. package/src/web/wedatheme/src/styles/theme/_dialog.scss +0 -39
  339. package/src/web/wedatheme/src/styles/theme/_divider.scss +0 -1
  340. package/src/web/wedatheme/src/styles/theme/_drawer.scss +0 -15
  341. package/src/web/wedatheme/src/styles/theme/_dropdown.scss +0 -53
  342. package/src/web/wedatheme/src/styles/theme/_form.scss +0 -38
  343. package/src/web/wedatheme/src/styles/theme/_icon.scss +0 -0
  344. package/src/web/wedatheme/src/styles/theme/_input&textarea&select.scss +0 -85
  345. package/src/web/wedatheme/src/styles/theme/_inputnumber.scss +0 -16
  346. package/src/web/wedatheme/src/styles/theme/_link.scss +0 -14
  347. package/src/web/wedatheme/src/styles/theme/_list.scss +0 -41
  348. package/src/web/wedatheme/src/styles/theme/_metrics-board.scss +0 -14
  349. package/src/web/wedatheme/src/styles/theme/_notification.scss +0 -27
  350. package/src/web/wedatheme/src/styles/theme/_pagination.scss +0 -22
  351. package/src/web/wedatheme/src/styles/theme/_popconfirm.scss +0 -4
  352. package/src/web/wedatheme/src/styles/theme/_progress.scss +0 -28
  353. package/src/web/wedatheme/src/styles/theme/_region-select.scss +0 -17
  354. package/src/web/wedatheme/src/styles/theme/_search.scss +0 -18
  355. package/src/web/wedatheme/src/styles/theme/_segment.scss +0 -69
  356. package/src/web/wedatheme/src/styles/theme/_slider.scss +0 -18
  357. package/src/web/wedatheme/src/styles/theme/_status.scss +0 -4
  358. package/src/web/wedatheme/src/styles/theme/_steps.scss +0 -68
  359. package/src/web/wedatheme/src/styles/theme/_switch.scss +0 -11
  360. package/src/web/wedatheme/src/styles/theme/_table.scss +0 -44
  361. package/src/web/wedatheme/src/styles/theme/_tabs.scss +0 -44
  362. package/src/web/wedatheme/src/styles/theme/_tag-search.scss +0 -9
  363. package/src/web/wedatheme/src/styles/theme/_tag.scss +0 -48
  364. package/src/web/wedatheme/src/styles/theme/_timeline.scss +0 -0
  365. package/src/web/wedatheme/src/styles/theme/_toast.scss +0 -3
  366. package/src/web/wedatheme/src/styles/theme/_transfer.scss +0 -9
  367. package/src/web/wedatheme/src/styles/theme/_tree.scss +0 -11
  368. package/src/web/wedatheme/src/styles/theme/_upload.scss +0 -14
  369. package/src/web/wedatheme/src/styles/theme/_variables.scss +0 -140
  370. package/src/web/wedatheme/src/styles/theme/index.scss +0 -91
  371. package/src/web/wedatheme/style-package/README.md +0 -31
  372. package/src/web/wedatheme/style-package/ef6fa527e24e354765d806b826b41391.svg +0 -627
  373. package/src/web/wedatheme/style-package/index.css +0 -3
  374. package/src/web/wedatheme/style-package/package.json +0 -15
  375. package/src/web/wedatheme/tea.config.js +0 -66
  376. package/src/web/wedatheme/webpack/css.config.js +0 -114
  377. package/src/web/wedatheme/webpack/plugins/css-package-plugin.js +0 -23
  378. package/src/web/wedatheme/webpack/plugins/inject-assets-plugin.js +0 -32
  379. package/src/web/wedatheme/webpack/plugins/package-json-plugin.js +0 -66
@@ -2,73 +2,38 @@ import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
3
  import { Tabs as TeaTabs, TabPanel, ConfigProvider } from 'tea-component';
4
4
  import classNames from '../../utils/classnames';
5
+ import { useSyncValue } from '../../utils/useSyncValue';
5
6
 
6
7
 
7
8
  export default function TabsPc({
8
9
  tabs,
10
+ selectedIndex,
9
11
  events,
10
12
  className,
11
- panel1,
12
- panel2,
13
- panel3,
14
- panel4,
15
- panel5,
16
- panel6,
17
- panel7,
18
- panel8,
19
- panel9,
20
- panel10,
21
- panel11,
22
- panel12,
23
- panel13,
24
- panel14,
25
- panel15,
26
- panel16,
27
- panel17,
28
- panel18,
29
- panel19,
30
- panel20,
31
- style
13
+ style,
14
+ ...restProps
32
15
  }) {
33
16
 
34
- const cachePanel = {
35
- panel1,
36
- panel2,
37
- panel3,
38
- panel4,
39
- panel5,
40
- panel6,
41
- panel7,
42
- panel8,
43
- panel9,
44
- panel10,
45
- panel11,
46
- panel12,
47
- panel13,
48
- panel14,
49
- panel15,
50
- panel16,
51
- panel17,
52
- panel18,
53
- panel19,
54
- panel20
55
- };
56
-
17
+ const [activeIndex, setActiveIndex] = useSyncValue(selectedIndex);
57
18
  const _tabs = Array.isArray(tabs) && tabs.length && tabs.map((item, index) => {
58
19
  return {
59
- id: item.name ?? index,
20
+ id: index,
60
21
  label: item.title
61
22
  };
62
23
  });
63
24
 
64
25
 
65
26
 
27
+ // React.useEffect(() => {
28
+ // console.log('render');
29
+ // });
66
30
  const onActive = (e) => {
31
+ setActiveIndex(e.id);
67
32
  events && events.change(e);
68
33
  };
69
34
  return (
70
35
  <ConfigProvider classPrefix="wedatea2td">
71
- <TeaTabs style={style} tabs={_tabs} onActive={onActive} className={classNames(
36
+ <TeaTabs style={style} tabs={_tabs} activeId={activeIndex} onActive={onActive} className={classNames(
72
37
  "weda-tabs_pc",
73
38
  {
74
39
  [className]: className
@@ -81,7 +46,7 @@ export default function TabsPc({
81
46
  id={item.id}
82
47
  label={item.label}
83
48
  >
84
- {cachePanel[`panel${index + 1}`]}
49
+ {restProps[`panel${index + 1}`]}
85
50
  </TabPanel>
86
51
  )
87
52
  )}
@@ -93,6 +58,7 @@ export default function TabsPc({
93
58
  TabsPc.propTypes = {
94
59
  tabs: PropTypes.array,
95
60
  className: PropTypes.string,
61
+ selectedIndex: PropTypes.number,
96
62
  style: PropTypes.object,
97
63
  events: PropTypes.objectOf(PropTypes.func),
98
64
  panel1: PropTypes.node,
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
- import { TcbImage } from '../form/uploader/uploaderPc';
3
+ import { TcbImage } from '../form/uploader/uploader.pc';
4
4
  import classNames from '../../utils/classnames';
5
5
  import './index.css';
6
6
 
package/src/web/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import components from './components';
2
-
3
- import actions from './actions';
1
+ import * as components from './components';
2
+ import * as actions from './actions';
4
3
 
5
4
  export default { components, actions };
@@ -1,5 +1,14 @@
1
1
  import isEqual from 'lodash.isequal';
2
2
 
3
- export default function (a, b) {
3
+ export function serde(a) {
4
+ return JSON.parse(JSON.stringify(a));
5
+ }
6
+
7
+ const isObj = (a) => typeof a === 'object' && a !== null;
8
+
9
+ export default function (a, b, shouldSerde = false) {
10
+ if(shouldSerde && isObj(a) && isObj(b)) { // for Proxy created by mbox
11
+ return isEqual(serde(a), serde(b));
12
+ }
4
13
  return isEqual(a, b);
5
14
  }
@@ -0,0 +1,14 @@
1
+ import { useEffect, useState } from "react";
2
+ import { usePrevious } from "react-use";
3
+
4
+ export function useSyncValue(defaultValue, comparotor = Object.is) {
5
+ const [stateValue, setStateValue] = useState(defaultValue);
6
+ const prevValue = usePrevious(defaultValue);
7
+ useEffect(() => {
8
+ if (!comparotor(prevValue, defaultValue)) {
9
+ setStateValue(defaultValue);
10
+ }
11
+ }, [defaultValue]);
12
+ return [stateValue, setStateValue];
13
+ }
14
+
@@ -55,3 +55,11 @@ body .weda-ui {
55
55
  background-color: unset !important;
56
56
  }
57
57
  }
58
+
59
+ .weda-ui.weda-radio .weui-check,
60
+ .weda-ui.weda-checkbox .weui-check {
61
+ position: absolute;
62
+ left: -9999px;
63
+ width: 0;
64
+ height: 0;
65
+ }
@@ -1,127 +0,0 @@
1
- {
2
- "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
- "data": {
4
- "properties": {
5
- "label": {
6
- "type": "string",
7
- "default": "标题",
8
- "title": "标题"
9
- },
10
- "labelVisible": {
11
- "type": "boolean",
12
- "default": true,
13
- "title": "显示标题"
14
- },
15
- "requiredFlag": {
16
- "type": "boolean",
17
- "default": false,
18
- "title": "是否显示必填标记"
19
- },
20
- "layout": {
21
- "title": "布局方式",
22
- "type": "string",
23
- "default": "horizontal",
24
- "enum": [
25
- {
26
- "label": "水平",
27
- "value": "horizontal"
28
- },
29
- {
30
- "label": "垂直",
31
- "value": "vertical"
32
- }
33
- ]
34
- },
35
-
36
- "defaultValue": {
37
- "type": "string",
38
- "default": "",
39
- "title": "默认值"
40
- },
41
- "name": {
42
- "type": "string",
43
- "default": "",
44
- "title": "默认值"
45
- },
46
- "placeholder": {
47
- "type": "string",
48
- "default": "请选择",
49
- "title": "占位符"
50
- },
51
- "disabled": {
52
- "type": "boolean",
53
- "default": false,
54
- "title": "是否禁用"
55
- },
56
- "options": {
57
- "type": "array",
58
- "default": [{ "value": "123", "text": "eqwe" }],
59
- "title": "选项列表"
60
- },
61
- "clearable": {
62
- "type": "boolean",
63
- "default": false,
64
- "title": "是否支持清空"
65
- },
66
- "appearance": {
67
- "type": "array",
68
- "default": "button",
69
- "enum": [
70
- {
71
- "label": "无边框,适用于页面标题和表格内",
72
- "value": "default"
73
- },
74
- {
75
- "label": "为按钮风格,有边框,多用于操作栏中",
76
- "value": "button"
77
- }
78
- ]
79
- },
80
- "isMultipleEnum": {
81
- "type": "boolean",
82
- "default": false,
83
- "title": "是否为多选"
84
- },
85
- "allOption": {
86
- "type": "boolean",
87
- "default": false,
88
- "title": "表示全选的选项"
89
- },
90
- "boxSizeSync": {
91
- "type": "boolean",
92
- "default": true,
93
- "title": "弹出区域尺寸(宽度)是否同步按钮尺寸"
94
- },
95
- "type": {
96
- "type": "array",
97
- "default": "button",
98
- "enum": [
99
- {
100
- "label": "模拟下拉框",
101
- "value": "simulate"
102
- }
103
- ]
104
- },
105
- "searchable": {
106
- "type": "boolean",
107
- "default": true,
108
- "title": "支持搜索"
109
- }
110
- }
111
- },
112
- "meta": {
113
- "title": "模型选择框",
114
- "description": "模型选择框",
115
- "category": "表单"
116
- },
117
- "events": [
118
- {
119
- "name": "change",
120
- "title": "值改变"
121
- },
122
- {
123
- "name": "cancel",
124
- "title": "取消"
125
- }
126
- ]
127
- }
@@ -1,33 +0,0 @@
1
- {
2
- "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
- "data": {
4
- "properties": {
5
- "defaultValue": {
6
- "type": "string",
7
- "default": "",
8
- "title": "默认值"
9
- },
10
- "label": {
11
- "type": "string",
12
- "default": "标题",
13
- "title": "标题"
14
- },
15
- "labelVisible": {
16
- "type": "boolean",
17
- "default": true,
18
- "title": "显示标题"
19
- }
20
- }
21
- },
22
- "meta": {
23
- "title": "地理位置",
24
- "description": "地理位置",
25
- "category": "表单"
26
- },
27
- "events": [
28
- {
29
- "name": "change",
30
- "title": "值改变"
31
- }
32
- ]
33
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
- "data": {
4
- "properties": {
5
- "source": {
6
- "title": "markdown 内容",
7
- "type": "textarea",
8
- "default": "> 这是 `markdown` 文本"
9
- }
10
- }
11
- },
12
- "meta": {
13
- "title": "Markdown",
14
- "description": "markdown 预览",
15
- "category": "展示"
16
- }
17
- }
@@ -1,27 +0,0 @@
1
- const towxml = require('./towxml/index');
2
-
3
- Component({
4
- options: {
5
- virtualHost: true,
6
- },
7
- data: {
8
- nodes: {},
9
- },
10
- properties: {
11
- source: {
12
- type: String,
13
- value: '> 这是 `markdown` 文本',
14
- },
15
- },
16
- methods: {
17
- updateNodes() {
18
- const nodes = towxml(this.properties.source, 'markdown', {});
19
- this.setData({ nodes });
20
- },
21
- },
22
- observers: {
23
- source() {
24
- this.updateNodes();
25
- },
26
- },
27
- });
@@ -1,6 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "towxml": "./towxml/towxml"
5
- }
6
- }
@@ -1 +0,0 @@
1
- <towxml className="weda-ui" nodes="{{nodes}}"></towxml>
@@ -1,99 +0,0 @@
1
- const fillIn = (val) => `${val < 10 ? '0' : ''}${val}`;
2
- const formatTime = (_time) => {
3
- const time = Math.round(_time);
4
- const second = Math.round(time % 60);
5
- const minute = Math.floor((time / 60) % 60);
6
- const hour = Math.floor(time / 60 / 60);
7
- return `${fillIn(hour)}:${fillIn(minute)}:${fillIn(second)}`;
8
- };
9
-
10
- class Audio {
11
- constructor(obj) {
12
- const _ts = this;
13
- const option = (_ts.option = obj.attr);
14
-
15
- (_ts.loop = option.loop === 'true'), (_ts.autoplay = option.autoplay === 'true');
16
- _ts.create();
17
- _ts.index = 0;
18
- }
19
- create() {
20
- const _ts = this;
21
- const { option } = _ts;
22
- const audio = (_ts.audio = wx.createInnerAudioContext());
23
- audio.src = option.src;
24
-
25
- // 说明可以播放了
26
- audio.onCanplay(() => {
27
- if (_ts.autoplay && !_ts.index) {
28
- _ts.play();
29
- }
30
- if (!_ts.autoplay && !_ts.index) {
31
- _ts.eventCanplay();
32
- }
33
- });
34
-
35
- // 更新时间
36
- audio.onTimeUpdate(() => {
37
- // _ts.status = 'update';
38
- _ts.duration = audio.duration;
39
- _ts.currentTime = audio.currentTime;
40
-
41
- // 定义播放结束
42
- if (_ts.duration - _ts.currentTime < 0.5) {
43
- _ts.index++;
44
- if (_ts.loop) {
45
- audio.stop();
46
- } else {
47
- _ts.stop();
48
- }
49
- audio.seek(0);
50
- }
51
- _ts.eventTimeUpdate(formatTime(_ts.duration), formatTime(_ts.currentTime));
52
- });
53
-
54
- //
55
- audio.onSeeked(() => {
56
- if (_ts.loop) {
57
- _ts.play();
58
- }
59
- });
60
- }
61
- // 播放
62
- play() {
63
- const _ts = this;
64
- _ts.status = 'play';
65
- _ts.audio.play();
66
- _ts.eventPlay();
67
- }
68
- // 暂停
69
- pause() {
70
- const _ts = this;
71
- _ts.status = 'pause';
72
- _ts.audio.pause();
73
- _ts.eventPause();
74
- }
75
- // 停止
76
- stop() {
77
- const _ts = this;
78
- _ts.status = 'stop';
79
- _ts.audio.stop();
80
- _ts.eventStop();
81
- }
82
- // 销毁
83
- destroy() {
84
- const _ts = this;
85
- _ts.stop();
86
- _ts.audio.destroy();
87
- }
88
- eventCanplay() {}
89
- eventTimeUpdate() {}
90
- eventEnded() {}
91
- eventError() {}
92
- eventPause() {}
93
- eventPlay() {}
94
- eventSeeked() {}
95
- eventSeeking() {}
96
- eventStop() {}
97
- eventWaiting() {}
98
- }
99
- module.exports = Audio;
@@ -1,102 +0,0 @@
1
- const Audio = require('./Audio');
2
- Component({
3
- options: {
4
- styleIsolation: 'shared',
5
- },
6
- properties: {
7
- data: {
8
- type: Object,
9
- value: {},
10
- },
11
- },
12
- lifetimes: {
13
- // 页面生命周期
14
- attached() {
15
- const _ts = this;
16
- const audio = (_ts.audio = new Audio(this.data.data));
17
-
18
- audio.eventPlay = function () {
19
- _ts.setData({ tips: { state: 'h2w__audio--play', text: 'Playing' } });
20
- };
21
- audio.eventCanplay = function () {
22
- _ts.setData({ tips: { state: 'h2w__audio--readyed', text: 'Readyed' } });
23
- };
24
- audio.eventTimeUpdate = function (duration, currentTime) {
25
- _ts.setData({
26
- time: {
27
- currentTime,
28
- duration,
29
- schedule: `${(Math.round(_ts.audio.currentTime) / Math.round(_ts.audio.duration)) * 100}%`,
30
- },
31
- });
32
- };
33
- audio.eventPause = function () {
34
- _ts.setData({ tips: { state: 'h2w__audio--pause', text: 'Pause' } });
35
- };
36
- audio.eventStop = function () {
37
- _ts.setData({ tips: { state: 'h2w__audio--end', text: 'End' } });
38
- };
39
-
40
- // // 更新播放状态
41
- // _ts.audio.onTimeUpdate = function(duration,currentTime){
42
- // _ts.setData({
43
- // playerData:{
44
- // state:'h2w__audio--play',
45
- // tips:'Playing',
46
- // currentTime:currentTime,
47
- // duration:duration,
48
- // schedule:_ts.audio.currentTime / _ts.audio.duration * 100 + '%'
49
- // }
50
- // });
51
- // };
52
-
53
- // _ts.audio.onPause = function(){
54
- // _ts.setData({playerData:{state:'h2w__audio--pause',tips:'Pause'}});
55
- // };
56
-
57
- // _ts.audio.onCanplay = function(){
58
- // _ts.setData({playerData:{state:'h2w__audio--readyed',tips:'Readyed'}});
59
- // };
60
-
61
- // _ts.audio.onError = function(){
62
- // _ts.setData({playerData:{state:'h2w__audio--error',tips:'Error'}});
63
- // };
64
-
65
- // _ts.audio.onEnded = ()=>{
66
- // _ts.setData({playerData:{state:'h2w__audio--end',tips:'End'}});
67
- // };
68
- },
69
- moved() {
70
- _ts.audio.destroy();
71
- },
72
- detached: () => {},
73
- },
74
- data: {
75
- tips: {
76
- state: '',
77
- text: '--',
78
- },
79
- time: {
80
- currentTime: '00:00:00',
81
- duration: '00:00:00',
82
- schedule: '0%',
83
- },
84
- },
85
- methods: {
86
- playAndPause() {
87
- const _ts = this;
88
- const { audio } = _ts;
89
-
90
- // console.log(audio);
91
-
92
- audio.isTouch = true;
93
- if (audio.status === 'update' || audio.status === 'play') {
94
- // console.log('pause');
95
- audio.pause();
96
- } else {
97
- // console.log('play');
98
- audio.play();
99
- }
100
- },
101
- },
102
- });
@@ -1,5 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- }
5
- }
@@ -1,14 +0,0 @@
1
- <view class="h2w__audio {{tips.state || 'h2w__audio--loading'}}" bind:tap="playAndPause">
2
- <view class="h2w__audioIcon"></view>
3
- <view class="h2w__audioCover">
4
- <image class="h2w__audioLoading" src="loading.svg"></image>
5
- <image class="h2w__audioCoverImg" src="{{data.attr.poster}}"></image>
6
- </view>
7
- <view class="h2w__audioInfo">
8
- <view class="h2w__audioTips">{{tips.text || 'Error'}}</view>
9
- <view class="h2w__audioSchedule" style="width:{{time.schedule}};"></view>
10
- <view class="h2w__audioTitle">{{data.attr.name}}</view>
11
- <view class="h2w__audioAuthor">{{data.attr.author}}</view>
12
- <view class="h2w__audioTime">{{time.currentTime || '00:00:00'}} / {{time.duration || '00:00:00'}}</view>
13
- </view>
14
- </view>