ab-ui-library 1.2.3 → 1.2.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TTableProps } from './types';
|
|
2
|
-
export declare function Table<TData>({ data, columns, isLoading, hasError, totalCount, emptyTitle, emptySubTitle, emptyIllustration, withSelect, withBorder,
|
|
2
|
+
export declare function Table<TData>({ data, columns, isLoading, hasError, totalCount, emptyTitle, emptySubTitle, emptyIllustration, withSelect, withBorder, defaultPageIndex, defaultPageSize, renderHeader, renderFooter, onSortChange, onRowClick, onRowSelection, onColumnSizing, onPaginationChange }: TTableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -63,11 +63,8 @@ function Table(_ref) {
|
|
|
63
63
|
withSelect = _ref$withSelect === void 0 ? false : _ref$withSelect,
|
|
64
64
|
_ref$withBorder = _ref.withBorder,
|
|
65
65
|
withBorder = _ref$withBorder === void 0 ? true : _ref$withBorder,
|
|
66
|
-
reloadButtonText = _ref.reloadButtonText,
|
|
67
|
-
reloadButtonIcon = _ref.reloadButtonIcon,
|
|
68
66
|
defaultPageIndex = _ref.defaultPageIndex,
|
|
69
67
|
defaultPageSize = _ref.defaultPageSize,
|
|
70
|
-
reloadAction = _ref.reloadAction,
|
|
71
68
|
renderHeader = _ref.renderHeader,
|
|
72
69
|
renderFooter = _ref.renderFooter,
|
|
73
70
|
onSortChange = _ref.onSortChange,
|
|
@@ -127,18 +124,10 @@ function Table(_ref) {
|
|
|
127
124
|
style: {
|
|
128
125
|
minWidth: (data === null || data === void 0 ? void 0 : data.length) && table.getCenterTotalSize()
|
|
129
126
|
}
|
|
130
|
-
}, !(data !== null && data !== void 0 && data.length)
|
|
131
|
-
mainMessage: emptyTitle,
|
|
132
|
-
illustration: emptyIllustration
|
|
133
|
-
}) : hasError ? /*#__PURE__*/React.createElement(Empty, {
|
|
127
|
+
}, !(data !== null && data !== void 0 && data.length) || hasError ? /*#__PURE__*/React.createElement(Empty, {
|
|
134
128
|
mainMessage: emptyTitle,
|
|
135
129
|
paragraphMessage: emptySubTitle,
|
|
136
|
-
illustration: emptyIllustration
|
|
137
|
-
buttonProps: {
|
|
138
|
-
buttonText: reloadButtonText,
|
|
139
|
-
iconProps: reloadButtonIcon,
|
|
140
|
-
onClick: reloadAction
|
|
141
|
-
}
|
|
130
|
+
illustration: emptyIllustration
|
|
142
131
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("thead", {
|
|
143
132
|
className: "advanced-table__thead"
|
|
144
133
|
}, table.getHeaderGroups().map(function (headerGroup) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ColumnDef, ColumnSizingState, PaginationState, RowSelectionState, Table, Row } from '@tanstack/react-table';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import type { TSVGIconType } from '../SVGIcons/types';
|
|
4
3
|
export type TTable<TData> = Table<TData>;
|
|
5
4
|
export type TRowSelectionState = RowSelectionState;
|
|
6
5
|
export type TColumnSizingState = ColumnSizingState;
|
|
@@ -15,14 +14,6 @@ export type TTableProps<TData> = {
|
|
|
15
14
|
emptyTitle?: string;
|
|
16
15
|
emptySubTitle?: string;
|
|
17
16
|
emptyIllustration?: string;
|
|
18
|
-
reloadAction?: () => void;
|
|
19
|
-
reloadButtonText?: string;
|
|
20
|
-
reloadButtonIcon?: {
|
|
21
|
-
size?: TIconSize;
|
|
22
|
-
type?: TSVGIconType;
|
|
23
|
-
alignment?: string;
|
|
24
|
-
Component?: TSVGIconComponent;
|
|
25
|
-
};
|
|
26
17
|
className?: string;
|
|
27
18
|
withSelect?: boolean;
|
|
28
19
|
withBorder?: boolean;
|