@pdg/react-table 1.0.127 → 1.0.128
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/Table/Table.types.d.ts +10 -2
- package/dist/TableContext/TableContext.types.d.ts +2 -2
- package/dist/TableSortableBody/TableSortableBody.d.ts +4 -0
- package/dist/TableSortableBody/TableSortableBody.types.d.ts +8 -0
- package/dist/TableSortableBody/index.d.ts +4 -0
- package/dist/TableSortableBodyBlock/TableSortableBodyBlock.d.ts +4 -0
- package/dist/TableSortableBodyBlock/TableSortableBodyBlock.types.d.ts +4 -0
- package/dist/TableSortableBodyBlock/index.d.ts +4 -0
- package/dist/index.esm.js +387 -302
- package/dist/index.js +387 -302
- package/package.json +1 -1
|
@@ -9,6 +9,14 @@ import { TableTopHeadProps } from '../TableTopHead';
|
|
|
9
9
|
export interface TableItem {
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}
|
|
12
|
+
/********************************************************************************************************************
|
|
13
|
+
* TableProgressiveVisibleInfo
|
|
14
|
+
* ******************************************************************************************************************/
|
|
15
|
+
export interface TableProgressiveVisibleInfo {
|
|
16
|
+
blockSize: number;
|
|
17
|
+
rowHeight: number;
|
|
18
|
+
delay?: number;
|
|
19
|
+
}
|
|
12
20
|
/********************************************************************************************************************
|
|
13
21
|
* TableColumn
|
|
14
22
|
* ******************************************************************************************************************/
|
|
@@ -66,7 +74,7 @@ export interface TableColumn<T = TableItem> {
|
|
|
66
74
|
onGetSx?(item: T, index: number): TableCommonSxProps['sx'];
|
|
67
75
|
onHide?(item: T, index: number): boolean;
|
|
68
76
|
onGetTooltip?(item: T, index: number): ReactNode;
|
|
69
|
-
onRender?(item: T, index: number
|
|
77
|
+
onRender?(item: T, index: number): ReactNode;
|
|
70
78
|
onClick?(item: T, index: number): void;
|
|
71
79
|
onInitChecked?(item: T): boolean;
|
|
72
80
|
onCheckDisabled?(item: T): boolean;
|
|
@@ -94,7 +102,6 @@ export interface TableProps<T = TableItem> extends TableCommonSxProps {
|
|
|
94
102
|
showOddColor?: boolean;
|
|
95
103
|
showEvenColor?: boolean;
|
|
96
104
|
cellPadding?: string | number;
|
|
97
|
-
inViewRender?: boolean;
|
|
98
105
|
footer?: boolean;
|
|
99
106
|
noData?: ReactNode;
|
|
100
107
|
pagination?: {
|
|
@@ -102,6 +109,7 @@ export interface TableProps<T = TableItem> extends TableCommonSxProps {
|
|
|
102
109
|
style?: TableCommonSxProps['style'];
|
|
103
110
|
sx?: TableCommonSxProps['sx'];
|
|
104
111
|
};
|
|
112
|
+
progressiveVisible?: TableProgressiveVisibleInfo;
|
|
105
113
|
sortable?: boolean;
|
|
106
114
|
onClick?(item: T, index: number): void;
|
|
107
115
|
onGetBodyRowClassName?(item: T, index: number): TableCommonSxProps['className'] | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TableColumn, TableItem } from '../Table';
|
|
1
|
+
import { TableColumn, TableItem, TableProgressiveVisibleInfo } from '../Table';
|
|
2
2
|
import { TableBodyCellCommands } from '../TableBodyCell';
|
|
3
3
|
import { TableHeadCellCommands } from '../TableHeadCell';
|
|
4
4
|
export interface TableContextValue {
|
|
5
5
|
menuOpen: boolean;
|
|
6
6
|
openMenuId?: string;
|
|
7
|
-
|
|
7
|
+
progressiveVisible?: TableProgressiveVisibleInfo;
|
|
8
8
|
setMenuOpen(menuOpen: boolean, openMenuId?: string): void;
|
|
9
9
|
setItemColumnChecked(item: TableItem, column: TableColumn, checked: boolean): void;
|
|
10
10
|
setItemColumnCheckDisabled(item: TableItem, column: TableColumn, checkDisabled: boolean): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableSortableBodyProps as Props } from './TableSortableBody.types';
|
|
3
|
+
export declare const TableSortableBody: ({ items, columns, showOddColor, showEvenColor, onGetBodyRowStyle, onGetBodyRowSx, onGetBodyRowClassName, onGetBodyColumnClassName, onGetBodyColumnStyle, onGetBodyColumnSx, defaultAlign, defaultEllipsis, sortable, onClick, onCheckChange, }: Props) => React.JSX.Element;
|
|
4
|
+
export default TableSortableBody;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TableColumn, TableItem, TableProps } from '../Table/Table.types';
|
|
2
|
+
import { TableBodyRowProps } from '../TableBodyRow';
|
|
3
|
+
export interface TableSortableBodyProps extends Pick<TableProps, 'showOddColor' | 'showEvenColor' | 'onGetBodyRowSx' | 'onGetBodyRowClassName' | 'onGetBodyRowStyle' | 'onGetBodyColumnClassName' | 'onGetBodyColumnSx' | 'onGetBodyColumnStyle' | 'defaultAlign' | 'defaultEllipsis' | 'sortable' | 'onClick'>, Pick<TableBodyRowProps, 'onCheckChange'> {
|
|
4
|
+
items: (TableItem & {
|
|
5
|
+
id: number | string;
|
|
6
|
+
})[];
|
|
7
|
+
columns: TableColumn[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableSortableBodyBlockProps as Props } from './TableSortableBodyBlock.types';
|
|
3
|
+
export declare const TableSortableBodyBlock: ({ items, baseIndex, columns, showOddColor, showEvenColor, onGetBodyRowStyle, onGetBodyRowSx, onGetBodyRowClassName, onGetBodyColumnClassName, onGetBodyColumnStyle, onGetBodyColumnSx, defaultAlign, defaultEllipsis, sortable, onClick, onCheckChange, }: Props) => React.JSX.Element;
|
|
4
|
+
export default TableSortableBodyBlock;
|