gantri-components 3.0.0-beta.50 → 3.0.0-beta.51
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-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.types.d.ts +2 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.types.d.ts +2 -0
- package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.types.d.ts +2 -0
- package/dist/components/table/components/table-header/table-header.types.d.ts +2 -1
- package/dist/components/table/table.types.d.ts +4 -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,8 +1,10 @@
|
|
|
1
1
|
import { CustomColumnOption } from '../../../../custom-columns-toggle.types';
|
|
2
|
+
import { SyncState } from '../../../../../../table.types';
|
|
2
3
|
export interface UserPreferencesModalProps {
|
|
3
4
|
activeIndex: number;
|
|
4
5
|
checklistOptions: CustomColumnOption[];
|
|
5
6
|
onClose: () => Promise<void>;
|
|
6
7
|
onReset: () => Promise<void>;
|
|
8
|
+
syncState?: SyncState;
|
|
7
9
|
title: string;
|
|
8
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { CustomColumnOption } from '../../custom-columns-toggle.types';
|
|
3
|
+
import { SyncState } from '../../../../table.types';
|
|
3
4
|
export interface UserPreferencesToggleProps {
|
|
4
5
|
activeIndex: number;
|
|
5
6
|
checklistOptions: CustomColumnOption[];
|
|
@@ -7,4 +8,5 @@ export interface UserPreferencesToggleProps {
|
|
|
7
8
|
modalHeading: string;
|
|
8
9
|
onReset: () => Promise<void>;
|
|
9
10
|
setIsActive: Dispatch<SetStateAction<boolean>>;
|
|
11
|
+
syncState?: SyncState;
|
|
10
12
|
}
|
package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.types.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { RowData, Table } from '@tanstack/react-table';
|
|
2
2
|
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { SyncState } from '../../table.types';
|
|
3
4
|
export interface CustomColumnsWrapperProps<TData extends RowData> {
|
|
4
5
|
isActive: boolean;
|
|
5
6
|
isScrolling: boolean;
|
|
6
7
|
setIsActive: Dispatch<SetStateAction<boolean>>;
|
|
8
|
+
syncState?: SyncState;
|
|
7
9
|
table: Table<TData>;
|
|
8
10
|
}
|
|
9
11
|
export interface CustomColumnsProps<TData extends RowData> {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RowData, Table } from '@tanstack/react-table';
|
|
2
|
-
import { GetHeaderCellProps, RowReorderingProps } from '../../table.types';
|
|
2
|
+
import { GetHeaderCellProps, RowReorderingProps, SyncState } from '../../table.types';
|
|
3
3
|
export type TableHeaderProps<TData extends RowData> = {
|
|
4
4
|
getHeaderCellProps: GetHeaderCellProps<TData> | undefined;
|
|
5
5
|
hasConfigurableColumns: boolean;
|
|
6
6
|
isScrolling: boolean;
|
|
7
7
|
reordering: RowReorderingProps<TData> | undefined;
|
|
8
|
+
syncState?: SyncState;
|
|
8
9
|
table: Table<TData>;
|
|
9
10
|
};
|
|
@@ -19,6 +19,9 @@ export interface ColumnConfig {
|
|
|
19
19
|
id?: string;
|
|
20
20
|
}
|
|
21
21
|
export type GetColumnsConfigFn = (() => AsyncGenerator<ColumnConfig[], void | ColumnConfig, unknown>) | (() => Promise<ColumnConfig[]>);
|
|
22
|
+
export type SyncState = {
|
|
23
|
+
reordered?: boolean;
|
|
24
|
+
};
|
|
22
25
|
export interface TableProps<TData extends RowData> extends Partial<TableDefaultProps> {
|
|
23
26
|
className?: string;
|
|
24
27
|
columns: ColumnDef<TData, any>[];
|
|
@@ -45,6 +48,7 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
45
48
|
reordering?: RowReorderingProps<TData>;
|
|
46
49
|
search?: SearchProps;
|
|
47
50
|
sorting?: SortProps;
|
|
51
|
+
syncState?: SyncState;
|
|
48
52
|
}
|
|
49
53
|
export interface TableDefaultProps {
|
|
50
54
|
stickyFirstColumn: boolean;
|