zmdms-webui 1.3.0 → 1.3.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/es/dynamicsetting/interface.d.ts +11 -3
- package/dist/es/modal/index.css +1 -1
- package/dist/es/node_modules/@ant-design/icons/es/components/AntdIcon.js +1 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/ArrowsAltOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/CheckOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/CloseOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/CopyOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/DownOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/DownloadOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/LoadingOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/LogoutOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/MenuOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/MinusOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/MinusSquareOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/PicRightOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/PlusOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/PlusSquareOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/SearchOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/SettingOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/ShrinkOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/SwapOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/UploadOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/UserOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/icons/VerticalAlignBottomOutlined.js +5 -2
- package/dist/es/node_modules/@ant-design/icons/es/utils.js +1 -1
- package/dist/es/table/components/EnhanceBodyCell.js +27 -7
- package/dist/es/table/components/FilterDropdown.js +218 -0
- package/dist/es/table/components/PopoverIcon.js +3 -0
- package/dist/es/table/components/TitleOperation.js +5 -5
- package/dist/es/table/components/table-header-operation/CopyColumn.js +18 -0
- package/dist/es/table/components/{FillDown.js → table-header-operation/FillDown.js} +2 -2
- package/dist/es/table/hooks.js +19 -14
- package/dist/es/table/index.css +1 -1
- package/dist/es/table/interface.d.ts +75 -3
- package/dist/es/table/table.js +33 -25
- package/dist/es/table/useColumns.js +236 -54
- package/dist/es/table/utils.js +290 -7
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/package.json +2 -2
- package/dist/es/table/components/CopyIcon.js +0 -15
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
1
3
|
interface IDynamicItem {
|
|
2
4
|
key: string;
|
|
3
|
-
label?:
|
|
5
|
+
label?: React__default.ReactNode;
|
|
4
6
|
disabled?: boolean;
|
|
5
7
|
checked?: boolean;
|
|
6
8
|
children?: IDynamicItem[];
|
|
9
|
+
indexs?: number[];
|
|
10
|
+
filter?: IFilter;
|
|
7
11
|
[props: string]: any;
|
|
8
12
|
}
|
|
13
|
+
interface IFilter {
|
|
14
|
+
input?: string;
|
|
15
|
+
checkbox?: React__default.Key[];
|
|
16
|
+
}
|
|
9
17
|
interface IDynamicSettingProps {
|
|
10
18
|
parentDynamicKey: string;
|
|
11
19
|
dynamicKey: string;
|
|
@@ -19,10 +27,10 @@ interface IDynamicSettingProps {
|
|
|
19
27
|
}
|
|
20
28
|
interface IRef {
|
|
21
29
|
getCurrentDynamicList: (list: IDynamicItem[]) => IDynamicItem[];
|
|
22
|
-
setList:
|
|
30
|
+
setList: React__default.Dispatch<React__default.SetStateAction<IDynamicItem[]>>;
|
|
23
31
|
setVisible: (v: boolean) => void;
|
|
24
32
|
updateList: (list: any) => void;
|
|
25
33
|
resetList: () => void;
|
|
26
34
|
}
|
|
27
35
|
|
|
28
|
-
export { IDynamicItem, IDynamicSettingProps, IRef };
|
|
36
|
+
export { IDynamicItem, IDynamicSettingProps, IFilter, IRef };
|
package/dist/es/modal/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ztxk-modal{top:8vh}.ztxk-modal .ant-modal-content{border-radius:8px}.ztxk-modal .ant-modal-content>.ant-modal-close{color:#333;height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-close>.ant-modal-close-x{font-weight:400;height:40px;line-height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-header{border-bottom:1px solid #f0f0f0;border-radius:8px 8px 0 0;padding:9px 20px 9px 24px}.ztxk-modal .ant-modal-content>.ant-modal-header>.ant-modal-title{color:#333;font-weight:400;line-height:22px;text-align:center}.ztxk-modal .ant-modal-content>.ant-modal-body{max-height:75vh;
|
|
1
|
+
.ztxk-modal{top:8vh}.ztxk-modal .ant-modal-content{border-radius:8px}.ztxk-modal .ant-modal-content>.ant-modal-close{color:#333;height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-close>.ant-modal-close-x{font-weight:400;height:40px;line-height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-header{border-bottom:1px solid #f0f0f0;border-radius:8px 8px 0 0;padding:9px 20px 9px 24px}.ztxk-modal .ant-modal-content>.ant-modal-header>.ant-modal-title{color:#333;font-weight:400;line-height:22px;text-align:center}.ztxk-modal .ant-modal-content>.ant-modal-body{max-height:75vh;overflow:auto;padding:10px}.ztxk-modal .ant-modal-content>.ant-modal-footer{border-top:0;padding:10px 0;text-align:center}
|
|
@@ -14,7 +14,6 @@ var _excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "
|
|
|
14
14
|
// should move it to antd main repo?
|
|
15
15
|
setTwoToneColor('#1890ff');
|
|
16
16
|
var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
|
-
var _classNames;
|
|
18
17
|
var className = props.className,
|
|
19
18
|
icon = props.icon,
|
|
20
19
|
spin = props.spin,
|
|
@@ -27,7 +26,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
27
26
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
28
27
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
|
|
29
28
|
rootClassName = _React$useContext.rootClassName;
|
|
30
|
-
var classString = classNames(rootClassName, prefixCls, (
|
|
29
|
+
var classString = classNames(rootClassName, prefixCls, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), className);
|
|
31
30
|
var iconTabIndex = tabIndex;
|
|
32
31
|
if (iconTabIndex === undefined && onClick) {
|
|
33
32
|
iconTabIndex = -1;
|
|
@@ -9,7 +9,10 @@ var ArrowsAltOutlined = function ArrowsAltOutlined(props, ref) {
|
|
|
9
9
|
icon: ArrowsAltOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(ArrowsAltOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'ArrowsAltOutlined';
|
|
15
|
+
}
|
|
16
|
+
var ArrowsAltOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { ArrowsAltOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var CaretDownOutlined = function CaretDownOutlined(props, ref) {
|
|
|
9
9
|
icon: CaretDownOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(CaretDownOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'CaretDownOutlined';
|
|
15
|
+
}
|
|
16
|
+
var CaretDownOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { CaretDownOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var CaretUpOutlined = function CaretUpOutlined(props, ref) {
|
|
|
9
9
|
icon: CaretUpOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(CaretUpOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'CaretUpOutlined';
|
|
15
|
+
}
|
|
16
|
+
var CaretUpOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { CaretUpOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var CheckCircleOutlined = function CheckCircleOutlined(props, ref) {
|
|
|
9
9
|
icon: CheckCircleOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(CheckCircleOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'CheckCircleOutlined';
|
|
15
|
+
}
|
|
16
|
+
var CheckCircleOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { CheckCircleOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var CheckOutlined = function CheckOutlined(props, ref) {
|
|
|
9
9
|
icon: CheckOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(CheckOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'CheckOutlined';
|
|
15
|
+
}
|
|
16
|
+
var CheckOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { CheckOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var CloseOutlined = function CloseOutlined(props, ref) {
|
|
|
9
9
|
icon: CloseOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(CloseOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'CloseOutlined';
|
|
15
|
+
}
|
|
16
|
+
var CloseOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { CloseOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var CopyOutlined = function CopyOutlined(props, ref) {
|
|
|
9
9
|
icon: CopyOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(CopyOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'CopyOutlined';
|
|
15
|
+
}
|
|
16
|
+
var CopyOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { CopyOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
|
|
|
9
9
|
icon: DoubleRightOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(DoubleRightOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'DoubleRightOutlined';
|
|
15
|
+
}
|
|
16
|
+
var DoubleRightOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { DoubleRightOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var DownOutlined = function DownOutlined(props, ref) {
|
|
|
9
9
|
icon: DownOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(DownOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'DownOutlined';
|
|
15
|
+
}
|
|
16
|
+
var DownOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { DownOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var DownloadOutlined = function DownloadOutlined(props, ref) {
|
|
|
9
9
|
icon: DownloadOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(DownloadOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'DownloadOutlined';
|
|
15
|
+
}
|
|
16
|
+
var DownloadOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { DownloadOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
|
9
9
|
icon: ExclamationCircleOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(ExclamationCircleOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'ExclamationCircleOutlined';
|
|
15
|
+
}
|
|
16
|
+
var ExclamationCircleOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { ExclamationCircleOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var LoadingOutlined = function LoadingOutlined(props, ref) {
|
|
|
9
9
|
icon: LoadingOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'LoadingOutlined';
|
|
15
|
+
}
|
|
16
|
+
var LoadingOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { LoadingOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var LogoutOutlined = function LogoutOutlined(props, ref) {
|
|
|
9
9
|
icon: LogoutOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(LogoutOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'LogoutOutlined';
|
|
15
|
+
}
|
|
16
|
+
var LogoutOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { LogoutOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var MenuOutlined = function MenuOutlined(props, ref) {
|
|
|
9
9
|
icon: MenuOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(MenuOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'MenuOutlined';
|
|
15
|
+
}
|
|
16
|
+
var MenuOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { MenuOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var MinusCircleOutlined = function MinusCircleOutlined(props, ref) {
|
|
|
9
9
|
icon: MinusCircleOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(MinusCircleOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'MinusCircleOutlined';
|
|
15
|
+
}
|
|
16
|
+
var MinusCircleOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { MinusCircleOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var MinusOutlined = function MinusOutlined(props, ref) {
|
|
|
9
9
|
icon: MinusOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(MinusOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'MinusOutlined';
|
|
15
|
+
}
|
|
16
|
+
var MinusOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { MinusOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var MinusSquareOutlined = function MinusSquareOutlined(props, ref) {
|
|
|
9
9
|
icon: MinusSquareOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(MinusSquareOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'MinusSquareOutlined';
|
|
15
|
+
}
|
|
16
|
+
var MinusSquareOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { MinusSquareOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var PicRightOutlined = function PicRightOutlined(props, ref) {
|
|
|
9
9
|
icon: PicRightOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(PicRightOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'PicRightOutlined';
|
|
15
|
+
}
|
|
16
|
+
var PicRightOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { PicRightOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var PlusOutlined = function PlusOutlined(props, ref) {
|
|
|
9
9
|
icon: PlusOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(PlusOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'PlusOutlined';
|
|
15
|
+
}
|
|
16
|
+
var PlusOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { PlusOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var PlusSquareOutlined = function PlusSquareOutlined(props, ref) {
|
|
|
9
9
|
icon: PlusSquareOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(PlusSquareOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'PlusSquareOutlined';
|
|
15
|
+
}
|
|
16
|
+
var PlusSquareOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { PlusSquareOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
|
|
|
9
9
|
icon: QuestionCircleOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(QuestionCircleOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'QuestionCircleOutlined';
|
|
15
|
+
}
|
|
16
|
+
var QuestionCircleOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { QuestionCircleOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var SearchOutlined = function SearchOutlined(props, ref) {
|
|
|
9
9
|
icon: SearchOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(SearchOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'SearchOutlined';
|
|
15
|
+
}
|
|
16
|
+
var SearchOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { SearchOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var SettingOutlined = function SettingOutlined(props, ref) {
|
|
|
9
9
|
icon: SettingOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(SettingOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'SettingOutlined';
|
|
15
|
+
}
|
|
16
|
+
var SettingOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { SettingOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var ShrinkOutlined = function ShrinkOutlined(props, ref) {
|
|
|
9
9
|
icon: ShrinkOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(ShrinkOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'ShrinkOutlined';
|
|
15
|
+
}
|
|
16
|
+
var ShrinkOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { ShrinkOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var SwapOutlined = function SwapOutlined(props, ref) {
|
|
|
9
9
|
icon: SwapOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(SwapOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'SwapOutlined';
|
|
15
|
+
}
|
|
16
|
+
var SwapOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { SwapOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var UploadOutlined = function UploadOutlined(props, ref) {
|
|
|
9
9
|
icon: UploadOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(UploadOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'UploadOutlined';
|
|
15
|
+
}
|
|
16
|
+
var UploadOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { UploadOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var UserOutlined = function UserOutlined(props, ref) {
|
|
|
9
9
|
icon: UserOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(UserOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'UserOutlined';
|
|
15
|
+
}
|
|
16
|
+
var UserOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { UserOutlined$1 as default };
|
|
@@ -9,7 +9,10 @@ var VerticalAlignBottomOutlined = function VerticalAlignBottomOutlined(props, re
|
|
|
9
9
|
icon: VerticalAlignBottomOutlinedSvg
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(VerticalAlignBottomOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'VerticalAlignBottomOutlined';
|
|
15
|
+
}
|
|
16
|
+
var VerticalAlignBottomOutlined$1 = RefIcon;
|
|
14
17
|
|
|
15
18
|
export { VerticalAlignBottomOutlined$1 as default };
|
|
@@ -62,7 +62,7 @@ var svgBaseProps = {
|
|
|
62
62
|
'aria-hidden': 'true',
|
|
63
63
|
focusable: 'false'
|
|
64
64
|
};
|
|
65
|
-
var iconStyles = "\n.anticon {\n display: inline-
|
|
65
|
+
var iconStyles = "\n.anticon {\n display: inline-flex;\n alignItems: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
66
66
|
var useInsertStyles = function useInsertStyles() {
|
|
67
67
|
var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
|
|
68
68
|
var _useContext = useContext(Context),
|
|
@@ -12,13 +12,15 @@ import { Popover } from 'antd';
|
|
|
12
12
|
|
|
13
13
|
var EnhanceCell = function (props) {
|
|
14
14
|
var _a, _b;
|
|
15
|
-
var record = props.record, propsIndex = props.index, editable = props.editable, editableConfig = props.editableConfig, dataIndex = props.dataIndex, title = props.title, onEditableSave = props.onEditableSave, dataSourceRef = props.dataSourceRef; props.onMouseEnter; props.onMouseLeave; var children = props.children, currentPage = props.currentPage, isValidate = props.isValidate, validate = props.validate, isRealTimeValidate = props.isRealTimeValidate, resetProps = __rest(props, ["record", "index", "editable", "editableConfig", "dataIndex", "title", "onEditableSave", "dataSourceRef", "onMouseEnter", "onMouseLeave", "children", "currentPage", "isValidate", "validate", "isRealTimeValidate"]);
|
|
15
|
+
var record = props.record, propsIndex = props.index, editable = props.editable, editableConfig = props.editableConfig, dataIndex = props.dataIndex, title = props.title, onEditableSave = props.onEditableSave, dataSourceRef = props.dataSourceRef; props.onMouseEnter; props.onMouseLeave; var children = props.children, currentPage = props.currentPage, isValidate = props.isValidate, validate = props.validate, isRealTimeValidate = props.isRealTimeValidate, insertTableFromClipboard = props.insertTableFromClipboard, resetProps = __rest(props, ["record", "index", "editable", "editableConfig", "dataIndex", "title", "onEditableSave", "dataSourceRef", "onMouseEnter", "onMouseLeave", "children", "currentPage", "isValidate", "validate", "isRealTimeValidate", "insertTableFromClipboard"]);
|
|
16
16
|
// 当前单元格的类型
|
|
17
17
|
var tdType = editableConfig === null || editableConfig === void 0 ? void 0 : editableConfig.type;
|
|
18
18
|
// 设置最新的index
|
|
19
19
|
var index = getInnerIndex(currentPage, propsIndex);
|
|
20
20
|
// 最新的record
|
|
21
|
-
|
|
21
|
+
// const newRecord = dataSourceRef?.current?.[index] || record;
|
|
22
|
+
// TODO: 这里不能用之前的那种方式取值,因为如果采用过滤的模式,那么数据可能会错行
|
|
23
|
+
var newRecord = record || ((_a = dataSourceRef === null || dataSourceRef === void 0 ? void 0 : dataSourceRef.current) === null || _a === void 0 ? void 0 : _a[index]);
|
|
22
24
|
// 当前数据
|
|
23
25
|
var _c = useState(newRecord ? newRecord[dataIndex] : undefined), val = _c[0], setVal = _c[1];
|
|
24
26
|
var iptNumberRef = useRef();
|
|
@@ -140,18 +142,30 @@ var EnhanceCell = function (props) {
|
|
|
140
142
|
var onSave = function (info) {
|
|
141
143
|
var _a;
|
|
142
144
|
if (!onEditableSave) {
|
|
143
|
-
throw Error("如果开启了editable, 那么必须传递
|
|
145
|
+
throw Error("如果开启了editable, 那么必须传递 onTableChange属性 来更改表格数据!");
|
|
144
146
|
}
|
|
145
147
|
var currentText = isIptNumberBooleanRef.current && iptNumberRef.current
|
|
146
148
|
? iptNumberRef.current
|
|
147
149
|
: val;
|
|
148
|
-
var resultValue = getTrimVal(editableConfig.trimType, currentText);
|
|
150
|
+
var resultValue = getTrimVal(editableConfig === null || editableConfig === void 0 ? void 0 : editableConfig.trimType, currentText);
|
|
149
151
|
if (currentText !== resultValue) {
|
|
150
152
|
setVal(resultValue);
|
|
151
153
|
}
|
|
152
154
|
toggleEdit();
|
|
153
155
|
onEditableSave(__assign(__assign({}, newRecord), (_a = {}, _a[dataIndex] = resultValue, _a)), index, dataIndex);
|
|
154
156
|
};
|
|
157
|
+
var onPasteHand = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
158
|
+
return __generator(this, function (_a) {
|
|
159
|
+
switch (_a.label) {
|
|
160
|
+
case 0: return [4 /*yield*/, insertTableFromClipboard(e, {
|
|
161
|
+
index: index,
|
|
162
|
+
})];
|
|
163
|
+
case 1:
|
|
164
|
+
_a.sent();
|
|
165
|
+
return [2 /*return*/];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}); };
|
|
155
169
|
// 如果开启编辑 那么内部直接代理
|
|
156
170
|
if (typeof editable === "function" ? editable(newRecord, index) : editable) {
|
|
157
171
|
var _g = editableConfig || {
|
|
@@ -173,7 +187,7 @@ var EnhanceCell = function (props) {
|
|
|
173
187
|
if (isValidate) {
|
|
174
188
|
removeErrorClass();
|
|
175
189
|
}
|
|
176
|
-
}, onPressEnter: onSave, onBlur: onSave, ref: iptRef, disabled: resultDisabled }, resetEditableConfigProps)));
|
|
190
|
+
}, onPressEnter: onSave, onBlur: onSave, ref: iptRef, disabled: resultDisabled, onPaste: onPasteHand }, resetEditableConfigProps)));
|
|
177
191
|
}
|
|
178
192
|
// 文本域输入框处理
|
|
179
193
|
if (type === "textarea") {
|
|
@@ -184,7 +198,7 @@ var EnhanceCell = function (props) {
|
|
|
184
198
|
if (isValidate) {
|
|
185
199
|
removeErrorClass();
|
|
186
200
|
}
|
|
187
|
-
}, onPressEnter: onSave, onBlur: onSave, ref: iptRef, disabled: resultDisabled }, resetEditableConfigProps)));
|
|
201
|
+
}, onPressEnter: onSave, onBlur: onSave, ref: iptRef, disabled: resultDisabled, onPaste: onPasteHand }, resetEditableConfigProps)));
|
|
188
202
|
}
|
|
189
203
|
// 数字输入框处理
|
|
190
204
|
if (type === "inputNumber") {
|
|
@@ -210,7 +224,7 @@ var EnhanceCell = function (props) {
|
|
|
210
224
|
setTimeout(function () {
|
|
211
225
|
onSave();
|
|
212
226
|
});
|
|
213
|
-
}, ref: iptRef, disabled: resultDisabled }, resetEditableConfigProps)));
|
|
227
|
+
}, ref: iptRef, disabled: resultDisabled, onPaste: onPasteHand }, resetEditableConfigProps)));
|
|
214
228
|
// 显示的时候 展示转换的值
|
|
215
229
|
try {
|
|
216
230
|
if (Array.isArray(newChildren)) {
|
|
@@ -326,6 +340,12 @@ function validateHandle(_a) {
|
|
|
326
340
|
});
|
|
327
341
|
});
|
|
328
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* 去空格功能
|
|
345
|
+
* @param trimType
|
|
346
|
+
* @param value
|
|
347
|
+
* @returns
|
|
348
|
+
*/
|
|
329
349
|
function getTrimVal(trimType, value) {
|
|
330
350
|
if (trimType === "trim") {
|
|
331
351
|
return typeof value === "string" ? value.trim() : value;
|