gantri-components 3.0.0-beta.20 → 3.0.0-beta.22
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/components/table/components/custom-columns-wrapper/custom-columns-wrapper.d.ts +1 -1
- package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.styles.d.ts +0 -1
- package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.types.d.ts +5 -5
- package/dist/components/table/components/table-header/table-header.types.d.ts +3 -0
- package/dist/components/table/table.types.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
2
|
import { CustomColumnsWrapperProps } from './custom-columns-wrapper.types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const CustomColumnsToggle: <TData extends RowData<{
|
|
4
4
|
[key: string]: unknown;
|
|
5
5
|
id?: string | number | undefined;
|
|
6
6
|
subRows?: any[] | undefined;
|
package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.styles.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const StyledTableContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
1
|
export declare const StyledToggleWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
2
|
isScrolling: boolean;
|
|
4
3
|
}, never>;
|
package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.types.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { RowData, Table } from '@tanstack/react-table';
|
|
2
|
-
|
|
2
|
+
export interface CustomColumnsWrapperProps<TData extends RowData> {
|
|
3
|
+
customColumns: CustomColumnsProps<TData> | undefined;
|
|
4
|
+
isScrolling: boolean;
|
|
5
|
+
table: Table<TData>;
|
|
6
|
+
}
|
|
3
7
|
export interface CustomColumnsProps<TData extends RowData> {
|
|
4
8
|
disabledColumns: (keyof TData | string)[];
|
|
5
9
|
hiddenColumns: (keyof TData | string)[];
|
|
@@ -12,7 +16,3 @@ export interface CustomColumnOption {
|
|
|
12
16
|
onChange: (event: unknown) => void;
|
|
13
17
|
value: string;
|
|
14
18
|
}
|
|
15
|
-
export type CustomColumnsWrapperProps<TData extends RowData> = PropsWithChildren<{
|
|
16
|
-
customColumns: CustomColumnsProps<TData> | undefined;
|
|
17
|
-
table: Table<TData>;
|
|
18
|
-
}>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { RowData, Table } from '@tanstack/react-table';
|
|
2
2
|
import { GetHeaderCellProps, ReorderingProps } from '../../table.types';
|
|
3
|
+
import { CustomColumnsProps } from '../custom-columns-wrapper/custom-columns-wrapper.types';
|
|
3
4
|
export type TableHeaderProps<TData extends RowData> = {
|
|
5
|
+
customColumns: CustomColumnsProps<TData> | undefined;
|
|
4
6
|
getHeaderCellProps: GetHeaderCellProps<TData> | undefined;
|
|
7
|
+
isScrolling: boolean;
|
|
5
8
|
reordering: ReorderingProps<TData> | undefined;
|
|
6
9
|
table: Table<TData>;
|
|
7
10
|
};
|
|
@@ -19,6 +19,7 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
19
19
|
className?: string;
|
|
20
20
|
columns: ColumnDef<TData, any>[];
|
|
21
21
|
customAction?: CustomActionProps<TData>;
|
|
22
|
+
/** Providing this will automatically make the last column sticky. */
|
|
22
23
|
customColumns?: CustomColumnsProps<TData>;
|
|
23
24
|
/**
|
|
24
25
|
* For each index, if no `id` key exists, one will be assigned.
|
|
@@ -43,6 +44,7 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
43
44
|
export interface TableDefaultProps {
|
|
44
45
|
stickyFirstColumn: boolean;
|
|
45
46
|
stickyFooter: boolean;
|
|
47
|
+
/** Providing `customColumns` will automatically make the last column sticky. */
|
|
46
48
|
stickyLastColumn: boolean;
|
|
47
49
|
}
|
|
48
50
|
export type GetHeaderCellProps<TData extends RowData, TValue = unknown> = (cell?: Header<TData, TValue>) => CustomCellProps;
|