xmirror-components 1.0.28 → 1.0.30-alpha.1
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/build/dist/index.cjs +161 -16
- package/build/dist/index.mjs +2619 -1913
- package/build/es/components/Table/Footer/index.d.ts +0 -1
- package/build/es/components/Table/Footer/index.js +20 -17
- package/build/es/components/Table/Footer/styles.d.ts +25 -0
- package/build/es/components/Table/Footer/styles.js +25 -0
- package/build/es/components/Table/PopoverSetColumns/index.d.ts +0 -1
- package/build/es/components/Table/PopoverSetColumns/index.js +2 -2
- package/build/es/components/Table/PopoverSetColumns/styles.d.ts +8 -0
- package/build/es/components/Table/PopoverSetColumns/styles.js +11 -0
- package/build/es/components/Table/index.d.ts +0 -1
- package/build/es/components/Table/index.js +2 -2
- package/build/es/components/Table/styles.d.ts +4 -0
- package/build/es/components/Table/styles.js +7 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/lib/components/Table/Footer/index.js +19 -16
- package/build/lib/components/Table/Footer/styles.js +31 -0
- package/build/lib/components/Table/PopoverSetColumns/index.js +2 -2
- package/build/lib/components/Table/PopoverSetColumns/styles.js +17 -0
- package/build/lib/components/Table/index.js +2 -2
- package/build/lib/components/Table/styles.js +13 -0
- package/build/lib/index.d.ts +63 -0
- package/build/lib/index.js +3 -1
- package/build/package.json +1 -1
- package/build/types/components/Table/Footer/index.d.ts +0 -1
- package/build/types/components/Table/Footer/styles.d.ts +25 -0
- package/build/types/components/Table/PopoverSetColumns/index.d.ts +0 -1
- package/build/types/components/Table/PopoverSetColumns/styles.d.ts +8 -0
- package/build/types/components/Table/index.d.ts +0 -1
- package/build/types/components/Table/styles.d.ts +4 -0
- package/build/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useMemo, useRef } from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import { Checkbox,
|
|
3
|
+
import { Checkbox, Col } from 'antd';
|
|
4
4
|
import { CSSTransition } from 'react-transition-group';
|
|
5
5
|
import { CloseOutlined } from '@ant-design/icons';
|
|
6
|
-
import '
|
|
6
|
+
import { Global } from '@emotion/react';
|
|
7
|
+
import { TableFooterWrapper, TableFooterTotal, StyledRow, CloseButton, zoomStyles, globalStyles } from './styles';
|
|
7
8
|
function Index(props) {
|
|
8
9
|
var _a;
|
|
9
10
|
var transitionNodeRef = useRef(null);
|
|
@@ -67,20 +68,22 @@ function Index(props) {
|
|
|
67
68
|
var selectedRowKeys = (_a = rowSelection.selectedRowKeys) !== null && _a !== void 0 ? _a : [];
|
|
68
69
|
return !!(selectedRowKeys.length > 0 && selectedRowKeys.length === optionalNum);
|
|
69
70
|
}, [rowSelection.selectedRowKeys, optionalNum]);
|
|
70
|
-
return (React.createElement(
|
|
71
|
-
React.createElement(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
React.createElement(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
return (React.createElement(React.Fragment, null,
|
|
72
|
+
React.createElement(Global, { styles: globalStyles }),
|
|
73
|
+
React.createElement(TableFooterWrapper, null,
|
|
74
|
+
React.createElement(CSSTransition, { in: Boolean(props.rowSelection && props.selectionPopover && (checked || indeterminate)), nodeRef: transitionNodeRef, classNames: zoomStyles, unmountOnExit: true, timeout: 300 }, function () {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
return (React.createElement(StyledRow, { ref: transitionNodeRef, justify: "space-between" },
|
|
77
|
+
React.createElement(Col, { style: { display: 'flex', alignItems: 'center' } },
|
|
78
|
+
React.createElement(Checkbox, { checked: checked, indeterminate: indeterminate, onChange: changeCheckAll },
|
|
79
|
+
React.createElement(FormattedMessage, { id: "component.table.selected", defaultMessage: '已选{length}条', values: {
|
|
80
|
+
length: (_b = (_a = rowSelection.selectedRowKeys) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0
|
|
81
|
+
} }))),
|
|
82
|
+
React.createElement(Col, { style: { display: 'flex', alignItems: 'center' } },
|
|
83
|
+
selectionPopover,
|
|
84
|
+
React.createElement(CloseButton, { onClick: function () { changeCheckAll({ target: { checked: false } }); } },
|
|
85
|
+
React.createElement(CloseOutlined, null)))));
|
|
86
|
+
}),
|
|
87
|
+
pagination && (React.createElement(TableFooterTotal, null, pagination.showTotal ? pagination.showTotal((_a = pagination.total) !== null && _a !== void 0 ? _a : 0, [0, 0]) : null)))));
|
|
85
88
|
}
|
|
86
89
|
export default Index;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const TableFooterWrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const TableFooterTotal: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
9
|
+
export declare const TableBatchDialog: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const StyledRow: import("@emotion/styled").StyledComponent<import("antd").RowProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
14
|
+
theme?: import("@emotion/react").Theme;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export declare const CloseButton: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme;
|
|
18
|
+
as?: React.ElementType;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
20
|
+
export declare const zoomStyles: {
|
|
21
|
+
enter: string;
|
|
22
|
+
enterActive: string;
|
|
23
|
+
leaveActive: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const globalStyles = "\n .zoom-enter {\n transform: scale(0);\n }\n\n .zoom-enter-active {\n transform: scale(1);\n }\n\n .zoom-leave-active {\n transform: scale(0);\n }\n";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled from '@emotion/styled';
|
|
6
|
+
import { Row } from 'antd';
|
|
7
|
+
export var TableFooterWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: 8px;\n"], ["\n position: absolute;\n left: 8px;\n"])));
|
|
8
|
+
export var TableFooterTotal = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 14px;\n color: #666;\n"], ["\n font-size: 14px;\n color: #666;\n"])));
|
|
9
|
+
export var TableBatchDialog = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"], ["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"
|
|
10
|
+
// 包装 Row 组件的样式
|
|
11
|
+
])));
|
|
12
|
+
// 包装 Row 组件的样式
|
|
13
|
+
export var StyledRow = styled(Row)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"], ["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"])));
|
|
14
|
+
export var CloseButton = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-left: 20px;\n cursor: pointer;\n opacity: 0.5;\n transition: all 0.5s;\n\n &:hover {\n opacity: 1;\n }\n"], ["\n margin-left: 20px;\n cursor: pointer;\n opacity: 0.5;\n transition: all 0.5s;\n\n &:hover {\n opacity: 1;\n }\n"
|
|
15
|
+
// 动画样式 - 使用 CSS 类名
|
|
16
|
+
])));
|
|
17
|
+
// 动画样式 - 使用 CSS 类名
|
|
18
|
+
export var zoomStyles = {
|
|
19
|
+
enter: 'zoom-enter',
|
|
20
|
+
enterActive: 'zoom-enter-active',
|
|
21
|
+
leaveActive: 'zoom-leave-active'
|
|
22
|
+
};
|
|
23
|
+
// 全局样式注入
|
|
24
|
+
export var globalStyles = "\n .zoom-enter {\n transform: scale(0);\n }\n\n .zoom-enter-active {\n transform: scale(1);\n }\n\n .zoom-leave-active {\n transform: scale(0);\n }\n";
|
|
25
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -14,7 +14,7 @@ import { HolderOutlined } from '@ant-design/icons';
|
|
|
14
14
|
// import { message, IconFont } from 'xmirror-components'
|
|
15
15
|
import { message } from '../../AntdApp';
|
|
16
16
|
import IconFont from '../../IconFont';
|
|
17
|
-
import './
|
|
17
|
+
import { ColumnsSettingWrapper } from './styles';
|
|
18
18
|
function PopoverSetColumns(_a) {
|
|
19
19
|
var order = _a.order, visibleItems = _a.visibleItems, _b = _a.columns, columns = _b === void 0 ? [] : _b, onChangeOrder = _a.onChangeOrder, columnsVisible = _a.columnsVisible, columnsSort = _a.columnsSort, onChangeVisible = _a.onChangeVisible;
|
|
20
20
|
var dragged = useRef(null);
|
|
@@ -160,7 +160,7 @@ function PopoverSetColumns(_a) {
|
|
|
160
160
|
: null;
|
|
161
161
|
});
|
|
162
162
|
}, [order, visibleItems, columns, columnsSort, columnsVisible]);
|
|
163
|
-
return (React.createElement(Popover, { overlayClassName: "table-columns-setting-popover", content: React.createElement(
|
|
163
|
+
return (React.createElement(Popover, { overlayClassName: "table-columns-setting-popover", content: React.createElement(ColumnsSettingWrapper, { onDragOver: dragOver }, renderList), trigger: "click", align: {
|
|
164
164
|
offset: [-60, -14]
|
|
165
165
|
} },
|
|
166
166
|
React.createElement(IconFont, { type: "icon-setting", style: {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PopoverWrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const ColumnsSettingWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled from '@emotion/styled';
|
|
6
|
+
import { keyframes } from '@emotion/react';
|
|
7
|
+
var dragUpAnimation = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n margin-top: 0;\n }\n to {\n margin-top: 32px;\n }\n"], ["\n from {\n margin-top: 0;\n }\n to {\n margin-top: 32px;\n }\n"])));
|
|
8
|
+
var dragDownAnimation = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n from {\n margin-top: 32px;\n margin-bottom: 0;\n }\n to {\n margin-top: 0;\n margin-bottom: 32px;\n }\n"], ["\n from {\n margin-top: 32px;\n margin-bottom: 0;\n }\n to {\n margin-top: 0;\n margin-bottom: 32px;\n }\n"])));
|
|
9
|
+
export var PopoverWrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n .ant-popover-inner-content {\n max-height: 360px;\n padding: 0;\n overflow-y: auto;\n }\n"], ["\n .ant-popover-inner-content {\n max-height: 360px;\n padding: 0;\n overflow-y: auto;\n }\n"])));
|
|
10
|
+
export var ColumnsSettingWrapper = styled.ul(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 10px 0;\n\n .drag-up {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n .drag-down {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n li {\n width: 150px;\n padding: 5px 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: keep-all;\n white-space: nowrap;\n user-select: none;\n transition: background-color 0.5s;\n\n .icon-drag {\n margin-right: 10px;\n color: #999;\n cursor: move;\n }\n\n &[draggable=\"false\"] {\n .icon-drag {\n cursor: no-drop;\n opacity: 0.2;\n }\n }\n\n &:hover {\n background-color: #f0f0f0;\n }\n }\n"], ["\n padding: 10px 0;\n\n .drag-up {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n .drag-down {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n li {\n width: 150px;\n padding: 5px 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: keep-all;\n white-space: nowrap;\n user-select: none;\n transition: background-color 0.5s;\n\n .icon-drag {\n margin-right: 10px;\n color: #999;\n cursor: move;\n }\n\n &[draggable=\"false\"] {\n .icon-drag {\n cursor: no-drop;\n opacity: 0.2;\n }\n }\n\n &:hover {\n background-color: #f0f0f0;\n }\n }\n"])), dragUpAnimation, dragDownAnimation);
|
|
11
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AnyObject, TableComponentProps } from './types';
|
|
3
|
-
import './index.less';
|
|
4
3
|
declare const _default: React.ForwardRefExoticComponent<TableComponentProps<AnyObject> & React.RefAttributes<HTMLDivElement>>;
|
|
5
4
|
export default _default;
|
|
@@ -15,7 +15,7 @@ import { useLocalStorageState } from 'ahooks';
|
|
|
15
15
|
import { DownOutlined } from '@ant-design/icons';
|
|
16
16
|
import PopoverSetColumns from './PopoverSetColumns';
|
|
17
17
|
import Footer from './Footer';
|
|
18
|
-
import './
|
|
18
|
+
import { TableWrapper } from './styles';
|
|
19
19
|
function Index(props, ref) {
|
|
20
20
|
var _a = props.columns, columns = _a === void 0 ? [] : _a, columnsSort = props.columnsSort, columnsVisible = props.columnsVisible, _b = props.tableId, tableId = _b === void 0 ? '' : _b, pagination = props.pagination, dataSource = props.dataSource;
|
|
21
21
|
var pathname = location.pathname;
|
|
@@ -181,7 +181,7 @@ function Index(props, ref) {
|
|
|
181
181
|
useEffect(function () {
|
|
182
182
|
initColumnsSort();
|
|
183
183
|
}, []);
|
|
184
|
-
return (React.createElement(
|
|
184
|
+
return (React.createElement(TableWrapper, { ref: ref },
|
|
185
185
|
React.createElement(Table, __assign({ ref: tableRef, scroll: {
|
|
186
186
|
x: 900
|
|
187
187
|
} }, props, { pagination: paginationProps, columns: renderColumns }))));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled from '@emotion/styled';
|
|
6
|
+
export var TableWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n .ant-pagination-options {\n .ant-select {\n width: auto !important;\n }\n }\n"], ["\n position: relative;\n\n .ant-pagination-options {\n .ant-select {\n width: auto !important;\n }\n }\n"])));
|
|
7
|
+
var templateObject_1;
|
package/build/es/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export { default as SwitchValue } from './components/SwitchValue';
|
|
|
5
5
|
export { default as IconButton } from './components/IconButton';
|
|
6
6
|
export { default as GlobalLoading, setGlobalLoading } from './components/GlobalLoading';
|
|
7
7
|
export { default as ConfigProvider, ConfigContext } from './components/ConfigProvider';
|
|
8
|
+
export { default as Table } from './components/Table';
|
|
8
9
|
export { default as useRequest } from './hooks/useRequest';
|
package/build/es/index.js
CHANGED
|
@@ -5,4 +5,5 @@ export { default as SwitchValue } from './components/SwitchValue';
|
|
|
5
5
|
export { default as IconButton } from './components/IconButton';
|
|
6
6
|
export { default as GlobalLoading, setGlobalLoading } from './components/GlobalLoading';
|
|
7
7
|
export { default as ConfigProvider, ConfigContext } from './components/ConfigProvider';
|
|
8
|
+
export { default as Table } from './components/Table';
|
|
8
9
|
export { default as useRequest } from './hooks/useRequest';
|
|
@@ -38,7 +38,8 @@ var react_intl_1 = require("react-intl");
|
|
|
38
38
|
var antd_1 = require("antd");
|
|
39
39
|
var react_transition_group_1 = require("react-transition-group");
|
|
40
40
|
var icons_1 = require("@ant-design/icons");
|
|
41
|
-
require("
|
|
41
|
+
var react_2 = require("@emotion/react");
|
|
42
|
+
var styles_1 = require("./styles");
|
|
42
43
|
function Index(props) {
|
|
43
44
|
var _a;
|
|
44
45
|
var transitionNodeRef = (0, react_1.useRef)(null);
|
|
@@ -102,20 +103,22 @@ function Index(props) {
|
|
|
102
103
|
var selectedRowKeys = (_a = rowSelection.selectedRowKeys) !== null && _a !== void 0 ? _a : [];
|
|
103
104
|
return !!(selectedRowKeys.length > 0 && selectedRowKeys.length === optionalNum);
|
|
104
105
|
}, [rowSelection.selectedRowKeys, optionalNum]);
|
|
105
|
-
return (react_1.default.createElement(
|
|
106
|
-
react_1.default.createElement(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
react_1.default.createElement(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
107
|
+
react_1.default.createElement(react_2.Global, { styles: styles_1.globalStyles }),
|
|
108
|
+
react_1.default.createElement(styles_1.TableFooterWrapper, null,
|
|
109
|
+
react_1.default.createElement(react_transition_group_1.CSSTransition, { in: Boolean(props.rowSelection && props.selectionPopover && (checked || indeterminate)), nodeRef: transitionNodeRef, classNames: styles_1.zoomStyles, unmountOnExit: true, timeout: 300 }, function () {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
return (react_1.default.createElement(styles_1.StyledRow, { ref: transitionNodeRef, justify: "space-between" },
|
|
112
|
+
react_1.default.createElement(antd_1.Col, { style: { display: 'flex', alignItems: 'center' } },
|
|
113
|
+
react_1.default.createElement(antd_1.Checkbox, { checked: checked, indeterminate: indeterminate, onChange: changeCheckAll },
|
|
114
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "component.table.selected", defaultMessage: '已选{length}条', values: {
|
|
115
|
+
length: (_b = (_a = rowSelection.selectedRowKeys) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0
|
|
116
|
+
} }))),
|
|
117
|
+
react_1.default.createElement(antd_1.Col, { style: { display: 'flex', alignItems: 'center' } },
|
|
118
|
+
selectionPopover,
|
|
119
|
+
react_1.default.createElement(styles_1.CloseButton, { onClick: function () { changeCheckAll({ target: { checked: false } }); } },
|
|
120
|
+
react_1.default.createElement(icons_1.CloseOutlined, null)))));
|
|
121
|
+
}),
|
|
122
|
+
pagination && (react_1.default.createElement(styles_1.TableFooterTotal, null, pagination.showTotal ? pagination.showTotal((_a = pagination.total) !== null && _a !== void 0 ? _a : 0, [0, 0]) : null)))));
|
|
120
123
|
}
|
|
121
124
|
exports.default = Index;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.globalStyles = exports.zoomStyles = exports.CloseButton = exports.StyledRow = exports.TableBatchDialog = exports.TableFooterTotal = exports.TableFooterWrapper = void 0;
|
|
11
|
+
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
12
|
+
var antd_1 = require("antd");
|
|
13
|
+
exports.TableFooterWrapper = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: 8px;\n"], ["\n position: absolute;\n left: 8px;\n"])));
|
|
14
|
+
exports.TableFooterTotal = styled_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 14px;\n color: #666;\n"], ["\n font-size: 14px;\n color: #666;\n"])));
|
|
15
|
+
exports.TableBatchDialog = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"], ["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"
|
|
16
|
+
// 包装 Row 组件的样式
|
|
17
|
+
])));
|
|
18
|
+
// 包装 Row 组件的样式
|
|
19
|
+
exports.StyledRow = (0, styled_1.default)(antd_1.Row)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"], ["\n position: fixed;\n right: 0;\n bottom: 30px;\n left: 0;\n z-index: 9;\n width: 600px;\n padding: 15px 20px;\n margin: auto;\n color: #fff;\n background-color: #666;\n border-radius: 5px;\n transition: all 0.5s;\n\n .ant-checkbox-wrapper {\n margin-right: 10px;\n color: #fff;\n\n .ant-checkbox-indeterminate .ant-checkbox-inner {\n background-color: transparent;\n border-color: #d9d9d9;\n }\n }\n"])));
|
|
20
|
+
exports.CloseButton = styled_1.default.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-left: 20px;\n cursor: pointer;\n opacity: 0.5;\n transition: all 0.5s;\n\n &:hover {\n opacity: 1;\n }\n"], ["\n margin-left: 20px;\n cursor: pointer;\n opacity: 0.5;\n transition: all 0.5s;\n\n &:hover {\n opacity: 1;\n }\n"
|
|
21
|
+
// 动画样式 - 使用 CSS 类名
|
|
22
|
+
])));
|
|
23
|
+
// 动画样式 - 使用 CSS 类名
|
|
24
|
+
exports.zoomStyles = {
|
|
25
|
+
enter: 'zoom-enter',
|
|
26
|
+
enterActive: 'zoom-enter-active',
|
|
27
|
+
leaveActive: 'zoom-leave-active'
|
|
28
|
+
};
|
|
29
|
+
// 全局样式注入
|
|
30
|
+
exports.globalStyles = "\n .zoom-enter {\n transform: scale(0);\n }\n\n .zoom-enter-active {\n transform: scale(1);\n }\n\n .zoom-leave-active {\n transform: scale(0);\n }\n";
|
|
31
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -52,7 +52,7 @@ var icons_1 = require("@ant-design/icons");
|
|
|
52
52
|
// import { message, IconFont } from 'xmirror-components'
|
|
53
53
|
var AntdApp_1 = require("../../AntdApp");
|
|
54
54
|
var IconFont_1 = __importDefault(require("../../IconFont"));
|
|
55
|
-
require("./
|
|
55
|
+
var styles_1 = require("./styles");
|
|
56
56
|
function PopoverSetColumns(_a) {
|
|
57
57
|
var order = _a.order, visibleItems = _a.visibleItems, _b = _a.columns, columns = _b === void 0 ? [] : _b, onChangeOrder = _a.onChangeOrder, columnsVisible = _a.columnsVisible, columnsSort = _a.columnsSort, onChangeVisible = _a.onChangeVisible;
|
|
58
58
|
var dragged = (0, react_1.useRef)(null);
|
|
@@ -198,7 +198,7 @@ function PopoverSetColumns(_a) {
|
|
|
198
198
|
: null;
|
|
199
199
|
});
|
|
200
200
|
}, [order, visibleItems, columns, columnsSort, columnsVisible]);
|
|
201
|
-
return (react_1.default.createElement(antd_1.Popover, { overlayClassName: "table-columns-setting-popover", content: react_1.default.createElement(
|
|
201
|
+
return (react_1.default.createElement(antd_1.Popover, { overlayClassName: "table-columns-setting-popover", content: react_1.default.createElement(styles_1.ColumnsSettingWrapper, { onDragOver: dragOver }, renderList), trigger: "click", align: {
|
|
202
202
|
offset: [-60, -14]
|
|
203
203
|
} },
|
|
204
204
|
react_1.default.createElement(IconFont_1.default, { type: "icon-setting", style: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ColumnsSettingWrapper = exports.PopoverWrapper = void 0;
|
|
11
|
+
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
12
|
+
var react_1 = require("@emotion/react");
|
|
13
|
+
var dragUpAnimation = (0, react_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n margin-top: 0;\n }\n to {\n margin-top: 32px;\n }\n"], ["\n from {\n margin-top: 0;\n }\n to {\n margin-top: 32px;\n }\n"])));
|
|
14
|
+
var dragDownAnimation = (0, react_1.keyframes)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n from {\n margin-top: 32px;\n margin-bottom: 0;\n }\n to {\n margin-top: 0;\n margin-bottom: 32px;\n }\n"], ["\n from {\n margin-top: 32px;\n margin-bottom: 0;\n }\n to {\n margin-top: 0;\n margin-bottom: 32px;\n }\n"])));
|
|
15
|
+
exports.PopoverWrapper = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n .ant-popover-inner-content {\n max-height: 360px;\n padding: 0;\n overflow-y: auto;\n }\n"], ["\n .ant-popover-inner-content {\n max-height: 360px;\n padding: 0;\n overflow-y: auto;\n }\n"])));
|
|
16
|
+
exports.ColumnsSettingWrapper = styled_1.default.ul(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 10px 0;\n\n .drag-up {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n .drag-down {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n li {\n width: 150px;\n padding: 5px 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: keep-all;\n white-space: nowrap;\n user-select: none;\n transition: background-color 0.5s;\n\n .icon-drag {\n margin-right: 10px;\n color: #999;\n cursor: move;\n }\n\n &[draggable=\"false\"] {\n .icon-drag {\n cursor: no-drop;\n opacity: 0.2;\n }\n }\n\n &:hover {\n background-color: #f0f0f0;\n }\n }\n"], ["\n padding: 10px 0;\n\n .drag-up {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n .drag-down {\n border: solid 2px #ccc;\n animation: ", " ease 0.2s 1;\n animation-fill-mode: forwards;\n }\n\n li {\n width: 150px;\n padding: 5px 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: keep-all;\n white-space: nowrap;\n user-select: none;\n transition: background-color 0.5s;\n\n .icon-drag {\n margin-right: 10px;\n color: #999;\n cursor: move;\n }\n\n &[draggable=\"false\"] {\n .icon-drag {\n cursor: no-drop;\n opacity: 0.2;\n }\n }\n\n &:hover {\n background-color: #f0f0f0;\n }\n }\n"])), dragUpAnimation, dragDownAnimation);
|
|
17
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -53,7 +53,7 @@ var ahooks_1 = require("ahooks");
|
|
|
53
53
|
var icons_1 = require("@ant-design/icons");
|
|
54
54
|
var PopoverSetColumns_1 = __importDefault(require("./PopoverSetColumns"));
|
|
55
55
|
var Footer_1 = __importDefault(require("./Footer"));
|
|
56
|
-
require("./
|
|
56
|
+
var styles_1 = require("./styles");
|
|
57
57
|
function Index(props, ref) {
|
|
58
58
|
var _a = props.columns, columns = _a === void 0 ? [] : _a, columnsSort = props.columnsSort, columnsVisible = props.columnsVisible, _b = props.tableId, tableId = _b === void 0 ? '' : _b, pagination = props.pagination, dataSource = props.dataSource;
|
|
59
59
|
var pathname = location.pathname;
|
|
@@ -219,7 +219,7 @@ function Index(props, ref) {
|
|
|
219
219
|
(0, react_1.useEffect)(function () {
|
|
220
220
|
initColumnsSort();
|
|
221
221
|
}, []);
|
|
222
|
-
return (react_1.default.createElement(
|
|
222
|
+
return (react_1.default.createElement(styles_1.TableWrapper, { ref: ref },
|
|
223
223
|
react_1.default.createElement(antd_1.Table, __assign({ ref: tableRef, scroll: {
|
|
224
224
|
x: 900
|
|
225
225
|
} }, props, { pagination: paginationProps, columns: renderColumns }))));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TableWrapper = void 0;
|
|
11
|
+
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
12
|
+
exports.TableWrapper = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n .ant-pagination-options {\n .ant-select {\n width: auto !important;\n }\n }\n"], ["\n position: relative;\n\n .ant-pagination-options {\n .ant-select {\n width: auto !important;\n }\n }\n"])));
|
|
13
|
+
var templateObject_1;
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { AnyObject } from 'antd/es/_util/type';
|
|
1
2
|
import { AppProps } from 'antd';
|
|
2
3
|
import { Checkbox } from 'antd';
|
|
3
4
|
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
5
|
+
import { ColumnTitleProps } from 'antd/es/table/interface';
|
|
4
6
|
import { default as default_2 } from 'react';
|
|
5
7
|
import { MessageInstance } from 'antd/es/message/interface';
|
|
6
8
|
import { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
@@ -10,6 +12,8 @@ import { Plugin as Plugin_2 } from 'ahooks/lib/useRequest/src/types';
|
|
|
10
12
|
import { Result } from 'ahooks/lib/useRequest/src/types';
|
|
11
13
|
import { Service } from 'ahooks/lib/useRequest/src/types';
|
|
12
14
|
import { SwitchProps } from 'antd/es/switch';
|
|
15
|
+
import { TableColumnType } from 'antd';
|
|
16
|
+
import { TableProps } from 'antd';
|
|
13
17
|
|
|
14
18
|
export declare function App({ children, config, ...props }: AppProps & {
|
|
15
19
|
config?: ConfigProviderConfigProps;
|
|
@@ -77,6 +81,40 @@ declare interface CheckboxValueProps<T = any, F = any> extends Omit<default_2.Co
|
|
|
77
81
|
children?: default_2.ReactNode;
|
|
78
82
|
}
|
|
79
83
|
|
|
84
|
+
declare interface ColumnGroupType<RecordType = AnyObject> extends Omit<ColumnType<RecordType>, 'dataIndex'> {
|
|
85
|
+
children: TableComponentProps<RecordType>['columns'];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare interface ColumnType<RecordType> extends Omit<TableColumnType<RecordType>, 'title' | 'fixed'> {
|
|
89
|
+
/**
|
|
90
|
+
* 控制该字段是否支持排序,列表 columnsSort 为 true 时有效
|
|
91
|
+
* (columnSortDisabled,尽量只给首尾字段加,中间的字段加了用处不大)
|
|
92
|
+
*/
|
|
93
|
+
columnSortDisabled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 控制是否支持字段的显示隐藏功能
|
|
96
|
+
*/
|
|
97
|
+
columnVisibleDisabled?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 字段的显示隐藏属性
|
|
100
|
+
*/
|
|
101
|
+
columnVisible?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 字段id
|
|
104
|
+
*/
|
|
105
|
+
dataIndex: string | string[];
|
|
106
|
+
/**
|
|
107
|
+
* 字段id
|
|
108
|
+
*/
|
|
109
|
+
fixed?: 'left' | 'right' | boolean | string;
|
|
110
|
+
/**
|
|
111
|
+
* 标题
|
|
112
|
+
*/
|
|
113
|
+
title?: default_2.ReactNode | ((props: ColumnTitleProps<RecordType>) => default_2.ReactNode);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare type ColumnTypes<RecordType = AnyObject> = ColumnType<RecordType> | ColumnGroupType<RecordType>;
|
|
117
|
+
|
|
80
118
|
export declare const ConfigContext: default_2.Context<ConfigContextProps>;
|
|
81
119
|
|
|
82
120
|
declare interface ConfigContextProps {
|
|
@@ -208,6 +246,31 @@ declare interface SwitchValueProps<T = boolean | string | number, F = boolean |
|
|
|
208
246
|
onChange?: (value: T | F, event: default_2.MouseEvent<HTMLButtonElement> | default_2.KeyboardEvent<HTMLButtonElement>) => void;
|
|
209
247
|
}
|
|
210
248
|
|
|
249
|
+
export declare const Table: default_2.ForwardRefExoticComponent<TableComponentProps<AnyObject> & default_2.RefAttributes<HTMLDivElement>>;
|
|
250
|
+
|
|
251
|
+
declare interface TableComponentProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
|
|
252
|
+
/**
|
|
253
|
+
* 列表项
|
|
254
|
+
*/
|
|
255
|
+
columns?: Array<ColumnTypes<RecordType>>;
|
|
256
|
+
/**
|
|
257
|
+
* 是否打开列表字段排序功能
|
|
258
|
+
*/
|
|
259
|
+
columnsSort?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* 是否打开列表字段的显示隐藏属性
|
|
262
|
+
*/
|
|
263
|
+
columnsVisible?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* 列表唯一值,用来处理一个页面多个列表且同时开启字段排序或字段隐藏功能
|
|
266
|
+
*/
|
|
267
|
+
tableId?: string;
|
|
268
|
+
/**
|
|
269
|
+
* 中间的批量操作弹出层
|
|
270
|
+
*/
|
|
271
|
+
selectionPopover?: default_2.ReactNode;
|
|
272
|
+
}
|
|
273
|
+
|
|
211
274
|
export declare function useRequest<TData, TParams extends unknown[]>(service: Service<TData, TParams>, options?: Options<TData, TParams>, plugins?: Array<Plugin_2<TData, TParams>>): WrappedResult<TData, TParams>;
|
|
212
275
|
|
|
213
276
|
declare interface WrappedResult<TData, TParams extends unknown[]> extends Omit<Result<TData, TParams>, 'data'> {
|
package/build/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useRequest = exports.ConfigContext = exports.ConfigProvider = exports.setGlobalLoading = exports.GlobalLoading = exports.IconButton = exports.SwitchValue = exports.CheckboxValue = exports.IconFont = exports.modal = exports.notification = exports.message = exports.App = void 0;
|
|
6
|
+
exports.useRequest = exports.Table = exports.ConfigContext = exports.ConfigProvider = exports.setGlobalLoading = exports.GlobalLoading = exports.IconButton = exports.SwitchValue = exports.CheckboxValue = exports.IconFont = exports.modal = exports.notification = exports.message = exports.App = void 0;
|
|
7
7
|
var AntdApp_1 = require("./components/AntdApp");
|
|
8
8
|
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return __importDefault(AntdApp_1).default; } });
|
|
9
9
|
Object.defineProperty(exports, "message", { enumerable: true, get: function () { return AntdApp_1.message; } });
|
|
@@ -23,5 +23,7 @@ Object.defineProperty(exports, "setGlobalLoading", { enumerable: true, get: func
|
|
|
23
23
|
var ConfigProvider_1 = require("./components/ConfigProvider");
|
|
24
24
|
Object.defineProperty(exports, "ConfigProvider", { enumerable: true, get: function () { return __importDefault(ConfigProvider_1).default; } });
|
|
25
25
|
Object.defineProperty(exports, "ConfigContext", { enumerable: true, get: function () { return ConfigProvider_1.ConfigContext; } });
|
|
26
|
+
var Table_1 = require("./components/Table");
|
|
27
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return __importDefault(Table_1).default; } });
|
|
26
28
|
var useRequest_1 = require("./hooks/useRequest");
|
|
27
29
|
Object.defineProperty(exports, "useRequest", { enumerable: true, get: function () { return __importDefault(useRequest_1).default; } });
|
package/build/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const TableFooterWrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const TableFooterTotal: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
9
|
+
export declare const TableBatchDialog: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const StyledRow: import("@emotion/styled").StyledComponent<import("antd").RowProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
14
|
+
theme?: import("@emotion/react").Theme;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export declare const CloseButton: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme;
|
|
18
|
+
as?: React.ElementType;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
20
|
+
export declare const zoomStyles: {
|
|
21
|
+
enter: string;
|
|
22
|
+
enterActive: string;
|
|
23
|
+
leaveActive: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const globalStyles = "\n .zoom-enter {\n transform: scale(0);\n }\n\n .zoom-enter-active {\n transform: scale(1);\n }\n\n .zoom-leave-active {\n transform: scale(0);\n }\n";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PopoverWrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const ColumnsSettingWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AnyObject, TableComponentProps } from './types';
|
|
3
|
-
import './index.less';
|
|
4
3
|
declare const _default: React.ForwardRefExoticComponent<TableComponentProps<AnyObject> & React.RefAttributes<HTMLDivElement>>;
|
|
5
4
|
export default _default;
|
package/build/types/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export { default as SwitchValue } from './components/SwitchValue';
|
|
|
5
5
|
export { default as IconButton } from './components/IconButton';
|
|
6
6
|
export { default as GlobalLoading, setGlobalLoading } from './components/GlobalLoading';
|
|
7
7
|
export { default as ConfigProvider, ConfigContext } from './components/ConfigProvider';
|
|
8
|
+
export { default as Table } from './components/Table';
|
|
8
9
|
export { default as useRequest } from './hooks/useRequest';
|