@cloudbase/weda-ui 3.1.9 → 3.2.1
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.
- package/dist/configs/components/chart/bar.json +3 -3
- package/dist/configs/components/chart/line.json +3 -3
- package/dist/configs/components/chart/pie.json +3 -3
- package/dist/configs/components/form/departTreeSelect.json +124 -0
- package/dist/configs/components/form/userTreeSelect.json +128 -0
- package/dist/configs/components/formdetail.json +105 -0
- package/dist/configs/components/listView.json +9 -1
- package/dist/configs/components/lottery.json +1 -1
- package/dist/configs/components/tabs.json +10 -9
- package/dist/configs/components/wxOpenApi/share.json +5 -2
- package/dist/configs/index.d.ts +6 -0
- package/dist/configs/index.js +6 -0
- package/dist/cypress/support/commands.d.ts +1 -0
- package/dist/cypress/support/commands.js +40 -0
- package/dist/cypress/support/e2e.d.ts +24 -0
- package/dist/cypress/support/e2e.js +22 -0
- package/dist/src/configs/actions/showModal.json +48 -0
- package/dist/src/configs/actions/showToast.json +41 -0
- package/dist/src/configs/components/auth.json +16 -0
- package/dist/src/configs/components/button.json +239 -0
- package/dist/src/configs/components/calendar.json +81 -0
- package/dist/src/configs/components/carousel.json +292 -0
- package/dist/src/configs/components/chart/bar.json +954 -0
- package/dist/src/configs/components/chart/line.json +870 -0
- package/dist/src/configs/components/chart/pie.json +677 -0
- package/dist/src/configs/components/chart/statisticsCard.json +376 -0
- package/dist/src/configs/components/container.json +50 -0
- package/dist/src/configs/components/dataView.json +247 -0
- package/dist/src/configs/components/drawer.json +115 -0
- package/dist/src/configs/components/form/checkbox.json +179 -0
- package/dist/src/configs/components/form/departTreeSelect.json +124 -0
- package/dist/src/configs/components/form/form.json +73 -0
- package/dist/src/configs/components/form/input.json +154 -0
- package/dist/src/configs/components/form/location.json +216 -0
- package/dist/src/configs/components/form/radio.json +203 -0
- package/dist/src/configs/components/form/richText.json +133 -0
- package/dist/src/configs/components/form/select.json +449 -0
- package/dist/src/configs/components/form/switch.json +58 -0
- package/dist/src/configs/components/form/textarea.json +116 -0
- package/dist/src/configs/components/form/tips.json +34 -0
- package/dist/src/configs/components/form/uploader.json +171 -0
- package/dist/src/configs/components/form/uploaderFile.json +158 -0
- package/dist/src/configs/components/form/userTreeSelect.json +128 -0
- package/dist/src/configs/components/formdetail.json +105 -0
- package/dist/src/configs/components/graphicCard.json +413 -0
- package/dist/src/configs/components/image.json +187 -0
- package/dist/src/configs/components/link.json +79 -0
- package/dist/src/configs/components/listView.json +378 -0
- package/dist/src/configs/components/lottery.json +163 -0
- package/dist/src/configs/components/modal.json +72 -0
- package/dist/src/configs/components/navLayout.json +368 -0
- package/dist/src/configs/components/navigationBar.json +62 -0
- package/dist/src/configs/components/richtextview.json +26 -0
- package/dist/src/configs/components/scrollVeiw.json +253 -0
- package/dist/src/configs/components/slot.json +17 -0
- package/dist/src/configs/components/swiper.json +90 -0
- package/dist/src/configs/components/tabs.json +122 -0
- package/dist/src/configs/components/text.json +95 -0
- package/dist/src/configs/components/wedaVideo.json +89 -0
- package/dist/src/configs/components/wxOpenApi/phone.json +127 -0
- package/dist/src/configs/components/wxOpenApi/phoneCode.json +109 -0
- package/dist/src/configs/components/wxOpenApi/share.json +160 -0
- package/dist/src/configs/components/wxOpenApi/userInfo.json +156 -0
- package/dist/src/configs/index.d.ts +103 -0
- package/dist/src/configs/index.js +111 -0
- package/dist/src/docs/common/format.d.ts +13 -0
- package/dist/src/docs/common/format.js +122 -0
- package/dist/src/docs/common/tableView.d.ts +30 -0
- package/dist/src/docs/common/tableView.js +156 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +3 -0
- package/dist/src/setupTests.d.ts +2 -0
- package/dist/src/setupTests.js +19 -0
- package/dist/src/web/actions/index.d.ts +2 -0
- package/dist/src/web/actions/index.js +2 -0
- package/dist/src/web/actions/showModal/index.d.ts +4 -0
- package/dist/src/web/actions/showModal/index.js +67 -0
- package/dist/src/web/actions/showToast/index.d.ts +1 -0
- package/dist/src/web/actions/showToast/index.js +3 -0
- package/dist/src/web/components/button/index.d.ts +32 -0
- package/dist/src/web/components/button/index.js +48 -0
- package/dist/src/web/components/calendar/index.d.ts +19 -0
- package/dist/src/web/components/calendar/index.js +189 -0
- package/dist/src/web/components/calendar/util.d.ts +13 -0
- package/dist/src/web/components/calendar/util.js +74 -0
- package/dist/src/web/components/carousel/index.d.ts +41 -0
- package/dist/src/web/components/carousel/index.js +244 -0
- package/dist/src/web/components/chart/bar/index.d.ts +3 -0
- package/dist/src/web/components/chart/bar/index.js +41 -0
- package/dist/src/web/components/chart/bar/index.old.d.ts +40 -0
- package/dist/src/web/components/chart/bar/index.old.js +56 -0
- package/dist/src/web/components/chart/common/Chart.d.ts +9 -0
- package/dist/src/web/components/chart/common/Chart.js +23 -0
- package/dist/src/web/components/chart/common/chart-custom-connector.d.ts +6 -0
- package/dist/src/web/components/chart/common/chart-custom-connector.js +35 -0
- package/dist/src/web/components/chart/common/chart-error.d.ts +2 -0
- package/dist/src/web/components/chart/common/chart-error.js +2 -0
- package/dist/src/web/components/chart/common/config/bar.d.ts +48 -0
- package/dist/src/web/components/chart/common/config/bar.js +49 -0
- package/dist/src/web/components/chart/common/config/global.d.ts +13 -0
- package/dist/src/web/components/chart/common/config/global.js +16 -0
- package/dist/src/web/components/chart/common/config/line.d.ts +46 -0
- package/dist/src/web/components/chart/common/config/line.js +49 -0
- package/dist/src/web/components/chart/common/config/pie.d.ts +29 -0
- package/dist/src/web/components/chart/common/config/pie.js +36 -0
- package/dist/src/web/components/chart/common/core/eChartBar.d.ts +66 -0
- package/dist/src/web/components/chart/common/core/eChartBar.js +201 -0
- package/dist/src/web/components/chart/common/core/eChartBase.d.ts +127 -0
- package/dist/src/web/components/chart/common/core/eChartBase.js +394 -0
- package/dist/src/web/components/chart/common/core/eChartLine.d.ts +60 -0
- package/dist/src/web/components/chart/common/core/eChartLine.js +173 -0
- package/dist/src/web/components/chart/common/core/eChartPie.d.ts +48 -0
- package/dist/src/web/components/chart/common/core/eChartPie.js +135 -0
- package/dist/src/web/components/chart/common/core/type.d.ts +35 -0
- package/dist/src/web/components/chart/common/core/type.js +9 -0
- package/dist/src/web/components/chart/common/data-transform.d.ts +6 -0
- package/dist/src/web/components/chart/common/data-transform.js +246 -0
- package/dist/src/web/components/chart/common/echarts.d.ts +5 -0
- package/dist/src/web/components/chart/common/echarts.js +24 -0
- package/dist/src/web/components/chart/common/error-boundary.d.ts +5 -0
- package/dist/src/web/components/chart/common/error-boundary.js +26 -0
- package/dist/src/web/components/chart/common/useChart.d.ts +8 -0
- package/dist/src/web/components/chart/common/useChart.js +61 -0
- package/dist/src/web/components/chart/line/index.d.ts +3 -0
- package/dist/src/web/components/chart/line/index.js +42 -0
- package/dist/src/web/components/chart/line/index.old.d.ts +38 -0
- package/dist/src/web/components/chart/line/index.old.js +53 -0
- package/dist/src/web/components/chart/pie/index.d.ts +3 -0
- package/dist/src/web/components/chart/pie/index.js +42 -0
- package/dist/src/web/components/chart/pie/index.old.d.ts +27 -0
- package/dist/src/web/components/chart/pie/index.old.js +40 -0
- package/dist/src/web/components/chart/statisticsCard/index.d.ts +85 -0
- package/dist/src/web/components/chart/statisticsCard/index.js +203 -0
- package/dist/src/web/components/chart/statisticsCard/interface.d.ts +13 -0
- package/dist/src/web/components/chart/statisticsCard/interface.js +1 -0
- package/dist/src/web/components/common/portal.d.ts +7 -0
- package/dist/src/web/components/common/portal.js +14 -0
- package/dist/src/web/components/container/index.d.ts +6 -0
- package/dist/src/web/components/container/index.js +6 -0
- package/dist/src/web/components/dataView/index.d.ts +6 -0
- package/dist/src/web/components/dataView/index.js +8 -0
- package/dist/src/web/components/dataView/interface.d.ts +5 -0
- package/dist/src/web/components/dataView/interface.js +1 -0
- package/dist/src/web/components/drawer/index.d.ts +13 -0
- package/dist/src/web/components/drawer/index.js +12 -0
- package/dist/src/web/components/form/checkbox/index.d.ts +13 -0
- package/dist/src/web/components/form/checkbox/index.js +167 -0
- package/dist/src/web/components/form/enumSelect/MultipleSelect.d.ts +78 -0
- package/dist/src/web/components/form/enumSelect/MultipleSelect.js +52 -0
- package/dist/src/web/components/form/enumSelect/NormalSelect.d.ts +83 -0
- package/dist/src/web/components/form/enumSelect/NormalSelect.js +52 -0
- package/dist/src/web/components/form/enumSelect/SelectContainer.d.ts +16 -0
- package/dist/src/web/components/form/enumSelect/SelectContainer.js +30 -0
- package/dist/src/web/components/form/enumSelect/index.d.ts +82 -0
- package/dist/src/web/components/form/enumSelect/index.js +6 -0
- package/dist/src/web/components/form/enumSelect/props/defaultProps.d.ts +34 -0
- package/dist/src/web/components/form/enumSelect/props/defaultProps.js +40 -0
- package/dist/src/web/components/form/enumSelect/props/propsTypes.d.ts +39 -0
- package/dist/src/web/components/form/enumSelect/props/propsTypes.js +47 -0
- package/dist/src/web/components/form/form/index.d.ts +32 -0
- package/dist/src/web/components/form/form/index.js +141 -0
- package/dist/src/web/components/form/formcell/index.d.ts +8 -0
- package/dist/src/web/components/form/formcell/index.js +40 -0
- package/dist/src/web/components/form/input/index.d.ts +14 -0
- package/dist/src/web/components/form/input/index.js +86 -0
- package/dist/src/web/components/form/location/common/mapChoose.d.ts +15 -0
- package/dist/src/web/components/form/location/common/mapChoose.js +495 -0
- package/dist/src/web/components/form/location/common/mapView.d.ts +19 -0
- package/dist/src/web/components/form/location/common/mapView.js +172 -0
- package/dist/src/web/components/form/location/common/propsConfig.d.ts +59 -0
- package/dist/src/web/components/form/location/common/propsConfig.js +50 -0
- package/dist/src/web/components/form/location/common/selectModal.d.ts +21 -0
- package/dist/src/web/components/form/location/common/selectModal.js +44 -0
- package/dist/src/web/components/form/location/common/useLocationInfo.d.ts +36 -0
- package/dist/src/web/components/form/location/common/useLocationInfo.js +104 -0
- package/dist/src/web/components/form/location/components/LocationH5/location.h5.d.ts +8 -0
- package/dist/src/web/components/form/location/components/LocationH5/location.h5.js +325 -0
- package/dist/src/web/components/form/location/components/LocationPC/Header.d.ts +12 -0
- package/dist/src/web/components/form/location/components/LocationPC/Header.js +43 -0
- package/dist/src/web/components/form/location/components/LocationPC/location.PC.d.ts +8 -0
- package/dist/src/web/components/form/location/components/LocationPC/location.PC.js +224 -0
- package/dist/src/web/components/form/location/constants.d.ts +2 -0
- package/dist/src/web/components/form/location/constants.js +3 -0
- package/dist/src/web/components/form/location/index.d.ts +1 -0
- package/dist/src/web/components/form/location/index.js +17 -0
- package/dist/src/web/components/form/radio/index.d.ts +11 -0
- package/dist/src/web/components/form/radio/index.js +115 -0
- package/dist/src/web/components/form/renderDecorator.d.ts +6 -0
- package/dist/src/web/components/form/renderDecorator.js +20 -0
- package/dist/src/web/components/form/select/allTimePicker/calendar.d.ts +13 -0
- package/dist/src/web/components/form/select/allTimePicker/calendar.js +104 -0
- package/dist/src/web/components/form/select/allTimePicker/dataUtils.d.ts +24 -0
- package/dist/src/web/components/form/select/allTimePicker/dataUtils.js +265 -0
- package/dist/src/web/components/form/select/allTimePicker/index.d.ts +14 -0
- package/dist/src/web/components/form/select/allTimePicker/index.js +943 -0
- package/dist/src/web/components/form/select/dropdown-select/ui.d.ts +15 -0
- package/dist/src/web/components/form/select/dropdown-select/ui.js +55 -0
- package/dist/src/web/components/form/select/h5.d.ts +16 -0
- package/dist/src/web/components/form/select/h5.js +452 -0
- package/dist/src/web/components/form/select/index.d.ts +66 -0
- package/dist/src/web/components/form/select/index.js +241 -0
- package/dist/src/web/components/form/select/region/index.d.ts +6 -0
- package/dist/src/web/components/form/select/region/index.js +147 -0
- package/dist/src/web/components/form/select/time.d.ts +9 -0
- package/dist/src/web/components/form/select/time.js +146 -0
- package/dist/src/web/components/form/select/use-options.d.ts +26 -0
- package/dist/src/web/components/form/select/use-options.js +103 -0
- package/dist/src/web/components/form/select/year.d.ts +7 -0
- package/dist/src/web/components/form/select/year.js +72 -0
- package/dist/src/web/components/form/switch/index.d.ts +6 -0
- package/dist/src/web/components/form/switch/index.js +58 -0
- package/dist/src/web/components/form/textarea/index.d.ts +12 -0
- package/dist/src/web/components/form/textarea/index.js +66 -0
- package/dist/src/web/components/form/tips/index.d.ts +8 -0
- package/dist/src/web/components/form/tips/index.js +17 -0
- package/dist/src/web/components/form/uploader/index.d.ts +3 -0
- package/dist/src/web/components/form/uploader/index.js +42 -0
- package/dist/src/web/components/form/uploader/uploader.h5.d.ts +20 -0
- package/dist/src/web/components/form/uploader/uploader.h5.js +199 -0
- package/dist/src/web/components/form/uploader/uploader.pc.d.ts +29 -0
- package/dist/src/web/components/form/uploader/uploader.pc.js +208 -0
- package/dist/src/web/components/form/uploaderFile/index.d.ts +4 -0
- package/dist/src/web/components/form/uploaderFile/index.js +19 -0
- package/dist/src/web/components/form/uploaderFile/uploadFile.h5.d.ts +23 -0
- package/dist/src/web/components/form/uploaderFile/uploadFile.h5.js +328 -0
- package/dist/src/web/components/form/uploaderFile/uploadFile.pc.d.ts +24 -0
- package/dist/src/web/components/form/uploaderFile/uploadFile.pc.js +299 -0
- package/dist/src/web/components/form/userOrgSelect/comTool.d.ts +8 -0
- package/dist/src/web/components/form/userOrgSelect/comTool.js +107 -0
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +19 -0
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +247 -0
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +4 -0
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +158 -0
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/index.d.ts +2 -0
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/index.js +17 -0
- package/dist/src/web/components/form/userOrgSelect/index.d.ts +2 -0
- package/dist/src/web/components/form/userOrgSelect/index.js +17 -0
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +26 -0
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.js +258 -0
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +9 -0
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.pc.js +271 -0
- package/dist/src/web/components/form/userOrgSelect/utils.d.ts +35 -0
- package/dist/src/web/components/form/userOrgSelect/utils.js +72 -0
- package/dist/src/web/components/formdetail/index.d.ts +28 -0
- package/dist/src/web/components/formdetail/index.js +170 -0
- package/dist/src/web/components/graphicCard/index.d.ts +46 -0
- package/dist/src/web/components/graphicCard/index.js +179 -0
- package/dist/src/web/components/image/image.d.ts +9 -0
- package/dist/src/web/components/image/image.js +119 -0
- package/dist/src/web/components/image/index.d.ts +13 -0
- package/dist/src/web/components/image/index.js +77 -0
- package/dist/src/web/components/index.d.ts +50 -0
- package/dist/src/web/components/index.js +99 -0
- package/dist/src/web/components/link/index.d.ts +24 -0
- package/dist/src/web/components/link/index.js +71 -0
- package/dist/src/web/components/listView/index.d.ts +7 -0
- package/dist/src/web/components/listView/index.js +296 -0
- package/dist/src/web/components/listView/interface.d.ts +127 -0
- package/dist/src/web/components/listView/interface.js +1 -0
- package/dist/src/web/components/lottery/index.d.ts +22 -0
- package/dist/src/web/components/lottery/index.js +391 -0
- package/dist/src/web/components/lottery/lotteryUtil.d.ts +23 -0
- package/dist/src/web/components/lottery/lotteryUtil.js +181 -0
- package/dist/src/web/components/modal/index.d.ts +17 -0
- package/dist/src/web/components/modal/index.js +11 -0
- package/dist/src/web/components/modal/modal.h5.d.ts +4 -0
- package/dist/src/web/components/modal/modal.h5.js +46 -0
- package/dist/src/web/components/modal/modal.pc.d.ts +3 -0
- package/dist/src/web/components/modal/modal.pc.js +31 -0
- package/dist/src/web/components/navLayout/index.d.ts +61 -0
- package/dist/src/web/components/navLayout/index.js +127 -0
- package/dist/src/web/components/navigationBar/common.d.ts +15 -0
- package/dist/src/web/components/navigationBar/common.js +127 -0
- package/dist/src/web/components/navigationBar/h5Menu.d.ts +14 -0
- package/dist/src/web/components/navigationBar/h5Menu.js +72 -0
- package/dist/src/web/components/navigationBar/horizontalMenu.d.ts +12 -0
- package/dist/src/web/components/navigationBar/horizontalMenu.js +99 -0
- package/dist/src/web/components/navigationBar/index.d.ts +13 -0
- package/dist/src/web/components/navigationBar/index.js +157 -0
- package/dist/src/web/components/navigationBar/verticalMenu.d.ts +13 -0
- package/dist/src/web/components/navigationBar/verticalMenu.js +38 -0
- package/dist/src/web/components/phone/index.d.ts +18 -0
- package/dist/src/web/components/phone/index.js +4 -0
- package/dist/src/web/components/phoneCode/index.d.ts +18 -0
- package/dist/src/web/components/phoneCode/index.js +4 -0
- package/dist/src/web/components/picker/datePicker.d.ts +10 -0
- package/dist/src/web/components/picker/datePicker.js +31 -0
- package/dist/src/web/components/picker/picker.d.ts +6 -0
- package/dist/src/web/components/picker/picker.js +45 -0
- package/dist/src/web/components/picker/timePicker.d.ts +7 -0
- package/dist/src/web/components/picker/timePicker.js +42 -0
- package/dist/src/web/components/richText/const.d.ts +1 -0
- package/dist/src/web/components/richText/const.js +2 -0
- package/dist/src/web/components/richText/index.d.ts +50 -0
- package/dist/src/web/components/richText/index.js +352 -0
- package/dist/src/web/components/richTextView/index.d.ts +7 -0
- package/dist/src/web/components/richTextView/index.js +44 -0
- package/dist/src/web/components/scrollView/index.d.ts +27 -0
- package/dist/src/web/components/scrollView/index.js +95 -0
- package/dist/src/web/components/share/index.d.ts +34 -0
- package/dist/src/web/components/share/index.js +4 -0
- package/dist/src/web/components/slot/index.d.ts +6 -0
- package/dist/src/web/components/slot/index.js +9 -0
- package/dist/src/web/components/swiper/index.d.ts +24 -0
- package/dist/src/web/components/swiper/index.js +153 -0
- package/dist/src/web/components/tabs/index.d.ts +13 -0
- package/dist/src/web/components/tabs/index.js +15 -0
- package/dist/src/web/components/tabs/tabs.h5.d.ts +4 -0
- package/dist/src/web/components/tabs/tabs.h5.js +42 -0
- package/dist/src/web/components/tabs/tabs.pc.d.ts +3 -0
- package/dist/src/web/components/tabs/tabs.pc.js +40 -0
- package/dist/src/web/components/text/index.d.ts +14 -0
- package/dist/src/web/components/text/index.js +17 -0
- package/dist/src/web/components/uploaderFileView/index.d.ts +10 -0
- package/dist/src/web/components/uploaderFileView/index.js +46 -0
- package/dist/src/web/components/uploaderView/index.d.ts +17 -0
- package/dist/src/web/components/uploaderView/index.js +48 -0
- package/dist/src/web/components/userInfo/index.d.ts +26 -0
- package/dist/src/web/components/userInfo/index.js +4 -0
- package/dist/src/web/components/wedaVideo/index.d.ts +17 -0
- package/dist/src/web/components/wedaVideo/index.js +144 -0
- package/dist/src/web/index.d.ts +8 -0
- package/dist/src/web/index.js +4 -0
- package/dist/src/web/utils/classnames.d.ts +2 -0
- package/dist/src/web/utils/classnames.js +37 -0
- package/dist/src/web/utils/constant.d.ts +23 -0
- package/dist/src/web/utils/constant.js +24 -0
- package/dist/src/web/utils/debounce.d.ts +2 -0
- package/dist/src/web/utils/debounce.js +92 -0
- package/dist/src/web/utils/getLocalCounter.d.ts +1 -0
- package/dist/src/web/utils/getLocalCounter.js +4 -0
- package/dist/src/web/utils/getUserService.d.ts +11 -0
- package/dist/src/web/utils/getUserService.js +156 -0
- package/dist/src/web/utils/isObjectEqual.d.ts +2 -0
- package/dist/src/web/utils/isObjectEqual.js +12 -0
- package/dist/src/web/utils/loading-fallback.d.ts +2 -0
- package/dist/src/web/utils/loading-fallback.js +2 -0
- package/dist/src/web/utils/lodash.d.ts +1 -0
- package/dist/src/web/utils/lodash.js +2 -0
- package/dist/src/web/utils/platform.d.ts +18 -0
- package/dist/src/web/utils/platform.js +193 -0
- package/dist/src/web/utils/tcb.d.ts +33 -0
- package/dist/src/web/utils/tcb.js +118 -0
- package/dist/src/web/utils/tmap.d.ts +3 -0
- package/dist/src/web/utils/tmap.js +21 -0
- package/dist/src/web/utils/use-cloud-id-temp-url.d.ts +1 -0
- package/dist/src/web/utils/use-cloud-id-temp-url.js +15 -0
- package/dist/src/web/utils/useSetState.d.ts +1 -0
- package/dist/src/web/utils/useSetState.js +8 -0
- package/dist/src/web/utils/useSyncValue.d.ts +4 -0
- package/dist/src/web/utils/useSyncValue.js +15 -0
- package/dist/src/web/utils/weui.d.ts +1 -0
- package/dist/src/web/utils/weui.js +2 -0
- package/dist/web/components/calendar/index.js +10 -2
- package/dist/web/components/carousel/index.js +4 -0
- package/dist/web/components/chart/common/core/eChartBase.js +8 -2
- package/dist/web/components/form/form/index.js +10 -7
- package/dist/web/components/form/location/common/mapChoose.js +2 -0
- package/dist/web/components/form/location/common/mapView.js +2 -0
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +3 -1
- package/dist/web/components/form/location/components/LocationH5/location.module.css +3 -0
- package/dist/web/components/form/select/allTimePicker/calendar.css +114 -0
- package/dist/web/components/form/select/allTimePicker/index.css +136 -0
- package/dist/web/components/form/select/h5.js +4 -0
- package/dist/web/components/form/select/index.js +2 -8
- package/dist/web/components/form/switch/index.js +3 -2
- package/dist/web/components/form/switch/switch.module.css +7 -0
- package/dist/web/components/form/uploader/uploader.h5.d.ts +1 -0
- package/dist/web/components/form/uploader/uploader.h5.js +14 -10
- package/dist/web/components/form/uploader/uploader.pc.js +1 -1
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +14 -12
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +8 -8
- package/dist/web/components/form/userOrgSelect/comTool.d.ts +7 -0
- package/dist/web/components/form/userOrgSelect/comTool.js +89 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +20 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +259 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +4 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +153 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.d.ts +2 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.js +17 -0
- package/dist/web/components/form/userOrgSelect/index.d.ts +2 -0
- package/dist/web/components/form/userOrgSelect/index.js +17 -0
- package/dist/web/components/form/userOrgSelect/userOrgSelect.css +805 -0
- package/dist/web/components/form/userOrgSelect/userOrgSelect.less +643 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +24 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +276 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +9 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.js +229 -0
- package/dist/web/components/form/userOrgSelect/utils.d.ts +35 -0
- package/dist/web/components/form/userOrgSelect/utils.js +72 -0
- package/dist/web/components/formdetail/index.css +115 -0
- package/dist/web/components/formdetail/index.d.ts +28 -0
- package/dist/web/components/formdetail/index.js +170 -0
- package/dist/web/components/index.d.ts +3 -0
- package/dist/web/components/index.js +3 -0
- package/dist/web/components/listView/index.css +35 -5
- package/dist/web/components/listView/index.js +92 -68
- package/dist/web/components/listView/interface.d.ts +5 -0
- package/dist/web/components/lottery/index.js +2 -1
- package/dist/web/components/lottery/lotteryUtil.js +1 -0
- package/dist/web/components/navigationBar/index.css +21 -29
- package/dist/web/components/richText/index.css +1 -0
- package/dist/web/components/swiper/index.js +5 -1
- package/dist/web/components/wedaVideo/index.js +1 -0
- package/dist/web/utils/getUserService.d.ts +17 -0
- package/dist/web/utils/getUserService.js +148 -0
- package/dist/web/utils/platform.js +2 -0
- package/dist/web/weda-ui.css +9 -0
- package/package.json +27 -13
- package/dist/asset-manifest.json +0 -17
- package/dist/index.html +0 -88
- package/dist/static/js/bundle.js +0 -963
- package/dist/static/js/bundle.js.map +0 -1
- package/dist/static/js/main.chunk.js +0 -8841
- package/dist/static/js/main.chunk.js.map +0 -1
- package/dist/static/js/vendors~main.chunk.js +0 -247885
- package/dist/static/js/vendors~main.chunk.js.map +0 -1
- package/dist/static/media/ef6fa527e24e354765d806b826b41391.fa67580a.svg +0 -627
- package/dist/web/components/auth/index.d.ts +0 -10
- package/dist/web/components/auth/index.js +0 -37
- package/dist/web/utils/events.d.ts +0 -1
- package/dist/web/utils/events.js +0 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import Button from './components/button.json';
|
|
2
|
+
import Text from './components/text.json';
|
|
3
|
+
import Container from './components/container.json';
|
|
4
|
+
import Image from './components/image.json';
|
|
5
|
+
import Link from './components/link.json';
|
|
6
|
+
// import Picker from './components/picker/picker.json';
|
|
7
|
+
// import DatePicker from './components/picker/datePicker.json';
|
|
8
|
+
// import TimePicker from './components/picker/timePicker.json';
|
|
9
|
+
import Input from './components/form/input.json';
|
|
10
|
+
import Location from './components/form/location.json';
|
|
11
|
+
import Textarea from './components/form/textarea.json';
|
|
12
|
+
import Radio from './components/form/radio.json';
|
|
13
|
+
import Checkbox from './components/form/checkbox.json';
|
|
14
|
+
import Switch from './components/form/switch.json';
|
|
15
|
+
import Form from './components/form/form.json';
|
|
16
|
+
import Select from './components/form/select.json';
|
|
17
|
+
import Auth from './components/auth.json';
|
|
18
|
+
import Slot from './components/slot.json';
|
|
19
|
+
import Uploader from './components/form/uploader.json';
|
|
20
|
+
import UploaderFile from './components/form/uploaderFile.json';
|
|
21
|
+
import ScrollView from './components/scrollVeiw.json';
|
|
22
|
+
import Swiper from './components/swiper.json';
|
|
23
|
+
import Carousel from './components/carousel.json';
|
|
24
|
+
// import Label from './components/form/label.json';
|
|
25
|
+
import Tips from './components/form/tips.json';
|
|
26
|
+
import Modal from './components/modal.json';
|
|
27
|
+
import Drawer from './components/drawer.json';
|
|
28
|
+
import RichText from './components/form/richText.json';
|
|
29
|
+
import RichTextView from './components/richtextview.json';
|
|
30
|
+
import Tabs from './components/tabs.json';
|
|
31
|
+
import Calendar from './components/calendar.json';
|
|
32
|
+
import NavLayout from './components/navLayout.json';
|
|
33
|
+
import WedaVideo from './components/wedaVideo.json';
|
|
34
|
+
import showToast from './actions/showToast.json';
|
|
35
|
+
import showModal from './actions/showModal.json';
|
|
36
|
+
import ListView from './components/listView.json';
|
|
37
|
+
import NavigationBar from './components/navigationBar.json';
|
|
38
|
+
import Line from './components/chart/line.json';
|
|
39
|
+
import Bar from './components/chart/bar.json';
|
|
40
|
+
import Pie from './components/chart/pie.json';
|
|
41
|
+
import DataView from './components/dataView.json';
|
|
42
|
+
import StatisticsCard from './components/chart/statisticsCard.json';
|
|
43
|
+
import GraphicCard from './components/graphicCard.json';
|
|
44
|
+
import Phone from './components/wxOpenApi/phone.json';
|
|
45
|
+
import PhoneCode from './components/wxOpenApi/phoneCode.json';
|
|
46
|
+
import Share from './components/wxOpenApi/share.json';
|
|
47
|
+
import UserInfo from './components/wxOpenApi/userInfo.json';
|
|
48
|
+
import Lottery from './components/lottery.json';
|
|
49
|
+
import UserTreeSelect from './components/form/userTreeSelect.json';
|
|
50
|
+
import DepartTreeSelect from './components/form/departTreeSelect.json';
|
|
51
|
+
import FormDetail from './components/formdetail.json';
|
|
52
|
+
export const components = {
|
|
53
|
+
FormDetail,
|
|
54
|
+
Button,
|
|
55
|
+
Text,
|
|
56
|
+
Container,
|
|
57
|
+
Image,
|
|
58
|
+
// Picker,
|
|
59
|
+
// DatePicker,
|
|
60
|
+
// TimePicker,
|
|
61
|
+
Input,
|
|
62
|
+
Radio,
|
|
63
|
+
Checkbox,
|
|
64
|
+
Switch,
|
|
65
|
+
Form,
|
|
66
|
+
Textarea,
|
|
67
|
+
Location,
|
|
68
|
+
WedaVideo,
|
|
69
|
+
// Cells,
|
|
70
|
+
Select,
|
|
71
|
+
Auth,
|
|
72
|
+
Slot,
|
|
73
|
+
Uploader,
|
|
74
|
+
UploaderFile,
|
|
75
|
+
ScrollView,
|
|
76
|
+
Swiper,
|
|
77
|
+
Carousel,
|
|
78
|
+
// Label,
|
|
79
|
+
Tips,
|
|
80
|
+
Modal,
|
|
81
|
+
RichText,
|
|
82
|
+
RichTextView,
|
|
83
|
+
Link,
|
|
84
|
+
Drawer,
|
|
85
|
+
Tabs,
|
|
86
|
+
Calendar,
|
|
87
|
+
ListView,
|
|
88
|
+
DataView,
|
|
89
|
+
NavLayout,
|
|
90
|
+
NavigationBar,
|
|
91
|
+
Line,
|
|
92
|
+
Bar,
|
|
93
|
+
Pie,
|
|
94
|
+
StatisticsCard,
|
|
95
|
+
GraphicCard,
|
|
96
|
+
Phone,
|
|
97
|
+
PhoneCode,
|
|
98
|
+
Share,
|
|
99
|
+
UserInfo,
|
|
100
|
+
Lottery,
|
|
101
|
+
UserTreeSelect,
|
|
102
|
+
DepartTreeSelect,
|
|
103
|
+
};
|
|
104
|
+
export const actions = {
|
|
105
|
+
showToast,
|
|
106
|
+
showModal,
|
|
107
|
+
};
|
|
108
|
+
export default {
|
|
109
|
+
components,
|
|
110
|
+
actions,
|
|
111
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ICompsConfig {
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
'x-platforms': string[];
|
|
7
|
+
default: string;
|
|
8
|
+
platforms: string;
|
|
9
|
+
'x-index': number;
|
|
10
|
+
}
|
|
11
|
+
export declare type TCompsConfig = ICompsConfig;
|
|
12
|
+
export declare const sortBy: (props: any) => (a: any, b: any) => number;
|
|
13
|
+
export declare const objFormat: (args: any, type: any, origin: any) => any;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export const sortBy = (props) => {
|
|
2
|
+
return function (a, b) {
|
|
3
|
+
return a[props] - b[props];
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
const platMaps = {
|
|
7
|
+
PCWEB: 'PC端',
|
|
8
|
+
MOBILEWEB: '移动端',
|
|
9
|
+
MP: '小程序',
|
|
10
|
+
WEB: 'WEB端',
|
|
11
|
+
};
|
|
12
|
+
const platTranslate = (platforms = []) => {
|
|
13
|
+
const platRemark = [];
|
|
14
|
+
if (platforms && platforms.length > 0) {
|
|
15
|
+
platforms.forEach((e) => {
|
|
16
|
+
platRemark.push(platMaps[e]);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return platRemark;
|
|
20
|
+
};
|
|
21
|
+
export const objFormat = (args, type, origin) => {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
23
|
+
//判断属性title值是否为拓展写法
|
|
24
|
+
const uuidReg = /(?<=text)\('(.*)(?=',)/;
|
|
25
|
+
let transformData = [];
|
|
26
|
+
for (const i in args) {
|
|
27
|
+
if (type && type == 'event') {
|
|
28
|
+
transformData.push({
|
|
29
|
+
name: origin == 'lowCode' ? (_a = args[i]) === null || _a === void 0 ? void 0 : _a.name : (_b = args[i]) === null || _b === void 0 ? void 0 : _b.title,
|
|
30
|
+
title: origin == 'lowCode' ? (_c = args[i]) === null || _c === void 0 ? void 0 : _c.eventName : (_d = args[i]) === null || _d === void 0 ? void 0 : _d.name,
|
|
31
|
+
description: ((_e = args[i]) === null || _e === void 0 ? void 0 : _e.remarks) || '-',
|
|
32
|
+
platforms: args[i]['x-platforms']
|
|
33
|
+
? args[i]['x-platforms'].indexOf('MP') > -1
|
|
34
|
+
? '小程序'
|
|
35
|
+
: args[i]['x-platforms'].indexOf('WEB') > -1
|
|
36
|
+
? 'WEB端'
|
|
37
|
+
: '兼容三端'
|
|
38
|
+
: '兼容三端',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
else if (type && type == 'attribute' && args[i].type != 'slot') {
|
|
42
|
+
if (((_f = args[i]) === null || _f === void 0 ? void 0 : _f.display) == false ||
|
|
43
|
+
((_g = args[i]) === null || _g === void 0 ? void 0 : _g.isReactNode) == true ||
|
|
44
|
+
args[i]['x-component'] == 'sub-category-title' ||
|
|
45
|
+
args[i]['x-component'] == 'Divider') {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const titleName = args[i].title.indexOf('{{') != -1
|
|
49
|
+
? (_h = args[i]) === null || _h === void 0 ? void 0 : _h.title.match(uuidReg)[1]
|
|
50
|
+
: (_j = args[i]) === null || _j === void 0 ? void 0 : _j.title;
|
|
51
|
+
transformData.push({
|
|
52
|
+
code: i,
|
|
53
|
+
title: titleName +
|
|
54
|
+
(platTranslate(args[i]['x-platforms']).length > 0
|
|
55
|
+
? '(' + platTranslate(args[i]['x-platforms']).join(',') + ')'
|
|
56
|
+
: ''),
|
|
57
|
+
description: ((_k = args[i]) === null || _k === void 0 ? void 0 : _k.remarks) || '-',
|
|
58
|
+
type: ((_l = args[i]) === null || _l === void 0 ? void 0 : _l.type) || '-',
|
|
59
|
+
default: JSON.stringify((_m = args[i]) === null || _m === void 0 ? void 0 : _m.default) || '-',
|
|
60
|
+
'x-index': args[i]['x-index'] ? args[i]['x-index'] : 999999,
|
|
61
|
+
'x-category': args[i]['x-category']
|
|
62
|
+
? args[i]['x-category']
|
|
63
|
+
: '基础属性',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else if (type && type == 'slot' && args[i].type == 'slot') {
|
|
67
|
+
transformData.push({
|
|
68
|
+
code: i,
|
|
69
|
+
title: (_o = args[i]) === null || _o === void 0 ? void 0 : _o.title,
|
|
70
|
+
description: ((_p = args[i]) === null || _p === void 0 ? void 0 : _p.description) || '-',
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (type && type == 'attribute')
|
|
75
|
+
transformData.sort(sortBy('x-index'));
|
|
76
|
+
if (type && type == 'attribute') {
|
|
77
|
+
transformData = groupByType(transformData, 'x-category');
|
|
78
|
+
}
|
|
79
|
+
return transformData;
|
|
80
|
+
};
|
|
81
|
+
function groupByType(arr, param) {
|
|
82
|
+
var _a, _b, _c;
|
|
83
|
+
const map = {};
|
|
84
|
+
const dest = [];
|
|
85
|
+
let structureMap = [];
|
|
86
|
+
let storgeType = [];
|
|
87
|
+
for (let i = 0; i < arr.length; i++) {
|
|
88
|
+
const ai = arr[i];
|
|
89
|
+
if (ai[param] && !map[ai[param]]) {
|
|
90
|
+
dest.push({
|
|
91
|
+
name: ai[param],
|
|
92
|
+
data: [ai],
|
|
93
|
+
});
|
|
94
|
+
map[ai[param]] = ai;
|
|
95
|
+
}
|
|
96
|
+
else if (!ai[param]) {
|
|
97
|
+
dest.push({
|
|
98
|
+
name: '基础属性',
|
|
99
|
+
data: [ai],
|
|
100
|
+
});
|
|
101
|
+
map[ai[param]] = ai;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
for (let j = 0; j < dest.length; j++) {
|
|
105
|
+
const dj = dest[j];
|
|
106
|
+
if (dj.name == ai[param]) {
|
|
107
|
+
dj.data.push(ai);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
for (let k = 0; k < dest.length; k++) {
|
|
114
|
+
if (k == 0 && ((_a = dest[k]) === null || _a === void 0 ? void 0 : _a.name) != '基础属性') {
|
|
115
|
+
storgeType = storgeType.concat((_b = dest[k]) === null || _b === void 0 ? void 0 : _b.data);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
structureMap = structureMap.concat((_c = dest[k]) === null || _c === void 0 ? void 0 : _c.data);
|
|
119
|
+
}
|
|
120
|
+
storgeType.length != 0 ? structureMap.push(...storgeType) : null;
|
|
121
|
+
return structureMap;
|
|
122
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './tableView.css';
|
|
3
|
+
export interface ComponentDocument {
|
|
4
|
+
exampleMap?: {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
component: React.ComponentType;
|
|
7
|
+
code: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
codeMap?: {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
code: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
data?: {
|
|
16
|
+
[key: string]: {
|
|
17
|
+
code: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface TableLayoutViewProps {
|
|
22
|
+
componentKey?: string;
|
|
23
|
+
document: ComponentDocument;
|
|
24
|
+
variables?: object;
|
|
25
|
+
}
|
|
26
|
+
export default function TableLayoutView({ componentKey, type, origin }: {
|
|
27
|
+
componentKey: any;
|
|
28
|
+
type: any;
|
|
29
|
+
origin: any;
|
|
30
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { components } from '../../configs/index';
|
|
3
|
+
import { objFormat } from './format';
|
|
4
|
+
import './tableView.css';
|
|
5
|
+
function getCompsMeta(key, type, origin) {
|
|
6
|
+
let compsMeta;
|
|
7
|
+
try {
|
|
8
|
+
let metaLowcode;
|
|
9
|
+
switch (origin) {
|
|
10
|
+
case 'lowCode':
|
|
11
|
+
metaLowcode = require('/docs/lowcode/components/wedaUI/lowcode-comps/weda_standard/comps/' +
|
|
12
|
+
key +
|
|
13
|
+
'.comp.json');
|
|
14
|
+
if (type && type == 'event') {
|
|
15
|
+
compsMeta = metaLowcode['emitEvents'];
|
|
16
|
+
}
|
|
17
|
+
else if (type && (type == 'attribute' || type == 'slot')) {
|
|
18
|
+
compsMeta = metaLowcode['dataForm'];
|
|
19
|
+
}
|
|
20
|
+
else if (type && type == 'description') {
|
|
21
|
+
compsMeta = metaLowcode['meta'];
|
|
22
|
+
}
|
|
23
|
+
return compsMeta;
|
|
24
|
+
case 'sourceCode':
|
|
25
|
+
if (type && type == 'event') {
|
|
26
|
+
compsMeta = components[key]['events'] || {};
|
|
27
|
+
}
|
|
28
|
+
else if (type && (type == 'attribute' || type == 'slot')) {
|
|
29
|
+
compsMeta = components[key]['data']['properties'] || {};
|
|
30
|
+
}
|
|
31
|
+
else if (type && type == 'description') {
|
|
32
|
+
compsMeta = components[key]['meta'] || {};
|
|
33
|
+
}
|
|
34
|
+
return compsMeta;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export default function TableLayoutView({ componentKey, type, origin }) {
|
|
42
|
+
var _a, _b, _c;
|
|
43
|
+
const compsMeta = getCompsMeta(componentKey, type, origin);
|
|
44
|
+
let tableView = [];
|
|
45
|
+
if (compsMeta && type != 'description') {
|
|
46
|
+
tableView = objFormat(compsMeta, type, origin);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
tableView.push(compsMeta);
|
|
50
|
+
}
|
|
51
|
+
return (React.createElement(React.Fragment, null,
|
|
52
|
+
type == 'attribute' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
53
|
+
React.createElement("div", { className: "tea-table__header" },
|
|
54
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
55
|
+
React.createElement("colgroup", null,
|
|
56
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
57
|
+
React.createElement("col", { style: { width: '10%' } }),
|
|
58
|
+
React.createElement("col", { style: { width: '15%' } }),
|
|
59
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
60
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
61
|
+
React.createElement("thead", null,
|
|
62
|
+
React.createElement("tr", null,
|
|
63
|
+
React.createElement("th", { className: "" },
|
|
64
|
+
React.createElement("div", null,
|
|
65
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D" }, "\u5C5E\u6027\u540D"))),
|
|
66
|
+
React.createElement("th", { className: "" },
|
|
67
|
+
React.createElement("div", null,
|
|
68
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u7C7B\u578B" }, "\u7C7B\u578B"))),
|
|
69
|
+
React.createElement("th", { className: "" },
|
|
70
|
+
React.createElement("div", null,
|
|
71
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u5206\u7EC4" }, "\u5C5E\u6027\u5206\u7EC4"))),
|
|
72
|
+
React.createElement("th", { className: "" },
|
|
73
|
+
React.createElement("div", null,
|
|
74
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u9ED8\u8BA4\u503C" }, "\u9ED8\u8BA4\u503C"))),
|
|
75
|
+
React.createElement("th", { className: "" },
|
|
76
|
+
React.createElement("div", null,
|
|
77
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u8BF4\u660E" }, "\u8BF4\u660E"))))))),
|
|
78
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
79
|
+
React.createElement("colgroup", null,
|
|
80
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
81
|
+
React.createElement("col", { style: { width: '10%' } }),
|
|
82
|
+
React.createElement("col", { style: { width: '15%' } }),
|
|
83
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
84
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
85
|
+
React.createElement("tbody", null, tableView.map((row, index) => (React.createElement("tr", { key: index },
|
|
86
|
+
React.createElement("td", null, row.title),
|
|
87
|
+
React.createElement("td", null,
|
|
88
|
+
React.createElement("code", null, row.type)),
|
|
89
|
+
React.createElement("td", null, row['x-category']),
|
|
90
|
+
React.createElement("td", null, row.default),
|
|
91
|
+
React.createElement("td", null, row.description)))))))),
|
|
92
|
+
type == 'slot' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
93
|
+
React.createElement("div", { className: "tea-table__header" },
|
|
94
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
95
|
+
React.createElement("colgroup", null,
|
|
96
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
97
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
98
|
+
React.createElement("thead", null,
|
|
99
|
+
React.createElement("tr", null,
|
|
100
|
+
React.createElement("th", { className: "" },
|
|
101
|
+
React.createElement("div", null,
|
|
102
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D" }, "\u540D\u79F0"))),
|
|
103
|
+
React.createElement("th", { className: "" },
|
|
104
|
+
React.createElement("div", null,
|
|
105
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u7C7B\u578B" }, "\u8BF4\u660E"))))))),
|
|
106
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
107
|
+
React.createElement("colgroup", null,
|
|
108
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
109
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
110
|
+
React.createElement("tbody", null, tableView.map((row, index) => (React.createElement("tr", { key: index },
|
|
111
|
+
React.createElement("td", null, row.code),
|
|
112
|
+
React.createElement("td", null, row.description)))))))),
|
|
113
|
+
type == 'event' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
114
|
+
React.createElement("div", { className: "tea-table__header" },
|
|
115
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
116
|
+
React.createElement("colgroup", null,
|
|
117
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
118
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
119
|
+
React.createElement("col", { style: { width: '16%' } }),
|
|
120
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
121
|
+
React.createElement("thead", null,
|
|
122
|
+
React.createElement("tr", null,
|
|
123
|
+
React.createElement("th", { className: "" },
|
|
124
|
+
React.createElement("div", null,
|
|
125
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u4E8B\u4EF6\u540D" }, "\u4E8B\u4EF6\u540D"))),
|
|
126
|
+
React.createElement("th", { className: "" },
|
|
127
|
+
React.createElement("div", null,
|
|
128
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u4E8B\u4EF6code" }, "\u4E8B\u4EF6code"))),
|
|
129
|
+
React.createElement("th", { className: "" },
|
|
130
|
+
React.createElement("div", null,
|
|
131
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u9002\u7528\u60C5\u51B5" }, "\u9002\u7528\u60C5\u51B5"))),
|
|
132
|
+
React.createElement("th", { className: "" },
|
|
133
|
+
React.createElement("div", null,
|
|
134
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u8BF4\u660E" }, "\u8BF4\u660E"))))))),
|
|
135
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
136
|
+
React.createElement("colgroup", null,
|
|
137
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
138
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
139
|
+
React.createElement("col", { style: { width: '16%' } }),
|
|
140
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
141
|
+
React.createElement("tbody", null, tableView.map((row, index) => (React.createElement("tr", { key: index },
|
|
142
|
+
React.createElement("td", null, row.name),
|
|
143
|
+
React.createElement("td", null,
|
|
144
|
+
React.createElement("code", null, row.title)),
|
|
145
|
+
React.createElement("td", null, row.platforms),
|
|
146
|
+
React.createElement("td", null, row.description)))))))),
|
|
147
|
+
type == 'description' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
148
|
+
React.createElement("h2", null,
|
|
149
|
+
React.createElement("a", { "aria-hidden": "true", className: "anchor enhancedAnchor_node_modules-@docusaurus-theme-classic-lib-next-theme-Heading-styles-module", id: "\u9002\u7528\u573A\u666F" }),
|
|
150
|
+
"\u9002\u7528\u573A\u666F",
|
|
151
|
+
React.createElement("a", { className: "hash-link", href: "#\u9002\u7528\u573A\u666F", title: "\u6807\u9898\u7684\u76F4\u63A5\u94FE\u63A5" }, "#")),
|
|
152
|
+
React.createElement("p", null, ((_a = tableView[0]) === null || _a === void 0 ? void 0 : _a.description)
|
|
153
|
+
? (_b = tableView[0]) === null || _b === void 0 ? void 0 : _b.description
|
|
154
|
+
: (_c = tableView[0]) === null || _c === void 0 ? void 0 : _c.desc))),
|
|
155
|
+
tableView.length == 0 && React.createElement("p", null, "\u65E0")));
|
|
156
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import 'regenerator-runtime';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
4
|
+
writable: true,
|
|
5
|
+
value: jest.fn().mockImplementation((query) => ({
|
|
6
|
+
matches: false,
|
|
7
|
+
media: query,
|
|
8
|
+
onchange: null,
|
|
9
|
+
addListener: jest.fn(),
|
|
10
|
+
removeListener: jest.fn(),
|
|
11
|
+
addEventListener: jest.fn(),
|
|
12
|
+
removeEventListener: jest.fn(),
|
|
13
|
+
dispatchEvent: jest.fn(),
|
|
14
|
+
})),
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(window, 'ResizeObserver', {
|
|
17
|
+
writable: true,
|
|
18
|
+
value: require('resize-observer-polyfill'),
|
|
19
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as ReactDOM from 'react-dom';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
4
|
+
import { Modal, Button, Text, ConfigProvider } from 'tea-component';
|
|
5
|
+
import { noop } from '../../utils/constant';
|
|
6
|
+
import './index.css';
|
|
7
|
+
const ModalShow = forwardRef(function ModalShow(props, ref) {
|
|
8
|
+
const [visible, setVisible] = useState(false);
|
|
9
|
+
// 渲染之后,马上显示
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setVisible(true);
|
|
12
|
+
}, []);
|
|
13
|
+
// 实例 ref 到外部
|
|
14
|
+
useImperativeHandle(ref, () => ({ setVisible }));
|
|
15
|
+
return React.createElement(Modal, { ...props, visible: visible });
|
|
16
|
+
});
|
|
17
|
+
function show(options) {
|
|
18
|
+
const el = document.createElement('div');
|
|
19
|
+
const instanceRef = React.createRef();
|
|
20
|
+
ReactDOM.render(React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
21
|
+
React.createElement(ModalShow, { ...options, ref: instanceRef, onExited: () => ReactDOM.unmountComponentAtNode(el) })), el);
|
|
22
|
+
return {
|
|
23
|
+
destroy: () => {
|
|
24
|
+
if (instanceRef.current) {
|
|
25
|
+
instanceRef.current.setVisible(false);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export default async function showModal({ data }) {
|
|
31
|
+
const { title, content, showCancel, cancelText = '取消', cancelColor, confirmText = '确定', confirmColor, success = noop, fail = noop, complete = noop, } = data;
|
|
32
|
+
return new Promise((resolve) => {
|
|
33
|
+
const base = { cancel: false, confirm: false, content: null };
|
|
34
|
+
const modal = show({
|
|
35
|
+
caption: title,
|
|
36
|
+
children: (React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(Modal.Body, null, content),
|
|
38
|
+
React.createElement(Modal.Footer, null,
|
|
39
|
+
React.createElement(Button
|
|
40
|
+
// type="primary"
|
|
41
|
+
, {
|
|
42
|
+
// type="primary"
|
|
43
|
+
onClick: () => {
|
|
44
|
+
resolve({ ...base, confirm: true });
|
|
45
|
+
modal.destroy();
|
|
46
|
+
} },
|
|
47
|
+
React.createElement(Text, { style: { color: confirmColor } }, confirmText)),
|
|
48
|
+
showCancel && (React.createElement(Button, { onClick: () => {
|
|
49
|
+
resolve({ ...base, cancel: true });
|
|
50
|
+
modal.destroy();
|
|
51
|
+
} },
|
|
52
|
+
React.createElement(Text, { style: { color: cancelColor } }, cancelText)))))),
|
|
53
|
+
onClose: () => {
|
|
54
|
+
resolve({ ...base, cancel: true });
|
|
55
|
+
modal.destroy();
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}).then((res) => {
|
|
59
|
+
success && success(res);
|
|
60
|
+
return res;
|
|
61
|
+
}, (e) => {
|
|
62
|
+
// console.log(e);
|
|
63
|
+
fail && fail();
|
|
64
|
+
complete && complete();
|
|
65
|
+
throw e;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function showToast(): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CommonPropsType } from '../../types';
|
|
3
|
+
import './index.css';
|
|
4
|
+
declare const Button: ({ text, size, type, contentSlot, formType, loading, disabled, events, className, style, id, }: PropsType) => JSX.Element;
|
|
5
|
+
export interface PropsType extends CommonPropsType {
|
|
6
|
+
/**
|
|
7
|
+
* 内容
|
|
8
|
+
*/
|
|
9
|
+
text?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 样式类型
|
|
12
|
+
*/
|
|
13
|
+
type?: 'primary' | 'warn' | 'wechat' | 'default';
|
|
14
|
+
/**
|
|
15
|
+
* 大小
|
|
16
|
+
*/
|
|
17
|
+
size?: 'default' | 'mini' | 'large';
|
|
18
|
+
/**
|
|
19
|
+
* 是否禁用
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 加载中
|
|
24
|
+
*/
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 用于 form 类型
|
|
28
|
+
*/
|
|
29
|
+
formType?: 'button' | 'submit' | 'reset';
|
|
30
|
+
contentSlot?: string;
|
|
31
|
+
}
|
|
32
|
+
export default Button;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button as TeaButton, ConfigProvider, } from 'tea-component';
|
|
3
|
+
import classNames from '../../utils/classnames';
|
|
4
|
+
import { usePlatform } from '../../utils/platform';
|
|
5
|
+
import './index.css';
|
|
6
|
+
import { emptyObject } from '../../utils/constant';
|
|
7
|
+
// 不用 react-weui 而直接用底层实现的原因是 react-weui 不能支持表单类型
|
|
8
|
+
const Button = ({ text, size, type, contentSlot, formType, loading, disabled, events = emptyObject, className, style, id, }) => {
|
|
9
|
+
const platform = usePlatform();
|
|
10
|
+
const isH5 = platform === 'h5';
|
|
11
|
+
const cls = classNames({
|
|
12
|
+
'weda-ui': true,
|
|
13
|
+
'weda-button': true,
|
|
14
|
+
'weda-button-large': size === 'large',
|
|
15
|
+
'weda-button-mini': size === 'mini',
|
|
16
|
+
'weui-btn': isH5,
|
|
17
|
+
'weui-btn_mini': isH5 && size === 'mini',
|
|
18
|
+
'weui-btn_primary': isH5 && (type === 'primary' || type === 'wechat'),
|
|
19
|
+
'weui-btn_default': isH5 && type === 'default',
|
|
20
|
+
'weui-btn_warn': isH5 && type === 'warn',
|
|
21
|
+
'weui-btn_wechat': isH5 && type === 'wechat',
|
|
22
|
+
'weui-btn_disabled': isH5 && disabled,
|
|
23
|
+
[className]: className,
|
|
24
|
+
});
|
|
25
|
+
const onClick = (e) => {
|
|
26
|
+
if (events.tap) {
|
|
27
|
+
events.tap({}, { originEvent: e });
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
if (platform === 'h5') {
|
|
31
|
+
return (React.createElement("button", { className: cls, disabled: disabled, type: formType, style: style, id: id, onClick: onClick },
|
|
32
|
+
loading && (React.createElement("span", { className: "weui-btn_loading" },
|
|
33
|
+
React.createElement("i", { className: "weui-loading" }))),
|
|
34
|
+
text ? text : contentSlot));
|
|
35
|
+
}
|
|
36
|
+
return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
37
|
+
React.createElement(TeaButton, { loading: loading, onClick: onClick, disabled: disabled, htmlType: formType, type: toTeaButtonType(type), style: style, className: cls, id: id }, text ? text : contentSlot)));
|
|
38
|
+
};
|
|
39
|
+
function toTeaButtonType(type) {
|
|
40
|
+
if (type === 'primary')
|
|
41
|
+
return type;
|
|
42
|
+
if (type === 'warn')
|
|
43
|
+
return 'error';
|
|
44
|
+
if (type === 'default')
|
|
45
|
+
return 'primary';
|
|
46
|
+
return 'primary';
|
|
47
|
+
}
|
|
48
|
+
export default Button;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare function Calendar({ className, style, initVisible, initValue, configData, }: {
|
|
2
|
+
className: any;
|
|
3
|
+
style: any;
|
|
4
|
+
initVisible: any;
|
|
5
|
+
initValue: any;
|
|
6
|
+
configData?: readonly [];
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
declare namespace Calendar {
|
|
9
|
+
namespace propTypes {
|
|
10
|
+
const className: PropTypes.Requireable<string>;
|
|
11
|
+
const style: PropTypes.Requireable<object>;
|
|
12
|
+
const initValue: PropTypes.Requireable<string>;
|
|
13
|
+
const platform: PropTypes.Requireable<string>;
|
|
14
|
+
const initVisible: PropTypes.Requireable<boolean>;
|
|
15
|
+
const configData: PropTypes.Requireable<any[]>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export default Calendar;
|
|
19
|
+
import * as PropTypes from "prop-types";
|