@cloudbase/weda-ui 3.4.8 → 3.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -30
- package/dist/configs/components/carousel.json +12 -2
- package/dist/configs/components/chart/bar.json +2 -2
- package/dist/configs/components/chart/line.js +2 -2
- package/dist/configs/components/chart/pie.json +2 -2
- package/dist/configs/components/chart/statisticsCard.json +1 -1
- package/dist/configs/components/common/form-input-required.js +176 -0
- package/dist/configs/components/container.js +1 -1
- package/dist/configs/components/customer-service.js +262 -0
- package/dist/configs/components/dataView.js +10 -66
- package/dist/configs/components/flowgraph.json +22 -0
- package/dist/configs/components/form/departTreeSelect.json +10 -0
- package/dist/configs/components/form-checkbox.js +261 -0
- package/dist/configs/components/form-date.js +268 -0
- package/dist/configs/components/form-depart-tree-select.js +237 -0
- package/dist/configs/components/form-email.js +258 -0
- package/dist/configs/components/form-image-uploader.js +326 -0
- package/dist/configs/components/form-input.js +477 -0
- package/dist/configs/components/form-location.js +328 -0
- package/dist/configs/components/form-multi-region.js +202 -0
- package/dist/configs/components/form-phone.js +250 -0
- package/dist/configs/components/form-radio.js +261 -0
- package/dist/configs/components/form-region.js +198 -0
- package/dist/configs/components/form-rich-text.js +212 -0
- package/dist/configs/components/form-select.js +368 -0
- package/dist/configs/components/form-switch.js +153 -0
- package/dist/configs/components/form-text-area.js +241 -0
- package/dist/configs/components/form-time.js +221 -0
- package/dist/configs/components/form-upload-file.js +269 -0
- package/dist/configs/components/form-url.js +259 -0
- package/dist/configs/components/form-user-tree-select.js +315 -0
- package/dist/configs/components/formdetail.json +8 -0
- package/dist/configs/components/grid/col.js +6 -0
- package/dist/configs/components/listView.js +34 -92
- package/dist/configs/components/modal.js +2 -3
- package/dist/configs/components/navigationBar.json +2 -4
- package/dist/configs/components/pagelayout.json +1 -1
- package/dist/configs/components/qr_code.js +117 -0
- package/dist/configs/components/repeater.js +3 -2
- package/dist/configs/components/scrollVeiw.json +3 -1
- package/dist/configs/components/table.json +14 -4
- package/dist/configs/components/tabs.js +1 -1
- package/dist/configs/components/wd-bubble.js +2 -2
- package/dist/configs/components/wd-button.js +5 -5
- package/dist/configs/components/wd-divider.js +3 -3
- package/dist/configs/components/wd-form-detail.js +229 -0
- package/dist/configs/components/wd-form.js +394 -0
- package/dist/configs/components/wd-icon.js +4 -4
- package/dist/configs/components/wd-image.js +5 -0
- package/dist/configs/components/wd-link.js +5 -5
- package/dist/configs/components/wd-table.js +1110 -24
- package/dist/configs/components/wd-text.js +4 -3
- package/dist/configs/components/web-view.js +152 -0
- package/dist/configs/components/wedaVideo.json +4 -2
- package/dist/configs/components/wxOpenApi/share.js +1 -0
- package/dist/configs/index.js +50 -0
- package/dist/configs/type-utils/index.js +0 -1
- package/dist/docs/common/componentList.js +8 -37
- package/dist/docs/common/components/classes-view.js +2 -32
- package/dist/docs/common/components/event-view.js +2 -43
- package/dist/docs/common/components/json-schema-view.js +4 -8
- package/dist/docs/common/components/methods-view.js +2 -30
- package/dist/docs/common/components/properties-view.js +4 -43
- package/dist/docs/common/tableView.js +15 -94
- package/dist/enum/index.js +53 -0
- package/dist/setupTests.js +4 -0
- package/dist/style/index.scss +1 -1
- package/dist/web/actions/showModal/index.js +15 -21
- package/dist/web/components/button/index.css +1 -0
- package/dist/web/components/button/index.js +3 -6
- package/dist/web/components/calendar/index.js +19 -45
- package/dist/web/components/carousel/index.js +35 -45
- package/dist/web/components/chart/bar/index.js +6 -7
- package/dist/web/components/chart/bar/index.old.js +3 -2
- package/dist/web/components/chart/common/Chart.js +3 -2
- package/dist/web/components/chart/common/chart-custom-connector.js +3 -7
- package/dist/web/components/chart/common/core/eChartLine.js +12 -1
- package/dist/web/components/chart/common/data-transform.js +13 -9
- package/dist/web/components/chart/line/index.js +6 -7
- package/dist/web/components/chart/line/index.old.js +5 -3
- package/dist/web/components/chart/pie/index.js +6 -7
- package/dist/web/components/chart/pie/index.old.js +3 -2
- package/dist/web/components/chart/statisticsCard/index.js +3 -9
- package/dist/web/components/common/error-boundary.js +13 -15
- package/dist/web/components/common/form-item-wrapper.js +4 -0
- package/dist/web/components/common/use-loop-render-detect.js +2 -2
- package/dist/web/components/container/index.js +2 -2
- package/dist/web/components/customer-service/convert-legacy-props.js +14 -0
- package/dist/web/components/customer-service/customer-service.js +13 -0
- package/dist/web/components/customer-service/index.js +3 -0
- package/dist/web/components/dataView/index.js +5 -1
- package/dist/web/components/drawer/index.js +2 -3
- package/dist/web/components/flow/common/components/container.js +12 -0
- package/dist/web/components/flow/common/components/index.js +2 -0
- package/dist/web/components/flow/common/components/text/index.js +62 -0
- package/dist/web/components/flow/common/constants.js +14 -0
- package/dist/web/components/flow/common/hooks/index.js +2 -0
- package/dist/web/components/flow/common/hooks/useCommonFlowData/flow-get.js +83 -0
- package/dist/web/components/flow/common/hooks/useCommonFlowData/index.js +67 -0
- package/dist/web/components/flow/common/hooks/useCommonFlowData/preview-data.js +45 -0
- package/dist/web/components/flow/common/hooks/useCommonFlowData/request-hub.js +125 -0
- package/dist/web/components/flow/common/hooks/useCommonFlowData/types.js +1 -0
- package/dist/web/components/flow/common/hooks/useElementMediaQuery.js +23 -0
- package/dist/web/components/flow/common/hooks/useFlowConfig.js +44 -0
- package/dist/web/components/flow/common/hooks/useFlowFormLoad.js +64 -0
- package/dist/web/components/flow/common/hooks/useFlowPageType.js +49 -0
- package/dist/web/components/flow/common/index.js +6 -0
- package/dist/web/components/flow/common/request.js +47 -0
- package/dist/web/components/flow/common/types.js +1 -0
- package/dist/web/components/flow/common/utils.js +15 -0
- package/dist/web/components/flow/modules/basic/Basic.js +14 -22
- package/dist/web/components/flow/modules/basic/BasicMobile.js +12 -30
- package/dist/web/components/flow/modules/basic/index.js +19 -11
- package/dist/web/components/flow/modules/basic/status-text.js +37 -0
- package/dist/web/components/flow/modules/basic/utils.js +17 -8
- package/dist/web/components/flow/modules/chart/Chart.js +22 -41
- package/dist/web/components/flow/modules/chart/index.js +49 -5
- package/dist/web/components/flow/modules/chart/preview-data.js +88 -0
- package/dist/web/components/flow/modules/chart/utils.js +111 -0
- package/dist/web/components/flow/modules/combination/index.js +4 -6
- package/dist/web/components/flow/modules/layout/index.css +2 -2
- package/dist/web/components/flow/modules/layout/index.js +11 -15
- package/dist/web/components/flow/modules/operations/components/button/index.js +2 -4
- package/dist/web/components/flow/modules/operations/components/popup/index.js +11 -15
- package/dist/web/components/flow/modules/operations/components/user-select/index.js +4 -5
- package/dist/web/components/flow/modules/operations/config/approval-form-config.js +8 -9
- package/dist/web/components/flow/modules/operations/config/control-config.js +38 -33
- package/dist/web/components/flow/modules/operations/control.js +21 -15
- package/dist/web/components/flow/modules/operations/controls-items/add-assignee-btn.js +8 -8
- package/dist/web/components/flow/modules/operations/controls-items/apply-cc-btn.js +2 -2
- package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/comment/index.js +3 -6
- package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/index.js +25 -32
- package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/field/index.js +2 -6
- package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/index.js +15 -7
- package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/style.css +1 -0
- package/dist/web/components/flow/modules/operations/controls-items/cancel-apply-btn.js +2 -2
- package/dist/web/components/flow/modules/operations/controls-items/check-list-popup/index.js +2 -4
- package/dist/web/components/flow/modules/operations/controls-items/flow-task-info-modal/index.js +20 -0
- package/dist/web/components/flow/modules/operations/controls-items/flow-task-info-modal/view-model.js +119 -0
- package/dist/web/components/flow/modules/operations/controls-items/initiation-btn.js +6 -3
- package/dist/web/components/flow/modules/operations/controls-items/revoke-modal/index.js +13 -22
- package/dist/web/components/flow/modules/operations/controls-items/roll-back-modal.js +18 -26
- package/dist/web/components/flow/modules/operations/view-model.js +95 -70
- package/dist/web/components/flow/process/components/comment-text/index.js +24 -0
- package/dist/web/components/flow/process/components/comment-text/style.css +33 -0
- package/dist/web/components/flow/process/components/descriptions/index.js +19 -0
- package/dist/web/components/flow/process/components/descriptions/style.css +31 -0
- package/dist/web/components/flow/process/components/index.js +4 -0
- package/dist/web/components/flow/process/components/timeline/index.js +13 -0
- package/dist/web/components/flow/process/components/timeline/style.css +75 -0
- package/dist/web/components/flow/process/constants.js +46 -0
- package/dist/web/components/flow/process/index.js +2 -0
- package/dist/web/components/flow/process/process.js +113 -0
- package/dist/web/components/flow/process/style.css +17 -0
- package/dist/web/components/flow/process/types.js +1 -0
- package/dist/web/components/flow/process/view-model.js +135 -0
- package/dist/web/components/flow-graph/constants.js +28 -0
- package/dist/web/components/flow-graph/graph.js +267 -0
- package/dist/web/components/flow-graph/index.js +2 -0
- package/dist/web/components/flow-graph/style.css +109 -0
- package/dist/web/components/flow-graph/types.js +1 -0
- package/dist/web/components/form/checkbox/index.js +18 -19
- package/dist/web/components/form/enumSelect/MultipleSelect.js +4 -5
- package/dist/web/components/form/enumSelect/NormalSelect.js +4 -5
- package/dist/web/components/form/enumSelect/SelectContainer.js +2 -2
- package/dist/web/components/form/form/index.js +8 -14
- package/dist/web/components/form/formcell/index.js +12 -18
- package/dist/web/components/form/input/index.js +17 -16
- package/dist/web/components/form/location/common/mapChoose.js +37 -69
- package/dist/web/components/form/location/common/mapView.js +2 -1
- package/dist/web/components/form/location/common/selectModal.js +3 -7
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +22 -34
- package/dist/web/components/form/location/components/LocationPC/Header.js +6 -15
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +13 -15
- package/dist/web/components/form/location/index.js +5 -7
- package/dist/web/components/form/radio/index.js +8 -12
- package/dist/web/components/form/renderDecorator.js +3 -2
- package/dist/web/components/form/select/allTimePicker/calendar.js +27 -28
- package/dist/web/components/form/select/allTimePicker/index.js +66 -91
- package/dist/web/components/form/select/dropdown-select/h5.js +30 -53
- package/dist/web/components/form/select/dropdown-select/index.css +4 -0
- package/dist/web/components/form/select/dropdown-select/index.js +7 -3
- package/dist/web/components/form/select/dropdown-select/pc.js +27 -29
- package/dist/web/components/form/select/dropdown-select/ui.js +4 -8
- package/dist/web/components/form/select/h5.js +8 -6
- package/dist/web/components/form/select/index.js +19 -20
- package/dist/web/components/form/select/region/index.js +2 -2
- package/dist/web/components/form/select/request.js +10 -10
- package/dist/web/components/form/select/status/allEmpty.js +2 -2
- package/dist/web/components/form/select/status/empty.js +3 -2
- package/dist/web/components/form/select/status/loading.js +3 -4
- package/dist/web/components/form/select/status/retry.js +3 -4
- package/dist/web/components/form/select/year.js +16 -31
- package/dist/web/components/form/switch/index.js +11 -15
- package/dist/web/components/form/textarea/index.js +5 -10
- package/dist/web/components/form/tips/index.js +2 -2
- package/dist/web/components/form/uploader/index.js +5 -4
- package/dist/web/components/form/uploader/uploader.h5.js +29 -54
- package/dist/web/components/form/uploader/uploader.pc.js +18 -44
- package/dist/web/components/form/uploaderFile/index.js +4 -5
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +58 -104
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +42 -69
- package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +44 -62
- package/dist/web/components/form/userOrgSelect/common/utils.js +225 -0
- package/dist/web/components/form/userOrgSelect/component/OrgPaths.js +12 -0
- package/dist/web/components/form/userOrgSelect/component/depart-breadcrumb.js +5 -10
- package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +9 -19
- package/dist/web/components/form/userOrgSelect/component/depart-select/departTreeSelect.h5.js +156 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +58 -21
- package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +29 -35
- package/dist/web/components/form/userOrgSelect/component/error-tips.js +4 -4
- package/dist/web/components/form/userOrgSelect/component/index.css +52 -0
- package/dist/web/components/form/userOrgSelect/component/input-tags.js +4 -18
- package/dist/web/components/form/userOrgSelect/component/modal-search-h5.js +11 -19
- package/dist/web/components/form/userOrgSelect/component/modal-search.js +2 -5
- package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +49 -35
- package/dist/web/components/form/userOrgSelect/component/org-tree-h5.js +7 -13
- package/dist/web/components/form/userOrgSelect/component/org-tree.js +26 -18
- package/dist/web/components/form/userOrgSelect/component/selected-list-h5.js +23 -40
- package/dist/web/components/form/userOrgSelect/component/selected-list.js +8 -5
- package/dist/web/components/form/userOrgSelect/component/user-org-list.js +35 -35
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +30 -4
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-list-h5.js +36 -50
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +9 -11
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/error-tips.js +4 -4
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/model-user-list.js +24 -17
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/org-tree.js +2 -2
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +12 -30
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +8 -8
- package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +20 -2
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +68 -158
- package/dist/web/components/form/userOrgSelect/hooks/use-depart-data.js +4 -2
- package/dist/web/components/form-checkbox/index.js +36 -0
- package/dist/web/components/form-date/index.js +52 -0
- package/dist/web/components/form-depart-tree-select/index.js +22 -0
- package/dist/web/components/form-email/index.js +31 -0
- package/dist/web/components/form-image-uploader/index.js +50 -0
- package/dist/web/components/form-input/index.js +25 -0
- package/dist/web/components/form-input-hooks/index.js +284 -0
- package/dist/web/components/form-input-hooks/validator.js +124 -0
- package/dist/web/components/form-location/index.js +24 -0
- package/dist/web/components/form-multi-region/index.js +22 -0
- package/dist/web/components/form-phone/index.js +32 -0
- package/dist/web/components/form-radio/index.js +38 -0
- package/dist/web/components/form-region/index.js +24 -0
- package/dist/web/components/form-rich-text/index.js +22 -0
- package/dist/web/components/form-select/index.js +21 -0
- package/dist/web/components/form-switch/index.js +22 -0
- package/dist/web/components/form-text-area/index.js +22 -0
- package/dist/web/components/form-time/index.js +22 -0
- package/dist/web/components/form-upload-file/index.js +47 -0
- package/dist/web/components/form-url/index.js +31 -0
- package/dist/web/components/form-user-tree-select/index.js +24 -0
- package/dist/web/components/formdetail/index.css +213 -3
- package/dist/web/components/formdetail/index.js +156 -30
- package/dist/web/components/graphicCard/index.js +13 -25
- package/dist/web/components/grid/col.js +3 -2
- package/dist/web/components/grid/grid.js +4 -3
- package/dist/web/components/grid/row.js +3 -2
- package/dist/web/components/image/image.js +52 -57
- package/dist/web/components/image/index.js +2 -2
- package/dist/web/components/index.js +46 -3
- package/dist/web/components/link/index.js +3 -5
- package/dist/web/components/listView/index.js +29 -49
- package/dist/web/components/lottery/index.js +123 -143
- package/dist/web/components/modal/h5.css +3 -0
- package/dist/web/components/modal/index.js +3 -2
- package/dist/web/components/modal/modal.h5.js +8 -14
- package/dist/web/components/modal/modal.pc.js +5 -7
- package/dist/web/components/navLayout/index.js +13 -20
- package/dist/web/components/navigationBar/common.js +12 -14
- package/dist/web/components/navigationBar/h5Menu.js +18 -37
- package/dist/web/components/navigationBar/horizontalMenu.js +33 -50
- package/dist/web/components/navigationBar/index.css +2 -1
- package/dist/web/components/navigationBar/index.js +5 -10
- package/dist/web/components/navigationBar/verticalMenu.js +11 -13
- package/dist/web/components/pageLayout/PageContent/index.js +7 -14
- package/dist/web/components/pageLayout/index.css +10 -0
- package/dist/web/components/pageLayout/index.js +7 -12
- package/dist/web/components/phone/index.js +2 -4
- package/dist/web/components/phoneCode/index.js +2 -4
- package/dist/web/components/picker/datePicker.js +2 -2
- package/dist/web/components/picker/picker.js +2 -2
- package/dist/web/components/picker/timePicker.js +2 -2
- package/dist/web/components/qrcode/index.js +3 -0
- package/dist/web/components/qrcode/qr-code.js +26 -0
- package/dist/web/components/repeater/index.js +2 -2
- package/dist/web/components/repeater-item/index.js +2 -2
- package/dist/web/components/richText/index.js +74 -93
- package/dist/web/components/richTextView/index.js +3 -3
- package/dist/web/components/scrollView/index.js +4 -3
- package/dist/web/components/share/index.js +2 -4
- package/dist/web/components/slot/index.js +2 -2
- package/dist/web/components/statusContent/index.css +39 -0
- package/dist/web/components/statusContent/index.js +9 -0
- package/dist/web/components/swiper/index.js +44 -48
- package/dist/web/components/table/BaseTable.js +142 -190
- package/dist/web/components/table/ExportFileModalByApi/index.js +29 -60
- package/dist/web/components/table/FieldRender.js +47 -51
- package/dist/web/components/table/FilterFields.js +45 -71
- package/dist/web/components/table/Form/Enum.js +4 -4
- package/dist/web/components/table/Form/Location.js +9 -9
- package/dist/web/components/table/ImportFileModal/index.css +261 -0
- package/dist/web/components/table/ImportFileModal/index.js +47 -107
- package/dist/web/components/table/ImportFileModal/validate.js +9 -9
- package/dist/web/components/table/ImportFileModalByApi/index.css +35 -3
- package/dist/web/components/table/ImportFileModalByApi/index.js +96 -113
- package/dist/web/components/table/ImportFileModalByApi/uploadCSVFile.js +23 -47
- package/dist/web/components/table/InOrOutRecordModeal.js +26 -47
- package/dist/web/components/table/QuoteModal.js +3 -5
- package/dist/web/components/table/SelectableBlock/index.js +23 -27
- package/dist/web/components/table/UserDepartment/ViewCell.js +3 -3
- package/dist/web/components/table/UserDepartment/utils.js +4 -4
- package/dist/web/components/table/baseTable.css +0 -10
- package/dist/web/components/table/index.js +3 -5
- package/dist/web/components/tabs/index.js +5 -6
- package/dist/web/components/tabs/tabs.h5.js +12 -14
- package/dist/web/components/tabs/tabs.pc.js +15 -14
- package/dist/web/components/text/index.js +3 -2
- package/dist/web/components/uploaderFileView/index.js +4 -3
- package/dist/web/components/uploaderView/index.js +12 -16
- package/dist/web/components/userInfo/index.js +2 -4
- package/dist/web/components/wd-bubble/wd-bubble.js +10 -11
- package/dist/web/components/wd-button/wd-button.js +24 -8
- package/dist/web/components/wd-config-provider/wd-config-provider.js +3 -2
- package/dist/web/components/wd-divider/wd-divider.js +3 -2
- package/dist/web/components/wd-form/hooks/use-auth-value.js +43 -0
- package/dist/web/components/wd-form/hooks/use-remote-value.js +79 -0
- package/dist/web/components/wd-form/index.js +382 -0
- package/dist/web/components/wd-icon/wd-icon.js +3 -2
- package/dist/web/components/wd-image/image.js +98 -96
- package/dist/web/components/wd-image/index.js +4 -3
- package/dist/web/components/wd-link/wd-link.js +4 -8
- package/dist/web/components/wd-table/components/ExportFileModalByApi/ExportFileModalByApi.js +7 -0
- package/dist/web/components/wd-table/components/ExportFileModalByApi/index.css +9 -0
- package/dist/web/components/wd-table/components/ExportFileModalByApi/index.js +74 -0
- package/dist/web/components/wd-table/components/FieldRender/Form/Enum.js +56 -0
- package/dist/web/components/wd-table/components/FieldRender/Form/Location.css +11 -0
- package/dist/web/components/wd-table/components/FieldRender/Form/Location.js +127 -0
- package/dist/web/components/wd-table/components/FieldRender/ImagePreview.js +8 -0
- package/dist/web/components/wd-table/components/FieldRender/QuoteModal.js +17 -0
- package/dist/web/components/wd-table/components/FieldRender/UserDepartment/ViewCell.js +11 -0
- package/dist/web/components/wd-table/components/FieldRender/UserDepartment/utils.js +82 -0
- package/dist/web/components/wd-table/components/FieldRender/UserDepartment/viewCell.css +11 -0
- package/dist/web/components/wd-table/components/FieldRender/index.js +702 -0
- package/dist/web/components/wd-table/components/FilterFieldsPanel/Fields.js +82 -0
- package/dist/web/components/wd-table/components/FilterFieldsPanel/FilterFieldItem.js +86 -0
- package/dist/web/components/wd-table/components/FilterFieldsPanel/InputAdornment.js +9 -0
- package/dist/web/components/wd-table/components/FilterFieldsPanel/SelectSearch.js +44 -0
- package/dist/web/components/wd-table/components/FilterFieldsPanel/filterFieldsGenerate.js +113 -0
- package/dist/web/components/wd-table/components/FilterFieldsPanel/index.js +169 -0
- package/dist/web/components/wd-table/components/ImportFileModalByApi/index.js +44 -0
- package/dist/web/components/wd-table/components/InOrOutRecordModal.js +14 -0
- package/dist/web/components/wd-table/components/Pagination/index.js +11 -0
- package/dist/web/components/wd-table/components/SearchBox/index.js +45 -0
- package/dist/web/components/wd-table/components/Table/index.js +172 -0
- package/dist/web/components/wd-table/components/Table/util.js +63 -0
- package/dist/web/components/wd-table/components/ToolBar/index.js +34 -0
- package/dist/web/components/wd-table/components/deleteModal.js +40 -0
- package/dist/web/components/wd-table/components/index.js +10 -0
- package/dist/web/components/wd-table/hooks/useAuthFields.js +13 -0
- package/dist/web/components/wd-table/hooks/useChooseList.js +70 -0
- package/dist/web/components/wd-table/hooks/useDataSource.js +5 -0
- package/dist/web/components/wd-table/hooks/useQueryParams.js +41 -0
- package/dist/web/components/wd-table/hooks/useTableData.js +42 -0
- package/dist/web/components/wd-table/hooks/useViewFields.js +20 -0
- package/dist/web/components/wd-table/mock/index.js +202 -0
- package/dist/web/components/wd-table/utils/index.js +326 -0
- package/dist/web/components/wd-table/wd-table.js +459 -21
- package/dist/web/components/wd-text/wd-text.js +15 -14
- package/dist/web/components/web-view/index.css +5 -0
- package/dist/web/components/web-view/index.js +3 -0
- package/dist/web/components/web-view/web-view.js +61 -0
- package/dist/web/components/wedaVideo/index.js +2 -5
- package/dist/web/utils/constant.js +1 -0
- package/dist/web/utils/datasource.js +3 -1
- package/dist/web/utils/getModelParams.js +32 -0
- package/dist/web/utils/hooks/CreatePortal.js +3 -2
- package/dist/web/utils/hooks/EnumHoc.js +3 -2
- package/dist/web/utils/hooks/globalConnect.js +2 -3
- package/dist/web/utils/hooks/use-cloud-id-temp-url.js +6 -6
- package/dist/web/utils/hooks/useDataSource.js +22 -0
- package/dist/web/utils/loading-fallback.js +2 -2
- package/dist/web/utils/platform.js +21 -0
- package/dist/web/utils/tcb.js +0 -13
- package/dist/web/utils/tool.js +14 -0
- package/dist/web/utils/widget-api/index.js +39 -7
- package/package.json +32 -25
- package/dist/web/components/emptyContent/index.css +0 -26
- package/dist/web/components/flow/components/FlowModuleText/index.css +0 -4
- package/dist/web/components/flow/modules/process/index.css +0 -194
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useRef } from 'react';
|
|
3
3
|
import classNames from '../../utils/classnames';
|
|
4
4
|
import Swipe from 'react-easy-swipe';
|
|
@@ -45,11 +45,10 @@ export default function Carousel({ className, style, autoplay, circular, vertica
|
|
|
45
45
|
setHeight(e.target.clientHeight);
|
|
46
46
|
});
|
|
47
47
|
const itemsClone = images === null || images === void 0 ? void 0 : images.map((x, i) => {
|
|
48
|
-
return (
|
|
49
|
-
React.createElement(Image, { mode: 'scaleToFill', lazyLoad: false, maskClosable: false, imgPreview: false, src: x.image, alt: '图片', fit: x.fit, style: {
|
|
48
|
+
return (_jsx("div", { className: "g-swiper-item", "data-index": i, children: _jsx(Image, { mode: 'scaleToFill', lazyLoad: false, maskClosable: false, imgPreview: false, src: x.image, alt: '图片', fit: x.fit, style: {
|
|
50
49
|
height: x.height ? x.height : 'auto',
|
|
51
50
|
width: x.width ? x.width : '100%',
|
|
52
|
-
} })));
|
|
51
|
+
} }) }, i));
|
|
53
52
|
});
|
|
54
53
|
const setIndex = (index) => {
|
|
55
54
|
if (index >= itemCount) {
|
|
@@ -110,45 +109,37 @@ export default function Carousel({ className, style, autoplay, circular, vertica
|
|
|
110
109
|
}
|
|
111
110
|
setSwipeStyle(style);
|
|
112
111
|
};
|
|
113
|
-
return (
|
|
112
|
+
return (_jsxs("div", { className: classNames('g-swiper weda-ui g-carousel', className, {
|
|
114
113
|
vertical: vertical,
|
|
115
|
-
}), style: { height: height ? height : 'auto', ...style }, ref: outerWrapRef, id: id, "data-testid": "carousel"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
React.createElement("a", { href: "#", className: "g-swiper__turn-pre", onClick: (ev) => {
|
|
145
|
-
ev.preventDefault();
|
|
146
|
-
setIndex(currentIndex - 1);
|
|
147
|
-
} }, "\u4E0A\u4E00\u9875"),
|
|
148
|
-
React.createElement("a", { href: "#", className: "g-swiper__turn-next", onClick: (ev) => {
|
|
149
|
-
ev.preventDefault();
|
|
150
|
-
setIndex(currentIndex + 1);
|
|
151
|
-
} }, "\u4E0B\u4E00\u9875")));
|
|
114
|
+
}), style: { height: height ? height : 'auto', ...style }, ref: outerWrapRef, id: id, "data-testid": "carousel", children: [itemCount > 0 ? (
|
|
115
|
+
// @ts-ignore todo
|
|
116
|
+
_jsxs(Swipe, { className: "g-swiper-list", style: swipeStyle, tolerance: 20, onSwipeLeft: () => {
|
|
117
|
+
vertical || setIndex(currentIndex + 1);
|
|
118
|
+
}, onSwipeRight: () => {
|
|
119
|
+
vertical || setIndex(currentIndex - 1);
|
|
120
|
+
}, onSwipeDown: () => {
|
|
121
|
+
vertical && setIndex(currentIndex - 1);
|
|
122
|
+
}, onSwipeUp: () => {
|
|
123
|
+
vertical && setIndex(currentIndex + 1);
|
|
124
|
+
}, children: [itemsClone[itemCount - 1], images === null || images === void 0 ? void 0 : images.map((x, i) => {
|
|
125
|
+
return (_jsx(SwiperItem, { setHeight: setHeight, currentIndex: currentIndex, index: i, imagesValue: x, children: _jsx(Image, { mode: 'scaleToFill', lazyLoad: false, maskClosable: false, imgPreview: false, fit: x.fit, src: x.image, alt: '图片', style: {
|
|
126
|
+
height: x.height ? x.height : 'auto',
|
|
127
|
+
width: x.width ? x.width : '100%',
|
|
128
|
+
} }) }, i));
|
|
129
|
+
}), itemsClone[0]] })) : null, indicatorDots ? (_jsx("div", { className: "g-swiper__pagination", children: images === null || images === void 0 ? void 0 : images.map((x, i) => {
|
|
130
|
+
return (_jsx("a", { href: "#", className: "g-swiper__pagination-bulletm", "data-testid": "g-swiper__pagination-bulletm", style: {
|
|
131
|
+
backgroundColor: currentIndex === i ? indicatorActiveColor : indicatorColor,
|
|
132
|
+
}, onClick: (e) => {
|
|
133
|
+
setIndex(i);
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
}, "data-index": i }, i));
|
|
136
|
+
}) })) : (false), _jsx("a", { href: "#", className: "g-swiper__turn-pre", onClick: (ev) => {
|
|
137
|
+
ev.preventDefault();
|
|
138
|
+
setIndex(currentIndex - 1);
|
|
139
|
+
}, children: "\u4E0A\u4E00\u9875" }), _jsx("a", { href: "#", className: "g-swiper__turn-next", onClick: (ev) => {
|
|
140
|
+
ev.preventDefault();
|
|
141
|
+
setIndex(currentIndex + 1);
|
|
142
|
+
}, children: "\u4E0B\u4E00\u9875" })] }));
|
|
152
143
|
}
|
|
153
144
|
const SwiperItem = ({ setHeight, children, currentIndex, index, imagesValue }) => {
|
|
154
145
|
const firstChildRef = useRef(null);
|
|
@@ -244,8 +235,7 @@ const SwiperItem = ({ setHeight, children, currentIndex, index, imagesValue }) =
|
|
|
244
235
|
newPage ? window.open(href) : (location.href = href);
|
|
245
236
|
}
|
|
246
237
|
};
|
|
247
|
-
return (
|
|
238
|
+
return (_jsx("div", { className: classNames('g-swiper-item', {
|
|
248
239
|
current: index === currentIndex,
|
|
249
|
-
}), "data-index": index, onClick: handleImage, "data-testid": "swiper-item" }
|
|
250
|
-
React.createElement("div", { ref: firstChildRef }, children)));
|
|
240
|
+
}), "data-index": index, onClick: handleImage, "data-testid": "swiper-item", children: _jsx("div", { ref: firstChildRef, children: children }) }));
|
|
251
241
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import OldBar from './index.old';
|
|
3
3
|
import { checkIsNewData, transform } from '../common/data-transform';
|
|
4
4
|
import { Chart } from '../common/Chart';
|
|
@@ -21,21 +21,20 @@ function BarImpl(props) {
|
|
|
21
21
|
oldBarProps['connectorMethod'] = undefined;
|
|
22
22
|
oldBarProps['connectorParams'] = undefined;
|
|
23
23
|
oldBarProps['connector'] = undefined;
|
|
24
|
-
return
|
|
24
|
+
return _jsx(OldBar, { ...oldBarProps });
|
|
25
25
|
}
|
|
26
26
|
else if (props.dataSourceType === 'variable') {
|
|
27
27
|
const { datasourceVariable = emptyArray, id, style, className, events, ...rest } = props;
|
|
28
28
|
const chartOptions = transform('bar', datasourceVariable, rest);
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx(Chart, { id: id, "data-testid": "bar", className: className, style: style, events: events, chartOptions: chartOptions }));
|
|
30
30
|
}
|
|
31
31
|
else if (props.dataSourceType === 'custom-connector') {
|
|
32
|
-
return
|
|
32
|
+
return _jsx(ChartCustomConnector, { "data-testid": "bar", type: "bar", ...props });
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
return
|
|
35
|
+
return _jsx(OldBar, { ...props });
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export default function Bar(props) {
|
|
39
|
-
return (
|
|
40
|
-
React.createElement(BarImpl, { ...props })));
|
|
39
|
+
return (_jsx(CommonErrorBoundary, { ...props, children: _jsx(BarImpl, { ...props }) }));
|
|
41
40
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import EchartBar from '../common/core/eChartBar';
|
|
3
4
|
import { useWedaChart } from '../common/useChart';
|
|
4
5
|
import classNames from '../../../utils/classnames';
|
|
@@ -47,7 +48,7 @@ export default function Bar(opts) {
|
|
|
47
48
|
backgroundColor: '#ffffff',
|
|
48
49
|
...style,
|
|
49
50
|
};
|
|
50
|
-
return (
|
|
51
|
+
return (_jsx("div", { id: id, "data-testid": "bar", ref: domRef, style: inlineStyle, className: classNames({
|
|
51
52
|
'weda-ui-chart-bar': true,
|
|
52
53
|
'echart-wrapper-canvas': true,
|
|
53
54
|
'echart-dark-body': true,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
2
3
|
import classNames from '../../../utils/classnames';
|
|
3
4
|
import { useChart } from './useChart';
|
|
4
5
|
export function Chart(props) {
|
|
@@ -15,7 +16,7 @@ export function Chart(props) {
|
|
|
15
16
|
var _a;
|
|
16
17
|
(_a = chart === null || chart === void 0 ? void 0 : chart.setOption) === null || _a === void 0 ? void 0 : _a.call(chart, chartOptions, true);
|
|
17
18
|
}, [chart, chartOptions]);
|
|
18
|
-
return (
|
|
19
|
+
return (_jsx("div", { id: id, "data-testid": dataTestId, ref: ref, style: inlineStyle, className: classNames({
|
|
19
20
|
'echart-wrapper-canvas': true,
|
|
20
21
|
'echart-dark-body': true,
|
|
21
22
|
[className]: className,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useAsync } from '@react-hookz/web';
|
|
2
|
-
import
|
|
3
|
+
import { useEffect } from 'react';
|
|
3
4
|
import { callDataSource } from '../../../utils/tcb';
|
|
4
5
|
import { Chart } from './Chart';
|
|
5
6
|
import { ChartError } from './chart-error';
|
|
@@ -26,10 +27,5 @@ export const ChartCustomConnector = (props) => {
|
|
|
26
27
|
throw state.error;
|
|
27
28
|
}
|
|
28
29
|
const chartOptions = transform(type, state.result, restProps);
|
|
29
|
-
return (
|
|
30
|
+
return (_jsx(Chart, { id: restProps.id, className: restProps.className, "data-testid": restProps['data-testid'], style: restProps.style, events: restProps.events, chartOptions: chartOptions }));
|
|
30
31
|
};
|
|
31
|
-
/*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import EchartBase from './eChartBase';
|
|
2
2
|
import getConfig from '../config/line';
|
|
3
|
+
import lodashSet from 'lodash.set';
|
|
3
4
|
/**
|
|
4
5
|
* 折线图表
|
|
5
6
|
* @author loonglong
|
|
@@ -108,6 +109,15 @@ class EchartLine extends EchartBase {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
112
|
+
setColor({ setColor }) {
|
|
113
|
+
if (this.config.series.length > 0 && setColor && setColor.length > 0) {
|
|
114
|
+
let i = 0;
|
|
115
|
+
this.config.series.forEach((itemSeries) => {
|
|
116
|
+
lodashSet(itemSeries, 'itemStyle.color', setColor[i % 6]);
|
|
117
|
+
i = i + 1;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
111
121
|
setChartType({ chartType }) {
|
|
112
122
|
this.config.series.length > 0 &&
|
|
113
123
|
this.config.series.forEach((itemSeries) => {
|
|
@@ -138,7 +148,7 @@ class EchartLine extends EchartBase {
|
|
|
138
148
|
this.config.yAxis.axisLabel.formatter = null;
|
|
139
149
|
}
|
|
140
150
|
}
|
|
141
|
-
async setOptions({ chartType, isTitle, title,
|
|
151
|
+
async setOptions({ chartType, setColor, isTitle, title,
|
|
142
152
|
// titleLocation,
|
|
143
153
|
dataSource, filterData, xField, xStatistics, groupKey, groupKeyTimeSpan, xIsCountEmpty, yField, isLegend, legend,
|
|
144
154
|
// legend2,
|
|
@@ -156,6 +166,7 @@ class EchartLine extends EchartBase {
|
|
|
156
166
|
});
|
|
157
167
|
}
|
|
158
168
|
this.setChartType({ chartType });
|
|
169
|
+
this.setColor({ setColor });
|
|
159
170
|
this.setTitle({ isTitle, title });
|
|
160
171
|
this.setLegend({ isLegend, legend });
|
|
161
172
|
this.setIsXaxisAxisLabelShow({ isXaxisAxisLabelShow });
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { debug } from '../../../utils/console';
|
|
2
2
|
import { ChartError } from './chart-error';
|
|
3
|
+
import lodashSet from 'lodash.set';
|
|
4
|
+
import { isNil } from '../../../utils/lodash';
|
|
3
5
|
export const checkIsNewData = (props) => {
|
|
4
6
|
var _a, _b;
|
|
5
7
|
return (Object.keys((_a = props.dataSource) !== null && _a !== void 0 ? _a : {}).length === 0 &&
|
|
@@ -55,12 +57,17 @@ export function transform(chartType, dataInput, chartInput) {
|
|
|
55
57
|
}
|
|
56
58
|
return true;
|
|
57
59
|
});
|
|
58
|
-
const
|
|
60
|
+
const formatter = ({ value, percent }) => {
|
|
59
61
|
let val = Number(value);
|
|
62
|
+
let result = '';
|
|
60
63
|
if (chartInput.isUnit) {
|
|
61
64
|
val = val / chartInput.unit;
|
|
62
65
|
}
|
|
63
|
-
|
|
66
|
+
result = `${val.toFixed(chartInput.decimalDigits)}${chartInput.suffix}`;
|
|
67
|
+
if (chartInput.isPercent && !isNil(percent)) {
|
|
68
|
+
result = `${result}(${percent}%)`;
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
64
71
|
};
|
|
65
72
|
const series = [];
|
|
66
73
|
const groups = [];
|
|
@@ -105,8 +112,8 @@ export function transform(chartType, dataInput, chartInput) {
|
|
|
105
112
|
]
|
|
106
113
|
: [eachYaxis.Value],
|
|
107
114
|
};
|
|
108
|
-
if (chartInput.isUnit) {
|
|
109
|
-
series[idx].label.formatter =
|
|
115
|
+
if (chartInput.isUnit || chartInput.isPercent) {
|
|
116
|
+
series[idx].label.formatter = formatter;
|
|
110
117
|
}
|
|
111
118
|
}
|
|
112
119
|
else {
|
|
@@ -121,10 +128,7 @@ export function transform(chartType, dataInput, chartInput) {
|
|
|
121
128
|
}
|
|
122
129
|
}
|
|
123
130
|
if (chartType === 'pie') {
|
|
124
|
-
|
|
125
|
-
series[idx].label['normal'] = {
|
|
126
|
-
position: 'inner',
|
|
127
|
-
};
|
|
131
|
+
lodashSet(series[idx], 'label.position', 'inner');
|
|
128
132
|
if (chartInput.chartType === 'pie') {
|
|
129
133
|
series[idx]['radius'] = '70%';
|
|
130
134
|
}
|
|
@@ -221,7 +225,7 @@ export function transform(chartType, dataInput, chartInput) {
|
|
|
221
225
|
return (_a = item.XLabel.Value) !== null && _a !== void 0 ? _a : null;
|
|
222
226
|
});
|
|
223
227
|
if (chartInput.isUnit) {
|
|
224
|
-
yAxis.axisLabel.formatter =
|
|
228
|
+
yAxis.axisLabel.formatter = (value) => formatter({ value });
|
|
225
229
|
}
|
|
226
230
|
if (chartInput.directionType === 'crosswise') {
|
|
227
231
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import OldLine from './index.old';
|
|
3
3
|
import { checkIsNewData, transform } from '../common/data-transform';
|
|
4
4
|
import { emptyArray } from '../../../utils/constant';
|
|
@@ -21,22 +21,21 @@ function LineImpl(props) {
|
|
|
21
21
|
oldLineProps['connectorMethod'] = undefined;
|
|
22
22
|
oldLineProps['connectorParams'] = undefined;
|
|
23
23
|
oldLineProps['connector'] = undefined;
|
|
24
|
-
return
|
|
24
|
+
return _jsx(OldLine, { ...oldLineProps });
|
|
25
25
|
}
|
|
26
26
|
else if (props.dataSourceType === 'variable') {
|
|
27
27
|
const { datasourceVariable = emptyArray, id, style, className, events, ...rest } = props;
|
|
28
28
|
const chartOptions = transform('line', datasourceVariable, rest);
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx(Chart, { id: id, "data-testid": "line", className: className, style: style, events: events, chartOptions: chartOptions }));
|
|
30
30
|
}
|
|
31
31
|
else if (props.dataSourceType === 'custom-connector') {
|
|
32
|
-
return
|
|
32
|
+
return _jsx(ChartCustomConnector, { "data-testid": "line", type: "line", ...props });
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
35
|
// 老逻辑
|
|
36
|
-
return
|
|
36
|
+
return _jsx(OldLine, { ...props });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
export default function Line(props) {
|
|
40
|
-
return (
|
|
41
|
-
React.createElement(LineImpl, { ...props })));
|
|
40
|
+
return (_jsx(CommonErrorBoundary, { ...props, children: _jsx(LineImpl, { ...props }) }));
|
|
42
41
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import EChartLine from '../common/core/eChartLine';
|
|
3
4
|
import classNames from '../../../utils/classnames';
|
|
4
5
|
import { useWedaChart } from '../common/useChart';
|
|
5
6
|
export default function Line(opts) {
|
|
6
|
-
const { id, style, className, chartType, isTitle, title, titleLocation, dataSource, filterData, xField, xStatistics, xIsCountEmpty, yField, groupKey, groupKeyTimeSpan, isLegend, legend, legend2, isXaxisName, xAxisName, isXaxisAxisLabelShow, isXaxisAxisTickShow, isXaxisAxisLabelRotate, isYAxisSplitlineLinestyleWidth, yAxisSplitlineLinestyleType, yAxisMax, yAxisMin, isYAxisName, yAxisName, isSeriesShowSymbol, isYAxisShow, isUnit, unit, decimalDigits, suffix, } = opts;
|
|
7
|
+
const { id, style, className, chartType, isTitle, title, titleLocation, dataSource, setColor, filterData, xField, xStatistics, xIsCountEmpty, yField, groupKey, groupKeyTimeSpan, isLegend, legend, legend2, isXaxisName, xAxisName, isXaxisAxisLabelShow, isXaxisAxisTickShow, isXaxisAxisLabelRotate, isYAxisSplitlineLinestyleWidth, yAxisSplitlineLinestyleType, yAxisMax, yAxisMin, isYAxisName, yAxisName, isSeriesShowSymbol, isYAxisShow, isUnit, unit, decimalDigits, suffix, } = opts;
|
|
7
8
|
const domRef = useRef();
|
|
8
9
|
useWedaChart(domRef, EChartLine, {
|
|
9
10
|
chartType,
|
|
@@ -11,6 +12,7 @@ export default function Line(opts) {
|
|
|
11
12
|
title,
|
|
12
13
|
titleLocation,
|
|
13
14
|
dataSource,
|
|
15
|
+
setColor,
|
|
14
16
|
filterData,
|
|
15
17
|
xField,
|
|
16
18
|
xStatistics,
|
|
@@ -45,7 +47,7 @@ export default function Line(opts) {
|
|
|
45
47
|
backgroundColor: '#ffffff',
|
|
46
48
|
...style,
|
|
47
49
|
};
|
|
48
|
-
return (
|
|
50
|
+
return (_jsx("div", { id: id, ref: domRef, "data-testid": "line", style: inlineStyle, className: classNames({
|
|
49
51
|
'echart-wrapper-canvas': true,
|
|
50
52
|
'echart-dark-body': true,
|
|
51
53
|
[className]: className,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import OldPie from './index.old';
|
|
3
3
|
import { checkIsNewData, transform } from '../common/data-transform';
|
|
4
4
|
import { emptyArray } from '../../../utils/constant';
|
|
@@ -21,22 +21,21 @@ function PieImpl(props) {
|
|
|
21
21
|
oldPieProps['connectorMethod'] = undefined;
|
|
22
22
|
oldPieProps['connectorParams'] = undefined;
|
|
23
23
|
oldPieProps['connector'] = undefined;
|
|
24
|
-
return
|
|
24
|
+
return _jsx(OldPie, { ...oldPieProps });
|
|
25
25
|
}
|
|
26
26
|
else if (props.dataSourceType === 'variable') {
|
|
27
27
|
const { datasourceVariable = emptyArray, id, style, className, events, ...rest } = props;
|
|
28
28
|
const chartOptions = transform('pie', datasourceVariable, rest);
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx(Chart, { id: id, "data-testid": "pie", className: className, style: style, events: events, chartOptions: chartOptions }));
|
|
30
30
|
}
|
|
31
31
|
else if (props.dataSourceType === 'custom-connector') {
|
|
32
|
-
return
|
|
32
|
+
return _jsx(ChartCustomConnector, { "data-testid": "pie", type: "pie", ...props });
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
35
|
// 老逻辑
|
|
36
|
-
return
|
|
36
|
+
return _jsx(OldPie, { ...props });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
export default function Pie(props) {
|
|
40
|
-
return (
|
|
41
|
-
React.createElement(PieImpl, { ...props })));
|
|
40
|
+
return (_jsx(CommonErrorBoundary, { ...props, children: _jsx(PieImpl, { ...props }) }));
|
|
42
41
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import EchartPie from '../common/core/eChartPie';
|
|
3
4
|
import { useWedaChart } from '../common/useChart';
|
|
4
5
|
import classNames from '../../../utils/classnames';
|
|
@@ -32,7 +33,7 @@ export default function Line({ id, style, className, chartType, isTitle, title,
|
|
|
32
33
|
backgroundColor: '#ffffff',
|
|
33
34
|
...style,
|
|
34
35
|
};
|
|
35
|
-
return (
|
|
36
|
+
return (_jsx("div", { id: id, "data-testid": "pie", ref: domRef, style: inlineStyle, className: classNames({
|
|
36
37
|
'echart-wrapper-canvas': true,
|
|
37
38
|
'echart-dark-body': true,
|
|
38
39
|
[className]: className,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef } from 'react';
|
|
2
3
|
import './index.css';
|
|
3
4
|
import classNames from '../../../utils/classnames';
|
|
4
5
|
import { ConfigProvider } from 'tea-component';
|
|
@@ -197,12 +198,5 @@ export default function StatisticsCard({ dataSource, filterData, field, operatio
|
|
|
197
198
|
[`${CLASS_PREFIX}-mobile`]: platform === 'h5',
|
|
198
199
|
[`${CLASS_PREFIX}-pc`]: platform !== 'h5',
|
|
199
200
|
});
|
|
200
|
-
return (
|
|
201
|
-
React.createElement("div", { id: id, role: role, className: cls, style: style, onClick: (e) => events.tap({}, { originEvent: e }) },
|
|
202
|
-
React.createElement("div", { className: `${CLASS_PREFIX}__wrapper` },
|
|
203
|
-
React.createElement("div", { className: `${CLASS_PREFIX}__title` }, label),
|
|
204
|
-
React.createElement("div", { className: `${CLASS_PREFIX}__detail` },
|
|
205
|
-
React.createElement("div", { className: `${CLASS_PREFIX}__count` },
|
|
206
|
-
isShowUnit ? formatNumber(val / unit, decimalDigits) : val,
|
|
207
|
-
isShowUnit && (React.createElement("label", { className: `${CLASS_PREFIX}__unit` }, suffix))))))));
|
|
201
|
+
return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx("div", { id: id, role: role, className: cls, style: style, onClick: (e) => events.tap({}, { originEvent: e }), children: _jsxs("div", { className: `${CLASS_PREFIX}__wrapper`, children: [_jsx("div", { className: `${CLASS_PREFIX}__title`, children: label }), _jsx("div", { className: `${CLASS_PREFIX}__detail`, children: _jsxs("div", { className: `${CLASS_PREFIX}__count`, children: [isShowUnit ? formatNumber(val / unit, decimalDigits) : val, isShowUnit && (_jsx("label", { className: `${CLASS_PREFIX}__unit`, children: suffix }))] }) })] }) }) }));
|
|
208
202
|
}
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
3
4
|
import classNames from '../../utils/classnames';
|
|
4
5
|
import { ChartError } from '../chart/common/chart-error';
|
|
5
|
-
import {
|
|
6
|
+
import { DetectedRenderLoopError } from './use-loop-render-detect';
|
|
6
7
|
export const CommonErrorBoundary = (props) => {
|
|
7
8
|
const FallbackComponent = ({ error, resetErrorBoundary, }) => {
|
|
8
9
|
const errorMsg = useMemo(() => {
|
|
9
10
|
var _a;
|
|
10
11
|
if (error instanceof ChartError ||
|
|
11
|
-
error instanceof
|
|
12
|
+
error instanceof DetectedRenderLoopError) {
|
|
12
13
|
return error.message;
|
|
13
14
|
}
|
|
14
15
|
else {
|
|
15
16
|
return (_a = error.stack) !== null && _a !== void 0 ? _a : error.message;
|
|
16
17
|
}
|
|
17
18
|
}, [error]);
|
|
18
|
-
return (
|
|
19
|
+
return (_jsxs("div", { style: props.style, id: props.id, className: classNames([
|
|
19
20
|
'wedaui-common-error-boundary',
|
|
20
21
|
props.className,
|
|
21
|
-
]) },
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
ev.preventDefault();
|
|
29
|
-
resetErrorBoundary();
|
|
30
|
-
} }, "\u91CD\u8BD5")));
|
|
22
|
+
]), children: [_jsx("code", { children: _jsx("pre", { style: { display: 'inline' }, children: errorMsg }) }), _jsx("a", { href: "#", style: {
|
|
23
|
+
padding: '0 8px',
|
|
24
|
+
textDecoration: 'none',
|
|
25
|
+
}, onClick: (ev) => {
|
|
26
|
+
ev.preventDefault();
|
|
27
|
+
resetErrorBoundary();
|
|
28
|
+
}, children: "\u91CD\u8BD5" })] }));
|
|
31
29
|
};
|
|
32
|
-
return (
|
|
30
|
+
return (_jsx(ErrorBoundary, { FallbackComponent: FallbackComponent, children: props.children }));
|
|
33
31
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function FormItemWrapper({ children }) {
|
|
3
|
+
return (_jsx("div", { role: "container", className: "weda-ui wa-comp-CLOUDBASE_STANDARD-FormInput gsd-h5-react-formitem wa-comp-CLOUDBASE_STANDARD-FormItem", children: children }));
|
|
4
|
+
}
|
|
@@ -83,7 +83,7 @@ const defaultOptions = {
|
|
|
83
83
|
message: '组件控制逻辑出现死循环,请检查并修改相关配置',
|
|
84
84
|
timeWindowMs: 6 * 1000,
|
|
85
85
|
};
|
|
86
|
-
export class
|
|
86
|
+
export class DetectedRenderLoopError extends Error {
|
|
87
87
|
}
|
|
88
88
|
export const useLoopRenderDetect = (inputOptions = defaultOptions) => {
|
|
89
89
|
const options = Object.assign({}, defaultOptions, inputOptions);
|
|
@@ -115,7 +115,7 @@ export const useLoopRenderDetect = (inputOptions = defaultOptions) => {
|
|
|
115
115
|
renderCount > options.limit * 3) {
|
|
116
116
|
reset();
|
|
117
117
|
if (options.throwError) {
|
|
118
|
-
throw new
|
|
118
|
+
throw new DetectedRenderLoopError(options.message);
|
|
119
119
|
}
|
|
120
120
|
return true;
|
|
121
121
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import classNames from '../../utils/classnames';
|
|
3
3
|
import { emptyObject } from '../../utils/constant';
|
|
4
4
|
export default function Container({ children, title, events = emptyObject, className, style, id, }) {
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx("div", { role: "container", id: id, style: style, className: classNames({ 'weda-ui': true, [className]: className }), title: title, onClick: (e) => { var _a; return (_a = events === null || events === void 0 ? void 0 : events.tap) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e }); }, onContextMenu: (e) => { var _a; return (_a = events === null || events === void 0 ? void 0 : events.longpress) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e }); }, onTouchStart: (e) => { var _a; return (_a = events === null || events === void 0 ? void 0 : events.touchstart) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e }); }, onTouchMove: (e) => { var _a; return (_a = events === null || events === void 0 ? void 0 : events.touchmove) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e }); }, onTouchCancel: (e) => { var _a; return (_a = events === null || events === void 0 ? void 0 : events.touchcancel) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e }); }, onTouchEnd: (e) => { var _a; return (_a = events === null || events === void 0 ? void 0 : events.touchend) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e }); }, children: children }));
|
|
6
6
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Bubble, ConfigProvider } from 'tea-component';
|
|
4
|
+
import { emptyObject } from '../../utils/constant';
|
|
5
|
+
export const CustomerService = forwardRef(function CustomerService(props, ref) {
|
|
6
|
+
const { id, className, style, events = emptyObject, } = props;
|
|
7
|
+
// 方法
|
|
8
|
+
const onClick = (e) => {
|
|
9
|
+
var _a;
|
|
10
|
+
(_a = events === null || events === void 0 ? void 0 : events.tap) === null || _a === void 0 ? void 0 : _a.call(events, {}, { originEvent: e });
|
|
11
|
+
};
|
|
12
|
+
return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(Bubble, { placement: "auto", openDelay: 300, content: "\u7F16\u8F91\u5668\u6682\u4E0D\u652F\u6301\u6253\u5F00\u5BA2\u670D\u4F1A\u8BDD\uFF0C\u8BF7\u53D1\u5E03\u5C0F\u7A0B\u5E8F\u540E\u4F7F\u7528\u771F\u673A\u8C03\u8BD5\u3002PC/H5\u7AEF\u5C06\u9690\u85CF\u8BE5\u7EC4\u4EF6\uFF0C\u8BF7\u6CE8\u610F\u9875\u9762\u5E03\u5C40\u3002", children: _jsx("div", { id: id, className: className, style: style, onClick: onClick, "data-role": "wd-customer-service", ref: ref, children: props.children }) }) }));
|
|
13
|
+
});
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ListView from '../listView';
|
|
4
|
+
import { useLoopRenderDetect } from '../common/use-loop-render-detect';
|
|
5
|
+
const beforeDataChange = (values) => (values === null || values === void 0 ? void 0 : values[0]) || {};
|
|
3
6
|
/**
|
|
4
7
|
* 数据容器-列表视图
|
|
5
8
|
*/
|
|
6
9
|
export default React.forwardRef(function DataView(props, ref) {
|
|
7
|
-
|
|
10
|
+
useLoopRenderDetect({ limit: 600 });
|
|
11
|
+
return (_jsx(ListView, { ...props, ref: ref, isRecords: false, orderBy: undefined, orderType: undefined, template: "none", pageSize: 1, pagination: "none", beforeDataChange: beforeDataChange }));
|
|
8
12
|
});
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ConfigProvider, Drawer } from 'tea-component';
|
|
3
3
|
const TeaDrawer = ({ size, title, style, events, visible, subtitle, showMask, className, placement, extraSlot, footerSlot, childrenSlot, disableCloseIcon, outerClickClosable, }) => {
|
|
4
4
|
const eventsList = {
|
|
5
5
|
onClose: () => (events === null || events === void 0 ? void 0 : events.onClose) && events.onClose({}),
|
|
6
6
|
onExited: () => (events === null || events === void 0 ? void 0 : events.onExited) && events.onExited({}),
|
|
7
7
|
};
|
|
8
|
-
return (
|
|
9
|
-
React.createElement(Drawer, { size: size, title: title, style: style, visible: visible, extra: extraSlot, footer: footerSlot, subtitle: subtitle, showMask: showMask, className: className, placement: placement, disableCloseIcon: disableCloseIcon, outerClickClosable: outerClickClosable, ...eventsList }, childrenSlot)));
|
|
8
|
+
return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(Drawer, { size: size, title: title, style: style, visible: visible, extra: extraSlot, footer: footerSlot, subtitle: subtitle, showMask: showMask, className: className, placement: placement, disableCloseIcon: disableCloseIcon, outerClickClosable: outerClickClosable, ...eventsList, children: childrenSlot }) }));
|
|
10
9
|
};
|
|
11
10
|
export default TeaDrawer;
|
|
12
11
|
export { TeaDrawer };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable react/jsx-props-no-spreading */
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { ConfigProvider } from 'tea-component';
|
|
5
|
+
/**
|
|
6
|
+
* 微搭流程组件容器
|
|
7
|
+
* @description 处理weda组件样式前缀、处理微搭平台配置属性、处理容器dom转发
|
|
8
|
+
*/
|
|
9
|
+
export const WedaFlowContainer = forwardRef(function WedaFlowContainer(props, ref) {
|
|
10
|
+
const { children, wedaPlatformProps, classPrefix = 'wedatea2td' } = props;
|
|
11
|
+
return (_jsx(ConfigProvider, { classPrefix: classPrefix, children: _jsx("div", { ...wedaPlatformProps, ref: ref, children: children }) }));
|
|
12
|
+
});
|