gantri-components 2.45.0 → 2.46.0
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/README.md +1 -1
- package/dist/components/icon/generated/ui-control/LinesTwoDots.d.ts +3 -0
- package/dist/components/icon/generated/ui-control/LinesTwoDots24.d.ts +3 -0
- package/dist/components/icon/generated/ui-control/index.d.ts +2 -0
- package/dist/components/icon/icon.type.d.ts +1 -1
- package/dist/components/overlay/overlay.types.d.ts +1 -0
- package/dist/components/search-field/search-field.types.d.ts +0 -1
- package/dist/components/table/components/custom-columns-toggle/components/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.d.ts +2 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.styles.d.ts +6 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.types.d.ts +7 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.d.ts +3 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.styles.d.ts +4 -0
- package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.types.d.ts +10 -0
- package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.d.ts +7 -0
- package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.styles.d.ts +3 -0
- package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.types.d.ts +18 -0
- package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-initial-visibility/get-custom-column-initial-visibility.d.ts +30 -0
- package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-initial-visibility/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-options/get-custom-column-options.d.ts +8 -0
- package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-options/get-custom-column-options.types.d.ts +6 -0
- package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-options/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/helpers/index.d.ts +2 -0
- package/dist/components/table/components/custom-columns-toggle/hooks/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/hooks/use-detect-scroll/index.d.ts +1 -0
- package/dist/components/table/components/custom-columns-toggle/hooks/use-detect-scroll/use-detect-scroll.d.ts +4 -0
- package/dist/components/table/components/custom-columns-toggle/hooks/use-detect-scroll/use-detect-scroll.types.d.ts +9 -0
- package/dist/components/table/components/custom-columns-toggle/index.d.ts +1 -0
- package/dist/components/table/components/index.d.ts +1 -1
- package/dist/components/table/components/table-actions-wrapper/components/search/search.styles.d.ts +4 -1
- package/dist/components/table/components/table-actions-wrapper/components/search/search.types.d.ts +5 -1
- package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts +2 -5
- package/dist/components/table/components/table-header/table-header.types.d.ts +3 -0
- package/dist/components/table/components/table-row/helpers/get-row-component-props/get-row-component-props.d.ts +267 -0
- package/dist/components/table/components/table-row/helpers/get-row-component-props/index.d.ts +1 -0
- package/dist/components/table/hooks/index.d.ts +1 -2
- package/dist/components/table/hooks/use-track-sticky-cells/helpers/get-is-sticky/get-is-sticky.d.ts +2 -0
- package/dist/components/table/hooks/use-track-sticky-cells/helpers/get-is-sticky/get-is-sticky.types.d.ts +5 -0
- package/dist/components/table/hooks/use-track-sticky-cells/helpers/get-is-sticky/index.d.ts +1 -0
- package/dist/components/table/hooks/use-track-sticky-cells/use-track-sticky-cells.types.d.ts +3 -2
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/table.types.d.ts +5 -3
- package/dist/components/table/use-drag-and-drop-rows/index.d.ts +1 -0
- package/dist/components/table/use-drag-and-drop-rows/use-drag-and-drop-rows.d.ts +14 -0
- package/dist/components/table/use-drag-and-drop-rows/use-drag-and-drop-rows.types.d.ts +9 -0
- package/dist/components/tooltip/tooltip.types.d.ts +1 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-row-component-props';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './useTrackStickyCells';
|
|
1
|
+
export * from './use-track-sticky-cells';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-is-sticky';
|
package/dist/components/table/hooks/use-track-sticky-cells/use-track-sticky-cells.types.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
|
-
import { CustomColumnsProps } from '../../components/custom-columns-
|
|
2
|
+
import { CustomColumnsProps } from '../../components/custom-columns-toggle/custom-columns-toggle.types';
|
|
3
3
|
export interface UseTrackStickyCellsProps<TData extends RowData> {
|
|
4
4
|
customColumns: CustomColumnsProps<TData> | undefined;
|
|
5
5
|
numRows: number;
|
|
6
6
|
/** The containing element that the child will intersect with. */
|
|
7
|
-
root:
|
|
7
|
+
root: HTMLElement | null;
|
|
8
8
|
stickyFirstColumn: boolean | undefined;
|
|
9
|
+
stickyFooter: boolean | undefined;
|
|
9
10
|
stickyLastColumn: boolean | undefined;
|
|
10
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './table';
|
|
2
2
|
export * from './table.types';
|
|
3
3
|
export * from './components/table-row/table-row.constants';
|
|
4
|
-
export * from './components/custom-columns-
|
|
4
|
+
export * from './components/custom-columns-toggle/helpers/get-custom-column-initial-visibility';
|
|
5
5
|
export * from './helpers';
|
|
6
6
|
export * from './components/table-actions-wrapper/table-actions-wrapper.types';
|
|
@@ -3,7 +3,7 @@ import { Dispatch, HTMLAttributes, MouseEvent, 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';
|
|
6
|
-
import { CustomColumnsProps } from './components/custom-columns-
|
|
6
|
+
import { CustomColumnsProps } from './components/custom-columns-toggle/custom-columns-toggle.types';
|
|
7
7
|
import { OverlayPosition } from '../overlay/overlay.types';
|
|
8
8
|
export interface ReorderingProps<TData extends RowData> {
|
|
9
9
|
disabled?: boolean;
|
|
@@ -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.
|
|
@@ -39,11 +40,12 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
39
40
|
reordering?: ReorderingProps<TData>;
|
|
40
41
|
search?: SearchProps;
|
|
41
42
|
sorting?: SortProps;
|
|
42
|
-
stickyFooter?: boolean;
|
|
43
|
-
stickyLastColumn?: boolean;
|
|
44
43
|
}
|
|
45
44
|
export interface TableDefaultProps {
|
|
46
45
|
stickyFirstColumn: boolean;
|
|
46
|
+
stickyFooter: boolean;
|
|
47
|
+
/** Providing `customColumns` will automatically make the last column sticky. */
|
|
48
|
+
stickyLastColumn: boolean;
|
|
47
49
|
}
|
|
48
50
|
export type GetHeaderCellProps<TData extends RowData, TValue = unknown> = (cell?: Header<TData, TValue>) => CustomCellProps;
|
|
49
51
|
/** Include `status` in the returned object to set the row status color. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-drag-and-drop-rows';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DragEndEvent, DragStartEvent } from '@dnd-kit/core';
|
|
2
|
+
import { RowData } from '@tanstack/react-table';
|
|
3
|
+
import { UseDragAndDropRowsProps } from './use-drag-and-drop-rows.types';
|
|
4
|
+
export declare const useDragAndDropRows: <TData extends RowData<{
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
id?: string | number | undefined;
|
|
7
|
+
subRows?: any[] | undefined;
|
|
8
|
+
}>>(props: UseDragAndDropRowsProps<TData>) => {
|
|
9
|
+
activeIndex: number;
|
|
10
|
+
handleDragEnd: (event: DragEndEvent) => void;
|
|
11
|
+
handleDragStart: (event: DragStartEvent) => void;
|
|
12
|
+
isDragging: boolean;
|
|
13
|
+
sensors: import("@dnd-kit/core").SensorDescriptor<import("@dnd-kit/core").SensorOptions>[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Row, RowData } from '@tanstack/react-table';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { ReorderingProps } from '../table.types';
|
|
4
|
+
export type UseDragAndDropRowsProps<TData extends RowData> = {
|
|
5
|
+
data: TData[];
|
|
6
|
+
reordering: ReorderingProps<TData> | undefined;
|
|
7
|
+
rows: Row<TData>[];
|
|
8
|
+
setData: Dispatch<SetStateAction<TData[]>>;
|
|
9
|
+
};
|