@zat-design/sisyphus-react 3.11.14 → 3.12.0-beta.2
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 +26 -15
- package/dist/less.esm.css +26 -15
- package/es/ProAction/index.d.ts +2 -2
- package/es/ProAction/propsType.d.ts +16 -10
- package/es/ProConfigProvider/index.d.ts +7 -7
- package/es/ProDownload/index.d.ts +2 -2
- package/es/ProDownload/propsType.d.ts +2 -1
- package/es/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
- package/es/ProDrawerForm/components/ProDrawer/index.js +12 -2
- package/es/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/es/ProDrawerForm/components/ProModal/index.js +12 -2
- package/es/ProDrawerForm/index.d.ts +2 -2
- package/es/ProDrawerForm/index.js +10 -3
- package/es/ProDrawerForm/propsType.d.ts +38 -27
- package/es/ProDrawerForm/utils/index.d.ts +2 -2
- package/es/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/es/ProEditLabel/index.d.ts +2 -2
- package/es/ProEditLabel/propsType.d.ts +135 -8
- package/es/ProEditLabel/style/index.less +24 -25
- package/es/ProEditTable/components/Summary/index.d.ts +2 -2
- package/es/ProEditTable/index.d.ts +2 -2
- package/es/ProEditTable/index.js +18 -16
- package/es/ProEditTable/propsType.d.ts +243 -106
- package/es/ProEditTable/style/index.less +1 -0
- package/es/ProEditTable/utils/index.d.ts +1 -1
- package/es/ProEditTable/utils/index.js +6 -4
- package/es/ProEditTable/utils/tools.d.ts +57 -22
- package/es/ProEditTable/utils/tools.js +51 -25
- package/es/ProEnum/components/Group.d.ts +2 -2
- package/es/ProEnum/components/Tag.d.ts +2 -2
- package/es/ProEnum/hooks/useEnum.d.ts +2 -2
- package/es/ProEnum/hooks/useEnum.js +46 -17
- package/es/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/propsType.d.ts +231 -42
- package/es/ProEnum/propsType.js +0 -6
- package/es/ProEnum/utils/index.d.ts +9 -2
- package/es/ProEnum/utils/index.js +9 -2
- package/es/ProForm/components/FormFooter/index.d.ts +2 -2
- package/es/ProForm/components/FormFooter/propsType.d.ts +8 -3
- package/es/ProForm/components/base/Checkbox/index.d.ts +2 -2
- package/es/ProForm/components/base/Input/index.d.ts +2 -2
- package/es/ProForm/components/base/Input/index.js +17 -4
- package/es/ProForm/components/base/Input/propsType.d.ts +10 -6
- package/es/ProForm/components/base/InputNumber/index.d.ts +2 -2
- package/es/ProForm/components/base/Radio/index.d.ts +2 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +2 -2
- package/es/ProForm/components/base/Select/index.d.ts +2 -2
- package/es/ProForm/components/base/Switch/index.d.ts +2 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
- package/es/ProForm/components/base/TextArea/index.d.ts +2 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +2 -2
- package/es/ProForm/components/combination/Container/index.d.ts +2 -2
- package/es/ProForm/components/combination/Container/propsType.d.ts +10 -6
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/index.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/propsType.d.ts +18 -10
- package/es/ProForm/components/combination/Group/index.d.ts +2 -2
- package/es/ProForm/components/combination/Group/propsType.d.ts +10 -5
- package/es/ProForm/components/combination/Group/utils.d.ts +6 -6
- package/es/ProForm/components/combination/ProCascader/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
- package/es/ProForm/components/combination/ProCombination/index.d.ts +3 -3
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +15 -9
- package/es/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/es/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
- package/es/ProForm/components/render/Render.d.ts +2 -2
- package/es/ProForm/components/render/RenderFields.d.ts +4 -4
- package/es/ProForm/components/render/propsType.d.ts +76 -69
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +9 -3
- package/es/ProForm/propsType.d.ts +26 -17
- package/es/ProForm/propsType.js +0 -1
- package/es/ProForm/utils/transformValue.d.ts +2 -2
- package/es/ProForm/utils/useFieldProps.d.ts +3 -3
- package/es/ProForm/utils/useForm.d.ts +2 -1
- package/es/ProForm/utils/useForm.js +3 -2
- package/es/ProForm/utils/useRules.d.ts +1 -1
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/es/ProIcon/index.d.ts +2 -2
- package/es/ProIcon/propsTypes.d.ts +120 -49
- package/es/ProLayout/components/Layout/Header/index.d.ts +2 -2
- package/es/ProLayout/components/Layout/Menu/index.d.ts +2 -2
- package/es/ProLayout/components/Layout/Notice/index.d.ts +2 -2
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +9 -2
- package/es/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/es/ProLayout/components/ProCollapse/index.js +12 -4
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
- package/es/ProLayout/components/ProHeader/index.d.ts +2 -2
- package/es/ProLayout/index.d.ts +5 -5
- package/es/ProLayout/index.js +6 -2
- package/es/ProLayout/propTypes.d.ts +182 -25
- package/es/ProLayout/utils/index.d.ts +2 -2
- package/es/ProSelect/index.d.ts +3 -3
- package/es/ProSelect/propsType.d.ts +141 -31
- package/es/ProStep/components/Anchor/index.d.ts +2 -1
- package/es/ProStep/components/Item/index.d.ts +2 -2
- package/es/ProStep/components/Item/index.js +6 -2
- package/es/ProStep/components/Listener/index.d.ts +4 -3
- package/es/ProStep/components/Listener/index.js +18 -4
- package/es/ProStep/components/Step/index.d.ts +2 -2
- package/es/ProStep/index.d.ts +7 -7
- package/es/ProStep/index.js +19 -4
- package/es/ProStep/propsType.d.ts +200 -12
- package/es/ProStep/utils/index.d.ts +17 -4
- package/es/ProStep/utils/index.js +11 -2
- package/es/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.js +5 -8
- package/es/ProTable/components/RenderTabs/index.d.ts +4 -0
- package/es/ProTable/components/RenderTabs/index.js +78 -0
- package/es/ProTable/components/index.d.ts +25 -0
- package/es/ProTable/components/index.js +26 -1
- package/es/ProTable/hooks/useAntdTable.d.ts +2 -93
- package/es/ProTable/hooks/useAntdTable.js +6 -2
- package/es/ProTable/index.d.ts +2 -2
- package/es/ProTable/index.js +6 -3
- package/es/ProTable/propsType.d.ts +630 -39
- package/es/ProTable/style/index.less +3 -0
- package/es/ProTabs/index.d.ts +2 -2
- package/es/ProTabs/index.js +4 -4
- package/es/ProTabs/propType.d.ts +66 -9
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/propsType.d.ts +136 -14
- package/es/ProTooltip/index.d.ts +2 -2
- package/es/ProTooltip/propsType.d.ts +49 -9
- package/es/ProTree/components/List.d.ts +2 -2
- package/es/ProTree/components/List.js +2 -2
- package/es/ProTree/components/ProTree.d.ts +2 -2
- package/es/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +372 -34
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/components/Tree.d.ts +3 -3
- package/es/ProTree/index.d.ts +2 -2
- package/es/ProTree/index.js +1 -1
- package/es/ProTree/propsType.d.ts +694 -103
- package/es/ProTree/utils.d.ts +7 -7
- package/es/ProTreeModal/components/Cascader.d.ts +3 -3
- package/es/ProTreeModal/components/List.d.ts +3 -3
- package/es/ProTreeModal/components/Tree.d.ts +2 -2
- package/es/ProTreeModal/index.d.ts +2 -2
- package/es/ProTreeModal/index.js +2 -2
- package/es/ProTreeModal/propsType.d.ts +258 -49
- package/es/ProTreeModal/utils.d.ts +7 -7
- package/es/ProUpload/components/ButtonRender.d.ts +2 -2
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
- package/es/ProUpload/components/Example.d.ts +2 -2
- package/es/ProUpload/components/ImageRender.d.ts +2 -2
- package/es/ProUpload/index.d.ts +2 -2
- package/es/ProUpload/index.js +7 -9
- package/es/ProUpload/propsType.d.ts +65 -8
- package/es/ProWaterMark/index.d.ts +2 -2
- package/es/ProWaterMark/propsType.d.ts +2 -1
- package/es/index.d.ts +15 -6
- package/es/index.js +1 -7
- package/lib/ProAction/index.d.ts +2 -2
- package/lib/ProAction/propsType.d.ts +16 -10
- package/lib/ProConfigProvider/index.d.ts +7 -7
- package/lib/ProDownload/index.d.ts +2 -2
- package/lib/ProDownload/propsType.d.ts +2 -1
- package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
- package/lib/ProDrawerForm/components/ProDrawer/index.js +12 -2
- package/lib/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -2
- package/lib/ProDrawerForm/index.d.ts +2 -2
- package/lib/ProDrawerForm/index.js +9 -2
- package/lib/ProDrawerForm/propsType.d.ts +38 -27
- package/lib/ProDrawerForm/utils/index.d.ts +2 -2
- package/lib/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/lib/ProEditLabel/index.d.ts +2 -2
- package/lib/ProEditLabel/propsType.d.ts +135 -8
- package/lib/ProEditLabel/style/index.less +24 -25
- package/lib/ProEditTable/components/Summary/index.d.ts +2 -2
- package/lib/ProEditTable/index.d.ts +2 -2
- package/lib/ProEditTable/index.js +18 -16
- package/lib/ProEditTable/propsType.d.ts +243 -106
- package/lib/ProEditTable/style/index.less +1 -0
- package/lib/ProEditTable/utils/index.d.ts +1 -1
- package/lib/ProEditTable/utils/index.js +6 -4
- package/lib/ProEditTable/utils/tools.d.ts +57 -22
- package/lib/ProEditTable/utils/tools.js +51 -25
- package/lib/ProEnum/components/Group.d.ts +2 -2
- package/lib/ProEnum/components/Tag.d.ts +2 -2
- package/lib/ProEnum/hooks/useEnum.d.ts +2 -2
- package/lib/ProEnum/hooks/useEnum.js +48 -17
- package/lib/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/propsType.d.ts +231 -42
- package/lib/ProEnum/propsType.js +1 -7
- package/lib/ProEnum/utils/index.d.ts +9 -2
- package/lib/ProEnum/utils/index.js +9 -2
- package/lib/ProForm/components/FormFooter/index.d.ts +2 -2
- package/lib/ProForm/components/FormFooter/propsType.d.ts +8 -3
- package/lib/ProForm/components/base/Checkbox/index.d.ts +2 -2
- package/lib/ProForm/components/base/Input/index.d.ts +2 -2
- package/lib/ProForm/components/base/Input/index.js +17 -4
- package/lib/ProForm/components/base/Input/propsType.d.ts +10 -6
- package/lib/ProForm/components/base/InputNumber/index.d.ts +2 -2
- package/lib/ProForm/components/base/Radio/index.d.ts +2 -2
- package/lib/ProForm/components/base/RangePicker/index.d.ts +2 -2
- package/lib/ProForm/components/base/Select/index.d.ts +2 -2
- package/lib/ProForm/components/base/Switch/index.d.ts +2 -2
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
- package/lib/ProForm/components/base/TextArea/index.d.ts +2 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Container/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Container/propsType.d.ts +10 -6
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/index.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +18 -10
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/propsType.d.ts +10 -5
- package/lib/ProForm/components/combination/Group/utils.d.ts +6 -6
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +3 -3
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +15 -9
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/Render.d.ts +2 -2
- package/lib/ProForm/components/render/RenderFields.d.ts +4 -4
- package/lib/ProForm/components/render/propsType.d.ts +76 -69
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +9 -3
- package/lib/ProForm/propsType.d.ts +26 -17
- package/lib/ProForm/propsType.js +0 -15
- package/lib/ProForm/utils/transformValue.d.ts +2 -2
- package/lib/ProForm/utils/useFieldProps.d.ts +3 -3
- package/lib/ProForm/utils/useForm.d.ts +2 -1
- package/lib/ProForm/utils/useForm.js +3 -2
- package/lib/ProForm/utils/useRules.d.ts +1 -1
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/lib/ProIcon/index.d.ts +2 -2
- package/lib/ProIcon/propsTypes.d.ts +120 -49
- package/lib/ProLayout/components/Layout/Header/index.d.ts +2 -2
- package/lib/ProLayout/components/Layout/Menu/index.d.ts +2 -2
- package/lib/ProLayout/components/Layout/Notice/index.d.ts +2 -2
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +9 -2
- package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +12 -4
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
- package/lib/ProLayout/components/ProHeader/index.d.ts +2 -2
- package/lib/ProLayout/index.d.ts +5 -5
- package/lib/ProLayout/index.js +6 -2
- package/lib/ProLayout/propTypes.d.ts +182 -25
- package/lib/ProLayout/utils/index.d.ts +2 -2
- package/lib/ProSelect/index.d.ts +3 -3
- package/lib/ProSelect/propsType.d.ts +141 -31
- package/lib/ProStep/components/Anchor/index.d.ts +2 -1
- package/lib/ProStep/components/Item/index.d.ts +2 -2
- package/lib/ProStep/components/Item/index.js +6 -2
- package/lib/ProStep/components/Listener/index.d.ts +4 -3
- package/lib/ProStep/components/Listener/index.js +18 -4
- package/lib/ProStep/components/Step/index.d.ts +2 -2
- package/lib/ProStep/index.d.ts +7 -7
- package/lib/ProStep/index.js +19 -4
- package/lib/ProStep/propsType.d.ts +200 -12
- package/lib/ProStep/utils/index.d.ts +17 -4
- package/lib/ProStep/utils/index.js +11 -2
- package/lib/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/lib/ProTable/components/FormatColumn/index.js +5 -8
- package/lib/ProTable/components/RenderTabs/index.d.ts +4 -0
- package/lib/ProTable/components/RenderTabs/index.js +82 -0
- package/lib/ProTable/components/index.d.ts +25 -0
- package/lib/ProTable/components/index.js +8 -1
- package/lib/ProTable/hooks/useAntdTable.d.ts +2 -93
- package/lib/ProTable/hooks/useAntdTable.js +5 -1
- package/lib/ProTable/index.d.ts +2 -2
- package/lib/ProTable/index.js +5 -2
- package/lib/ProTable/propsType.d.ts +630 -39
- package/lib/ProTable/style/index.less +3 -0
- package/lib/ProTabs/index.d.ts +2 -2
- package/lib/ProTabs/index.js +4 -4
- package/lib/ProTabs/propType.d.ts +66 -9
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/propsType.d.ts +136 -14
- package/lib/ProTooltip/index.d.ts +2 -2
- package/lib/ProTooltip/propsType.d.ts +49 -9
- package/lib/ProTree/components/List.d.ts +2 -2
- package/lib/ProTree/components/List.js +2 -2
- package/lib/ProTree/components/ProTree.d.ts +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +372 -34
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/components/Tree.d.ts +3 -3
- package/lib/ProTree/index.d.ts +2 -2
- package/lib/ProTree/index.js +1 -1
- package/lib/ProTree/propsType.d.ts +694 -103
- package/lib/ProTree/utils.d.ts +7 -7
- package/lib/ProTreeModal/components/Cascader.d.ts +3 -3
- package/lib/ProTreeModal/components/List.d.ts +3 -3
- package/lib/ProTreeModal/components/Tree.d.ts +2 -2
- package/lib/ProTreeModal/index.d.ts +2 -2
- package/lib/ProTreeModal/index.js +2 -2
- package/lib/ProTreeModal/propsType.d.ts +258 -49
- package/lib/ProTreeModal/utils.d.ts +7 -7
- package/lib/ProUpload/components/ButtonRender.d.ts +2 -2
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
- package/lib/ProUpload/components/Example.d.ts +2 -2
- package/lib/ProUpload/components/ImageRender.d.ts +2 -2
- package/lib/ProUpload/index.d.ts +2 -2
- package/lib/ProUpload/index.js +7 -9
- package/lib/ProUpload/propsType.d.ts +65 -8
- package/lib/ProWaterMark/index.d.ts +2 -2
- package/lib/ProWaterMark/propsType.d.ts +2 -1
- package/lib/index.d.ts +15 -6
- package/lib/index.js +7 -71
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
- package/test/__mocks__/fileMock.js +0 -0
- package/test/__mocks__/styleMock.js +0 -0
@@ -14,8 +14,15 @@ exports.setEnumData = setEnumData;
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
15
15
|
var _lodash = require("lodash");
|
16
16
|
var _excluded = ["children"];
|
17
|
-
|
18
|
-
|
17
|
+
/**
|
18
|
+
* 获取枚举数据
|
19
|
+
* @param storage
|
20
|
+
* @param cacheKey
|
21
|
+
* @param baseEnumStorage
|
22
|
+
* @returns
|
23
|
+
*/
|
24
|
+
function getEnumData(storage, cacheKey, baseEnumStorage, dataSource) {
|
25
|
+
if (baseEnumStorage && cacheKey === 'zat-design-pro-component-cacheKey') {
|
19
26
|
return baseEnumStorage;
|
20
27
|
}
|
21
28
|
if (storage === 'localStorage') {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import type { FooterRenderType } from './propsType';
|
3
3
|
export declare const PRO_FORM_CACHE = "PRO_FORM_CACHE";
|
4
|
-
declare const FormFooter: React.FC<
|
4
|
+
declare const FormFooter: React.FC<FooterRenderType>;
|
5
5
|
export default FormFooter;
|
@@ -2,18 +2,23 @@ import { ButtonProps, ColProps, FormInstance } from 'antd';
|
|
2
2
|
export interface ButtonItem extends ButtonProps {
|
3
3
|
children?: any;
|
4
4
|
}
|
5
|
-
export interface
|
5
|
+
export interface FooterButtonType {
|
6
6
|
okButtonProps?: ButtonItem;
|
7
7
|
cancelButtonProps?: ButtonItem;
|
8
8
|
}
|
9
|
-
export interface
|
9
|
+
export interface FooterRenderType {
|
10
10
|
okText?: string;
|
11
11
|
cancelText?: string;
|
12
12
|
onOk?: () => void;
|
13
13
|
onCancel?: () => void;
|
14
14
|
footerColProps?: ColProps;
|
15
|
-
footer?:
|
15
|
+
footer?: FooterButtonType;
|
16
16
|
confirmLoading?: boolean;
|
17
17
|
formId?: string;
|
18
18
|
form: FormInstance;
|
19
19
|
}
|
20
|
+
/**
|
21
|
+
* 兼容旧命名导出
|
22
|
+
*/
|
23
|
+
export type FooterButtonProps = FooterButtonType;
|
24
|
+
export type FooterRenderProps = FooterRenderType;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { CheckboxGroupProps } from 'antd/es/checkbox';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<CheckboxGroupProps, 'options'> {
|
5
5
|
dataSource: any[];
|
6
6
|
fieldNames?: {
|
7
7
|
label: string;
|
8
8
|
value: string;
|
9
9
|
};
|
10
|
-
otherProps?:
|
10
|
+
otherProps?: ProFormOtherType;
|
11
11
|
isView?: boolean;
|
12
12
|
}
|
13
13
|
declare const Checkbox: React.FC<Props>;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
declare const Input: (props:
|
1
|
+
import { Props } from './propsType';
|
2
|
+
declare const Input: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default Input;
|
@@ -33,6 +33,19 @@ var Input = function Input(props) {
|
|
33
33
|
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
34
34
|
var initialConfig = (0, _ProConfigProvider.useProConfig)('Input');
|
35
35
|
if (isView) {
|
36
|
+
if ((desensitization === null || desensitization === void 0 ? void 0 : desensitization.length) && (props === null || props === void 0 ? void 0 : props.disabled)) {
|
37
|
+
var isDesensit = sessionStorage.getItem(otherProps === null || otherProps === void 0 ? void 0 : otherProps.desensitizationKey);
|
38
|
+
if (isDesensit === 'ON') {
|
39
|
+
if (typeof rest.value === 'number') {
|
40
|
+
var _rest$value, _rest$value$toString;
|
41
|
+
rest.value = rest === null || rest === void 0 ? void 0 : (_rest$value = rest.value) === null || _rest$value === void 0 ? void 0 : (_rest$value$toString = _rest$value.toString) === null || _rest$value$toString === void 0 ? void 0 : _rest$value$toString.call(_rest$value);
|
42
|
+
}
|
43
|
+
return (0, _jsxRuntime.jsx)(_Container.default, {
|
44
|
+
viewEmpty: viewEmpty,
|
45
|
+
children: (0, _valueType.maskStringRangeWithRegex)(rest.value, desensitization)
|
46
|
+
});
|
47
|
+
}
|
48
|
+
}
|
36
49
|
return (0, _jsxRuntime.jsx)(_Container.default, {
|
37
50
|
viewEmpty: viewEmpty,
|
38
51
|
children: rest.value
|
@@ -45,11 +58,11 @@ var Input = function Input(props) {
|
|
45
58
|
}, (0, _lodash.omit)(initialConfig, ['trim'])), rest));
|
46
59
|
// 仅查看模式下进行数据脱敏
|
47
60
|
if ((desensitization === null || desensitization === void 0 ? void 0 : desensitization.length) && (props === null || props === void 0 ? void 0 : props.disabled)) {
|
48
|
-
var
|
49
|
-
if (
|
61
|
+
var _isDesensit = sessionStorage.getItem(otherProps === null || otherProps === void 0 ? void 0 : otherProps.desensitizationKey);
|
62
|
+
if (_isDesensit === 'ON') {
|
50
63
|
if (typeof rest.value === 'number') {
|
51
|
-
var _rest$
|
52
|
-
rest.value = rest === null || rest === void 0 ? void 0 : (_rest$
|
64
|
+
var _rest$value2, _rest$value2$toString;
|
65
|
+
rest.value = rest === null || rest === void 0 ? void 0 : (_rest$value2 = rest.value) === null || _rest$value2 === void 0 ? void 0 : (_rest$value2$toString = _rest$value2.toString) === null || _rest$value2$toString === void 0 ? void 0 : _rest$value2$toString.call(_rest$value2);
|
53
66
|
}
|
54
67
|
return /*#__PURE__*/_react.default.cloneElement(ComInput, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
55
68
|
allowClear: true,
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { InputProps } from 'antd';
|
2
|
-
import { FormInstance } from 'antd/es/form/Form';
|
3
|
-
import {
|
4
|
-
export interface
|
1
|
+
import type { InputProps } from 'antd';
|
2
|
+
import type { FormInstance } from 'antd/es/form/Form';
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
|
+
export interface ProFieldType<T = any> {
|
5
5
|
from?: FormInstance<T>;
|
6
6
|
label?: string;
|
7
7
|
name?: string;
|
@@ -9,9 +9,13 @@ export interface ProFieldProps<T = any> {
|
|
9
9
|
fieldName?: string;
|
10
10
|
placeholder?: string;
|
11
11
|
}
|
12
|
-
export interface
|
13
|
-
otherProps?:
|
12
|
+
export interface Props extends InputProps, ProFieldType {
|
13
|
+
otherProps?: ProFormOtherType;
|
14
14
|
isView?: boolean;
|
15
15
|
/** 脱敏数据位置下标 */
|
16
16
|
desensitization?: [number, number];
|
17
17
|
}
|
18
|
+
/**
|
19
|
+
* 兼容旧命名导出
|
20
|
+
*/
|
21
|
+
export type ProFieldProps<T = any> = ProFieldType<T>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InputNumberProps } from 'antd';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<InputNumberProps, 'onBlur'> {
|
5
|
-
otherProps?:
|
5
|
+
otherProps?: ProFormOtherType;
|
6
6
|
range?: string;
|
7
7
|
onBlur?: (value?: number, record?: any, object?: any) => void;
|
8
8
|
isView?: boolean;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RadioChangeEvent, RadioProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<RadioProps, 'options' | 'onChange'> {
|
5
5
|
dataSource: any[];
|
6
6
|
onChange: (value: any, e: RadioChangeEvent) => void;
|
@@ -8,7 +8,7 @@ export interface Props extends Omit<RadioProps, 'options' | 'onChange'> {
|
|
8
8
|
label: string;
|
9
9
|
value: string;
|
10
10
|
};
|
11
|
-
otherProps?:
|
11
|
+
otherProps?: ProFormOtherType;
|
12
12
|
isView?: boolean;
|
13
13
|
}
|
14
14
|
declare const Radio: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { RangePickerProps } from 'antd/es/date-picker';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
import { Props as RangeProps } from './useDateRange';
|
5
5
|
export type Props = {
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
separator?: any;
|
8
8
|
showTime?: any;
|
9
9
|
isView?: boolean;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { SelectProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends SelectProps {
|
5
5
|
dataSource?: any[];
|
6
6
|
scrollFollowParent?: boolean;
|
7
|
-
otherProps?:
|
7
|
+
otherProps?: ProFormOtherType;
|
8
8
|
isView?: boolean;
|
9
9
|
}
|
10
10
|
declare const Select: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { SwitchProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<SwitchProps, 'value'> {
|
5
5
|
value: any;
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
isView?: boolean;
|
8
8
|
}
|
9
9
|
declare const Switch: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { CheckboxProps } from 'antd';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends CheckboxProps {
|
5
5
|
label?: string;
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
isView?: boolean;
|
8
8
|
}
|
9
9
|
declare const SwitchCheckbox: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { TextAreaProps } from 'antd/es/input';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
import './index.less';
|
5
5
|
export interface Props extends TextAreaProps {
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
isView?: boolean;
|
8
8
|
tooltip?: boolean;
|
9
9
|
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { TimePickerProps } from 'antd/es/time-picker';
|
3
|
-
import {
|
3
|
+
import type { ProFormOtherType } from '../../../propsType';
|
4
4
|
import './style/index.less';
|
5
5
|
export interface Props {
|
6
6
|
valueType?: string;
|
7
7
|
format?: string;
|
8
8
|
onChange?: (value: string) => void;
|
9
9
|
value?: string;
|
10
|
-
otherProps?:
|
10
|
+
otherProps?: ProFormOtherType;
|
11
11
|
isView?: boolean;
|
12
12
|
}
|
13
13
|
declare const TimePicker: React.FC<Props & TimePickerProps>;
|
@@ -1,13 +1,17 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { RowProps } from 'antd';
|
3
|
-
import {
|
4
|
-
export interface
|
5
|
-
children?:
|
6
|
-
otherProps?:
|
2
|
+
import type { RowProps } from 'antd';
|
3
|
+
import type { ProFormColumnType, ProFormOtherType, DiffConfigType } from '../../../propsType';
|
4
|
+
export interface ContainerType {
|
5
|
+
children?: ProFormColumnType[];
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
rowProps?: RowProps;
|
8
8
|
className?: string;
|
9
9
|
container?: string | React.ReactNode;
|
10
10
|
show?: boolean | (() => boolean);
|
11
|
-
diffConfig?:
|
11
|
+
diffConfig?: DiffConfigType;
|
12
12
|
clearNotShow?: boolean;
|
13
13
|
}
|
14
|
+
/**
|
15
|
+
* 兼容旧命名导出
|
16
|
+
*/
|
17
|
+
export type ContainerProps = ContainerType;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { FormInstance, FormListFieldData, FormListOperation } from 'antd';
|
2
2
|
import { InternalNamePath } from 'antd/es/form/interface';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
4
|
+
import type { FormListType, ActionType, FormListMode } from '../propsType';
|
5
5
|
export interface Props {
|
6
|
-
min?:
|
7
|
-
max?:
|
8
|
-
actionProps:
|
6
|
+
min?: FormListType['min'];
|
7
|
+
max?: FormListType['max'];
|
8
|
+
actionProps: ActionType[];
|
9
9
|
namePath: InternalNamePath;
|
10
10
|
form: FormInstance;
|
11
11
|
field: Omit<FormListFieldData, 'key'> & {
|
@@ -2,9 +2,9 @@ import { ColProps, FormListFieldData } from 'antd';
|
|
2
2
|
import React from 'react';
|
3
3
|
import { InternalNamePath } from 'antd/es/form/interface';
|
4
4
|
import type { levelType } from '../../../../../ProLayout/components/ProCollapse/PropTypes';
|
5
|
-
import type {
|
6
|
-
import {
|
7
|
-
interface Props extends Omit<
|
5
|
+
import type { FormListType } from '../propsType';
|
6
|
+
import type { DiffConfigType } from '../../../../propsType';
|
7
|
+
interface Props extends Omit<FormListType, 'toolbarProps'> {
|
8
8
|
index: number;
|
9
9
|
namePath: InternalNamePath;
|
10
10
|
disabled?: boolean;
|
@@ -15,7 +15,7 @@ interface Props extends Omit<FormListProps, 'toolbarProps'> {
|
|
15
15
|
};
|
16
16
|
level?: levelType;
|
17
17
|
towCollapse?: boolean;
|
18
|
-
diffConfig?:
|
18
|
+
diffConfig?: DiffConfigType;
|
19
19
|
}
|
20
20
|
declare const BlockFields: React.FC<Props>;
|
21
21
|
export default BlockFields;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ColProps, FormListFieldData } from 'antd';
|
2
2
|
import React from 'react';
|
3
3
|
import { InternalNamePath } from 'antd/es/form/interface';
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
interface Props extends Omit<
|
4
|
+
import type { FormListType } from '../propsType';
|
5
|
+
import type { DiffConfigType } from '../../../../propsType';
|
6
|
+
interface Props extends Omit<FormListType, 'toolbarProps'> {
|
7
7
|
className?: string;
|
8
8
|
index: number;
|
9
9
|
namePath: InternalNamePath;
|
@@ -13,7 +13,7 @@ interface Props extends Omit<FormListProps, 'toolbarProps'> {
|
|
13
13
|
field: Omit<FormListFieldData, 'key'> & {
|
14
14
|
key: string;
|
15
15
|
};
|
16
|
-
diffConfig?:
|
16
|
+
diffConfig?: DiffConfigType;
|
17
17
|
}
|
18
18
|
declare const LineFields: React.FC<Props>;
|
19
19
|
export default LineFields;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { InternalNamePath } from 'antd/es/form/interface';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ToolbarActionType } from '../propsType';
|
4
4
|
import { Props as ActionButtonProps } from './ActionButton';
|
5
5
|
interface Props extends Omit<ActionButtonProps, 'actionProps' | 'field' | 'index' | 'mode' | 'namePath'> {
|
6
|
-
toolbarProps:
|
6
|
+
toolbarProps: ToolbarActionType[];
|
7
7
|
namePath: InternalNamePath;
|
8
8
|
disabled?: boolean;
|
9
9
|
isView?: boolean;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type {
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
2
|
+
import type { FormListRefType, FormListType } from './propsType';
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<FormListType & React.RefAttributes<FormListRefType>>;
|
4
4
|
export default _default;
|
@@ -3,7 +3,7 @@ import type { FormInstance } from 'antd/es/form/Form';
|
|
3
3
|
import type { ButtonProps, FormListFieldData, FormListOperation, PopconfirmProps } from 'antd';
|
4
4
|
import type { InternalNamePath } from 'antd/es/form/interface';
|
5
5
|
import type { levelType } from '../../../../ProLayout/components/ProCollapse/PropTypes';
|
6
|
-
import type {
|
6
|
+
import type { ProFormColumnType, ProFormOtherType } from '../../../propsType';
|
7
7
|
export type TitleRender = (record: Record<string, any>, index: number, form: FormInstance) => any;
|
8
8
|
export type TitleType = string | React.ReactNode | TitleRender;
|
9
9
|
type Callback = (record: any, option: Pick<Option, 'namePath' | 'index' | 'operation' | 'form'>) => any | void;
|
@@ -14,7 +14,7 @@ export interface Option {
|
|
14
14
|
form: FormInstance;
|
15
15
|
operation: FormListOperation;
|
16
16
|
}
|
17
|
-
export interface
|
17
|
+
export interface ActionType extends Omit<ButtonProps, 'onClick' | 'type'> {
|
18
18
|
type?: 'add' | 'delete' | 'copy' | 'moveUp' | 'moveDown';
|
19
19
|
onHandle?: Callback;
|
20
20
|
onClick?: Callback;
|
@@ -24,21 +24,21 @@ export interface ActionProps extends Omit<ButtonProps, 'onClick' | 'type'> {
|
|
24
24
|
title?: string;
|
25
25
|
show?: boolean | ((record: any, option: Pick<Option, 'index' | 'form' | 'namePath'>) => boolean);
|
26
26
|
}
|
27
|
-
export interface
|
27
|
+
export interface ToolbarActionType extends Omit<ActionType, 'actionType' | 'onHandle' | 'onClick' | 'show' | 'type'> {
|
28
28
|
type?: 'add';
|
29
29
|
onHandle?: ToolbarCallback;
|
30
30
|
onClick?: ToolbarCallback;
|
31
31
|
show?: boolean | ((record: any, option: Pick<Option, 'form' | 'namePath'>) => boolean);
|
32
32
|
}
|
33
33
|
export type FormListMode = 'block' | 'line' | 'less';
|
34
|
-
export interface
|
35
|
-
columns:
|
36
|
-
otherProps?:
|
34
|
+
export interface FormListType {
|
35
|
+
columns: ProFormColumnType[];
|
36
|
+
otherProps?: ProFormOtherType;
|
37
37
|
form?: FormInstance;
|
38
38
|
min?: number;
|
39
39
|
max?: number;
|
40
|
-
actionProps?:
|
41
|
-
toolbarProps?:
|
40
|
+
actionProps?: ActionType[] | false;
|
41
|
+
toolbarProps?: ToolbarActionType[] | false;
|
42
42
|
value?: any[];
|
43
43
|
onChange?: (record: any[], option: Pick<Option, 'namePath' | 'form'>) => void;
|
44
44
|
fields: FormListFieldData[];
|
@@ -56,8 +56,16 @@ export interface FormListProps {
|
|
56
56
|
draggable?: boolean;
|
57
57
|
id?: string;
|
58
58
|
}
|
59
|
-
export type
|
60
|
-
export interface
|
59
|
+
export type TypeWithRef = FormListType & React.RefAttributes<FormListRefType>;
|
60
|
+
export interface FormListRefType {
|
61
61
|
operation: FormListOperation;
|
62
62
|
}
|
63
|
+
/**
|
64
|
+
* 兼容旧命名导出
|
65
|
+
*/
|
66
|
+
export type ActionProps = ActionType;
|
67
|
+
export type ToolbarActionProps = ToolbarActionType;
|
68
|
+
export type FormListProps = FormListType;
|
69
|
+
export type PropsWithRef = TypeWithRef;
|
70
|
+
export type FormListRef = FormListRefType;
|
63
71
|
export {};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import type { GroupType } from './propsType';
|
3
3
|
/**
|
4
4
|
* 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
|
5
5
|
* 2.
|
6
6
|
*
|
7
7
|
* render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
|
8
8
|
*/
|
9
|
-
declare const Group: React.FC<
|
9
|
+
declare const Group: React.FC<GroupType>;
|
10
10
|
export default Group;
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { FormItemProps, ModalFuncProps, SpaceProps } from 'antd';
|
3
3
|
import { FormInstance } from 'antd/es/form/Form';
|
4
4
|
import { NamePath } from 'antd/lib/form/interface';
|
5
|
-
import {
|
5
|
+
import type { ColumnTypeMap, FunctionArgs, ProFormValueType, ReactiveFunction, ViewType } from '../../render/propsType';
|
6
6
|
export interface SpaceType extends SpaceProps {
|
7
7
|
/**
|
8
8
|
* 是否紧凑合并
|
@@ -17,8 +17,8 @@ export interface SpaceType extends SpaceProps {
|
|
17
17
|
/** 间隔距离 */
|
18
18
|
size?: number;
|
19
19
|
}
|
20
|
-
export interface
|
21
|
-
children?:
|
20
|
+
export interface GroupType {
|
21
|
+
children?: GroupColumnType[];
|
22
22
|
space?: SpaceType;
|
23
23
|
className?: string;
|
24
24
|
id?: string;
|
@@ -28,7 +28,7 @@ export interface GroupProps {
|
|
28
28
|
onChange?: (value: any[] | null, options?: any[]) => void;
|
29
29
|
otherProps?: any;
|
30
30
|
}
|
31
|
-
export type
|
31
|
+
export type GroupColumnType<Values = any> = {
|
32
32
|
component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
|
33
33
|
names?: NamePath[];
|
34
34
|
show?: boolean | ReactiveFunction<Values, boolean>;
|
@@ -51,4 +51,9 @@ export type GroupColumnProps<Values = any> = {
|
|
51
51
|
valuePropName?: string;
|
52
52
|
getValueProps?: (value: any) => Record<string, unknown>;
|
53
53
|
desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
|
54
|
-
} &
|
54
|
+
} & ColumnTypeMap & FormItemProps;
|
55
|
+
/**
|
56
|
+
* 兼容旧命名导出
|
57
|
+
*/
|
58
|
+
export type GroupProps = GroupType;
|
59
|
+
export type GroupColumnProps<Values = any> = GroupColumnType<Values>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { InternalNamePath, NamePath } from 'antd/lib/form/interface';
|
3
3
|
import { FormInstance } from 'antd';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import type { GroupColumnType, GroupType, SpaceType } from './propsType';
|
5
|
+
import type { ProFormColumnType, ReactiveFunction } from '../../render/propsType';
|
6
6
|
export type EventArgs = any[];
|
7
7
|
/**
|
8
8
|
* 插入间隔符
|
9
9
|
* @param columns 表单配置数组
|
10
10
|
* @returns
|
11
11
|
*/
|
12
|
-
export declare const insertSeparator: (columns:
|
12
|
+
export declare const insertSeparator: (columns: GroupColumnType[], space?: SpaceType) => any[];
|
13
13
|
/** 带出event的组件默认取值方法 */
|
14
14
|
export declare function defaultGetValueFromEvent(valuePropName: string, ...args: EventArgs): any;
|
15
15
|
/** 转换names */
|
@@ -41,7 +41,7 @@ export declare const getReactiveProps: (params: Params) => {
|
|
41
41
|
fieldProps: boolean;
|
42
42
|
desensitization: [number, number];
|
43
43
|
};
|
44
|
-
type ValueTypeGetterParams = Pick<
|
44
|
+
type ValueTypeGetterParams = Pick<ProFormColumnType, 'valueType' | 'switchValue' | 'toISOString' | 'toCSTString' | 'disabled' | 'desensitization'> & {
|
45
45
|
type?: any;
|
46
46
|
mode?: string;
|
47
47
|
desensitizationKey?: string;
|
@@ -51,7 +51,7 @@ export declare const getValueTypeTrans: (params: ValueTypeGetterParams) => any;
|
|
51
51
|
/** 执行所有中间件 返回处理后的值 */
|
52
52
|
export declare const getValueMiddleware: (value: any, callbacks?: any[]) => any;
|
53
53
|
interface ColumnsTransformerParams {
|
54
|
-
columns:
|
54
|
+
columns: GroupColumnType[];
|
55
55
|
name?: NamePath;
|
56
56
|
names?: NamePath[];
|
57
57
|
value?: any[];
|
@@ -61,7 +61,7 @@ interface ColumnsTransformerParams {
|
|
61
61
|
index?: number;
|
62
62
|
formDisabled?: boolean;
|
63
63
|
desensitizationKey?: string;
|
64
|
-
groupProps:
|
64
|
+
groupProps: GroupType;
|
65
65
|
}
|
66
66
|
/** 转换columns */
|
67
67
|
export declare const useTransformColumns: (params: ColumnsTransformerParams) => any[];
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
declare const _default: import("react").MemoExoticComponent<(props:
|
2
|
+
import type { ProCascaderType } from './propsType';
|
3
|
+
declare const _default: import("react").MemoExoticComponent<(props: ProCascaderType) => import("react/jsx-runtime").JSX.Element>;
|
4
4
|
export default _default;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { DefaultOptionType } from 'rc-select/lib/Select';
|
3
3
|
import { Service } from 'ahooks/lib/useRequest/src/types';
|
4
|
-
export interface
|
4
|
+
export interface FieldNamesType {
|
5
5
|
label: string;
|
6
6
|
value: string;
|
7
7
|
children?: string;
|
8
8
|
[key: string]: string;
|
9
9
|
}
|
10
|
-
export interface
|
10
|
+
export interface ProCascaderType {
|
11
11
|
className?: string;
|
12
12
|
mode?: 'address' | 'default';
|
13
13
|
isView?: boolean;
|
@@ -16,7 +16,7 @@ export interface ProCascaderProps {
|
|
16
16
|
hasDetail?: boolean;
|
17
17
|
tooltip?: boolean | ReactNode;
|
18
18
|
detailMaxLength?: number;
|
19
|
-
fieldNames?:
|
19
|
+
fieldNames?: FieldNamesType;
|
20
20
|
dataSource?: DefaultOptionType[];
|
21
21
|
useRequest?: {
|
22
22
|
loadData?: boolean;
|
@@ -38,3 +38,8 @@ export interface ProCascaderProps {
|
|
38
38
|
scrollFollowParent?: boolean;
|
39
39
|
desensitization?: [number, number];
|
40
40
|
}
|
41
|
+
/**
|
42
|
+
* 兼容旧命名导出
|
43
|
+
*/
|
44
|
+
export type fieldNamesProps = FieldNamesType;
|
45
|
+
export type ProCascaderProps = ProCascaderType;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FC } from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProCombinationType, ChildPropsItemType } from './propsType';
|
3
3
|
import './style/index.less';
|
4
|
-
export declare const ProCombination: FC<
|
5
|
-
export declare const childPropsItemProps: FC<
|
4
|
+
export declare const ProCombination: FC<ProCombinationType>;
|
5
|
+
export declare const childPropsItemProps: FC<ChildPropsItemType>;
|
6
6
|
export default ProCombination;
|
@@ -2,8 +2,8 @@ import { FieldNames } from 'rc-select/lib/Select';
|
|
2
2
|
import { FormInstance } from 'antd';
|
3
3
|
import React from 'react';
|
4
4
|
import * as componentMap from '../../index';
|
5
|
-
import {
|
6
|
-
export interface
|
5
|
+
import type { ProFormOtherType } from '../../../propsType';
|
6
|
+
export interface ChildPropsItemType {
|
7
7
|
/**
|
8
8
|
* @description 要显示什么组件,支持Input/Select
|
9
9
|
* @default Input
|
@@ -22,7 +22,7 @@ export interface ChildPropsItemProps {
|
|
22
22
|
onChange?: (value: any, option: any, form: FormInstance) => void;
|
23
23
|
[name: string]: any;
|
24
24
|
}
|
25
|
-
export interface
|
25
|
+
export interface ProCombinationType {
|
26
26
|
/**
|
27
27
|
* @description 组件的值,[第一个组件的值,第二个组件的值,]
|
28
28
|
* @default []
|
@@ -42,7 +42,7 @@ export interface ProCombinationProps {
|
|
42
42
|
* @description 子组件内部组件可配置属性,按照数组顺序注入到内部组件中
|
43
43
|
* @default [{},{}]
|
44
44
|
*/
|
45
|
-
childProps?: Array<
|
45
|
+
childProps?: Array<ChildPropsItemType>;
|
46
46
|
/**
|
47
47
|
* @description 是否视图模式
|
48
48
|
* @default false
|
@@ -58,6 +58,11 @@ export interface ProCombinationProps {
|
|
58
58
|
* @default '-'
|
59
59
|
*/
|
60
60
|
separator?: string;
|
61
|
-
otherProps?:
|
61
|
+
otherProps?: ProFormOtherType;
|
62
62
|
id?: string;
|
63
63
|
}
|
64
|
+
/**
|
65
|
+
* 兼容旧命名导出
|
66
|
+
*/
|
67
|
+
export type ChildPropsItemProps = ChildPropsItemType;
|
68
|
+
export type ProCombinationProps = ProCombinationType;
|