@zat-design/sisyphus-react 3.14.0-beta.2 → 4.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -207
- package/babel.config.js +2 -2
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -9
- package/es/ProAction/index.js +3 -6
- package/es/ProAction/index.less +0 -2
- package/es/ProConfigProvider/index.d.ts +22 -5
- package/es/ProConfigProvider/index.js +58 -26
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/style/index.less +0 -2
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/es/ProDrawerForm/components/ProModal/index.js +12 -20
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +35 -33
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +6 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +10 -15
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +70 -53
- package/es/ProEditTable/components/RcTable/DraggableTable.js +70 -49
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +401 -241
- package/es/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +99 -103
- package/es/ProEditTable/propsType.d.ts +7 -7
- package/es/ProEditTable/style/index.less +12 -12
- package/es/ProEditTable/utils/config.js +6 -7
- package/es/ProEditTable/utils/index.js +21 -17
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/hooks/useEnum.js +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +3 -3
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +0 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +3 -7
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +18 -19
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +11 -0
- package/es/ProForm/components/base/Input/index.js +10 -8
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +7 -6
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +10 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/es/ProForm/components/combination/Container/style/index.less +0 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +5 -8
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +36 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +13 -15
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +21 -21
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/es/ProForm/components/index.d.ts +2 -9
- package/es/ProForm/components/index.js +1 -11
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/es/ProForm/components/render/Render.js +29 -30
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +6 -3
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +14 -42
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +4 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +66 -15
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +27 -22
- package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/es/ProForm/utils/useShouldUpdate.js +103 -17
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/es/ProLayout/components/ProCollapse/index.js +29 -44
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProFooter/style/index.less +0 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -45
- package/es/ProLayout/components/ProHeader/style/index.less +0 -2
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/es/ProLayout/index.js +80 -41
- package/es/ProLayout/style/index.less +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -15
- package/es/ProSelect/index.less +0 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +1 -0
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/style/index.less +2 -4
- package/es/ProTable/components/FormatColumn/index.js +33 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +17 -13
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +4 -7
- package/es/ProTable/index.d.ts +0 -7
- package/es/ProTable/index.js +11 -14
- package/es/ProTable/propsType.d.ts +2 -3
- package/es/ProTable/style/index.less +4 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +0 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +136 -0
- package/es/ProThemeTools/index.d.ts +4 -8
- package/es/ProThemeTools/index.js +80 -49
- package/es/ProThemeTools/style/index.less +1 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +30 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +0 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +28 -26
- package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/es/ProTree/components/Tree.js +6 -13
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +8 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +10 -20
- package/es/ProTreeModal/style/index.less +12 -3
- package/es/ProUpload/components/ButtonRender.js +4 -7
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +171 -12
- package/es/ProViewer/index.js +28 -35
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProViewer/style/index.less +0 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -5
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +13 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/index.less +1 -1
- package/es/style/theme/antd.less +36 -48
- package/es/style/theme/base.less +90 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +37 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +3 -6
- package/lib/ProAction/index.less +0 -2
- package/lib/ProConfigProvider/index.d.ts +22 -5
- package/lib/ProConfigProvider/index.js +58 -26
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/style/index.less +0 -2
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -20
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +35 -33
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +6 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +10 -15
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +69 -52
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +69 -48
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +401 -241
- package/lib/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +96 -100
- package/lib/ProEditTable/propsType.d.ts +7 -7
- package/lib/ProEditTable/style/index.less +12 -12
- package/lib/ProEditTable/utils/config.js +6 -7
- package/lib/ProEditTable/utils/index.js +20 -16
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/hooks/useEnum.js +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +0 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +4 -7
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +18 -19
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +19 -0
- package/lib/ProForm/components/base/Input/index.js +10 -8
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +10 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/lib/ProForm/components/combination/Container/style/index.less +0 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -9
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +36 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +12 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +20 -20
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/lib/ProForm/components/index.d.ts +2 -9
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/lib/ProForm/components/render/Render.js +29 -30
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +6 -3
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +13 -42
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +4 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +69 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +26 -21
- package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/lib/ProForm/utils/useShouldUpdate.js +101 -15
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/lib/ProLayout/components/ProCollapse/index.js +29 -44
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/lib/ProLayout/components/ProHeader/index.js +44 -47
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/lib/ProLayout/index.js +79 -40
- package/lib/ProLayout/style/index.less +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -15
- package/lib/ProSelect/index.less +0 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/style/index.less +2 -4
- package/lib/ProTable/components/FormatColumn/index.js +33 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +16 -13
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +4 -7
- package/lib/ProTable/index.d.ts +0 -7
- package/lib/ProTable/index.js +10 -13
- package/lib/ProTable/propsType.d.ts +2 -3
- package/lib/ProTable/style/index.less +4 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +0 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +145 -0
- package/lib/ProThemeTools/index.d.ts +4 -8
- package/lib/ProThemeTools/index.js +88 -48
- package/lib/ProThemeTools/style/index.less +1 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +34 -27
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +0 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -26
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/lib/ProTree/components/Tree.js +6 -13
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +8 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +10 -20
- package/lib/ProTreeModal/style/index.less +12 -3
- package/lib/ProUpload/components/ButtonRender.js +4 -7
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +171 -12
- package/lib/ProViewer/index.js +30 -36
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProViewer/style/index.less +0 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +34 -21
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +14 -3
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/index.less +1 -1
- package/lib/style/theme/antd.less +36 -48
- package/lib/style/theme/base.less +90 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +41 -2
- package/package.json +37 -25
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -9
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -208
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -110
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -265
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -101
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -47
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -276
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -186
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -98
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -186
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -321
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -217
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -117
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -271
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -284
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -72
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -192
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -192
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -598
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -329
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
package/lib/ProViewer/index.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
require("antd/es/modal/style");
|
|
10
|
-
var _modal = _interopRequireDefault(require("antd/es/modal"));
|
|
11
|
-
require("antd/es/image/style");
|
|
12
|
-
var _image = _interopRequireDefault(require("antd/es/image"));
|
|
13
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
14
|
-
require("antd/es/button/style");
|
|
15
|
-
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
16
10
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
17
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
18
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
13
|
var _ahooks = require("ahooks");
|
|
14
|
+
var _antd = require("antd");
|
|
20
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
16
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
22
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
var _locale$ProViewer;
|
|
24
18
|
/* eslint-disable jsx-a11y/iframe-has-title */
|
|
19
|
+
|
|
25
20
|
// 用于解析word | excel
|
|
26
21
|
var officeApp = 'https://view.officeapps.live.com/op/view.aspx?src=';
|
|
27
22
|
|
|
@@ -33,16 +28,33 @@ var MIMEType = {
|
|
|
33
28
|
excel: 'application/vnd.ms-excel'
|
|
34
29
|
};
|
|
35
30
|
var ProViewer = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
var _locale$ProViewer;
|
|
32
|
+
var _ref$disabled = _ref.disabled,
|
|
33
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
34
|
+
_ref$mode = _ref.mode,
|
|
35
|
+
mode = _ref$mode === void 0 ? 'page' : _ref$mode,
|
|
36
|
+
_ref$fileType = _ref.fileType,
|
|
37
|
+
fileType = _ref$fileType === void 0 ? 'pdf' : _ref$fileType,
|
|
38
|
+
_ref$modalProps = _ref.modalProps,
|
|
39
|
+
modalProps = _ref$modalProps === void 0 ? {
|
|
40
|
+
width: '1200px',
|
|
41
|
+
height: '650px',
|
|
42
|
+
centered: true,
|
|
43
|
+
title: _locale.default === null || _locale.default === void 0 || (_locale$ProViewer = _locale.default.ProViewer) === null || _locale$ProViewer === void 0 ? void 0 : _locale$ProViewer.preview,
|
|
44
|
+
footer: null,
|
|
45
|
+
style: {
|
|
46
|
+
padding: 0
|
|
47
|
+
}
|
|
48
|
+
} : _ref$modalProps,
|
|
49
|
+
_ref$buttonProps = _ref.buttonProps,
|
|
50
|
+
buttonProps = _ref$buttonProps === void 0 ? {
|
|
51
|
+
type: 'link'
|
|
52
|
+
} : _ref$buttonProps,
|
|
40
53
|
src = _ref.src,
|
|
41
54
|
onClick = _ref.onClick,
|
|
42
55
|
previewFile = _ref.previewFile,
|
|
43
56
|
previewData = _ref.previewData,
|
|
44
|
-
children = _ref.children
|
|
45
|
-
buttonProps = _ref.buttonProps;
|
|
57
|
+
children = _ref.children;
|
|
46
58
|
var ProViewerRef = (0, _react.useRef)(null);
|
|
47
59
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
48
60
|
imgVisible: false,
|
|
@@ -171,13 +183,13 @@ var ProViewer = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
171
183
|
}, [previewData]);
|
|
172
184
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
173
185
|
className: "pro-viewer",
|
|
174
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
186
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
175
187
|
disabled: disabled || !url && !previewFile,
|
|
176
188
|
ref: ProViewerRef,
|
|
177
189
|
onClick: previewHandle
|
|
178
190
|
}, buttonProps), {}, {
|
|
179
191
|
children: children
|
|
180
|
-
})), mode && fileType === 'img' && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
192
|
+
})), mode && fileType === 'img' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Image, {
|
|
181
193
|
src: url,
|
|
182
194
|
preview: {
|
|
183
195
|
visible: imgVisible,
|
|
@@ -187,13 +199,13 @@ var ProViewer = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
187
199
|
});
|
|
188
200
|
}
|
|
189
201
|
}
|
|
190
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
202
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Modal, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
191
203
|
onCancel: () => {
|
|
192
204
|
setState({
|
|
193
205
|
modalVisible: false
|
|
194
206
|
});
|
|
195
207
|
},
|
|
196
|
-
|
|
208
|
+
open: modalVisible
|
|
197
209
|
}, modalProps), {}, {
|
|
198
210
|
children: url && /*#__PURE__*/(0, _jsxRuntime.jsx)("iframe", {
|
|
199
211
|
title: "pro-viewer",
|
|
@@ -206,22 +218,4 @@ var ProViewer = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
206
218
|
}))]
|
|
207
219
|
});
|
|
208
220
|
});
|
|
209
|
-
ProViewer.defaultProps = {
|
|
210
|
-
modalProps: {
|
|
211
|
-
width: '1200px',
|
|
212
|
-
height: '650px',
|
|
213
|
-
centered: true,
|
|
214
|
-
title: _locale.default === null || _locale.default === void 0 || (_locale$ProViewer = _locale.default.ProViewer) === null || _locale$ProViewer === void 0 ? void 0 : _locale$ProViewer.preview,
|
|
215
|
-
footer: null,
|
|
216
|
-
bodyStyle: {
|
|
217
|
-
padding: 0
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
buttonProps: {
|
|
221
|
-
type: 'link'
|
|
222
|
-
},
|
|
223
|
-
mode: 'page',
|
|
224
|
-
fileType: 'pdf',
|
|
225
|
-
disabled: false
|
|
226
|
-
};
|
|
227
221
|
var _default = exports.default = ProViewer;
|
|
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var
|
|
9
|
+
var _antd = require("antd");
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
var ProWaterMark = props => {
|
|
13
13
|
var content = props.content;
|
|
14
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
15
15
|
className: "pro-water-mark",
|
|
16
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
17
|
-
|
|
18
|
-
monitor: true,
|
|
16
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Watermark, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
17
|
+
content: content,
|
|
19
18
|
children: props === null || props === void 0 ? void 0 : props.children
|
|
20
19
|
}))
|
|
21
20
|
});
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
export interface ProWaterMarkType {
|
|
2
3
|
/**
|
|
3
|
-
* @description
|
|
4
|
-
* @default
|
|
4
|
+
* @description 水印内容
|
|
5
|
+
* @default -
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
children?: ReactNode;
|
|
7
8
|
/**
|
|
8
9
|
* @description 水印文本, 为数组时表示多行水印
|
|
9
10
|
* @default -
|
|
10
11
|
*/
|
|
11
|
-
content
|
|
12
|
-
/**
|
|
13
|
-
* @description 是否全局设置水印
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
isBody?: boolean;
|
|
12
|
+
content: string | string[];
|
|
17
13
|
/**
|
|
18
14
|
* @description 水印层级
|
|
19
15
|
* @default 9999
|
|
@@ -34,11 +30,6 @@ export interface ProWaterMarkType {
|
|
|
34
30
|
* @default 64
|
|
35
31
|
*/
|
|
36
32
|
height?: number;
|
|
37
|
-
/**
|
|
38
|
-
* @description 水印透明度
|
|
39
|
-
* @default 0.15
|
|
40
|
-
*/
|
|
41
|
-
opacity?: number;
|
|
42
33
|
/**
|
|
43
34
|
* @description 旋转的角度
|
|
44
35
|
* @default -22
|
|
@@ -59,11 +50,6 @@ export interface ProWaterMarkType {
|
|
|
59
50
|
* @default 'normal'
|
|
60
51
|
*/
|
|
61
52
|
fontStyle?: 'normal' | 'italic';
|
|
62
|
-
/**
|
|
63
|
-
* @description 规定字体变体
|
|
64
|
-
* @default normal
|
|
65
|
-
*/
|
|
66
|
-
fontVariant?: 'normal' | 'small-caps';
|
|
67
53
|
/**
|
|
68
54
|
* @description 设置字体颜色
|
|
69
55
|
* @default #000
|
|
@@ -74,10 +60,5 @@ export interface ProWaterMarkType {
|
|
|
74
60
|
* @default sans-serif
|
|
75
61
|
*/
|
|
76
62
|
fontFamily?: string;
|
|
77
|
-
/**
|
|
78
|
-
* @description 展示模式,interval表示错行展示
|
|
79
|
-
* @default 'interval'
|
|
80
|
-
*/
|
|
81
|
-
mode?: 'repeat' | 'interval';
|
|
82
63
|
}
|
|
83
64
|
export type ProWaterMarkProps = ProWaterMarkType;
|
package/lib/global.less
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* @import '~antd/dist/reset.css';*/
|
|
1
2
|
@import './style/index.less';
|
|
2
3
|
|
|
3
4
|
pre {
|
|
@@ -10,7 +11,7 @@ pre {
|
|
|
10
11
|
scrollbar-highlight-color: #979797;
|
|
11
12
|
scrollbar-3dlight-color: #979797;
|
|
12
13
|
|
|
13
|
-
::-webkit-scrollbar
|
|
14
|
+
::-webkit-scrollbar {
|
|
14
15
|
width: 16px;
|
|
15
16
|
background: transparent;
|
|
16
17
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="typings" />
|
|
2
|
-
export { default as ProLayout
|
|
2
|
+
export { default as ProLayout } from './ProLayout';
|
|
3
3
|
export { default as ProStep } from './ProStep';
|
|
4
4
|
export { default as ProTabs } from './ProTabs';
|
|
5
|
+
export { ProCollapse, ProFooter, ProHeader } from './ProLayout/components';
|
|
5
6
|
export { default as ProTable } from './ProTable';
|
|
6
7
|
export { default as ProTooltip } from './ProTooltip';
|
|
7
8
|
export { default as ProViewer } from './ProViewer';
|
|
@@ -21,12 +22,11 @@ export { default as ProConfigProvider } from './ProConfigProvider';
|
|
|
21
22
|
export { default as FormsProvider } from './FormsProvider';
|
|
22
23
|
export { default as ProUpload } from './ProUpload';
|
|
23
24
|
export { default as ProThemeTools } from './ProThemeTools';
|
|
25
|
+
export { ThemeProvider, useTheme } from './ProThemeTools';
|
|
24
26
|
export { default as ProAction } from './ProAction';
|
|
25
27
|
export * from './ProConfigProvider';
|
|
26
28
|
export * from './locale';
|
|
27
29
|
export { default as ProBackBtn } from './ProLayout/components/ProHeader/components/ProBackBtn';
|
|
28
|
-
export { default as ProEditableTable } from './old/ProEditableTable';
|
|
29
|
-
export { default as ProCertValidity } from './old/ProCertValidity';
|
|
30
30
|
export type { ProFormType, ProColumnProps, ProFormColumnType } from './ProForm/propsType';
|
|
31
31
|
export type { ProFormComponentType } from './ProForm/components';
|
|
32
32
|
export type { ProTableType, ProTableColumnType, ProTableSummaryType, ProTableUseAntdTableType, ProTableProps, ProTableSummaryProps, ProTableColumn, UseAntdTableState } from './ProTable/propsType';
|
package/lib/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
var _exportNames = {
|
|
9
9
|
ProLayout: true,
|
|
10
|
-
useProLayoutTabs: true,
|
|
11
10
|
ProStep: true,
|
|
12
11
|
ProTabs: true,
|
|
12
|
+
ProCollapse: true,
|
|
13
|
+
ProFooter: true,
|
|
14
|
+
ProHeader: true,
|
|
13
15
|
ProTable: true,
|
|
14
16
|
ProTooltip: true,
|
|
15
17
|
ProViewer: true,
|
|
@@ -28,10 +30,10 @@ var _exportNames = {
|
|
|
28
30
|
FormsProvider: true,
|
|
29
31
|
ProUpload: true,
|
|
30
32
|
ProThemeTools: true,
|
|
33
|
+
ThemeProvider: true,
|
|
34
|
+
useTheme: true,
|
|
31
35
|
ProAction: true,
|
|
32
|
-
ProBackBtn: true
|
|
33
|
-
ProEditableTable: true,
|
|
34
|
-
ProCertValidity: true
|
|
36
|
+
ProBackBtn: true
|
|
35
37
|
};
|
|
36
38
|
Object.defineProperty(exports, "FormsProvider", {
|
|
37
39
|
enumerable: true,
|
|
@@ -51,10 +53,10 @@ Object.defineProperty(exports, "ProBackBtn", {
|
|
|
51
53
|
return _ProBackBtn.default;
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
|
-
Object.defineProperty(exports, "
|
|
56
|
+
Object.defineProperty(exports, "ProCollapse", {
|
|
55
57
|
enumerable: true,
|
|
56
58
|
get: function get() {
|
|
57
|
-
return
|
|
59
|
+
return _components.ProCollapse;
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
Object.defineProperty(exports, "ProConfigProvider", {
|
|
@@ -87,16 +89,16 @@ Object.defineProperty(exports, "ProEditTable", {
|
|
|
87
89
|
return _ProEditTable.default;
|
|
88
90
|
}
|
|
89
91
|
});
|
|
90
|
-
Object.defineProperty(exports, "
|
|
92
|
+
Object.defineProperty(exports, "ProEnum", {
|
|
91
93
|
enumerable: true,
|
|
92
94
|
get: function get() {
|
|
93
|
-
return
|
|
95
|
+
return _ProEnum.default;
|
|
94
96
|
}
|
|
95
97
|
});
|
|
96
|
-
Object.defineProperty(exports, "
|
|
98
|
+
Object.defineProperty(exports, "ProFooter", {
|
|
97
99
|
enumerable: true,
|
|
98
100
|
get: function get() {
|
|
99
|
-
return
|
|
101
|
+
return _components.ProFooter;
|
|
100
102
|
}
|
|
101
103
|
});
|
|
102
104
|
Object.defineProperty(exports, "ProForm", {
|
|
@@ -111,6 +113,12 @@ Object.defineProperty(exports, "ProFormProvider", {
|
|
|
111
113
|
return _ProForm.ProFormProvider;
|
|
112
114
|
}
|
|
113
115
|
});
|
|
116
|
+
Object.defineProperty(exports, "ProHeader", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _components.ProHeader;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
114
122
|
Object.defineProperty(exports, "ProIcon", {
|
|
115
123
|
enumerable: true,
|
|
116
124
|
get: function get() {
|
|
@@ -183,15 +191,22 @@ Object.defineProperty(exports, "ProWaterMark", {
|
|
|
183
191
|
return _ProWaterMark.default;
|
|
184
192
|
}
|
|
185
193
|
});
|
|
186
|
-
Object.defineProperty(exports, "
|
|
194
|
+
Object.defineProperty(exports, "ThemeProvider", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function get() {
|
|
197
|
+
return _ProThemeTools.ThemeProvider;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, "useTheme", {
|
|
187
201
|
enumerable: true,
|
|
188
202
|
get: function get() {
|
|
189
|
-
return
|
|
203
|
+
return _ProThemeTools.useTheme;
|
|
190
204
|
}
|
|
191
205
|
});
|
|
192
|
-
var _ProLayout =
|
|
206
|
+
var _ProLayout = _interopRequireDefault(require("./ProLayout"));
|
|
193
207
|
var _ProStep = _interopRequireDefault(require("./ProStep"));
|
|
194
208
|
var _ProTabs = _interopRequireDefault(require("./ProTabs"));
|
|
209
|
+
var _components = require("./ProLayout/components");
|
|
195
210
|
var _ProTable = _interopRequireDefault(require("./ProTable"));
|
|
196
211
|
var _ProTooltip = _interopRequireDefault(require("./ProTooltip"));
|
|
197
212
|
var _ProViewer = _interopRequireDefault(require("./ProViewer"));
|
|
@@ -200,15 +215,15 @@ var _ProDrawerForm = _interopRequireDefault(require("./ProDrawerForm"));
|
|
|
200
215
|
var _ProEditLabel = _interopRequireDefault(require("./ProEditLabel"));
|
|
201
216
|
var _ProStepTab = _interopRequireDefault(require("./ProStepTab"));
|
|
202
217
|
var _ProForm = _interopRequireWildcard(require("./ProForm"));
|
|
203
|
-
var
|
|
204
|
-
Object.keys(
|
|
218
|
+
var _components2 = require("./ProForm/components");
|
|
219
|
+
Object.keys(_components2).forEach(function (key) {
|
|
205
220
|
if (key === "default" || key === "__esModule") return;
|
|
206
221
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
207
|
-
if (key in exports && exports[key] ===
|
|
222
|
+
if (key in exports && exports[key] === _components2[key]) return;
|
|
208
223
|
Object.defineProperty(exports, key, {
|
|
209
224
|
enumerable: true,
|
|
210
225
|
get: function get() {
|
|
211
|
-
return
|
|
226
|
+
return _components2[key];
|
|
212
227
|
}
|
|
213
228
|
});
|
|
214
229
|
});
|
|
@@ -231,7 +246,7 @@ Object.keys(_ProConfigProvider).forEach(function (key) {
|
|
|
231
246
|
});
|
|
232
247
|
var _FormsProvider = _interopRequireDefault(require("./FormsProvider"));
|
|
233
248
|
var _ProUpload = _interopRequireDefault(require("./ProUpload"));
|
|
234
|
-
var _ProThemeTools =
|
|
249
|
+
var _ProThemeTools = _interopRequireWildcard(require("./ProThemeTools"));
|
|
235
250
|
var _ProAction = _interopRequireDefault(require("./ProAction"));
|
|
236
251
|
var _locale = require("./locale");
|
|
237
252
|
Object.keys(_locale).forEach(function (key) {
|
|
@@ -246,8 +261,6 @@ Object.keys(_locale).forEach(function (key) {
|
|
|
246
261
|
});
|
|
247
262
|
});
|
|
248
263
|
var _ProBackBtn = _interopRequireDefault(require("./ProLayout/components/ProHeader/components/ProBackBtn"));
|
|
249
|
-
var _ProEditableTable = _interopRequireDefault(require("./old/ProEditableTable"));
|
|
250
|
-
var _ProCertValidity = _interopRequireDefault(require("./old/ProCertValidity"));
|
|
251
264
|
var _tokens = require("./tokens");
|
|
252
265
|
Object.keys(_tokens).forEach(function (key) {
|
|
253
266
|
if (key === "default" || key === "__esModule") return;
|
package/lib/locale/en_US.js
CHANGED
|
@@ -68,7 +68,7 @@ var _default = exports.default = {
|
|
|
68
68
|
unExpand: 'Put it all away',
|
|
69
69
|
expand: 'Expand all',
|
|
70
70
|
all: 'Select all',
|
|
71
|
-
emptyTips: "
|
|
71
|
+
emptyTips: "what you were looking for couldn't be found"
|
|
72
72
|
},
|
|
73
73
|
ProUpload: {
|
|
74
74
|
exampleTitle: 'View sample',
|
package/lib/locale/index.d.ts
CHANGED
package/lib/locale/index.js
CHANGED
|
@@ -7,9 +7,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
exports.formatMessage = formatMessage;
|
|
9
9
|
exports.setLanguage = void 0;
|
|
10
|
-
var
|
|
10
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
11
|
+
require("dayjs/locale/zh-cn");
|
|
12
|
+
require("dayjs/locale/en");
|
|
11
13
|
var _zh_CN = _interopRequireDefault(require("./zh_CN"));
|
|
12
14
|
var _en_US = _interopRequireDefault(require("./en_US"));
|
|
15
|
+
// 导入dayjs的中文locale包
|
|
16
|
+
|
|
17
|
+
// 设置默认语言为中文
|
|
18
|
+
_dayjs.default.locale('zh-cn');
|
|
13
19
|
var activeLang = localStorage.getItem('locale') || 'zh-CN';
|
|
14
20
|
var langMap = {
|
|
15
21
|
'zh-CN': _zh_CN.default,
|
|
@@ -24,18 +30,23 @@ var langMap = {
|
|
|
24
30
|
var setLanguage = (lang, isReload) => {
|
|
25
31
|
activeLang = lang;
|
|
26
32
|
localStorage.setItem('locale', lang);
|
|
27
|
-
|
|
33
|
+
// 将语言代码转换为dayjs支持的格式
|
|
34
|
+
var dayjsLocale = lang.toLowerCase() === 'zh-cn' ? 'zh-cn' : 'en';
|
|
35
|
+
_dayjs.default.locale(dayjsLocale);
|
|
28
36
|
if (isReload) {
|
|
29
37
|
window.location.reload();
|
|
30
38
|
}
|
|
31
39
|
};
|
|
32
40
|
|
|
41
|
+
// 初始化时设置语言
|
|
42
|
+
exports.setLanguage = setLanguage;
|
|
43
|
+
setLanguage(activeLang);
|
|
44
|
+
|
|
33
45
|
/**
|
|
34
46
|
* @param str 待替换字符串 eg: 我是{name},年龄{age}
|
|
35
47
|
* @param variables 变量对象 {name: 'xx', age: 23}
|
|
36
48
|
* @returns 替换后字符串 我是xx,年龄23
|
|
37
49
|
*/
|
|
38
|
-
exports.setLanguage = setLanguage;
|
|
39
50
|
function formatMessage(str, variables) {
|
|
40
51
|
return str.replace(/{\s*([\w\s]+)\s*}/g, (match, variable) => {
|
|
41
52
|
var trimmedVariable = variable.trim();
|
package/lib/locale/zh_CN.js
CHANGED
package/lib/style/index.less
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
-
@import './index';
|
|
1
|
+
@import './base';
|
|
4
2
|
|
|
5
3
|
@zat-disabled-color: #bcbcbc;
|
|
6
4
|
|
|
@@ -71,6 +69,7 @@
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
|
|
72
|
+
|
|
74
73
|
.@{ant-prefix}-form-item-explain-error {
|
|
75
74
|
.set-text-size();
|
|
76
75
|
}
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
.@{ant-prefix}-form-item {
|
|
91
|
-
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
|
|
90
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
|
|
@@ -104,6 +103,10 @@
|
|
|
104
103
|
|
|
105
104
|
// ant-table
|
|
106
105
|
.@{ant-prefix}-table {
|
|
106
|
+
|
|
107
|
+
.@{ant-prefix}-table-row.@{ant-prefix}-table-row-selected >.@{ant-prefix}-table-cell-row-hover{
|
|
108
|
+
background-color: #e6f4ff !important;
|
|
109
|
+
}
|
|
107
110
|
.@{ant-prefix}-empty-normal {
|
|
108
111
|
margin: calc(var(--zaui-space-size-lg; 32px) * var(--zaui-size; 1)) 0;
|
|
109
112
|
}
|
|
@@ -165,7 +168,7 @@
|
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
tr.@{ant-prefix}-table-row:hover td {
|
|
168
|
-
background-color: @zaui-table-hover-bg
|
|
171
|
+
background-color: @zaui-table-hover-bg;
|
|
169
172
|
}
|
|
170
173
|
|
|
171
174
|
& > tr > td {
|
|
@@ -303,7 +306,7 @@
|
|
|
303
306
|
}
|
|
304
307
|
|
|
305
308
|
.@{ant-prefix}-table-row:nth-child(odd) {
|
|
306
|
-
background-color: @zaui-table-strip-bg
|
|
309
|
+
background-color: @zaui-table-strip-bg;
|
|
307
310
|
|
|
308
311
|
& td {
|
|
309
312
|
background-color: @zaui-table-strip-bg !important;
|
|
@@ -334,6 +337,12 @@
|
|
|
334
337
|
}
|
|
335
338
|
}
|
|
336
339
|
|
|
340
|
+
&.@{ant-prefix}-table-tbody-virtual {
|
|
341
|
+
.@{ant-prefix}-table-row:nth-child(odd),.@{ant-prefix}-table-row:nth-child(even) {
|
|
342
|
+
background-color: transparent !important;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
337
346
|
.@{ant-prefix}-table-row:nth-child(odd) {
|
|
338
347
|
background-color: @zaui-table-strip-bg;
|
|
339
348
|
|
|
@@ -342,6 +351,8 @@
|
|
|
342
351
|
}
|
|
343
352
|
}
|
|
344
353
|
}
|
|
354
|
+
|
|
355
|
+
|
|
345
356
|
}
|
|
346
357
|
}
|
|
347
358
|
|
|
@@ -412,7 +423,7 @@
|
|
|
412
423
|
&.@{ant-prefix}-btn-link[disabled]:hover,
|
|
413
424
|
&.@{ant-prefix}-btn-link[disabled]:focus,
|
|
414
425
|
&.@{ant-prefix}-btn-link[disabled]:active {
|
|
415
|
-
color: @zat-disabled-color;
|
|
426
|
+
color: @zat-disabled-color !important;
|
|
416
427
|
text-shadow: none;
|
|
417
428
|
background: none;
|
|
418
429
|
border-color: none;
|
|
@@ -421,7 +432,12 @@
|
|
|
421
432
|
}
|
|
422
433
|
|
|
423
434
|
&.@{ant-prefix}-btn-link {
|
|
424
|
-
.set-brand-color();
|
|
435
|
+
.set-brand-color() !important;
|
|
436
|
+
background: none !important;
|
|
437
|
+
box-shadow: none !important;
|
|
438
|
+
&:hover {
|
|
439
|
+
color: @zaui-brand !important;
|
|
440
|
+
}
|
|
425
441
|
}
|
|
426
442
|
}
|
|
427
443
|
|
|
@@ -656,35 +672,6 @@
|
|
|
656
672
|
width: 100%;
|
|
657
673
|
}
|
|
658
674
|
|
|
659
|
-
.@{ant-prefix}-input-textarea {
|
|
660
|
-
position: relative;
|
|
661
|
-
|
|
662
|
-
textarea.@{ant-prefix}-input {
|
|
663
|
-
padding-bottom: 20px;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
&.@{ant-prefix}-input-textarea-show-count.@{ant-prefix}-input-textarea-in-form-item {
|
|
667
|
-
&::after {
|
|
668
|
-
background: transparent;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
&.disabled {
|
|
672
|
-
&::after {
|
|
673
|
-
background: #f2f2f2;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
&::after {
|
|
678
|
-
position: absolute;
|
|
679
|
-
right: 16px;
|
|
680
|
-
bottom: 1px;
|
|
681
|
-
width: calc(100% - 18px);
|
|
682
|
-
margin-bottom: 0;
|
|
683
|
-
text-align: right;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
675
|
// 间隔
|
|
689
676
|
.@{ant-prefix}-space {
|
|
690
677
|
&.@{ant-prefix}-space-vertical {
|
|
@@ -725,6 +712,16 @@
|
|
|
725
712
|
|
|
726
713
|
// tooltip样式重载
|
|
727
714
|
.@{ant-prefix}-tooltip {
|
|
715
|
+
> .@{ant-prefix}-tooltip-arrow {
|
|
716
|
+
&::before,
|
|
717
|
+
&::after {
|
|
718
|
+
background: linear-gradient(
|
|
719
|
+
to right bottom,
|
|
720
|
+
rgba(255, 255, 255, 0.95),
|
|
721
|
+
rgba(255, 255, 255, 1)
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
728
725
|
> .@{ant-prefix}-tooltip-content {
|
|
729
726
|
> .@{ant-prefix}-tooltip-inner {
|
|
730
727
|
max-height: 360px;
|
|
@@ -736,24 +733,15 @@
|
|
|
736
733
|
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
737
734
|
&::selection {
|
|
738
735
|
color: inherit !important;
|
|
739
|
-
background: rgba(
|
|
736
|
+
background: rgba(0, 106, 255, 0.3) !important;
|
|
740
737
|
}
|
|
741
738
|
> div {
|
|
742
739
|
&::selection {
|
|
743
740
|
color: inherit !important;
|
|
744
|
-
background: rgba(
|
|
741
|
+
background: rgba(0, 106, 255, 0.3) !important;
|
|
745
742
|
}
|
|
746
743
|
}
|
|
747
744
|
}
|
|
748
|
-
> .@{ant-prefix}-tooltip-arrow {
|
|
749
|
-
> .@{ant-prefix}-tooltip-arrow-content {
|
|
750
|
-
--antd-arrow-background-color: linear-gradient(
|
|
751
|
-
to right bottom,
|
|
752
|
-
rgba(255, 255, 255, 0.95),
|
|
753
|
-
rgba(255, 255, 255, 1)
|
|
754
|
-
);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
745
|
}
|
|
758
746
|
}
|
|
759
747
|
|