gantri-components 2.79.4 → 2.80.0-beta.2

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.
@@ -1 +1 @@
1
- export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const StyledDragHandle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,4 +1 @@
1
- export declare const StyledDraggableRowTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, {
2
- reorderEnabled: boolean;
3
- }, never>;
4
1
  export declare const StyledDraggableRowWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,3 @@
1
+ import { RowData } from '@tanstack/react-table';
2
+ import { TableCellProps } from './table-cell.types';
3
+ export declare const TableCell: <TData extends RowData<import("../../../..").CustomTData>>(props: TableCellProps<TData>) => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { Cell, Row, RowData } from '@tanstack/react-table';
2
+ import { DraggableAttributes } from '@dnd-kit/core';
3
+ import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
4
+ import { GetCellProps, RowReorderingProps } from '../../../../table.types';
5
+ export interface TableCellProps<TData extends RowData> {
6
+ cell: Cell<TData, unknown>;
7
+ dragHandleProps?: {
8
+ attributes: DraggableAttributes;
9
+ listeners: SyntheticListenerMap | undefined;
10
+ };
11
+ getCellProps: GetCellProps<TData> | undefined;
12
+ index: number;
13
+ reordering: RowReorderingProps<TData> | undefined;
14
+ row: Row<TData>;
15
+ }
@@ -1,6 +1,12 @@
1
1
  import { Row, RowData } from '@tanstack/react-table';
2
+ import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
3
+ import { DraggableAttributes } from '@dnd-kit/core';
2
4
  import { GetCellProps, RowReorderingProps } from '../../table.types';
3
5
  export interface TableRowCellsProps<TData extends RowData> {
6
+ dragHandleProps?: {
7
+ attributes: DraggableAttributes;
8
+ listeners: SyntheticListenerMap | undefined;
9
+ };
4
10
  getCellProps: GetCellProps<TData> | undefined;
5
11
  reordering: RowReorderingProps<TData> | undefined;
6
12
  row: Row<TData>;
@@ -1,11 +1,15 @@
1
1
  import { Cell, ColumnDef, Header, Row, RowData, TableOptions } from '@tanstack/react-table';
2
2
  import { Dispatch, HTMLAttributes, MouseEvent, MouseEventHandler, SetStateAction } from 'react';
3
+ import { Disabled } from '@dnd-kit/sortable/dist/types';
3
4
  import { PagingProps } from './components/table-actions-wrapper/components/paging/paging.types';
4
5
  import { CustomActionProps, FiltersProps, SearchProps } from './components/table-actions-wrapper/table-actions-wrapper.types';
5
6
  import { SortProps } from './components/table-actions-wrapper/components/sort/sort.types';
6
7
  import { OverlayPosition } from '../overlay/overlay.types';
7
8
  export interface RowReorderingProps<TData extends RowData> {
8
9
  disabled?: boolean;
10
+ getDisableSortableRow?: (row: Row<TData>) => Disabled | boolean;
11
+ /** Overrides the default index-based row number. */
12
+ getRowNumber?: (row: Row<TData>) => number | string | undefined;
9
13
  isActive: boolean;
10
14
  isAvailable: boolean;
11
15
  /** Is fired when the dragged element is dropped. */
@@ -37,6 +41,8 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
37
41
  * To create collapsable rows, optionally provide the index with a `subRows` key. It should be an array of objects matching the expected data type.
38
42
  */
39
43
  data: TData[];
44
+ /** If your data is collapsable, passing `true` here will expand all the data by default. */
45
+ expandAllRows?: boolean;
40
46
  filters?: FiltersProps;
41
47
  getCellProps?: GetCellProps<TData>;
42
48
  /**