@zat-design/sisyphus-react 3.0.13
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/LICENSE +21 -0
- package/README.md +93 -0
- package/commitlint.config.js +6 -0
- package/dist/index.esm.css +4002 -0
- package/dist/index.esm.js +3 -0
- package/es/ProConfigProvider/index.d.ts +22 -0
- package/es/ProConfigProvider/index.js +52 -0
- package/es/ProDownload/DownloadHelper.d.ts +32 -0
- package/es/ProDownload/DownloadHelper.js +170 -0
- package/es/ProDownload/index.d.ts +4 -0
- package/es/ProDownload/index.js +176 -0
- package/es/ProDownload/propsType.d.ts +54 -0
- package/es/ProDownload/propsType.js +1 -0
- package/es/ProDrawerForm/components/ProDrawer/index.d.ts +7 -0
- package/es/ProDrawerForm/components/ProDrawer/index.js +204 -0
- package/es/ProDrawerForm/components/ProModal/index.d.ts +7 -0
- package/es/ProDrawerForm/components/ProModal/index.js +161 -0
- package/es/ProDrawerForm/components/index.d.ts +2 -0
- package/es/ProDrawerForm/components/index.js +2 -0
- package/es/ProDrawerForm/index.d.ts +5 -0
- package/es/ProDrawerForm/index.js +65 -0
- package/es/ProDrawerForm/propsType.d.ts +88 -0
- package/es/ProDrawerForm/propsType.js +1 -0
- package/es/ProDrawerForm/style/index.less +125 -0
- package/es/ProDrawerForm/utils/index.d.ts +6 -0
- package/es/ProDrawerForm/utils/index.js +16 -0
- package/es/ProEditLabel/components/RenderForm.d.ts +3 -0
- package/es/ProEditLabel/components/RenderForm.js +65 -0
- package/es/ProEditLabel/index.d.ts +4 -0
- package/es/ProEditLabel/index.js +324 -0
- package/es/ProEditLabel/propsType.d.ts +43 -0
- package/es/ProEditLabel/propsType.js +1 -0
- package/es/ProEditLabel/style/index.less +105 -0
- package/es/ProEditLabel/utils/index.d.ts +9 -0
- package/es/ProEditLabel/utils/index.js +32 -0
- package/es/ProEditTable/components/ActionButton/index.d.ts +2 -0
- package/es/ProEditTable/components/ActionButton/index.js +70 -0
- package/es/ProEditTable/components/DndWrapper/index.d.ts +14 -0
- package/es/ProEditTable/components/DndWrapper/index.js +82 -0
- package/es/ProEditTable/components/RenderField/index.d.ts +2 -0
- package/es/ProEditTable/components/RenderField/index.js +467 -0
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +2 -0
- package/es/ProEditTable/components/RenderToolbar/index.js +136 -0
- package/es/ProEditTable/components/Summary/index.d.ts +12 -0
- package/es/ProEditTable/components/Summary/index.js +79 -0
- package/es/ProEditTable/components/Validator/index.d.ts +10 -0
- package/es/ProEditTable/components/Validator/index.js +27 -0
- package/es/ProEditTable/components/index.d.ts +6 -0
- package/es/ProEditTable/components/index.js +6 -0
- package/es/ProEditTable/index.d.ts +4 -0
- package/es/ProEditTable/index.js +272 -0
- package/es/ProEditTable/propsType.d.ts +201 -0
- package/es/ProEditTable/propsType.js +1 -0
- package/es/ProEditTable/style/index.less +227 -0
- package/es/ProEditTable/utils/config.d.ts +25 -0
- package/es/ProEditTable/utils/config.js +214 -0
- package/es/ProEditTable/utils/index.d.ts +10 -0
- package/es/ProEditTable/utils/index.js +396 -0
- package/es/ProEditTable/utils/tools.d.ts +16 -0
- package/es/ProEditTable/utils/tools.js +75 -0
- package/es/ProEditTable/utils/transform.d.ts +5 -0
- package/es/ProEditTable/utils/transform.js +15 -0
- package/es/ProEnum/getEnumLabel.d.ts +2 -0
- package/es/ProEnum/getEnumLabel.js +62 -0
- package/es/ProEnum/index.d.ts +8 -0
- package/es/ProEnum/index.js +223 -0
- package/es/ProEnum/propsType.d.ts +80 -0
- package/es/ProEnum/propsType.js +1 -0
- package/es/ProEnum/useEnum.d.ts +14 -0
- package/es/ProEnum/useEnum.js +75 -0
- package/es/ProEnum/useEnumRequest.d.ts +3 -0
- package/es/ProEnum/useEnumRequest.js +232 -0
- package/es/ProEnum/utils.d.ts +30 -0
- package/es/ProEnum/utils.js +79 -0
- package/es/ProForm/components/Container.d.ts +8 -0
- package/es/ProForm/components/Container.js +27 -0
- package/es/ProForm/components/FormFooter/index.d.ts +4 -0
- package/es/ProForm/components/FormFooter/index.js +37 -0
- package/es/ProForm/components/FormFooter/propsType.d.ts +17 -0
- package/es/ProForm/components/FormFooter/propsType.js +1 -0
- package/es/ProForm/components/base/Checkbox/index.d.ts +13 -0
- package/es/ProForm/components/base/Checkbox/index.js +67 -0
- package/es/ProForm/components/base/DatePicker/index.d.ts +12 -0
- package/es/ProForm/components/base/DatePicker/index.js +64 -0
- package/es/ProForm/components/base/FormList/components/ActionButton.d.ts +19 -0
- package/es/ProForm/components/base/FormList/components/ActionButton.js +170 -0
- package/es/ProForm/components/base/FormList/components/BlockFields.d.ts +16 -0
- package/es/ProForm/components/base/FormList/components/BlockFields.js +69 -0
- package/es/ProForm/components/base/FormList/components/BlockTitle.d.ts +15 -0
- package/es/ProForm/components/base/FormList/components/BlockTitle.js +27 -0
- package/es/ProForm/components/base/FormList/components/LineFields.d.ts +14 -0
- package/es/ProForm/components/base/FormList/components/LineFields.js +46 -0
- package/es/ProForm/components/base/FormList/components/ToolbarButton.d.ts +12 -0
- package/es/ProForm/components/base/FormList/components/ToolbarButton.js +79 -0
- package/es/ProForm/components/base/FormList/index.d.ts +43 -0
- package/es/ProForm/components/base/FormList/index.js +94 -0
- package/es/ProForm/components/base/FormList/style/index.less +36 -0
- package/es/ProForm/components/base/FormList/utils.d.ts +10 -0
- package/es/ProForm/components/base/FormList/utils.js +19 -0
- package/es/ProForm/components/base/Input/index.d.ts +3 -0
- package/es/ProForm/components/base/Input/index.js +33 -0
- package/es/ProForm/components/base/Input/propsType.d.ts +14 -0
- package/es/ProForm/components/base/Input/propsType.js +1 -0
- package/es/ProForm/components/base/InputNumber/index.d.ts +10 -0
- package/es/ProForm/components/base/InputNumber/index.js +177 -0
- package/es/ProForm/components/base/Radio/index.d.ts +14 -0
- package/es/ProForm/components/base/Radio/index.js +63 -0
- package/es/ProForm/components/base/RangePicker/index.d.ts +9 -0
- package/es/ProForm/components/base/RangePicker/index.js +57 -0
- package/es/ProForm/components/base/Select/index.d.ts +9 -0
- package/es/ProForm/components/base/Select/index.js +66 -0
- package/es/ProForm/components/base/Switch/index.d.ts +9 -0
- package/es/ProForm/components/base/Switch/index.js +33 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +9 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.js +46 -0
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +13 -0
- package/es/ProForm/components/base/TextArea/index.d.ts +8 -0
- package/es/ProForm/components/base/TextArea/index.js +35 -0
- package/es/ProForm/components/combination/ProAddressBar/index.d.ts +4 -0
- package/es/ProForm/components/combination/ProAddressBar/index.js +397 -0
- package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +28 -0
- package/es/ProForm/components/combination/ProAddressBar/propsType.js +1 -0
- package/es/ProForm/components/combination/ProAddressBar/style/index.less +26 -0
- package/es/ProForm/components/combination/ProCombination/index.d.ts +6 -0
- package/es/ProForm/components/combination/ProCombination/index.js +197 -0
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +62 -0
- package/es/ProForm/components/combination/ProCombination/propsType.js +1 -0
- package/es/ProForm/components/combination/ProCombination/style/index.less +15 -0
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.d.ts +33 -0
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +136 -0
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +4 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +644 -0
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +45 -0
- package/es/ProForm/components/combination/ProModalSelect/propsType.js +1 -0
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +57 -0
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +4 -0
- package/es/ProForm/components/combination/ProNumberRange/index.js +182 -0
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +76 -0
- package/es/ProForm/components/combination/ProNumberRange/propsType.js +1 -0
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +79 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +17 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.js +142 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +8 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +25 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.d.ts +12 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.js +36 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +19 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.js +126 -0
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +12 -0
- package/es/ProForm/components/index.d.ts +30 -0
- package/es/ProForm/components/index.js +34 -0
- package/es/ProForm/components/old/CertNo/index.d.ts +18 -0
- package/es/ProForm/components/old/CertNo/index.js +63 -0
- package/es/ProForm/components/old/CertNo/propsType.d.ts +13 -0
- package/es/ProForm/components/old/CertNo/propsType.js +1 -0
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +33 -0
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +108 -0
- package/es/ProForm/components/old/EnumSelect/index.d.ts +4 -0
- package/es/ProForm/components/old/EnumSelect/index.js +264 -0
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +29 -0
- package/es/ProForm/components/old/EnumSelect/interface.js +1 -0
- package/es/ProForm/components/old/EnumSelect/style/index.less +114 -0
- package/es/ProForm/components/old/InputRange/index.d.ts +16 -0
- package/es/ProForm/components/old/InputRange/index.js +99 -0
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +3 -0
- package/es/ProForm/components/old/InputWithSuffix/index.js +44 -0
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +11 -0
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +1 -0
- package/es/ProForm/components/old/ProAddress/index.d.ts +27 -0
- package/es/ProForm/components/old/ProAddress/index.js +286 -0
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +16 -0
- package/es/ProForm/components/old/ProAddress/propsTypes.js +1 -0
- package/es/ProForm/components/old/ProCertNo/index.d.ts +14 -0
- package/es/ProForm/components/old/ProCertNo/index.js +61 -0
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +18 -0
- package/es/ProForm/components/old/ProCertNo/propsType.js +1 -0
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +9 -0
- package/es/ProForm/components/old/ProCertValidity/index.js +182 -0
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +19 -0
- package/es/ProForm/components/old/ProCertValidity/propsType.js +1 -0
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -0
- package/es/ProForm/components/old/ProRangeBox/index.js +89 -0
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +3 -0
- package/es/ProForm/components/old/ProRangeBox/propsType.js +1 -0
- package/es/ProForm/components/render/Render.d.ts +4 -0
- package/es/ProForm/components/render/Render.js +369 -0
- package/es/ProForm/components/render/RenderFields.d.ts +20 -0
- package/es/ProForm/components/render/RenderFields.js +176 -0
- package/es/ProForm/components/render/propsType.d.ts +210 -0
- package/es/ProForm/components/render/propsType.js +7 -0
- package/es/ProForm/index.d.ts +10 -0
- package/es/ProForm/index.js +249 -0
- package/es/ProForm/propsType.d.ts +69 -0
- package/es/ProForm/propsType.js +2 -0
- package/es/ProForm/style/index.less +410 -0
- package/es/ProForm/utils/contrastOriginal.d.ts +1 -0
- package/es/ProForm/utils/contrastOriginal.js +28 -0
- package/es/ProForm/utils/index.d.ts +59 -0
- package/es/ProForm/utils/index.js +298 -0
- package/es/ProForm/utils/rulesCreator.d.ts +1 -0
- package/es/ProForm/utils/rulesCreator.js +26 -0
- package/es/ProForm/utils/transformNames.d.ts +10 -0
- package/es/ProForm/utils/transformNames.js +32 -0
- package/es/ProForm/utils/transformValue.d.ts +6 -0
- package/es/ProForm/utils/transformValue.js +49 -0
- package/es/ProForm/utils/useChanged.d.ts +1 -0
- package/es/ProForm/utils/useChanged.js +10 -0
- package/es/ProForm/utils/useForm.d.ts +2 -0
- package/es/ProForm/utils/useForm.js +96 -0
- package/es/ProForm/utils/useShouldUpdate.d.ts +24 -0
- package/es/ProForm/utils/useShouldUpdate.js +184 -0
- package/es/ProForm/utils/valueType.d.ts +64 -0
- package/es/ProForm/utils/valueType.js +194 -0
- package/es/ProIcon/index.d.ts +5 -0
- package/es/ProIcon/index.js +60 -0
- package/es/ProIcon/propsTypes.d.ts +56 -0
- package/es/ProIcon/propsTypes.js +1 -0
- package/es/ProIcon/style/index.less +12 -0
- package/es/ProLayout/components/Layout/Header/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/Header/index.js +33 -0
- package/es/ProLayout/components/Layout/Header/style/index.less +127 -0
- package/es/ProLayout/components/Layout/Icon/Icon.d.ts +10 -0
- package/es/ProLayout/components/Layout/Icon/Icon.js +31 -0
- package/es/ProLayout/components/Layout/Icon/index.d.ts +2 -0
- package/es/ProLayout/components/Layout/Icon/index.js +2 -0
- package/es/ProLayout/components/Layout/Icon/style/index.less +7 -0
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +3 -0
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +98 -0
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +100 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +3 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +144 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +14 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +1 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +177 -0
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.d.ts +3 -0
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +34 -0
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +97 -0
- package/es/ProLayout/components/Layout/Menu/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/Menu/index.js +62 -0
- package/es/ProLayout/components/Layout/Menu/style/index.less +131 -0
- package/es/ProLayout/components/Layout/Notice/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/Notice/index.js +27 -0
- package/es/ProLayout/components/Layout/Notice/style/index.less +34 -0
- package/es/ProLayout/components/Layout/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/index.js +4 -0
- package/es/ProLayout/components/Layout/index.less +4 -0
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +73 -0
- package/es/ProLayout/components/ProCollapse/PropTypes.js +1 -0
- package/es/ProLayout/components/ProCollapse/index.d.ts +3 -0
- package/es/ProLayout/components/ProCollapse/index.js +95 -0
- package/es/ProLayout/components/ProCollapse/style/index.less +153 -0
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +11 -0
- package/es/ProLayout/components/ProFooter/PropTypes.js +1 -0
- package/es/ProLayout/components/ProFooter/index.d.ts +4 -0
- package/es/ProLayout/components/ProFooter/index.js +47 -0
- package/es/ProLayout/components/ProFooter/style/index.less +10 -0
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +72 -0
- package/es/ProLayout/components/ProHeader/PropTypes.js +1 -0
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +4 -0
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +25 -0
- package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/es/ProLayout/components/ProHeader/components/index.js +1 -0
- package/es/ProLayout/components/ProHeader/index.d.ts +4 -0
- package/es/ProLayout/components/ProHeader/index.js +367 -0
- package/es/ProLayout/components/ProHeader/style/index.less +337 -0
- package/es/ProLayout/components/index.d.ts +3 -0
- package/es/ProLayout/components/index.js +3 -0
- package/es/ProLayout/images/close.png +0 -0
- package/es/ProLayout/images/logoImg.png +0 -0
- package/es/ProLayout/images/pack.png +0 -0
- package/es/ProLayout/images/tipMsg.png +0 -0
- package/es/ProLayout/index.d.ts +20 -0
- package/es/ProLayout/index.js +108 -0
- package/es/ProLayout/propTypes.d.ts +60 -0
- package/es/ProLayout/propTypes.js +1 -0
- package/es/ProLayout/style/index.less +52 -0
- package/es/ProLayout/utils/index.d.ts +36 -0
- package/es/ProLayout/utils/index.js +159 -0
- package/es/ProSelect/index.d.ts +5 -0
- package/es/ProSelect/index.js +278 -0
- package/es/ProSelect/propsType.d.ts +41 -0
- package/es/ProSelect/propsType.js +1 -0
- package/es/ProStep/components/Anchor/index.d.ts +2 -0
- package/es/ProStep/components/Anchor/index.js +94 -0
- package/es/ProStep/components/Item/index.d.ts +6 -0
- package/es/ProStep/components/Item/index.js +18 -0
- package/es/ProStep/components/Listener/index.d.ts +5 -0
- package/es/ProStep/components/Listener/index.js +35 -0
- package/es/ProStep/components/Step/index.d.ts +5 -0
- package/es/ProStep/components/Step/index.js +68 -0
- package/es/ProStep/index.d.ts +18 -0
- package/es/ProStep/index.js +130 -0
- package/es/ProStep/propsType.d.ts +19 -0
- package/es/ProStep/propsType.js +1 -0
- package/es/ProStep/style/index.less +181 -0
- package/es/ProStep/utils/index.d.ts +2 -0
- package/es/ProStep/utils/index.js +16 -0
- package/es/ProTable/components/ResizableLine/index.d.ts +2 -0
- package/es/ProTable/components/ResizableLine/index.js +10 -0
- package/es/ProTable/components/TableResizable/index.d.ts +13 -0
- package/es/ProTable/components/TableResizable/index.js +98 -0
- package/es/ProTable/components/index.d.ts +2 -0
- package/es/ProTable/components/index.js +2 -0
- package/es/ProTable/index.d.ts +16 -0
- package/es/ProTable/index.js +316 -0
- package/es/ProTable/propsType.d.ts +87 -0
- package/es/ProTable/propsType.js +1 -0
- package/es/ProTable/style/index.less +299 -0
- package/es/ProTable/useAntdTable.d.ts +82 -0
- package/es/ProTable/useAntdTable.js +374 -0
- package/es/ProTable/utils.d.ts +12 -0
- package/es/ProTable/utils.js +234 -0
- package/es/ProTooltip/index.d.ts +4 -0
- package/es/ProTooltip/index.js +93 -0
- package/es/ProTooltip/propsType.d.ts +13 -0
- package/es/ProTooltip/propsType.js +1 -0
- package/es/ProTooltip/style/index.less +22 -0
- package/es/ProTransferModal/components/SortableItem/index.d.ts +10 -0
- package/es/ProTransferModal/components/SortableItem/index.js +56 -0
- package/es/ProTransferModal/index.d.ts +4 -0
- package/es/ProTransferModal/index.js +338 -0
- package/es/ProTransferModal/propsType.d.ts +34 -0
- package/es/ProTransferModal/propsType.js +1 -0
- package/es/ProTransferModal/style/index.less +161 -0
- package/es/ProUpload/Example.d.ts +7 -0
- package/es/ProUpload/Example.js +40 -0
- package/es/ProUpload/FileItem.d.ts +33 -0
- package/es/ProUpload/FileItem.js +207 -0
- package/es/ProUpload/index.d.ts +5 -0
- package/es/ProUpload/index.js +404 -0
- package/es/ProUpload/propsType.d.ts +132 -0
- package/es/ProUpload/propsType.js +1 -0
- package/es/ProUpload/style/delete.svg +1 -0
- package/es/ProUpload/style/download.svg +1 -0
- package/es/ProUpload/style/fileItem.less +158 -0
- package/es/ProUpload/style/icon-PDF.png +0 -0
- package/es/ProUpload/style/icon-TXT.png +0 -0
- package/es/ProUpload/style/icon-excel.png +0 -0
- package/es/ProUpload/style/icon-pic.png +0 -0
- package/es/ProUpload/style/icon-word.png +0 -0
- package/es/ProUpload/style/index.less +242 -0
- package/es/ProUpload/style/look.svg +1 -0
- package/es/ProUtils/utils/index.d.ts +6 -0
- package/es/ProUtils/utils/index.js +24 -0
- package/es/ProViewer/index.d.ts +4 -0
- package/es/ProViewer/index.js +209 -0
- package/es/ProViewer/propsType.d.ts +35 -0
- package/es/ProViewer/propsType.js +1 -0
- package/es/ProViewer/style/index.less +8 -0
- package/es/ProWaterMark/index.d.ts +4 -0
- package/es/ProWaterMark/index.js +13 -0
- package/es/ProWaterMark/propsType.d.ts +82 -0
- package/es/ProWaterMark/propsType.js +1 -0
- package/es/assets/arrow.svg +1 -0
- package/es/assets/catalog.svg +1 -0
- package/es/assets/copy.svg +1 -0
- package/es/assets/customColumn.svg +2 -0
- package/es/assets/delete.svg +1 -0
- package/es/assets/disabled.svg +18 -0
- package/es/assets/drag.svg +25 -0
- package/es/assets/empty.png +0 -0
- package/es/assets/reset.svg +11 -0
- package/es/assets/search.svg +1 -0
- package/es/assets/tip.svg +1 -0
- package/es/assets/view.svg +1 -0
- package/es/global.less +5 -0
- package/es/index.d.ts +30 -0
- package/es/index.js +44 -0
- package/es/old/ProBackBtn/index.d.ts +9 -0
- package/es/old/ProBackBtn/index.js +28 -0
- package/es/old/ProBackBtn/propsType.d.ts +4 -0
- package/es/old/ProBackBtn/propsType.js +1 -0
- package/es/old/ProBackBtn/style/index.less +19 -0
- package/es/old/ProCertValidity/index.d.ts +9 -0
- package/es/old/ProCertValidity/index.js +183 -0
- package/es/old/ProCertValidity/propsType.d.ts +19 -0
- package/es/old/ProCertValidity/propsType.js +1 -0
- package/es/old/ProCustomColumn/LeftBody.d.ts +4 -0
- package/es/old/ProCustomColumn/LeftBody.js +206 -0
- package/es/old/ProCustomColumn/RightBody.d.ts +9 -0
- package/es/old/ProCustomColumn/RightBody.js +145 -0
- package/es/old/ProCustomColumn/index.d.ts +4 -0
- package/es/old/ProCustomColumn/index.js +165 -0
- package/es/old/ProCustomColumn/propsType.d.ts +39 -0
- package/es/old/ProCustomColumn/propsType.js +1 -0
- package/es/old/ProCustomColumn/style/LeftBody.less +74 -0
- package/es/old/ProCustomColumn/style/RightBody.less +25 -0
- package/es/old/ProCustomColumn/style/index.less +88 -0
- package/es/old/ProEditableTable/index.d.ts +4 -0
- package/es/old/ProEditableTable/index.js +572 -0
- package/es/old/ProEditableTable/propsType.d.ts +68 -0
- package/es/old/ProEditableTable/propsType.js +1 -0
- package/es/old/ProEditableTable/style/index.less +76 -0
- package/es/old/ProEditableTable/utils.d.ts +29 -0
- package/es/old/ProEditableTable/utils.js +307 -0
- package/es/old/ProEnumSelectModal/hooks/useRequestList.d.ts +32 -0
- package/es/old/ProEnumSelectModal/hooks/useRequestList.js +110 -0
- package/es/old/ProEnumSelectModal/index.d.ts +12 -0
- package/es/old/ProEnumSelectModal/index.js +222 -0
- package/es/old/ProEnumSelectModal/propsType.d.ts +22 -0
- package/es/old/ProEnumSelectModal/propsType.js +1 -0
- package/es/old/ProEnumSelectModal/style/index.less +98 -0
- package/es/style/components.less +18 -0
- package/es/style/core/compatible.less +30 -0
- package/es/style/core/index.less +3 -0
- package/es/style/core/mixins.less +70 -0
- package/es/style/core/normalize.less +246 -0
- package/es/style/index.less +2 -0
- package/es/style/theme/antd.less +647 -0
- package/es/style/theme/index.less +190 -0
- package/lib/ProConfigProvider/index.d.ts +22 -0
- package/lib/ProConfigProvider/index.js +64 -0
- package/lib/ProDownload/DownloadHelper.d.ts +32 -0
- package/lib/ProDownload/DownloadHelper.js +183 -0
- package/lib/ProDownload/index.d.ts +4 -0
- package/lib/ProDownload/index.js +183 -0
- package/lib/ProDownload/propsType.d.ts +54 -0
- package/lib/ProDownload/propsType.js +5 -0
- package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +7 -0
- package/lib/ProDrawerForm/components/ProDrawer/index.js +208 -0
- package/lib/ProDrawerForm/components/ProModal/index.d.ts +7 -0
- package/lib/ProDrawerForm/components/ProModal/index.js +167 -0
- package/lib/ProDrawerForm/components/index.d.ts +2 -0
- package/lib/ProDrawerForm/components/index.js +20 -0
- package/lib/ProDrawerForm/index.d.ts +5 -0
- package/lib/ProDrawerForm/index.js +73 -0
- package/lib/ProDrawerForm/propsType.d.ts +88 -0
- package/lib/ProDrawerForm/propsType.js +5 -0
- package/lib/ProDrawerForm/style/index.less +125 -0
- package/lib/ProDrawerForm/utils/index.d.ts +6 -0
- package/lib/ProDrawerForm/utils/index.js +23 -0
- package/lib/ProEditLabel/components/RenderForm.d.ts +3 -0
- package/lib/ProEditLabel/components/RenderForm.js +75 -0
- package/lib/ProEditLabel/index.d.ts +4 -0
- package/lib/ProEditLabel/index.js +324 -0
- package/lib/ProEditLabel/propsType.d.ts +43 -0
- package/lib/ProEditLabel/propsType.js +5 -0
- package/lib/ProEditLabel/style/index.less +105 -0
- package/lib/ProEditLabel/utils/index.d.ts +9 -0
- package/lib/ProEditLabel/utils/index.js +41 -0
- package/lib/ProEditTable/components/ActionButton/index.d.ts +2 -0
- package/lib/ProEditTable/components/ActionButton/index.js +75 -0
- package/lib/ProEditTable/components/DndWrapper/index.d.ts +14 -0
- package/lib/ProEditTable/components/DndWrapper/index.js +91 -0
- package/lib/ProEditTable/components/RenderField/index.d.ts +2 -0
- package/lib/ProEditTable/components/RenderField/index.js +473 -0
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +2 -0
- package/lib/ProEditTable/components/RenderToolbar/index.js +143 -0
- package/lib/ProEditTable/components/Summary/index.d.ts +12 -0
- package/lib/ProEditTable/components/Summary/index.js +84 -0
- package/lib/ProEditTable/components/Validator/index.d.ts +10 -0
- package/lib/ProEditTable/components/Validator/index.js +32 -0
- package/lib/ProEditTable/components/index.d.ts +6 -0
- package/lib/ProEditTable/components/index.js +55 -0
- package/lib/ProEditTable/index.d.ts +4 -0
- package/lib/ProEditTable/index.js +278 -0
- package/lib/ProEditTable/propsType.d.ts +201 -0
- package/lib/ProEditTable/propsType.js +5 -0
- package/lib/ProEditTable/style/index.less +227 -0
- package/lib/ProEditTable/utils/config.d.ts +25 -0
- package/lib/ProEditTable/utils/config.js +227 -0
- package/lib/ProEditTable/utils/index.d.ts +10 -0
- package/lib/ProEditTable/utils/index.js +401 -0
- package/lib/ProEditTable/utils/tools.d.ts +16 -0
- package/lib/ProEditTable/utils/tools.js +87 -0
- package/lib/ProEditTable/utils/transform.d.ts +5 -0
- package/lib/ProEditTable/utils/transform.js +22 -0
- package/lib/ProEnum/getEnumLabel.d.ts +2 -0
- package/lib/ProEnum/getEnumLabel.js +70 -0
- package/lib/ProEnum/index.d.ts +8 -0
- package/lib/ProEnum/index.js +225 -0
- package/lib/ProEnum/propsType.d.ts +80 -0
- package/lib/ProEnum/propsType.js +5 -0
- package/lib/ProEnum/useEnum.d.ts +14 -0
- package/lib/ProEnum/useEnum.js +84 -0
- package/lib/ProEnum/useEnumRequest.d.ts +3 -0
- package/lib/ProEnum/useEnumRequest.js +241 -0
- package/lib/ProEnum/utils.d.ts +30 -0
- package/lib/ProEnum/utils.js +92 -0
- package/lib/ProForm/components/Container.d.ts +8 -0
- package/lib/ProForm/components/Container.js +34 -0
- package/lib/ProForm/components/FormFooter/index.d.ts +4 -0
- package/lib/ProForm/components/FormFooter/index.js +42 -0
- package/lib/ProForm/components/FormFooter/propsType.d.ts +17 -0
- package/lib/ProForm/components/FormFooter/propsType.js +5 -0
- package/lib/ProForm/components/base/Checkbox/index.d.ts +13 -0
- package/lib/ProForm/components/base/Checkbox/index.js +74 -0
- package/lib/ProForm/components/base/DatePicker/index.d.ts +12 -0
- package/lib/ProForm/components/base/DatePicker/index.js +71 -0
- package/lib/ProForm/components/base/FormList/components/ActionButton.d.ts +19 -0
- package/lib/ProForm/components/base/FormList/components/ActionButton.js +174 -0
- package/lib/ProForm/components/base/FormList/components/BlockFields.d.ts +16 -0
- package/lib/ProForm/components/base/FormList/components/BlockFields.js +75 -0
- package/lib/ProForm/components/base/FormList/components/BlockTitle.d.ts +15 -0
- package/lib/ProForm/components/base/FormList/components/BlockTitle.js +35 -0
- package/lib/ProForm/components/base/FormList/components/LineFields.d.ts +14 -0
- package/lib/ProForm/components/base/FormList/components/LineFields.js +53 -0
- package/lib/ProForm/components/base/FormList/components/ToolbarButton.d.ts +12 -0
- package/lib/ProForm/components/base/FormList/components/ToolbarButton.js +85 -0
- package/lib/ProForm/components/base/FormList/index.d.ts +43 -0
- package/lib/ProForm/components/base/FormList/index.js +102 -0
- package/lib/ProForm/components/base/FormList/style/index.less +36 -0
- package/lib/ProForm/components/base/FormList/utils.d.ts +10 -0
- package/lib/ProForm/components/base/FormList/utils.js +26 -0
- package/lib/ProForm/components/base/Input/index.d.ts +3 -0
- package/lib/ProForm/components/base/Input/index.js +40 -0
- package/lib/ProForm/components/base/Input/propsType.d.ts +14 -0
- package/lib/ProForm/components/base/Input/propsType.js +5 -0
- package/lib/ProForm/components/base/InputNumber/index.d.ts +10 -0
- package/lib/ProForm/components/base/InputNumber/index.js +183 -0
- package/lib/ProForm/components/base/Radio/index.d.ts +14 -0
- package/lib/ProForm/components/base/Radio/index.js +70 -0
- package/lib/ProForm/components/base/RangePicker/index.d.ts +9 -0
- package/lib/ProForm/components/base/RangePicker/index.js +64 -0
- package/lib/ProForm/components/base/Select/index.d.ts +9 -0
- package/lib/ProForm/components/base/Select/index.js +73 -0
- package/lib/ProForm/components/base/Switch/index.d.ts +9 -0
- package/lib/ProForm/components/base/Switch/index.js +40 -0
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +9 -0
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +54 -0
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +13 -0
- package/lib/ProForm/components/base/TextArea/index.d.ts +8 -0
- package/lib/ProForm/components/base/TextArea/index.js +42 -0
- package/lib/ProForm/components/combination/ProAddressBar/index.d.ts +4 -0
- package/lib/ProForm/components/combination/ProAddressBar/index.js +401 -0
- package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +28 -0
- package/lib/ProForm/components/combination/ProAddressBar/propsType.js +5 -0
- package/lib/ProForm/components/combination/ProAddressBar/style/index.less +26 -0
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +6 -0
- package/lib/ProForm/components/combination/ProCombination/index.js +204 -0
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +62 -0
- package/lib/ProForm/components/combination/ProCombination/propsType.js +5 -0
- package/lib/ProForm/components/combination/ProCombination/style/index.less +15 -0
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.d.ts +33 -0
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +145 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +4 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.js +646 -0
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +45 -0
- package/lib/ProForm/components/combination/ProModalSelect/propsType.js +5 -0
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +57 -0
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +4 -0
- package/lib/ProForm/components/combination/ProNumberRange/index.js +187 -0
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +76 -0
- package/lib/ProForm/components/combination/ProNumberRange/propsType.js +5 -0
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +79 -0
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +17 -0
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +146 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +8 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +33 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.d.ts +12 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.js +44 -0
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +19 -0
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +131 -0
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +12 -0
- package/lib/ProForm/components/index.d.ts +30 -0
- package/lib/ProForm/components/index.js +223 -0
- package/lib/ProForm/components/old/CertNo/index.d.ts +18 -0
- package/lib/ProForm/components/old/CertNo/index.js +69 -0
- package/lib/ProForm/components/old/CertNo/propsType.d.ts +13 -0
- package/lib/ProForm/components/old/CertNo/propsType.js +5 -0
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +33 -0
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +115 -0
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +4 -0
- package/lib/ProForm/components/old/EnumSelect/index.js +266 -0
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +29 -0
- package/lib/ProForm/components/old/EnumSelect/interface.js +5 -0
- package/lib/ProForm/components/old/EnumSelect/style/index.less +114 -0
- package/lib/ProForm/components/old/InputRange/index.d.ts +16 -0
- package/lib/ProForm/components/old/InputRange/index.js +105 -0
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +3 -0
- package/lib/ProForm/components/old/InputWithSuffix/index.js +51 -0
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +11 -0
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +5 -0
- package/lib/ProForm/components/old/ProAddress/index.d.ts +27 -0
- package/lib/ProForm/components/old/ProAddress/index.js +290 -0
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +16 -0
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +5 -0
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +14 -0
- package/lib/ProForm/components/old/ProCertNo/index.js +66 -0
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +18 -0
- package/lib/ProForm/components/old/ProCertNo/propsType.js +5 -0
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +9 -0
- package/lib/ProForm/components/old/ProCertValidity/index.js +187 -0
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +19 -0
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +5 -0
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -0
- package/lib/ProForm/components/old/ProRangeBox/index.js +88 -0
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +3 -0
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +5 -0
- package/lib/ProForm/components/render/Render.d.ts +4 -0
- package/lib/ProForm/components/render/Render.js +373 -0
- package/lib/ProForm/components/render/RenderFields.d.ts +20 -0
- package/lib/ProForm/components/render/RenderFields.js +185 -0
- package/lib/ProForm/components/render/propsType.d.ts +210 -0
- package/lib/ProForm/components/render/propsType.js +11 -0
- package/lib/ProForm/index.d.ts +10 -0
- package/lib/ProForm/index.js +251 -0
- package/lib/ProForm/propsType.d.ts +69 -0
- package/lib/ProForm/propsType.js +23 -0
- package/lib/ProForm/style/index.less +410 -0
- package/lib/ProForm/utils/contrastOriginal.d.ts +1 -0
- package/lib/ProForm/utils/contrastOriginal.js +35 -0
- package/lib/ProForm/utils/index.d.ts +59 -0
- package/lib/ProForm/utils/index.js +328 -0
- package/lib/ProForm/utils/rulesCreator.d.ts +1 -0
- package/lib/ProForm/utils/rulesCreator.js +33 -0
- package/lib/ProForm/utils/transformNames.d.ts +10 -0
- package/lib/ProForm/utils/transformNames.js +39 -0
- package/lib/ProForm/utils/transformValue.d.ts +6 -0
- package/lib/ProForm/utils/transformValue.js +58 -0
- package/lib/ProForm/utils/useChanged.d.ts +1 -0
- package/lib/ProForm/utils/useChanged.js +16 -0
- package/lib/ProForm/utils/useForm.d.ts +2 -0
- package/lib/ProForm/utils/useForm.js +103 -0
- package/lib/ProForm/utils/useShouldUpdate.d.ts +24 -0
- package/lib/ProForm/utils/useShouldUpdate.js +192 -0
- package/lib/ProForm/utils/valueType.d.ts +64 -0
- package/lib/ProForm/utils/valueType.js +202 -0
- package/lib/ProIcon/index.d.ts +5 -0
- package/lib/ProIcon/index.js +68 -0
- package/lib/ProIcon/propsTypes.d.ts +56 -0
- package/lib/ProIcon/propsTypes.js +5 -0
- package/lib/ProIcon/style/index.less +12 -0
- package/lib/ProLayout/components/Layout/Header/index.d.ts +4 -0
- package/lib/ProLayout/components/Layout/Header/index.js +41 -0
- package/lib/ProLayout/components/Layout/Header/style/index.less +127 -0
- package/lib/ProLayout/components/Layout/Icon/Icon.d.ts +10 -0
- package/lib/ProLayout/components/Layout/Icon/Icon.js +39 -0
- package/lib/ProLayout/components/Layout/Icon/index.d.ts +2 -0
- package/lib/ProLayout/components/Layout/Icon/index.js +10 -0
- package/lib/ProLayout/components/Layout/Icon/style/index.less +7 -0
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +3 -0
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +103 -0
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +100 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +3 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +152 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +14 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +5 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +177 -0
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.d.ts +3 -0
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +43 -0
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +97 -0
- package/lib/ProLayout/components/Layout/Menu/index.d.ts +4 -0
- package/lib/ProLayout/components/Layout/Menu/index.js +71 -0
- package/lib/ProLayout/components/Layout/Menu/style/index.less +131 -0
- package/lib/ProLayout/components/Layout/Notice/index.d.ts +4 -0
- package/lib/ProLayout/components/Layout/Notice/index.js +35 -0
- package/lib/ProLayout/components/Layout/Notice/style/index.less +34 -0
- package/lib/ProLayout/components/Layout/index.d.ts +4 -0
- package/lib/ProLayout/components/Layout/index.js +34 -0
- package/lib/ProLayout/components/Layout/index.less +4 -0
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +73 -0
- package/lib/ProLayout/components/ProCollapse/PropTypes.js +5 -0
- package/lib/ProLayout/components/ProCollapse/index.d.ts +3 -0
- package/lib/ProLayout/components/ProCollapse/index.js +100 -0
- package/lib/ProLayout/components/ProCollapse/style/index.less +153 -0
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +11 -0
- package/lib/ProLayout/components/ProFooter/PropTypes.js +5 -0
- package/lib/ProLayout/components/ProFooter/index.d.ts +4 -0
- package/lib/ProLayout/components/ProFooter/index.js +55 -0
- package/lib/ProLayout/components/ProFooter/style/index.less +10 -0
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +72 -0
- package/lib/ProLayout/components/ProHeader/PropTypes.js +5 -0
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +4 -0
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +32 -0
- package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/lib/ProLayout/components/ProHeader/components/index.js +13 -0
- package/lib/ProLayout/components/ProHeader/index.d.ts +4 -0
- package/lib/ProLayout/components/ProHeader/index.js +371 -0
- package/lib/ProLayout/components/ProHeader/style/index.less +337 -0
- package/lib/ProLayout/components/index.d.ts +3 -0
- package/lib/ProLayout/components/index.js +27 -0
- package/lib/ProLayout/images/close.png +0 -0
- package/lib/ProLayout/images/logoImg.png +0 -0
- package/lib/ProLayout/images/pack.png +0 -0
- package/lib/ProLayout/images/tipMsg.png +0 -0
- package/lib/ProLayout/index.d.ts +20 -0
- package/lib/ProLayout/index.js +117 -0
- package/lib/ProLayout/propTypes.d.ts +60 -0
- package/lib/ProLayout/propTypes.js +5 -0
- package/lib/ProLayout/style/index.less +52 -0
- package/lib/ProLayout/utils/index.d.ts +36 -0
- package/lib/ProLayout/utils/index.js +173 -0
- package/lib/ProSelect/index.d.ts +5 -0
- package/lib/ProSelect/index.js +279 -0
- package/lib/ProSelect/propsType.d.ts +41 -0
- package/lib/ProSelect/propsType.js +5 -0
- package/lib/ProStep/components/Anchor/index.d.ts +2 -0
- package/lib/ProStep/components/Anchor/index.js +103 -0
- package/lib/ProStep/components/Item/index.d.ts +6 -0
- package/lib/ProStep/components/Item/index.js +26 -0
- package/lib/ProStep/components/Listener/index.d.ts +5 -0
- package/lib/ProStep/components/Listener/index.js +43 -0
- package/lib/ProStep/components/Step/index.d.ts +5 -0
- package/lib/ProStep/components/Step/index.js +78 -0
- package/lib/ProStep/index.d.ts +18 -0
- package/lib/ProStep/index.js +141 -0
- package/lib/ProStep/propsType.d.ts +19 -0
- package/lib/ProStep/propsType.js +5 -0
- package/lib/ProStep/style/index.less +181 -0
- package/lib/ProStep/utils/index.d.ts +2 -0
- package/lib/ProStep/utils/index.js +24 -0
- package/lib/ProTable/components/ResizableLine/index.d.ts +2 -0
- package/lib/ProTable/components/ResizableLine/index.js +18 -0
- package/lib/ProTable/components/TableResizable/index.d.ts +13 -0
- package/lib/ProTable/components/TableResizable/index.js +99 -0
- package/lib/ProTable/components/index.d.ts +2 -0
- package/lib/ProTable/components/index.js +20 -0
- package/lib/ProTable/index.d.ts +16 -0
- package/lib/ProTable/index.js +324 -0
- package/lib/ProTable/propsType.d.ts +87 -0
- package/lib/ProTable/propsType.js +5 -0
- package/lib/ProTable/style/index.less +299 -0
- package/lib/ProTable/useAntdTable.d.ts +82 -0
- package/lib/ProTable/useAntdTable.js +382 -0
- package/lib/ProTable/utils.d.ts +12 -0
- package/lib/ProTable/utils.js +242 -0
- package/lib/ProTooltip/index.d.ts +4 -0
- package/lib/ProTooltip/index.js +101 -0
- package/lib/ProTooltip/propsType.d.ts +13 -0
- package/lib/ProTooltip/propsType.js +5 -0
- package/lib/ProTooltip/style/index.less +22 -0
- package/lib/ProTransferModal/components/SortableItem/index.d.ts +10 -0
- package/lib/ProTransferModal/components/SortableItem/index.js +63 -0
- package/lib/ProTransferModal/index.d.ts +4 -0
- package/lib/ProTransferModal/index.js +334 -0
- package/lib/ProTransferModal/propsType.d.ts +34 -0
- package/lib/ProTransferModal/propsType.js +5 -0
- package/lib/ProTransferModal/style/index.less +161 -0
- package/lib/ProUpload/Example.d.ts +7 -0
- package/lib/ProUpload/Example.js +50 -0
- package/lib/ProUpload/FileItem.d.ts +33 -0
- package/lib/ProUpload/FileItem.js +216 -0
- package/lib/ProUpload/index.d.ts +5 -0
- package/lib/ProUpload/index.js +406 -0
- package/lib/ProUpload/propsType.d.ts +132 -0
- package/lib/ProUpload/propsType.js +5 -0
- package/lib/ProUpload/style/delete.svg +1 -0
- package/lib/ProUpload/style/download.svg +1 -0
- package/lib/ProUpload/style/fileItem.less +158 -0
- package/lib/ProUpload/style/icon-PDF.png +0 -0
- package/lib/ProUpload/style/icon-TXT.png +0 -0
- package/lib/ProUpload/style/icon-excel.png +0 -0
- package/lib/ProUpload/style/icon-pic.png +0 -0
- package/lib/ProUpload/style/icon-word.png +0 -0
- package/lib/ProUpload/style/index.less +242 -0
- package/lib/ProUpload/style/look.svg +1 -0
- package/lib/ProUtils/utils/index.d.ts +6 -0
- package/lib/ProUtils/utils/index.js +31 -0
- package/lib/ProViewer/index.d.ts +4 -0
- package/lib/ProViewer/index.js +214 -0
- package/lib/ProViewer/propsType.d.ts +35 -0
- package/lib/ProViewer/propsType.js +5 -0
- package/lib/ProViewer/style/index.less +8 -0
- package/lib/ProWaterMark/index.d.ts +4 -0
- package/lib/ProWaterMark/index.js +21 -0
- package/lib/ProWaterMark/propsType.d.ts +82 -0
- package/lib/ProWaterMark/propsType.js +5 -0
- package/lib/assets/arrow.svg +1 -0
- package/lib/assets/catalog.svg +1 -0
- package/lib/assets/copy.svg +1 -0
- package/lib/assets/customColumn.svg +2 -0
- package/lib/assets/delete.svg +1 -0
- package/lib/assets/disabled.svg +18 -0
- package/lib/assets/drag.svg +25 -0
- package/lib/assets/empty.png +0 -0
- package/lib/assets/reset.svg +11 -0
- package/lib/assets/search.svg +1 -0
- package/lib/assets/tip.svg +1 -0
- package/lib/assets/view.svg +1 -0
- package/lib/global.less +5 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.js +267 -0
- package/lib/old/ProBackBtn/index.d.ts +9 -0
- package/lib/old/ProBackBtn/index.js +35 -0
- package/lib/old/ProBackBtn/propsType.d.ts +4 -0
- package/lib/old/ProBackBtn/propsType.js +5 -0
- package/lib/old/ProBackBtn/style/index.less +19 -0
- package/lib/old/ProCertValidity/index.d.ts +9 -0
- package/lib/old/ProCertValidity/index.js +188 -0
- package/lib/old/ProCertValidity/propsType.d.ts +19 -0
- package/lib/old/ProCertValidity/propsType.js +5 -0
- package/lib/old/ProCustomColumn/LeftBody.d.ts +4 -0
- package/lib/old/ProCustomColumn/LeftBody.js +212 -0
- package/lib/old/ProCustomColumn/RightBody.d.ts +9 -0
- package/lib/old/ProCustomColumn/RightBody.js +150 -0
- package/lib/old/ProCustomColumn/index.d.ts +4 -0
- package/lib/old/ProCustomColumn/index.js +171 -0
- package/lib/old/ProCustomColumn/propsType.d.ts +39 -0
- package/lib/old/ProCustomColumn/propsType.js +5 -0
- package/lib/old/ProCustomColumn/style/LeftBody.less +74 -0
- package/lib/old/ProCustomColumn/style/RightBody.less +25 -0
- package/lib/old/ProCustomColumn/style/index.less +88 -0
- package/lib/old/ProEditableTable/index.d.ts +4 -0
- package/lib/old/ProEditableTable/index.js +568 -0
- package/lib/old/ProEditableTable/propsType.d.ts +68 -0
- package/lib/old/ProEditableTable/propsType.js +5 -0
- package/lib/old/ProEditableTable/style/index.less +76 -0
- package/lib/old/ProEditableTable/utils.d.ts +29 -0
- package/lib/old/ProEditableTable/utils.js +302 -0
- package/lib/old/ProEnumSelectModal/hooks/useRequestList.d.ts +32 -0
- package/lib/old/ProEnumSelectModal/hooks/useRequestList.js +117 -0
- package/lib/old/ProEnumSelectModal/index.d.ts +12 -0
- package/lib/old/ProEnumSelectModal/index.js +220 -0
- package/lib/old/ProEnumSelectModal/propsType.d.ts +22 -0
- package/lib/old/ProEnumSelectModal/propsType.js +5 -0
- package/lib/old/ProEnumSelectModal/style/index.less +98 -0
- package/lib/style/components.less +18 -0
- package/lib/style/core/compatible.less +30 -0
- package/lib/style/core/index.less +3 -0
- package/lib/style/core/mixins.less +70 -0
- package/lib/style/core/normalize.less +246 -0
- package/lib/style/index.less +2 -0
- package/lib/style/theme/antd.less +647 -0
- package/lib/style/theme/index.less +190 -0
- package/package.json +121 -0
- package/source-code/package.json +16 -0
- package/typings.d.ts +6 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import "./LeftBody";
|
|
2
|
+
@import "./RightBody";
|
|
3
|
+
|
|
4
|
+
.pro-custom-column {
|
|
5
|
+
.custom-column-btn {
|
|
6
|
+
display : inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
&:hover,
|
|
10
|
+
&:visited,
|
|
11
|
+
&:focus {
|
|
12
|
+
color : unset;
|
|
13
|
+
border : 1px solid #d9d9d9;
|
|
14
|
+
background: unset;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.anticon {
|
|
18
|
+
height: 16px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pro-custom-column-modal {
|
|
24
|
+
|
|
25
|
+
.ant-modal-header,
|
|
26
|
+
.ant-modal-footer {
|
|
27
|
+
border: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ant-modal-footer {
|
|
31
|
+
padding: 0 var(--zaui-space-size-md, 16px) var(--zaui-space-size-md, 16px) var(--zaui-space-size-md, 16px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.main {
|
|
35
|
+
display: flex;
|
|
36
|
+
height : 360px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.right-list-item {
|
|
41
|
+
width : 100%;
|
|
42
|
+
padding-bottom: var(--zaui-space-size-sm, 8px);
|
|
43
|
+
|
|
44
|
+
.ant-tag {
|
|
45
|
+
display : flex;
|
|
46
|
+
align-items : center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
width : 100%;
|
|
49
|
+
height : 32px;
|
|
50
|
+
background : #F2F2F2;
|
|
51
|
+
border-radius : var(--zaui-border-radius, 4px);
|
|
52
|
+
border : none;
|
|
53
|
+
color : #343434;
|
|
54
|
+
font-size : var(--zaui-font-size, 14px);
|
|
55
|
+
|
|
56
|
+
.drag-icon {
|
|
57
|
+
height: 20px;
|
|
58
|
+
cursor: move;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.disabled-icon {
|
|
62
|
+
height: 20px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.anticon-close {
|
|
66
|
+
color : #DCDCDC;
|
|
67
|
+
font-size: var(--zaui-font-size-sm, 12px);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.disabled {
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
|
|
74
|
+
.pro-tooltip,
|
|
75
|
+
.anticon {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.anticon {
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.sortable-helper {
|
|
86
|
+
list-style-type: none;
|
|
87
|
+
z-index : 9999;
|
|
88
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProEditableTablePropsType } from './propsType';
|
|
3
|
+
declare const ProEditableTable: React.ForwardRefExoticComponent<Pick<ProEditableTablePropsType, keyof ProEditableTablePropsType> & React.RefAttributes<unknown>>;
|
|
4
|
+
export default ProEditableTable;
|
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
import "antd/es/table/style";
|
|
2
|
+
import _Table from "antd/es/table";
|
|
3
|
+
import "antd/es/config-provider/style";
|
|
4
|
+
import _ConfigProvider from "antd/es/config-provider";
|
|
5
|
+
import "antd/es/button/style";
|
|
6
|
+
import _Button from "antd/es/button";
|
|
7
|
+
import "antd/es/popconfirm/style";
|
|
8
|
+
import _Popconfirm from "antd/es/popconfirm";
|
|
9
|
+
import "antd/es/space/style";
|
|
10
|
+
import _Space from "antd/es/space";
|
|
11
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
12
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
13
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
14
|
+
import "antd/es/message/style";
|
|
15
|
+
import _message from "antd/es/message";
|
|
16
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
17
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
18
|
+
import "antd/es/form/style";
|
|
19
|
+
import _Form from "antd/es/form";
|
|
20
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
21
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
22
|
+
var _excluded = ["form", "dataSource", "setDataSource", "columns", "actionRef", "addButtonProps", "pagination", "editType", "onlyOneLineEditorAlertMessage", "noSaveAlertMessage", "mulDeletePoconfirmMsg", "name", "disabled", "formProps"],
|
|
23
|
+
_excluded2 = ["isCanAdd", "isCanMultipleDelete", "multipleDeleteModalProps", "position", "buttonText", "emptyButtonText", "insertType", "onlyAddOneLineAlertMessage"];
|
|
24
|
+
import { PlusOutlined } from '@ant-design/icons';
|
|
25
|
+
import { useSetState, useDeepCompareEffect } from 'ahooks';
|
|
26
|
+
import { cloneDeep } from 'lodash';
|
|
27
|
+
import React, { cloneElement, forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
28
|
+
import Empty from '../../assets/empty.png';
|
|
29
|
+
import { formatList, transformColumns, getRandom } from './utils';
|
|
30
|
+
// 1、保证再去取dataSource数据纯净 table里面用list进行处理
|
|
31
|
+
var ProEditableTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32
|
+
var originForm = props.form,
|
|
33
|
+
dataSource = props.dataSource,
|
|
34
|
+
setDataSource = props.setDataSource,
|
|
35
|
+
columns = props.columns,
|
|
36
|
+
actionRef = props.actionRef,
|
|
37
|
+
addButtonProps = props.addButtonProps,
|
|
38
|
+
pagination = props.pagination,
|
|
39
|
+
editType = props.editType,
|
|
40
|
+
onlyOneLineEditorAlertMessage = props.onlyOneLineEditorAlertMessage,
|
|
41
|
+
noSaveAlertMessage = props.noSaveAlertMessage,
|
|
42
|
+
mulDeletePoconfirmMsg = props.mulDeletePoconfirmMsg,
|
|
43
|
+
_props$name = props.name,
|
|
44
|
+
name = _props$name === void 0 ? 'dataList' : _props$name,
|
|
45
|
+
disabled = props.disabled,
|
|
46
|
+
formProps = props.formProps,
|
|
47
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
48
|
+
var isSingle = editType === 'single';
|
|
49
|
+
var _Form$useForm = _Form.useForm(originForm),
|
|
50
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
51
|
+
form = _Form$useForm2[0];
|
|
52
|
+
// table实例
|
|
53
|
+
var tableRef = useRef();
|
|
54
|
+
var _useState = useState(dataSource),
|
|
55
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
+
list = _useState2[0],
|
|
57
|
+
setList = _useState2[1];
|
|
58
|
+
var _useState3 = useState([]),
|
|
59
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
60
|
+
selectedRowKeys = _useState4[0],
|
|
61
|
+
setSelectedRowKeys = _useState4[1];
|
|
62
|
+
var _useState5 = useState([]),
|
|
63
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
64
|
+
selectedRows = _useState6[0],
|
|
65
|
+
setSelectedRows = _useState6[1];
|
|
66
|
+
var _useSetState = useSetState([]),
|
|
67
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
68
|
+
originRowData = _useSetState2[0],
|
|
69
|
+
setOriginRowData = _useSetState2[1];
|
|
70
|
+
var _ref = addButtonProps || {},
|
|
71
|
+
_ref$isCanAdd = _ref.isCanAdd,
|
|
72
|
+
isCanAdd = _ref$isCanAdd === void 0 ? true : _ref$isCanAdd,
|
|
73
|
+
_ref$isCanMultipleDel = _ref.isCanMultipleDelete,
|
|
74
|
+
isCanMultipleDelete = _ref$isCanMultipleDel === void 0 ? false : _ref$isCanMultipleDel,
|
|
75
|
+
_ref$multipleDeleteMo = _ref.multipleDeleteModalProps,
|
|
76
|
+
multipleDeleteModalProps = _ref$multipleDeleteMo === void 0 ? {} : _ref$multipleDeleteMo,
|
|
77
|
+
_ref$position = _ref.position,
|
|
78
|
+
position = _ref$position === void 0 ? 'bottomLeft' : _ref$position,
|
|
79
|
+
_ref$buttonText = _ref.buttonText,
|
|
80
|
+
buttonText = _ref$buttonText === void 0 ? '添加一行' : _ref$buttonText,
|
|
81
|
+
_ref$emptyButtonText = _ref.emptyButtonText,
|
|
82
|
+
emptyButtonText = _ref$emptyButtonText === void 0 ? '点击添加' : _ref$emptyButtonText,
|
|
83
|
+
_ref$insertType = _ref.insertType,
|
|
84
|
+
insertType = _ref$insertType === void 0 ? 'after' : _ref$insertType,
|
|
85
|
+
_ref$onlyAddOneLineAl = _ref.onlyAddOneLineAlertMessage,
|
|
86
|
+
onlyAddOneLineAlertMessage = _ref$onlyAddOneLineAl === void 0 ? '只能新增一行' : _ref$onlyAddOneLineAl,
|
|
87
|
+
antButtonProps = _objectWithoutProperties(_ref, _excluded2);
|
|
88
|
+
// 获取key
|
|
89
|
+
var getRowKey = function getRowKey(record) {
|
|
90
|
+
return record.rowKey;
|
|
91
|
+
};
|
|
92
|
+
var rowSelection = {
|
|
93
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
94
|
+
setSelectedRows(selectedRows);
|
|
95
|
+
setSelectedRowKeys(selectedRowKeys);
|
|
96
|
+
}
|
|
97
|
+
// getCheckboxProps: (record: any) => ({
|
|
98
|
+
// disabled: !getRowKey(record) || String(getRowKey(record)).startsWith('&&'), // 新增的虚拟行不可选中
|
|
99
|
+
// }),
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* 监听行数据变化同步list
|
|
103
|
+
* @param {number} rowIndex 修改行的index
|
|
104
|
+
* @param {any} values 需要更新的数据
|
|
105
|
+
* @returns {promise}
|
|
106
|
+
*/
|
|
107
|
+
var onUpdateRowData = function onUpdateRowData(rowIndex, values) {
|
|
108
|
+
var nextList = cloneDeep(list);
|
|
109
|
+
nextList[rowIndex] = _objectSpread(_objectSpread({}, nextList[rowIndex]), values);
|
|
110
|
+
setDataSource ? setDataSource(nextList) : setList(_toConsumableArray(nextList));
|
|
111
|
+
return Promise.resolve({
|
|
112
|
+
rowIndex: rowIndex,
|
|
113
|
+
nextList: nextList,
|
|
114
|
+
list: formatList(nextList),
|
|
115
|
+
rowData: nextList[rowIndex]
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
var handleMulResetForm = function handleMulResetForm() {
|
|
119
|
+
var values = form.getFieldsValue();
|
|
120
|
+
var tempValues = {};
|
|
121
|
+
Object.keys(values).forEach(function (index) {
|
|
122
|
+
tempValues[+index + 1] = values[index];
|
|
123
|
+
});
|
|
124
|
+
form.resetFields([0]);
|
|
125
|
+
form.setFieldsValue(_objectSpread({}, tempValues));
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* 新增行
|
|
129
|
+
* @param {IRowDataPropsType} rowData 初始化数据
|
|
130
|
+
* @param {IAddOptionsPropsType} options 新增配置选项
|
|
131
|
+
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
132
|
+
*/
|
|
133
|
+
var onAdd = function onAdd(rowData) {
|
|
134
|
+
if (isSingle) {
|
|
135
|
+
var _list$filter;
|
|
136
|
+
var isOneEditing = ((_list$filter = list.filter(function (item) {
|
|
137
|
+
return item.editable;
|
|
138
|
+
})) === null || _list$filter === void 0 ? void 0 : _list$filter.length) >= 1;
|
|
139
|
+
if (isOneEditing) {
|
|
140
|
+
_message.warning(onlyAddOneLineAlertMessage);
|
|
141
|
+
return Promise.reject(onlyAddOneLineAlertMessage);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
var rowIndex = 0;
|
|
145
|
+
var nextList = cloneDeep(list);
|
|
146
|
+
if (insertType === 'before') {
|
|
147
|
+
handleMulResetForm();
|
|
148
|
+
nextList.unshift(_objectSpread(_objectSpread({}, rowData), {}, {
|
|
149
|
+
editable: true,
|
|
150
|
+
isFirst: true,
|
|
151
|
+
rowKey: "&&".concat(getRandom())
|
|
152
|
+
}));
|
|
153
|
+
} else if (insertType === 'after') {
|
|
154
|
+
nextList.push(_objectSpread(_objectSpread({}, rowData), {}, {
|
|
155
|
+
editable: true,
|
|
156
|
+
isFirst: true,
|
|
157
|
+
rowKey: "&&".concat(getRandom())
|
|
158
|
+
}));
|
|
159
|
+
rowIndex = list.length;
|
|
160
|
+
}
|
|
161
|
+
setDataSource ? setDataSource(nextList) : setList(_toConsumableArray(nextList));
|
|
162
|
+
return Promise.resolve({
|
|
163
|
+
rowIndex: rowIndex,
|
|
164
|
+
nextList: nextList,
|
|
165
|
+
list: formatList(nextList),
|
|
166
|
+
rowData: nextList[rowIndex]
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* 删除多行
|
|
171
|
+
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
172
|
+
*/
|
|
173
|
+
var onMultipleDelete = /*#__PURE__*/function () {
|
|
174
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
175
|
+
var res, values, nextList, resetFieldsIndex;
|
|
176
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
177
|
+
while (1) switch (_context.prev = _context.next) {
|
|
178
|
+
case 0:
|
|
179
|
+
if (!(addButtonProps === null || addButtonProps === void 0 ? void 0 : addButtonProps.onMultipleDelete)) {
|
|
180
|
+
_context.next = 6;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
_context.next = 3;
|
|
184
|
+
return addButtonProps.onMultipleDelete(selectedRowKeys, selectedRows);
|
|
185
|
+
case 3:
|
|
186
|
+
_context.t0 = _context.sent;
|
|
187
|
+
_context.next = 7;
|
|
188
|
+
break;
|
|
189
|
+
case 6:
|
|
190
|
+
_context.t0 = true;
|
|
191
|
+
case 7:
|
|
192
|
+
res = _context.t0;
|
|
193
|
+
if (!res) {
|
|
194
|
+
_context.next = 20;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
values = cloneDeep(form.getFieldsValue(true));
|
|
198
|
+
nextList = cloneDeep(list);
|
|
199
|
+
nextList = nextList.filter(function (item) {
|
|
200
|
+
return !selectedRowKeys.includes(getRowKey(item));
|
|
201
|
+
});
|
|
202
|
+
resetFieldsIndex = [];
|
|
203
|
+
Object.keys(values).forEach(function (key) {
|
|
204
|
+
// eslint-disable-next-line no-restricted-globals
|
|
205
|
+
if (!isNaN(Number(key))) {
|
|
206
|
+
resetFieldsIndex.push(key);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
setSelectedRows([]);
|
|
210
|
+
setSelectedRowKeys([]);
|
|
211
|
+
// 清空删除后最后一条formItem状态
|
|
212
|
+
form.resetFields(resetFieldsIndex);
|
|
213
|
+
nextList.forEach(function (item, index) {
|
|
214
|
+
// 可编辑状态默认给表单回填数据
|
|
215
|
+
if (item.editable) {
|
|
216
|
+
form.setFieldsValue(_defineProperty({}, index, item));
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
setDataSource ? setDataSource(nextList) : setList(_toConsumableArray(nextList));
|
|
220
|
+
return _context.abrupt("return", Promise.resolve({
|
|
221
|
+
rowIndex: 0,
|
|
222
|
+
nextList: nextList,
|
|
223
|
+
list: formatList(nextList),
|
|
224
|
+
rowData: nextList[0]
|
|
225
|
+
}));
|
|
226
|
+
case 20:
|
|
227
|
+
case "end":
|
|
228
|
+
return _context.stop();
|
|
229
|
+
}
|
|
230
|
+
}, _callee);
|
|
231
|
+
}));
|
|
232
|
+
return function onMultipleDelete() {
|
|
233
|
+
return _ref2.apply(this, arguments);
|
|
234
|
+
};
|
|
235
|
+
}();
|
|
236
|
+
/**
|
|
237
|
+
* 删除行
|
|
238
|
+
* @param {number} rowIndex 当前删除行的下标
|
|
239
|
+
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
240
|
+
*/
|
|
241
|
+
var onDelete = function onDelete(rowIndex) {
|
|
242
|
+
var values = cloneDeep(form.getFieldsValue(true));
|
|
243
|
+
var lastIndex = list.length - 1;
|
|
244
|
+
form.resetFields([rowIndex]);
|
|
245
|
+
var nextList = cloneDeep(list);
|
|
246
|
+
setSelectedRows(selectedRows.filter(function (item) {
|
|
247
|
+
var _nextList$rowIndex;
|
|
248
|
+
return item.rowKey !== ((_nextList$rowIndex = nextList[rowIndex]) === null || _nextList$rowIndex === void 0 ? void 0 : _nextList$rowIndex.rowKey);
|
|
249
|
+
}));
|
|
250
|
+
setSelectedRowKeys(selectedRowKeys.filter(function (key) {
|
|
251
|
+
var _nextList$rowIndex2;
|
|
252
|
+
return key !== ((_nextList$rowIndex2 = nextList[rowIndex]) === null || _nextList$rowIndex2 === void 0 ? void 0 : _nextList$rowIndex2.rowKey);
|
|
253
|
+
}));
|
|
254
|
+
nextList.splice(rowIndex, 1);
|
|
255
|
+
for (var i = rowIndex; i < lastIndex; i++) {
|
|
256
|
+
var _nextList$i = nextList[i],
|
|
257
|
+
editable = _nextList$i.editable,
|
|
258
|
+
isFirst = _nextList$i.isFirst;
|
|
259
|
+
nextList[i] = _objectSpread(_objectSpread(_objectSpread({}, nextList[i]), values[i + 1]), {}, {
|
|
260
|
+
editable: editable,
|
|
261
|
+
isFirst: isFirst
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
// 清空删除后最后一条formItem状态
|
|
265
|
+
form.resetFields([lastIndex]);
|
|
266
|
+
setDataSource ? setDataSource(nextList) : setList(_toConsumableArray(nextList));
|
|
267
|
+
return Promise.resolve({
|
|
268
|
+
rowIndex: rowIndex,
|
|
269
|
+
nextList: nextList,
|
|
270
|
+
list: formatList(nextList),
|
|
271
|
+
rowData: nextList[rowIndex]
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* 保存行
|
|
276
|
+
* @param {number} rowIndex 当前保存行的下标
|
|
277
|
+
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
278
|
+
*/
|
|
279
|
+
var onSave = /*#__PURE__*/function () {
|
|
280
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(rowIndex, callback) {
|
|
281
|
+
var _form$getFieldsValue$, _form$getFieldsValue, nextValues, res, values;
|
|
282
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
283
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
284
|
+
case 0:
|
|
285
|
+
_context2.prev = 0;
|
|
286
|
+
nextValues = (_form$getFieldsValue$ = (_form$getFieldsValue = form.getFieldsValue()) === null || _form$getFieldsValue === void 0 ? void 0 : _form$getFieldsValue[rowIndex]) !== null && _form$getFieldsValue$ !== void 0 ? _form$getFieldsValue$ : {};
|
|
287
|
+
if (!callback) {
|
|
288
|
+
_context2.next = 8;
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
_context2.next = 5;
|
|
292
|
+
return callback({
|
|
293
|
+
preValues: originRowData[rowIndex],
|
|
294
|
+
nextValues: nextValues
|
|
295
|
+
});
|
|
296
|
+
case 5:
|
|
297
|
+
_context2.t0 = _context2.sent;
|
|
298
|
+
_context2.next = 9;
|
|
299
|
+
break;
|
|
300
|
+
case 8:
|
|
301
|
+
_context2.t0 = true;
|
|
302
|
+
case 9:
|
|
303
|
+
res = _context2.t0;
|
|
304
|
+
if (!res) {
|
|
305
|
+
_context2.next = 15;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
_context2.next = 13;
|
|
309
|
+
return form.validateFields();
|
|
310
|
+
case 13:
|
|
311
|
+
values = _context2.sent;
|
|
312
|
+
return _context2.abrupt("return", onUpdateRowData(rowIndex, _objectSpread({
|
|
313
|
+
editable: false,
|
|
314
|
+
isFirst: false
|
|
315
|
+
}, values[rowIndex])));
|
|
316
|
+
case 15:
|
|
317
|
+
_context2.next = 20;
|
|
318
|
+
break;
|
|
319
|
+
case 17:
|
|
320
|
+
_context2.prev = 17;
|
|
321
|
+
_context2.t1 = _context2["catch"](0);
|
|
322
|
+
console.warn(_context2.t1);
|
|
323
|
+
case 20:
|
|
324
|
+
case "end":
|
|
325
|
+
return _context2.stop();
|
|
326
|
+
}
|
|
327
|
+
}, _callee2, null, [[0, 17]]);
|
|
328
|
+
}));
|
|
329
|
+
return function onSave(_x, _x2) {
|
|
330
|
+
return _ref3.apply(this, arguments);
|
|
331
|
+
};
|
|
332
|
+
}();
|
|
333
|
+
/**
|
|
334
|
+
* 编辑行
|
|
335
|
+
* @param {number}} rowIndex 当前保存行的下标
|
|
336
|
+
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
337
|
+
*/
|
|
338
|
+
var onEdit = function onEdit(rowIndex) {
|
|
339
|
+
if (isSingle) {
|
|
340
|
+
var _list$filter2;
|
|
341
|
+
var isOneEditing = ((_list$filter2 = list.filter(function (item) {
|
|
342
|
+
return item.editable;
|
|
343
|
+
})) === null || _list$filter2 === void 0 ? void 0 : _list$filter2.length) >= 1;
|
|
344
|
+
if (isOneEditing) {
|
|
345
|
+
_message.warning(onlyOneLineEditorAlertMessage);
|
|
346
|
+
return Promise.reject(onlyOneLineEditorAlertMessage);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
setOriginRowData(_defineProperty({}, rowIndex, list[rowIndex]));
|
|
350
|
+
form.setFieldsValue(_defineProperty({}, rowIndex, list[rowIndex]));
|
|
351
|
+
return onUpdateRowData(rowIndex, {
|
|
352
|
+
editable: true,
|
|
353
|
+
isFirst: false
|
|
354
|
+
});
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* 取消行
|
|
358
|
+
* 第一次新增删除当前行 当点过编辑或者保存后,重置isFirst为false
|
|
359
|
+
* @param {IRowDataPropsType} rowData 原始行数据
|
|
360
|
+
* @param {number}} rowIndex 当前保存行的下标
|
|
361
|
+
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
362
|
+
*/
|
|
363
|
+
var onCancel = function onCancel(rowData, rowIndex) {
|
|
364
|
+
if (rowData.isFirst) {
|
|
365
|
+
return onDelete(rowIndex);
|
|
366
|
+
}
|
|
367
|
+
return onUpdateRowData(rowIndex, _objectSpread({
|
|
368
|
+
editable: false,
|
|
369
|
+
isFirst: false
|
|
370
|
+
}, originRowData[rowIndex]));
|
|
371
|
+
};
|
|
372
|
+
// 渲染新增按钮
|
|
373
|
+
var renderAddButton = function renderAddButton() {
|
|
374
|
+
if (disabled || list.length === 0 || isCanAdd === false) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, buttonText !== false ? /*#__PURE__*/React.createElement(React.Fragment, null, typeof buttonText === 'string' ? /*#__PURE__*/React.createElement(_Space, {
|
|
378
|
+
style: {
|
|
379
|
+
display: 'flex',
|
|
380
|
+
justifyContent: ['topLeft', 'bottomLeft'].includes(position) ? 'flex-start' : 'flex-end',
|
|
381
|
+
margin: ['topLeft', 'topRight'].includes(position) ? '0 0 16px 0' : '16px 0 0 0'
|
|
382
|
+
}
|
|
383
|
+
}, isCanMultipleDelete ? /*#__PURE__*/React.createElement(_Popconfirm, {
|
|
384
|
+
placement: "top",
|
|
385
|
+
title: mulDeletePoconfirmMsg,
|
|
386
|
+
onConfirm: onMultipleDelete,
|
|
387
|
+
okText: "\u786E\u5B9A",
|
|
388
|
+
cancelText: "\u53D6\u6D88",
|
|
389
|
+
disabled: !(selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length)
|
|
390
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
|
391
|
+
disabled: !(selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length),
|
|
392
|
+
type: "link"
|
|
393
|
+
}, "\u5220\u9664")) : null, /*#__PURE__*/React.createElement(_Button, _objectSpread({
|
|
394
|
+
type: "link",
|
|
395
|
+
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
396
|
+
onClick: function onClick() {
|
|
397
|
+
onAdd();
|
|
398
|
+
}
|
|
399
|
+
}, antButtonProps), buttonText)) : /*#__PURE__*/cloneElement(buttonText, antButtonProps)) : null);
|
|
400
|
+
};
|
|
401
|
+
var validateFields = /*#__PURE__*/function () {
|
|
402
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
403
|
+
var values, nextValues, nextList, isEditing;
|
|
404
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
405
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
406
|
+
case 0:
|
|
407
|
+
_context3.next = 2;
|
|
408
|
+
return form.validateFields();
|
|
409
|
+
case 2:
|
|
410
|
+
values = _context3.sent;
|
|
411
|
+
nextValues = {};
|
|
412
|
+
nextList = [];
|
|
413
|
+
Object.keys(values).forEach(function (key) {
|
|
414
|
+
if (Number.isNaN(Number(key))) {
|
|
415
|
+
nextValues[key] = values[key];
|
|
416
|
+
} else {
|
|
417
|
+
nextList.push(values[key]);
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
nextValues[name] = nextList;
|
|
421
|
+
isEditing = list.find(function (item) {
|
|
422
|
+
return item.editable;
|
|
423
|
+
});
|
|
424
|
+
if (!(isSingle && isEditing)) {
|
|
425
|
+
_context3.next = 11;
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
_message.warning(noSaveAlertMessage);
|
|
429
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
430
|
+
return _context3.abrupt("return", Promise.reject('请保存当前行数据'));
|
|
431
|
+
case 11:
|
|
432
|
+
return _context3.abrupt("return", Promise.resolve(nextValues));
|
|
433
|
+
case 12:
|
|
434
|
+
case "end":
|
|
435
|
+
return _context3.stop();
|
|
436
|
+
}
|
|
437
|
+
}, _callee3);
|
|
438
|
+
}));
|
|
439
|
+
return function validateFields() {
|
|
440
|
+
return _ref4.apply(this, arguments);
|
|
441
|
+
};
|
|
442
|
+
}();
|
|
443
|
+
var newColumns = useMemo(function () {
|
|
444
|
+
return transformColumns(columns, form, disabled);
|
|
445
|
+
}, [columns, form, disabled]);
|
|
446
|
+
useImperativeHandle(actionRef, function () {
|
|
447
|
+
return {
|
|
448
|
+
/** 暴露出当前table节点 * */
|
|
449
|
+
tableNode: tableRef.current,
|
|
450
|
+
data: list,
|
|
451
|
+
getPureDataSource: function getPureDataSource() {
|
|
452
|
+
return formatList(list);
|
|
453
|
+
},
|
|
454
|
+
selectedRows: selectedRows,
|
|
455
|
+
selectedRowKeys: selectedRowKeys,
|
|
456
|
+
setSelectedRowKeys: setSelectedRowKeys,
|
|
457
|
+
setSelectedRows: setSelectedRows,
|
|
458
|
+
onUpdateRowData: onUpdateRowData,
|
|
459
|
+
onMultipleDelete: onMultipleDelete,
|
|
460
|
+
onAdd: onAdd,
|
|
461
|
+
onDelete: onDelete,
|
|
462
|
+
onEdit: onEdit,
|
|
463
|
+
onSave: onSave,
|
|
464
|
+
onCancel: onCancel,
|
|
465
|
+
validateFields: validateFields,
|
|
466
|
+
setDataSource: setList
|
|
467
|
+
};
|
|
468
|
+
});
|
|
469
|
+
// 实时同步外部dataSource (useDeepCompareEffect无法察觉dataSource的变更)
|
|
470
|
+
useDeepCompareEffect(function () {
|
|
471
|
+
var nextList = [];
|
|
472
|
+
if (dataSource.length) {
|
|
473
|
+
dataSource.forEach(function (item, index) {
|
|
474
|
+
var key = getRowKey(item) || "&&".concat(getRandom());
|
|
475
|
+
var innerItem = list.find(function (child) {
|
|
476
|
+
return getRowKey(child) === key;
|
|
477
|
+
});
|
|
478
|
+
var nextItem = innerItem ? _objectSpread(_objectSpread(_objectSpread({
|
|
479
|
+
editable: !isSingle
|
|
480
|
+
}, innerItem), item), {}, {
|
|
481
|
+
rowKey: key
|
|
482
|
+
}) : _objectSpread(_objectSpread({
|
|
483
|
+
editable: !isSingle
|
|
484
|
+
}, item), {}, {
|
|
485
|
+
rowKey: key
|
|
486
|
+
});
|
|
487
|
+
nextList.push(nextItem);
|
|
488
|
+
});
|
|
489
|
+
setList(nextList);
|
|
490
|
+
} else {
|
|
491
|
+
setList([]);
|
|
492
|
+
}
|
|
493
|
+
}, [dataSource]);
|
|
494
|
+
useDeepCompareEffect(function () {
|
|
495
|
+
try {
|
|
496
|
+
if (list === null || list === void 0 ? void 0 : list.length) {
|
|
497
|
+
list.forEach(function (item, index) {
|
|
498
|
+
// 可编辑状态默认给表单回填数据
|
|
499
|
+
if (item.editable) {
|
|
500
|
+
form.setFieldsValue(_defineProperty({}, index, item));
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
} catch (error) {
|
|
505
|
+
console.error('error', error);
|
|
506
|
+
}
|
|
507
|
+
}, [list]);
|
|
508
|
+
var empty = function empty() {
|
|
509
|
+
return (
|
|
510
|
+
/*#__PURE__*/
|
|
511
|
+
// 这里面就是我们自己定义的空状态
|
|
512
|
+
React.createElement("div", {
|
|
513
|
+
className: "com-empty"
|
|
514
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
515
|
+
className: "empty-img",
|
|
516
|
+
src: Empty
|
|
517
|
+
}), !disabled && isCanAdd ? /*#__PURE__*/React.createElement("div", {
|
|
518
|
+
className: "empty-text"
|
|
519
|
+
}, "\u6682\u65E0\u6570\u636E\uFF0C", /*#__PURE__*/React.createElement(_Button, _objectSpread({
|
|
520
|
+
type: "link",
|
|
521
|
+
onClick: function onClick() {
|
|
522
|
+
onAdd();
|
|
523
|
+
}
|
|
524
|
+
}, antButtonProps), emptyButtonText)) : /*#__PURE__*/React.createElement("p", null, "\u6682\u65E0\u6570\u636E"))
|
|
525
|
+
);
|
|
526
|
+
};
|
|
527
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, ['topLeft', 'topRight'].includes(position) && renderAddButton(), /*#__PURE__*/React.createElement(_Form, _objectSpread({
|
|
528
|
+
form: form,
|
|
529
|
+
className: "proEditable pro-editable"
|
|
530
|
+
}, formProps), name ? /*#__PURE__*/React.createElement(_Form.Item, {
|
|
531
|
+
name: name
|
|
532
|
+
}, /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
533
|
+
renderEmpty: (list === null || list === void 0 ? void 0 : list.length) ? undefined : empty
|
|
534
|
+
}, /*#__PURE__*/React.createElement(_Table, _objectSpread(_objectSpread({
|
|
535
|
+
dataSource: list,
|
|
536
|
+
columns: newColumns,
|
|
537
|
+
pagination: pagination,
|
|
538
|
+
rowSelection: isCanMultipleDelete && !disabled ? rowSelection : undefined,
|
|
539
|
+
ref: function ref(node) {
|
|
540
|
+
return tableRef.current = node;
|
|
541
|
+
}
|
|
542
|
+
}, otherProps), {}, {
|
|
543
|
+
rowKey: getRowKey
|
|
544
|
+
})))) : /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
545
|
+
renderEmpty: (list === null || list === void 0 ? void 0 : list.length) ? undefined : empty
|
|
546
|
+
}, /*#__PURE__*/React.createElement(_Table, _objectSpread(_objectSpread({
|
|
547
|
+
dataSource: list,
|
|
548
|
+
columns: newColumns,
|
|
549
|
+
pagination: pagination,
|
|
550
|
+
rowSelection: isCanMultipleDelete && !disabled ? rowSelection : undefined,
|
|
551
|
+
ref: function ref(node) {
|
|
552
|
+
return tableRef.current = node;
|
|
553
|
+
}
|
|
554
|
+
}, otherProps), {}, {
|
|
555
|
+
rowKey: getRowKey
|
|
556
|
+
})))), ['bottomLeft', 'bottomRight'].includes(position) && renderAddButton());
|
|
557
|
+
});
|
|
558
|
+
ProEditableTable.defaultProps = {
|
|
559
|
+
dataSource: [],
|
|
560
|
+
columns: [],
|
|
561
|
+
editType: 'single',
|
|
562
|
+
pagination: false,
|
|
563
|
+
onlyOneLineEditorAlertMessage: '只能同时编辑一行',
|
|
564
|
+
noSaveAlertMessage: '请保存当前行数据',
|
|
565
|
+
mulDeletePoconfirmMsg: '您确定要删除吗?',
|
|
566
|
+
addButtonProps: {},
|
|
567
|
+
disabled: false,
|
|
568
|
+
formProps: {
|
|
569
|
+
preserve: false
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
export default ProEditableTable;
|