@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as PropTypes from 'prop-types';
|
|
5
5
|
import { tmapApiUrl } from '../constants';
|
|
6
|
-
import { getTMap } from '
|
|
6
|
+
import { getTMap } from '../common/tmap';
|
|
7
7
|
const { useEffect, useRef, useState } = React;
|
|
8
8
|
const defaultLatLng = {
|
|
9
9
|
lat: null,
|
|
@@ -36,7 +36,7 @@ export default function MapView({ APIKEY = '', drag = true, zoom = true, latlng
|
|
|
36
36
|
setMapStatus(true);
|
|
37
37
|
}
|
|
38
38
|
catch (error) {
|
|
39
|
-
console.
|
|
39
|
+
console.error('initMap error', error);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
const initMarker = () => {
|
|
@@ -64,7 +64,7 @@ export default function MapView({ APIKEY = '', drag = true, zoom = true, latlng
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
catch (err) {
|
|
67
|
-
console.
|
|
67
|
+
console.error('initMarker err', err);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
useEffect(() => {
|
|
@@ -83,7 +83,7 @@ export default function MapView({ APIKEY = '', drag = true, zoom = true, latlng
|
|
|
83
83
|
initMap();
|
|
84
84
|
};
|
|
85
85
|
script.onerror = (err) => {
|
|
86
|
-
console.
|
|
86
|
+
console.error('loadScript err', err);
|
|
87
87
|
};
|
|
88
88
|
document.body.appendChild(script);
|
|
89
89
|
}
|
|
@@ -97,12 +97,15 @@ export default function MapView({ APIKEY = '', drag = true, zoom = true, latlng
|
|
|
97
97
|
mapRef.current = null;
|
|
98
98
|
setMapStatus(false);
|
|
99
99
|
};
|
|
100
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
100
101
|
}, [APIKEY]);
|
|
101
102
|
useEffect(() => {
|
|
102
103
|
mapRef.current && mapRef.current.setDraggable(drag);
|
|
104
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
103
105
|
}, [drag, mapRef.current]);
|
|
104
106
|
useEffect(() => {
|
|
105
107
|
mapRef.current && getTMap() && removeOrAddZoom(mapRef.current, getTMap());
|
|
108
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
109
|
}, [zoom, mapRef.current]);
|
|
107
110
|
useEffect(() => {
|
|
108
111
|
const TMap = getTMap();
|
|
@@ -121,7 +124,7 @@ export default function MapView({ APIKEY = '', drag = true, zoom = true, latlng
|
|
|
121
124
|
]);
|
|
122
125
|
}
|
|
123
126
|
catch (error) {
|
|
124
|
-
console.
|
|
127
|
+
console.error('updateGeometries error view', error);
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
}, [lat, lng, mapStatus]);
|
|
@@ -144,7 +147,7 @@ export default function MapView({ APIKEY = '', drag = true, zoom = true, latlng
|
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
catch (error) {
|
|
147
|
-
console.
|
|
150
|
+
console.error('removeOrAddZoom error', error);
|
|
148
151
|
}
|
|
149
152
|
};
|
|
150
153
|
// 移除缩放控件
|
|
@@ -13,7 +13,7 @@ export namespace propTypes {
|
|
|
13
13
|
const zoom: PropTypes.Requireable<boolean>;
|
|
14
14
|
const disabled: PropTypes.Requireable<boolean>;
|
|
15
15
|
const requiredFlag: PropTypes.Requireable<boolean>;
|
|
16
|
-
const decorator: PropTypes.Requireable<PropTypes.ReactNodeLike
|
|
16
|
+
const decorator: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
17
17
|
const value: PropTypes.Requireable<object>;
|
|
18
18
|
const locationType: PropTypes.Requireable<number>;
|
|
19
19
|
const dataSource: PropTypes.Requireable<object>;
|
|
File without changes
|
|
File without changes
|
|
@@ -63,7 +63,7 @@ export default function useLocationInfo({ apiKey: APIKEY, locationType, eventsCh
|
|
|
63
63
|
longitude: lng,
|
|
64
64
|
}, locationType === 1);
|
|
65
65
|
}, (error) => {
|
|
66
|
-
console.
|
|
66
|
+
console.error('error loc', error);
|
|
67
67
|
currentLocations.current = null;
|
|
68
68
|
setApiKeyStatus({
|
|
69
69
|
status: false,
|
|
@@ -75,7 +75,7 @@ export default function useLocationInfo({ apiKey: APIKEY, locationType, eventsCh
|
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
script.onerror = (error) => {
|
|
78
|
-
console.
|
|
78
|
+
console.error('Geolocation script onerror', error);
|
|
79
79
|
setApiKeyStatus({
|
|
80
80
|
status: false,
|
|
81
81
|
message: '定位失败',
|
|
@@ -90,6 +90,7 @@ export default function useLocationInfo({ apiKey: APIKEY, locationType, eventsCh
|
|
|
90
90
|
document.body.appendChild(script);
|
|
91
91
|
}
|
|
92
92
|
loadScript();
|
|
93
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
94
|
}, [APIKEY, locationType]);
|
|
94
95
|
return {
|
|
95
96
|
location,
|
|
@@ -69,6 +69,7 @@ export default function LocationH5(props) {
|
|
|
69
69
|
events.change && events.change(res);
|
|
70
70
|
}
|
|
71
71
|
setLocation(location);
|
|
72
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
73
|
}, [value, locationType]);
|
|
73
74
|
useEffect(() => {
|
|
74
75
|
let loc = {
|
|
@@ -83,6 +84,7 @@ export default function LocationH5(props) {
|
|
|
83
84
|
setLocation(loc);
|
|
84
85
|
// 暂不支持自定位置,初始化表单值都是{}
|
|
85
86
|
events.change({ value: {} });
|
|
87
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
88
|
}, [locationType]);
|
|
87
89
|
useEffect(() => {
|
|
88
90
|
if (checkCustomLocation(value)) {
|
|
@@ -150,7 +152,7 @@ export default function LocationH5(props) {
|
|
|
150
152
|
});
|
|
151
153
|
}
|
|
152
154
|
}, (error) => {
|
|
153
|
-
console.
|
|
155
|
+
console.error('error loc', error);
|
|
154
156
|
currentLocations.current = null;
|
|
155
157
|
setApiKeyStatus({
|
|
156
158
|
status: false,
|
|
@@ -162,7 +164,7 @@ export default function LocationH5(props) {
|
|
|
162
164
|
});
|
|
163
165
|
};
|
|
164
166
|
script.onerror = (error) => {
|
|
165
|
-
console.
|
|
167
|
+
console.error('Geolocation script onerror', error);
|
|
166
168
|
setApiKeyStatus({
|
|
167
169
|
status: false,
|
|
168
170
|
message: '定位失败',
|
|
@@ -177,6 +179,7 @@ export default function LocationH5(props) {
|
|
|
177
179
|
document.body.appendChild(script);
|
|
178
180
|
}
|
|
179
181
|
loadScript();
|
|
182
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
180
183
|
}, [APIKEY, locationType, dataSourceStatus]);
|
|
181
184
|
useEffect(() => {
|
|
182
185
|
// 调用连接器数据源方法
|
|
@@ -199,7 +202,7 @@ export default function LocationH5(props) {
|
|
|
199
202
|
}
|
|
200
203
|
})
|
|
201
204
|
.catch((error) => {
|
|
202
|
-
console.
|
|
205
|
+
console.error('datasources error', error);
|
|
203
206
|
setDataSourceStatus({
|
|
204
207
|
status: false,
|
|
205
208
|
message: error,
|
|
@@ -66,6 +66,7 @@ export default function LocationPC(props) {
|
|
|
66
66
|
customLocation.current = value;
|
|
67
67
|
setLocation(loc);
|
|
68
68
|
}
|
|
69
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
70
|
}, [value]);
|
|
70
71
|
useEffect(() => {
|
|
71
72
|
if (value || !currentLocations.current)
|
|
@@ -91,6 +92,7 @@ export default function LocationPC(props) {
|
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
94
|
setLocation(location);
|
|
95
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
96
|
}, [value, locationType]);
|
|
95
97
|
const showToast = (message) => {
|
|
96
98
|
weui.toast(message, {
|
|
@@ -142,7 +144,7 @@ export default function LocationPC(props) {
|
|
|
142
144
|
}
|
|
143
145
|
})
|
|
144
146
|
.catch((error) => {
|
|
145
|
-
console.
|
|
147
|
+
console.error('datasources error', error);
|
|
146
148
|
setDataSourceStatus({
|
|
147
149
|
status: false,
|
|
148
150
|
message: error,
|
|
@@ -156,6 +158,7 @@ export default function LocationPC(props) {
|
|
|
156
158
|
});
|
|
157
159
|
showToast('请配置地图连接器');
|
|
158
160
|
}
|
|
161
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
159
162
|
}, [dataSource]);
|
|
160
163
|
useEffect(() => {
|
|
161
164
|
let loc = {
|
|
@@ -187,6 +190,7 @@ export default function LocationPC(props) {
|
|
|
187
190
|
poiname: loc.poiname,
|
|
188
191
|
detailedAddress: loc.detailedAddress,
|
|
189
192
|
}, true);
|
|
193
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
190
194
|
}, [locationType]);
|
|
191
195
|
const getIsShowMap = () => {
|
|
192
196
|
let status = showMap;
|
|
@@ -4,8 +4,15 @@ import './index.css';
|
|
|
4
4
|
import { usePlatform } from '../../../utils/platform';
|
|
5
5
|
import LocationH5 from './components/LocationH5/location.h5';
|
|
6
6
|
import LocationPC from './components/LocationPC/location.PC';
|
|
7
|
+
import { CommonErrorBoundary } from '../../common/error-boundary';
|
|
8
|
+
import { useLoopRenderDetect } from '../../common/use-loop-render-detect';
|
|
7
9
|
export default function Location(props) {
|
|
10
|
+
return (React.createElement(CommonErrorBoundary, null,
|
|
11
|
+
React.createElement(LocationImpl, { ...props })));
|
|
12
|
+
}
|
|
13
|
+
function LocationImpl(props) {
|
|
8
14
|
const platform = usePlatform();
|
|
15
|
+
useLoopRenderDetect();
|
|
9
16
|
if ((props === null || props === void 0 ? void 0 : props.showType) === 'pc') {
|
|
10
17
|
return React.createElement(LocationPC, { ...props });
|
|
11
18
|
}
|
|
@@ -38,18 +38,18 @@ label = '标题', labelVisible = true, format = '', enumName = '', name = 'formR
|
|
|
38
38
|
prevRangeRef.current = option;
|
|
39
39
|
setCheckedItemValue((_a = option.find((item) => item.checked)) === null || _a === void 0 ? void 0 : _a.value);
|
|
40
40
|
}
|
|
41
|
-
});
|
|
41
|
+
}, [option]);
|
|
42
42
|
useEffect(() => {
|
|
43
43
|
// 如果绑定字段类型为枚举,且传入自定义选项集的名称则默认使用自定义选项集的内容作为选项
|
|
44
44
|
if (format === 'x-enum' && enumName) {
|
|
45
45
|
fetchData({ OptNameList: [enumName], PageIndex: 1, PageSize: 10 });
|
|
46
46
|
}
|
|
47
|
-
}, []);
|
|
47
|
+
}, [enumName, format]);
|
|
48
48
|
useEffect(() => {
|
|
49
49
|
if (format !== 'x-enum') {
|
|
50
50
|
setOption(range);
|
|
51
51
|
}
|
|
52
|
-
}, [range]);
|
|
52
|
+
}, [format, range]);
|
|
53
53
|
const fetchData = async (param) => {
|
|
54
54
|
var _a, _b, _c;
|
|
55
55
|
const data = await callWedaApi({
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,4 +13,4 @@ export declare const formatDateModeValue: (result?: any[], dateMode?: string) =>
|
|
|
13
13
|
/**
|
|
14
14
|
* 不同时间模式对应的展示格式
|
|
15
15
|
*/
|
|
16
|
-
export declare const getDateModeFormat: (dateMode?: string) => "YYYY" | "YYYY-MM" | "YYYY-MM-DD";
|
|
16
|
+
export declare const getDateModeFormat: (dateMode?: string) => "YYYY" | "YYYY-MM" | "YYYY-MM-DD" | "YYYY-MM-DD HH:mm:ss";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
2
3
|
import weui from '../../../utils/weui';
|
|
3
4
|
import classNames from '../../../utils/classnames';
|
|
4
5
|
import isObjectEqual from '../../../utils/isObjectEqual';
|
|
@@ -8,6 +9,8 @@ import { timePicker, yearPicker, monthPicker } from './time';
|
|
|
8
9
|
import { emptyObject } from '../../../utils/constant';
|
|
9
10
|
import { PureSelectH5 } from './dropdown-select/ui';
|
|
10
11
|
import { useOptions } from './use-options';
|
|
12
|
+
import AllTimePicker from './allTimePicker';
|
|
13
|
+
import { getIOSNotNaNDate } from './allTimePicker/dataUtils';
|
|
11
14
|
export default function Select({
|
|
12
15
|
// 系统属性
|
|
13
16
|
events = emptyObject,
|
|
@@ -27,10 +30,12 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
27
30
|
const [regioDepth, setRegionDepth] = React.useState(3);
|
|
28
31
|
const [regionData, setRegionData] = React.useState([]);
|
|
29
32
|
const [regionTree, setRegionTree] = React.useState([]);
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
34
|
const [typeRegion, setTypeRegion] = React.useState(regionType);
|
|
31
35
|
const [region, setRegion] = React.useState(defaultRegion);
|
|
32
36
|
const [mutiRegion, setMutiRegion] = React.useState([]);
|
|
33
37
|
const [selectedValue, setSelectedValue] = React.useState(defaultValue);
|
|
38
|
+
const allTime = React.useRef();
|
|
34
39
|
// 两次默认值不同, 需要刷新
|
|
35
40
|
const prevDefaultRef = React.useRef({});
|
|
36
41
|
React.useEffect(() => {
|
|
@@ -70,9 +75,17 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
70
75
|
defaultMutiRegion,
|
|
71
76
|
};
|
|
72
77
|
}
|
|
73
|
-
}
|
|
78
|
+
}, [
|
|
79
|
+
defaultValue,
|
|
80
|
+
defaultDate,
|
|
81
|
+
defaultTime,
|
|
82
|
+
defaultRegion,
|
|
83
|
+
defaultMutiRegion,
|
|
84
|
+
regionType,
|
|
85
|
+
dateMode,
|
|
86
|
+
]);
|
|
74
87
|
//实现初始值触发change事件
|
|
75
|
-
const defaultMutiRegionChange = function (treeValue, defaultMutiRegion) {
|
|
88
|
+
const defaultMutiRegionChange = React.useCallback(function (treeValue, defaultMutiRegion) {
|
|
76
89
|
var _a;
|
|
77
90
|
const defaultValue = defaultMutiRegion
|
|
78
91
|
? defaultMutiRegion.split(',')
|
|
@@ -91,7 +104,7 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
91
104
|
});
|
|
92
105
|
(_a = events === null || events === void 0 ? void 0 : events.change) === null || _a === void 0 ? void 0 : _a.call(events, { value: defaultMutiRegion, result: changeValue });
|
|
93
106
|
}
|
|
94
|
-
};
|
|
107
|
+
}, [events]);
|
|
95
108
|
React.useEffect(() => {
|
|
96
109
|
if (mode == 'region' || mode == 'mutiRegion') {
|
|
97
110
|
if (regionData.length < 1) {
|
|
@@ -126,7 +139,13 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
126
139
|
break;
|
|
127
140
|
}
|
|
128
141
|
}
|
|
129
|
-
}, [
|
|
142
|
+
}, [
|
|
143
|
+
regionType,
|
|
144
|
+
mode,
|
|
145
|
+
regionData,
|
|
146
|
+
defaultMutiRegionChange,
|
|
147
|
+
defaultMutiRegion,
|
|
148
|
+
]);
|
|
130
149
|
const onDateclick = function () {
|
|
131
150
|
const options = {
|
|
132
151
|
className: 'weda-ui weda-picker',
|
|
@@ -155,10 +174,42 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
155
174
|
// 年月,2 列
|
|
156
175
|
monthPicker({ ...options });
|
|
157
176
|
}
|
|
158
|
-
else {
|
|
177
|
+
else if (dateMode === 'day') {
|
|
159
178
|
// 年月日,3 列
|
|
160
179
|
weui.datePicker({ id: String(Date.now()), ...options });
|
|
161
180
|
}
|
|
181
|
+
else {
|
|
182
|
+
// 年月日时分秒,4列
|
|
183
|
+
const div = document.createElement('div');
|
|
184
|
+
div.className = options.className;
|
|
185
|
+
ReactDOM.render(React.createElement(AllTimePicker, { startDate: startDate, endDate: endDate, defaultDate: defaultDate, onAllTimeCallback: onAllTimeCallback }), div);
|
|
186
|
+
allTime.current = div;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const onAllTimeCallback = (result) => {
|
|
190
|
+
var _a;
|
|
191
|
+
const div = allTime.current;
|
|
192
|
+
const unmountResult = ReactDOM.unmountComponentAtNode(div);
|
|
193
|
+
if (unmountResult && div.parentNode) {
|
|
194
|
+
div.parentNode.removeChild(div);
|
|
195
|
+
}
|
|
196
|
+
if (result !== undefined && result.length > 0) {
|
|
197
|
+
const time = result[0] +
|
|
198
|
+
'-' +
|
|
199
|
+
result[1] +
|
|
200
|
+
'-' +
|
|
201
|
+
result[2] +
|
|
202
|
+
' ' +
|
|
203
|
+
result[3] +
|
|
204
|
+
':' +
|
|
205
|
+
result[4] +
|
|
206
|
+
':' +
|
|
207
|
+
result[5];
|
|
208
|
+
setDate(time);
|
|
209
|
+
(_a = events === null || events === void 0 ? void 0 : events.change) === null || _a === void 0 ? void 0 : _a.call(events, {
|
|
210
|
+
value: new Date(getIOSNotNaNDate(time)).getTime(),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
162
213
|
};
|
|
163
214
|
const onTimeClick = function () {
|
|
164
215
|
const options = {
|
|
@@ -215,7 +266,6 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
215
266
|
onConfirm(result) {
|
|
216
267
|
var _a;
|
|
217
268
|
const value = result.map((item) => item.value);
|
|
218
|
-
//const value=regionValueSplit(typeRegion,defaultvalue);
|
|
219
269
|
mode == 'region' ? setRegion(value) : setMutiRegion(value);
|
|
220
270
|
const changeValue = mode == 'region' ? value : value.join(',');
|
|
221
271
|
onChange && onChange(changeValue);
|
|
@@ -229,7 +279,7 @@ defaultRegion, defaultMutiRegion, separator, regionType, onChange, }) {
|
|
|
229
279
|
}),
|
|
230
280
|
});
|
|
231
281
|
},
|
|
232
|
-
onChange(
|
|
282
|
+
onChange() { },
|
|
233
283
|
className: 'weda-ui weda-picker',
|
|
234
284
|
id: new Date().valueOf(),
|
|
235
285
|
}, regionTree);
|
|
@@ -346,6 +396,10 @@ export function decodeIsoDatetime(isoStringOrTimesnap, type, dateMode = 'day') {
|
|
|
346
396
|
}
|
|
347
397
|
}
|
|
348
398
|
else {
|
|
399
|
+
if (isoStringOrTimesnap.toString().length === 4) {
|
|
400
|
+
// 添加默认的日期,防止格式化日期异常
|
|
401
|
+
isoStringOrTimesnap = isoStringOrTimesnap + '-01-01 08:00:00';
|
|
402
|
+
}
|
|
349
403
|
return moment(isoStringOrTimesnap).format(getDateModeFormat(dateMode));
|
|
350
404
|
}
|
|
351
405
|
}
|
|
@@ -404,6 +458,8 @@ export const getDateModeFormat = (dateMode = 'day') => {
|
|
|
404
458
|
return 'YYYY-MM';
|
|
405
459
|
case 'day':
|
|
406
460
|
return 'YYYY-MM-DD';
|
|
461
|
+
case 'datetime':
|
|
462
|
+
return 'YYYY-MM-DD HH:mm:ss';
|
|
407
463
|
default:
|
|
408
464
|
return 'YYYY-MM-DD';
|
|
409
465
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import 'moment/locale/zh-cn';
|
|
2
3
|
import type { CommonFormPropsType } from '../types';
|
|
3
4
|
export declare const moment: any;
|
|
4
5
|
export default function Select(props: any): JSX.Element;
|
|
5
6
|
export interface PropsType extends CommonFormPropsType {
|
|
6
7
|
size: 's' | 'm' | 'l' | 'full';
|
|
7
8
|
placeholder: string;
|
|
8
|
-
mode: 'selector' | 'date' | 'time' | 'region' | 'mutiRegion';
|
|
9
|
-
dateMode: 'day' | 'month' | 'year';
|
|
9
|
+
mode: 'selector' | 'date' | 'time' | 'datetime' | 'region' | 'mutiRegion';
|
|
10
|
+
dateMode: 'day' | 'month' | 'year' | 'datetime';
|
|
10
11
|
range?: any[];
|
|
11
12
|
defaultValue?: string;
|
|
12
13
|
dataSourceName?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as _moment from 'moment';
|
|
3
|
+
import 'moment/locale/zh-cn';
|
|
3
4
|
import { usePlatform } from '../../../utils/platform';
|
|
4
5
|
import SelectH5, { decodeIsoDatetime } from './h5';
|
|
5
6
|
import classNames from '../../../utils/classnames';
|
|
@@ -11,11 +12,18 @@ import { emptyObject } from '../../../utils/constant';
|
|
|
11
12
|
import { PureSelectPc } from './dropdown-select/ui';
|
|
12
13
|
import { useOptions } from './use-options';
|
|
13
14
|
import { getRegionTree, getAreaCode } from './region';
|
|
15
|
+
import { CommonErrorBoundary } from '../../common/error-boundary';
|
|
16
|
+
import { useLoopRenderDetect } from '../../common/use-loop-render-detect';
|
|
14
17
|
// @ts-ignore TODO: fix 与plugin构建阶段效果不同
|
|
15
18
|
export const moment = (typeof _moment === 'function' ? _moment : _moment.default);
|
|
16
19
|
export default function Select(props) {
|
|
20
|
+
return (React.createElement(CommonErrorBoundary, null,
|
|
21
|
+
React.createElement(SelectImpl, { ...props })));
|
|
22
|
+
}
|
|
23
|
+
function SelectImpl(props) {
|
|
17
24
|
const { id, style, className, label = '标题', labelVisible = true, layout = 'horizontal', requiredFlag = false, size = 'l', decorator, } = props;
|
|
18
25
|
const platform = usePlatform();
|
|
26
|
+
useLoopRenderDetect();
|
|
19
27
|
let selectEl;
|
|
20
28
|
if (platform === 'h5') {
|
|
21
29
|
selectEl = React.createElement(SelectH5, { ...props });
|
|
@@ -99,7 +107,7 @@ function SelectPc({ where, dataSourceName, viewId, format, primaryField, enumNam
|
|
|
99
107
|
hasChange = true;
|
|
100
108
|
}
|
|
101
109
|
if (((_b = prevDefaultRef.current) === null || _b === void 0 ? void 0 : _b.defaultDate) !== defaultDate) {
|
|
102
|
-
setDate(decodeIsoDatetime(defaultDate, 'date'));
|
|
110
|
+
setDate(decodeIsoDatetime(defaultDate, 'date', dateMode));
|
|
103
111
|
hasChange = true;
|
|
104
112
|
}
|
|
105
113
|
if (((_c = prevDefaultRef.current) === null || _c === void 0 ? void 0 : _c.defaultTime) !== defaultTime) {
|
|
@@ -124,7 +132,14 @@ function SelectPc({ where, dataSourceName, viewId, format, primaryField, enumNam
|
|
|
124
132
|
defaultMutiRegion,
|
|
125
133
|
};
|
|
126
134
|
}
|
|
127
|
-
}
|
|
135
|
+
}, [
|
|
136
|
+
defaultValue,
|
|
137
|
+
defaultDate,
|
|
138
|
+
defaultTime,
|
|
139
|
+
defaultRegion,
|
|
140
|
+
defaultMutiRegion,
|
|
141
|
+
dateMode,
|
|
142
|
+
]);
|
|
128
143
|
React.useEffect(() => {
|
|
129
144
|
if (mode == 'region' || mode == 'mutiRegion') {
|
|
130
145
|
if (regionData.length < 1) {
|
|
@@ -206,6 +221,14 @@ function SelectPc({ where, dataSourceName, viewId, format, primaryField, enumNam
|
|
|
206
221
|
else if (dateMode === 'month') {
|
|
207
222
|
return (React.createElement(DatePicker.MonthPicker, { className: sizeClassName, ...dateProps }));
|
|
208
223
|
}
|
|
224
|
+
else if (dateMode === 'datetime') {
|
|
225
|
+
const startFormat = decodeIsoDatetime(startDate, 'date', 'datetime');
|
|
226
|
+
const endFormat = decodeIsoDatetime(endDate, 'date', 'datetime');
|
|
227
|
+
return (React.createElement(DatePicker, { showTime: true, className: sizeClassName, ...dateProps, range: [
|
|
228
|
+
moment(startFormat, 'YYYY-MM-DD HH:mm:ss'),
|
|
229
|
+
moment(endFormat, 'YYYY-MM-DD HH:mm:ss'),
|
|
230
|
+
] }));
|
|
231
|
+
}
|
|
209
232
|
else {
|
|
210
233
|
return React.createElement(DatePicker, { className: sizeClassName, ...dateProps });
|
|
211
234
|
}
|
|
@@ -58,7 +58,7 @@ export default function YearPicker(props) {
|
|
|
58
58
|
* 获取当前20年,page 表示分页,1表示下一页,-1表示上一页
|
|
59
59
|
* @returns [][]
|
|
60
60
|
*/
|
|
61
|
-
const getYears = (currentYear, page = 0
|
|
61
|
+
const getYears = (currentYear, page = 0) => {
|
|
62
62
|
currentYear = currentYear || new Date().getFullYear();
|
|
63
63
|
const startYear = (Math.floor(parseInt(currentYear) / 20) + page) * 20;
|
|
64
64
|
const pageYears = Array.from({ length: 5 }).map((item, i1) => Array.from({ length: 4 }).map((item, i2) => i1 * 4 + i2 + startYear + ''));
|
|
@@ -31,7 +31,7 @@ label = '标题', labelVisible = true, checked: defaultChecked, layout = 'horizo
|
|
|
31
31
|
// 现在低码组件往源码组件传入的id不唯一, 暂时使用hashcode替代
|
|
32
32
|
const hashcode = getLocalCounter();
|
|
33
33
|
const _id = `switch-${hashcode}`;
|
|
34
|
-
const switchElement = platform === 'h5' ? (React.createElement("div", { className: subCls },
|
|
34
|
+
const switchElement = platform === 'h5' ? (React.createElement("div", { className: subCls, "data-testid": "form-switch" },
|
|
35
35
|
isFlex ? React.createElement("div", { className: "weui-cell__bd" }) : null,
|
|
36
36
|
React.createElement("div", { className: isFlex ? 'weui-cell__ft' : 'weui-cell__bd' },
|
|
37
37
|
React.createElement("label", { htmlFor: _id, key: _id, className: "weui-switch-cp" },
|
|
@@ -45,7 +45,7 @@ label = '标题', labelVisible = true, checked: defaultChecked, layout = 'horizo
|
|
|
45
45
|
const originEvent = context.event;
|
|
46
46
|
setChecked(value);
|
|
47
47
|
events.change({ value }, { originEvent });
|
|
48
|
-
} })));
|
|
48
|
+
}, "data-testid": "form-switch" })));
|
|
49
49
|
return renderDecorator(switchElement, decorator)({
|
|
50
50
|
id,
|
|
51
51
|
className: cls,
|
|
@@ -51,7 +51,7 @@ label = '标题', labelVisible = true, defaultValue = '', placeholder = '请输
|
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
textAreaElement = (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
54
|
-
React.createElement(Input.TextArea, { size: size, placeholder: placeholder, value: value, onChange: onChange, onFocus: onFocus, onBlur: onBlur, maxLength: maxLength, disabled: disabled, autoFocus: autoFocus, showCount: true })));
|
|
54
|
+
React.createElement(Input.TextArea, { "data-testid": "weui-textarea-test", size: size, placeholder: placeholder, value: value, onChange: onChange, onFocus: onFocus, onBlur: onBlur, maxLength: maxLength, disabled: disabled, autoFocus: autoFocus, showCount: true })));
|
|
55
55
|
}
|
|
56
56
|
return renderDecorator(textAreaElement, decorator)({
|
|
57
57
|
id,
|