@zat-design/sisyphus-react 3.0.13 → 3.0.16-beta.4
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 +2729 -1876
- package/es/ProDownload/DownloadHelper.js +2 -0
- package/es/ProDrawerForm/components/ProDrawer/index.js +5 -3
- package/es/ProDrawerForm/components/ProModal/index.js +15 -5
- package/es/ProDrawerForm/index.js +1 -1
- package/es/ProDrawerForm/propsType.d.ts +4 -0
- package/es/ProDrawerForm/style/index.less +88 -55
- package/es/ProEditLabel/components/RenderProForm.d.ts +4 -0
- package/es/ProEditLabel/components/RenderProForm.js +70 -0
- package/es/ProEditLabel/index.js +104 -141
- package/es/ProEditLabel/propsType.d.ts +7 -4
- package/es/ProEditLabel/style/index.less +33 -2
- package/es/ProEditLabel/utils/index.d.ts +5 -7
- package/es/ProEditLabel/utils/index.js +11 -27
- package/es/ProEditTable/components/ActionButton/index.d.ts +2 -1
- package/es/ProEditTable/components/ActionButton/index.js +20 -4
- package/es/ProEditTable/components/RenderField/index.d.ts +2 -1
- package/es/ProEditTable/components/RenderField/index.js +1 -2
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +2 -1
- package/es/ProEditTable/components/Summary/index.d.ts +2 -1
- package/es/ProEditTable/propsType.d.ts +5 -0
- package/es/ProEditTable/style/index.less +16 -13
- package/es/ProEditTable/utils/config.d.ts +2 -1
- package/es/ProEditTable/utils/config.js +25 -14
- package/es/ProEditTable/utils/index.js +5 -3
- package/es/ProEnum/getEnumLabel.d.ts +2 -1
- package/es/ProEnum/getEnumLabel.js +1 -1
- package/es/ProEnum/index.d.ts +3 -2
- package/es/ProEnum/index.js +1 -1
- package/es/ProEnum/useEnum.js +1 -1
- package/es/ProEnum/useEnumRequest.js +6 -11
- package/es/ProForm/components/FormFooter/index.js +1 -1
- package/es/ProForm/components/base/DatePicker/index.js +2 -2
- package/es/ProForm/components/base/FormList/components/ActionButton.js +4 -5
- package/es/ProForm/components/base/FormList/index.d.ts +1 -0
- package/es/ProForm/components/base/FormList/index.js +10 -5
- package/es/ProForm/components/base/FormList/style/index.less +3 -0
- package/es/ProForm/components/base/Input/index.d.ts +2 -1
- package/es/ProForm/components/base/Input/index.js +1 -1
- package/es/ProForm/components/base/InputNumber/index.js +25 -1
- package/es/ProForm/components/base/RangePicker/index.js +2 -2
- package/es/ProForm/components/base/Select/index.js +1 -1
- package/es/ProForm/components/base/Switch/index.js +1 -1
- package/es/ProForm/components/base/TextArea/index.js +1 -1
- package/es/ProForm/components/combination/ProAddressBar/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProAddressBar/index.js +3 -2
- package/es/ProForm/components/combination/ProCombination/index.js +3 -3
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +4 -3
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +7 -6
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +45 -36
- package/es/ProForm/components/combination/ProRangeLimit/index.js +14 -16
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -1
- package/es/ProForm/components/index.d.ts +2 -0
- package/es/ProForm/components/index.js +2 -0
- package/es/ProForm/components/old/CertNo/index.d.ts +2 -1
- package/es/ProForm/components/old/EnumSelect/index.js +1 -1
- package/es/ProForm/components/old/InputRange/index.d.ts +2 -1
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +2 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/es/ProForm/components/old/ProCertValidity/index.js +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/es/ProForm/components/render/Render.js +6 -22
- package/es/ProForm/components/render/propsType.d.ts +4 -0
- package/es/ProForm/index.js +4 -2
- package/es/ProForm/style/index.less +12 -5
- package/es/ProForm/utils/index.d.ts +5 -2
- package/es/ProForm/utils/index.js +7 -12
- package/es/ProForm/utils/transformValue.js +4 -2
- package/es/ProForm/utils/useShouldUpdate.js +1 -0
- package/es/ProForm/utils/valueType.d.ts +4 -4
- package/es/ProIcon/index.d.ts +1 -0
- package/es/ProIcon/index.js +35 -5
- package/es/ProIcon/propsTypes.d.ts +9 -9
- package/es/ProIcon/symbolIcon.js +43 -0
- package/es/ProLayout/components/Layout/Header/style/index.less +1 -2
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +2 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -0
- package/es/ProLayout/components/ProCollapse/index.d.ts +2 -1
- package/es/ProLayout/components/ProCollapse/style/index.less +1 -0
- package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +2 -1
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.js +2 -4
- package/es/ProLayout/components/ProHeader/style/index.less +3 -3
- package/es/ProLayout/index.d.ts +4 -4
- package/es/ProLayout/index.js +5 -6
- package/es/ProLayout/propTypes.d.ts +2 -5
- package/es/ProLayout/style/index.less +7 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProSelect/index.js +2 -2
- package/es/ProSelect/propsType.d.ts +7 -0
- package/es/ProStep/components/Anchor/index.d.ts +2 -1
- package/es/ProStep/components/Item/index.d.ts +2 -1
- package/es/ProStep/components/Step/index.d.ts +2 -1
- package/es/ProStep/components/Step/index.js +12 -10
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/style/index.less +1 -1
- package/es/ProTable/components/ResizableLine/index.d.ts +2 -1
- package/es/ProTable/components/TableResizable/index.d.ts +2 -1
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/index.js +2 -2
- package/es/ProTable/propsType.d.ts +4 -3
- package/es/ProTable/style/index.less +12 -17
- package/es/ProTable/useAntdTable.d.ts +4 -4
- package/es/ProTable/useAntdTable.js +64 -37
- package/es/ProTable/utils.js +25 -6
- package/es/ProTabs/components/Card/index.d.ts +4 -0
- package/es/ProTabs/components/Card/index.js +24 -0
- package/es/ProTabs/components/index.d.ts +1 -0
- package/es/ProTabs/components/index.js +1 -0
- package/es/ProTabs/index.d.ts +4 -0
- package/es/ProTabs/index.js +98 -0
- package/es/ProTabs/propType.d.ts +31 -0
- package/es/ProTabs/propType.js +1 -0
- package/es/ProTabs/style/index.less +68 -0
- package/es/ProThemeTools/component/PrdTools/index.d.ts +4 -0
- package/es/ProThemeTools/component/PrdTools/index.js +219 -0
- package/es/ProThemeTools/component/PrdTools/style/index.less +168 -0
- package/es/ProThemeTools/component/index.d.ts +2 -0
- package/es/ProThemeTools/component/index.js +2 -0
- package/es/ProThemeTools/index.d.ts +14 -0
- package/es/ProThemeTools/index.js +196 -0
- package/es/ProThemeTools/propsType.d.ts +35 -0
- package/es/ProThemeTools/propsType.js +1 -0
- package/es/ProThemeTools/style/index.less +55 -0
- package/es/ProThemeTools/utils/index.d.ts +19 -0
- package/es/ProThemeTools/utils/index.js +72 -0
- package/es/ProTooltip/index.d.ts +2 -1
- package/es/ProTransferModal/components/SortableItem/index.js +2 -2
- package/es/ProTransferModal/style/index.less +9 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +3 -0
- package/es/ProTreeModal/components/CloseIcon.js +25 -0
- package/es/ProTreeModal/components/List.d.ts +13 -0
- package/es/ProTreeModal/components/List.js +52 -0
- package/es/ProTreeModal/components/SearchTitle.d.ts +7 -0
- package/es/ProTreeModal/components/SearchTitle.js +14 -0
- package/es/ProTreeModal/components/Tree.d.ts +15 -0
- package/es/ProTreeModal/components/Tree.js +149 -0
- package/es/ProTreeModal/components/Trigger.d.ts +10 -0
- package/es/ProTreeModal/components/Trigger.js +32 -0
- package/es/ProTreeModal/components/index.d.ts +5 -0
- package/es/ProTreeModal/components/index.js +5 -0
- package/es/ProTreeModal/data/datasource.d.ts +5 -0
- package/es/ProTreeModal/data/datasource.js +17 -0
- package/es/ProTreeModal/data/mock.d.ts +9 -0
- package/es/ProTreeModal/data/mock.js +39 -0
- package/es/ProTreeModal/index.d.ts +5 -0
- package/es/ProTreeModal/index.js +333 -0
- package/es/ProTreeModal/propsType.d.ts +26 -0
- package/es/ProTreeModal/propsType.js +1 -0
- package/es/ProTreeModal/style/index.less +105 -0
- package/es/ProTreeModal/utils.d.ts +26 -0
- package/es/ProTreeModal/utils.js +136 -0
- package/es/ProTreeSelect/index.d.ts +5 -0
- package/es/ProTreeSelect/index.js +426 -0
- package/es/ProTreeSelect/propsType.d.ts +95 -0
- package/es/ProTreeSelect/propsType.js +1 -0
- package/es/ProTreeSelect/style/index.less +109 -0
- package/es/ProUpload/Example.js +1 -1
- package/es/ProUpload/index.d.ts +0 -1
- package/es/ProUpload/index.js +8 -2
- package/es/ProUpload/style/fileItem.less +3 -1
- package/es/ProUpload/style/index.less +8 -1
- package/es/ProWaterMark/index.js +1 -1
- package/es/assets/close.svg +1 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -8
- package/es/old/ProCertValidity/index.js +1 -1
- package/es/style/components.less +25 -9
- package/es/style/theme/antd.less +60 -29
- package/es/style/theme/index.less +154 -176
- package/es/tokens.js +85 -0
- package/lib/ProDrawerForm/components/ProDrawer/index.js +5 -3
- package/lib/ProDrawerForm/components/ProModal/index.js +13 -5
- package/lib/ProDrawerForm/index.js +1 -1
- package/lib/ProDrawerForm/propsType.d.ts +4 -0
- package/lib/ProDrawerForm/style/index.less +88 -55
- package/lib/ProEditLabel/components/RenderProForm.d.ts +4 -0
- package/lib/ProEditLabel/components/RenderProForm.js +78 -0
- package/lib/ProEditLabel/index.js +102 -137
- package/lib/ProEditLabel/propsType.d.ts +7 -4
- package/lib/ProEditLabel/style/index.less +33 -2
- package/lib/ProEditLabel/utils/index.d.ts +5 -7
- package/lib/ProEditLabel/utils/index.js +14 -31
- package/lib/ProEditTable/components/ActionButton/index.d.ts +2 -1
- package/lib/ProEditTable/components/ActionButton/index.js +20 -4
- package/lib/ProEditTable/components/RenderField/index.d.ts +2 -1
- package/lib/ProEditTable/components/RenderField/index.js +3 -2
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +2 -1
- package/lib/ProEditTable/components/Summary/index.d.ts +2 -1
- package/lib/ProEditTable/propsType.d.ts +5 -0
- package/lib/ProEditTable/style/index.less +16 -13
- package/lib/ProEditTable/utils/config.d.ts +2 -1
- package/lib/ProEditTable/utils/config.js +24 -13
- package/lib/ProEditTable/utils/index.js +5 -3
- package/lib/ProEnum/getEnumLabel.d.ts +2 -1
- package/lib/ProEnum/getEnumLabel.js +3 -3
- package/lib/ProEnum/index.d.ts +3 -2
- package/lib/ProEnum/index.js +4 -4
- package/lib/ProEnum/useEnum.js +3 -3
- package/lib/ProEnum/useEnumRequest.js +6 -11
- package/lib/ProForm/components/FormFooter/index.js +2 -2
- package/lib/ProForm/components/base/DatePicker/index.js +3 -3
- package/lib/ProForm/components/base/FormList/components/ActionButton.js +4 -5
- package/lib/ProForm/components/base/FormList/index.d.ts +1 -0
- package/lib/ProForm/components/base/FormList/index.js +10 -5
- package/lib/ProForm/components/base/FormList/style/index.less +3 -0
- package/lib/ProForm/components/base/Input/index.d.ts +2 -1
- package/lib/ProForm/components/base/Input/index.js +2 -2
- package/lib/ProForm/components/base/InputNumber/index.js +26 -2
- package/lib/ProForm/components/base/RangePicker/index.js +2 -2
- package/lib/ProForm/components/base/Select/index.js +2 -2
- package/lib/ProForm/components/base/Switch/index.js +2 -2
- package/lib/ProForm/components/base/TextArea/index.js +2 -2
- package/lib/ProForm/components/combination/ProAddressBar/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProAddressBar/index.js +4 -3
- package/lib/ProForm/components/combination/ProCombination/index.js +3 -3
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +8 -7
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +7 -6
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +45 -36
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +15 -17
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/index.d.ts +2 -0
- package/lib/ProForm/components/index.js +14 -0
- package/lib/ProForm/components/old/CertNo/index.d.ts +2 -1
- package/lib/ProForm/components/old/EnumSelect/index.js +2 -2
- package/lib/ProForm/components/old/InputRange/index.d.ts +2 -1
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +2 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/lib/ProForm/components/render/Render.js +4 -20
- package/lib/ProForm/components/render/propsType.d.ts +4 -0
- package/lib/ProForm/index.js +4 -2
- package/lib/ProForm/style/index.less +12 -5
- package/lib/ProForm/utils/index.d.ts +5 -2
- package/lib/ProForm/utils/index.js +10 -14
- package/lib/ProForm/utils/transformValue.js +4 -2
- package/lib/ProForm/utils/useShouldUpdate.js +1 -0
- package/lib/ProForm/utils/valueType.d.ts +4 -4
- package/lib/ProIcon/index.d.ts +1 -0
- package/lib/ProIcon/index.js +36 -5
- package/lib/ProIcon/propsTypes.d.ts +9 -9
- package/lib/ProIcon/symbolIcon.js +45 -0
- package/lib/ProLayout/components/Layout/Header/style/index.less +1 -2
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +2 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -0
- package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -1
- package/lib/ProLayout/components/ProCollapse/style/index.less +1 -0
- package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +2 -1
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.js +1 -4
- package/lib/ProLayout/components/ProHeader/style/index.less +3 -3
- package/lib/ProLayout/index.d.ts +4 -4
- package/lib/ProLayout/index.js +5 -6
- package/lib/ProLayout/propTypes.d.ts +2 -5
- package/lib/ProLayout/style/index.less +7 -1
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProSelect/index.js +3 -3
- package/lib/ProSelect/propsType.d.ts +7 -0
- package/lib/ProStep/components/Anchor/index.d.ts +2 -1
- package/lib/ProStep/components/Item/index.d.ts +2 -1
- package/lib/ProStep/components/Step/index.d.ts +2 -1
- package/lib/ProStep/components/Step/index.js +11 -9
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProStep/style/index.less +1 -1
- package/lib/ProTable/components/ResizableLine/index.d.ts +2 -1
- package/lib/ProTable/components/TableResizable/index.d.ts +2 -1
- package/lib/ProTable/components/TableResizable/index.js +8 -0
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/index.js +5 -5
- package/lib/ProTable/propsType.d.ts +4 -3
- package/lib/ProTable/style/index.less +12 -17
- package/lib/ProTable/useAntdTable.d.ts +4 -4
- package/lib/ProTable/useAntdTable.js +63 -36
- package/lib/ProTable/utils.js +26 -7
- package/lib/ProTabs/components/Card/index.d.ts +4 -0
- package/lib/ProTabs/components/Card/index.js +31 -0
- package/lib/ProTabs/components/index.d.ts +1 -0
- package/lib/ProTabs/components/index.js +13 -0
- package/lib/ProTabs/index.d.ts +4 -0
- package/lib/ProTabs/index.js +106 -0
- package/lib/ProTabs/propType.d.ts +31 -0
- package/lib/ProTabs/propType.js +5 -0
- package/lib/ProTabs/style/index.less +68 -0
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +4 -0
- package/lib/ProThemeTools/component/PrdTools/index.js +221 -0
- package/lib/ProThemeTools/component/PrdTools/style/index.less +168 -0
- package/lib/ProThemeTools/component/index.d.ts +2 -0
- package/lib/ProThemeTools/component/index.js +13 -0
- package/lib/ProThemeTools/index.d.ts +14 -0
- package/lib/ProThemeTools/index.js +202 -0
- package/lib/ProThemeTools/propsType.d.ts +35 -0
- package/lib/ProThemeTools/propsType.js +5 -0
- package/lib/ProThemeTools/style/index.less +55 -0
- package/lib/ProThemeTools/utils/index.d.ts +19 -0
- package/lib/ProThemeTools/utils/index.js +82 -0
- package/lib/ProTooltip/index.d.ts +2 -1
- package/lib/ProTransferModal/components/SortableItem/index.js +2 -2
- package/lib/ProTransferModal/style/index.less +9 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +3 -0
- package/lib/ProTreeModal/components/CloseIcon.js +33 -0
- package/lib/ProTreeModal/components/List.d.ts +13 -0
- package/lib/ProTreeModal/components/List.js +59 -0
- package/lib/ProTreeModal/components/SearchTitle.d.ts +7 -0
- package/lib/ProTreeModal/components/SearchTitle.js +22 -0
- package/lib/ProTreeModal/components/Tree.d.ts +15 -0
- package/lib/ProTreeModal/components/Tree.js +157 -0
- package/lib/ProTreeModal/components/Trigger.d.ts +10 -0
- package/lib/ProTreeModal/components/Trigger.js +39 -0
- package/lib/ProTreeModal/components/index.d.ts +5 -0
- package/lib/ProTreeModal/components/index.js +41 -0
- package/lib/ProTreeModal/data/datasource.d.ts +5 -0
- package/lib/ProTreeModal/data/datasource.js +24 -0
- package/lib/ProTreeModal/data/mock.d.ts +9 -0
- package/lib/ProTreeModal/data/mock.js +47 -0
- package/lib/ProTreeModal/index.d.ts +5 -0
- package/lib/ProTreeModal/index.js +340 -0
- package/lib/ProTreeModal/propsType.d.ts +26 -0
- package/lib/ProTreeModal/propsType.js +5 -0
- package/lib/ProTreeModal/style/index.less +105 -0
- package/lib/ProTreeModal/utils.d.ts +26 -0
- package/lib/ProTreeModal/utils.js +148 -0
- package/lib/ProTreeSelect/index.d.ts +5 -0
- package/lib/ProTreeSelect/index.js +433 -0
- package/lib/ProTreeSelect/propsType.d.ts +95 -0
- package/lib/ProTreeSelect/propsType.js +5 -0
- package/lib/ProTreeSelect/style/index.less +109 -0
- package/lib/ProUpload/Example.js +2 -2
- package/lib/ProUpload/index.d.ts +0 -1
- package/lib/ProUpload/index.js +8 -2
- package/lib/ProUpload/style/fileItem.less +3 -1
- package/lib/ProUpload/style/index.less +8 -1
- package/lib/ProWaterMark/index.js +1 -1
- package/lib/assets/close.svg +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +28 -0
- package/lib/old/ProCertValidity/index.js +1 -1
- package/lib/style/components.less +25 -9
- package/lib/style/theme/antd.less +60 -29
- package/lib/style/theme/index.less +154 -176
- package/lib/tokens.js +87 -0
- package/package.json +7 -8
- package/typings.d.ts +6 -2
- package/es/ProEditLabel/components/RenderForm.d.ts +0 -3
- package/es/ProEditLabel/components/RenderForm.js +0 -65
- package/lib/ProEditLabel/components/RenderForm.d.ts +0 -3
- package/lib/ProEditLabel/components/RenderForm.js +0 -75
- package/source-code/package.json +0 -16
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ListProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
checkedValues?: any[];
|
|
5
|
+
treeData: any[];
|
|
6
|
+
searchStr?: string;
|
|
7
|
+
showCodeName?: boolean;
|
|
8
|
+
mode?: 'render' | 'view';
|
|
9
|
+
handleOnChange?: (e: any, value: string) => void;
|
|
10
|
+
handleFilterClose?: (code: string) => void;
|
|
11
|
+
}
|
|
12
|
+
declare function List(props: ListProps): React.JSX.Element;
|
|
13
|
+
export default List;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
|
|
11
|
+
var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
|
|
12
|
+
function List(props) {
|
|
13
|
+
var checkedValues = props.checkedValues,
|
|
14
|
+
disabled = props.disabled,
|
|
15
|
+
treeData = props.treeData,
|
|
16
|
+
searchStr = props.searchStr,
|
|
17
|
+
showCodeName = props.showCodeName,
|
|
18
|
+
_props$mode = props.mode,
|
|
19
|
+
mode = _props$mode === void 0 ? 'render' : _props$mode,
|
|
20
|
+
handleOnChange = props.handleOnChange,
|
|
21
|
+
handleFilterClose = props.handleFilterClose;
|
|
22
|
+
if (mode === 'render') {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Checkbox.Group, {
|
|
24
|
+
disabled: disabled,
|
|
25
|
+
style: {
|
|
26
|
+
width: '100%'
|
|
27
|
+
},
|
|
28
|
+
value: checkedValues
|
|
29
|
+
}, treeData.map(function (item) {
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
+
key: item.value,
|
|
32
|
+
className: "pro-tree-modal-checkbox-content"
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
34
|
+
onChange: function onChange(e) {
|
|
35
|
+
return handleOnChange(e, item.value);
|
|
36
|
+
},
|
|
37
|
+
value: item.value,
|
|
38
|
+
disabled: item.disabled
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, showCodeName ? item.value : '', /*#__PURE__*/_react.default.createElement(_SearchTitle.default, {
|
|
40
|
+
label: item.title,
|
|
41
|
+
searchStr: searchStr
|
|
42
|
+
}))));
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, treeData.map(function (item) {
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
key: item.value,
|
|
48
|
+
className: "pro-tree-modal-checkbox-content"
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
className: "pro-tree-modal-checkbox-content-look"
|
|
51
|
+
}, item.title), disabled ? null : /*#__PURE__*/_react.default.createElement(_CloseIcon.default, {
|
|
52
|
+
onClick: function onClick() {
|
|
53
|
+
return handleFilterClose(item.value);
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
var _default = List;
|
|
59
|
+
exports.default = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
function SearchTitle(props) {
|
|
10
|
+
var searchStr = props.searchStr,
|
|
11
|
+
label = props.label;
|
|
12
|
+
var strTitle = label;
|
|
13
|
+
var index = strTitle.indexOf(searchStr);
|
|
14
|
+
var beforeStr = strTitle.substring(0, index);
|
|
15
|
+
var afterStr = strTitle.slice(index + searchStr.length);
|
|
16
|
+
var title = index > -1 ? /*#__PURE__*/_react.default.createElement("span", null, beforeStr, /*#__PURE__*/_react.default.createElement("span", {
|
|
17
|
+
className: "pro-tree-modal-search-value"
|
|
18
|
+
}, searchStr), afterStr) : /*#__PURE__*/_react.default.createElement("span", null, strTitle);
|
|
19
|
+
return title;
|
|
20
|
+
}
|
|
21
|
+
var _default = /*#__PURE__*/(0, _react.memo)(SearchTitle);
|
|
22
|
+
exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ListProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
checkedValues?: any[];
|
|
5
|
+
originalTreeData?: any[];
|
|
6
|
+
flatTreeData?: any[];
|
|
7
|
+
treeData: any[];
|
|
8
|
+
searchStr?: string;
|
|
9
|
+
showCodeName?: boolean;
|
|
10
|
+
mode?: 'render' | 'view';
|
|
11
|
+
onCheck?: (checkedKeys: any, info: any) => void;
|
|
12
|
+
handleFilterClose?: (code: string, node?: any) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function List(props: ListProps): React.JSX.Element;
|
|
15
|
+
export default List;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _antd = require("antd");
|
|
12
|
+
var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
|
|
13
|
+
var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
|
|
14
|
+
var _utils = require("../utils");
|
|
15
|
+
function List(props) {
|
|
16
|
+
var checkedValues = props.checkedValues,
|
|
17
|
+
disabled = props.disabled,
|
|
18
|
+
treeData = props.treeData,
|
|
19
|
+
searchStr = props.searchStr,
|
|
20
|
+
originalTreeData = props.originalTreeData,
|
|
21
|
+
_props$showCodeName = props.showCodeName,
|
|
22
|
+
showCodeName = _props$showCodeName === void 0 ? false : _props$showCodeName,
|
|
23
|
+
flatTreeData = props.flatTreeData,
|
|
24
|
+
_props$mode = props.mode,
|
|
25
|
+
mode = _props$mode === void 0 ? 'render' : _props$mode,
|
|
26
|
+
onCheck = props.onCheck,
|
|
27
|
+
handleFilterClose = props.handleFilterClose;
|
|
28
|
+
var _useState = (0, _react.useState)([]),
|
|
29
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
30
|
+
expandedKeys = _useState2[0],
|
|
31
|
+
setExpandedKeys = _useState2[1];
|
|
32
|
+
var _useState3 = (0, _react.useState)(true),
|
|
33
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
34
|
+
autoExpandParent = _useState4[0],
|
|
35
|
+
setAutoExpandParent = _useState4[1];
|
|
36
|
+
var onSelect = function onSelect(selectedKeysValue, info) {
|
|
37
|
+
console.log('selectedKeysValue', selectedKeysValue);
|
|
38
|
+
console.log('onSelect', info);
|
|
39
|
+
// setSelectedKeys(selectedKeysValue);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
console.log('checkedValues', checkedValues);
|
|
43
|
+
(0, _react.useEffect)(function () {
|
|
44
|
+
if (searchStr) {
|
|
45
|
+
var newExpandedKeys = flatTreeData.map(function (item) {
|
|
46
|
+
if (item.title.indexOf(searchStr) > -1) {
|
|
47
|
+
return (0, _utils.getParentKey)(item.key, originalTreeData);
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}).filter(function (item, i, self) {
|
|
51
|
+
return item && self.indexOf(item) === i;
|
|
52
|
+
});
|
|
53
|
+
setExpandedKeys(newExpandedKeys);
|
|
54
|
+
// setSearchValue(value);
|
|
55
|
+
setAutoExpandParent(true);
|
|
56
|
+
}
|
|
57
|
+
}, [searchStr]);
|
|
58
|
+
var _treeData = (0, _react.useMemo)(function () {
|
|
59
|
+
var loop = function loop(data) {
|
|
60
|
+
return data.map(function (item) {
|
|
61
|
+
if (item.children) {
|
|
62
|
+
return {
|
|
63
|
+
title: /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
+
key: item.value
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, showCodeName ? item.key : '', /*#__PURE__*/_react.default.createElement(_SearchTitle.default, {
|
|
66
|
+
label: item.title,
|
|
67
|
+
searchStr: searchStr
|
|
68
|
+
}))),
|
|
69
|
+
key: item.key,
|
|
70
|
+
children: loop(item.children)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
title: /*#__PURE__*/_react.default.createElement("div", {
|
|
75
|
+
key: item.value
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, showCodeName ? item.key : '', /*#__PURE__*/_react.default.createElement(_SearchTitle.default, {
|
|
77
|
+
label: item.title,
|
|
78
|
+
searchStr: searchStr
|
|
79
|
+
}))),
|
|
80
|
+
key: item.key
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
if (mode === 'view') {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
var newTreeData = originalTreeData.filter(function (item) {
|
|
88
|
+
return expandedKeys.length && searchStr ? expandedKeys.includes(item.key) : true;
|
|
89
|
+
});
|
|
90
|
+
return loop(newTreeData);
|
|
91
|
+
}, [searchStr, expandedKeys]);
|
|
92
|
+
var treeViewData = (0, _react.useMemo)(function () {
|
|
93
|
+
var loop = function loop(data) {
|
|
94
|
+
return data.map(function (item) {
|
|
95
|
+
if (item.children) {
|
|
96
|
+
return {
|
|
97
|
+
title: /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
key: item.key,
|
|
99
|
+
className: "pro-tree-modal-checkbox-content pro-tree-modal-tree-content"
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: "pro-tree-modal-checkbox-content-look"
|
|
102
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, showCodeName ? item.key : '', item.title)), disabled ? null : /*#__PURE__*/_react.default.createElement(_CloseIcon.default, {
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return handleFilterClose(item.key, item);
|
|
105
|
+
}
|
|
106
|
+
})),
|
|
107
|
+
key: item.key,
|
|
108
|
+
children: loop(item.children)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
title: /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
key: item.key,
|
|
114
|
+
className: "pro-tree-modal-checkbox-content pro-tree-modal-tree-content"
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
className: "pro-tree-modal-checkbox-content-look"
|
|
117
|
+
}, item.title), disabled ? null : /*#__PURE__*/_react.default.createElement(_CloseIcon.default, {
|
|
118
|
+
onClick: function onClick() {
|
|
119
|
+
return handleFilterClose(item.key, item);
|
|
120
|
+
}
|
|
121
|
+
})),
|
|
122
|
+
key: item.key
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
return loop(treeData);
|
|
127
|
+
}, [treeData]);
|
|
128
|
+
var onExpand = function onExpand(newExpandedKeys) {
|
|
129
|
+
setExpandedKeys(newExpandedKeys);
|
|
130
|
+
setAutoExpandParent(false);
|
|
131
|
+
};
|
|
132
|
+
if (mode === 'render') {
|
|
133
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Tree, {
|
|
134
|
+
disabled: disabled,
|
|
135
|
+
style: {
|
|
136
|
+
width: '100%'
|
|
137
|
+
},
|
|
138
|
+
checkable: true,
|
|
139
|
+
treeData: _treeData,
|
|
140
|
+
onExpand: onExpand,
|
|
141
|
+
expandedKeys: expandedKeys,
|
|
142
|
+
autoExpandParent: autoExpandParent,
|
|
143
|
+
// onSelect={onSelect}
|
|
144
|
+
onCheck: onCheck,
|
|
145
|
+
checkedKeys: checkedValues
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Tree, {
|
|
149
|
+
style: {
|
|
150
|
+
width: '100%'
|
|
151
|
+
},
|
|
152
|
+
selectable: false,
|
|
153
|
+
treeData: treeViewData
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
var _default = List;
|
|
157
|
+
exports.default = _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TriggerProps {
|
|
3
|
+
checkedValues: any[];
|
|
4
|
+
value: any;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
handleClick: () => void;
|
|
7
|
+
handleClearAll: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare function Trigger(props: TriggerProps): React.JSX.Element;
|
|
10
|
+
export default Trigger;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _reactSvg = require("react-svg");
|
|
11
|
+
var _view = _interopRequireDefault(require("../../assets/view.svg"));
|
|
12
|
+
function Trigger(props) {
|
|
13
|
+
var checkedValues = props.checkedValues,
|
|
14
|
+
handleClick = props.handleClick,
|
|
15
|
+
handleClearAll = props.handleClearAll,
|
|
16
|
+
value = props.value,
|
|
17
|
+
disabled = props.disabled;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
19
|
+
onClick: handleClick,
|
|
20
|
+
value: checkedValues.length === 0 ? null : "\u5DF2\u9009\u62E9".concat(checkedValues.length, "\u9879"),
|
|
21
|
+
addonAfter: /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "pro-enum-input-addonAfter"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement(_reactSvg.ReactSVG, {
|
|
24
|
+
className: "viewSvg",
|
|
25
|
+
src: _view.default,
|
|
26
|
+
onClick: handleClick
|
|
27
|
+
})),
|
|
28
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
29
|
+
allowClear: !disabled,
|
|
30
|
+
onChange: function onChange() {
|
|
31
|
+
return handleClearAll();
|
|
32
|
+
}
|
|
33
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
34
|
+
type: "hidden",
|
|
35
|
+
value: value
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
var _default = Trigger;
|
|
39
|
+
exports.default = _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "CloseIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _CloseIcon.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "ListView", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _List.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "SearchTitle", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _SearchTitle.default;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "TreeView", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _Tree.default;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "Trigger", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function get() {
|
|
34
|
+
return _Trigger.default;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
|
|
38
|
+
var _Trigger = _interopRequireDefault(require("./Trigger"));
|
|
39
|
+
var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
|
|
40
|
+
var _List = _interopRequireDefault(require("./List"));
|
|
41
|
+
var _Tree = _interopRequireDefault(require("./Tree"));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var dataSource = [{
|
|
8
|
+
title: '01-中意财产保险有限公司黑龙江分公司',
|
|
9
|
+
value: 'A'
|
|
10
|
+
}, {
|
|
11
|
+
title: '0101-中意财产保险有限公司黑龙江分公司市场部',
|
|
12
|
+
value: 'B'
|
|
13
|
+
}, {
|
|
14
|
+
title: '01010173-中意财产保险有限公司黑龙江分公司市场营销部黑分专代海洋望奎吉龙',
|
|
15
|
+
value: 'C'
|
|
16
|
+
}, {
|
|
17
|
+
title: '选项四',
|
|
18
|
+
value: 'D'
|
|
19
|
+
}, {
|
|
20
|
+
title: '0201-中意财产保险有限公司成都分公司市场部',
|
|
21
|
+
value: 'E'
|
|
22
|
+
}];
|
|
23
|
+
var _default = dataSource;
|
|
24
|
+
exports.default = _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.treeRequest = exports.serverRequest = void 0;
|
|
8
|
+
var _mockjs = _interopRequireDefault(require("mockjs"));
|
|
9
|
+
var serverRequest = function serverRequest(params) {
|
|
10
|
+
return _mockjs.default.mock({
|
|
11
|
+
code: 200,
|
|
12
|
+
message: null,
|
|
13
|
+
data: {
|
|
14
|
+
'list|10': [{
|
|
15
|
+
value: '@guid',
|
|
16
|
+
title: '@ctitle(5,50)',
|
|
17
|
+
disabled: false
|
|
18
|
+
}]
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.serverRequest = serverRequest;
|
|
23
|
+
var treeRequest = function treeRequest(params) {
|
|
24
|
+
return _mockjs.default.mock({
|
|
25
|
+
code: 200,
|
|
26
|
+
message: null,
|
|
27
|
+
data: {
|
|
28
|
+
'list|10': [{
|
|
29
|
+
key: '@guid',
|
|
30
|
+
title: '@ctitle(5,50)',
|
|
31
|
+
disabled: false,
|
|
32
|
+
'children|1-5': [{
|
|
33
|
+
key: '@guid',
|
|
34
|
+
title: '@ctitle(5,50)',
|
|
35
|
+
disabled: false,
|
|
36
|
+
'children|1-3': [{
|
|
37
|
+
key: '@guid',
|
|
38
|
+
title: '@ctitle(3,10)',
|
|
39
|
+
disabled: false,
|
|
40
|
+
children: []
|
|
41
|
+
}]
|
|
42
|
+
}]
|
|
43
|
+
}]
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
exports.treeRequest = treeRequest;
|