gantri-components 2.250.2 → 2.251.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.
Files changed (28) hide show
  1. package/dist/components/table/components/after-row-component/after-row-component.d.ts +1 -2
  2. package/dist/components/table/components/cell-reorder-wrapper/cell-reorder-wrapper.d.ts +1 -2
  3. package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.d.ts +1 -2
  4. package/dist/components/table/components/custom-columns-toggle/custom-columns-toggle.helpers.d.ts +2 -2
  5. package/dist/components/table/components/table-actions-wrapper/hooks/useConfirmInteraction.d.ts +2 -2
  6. package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.d.ts +1 -2
  7. package/dist/components/table/components/table-draggable-row/helpers/flatten-table-rows/flatten-table-rows.d.ts +1 -2
  8. package/dist/components/table/components/table-draggable-row/helpers/is-row-reordering-disabled/is-row-reordering-disabled.d.ts +1 -2
  9. package/dist/components/table/components/table-draggable-row/table-draggable-row.d.ts +1 -2
  10. package/dist/components/table/components/table-footer/table-footer.d.ts +1 -2
  11. package/dist/components/table/components/table-header/components/selectable-row-header-wrapper/selectable-row-header-wrapper.d.ts +1 -2
  12. package/dist/components/table/components/table-header/table-header.d.ts +1 -2
  13. package/dist/components/table/components/table-row/helpers/get-row-component-props/get-row-component-props.d.ts +1 -2
  14. package/dist/components/table/components/table-row/table-row.d.ts +1 -2
  15. package/dist/components/table/components/table-row-cells/components/selectable-row-cell-wrapper/helpers/get-row-range/get-row-range.d.ts +2 -2
  16. package/dist/components/table/components/table-row-cells/components/selectable-row-cell-wrapper/selectable-row-cell-wrapper.d.ts +1 -2
  17. package/dist/components/table/components/table-row-cells/components/table-cell/table-cell.d.ts +1 -2
  18. package/dist/components/table/components/table-row-cells/table-row-cells.d.ts +1 -2
  19. package/dist/components/table/components/table-row-overlay/table-row-overlay.d.ts +1 -2
  20. package/dist/components/table/hooks/use-drag-and-drop-rows/use-drag-and-drop-rows.d.ts +2 -3
  21. package/dist/components/table/hooks/use-get-selected-table-rows-data/use-get-selected-table-rows-data.d.ts +1 -2
  22. package/dist/components/table/table.adapters.d.ts +3 -3
  23. package/dist/components/table/table.context.d.ts +1 -1
  24. package/dist/components/table/table.d.ts +1 -2
  25. package/dist/components/table/table.helpers.d.ts +1 -2
  26. package/dist/index.cjs.js +1 -1
  27. package/dist/index.esm.js +1 -1
  28. package/package.json +1 -3
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { AfterRowComponentProps } from './after-row-component.types';
4
- export declare const AfterRowComponent: <TData extends RowData<import("../..").CustomTData>>(props: AfterRowComponentProps<TData>) => React.JSX.Element | null;
3
+ export declare const AfterRowComponent: <TData extends RowData>(props: AfterRowComponentProps<TData>) => React.JSX.Element | null;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { CellReorderWrapperProps } from './cell-reorder-wrapper.types';
4
3
  /** When reordering is provided, wraps the first column in the provided props. */
5
- export declare const CellReorderWrapper: <TData extends RowData<import("../..").CustomTData>>(props: CellReorderWrapperProps<TData>) => React.JSX.Element;
4
+ export declare const CellReorderWrapper: <TData extends RowData>(props: CellReorderWrapperProps<TData>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
- import { RowData } from '@tanstack/react-table';
2
1
  import React from 'react';
3
2
  import { CustomColumnsWrapperProps } from './custom-columns-toggle.types';
4
- export declare const CustomColumnsToggle: <TData extends RowData<import("../..").CustomTData>>(props: CustomColumnsWrapperProps<TData>) => React.JSX.Element;
3
+ export declare const CustomColumnsToggle: <TData extends RowData>(props: CustomColumnsWrapperProps<TData>) => React.JSX.Element;
@@ -3,5 +3,5 @@ import { CustomColumnOption } from './custom-columns-toggle.types';
3
3
  export interface GetCustomColumnOptionsArgs<TData extends RowData> {
4
4
  table: Table<TData>;
5
5
  }
6
- export declare const getCustomColumnOptions: <TData extends RowData<import("../..").CustomTData>>(args: GetCustomColumnOptionsArgs<TData>) => CustomColumnOption[];
7
- export declare const transformColumnsIntoVisibilityState: <TData extends RowData<import("../..").CustomTData>>(columns: Column<TData, unknown>[]) => Record<string | number, boolean>;
6
+ export declare const getCustomColumnOptions: <TData extends RowData>(args: GetCustomColumnOptionsArgs<TData>) => CustomColumnOption[];
7
+ export declare const transformColumnsIntoVisibilityState: <TData extends RowData>(columns: Column<TData, unknown>[]) => Record<string | number, boolean>;
@@ -4,9 +4,9 @@ export interface UseConfirmInteractionProps<TData extends RowData> {
4
4
  table: Table<TData>;
5
5
  }
6
6
  export type OnConfirmInteraction = (interaction: TableInteraction) => Promise<boolean>;
7
- export declare const useConfirmInteraction: <TData extends RowData<import("../../..").CustomTData>>(props: UseConfirmInteractionProps<TData>) => {
7
+ export declare const useConfirmInteraction: <TData extends RowData>(props: UseConfirmInteractionProps<TData>) => {
8
8
  /** Not necessary for `onConfirmInteraction`. Only provided in case additional logic is needed. */
9
- confirmAllInteractions: boolean;
9
+ confirmAllInteractions: any;
10
10
  /** If applicable, renders a discard selections confirmation modal when called. */
11
11
  onConfirmInteraction: OnConfirmInteraction;
12
12
  };
@@ -1,5 +1,4 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableActionsWrapperProps } from './table-actions-wrapper.types';
4
3
  /** Wraps the table with relevant components for paging, filters, sort, and table actions. */
5
- export declare const TableActionsWrapper: <TData extends RowData<import("../..").CustomTData>>(props: React.PropsWithChildren<TableActionsWrapperProps<TData>>) => React.JSX.Element;
4
+ export declare const TableActionsWrapper: <TData extends RowData>(props: React.PropsWithChildren<TableActionsWrapperProps<TData>>) => React.JSX.Element;
@@ -1,3 +1,2 @@
1
- import { RowData } from '@tanstack/react-table';
2
1
  import { FlattenTableRowsProps } from './flatten-table-rows.types';
3
- export declare const flattenTableRows: <TData extends RowData<import("../../../..").CustomTData>>(props: FlattenTableRowsProps<TData>) => import("@tanstack/react-table").Row<TData>[];
2
+ export declare const flattenTableRows: <TData extends RowData>(props: FlattenTableRowsProps<TData>) => Row<TData_1>[];
@@ -1,3 +1,2 @@
1
- import { RowData } from '@tanstack/react-table';
2
1
  import { IsRowReorderDisabledProps } from './is-row-reordering-disabled.types';
3
- export declare const isRowReorderDisabled: <TData extends RowData<import("../../../..").CustomTData>>(props: IsRowReorderDisabledProps<TData>) => boolean;
2
+ export declare const isRowReorderDisabled: <TData extends RowData>(props: IsRowReorderDisabledProps<TData>) => boolean;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { DraggableRowProps } from './table-draggable-row.types';
4
- export declare const TableDraggableRow: <TData extends RowData<import("../..").CustomTData>>(props: DraggableRowProps<TData>) => React.JSX.Element;
3
+ export declare const TableDraggableRow: <TData extends RowData>(props: DraggableRowProps<TData>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableFooterProps } from './table-footer.types';
4
- export declare const TableFooter: <TData extends RowData<import("../..").CustomTData>>(props: TableFooterProps<TData>) => React.JSX.Element;
3
+ export declare const TableFooter: <TData extends RowData>(props: TableFooterProps<TData>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { SelectableRowHeaderWrapperProps } from './selectable-row-header-wrapper.types';
4
- export declare const SelectableRowHeaderWrapper: <TData extends RowData<import("../../../..").CustomTData>>(props: React.PropsWithChildren<SelectableRowHeaderWrapperProps<TData>>) => React.JSX.Element;
3
+ export declare const SelectableRowHeaderWrapper: <TData extends RowData>(props: React.PropsWithChildren<SelectableRowHeaderWrapperProps<TData>>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableHeaderProps } from './table-header.types';
4
- export declare const TableHeader: <TData extends RowData<import("../..").CustomTData>>(props: TableHeaderProps<TData>) => React.JSX.Element;
3
+ export declare const TableHeader: <TData extends RowData>(props: TableHeaderProps<TData>) => React.JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { MouseEvent } from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableRowProps } from '../../table-row.types';
4
- export declare const getRowComponentProps: <TData extends RowData<import("../../../..").CustomTData>>(props: TableRowProps<TData>) => {
3
+ export declare const getRowComponentProps: <TData extends RowData>(props: TableRowProps<TData>) => {
5
4
  className: string;
6
5
  onClick: (event: MouseEvent<HTMLTableRowElement>) => void;
7
6
  "data-is-data-row": string;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableRowProps } from './table-row.types';
4
- export declare const TableRow: <TData extends RowData<import("../..").CustomTData>>(props: TableRowProps<TData>) => React.JSX.Element;
3
+ export declare const TableRow: <TData extends RowData>(props: TableRowProps<TData>) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- import { Row, RowData } from '@tanstack/react-table';
1
+ import { Row } from '@tanstack/react-table';
2
2
  import { GetRowRangeProps } from './get-row-range.types';
3
- export declare const getRowRange: <TData extends RowData<import("../../../../../..").CustomTData>>(props: GetRowRangeProps<TData>) => Row<TData>[];
3
+ export declare const getRowRange: <TData extends RowData>(props: GetRowRangeProps<TData>) => Row<TData>[];
@@ -1,4 +1,3 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { SelectableRowCellWrapperProps } from './selectable-row-cell-wrapper.types';
4
- export declare const SelectableRowCellWrapper: <TData extends RowData<import("../../../..").CustomTData>>(props: React.PropsWithChildren<SelectableRowCellWrapperProps<TData>>) => React.JSX.Element;
3
+ export declare const SelectableRowCellWrapper: <TData extends RowData>(props: React.PropsWithChildren<SelectableRowCellWrapperProps<TData>>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableCellProps } from './table-cell.types';
4
- export declare const TableCell: <TData extends RowData<import("../../../..").CustomTData>>(props: TableCellProps<TData>) => React.JSX.Element;
3
+ export declare const TableCell: <TData extends RowData>(props: TableCellProps<TData>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableRowCellsProps } from './table-row-cells.types';
4
- export declare const TableRowCells: <TData extends RowData<import("../..").CustomTData>>(props: TableRowCellsProps<TData>) => React.JSX.Element;
3
+ export declare const TableRowCells: <TData extends RowData>(props: TableRowCellsProps<TData>) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableRowOverlayProps } from './table-row-overlay.types';
4
- export declare const TableRowOverlay: <TData extends RowData<import("../..").CustomTData>>(props: TableRowOverlayProps<TData>) => React.JSX.Element;
3
+ export declare const TableRowOverlay: <TData extends RowData>(props: TableRowOverlayProps<TData>) => React.JSX.Element;
@@ -1,9 +1,8 @@
1
1
  import { DragEndEvent, DragStartEvent } from '@dnd-kit/core';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { UseDragAndDropRowsProps } from './use-drag-and-drop-rows.types';
4
- export declare const useDragAndDropRows: <TData extends RowData<import("../..").CustomTData>>(props: UseDragAndDropRowsProps<TData>) => {
3
+ export declare const useDragAndDropRows: <TData extends RowData>(props: UseDragAndDropRowsProps<TData>) => {
5
4
  draggingItem: TData | undefined;
6
- draggingRow: import("@tanstack/react-table").Row<TData> | undefined;
5
+ draggingRow: any;
7
6
  draggingRowId: string | undefined;
8
7
  handleDragEnd: (event: DragEndEvent) => void;
9
8
  handleDragStart: (event: DragStartEvent) => void;
@@ -1,6 +1,5 @@
1
- import { RowData } from '@tanstack/react-table';
2
1
  export declare const useGetSelectedRowsData: () => {
3
- getSelectedRowsData: <TData extends RowData<import("../..").CustomTData>>(props: {
2
+ getSelectedRowsData: <TData extends RowData>(props: {
4
3
  idProperty: keyof TData | undefined;
5
4
  records: TData[];
6
5
  }) => TData[];
@@ -1,9 +1,9 @@
1
- import { ColumnDef, ColumnOrderState, RowData, Table, VisibilityState } from '@tanstack/react-table';
1
+ import { ColumnDef, ColumnOrderState } 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<import("./table.types").CustomTData>>(table: Table<TData>) => {};
6
- export declare const extractColumnsDefinition: <TData extends RowData<import("./table.types").CustomTData>>(columns: ColumnDef<TData, unknown>[]) => {
5
+ export declare const extractColumnsVisibilityFromTable: <TData extends RowData>(table: Table<TData>) => any;
6
+ export declare const extractColumnsDefinition: <TData extends RowData>(columns: ColumnDef<TData>[]) => {
7
7
  order: string[];
8
8
  visibility: Record<string, boolean>;
9
9
  };
@@ -17,5 +17,5 @@ export declare const useTableContext: () => {
17
17
  setIsRowSelectionCheckboxes: Dispatch<SetStateAction<boolean>>;
18
18
  setIsRowSelectionDisabled: Dispatch<SetStateAction<boolean>>;
19
19
  setLastSelectedId: Dispatch<SetStateAction<string>>;
20
- setRowSelectionState: Dispatch<SetStateAction<RowSelectionState>>;
20
+ setRowSelectionState: Dispatch<any>;
21
21
  };
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { RowData } from '@tanstack/react-table';
3
2
  import { TableProps } from './table.types';
4
3
  /**
5
4
  * See https://components.gantri.com/?path=/story/core-table for usage examples.
6
5
  *
7
6
  * Official docs: https://tanstack.com/table/v8/docs/guide/overview
8
7
  */
9
- export declare const Table: <TData extends RowData<import("./table.types").CustomTData>>(incoming: TableProps<TData>) => React.JSX.Element;
8
+ export declare const Table: <TData extends RowData>(incoming: TableProps<TData>) => React.JSX.Element;
@@ -1,5 +1,4 @@
1
- import { RowData } from '@tanstack/react-table';
2
1
  import { ColumnConfig, GetColumnsConfigFn, TDataWithId } from './table.types';
3
- export declare const addMissingIds: <TData extends RowData<import("./table.types").CustomTData>>(data: TData[]) => TDataWithId<TData>[];
2
+ export declare const addMissingIds: <TData extends RowData>(data: TData[]) => TDataWithId<TData>[];
4
3
  export declare const hyphenateColumnId: ((id: string) => string) & import("lodash").MemoizedFunction;
5
4
  export declare const processColumnsConfigGenerator: (fetchData: GetColumnsConfigFn, handler: (val: ColumnConfig[]) => void, columnsConfiguration: ColumnConfig[]) => Promise<void | ColumnConfig[]>;