@zat-design/sisyphus-react 3.13.19-beta.6 → 3.13.19-beta.7
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/.claude/CLAUDE.md +44 -0
- package/.claude/settings.local.json +17 -0
- package/PROJECT_GUIDE.md +250 -0
- package/dist/sisyphus-react.min.css +2 -0
- package/dist/sisyphus-react.min.js +1 -0
- package/es/FormsProvider/index.js +9 -7
- package/es/ProAction/components/CheckModalContent/index.js +14 -14
- package/es/ProAction/index.js +46 -47
- package/es/ProConfigProvider/index.js +25 -19
- package/es/ProDownload/index.js +66 -73
- package/es/ProDownload/utils.js +26 -23
- package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
- package/es/ProDrawerForm/components/ProModal/index.js +25 -23
- package/es/ProDrawerForm/components/index.js +2 -2
- package/es/ProDrawerForm/index.js +19 -21
- package/es/ProDrawerForm/utils/index.js +1 -1
- package/es/ProEditLabel/components/RenderProForm.js +30 -26
- package/es/ProEditLabel/index.js +49 -36
- package/es/ProEditLabel/utils/index.js +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +83 -76
- package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
- package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
- package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
- package/es/ProEditTable/components/RcTable/index.js +3 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -57
- package/es/ProEditTable/components/RenderField/index.js +151 -145
- package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
- package/es/ProEditTable/components/Summary/index.js +22 -21
- package/es/ProEditTable/components/Validator/index.js +11 -10
- package/es/ProEditTable/components/index.js +5 -5
- package/es/ProEditTable/index.d.ts +1 -1
- package/es/ProEditTable/index.js +170 -173
- package/es/ProEditTable/utils/config.js +42 -46
- package/es/ProEditTable/utils/diffOriginal.js +34 -19
- package/es/ProEditTable/utils/getDefaultProps.js +12 -13
- package/es/ProEditTable/utils/index.js +102 -99
- package/es/ProEditTable/utils/tools.js +88 -91
- package/es/ProEditTable/utils/transform.js +7 -11
- package/es/ProEditTable/utils/useEditTableError.js +22 -13
- package/es/ProEnum/components/Group.js +23 -27
- package/es/ProEnum/components/Tag.js +14 -16
- package/es/ProEnum/hooks/useEnum.js +32 -14
- package/es/ProEnum/hooks/useEnumRequest.js +42 -42
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +16 -16
- package/es/ProEnum/index.js +80 -89
- package/es/ProEnum/utils/eventCenter.js +23 -32
- package/es/ProEnum/utils/frequentEnum.js +15 -4
- package/es/ProEnum/utils/getEnumLabel.js +16 -21
- package/es/ProEnum/utils/index.js +12 -7
- package/es/ProForm/components/Container.js +8 -6
- package/es/ProForm/components/FormFooter/index.js +21 -19
- package/es/ProForm/components/base/Checkbox/index.js +16 -15
- package/es/ProForm/components/base/DatePicker/index.js +23 -20
- package/es/ProForm/components/base/Input/index.js +20 -18
- package/es/ProForm/components/base/InputNumber/index.js +57 -53
- package/es/ProForm/components/base/Radio/index.js +15 -15
- package/es/ProForm/components/base/RangePicker/index.js +24 -29
- package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
- package/es/ProForm/components/base/Select/index.js +17 -15
- package/es/ProForm/components/base/Switch/index.js +16 -15
- package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
- package/es/ProForm/components/base/TextArea/index.js +18 -17
- package/es/ProForm/components/base/TimePicker/index.js +10 -9
- package/es/ProForm/components/combination/Container/index.js +25 -23
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
- package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
- package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
- package/es/ProForm/components/combination/FormList/index.js +43 -51
- package/es/ProForm/components/combination/FormList/utils.js +9 -9
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
- package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
- package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
- package/es/ProForm/components/combination/Group/index.js +38 -37
- package/es/ProForm/components/combination/Group/utils.js +56 -50
- package/es/ProForm/components/combination/ProCascader/index.js +81 -85
- package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
- package/es/ProForm/components/combination/ProCombination/index.js +41 -37
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
- package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
- package/es/ProForm/components/combination/ProRangeLimit/index.js +39 -39
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.js +43 -40
- package/es/ProForm/components/index.d.ts +1 -0
- package/es/ProForm/components/index.js +40 -35
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +30 -28
- package/es/ProForm/components/old/EnumSelect/index.js +55 -62
- package/es/ProForm/components/old/InputRange/index.js +17 -16
- package/es/ProForm/components/old/InputWithSuffix/index.js +6 -5
- package/es/ProForm/components/old/ProAddress/index.js +53 -75
- package/es/ProForm/components/old/ProCertNo/index.js +17 -17
- package/es/ProForm/components/old/ProCertValidity/index.js +19 -21
- package/es/ProForm/components/old/ProRangeBox/index.js +25 -24
- package/es/ProForm/components/render/ChangedWrapper.js +34 -33
- package/es/ProForm/components/render/ConfirmWrapper.js +16 -18
- package/es/ProForm/components/render/Render.js +150 -135
- package/es/ProForm/components/render/RenderFields.js +65 -50
- package/es/ProForm/components/render/propsType.js +25 -0
- package/es/ProForm/index.js +83 -70
- package/es/ProForm/propsType.d.ts +1 -1
- package/es/ProForm/propsType.js +5 -1
- package/es/ProForm/utils/diffOriginal.js +30 -16
- package/es/ProForm/utils/getDefaultProps.js +10 -10
- package/es/ProForm/utils/index.js +105 -110
- package/es/ProForm/utils/processDependencies.js +15 -5
- package/es/ProForm/utils/rulesCreator.js +21 -22
- package/es/ProForm/utils/transformNames.js +7 -6
- package/es/ProForm/utils/transformValue.js +16 -13
- package/es/ProForm/utils/useDeepCompareMemo.js +6 -4
- package/es/ProForm/utils/useFieldProps.js +1 -3
- package/es/ProForm/utils/useForm.js +36 -34
- package/es/ProForm/utils/useRules.js +28 -31
- package/es/ProForm/utils/useShouldUpdate.js +83 -86
- package/es/ProForm/utils/useWatch.js +36 -14
- package/es/ProForm/utils/valueType.js +51 -52
- package/es/ProIcon/config/index.js +2 -0
- package/es/ProIcon/index.js +53 -49
- package/es/ProIcon/utils/index.js +8 -9
- package/es/ProLayout/components/Layout/Header/index.js +13 -11
- package/es/ProLayout/components/Layout/Icon/Icon.js +7 -7
- package/es/ProLayout/components/Layout/Icon/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +42 -40
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +51 -52
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +10 -9
- package/es/ProLayout/components/Layout/Menu/index.js +20 -18
- package/es/ProLayout/components/Layout/Notice/index.js +12 -11
- package/es/ProLayout/components/Layout/index.js +4 -4
- package/es/ProLayout/components/ProCollapse/index.js +35 -32
- package/es/ProLayout/components/ProFooter/index.js +13 -15
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +9 -9
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +8 -7
- package/es/ProLayout/components/ProHeader/components/index.js +2 -2
- package/es/ProLayout/components/ProHeader/index.js +129 -118
- package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
- package/es/ProLayout/components/index.js +3 -3
- package/es/ProLayout/index.d.ts +1 -1
- package/es/ProLayout/index.js +28 -25
- package/es/ProLayout/utils/index.js +37 -35
- package/es/ProSelect/components/AdaptiveTooltip.js +10 -11
- package/es/ProSelect/index.js +87 -99
- package/es/ProSelect/utils/index.js +27 -33
- package/es/ProStep/components/Anchor/index.d.ts +1 -0
- package/es/ProStep/components/Anchor/index.js +26 -25
- package/es/ProStep/components/Item/index.d.ts +1 -0
- package/es/ProStep/components/Item/index.js +26 -22
- package/es/ProStep/components/Listener/index.js +11 -15
- package/es/ProStep/components/Step/index.js +24 -25
- package/es/ProStep/index.js +51 -53
- package/es/ProStep/utils/index.js +13 -12
- package/es/ProStepTab/index.js +59 -37
- package/es/ProTable/components/FormatColumn/index.js +106 -110
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +36 -50
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +24 -24
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +8 -10
- package/es/ProTable/components/RcTable/index.js +2 -2
- package/es/ProTable/components/RenderColumn/index.js +51 -51
- package/es/ProTable/components/RenderEmptyText/index.js +8 -7
- package/es/ProTable/components/RenderFooter/index.js +3 -3
- package/es/ProTable/components/RenderSummary/index.js +13 -13
- package/es/ProTable/components/RenderTableHeader/index.js +16 -14
- package/es/ProTable/components/RenderTabs/index.js +28 -33
- package/es/ProTable/components/TableResizable/index.js +17 -16
- package/es/ProTable/components/TooltipTitle/index.js +7 -6
- package/es/ProTable/components/index.js +11 -6
- package/es/ProTable/hooks/useAntdTable.js +106 -119
- package/es/ProTable/index.js +158 -176
- package/es/ProTable/utils/index.js +25 -21
- package/es/ProTabs/components/Card/index.js +15 -14
- package/es/ProTabs/components/index.js +1 -1
- package/es/ProTabs/index.js +24 -25
- package/es/ProThemeTools/component/ProTools/index.js +69 -68
- package/es/ProThemeTools/component/index.js +1 -1
- package/es/ProThemeTools/index.js +47 -33
- package/es/ProThemeTools/utils/index.js +20 -17
- package/es/ProTooltip/index.js +44 -46
- package/es/ProTree/components/AdaptiveTooltip.js +5 -7
- package/es/ProTree/components/CloseIcon.js +5 -5
- package/es/ProTree/components/List.js +22 -24
- package/es/ProTree/components/ProTree.js +84 -102
- package/es/ProTree/components/ProTreeSelect/index.js +128 -119
- package/es/ProTree/components/SearchTitle.js +10 -9
- package/es/ProTree/components/Tree.js +57 -58
- package/es/ProTree/components/index.js +4 -4
- package/es/ProTree/index.js +6 -6
- package/es/ProTree/utils.js +29 -22
- package/es/ProTreeModal/components/Cascader.js +31 -33
- package/es/ProTreeModal/components/CloseIcon.js +5 -5
- package/es/ProTreeModal/components/List.js +74 -93
- package/es/ProTreeModal/components/SearchTitle.js +5 -4
- package/es/ProTreeModal/components/SortableItem.js +14 -14
- package/es/ProTreeModal/components/Tree.js +49 -53
- package/es/ProTreeModal/components/Trigger.js +29 -28
- package/es/ProTreeModal/components/index.js +6 -6
- package/es/ProTreeModal/index.js +166 -206
- package/es/ProTreeModal/utils.js +37 -33
- package/es/ProUpload/components/ButtonRender.js +33 -36
- package/es/ProUpload/components/DragRender.js +54 -51
- package/es/ProUpload/components/DraggableUploadListItem.js +5 -4
- package/es/ProUpload/components/Example.js +13 -12
- package/es/ProUpload/components/FileItem.js +63 -58
- package/es/ProUpload/components/ImageRender.js +98 -100
- package/es/ProUpload/index.js +75 -82
- package/es/ProUpload/uitls.js +3 -3
- package/es/ProUtils/utils/index.js +10 -14
- package/es/ProViewer/index.js +29 -25
- package/es/ProViewer/propsType.js +0 -1
- package/es/ProWaterMark/index.js +5 -4
- package/es/index.d.ts +1 -1
- package/es/index.js +38 -29
- package/es/locale/index.js +7 -4
- package/es/old/ProCertValidity/index.js +19 -21
- package/es/old/ProEditableTable/index.js +156 -156
- package/es/old/ProEditableTable/utils.js +61 -63
- package/es/tokens.js +1 -0
- package/es/utils/index.js +12 -12
- package/lib/FormsProvider/index.js +11 -7
- package/lib/ProAction/components/CheckModalContent/index.js +11 -13
- package/lib/ProAction/index.js +40 -43
- package/lib/ProConfigProvider/index.js +23 -16
- package/lib/ProDownload/index.js +65 -71
- package/lib/ProDownload/utils.js +25 -22
- package/lib/ProDrawerForm/components/ProDrawer/index.js +39 -38
- package/lib/ProDrawerForm/components/ProModal/index.js +23 -22
- package/lib/ProDrawerForm/index.js +18 -18
- package/lib/ProDrawerForm/utils/index.js +3 -2
- package/lib/ProEditLabel/components/RenderProForm.js +26 -24
- package/lib/ProEditLabel/index.js +46 -35
- package/lib/ProEditLabel/utils/index.js +6 -5
- package/lib/ProEditTable/components/ActionButton/index.js +79 -74
- package/lib/ProEditTable/components/RcTable/BaseTable.js +21 -23
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +32 -40
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +3 -3
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +62 -59
- package/lib/ProEditTable/components/RenderField/index.js +137 -132
- package/lib/ProEditTable/components/RenderToolbar/index.js +34 -41
- package/lib/ProEditTable/components/Summary/index.js +20 -20
- package/lib/ProEditTable/components/Validator/index.js +10 -10
- package/lib/ProEditTable/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +159 -164
- package/lib/ProEditTable/utils/config.js +40 -44
- package/lib/ProEditTable/utils/diffOriginal.js +36 -21
- package/lib/ProEditTable/utils/getDefaultProps.js +14 -15
- package/lib/ProEditTable/utils/index.js +97 -97
- package/lib/ProEditTable/utils/tools.js +96 -91
- package/lib/ProEditTable/utils/transform.js +7 -11
- package/lib/ProEditTable/utils/useEditTableError.js +22 -13
- package/lib/ProEnum/components/Group.js +23 -27
- package/lib/ProEnum/components/Tag.js +14 -16
- package/lib/ProEnum/hooks/useEnum.js +30 -12
- package/lib/ProEnum/hooks/useEnumRequest.js +39 -39
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +15 -15
- package/lib/ProEnum/index.js +68 -78
- package/lib/ProEnum/utils/eventCenter.js +23 -32
- package/lib/ProEnum/utils/frequentEnum.js +13 -3
- package/lib/ProEnum/utils/getEnumLabel.js +15 -21
- package/lib/ProEnum/utils/index.js +12 -7
- package/lib/ProForm/components/Container.js +7 -5
- package/lib/ProForm/components/FormFooter/index.js +19 -17
- package/lib/ProForm/components/base/Checkbox/index.js +14 -13
- package/lib/ProForm/components/base/DatePicker/index.js +20 -17
- package/lib/ProForm/components/base/Input/index.js +15 -15
- package/lib/ProForm/components/base/InputNumber/index.js +51 -48
- package/lib/ProForm/components/base/Radio/index.js +13 -13
- package/lib/ProForm/components/base/RangePicker/index.js +19 -22
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
- package/lib/ProForm/components/base/Select/index.js +14 -12
- package/lib/ProForm/components/base/Switch/index.js +11 -11
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
- package/lib/ProForm/components/base/TextArea/index.js +14 -13
- package/lib/ProForm/components/base/TimePicker/index.js +6 -5
- package/lib/ProForm/components/combination/Container/index.js +22 -21
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
- package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
- package/lib/ProForm/components/combination/FormList/index.js +35 -43
- package/lib/ProForm/components/combination/FormList/utils.js +11 -10
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
- package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
- package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
- package/lib/ProForm/components/combination/Group/index.js +34 -35
- package/lib/ProForm/components/combination/Group/utils.js +62 -50
- package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
- package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
- package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
- package/lib/ProForm/components/index.d.ts +1 -0
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
- package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
- package/lib/ProForm/components/old/InputRange/index.js +16 -16
- package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
- package/lib/ProForm/components/old/ProAddress/index.js +53 -75
- package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
- package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
- package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
- package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
- package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
- package/lib/ProForm/components/render/Render.js +138 -125
- package/lib/ProForm/components/render/RenderFields.js +57 -43
- package/lib/ProForm/components/render/propsType.js +26 -1
- package/lib/ProForm/index.js +74 -61
- package/lib/ProForm/propsType.d.ts +1 -1
- package/lib/ProForm/propsType.js +5 -1
- package/lib/ProForm/utils/diffOriginal.js +30 -17
- package/lib/ProForm/utils/getDefaultProps.js +12 -12
- package/lib/ProForm/utils/index.js +127 -106
- package/lib/ProForm/utils/processDependencies.js +15 -6
- package/lib/ProForm/utils/rulesCreator.js +21 -21
- package/lib/ProForm/utils/transformNames.js +6 -6
- package/lib/ProForm/utils/transformValue.js +14 -11
- package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
- package/lib/ProForm/utils/useFieldProps.js +2 -3
- package/lib/ProForm/utils/useForm.js +33 -31
- package/lib/ProForm/utils/useRules.js +25 -28
- package/lib/ProForm/utils/useShouldUpdate.js +82 -85
- package/lib/ProForm/utils/useWatch.js +36 -14
- package/lib/ProForm/utils/valueType.js +52 -52
- package/lib/ProIcon/config/index.js +2 -0
- package/lib/ProIcon/index.js +47 -44
- package/lib/ProIcon/utils/index.js +10 -8
- package/lib/ProLayout/components/Layout/Header/index.js +10 -10
- package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
- package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
- package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
- package/lib/ProLayout/components/ProCollapse/index.js +32 -30
- package/lib/ProLayout/components/ProFooter/index.js +14 -16
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
- package/lib/ProLayout/components/ProHeader/index.js +131 -120
- package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
- package/lib/ProLayout/index.d.ts +1 -1
- package/lib/ProLayout/index.js +22 -21
- package/lib/ProLayout/utils/index.js +42 -33
- package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
- package/lib/ProSelect/index.js +82 -93
- package/lib/ProSelect/utils/index.js +29 -34
- package/lib/ProStep/components/Anchor/index.d.ts +1 -0
- package/lib/ProStep/components/Anchor/index.js +25 -24
- package/lib/ProStep/components/Item/index.d.ts +1 -0
- package/lib/ProStep/components/Item/index.js +24 -20
- package/lib/ProStep/components/Listener/index.js +9 -13
- package/lib/ProStep/components/Step/index.js +20 -21
- package/lib/ProStep/index.js +45 -49
- package/lib/ProStep/utils/index.js +16 -12
- package/lib/ProStepTab/index.js +60 -38
- package/lib/ProTable/components/FormatColumn/index.js +100 -104
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
- package/lib/ProTable/components/RenderColumn/index.js +46 -48
- package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
- package/lib/ProTable/components/RenderFooter/index.js +3 -3
- package/lib/ProTable/components/RenderSummary/index.js +11 -12
- package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
- package/lib/ProTable/components/RenderTabs/index.js +27 -32
- package/lib/ProTable/components/TableResizable/index.js +16 -15
- package/lib/ProTable/components/TooltipTitle/index.js +5 -5
- package/lib/ProTable/hooks/useAntdTable.js +103 -116
- package/lib/ProTable/index.js +149 -169
- package/lib/ProTable/utils/index.js +33 -22
- package/lib/ProTabs/components/Card/index.js +14 -14
- package/lib/ProTabs/index.js +24 -24
- package/lib/ProThemeTools/component/ProTools/index.js +66 -65
- package/lib/ProThemeTools/index.js +43 -29
- package/lib/ProThemeTools/utils/index.js +25 -18
- package/lib/ProTooltip/index.js +44 -46
- package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
- package/lib/ProTree/components/CloseIcon.js +5 -5
- package/lib/ProTree/components/List.js +18 -22
- package/lib/ProTree/components/ProTree.js +77 -96
- package/lib/ProTree/components/ProTreeSelect/index.js +126 -116
- package/lib/ProTree/components/SearchTitle.js +8 -8
- package/lib/ProTree/components/Tree.js +53 -55
- package/lib/ProTree/index.js +4 -4
- package/lib/ProTree/utils.js +34 -25
- package/lib/ProTreeModal/components/Cascader.js +28 -32
- package/lib/ProTreeModal/components/CloseIcon.js +5 -5
- package/lib/ProTreeModal/components/List.js +69 -89
- package/lib/ProTreeModal/components/SearchTitle.js +4 -4
- package/lib/ProTreeModal/components/SortableItem.js +11 -12
- package/lib/ProTreeModal/components/Tree.js +44 -49
- package/lib/ProTreeModal/components/Trigger.js +26 -26
- package/lib/ProTreeModal/index.js +157 -199
- package/lib/ProTreeModal/utils.js +43 -35
- package/lib/ProUpload/components/ButtonRender.js +29 -33
- package/lib/ProUpload/components/DragRender.js +50 -48
- package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
- package/lib/ProUpload/components/Example.js +13 -11
- package/lib/ProUpload/components/FileItem.js +58 -50
- package/lib/ProUpload/components/ImageRender.js +89 -93
- package/lib/ProUpload/index.js +68 -76
- package/lib/ProUpload/uitls.js +5 -3
- package/lib/ProUtils/utils/index.js +10 -14
- package/lib/ProViewer/index.js +26 -24
- package/lib/ProViewer/propsType.js +1 -5
- package/lib/ProWaterMark/index.js +5 -4
- package/lib/index.d.ts +1 -1
- package/lib/locale/index.js +6 -2
- package/lib/old/ProCertValidity/index.js +17 -18
- package/lib/old/ProEditableTable/index.js +153 -156
- package/lib/old/ProEditableTable/utils.js +61 -62
- package/lib/tokens.js +1 -0
- package/lib/utils/index.js +16 -13
- package/package.json +8 -8
- package/dist/index.esm.css +0 -6344
- package/dist/index.esm.js +0 -3
- package/dist/less.esm.css +0 -5768
- package/dist/less.esm.js +0 -3
@@ -1,30 +1,32 @@
|
|
1
|
+
import "antd/es/row/style";
|
2
|
+
import _Row from "antd/es/row";
|
1
3
|
import "antd/es/input/style";
|
2
4
|
import _Input from "antd/es/input";
|
3
5
|
import "antd/es/col/style";
|
4
6
|
import _Col from "antd/es/col";
|
5
|
-
import "antd/es/row/style";
|
6
|
-
import _Row from "antd/es/row";
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
8
8
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
9
9
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
10
10
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
11
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
|
12
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
13
12
|
import "antd/es/select/style";
|
14
13
|
import _Select from "antd/es/select";
|
15
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
16
14
|
import { useEffect, useState } from 'react';
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
17
17
|
var Option = _Select.Option;
|
18
18
|
var defaultStyle = {
|
19
19
|
marginRight: '15px',
|
20
20
|
minWidth: '140px'
|
21
21
|
};
|
22
|
+
|
22
23
|
// 全量数据时 dataSourse isAllData必传 <ProAddress dataSource={mockData} isAllData/>,
|
23
24
|
// 逐级数据时 service params isALLData={false} <ProAddress service={AndCity} isAllData={false} params={params} />
|
25
|
+
|
24
26
|
// normalize 可以改变表单获取值的code or name
|
25
|
-
export var transferAddressInfoToRegion =
|
27
|
+
export var transferAddressInfoToRegion = () => {
|
26
28
|
return {
|
27
|
-
normalize:
|
29
|
+
normalize: value => {
|
28
30
|
var _ref = value || {},
|
29
31
|
province = _ref.province,
|
30
32
|
city = _ref.city,
|
@@ -34,11 +36,11 @@ export var transferAddressInfoToRegion = function transferAddressInfoToRegion()
|
|
34
36
|
province: province === null || province === void 0 ? void 0 : province.code,
|
35
37
|
city: city === null || city === void 0 ? void 0 : city.code,
|
36
38
|
county: secondCity === null || secondCity === void 0 ? void 0 : secondCity.code,
|
37
|
-
detail
|
39
|
+
detail,
|
38
40
|
address: detail
|
39
41
|
};
|
40
42
|
},
|
41
|
-
getValueProps:
|
43
|
+
getValueProps: value => {
|
42
44
|
var _ref2 = value || {},
|
43
45
|
province = _ref2.province,
|
44
46
|
city = _ref2.city,
|
@@ -63,7 +65,7 @@ export var transferAddressInfoToRegion = function transferAddressInfoToRegion()
|
|
63
65
|
};
|
64
66
|
};
|
65
67
|
export function ProAddress(_ref3) {
|
66
|
-
var props =
|
68
|
+
var props = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
|
67
69
|
var value = props.value,
|
68
70
|
onChange = props.onChange,
|
69
71
|
disabled = props.disabled,
|
@@ -92,34 +94,28 @@ export function ProAddress(_ref3) {
|
|
92
94
|
secondCitys = _useState6[0],
|
93
95
|
setSecondCitys = _useState6[1];
|
94
96
|
var queryCity = /*#__PURE__*/function () {
|
95
|
-
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(code, type) {
|
97
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(code, type) {
|
96
98
|
var cityList, _cityList, newList, _secondCitys;
|
97
99
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
98
100
|
while (1) switch (_context.prev = _context.next) {
|
99
101
|
case 0:
|
100
102
|
// 全量数据时
|
101
103
|
if (isAllData && type === 'city') {
|
102
|
-
cityList = dataSource.filter(
|
103
|
-
return item.code == code;
|
104
|
-
});
|
104
|
+
cityList = dataSource.filter(item => item.code == code);
|
105
105
|
setCitys(cityList[0].children);
|
106
106
|
} else if (isAllData && type === 'secondCity') {
|
107
|
-
_cityList = dataSource.filter(
|
108
|
-
return item.code == (province === null || province === void 0 ? void 0 : province.code);
|
109
|
-
});
|
107
|
+
_cityList = dataSource.filter(item => item.code == (province === null || province === void 0 ? void 0 : province.code));
|
110
108
|
newList = _cityList[0].children;
|
111
|
-
_secondCitys = newList.filter(
|
112
|
-
return item.code == (city === null || city === void 0 ? void 0 : city.code);
|
113
|
-
});
|
109
|
+
_secondCitys = newList.filter(item => item.code == (city === null || city === void 0 ? void 0 : city.code));
|
114
110
|
setSecondCitys(_secondCitys[0].children);
|
115
111
|
}
|
116
112
|
// 逐级查询时
|
117
113
|
if (!isAllData) {
|
118
114
|
service(_objectSpread(_objectSpread({}, params), {}, {
|
119
115
|
valueParentCode: code
|
120
|
-
})).then(
|
116
|
+
})).then(res => {
|
121
117
|
var _res$data;
|
122
|
-
if (res && (
|
118
|
+
if (res && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.length) {
|
123
119
|
if (type === 'city') {
|
124
120
|
setCitys(res ? res.data : []);
|
125
121
|
} else if (type === 'secondCity') {
|
@@ -138,7 +134,7 @@ export function ProAddress(_ref3) {
|
|
138
134
|
return _ref5.apply(this, arguments);
|
139
135
|
};
|
140
136
|
}();
|
141
|
-
var handleProvinceChange =
|
137
|
+
var handleProvinceChange = val => {
|
142
138
|
if (!val) {
|
143
139
|
onChange && onChange({
|
144
140
|
province: {},
|
@@ -148,9 +144,7 @@ export function ProAddress(_ref3) {
|
|
148
144
|
});
|
149
145
|
return;
|
150
146
|
}
|
151
|
-
var provinceDto = provinces.find(
|
152
|
-
return item.code === val;
|
153
|
-
});
|
147
|
+
var provinceDto = provinces.find(item => item.code === val);
|
154
148
|
onChange && onChange({
|
155
149
|
province: {
|
156
150
|
name: provinceDto === null || provinceDto === void 0 ? void 0 : provinceDto.name,
|
@@ -161,7 +155,7 @@ export function ProAddress(_ref3) {
|
|
161
155
|
detail: undefined
|
162
156
|
});
|
163
157
|
};
|
164
|
-
var handleCityChange =
|
158
|
+
var handleCityChange = val => {
|
165
159
|
if (!val) {
|
166
160
|
onChange && onChange(_objectSpread(_objectSpread({}, value), {}, {
|
167
161
|
city: {},
|
@@ -170,9 +164,7 @@ export function ProAddress(_ref3) {
|
|
170
164
|
}));
|
171
165
|
return;
|
172
166
|
}
|
173
|
-
var cityDto = citys.find(
|
174
|
-
return item.code === val;
|
175
|
-
});
|
167
|
+
var cityDto = citys.find(item => item.code === val);
|
176
168
|
onChange && onChange(_objectSpread(_objectSpread({}, value), {}, {
|
177
169
|
city: {
|
178
170
|
name: cityDto.name,
|
@@ -182,7 +174,7 @@ export function ProAddress(_ref3) {
|
|
182
174
|
detail: undefined
|
183
175
|
}));
|
184
176
|
};
|
185
|
-
var handleSecondCityChange =
|
177
|
+
var handleSecondCityChange = val => {
|
186
178
|
if (!val) {
|
187
179
|
onChange && onChange(_objectSpread(_objectSpread({}, value), {}, {
|
188
180
|
secondCity: {},
|
@@ -190,9 +182,7 @@ export function ProAddress(_ref3) {
|
|
190
182
|
}));
|
191
183
|
return;
|
192
184
|
}
|
193
|
-
var secondCityDto = secondCitys.find(
|
194
|
-
return item.code === val;
|
195
|
-
});
|
185
|
+
var secondCityDto = secondCitys.find(item => item.code === val);
|
196
186
|
onChange && onChange(_objectSpread(_objectSpread({}, value), {}, {
|
197
187
|
secondCity: {
|
198
188
|
name: secondCityDto.name,
|
@@ -201,92 +191,80 @@ export function ProAddress(_ref3) {
|
|
201
191
|
detail: undefined
|
202
192
|
}));
|
203
193
|
};
|
204
|
-
var handleDetailChange =
|
194
|
+
var handleDetailChange = e => {
|
205
195
|
onChange && onChange(_objectSpread(_objectSpread({}, value), {}, {
|
206
196
|
detail: e.target.value
|
207
197
|
}));
|
208
198
|
};
|
209
|
-
useEffect(
|
199
|
+
useEffect(() => {
|
210
200
|
if (!isAllData) {
|
211
201
|
service(_objectSpread(_objectSpread({}, params), {}, {
|
212
202
|
valueParentCode: province === null || province === void 0 ? void 0 : province.code
|
213
|
-
})).then(
|
203
|
+
})).then(res => {
|
214
204
|
setProvinces(res.data);
|
215
205
|
});
|
216
206
|
}
|
217
207
|
}, []);
|
218
|
-
useEffect(
|
208
|
+
useEffect(() => {
|
219
209
|
dataSource.length && setProvinces(dataSource);
|
220
210
|
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.length]);
|
221
|
-
useEffect(
|
211
|
+
useEffect(() => {
|
222
212
|
(province === null || province === void 0 ? void 0 : province.code) && queryCity(province.code, 'city');
|
223
213
|
setSecondCitys([]);
|
224
214
|
}, [province === null || province === void 0 ? void 0 : province.code]);
|
225
|
-
useEffect(
|
215
|
+
useEffect(() => {
|
226
216
|
(city === null || city === void 0 ? void 0 : city.code) && queryCity(city.code, 'secondCity');
|
227
217
|
}, [city === null || city === void 0 ? void 0 : city.code]);
|
228
|
-
return _jsxs(_Row, {
|
218
|
+
return /*#__PURE__*/_jsxs(_Row, {
|
229
219
|
gutter: 10,
|
230
|
-
children: [_jsx(_Col, {
|
220
|
+
children: [/*#__PURE__*/_jsx(_Col, {
|
231
221
|
span: 6,
|
232
|
-
children: _jsx(_Select, _objectSpread(_objectSpread({
|
222
|
+
children: /*#__PURE__*/_jsx(_Select, _objectSpread(_objectSpread({
|
233
223
|
disabled: disabled,
|
234
224
|
value: province === null || province === void 0 ? void 0 : province.code,
|
235
225
|
placeholder: "\u8BF7\u9009\u62E9\u7701\u4EFD",
|
236
226
|
onChange: handleProvinceChange,
|
237
227
|
style: defaultStyle,
|
238
|
-
getPopupContainer:
|
239
|
-
return trigger === null || trigger === void 0 ? void 0 : trigger.parentElement;
|
240
|
-
}
|
228
|
+
getPopupContainer: trigger => trigger === null || trigger === void 0 ? void 0 : trigger.parentElement
|
241
229
|
}, defaultProps), {}, {
|
242
|
-
children: provinces === null || provinces === void 0 ? void 0 : provinces.map(
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
}, item.code);
|
247
|
-
})
|
230
|
+
children: provinces === null || provinces === void 0 ? void 0 : provinces.map(item => /*#__PURE__*/_jsxs(Option, {
|
231
|
+
value: item.code,
|
232
|
+
children: [item.code, "-", item.name]
|
233
|
+
}, item.code))
|
248
234
|
}))
|
249
|
-
}), _jsx(_Col, {
|
235
|
+
}), /*#__PURE__*/_jsx(_Col, {
|
250
236
|
span: 6,
|
251
|
-
children: _jsx(_Select, _objectSpread(_objectSpread({
|
237
|
+
children: /*#__PURE__*/_jsx(_Select, _objectSpread(_objectSpread({
|
252
238
|
disabled: disabled,
|
253
239
|
value: city === null || city === void 0 ? void 0 : city.code,
|
254
240
|
placeholder: "\u8BF7\u9009\u62E9\u5E02",
|
255
241
|
onChange: handleCityChange,
|
256
242
|
style: defaultStyle,
|
257
|
-
getPopupContainer:
|
258
|
-
return trigger === null || trigger === void 0 ? void 0 : trigger.parentElement;
|
259
|
-
}
|
243
|
+
getPopupContainer: trigger => trigger === null || trigger === void 0 ? void 0 : trigger.parentElement
|
260
244
|
}, defaultProps), {}, {
|
261
|
-
children: citys === null || citys === void 0 ? void 0 : citys.map(
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
}, item.code);
|
266
|
-
})
|
245
|
+
children: citys === null || citys === void 0 ? void 0 : citys.map(item => /*#__PURE__*/_jsxs(Option, {
|
246
|
+
value: item.code,
|
247
|
+
children: [item.code, "-", item.name]
|
248
|
+
}, item.code))
|
267
249
|
}))
|
268
|
-
}), _jsx(_Col, {
|
250
|
+
}), /*#__PURE__*/_jsx(_Col, {
|
269
251
|
span: 6,
|
270
|
-
children: _jsx(_Select, _objectSpread(_objectSpread({
|
252
|
+
children: /*#__PURE__*/_jsx(_Select, _objectSpread(_objectSpread({
|
271
253
|
disabled: disabled,
|
272
254
|
value: secondCity === null || secondCity === void 0 ? void 0 : secondCity.code,
|
273
255
|
placeholder: "\u8BF7\u9009\u62E9\u533A/\u53BF",
|
274
256
|
onChange: handleSecondCityChange,
|
275
257
|
style: defaultStyle,
|
276
|
-
getPopupContainer:
|
277
|
-
return trigger === null || trigger === void 0 ? void 0 : trigger.parentElement;
|
278
|
-
}
|
258
|
+
getPopupContainer: trigger => trigger === null || trigger === void 0 ? void 0 : trigger.parentElement
|
279
259
|
}, defaultProps), {}, {
|
280
|
-
children: secondCitys === null || secondCitys === void 0 ? void 0 : secondCitys.map(
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
}, item.code);
|
285
|
-
})
|
260
|
+
children: secondCitys === null || secondCitys === void 0 ? void 0 : secondCitys.map(item => /*#__PURE__*/_jsxs(Option, {
|
261
|
+
value: item.code,
|
262
|
+
children: [item.code, "-", item.name]
|
263
|
+
}, item.code))
|
286
264
|
}))
|
287
|
-
}), _jsx(_Col, {
|
265
|
+
}), /*#__PURE__*/_jsx(_Col, {
|
288
266
|
span: 6,
|
289
|
-
children: _jsx(_Input, {
|
267
|
+
children: /*#__PURE__*/_jsx(_Input, {
|
290
268
|
disabled: disabled,
|
291
269
|
value: detail,
|
292
270
|
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740",
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
3
|
+
import "antd/es/form/style";
|
4
|
+
import _Form from "antd/es/form";
|
1
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
6
|
import "antd/es/select/style";
|
3
7
|
import _Select from "antd/es/select";
|
4
|
-
import "antd/es/form/style";
|
5
|
-
import _Form from "antd/es/form";
|
6
|
-
import "antd/es/input/style";
|
7
|
-
import _Input from "antd/es/input";
|
8
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
9
9
|
var _excluded = ["dataSource", "nameKey", "codeKey"];
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
11
10
|
import { forwardRef } from 'react';
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
13
|
/**
|
13
14
|
* 证件号码 + 证件类型
|
14
15
|
* @date 2022-01-06
|
@@ -19,7 +20,8 @@ import { forwardRef } from 'react';
|
|
19
20
|
* @param {any} ...restProps}:ProCertValidityPropsType
|
20
21
|
* @returns {any}
|
21
22
|
*/
|
22
|
-
|
23
|
+
|
24
|
+
export var ProCertNo = /*#__PURE__*/forwardRef((_ref, ref) => {
|
23
25
|
var _certTypeProps$fileNa, _certTypeProps$rules, _restCertTypeProps$pl, _certNoProps$fileName, _certNoProps$rules, _certNoProps$placehol;
|
24
26
|
var certNoProps = _ref.certNoProps,
|
25
27
|
certTypeProps = _ref.certTypeProps;
|
@@ -30,30 +32,28 @@ export var ProCertNo = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
30
32
|
_certTypeProps$codeKe = certTypeProps.codeKey,
|
31
33
|
codeKey = _certTypeProps$codeKe === void 0 ? 'code' : _certTypeProps$codeKe,
|
32
34
|
restCertTypeProps = _objectWithoutProperties(certTypeProps, _excluded);
|
33
|
-
return _jsxs(_Input.Group, {
|
35
|
+
return /*#__PURE__*/_jsxs(_Input.Group, {
|
34
36
|
compact: true,
|
35
|
-
children: [_jsx(_Form.Item, {
|
37
|
+
children: [/*#__PURE__*/_jsx(_Form.Item, {
|
36
38
|
noStyle: true,
|
37
39
|
name: (_certTypeProps$fileNa = certTypeProps.fileName) !== null && _certTypeProps$fileNa !== void 0 ? _certTypeProps$fileNa : 'certType',
|
38
40
|
rules: (_certTypeProps$rules = certTypeProps.rules) !== null && _certTypeProps$rules !== void 0 ? _certTypeProps$rules : [],
|
39
|
-
children: _jsx(_Select, _objectSpread(_objectSpread({
|
41
|
+
children: /*#__PURE__*/_jsx(_Select, _objectSpread(_objectSpread({
|
40
42
|
style: {
|
41
43
|
width: '40%'
|
42
44
|
}
|
43
45
|
}, restCertTypeProps), {}, {
|
44
46
|
placeholder: (_restCertTypeProps$pl = restCertTypeProps === null || restCertTypeProps === void 0 ? void 0 : restCertTypeProps.placeholder) !== null && _restCertTypeProps$pl !== void 0 ? _restCertTypeProps$pl : '请选择',
|
45
|
-
children: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) && dataSource.map(
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
}, item[codeKey]);
|
50
|
-
})
|
47
|
+
children: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) && dataSource.map(item => /*#__PURE__*/_jsx(_Select.Option, {
|
48
|
+
value: item[codeKey],
|
49
|
+
children: item[nameKey]
|
50
|
+
}, item[codeKey]))
|
51
51
|
}))
|
52
|
-
}), _jsx(_Form.Item, {
|
52
|
+
}), /*#__PURE__*/_jsx(_Form.Item, {
|
53
53
|
noStyle: true,
|
54
54
|
name: (_certNoProps$fileName = certNoProps.fileName) !== null && _certNoProps$fileName !== void 0 ? _certNoProps$fileName : 'certNo',
|
55
55
|
rules: (_certNoProps$rules = certNoProps.rules) !== null && _certNoProps$rules !== void 0 ? _certNoProps$rules : [],
|
56
|
-
children: _jsx(_Input, _objectSpread(_objectSpread({
|
56
|
+
children: /*#__PURE__*/_jsx(_Input, _objectSpread(_objectSpread({
|
57
57
|
style: {
|
58
58
|
width: '60%'
|
59
59
|
}
|
@@ -5,28 +5,26 @@ import "antd/es/input/style";
|
|
5
5
|
import _Input from "antd/es/input";
|
6
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
7
7
|
import "antd/es/date-picker/style";
|
8
|
-
import _DatePicker from "antd/es/date-picker";
|
8
|
+
import _DatePicker from "antd/es/date-picker"; // @ts-nocheck
|
9
9
|
var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"];
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
11
|
-
// @ts-nocheck
|
12
|
-
|
13
10
|
import moment from 'moment';
|
14
11
|
import { forwardRef, useMemo, useRef } from 'react';
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
14
|
var RangePicker = _DatePicker.RangePicker;
|
16
15
|
var defaultFormatDate = 'YYYY-MM-DD';
|
17
|
-
var defaultPopupContainer =
|
18
|
-
|
19
|
-
};
|
16
|
+
var defaultPopupContainer = triggerNode => triggerNode.parentNode || document.body;
|
17
|
+
|
20
18
|
// 校验当前时间是否永久
|
21
|
-
var checkIsForever =
|
22
|
-
|
23
|
-
};
|
19
|
+
var checkIsForever = date => date === '9999-01-01';
|
20
|
+
|
24
21
|
/**
|
25
22
|
* 继承了antd原本DatePicker 与 RangePicker接口,
|
26
23
|
* 可以在这里使用所有原有antd DatePicker的属性和事件,
|
27
24
|
* 并根据自身需要进行扩展
|
28
25
|
*/
|
29
|
-
|
26
|
+
|
27
|
+
export var ProCertValidity = /*#__PURE__*/forwardRef((_ref, ref) => {
|
30
28
|
var _value4;
|
31
29
|
var value = _ref.value,
|
32
30
|
onChange = _ref.onChange,
|
@@ -41,7 +39,7 @@ export var ProCertValidity = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
41
39
|
proformmode = _ref.proformmode,
|
42
40
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
43
41
|
var isChange = useRef(false);
|
44
|
-
var rangeTime = useMemo(
|
42
|
+
var rangeTime = useMemo(() => {
|
45
43
|
value = value || {};
|
46
44
|
if (isRange) {
|
47
45
|
var _value2 = value,
|
@@ -111,20 +109,20 @@ export var ProCertValidity = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
111
109
|
}
|
112
110
|
return {};
|
113
111
|
}, [value, (_value4 = value) === null || _value4 === void 0 ? void 0 : _value4.dateTime]);
|
114
|
-
var changeRangeTime =
|
112
|
+
var changeRangeTime = values => {
|
115
113
|
onChange({
|
116
114
|
startTime: values ? moment(values === null || values === void 0 ? void 0 : values[0]).format(defaultFormatDate) : null,
|
117
115
|
endTime: values ? moment(values === null || values === void 0 ? void 0 : values[1]).format(defaultFormatDate) : null,
|
118
116
|
forever: 'N'
|
119
117
|
});
|
120
118
|
};
|
121
|
-
var changeDateTime =
|
119
|
+
var changeDateTime = values => {
|
122
120
|
onChange({
|
123
121
|
dateTime: values ? values.format(defaultFormatDate) : null,
|
124
122
|
forever: 'N'
|
125
123
|
});
|
126
124
|
};
|
127
|
-
var changeForever =
|
125
|
+
var changeForever = e => {
|
128
126
|
var tempValue = isRange ? {
|
129
127
|
dateTime: e.target.checked ? '9999-01-01' : null,
|
130
128
|
forever: e.target.checked ? 'Y' : 'N',
|
@@ -144,15 +142,15 @@ export var ProCertValidity = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
144
142
|
} else {
|
145
143
|
_value = rangeTime.range ? moment(rangeTime.range).format(defaultFormatDate) : null;
|
146
144
|
}
|
147
|
-
return _jsx(_Input, {
|
145
|
+
return /*#__PURE__*/_jsx(_Input, {
|
148
146
|
value: _value,
|
149
147
|
disabled: true,
|
150
148
|
bordered: false
|
151
149
|
});
|
152
150
|
}
|
153
|
-
return _jsxs(_Input.Group, {
|
151
|
+
return /*#__PURE__*/_jsxs(_Input.Group, {
|
154
152
|
compact: true,
|
155
|
-
children: [isRange ? _jsx(RangePicker, _objectSpread({
|
153
|
+
children: [isRange ? /*#__PURE__*/_jsx(RangePicker, _objectSpread({
|
156
154
|
value: rangeTime.range,
|
157
155
|
onChange: changeRangeTime,
|
158
156
|
getPopupContainer: getPopupContainer,
|
@@ -160,7 +158,7 @@ export var ProCertValidity = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
160
158
|
style: {
|
161
159
|
width: 'calc(100% - 84px)'
|
162
160
|
}
|
163
|
-
}, restProps)) : _jsx(_DatePicker, _objectSpread({
|
161
|
+
}, restProps)) : /*#__PURE__*/_jsx(_DatePicker, _objectSpread({
|
164
162
|
value: rangeTime.range,
|
165
163
|
onChange: changeDateTime,
|
166
164
|
getPopupContainer: getPopupContainer,
|
@@ -168,12 +166,12 @@ export var ProCertValidity = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
168
166
|
style: {
|
169
167
|
width: 'calc(100% - 84px)'
|
170
168
|
}
|
171
|
-
}, restProps)), showForever && _jsx("div", {
|
169
|
+
}, restProps)), showForever && /*#__PURE__*/_jsx("div", {
|
172
170
|
className: "ant-input",
|
173
171
|
style: {
|
174
172
|
width: '84px'
|
175
173
|
},
|
176
|
-
children: _jsx(_Checkbox, {
|
174
|
+
children: /*#__PURE__*/_jsx(_Checkbox, {
|
177
175
|
checked: rangeTime.forever,
|
178
176
|
onChange: changeForever,
|
179
177
|
disabled: disabled,
|
@@ -4,18 +4,19 @@ import "antd/es/select/style";
|
|
4
4
|
import _Select from "antd/es/select";
|
5
5
|
import "antd/es/input-number/style";
|
6
6
|
import _InputNumber from "antd/es/input-number";
|
7
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
8
7
|
import "antd/es/form/style";
|
9
8
|
import _Form from "antd/es/form";
|
9
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
10
10
|
import "antd/es/input/style";
|
11
11
|
import _Input from "antd/es/input";
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
13
12
|
import React, { cloneElement } from 'react';
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
15
|
export default function ProRangeBox(_ref) {
|
15
16
|
var _ref$configOption = _ref.configOption,
|
16
17
|
configOption = _ref$configOption === void 0 ? [] : _ref$configOption;
|
17
|
-
var CutMiddle =
|
18
|
-
return _jsx(_Input, {
|
18
|
+
var CutMiddle = () => {
|
19
|
+
return /*#__PURE__*/_jsx(_Input, {
|
19
20
|
className: "site-input-split",
|
20
21
|
style: {
|
21
22
|
width: 40,
|
@@ -27,60 +28,60 @@ export default function ProRangeBox(_ref) {
|
|
27
28
|
disabled: true
|
28
29
|
});
|
29
30
|
};
|
30
|
-
return _jsx(_Input.Group, {
|
31
|
+
return /*#__PURE__*/_jsx(_Input.Group, {
|
31
32
|
style: {
|
32
33
|
display: 'flex'
|
33
34
|
},
|
34
35
|
className: "site-input-group-wrapper pro-range-box",
|
35
|
-
children: configOption === null || configOption === void 0 ? void 0 : configOption.map(
|
36
|
-
if (_item
|
37
|
-
return _jsxs(React.Fragment, {
|
38
|
-
children: [_jsx(_Form.Item, {
|
36
|
+
children: configOption === null || configOption === void 0 ? void 0 : configOption.map((_item, ind) => {
|
37
|
+
if (_item !== null && _item !== void 0 && _item.component) {
|
38
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
39
|
+
children: [/*#__PURE__*/_jsx(_Form.Item, {
|
39
40
|
noStyle: true,
|
40
41
|
name: _item === null || _item === void 0 ? void 0 : _item.name,
|
41
42
|
rules: _item === null || _item === void 0 ? void 0 : _item.rules,
|
42
43
|
children: _item.component ? /*#__PURE__*/cloneElement(_item.component, _objectSpread({
|
43
44
|
disabled: _item.disabled
|
44
45
|
}, _item)) : ''
|
45
|
-
}), ind === 0 && _jsx(CutMiddle, {})]
|
46
|
+
}), ind === 0 && /*#__PURE__*/_jsx(CutMiddle, {})]
|
46
47
|
}, ind);
|
47
48
|
}
|
48
49
|
if ((_item === null || _item === void 0 ? void 0 : _item.type) === 'inputNumber') {
|
49
|
-
return _jsxs(React.Fragment, {
|
50
|
-
children: [_jsx(_Form.Item, {
|
50
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
51
|
+
children: [/*#__PURE__*/_jsx(_Form.Item, {
|
51
52
|
noStyle: true,
|
52
53
|
name: _item === null || _item === void 0 ? void 0 : _item.name,
|
53
54
|
rules: _item === null || _item === void 0 ? void 0 : _item.rules,
|
54
|
-
children: _jsx(_InputNumber, _objectSpread({
|
55
|
+
children: /*#__PURE__*/_jsx(_InputNumber, _objectSpread({
|
55
56
|
styles: {
|
56
57
|
width: '100%'
|
57
58
|
}
|
58
59
|
}, _item))
|
59
|
-
}), ind === 0 && _jsx(CutMiddle, {})]
|
60
|
+
}), ind === 0 && /*#__PURE__*/_jsx(CutMiddle, {})]
|
60
61
|
}, ind);
|
61
62
|
}
|
62
63
|
if ((_item === null || _item === void 0 ? void 0 : _item.type) === 'Select') {
|
63
|
-
return _jsxs(React.Fragment, {
|
64
|
-
children: [_jsx(_Form.Item, {
|
64
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
65
|
+
children: [/*#__PURE__*/_jsx(_Form.Item, {
|
65
66
|
noStyle: true,
|
66
67
|
name: _item === null || _item === void 0 ? void 0 : _item.name,
|
67
68
|
rules: _item === null || _item === void 0 ? void 0 : _item.rules,
|
68
|
-
children: _jsx(_Select, _objectSpread({
|
69
|
+
children: /*#__PURE__*/_jsx(_Select, _objectSpread({
|
69
70
|
allowClear: true,
|
70
71
|
style: {
|
71
72
|
width: '100%'
|
72
73
|
}
|
73
74
|
}, _item))
|
74
|
-
}), ind === 0 && _jsx(CutMiddle, {})]
|
75
|
+
}), ind === 0 && /*#__PURE__*/_jsx(CutMiddle, {})]
|
75
76
|
}, ind);
|
76
77
|
}
|
77
|
-
return _jsxs(React.Fragment, {
|
78
|
-
children: [_jsx(_Col, {
|
79
|
-
children: _jsx(_Form.Item, {
|
78
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
79
|
+
children: [/*#__PURE__*/_jsx(_Col, {
|
80
|
+
children: /*#__PURE__*/_jsx(_Form.Item, {
|
80
81
|
noStyle: true,
|
81
82
|
name: _item === null || _item === void 0 ? void 0 : _item.name,
|
82
83
|
rules: _item === null || _item === void 0 ? void 0 : _item.rules,
|
83
|
-
children: _jsx(_Input, _objectSpread(_objectSpread({
|
84
|
+
children: /*#__PURE__*/_jsx(_Input, _objectSpread(_objectSpread({
|
84
85
|
style: {
|
85
86
|
width: '100%'
|
86
87
|
}
|
@@ -88,8 +89,8 @@ export default function ProRangeBox(_ref) {
|
|
88
89
|
rules: _item === null || _item === void 0 ? void 0 : _item.rules
|
89
90
|
}))
|
90
91
|
})
|
91
|
-
}, _item === null || _item === void 0 ? void 0 : _item.id), ind === 0 && _jsx(_Col, {
|
92
|
-
children: _jsx(CutMiddle, {})
|
92
|
+
}, _item === null || _item === void 0 ? void 0 : _item.id), ind === 0 && /*#__PURE__*/_jsx(_Col, {
|
93
|
+
children: /*#__PURE__*/_jsx(CutMiddle, {})
|
93
94
|
})]
|
94
95
|
}, ind);
|
95
96
|
})
|