jattac.libs.web.responsive-table 0.3.3 → 0.3.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,25 +1,27 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type SortDirection = 'asc' | 'desc';
|
|
3
|
-
|
|
3
|
+
interface IResponsiveTableColumnDefinitionBase<TData> {
|
|
4
4
|
displayLabel: ReactNode;
|
|
5
5
|
cellRenderer: (data: TData) => ReactNode;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
columnId?: string;
|
|
6
|
+
dataKey?: keyof TData;
|
|
7
|
+
getFilterableValue?: (data: TData) => string | number;
|
|
10
8
|
interactivity?: {
|
|
11
9
|
id: string;
|
|
12
10
|
onHeaderClick?: (id: string) => void;
|
|
13
11
|
className?: string;
|
|
14
12
|
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
getSortableValue
|
|
19
|
-
sortComparer?:
|
|
13
|
+
}
|
|
14
|
+
export type IResponsiveTableColumnDefinition<TData> = IResponsiveTableColumnDefinitionBase<TData> & ({
|
|
15
|
+
columnId: string;
|
|
16
|
+
getSortableValue: (row: TData) => string | number;
|
|
17
|
+
sortComparer?: never;
|
|
20
18
|
} | {
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
columnId: string;
|
|
20
|
+
sortComparer: (a: TData, b: TData, direction: SortDirection) => number;
|
|
21
|
+
getSortableValue?: never;
|
|
22
|
+
} | {
|
|
23
|
+
columnId?: string;
|
|
23
24
|
getSortableValue?: never;
|
|
24
25
|
sortComparer?: never;
|
|
25
26
|
});
|
|
27
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jattac.libs.web.responsive-table",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "A fully responsive, customizable, and lightweight React table component with a modern, mobile-first design and a powerful plugin system.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.es.js",
|