@zat-design/sisyphus-react 3.14.0-beta.2 → 4.0.0-beta.10
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 +77 -207
- package/babel.config.js +2 -2
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -9
- package/es/ProAction/index.js +3 -6
- package/es/ProAction/index.less +0 -2
- package/es/ProConfigProvider/index.d.ts +22 -5
- package/es/ProConfigProvider/index.js +58 -26
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/style/index.less +0 -2
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/es/ProDrawerForm/components/ProModal/index.js +12 -20
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +35 -33
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +6 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +10 -15
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +70 -53
- package/es/ProEditTable/components/RcTable/DraggableTable.js +70 -49
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +401 -241
- package/es/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +99 -103
- package/es/ProEditTable/propsType.d.ts +7 -7
- package/es/ProEditTable/style/index.less +12 -12
- package/es/ProEditTable/utils/config.js +6 -7
- package/es/ProEditTable/utils/index.js +21 -17
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/hooks/useEnum.js +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +3 -3
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +0 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +3 -7
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +18 -19
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +11 -0
- package/es/ProForm/components/base/Input/index.js +10 -8
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +7 -6
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +10 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/es/ProForm/components/combination/Container/style/index.less +0 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +5 -8
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +36 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +13 -15
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +21 -21
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/es/ProForm/components/index.d.ts +2 -9
- package/es/ProForm/components/index.js +1 -11
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/es/ProForm/components/render/Render.js +29 -30
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +6 -3
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +14 -42
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +4 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +66 -15
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +27 -22
- package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/es/ProForm/utils/useShouldUpdate.js +103 -17
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/es/ProLayout/components/ProCollapse/index.js +29 -44
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProFooter/style/index.less +0 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -45
- package/es/ProLayout/components/ProHeader/style/index.less +0 -2
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/es/ProLayout/index.js +80 -41
- package/es/ProLayout/style/index.less +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -15
- package/es/ProSelect/index.less +0 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +1 -0
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/style/index.less +2 -4
- package/es/ProTable/components/FormatColumn/index.js +33 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +17 -13
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +4 -7
- package/es/ProTable/index.d.ts +0 -7
- package/es/ProTable/index.js +11 -14
- package/es/ProTable/propsType.d.ts +2 -3
- package/es/ProTable/style/index.less +4 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +0 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +136 -0
- package/es/ProThemeTools/index.d.ts +4 -8
- package/es/ProThemeTools/index.js +80 -49
- package/es/ProThemeTools/style/index.less +1 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +30 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +0 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +28 -26
- package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/es/ProTree/components/Tree.js +6 -13
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +8 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +10 -20
- package/es/ProTreeModal/style/index.less +12 -3
- package/es/ProUpload/components/ButtonRender.js +4 -7
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +171 -12
- package/es/ProViewer/index.js +28 -35
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProViewer/style/index.less +0 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -5
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +13 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/index.less +1 -1
- package/es/style/theme/antd.less +36 -48
- package/es/style/theme/base.less +90 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +37 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +3 -6
- package/lib/ProAction/index.less +0 -2
- package/lib/ProConfigProvider/index.d.ts +22 -5
- package/lib/ProConfigProvider/index.js +58 -26
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/style/index.less +0 -2
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -20
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +35 -33
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +6 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +10 -15
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +69 -52
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +69 -48
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +401 -241
- package/lib/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +96 -100
- package/lib/ProEditTable/propsType.d.ts +7 -7
- package/lib/ProEditTable/style/index.less +12 -12
- package/lib/ProEditTable/utils/config.js +6 -7
- package/lib/ProEditTable/utils/index.js +20 -16
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/hooks/useEnum.js +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +0 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +4 -7
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +18 -19
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +19 -0
- package/lib/ProForm/components/base/Input/index.js +10 -8
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +10 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/lib/ProForm/components/combination/Container/style/index.less +0 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -9
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +36 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +12 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +20 -20
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/lib/ProForm/components/index.d.ts +2 -9
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/lib/ProForm/components/render/Render.js +29 -30
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +6 -3
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +13 -42
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +4 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +69 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +26 -21
- package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/lib/ProForm/utils/useShouldUpdate.js +101 -15
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/lib/ProLayout/components/ProCollapse/index.js +29 -44
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/lib/ProLayout/components/ProHeader/index.js +44 -47
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/lib/ProLayout/index.js +79 -40
- package/lib/ProLayout/style/index.less +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -15
- package/lib/ProSelect/index.less +0 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/style/index.less +2 -4
- package/lib/ProTable/components/FormatColumn/index.js +33 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +16 -13
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +4 -7
- package/lib/ProTable/index.d.ts +0 -7
- package/lib/ProTable/index.js +10 -13
- package/lib/ProTable/propsType.d.ts +2 -3
- package/lib/ProTable/style/index.less +4 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +0 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +145 -0
- package/lib/ProThemeTools/index.d.ts +4 -8
- package/lib/ProThemeTools/index.js +88 -48
- package/lib/ProThemeTools/style/index.less +1 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +34 -27
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +0 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -26
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/lib/ProTree/components/Tree.js +6 -13
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +8 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +10 -20
- package/lib/ProTreeModal/style/index.less +12 -3
- package/lib/ProUpload/components/ButtonRender.js +4 -7
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +171 -12
- package/lib/ProViewer/index.js +30 -36
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProViewer/style/index.less +0 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +34 -21
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +14 -3
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/index.less +1 -1
- package/lib/style/theme/antd.less +36 -48
- package/lib/style/theme/base.less +90 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +41 -2
- package/package.json +37 -25
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -9
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -208
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -110
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -265
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -101
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -47
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -276
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -186
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -98
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -186
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -321
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -217
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -117
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -271
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -284
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -72
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -192
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -192
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -598
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -329
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
|
@@ -1,47 +1,53 @@
|
|
|
1
|
-
import "antd/es/config-provider/style";
|
|
2
|
-
import _ConfigProvider from "antd/es/config-provider";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
/** 主题配置mapping */
|
|
5
|
-
var
|
|
6
|
-
'zaui-brand': '
|
|
2
|
+
/** antd5 主题配置 mapping */
|
|
3
|
+
var antd5ConfigMapping = {
|
|
4
|
+
'zaui-brand': 'colorPrimary'
|
|
5
|
+
// 可以根据需要添加更多映射
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @param themes
|
|
12
|
-
* @param themeMapping
|
|
9
|
+
* 将 kebab-case 的主题配置转换为 antd5 的 token 格式
|
|
10
|
+
* @param themes kebab-case 格式的主题配置
|
|
11
|
+
* @param themeMapping 自定义映射关系
|
|
13
12
|
*/
|
|
14
|
-
export var
|
|
15
|
-
var
|
|
16
|
-
|
|
13
|
+
export var convertToAntd5Tokens = (themes, themeMapping) => {
|
|
14
|
+
var mapping = _objectSpread(_objectSpread({}, antd5ConfigMapping), themeMapping);
|
|
15
|
+
var tokens = {};
|
|
16
|
+
Object.keys(themes).forEach(key => {
|
|
17
17
|
var value = themes[key];
|
|
18
|
-
var mappingKey =
|
|
18
|
+
var mappingKey = mapping[key];
|
|
19
19
|
if (mappingKey) {
|
|
20
|
-
|
|
20
|
+
tokens[mappingKey] = value;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
return
|
|
23
|
+
return {
|
|
24
|
+
token: tokens
|
|
25
|
+
};
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
|
-
* 设置主题变量
|
|
29
|
+
* 设置主题变量 - antd5 兼容版本
|
|
30
|
+
* 只设置 CSS 变量,不再使用 ConfigProvider.config
|
|
28
31
|
*/
|
|
29
|
-
export var setThemes =
|
|
32
|
+
export var setThemes = themes => {
|
|
30
33
|
if (!Object.keys(themes).length) {
|
|
31
34
|
return false;
|
|
32
35
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// 匹配到主题配置执行antd的主题配置
|
|
36
|
-
if (configProviderThemes && Object.keys(configProviderThemes).length) {
|
|
37
|
-
_ConfigProvider.config({
|
|
38
|
-
theme: configProviderThemes
|
|
39
|
-
});
|
|
40
|
-
}
|
|
36
|
+
|
|
37
|
+
// 只设置 CSS 变量,主题配置通过 Context 管理
|
|
41
38
|
var list = Object.entries(themes);
|
|
42
39
|
list.forEach(item => {
|
|
43
40
|
document.documentElement.style.setProperty(`--${item[0]}`, item[1]);
|
|
44
41
|
});
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 获取 antd5 主题配置
|
|
47
|
+
* @param themes kebab-case 格式的主题配置
|
|
48
|
+
*/
|
|
49
|
+
export var getAntd5ThemeConfig = themes => {
|
|
50
|
+
return convertToAntd5Tokens(themes);
|
|
45
51
|
};
|
|
46
52
|
|
|
47
53
|
/** JS实现驼峰命名与横线命名的转换 */
|
package/es/ProTooltip/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["text", "mode", "width", "line", "className", "style", "lineHeight", "scrollFollowParent"];
|
|
7
5
|
import { useSize, useSetState, useDebounce } from 'ahooks';
|
|
6
|
+
import { Tooltip } from 'antd';
|
|
8
7
|
import { useEffect, useRef } from 'react';
|
|
9
8
|
import classnames from 'classnames';
|
|
10
9
|
import { isEllipsisActive } from "../utils";
|
|
@@ -65,18 +64,20 @@ var ProTooltip = props => {
|
|
|
65
64
|
var _ref = (_useSize = useSize(localElement)) !== null && _useSize !== void 0 ? _useSize : {},
|
|
66
65
|
_localSizeWidth = _ref.width;
|
|
67
66
|
var isTable = findTableParent(ref.current);
|
|
68
|
-
var
|
|
67
|
+
var rootStyles = mode === 'auto' ? {
|
|
69
68
|
maxWidth: _localSizeWidth
|
|
70
69
|
} : {};
|
|
71
70
|
var multiStyle = isMultiLine ? {
|
|
72
71
|
WebkitLineClamp: line
|
|
73
72
|
} : {};
|
|
74
73
|
var AutoMixinSingle = () => {
|
|
75
|
-
return isShowToolTip && line === 1 ? /*#__PURE__*/_jsx(
|
|
74
|
+
return isShowToolTip && line === 1 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
76
75
|
title: text,
|
|
77
76
|
getPopupContainer: triggerNode => triggerNode.parentNode
|
|
78
77
|
}, restProps), {}, {
|
|
79
|
-
|
|
78
|
+
styles: {
|
|
79
|
+
root: rootStyles
|
|
80
|
+
},
|
|
80
81
|
children: /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, specialProps), {}, {
|
|
81
82
|
style: _objectSpread(_objectSpread({}, multiStyle), {}, {
|
|
82
83
|
width: localWidth,
|
|
@@ -105,11 +106,13 @@ var ProTooltip = props => {
|
|
|
105
106
|
});
|
|
106
107
|
};
|
|
107
108
|
var AutoMixinMulti = () => {
|
|
108
|
-
return isShowToolTip && line > 1 ? /*#__PURE__*/_jsx(
|
|
109
|
+
return isShowToolTip && line > 1 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
109
110
|
title: text,
|
|
110
111
|
getPopupContainer: triggerNode => triggerNode.parentNode
|
|
111
112
|
}, restProps), {}, {
|
|
112
|
-
|
|
113
|
+
styles: {
|
|
114
|
+
root: rootStyles
|
|
115
|
+
},
|
|
113
116
|
children: /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, specialProps), {}, {
|
|
114
117
|
style: _objectSpread(_objectSpread({}, multiStyle), {}, {
|
|
115
118
|
width: localWidth,
|
|
@@ -243,7 +246,7 @@ var ProTooltip = props => {
|
|
|
243
246
|
});
|
|
244
247
|
};
|
|
245
248
|
var renderTooltipContent = () => {
|
|
246
|
-
return /*#__PURE__*/_jsx(
|
|
249
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
247
250
|
title: text,
|
|
248
251
|
getPopupContainer: triggerNode => {
|
|
249
252
|
// 修复scrollFollowParent为false时tooltip不显示的问题
|
|
@@ -251,7 +254,9 @@ var ProTooltip = props => {
|
|
|
251
254
|
return scrollFollowParent ? triggerNode.parentNode : document.body;
|
|
252
255
|
}
|
|
253
256
|
}, restProps), {}, {
|
|
254
|
-
|
|
257
|
+
styles: {
|
|
258
|
+
root: mode === 'auto' ? rootStyles : {}
|
|
259
|
+
},
|
|
255
260
|
children: renderContentBox()
|
|
256
261
|
}));
|
|
257
262
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
1
|
+
import { Tooltip } from 'antd';
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
var AdaptiveTooltip = _ref => {
|
|
5
4
|
var children = _ref.children;
|
|
6
|
-
return /*#__PURE__*/_jsx(
|
|
5
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
7
6
|
placement: "rightTop",
|
|
8
7
|
title: /*#__PURE__*/_jsx("div", {
|
|
9
8
|
onMouseDown: e => e.stopPropagation(),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "antd/es/checkbox/style";
|
|
2
|
-
import _Checkbox from "antd/es/checkbox";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
|
6
4
|
import { memo } from 'react';
|
|
5
|
+
import { Checkbox } from 'antd';
|
|
7
6
|
import SearchTitle from "./SearchTitle";
|
|
8
7
|
import CloseIcon from "./CloseIcon";
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +25,7 @@ function List(props) {
|
|
|
26
25
|
var fieldNameValue = fieldNames.value;
|
|
27
26
|
if (mode === 'render') {
|
|
28
27
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
29
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
30
29
|
disabled: disabled,
|
|
31
30
|
style: {
|
|
32
31
|
width: '100%'
|
|
@@ -36,7 +35,7 @@ function List(props) {
|
|
|
36
35
|
var title = showCodeName ? `${item[fieldNameValue]}-${item[fieldNameLabel]}` : item[fieldNameLabel];
|
|
37
36
|
return /*#__PURE__*/_jsx("div", {
|
|
38
37
|
className: "pro-tree-checkbox-content",
|
|
39
|
-
children: /*#__PURE__*/_jsx(
|
|
38
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
40
39
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
41
40
|
value: item[fieldNameValue],
|
|
42
41
|
disabled: item.disabled,
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import "antd/es/spin/style";
|
|
2
|
-
import _Spin from "antd/es/spin";
|
|
3
|
-
import "antd/es/checkbox/style";
|
|
4
|
-
import _Checkbox from "antd/es/checkbox";
|
|
5
|
-
import "antd/es/input/style";
|
|
6
|
-
import _Input from "antd/es/input";
|
|
7
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
8
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
9
|
-
import "antd/es/message/style";
|
|
10
|
-
import _message from "antd/es/message";
|
|
11
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
13
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -16,6 +8,7 @@ import { useEffect } from 'react';
|
|
|
16
8
|
import classNames from 'classnames';
|
|
17
9
|
import { CaretDownOutlined, Loading3QuartersOutlined } from '@ant-design/icons';
|
|
18
10
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc } from 'ahooks';
|
|
11
|
+
import { Checkbox, Input, message, Spin } from 'antd';
|
|
19
12
|
import { cloneDeep, isFunction } from 'lodash';
|
|
20
13
|
import { ReactSVG } from 'react-svg';
|
|
21
14
|
import { useProConfig } from "../../ProConfigProvider";
|
|
@@ -117,7 +110,7 @@ var ProTree = props => {
|
|
|
117
110
|
msg = res.message,
|
|
118
111
|
data = res.data;
|
|
119
112
|
if (status !== 200) {
|
|
120
|
-
|
|
113
|
+
message.error(msg);
|
|
121
114
|
return;
|
|
122
115
|
}
|
|
123
116
|
var _flatTrees = getFlatTreeData(data, fieldNames);
|
|
@@ -426,14 +419,14 @@ var ProTree = props => {
|
|
|
426
419
|
return /*#__PURE__*/_jsx("div", {
|
|
427
420
|
className: boxClass,
|
|
428
421
|
style: style,
|
|
429
|
-
children: /*#__PURE__*/_jsx(
|
|
422
|
+
children: /*#__PURE__*/_jsx(Spin, {
|
|
430
423
|
spinning: state.clickShowLoading,
|
|
431
424
|
indicator: antIcon,
|
|
432
425
|
children: /*#__PURE__*/_jsxs("div", {
|
|
433
426
|
className: "pro-tree-content",
|
|
434
427
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
435
428
|
className: "pro-tree-header-box",
|
|
436
|
-
children: [showSearch && /*#__PURE__*/_jsx(
|
|
429
|
+
children: [showSearch && /*#__PURE__*/_jsx(Input, {
|
|
437
430
|
disabled: disabled,
|
|
438
431
|
allowClear: true,
|
|
439
432
|
value: state.searchStr,
|
|
@@ -481,7 +474,7 @@ var ProTree = props => {
|
|
|
481
474
|
className: allValue || footer ? 'pro-tree-footer-box' : '',
|
|
482
475
|
children: [/*#__PURE__*/_jsx("div", {
|
|
483
476
|
className: "check-all-box",
|
|
484
|
-
children: allValue !== undefined ? /*#__PURE__*/_jsx(
|
|
477
|
+
children: allValue !== undefined ? /*#__PURE__*/_jsx(Checkbox, {
|
|
485
478
|
checked: state.checkAll,
|
|
486
479
|
disabled: disabled,
|
|
487
480
|
onChange: handleAllCheck,
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
|
-
import "antd/es/input/style";
|
|
6
|
-
import _Input from "antd/es/input";
|
|
7
|
-
import "antd/es/message/style";
|
|
8
|
-
import _message from "antd/es/message";
|
|
9
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
|
-
import "antd/es/tree-select/style";
|
|
13
|
-
import _TreeSelect from "antd/es/tree-select";
|
|
14
6
|
var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onChange", "useRequest", "transformResponse", "fieldNames", "placeholder", "tooltip", "showSearch", "filterTreeNode", "treeNodeFilterProp", "defaultExpandAll", "expandedKeys", "treeCheckable", "onSearch", "otherProps", "width", "dropdownStyle", "popupClassName", "style", "allowClear", "listHeight", "showCodeName", "className", "checkStrictly", "checkable"],
|
|
15
7
|
_excluded2 = ["children"];
|
|
16
8
|
/* eslint-disable react/no-danger */
|
|
17
9
|
/* eslint-disable react/jsx-closing-tag-location */
|
|
18
10
|
import { useDeepCompareEffect, useRequest as useRequestFunc, useSetState } from 'ahooks';
|
|
11
|
+
import { Input, TreeSelect, message, Tooltip } from 'antd';
|
|
19
12
|
import classnames from 'classnames';
|
|
20
13
|
import React, { useImperativeHandle, forwardRef, useCallback } from 'react';
|
|
21
14
|
import { cloneDeep, debounce } from 'lodash';
|
|
@@ -25,9 +18,9 @@ import Container from "../../../ProForm/components/Container";
|
|
|
25
18
|
import AdaptiveTooltip from "../AdaptiveTooltip";
|
|
26
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
var SHOW_PARENT =
|
|
21
|
+
var SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
|
29
22
|
export var ProTreeSelect = (props, ref) => {
|
|
30
|
-
var _useRequest$options;
|
|
23
|
+
var _useRequest$options, _selectProps$classNam, _selectProps$classNam2, _selectProps$styles, _selectProps$styles2;
|
|
31
24
|
// 全局属性配置在ConfigProvider
|
|
32
25
|
var _ref = useProConfig('ProTreeSelect') || {},
|
|
33
26
|
_ref$fieldNames = _ref.fieldNames,
|
|
@@ -164,7 +157,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
164
157
|
msg = res.message,
|
|
165
158
|
data = res.data;
|
|
166
159
|
if (status !== 200) {
|
|
167
|
-
|
|
160
|
+
message.error(msg);
|
|
168
161
|
return;
|
|
169
162
|
}
|
|
170
163
|
var resultData = transferDataSource(data, showCodeName);
|
|
@@ -183,7 +176,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
183
176
|
msg = _ref4.message,
|
|
184
177
|
data = _ref4.data;
|
|
185
178
|
if (status !== 200) {
|
|
186
|
-
|
|
179
|
+
message.error(msg);
|
|
187
180
|
return;
|
|
188
181
|
}
|
|
189
182
|
return data;
|
|
@@ -268,7 +261,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
268
261
|
if (defaultDisableValue) {
|
|
269
262
|
return /*#__PURE__*/_jsx("span", {
|
|
270
263
|
title: defaultDisableValue,
|
|
271
|
-
children: /*#__PURE__*/_jsx(
|
|
264
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
272
265
|
disabled: true,
|
|
273
266
|
defaultValue: defaultDisableValue,
|
|
274
267
|
style: props === null || props === void 0 ? void 0 : props.style
|
|
@@ -385,7 +378,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
385
378
|
});
|
|
386
379
|
}
|
|
387
380
|
if (!children) {
|
|
388
|
-
return /*#__PURE__*/_jsx(
|
|
381
|
+
return /*#__PURE__*/_jsx(TreeSelect.TreeNode, {
|
|
389
382
|
value: value,
|
|
390
383
|
title: title,
|
|
391
384
|
label: searchKey,
|
|
@@ -396,7 +389,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
396
389
|
}, key);
|
|
397
390
|
}
|
|
398
391
|
var sonGrade = grade + 1;
|
|
399
|
-
return /*#__PURE__*/_jsx(
|
|
392
|
+
return /*#__PURE__*/_jsx(TreeSelect.TreeNode, {
|
|
400
393
|
value: value,
|
|
401
394
|
title: title,
|
|
402
395
|
label: searchKey,
|
|
@@ -578,7 +571,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
578
571
|
[`${innerClass}`]: true,
|
|
579
572
|
[`${popupClassName}`]: popupClassName
|
|
580
573
|
});
|
|
581
|
-
var treeProps = _objectSpread({
|
|
574
|
+
var treeProps = _objectSpread(_objectSpread({
|
|
582
575
|
disabled,
|
|
583
576
|
showSearch,
|
|
584
577
|
// 默认支持搜索
|
|
@@ -591,30 +584,39 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
591
584
|
// 选择后的值只显示父级
|
|
592
585
|
value,
|
|
593
586
|
onChange: handleChange,
|
|
594
|
-
dropdownStyle: _objectSpread({
|
|
595
|
-
maxHeight: 320,
|
|
596
|
-
paddingTop: '0px',
|
|
597
|
-
maxWidth: '580px'
|
|
598
|
-
}, dropdownStyle),
|
|
599
587
|
listHeight: listHeight || 320,
|
|
600
588
|
style: _objectSpread({
|
|
601
589
|
width: width || '100%'
|
|
602
590
|
}, style),
|
|
603
|
-
popupClassName: dropDownClassName,
|
|
604
591
|
onSearch: searchTreeEvent,
|
|
605
592
|
allowClear: allowClear || true,
|
|
606
|
-
showArrow: true,
|
|
607
593
|
treeNodeFilterProp,
|
|
608
594
|
virtual: true,
|
|
609
595
|
treeCheckStrictly: checkStrictly
|
|
610
|
-
}, selectProps)
|
|
596
|
+
}, selectProps), {}, {
|
|
597
|
+
// 使用新的 API 替代弃用的 popupClassName 和 dropdownStyle
|
|
598
|
+
classNames: _objectSpread(_objectSpread({}, selectProps === null || selectProps === void 0 ? void 0 : selectProps.classNames), {}, {
|
|
599
|
+
popup: _objectSpread(_objectSpread({}, selectProps === null || selectProps === void 0 || (_selectProps$classNam = selectProps.classNames) === null || _selectProps$classNam === void 0 ? void 0 : _selectProps$classNam.popup), {}, {
|
|
600
|
+
root: [selectProps === null || selectProps === void 0 || (_selectProps$classNam2 = selectProps.classNames) === null || _selectProps$classNam2 === void 0 || (_selectProps$classNam2 = _selectProps$classNam2.popup) === null || _selectProps$classNam2 === void 0 ? void 0 : _selectProps$classNam2.root, dropDownClassName].filter(Boolean).join(' ')
|
|
601
|
+
})
|
|
602
|
+
}),
|
|
603
|
+
styles: _objectSpread(_objectSpread({}, selectProps === null || selectProps === void 0 ? void 0 : selectProps.styles), {}, {
|
|
604
|
+
popup: _objectSpread(_objectSpread({}, selectProps === null || selectProps === void 0 || (_selectProps$styles = selectProps.styles) === null || _selectProps$styles === void 0 ? void 0 : _selectProps$styles.popup), {}, {
|
|
605
|
+
root: _objectSpread(_objectSpread({
|
|
606
|
+
maxHeight: 320,
|
|
607
|
+
paddingTop: '0px',
|
|
608
|
+
maxWidth: '580px'
|
|
609
|
+
}, dropdownStyle), selectProps === null || selectProps === void 0 || (_selectProps$styles2 = selectProps.styles) === null || _selectProps$styles2 === void 0 || (_selectProps$styles2 = _selectProps$styles2.popup) === null || _selectProps$styles2 === void 0 ? void 0 : _selectProps$styles2.root)
|
|
610
|
+
})
|
|
611
|
+
})
|
|
612
|
+
});
|
|
611
613
|
if (value === null) {
|
|
612
614
|
delete treeProps.value;
|
|
613
615
|
}
|
|
614
616
|
return /*#__PURE__*/_jsx("div", {
|
|
615
617
|
onClick: nodeChangeEvent,
|
|
616
618
|
className: cls,
|
|
617
|
-
children: /*#__PURE__*/_jsx(
|
|
619
|
+
children: /*#__PURE__*/_jsx(TreeSelect, _objectSpread(_objectSpread({
|
|
618
620
|
placeholder: placeholder || locale.ProForm.treeSelectPlaceholder,
|
|
619
621
|
maxTagPlaceholder: rest => {
|
|
620
622
|
var _rest = rest.map(tag => {
|
|
@@ -622,7 +624,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
|
622
624
|
return (tag !== null && tag !== void 0 && (_tag$label = tag.label) !== null && _tag$label !== void 0 && (_tag$label = _tag$label.props) !== null && _tag$label !== void 0 && _tag$label.children ? tag === null || tag === void 0 || (_tag$label2 = tag.label) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.props) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.children) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.props) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.dangerouslySetInnerHTML) === null || _tag$label2 === void 0 ? void 0 : _tag$label2.__html : tag === null || tag === void 0 || (_tag$label3 = tag.label) === null || _tag$label3 === void 0 || (_tag$label3 = _tag$label3.props) === null || _tag$label3 === void 0 || (_tag$label3 = _tag$label3.dangerouslySetInnerHTML) === null || _tag$label3 === void 0 ? void 0 : _tag$label3.__html) || tag.label;
|
|
623
625
|
});
|
|
624
626
|
var _str = _rest.join('、');
|
|
625
|
-
return /*#__PURE__*/_jsx(
|
|
627
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
626
628
|
title: /*#__PURE__*/_jsx("div", {
|
|
627
629
|
children: _str
|
|
628
630
|
}),
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import "antd/es/tree/style";
|
|
2
|
-
import _Tree from "antd/es/tree";
|
|
3
|
-
import "antd/es/popover/style";
|
|
4
|
-
import _Popover from "antd/es/popover";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
7
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
8
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
10
6
|
var _excluded = ["checkedValues", "disabled", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "optionRender", "treeData", "showLine", "switcherIcon", "checkable", "menu", "innerExpandKeys", "selectedKey", "disabledMode", "isRadioSelect"];
|
|
11
|
-
/*
|
|
12
|
-
*@Date: 2023-07-25 13:49:35
|
|
13
|
-
* @LastEditTime: 2024-05-20 11:47:45
|
|
14
|
-
*@Author: liudongliang
|
|
15
|
-
*@Description: 树每行节点渲染组件,复选时阻止点击事件冒泡,只有点击树节点文本会向上触发onSelect事件
|
|
16
|
-
*/
|
|
17
7
|
/* eslint-disable no-plusplus */
|
|
18
8
|
import React, { useEffect, useState } from 'react';
|
|
9
|
+
import { Tree, Popover } from 'antd';
|
|
19
10
|
import { useSetState } from 'ahooks';
|
|
20
11
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
21
12
|
import SearchTitle from "./SearchTitle";
|
|
@@ -277,8 +268,10 @@ function List(props) {
|
|
|
277
268
|
onClick: e => {
|
|
278
269
|
e.stopPropagation();
|
|
279
270
|
},
|
|
280
|
-
children: (operateButton === null || operateButton === void 0 ? void 0 : operateButton.length) > 1 ? /*#__PURE__*/_jsx(
|
|
281
|
-
|
|
271
|
+
children: (operateButton === null || operateButton === void 0 ? void 0 : operateButton.length) > 1 ? /*#__PURE__*/_jsx(Popover, {
|
|
272
|
+
classNames: {
|
|
273
|
+
root: 'pro-tree-operate-container'
|
|
274
|
+
},
|
|
282
275
|
content: /*#__PURE__*/_jsx("div", {
|
|
283
276
|
className: "pro-tree-operate-btn-popover",
|
|
284
277
|
onClick: hide,
|
|
@@ -355,7 +348,7 @@ function List(props) {
|
|
|
355
348
|
}
|
|
356
349
|
return /*#__PURE__*/_jsx("div", {
|
|
357
350
|
className: disabledMode === 'hide' ? 'hide-disable-node' : '',
|
|
358
|
-
children: _treeData !== null && _treeData !== void 0 && _treeData.length ? /*#__PURE__*/_jsx(
|
|
351
|
+
children: _treeData !== null && _treeData !== void 0 && _treeData.length ? /*#__PURE__*/_jsx(Tree, _objectSpread(_objectSpread(_objectSpread({}, others), additionProps), {}, {
|
|
359
352
|
disabled: disabled,
|
|
360
353
|
style: {
|
|
361
354
|
width: '100%'
|
package/es/ProTree/index.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
3
|
-
/*
|
|
4
|
-
*@Date: 2023-07-11 16:07:12
|
|
5
|
-
*@LastEditTime: 2023-07-11 16:07:12
|
|
6
|
-
*@Author: liudongliang
|
|
7
|
-
*@Description: ProTree组件,集成了tree和treeSelect
|
|
8
|
-
*/
|
|
9
2
|
import ProTree from "./components/ProTree";
|
|
10
3
|
import ProTreeSelect from "./components/ProTreeSelect";
|
|
11
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -200,7 +200,7 @@ export interface ProTreeType extends ProTreeSelectType {
|
|
|
200
200
|
* @description value 改变的回调
|
|
201
201
|
* @default undefined
|
|
202
202
|
*/
|
|
203
|
-
onChange?: (
|
|
203
|
+
onChange?: (value: any, labelList?: ReactNode[], extra?: any) => void;
|
|
204
204
|
/**
|
|
205
205
|
* 选择回调
|
|
206
206
|
* @description 点击树节点触发
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
.pro-tree-wrap-ellipse {
|
|
5
3
|
display: block;
|
|
@@ -73,6 +71,14 @@
|
|
|
73
71
|
flex : 1 1;
|
|
74
72
|
overflow-y: auto;
|
|
75
73
|
overflow-x: auto;
|
|
74
|
+
.@{ant-prefix}-tree-switcher:not(.@{ant-prefix}-tree-switcher-noop):hover:before{
|
|
75
|
+
background-color: transparent;
|
|
76
|
+
}
|
|
77
|
+
.@{ant-prefix}-tree-checkbox{
|
|
78
|
+
margin-top: 11px;
|
|
79
|
+
align-self: flex-start;
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
.tree-title-box {
|
|
@@ -107,10 +113,6 @@
|
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
|
|
110
|
-
.@{ant-prefix}-tree-checkbox {
|
|
111
|
-
margin-top: 11px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
116
|
.@{ant-prefix}-tree-switcher {
|
|
115
117
|
line-height: 44px;
|
|
116
118
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/checkbox/style";
|
|
3
|
-
import _Checkbox from "antd/es/checkbox";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import { useEffect } from 'react';
|
|
4
|
+
import { Checkbox } from 'antd';
|
|
6
5
|
import { useSetState } from 'ahooks';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
7
|
import SearchTitle from "./SearchTitle";
|
|
@@ -62,7 +61,7 @@ var Cascader = props => {
|
|
|
62
61
|
})
|
|
63
62
|
}), /*#__PURE__*/_jsx("div", {
|
|
64
63
|
className: "pro-tree-modal-cascader-warp",
|
|
65
|
-
children: /*#__PURE__*/_jsx(
|
|
64
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
66
65
|
disabled: disabled,
|
|
67
66
|
style: {
|
|
68
67
|
width: '100%'
|
|
@@ -77,7 +76,7 @@ var Cascader = props => {
|
|
|
77
76
|
label: title,
|
|
78
77
|
searchStr: searchStr
|
|
79
78
|
})
|
|
80
|
-
}) : /*#__PURE__*/_jsx(
|
|
79
|
+
}) : /*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({}, item), {}, {
|
|
81
80
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
82
81
|
value: item[fieldNameValue],
|
|
83
82
|
children: /*#__PURE__*/_jsx("span", {
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import "antd/es/row/style";
|
|
2
|
-
import _Row from "antd/es/row";
|
|
3
|
-
import "antd/es/col/style";
|
|
4
|
-
import _Col from "antd/es/col";
|
|
5
|
-
import "antd/es/checkbox/style";
|
|
6
|
-
import _Checkbox from "antd/es/checkbox";
|
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
2
|
/* eslint-disable brace-style */
|
|
9
3
|
import React, { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
|
|
4
|
+
import { Checkbox, Col, Row } from 'antd';
|
|
10
5
|
import { DndContext } from '@dnd-kit/core';
|
|
11
6
|
import { arrayMove, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
12
7
|
import { useDeepCompareEffect, useSetState, useVirtualList } from 'ahooks';
|
|
@@ -30,7 +25,6 @@ function List(props, ref) {
|
|
|
30
25
|
fieldNames = props.fieldNames,
|
|
31
26
|
draggable = props.draggable,
|
|
32
27
|
modeType = props.modeType,
|
|
33
|
-
flatTreeData = props.flatTreeData,
|
|
34
28
|
handleOnChange = props.handleOnChange,
|
|
35
29
|
handleFilterClose = props.handleFilterClose,
|
|
36
30
|
optionRender = props.optionRender,
|
|
@@ -172,9 +166,9 @@ function List(props, ref) {
|
|
|
172
166
|
}
|
|
173
167
|
|
|
174
168
|
// 编辑状态
|
|
175
|
-
if (!isRowCols) {
|
|
169
|
+
if (!isRowCols && mode === 'render') {
|
|
176
170
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
177
|
-
children: /*#__PURE__*/_jsx(
|
|
171
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
178
172
|
disabled: disabled,
|
|
179
173
|
style: {
|
|
180
174
|
width: '100%'
|
|
@@ -189,7 +183,7 @@ function List(props, ref) {
|
|
|
189
183
|
},
|
|
190
184
|
children: /*#__PURE__*/_jsx("div", {
|
|
191
185
|
ref: wrapperRef,
|
|
192
|
-
children: /*#__PURE__*/_jsx(
|
|
186
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
193
187
|
children: list.map(_item => {
|
|
194
188
|
var item = _item.data;
|
|
195
189
|
var title = handleGetTitle(item);
|
|
@@ -197,14 +191,14 @@ function List(props, ref) {
|
|
|
197
191
|
label: title,
|
|
198
192
|
searchStr: searchStr
|
|
199
193
|
});
|
|
200
|
-
return /*#__PURE__*/_jsx(
|
|
194
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
201
195
|
span: span || 24,
|
|
202
196
|
className: !span || span === 24 ? 'pro-tree-modal-checkbox-content' : '',
|
|
203
197
|
style: {
|
|
204
198
|
marginBottom: span ? 16 : 12
|
|
205
199
|
},
|
|
206
|
-
children: /*#__PURE__*/_jsx(
|
|
207
|
-
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
200
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
201
|
+
onChange: e => handleOnChange === null || handleOnChange === void 0 ? void 0 : handleOnChange(e, item[fieldNameValue]),
|
|
208
202
|
value: item[fieldNameValue],
|
|
209
203
|
disabled: item.disabled,
|
|
210
204
|
children: content
|
|
@@ -221,26 +215,26 @@ function List(props, ref) {
|
|
|
221
215
|
// 编辑状态
|
|
222
216
|
if (isRowCols) {
|
|
223
217
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
224
|
-
children: /*#__PURE__*/_jsx(
|
|
218
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
225
219
|
disabled: disabled,
|
|
226
220
|
style: {
|
|
227
221
|
width: '100%'
|
|
228
222
|
},
|
|
229
223
|
value: checkedValues,
|
|
230
|
-
children: /*#__PURE__*/_jsx(
|
|
224
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
231
225
|
children: treeData.map(item => {
|
|
232
226
|
var title = handleGetTitle(item);
|
|
233
227
|
var content = optionRender ? optionRender(item, searchStr) : /*#__PURE__*/_jsx(SearchTitle, {
|
|
234
228
|
label: title,
|
|
235
229
|
searchStr: searchStr
|
|
236
230
|
});
|
|
237
|
-
return /*#__PURE__*/_jsx(
|
|
231
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
238
232
|
span: span || 24,
|
|
239
233
|
className: !span || span === 24 ? 'pro-tree-modal-checkbox-content' : '',
|
|
240
234
|
style: {
|
|
241
235
|
marginBottom: span ? 16 : 12
|
|
242
236
|
},
|
|
243
|
-
children: /*#__PURE__*/_jsx(
|
|
237
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
244
238
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
|
245
239
|
value: item[fieldNameValue],
|
|
246
240
|
disabled: item.disabled,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "antd/es/tag/style";
|
|
2
|
-
import _Tag from "antd/es/tag";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import React from 'react';
|
|
3
|
+
import { Tag } from 'antd';
|
|
5
4
|
import { useSortable } from '@dnd-kit/sortable';
|
|
6
5
|
import { CSS } from '@dnd-kit/utilities';
|
|
7
6
|
import ProIcon from "../../ProIcon";
|
|
@@ -38,7 +37,7 @@ var SortableItem = props => {
|
|
|
38
37
|
style: style,
|
|
39
38
|
className: `checked-item ${item.disabled || disabled ? 'disabled' : ''} ${drag ? 'dragable' : ''}`
|
|
40
39
|
}, item.disabled ? {} : attributes), {}, {
|
|
41
|
-
children: /*#__PURE__*/_jsxs(
|
|
40
|
+
children: /*#__PURE__*/_jsxs(Tag, {
|
|
42
41
|
closable: true,
|
|
43
42
|
onClose: e => _onClose(e),
|
|
44
43
|
children: [drag ? item.disabled || disabled ? /*#__PURE__*/_jsx(ProIcon, {
|