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.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/dist/components/icon/generated/ui-control/LinesTwoDots.d.ts +3 -0
  3. package/dist/components/icon/generated/ui-control/LinesTwoDots24.d.ts +3 -0
  4. package/dist/components/icon/generated/ui-control/index.d.ts +2 -0
  5. package/dist/components/icon/icon.type.d.ts +1 -1
  6. package/dist/components/overlay/overlay.types.d.ts +1 -0
  7. package/dist/components/search-field/search-field.types.d.ts +0 -1
  8. package/dist/components/table/components/custom-columns-toggle/components/index.d.ts +1 -0
  9. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/index.d.ts +1 -0
  10. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/index.d.ts +1 -0
  11. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.d.ts +2 -0
  12. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.styles.d.ts +6 -0
  13. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/components/user-preferences-modal/user-preferences-modal.types.d.ts +7 -0
  14. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/index.d.ts +1 -0
  15. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.d.ts +3 -0
  16. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.styles.d.ts +4 -0
  17. package/dist/components/table/components/custom-columns-toggle/components/user-preferences-toggle/user-preferences-toggle.types.d.ts +10 -0
  18. package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.d.ts +7 -0
  19. package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.styles.d.ts +3 -0
  20. package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.types.d.ts +18 -0
  21. package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-initial-visibility/get-custom-column-initial-visibility.d.ts +30 -0
  22. package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-initial-visibility/index.d.ts +1 -0
  23. package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-options/get-custom-column-options.d.ts +8 -0
  24. package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-options/get-custom-column-options.types.d.ts +6 -0
  25. package/dist/components/table/components/custom-columns-toggle/helpers/get-custom-column-options/index.d.ts +1 -0
  26. package/dist/components/table/components/custom-columns-toggle/helpers/index.d.ts +2 -0
  27. package/dist/components/table/components/custom-columns-toggle/hooks/index.d.ts +1 -0
  28. package/dist/components/table/components/custom-columns-toggle/hooks/use-detect-scroll/index.d.ts +1 -0
  29. package/dist/components/table/components/custom-columns-toggle/hooks/use-detect-scroll/use-detect-scroll.d.ts +4 -0
  30. package/dist/components/table/components/custom-columns-toggle/hooks/use-detect-scroll/use-detect-scroll.types.d.ts +9 -0
  31. package/dist/components/table/components/custom-columns-toggle/index.d.ts +1 -0
  32. package/dist/components/table/components/index.d.ts +1 -1
  33. package/dist/components/table/components/table-actions-wrapper/components/search/search.styles.d.ts +4 -1
  34. package/dist/components/table/components/table-actions-wrapper/components/search/search.types.d.ts +5 -1
  35. package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts +2 -5
  36. package/dist/components/table/components/table-header/table-header.types.d.ts +3 -0
  37. package/dist/components/table/components/table-row/helpers/get-row-component-props/get-row-component-props.d.ts +267 -0
  38. package/dist/components/table/components/table-row/helpers/get-row-component-props/index.d.ts +1 -0
  39. package/dist/components/table/hooks/index.d.ts +1 -2
  40. package/dist/components/table/hooks/use-track-sticky-cells/helpers/get-is-sticky/get-is-sticky.d.ts +2 -0
  41. package/dist/components/table/hooks/use-track-sticky-cells/helpers/get-is-sticky/get-is-sticky.types.d.ts +5 -0
  42. package/dist/components/table/hooks/use-track-sticky-cells/helpers/get-is-sticky/index.d.ts +1 -0
  43. package/dist/components/table/hooks/use-track-sticky-cells/use-track-sticky-cells.types.d.ts +3 -2
  44. package/dist/components/table/index.d.ts +1 -1
  45. package/dist/components/table/table.types.d.ts +5 -3
  46. package/dist/components/table/use-drag-and-drop-rows/index.d.ts +1 -0
  47. package/dist/components/table/use-drag-and-drop-rows/use-drag-and-drop-rows.d.ts +14 -0
  48. package/dist/components/table/use-drag-and-drop-rows/use-drag-and-drop-rows.types.d.ts +9 -0
  49. package/dist/components/tooltip/tooltip.types.d.ts +1 -0
  50. package/dist/index.cjs.js +1 -1
  51. package/dist/index.esm.js +1 -1
  52. package/dist/index.umd.js +1 -1
  53. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from './get-row-component-props';
@@ -1,2 +1 @@
1
- export * from './useMoveRow';
2
- export * from './useTrackStickyCells';
1
+ export * from './use-track-sticky-cells';
@@ -0,0 +1,2 @@
1
+ import { GetIsStickyArgs } from './get-is-sticky.types';
2
+ export declare const getIsSticky: (args: GetIsStickyArgs) => boolean;
@@ -0,0 +1,5 @@
1
+ import { StickyTo } from '../../../../../../helpers/mark-sticky-elements/mark-sticky-elements.types';
2
+ export type GetIsStickyArgs = {
3
+ element: HTMLElement | null;
4
+ stickyTo: StickyTo;
5
+ };
@@ -0,0 +1 @@
1
+ export * from './get-is-sticky';
@@ -1,10 +1,11 @@
1
1
  import { RowData } from '@tanstack/react-table';
2
- import { CustomColumnsProps } from '../../components/custom-columns-wrapper/custom-columns-wrapper.types';
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: Element | null;
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-wrapper/helpers/get-custom-column-initial-visibility';
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-wrapper/custom-columns-wrapper.types';
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
+ };
@@ -7,6 +7,7 @@ type TooltipBaseProps = Partial<TooltipDefaultProps> & {
7
7
  * If specified, it will take preference over title/description
8
8
  * */
9
9
  Component?: ReactNode;
10
+ className?: string;
10
11
  description?: string;
11
12
  descriptionTx?: string;
12
13
  title?: string;