@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,223 @@
|
|
|
1
|
+
import "antd/es/space/style";
|
|
2
|
+
import _Space from "antd/es/space";
|
|
3
|
+
import "antd/es/checkbox/style";
|
|
4
|
+
import _Checkbox from "antd/es/checkbox";
|
|
5
|
+
import "antd/es/radio/style";
|
|
6
|
+
import _Radio from "antd/es/radio";
|
|
7
|
+
import "antd/es/message/style";
|
|
8
|
+
import _message from "antd/es/message";
|
|
9
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
10
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
11
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
12
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
13
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
14
|
+
var _excluded = ["code", "type", "dataSource", "useRequest", "value", "onChange", "transformResponse", "otherProps"],
|
|
15
|
+
_excluded2 = ["fieldNames", "clear", "cacheKey"];
|
|
16
|
+
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
|
17
|
+
import React, { useState, useEffect } from 'react';
|
|
18
|
+
import { cloneDeep, isFunction } from 'lodash';
|
|
19
|
+
import { ProSelect, useProConfig } from 'zat-design-pro-component';
|
|
20
|
+
import { isObject } from './utils';
|
|
21
|
+
import getEnumLabel from './getEnumLabel';
|
|
22
|
+
import useEnum from './useEnum';
|
|
23
|
+
import Container from '../ProForm/components/Container';
|
|
24
|
+
var ProEnum = function ProEnum(props) {
|
|
25
|
+
var code = props.code,
|
|
26
|
+
_props$type = props.type,
|
|
27
|
+
type = _props$type === void 0 ? 'ProSelect' : _props$type,
|
|
28
|
+
dataSource = props.dataSource,
|
|
29
|
+
useRequest = props.useRequest,
|
|
30
|
+
value = props.value,
|
|
31
|
+
onChange = props.onChange,
|
|
32
|
+
transformResponse = props.transformResponse,
|
|
33
|
+
otherProps = props.otherProps,
|
|
34
|
+
enumProps = _objectWithoutProperties(props, _excluded);
|
|
35
|
+
var _ref = otherProps || {},
|
|
36
|
+
isView = _ref.isView,
|
|
37
|
+
viewEmpty = _ref.viewEmpty;
|
|
38
|
+
var _ref2 = useProConfig('ProEnum') || {},
|
|
39
|
+
fieldNames = _ref2.fieldNames,
|
|
40
|
+
_ref2$clear = _ref2.clear,
|
|
41
|
+
clear = _ref2$clear === void 0 ? true : _ref2$clear,
|
|
42
|
+
_ref2$cacheKey = _ref2.cacheKey,
|
|
43
|
+
cacheKey = _ref2$cacheKey === void 0 ? 'zat-design-pro-component-cacheKey' : _ref2$cacheKey,
|
|
44
|
+
resProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
45
|
+
var label = '';
|
|
46
|
+
var fieldValue = '';
|
|
47
|
+
var _useState = useState(dataSource || []),
|
|
48
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
49
|
+
dataList = _useState2[0],
|
|
50
|
+
setData = _useState2[1];
|
|
51
|
+
useEffect(function () {
|
|
52
|
+
(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) && setData(_toConsumableArray(dataSource));
|
|
53
|
+
}, [dataSource]);
|
|
54
|
+
if (fieldNames && Object.keys(fieldNames).length) {
|
|
55
|
+
if (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) label = fieldNames.label;
|
|
56
|
+
if (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) fieldValue = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value;
|
|
57
|
+
}
|
|
58
|
+
if (props.fieldNames && Object.keys(props.fieldNames).length) {
|
|
59
|
+
var _props$fieldNames, _props$fieldNames2, _props$fieldNames3, _props$fieldNames4;
|
|
60
|
+
if (props === null || props === void 0 ? void 0 : (_props$fieldNames = props.fieldNames) === null || _props$fieldNames === void 0 ? void 0 : _props$fieldNames.label) label = (_props$fieldNames2 = props.fieldNames) === null || _props$fieldNames2 === void 0 ? void 0 : _props$fieldNames2.label;
|
|
61
|
+
if (props === null || props === void 0 ? void 0 : (_props$fieldNames3 = props.fieldNames) === null || _props$fieldNames3 === void 0 ? void 0 : _props$fieldNames3.value) fieldValue = (_props$fieldNames4 = props.fieldNames) === null || _props$fieldNames4 === void 0 ? void 0 : _props$fieldNames4.value;
|
|
62
|
+
}
|
|
63
|
+
if (clear) {
|
|
64
|
+
label = 'label';
|
|
65
|
+
fieldValue = 'value';
|
|
66
|
+
}
|
|
67
|
+
// 这种时候优先级最高、完全走自定义
|
|
68
|
+
if ((useRequest === null || useRequest === void 0 ? void 0 : useRequest.service) && props.fieldNames) {
|
|
69
|
+
var _props$fieldNames5, _props$fieldNames6;
|
|
70
|
+
if ((_props$fieldNames5 = props.fieldNames) === null || _props$fieldNames5 === void 0 ? void 0 : _props$fieldNames5.label) label = props.fieldNames.label;
|
|
71
|
+
if ((_props$fieldNames6 = props.fieldNames) === null || _props$fieldNames6 === void 0 ? void 0 : _props$fieldNames6.value) fieldValue = props.fieldNames.value;
|
|
72
|
+
}
|
|
73
|
+
var _useProConfig = useProConfig('ProEnum'),
|
|
74
|
+
_useProConfig$dics = _useProConfig.dics,
|
|
75
|
+
dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
|
|
76
|
+
var enumList = (dics === null || dics === void 0 ? void 0 : dics[code]) || [];
|
|
77
|
+
var _useRequestFunc = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread(_objectSpread({
|
|
78
|
+
manual: true,
|
|
79
|
+
cacheTime: -1
|
|
80
|
+
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
|
|
81
|
+
onSuccess: function onSuccess(res) {
|
|
82
|
+
if (transformResponse && typeof transformResponse === 'function') {
|
|
83
|
+
var responseData = transformResponse(res);
|
|
84
|
+
if (_typeof(responseData) !== 'object') {
|
|
85
|
+
return _message.error('请返回正确的数据类型');
|
|
86
|
+
}
|
|
87
|
+
setData(responseData);
|
|
88
|
+
} else {
|
|
89
|
+
var _res$status = res.status,
|
|
90
|
+
status = _res$status === void 0 ? 200 : _res$status,
|
|
91
|
+
msg = res.message,
|
|
92
|
+
data = res.data;
|
|
93
|
+
if (status === 200) {
|
|
94
|
+
if (_typeof(data) !== 'object') {
|
|
95
|
+
return _message.error('请返回正确的数组类型');
|
|
96
|
+
}
|
|
97
|
+
if (Array.isArray(data)) {
|
|
98
|
+
setData(_toConsumableArray(data));
|
|
99
|
+
}
|
|
100
|
+
if (isObject(data)) {
|
|
101
|
+
setData(data[code]);
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
_message.error(msg);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
})),
|
|
109
|
+
run = _useRequestFunc.run;
|
|
110
|
+
// 自定义请求
|
|
111
|
+
useDeepCompareEffect(function () {
|
|
112
|
+
var _ref3 = (useRequest === null || useRequest === void 0 ? void 0 : useRequest.options) || {},
|
|
113
|
+
defaultParams = _ref3.defaultParams;
|
|
114
|
+
if (useRequest === null || useRequest === void 0 ? void 0 : useRequest.service) {
|
|
115
|
+
run(defaultParams);
|
|
116
|
+
}
|
|
117
|
+
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
|
118
|
+
var renderComponent = function renderComponent() {
|
|
119
|
+
var list = [];
|
|
120
|
+
// 优先使用组件内部自己传入的数据源或者请求得到的数据
|
|
121
|
+
list = cloneDeep(dataList && dataList.length ? dataList : enumList);
|
|
122
|
+
// 对数据进行一系列的过滤等操作
|
|
123
|
+
if (!(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service) && transformResponse) {
|
|
124
|
+
list = transformResponse(list);
|
|
125
|
+
if (!Array.isArray(list)) {
|
|
126
|
+
console.error('请返回有效的数组');
|
|
127
|
+
list = [];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
switch (type) {
|
|
131
|
+
case 'ProSelect':
|
|
132
|
+
return /*#__PURE__*/React.createElement(ProSelect, _objectSpread(_objectSpread({}, enumProps), {}, {
|
|
133
|
+
dataSource: list,
|
|
134
|
+
fieldNames: {
|
|
135
|
+
label: label,
|
|
136
|
+
value: fieldValue
|
|
137
|
+
},
|
|
138
|
+
value: value,
|
|
139
|
+
onChange: onChange
|
|
140
|
+
}));
|
|
141
|
+
case 'Radio':
|
|
142
|
+
return /*#__PURE__*/React.createElement(_Radio.Group, _objectSpread(_objectSpread({}, enumProps), {}, {
|
|
143
|
+
value: value,
|
|
144
|
+
onChange: onChange
|
|
145
|
+
}), list.map(function (item) {
|
|
146
|
+
return /*#__PURE__*/React.createElement(_Radio, {
|
|
147
|
+
key: item[fieldValue],
|
|
148
|
+
value: item[fieldValue]
|
|
149
|
+
}, item[label]);
|
|
150
|
+
}));
|
|
151
|
+
case 'Checkbox':
|
|
152
|
+
return /*#__PURE__*/React.createElement(_Checkbox.Group, _objectSpread(_objectSpread({}, enumProps), {}, {
|
|
153
|
+
value: value,
|
|
154
|
+
onChange: onChange
|
|
155
|
+
}), list.map(function (item) {
|
|
156
|
+
return /*#__PURE__*/React.createElement(_Checkbox, {
|
|
157
|
+
key: item[fieldValue],
|
|
158
|
+
value: item[fieldValue]
|
|
159
|
+
}, item[label]);
|
|
160
|
+
}));
|
|
161
|
+
default:
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
if (!code && !dataSource && !useRequest) {
|
|
166
|
+
_message.error('请传入枚举类型');
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
var transToLabel = function transToLabel(value) {
|
|
170
|
+
var list = dataList && dataList.length ? dataList : enumList;
|
|
171
|
+
if (!Array.isArray(list) || !list.length) {
|
|
172
|
+
return viewEmpty;
|
|
173
|
+
}
|
|
174
|
+
var labelList = value.map(function (v) {
|
|
175
|
+
var option = list.find(function (item) {
|
|
176
|
+
if (enumProps.labelInValue) {
|
|
177
|
+
return item[fieldValue] === (v === null || v === void 0 ? void 0 : v[fieldValue]);
|
|
178
|
+
}
|
|
179
|
+
return item[fieldValue] === v;
|
|
180
|
+
});
|
|
181
|
+
return enumProps.showCodeName ? "".concat(option[fieldValue], "-").concat(option[label]) : option === null || option === void 0 ? void 0 : option[label];
|
|
182
|
+
});
|
|
183
|
+
var record = value.map(function (v) {
|
|
184
|
+
return list.find(function (item) {
|
|
185
|
+
return item[fieldValue] === v;
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
// 自定义option时,默认取optionRender的值
|
|
189
|
+
var _optionRender = function _optionRender() {
|
|
190
|
+
if (!record.length) {
|
|
191
|
+
return viewEmpty;
|
|
192
|
+
}
|
|
193
|
+
var arr = [];
|
|
194
|
+
record.forEach(function (item) {
|
|
195
|
+
arr.push(props.optionRender(item));
|
|
196
|
+
});
|
|
197
|
+
return /*#__PURE__*/React.createElement(_Space, {
|
|
198
|
+
direction: "vertical",
|
|
199
|
+
size: 4
|
|
200
|
+
}, arr.map(function (item) {
|
|
201
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
202
|
+
key: item
|
|
203
|
+
}, item);
|
|
204
|
+
}));
|
|
205
|
+
};
|
|
206
|
+
return isFunction(props.optionRender) && record.length ? _optionRender() : labelList === null || labelList === void 0 ? void 0 : labelList.join(',');
|
|
207
|
+
};
|
|
208
|
+
if (isView) {
|
|
209
|
+
if (Array.isArray(value)) {
|
|
210
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
211
|
+
tooltip: true,
|
|
212
|
+
viewEmpty: viewEmpty
|
|
213
|
+
}, transToLabel(value));
|
|
214
|
+
}
|
|
215
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
216
|
+
viewEmpty: viewEmpty
|
|
217
|
+
}, value ? transToLabel([value]) : null);
|
|
218
|
+
}
|
|
219
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderComponent());
|
|
220
|
+
};
|
|
221
|
+
ProEnum.getEnumLabel = getEnumLabel;
|
|
222
|
+
ProEnum.useEnum = useEnum;
|
|
223
|
+
export default ProEnum;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RadioProps, CheckboxProps } from 'antd';
|
|
3
|
+
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
|
4
|
+
import { ProFormOtherProps } from '../index';
|
|
5
|
+
import { PropSelectProps } from '../ProSelect/propsType';
|
|
6
|
+
export interface DataOption {
|
|
7
|
+
label?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export interface ProEnumConfig {
|
|
12
|
+
/** 是否对数据进行清洗 */
|
|
13
|
+
clear?: boolean;
|
|
14
|
+
/** 字段别名 */
|
|
15
|
+
fieldNames?: Record<'label' | 'value', string>;
|
|
16
|
+
/** 缓存的key、默认 zat-design-pro-component-cacheKey */
|
|
17
|
+
cacheKey: string;
|
|
18
|
+
/** 刷新请求、设置后每次进入都会重新请求 */
|
|
19
|
+
requestRefresh: boolean;
|
|
20
|
+
/** 存储位置、不设置、默认读取 globalConfig 里面的 */
|
|
21
|
+
storage: 'localStorage' | 'sessionStorage';
|
|
22
|
+
/** 默认静态枚举数据 */
|
|
23
|
+
dataSource: Record<string, DataOption[]>;
|
|
24
|
+
/** 对后台返回数据进行格式化 */
|
|
25
|
+
transformResponse?: (data: {
|
|
26
|
+
data: Record<string, DataOption[]>;
|
|
27
|
+
}) => Record<string, DataOption[]>;
|
|
28
|
+
/** 批量请求枚举接口 */
|
|
29
|
+
useRequest?: {
|
|
30
|
+
service: Service<any, any>;
|
|
31
|
+
options?: Options<any, any> & {
|
|
32
|
+
codes?: string[];
|
|
33
|
+
ignoreCodes?: string[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
dics: Record<string, DataOption[]>;
|
|
37
|
+
}
|
|
38
|
+
type ProEnumType = 'ProSelect' | 'Radio' | 'Checkbox';
|
|
39
|
+
export interface ProEnum {
|
|
40
|
+
/** 组件展示类型、默认 ProSelect */
|
|
41
|
+
type?: ProEnumType;
|
|
42
|
+
/** 用于提交 code */
|
|
43
|
+
code: string;
|
|
44
|
+
/** 字段别名 */
|
|
45
|
+
fieldNames?: Record<string, string>;
|
|
46
|
+
/** 是否查看模式 */
|
|
47
|
+
isView?: boolean;
|
|
48
|
+
/** 数据源 */
|
|
49
|
+
dataSource?: DataOption[];
|
|
50
|
+
value: any;
|
|
51
|
+
onChange?: (value: any) => void;
|
|
52
|
+
/** 远程请求接口 */
|
|
53
|
+
useRequest?: {
|
|
54
|
+
service: Service<any, any>;
|
|
55
|
+
options?: Options<any, any>;
|
|
56
|
+
};
|
|
57
|
+
/** 对后台返回数据进行格式化 */
|
|
58
|
+
transformResponse?: (data: any) => DataOption[];
|
|
59
|
+
/** 时候合并 */
|
|
60
|
+
merge?: boolean;
|
|
61
|
+
/** 查看模式下为空展示 */
|
|
62
|
+
viewEmpty?: React.ReactNode;
|
|
63
|
+
optionRender?: any;
|
|
64
|
+
/** 显示 code-value 形式 */
|
|
65
|
+
showCodeName?: boolean;
|
|
66
|
+
/** 支持 {label:xx, value: xx} */
|
|
67
|
+
labelInValue?: boolean;
|
|
68
|
+
otherProps?: ProFormOtherProps;
|
|
69
|
+
}
|
|
70
|
+
export type PropProSelectsMap = {
|
|
71
|
+
type?: 'ProSelect';
|
|
72
|
+
} & PropSelectProps;
|
|
73
|
+
export type PropRadioPropsMap = {
|
|
74
|
+
type?: 'Radio';
|
|
75
|
+
} & RadioProps;
|
|
76
|
+
export type CheckboxPropsMap = {
|
|
77
|
+
type?: 'Checkbox';
|
|
78
|
+
} & CheckboxProps;
|
|
79
|
+
export type ProEnumProps = ProEnum & (PropProSelectsMap | PropRadioPropsMap | CheckboxPropsMap);
|
|
80
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataOption } from './propsType';
|
|
2
|
+
/**
|
|
3
|
+
* 根据code 返回缓存枚举
|
|
4
|
+
* @param codes 获取全局缓存的枚举 code
|
|
5
|
+
* @param value 单个枚举值、用来回显
|
|
6
|
+
* @param compose 是否返回 value-label 格式
|
|
7
|
+
* @returns codes -> {code1:DataOption[],code2:DataOption[]}
|
|
8
|
+
* code ->[DataOption[],getEnumLabel]
|
|
9
|
+
* code、value -> [label,DataOption]
|
|
10
|
+
*/
|
|
11
|
+
declare function useEnum(code: string): [DataOption[], (val: string, showCodeName?: boolean) => string];
|
|
12
|
+
declare function useEnum(codes: string[]): Record<string, DataOption[]>;
|
|
13
|
+
declare function useEnum(code: string, value?: string, compose?: boolean): [string, DataOption];
|
|
14
|
+
export default useEnum;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
2
|
+
/* eslint-disable no-redeclare */
|
|
3
|
+
import { useProConfig } from 'zat-design-pro-component';
|
|
4
|
+
import { getEnumData } from './utils';
|
|
5
|
+
function useEnum(codes, value, compose) {
|
|
6
|
+
var _ref = useProConfig('globalConfig') || {},
|
|
7
|
+
_ref$storage = _ref.storage,
|
|
8
|
+
storage = _ref$storage === void 0 ? 'localStorage' : _ref$storage;
|
|
9
|
+
var _ref2 = useProConfig('ProEnum') || {},
|
|
10
|
+
_ref2$cacheKey = _ref2.cacheKey,
|
|
11
|
+
cacheKey = _ref2$cacheKey === void 0 ? 'zat-design-pro-component-cacheKey' : _ref2$cacheKey,
|
|
12
|
+
_ref2$fieldNames = _ref2.fieldNames,
|
|
13
|
+
fieldNames = _ref2$fieldNames === void 0 ? {} : _ref2$fieldNames,
|
|
14
|
+
_ref2$clear = _ref2.clear,
|
|
15
|
+
clear = _ref2$clear === void 0 ? true : _ref2$clear;
|
|
16
|
+
var catchData = getEnumData(storage, cacheKey);
|
|
17
|
+
if (!codes) {
|
|
18
|
+
return catchData;
|
|
19
|
+
}
|
|
20
|
+
var fieldLabel = '';
|
|
21
|
+
var fieldValue = '';
|
|
22
|
+
if (fieldNames && Object.keys(fieldNames).length) {
|
|
23
|
+
fieldLabel = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label;
|
|
24
|
+
fieldValue = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value;
|
|
25
|
+
}
|
|
26
|
+
if (clear) {
|
|
27
|
+
fieldLabel = 'label';
|
|
28
|
+
fieldValue = 'value';
|
|
29
|
+
}
|
|
30
|
+
if (typeof codes === 'string') {
|
|
31
|
+
var _catchData$data;
|
|
32
|
+
var options = (catchData === null || catchData === void 0 ? void 0 : (_catchData$data = catchData.data) === null || _catchData$data === void 0 ? void 0 : _catchData$data[codes]) || [];
|
|
33
|
+
var getEnumLabel = function getEnumLabel(v, composezTow) {
|
|
34
|
+
var option = options.find(function (item) {
|
|
35
|
+
return item[fieldValue] === v;
|
|
36
|
+
});
|
|
37
|
+
if (option) {
|
|
38
|
+
return composezTow ? "".concat(v, "-").concat(option[fieldLabel]) : option[fieldLabel];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (value && Array.isArray(options)) {
|
|
42
|
+
var option = options.find(function (item) {
|
|
43
|
+
return item[fieldValue] === value;
|
|
44
|
+
});
|
|
45
|
+
if (option) {
|
|
46
|
+
return [compose ? "".concat(value, "-").concat(option[fieldLabel]) : option[fieldLabel], option];
|
|
47
|
+
}
|
|
48
|
+
return [options];
|
|
49
|
+
}
|
|
50
|
+
return [options, getEnumLabel];
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(codes)) {
|
|
53
|
+
var _options = {};
|
|
54
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
55
|
+
var _iterator = _createForOfIteratorHelper(codes),
|
|
56
|
+
_step;
|
|
57
|
+
try {
|
|
58
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
59
|
+
var _catchData$data2;
|
|
60
|
+
var code = _step.value;
|
|
61
|
+
var values = catchData === null || catchData === void 0 ? void 0 : (_catchData$data2 = catchData.data) === null || _catchData$data2 === void 0 ? void 0 : _catchData$data2[code];
|
|
62
|
+
if (Array.isArray(values) && values.length) {
|
|
63
|
+
_options[code] = values;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} catch (err) {
|
|
67
|
+
_iterator.e(err);
|
|
68
|
+
} finally {
|
|
69
|
+
_iterator.f();
|
|
70
|
+
}
|
|
71
|
+
return _options;
|
|
72
|
+
}
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
export default useEnum;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
6
|
+
/* eslint-disable no-restricted-syntax */
|
|
7
|
+
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
|
8
|
+
import { diffCode, getEnumData, setEnumData, cacheFieldNames } from './utils';
|
|
9
|
+
var useEnum = function useEnum(props, dispatch) {
|
|
10
|
+
var _ref = props || {},
|
|
11
|
+
_ref$clear = _ref.clear,
|
|
12
|
+
clear = _ref$clear === void 0 ? true : _ref$clear,
|
|
13
|
+
_ref$fieldNames = _ref.fieldNames,
|
|
14
|
+
fieldNames = _ref$fieldNames === void 0 ? {
|
|
15
|
+
label: 'label',
|
|
16
|
+
value: 'value',
|
|
17
|
+
children: 'children'
|
|
18
|
+
} : _ref$fieldNames,
|
|
19
|
+
_ref$cacheKey = _ref.cacheKey,
|
|
20
|
+
cacheKey = _ref$cacheKey === void 0 ? 'zat-design-pro-component-cacheKey' : _ref$cacheKey,
|
|
21
|
+
_ref$requestRefresh = _ref.requestRefresh,
|
|
22
|
+
requestRefresh = _ref$requestRefresh === void 0 ? false : _ref$requestRefresh,
|
|
23
|
+
_ref$storage = _ref.storage,
|
|
24
|
+
storage = _ref$storage === void 0 ? 'localStorage' : _ref$storage,
|
|
25
|
+
_ref$dataSource = _ref.dataSource,
|
|
26
|
+
dataSource = _ref$dataSource === void 0 ? {} : _ref$dataSource,
|
|
27
|
+
useRequest = _ref.useRequest,
|
|
28
|
+
transformResponse = _ref.transformResponse,
|
|
29
|
+
_ref$dics = _ref.dics,
|
|
30
|
+
dics = _ref$dics === void 0 ? {} : _ref$dics;
|
|
31
|
+
if (_typeof(dataSource) === 'object' && dataSource === null) {
|
|
32
|
+
throw new Error('请传入有效的数据源');
|
|
33
|
+
}
|
|
34
|
+
var _useRequestFunc = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread(_objectSpread({
|
|
35
|
+
manual: true,
|
|
36
|
+
cacheKey: cacheKey,
|
|
37
|
+
cacheTime: -1,
|
|
38
|
+
staleTime: 6e4 * 60
|
|
39
|
+
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
|
|
40
|
+
setCache: function () {
|
|
41
|
+
var _setCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
42
|
+
var response, _useRequest$options, ignoreCodes, _i, _Object$keys, key, options;
|
|
43
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
44
|
+
while (1) switch (_context.prev = _context.next) {
|
|
45
|
+
case 0:
|
|
46
|
+
response = res.data;
|
|
47
|
+
if (!(transformResponse && typeof transformResponse === 'function')) {
|
|
48
|
+
_context.next = 10;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
_context.next = 4;
|
|
52
|
+
return transformResponse(res.data);
|
|
53
|
+
case 4:
|
|
54
|
+
response = _context.sent;
|
|
55
|
+
if (!(_typeof(response) !== 'object' || response == null)) {
|
|
56
|
+
_context.next = 9;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
throw new Error('请返回正确的数据类型!');
|
|
60
|
+
case 9:
|
|
61
|
+
res.data = response;
|
|
62
|
+
case 10:
|
|
63
|
+
// 只返回fieldNames对象的key
|
|
64
|
+
if (clear) {
|
|
65
|
+
// 忽略清洗的 codes
|
|
66
|
+
ignoreCodes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 ? void 0 : _useRequest$options.ignoreCodes) || [];
|
|
67
|
+
for (_i = 0, _Object$keys = Object.keys(response); _i < _Object$keys.length; _i++) {
|
|
68
|
+
key = _Object$keys[_i];
|
|
69
|
+
options = _toConsumableArray(response[key]) || [];
|
|
70
|
+
if (ignoreCodes.includes(key)) {
|
|
71
|
+
response[key] = options;
|
|
72
|
+
} else {
|
|
73
|
+
response[key] = options.map(function (item) {
|
|
74
|
+
return cacheFieldNames(fieldNames, item);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
res.data = response;
|
|
79
|
+
}
|
|
80
|
+
// const cacheData = getEnumData(storage, cacheKey) || { data: {} };
|
|
81
|
+
// // 缓存数据
|
|
82
|
+
// setEnumData(storage, cacheKey, {
|
|
83
|
+
// ...res,
|
|
84
|
+
// data: {
|
|
85
|
+
// ...res.data,
|
|
86
|
+
// ...cacheData?.data,
|
|
87
|
+
// },
|
|
88
|
+
// });
|
|
89
|
+
setEnumData(storage, cacheKey, res);
|
|
90
|
+
// 同步数据到全局
|
|
91
|
+
dispatch({
|
|
92
|
+
type: 'setProEnumDic',
|
|
93
|
+
payload: _objectSpread(_objectSpread(_objectSpread({}, dics), dataSource), res.data)
|
|
94
|
+
});
|
|
95
|
+
return _context.abrupt("return", res);
|
|
96
|
+
case 14:
|
|
97
|
+
case "end":
|
|
98
|
+
return _context.stop();
|
|
99
|
+
}
|
|
100
|
+
}, _callee);
|
|
101
|
+
}));
|
|
102
|
+
function setCache(_x) {
|
|
103
|
+
return _setCache.apply(this, arguments);
|
|
104
|
+
}
|
|
105
|
+
return setCache;
|
|
106
|
+
}(),
|
|
107
|
+
getCache: function getCache() {
|
|
108
|
+
var res = getEnumData(storage, cacheKey) || {
|
|
109
|
+
data: {}
|
|
110
|
+
};
|
|
111
|
+
dispatch({
|
|
112
|
+
type: 'setProEnumDic',
|
|
113
|
+
payload: _objectSpread(_objectSpread(_objectSpread({}, dics), dataSource), res === null || res === void 0 ? void 0 : res.data)
|
|
114
|
+
});
|
|
115
|
+
return res;
|
|
116
|
+
},
|
|
117
|
+
onSuccess: function onSuccess(res) {
|
|
118
|
+
var _res$status = res.status,
|
|
119
|
+
status = _res$status === void 0 ? 200 : _res$status,
|
|
120
|
+
msg = res.message;
|
|
121
|
+
if (status !== 200) {
|
|
122
|
+
throw new Error('请求失败');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
})),
|
|
126
|
+
run = _useRequestFunc.run;
|
|
127
|
+
useDeepCompareEffect(function () {
|
|
128
|
+
if (useRequest && (useRequest === null || useRequest === void 0 ? void 0 : useRequest.service)) {
|
|
129
|
+
var _ref2 = (useRequest === null || useRequest === void 0 ? void 0 : useRequest.options) || {},
|
|
130
|
+
defaultParams = _ref2.defaultParams;
|
|
131
|
+
if (requestRefresh) {
|
|
132
|
+
window.localStorage.removeItem(cacheKey);
|
|
133
|
+
window.sessionStorage.removeItem(cacheKey);
|
|
134
|
+
}
|
|
135
|
+
run(defaultParams);
|
|
136
|
+
// 实现跨系统数据合并
|
|
137
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
138
|
+
var cacheData, _useRequest$options2, _useRequest$options3, enumData, cacheCodes, codes, ignoreCodes, diff, response, res, _i2, _Object$keys2, key, options;
|
|
139
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
140
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
141
|
+
case 0:
|
|
142
|
+
cacheData = getEnumData(storage, cacheKey) || {
|
|
143
|
+
data: {}
|
|
144
|
+
};
|
|
145
|
+
if (!(_typeof(cacheData) === 'object')) {
|
|
146
|
+
_context2.next = 28;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
if (!(_typeof(cacheData.data) === 'object' && cacheData.data !== null)) {
|
|
150
|
+
_context2.next = 28;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
enumData = cacheData.data;
|
|
154
|
+
cacheCodes = Object.keys(enumData);
|
|
155
|
+
codes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 ? void 0 : _useRequest$options2.codes) || []; // 缓存的所有 codes
|
|
156
|
+
ignoreCodes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.ignoreCodes) || []; // 忽略清洗的 codes
|
|
157
|
+
diff = diffCode(cacheCodes, codes);
|
|
158
|
+
if (!diff) {
|
|
159
|
+
_context2.next = 27;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
_context2.next = 11;
|
|
163
|
+
return useRequest === null || useRequest === void 0 ? void 0 : useRequest.service();
|
|
164
|
+
case 11:
|
|
165
|
+
res = _context2.sent;
|
|
166
|
+
if (!(transformResponse && typeof transformResponse === 'function')) {
|
|
167
|
+
_context2.next = 20;
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
_context2.next = 15;
|
|
171
|
+
return transformResponse(res);
|
|
172
|
+
case 15:
|
|
173
|
+
response = _context2.sent;
|
|
174
|
+
if (!(_typeof(response) !== 'object' || response == null)) {
|
|
175
|
+
_context2.next = 18;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
throw new Error('请返回正确的数据类型!');
|
|
179
|
+
case 18:
|
|
180
|
+
_context2.next = 21;
|
|
181
|
+
break;
|
|
182
|
+
case 20:
|
|
183
|
+
if (res.status === 200) {
|
|
184
|
+
response = res.data;
|
|
185
|
+
}
|
|
186
|
+
case 21:
|
|
187
|
+
// 只返回fieldNames对象的key
|
|
188
|
+
if (clear) {
|
|
189
|
+
for (_i2 = 0, _Object$keys2 = Object.keys(response); _i2 < _Object$keys2.length; _i2++) {
|
|
190
|
+
key = _Object$keys2[_i2];
|
|
191
|
+
options = _toConsumableArray(response[key]) || [];
|
|
192
|
+
if (ignoreCodes.includes(key)) {
|
|
193
|
+
response[key] = options;
|
|
194
|
+
} else {
|
|
195
|
+
response[key] = options.map(function (item) {
|
|
196
|
+
return cacheFieldNames(fieldNames, item);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
cacheData.data = _objectSpread(_objectSpread({}, cacheData.data), response);
|
|
202
|
+
setEnumData(storage, cacheKey, cacheData);
|
|
203
|
+
// 同步数据到全局
|
|
204
|
+
dispatch({
|
|
205
|
+
type: 'setProEnumDic',
|
|
206
|
+
payload: _objectSpread(_objectSpread(_objectSpread({}, dics), dataSource), cacheData.data)
|
|
207
|
+
});
|
|
208
|
+
_context2.next = 28;
|
|
209
|
+
break;
|
|
210
|
+
case 27:
|
|
211
|
+
if (dataSource && Object.keys(dataSource)) {
|
|
212
|
+
// 子系统也可能会有 dataSource
|
|
213
|
+
dispatch({
|
|
214
|
+
type: 'setProEnumDic',
|
|
215
|
+
payload: _objectSpread(_objectSpread({}, dics), dataSource)
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
case 28:
|
|
219
|
+
case "end":
|
|
220
|
+
return _context2.stop();
|
|
221
|
+
}
|
|
222
|
+
}, _callee2);
|
|
223
|
+
}))();
|
|
224
|
+
} else if (Object.keys(dataSource)) {
|
|
225
|
+
dispatch({
|
|
226
|
+
type: 'setProEnumDic',
|
|
227
|
+
payload: _objectSpread({}, dataSource)
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
|
231
|
+
};
|
|
232
|
+
export default useEnum;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DataOption } from './propsType';
|
|
2
|
+
type StorageType = 'localStorage' | 'sessionStorage';
|
|
3
|
+
interface EnumRes {
|
|
4
|
+
data: Record<string, DataOption[]>;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export declare function getEnumData(storage: StorageType, cacheKey: string): EnumRes;
|
|
8
|
+
export declare function setEnumData(storage: StorageType, cacheKey: string, data: Object): void;
|
|
9
|
+
export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string): DataOption[];
|
|
10
|
+
export declare function isObject(obj: any): boolean;
|
|
11
|
+
export declare function mergeCacheData(storage: string, code: string, cacheKey: string, responseData: any): void;
|
|
12
|
+
/**
|
|
13
|
+
* diff code 差异
|
|
14
|
+
* @param cacheCodes
|
|
15
|
+
* @param codes
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function diffCode(cacheCodes: string[], codes: string[]): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 缓存fieldNames制定的值
|
|
21
|
+
* @param fieldNames 保留映射值
|
|
22
|
+
* @param dataSource 需要筛选的数据源
|
|
23
|
+
* @returns {}
|
|
24
|
+
*/
|
|
25
|
+
export declare function cacheFieldNames(fieldNames: {
|
|
26
|
+
[key: string]: string;
|
|
27
|
+
}, dataSource: {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}): any;
|
|
30
|
+
export {};
|