@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,37 @@
|
|
|
1
|
+
/* !
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/
|
|
6
|
+
function classNames(...args) {
|
|
7
|
+
const classes = [];
|
|
8
|
+
for (let i = 0; i < args.length; i++) {
|
|
9
|
+
const arg = args[i];
|
|
10
|
+
if (!arg)
|
|
11
|
+
continue;
|
|
12
|
+
const argType = typeof arg;
|
|
13
|
+
if (argType === 'string' || argType === 'number') {
|
|
14
|
+
classes.push(arg);
|
|
15
|
+
}
|
|
16
|
+
else if (Array.isArray(arg)) {
|
|
17
|
+
if (arg.length) {
|
|
18
|
+
const inner = classes.push(classNames(...arg));
|
|
19
|
+
if (inner) {
|
|
20
|
+
classes.push(inner);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else if (argType === 'object') {
|
|
25
|
+
if (arg.toString === Object.prototype.toString) {
|
|
26
|
+
Object.keys(arg).forEach((key) => {
|
|
27
|
+
arg[key] && classes.push(key);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
classes.push(arg.toString());
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return classes.join(' ');
|
|
36
|
+
}
|
|
37
|
+
export default classNames;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const TitleType: {
|
|
2
|
+
readonly LEFT: "left";
|
|
3
|
+
readonly TOP: "top";
|
|
4
|
+
readonly NONE: "none";
|
|
5
|
+
};
|
|
6
|
+
export declare const LOAD_ERR_IMG_BASE64: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSJub25lIj4KICA8cGF0aCBkPSJNMjUuMzIgMTYuMzU5N0MyNi4wNzY0IDE2LjM1OTcgMjYuODI1NCAxNi41MDg3IDI3LjUyNDMgMTYuNzk4MUMyOC4yMjMxIDE3LjA4NzYgMjguODU4MSAxNy41MTE5IDI5LjM5MjkgMTguMDQ2OEMyOS45Mjc4IDE4LjU4MTYgMzAuMzUyMSAxOS4yMTY2IDMwLjY0MTYgMTkuOTE1NEMzMC45MzEgMjAuNjE0MyAzMS4wOCAyMS4zNjMzIDMxLjA4IDIyLjExOTdDMzEuMDggMjIuODc2MSAzMC45MzEgMjMuNjI1MSAzMC42NDE2IDI0LjMyMzlDMzAuMzUyMSAyNS4wMjI4IDI5LjkyNzggMjUuNjU3OCAyOS4zOTI5IDI2LjE5MjZDMjguODU4MSAyNi43Mjc1IDI4LjIyMzEgMjcuMTUxOCAyNy41MjQzIDI3LjQ0MTJDMjYuODI1NCAyNy43MzA3IDI2LjA3NjQgMjcuODc5NyAyNS4zMiAyNy44Nzk3QzIzLjc5MjQgMjcuODc5NyAyMi4zMjczIDI3LjI3MjggMjEuMjQ3MSAyNi4xOTI2QzIwLjE2NjkgMjUuMTEyNCAxOS41NiAyMy42NDczIDE5LjU2IDIyLjExOTdDMTkuNTYgMjAuNTkyIDIwLjE2NjkgMTkuMTI3IDIxLjI0NzEgMTguMDQ2OEMyMi4zMjczIDE2Ljk2NjUgMjMuNzkyNCAxNi4zNTk3IDI1LjMyIDE2LjM1OTdaTTI4IDMuNTU5NjlWMTQuODc2OEMyNy4xNzc3IDE0LjU4NjYgMjYuMTkyIDE0LjQzODggMjUuMzIgMTQuNDM5N0MyNC4wMzEgMTQuNDM5NyAyMi44MTU3IDE0Ljc1NzEgMjEuNzQ4OCAxNS4zMTg0TDIwLjc5NTIgMTMuMTU5N0wxNi4wMjU5IDIwLjAyNzVMOC40NDU3NiAxNi40NDFMMy41NiAyMy4zOTk3SDE3Ljc0NjJDMTcuOTg2NyAyNC44MjkgMTguNjI4MiAyNi4xNjA2IDE5LjU5NTggMjcuMjM5N0gxVjMuNTU5NjlIMjhaTTI1Ljk2IDI0LjAzOTdIMjQuNjhWMjUuMzE5N0gyNS45NlYyNC4wMzk3Wk0yNS45NiAxOC45MTk3SDI0LjY4VjIzLjM5OTdIMjUuOTZWMTguOTE5N1pNNi4xMiAxMC41OTk3QzYuMTIgMTEuOTk4MSA3LjE5OTA0IDEzLjEwODUgOC42MDc2OCAxMy4xNTg0QzEwLjAyMDggMTMuMjA3NyAxMS4yNCAxMi4wNDggMTEuMjQgMTAuNTk5N0MxMS4yNCA5LjI0NjA5IDEwLjA2NDMgOC4wODU3NyA4Ljc1MjMyIDguMDQwOTdDNy4yOTU2OCA3Ljk5MTY5IDYuMTIgOS4xNTEzNyA2LjEyIDEwLjU5OTdaIiBmaWxsPSIjQkNDNEQwIj48L3BhdGg+Cjwvc3ZnPgo=";
|
|
7
|
+
export declare const REL_DICT: {
|
|
8
|
+
readonly equal: "eq";
|
|
9
|
+
readonly unequal: "neq";
|
|
10
|
+
readonly include: "search";
|
|
11
|
+
readonly exclude: "_exclude";
|
|
12
|
+
readonly begin_with: "_begin_with";
|
|
13
|
+
readonly greater: "gt";
|
|
14
|
+
readonly greater_or_equal: "gte";
|
|
15
|
+
readonly bigger_or_equal: "gte";
|
|
16
|
+
readonly less: "lt";
|
|
17
|
+
readonly less_or_equal: "lte";
|
|
18
|
+
readonly in: "in";
|
|
19
|
+
readonly not_in: "nin";
|
|
20
|
+
};
|
|
21
|
+
export declare const emptyObject: {};
|
|
22
|
+
export declare const emptyArray: readonly [];
|
|
23
|
+
export declare const noop: () => void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const TitleType = {
|
|
2
|
+
LEFT: 'left',
|
|
3
|
+
TOP: 'top',
|
|
4
|
+
NONE: 'none',
|
|
5
|
+
};
|
|
6
|
+
export const LOAD_ERR_IMG_BASE64 = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSJub25lIj4KICA8cGF0aCBkPSJNMjUuMzIgMTYuMzU5N0MyNi4wNzY0IDE2LjM1OTcgMjYuODI1NCAxNi41MDg3IDI3LjUyNDMgMTYuNzk4MUMyOC4yMjMxIDE3LjA4NzYgMjguODU4MSAxNy41MTE5IDI5LjM5MjkgMTguMDQ2OEMyOS45Mjc4IDE4LjU4MTYgMzAuMzUyMSAxOS4yMTY2IDMwLjY0MTYgMTkuOTE1NEMzMC45MzEgMjAuNjE0MyAzMS4wOCAyMS4zNjMzIDMxLjA4IDIyLjExOTdDMzEuMDggMjIuODc2MSAzMC45MzEgMjMuNjI1MSAzMC42NDE2IDI0LjMyMzlDMzAuMzUyMSAyNS4wMjI4IDI5LjkyNzggMjUuNjU3OCAyOS4zOTI5IDI2LjE5MjZDMjguODU4MSAyNi43Mjc1IDI4LjIyMzEgMjcuMTUxOCAyNy41MjQzIDI3LjQ0MTJDMjYuODI1NCAyNy43MzA3IDI2LjA3NjQgMjcuODc5NyAyNS4zMiAyNy44Nzk3QzIzLjc5MjQgMjcuODc5NyAyMi4zMjczIDI3LjI3MjggMjEuMjQ3MSAyNi4xOTI2QzIwLjE2NjkgMjUuMTEyNCAxOS41NiAyMy42NDczIDE5LjU2IDIyLjExOTdDMTkuNTYgMjAuNTkyIDIwLjE2NjkgMTkuMTI3IDIxLjI0NzEgMTguMDQ2OEMyMi4zMjczIDE2Ljk2NjUgMjMuNzkyNCAxNi4zNTk3IDI1LjMyIDE2LjM1OTdaTTI4IDMuNTU5NjlWMTQuODc2OEMyNy4xNzc3IDE0LjU4NjYgMjYuMTkyIDE0LjQzODggMjUuMzIgMTQuNDM5N0MyNC4wMzEgMTQuNDM5NyAyMi44MTU3IDE0Ljc1NzEgMjEuNzQ4OCAxNS4zMTg0TDIwLjc5NTIgMTMuMTU5N0wxNi4wMjU5IDIwLjAyNzVMOC40NDU3NiAxNi40NDFMMy41NiAyMy4zOTk3SDE3Ljc0NjJDMTcuOTg2NyAyNC44MjkgMTguNjI4MiAyNi4xNjA2IDE5LjU5NTggMjcuMjM5N0gxVjMuNTU5NjlIMjhaTTI1Ljk2IDI0LjAzOTdIMjQuNjhWMjUuMzE5N0gyNS45NlYyNC4wMzk3Wk0yNS45NiAxOC45MTk3SDI0LjY4VjIzLjM5OTdIMjUuOTZWMTguOTE5N1pNNi4xMiAxMC41OTk3QzYuMTIgMTEuOTk4MSA3LjE5OTA0IDEzLjEwODUgOC42MDc2OCAxMy4xNTg0QzEwLjAyMDggMTMuMjA3NyAxMS4yNCAxMi4wNDggMTEuMjQgMTAuNTk5N0MxMS4yNCA5LjI0NjA5IDEwLjA2NDMgOC4wODU3NyA4Ljc1MjMyIDguMDQwOTdDNy4yOTU2OCA3Ljk5MTY5IDYuMTIgOS4xNTEzNyA2LjEyIDEwLjU5OTdaIiBmaWxsPSIjQkNDNEQwIj48L3BhdGg+Cjwvc3ZnPgo=';
|
|
7
|
+
export const REL_DICT = {
|
|
8
|
+
equal: 'eq',
|
|
9
|
+
unequal: 'neq',
|
|
10
|
+
include: 'search',
|
|
11
|
+
exclude: '_exclude',
|
|
12
|
+
begin_with: '_begin_with',
|
|
13
|
+
greater: 'gt',
|
|
14
|
+
greater_or_equal: 'gte',
|
|
15
|
+
bigger_or_equal: 'gte',
|
|
16
|
+
less: 'lt',
|
|
17
|
+
less_or_equal: 'lte',
|
|
18
|
+
in: 'in',
|
|
19
|
+
not_in: 'nin', // 不在多选值
|
|
20
|
+
};
|
|
21
|
+
export const emptyObject = {};
|
|
22
|
+
export const emptyArray = [];
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
24
|
+
export const noop = (() => { });
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
function isObject(value) {
|
|
3
|
+
const type = typeof value;
|
|
4
|
+
return value != null && (type === 'object' || type === 'function');
|
|
5
|
+
}
|
|
6
|
+
function debounce(func, wait, options) {
|
|
7
|
+
let lastArgs, lastThis, maxWait, result, timerId, lastCallTime;
|
|
8
|
+
let lastInvokeTime = 0;
|
|
9
|
+
let leading = false;
|
|
10
|
+
let maxing = false;
|
|
11
|
+
let trailing = true;
|
|
12
|
+
if (typeof func !== 'function') {
|
|
13
|
+
throw new TypeError('Expected a function');
|
|
14
|
+
}
|
|
15
|
+
wait = +wait || 0;
|
|
16
|
+
if (isObject(options)) {
|
|
17
|
+
leading = !!options.leading;
|
|
18
|
+
maxing = 'maxWait' in options;
|
|
19
|
+
maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;
|
|
20
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
21
|
+
}
|
|
22
|
+
function invokeFunc(time) {
|
|
23
|
+
const args = lastArgs;
|
|
24
|
+
const thisArg = lastThis;
|
|
25
|
+
lastArgs = lastThis = undefined;
|
|
26
|
+
lastInvokeTime = time;
|
|
27
|
+
result = func.apply(thisArg, args);
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
function startTimer(pendingFunc, wait) {
|
|
31
|
+
return setTimeout(pendingFunc, wait);
|
|
32
|
+
}
|
|
33
|
+
function leadingEdge(time) {
|
|
34
|
+
lastInvokeTime = time;
|
|
35
|
+
timerId = startTimer(timerExpired, wait);
|
|
36
|
+
return leading ? invokeFunc(time) : result;
|
|
37
|
+
}
|
|
38
|
+
function remainingWait(time) {
|
|
39
|
+
const timeSinceLastCall = time - lastCallTime;
|
|
40
|
+
const timeSinceLastInvoke = time - lastInvokeTime;
|
|
41
|
+
const timeWaiting = wait - timeSinceLastCall;
|
|
42
|
+
return maxing
|
|
43
|
+
? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
44
|
+
: timeWaiting;
|
|
45
|
+
}
|
|
46
|
+
function shouldInvoke(time) {
|
|
47
|
+
const timeSinceLastCall = time - lastCallTime;
|
|
48
|
+
const timeSinceLastInvoke = time - lastInvokeTime;
|
|
49
|
+
return (lastCallTime === undefined ||
|
|
50
|
+
timeSinceLastCall >= wait ||
|
|
51
|
+
timeSinceLastCall < 0 ||
|
|
52
|
+
(maxing && timeSinceLastInvoke >= maxWait));
|
|
53
|
+
}
|
|
54
|
+
function timerExpired() {
|
|
55
|
+
const time = Date.now();
|
|
56
|
+
if (shouldInvoke(time)) {
|
|
57
|
+
return trailingEdge(time);
|
|
58
|
+
}
|
|
59
|
+
timerId = startTimer(timerExpired, remainingWait(time));
|
|
60
|
+
}
|
|
61
|
+
function trailingEdge(time) {
|
|
62
|
+
timerId = undefined;
|
|
63
|
+
if (trailing && lastArgs) {
|
|
64
|
+
return invokeFunc(time);
|
|
65
|
+
}
|
|
66
|
+
lastArgs = lastThis = undefined;
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
//debouncedFunc
|
|
70
|
+
function debounced(...args) {
|
|
71
|
+
const time = Date.now();
|
|
72
|
+
const isInvoking = shouldInvoke(time);
|
|
73
|
+
lastArgs = args;
|
|
74
|
+
lastThis = this;
|
|
75
|
+
lastCallTime = time;
|
|
76
|
+
if (isInvoking) {
|
|
77
|
+
if (timerId === undefined) {
|
|
78
|
+
return leadingEdge(lastCallTime);
|
|
79
|
+
}
|
|
80
|
+
if (maxing) {
|
|
81
|
+
timerId = startTimer(timerExpired, wait);
|
|
82
|
+
return invokeFunc(lastCallTime);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (timerId === undefined) {
|
|
86
|
+
timerId = startTimer(timerExpired, wait);
|
|
87
|
+
}
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
return debounced;
|
|
91
|
+
}
|
|
92
|
+
export default debounce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getLocalCounter(): number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 根据_id查询部门数据
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export function getDepartById(data: any): Promise<any>;
|
|
6
|
+
export function initRootOrgs(data: any): Promise<any>;
|
|
7
|
+
export function getDeparts(data: any): Promise<any>;
|
|
8
|
+
export function searchByCondition(data: any): Promise<any>;
|
|
9
|
+
export function defaultRequest(action: any, params: any, type?: any): Promise<any>;
|
|
10
|
+
export function getDataSourceByName(dbName: any): Promise<any>;
|
|
11
|
+
export function getUserInfo(): Promise<any>;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { callWedaApi, callDataSource } from './tcb';
|
|
2
|
+
/**
|
|
3
|
+
* 默认请求统一处理方法
|
|
4
|
+
* @param {*} action
|
|
5
|
+
* @param {*} params
|
|
6
|
+
* @param {*} type
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export const defaultRequest = async (action, params, type = 'callWedaApi') => {
|
|
10
|
+
try {
|
|
11
|
+
if (type === 'callWedaApi') {
|
|
12
|
+
const res = await callWedaApi({
|
|
13
|
+
action: action,
|
|
14
|
+
data: params,
|
|
15
|
+
});
|
|
16
|
+
return res;
|
|
17
|
+
}
|
|
18
|
+
else if (type === 'callDataSource' && action === 'getUserById') {
|
|
19
|
+
const datasource = await getDataSourceByName('sys_user');
|
|
20
|
+
const userInfoList = [];
|
|
21
|
+
let pageNo = 1;
|
|
22
|
+
const setInitUserDataHandle = async () => {
|
|
23
|
+
const res = await callWedaApi({
|
|
24
|
+
action: 'DescribeWedaUserList',
|
|
25
|
+
data: {
|
|
26
|
+
pageNo: pageNo,
|
|
27
|
+
pageSize: 100,
|
|
28
|
+
UserIds: (params === null || params === void 0 ? void 0 : params.idList) || [],
|
|
29
|
+
UserType: 'internalUser',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const resData = ((res === null || res === void 0 ? void 0 : res.UserList) || []).map((item) => {
|
|
33
|
+
const userInfo = JSON.parse(item === null || item === void 0 ? void 0 : item.UserExtend) || {};
|
|
34
|
+
return {
|
|
35
|
+
value: item === null || item === void 0 ? void 0 : item.UserId,
|
|
36
|
+
data: {
|
|
37
|
+
content: userInfo[datasource === null || datasource === void 0 ? void 0 : datasource.schema['x-primary-column']] ||
|
|
38
|
+
(item === null || item === void 0 ? void 0 : item.UserId),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
userInfoList.push.apply(userInfoList, resData);
|
|
43
|
+
if ((res === null || res === void 0 ? void 0 : res.Total) > pageNo * 100) {
|
|
44
|
+
pageNo += 1;
|
|
45
|
+
await setInitUserDataHandle();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
(params === null || params === void 0 ? void 0 : params.idList.length) > 0 && (await setInitUserDataHandle());
|
|
49
|
+
return userInfoList;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error(action + '错误', error);
|
|
54
|
+
throw errorHandle(error, action);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* 获取用户表schema
|
|
59
|
+
*/
|
|
60
|
+
export const getDataSourceByName = async (dbName) => {
|
|
61
|
+
// dbName 为空时
|
|
62
|
+
if (!dbName)
|
|
63
|
+
return;
|
|
64
|
+
const datasource = await window.app.cloud.getDataSourceProfile(dbName);
|
|
65
|
+
return datasource;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 根据_id查询部门数据
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
export async function getDepartById(data) {
|
|
72
|
+
try {
|
|
73
|
+
const datasource = await getDataSourceByName('sys_department');
|
|
74
|
+
const res = await callDataSource({
|
|
75
|
+
dataSourceName: 'sys_department',
|
|
76
|
+
methodName: 'wedaGetItem',
|
|
77
|
+
params: data,
|
|
78
|
+
});
|
|
79
|
+
return res[datasource === null || datasource === void 0 ? void 0 : datasource.schema['x-primary-column']] || (res === null || res === void 0 ? void 0 : res._id);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
console.error('错误', error);
|
|
83
|
+
throw errorHandle(error, 'getDepartById');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 获取当前登录人信息
|
|
88
|
+
* */
|
|
89
|
+
export const getUserInfo = () => {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const userInfo = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.getUserInfo();
|
|
92
|
+
return Promise.resolve(userInfo);
|
|
93
|
+
};
|
|
94
|
+
/*
|
|
95
|
+
* 初始化加载部门数据
|
|
96
|
+
* @author servernnyu
|
|
97
|
+
*/
|
|
98
|
+
export async function initRootOrgs(data) {
|
|
99
|
+
try {
|
|
100
|
+
const res = await callWedaApi({
|
|
101
|
+
action: 'InitRootOrgs',
|
|
102
|
+
data,
|
|
103
|
+
});
|
|
104
|
+
return res;
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
console.error('错误', error);
|
|
108
|
+
throw errorHandle(error, 'InitRootOrgs');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/*
|
|
112
|
+
* 懒加载部门数据 LazyDescribeOrgs
|
|
113
|
+
* OrgId:组织架构Id,为根节点就不传了,我就会去查根节点
|
|
114
|
+
* DescribeCondition:查询条件,现在可以传{"Key":"NeedUser","Value": "true"}
|
|
115
|
+
*/
|
|
116
|
+
export async function getDeparts(data) {
|
|
117
|
+
try {
|
|
118
|
+
const res = await callWedaApi({
|
|
119
|
+
action: 'LazyDescribeOrgs',
|
|
120
|
+
data,
|
|
121
|
+
});
|
|
122
|
+
return res;
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
console.error('错误', error);
|
|
126
|
+
throw errorHandle(error, 'LazyDescribeOrgs');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/*
|
|
130
|
+
SearchByCondition接口
|
|
131
|
+
入参:
|
|
132
|
+
KeyWords:关键词
|
|
133
|
+
SearchCondition:搜索条件,当前要传俩,一个是是否关联用户同上,一个是SeachType,SearchByRole和SearchByOrg, NeedUser
|
|
134
|
+
*/
|
|
135
|
+
export async function searchByCondition(data) {
|
|
136
|
+
try {
|
|
137
|
+
const res = await callWedaApi({
|
|
138
|
+
action: 'SearchByCondition',
|
|
139
|
+
data,
|
|
140
|
+
});
|
|
141
|
+
return res;
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
console.error('错误', error);
|
|
145
|
+
throw errorHandle(error, 'SearchByCondition');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const errorHandle = (error, action) => {
|
|
149
|
+
var _a;
|
|
150
|
+
if (error === null || error === void 0 ? void 0 : error.result) {
|
|
151
|
+
return `${(_a = error === null || error === void 0 ? void 0 : error.result) === null || _a === void 0 ? void 0 : _a.message}(${action}${error === null || error === void 0 ? void 0 : error.requestId})`;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
return `${action}(${error === null || error === void 0 ? void 0 : error.message})`;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import isEqual from 'lodash.isequal';
|
|
2
|
+
export function serde(a) {
|
|
3
|
+
return JSON.parse(JSON.stringify(a));
|
|
4
|
+
}
|
|
5
|
+
const isObj = (a) => typeof a === 'object' && a !== null;
|
|
6
|
+
export default function (a, b, shouldSerde = false) {
|
|
7
|
+
if (shouldSerde && isObj(a) && isObj(b)) {
|
|
8
|
+
// for Proxy created by mbox
|
|
9
|
+
return isEqual(serde(a), serde(b));
|
|
10
|
+
}
|
|
11
|
+
return isEqual(a, b);
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isNil: (val: unknown) => val is null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function usePlatform(): "h5" | "pc";
|
|
2
|
+
/**
|
|
3
|
+
* 在h5下,判断当前是否是移动浏览器
|
|
4
|
+
*/
|
|
5
|
+
export function inH5IsMobile(): boolean;
|
|
6
|
+
export function isH5Platform(): boolean;
|
|
7
|
+
export function isCloudFileID(url: any): boolean;
|
|
8
|
+
export function isHttpFileID(url: any): boolean;
|
|
9
|
+
export function filterStrList(value: any): any[];
|
|
10
|
+
export function transSize(size: any): string;
|
|
11
|
+
export function downloadFile(url: any): void;
|
|
12
|
+
export function cutFileTitle(str?: string, count?: number): string;
|
|
13
|
+
export function isInIde(): boolean;
|
|
14
|
+
export function resolveStaticResourceUrl(path: any): any;
|
|
15
|
+
export function transFileCloudidToName(fileID: any): string;
|
|
16
|
+
export function isUrl(path: any): boolean;
|
|
17
|
+
export function randomStr(len?: number): string;
|
|
18
|
+
export function getWhereList(where: any): any[];
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { useMediaQuery } from '@react-hookz/web';
|
|
2
|
+
import { REL_DICT } from './constant';
|
|
3
|
+
/**
|
|
4
|
+
* 当前环境是否为 H5 端
|
|
5
|
+
*/
|
|
6
|
+
export const isH5Platform = () => {
|
|
7
|
+
var _a;
|
|
8
|
+
if (window.matchMedia) {
|
|
9
|
+
return (_a = window.matchMedia('(max-width: 1024px)')) === null || _a === void 0 ? void 0 : _a.matches;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
let is = false;
|
|
13
|
+
try {
|
|
14
|
+
const ua = navigator && navigator.userAgent;
|
|
15
|
+
is = /Android|webOS|BlackBerry|iPhone|iPad|iPod|iOS/i.test(ua);
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
null;
|
|
19
|
+
}
|
|
20
|
+
return is;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 判断当前是否是 cloud 开头的文件协议
|
|
25
|
+
*/
|
|
26
|
+
export const isCloudFileID = (url) => {
|
|
27
|
+
return /^cloud:\/\/.*/.test(url);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 判断当前是否是 http/https 开头的文件协议
|
|
31
|
+
*/
|
|
32
|
+
export const isHttpFileID = (url) => {
|
|
33
|
+
return /^http(s?):\/\/.*/.test(url);
|
|
34
|
+
};
|
|
35
|
+
export function usePlatform() {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
const smallScreen = (_a = useMediaQuery('(max-width: 992px)')) !== null && _a !== void 0 ? _a : isH5Platform();
|
|
38
|
+
const touchDevice = (_b = useMediaQuery('(pointer:coarse)')) !== null && _b !== void 0 ? _b : smallScreen;
|
|
39
|
+
// 非高精度指针(鼠标)就直接 h5, 否则当屏幕小于992 时用h5
|
|
40
|
+
return touchDevice || smallScreen ? 'h5' : 'pc';
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 在h5下,判断当前是否是移动浏览器
|
|
44
|
+
*/
|
|
45
|
+
export function inH5IsMobile() {
|
|
46
|
+
try {
|
|
47
|
+
// 区分h5是在编辑器还是移动浏览器
|
|
48
|
+
let is_mobile_ua = false;
|
|
49
|
+
const ua = navigator && navigator.userAgent;
|
|
50
|
+
is_mobile_ua = /Android|webOS|BlackBerry|iPhone|iPad|iPod|iOS/i.test(ua);
|
|
51
|
+
return is_mobile_ua;
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
console.log('isMobile err', e);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 过滤非字符串,返回字符串数组
|
|
59
|
+
* 用于兼容单个组件和组件数组
|
|
60
|
+
*/
|
|
61
|
+
export const filterStrList = (value) => {
|
|
62
|
+
return [].concat(value).filter((d) => typeof d === 'string' && d !== '');
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* 文件字节转换
|
|
66
|
+
*/
|
|
67
|
+
export const transSize = (size) => {
|
|
68
|
+
const b = parseInt(size) || 0;
|
|
69
|
+
const getBig = (d) => Math.ceil(d / 1024) || 0;
|
|
70
|
+
if (b < 1024) {
|
|
71
|
+
return `${size}B`;
|
|
72
|
+
}
|
|
73
|
+
const k = getBig(size);
|
|
74
|
+
if (k < 1024) {
|
|
75
|
+
return `${k}K`;
|
|
76
|
+
}
|
|
77
|
+
const m = getBig(k);
|
|
78
|
+
if (m < 1024) {
|
|
79
|
+
return `${m}M`;
|
|
80
|
+
}
|
|
81
|
+
const g = getBig(m);
|
|
82
|
+
return `${g}G`;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 链接转换为下载
|
|
86
|
+
*/
|
|
87
|
+
export const downloadFile = (url) => {
|
|
88
|
+
if (!url) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const urlObj = new URL(url);
|
|
92
|
+
urlObj.searchParams.append('response-content-disposition', 'attawchment');
|
|
93
|
+
const urls = urlObj.toString();
|
|
94
|
+
window.open(urls);
|
|
95
|
+
// 定时清object https://github.com/eligrey/FileSaver.js/blob/9806041b0e800979dddabbaa1b5f6ce6952d7cd7/src/FileSaver.js#L106
|
|
96
|
+
// eslint-disable-next-line rulesdir/no-timer
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
window.URL.revokeObjectURL(urls);
|
|
99
|
+
}, 0);
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* 文件名截取,保留后缀类型
|
|
103
|
+
*/
|
|
104
|
+
export const cutFileTitle = (str = '', count = 10) => {
|
|
105
|
+
let [title, type] = [str, ''];
|
|
106
|
+
const dotIndex = `${str}`.lastIndexOf('.');
|
|
107
|
+
if (dotIndex > -1) {
|
|
108
|
+
type = str.slice(dotIndex + 1);
|
|
109
|
+
title = str.slice(0, dotIndex);
|
|
110
|
+
}
|
|
111
|
+
if (title.length > count) {
|
|
112
|
+
title = `${title.slice(0, 7)}...${title.slice(-3)}`;
|
|
113
|
+
}
|
|
114
|
+
if (type) {
|
|
115
|
+
title = `${title}.${type}`;
|
|
116
|
+
}
|
|
117
|
+
return title;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* 判断是否在 ide 中
|
|
121
|
+
*/
|
|
122
|
+
export const isInIde = () => { var _a, _b; return !!((_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.cloud) === null || _b === void 0 ? void 0 : _b.IS_WEDA_IDE); };
|
|
123
|
+
/**
|
|
124
|
+
* 解析素材资源
|
|
125
|
+
*/
|
|
126
|
+
export const resolveStaticResourceUrl = (path) => {
|
|
127
|
+
var _a, _b;
|
|
128
|
+
try {
|
|
129
|
+
// eslint-disable-next-line no-unsafe-optional-chaining
|
|
130
|
+
const resourceUrl = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.__internal__) === null || _b === void 0 ? void 0 : _b.resolveStaticResourceUrl(path);
|
|
131
|
+
return resourceUrl;
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
return '';
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* cloudid和文件名转换
|
|
139
|
+
*/
|
|
140
|
+
export const transFileCloudidToName = (fileID) => {
|
|
141
|
+
const uuidReg = /(file-)?[0-9a-f]{8}((-)?[0-9a-f]{4}){3}(-)?[0-9a-f]{12}-/;
|
|
142
|
+
const lastIndex = `${fileID}`.lastIndexOf('/');
|
|
143
|
+
const name = `${fileID}`.slice(lastIndex + 1);
|
|
144
|
+
const title = name.replace(uuidReg, '');
|
|
145
|
+
return title;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* 判断是否是url
|
|
149
|
+
*/
|
|
150
|
+
const reg =
|
|
151
|
+
// eslint-disable-next-line no-useless-escape
|
|
152
|
+
/(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
|
|
153
|
+
export const isUrl = (path) => reg.test(path);
|
|
154
|
+
/**
|
|
155
|
+
* 生成随机数
|
|
156
|
+
*/
|
|
157
|
+
export const randomStr = (len = 32) => {
|
|
158
|
+
const s = [];
|
|
159
|
+
const hexDigits = '0123456789abcdef';
|
|
160
|
+
const dictLen = hexDigits.length;
|
|
161
|
+
for (var i = 0; i < len; i++) {
|
|
162
|
+
const index = Math.floor(Math.random() * dictLen);
|
|
163
|
+
s[i] = hexDigits[index];
|
|
164
|
+
}
|
|
165
|
+
const result = s.join('');
|
|
166
|
+
return result;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* 根据编辑器传入数据筛选条件,转换接口参数条件
|
|
170
|
+
*/
|
|
171
|
+
export const getWhereList = (where) => {
|
|
172
|
+
const result = [];
|
|
173
|
+
Array.isArray(where) &&
|
|
174
|
+
where.forEach((item1) => {
|
|
175
|
+
if ((item1 === null || item1 === void 0 ? void 0 : item1.groupLogic) !== 'or' && Array.isArray(item1 === null || item1 === void 0 ? void 0 : item1.logicData)) {
|
|
176
|
+
item1 === null || item1 === void 0 ? void 0 : item1.logicData.forEach((item2) => {
|
|
177
|
+
let [rel, val] = [REL_DICT[item2 === null || item2 === void 0 ? void 0 : item2.rel], item2 === null || item2 === void 0 ? void 0 : item2.value];
|
|
178
|
+
if ('_begin_with' === rel) {
|
|
179
|
+
rel = 'regex';
|
|
180
|
+
val = `^${val}`;
|
|
181
|
+
}
|
|
182
|
+
if ('_exclude' === rel) {
|
|
183
|
+
rel = 'regex';
|
|
184
|
+
val = `^((?!${val}).)*$`;
|
|
185
|
+
}
|
|
186
|
+
if ((item2 === null || item2 === void 0 ? void 0 : item2.logic) !== 'or' && (item2 === null || item2 === void 0 ? void 0 : item2.key) && rel && val !== undefined) {
|
|
187
|
+
result.push({ key: item2.key, rel, val });
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
return result;
|
|
193
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 云存储/云函数相关
|
|
3
|
+
*/
|
|
4
|
+
export declare function getCloudInstance(): Promise<any>;
|
|
5
|
+
/**
|
|
6
|
+
* 获取单个临时链接
|
|
7
|
+
* 单个cos文件,返回字符串
|
|
8
|
+
* 多个cos文件,返回 {fileID: src} 这样的对象
|
|
9
|
+
*/
|
|
10
|
+
export declare function getTempFileURL(data: any): Promise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* 云函数获取数据
|
|
13
|
+
*/
|
|
14
|
+
export declare function callDataSource(param: {
|
|
15
|
+
dataSourceName: string;
|
|
16
|
+
methodName: string;
|
|
17
|
+
params: Record<string, unknown>;
|
|
18
|
+
viewId?: string;
|
|
19
|
+
}, throwError?: boolean): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* 云函数获取连接器数据
|
|
22
|
+
*/
|
|
23
|
+
export declare function callConnector(param: any, throwError?: boolean): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* 云API:获取用户自定义导航内容
|
|
26
|
+
* param
|
|
27
|
+
* WeAppId: string,
|
|
28
|
+
* EnvId: string,
|
|
29
|
+
* PublishType?: string,
|
|
30
|
+
*/
|
|
31
|
+
export declare function getAppCustomNav(): Promise<any>;
|
|
32
|
+
export declare function callWedaApi(...args: any[]): any;
|
|
33
|
+
export declare const getDataSourceByName: (dbName: any) => Promise<any>;
|