@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,136 @@
|
|
|
1
|
+
import "antd/es/space/style";
|
|
2
|
+
import _Space from "antd/es/space";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
8
|
+
var _excluded = ["type", "label", "show", "onHandle", "onClick"];
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { actions, defaultBtnNameMap, defaultToolbarKeys } from '../../utils/config';
|
|
11
|
+
import ActionButton from '../ActionButton';
|
|
12
|
+
import { getNamePath } from '../../utils/tools';
|
|
13
|
+
// 渲染工具栏
|
|
14
|
+
var RenderToolbar = function RenderToolbar(config) {
|
|
15
|
+
var emptyBtnText = config.emptyBtnText,
|
|
16
|
+
toolbarProps = config.toolbarProps,
|
|
17
|
+
name = config.name,
|
|
18
|
+
virtualKey = config.virtualKey,
|
|
19
|
+
form = config.form,
|
|
20
|
+
disabled = config.disabled,
|
|
21
|
+
selectedRowKeys = config.selectedRowKeys,
|
|
22
|
+
selectedRows = config.selectedRows;
|
|
23
|
+
var virtualName = getNamePath(name, virtualKey);
|
|
24
|
+
var dataSource = form.getFieldValue(name);
|
|
25
|
+
// toolbarProps配置为false 默认不插入
|
|
26
|
+
if (toolbarProps === false || disabled) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
var nextToolbarProps = _toConsumableArray(toolbarProps);
|
|
30
|
+
if (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) {
|
|
31
|
+
// 不设置toolbarProps
|
|
32
|
+
if (!(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.length)) {
|
|
33
|
+
nextToolbarProps = defaultToolbarKeys.map(function (key) {
|
|
34
|
+
return {
|
|
35
|
+
type: key
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
// 部分设置toolbarProps
|
|
40
|
+
defaultToolbarKeys.forEach(function (key) {
|
|
41
|
+
if (!toolbarProps.find(function (action) {
|
|
42
|
+
return action.type === key;
|
|
43
|
+
})) {
|
|
44
|
+
nextToolbarProps.push({
|
|
45
|
+
type: key
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
var addConfig = toolbarProps.find(function (action) {
|
|
52
|
+
return action.type === 'add';
|
|
53
|
+
});
|
|
54
|
+
nextToolbarProps = [_objectSpread(_objectSpread({}, addConfig), {}, {
|
|
55
|
+
type: 'add',
|
|
56
|
+
label: emptyBtnText,
|
|
57
|
+
icon: null
|
|
58
|
+
})];
|
|
59
|
+
}
|
|
60
|
+
// 渲染操作按钮前处理下默认数据
|
|
61
|
+
var toolbarBtns = nextToolbarProps.map(function (toolbar) {
|
|
62
|
+
var type = toolbar.type,
|
|
63
|
+
label = toolbar.label,
|
|
64
|
+
show = toolbar.show,
|
|
65
|
+
onHandle = toolbar.onHandle,
|
|
66
|
+
onClick = toolbar.onClick,
|
|
67
|
+
buttonProps = _objectWithoutProperties(toolbar, _excluded);
|
|
68
|
+
toolbar.isEditable = false;
|
|
69
|
+
toolbar.label = label !== null && label !== void 0 ? label : defaultBtnNameMap[type];
|
|
70
|
+
toolbar.show = show !== null && show !== void 0 ? show : true;
|
|
71
|
+
toolbar.onClick = /*#__PURE__*/function () {
|
|
72
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, index) {
|
|
73
|
+
var _yield$toolbar$onHand, _toolbar$onHandle;
|
|
74
|
+
var result;
|
|
75
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
|
+
while (1) switch (_context.prev = _context.next) {
|
|
77
|
+
case 0:
|
|
78
|
+
_context.next = 2;
|
|
79
|
+
return toolbar === null || toolbar === void 0 ? void 0 : (_toolbar$onHandle = toolbar.onHandle) === null || _toolbar$onHandle === void 0 ? void 0 : _toolbar$onHandle.call(toolbar, selectedRows, dataSource);
|
|
80
|
+
case 2:
|
|
81
|
+
_context.t1 = _yield$toolbar$onHand = _context.sent;
|
|
82
|
+
_context.t0 = _context.t1 !== null;
|
|
83
|
+
if (!_context.t0) {
|
|
84
|
+
_context.next = 6;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
_context.t0 = _yield$toolbar$onHand !== void 0;
|
|
88
|
+
case 6:
|
|
89
|
+
if (!_context.t0) {
|
|
90
|
+
_context.next = 10;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
_context.t2 = _yield$toolbar$onHand;
|
|
94
|
+
_context.next = 11;
|
|
95
|
+
break;
|
|
96
|
+
case 10:
|
|
97
|
+
_context.t2 = true;
|
|
98
|
+
case 11:
|
|
99
|
+
result = _context.t2;
|
|
100
|
+
if (result && type !== 'custom') {
|
|
101
|
+
actions[type](_objectSpread(_objectSpread({}, config), {}, {
|
|
102
|
+
index: index,
|
|
103
|
+
record: record,
|
|
104
|
+
name: name,
|
|
105
|
+
result: result,
|
|
106
|
+
virtualName: virtualName
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
case 13:
|
|
110
|
+
case "end":
|
|
111
|
+
return _context.stop();
|
|
112
|
+
}
|
|
113
|
+
}, _callee);
|
|
114
|
+
}));
|
|
115
|
+
return function (_x, _x2) {
|
|
116
|
+
return _ref.apply(this, arguments);
|
|
117
|
+
};
|
|
118
|
+
}();
|
|
119
|
+
toolbar.buttonProps = buttonProps;
|
|
120
|
+
return toolbar;
|
|
121
|
+
});
|
|
122
|
+
var renderToolbarBtns = function renderToolbarBtns() {
|
|
123
|
+
return toolbarBtns.map(function (btnConfig) {
|
|
124
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
125
|
+
key: "".concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.label).concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.type)
|
|
126
|
+
}, /*#__PURE__*/React.createElement(ActionButton, _objectSpread({}, {
|
|
127
|
+
config: config,
|
|
128
|
+
btnConfig: _objectSpread(_objectSpread({}, btnConfig), {}, {
|
|
129
|
+
editingKeys: []
|
|
130
|
+
})
|
|
131
|
+
})));
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) ? /*#__PURE__*/React.createElement(_Space, null, renderToolbarBtns()) : renderToolbarBtns());
|
|
135
|
+
};
|
|
136
|
+
export default RenderToolbar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SummaryColumnProps } from '../../propsType';
|
|
2
|
+
interface SummaryProps<T = any> {
|
|
3
|
+
data: T[];
|
|
4
|
+
summary: {
|
|
5
|
+
columns: SummaryColumnProps[];
|
|
6
|
+
total?: boolean;
|
|
7
|
+
fixed?: boolean | 'top' | 'bottom';
|
|
8
|
+
};
|
|
9
|
+
rowSelection: any;
|
|
10
|
+
}
|
|
11
|
+
declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) => JSX.Element;
|
|
12
|
+
export default Summary;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import "antd/es/space/style";
|
|
2
|
+
import _Space from "antd/es/space";
|
|
3
|
+
import "antd/es/table/style";
|
|
4
|
+
import _Table from "antd/es/table";
|
|
5
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { tools } from '@zat-design-pro-component/utils';
|
|
8
|
+
import { valueTypeRender } from '../../../ProUtils/utils';
|
|
9
|
+
var calc = tools.calc;
|
|
10
|
+
var formatSummaryColumns = function formatSummaryColumns(columns, _ref) {
|
|
11
|
+
var rowSelection = _ref.rowSelection;
|
|
12
|
+
var nextColumns = _toConsumableArray(columns);
|
|
13
|
+
if (!rowSelection) {
|
|
14
|
+
nextColumns.forEach(function (column) {
|
|
15
|
+
var _column$index;
|
|
16
|
+
column.index = calc((_column$index = column.index) !== null && _column$index !== void 0 ? _column$index : 0, '-', 1);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var _ref2 = (nextColumns === null || nextColumns === void 0 ? void 0 : nextColumns[0]) || {},
|
|
20
|
+
firstIndex = _ref2.index;
|
|
21
|
+
if (firstIndex !== 0) {
|
|
22
|
+
var colSpan = calc(firstIndex !== null && firstIndex !== void 0 ? firstIndex : 0, '-', 1);
|
|
23
|
+
nextColumns.unshift({
|
|
24
|
+
index: 0,
|
|
25
|
+
colSpan: colSpan === 0 ? undefined : colSpan
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return nextColumns;
|
|
29
|
+
};
|
|
30
|
+
var Summary = function Summary(_ref3) {
|
|
31
|
+
var data = _ref3.data,
|
|
32
|
+
summary = _ref3.summary,
|
|
33
|
+
rowSelection = _ref3.rowSelection;
|
|
34
|
+
var _ref4 = summary || {},
|
|
35
|
+
columns = _ref4.columns,
|
|
36
|
+
_ref4$total = _ref4.total,
|
|
37
|
+
total = _ref4$total === void 0 ? true : _ref4$total,
|
|
38
|
+
_ref4$fixed = _ref4.fixed,
|
|
39
|
+
fixed = _ref4$fixed === void 0 ? true : _ref4$fixed;
|
|
40
|
+
var nextColumns = formatSummaryColumns(columns, {
|
|
41
|
+
rowSelection: rowSelection
|
|
42
|
+
});
|
|
43
|
+
var renderCell = function renderCell(item) {
|
|
44
|
+
var key = item.key,
|
|
45
|
+
title = item.title,
|
|
46
|
+
precision = item.precision,
|
|
47
|
+
valueType = item.valueType;
|
|
48
|
+
if (title) {
|
|
49
|
+
return title;
|
|
50
|
+
}
|
|
51
|
+
if (total && key) {
|
|
52
|
+
var _data$reduce;
|
|
53
|
+
var format = valueTypeRender === null || valueTypeRender === void 0 ? void 0 : valueTypeRender[valueType];
|
|
54
|
+
var sum = data === null || data === void 0 ? void 0 : (_data$reduce = data.reduce) === null || _data$reduce === void 0 ? void 0 : _data$reduce.call(data, function (pre, cur) {
|
|
55
|
+
var _cur$key;
|
|
56
|
+
return calc(pre, '+', (_cur$key = cur[key]) !== null && _cur$key !== void 0 ? _cur$key : 0);
|
|
57
|
+
}, 0);
|
|
58
|
+
return format ? format(sum, precision !== null && precision !== void 0 ? precision : 2) : sum;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
};
|
|
62
|
+
// 当编辑列表没有数据时,不展示底部合计栏
|
|
63
|
+
if (!(data === null || data === void 0 ? void 0 : data.length)) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return /*#__PURE__*/React.createElement(_Table.Summary, {
|
|
67
|
+
fixed: fixed
|
|
68
|
+
}, /*#__PURE__*/React.createElement(_Table.Summary.Row, null, nextColumns.map(function (item) {
|
|
69
|
+
var index = item.index,
|
|
70
|
+
colSpan = item.colSpan,
|
|
71
|
+
prefix = item.prefix;
|
|
72
|
+
return /*#__PURE__*/React.createElement(_Table.Summary.Cell, {
|
|
73
|
+
key: index,
|
|
74
|
+
index: index,
|
|
75
|
+
colSpan: colSpan
|
|
76
|
+
}, /*#__PURE__*/React.createElement(_Space, null, prefix, /*#__PURE__*/React.createElement("span", null, renderCell(item))));
|
|
77
|
+
})));
|
|
78
|
+
};
|
|
79
|
+
export default Summary;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NamePath } from 'antd/lib/form/interface';
|
|
3
|
+
interface ValidatorProps {
|
|
4
|
+
name?: NamePath;
|
|
5
|
+
virtualKey?: string;
|
|
6
|
+
editingKeys?: string[];
|
|
7
|
+
onlyOneLineMsg?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.NamedExoticComponent<ValidatorProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "antd/es/message/style";
|
|
2
|
+
import _message from "antd/es/message";
|
|
3
|
+
import "antd/es/form/style";
|
|
4
|
+
import _Form from "antd/es/form";
|
|
5
|
+
import React, { memo } from 'react';
|
|
6
|
+
var Validator = function Validator(_ref) {
|
|
7
|
+
var name = _ref.name,
|
|
8
|
+
virtualKey = _ref.virtualKey,
|
|
9
|
+
editingKeys = _ref.editingKeys,
|
|
10
|
+
onlyOneLineMsg = _ref.onlyOneLineMsg;
|
|
11
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, name && virtualKey ? /*#__PURE__*/React.createElement(_Form.Item, {
|
|
12
|
+
noStyle: true,
|
|
13
|
+
validateFirst: true,
|
|
14
|
+
name: "".concat(name, "-").concat(virtualKey),
|
|
15
|
+
rules: [{
|
|
16
|
+
// 单行编辑下,校验当前数据是否已保存
|
|
17
|
+
validator: function validator() {
|
|
18
|
+
if (editingKeys === null || editingKeys === void 0 ? void 0 : editingKeys.length) {
|
|
19
|
+
_message.warning(onlyOneLineMsg);
|
|
20
|
+
return Promise.reject();
|
|
21
|
+
}
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
}
|
|
24
|
+
}]
|
|
25
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null)) : null);
|
|
26
|
+
};
|
|
27
|
+
export default /*#__PURE__*/memo(Validator);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as DndWrapper, Row } from './DndWrapper';
|
|
2
|
+
export { default as RenderField } from './RenderField';
|
|
3
|
+
export { default as Validator } from './Validator';
|
|
4
|
+
export { default as Summary } from './Summary';
|
|
5
|
+
export { default as RenderToolbar } from './RenderToolbar';
|
|
6
|
+
export { default as ActionButton } from './ActionButton';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as DndWrapper, Row } from './DndWrapper';
|
|
2
|
+
export { default as RenderField } from './RenderField';
|
|
3
|
+
export { default as Validator } from './Validator';
|
|
4
|
+
export { default as Summary } from './Summary';
|
|
5
|
+
export { default as RenderToolbar } from './RenderToolbar';
|
|
6
|
+
export { default as ActionButton } from './ActionButton';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProEditTableProps, ProEditTableRefProps } from './propsType';
|
|
3
|
+
declare const ForwardProEditTable: React.ForwardRefExoticComponent<ProEditTableProps<any> & React.RefAttributes<ProEditTableRefProps>>;
|
|
4
|
+
export default ForwardProEditTable;
|
|
@@ -0,0 +1,272 @@
|
|
|
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 _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
7
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
8
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
9
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
10
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
11
|
+
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary"];
|
|
12
|
+
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
|
|
13
|
+
import { isArray } from 'lodash';
|
|
14
|
+
import { useDebounceEffect, useSetState } from 'ahooks';
|
|
15
|
+
import classnames from 'classnames';
|
|
16
|
+
import { transformColumns } from './utils';
|
|
17
|
+
import { getRandom } from './utils/tools';
|
|
18
|
+
import { DndWrapper, Row, Validator, Summary, RenderToolbar } from './components';
|
|
19
|
+
import Empty from '../assets/empty.png';
|
|
20
|
+
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
21
|
+
var _value$2;
|
|
22
|
+
var value = _ref.value,
|
|
23
|
+
onChange = _ref.onChange,
|
|
24
|
+
className = _ref.className,
|
|
25
|
+
columns = _ref.columns,
|
|
26
|
+
type = _ref.type,
|
|
27
|
+
mode = _ref.mode,
|
|
28
|
+
draggable = _ref.draggable,
|
|
29
|
+
disabled = _ref.disabled,
|
|
30
|
+
insertType = _ref.insertType,
|
|
31
|
+
emptyBtnText = _ref.emptyBtnText,
|
|
32
|
+
actionWidth = _ref.actionWidth,
|
|
33
|
+
actionProps = _ref.actionProps,
|
|
34
|
+
toolbarProps = _ref.toolbarProps,
|
|
35
|
+
rowSelection = _ref.rowSelection,
|
|
36
|
+
onlyOneLineMsg = _ref.onlyOneLineMsg,
|
|
37
|
+
deletePoConfirmMsg = _ref.deletePoConfirmMsg,
|
|
38
|
+
mulDeletePoConfirmMsg = _ref.mulDeletePoConfirmMsg,
|
|
39
|
+
_ref$otherProps = _ref.otherProps,
|
|
40
|
+
otherProps = _ref$otherProps === void 0 ? {} : _ref$otherProps,
|
|
41
|
+
requiredAlign = _ref.requiredAlign,
|
|
42
|
+
summary = _ref.summary,
|
|
43
|
+
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
44
|
+
var form = (otherProps === null || otherProps === void 0 ? void 0 : otherProps.form) || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.form);
|
|
45
|
+
var name = (otherProps === null || otherProps === void 0 ? void 0 : otherProps.name) || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.name);
|
|
46
|
+
var _otherProps$isView = otherProps.isView,
|
|
47
|
+
isView = _otherProps$isView === void 0 ? false : _otherProps$isView,
|
|
48
|
+
viewEmpty = otherProps.viewEmpty;
|
|
49
|
+
disabled = (otherProps === null || otherProps === void 0 ? void 0 : otherProps.disabled) || disabled;
|
|
50
|
+
var _useSetState = useSetState({
|
|
51
|
+
_columns: columns,
|
|
52
|
+
cellNamePath: [],
|
|
53
|
+
forceUpdate: {},
|
|
54
|
+
editingKeys: [],
|
|
55
|
+
selectedRowKeys: [],
|
|
56
|
+
selectedRows: [],
|
|
57
|
+
virtualKey: type === 'single' || mode === 'single' ? getRandom() : '' // 单行编辑生成个随机formItem的key
|
|
58
|
+
}),
|
|
59
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
60
|
+
state = _useSetState2[0],
|
|
61
|
+
setState = _useSetState2[1];
|
|
62
|
+
var _columns = state._columns,
|
|
63
|
+
cellNamePath = state.cellNamePath,
|
|
64
|
+
forceUpdate = state.forceUpdate,
|
|
65
|
+
editingKeys = state.editingKeys,
|
|
66
|
+
virtualKey = state.virtualKey,
|
|
67
|
+
selectedRowKeys = state.selectedRowKeys,
|
|
68
|
+
selectedRows = state.selectedRows;
|
|
69
|
+
var cacheMap = useRef({});
|
|
70
|
+
// 样式处理
|
|
71
|
+
var _className = classnames({
|
|
72
|
+
'pro-edit-table': true,
|
|
73
|
+
'pro-edit-table-drag': draggable,
|
|
74
|
+
className: className
|
|
75
|
+
});
|
|
76
|
+
// 编辑行设置下样式
|
|
77
|
+
var _rowClassName = function _rowClassName(record) {
|
|
78
|
+
return !virtualKey || editingKeys.includes(record.rowKey) ? 'is-editing' : '';
|
|
79
|
+
};
|
|
80
|
+
// 复选框
|
|
81
|
+
var _rowSelection = _objectSpread({
|
|
82
|
+
selectedRowKeys: selectedRowKeys,
|
|
83
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
84
|
+
setState({
|
|
85
|
+
selectedRowKeys: selectedRowKeys,
|
|
86
|
+
selectedRows: selectedRows
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}, rowSelection);
|
|
90
|
+
var config = {
|
|
91
|
+
form: form,
|
|
92
|
+
draggable: draggable,
|
|
93
|
+
mode: mode,
|
|
94
|
+
isView: isView,
|
|
95
|
+
viewEmpty: viewEmpty,
|
|
96
|
+
disabled: disabled,
|
|
97
|
+
cacheMap: cacheMap,
|
|
98
|
+
cellNamePath: cellNamePath,
|
|
99
|
+
forceUpdate: forceUpdate,
|
|
100
|
+
insertType: insertType,
|
|
101
|
+
emptyBtnText: emptyBtnText,
|
|
102
|
+
editingKeys: editingKeys,
|
|
103
|
+
actionWidth: actionWidth,
|
|
104
|
+
actionProps: actionProps,
|
|
105
|
+
toolbarProps: toolbarProps,
|
|
106
|
+
setState: setState,
|
|
107
|
+
selectedRowKeys: selectedRowKeys,
|
|
108
|
+
selectedRows: selectedRows,
|
|
109
|
+
onlyOneLineMsg: onlyOneLineMsg,
|
|
110
|
+
deletePoConfirmMsg: deletePoConfirmMsg,
|
|
111
|
+
mulDeletePoConfirmMsg: mulDeletePoConfirmMsg,
|
|
112
|
+
virtualKey: virtualKey,
|
|
113
|
+
requiredAlign: requiredAlign,
|
|
114
|
+
name: isArray(name) ? name : [name] // name需要处理成namePath形式,为兼容多路径
|
|
115
|
+
};
|
|
116
|
+
// 判断是否禁止添加、批量删除
|
|
117
|
+
var isForbiddenBtn = useCallback(function (type) {
|
|
118
|
+
// 当工具栏不渲染时,都不渲染
|
|
119
|
+
if (toolbarProps === false) {
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
// 通过配置项配置show 为 false 开启关闭添加与批量删除
|
|
123
|
+
if (Array.isArray(toolbarProps)) {
|
|
124
|
+
var addBtnConfig = toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.find(function (item) {
|
|
125
|
+
return item.type === type;
|
|
126
|
+
});
|
|
127
|
+
if (typeof (addBtnConfig === null || addBtnConfig === void 0 ? void 0 : addBtnConfig.show) === 'function') {
|
|
128
|
+
addBtnConfig.show = addBtnConfig.show();
|
|
129
|
+
}
|
|
130
|
+
return (addBtnConfig === null || addBtnConfig === void 0 ? void 0 : addBtnConfig.show) === false;
|
|
131
|
+
}
|
|
132
|
+
}, [toolbarProps]);
|
|
133
|
+
// 空列表状态
|
|
134
|
+
var empty = function empty() {
|
|
135
|
+
var _toolbarProps$find, _toolbarProps$find$ca;
|
|
136
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "com-empty"
|
|
138
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
139
|
+
className: "img",
|
|
140
|
+
src: Empty
|
|
141
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
className: "content"
|
|
143
|
+
}, disabled || isForbiddenBtn('add') ? '暂无数据' : /*#__PURE__*/React.createElement(React.Fragment, null, "\u6682\u65E0\u6570\u636E\uFF0C", /*#__PURE__*/React.createElement(RenderToolbar, _objectSpread({}, _objectSpread(_objectSpread({}, config), {}, {
|
|
144
|
+
toolbarProps: [{
|
|
145
|
+
type: 'add',
|
|
146
|
+
onHandle: toolbarProps === null || toolbarProps === void 0 ? void 0 : (_toolbarProps$find = toolbarProps.find) === null || _toolbarProps$find === void 0 ? void 0 : (_toolbarProps$find$ca = _toolbarProps$find.call(toolbarProps, function (item) {
|
|
147
|
+
return item.type === 'add';
|
|
148
|
+
})) === null || _toolbarProps$find$ca === void 0 ? void 0 : _toolbarProps$find$ca.onHandle
|
|
149
|
+
}],
|
|
150
|
+
dataSource: []
|
|
151
|
+
}))))));
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* 渲染表格选择器
|
|
155
|
+
* @returns rowSelection
|
|
156
|
+
*/
|
|
157
|
+
var renderRowSelection = function renderRowSelection() {
|
|
158
|
+
if (disabled || isView) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
return isForbiddenBtn('mulDelete') ? rowSelection : _rowSelection;
|
|
162
|
+
};
|
|
163
|
+
var setColumns = /*#__PURE__*/function () {
|
|
164
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
165
|
+
var nextColumns;
|
|
166
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
167
|
+
while (1) switch (_context.prev = _context.next) {
|
|
168
|
+
case 0:
|
|
169
|
+
_context.next = 2;
|
|
170
|
+
return transformColumns(columns, config, renderRowSelection());
|
|
171
|
+
case 2:
|
|
172
|
+
nextColumns = _context.sent;
|
|
173
|
+
setState({
|
|
174
|
+
_columns: nextColumns
|
|
175
|
+
});
|
|
176
|
+
case 4:
|
|
177
|
+
case "end":
|
|
178
|
+
return _context.stop();
|
|
179
|
+
}
|
|
180
|
+
}, _callee);
|
|
181
|
+
}));
|
|
182
|
+
return function setColumns() {
|
|
183
|
+
return _ref2.apply(this, arguments);
|
|
184
|
+
};
|
|
185
|
+
}();
|
|
186
|
+
useDebounceEffect(function () {
|
|
187
|
+
setColumns();
|
|
188
|
+
}, [value, cellNamePath, forceUpdate, editingKeys, disabled, actionProps, columns],
|
|
189
|
+
// columns更新修复外部表单无法控制内部表单的问题
|
|
190
|
+
{
|
|
191
|
+
wait: 60
|
|
192
|
+
});
|
|
193
|
+
useEffect(function () {
|
|
194
|
+
var _value$;
|
|
195
|
+
// 初始化默认生成rowKey
|
|
196
|
+
if ((value === null || value === void 0 ? void 0 : value.length) && !(value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey)) {
|
|
197
|
+
var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
198
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
199
|
+
rowKey: getRandom()
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
onChange(nextValues);
|
|
203
|
+
}
|
|
204
|
+
}, [value]);
|
|
205
|
+
useImperativeHandle(ref, function () {
|
|
206
|
+
return {
|
|
207
|
+
getInternalState: function getInternalState() {
|
|
208
|
+
return state;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
var _summary = _typeof(summary) === 'object' ? function (data) {
|
|
213
|
+
return /*#__PURE__*/React.createElement(Summary, {
|
|
214
|
+
data: data,
|
|
215
|
+
summary: summary,
|
|
216
|
+
rowSelection: renderRowSelection()
|
|
217
|
+
});
|
|
218
|
+
} : summary;
|
|
219
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
220
|
+
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : empty
|
|
221
|
+
}, /*#__PURE__*/React.createElement(DndWrapper, {
|
|
222
|
+
value: value,
|
|
223
|
+
onChange: onChange,
|
|
224
|
+
disabled: disabled,
|
|
225
|
+
draggable: draggable
|
|
226
|
+
}, /*#__PURE__*/React.createElement(_Table, _objectSpread(_objectSpread({
|
|
227
|
+
className: _className,
|
|
228
|
+
dataSource: (value === null || value === void 0 ? void 0 : (_value$2 = value[0]) === null || _value$2 === void 0 ? void 0 : _value$2.rowKey) ? value : undefined,
|
|
229
|
+
columns: _columns,
|
|
230
|
+
rowSelection: renderRowSelection(),
|
|
231
|
+
rowClassName: _rowClassName,
|
|
232
|
+
components: draggable ? {
|
|
233
|
+
body: {
|
|
234
|
+
row: Row
|
|
235
|
+
}
|
|
236
|
+
} : undefined,
|
|
237
|
+
onRow: function onRow() {
|
|
238
|
+
return {
|
|
239
|
+
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
240
|
+
onClick: function onClick() {}
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}, resetProps), {}, {
|
|
244
|
+
rowKey: "rowKey",
|
|
245
|
+
pagination: false,
|
|
246
|
+
summary: _summary
|
|
247
|
+
}))), !isView && (value === null || value === void 0 ? void 0 : value.length) ? /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
className: "pro-edit-table-toolbar"
|
|
249
|
+
}, /*#__PURE__*/React.createElement(RenderToolbar, _objectSpread({}, config))) : null), /*#__PURE__*/React.createElement(Validator, {
|
|
250
|
+
name: name,
|
|
251
|
+
virtualKey: virtualKey,
|
|
252
|
+
editingKeys: editingKeys,
|
|
253
|
+
onlyOneLineMsg: onlyOneLineMsg
|
|
254
|
+
}));
|
|
255
|
+
};
|
|
256
|
+
var ForwardProEditTable = /*#__PURE__*/forwardRef(ProEditTable);
|
|
257
|
+
ForwardProEditTable.defaultProps = {
|
|
258
|
+
type: 'multiple',
|
|
259
|
+
mode: 'multiple',
|
|
260
|
+
insertType: 'after',
|
|
261
|
+
requiredAlign: 'right',
|
|
262
|
+
value: [],
|
|
263
|
+
actionProps: [],
|
|
264
|
+
toolbarProps: [],
|
|
265
|
+
disabled: false,
|
|
266
|
+
draggable: false,
|
|
267
|
+
emptyBtnText: '点击添加',
|
|
268
|
+
onlyOneLineMsg: '请先保存数据',
|
|
269
|
+
deletePoConfirmMsg: '您确定要删除该行数据吗?',
|
|
270
|
+
mulDeletePoConfirmMsg: '您确定要删除选中的数据吗?'
|
|
271
|
+
};
|
|
272
|
+
export default ForwardProEditTable;
|