@zat-design/sisyphus-react 4.0.0-beta.4 → 4.0.0-beta.6
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/dist/index.esm.css +1 -0
- package/dist/index.min.js +1 -0
- package/dist/less.esm.css +1 -0
- package/dist/less.min.js +1 -0
- package/es/FormsProvider/index.js +5 -5
- package/es/ProAction/components/CheckModalContent/index.js +5 -7
- package/es/ProAction/index.js +16 -16
- package/es/ProConfigProvider/index.js +31 -17
- package/es/ProDownload/index.js +13 -12
- package/es/ProDownload/utils.js +15 -15
- package/es/ProDrawerForm/components/ProDrawer/index.js +22 -19
- package/es/ProDrawerForm/components/ProModal/index.js +14 -9
- package/es/ProDrawerForm/index.js +6 -10
- package/es/ProDrawerForm/utils/index.js +1 -1
- package/es/ProEditLabel/components/RenderProForm.js +10 -9
- package/es/ProEditLabel/index.js +36 -24
- package/es/ProEditLabel/utils/index.js +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +58 -56
- package/es/ProEditTable/components/RcTable/BaseTable.js +21 -20
- package/es/ProEditTable/components/RcTable/DraggableTable.js +27 -34
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +40 -46
- package/es/ProEditTable/components/RenderField/index.js +98 -121
- package/es/ProEditTable/components/RenderToolbar/index.js +27 -33
- package/es/ProEditTable/components/Summary/index.js +16 -14
- package/es/ProEditTable/components/Validator/index.js +9 -6
- package/es/ProEditTable/index.js +130 -147
- package/es/ProEditTable/utils/config.js +29 -36
- package/es/ProEditTable/utils/diffOriginal.js +13 -13
- package/es/ProEditTable/utils/getDefaultProps.js +6 -7
- package/es/ProEditTable/utils/index.js +52 -58
- package/es/ProEditTable/utils/tools.js +32 -41
- package/es/ProEditTable/utils/transform.js +7 -11
- package/es/ProEditTable/utils/useEditTableError.js +10 -12
- package/es/ProEnum/components/Group.js +18 -22
- package/es/ProEnum/components/Tag.js +10 -14
- package/es/ProEnum/hooks/useEnum.js +6 -10
- package/es/ProEnum/hooks/useEnumRequest.js +23 -25
- package/es/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +76 -0
- package/es/ProEnum/index.js +50 -52
- package/es/ProEnum/propsType.d.ts +29 -0
- package/es/ProEnum/utils/eventCenter.js +20 -31
- package/es/ProEnum/utils/frequentEnum.d.ts +40 -0
- package/es/ProEnum/utils/frequentEnum.js +91 -0
- package/es/ProEnum/utils/getEnumLabel.js +8 -12
- package/es/ProEnum/utils/index.js +6 -6
- package/es/ProForm/components/Container.js +4 -3
- package/es/ProForm/components/FormFooter/index.js +16 -13
- package/es/ProForm/components/base/Checkbox/index.js +10 -11
- package/es/ProForm/components/base/DatePicker/index.js +8 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +2 -4
- package/es/ProForm/components/base/Input/index.js +24 -20
- package/es/ProForm/components/base/InputNumber/index.js +21 -18
- package/es/ProForm/components/base/Radio/index.js +11 -12
- package/es/ProForm/components/base/RangePicker/index.js +9 -12
- package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
- package/es/ProForm/components/base/Select/index.js +9 -8
- package/es/ProForm/components/base/Switch/index.js +7 -6
- package/es/ProForm/components/base/SwitchCheckbox/index.js +7 -6
- package/es/ProForm/components/base/TextArea/index.js +9 -8
- package/es/ProForm/components/base/TimePicker/index.js +5 -4
- package/es/ProForm/components/combination/Container/index.js +12 -12
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +60 -70
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +11 -7
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/es/ProForm/components/combination/FormList/components/Empty.js +9 -10
- package/es/ProForm/components/combination/FormList/components/LineFields.js +10 -9
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +32 -36
- package/es/ProForm/components/combination/FormList/index.js +25 -33
- package/es/ProForm/components/combination/FormList/utils.js +5 -7
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -1
- package/es/ProForm/components/combination/Group/component/ComRender.js +14 -14
- package/es/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
- package/es/ProForm/components/combination/Group/hooks/index.js +30 -35
- package/es/ProForm/components/combination/Group/index.js +35 -29
- package/es/ProForm/components/combination/Group/propsType.d.ts +2 -0
- package/es/ProForm/components/combination/Group/style/index.less +7 -0
- package/es/ProForm/components/combination/Group/utils.d.ts +0 -1
- package/es/ProForm/components/combination/Group/utils.js +38 -39
- package/es/ProForm/components/combination/ProCascader/index.js +43 -52
- package/es/ProForm/components/combination/ProCascader/utils/index.js +3 -3
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +16 -16
- package/es/ProForm/components/combination/ProModalSelect/index.js +102 -108
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +73 -47
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.js +20 -18
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.js +17 -15
- package/es/ProForm/components/render/ChangedWrapper.js +24 -26
- package/es/ProForm/components/render/ConfirmWrapper.js +10 -11
- package/es/ProForm/components/render/Render.js +107 -102
- package/es/ProForm/components/render/RenderFields.d.ts +0 -1
- package/es/ProForm/components/render/RenderFields.js +22 -24
- package/es/ProForm/index.js +44 -45
- package/es/ProForm/propsType.d.ts +1 -4
- package/es/ProForm/utils/diffOriginal.js +9 -9
- package/es/ProForm/utils/getDefaultProps.js +5 -5
- package/es/ProForm/utils/index.js +62 -90
- package/es/ProForm/utils/processDependencies.js +4 -5
- package/es/ProForm/utils/rulesCreator.js +12 -12
- package/es/ProForm/utils/transformNames.js +2 -2
- package/es/ProForm/utils/transformValue.js +6 -8
- package/es/ProForm/utils/useDeepCompareMemo.js +1 -1
- package/es/ProForm/utils/useFieldProps.js +1 -3
- package/es/ProForm/utils/useForm.js +19 -21
- package/es/ProForm/utils/useRules.js +17 -22
- package/es/ProForm/utils/useShouldUpdate.js +79 -83
- package/es/ProForm/utils/useWatch.js +12 -12
- package/es/ProForm/utils/valueType.js +46 -50
- package/es/ProIcon/index.js +30 -31
- package/es/ProIcon/utils/index.js +5 -5
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Icon/Icon.js +4 -4
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +19 -22
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +23 -30
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +3 -3
- package/es/ProLayout/components/Layout/Menu/index.js +9 -9
- package/es/ProLayout/components/Layout/Notice/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.js +23 -18
- package/es/ProLayout/components/ProFooter/index.js +13 -14
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +6 -5
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -5
- package/es/ProLayout/components/ProHeader/index.js +68 -59
- package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
- package/es/ProLayout/index.js +33 -32
- package/es/ProLayout/utils/index.js +17 -18
- package/es/ProSelect/components/AdaptiveTooltip.js +8 -9
- package/es/ProSelect/index.js +57 -64
- package/es/ProSelect/utils/index.js +17 -28
- package/es/ProStep/components/Anchor/index.js +10 -9
- package/es/ProStep/components/Item/index.js +11 -11
- package/es/ProStep/components/Listener/index.js +6 -10
- package/es/ProStep/components/Step/index.js +9 -11
- package/es/ProStep/index.js +24 -30
- package/es/ProStep/utils/index.js +8 -8
- package/es/ProStepTab/index.js +27 -28
- package/es/ProTable/components/FormatColumn/index.js +54 -59
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +6 -7
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +21 -37
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +16 -17
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +5 -6
- package/es/ProTable/components/RenderColumn/index.js +36 -35
- package/es/ProTable/components/RenderEmptyText/index.js +1 -1
- package/es/ProTable/components/RenderFooter/index.js +2 -2
- package/es/ProTable/components/RenderSummary/index.js +13 -12
- package/es/ProTable/components/RenderTableHeader/index.js +5 -4
- package/es/ProTable/components/RenderTabs/index.js +26 -29
- package/es/ProTable/components/TableResizable/index.js +8 -8
- package/es/ProTable/components/TooltipTitle/index.js +4 -3
- package/es/ProTable/hooks/useAntdTable.js +80 -95
- package/es/ProTable/index.js +110 -133
- package/es/ProTable/propsType.d.ts +9 -3
- package/es/ProTable/utils/index.js +13 -16
- package/es/ProTabs/components/Card/index.js +14 -8
- package/es/ProTabs/index.js +30 -20
- package/es/ProTabs/propType.d.ts +5 -0
- package/es/ProTabs/style/index.less +40 -3
- package/es/ProThemeTools/component/ProTools/index.js +46 -39
- package/es/ProThemeTools/context/ThemeContext.js +13 -13
- package/es/ProThemeTools/index.js +18 -19
- package/es/ProThemeTools/utils/index.js +14 -18
- package/es/ProTooltip/index.js +24 -27
- package/es/ProTree/components/AdaptiveTooltip.js +5 -6
- package/es/ProTree/components/List.js +10 -13
- package/es/ProTree/components/ProTree.js +47 -64
- package/es/ProTree/components/ProTreeSelect/index.js +77 -76
- package/es/ProTree/components/Tree.js +23 -22
- package/es/ProTree/index.js +1 -1
- package/es/ProTree/utils.js +14 -14
- package/es/ProTreeModal/components/Cascader.js +13 -16
- package/es/ProTreeModal/components/List.js +49 -70
- package/es/ProTreeModal/components/SortableItem.js +7 -8
- package/es/ProTreeModal/components/Tree.js +18 -23
- package/es/ProTreeModal/components/Trigger.js +15 -10
- package/es/ProTreeModal/index.js +98 -151
- package/es/ProTreeModal/utils.js +21 -21
- package/es/ProUpload/components/ButtonRender.js +11 -12
- package/es/ProUpload/components/DragRender.js +17 -20
- package/es/ProUpload/components/DraggableUploadListItem.js +2 -2
- package/es/ProUpload/components/Example.js +3 -3
- package/es/ProUpload/components/FileItem.js +30 -25
- package/es/ProUpload/components/ImageRender.js +29 -22
- package/es/ProUpload/index.js +55 -66
- package/es/ProUpload/uitls.js +2 -2
- package/es/ProUtils/utils/index.js +10 -14
- package/es/ProViewer/index.js +22 -19
- package/es/ProViewer/propsType.js +0 -3
- package/es/ProWaterMark/index.js +4 -3
- package/es/index.d.ts +1 -1
- package/es/locale/index.js +2 -2
- package/es/style/index.less +1 -1
- package/es/style/theme/base.less +1 -0
- package/es/utils/index.js +11 -13
- package/lib/FormsProvider/index.js +30 -50
- package/lib/ProAction/components/CheckModalContent/index.js +31 -27
- package/lib/ProAction/index.js +194 -151
- package/lib/ProAction/propsType.js +4 -16
- package/lib/ProConfigProvider/index.js +136 -136
- package/lib/ProDownload/index.js +192 -124
- package/lib/ProDownload/propsType.js +4 -16
- package/lib/ProDownload/utils.js +189 -143
- package/lib/ProDrawerForm/components/ProDrawer/index.js +243 -169
- package/lib/ProDrawerForm/components/ProModal/index.js +194 -134
- package/lib/ProDrawerForm/components/index.js +17 -39
- package/lib/ProDrawerForm/index.js +79 -88
- package/lib/ProDrawerForm/propsType.js +4 -16
- package/lib/ProDrawerForm/utils/index.js +13 -30
- package/lib/ProEditLabel/components/RenderProForm.js +58 -57
- package/lib/ProEditLabel/index.js +251 -178
- package/lib/ProEditLabel/propsType.js +4 -16
- package/lib/ProEditLabel/utils/index.js +11 -26
- package/lib/ProEditTable/components/ActionButton/index.js +144 -155
- package/lib/ProEditTable/components/RcTable/BaseTable.js +97 -96
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +172 -151
- package/lib/ProEditTable/components/RcTable/index.js +17 -39
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +177 -176
- package/lib/ProEditTable/components/RenderField/index.js +628 -539
- package/lib/ProEditTable/components/RenderToolbar/index.js +119 -105
- package/lib/ProEditTable/components/Summary/index.js +70 -61
- package/lib/ProEditTable/components/Validator/index.js +30 -47
- package/lib/ProEditTable/components/index.js +38 -48
- package/lib/ProEditTable/index.js +379 -324
- package/lib/ProEditTable/propsType.js +4 -16
- package/lib/ProEditTable/utils/config.js +225 -170
- package/lib/ProEditTable/utils/diffOriginal.js +93 -80
- package/lib/ProEditTable/utils/getDefaultProps.js +26 -42
- package/lib/ProEditTable/utils/index.js +318 -244
- package/lib/ProEditTable/utils/tools.js +438 -243
- package/lib/ProEditTable/utils/transform.js +15 -28
- package/lib/ProEditTable/utils/useEditTableError.js +65 -54
- package/lib/ProEnum/components/Group.js +53 -81
- package/lib/ProEnum/components/Tag.js +37 -54
- package/lib/ProEnum/hooks/useEnum.js +72 -52
- package/lib/ProEnum/hooks/useEnumRequest.js +267 -194
- package/lib/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +83 -0
- package/lib/ProEnum/index.js +239 -234
- package/lib/ProEnum/propsType.d.ts +29 -0
- package/lib/ProEnum/propsType.js +4 -16
- package/lib/ProEnum/utils/eventCenter.js +15 -12
- package/lib/ProEnum/utils/frequentEnum.d.ts +40 -0
- package/lib/ProEnum/utils/frequentEnum.js +99 -0
- package/lib/ProEnum/utils/getEnumLabel.js +57 -65
- package/lib/ProEnum/utils/index.js +98 -68
- package/lib/ProForm/components/Container.js +35 -45
- package/lib/ProForm/components/FormFooter/index.js +67 -80
- package/lib/ProForm/components/FormFooter/propsType.js +4 -16
- package/lib/ProForm/components/base/Checkbox/index.js +67 -62
- package/lib/ProForm/components/base/DatePicker/index.js +63 -74
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +13 -29
- package/lib/ProForm/components/base/Input/index.js +65 -73
- package/lib/ProForm/components/base/Input/propsType.js +4 -16
- package/lib/ProForm/components/base/InputNumber/index.js +230 -176
- package/lib/ProForm/components/base/Radio/index.js +60 -69
- package/lib/ProForm/components/base/RangePicker/index.js +73 -88
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +28 -45
- package/lib/ProForm/components/base/Select/index.js +63 -69
- package/lib/ProForm/components/base/Switch/index.js +43 -59
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +63 -62
- package/lib/ProForm/components/base/TextArea/index.js +52 -65
- package/lib/ProForm/components/base/TimePicker/index.js +45 -59
- package/lib/ProForm/components/combination/Container/index.js +58 -72
- package/lib/ProForm/components/combination/Container/propsType.js +4 -16
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +240 -195
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +85 -107
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +25 -44
- package/lib/ProForm/components/combination/FormList/components/Empty.js +92 -55
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +92 -117
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +133 -101
- package/lib/ProForm/components/combination/FormList/index.js +131 -164
- package/lib/ProForm/components/combination/FormList/propsType.js +4 -16
- package/lib/ProForm/components/combination/FormList/utils.js +32 -52
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +23 -38
- package/lib/ProForm/components/combination/Group/component/ComRender.js +78 -74
- package/lib/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
- package/lib/ProForm/components/combination/Group/hooks/index.js +123 -123
- package/lib/ProForm/components/combination/Group/index.js +99 -104
- package/lib/ProForm/components/combination/Group/propsType.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/propsType.js +4 -16
- package/lib/ProForm/components/combination/Group/style/index.less +7 -0
- package/lib/ProForm/components/combination/Group/utils.d.ts +0 -1
- package/lib/ProForm/components/combination/Group/utils.js +132 -104
- package/lib/ProForm/components/combination/ProCascader/index.js +271 -226
- package/lib/ProForm/components/combination/ProCascader/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +23 -33
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +113 -114
- package/lib/ProForm/components/combination/ProModalSelect/index.js +651 -472
- package/lib/ProForm/components/combination/ProModalSelect/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +21 -43
- package/lib/ProForm/components/combination/ProNumberRange/index.js +207 -160
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +169 -139
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +28 -49
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +150 -127
- package/lib/ProForm/components/index.js +192 -115
- package/lib/ProForm/components/render/ChangedWrapper.js +130 -141
- package/lib/ProForm/components/render/ConfirmWrapper.js +120 -78
- package/lib/ProForm/components/render/Render.js +445 -346
- package/lib/ProForm/components/render/RenderFields.d.ts +0 -1
- package/lib/ProForm/components/render/RenderFields.js +195 -181
- package/lib/ProForm/components/render/propsType.js +31 -17
- package/lib/ProForm/index.js +282 -235
- package/lib/ProForm/propsType.d.ts +1 -4
- package/lib/ProForm/propsType.js +9 -38
- package/lib/ProForm/utils/diffOriginal.js +88 -81
- package/lib/ProForm/utils/getDefaultProps.js +26 -42
- package/lib/ProForm/utils/index.js +330 -254
- package/lib/ProForm/utils/processDependencies.js +61 -44
- package/lib/ProForm/utils/rulesCreator.js +58 -81
- package/lib/ProForm/utils/transformNames.js +26 -37
- package/lib/ProForm/utils/transformValue.js +47 -47
- package/lib/ProForm/utils/useDeepCompareMemo.js +15 -34
- package/lib/ProForm/utils/useFieldProps.js +10 -42
- package/lib/ProForm/utils/useForm.js +226 -118
- package/lib/ProForm/utils/useRules.js +50 -60
- package/lib/ProForm/utils/useShouldUpdate.js +233 -126
- package/lib/ProForm/utils/useWatch.js +122 -93
- package/lib/ProForm/utils/valueType.js +222 -155
- package/lib/ProIcon/config/index.js +278 -365
- package/lib/ProIcon/index.js +217 -184
- package/lib/ProIcon/propsTypes.js +4 -16
- package/lib/ProIcon/symbolIcon.js +30 -23
- package/lib/ProIcon/utils/index.js +53 -60
- package/lib/ProLayout/components/Layout/Header/index.js +42 -59
- package/lib/ProLayout/components/Layout/Icon/Icon.js +31 -49
- package/lib/ProLayout/components/Layout/Icon/index.js +7 -34
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +170 -139
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +135 -117
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +4 -16
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +44 -60
- package/lib/ProLayout/components/Layout/Menu/index.js +52 -71
- package/lib/ProLayout/components/Layout/Notice/index.js +31 -39
- package/lib/ProLayout/components/Layout/index.js +31 -45
- package/lib/ProLayout/components/ProCollapse/PropTypes.js +4 -16
- package/lib/ProLayout/components/ProCollapse/index.js +159 -148
- package/lib/ProLayout/components/ProFooter/PropTypes.js +4 -16
- package/lib/ProLayout/components/ProFooter/index.js +41 -56
- package/lib/ProLayout/components/ProHeader/PropTypes.js +4 -16
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +26 -53
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +27 -48
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/propsType.js +4 -16
- package/lib/ProLayout/components/ProHeader/components/index.js +17 -39
- package/lib/ProLayout/components/ProHeader/index.js +466 -268
- package/lib/ProLayout/components/ProHeader/utils/index.js +14 -31
- package/lib/ProLayout/components/index.js +24 -42
- package/lib/ProLayout/index.js +139 -130
- package/lib/ProLayout/propTypes.js +4 -16
- package/lib/ProLayout/utils/index.js +120 -86
- package/lib/ProSelect/components/AdaptiveTooltip.js +38 -45
- package/lib/ProSelect/index.js +240 -213
- package/lib/ProSelect/propsType.js +4 -16
- package/lib/ProSelect/utils/index.js +114 -93
- package/lib/ProStep/components/Anchor/index.js +102 -107
- package/lib/ProStep/components/Item/index.js +71 -75
- package/lib/ProStep/components/Listener/index.js +69 -62
- package/lib/ProStep/components/Step/index.js +65 -75
- package/lib/ProStep/index.js +227 -165
- package/lib/ProStep/propsType.js +4 -16
- package/lib/ProStep/utils/index.js +54 -57
- package/lib/ProStepTab/index.js +307 -166
- package/lib/ProStepTab/propsType.js +4 -16
- package/lib/ProTable/components/FormatColumn/index.js +472 -425
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +39 -53
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +183 -135
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +85 -104
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.js +4 -16
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +58 -80
- package/lib/ProTable/components/RcTable/index.js +17 -39
- package/lib/ProTable/components/RenderColumn/index.js +203 -194
- package/lib/ProTable/components/RenderEmptyText/index.js +25 -27
- package/lib/ProTable/components/RenderFooter/index.js +17 -33
- package/lib/ProTable/components/RenderSummary/index.js +57 -46
- package/lib/ProTable/components/RenderTableHeader/index.js +62 -68
- package/lib/ProTable/components/RenderTabs/index.js +67 -80
- package/lib/ProTable/components/TableResizable/index.js +87 -87
- package/lib/ProTable/components/TooltipTitle/index.js +27 -40
- package/lib/ProTable/components/index.js +45 -51
- package/lib/ProTable/hooks/useAntdTable.js +351 -304
- package/lib/ProTable/index.js +354 -333
- package/lib/ProTable/propsType.d.ts +9 -3
- package/lib/ProTable/propsType.js +4 -16
- package/lib/ProTable/utils/index.js +89 -78
- package/lib/ProTabs/components/Card/index.js +57 -30
- package/lib/ProTabs/components/index.js +10 -36
- package/lib/ProTabs/index.js +94 -89
- package/lib/ProTabs/propType.d.ts +5 -0
- package/lib/ProTabs/propType.js +4 -16
- package/lib/ProTabs/style/index.less +40 -3
- package/lib/ProThemeTools/component/ProTools/index.js +246 -198
- package/lib/ProThemeTools/component/index.js +10 -36
- package/lib/ProThemeTools/context/ThemeContext.js +99 -89
- package/lib/ProThemeTools/index.js +207 -172
- package/lib/ProThemeTools/propsType.js +4 -16
- package/lib/ProThemeTools/utils/index.js +84 -80
- package/lib/ProTooltip/index.js +217 -214
- package/lib/ProTooltip/propsType.js +4 -16
- package/lib/ProTree/components/AdaptiveTooltip.js +22 -33
- package/lib/ProTree/components/CloseIcon.js +31 -36
- package/lib/ProTree/components/List.js +69 -68
- package/lib/ProTree/components/ProTree.js +346 -258
- package/lib/ProTree/components/ProTreeSelect/index.js +460 -336
- package/lib/ProTree/components/ProTreeSelect/propsType.js +4 -16
- package/lib/ProTree/components/SearchTitle.js +50 -47
- package/lib/ProTree/components/Tree.js +300 -227
- package/lib/ProTree/components/index.js +31 -45
- package/lib/ProTree/index.js +22 -45
- package/lib/ProTree/propsType.js +4 -16
- package/lib/ProTree/utils.js +140 -79
- package/lib/ProTreeModal/components/Cascader.js +90 -97
- package/lib/ProTreeModal/components/CloseIcon.js +31 -36
- package/lib/ProTreeModal/components/List.js +246 -192
- package/lib/ProTreeModal/components/SearchTitle.js +22 -30
- package/lib/ProTreeModal/components/SortableItem.js +59 -60
- package/lib/ProTreeModal/components/Tree.js +171 -157
- package/lib/ProTreeModal/components/Trigger.js +131 -108
- package/lib/ProTreeModal/components/index.js +45 -51
- package/lib/ProTreeModal/index.js +523 -448
- package/lib/ProTreeModal/propsType.js +4 -16
- package/lib/ProTreeModal/utils.js +160 -99
- package/lib/ProUpload/components/ButtonRender.js +106 -85
- package/lib/ProUpload/components/DragRender.js +167 -117
- package/lib/ProUpload/components/DraggableUploadListItem.js +32 -48
- package/lib/ProUpload/components/Example.js +39 -55
- package/lib/ProUpload/components/FileItem.js +215 -113
- package/lib/ProUpload/components/ImageRender.js +250 -175
- package/lib/ProUpload/index.js +185 -181
- package/lib/ProUpload/propsType.js +4 -16
- package/lib/ProUpload/uitls.js +9 -31
- package/lib/ProUtils/utils/index.js +20 -36
- package/lib/ProViewer/index.js +210 -175
- package/lib/ProViewer/propsType.js +1 -17
- package/lib/ProWaterMark/index.js +20 -38
- package/lib/ProWaterMark/propsType.js +4 -16
- package/lib/index.d.ts +1 -1
- package/lib/index.js +272 -123
- package/lib/locale/en_US.js +127 -145
- package/lib/locale/index.js +40 -55
- package/lib/locale/zh_CN.js +128 -146
- package/lib/style/index.less +1 -1
- package/lib/style/theme/base.less +1 -0
- package/lib/tokens.js +87 -103
- package/lib/utils/index.js +66 -88
- package/package.json +11 -11
- package/dist/esm/index.d.ts +0 -5
- package/dist/esm/index.js +0 -5
- package/dist/esm/regExp/index.d.ts +0 -19
- package/dist/esm/regExp/index.js +0 -73
- package/dist/esm/tools/calc/index.d.ts +0 -4
- package/dist/esm/tools/calc/index.js +0 -67
- package/dist/esm/tools/dateUtils.d.ts +0 -7
- package/dist/esm/tools/dateUtils.js +0 -23
- package/dist/esm/tools/disableDate/index.d.ts +0 -9
- package/dist/esm/tools/disableDate/index.js +0 -43
- package/dist/esm/tools/disableTimeRange/index.d.ts +0 -9
- package/dist/esm/tools/disableTimeRange/index.js +0 -121
- package/dist/esm/tools/formatAmount/index.d.ts +0 -7
- package/dist/esm/tools/formatAmount/index.js +0 -14
- package/dist/esm/tools/formatPerMill/index.d.ts +0 -7
- package/dist/esm/tools/formatPerMill/index.js +0 -11
- package/dist/esm/tools/formatPercent/index.d.ts +0 -7
- package/dist/esm/tools/formatPercent/index.js +0 -11
- package/dist/esm/tools/getDataByIdCard/index.d.ts +0 -16
- package/dist/esm/tools/getDataByIdCard/index.js +0 -65
- package/dist/esm/tools/index.d.ts +0 -12
- package/dist/esm/tools/index.js +0 -14
- package/dist/esm/tools/sumAmount/index.d.ts +0 -16
- package/dist/esm/tools/sumAmount/index.js +0 -40
- package/dist/esm/tools/toChineseNum/index.d.ts +0 -7
- package/dist/esm/tools/toChineseNum/index.js +0 -103
- package/dist/esm/tools/toFixed/index.d.ts +0 -2
- package/dist/esm/tools/toFixed/index.js +0 -5
- package/dist/esm/tools/transformDataName/index.d.ts +0 -12
- package/dist/esm/tools/transformDataName/index.js +0 -37
- package/dist/esm/transforms/dateTransformer/index.d.ts +0 -24
- package/dist/esm/transforms/dateTransformer/index.js +0 -67
- package/dist/esm/transforms/index.d.ts +0 -6
- package/dist/esm/transforms/index.js +0 -6
- package/dist/esm/transforms/propTypes.d.ts +0 -7
- package/dist/esm/transforms/propTypes.js +0 -1
- package/dist/esm/transforms/transformDate/index.d.ts +0 -21
- package/dist/esm/transforms/transformDate/index.js +0 -141
- package/dist/esm/transforms/transformDatePicker/index.d.ts +0 -12
- package/dist/esm/transforms/transformDatePicker/index.js +0 -24
- package/dist/esm/transforms/transformRangePicker/index.d.ts +0 -29
- package/dist/esm/transforms/transformRangePicker/index.js +0 -61
- package/dist/esm/transforms/transformSwitch/index.d.ts +0 -13
- package/dist/esm/transforms/transformSwitch/index.js +0 -35
- package/dist/esm/transforms/utils.d.ts +0 -2
- package/dist/esm/transforms/utils.js +0 -8
- package/dist/esm/validate/index.d.ts +0 -107
- package/dist/esm/validate/index.js +0 -284
- package/tests/__mocks__/fileMock.js +0 -1
- package/tests/__mocks__/zatUtils.js +0 -27
- package/tests/setup.ts +0 -484
- package/tests/test-utils.tsx +0 -81
@@ -1,284 +0,0 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
import regExp from "../regExp";
|
3
|
-
import { getDataByIdCard } from "../tools";
|
4
|
-
|
5
|
-
/** 链接 */
|
6
|
-
export var isExternal = function isExternal(val) {
|
7
|
-
return /^(https?:|mailto:|tel:)/.test(val);
|
8
|
-
}; // 链接
|
9
|
-
/** 邮箱 */
|
10
|
-
export var isEmail = function isEmail(val) {
|
11
|
-
return /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(val);
|
12
|
-
};
|
13
|
-
/** 邮编 */
|
14
|
-
export var isZipCode = function isZipCode(val) {
|
15
|
-
return /^[0-9]{6,6}$/.test(val);
|
16
|
-
};
|
17
|
-
/** 手机号 */
|
18
|
-
export var isPhone = function isPhone(val) {
|
19
|
-
return /^((\+?86)|(\(\+86\)))?1(3|4|5|6|7|8|9)\d{9}$/.test(val);
|
20
|
-
};
|
21
|
-
/** 固定电话 */
|
22
|
-
export var isTel = function isTel(val) {
|
23
|
-
return /^[0-9-()()]{7,18}$/.test(val);
|
24
|
-
};
|
25
|
-
/** 户口本 */
|
26
|
-
export var isHouseHold = function isHouseHold(val) {
|
27
|
-
return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(val);
|
28
|
-
};
|
29
|
-
/** 护照 */
|
30
|
-
export var isPassportCard = function isPassportCard(val) {
|
31
|
-
return /^[0-9A-Z]{8,9}$/.test(val);
|
32
|
-
};
|
33
|
-
/** 港澳通行证 */
|
34
|
-
export var isHMPassCard = function isHMPassCard(val) {
|
35
|
-
return /^[a-zA-Z][a-zA-Z0-9]\d{7}$/.test(val);
|
36
|
-
};
|
37
|
-
/** 军官证 */
|
38
|
-
export var isOfficerCard = function isOfficerCard(val) {
|
39
|
-
return /^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,10})号$/.test(val);
|
40
|
-
};
|
41
|
-
/** 回乡证 m|M|h|H开头10位或者8位数字 */
|
42
|
-
export var isHomeReturnCard = function isHomeReturnCard(val) {
|
43
|
-
return /^[a-zA-Z0-9]{9,12}$/.test(val);
|
44
|
-
};
|
45
|
-
// 港澳居民来往内地通行证
|
46
|
-
export var isGaToInPassCard = function isGaToInPassCard(val) {
|
47
|
-
return /^[a-zA-Z0-9]{9,12}$/.test(val);
|
48
|
-
};
|
49
|
-
/** 出生证 字母加9位数字 */
|
50
|
-
export var isBirthCard = function isBirthCard(val) {
|
51
|
-
return /^[a-zA-Z0-9\u4E00-\u9FA5]{3,18}$/.test(val);
|
52
|
-
};
|
53
|
-
/** 港澳居民居住证(香港) */
|
54
|
-
export var isHKResideCard = function isHKResideCard(val) {
|
55
|
-
return /^810000(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/.test(val);
|
56
|
-
};
|
57
|
-
/** 港澳居民居住证(澳门) */
|
58
|
-
export var isMAResideCard = function isMAResideCard(val) {
|
59
|
-
return /^820000(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/.test(val);
|
60
|
-
};
|
61
|
-
/** 台湾居民居住证(台湾) */
|
62
|
-
export var isTaiWanResideCard = function isTaiWanResideCard(val) {
|
63
|
-
return /^830000(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/.test(val);
|
64
|
-
};
|
65
|
-
/** 大陆居民往来港澳通行证 */
|
66
|
-
export var isHongkongMacaoTravel = function isHongkongMacaoTravel(val) {
|
67
|
-
return /^[C]\d{8}$|^[C][a-hA-Hj-nJ-Np-zP-Z][0-9]{7}$/.test(val);
|
68
|
-
};
|
69
|
-
/** 大陆居民往来台湾通行证 */
|
70
|
-
export var isTaiwanTravel = function isTaiwanTravel(val) {
|
71
|
-
return /^[L]\d{8}$/.test(val);
|
72
|
-
};
|
73
|
-
/** 外国人永久居留证 */
|
74
|
-
export var isForeignPermanent = function isForeignPermanent(val) {
|
75
|
-
return /^[A-Z]{3}[0-9]{12}$/.test(val);
|
76
|
-
};
|
77
|
-
/** 港澳台居民居住证(三合一) */
|
78
|
-
export var isGATResideCard = function isGATResideCard(val) {
|
79
|
-
return /^[0-9a-zA-Z]{18}$/.test(val);
|
80
|
-
};
|
81
|
-
/** 台湾居民来往大陆通行证 */
|
82
|
-
export var isTaiWanGobackCHNCard = function isTaiWanGobackCHNCard(val) {
|
83
|
-
return /^[a-zA-Z0-9]{8}$|^[a-zA-Z0-9]{10}$|^[a-zA-Z0-9]{18}$/.test(val);
|
84
|
-
};
|
85
|
-
/** 营业执照 */
|
86
|
-
export var isBusinessLicense = function isBusinessLicense(val) {
|
87
|
-
return /^.{1,150}$/.test(val);
|
88
|
-
};
|
89
|
-
/** 税务号 */
|
90
|
-
export var isTaxCode = function isTaxCode(val) {
|
91
|
-
return /^[0-9A-Z]{15}$|^[0-9A-Z]{18}$|^[0-9A-Z]{20}$/.test(val);
|
92
|
-
};
|
93
|
-
/** 判断是否为中文 */
|
94
|
-
export var isChinese = function isChinese(text) {
|
95
|
-
return /^[\u4e00-\u9fa5]+$/.test(text);
|
96
|
-
};
|
97
|
-
/** 判断是否不包含中文中文 */
|
98
|
-
export var isNotChinese = function isNotChinese(text) {
|
99
|
-
return /^[^\u4e00-\u9fa5]+$/.test(text);
|
100
|
-
};
|
101
|
-
// 检查姓名是否正确
|
102
|
-
export var isName = function isName(name) {
|
103
|
-
return /^(?:[\u4e00-\u9fa5]+)(?:●[\u4e00-\u9fa5]+)*$|^[a-zA-Z0-9]+\s?[\.·\-()a-zA-Z]*[a-zA-Z]|[.]+$/.test(name);
|
104
|
-
};
|
105
|
-
// 正整数
|
106
|
-
export var isPWN = function isPWN(value) {
|
107
|
-
return /^[1-9]\d*$/.test(value);
|
108
|
-
};
|
109
|
-
/** ipv4地址 */
|
110
|
-
export var isIPv4 = function isIPv4(value) {
|
111
|
-
return regExp.isIPv4.test(value);
|
112
|
-
};
|
113
|
-
|
114
|
-
// 是否完整的地址 校验数组前三位是否有值
|
115
|
-
export var isFullAddress = function isFullAddress(value) {
|
116
|
-
return value && [,,].every(function (_, index) {
|
117
|
-
return value[index];
|
118
|
-
});
|
119
|
-
};
|
120
|
-
// 是否完整的地址 校验数组前4位是否有值
|
121
|
-
export var isFullAddressDetail = function isFullAddressDetail(value) {
|
122
|
-
return value && [,,,].every(function (_, index) {
|
123
|
-
return value[index];
|
124
|
-
});
|
125
|
-
};
|
126
|
-
export var isIdCard = function isIdCard(value) {
|
127
|
-
var result = getDataByIdCard(value);
|
128
|
-
return !!result;
|
129
|
-
};
|
130
|
-
|
131
|
-
// 校验统一社会信用代码
|
132
|
-
export var isCreditCode = function isCreditCode(creditCode) {
|
133
|
-
// 校验长度
|
134
|
-
if (creditCode.length !== 18) {
|
135
|
-
return false;
|
136
|
-
}
|
137
|
-
// 校验格式
|
138
|
-
var regex = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/;
|
139
|
-
if (!regex.test(creditCode)) {
|
140
|
-
return false;
|
141
|
-
}
|
142
|
-
// 校验校验码
|
143
|
-
var codes = '0123456789ABCDEFGHJKLMNPQRTUWXY';
|
144
|
-
var weights = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];
|
145
|
-
var sum = 0;
|
146
|
-
for (var i = 0; i < 17; i++) {
|
147
|
-
var code = creditCode.charAt(i);
|
148
|
-
var index = codes.indexOf(code);
|
149
|
-
sum += index * weights[i];
|
150
|
-
}
|
151
|
-
var checkCode = codes.charAt((31 - sum % 31) % 31);
|
152
|
-
if (creditCode.charAt(17) !== checkCode) {
|
153
|
-
return false;
|
154
|
-
}
|
155
|
-
return true;
|
156
|
-
};
|
157
|
-
|
158
|
-
// 组织机构代码
|
159
|
-
export var isOrgCode = function isOrgCode(orgCode) {
|
160
|
-
// 校验长度
|
161
|
-
if (orgCode.length !== 9 && orgCode.length !== 10) {
|
162
|
-
return false;
|
163
|
-
}
|
164
|
-
// 校验格式
|
165
|
-
var regex = /^[0-9A-Z]{8}[0-9X]$/;
|
166
|
-
if (!regex.test(orgCode)) {
|
167
|
-
return false;
|
168
|
-
}
|
169
|
-
// 校验校验码
|
170
|
-
var codes = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
171
|
-
var weights = [3, 7, 9, 10, 5, 8, 4, 2];
|
172
|
-
var sum = 0;
|
173
|
-
for (var i = 0; i < 8; i++) {
|
174
|
-
var code = orgCode.charAt(i);
|
175
|
-
var index = codes.indexOf(code);
|
176
|
-
sum += index * weights[i];
|
177
|
-
}
|
178
|
-
var mod = sum % 11;
|
179
|
-
var checkCode = mod === 0 ? '0' : mod === 1 ? 'X' : (11 - mod).toString();
|
180
|
-
if (orgCode.charAt(8) !== checkCode) {
|
181
|
-
return false;
|
182
|
-
}
|
183
|
-
return true;
|
184
|
-
};
|
185
|
-
|
186
|
-
/**
|
187
|
-
* @description: 是否IE环境
|
188
|
-
* @return {*}
|
189
|
-
*/
|
190
|
-
export var isIE = function isIE() {
|
191
|
-
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
192
|
-
return true;
|
193
|
-
}
|
194
|
-
return false;
|
195
|
-
};
|
196
|
-
|
197
|
-
/** DEMO中用来显示中文名 */
|
198
|
-
export var validateNameMap = {
|
199
|
-
isZipCode: '邮编',
|
200
|
-
isPhone: '手机号',
|
201
|
-
isIdCard: '身份证',
|
202
|
-
isExternal: '网址',
|
203
|
-
isEmail: '邮箱',
|
204
|
-
isTel: '固定电话',
|
205
|
-
isIE: 'IE',
|
206
|
-
isHouseHold: '户口本',
|
207
|
-
isPassportCard: '护照',
|
208
|
-
isHMPassCard: '港澳通行证',
|
209
|
-
isOfficerCard: '军官证',
|
210
|
-
isHomeReturnCard: '回乡证',
|
211
|
-
isBirthCard: '出生证',
|
212
|
-
isHKResideCard: '港澳居民居住证(香港)',
|
213
|
-
isMAResideCard: '港澳居民居住证(澳门)',
|
214
|
-
isTaiWanResideCard: '台湾居民居住证(台湾)',
|
215
|
-
isHongkongMacaoTravel: '大陆居民往来港澳通行证',
|
216
|
-
isTaiwanTravel: '大陆居民往来台湾通行证',
|
217
|
-
isForeignPermanent: '外国人永久居留证',
|
218
|
-
isGATResideCard: '港澳台居民居住证(三合一)',
|
219
|
-
isTaiWanGobackCHNCard: '台湾居民来往大陆通行证',
|
220
|
-
isBusinessLicense: '营业执照',
|
221
|
-
isOrgCode: '组织代码',
|
222
|
-
isCreditCode: '信用代码',
|
223
|
-
isTaxCode: '税务号',
|
224
|
-
isChinese: '是否中文',
|
225
|
-
isNotChinese: '是否不包含中文',
|
226
|
-
isName: '姓名',
|
227
|
-
isPWN: '正整数',
|
228
|
-
isGaToInPassCard: '港澳居民来往内地通行证',
|
229
|
-
isIPv4: '是否IPv4'
|
230
|
-
};
|
231
|
-
|
232
|
-
/**
|
233
|
-
* 检查属性是否是空值,非0
|
234
|
-
*/
|
235
|
-
export var isEmpty = function isEmpty(value) {
|
236
|
-
return ['', null, undefined].includes(value);
|
237
|
-
};
|
238
|
-
|
239
|
-
/** 判断是否是JSON */
|
240
|
-
export var isJSON = function isJSON(str) {
|
241
|
-
if (typeof str !== 'string') return false;
|
242
|
-
try {
|
243
|
-
var result = JSON.parse(str);
|
244
|
-
// 确保解析后的结果是对象或数组
|
245
|
-
return _typeof(result) === 'object' && result !== null || Array.isArray(result);
|
246
|
-
} catch (e) {
|
247
|
-
return false;
|
248
|
-
}
|
249
|
-
};
|
250
|
-
export default {
|
251
|
-
isZipCode: isZipCode,
|
252
|
-
isPhone: isPhone,
|
253
|
-
isIdCard: isIdCard,
|
254
|
-
isExternal: isExternal,
|
255
|
-
isEmail: isEmail,
|
256
|
-
isTel: isTel,
|
257
|
-
isIE: isIE,
|
258
|
-
isHouseHold: isHouseHold,
|
259
|
-
isPassportCard: isPassportCard,
|
260
|
-
isHMPassCard: isHMPassCard,
|
261
|
-
isOfficerCard: isOfficerCard,
|
262
|
-
isHomeReturnCard: isHomeReturnCard,
|
263
|
-
isBirthCard: isBirthCard,
|
264
|
-
isHKResideCard: isHKResideCard,
|
265
|
-
isMAResideCard: isMAResideCard,
|
266
|
-
isTaiWanResideCard: isTaiWanResideCard,
|
267
|
-
isHongkongMacaoTravel: isHongkongMacaoTravel,
|
268
|
-
isTaiwanTravel: isTaiwanTravel,
|
269
|
-
isForeignPermanent: isForeignPermanent,
|
270
|
-
isGATResideCard: isGATResideCard,
|
271
|
-
isTaiWanGobackCHNCard: isTaiWanGobackCHNCard,
|
272
|
-
isBusinessLicense: isBusinessLicense,
|
273
|
-
isOrgCode: isOrgCode,
|
274
|
-
isCreditCode: isCreditCode,
|
275
|
-
isTaxCode: isTaxCode,
|
276
|
-
isChinese: isChinese,
|
277
|
-
isNotChinese: isNotChinese,
|
278
|
-
isName: isName,
|
279
|
-
isPWN: isPWN,
|
280
|
-
isGaToInPassCard: isGaToInPassCard,
|
281
|
-
isIPv4: isIPv4,
|
282
|
-
isEmpty: isEmpty,
|
283
|
-
isJSON: isJSON
|
284
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = 'test-file-stub';
|
@@ -1,27 +0,0 @@
|
|
1
|
-
// Mock @zat-design/utils
|
2
|
-
module.exports = {
|
3
|
-
tools: {
|
4
|
-
isValidUrl: jest.fn(() => true),
|
5
|
-
formatCurrency: jest.fn((value) => `¥${value}`),
|
6
|
-
formatDate: jest.fn((date) => new Date(date).toLocaleDateString()),
|
7
|
-
},
|
8
|
-
transforms: {
|
9
|
-
transformDate: jest.fn((value, params) => {
|
10
|
-
if (!value) return '';
|
11
|
-
return new Date(value).toLocaleDateString();
|
12
|
-
}),
|
13
|
-
transformSwitch: jest.fn((value) => value ? '是' : '否'),
|
14
|
-
transformMoney: jest.fn((value) => `¥${value || 0}`),
|
15
|
-
transformPercent: jest.fn((value) => `${(value || 0) * 100}%`),
|
16
|
-
},
|
17
|
-
validate: {
|
18
|
-
isEmail: jest.fn((email) => /\S+@\S+\.\S+/.test(email)),
|
19
|
-
isPhone: jest.fn((phone) => /^1[3-9]\d{9}$/.test(phone)),
|
20
|
-
isIdCard: jest.fn(() => true),
|
21
|
-
},
|
22
|
-
validateNameMap: {
|
23
|
-
email: 'isEmail',
|
24
|
-
phone: 'isPhone',
|
25
|
-
idCard: 'isIdCard',
|
26
|
-
},
|
27
|
-
};
|