@cloudbase/weda-ui 3.3.0 → 3.3.2
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 +281 -47
- package/dist/configs/components/chart/line.json +245 -48
- package/dist/configs/components/chart/pie.json +227 -42
- package/dist/configs/components/dataView.json +9 -1
- package/dist/configs/components/form/form.json +4 -0
- package/dist/configs/components/form/select.json +18 -0
- package/dist/docs/common/tableView.js +0 -3
- package/dist/setupTests.d.ts +2 -1
- package/dist/setupTests.js +6 -1
- package/dist/web/actions/showModal/index.js +0 -1
- package/dist/web/components/calendar/index.js +40 -38
- package/dist/web/components/carousel/index.js +62 -62
- package/dist/web/components/chart/bar/index.d.ts +2 -40
- package/dist/web/components/chart/bar/index.js +44 -55
- package/dist/{src/web → web}/components/chart/bar/index.old.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/bar/index.old.js +0 -0
- package/dist/{src/web → web}/components/chart/common/Chart.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/common/Chart.js +0 -0
- package/dist/{src/web → web}/components/chart/common/chart-custom-connector.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/common/chart-custom-connector.js +0 -0
- package/dist/{src/web → web}/components/chart/common/chart-error.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/common/chart-error.js +0 -0
- package/dist/web/components/chart/common/core/eChartBar.d.ts +1 -3
- package/dist/web/components/chart/common/core/eChartBar.js +6 -3
- package/dist/web/components/chart/common/core/eChartBase.d.ts +2 -3
- package/dist/web/components/chart/common/core/eChartBase.js +47 -5
- package/dist/web/components/chart/common/core/eChartLine.d.ts +1 -3
- package/dist/web/components/chart/common/core/eChartLine.js +6 -3
- package/dist/web/components/chart/common/core/eChartPie.d.ts +1 -3
- package/dist/web/components/chart/common/core/eChartPie.js +6 -3
- package/dist/{src/web → web}/components/chart/common/data-transform.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/common/data-transform.js +0 -0
- package/dist/web/components/chart/common/echarts.d.ts +3 -0
- package/dist/web/components/chart/common/useChart.js +23 -11
- package/dist/web/components/chart/line/index.d.ts +2 -38
- package/dist/web/components/chart/line/index.js +41 -52
- package/dist/{src/web → web}/components/chart/line/index.old.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/line/index.old.js +0 -0
- package/dist/web/components/chart/pie/index.d.ts +2 -26
- package/dist/web/components/chart/pie/index.js +41 -39
- package/dist/{src/web → web}/components/chart/pie/index.old.d.ts +0 -0
- package/dist/{src/web → web}/components/chart/pie/index.old.js +0 -0
- package/dist/{src/web → web}/components/common/error-boundary.d.ts +0 -0
- package/dist/{src/web → web}/components/common/error-boundary.js +0 -0
- package/dist/{src/web → web}/components/common/portal.d.ts +0 -0
- package/dist/{src/web → web}/components/common/portal.js +0 -0
- package/dist/{src/web → web}/components/common/use-loop-render-detect.d.ts +0 -0
- package/dist/{src/web → web}/components/common/use-loop-render-detect.js +0 -0
- package/dist/web/components/form/checkbox/index.js +29 -29
- package/dist/web/components/form/enumSelect/MultipleSelect.d.ts +2 -2
- package/dist/web/components/form/enumSelect/NormalSelect.d.ts +2 -2
- package/dist/web/components/form/enumSelect/index.d.ts +2 -2
- package/dist/web/components/form/enumSelect/props/propsTypes.d.ts +2 -2
- package/dist/web/components/form/form/index.js +46 -0
- package/dist/web/components/form/input/index.js +13 -5
- package/dist/web/components/form/location/common/mapChoose.js +7 -6
- package/dist/web/components/form/location/common/mapView.js +9 -6
- package/dist/web/components/form/location/common/propsConfig.d.ts +1 -1
- package/dist/{src/web → web}/components/form/location/common/tmap.d.ts +0 -0
- package/dist/{src/web → web}/components/form/location/common/tmap.js +0 -0
- package/dist/web/components/form/location/common/useLocationInfo.d.ts +1 -1
- package/dist/web/components/form/location/common/useLocationInfo.js +3 -2
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +6 -3
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +5 -1
- package/dist/web/components/form/location/index.js +7 -0
- package/dist/web/components/form/radio/index.js +3 -3
- package/dist/{src/web → web}/components/form/select/allTimePicker/calendar.d.ts +0 -0
- package/dist/{src/web → web}/components/form/select/allTimePicker/calendar.js +0 -0
- package/dist/{src/web → web}/components/form/select/allTimePicker/dataUtils.d.ts +0 -0
- package/dist/{src/web → web}/components/form/select/allTimePicker/dataUtils.js +0 -0
- package/dist/{src/web → web}/components/form/select/allTimePicker/index.d.ts +0 -0
- package/dist/{src/web → web}/components/form/select/allTimePicker/index.js +0 -0
- package/dist/web/components/form/select/h5.d.ts +1 -1
- package/dist/web/components/form/select/h5.js +63 -7
- package/dist/web/components/form/select/index.d.ts +3 -2
- package/dist/web/components/form/select/index.js +25 -2
- package/dist/web/components/form/select/use-options.js +1 -1
- package/dist/web/components/form/select/year.js +1 -1
- package/dist/web/components/form/switch/index.js +2 -2
- package/dist/web/components/form/textarea/index.js +1 -1
- package/dist/web/components/form/uploader/uploader.h5.js +17 -42
- package/dist/web/components/form/uploader/uploader.pc.js +22 -28
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +18 -25
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +12 -23
- package/dist/web/components/form/userOrgSelect/comTool.d.ts +1 -0
- package/dist/web/components/form/userOrgSelect/comTool.js +25 -13
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +2 -3
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +65 -64
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +2 -2
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +41 -37
- package/dist/{src/web → web}/components/form/userOrgSelect/getUserService.d.ts +0 -0
- package/dist/{src/web → web}/components/form/userOrgSelect/getUserService.js +0 -0
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +7 -4
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +62 -58
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +4 -4
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.js +133 -109
- package/dist/web/components/form/userOrgSelect/utils.d.ts +3 -2
- package/dist/web/components/form/userOrgSelect/utils.js +24 -16
- package/dist/web/components/formdetail/index.js +14 -11
- package/dist/web/components/graphicCard/index.d.ts +16 -1
- package/dist/web/components/graphicCard/index.js +42 -30
- package/dist/web/components/image/index.js +4 -18
- package/dist/web/components/index.js +3 -1
- package/dist/web/components/listView/index.js +20 -9
- package/dist/web/components/lottery/index.js +10 -16
- package/dist/web/components/lottery/lotteryUtil.js +1 -1
- package/dist/web/components/modal/index.js +1 -1
- package/dist/web/components/navLayout/index.d.ts +16 -1
- package/dist/web/components/navLayout/index.js +31 -20
- package/dist/web/components/navigationBar/horizontalMenu.js +1 -1
- package/dist/web/components/navigationBar/index.js +13 -8
- package/dist/web/components/richText/index.js +1 -2
- package/dist/web/components/richTextView/index.js +20 -18
- package/dist/web/components/scrollView/index.d.ts +1 -2
- package/dist/web/components/scrollView/index.js +7 -5
- package/dist/web/components/swiper/index.js +62 -62
- package/dist/web/components/tabs/index.js +6 -1
- package/dist/web/components/tabs/tabs.h5.js +2 -0
- package/dist/web/components/text/index.js +10 -8
- package/dist/web/components/uploaderFileView/index.js +3 -18
- package/dist/web/components/uploaderView/index.js +1 -1
- package/dist/web/components/wedaVideo/index.js +21 -25
- package/dist/{src/web → web}/utils/console.d.ts +0 -0
- package/dist/{src/web → web}/utils/console.js +0 -0
- package/dist/web/utils/platform.js +1 -1
- package/dist/web/utils/tcb.d.ts +12 -6
- package/dist/web/utils/tcb.js +13 -0
- package/dist/web/utils/use-cloud-id-temp-url.js +3 -1
- package/dist/web/utils/useSyncValue.js +1 -0
- package/package.json +1 -1
- package/dist/cypress/support/commands.d.ts +0 -1
- package/dist/cypress/support/commands.js +0 -40
- package/dist/cypress/support/e2e.d.ts +0 -24
- package/dist/cypress/support/e2e.js +0 -22
- package/dist/src/configs/actions/showModal.json +0 -48
- package/dist/src/configs/actions/showToast.json +0 -41
- package/dist/src/configs/components/auth.json +0 -16
- package/dist/src/configs/components/button.json +0 -239
- package/dist/src/configs/components/calendar.json +0 -81
- package/dist/src/configs/components/carousel.json +0 -292
- package/dist/src/configs/components/chart/bar.json +0 -962
- package/dist/src/configs/components/chart/line.json +0 -878
- package/dist/src/configs/components/chart/pie.json +0 -685
- package/dist/src/configs/components/chart/statisticsCard.json +0 -376
- package/dist/src/configs/components/container.json +0 -50
- package/dist/src/configs/components/dataView.json +0 -247
- package/dist/src/configs/components/drawer.json +0 -115
- package/dist/src/configs/components/form/checkbox.json +0 -179
- package/dist/src/configs/components/form/departTreeSelect.json +0 -124
- package/dist/src/configs/components/form/form.json +0 -73
- package/dist/src/configs/components/form/input.json +0 -154
- package/dist/src/configs/components/form/location.json +0 -216
- package/dist/src/configs/components/form/radio.json +0 -203
- package/dist/src/configs/components/form/richText.json +0 -133
- package/dist/src/configs/components/form/select.json +0 -449
- package/dist/src/configs/components/form/switch.json +0 -58
- package/dist/src/configs/components/form/textarea.json +0 -116
- package/dist/src/configs/components/form/tips.json +0 -34
- package/dist/src/configs/components/form/uploader.json +0 -171
- package/dist/src/configs/components/form/uploaderFile.json +0 -158
- package/dist/src/configs/components/form/userTreeSelect.json +0 -128
- package/dist/src/configs/components/formdetail.json +0 -105
- package/dist/src/configs/components/graphicCard.json +0 -413
- package/dist/src/configs/components/image.json +0 -187
- package/dist/src/configs/components/link.json +0 -79
- package/dist/src/configs/components/listView.json +0 -378
- package/dist/src/configs/components/lottery.json +0 -163
- package/dist/src/configs/components/modal.json +0 -72
- package/dist/src/configs/components/navLayout.json +0 -368
- package/dist/src/configs/components/navigationBar.json +0 -62
- package/dist/src/configs/components/richtextview.json +0 -26
- package/dist/src/configs/components/scrollVeiw.json +0 -253
- package/dist/src/configs/components/slot.json +0 -17
- package/dist/src/configs/components/swiper.json +0 -90
- package/dist/src/configs/components/tabs.json +0 -122
- package/dist/src/configs/components/text.json +0 -95
- package/dist/src/configs/components/wedaVideo.json +0 -89
- package/dist/src/configs/components/wxOpenApi/phone.json +0 -127
- package/dist/src/configs/components/wxOpenApi/phoneCode.json +0 -109
- package/dist/src/configs/components/wxOpenApi/share.json +0 -160
- package/dist/src/configs/components/wxOpenApi/userInfo.json +0 -156
- package/dist/src/configs/index.d.ts +0 -103
- package/dist/src/configs/index.js +0 -111
- package/dist/src/docs/common/format.d.ts +0 -13
- package/dist/src/docs/common/format.js +0 -122
- package/dist/src/docs/common/tableView.d.ts +0 -30
- package/dist/src/docs/common/tableView.js +0 -156
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +0 -3
- package/dist/src/setupTests.d.ts +0 -2
- package/dist/src/setupTests.js +0 -19
- package/dist/src/web/actions/index.d.ts +0 -2
- package/dist/src/web/actions/index.js +0 -2
- package/dist/src/web/actions/showModal/index.d.ts +0 -4
- package/dist/src/web/actions/showModal/index.js +0 -66
- package/dist/src/web/actions/showToast/index.d.ts +0 -1
- package/dist/src/web/actions/showToast/index.js +0 -3
- package/dist/src/web/components/button/index.d.ts +0 -32
- package/dist/src/web/components/button/index.js +0 -48
- package/dist/src/web/components/calendar/index.d.ts +0 -19
- package/dist/src/web/components/calendar/index.js +0 -191
- package/dist/src/web/components/calendar/util.d.ts +0 -13
- package/dist/src/web/components/calendar/util.js +0 -74
- package/dist/src/web/components/carousel/index.d.ts +0 -41
- package/dist/src/web/components/carousel/index.js +0 -244
- package/dist/src/web/components/chart/bar/index.d.ts +0 -3
- package/dist/src/web/components/chart/bar/index.js +0 -45
- package/dist/src/web/components/chart/common/config/bar.d.ts +0 -48
- package/dist/src/web/components/chart/common/config/bar.js +0 -49
- package/dist/src/web/components/chart/common/config/global.d.ts +0 -13
- package/dist/src/web/components/chart/common/config/global.js +0 -16
- package/dist/src/web/components/chart/common/config/line.d.ts +0 -46
- package/dist/src/web/components/chart/common/config/line.js +0 -49
- package/dist/src/web/components/chart/common/config/pie.d.ts +0 -29
- package/dist/src/web/components/chart/common/config/pie.js +0 -36
- package/dist/src/web/components/chart/common/core/eChartBar.d.ts +0 -66
- package/dist/src/web/components/chart/common/core/eChartBar.js +0 -201
- package/dist/src/web/components/chart/common/core/eChartBase.d.ts +0 -127
- package/dist/src/web/components/chart/common/core/eChartBase.js +0 -394
- package/dist/src/web/components/chart/common/core/eChartLine.d.ts +0 -60
- package/dist/src/web/components/chart/common/core/eChartLine.js +0 -173
- package/dist/src/web/components/chart/common/core/eChartPie.d.ts +0 -48
- package/dist/src/web/components/chart/common/core/eChartPie.js +0 -135
- package/dist/src/web/components/chart/common/core/type.d.ts +0 -35
- package/dist/src/web/components/chart/common/core/type.js +0 -9
- package/dist/src/web/components/chart/common/echarts.d.ts +0 -5
- package/dist/src/web/components/chart/common/echarts.js +0 -24
- package/dist/src/web/components/chart/common/error-boundary.d.ts +0 -5
- package/dist/src/web/components/chart/common/error-boundary.js +0 -26
- package/dist/src/web/components/chart/common/useChart.d.ts +0 -8
- package/dist/src/web/components/chart/common/useChart.js +0 -72
- package/dist/src/web/components/chart/line/index.d.ts +0 -3
- package/dist/src/web/components/chart/line/index.js +0 -42
- package/dist/src/web/components/chart/pie/index.d.ts +0 -3
- package/dist/src/web/components/chart/pie/index.js +0 -42
- package/dist/src/web/components/chart/statisticsCard/index.d.ts +0 -85
- package/dist/src/web/components/chart/statisticsCard/index.js +0 -203
- package/dist/src/web/components/chart/statisticsCard/interface.d.ts +0 -13
- package/dist/src/web/components/chart/statisticsCard/interface.js +0 -1
- package/dist/src/web/components/container/index.d.ts +0 -6
- package/dist/src/web/components/container/index.js +0 -6
- package/dist/src/web/components/dataView/index.d.ts +0 -6
- package/dist/src/web/components/dataView/index.js +0 -8
- package/dist/src/web/components/dataView/interface.d.ts +0 -5
- package/dist/src/web/components/dataView/interface.js +0 -1
- package/dist/src/web/components/drawer/index.d.ts +0 -13
- package/dist/src/web/components/drawer/index.js +0 -12
- package/dist/src/web/components/form/checkbox/index.d.ts +0 -13
- package/dist/src/web/components/form/checkbox/index.js +0 -167
- package/dist/src/web/components/form/enumSelect/MultipleSelect.d.ts +0 -78
- package/dist/src/web/components/form/enumSelect/MultipleSelect.js +0 -52
- package/dist/src/web/components/form/enumSelect/NormalSelect.d.ts +0 -83
- package/dist/src/web/components/form/enumSelect/NormalSelect.js +0 -52
- package/dist/src/web/components/form/enumSelect/SelectContainer.d.ts +0 -16
- package/dist/src/web/components/form/enumSelect/SelectContainer.js +0 -30
- package/dist/src/web/components/form/enumSelect/index.d.ts +0 -82
- package/dist/src/web/components/form/enumSelect/index.js +0 -6
- package/dist/src/web/components/form/enumSelect/props/defaultProps.d.ts +0 -34
- package/dist/src/web/components/form/enumSelect/props/defaultProps.js +0 -40
- package/dist/src/web/components/form/enumSelect/props/propsTypes.d.ts +0 -39
- package/dist/src/web/components/form/enumSelect/props/propsTypes.js +0 -47
- package/dist/src/web/components/form/form/index.d.ts +0 -32
- package/dist/src/web/components/form/form/index.js +0 -150
- package/dist/src/web/components/form/formcell/index.d.ts +0 -8
- package/dist/src/web/components/form/formcell/index.js +0 -40
- package/dist/src/web/components/form/input/index.d.ts +0 -14
- package/dist/src/web/components/form/input/index.js +0 -94
- package/dist/src/web/components/form/location/common/mapChoose.d.ts +0 -15
- package/dist/src/web/components/form/location/common/mapChoose.js +0 -496
- package/dist/src/web/components/form/location/common/mapView.d.ts +0 -19
- package/dist/src/web/components/form/location/common/mapView.js +0 -175
- package/dist/src/web/components/form/location/common/propsConfig.d.ts +0 -59
- package/dist/src/web/components/form/location/common/propsConfig.js +0 -50
- package/dist/src/web/components/form/location/common/selectModal.d.ts +0 -21
- package/dist/src/web/components/form/location/common/selectModal.js +0 -44
- package/dist/src/web/components/form/location/common/useLocationInfo.d.ts +0 -36
- package/dist/src/web/components/form/location/common/useLocationInfo.js +0 -105
- package/dist/src/web/components/form/location/components/LocationH5/location.h5.d.ts +0 -8
- package/dist/src/web/components/form/location/components/LocationH5/location.h5.js +0 -328
- package/dist/src/web/components/form/location/components/LocationPC/Header.d.ts +0 -12
- package/dist/src/web/components/form/location/components/LocationPC/Header.js +0 -43
- package/dist/src/web/components/form/location/components/LocationPC/location.PC.d.ts +0 -8
- package/dist/src/web/components/form/location/components/LocationPC/location.PC.js +0 -228
- package/dist/src/web/components/form/location/constants.d.ts +0 -2
- package/dist/src/web/components/form/location/constants.js +0 -3
- package/dist/src/web/components/form/location/index.d.ts +0 -1
- package/dist/src/web/components/form/location/index.js +0 -24
- package/dist/src/web/components/form/radio/index.d.ts +0 -11
- package/dist/src/web/components/form/radio/index.js +0 -115
- package/dist/src/web/components/form/renderDecorator.d.ts +0 -6
- package/dist/src/web/components/form/renderDecorator.js +0 -20
- package/dist/src/web/components/form/select/dropdown-select/ui.d.ts +0 -15
- package/dist/src/web/components/form/select/dropdown-select/ui.js +0 -55
- package/dist/src/web/components/form/select/h5.d.ts +0 -16
- package/dist/src/web/components/form/select/h5.js +0 -466
- package/dist/src/web/components/form/select/index.d.ts +0 -66
- package/dist/src/web/components/form/select/index.js +0 -255
- package/dist/src/web/components/form/select/region/index.d.ts +0 -6
- package/dist/src/web/components/form/select/region/index.js +0 -147
- package/dist/src/web/components/form/select/time.d.ts +0 -9
- package/dist/src/web/components/form/select/time.js +0 -146
- package/dist/src/web/components/form/select/use-options.d.ts +0 -26
- package/dist/src/web/components/form/select/use-options.js +0 -103
- package/dist/src/web/components/form/select/year.d.ts +0 -7
- package/dist/src/web/components/form/select/year.js +0 -72
- package/dist/src/web/components/form/switch/index.d.ts +0 -6
- package/dist/src/web/components/form/switch/index.js +0 -58
- package/dist/src/web/components/form/textarea/index.d.ts +0 -12
- package/dist/src/web/components/form/textarea/index.js +0 -66
- package/dist/src/web/components/form/tips/index.d.ts +0 -8
- package/dist/src/web/components/form/tips/index.js +0 -17
- package/dist/src/web/components/form/uploader/index.d.ts +0 -3
- package/dist/src/web/components/form/uploader/index.js +0 -42
- package/dist/src/web/components/form/uploader/uploader.h5.d.ts +0 -20
- package/dist/src/web/components/form/uploader/uploader.h5.js +0 -199
- package/dist/src/web/components/form/uploader/uploader.pc.d.ts +0 -29
- package/dist/src/web/components/form/uploader/uploader.pc.js +0 -208
- package/dist/src/web/components/form/uploaderFile/index.d.ts +0 -4
- package/dist/src/web/components/form/uploaderFile/index.js +0 -19
- package/dist/src/web/components/form/uploaderFile/uploadFile.h5.d.ts +0 -23
- package/dist/src/web/components/form/uploaderFile/uploadFile.h5.js +0 -330
- package/dist/src/web/components/form/uploaderFile/uploadFile.pc.d.ts +0 -24
- package/dist/src/web/components/form/uploaderFile/uploadFile.pc.js +0 -302
- package/dist/src/web/components/form/userOrgSelect/comTool.d.ts +0 -8
- package/dist/src/web/components/form/userOrgSelect/comTool.js +0 -101
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +0 -19
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +0 -252
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +0 -4
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +0 -157
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/index.d.ts +0 -2
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/index.js +0 -17
- package/dist/src/web/components/form/userOrgSelect/index.d.ts +0 -2
- package/dist/src/web/components/form/userOrgSelect/index.js +0 -17
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +0 -27
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.js +0 -276
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +0 -9
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.pc.js +0 -253
- package/dist/src/web/components/form/userOrgSelect/utils.d.ts +0 -36
- package/dist/src/web/components/form/userOrgSelect/utils.js +0 -80
- package/dist/src/web/components/formdetail/index.d.ts +0 -28
- package/dist/src/web/components/formdetail/index.js +0 -173
- package/dist/src/web/components/graphicCard/index.d.ts +0 -46
- package/dist/src/web/components/graphicCard/index.js +0 -178
- package/dist/src/web/components/image/image.d.ts +0 -9
- package/dist/src/web/components/image/image.js +0 -119
- package/dist/src/web/components/image/index.d.ts +0 -13
- package/dist/src/web/components/image/index.js +0 -77
- package/dist/src/web/components/index.d.ts +0 -50
- package/dist/src/web/components/index.js +0 -99
- package/dist/src/web/components/link/index.d.ts +0 -24
- package/dist/src/web/components/link/index.js +0 -71
- package/dist/src/web/components/listView/index.d.ts +0 -7
- package/dist/src/web/components/listView/index.js +0 -297
- package/dist/src/web/components/listView/interface.d.ts +0 -127
- package/dist/src/web/components/listView/interface.js +0 -1
- package/dist/src/web/components/lottery/index.d.ts +0 -22
- package/dist/src/web/components/lottery/index.js +0 -385
- package/dist/src/web/components/lottery/lotteryUtil.d.ts +0 -23
- package/dist/src/web/components/lottery/lotteryUtil.js +0 -181
- package/dist/src/web/components/modal/index.d.ts +0 -17
- package/dist/src/web/components/modal/index.js +0 -11
- package/dist/src/web/components/modal/modal.h5.d.ts +0 -4
- package/dist/src/web/components/modal/modal.h5.js +0 -46
- package/dist/src/web/components/modal/modal.pc.d.ts +0 -3
- package/dist/src/web/components/modal/modal.pc.js +0 -31
- package/dist/src/web/components/navLayout/index.d.ts +0 -61
- package/dist/src/web/components/navLayout/index.js +0 -127
- package/dist/src/web/components/navigationBar/common.d.ts +0 -15
- package/dist/src/web/components/navigationBar/common.js +0 -127
- package/dist/src/web/components/navigationBar/h5Menu.d.ts +0 -14
- package/dist/src/web/components/navigationBar/h5Menu.js +0 -72
- package/dist/src/web/components/navigationBar/horizontalMenu.d.ts +0 -12
- package/dist/src/web/components/navigationBar/horizontalMenu.js +0 -99
- package/dist/src/web/components/navigationBar/index.d.ts +0 -13
- package/dist/src/web/components/navigationBar/index.js +0 -157
- package/dist/src/web/components/navigationBar/verticalMenu.d.ts +0 -13
- package/dist/src/web/components/navigationBar/verticalMenu.js +0 -38
- package/dist/src/web/components/phone/index.d.ts +0 -18
- package/dist/src/web/components/phone/index.js +0 -4
- package/dist/src/web/components/phoneCode/index.d.ts +0 -18
- package/dist/src/web/components/phoneCode/index.js +0 -4
- package/dist/src/web/components/picker/datePicker.d.ts +0 -10
- package/dist/src/web/components/picker/datePicker.js +0 -31
- package/dist/src/web/components/picker/picker.d.ts +0 -6
- package/dist/src/web/components/picker/picker.js +0 -45
- package/dist/src/web/components/picker/timePicker.d.ts +0 -7
- package/dist/src/web/components/picker/timePicker.js +0 -42
- package/dist/src/web/components/richText/const.d.ts +0 -1
- package/dist/src/web/components/richText/const.js +0 -2
- package/dist/src/web/components/richText/index.d.ts +0 -50
- package/dist/src/web/components/richText/index.js +0 -351
- package/dist/src/web/components/richTextView/index.d.ts +0 -7
- package/dist/src/web/components/richTextView/index.js +0 -46
- package/dist/src/web/components/scrollView/index.d.ts +0 -26
- package/dist/src/web/components/scrollView/index.js +0 -97
- package/dist/src/web/components/share/index.d.ts +0 -34
- package/dist/src/web/components/share/index.js +0 -4
- package/dist/src/web/components/slot/index.d.ts +0 -6
- package/dist/src/web/components/slot/index.js +0 -9
- package/dist/src/web/components/swiper/index.d.ts +0 -24
- package/dist/src/web/components/swiper/index.js +0 -153
- package/dist/src/web/components/tabs/index.d.ts +0 -13
- package/dist/src/web/components/tabs/index.js +0 -20
- package/dist/src/web/components/tabs/tabs.h5.d.ts +0 -4
- package/dist/src/web/components/tabs/tabs.h5.js +0 -44
- package/dist/src/web/components/tabs/tabs.pc.d.ts +0 -3
- package/dist/src/web/components/tabs/tabs.pc.js +0 -40
- package/dist/src/web/components/text/index.d.ts +0 -14
- package/dist/src/web/components/text/index.js +0 -19
- package/dist/src/web/components/uploaderFileView/index.d.ts +0 -10
- package/dist/src/web/components/uploaderFileView/index.js +0 -46
- package/dist/src/web/components/uploaderView/index.d.ts +0 -17
- package/dist/src/web/components/uploaderView/index.js +0 -48
- package/dist/src/web/components/userInfo/index.d.ts +0 -26
- package/dist/src/web/components/userInfo/index.js +0 -4
- package/dist/src/web/components/wedaVideo/index.d.ts +0 -17
- package/dist/src/web/components/wedaVideo/index.js +0 -156
- package/dist/src/web/index.d.ts +0 -8
- package/dist/src/web/index.js +0 -4
- package/dist/src/web/utils/classnames.d.ts +0 -2
- package/dist/src/web/utils/classnames.js +0 -37
- package/dist/src/web/utils/constant.d.ts +0 -23
- package/dist/src/web/utils/constant.js +0 -24
- package/dist/src/web/utils/debounce.d.ts +0 -2
- package/dist/src/web/utils/debounce.js +0 -92
- package/dist/src/web/utils/getLocalCounter.d.ts +0 -1
- package/dist/src/web/utils/getLocalCounter.js +0 -4
- package/dist/src/web/utils/getUserService.d.ts +0 -11
- package/dist/src/web/utils/getUserService.js +0 -156
- package/dist/src/web/utils/isObjectEqual.d.ts +0 -2
- package/dist/src/web/utils/isObjectEqual.js +0 -12
- package/dist/src/web/utils/loading-fallback.d.ts +0 -2
- package/dist/src/web/utils/loading-fallback.js +0 -2
- package/dist/src/web/utils/lodash.d.ts +0 -1
- package/dist/src/web/utils/lodash.js +0 -2
- package/dist/src/web/utils/platform.d.ts +0 -18
- package/dist/src/web/utils/platform.js +0 -193
- package/dist/src/web/utils/tcb.d.ts +0 -33
- package/dist/src/web/utils/tcb.js +0 -118
- package/dist/src/web/utils/tmap.d.ts +0 -3
- package/dist/src/web/utils/tmap.js +0 -21
- package/dist/src/web/utils/use-cloud-id-temp-url.d.ts +0 -1
- package/dist/src/web/utils/use-cloud-id-temp-url.js +0 -15
- package/dist/src/web/utils/useSetState.d.ts +0 -1
- package/dist/src/web/utils/useSetState.js +0 -8
- package/dist/src/web/utils/useSyncValue.d.ts +0 -4
- package/dist/src/web/utils/useSyncValue.js +0 -16
- package/dist/src/web/utils/weui.d.ts +0 -1
- package/dist/src/web/utils/weui.js +0 -2
- package/dist/web/components/form/userOrgSelect/userOrgSelect.less +0 -643
- package/dist/web/utils/getUserService.d.ts +0 -17
- package/dist/web/utils/getUserService.js +0 -148
- package/dist/web/utils/tmap.d.ts +0 -3
- package/dist/web/utils/tmap.js +0 -21
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import EchartBase from './eChartBase';
|
|
2
|
-
import getConfig from '../config/pie';
|
|
3
|
-
/**
|
|
4
|
-
* 饼状图表
|
|
5
|
-
* @author loonglong
|
|
6
|
-
**/
|
|
7
|
-
class EchartPie extends EchartBase {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
const config = getConfig();
|
|
11
|
-
this.config = { ...this.config, ...config };
|
|
12
|
-
}
|
|
13
|
-
async setSourceData({ dataSource, filterData, setColor, xField, xStatistics, xIsCountEmpty, yField, }) {
|
|
14
|
-
const { name = '', type = '', methodName = '' } = dataSource;
|
|
15
|
-
if (name !== '') {
|
|
16
|
-
const params = this.createWhere({
|
|
17
|
-
filterData,
|
|
18
|
-
xField,
|
|
19
|
-
xStatistics,
|
|
20
|
-
xIsCountEmpty,
|
|
21
|
-
yField,
|
|
22
|
-
});
|
|
23
|
-
const arrSourData = await this.getSourceData(name, methodName, type, params);
|
|
24
|
-
// 获取 x 轴数据
|
|
25
|
-
if (arrSourData.length > 0) {
|
|
26
|
-
const numPie = arrSourData[0].YLabels.length;
|
|
27
|
-
if (numPie > 0) {
|
|
28
|
-
const arrData = [];
|
|
29
|
-
let i = 0;
|
|
30
|
-
arrSourData.forEach((itemSource) => {
|
|
31
|
-
const numc = setColor ? setColor.length : 0;
|
|
32
|
-
const strColor = numc > 0 ? { color: setColor[i % numc] } : {};
|
|
33
|
-
arrData.push({
|
|
34
|
-
value: itemSource.YLabels[0].Value,
|
|
35
|
-
name: itemSource.XLabel.Value,
|
|
36
|
-
tooltip: {},
|
|
37
|
-
itemStyle: strColor,
|
|
38
|
-
});
|
|
39
|
-
i = i + 1;
|
|
40
|
-
});
|
|
41
|
-
this.config.series[0].data = arrData;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
// this.config['series'][0].data = [];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
setChartType({ chartType }) {
|
|
50
|
-
this.config.series.length > 0 &&
|
|
51
|
-
this.config.series.forEach((itemSeries) => {
|
|
52
|
-
if (chartType === 'pie') {
|
|
53
|
-
itemSeries.radius = '70%';
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
// @ts-ignore no type
|
|
57
|
-
itemSeries.radius = ['40%', '70%'];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
// 显示图表上的数据标签 单位,标签,小数位数,后缀
|
|
62
|
-
setIsSeriesShowSymbol({ isSeriesShowSymbol, isPercent, isUnit, unit, decimalDigits, suffix, }) {
|
|
63
|
-
decimalDigits = decimalDigits < 0 ? 0 : decimalDigits;
|
|
64
|
-
let show = false;
|
|
65
|
-
let position = 'inner';
|
|
66
|
-
let formatter = null;
|
|
67
|
-
if (isSeriesShowSymbol || isPercent || isUnit) {
|
|
68
|
-
formatter = '';
|
|
69
|
-
}
|
|
70
|
-
this.config.series[0].label.show = show;
|
|
71
|
-
this.config.series[0].label.position = position;
|
|
72
|
-
if (formatter === null) {
|
|
73
|
-
this.config.series[0].label.normal = null;
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
this.config.series[0].label.normal.formatter = (objValue) => {
|
|
77
|
-
let reData = '';
|
|
78
|
-
if (isSeriesShowSymbol) {
|
|
79
|
-
// 显示数值
|
|
80
|
-
reData = objValue.value;
|
|
81
|
-
}
|
|
82
|
-
if (isUnit) {
|
|
83
|
-
// 显示单位
|
|
84
|
-
if (unit) {
|
|
85
|
-
const objNewValue = this.getValueByUnit(objValue.value, unit);
|
|
86
|
-
reData = `${objNewValue.toFixed(decimalDigits)}${suffix}`;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
reData = `${objValue.value.toFixed(decimalDigits)}`;
|
|
90
|
-
}
|
|
91
|
-
this.config.series[0].data.forEach((itemData) => {
|
|
92
|
-
itemData.tooltip.formatter = (objVal) => {
|
|
93
|
-
const objItemData = this.getValueByUnit(objVal.value, unit);
|
|
94
|
-
return `${objItemData.toFixed(decimalDigits)}${suffix}`;
|
|
95
|
-
};
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
if (isPercent) {
|
|
99
|
-
// 显示百分比
|
|
100
|
-
reData = `${reData}(${objValue.percent}%)`;
|
|
101
|
-
}
|
|
102
|
-
return reData;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
async setOptions({ chartType, isTitle, title,
|
|
107
|
-
// titleLocation,
|
|
108
|
-
dataSource, filterData, setColor, xField, xStatistics, xIsCountEmpty, yField, isLegend, legend,
|
|
109
|
-
// legend2,
|
|
110
|
-
isSeriesShowSymbol, isPercent, isUnit, unit, decimalDigits, suffix, }) {
|
|
111
|
-
if (dataSource) {
|
|
112
|
-
await this.setSourceData({
|
|
113
|
-
dataSource,
|
|
114
|
-
filterData,
|
|
115
|
-
setColor,
|
|
116
|
-
xField,
|
|
117
|
-
xStatistics,
|
|
118
|
-
xIsCountEmpty,
|
|
119
|
-
yField,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
this.setChartType({ chartType });
|
|
123
|
-
this.setTitle({ isTitle, title });
|
|
124
|
-
this.setLegend({ isLegend, legend });
|
|
125
|
-
this.setIsSeriesShowSymbol({
|
|
126
|
-
isSeriesShowSymbol,
|
|
127
|
-
isPercent,
|
|
128
|
-
isUnit,
|
|
129
|
-
unit,
|
|
130
|
-
decimalDigits,
|
|
131
|
-
suffix,
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
export default EchartPie;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface DataSource {
|
|
2
|
-
name: string;
|
|
3
|
-
type: string;
|
|
4
|
-
subType: string;
|
|
5
|
-
provider?: string;
|
|
6
|
-
methodName: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ObjSource {
|
|
9
|
-
dataSourceName: string;
|
|
10
|
-
dataSourceType: string;
|
|
11
|
-
dataSourceMethodName: string;
|
|
12
|
-
}
|
|
13
|
-
export interface Xfield {
|
|
14
|
-
format: string;
|
|
15
|
-
type: string;
|
|
16
|
-
title: string;
|
|
17
|
-
name: string;
|
|
18
|
-
}
|
|
19
|
-
declare enum CountType {
|
|
20
|
-
'count' = 0,
|
|
21
|
-
'sum' = 1,
|
|
22
|
-
'avg' = 2,
|
|
23
|
-
'max' = 3,
|
|
24
|
-
'min' = 4
|
|
25
|
-
}
|
|
26
|
-
export interface YfieldOne {
|
|
27
|
-
key: string;
|
|
28
|
-
operationType: CountType;
|
|
29
|
-
title?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface Yfield {
|
|
32
|
-
groupKey?: string;
|
|
33
|
-
numValue?: Array<YfieldOne>;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var CountType;
|
|
2
|
-
(function (CountType) {
|
|
3
|
-
CountType[CountType["count"] = 0] = "count";
|
|
4
|
-
CountType[CountType["sum"] = 1] = "sum";
|
|
5
|
-
CountType[CountType["avg"] = 2] = "avg";
|
|
6
|
-
CountType[CountType["max"] = 3] = "max";
|
|
7
|
-
CountType[CountType["min"] = 4] = "min";
|
|
8
|
-
})(CountType || (CountType = {}));
|
|
9
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as echarts from 'echarts/core';
|
|
2
|
-
import type { BarSeriesOption, LineSeriesOption, PieSeriesOption } from 'echarts/charts';
|
|
3
|
-
import type { TitleComponentOption, TooltipComponentOption, LegendComponentOption, GridComponentOption } from 'echarts/components';
|
|
4
|
-
export default echarts;
|
|
5
|
-
export declare type ECOption = echarts.ComposeOption<BarSeriesOption | LineSeriesOption | PieSeriesOption | TitleComponentOption | TooltipComponentOption | GridComponentOption | LegendComponentOption>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。
|
|
2
|
-
import * as echarts from 'echarts/core';
|
|
3
|
-
// 引入图表,图表后缀都为 Chart
|
|
4
|
-
import { BarChart, LineChart, PieChart } from 'echarts/charts';
|
|
5
|
-
//组件,组件后缀都为 Component
|
|
6
|
-
import { TitleComponent, TooltipComponent, LegendComponent, GridComponent, } from 'echarts/components';
|
|
7
|
-
// 标签自动布局,全局过渡动画等特性
|
|
8
|
-
import { LabelLayout, UniversalTransition } from 'echarts/features';
|
|
9
|
-
// 引入 Canvas 渲染器,注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步
|
|
10
|
-
import { CanvasRenderer } from 'echarts/renderers';
|
|
11
|
-
// 注册必须的组件
|
|
12
|
-
echarts.use([
|
|
13
|
-
TitleComponent,
|
|
14
|
-
TooltipComponent,
|
|
15
|
-
GridComponent,
|
|
16
|
-
LegendComponent,
|
|
17
|
-
LabelLayout,
|
|
18
|
-
UniversalTransition,
|
|
19
|
-
CanvasRenderer,
|
|
20
|
-
BarChart,
|
|
21
|
-
LineChart,
|
|
22
|
-
PieChart,
|
|
23
|
-
]);
|
|
24
|
-
export default echarts;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import { ErrorBoundary } from 'react-error-boundary';
|
|
3
|
-
import { ChartError } from './chart-error';
|
|
4
|
-
export const ChartErrorBoundary = (props) => {
|
|
5
|
-
return (React.createElement(ErrorBoundary, { FallbackComponent: ({ error, resetErrorBoundary }) => {
|
|
6
|
-
const errorMsg = useMemo(() => {
|
|
7
|
-
var _a;
|
|
8
|
-
if (error instanceof ChartError) {
|
|
9
|
-
return error.message;
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return (_a = error.stack) !== null && _a !== void 0 ? _a : error.message;
|
|
13
|
-
}
|
|
14
|
-
}, [error]);
|
|
15
|
-
return (React.createElement("div", { style: props.style, id: props.id, className: props.className },
|
|
16
|
-
React.createElement("code", null,
|
|
17
|
-
React.createElement("pre", { style: { display: 'inline' } }, errorMsg)),
|
|
18
|
-
React.createElement("a", { href: "#", style: {
|
|
19
|
-
padding: '0 8px',
|
|
20
|
-
textDecoration: 'none',
|
|
21
|
-
}, onClick: (ev) => {
|
|
22
|
-
ev.preventDefault();
|
|
23
|
-
resetErrorBoundary();
|
|
24
|
-
} }, "\u91CD\u8BD5")));
|
|
25
|
-
} }, props.children));
|
|
26
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MutableRefObject, RefObject } from 'react';
|
|
2
|
-
import { IEchartModalBase } from './core/eChartBase';
|
|
3
|
-
import type IEcharts from './echarts';
|
|
4
|
-
export declare function useChart(ref: RefObject<HTMLElement> | MutableRefObject<HTMLElement>): IEcharts.ECharts;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated The method should not be used
|
|
7
|
-
*/
|
|
8
|
-
export declare function useWedaChart(domRef: any, ModalClass: IEchartModalBase, options: IEcharts.EChartsCoreOption): void;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { useAsync, useDeepCompareEffect, useEventListener, useIsMounted, useMountEffect, useResizeObserver, } from '@react-hookz/web';
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { debug } from '../../../utils/console';
|
|
4
|
-
const logger = debug('chart:use-chart');
|
|
5
|
-
export function useChart(ref) {
|
|
6
|
-
const [chartRef, setChartRef] = useState(null);
|
|
7
|
-
const isMounted = useIsMounted();
|
|
8
|
-
useMountEffect(async () => {
|
|
9
|
-
if (!ref.current || !isMounted) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const echarts = (await import(/* webpackChunkName: "echarts" */ './echarts')).default;
|
|
13
|
-
const echartDom = ref.current;
|
|
14
|
-
setChartRef(echarts.init(echartDom));
|
|
15
|
-
return () => {
|
|
16
|
-
chartRef.dispose();
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
useEventListener(window, 'resize', () => {
|
|
20
|
-
chartRef && chartRef.resize();
|
|
21
|
-
});
|
|
22
|
-
useResizeObserver(ref, () => {
|
|
23
|
-
chartRef && chartRef.resize();
|
|
24
|
-
});
|
|
25
|
-
return chartRef;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated The method should not be used
|
|
29
|
-
*/
|
|
30
|
-
export function useWedaChart(domRef, ModalClass, options) {
|
|
31
|
-
const chart = useChart(domRef);
|
|
32
|
-
const getOptions = async () => {
|
|
33
|
-
const chartModal = new ModalClass();
|
|
34
|
-
let finalOptions = await chartModal.setOptions(options);
|
|
35
|
-
logger.log(options, finalOptions);
|
|
36
|
-
if (!finalOptions) {
|
|
37
|
-
finalOptions = chartModal.getOptions();
|
|
38
|
-
}
|
|
39
|
-
return finalOptions;
|
|
40
|
-
};
|
|
41
|
-
const [state, actions] = useAsync(getOptions);
|
|
42
|
-
useMountEffect(() => {
|
|
43
|
-
actions.execute();
|
|
44
|
-
});
|
|
45
|
-
useDeepCompareEffect(() => {
|
|
46
|
-
actions.execute();
|
|
47
|
-
}, [
|
|
48
|
-
// options 变化,包含所有配置项,包括纯前端的配置项变化都会触发setOptions里发请求,但改不动了
|
|
49
|
-
options,
|
|
50
|
-
actions,
|
|
51
|
-
]);
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (state.status === 'loading' || state.status === 'not-executed') {
|
|
54
|
-
chart === null || chart === void 0 ? void 0 : chart.showLoading();
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
chart === null || chart === void 0 ? void 0 : chart.hideLoading();
|
|
58
|
-
}, [chart, state.status]);
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
logger.log(state, state.result);
|
|
61
|
-
if (state.status === 'success' && chart) {
|
|
62
|
-
logger.log(options, state.result, window.location.href);
|
|
63
|
-
chart.setOption(state.result, true // noMerge 全刷
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
if (state.status === 'error') {
|
|
68
|
-
console.error(state.error);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}, [state, chart, options]);
|
|
72
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import OldLine from './index.old';
|
|
3
|
-
import { checkIsNewData, transform } from '../common/data-transform';
|
|
4
|
-
import { emptyArray } from '../../../utils/constant';
|
|
5
|
-
import { Chart } from '../common/Chart';
|
|
6
|
-
import { ChartCustomConnector } from '../common/chart-custom-connector';
|
|
7
|
-
import { CommonErrorBoundary } from '../../common/error-boundary';
|
|
8
|
-
function LineImpl(props) {
|
|
9
|
-
if (props.dataSourceType === 'data-model') {
|
|
10
|
-
if (checkIsNewData(props)) {
|
|
11
|
-
props.dataSource = {
|
|
12
|
-
name: props['dataModel'].name,
|
|
13
|
-
type: 'database',
|
|
14
|
-
subType: 'database',
|
|
15
|
-
methodName: 'wedaAggregateData',
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const oldLineProps = { ...props };
|
|
19
|
-
oldLineProps['dataModel'] = undefined;
|
|
20
|
-
oldLineProps['datasourceVariable'] = undefined;
|
|
21
|
-
oldLineProps['connectorMethod'] = undefined;
|
|
22
|
-
oldLineProps['connectorParams'] = undefined;
|
|
23
|
-
oldLineProps['connector'] = undefined;
|
|
24
|
-
return React.createElement(OldLine, { ...oldLineProps });
|
|
25
|
-
}
|
|
26
|
-
else if (props.dataSourceType === 'variable') {
|
|
27
|
-
const { datasourceVariable = emptyArray, id, style, className, events, ...rest } = props;
|
|
28
|
-
const chartOptions = transform('line', datasourceVariable, rest);
|
|
29
|
-
return (React.createElement(Chart, { id: id, "data-testid": "line", className: className, style: style, events: events, chartOptions: chartOptions }));
|
|
30
|
-
}
|
|
31
|
-
else if (props.dataSourceType === 'custom-connector') {
|
|
32
|
-
return React.createElement(ChartCustomConnector, { "data-testid": "line", type: "line", ...props });
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
// 老逻辑
|
|
36
|
-
return React.createElement(OldLine, { ...props });
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export default function Line(props) {
|
|
40
|
-
return (React.createElement(CommonErrorBoundary, { ...props },
|
|
41
|
-
React.createElement(LineImpl, { ...props })));
|
|
42
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import OldPie from './index.old';
|
|
3
|
-
import { checkIsNewData, transform } from '../common/data-transform';
|
|
4
|
-
import { emptyArray } from '../../../utils/constant';
|
|
5
|
-
import { Chart } from '../common/Chart';
|
|
6
|
-
import { ChartCustomConnector } from '../common/chart-custom-connector';
|
|
7
|
-
import { CommonErrorBoundary } from '../../common/error-boundary';
|
|
8
|
-
function PieImpl(props) {
|
|
9
|
-
if (props.dataSourceType === 'data-model') {
|
|
10
|
-
if (checkIsNewData(props)) {
|
|
11
|
-
props.dataSource = {
|
|
12
|
-
name: props['dataModel'].name,
|
|
13
|
-
type: 'database',
|
|
14
|
-
subType: 'database',
|
|
15
|
-
methodName: 'wedaAggregateData',
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const oldPieProps = { ...props };
|
|
19
|
-
oldPieProps['dataModel'] = undefined;
|
|
20
|
-
oldPieProps['datasourceVariable'] = undefined;
|
|
21
|
-
oldPieProps['connectorMethod'] = undefined;
|
|
22
|
-
oldPieProps['connectorParams'] = undefined;
|
|
23
|
-
oldPieProps['connector'] = undefined;
|
|
24
|
-
return React.createElement(OldPie, { ...oldPieProps });
|
|
25
|
-
}
|
|
26
|
-
else if (props.dataSourceType === 'variable') {
|
|
27
|
-
const { datasourceVariable = emptyArray, id, style, className, events, ...rest } = props;
|
|
28
|
-
const chartOptions = transform('pie', datasourceVariable, rest);
|
|
29
|
-
return (React.createElement(Chart, { id: id, "data-testid": "pie", className: className, style: style, events: events, chartOptions: chartOptions }));
|
|
30
|
-
}
|
|
31
|
-
else if (props.dataSourceType === 'custom-connector') {
|
|
32
|
-
return React.createElement(ChartCustomConnector, { "data-testid": "pie", type: "pie", ...props });
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
// 老逻辑
|
|
36
|
-
return React.createElement(OldPie, { ...props });
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export default function Pie(props) {
|
|
40
|
-
return (React.createElement(CommonErrorBoundary, { ...props },
|
|
41
|
-
React.createElement(PieImpl, { ...props })));
|
|
42
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { CommonPropsType } from '../../../types';
|
|
3
|
-
import './index.css';
|
|
4
|
-
import { IDataSource, IField } from './interface';
|
|
5
|
-
interface PropsType extends CommonPropsType {
|
|
6
|
-
/**
|
|
7
|
-
* 数据源
|
|
8
|
-
*/
|
|
9
|
-
dataSource?: IDataSource;
|
|
10
|
-
/**
|
|
11
|
-
* 数据筛选
|
|
12
|
-
*/
|
|
13
|
-
filterData?: any;
|
|
14
|
-
/**
|
|
15
|
-
* 字段
|
|
16
|
-
*/
|
|
17
|
-
field?: IField;
|
|
18
|
-
/**
|
|
19
|
-
* 统计方式
|
|
20
|
-
*/
|
|
21
|
-
operationType?: string;
|
|
22
|
-
/**
|
|
23
|
-
* 字段展示名称
|
|
24
|
-
*/
|
|
25
|
-
label?: string;
|
|
26
|
-
/**
|
|
27
|
-
* 是否统计空值
|
|
28
|
-
*/
|
|
29
|
-
isCountEmpty?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* 是否显示单位
|
|
32
|
-
*/
|
|
33
|
-
isShowUnit?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* 单位
|
|
36
|
-
*/
|
|
37
|
-
unit?: number;
|
|
38
|
-
/**
|
|
39
|
-
* 小数位数
|
|
40
|
-
*/
|
|
41
|
-
decimalDigits?: number;
|
|
42
|
-
/**
|
|
43
|
-
* 后缀
|
|
44
|
-
*/
|
|
45
|
-
suffix?: number;
|
|
46
|
-
/**
|
|
47
|
-
* app.cloud 对象依赖,默认会从 window.app 取值
|
|
48
|
-
*/
|
|
49
|
-
appCloud?: {
|
|
50
|
-
callDataSource?: any;
|
|
51
|
-
callWedaApi?: any;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* 其他属性
|
|
55
|
-
*/
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* 修复科学计数法问题
|
|
60
|
-
* @param num 小数
|
|
61
|
-
* @returns {string}
|
|
62
|
-
*/
|
|
63
|
-
export declare function scientificToNumber(num: any): any;
|
|
64
|
-
/**
|
|
65
|
-
* 补齐小数位数0
|
|
66
|
-
* @param source 源字符串
|
|
67
|
-
* @param targetLength 目标长度
|
|
68
|
-
* @returns {string}
|
|
69
|
-
*/
|
|
70
|
-
export declare function padEnd(source: any, targetLength: any): any;
|
|
71
|
-
/**
|
|
72
|
-
* 修复toFixed四舍五入不准确问题
|
|
73
|
-
* @param num
|
|
74
|
-
* @param digit 小数位数
|
|
75
|
-
* @returns {string}
|
|
76
|
-
*/
|
|
77
|
-
export declare function customToFixed(num: any, digit?: number): string;
|
|
78
|
-
/**
|
|
79
|
-
* 添加千位分隔符
|
|
80
|
-
* @param fixedString
|
|
81
|
-
* @param digit
|
|
82
|
-
*/
|
|
83
|
-
export declare function addDelimiter(fixedString: any, digit: any): string;
|
|
84
|
-
export default function StatisticsCard({ dataSource, filterData, field, operationType, label, isCountEmpty, isShowUnit, unit, decimalDigits, suffix, className, style, events, id, role, appCloud, }: PropsType): JSX.Element;
|
|
85
|
-
export {};
|