gantri-components 2.74.0 → 2.75.0-alpha.1
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/user-preferences-toggle.types.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.types.d.ts +1 -0
- package/dist/components/table/components/table-actions-wrapper/hooks/useConfirmInteraction.d.ts +1 -1
- package/dist/components/table/components/table-header/table-header.types.d.ts +1 -0
- package/dist/components/table/components/table-row/table-row.constants.d.ts +0 -1
- package/dist/components/table/table.adapters.d.ts +1 -6
- package/dist/components/table/table.styles.d.ts +1 -0
- package/dist/components/table/table.types.d.ts +5 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { SyncState } from '../../../../table.types';
|
|
|
4
4
|
export interface UserPreferencesToggleProps {
|
|
5
5
|
activeIndex: number;
|
|
6
6
|
checklistOptions: CustomColumnOption[];
|
|
7
|
+
handleColumnsConfigChange: () => Promise<void>;
|
|
7
8
|
isActive: boolean;
|
|
8
9
|
modalHeading: string;
|
|
9
10
|
onReset: () => Promise<void>;
|
package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { RowData, Table } from '@tanstack/react-table';
|
|
|
2
2
|
import { Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { SyncState } from '../../table.types';
|
|
4
4
|
export interface CustomColumnsWrapperProps<TData extends RowData> {
|
|
5
|
+
handleColumnsConfigChange: () => Promise<void>;
|
|
5
6
|
isActive: boolean;
|
|
6
7
|
isScrolling: boolean;
|
|
7
8
|
setIsActive: Dispatch<SetStateAction<boolean>>;
|
package/dist/components/table/components/table-actions-wrapper/hooks/useConfirmInteraction.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RowData, Table } from '@tanstack/react-table';
|
|
2
|
-
export type TableInteraction = 'FOCUS_SEARCH' | 'OPEN_FILTERS' | 'OPEN_SORT' | 'USE_PAGING' | 'CUSTOM_ACTION';
|
|
2
|
+
export type TableInteraction = 'FOCUS_SEARCH' | 'OPEN_FILTERS' | 'OPEN_SORT' | 'USE_PAGING' | 'CUSTOM_ACTION' | string;
|
|
3
3
|
export interface UseConfirmInteractionProps<TData extends RowData> {
|
|
4
4
|
table: Table<TData>;
|
|
5
5
|
}
|
|
@@ -2,6 +2,7 @@ import { RowData, Table } from '@tanstack/react-table';
|
|
|
2
2
|
import { GetHeaderCellProps, RowReorderingProps, SyncState } from '../../table.types';
|
|
3
3
|
export type TableHeaderProps<TData extends RowData> = {
|
|
4
4
|
getHeaderCellProps: GetHeaderCellProps<TData> | undefined;
|
|
5
|
+
handleColumnsConfigChange: () => Promise<void>;
|
|
5
6
|
hasConfigurableColumns: boolean;
|
|
6
7
|
isScrolling: boolean;
|
|
7
8
|
reordering: RowReorderingProps<TData> | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** See `RowStatusValue` type for possible values. */
|
|
2
2
|
export declare const dataAttrRowStatus: "data-row-status";
|
|
3
3
|
export declare const dataAttrRowIsClickable: "data-row-is-clickable";
|
|
4
|
-
export declare const dataAttrRowHighlightOnHover: "data-row-highlight-on-hover";
|
|
5
4
|
/** Applying this data attribute marks a row as active, applying a new background color. */
|
|
6
5
|
export declare const dataAttrActiveRow: "data-active-row";
|
|
7
6
|
/** Prefix added to table cell data attrs (like cell ID). */
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { ColumnDef, ColumnOrderState, RowData,
|
|
1
|
+
import { ColumnDef, ColumnOrderState, RowData, VisibilityState } from '@tanstack/react-table';
|
|
2
2
|
import { ColumnConfig } from './table.types';
|
|
3
3
|
export declare const extractColumnIdsFromColumnConfig: (records: ColumnConfig[]) => string[];
|
|
4
4
|
export declare const extractColumnsVisibilityFromColumnConfig: (records: ColumnConfig[]) => VisibilityState;
|
|
5
|
-
export declare const extractColumnsVisibilityFromTable: <TData extends RowData<{
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
id?: string | number | undefined;
|
|
8
|
-
subRows?: any[] | undefined;
|
|
9
|
-
}>>(table: Table<TData>) => {};
|
|
10
5
|
export declare const extractColumnsDefinition: <TData extends RowData<{
|
|
11
6
|
[key: string]: unknown;
|
|
12
7
|
id?: string | number | undefined;
|
|
@@ -15,6 +15,7 @@ export declare const StyledTableContainer: import("styled-components").StyledCom
|
|
|
15
15
|
export declare const StyledTable: import("styled-components").StyledComponent<"table", DefaultTheme, {
|
|
16
16
|
backgroundColor: string | undefined;
|
|
17
17
|
clickableRowHoverBackgroundColor: string | undefined;
|
|
18
|
+
highlightHoveredRow: boolean | undefined;
|
|
18
19
|
isCustomColumnsEnabled: boolean;
|
|
19
20
|
stickyFirstColumn: boolean | undefined;
|
|
20
21
|
stickyFooter: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cell, ColumnDef, Header, Row, RowData, TableOptions } from '@tanstack/react-table';
|
|
2
|
-
import { Dispatch, HTMLAttributes, MouseEvent, SetStateAction } from 'react';
|
|
2
|
+
import { Dispatch, HTMLAttributes, MouseEvent, MouseEventHandler, SetStateAction } from 'react';
|
|
3
3
|
import { PagingProps } from './components/table-actions-wrapper/components/paging/paging.types';
|
|
4
4
|
import { CustomActionProps, FiltersProps, SearchProps } from './components/table-actions-wrapper/table-actions-wrapper.types';
|
|
5
5
|
import { SortProps } from './components/table-actions-wrapper/components/sort/sort.types';
|
|
@@ -38,7 +38,6 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
38
38
|
*/
|
|
39
39
|
data: TData[];
|
|
40
40
|
filters?: FiltersProps;
|
|
41
|
-
/** Include `isClickable` in the returned object to apply appropriate cell styling. Text styling must be applied within the column. */
|
|
42
41
|
getCellProps?: GetCellProps<TData>;
|
|
43
42
|
/**
|
|
44
43
|
* If getColumnsConfig and onColumnsConfigChange are provided,
|
|
@@ -49,6 +48,7 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
49
48
|
getHeaderCellProps?: GetHeaderCellProps<TData>;
|
|
50
49
|
/** Include `status` in the returned object to set the row status color. */
|
|
51
50
|
getRowProps?: GetRowProps<TData>;
|
|
51
|
+
highlightHoveredRow?: boolean;
|
|
52
52
|
onColumnsConfigChange?: (config: ColumnConfig[], originalColumns: ColumnConfig[]) => Promise<void>;
|
|
53
53
|
onRowClick?: OnRowClick<TData>;
|
|
54
54
|
/** Any options provided are passed to `useReactTable` and may override default values. */
|
|
@@ -72,11 +72,13 @@ export interface CustomRowProps extends HTMLAttributes<HTMLTableRowElement>, Rec
|
|
|
72
72
|
status?: RowStatusValue | undefined;
|
|
73
73
|
}
|
|
74
74
|
export type RowStatusValue = 'handled' | 'next' | 'error' | 'warning';
|
|
75
|
-
/** Include `isClickable` in the returned object to apply appropriate cell styling. Text styling must be applied within the column. */
|
|
76
75
|
export type GetCellProps<TData extends RowData, TValue = unknown> = (cell?: Cell<TData, TValue>) => CustomCellProps;
|
|
77
76
|
export type OnRowClick<TData extends RowData> = (data: Row<TData>, event: MouseEvent<HTMLTableRowElement>) => void;
|
|
78
77
|
export interface CustomCellProps extends HTMLAttributes<HTMLTableCellElement>, Record<string, unknown> {
|
|
78
|
+
/** @deprecated - Provide this value in the column definition's `meta` instead. */
|
|
79
79
|
isClickable?: boolean;
|
|
80
|
+
/** @deprecated - Provide this value in the column definition's `meta` instead. */
|
|
81
|
+
onClick?: MouseEventHandler<HTMLTableCellElement>;
|
|
80
82
|
}
|
|
81
83
|
export type TDataWithId<TData extends RowData> = TData & {
|
|
82
84
|
id: number | string;
|