@zat-design/sisyphus-react 4.0.0-beta.8 → 4.0.0
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/babel.config.js.backup +13 -0
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProAction/index.js +14 -4
- package/es/ProConfigProvider/index.js +11 -2
- package/es/ProDownload/index.js +16 -5
- package/es/ProDownload/utils.js +8 -3
- package/es/ProDrawerForm/components/ProDrawer/index.js +14 -4
- package/es/ProDrawerForm/components/ProModal/index.js +14 -4
- package/es/ProDrawerForm/index.js +13 -3
- package/es/ProEditLabel/components/RenderProForm.js +5 -1
- package/es/ProEditLabel/index.js +16 -5
- package/es/ProEditTable/components/ActionButton/index.js +5 -1
- package/es/ProEditTable/components/RcTable/BaseTable.js +13 -3
- package/es/ProEditTable/components/RcTable/DraggableTable.js +12 -5
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +7 -2
- package/es/ProEditTable/components/RenderField/index.js +54 -29
- package/es/ProEditTable/components/RenderToolbar/index.js +10 -4
- package/es/ProEditTable/index.js +16 -5
- package/es/ProEditTable/propsType.d.ts +12 -6
- package/es/ProEditTable/style/index.less +30 -3
- package/es/ProEditTable/utils/config.js +8 -3
- package/es/ProEditTable/utils/index.js +13 -9
- package/es/ProEditTable/utils/tools.js +22 -10
- package/es/ProEditTable/utils/useEditTableError.js +6 -1
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +16 -7
- package/es/ProEnum/components/Group.js +6 -1
- package/es/ProEnum/components/Tag.js +6 -1
- package/es/ProEnum/hooks/useEnum.d.ts +8 -0
- package/es/ProEnum/hooks/useEnum.js +76 -4
- package/es/ProEnum/hooks/useEnumRequest.js +8 -3
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +8 -3
- package/es/ProEnum/index.js +25 -15
- package/es/ProEnum/utils/eventCenter.js +3 -1
- package/es/ProEnum/utils/frequentEnum.js +5 -1
- package/es/ProEnum/utils/index.js +2 -1
- package/es/ProForm/components/FormFooter/index.js +5 -1
- package/es/ProForm/components/base/Checkbox/index.js +7 -2
- package/es/ProForm/components/base/DatePicker/index.js +7 -2
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +6 -1
- package/es/ProForm/components/base/Input/index.js +7 -2
- package/es/ProForm/components/base/InputNumber/index.js +13 -3
- package/es/ProForm/components/base/Radio/index.js +7 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +7 -1
- package/es/ProForm/components/base/RangePicker/index.js +50 -4
- package/es/ProForm/components/base/RangePicker/useDateRange.js +6 -1
- package/es/ProForm/components/base/Select/index.js +7 -2
- package/es/ProForm/components/base/Switch/index.js +7 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.js +7 -2
- package/es/ProForm/components/base/TextArea/index.js +7 -2
- package/es/ProForm/components/base/TimePicker/index.js +7 -2
- package/es/ProForm/components/combination/Container/index.js +5 -1
- package/es/ProForm/components/combination/Container/style/index.less +5 -0
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -0
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +94 -7
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +63 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +14 -4
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +1 -0
- package/es/ProForm/components/combination/FormList/components/LineFields.js +9 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +48 -13
- package/es/ProForm/components/combination/FormList/index.js +108 -61
- package/es/ProForm/components/combination/FormList/propsType.d.ts +7 -2
- package/es/ProForm/components/combination/FormList/style/index.less +41 -0
- package/es/ProForm/components/combination/FormList/utils.d.ts +6 -0
- package/es/ProForm/components/combination/FormList/utils.js +17 -0
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +70 -3
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +351 -0
- package/es/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
- package/es/ProForm/components/combination/Group/hooks/index.js +107 -4
- package/es/ProForm/components/combination/Group/index.d.ts +3 -4
- package/es/ProForm/components/combination/Group/index.js +108 -24
- package/es/ProForm/components/combination/Group/propsType.d.ts +44 -1
- package/es/ProForm/components/combination/Group/style/index.less +425 -3
- package/es/ProForm/components/combination/Group/utils/index.d.ts +154 -0
- package/es/ProForm/components/combination/Group/utils/index.js +428 -0
- package/es/ProForm/components/combination/ProCascader/index.js +13 -3
- package/es/ProForm/components/combination/ProCascader/utils/index.js +7 -2
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +14 -4
- package/es/ProForm/components/combination/ProModalSelect/index.js +16 -5
- package/es/ProForm/components/combination/ProNumberRange/index.js +24 -12
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
- package/es/ProForm/components/combination/ProRangeLimit/index.js +13 -3
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +6 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.js +13 -3
- package/es/ProForm/components/render/ChangedWrapper.js +7 -2
- package/es/ProForm/components/render/ConfirmWrapper.js +10 -4
- package/es/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
- package/es/ProForm/components/render/CustomComponentViewWrapper.js +120 -0
- package/es/ProForm/components/render/Render.js +71 -16
- package/es/ProForm/components/render/RenderFields.js +7 -2
- package/es/ProForm/index.js +13 -3
- package/es/ProForm/propsType.d.ts +7 -0
- package/es/ProForm/style/index.less +11 -2
- package/es/ProForm/utils/index.js +7 -2
- package/es/ProForm/utils/rulesCreator.js +5 -1
- package/es/ProForm/utils/transformValue.js +5 -1
- package/es/ProForm/utils/useForm.js +15 -5
- package/es/ProForm/utils/useShouldUpdate.js +93 -35
- package/es/ProForm/utils/useWatch.js +9 -4
- package/es/ProForm/utils/valueType.js +11 -2
- package/es/ProIcon/index.js +13 -3
- package/es/ProIcon/utils/index.js +5 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +19 -14
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +48 -31
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
- package/es/ProLayout/components/Layout/Notice/style/index.less +4 -0
- package/es/ProLayout/components/ProCollapse/index.js +5 -1
- package/es/ProLayout/components/ProCollapse/style/index.less +9 -9
- package/es/ProLayout/components/ProFooter/index.js +6 -2
- package/es/ProLayout/components/ProHeader/index.js +33 -19
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +100 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.js +61 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.js +5 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +14 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +26 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +96 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +364 -0
- package/es/ProLayout/components/TabsManager/index.d.ts +8 -0
- package/es/ProLayout/components/TabsManager/index.js +180 -0
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
- package/es/ProLayout/components/TabsManager/propTypes.js +16 -0
- package/es/ProLayout/components/TabsManager/style/index.less +179 -0
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
- package/es/ProLayout/components/TabsManager/utils/index.js +106 -0
- package/es/ProLayout/index.d.ts +21 -4
- package/es/ProLayout/index.js +107 -14
- package/es/ProLayout/propTypes.d.ts +139 -1
- package/es/ProLayout/propTypes.js +37 -1
- package/es/ProLayout/utils/index.js +16 -7
- package/es/ProSelect/components/AdaptiveTooltip.js +6 -1
- package/es/ProSelect/index.js +13 -3
- package/es/ProSelect/utils/index.js +3 -1
- package/es/ProStep/components/Item/index.js +8 -2
- package/es/ProStep/components/Listener/index.js +10 -4
- package/es/ProStep/components/Step/index.js +11 -2
- package/es/ProStep/index.js +16 -5
- package/es/ProStep/utils/index.js +5 -1
- package/es/ProStepTab/index.js +19 -8
- package/es/ProTable/components/FormatColumn/index.js +7 -2
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -2
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +10 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +5 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +7 -2
- package/es/ProTable/components/RenderColumn/index.js +11 -2
- package/es/ProTable/components/RenderTabs/index.js +11 -2
- package/es/ProTable/components/TableResizable/index.js +13 -3
- package/es/ProTable/components/TooltipTitle/index.js +3 -5
- package/es/ProTable/hooks/useAntdTable.js +69 -35
- package/es/ProTable/index.js +16 -5
- package/es/ProTable/style/index.less +3 -0
- package/es/ProTable/utils/index.js +6 -1
- package/es/ProTabs/index.js +13 -3
- package/es/ProThemeTools/component/ProTools/index.js +11 -2
- package/es/ProThemeTools/context/ThemeContext.js +11 -2
- package/es/ProThemeTools/index.js +13 -3
- package/es/ProThemeTools/utils/index.js +5 -1
- package/es/ProTooltip/index.js +13 -3
- package/es/ProTree/components/CloseIcon.js +5 -1
- package/es/ProTree/components/List.js +7 -2
- package/es/ProTree/components/ProTree.js +16 -5
- package/es/ProTree/components/ProTreeSelect/index.js +119 -75
- package/es/ProTree/components/Tree.js +16 -5
- package/es/ProTree/index.js +5 -1
- package/es/ProTree/utils.js +8 -2
- package/es/ProTreeModal/components/Cascader.js +11 -2
- package/es/ProTreeModal/components/CloseIcon.js +5 -1
- package/es/ProTreeModal/components/List.js +6 -1
- package/es/ProTreeModal/components/SortableItem.js +5 -1
- package/es/ProTreeModal/components/Tree.js +13 -3
- package/es/ProTreeModal/components/Trigger.js +11 -2
- package/es/ProTreeModal/index.js +11 -2
- package/es/ProTreeModal/style/index.less +6 -0
- package/es/ProTreeModal/utils.js +8 -2
- package/es/ProUpload/components/ButtonRender.js +8 -3
- package/es/ProUpload/components/DragRender.d.ts +1 -0
- package/es/ProUpload/components/DragRender.js +10 -2
- package/es/ProUpload/components/DraggableUploadListItem.js +5 -1
- package/es/ProUpload/components/Example.js +11 -2
- package/es/ProUpload/components/ImageRender.js +14 -4
- package/es/ProUpload/index.js +17 -5
- package/es/ProUpload/propsType.d.ts +5 -0
- package/es/ProViewer/index.js +14 -4
- package/es/ProWaterMark/index.js +5 -1
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -0
- package/es/locale/en_US.d.ts +9 -0
- package/es/locale/en_US.js +9 -0
- package/es/locale/zh_CN.d.ts +9 -0
- package/es/locale/zh_CN.js +9 -0
- package/es/style/theme/antd.less +11 -35
- package/es/utils/index.js +6 -1
- package/jest.config.js +3 -1
- package/lib/FormsProvider/index.js +2 -1
- package/lib/ProAction/index.js +20 -10
- package/lib/ProConfigProvider/index.js +29 -19
- package/lib/ProDownload/index.js +29 -17
- package/lib/ProDownload/utils.js +14 -12
- package/lib/ProDrawerForm/components/ProDrawer/index.js +27 -16
- package/lib/ProDrawerForm/components/ProModal/index.js +21 -10
- package/lib/ProDrawerForm/components/index.js +2 -2
- package/lib/ProDrawerForm/index.js +20 -9
- package/lib/ProEditLabel/components/RenderProForm.js +9 -6
- package/lib/ProEditLabel/index.js +30 -18
- package/lib/ProEditTable/components/ActionButton/index.js +14 -11
- package/lib/ProEditTable/components/RcTable/BaseTable.js +19 -9
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +24 -16
- package/lib/ProEditTable/components/RcTable/index.js +2 -2
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +16 -10
- package/lib/ProEditTable/components/RenderField/index.js +76 -50
- package/lib/ProEditTable/components/RenderToolbar/index.js +18 -12
- package/lib/ProEditTable/components/index.js +2 -2
- package/lib/ProEditTable/index.js +33 -21
- package/lib/ProEditTable/propsType.d.ts +12 -6
- package/lib/ProEditTable/style/index.less +30 -3
- package/lib/ProEditTable/utils/config.js +20 -15
- package/lib/ProEditTable/utils/index.js +22 -18
- package/lib/ProEditTable/utils/tools.js +30 -21
- package/lib/ProEditTable/utils/useEditTableError.js +7 -3
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +17 -9
- package/lib/ProEnum/components/Group.js +8 -3
- package/lib/ProEnum/components/Tag.js +8 -3
- package/lib/ProEnum/hooks/useEnum.d.ts +8 -0
- package/lib/ProEnum/hooks/useEnum.js +76 -4
- package/lib/ProEnum/hooks/useEnumRequest.js +23 -18
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +12 -8
- package/lib/ProEnum/index.js +37 -26
- package/lib/ProEnum/utils/eventCenter.js +4 -3
- package/lib/ProEnum/utils/frequentEnum.js +6 -3
- package/lib/ProEnum/utils/index.js +3 -3
- package/lib/ProForm/components/Container.js +1 -1
- package/lib/ProForm/components/FormFooter/index.js +11 -6
- package/lib/ProForm/components/base/Checkbox/index.js +13 -7
- package/lib/ProForm/components/base/DatePicker/index.js +11 -6
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +7 -3
- package/lib/ProForm/components/base/Input/index.js +11 -6
- package/lib/ProForm/components/base/InputNumber/index.js +21 -10
- package/lib/ProForm/components/base/Radio/index.js +10 -5
- package/lib/ProForm/components/base/RangePicker/index.d.ts +7 -1
- package/lib/ProForm/components/base/RangePicker/index.js +55 -9
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +7 -3
- package/lib/ProForm/components/base/Select/index.js +10 -5
- package/lib/ProForm/components/base/Switch/index.js +10 -5
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +12 -6
- package/lib/ProForm/components/base/TextArea/index.js +10 -5
- package/lib/ProForm/components/base/TimePicker/index.js +10 -5
- package/lib/ProForm/components/combination/Container/index.js +11 -6
- package/lib/ProForm/components/combination/Container/style/index.less +5 -0
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -0
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +108 -20
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +65 -8
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -7
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +1 -0
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +11 -5
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +58 -23
- package/lib/ProForm/components/combination/FormList/index.js +113 -65
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +7 -2
- package/lib/ProForm/components/combination/FormList/style/index.less +41 -0
- package/lib/ProForm/components/combination/FormList/utils.d.ts +6 -0
- package/lib/ProForm/components/combination/FormList/utils.js +20 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -1
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +79 -11
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +360 -0
- package/lib/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
- package/lib/ProForm/components/combination/Group/hooks/index.js +111 -9
- package/lib/ProForm/components/combination/Group/index.d.ts +3 -4
- package/lib/ProForm/components/combination/Group/index.js +111 -27
- package/lib/ProForm/components/combination/Group/propsType.d.ts +44 -1
- package/lib/ProForm/components/combination/Group/style/index.less +425 -3
- package/lib/ProForm/components/combination/Group/utils/index.d.ts +154 -0
- package/lib/ProForm/components/combination/Group/utils/index.js +444 -0
- package/lib/ProForm/components/combination/ProCascader/index.js +20 -10
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +9 -5
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +25 -15
- package/lib/ProForm/components/combination/ProModalSelect/index.js +53 -41
- package/lib/ProForm/components/combination/ProNumberRange/index.js +28 -16
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +29 -18
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +8 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +26 -15
- package/lib/ProForm/components/index.js +2 -2
- package/lib/ProForm/components/render/ChangedWrapper.js +16 -10
- package/lib/ProForm/components/render/ConfirmWrapper.js +19 -13
- package/lib/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
- package/lib/ProForm/components/render/CustomComponentViewWrapper.js +127 -0
- package/lib/ProForm/components/render/Render.js +93 -37
- package/lib/ProForm/components/render/RenderFields.js +15 -9
- package/lib/ProForm/index.js +23 -12
- package/lib/ProForm/propsType.d.ts +7 -0
- package/lib/ProForm/style/index.less +11 -2
- package/lib/ProForm/utils/index.js +12 -8
- package/lib/ProForm/utils/rulesCreator.js +8 -4
- package/lib/ProForm/utils/transformValue.js +6 -3
- package/lib/ProForm/utils/useFieldProps.js +2 -1
- package/lib/ProForm/utils/useForm.js +21 -12
- package/lib/ProForm/utils/useRules.js +1 -1
- package/lib/ProForm/utils/useShouldUpdate.js +94 -37
- package/lib/ProForm/utils/useWatch.js +11 -6
- package/lib/ProForm/utils/valueType.js +15 -6
- package/lib/ProIcon/index.js +26 -16
- package/lib/ProIcon/utils/index.js +7 -4
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Icon/Icon.js +2 -1
- package/lib/ProLayout/components/Layout/Icon/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +24 -19
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +50 -33
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Notice/index.js +1 -1
- package/lib/ProLayout/components/Layout/Notice/style/index.less +4 -0
- package/lib/ProLayout/components/Layout/index.js +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +10 -6
- package/lib/ProLayout/components/ProCollapse/style/index.less +9 -9
- package/lib/ProLayout/components/ProFooter/index.js +8 -4
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +1 -1
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +1 -1
- package/lib/ProLayout/components/ProHeader/components/index.js +2 -2
- package/lib/ProLayout/components/ProHeader/index.js +41 -27
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +106 -0
- package/lib/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/lib/ProLayout/components/TabsManager/components/TabItem.js +67 -0
- package/lib/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
- package/lib/ProLayout/components/TabsManager/components/TabsContext.js +11 -0
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.js +20 -0
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +31 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +103 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +370 -0
- package/lib/ProLayout/components/TabsManager/index.d.ts +8 -0
- package/lib/ProLayout/components/TabsManager/index.js +183 -0
- package/lib/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
- package/lib/ProLayout/components/TabsManager/propTypes.js +22 -0
- package/lib/ProLayout/components/TabsManager/style/index.less +179 -0
- package/lib/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
- package/lib/ProLayout/components/TabsManager/utils/index.js +119 -0
- package/lib/ProLayout/components/index.js +2 -2
- package/lib/ProLayout/index.d.ts +21 -4
- package/lib/ProLayout/index.js +122 -21
- package/lib/ProLayout/propTypes.d.ts +139 -1
- package/lib/ProLayout/propTypes.js +40 -1
- package/lib/ProLayout/utils/index.js +18 -13
- package/lib/ProSelect/components/AdaptiveTooltip.js +7 -3
- package/lib/ProSelect/index.js +23 -12
- package/lib/ProSelect/utils/index.js +8 -8
- package/lib/ProStep/components/Anchor/index.js +1 -1
- package/lib/ProStep/components/Item/index.js +15 -9
- package/lib/ProStep/components/Listener/index.js +15 -9
- package/lib/ProStep/components/Step/index.js +17 -7
- package/lib/ProStep/index.js +30 -19
- package/lib/ProStep/utils/index.js +6 -3
- package/lib/ProStepTab/index.js +33 -22
- package/lib/ProTable/components/FormatColumn/index.js +22 -16
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +9 -5
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +22 -16
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -5
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +11 -6
- package/lib/ProTable/components/RcTable/index.js +2 -2
- package/lib/ProTable/components/RenderColumn/index.js +17 -8
- package/lib/ProTable/components/RenderTabs/index.js +16 -7
- package/lib/ProTable/components/TableResizable/index.js +19 -9
- package/lib/ProTable/components/TooltipTitle/index.js +3 -6
- package/lib/ProTable/components/index.js +2 -2
- package/lib/ProTable/hooks/useAntdTable.js +94 -60
- package/lib/ProTable/index.js +41 -29
- package/lib/ProTable/style/index.less +3 -0
- package/lib/ProTable/utils/index.js +7 -3
- package/lib/ProTabs/components/index.js +2 -2
- package/lib/ProTabs/index.js +23 -12
- package/lib/ProThemeTools/component/ProTools/index.js +21 -11
- package/lib/ProThemeTools/component/index.js +2 -2
- package/lib/ProThemeTools/context/ThemeContext.js +20 -16
- package/lib/ProThemeTools/index.js +22 -12
- package/lib/ProThemeTools/utils/index.js +6 -3
- package/lib/ProTooltip/index.js +30 -20
- package/lib/ProTree/components/CloseIcon.js +6 -3
- package/lib/ProTree/components/List.js +10 -5
- package/lib/ProTree/components/ProTree.js +23 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +138 -93
- package/lib/ProTree/components/SearchTitle.js +1 -1
- package/lib/ProTree/components/Tree.js +28 -16
- package/lib/ProTree/components/index.js +2 -2
- package/lib/ProTree/index.js +9 -5
- package/lib/ProTree/utils.js +16 -11
- package/lib/ProTreeModal/components/Cascader.js +14 -5
- package/lib/ProTreeModal/components/CloseIcon.js +6 -3
- package/lib/ProTreeModal/components/List.js +11 -7
- package/lib/ProTreeModal/components/SortableItem.js +10 -6
- package/lib/ProTreeModal/components/Tree.js +24 -13
- package/lib/ProTreeModal/components/Trigger.js +19 -9
- package/lib/ProTreeModal/components/index.js +2 -2
- package/lib/ProTreeModal/index.js +16 -6
- package/lib/ProTreeModal/style/index.less +6 -0
- package/lib/ProTreeModal/utils.js +17 -14
- package/lib/ProUpload/components/ButtonRender.js +14 -9
- package/lib/ProUpload/components/DragRender.d.ts +1 -0
- package/lib/ProUpload/components/DragRender.js +13 -5
- package/lib/ProUpload/components/DraggableUploadListItem.js +7 -3
- package/lib/ProUpload/components/Example.js +16 -6
- package/lib/ProUpload/components/FileItem.js +1 -1
- package/lib/ProUpload/components/ImageRender.js +20 -10
- package/lib/ProUpload/index.js +31 -18
- package/lib/ProUpload/propsType.d.ts +5 -0
- package/lib/ProViewer/index.js +22 -14
- package/lib/ProWaterMark/index.js +7 -3
- package/lib/index.d.ts +1 -2
- package/lib/index.js +4 -3
- package/lib/locale/en_US.d.ts +9 -0
- package/lib/locale/en_US.js +9 -0
- package/lib/locale/index.js +1 -1
- package/lib/locale/zh_CN.d.ts +9 -0
- package/lib/locale/zh_CN.js +9 -0
- package/lib/style/theme/antd.less +11 -35
- package/lib/utils/index.js +9 -4
- package/package.json +14 -17
- package/package.json.backup-antd5 +159 -0
- package/es/ProForm/components/combination/Group/utils.d.ts +0 -54
- package/es/ProForm/components/combination/Group/utils.js +0 -196
- package/es/assets/tip.svg +0 -1
- package/lib/ProForm/components/combination/Group/utils.d.ts +0 -54
- package/lib/ProForm/components/combination/Group/utils.js +0 -210
- package/lib/assets/tip.svg +0 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
.pro-group {
|
|
2
2
|
display: flex;
|
|
3
3
|
width: unset !important;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
4
7
|
&.pro-group-view {
|
|
5
8
|
.@{ant-prefix}-space {
|
|
6
9
|
.@{ant-prefix}-space-item {
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
|
|
39
42
|
.@{ant-prefix}-space-compact {
|
|
40
43
|
flex: auto;
|
|
41
|
-
align-items:
|
|
44
|
+
align-items: flex-start; // 改为顶部对齐,避免错误信息影响对齐
|
|
42
45
|
width: 100%;
|
|
43
46
|
|
|
44
47
|
.@{ant-prefix}-form-item {
|
|
@@ -46,12 +49,23 @@
|
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
.group-separator {
|
|
52
|
+
height: 32px; // 明确设置高度与输入框一致
|
|
49
53
|
padding: 0 12px;
|
|
54
|
+
color: #999;
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
line-height: 30px; // 调整行高匹配32px输入框高度
|
|
50
57
|
background-color: #fff;
|
|
58
|
+
border: 1px solid #d9d9d9; // 使用标准的1px边框
|
|
59
|
+
outline: none;
|
|
60
|
+
|
|
61
|
+
// 移除默认button样式
|
|
62
|
+
box-shadow: none;
|
|
51
63
|
cursor: default;
|
|
52
|
-
margin-inline-
|
|
53
|
-
|
|
64
|
+
margin-inline-start: -2px;
|
|
65
|
+
border-radius: 0;
|
|
66
|
+
|
|
54
67
|
}
|
|
68
|
+
|
|
55
69
|
.pro-modal-select {
|
|
56
70
|
margin-left: -1px;
|
|
57
71
|
}
|
|
@@ -70,4 +84,412 @@
|
|
|
70
84
|
border-color: #ff4d4f;
|
|
71
85
|
}
|
|
72
86
|
}
|
|
87
|
+
|
|
88
|
+
// 针对灵活模式的样式优化
|
|
89
|
+
&.pro-group-flexible {
|
|
90
|
+
// Space.Compact的样式优化
|
|
91
|
+
.@{ant-prefix}-space-compact {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: flex-start;
|
|
94
|
+
width: 100%;
|
|
95
|
+
|
|
96
|
+
// Form.Item在compact模式下的样式
|
|
97
|
+
.@{ant-prefix}-form-item {
|
|
98
|
+
flex: 1;
|
|
99
|
+
margin-right: 0;
|
|
100
|
+
margin-bottom: 0;
|
|
101
|
+
|
|
102
|
+
// 第一个元素后面的所有元素都左移1px以实现紧密连接
|
|
103
|
+
&:not(:first-child) {
|
|
104
|
+
margin-left: -1px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 确保输入框完全贴合
|
|
108
|
+
.@{ant-prefix}-input,
|
|
109
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
110
|
+
.@{ant-prefix}-input-number,
|
|
111
|
+
.@{ant-prefix}-input-number-input {
|
|
112
|
+
// 重置z-index确保正确的层级关系
|
|
113
|
+
position: relative;
|
|
114
|
+
// 重置圆角
|
|
115
|
+
border-radius: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// 第一个表单项:左边保持圆角
|
|
119
|
+
&:first-child {
|
|
120
|
+
.@{ant-prefix}-input,
|
|
121
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
122
|
+
.@{ant-prefix}-input-number,
|
|
123
|
+
.@{ant-prefix}-input-number-input {
|
|
124
|
+
border-top-left-radius: 8px;
|
|
125
|
+
border-bottom-left-radius: 8px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// 最后一个表单项:右边保持圆角
|
|
130
|
+
&:last-child {
|
|
131
|
+
.@{ant-prefix}-input,
|
|
132
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
133
|
+
.@{ant-prefix}-input-number,
|
|
134
|
+
.@{ant-prefix}-input-number-input {
|
|
135
|
+
border-top-right-radius: 8px;
|
|
136
|
+
border-bottom-right-radius: 8px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// 中间元素和最后元素:去掉左边框避免重复
|
|
141
|
+
&:not(:first-child) {
|
|
142
|
+
.@{ant-prefix}-input-number-input {
|
|
143
|
+
border-left: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// 聚焦时恢复左边框
|
|
147
|
+
.@{ant-prefix}-input:focus,
|
|
148
|
+
.@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
|
|
149
|
+
.@{ant-prefix}-input-number:focus,
|
|
150
|
+
.@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
|
|
151
|
+
margin-left: -1px;
|
|
152
|
+
border-left-width: 1px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// 错误状态:确保边框变红(优先级要高于上面的 border-left-width: 0)
|
|
157
|
+
&.@{ant-prefix}-form-item-has-error {
|
|
158
|
+
.@{ant-prefix}-input,
|
|
159
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
160
|
+
.@{ant-prefix}-input-number,
|
|
161
|
+
.@{ant-prefix}-input-number-input {
|
|
162
|
+
border-color: #ff4d4f !important;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// 错误状态下,中间元素也需要恢复左边框并设置为红色
|
|
166
|
+
&:not(:first-child) {
|
|
167
|
+
.@{ant-prefix}-input,
|
|
168
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
169
|
+
.@{ant-prefix}-input-number {
|
|
170
|
+
border-left-color: #ff4d4f !important;
|
|
171
|
+
border-left-width: 1px !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.@{ant-prefix}-input-number-input {
|
|
175
|
+
border-left: 0 !important;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// 聚焦时保持红色边框
|
|
180
|
+
.@{ant-prefix}-input:focus,
|
|
181
|
+
.@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
|
|
182
|
+
.@{ant-prefix}-input-number:focus,
|
|
183
|
+
.@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
|
|
184
|
+
border-color: #ff4d4f !important;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Select 组件的错误状态处理
|
|
188
|
+
.@{ant-prefix}-select.@{ant-prefix}-select-status-error .@{ant-prefix}-select-selector {
|
|
189
|
+
border-color: #ff4d4f !important;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// 分隔符样式 - 确保与输入框完美对齐
|
|
195
|
+
.pro-group-separator {
|
|
196
|
+
position: relative;
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
flex: none;
|
|
199
|
+
align-items: center;
|
|
200
|
+
height: 32px;
|
|
201
|
+
margin-right: -1px;
|
|
202
|
+
margin-left: -1px;
|
|
203
|
+
padding: 0 8px;
|
|
204
|
+
color: #666;
|
|
205
|
+
font-size: 14px;
|
|
206
|
+
line-height: 32px;
|
|
207
|
+
background-color: #fafafa;
|
|
208
|
+
border-top: 1px solid #d9d9d9;
|
|
209
|
+
border-right: 0;
|
|
210
|
+
border-bottom: 1px solid #d9d9d9;
|
|
211
|
+
border-left: 0;
|
|
212
|
+
user-select: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.@{ant-prefix}-form-item-has-error + .pro-group-separator-compact {
|
|
216
|
+
border-color: red;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// compact模式分隔符样式
|
|
220
|
+
.pro-group-separator-compact {
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
flex: none;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-items: center;
|
|
225
|
+
height: 32px;
|
|
226
|
+
padding: 0 12px;
|
|
227
|
+
color: #666;
|
|
228
|
+
line-height: 32px;
|
|
229
|
+
border: 1px solid #d9d9d9;
|
|
230
|
+
user-select: none;
|
|
231
|
+
margin-inline-start: -2px;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Space模式分隔符样式
|
|
236
|
+
.pro-group-separator-space {
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-shrink: 0;
|
|
239
|
+
align-items: center;
|
|
240
|
+
padding: 0 8px;
|
|
241
|
+
color: #999;
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
user-select: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// 错误提示样式
|
|
247
|
+
.pro-group-error-tip {
|
|
248
|
+
padding: 8px;
|
|
249
|
+
color: #ff4d4f;
|
|
250
|
+
border: 1px dashed #ff4d4f;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// compact模式容器
|
|
254
|
+
.pro-group-compact-container {
|
|
255
|
+
width: 100%;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Form.Item无边距样式
|
|
259
|
+
.pro-group-form-item {
|
|
260
|
+
flex: 1;
|
|
261
|
+
margin-left: 0 !important;
|
|
262
|
+
&.@{ant-prefix}-form-item-has-error{
|
|
263
|
+
margin-left: -1px !important;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// 当有自定义宽度时,只有设置了宽度的 Form.Item 不使用 flex:1
|
|
268
|
+
// 没有设置宽度的 Form.Item 保持 flex: 1,自动占据剩余空间
|
|
269
|
+
&.pro-group-diy-width {
|
|
270
|
+
// 覆盖 Space.Compact 内设置了宽度的 Form.Item
|
|
271
|
+
.@{ant-prefix}-space-compact {
|
|
272
|
+
.@{ant-prefix}-form-item.pro-group-form-item-has-width {
|
|
273
|
+
flex: none;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// 覆盖 compact 容器内设置了宽度的 Form.Item
|
|
278
|
+
.pro-group-compact-container {
|
|
279
|
+
.@{ant-prefix}-form-item.pro-group-form-item-has-width {
|
|
280
|
+
flex: none;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// 覆盖直接使用 pro-group-form-item 类且设置了宽度的 Form.Item
|
|
285
|
+
.pro-group-form-item.pro-group-form-item-has-width {
|
|
286
|
+
flex: none;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// 传统模式也需要相同的样式规则(不在 pro-group-flexible 下)
|
|
292
|
+
&:not(.pro-group-flexible) {
|
|
293
|
+
// compact模式容器
|
|
294
|
+
.pro-group-compact-container {
|
|
295
|
+
display: flex;
|
|
296
|
+
align-items: flex-start;
|
|
297
|
+
width: 100%;
|
|
298
|
+
|
|
299
|
+
// Form.Item在compact模式下的样式
|
|
300
|
+
.@{ant-prefix}-form-item {
|
|
301
|
+
flex: 1;
|
|
302
|
+
margin-right: 0;
|
|
303
|
+
margin-bottom: 0;
|
|
304
|
+
|
|
305
|
+
// 第一个元素后面的所有元素都左移1px以实现紧密连接
|
|
306
|
+
&:not(:first-child) {
|
|
307
|
+
margin-left: -1px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// 确保输入框完全贴合
|
|
311
|
+
.@{ant-prefix}-input,
|
|
312
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
313
|
+
.@{ant-prefix}-input-number,
|
|
314
|
+
.@{ant-prefix}-input-number-input {
|
|
315
|
+
// 重置z-index确保正确的层级关系
|
|
316
|
+
position: relative;
|
|
317
|
+
// 重置圆角
|
|
318
|
+
border-radius: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// 第一个表单项:左边保持圆角
|
|
322
|
+
&:first-child {
|
|
323
|
+
.@{ant-prefix}-input,
|
|
324
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
325
|
+
.@{ant-prefix}-input-number,
|
|
326
|
+
.@{ant-prefix}-input-number-input {
|
|
327
|
+
border-top-left-radius: 8px;
|
|
328
|
+
border-bottom-left-radius: 8px;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// 最后一个表单项:右边保持圆角
|
|
333
|
+
&:last-child {
|
|
334
|
+
.@{ant-prefix}-input,
|
|
335
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
336
|
+
.@{ant-prefix}-input-number,
|
|
337
|
+
.@{ant-prefix}-input-number-input {
|
|
338
|
+
border-top-right-radius: 8px;
|
|
339
|
+
border-bottom-right-radius: 8px;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// 中间元素和最后元素:去掉左边框避免重复
|
|
344
|
+
&:not(:first-child) {
|
|
345
|
+
// 聚焦时恢复左边框
|
|
346
|
+
.@{ant-prefix}-input:focus,
|
|
347
|
+
.@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
|
|
348
|
+
.@{ant-prefix}-input-number:focus,
|
|
349
|
+
.@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
|
|
350
|
+
margin-left: -1px;
|
|
351
|
+
border-left-width: 1px;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// compact模式分隔符样式
|
|
357
|
+
.pro-group-separator-compact {
|
|
358
|
+
display: inline-flex;
|
|
359
|
+
flex: none;
|
|
360
|
+
align-items: center;
|
|
361
|
+
justify-items: center;
|
|
362
|
+
height: 32px;
|
|
363
|
+
padding: 0 12px;
|
|
364
|
+
color: #666;
|
|
365
|
+
line-height: 32px;
|
|
366
|
+
border: 1px solid #d9d9d9;
|
|
367
|
+
user-select: none;
|
|
368
|
+
margin-inline-start: -1px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// 错误状态的分隔符
|
|
372
|
+
.@{ant-prefix}-form-item-has-error + .pro-group-separator-compact {
|
|
373
|
+
border-color: #ff4d4f;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Form.Item无边距样式(传统模式)
|
|
378
|
+
.pro-group-form-item {
|
|
379
|
+
flex: 1;
|
|
380
|
+
// margin: 0 !important;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// 当有自定义宽度时,只有设置了宽度的 Form.Item 不使用 flex:1
|
|
384
|
+
&.pro-group-diy-width {
|
|
385
|
+
// 覆盖 Space.Compact 内设置了宽度的 Form.Item
|
|
386
|
+
.@{ant-prefix}-space-compact {
|
|
387
|
+
.@{ant-prefix}-form-item.pro-group-form-item-has-width {
|
|
388
|
+
flex: none;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// 覆盖 compact 容器内设置了宽度的 Form.Item
|
|
393
|
+
.pro-group-compact-container {
|
|
394
|
+
.@{ant-prefix}-form-item.pro-group-form-item-has-width {
|
|
395
|
+
flex: none;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// 覆盖直接使用 pro-group-form-item 类且设置了宽度的 Form.Item
|
|
400
|
+
.pro-group-form-item.pro-group-form-item-has-width {
|
|
401
|
+
flex: none;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
73
405
|
}
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
.@{ant-prefix}-form-item-has-error{
|
|
409
|
+
&:not(.pro-group-flexible) {
|
|
410
|
+
// 错误状态:确保边框变红(优先级要高于上面的 border-left-width: 0)
|
|
411
|
+
.@{ant-prefix}-input,
|
|
412
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
413
|
+
.@{ant-prefix}-input-number,
|
|
414
|
+
.@{ant-prefix}-input-number-input {
|
|
415
|
+
border-color: #ff4d4f !important;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// 错误状态下,中间元素也需要恢复左边框并设置为红色
|
|
419
|
+
&:not(:first-child) {
|
|
420
|
+
.@{ant-prefix}-input,
|
|
421
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
422
|
+
.@{ant-prefix}-input-number {
|
|
423
|
+
border-left-color: #ff4d4f !important;
|
|
424
|
+
border-left-width: 1px !important;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.@{ant-prefix}-input-number-input {
|
|
428
|
+
border-left: 1px solid #ff4d4f !important;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// 聚焦时保持红色边框
|
|
433
|
+
.@{ant-prefix}-input:focus,
|
|
434
|
+
.@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
|
|
435
|
+
.@{ant-prefix}-input-number:focus,
|
|
436
|
+
.@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
|
|
437
|
+
border-color: #ff4d4f !important;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// Select 组件的错误状态处理
|
|
441
|
+
.@{ant-prefix}-select.@{ant-prefix}-select-status-error .@{ant-prefix}-select-selector {
|
|
442
|
+
border-color: #ff4d4f !important;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// compact模式容器, 修复antd6定制模式下,Group组件内嵌套Form.Item时,表单样式问题
|
|
448
|
+
.pro-group-compact-container {
|
|
449
|
+
.@{ant-prefix}-select {
|
|
450
|
+
border-radius: 0;
|
|
451
|
+
border-radius: 0;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
> .pro-group-form-item:not(:first-child) {
|
|
455
|
+
.@{ant-prefix}-input,
|
|
456
|
+
.@{ant-prefix}-select,
|
|
457
|
+
.@{ant-prefix}-input-number {
|
|
458
|
+
margin-left: -1px;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
.pro-group-separator-compact{
|
|
462
|
+
margin-left: -1px;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
/* 1. 处理第一个子元素:左上、左下圆角 */
|
|
467
|
+
> .pro-group-form-item:first-child{
|
|
468
|
+
.pro-select .@{ant-prefix}-select,
|
|
469
|
+
.@{ant-prefix}-select,
|
|
470
|
+
.@{ant-prefix}-input-number {
|
|
471
|
+
border-top-left-radius: 8px;
|
|
472
|
+
border-bottom-left-radius: 8px;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* 2. 处理最后一个子元素:右上、右下圆角 */
|
|
477
|
+
> .pro-group-form-item:last-child {
|
|
478
|
+
.pro-select .@{ant-prefix}-select,
|
|
479
|
+
.@{ant-prefix}-select,
|
|
480
|
+
.@{ant-prefix}-input-number {
|
|
481
|
+
border-top-right-radius: 8px;
|
|
482
|
+
border-bottom-right-radius: 8px;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
.@{ant-prefix}-form-item-has-error {
|
|
487
|
+
.pro-group-compact-container{
|
|
488
|
+
.@{ant-prefix}-select {
|
|
489
|
+
border-color: var(--zaui-danger);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
}
|
|
494
|
+
// compact模式容器 结束
|
|
495
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { InternalNamePath, NamePath } from 'antd/lib/form/interface';
|
|
3
|
+
import { FormInstance } from 'antd';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { GroupColumnType, SpaceType, FlexibleGroupColumnType } from '../propsType';
|
|
6
|
+
import type { ProFormColumnType, ReactiveFunction } from '../../../render/propsType';
|
|
7
|
+
export type EventArgs = any[];
|
|
8
|
+
/**
|
|
9
|
+
* 插入间隔符
|
|
10
|
+
* @param columns 表单配置数组
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare const insertSeparator: (columns: GroupColumnType[], space?: SpaceType) => any[];
|
|
14
|
+
/** 带出event的组件默认取值方法 */
|
|
15
|
+
export declare function defaultGetValueFromEvent(valuePropName: string, ...args: EventArgs): any;
|
|
16
|
+
/** 转换names */
|
|
17
|
+
export declare const transformNamesString: (arr: (string | string[])[]) => (string | string[])[];
|
|
18
|
+
/**
|
|
19
|
+
* Input TextArea 小写自动转大写
|
|
20
|
+
* @param type 组件类型
|
|
21
|
+
* @param upperCase 是否小写转大写
|
|
22
|
+
* @returns {}
|
|
23
|
+
*/
|
|
24
|
+
export declare const isUpperCase: (type: string, upperCase: boolean) => any;
|
|
25
|
+
interface Params {
|
|
26
|
+
form?: FormInstance;
|
|
27
|
+
index?: number;
|
|
28
|
+
type?: string;
|
|
29
|
+
namePath?: InternalNamePath;
|
|
30
|
+
disabled?: boolean | ReactiveFunction<any, boolean>;
|
|
31
|
+
show?: boolean | ReactiveFunction<any, boolean>;
|
|
32
|
+
component?: React.ReactNode | ReactiveFunction<any, React.ReactNode>;
|
|
33
|
+
fieldProps?: boolean | ReactiveFunction<any, boolean>;
|
|
34
|
+
name?: NamePath;
|
|
35
|
+
desensitization?: [number, number] | ReactiveFunction<any, [number, number]>;
|
|
36
|
+
}
|
|
37
|
+
/** 计算响应式参数的值 */
|
|
38
|
+
export declare const getReactiveProps: (params: Params) => {
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
show: boolean;
|
|
41
|
+
component: React.ReactNode;
|
|
42
|
+
fieldProps: boolean;
|
|
43
|
+
desensitization: [number, number];
|
|
44
|
+
};
|
|
45
|
+
type ValueTypeGetterParams = Pick<ProFormColumnType, 'valueType' | 'switchValue' | 'toISOString' | 'toCSTString' | 'disabled' | 'desensitization'> & {
|
|
46
|
+
type?: any;
|
|
47
|
+
mode?: string;
|
|
48
|
+
};
|
|
49
|
+
/** 获取当前字段的转换函数 */
|
|
50
|
+
export declare const getValueTypeTrans: (params: ValueTypeGetterParams) => any;
|
|
51
|
+
/** 执行所有中间件 返回处理后的值 */
|
|
52
|
+
export declare const getValueMiddleware: (value: any, callbacks?: any[]) => any;
|
|
53
|
+
/** 获取中间件处理后的value */
|
|
54
|
+
export declare const valueFromEventWrapper: (column: any, args: any) => any;
|
|
55
|
+
interface ContextProps {
|
|
56
|
+
form: FormInstance;
|
|
57
|
+
namePath?: InternalNamePath;
|
|
58
|
+
isView?: boolean;
|
|
59
|
+
names?: NamePath[];
|
|
60
|
+
index?: number;
|
|
61
|
+
}
|
|
62
|
+
interface GroupProps {
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
formDisabled?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 创建FormItem属性(Hook版本)
|
|
68
|
+
*/
|
|
69
|
+
export declare const useFormItemProps: (column: FlexibleGroupColumnType, contextProps: ContextProps, groupProps: GroupProps) => {
|
|
70
|
+
rules: any[];
|
|
71
|
+
required: boolean;
|
|
72
|
+
label: string;
|
|
73
|
+
before?: React.ReactNode;
|
|
74
|
+
after?: React.ReactNode;
|
|
75
|
+
confirm?: boolean | import("antd").ModalFuncProps | import("../../../render/propsType").FunctionArgs<any, boolean | import("antd").ModalFuncProps>;
|
|
76
|
+
show?: boolean | ReactiveFunction<any, boolean>;
|
|
77
|
+
component?: React.ReactNode | ReactiveFunction<any, React.ReactNode>;
|
|
78
|
+
trim?: boolean;
|
|
79
|
+
normalize?: (value: any, prevValue: any, allValues: import("@rc-component/form/lib/interface").Store) => any;
|
|
80
|
+
children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
|
|
81
|
+
vertical?: boolean;
|
|
82
|
+
id?: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
hidden?: boolean;
|
|
85
|
+
style?: React.CSSProperties;
|
|
86
|
+
onReset?: () => void;
|
|
87
|
+
prefixCls?: string;
|
|
88
|
+
rootClassName?: string;
|
|
89
|
+
status?: "" | "success" | "error" | "warning" | "validating";
|
|
90
|
+
trigger?: string;
|
|
91
|
+
colon?: boolean;
|
|
92
|
+
isView?: boolean;
|
|
93
|
+
desensitization?: [number, number] | ReactiveFunction<any, [number, number]>;
|
|
94
|
+
getValueProps?: ((value: any) => Record<string, unknown>) & ((value: any) => Record<string, unknown>);
|
|
95
|
+
htmlFor?: string;
|
|
96
|
+
labelAlign?: import("antd/es/form/interface").FormLabelAlign;
|
|
97
|
+
labelCol?: import("antd").ColProps;
|
|
98
|
+
getValueFromEvent?: (...args: import("@rc-component/form/lib/interface").EventArgs) => any;
|
|
99
|
+
shouldUpdate?: import("@rc-component/form/lib/Field").ShouldUpdate<any>;
|
|
100
|
+
validateTrigger?: string | false | string[];
|
|
101
|
+
validateDebounce?: number;
|
|
102
|
+
valuePropName?: string;
|
|
103
|
+
messageVariables?: Record<string, string>;
|
|
104
|
+
initialValue?: any;
|
|
105
|
+
onMetaChange?: (meta: import("@rc-component/form/lib/Field").MetaEvent) => void;
|
|
106
|
+
preserve?: boolean;
|
|
107
|
+
isListField?: boolean;
|
|
108
|
+
isList?: boolean;
|
|
109
|
+
noStyle?: boolean;
|
|
110
|
+
hasFeedback?: boolean | {
|
|
111
|
+
icons: import("antd/es/form/FormItem").FeedbackIcons;
|
|
112
|
+
};
|
|
113
|
+
validateStatus?: "" | "success" | "error" | "warning" | "validating";
|
|
114
|
+
layout?: import("antd/es/form/Form").FormItemLayout;
|
|
115
|
+
wrapperCol?: import("antd").ColProps;
|
|
116
|
+
help?: React.ReactNode;
|
|
117
|
+
fieldId?: string;
|
|
118
|
+
valueType?: import("../../../render/propsType").ProFormValueType;
|
|
119
|
+
switchValue?: [any, any];
|
|
120
|
+
viewRender?: (value: any, record: any, { form, index, namePath, }: {
|
|
121
|
+
[key: string]: any;
|
|
122
|
+
form: FormInstance<any>;
|
|
123
|
+
index?: number;
|
|
124
|
+
}) => string | React.ReactElement<any, any>;
|
|
125
|
+
viewType?: import("../../../render/propsType").ViewType;
|
|
126
|
+
upperCase?: boolean;
|
|
127
|
+
toISOString?: boolean;
|
|
128
|
+
toCSTString?: boolean;
|
|
129
|
+
clearNotShow?: boolean;
|
|
130
|
+
name: any;
|
|
131
|
+
dependencies: any[];
|
|
132
|
+
tooltip: string | {
|
|
133
|
+
title: string;
|
|
134
|
+
icon?: React.ReactNode;
|
|
135
|
+
};
|
|
136
|
+
extra: React.ReactNode;
|
|
137
|
+
validateFirst: boolean | "parallel";
|
|
138
|
+
disabled: any;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* 创建组件属性
|
|
142
|
+
*/
|
|
143
|
+
export declare const createComponentProps: (column: FlexibleGroupColumnType, formItemProps: any) => {
|
|
144
|
+
componentProps: import("lodash").Omit<any, "format" | "valueType" | "switchValue" | "dependNames" | "toISOString" | "toCSTString" | "clearNotShow" | "precision">;
|
|
145
|
+
formItemTransform: {
|
|
146
|
+
getValueProps: any;
|
|
147
|
+
normalize: any;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* 配置验证组件
|
|
152
|
+
*/
|
|
153
|
+
export declare const validateChildren: (children: FlexibleGroupColumnType[]) => boolean;
|
|
154
|
+
export {};
|