@trackunit/react-table 1.7.140 → 1.7.145

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "1.7.140",
3
+ "version": "1.7.145",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,14 +14,14 @@
14
14
  "react-dnd-html5-backend": "16.0.1",
15
15
  "@tanstack/react-router": "1.114.29",
16
16
  "tailwind-merge": "^2.0.0",
17
- "@trackunit/react-components": "1.10.63",
18
- "@trackunit/shared-utils": "1.9.88",
19
- "@trackunit/css-class-variance-utilities": "1.7.88",
20
- "@trackunit/ui-icons": "1.7.89",
21
- "@trackunit/react-table-base-components": "1.7.136",
22
- "@trackunit/react-form-components": "1.8.134",
23
- "@trackunit/i18n-library-translation": "1.7.106",
24
- "@trackunit/iris-app-runtime-core-api": "1.7.98",
17
+ "@trackunit/react-components": "1.10.67",
18
+ "@trackunit/shared-utils": "1.9.92",
19
+ "@trackunit/css-class-variance-utilities": "1.7.92",
20
+ "@trackunit/ui-icons": "1.7.93",
21
+ "@trackunit/react-table-base-components": "1.7.141",
22
+ "@trackunit/react-form-components": "1.8.139",
23
+ "@trackunit/i18n-library-translation": "1.7.110",
24
+ "@trackunit/iris-app-runtime-core-api": "1.7.102",
25
25
  "graphql": "^16.10.0"
26
26
  },
27
27
  "module": "./index.esm.js",
@@ -1,6 +1,6 @@
1
1
  import { IconProps } from "@trackunit/react-components";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
- import { ReactNode } from "react";
3
+ import { MouseEvent, ReactNode, RefObject } from "react";
4
4
  type IconExposedProp = Omit<IconProps, "color" | "onclick" | "type" | "name">;
5
5
  export type ActionModel = (MethodAction | RouteAction) & CommonAction;
6
6
  export type DropdownModel = MethodAction & CommonAction & {
@@ -8,7 +8,7 @@ export type DropdownModel = MethodAction & CommonAction & {
8
8
  };
9
9
  export type MethodAction = {
10
10
  type: "method";
11
- method: (e: React.MouseEvent) => void;
11
+ method: (e: MouseEvent) => void;
12
12
  };
13
13
  export type RouteAction = {
14
14
  type: "route";
@@ -19,7 +19,7 @@ export interface CommonAction extends IconExposedProp {
19
19
  id: string;
20
20
  label: string;
21
21
  icon?: IconName;
22
- forwardedRef?: React.RefObject<HTMLSpanElement>;
22
+ forwardedRef?: RefObject<HTMLSpanElement>;
23
23
  style?: Record<string, string>;
24
24
  loading?: boolean;
25
25
  disabled?: boolean;
package/src/Table.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface TableProps<TData extends object> extends ReactTable<TData>, Com
14
14
  hideFooter?: boolean;
15
15
  emptyState?: EmptyStateProps;
16
16
  selectionColId?: string;
17
- renderFilterButton?: (filterKey: string | Array<string>) => React.ReactNode;
17
+ renderFilterButton?: (filterKey: string | Array<string>) => ReactNode;
18
18
  isRowClickable?: (row: TData) => boolean;
19
19
  }
20
20
  /**
@@ -1,4 +1,5 @@
1
1
  import { Table as ReactTable } from "@tanstack/react-table";
2
+ import { HTMLAttributes, ReactNode } from "react";
2
3
  interface ColumnDragDropOptions<TData extends object> {
3
4
  table: ReactTable<TData>;
4
5
  }
@@ -16,10 +17,10 @@ export declare const useColumnDragDrop: <TData extends object>({ table, }: Colum
16
17
  droppedColumnId: string | null;
17
18
  dropTargetColumnId: string | null;
18
19
  dropPosition: "left" | "right" | null;
19
- getHeaderProps: (headerId: string, styles?: ColumnStyles) => React.HTMLAttributes<HTMLTableCellElement>;
20
- getDragHandleProps: (headerId: string, isPlaceholder: boolean, pinned?: "left" | "right" | "") => React.HTMLAttributes<HTMLTableCellElement>;
21
- renderDropIndicator: (columnId: string) => React.ReactNode;
20
+ getHeaderProps: (headerId: string, styles?: ColumnStyles) => HTMLAttributes<HTMLTableCellElement>;
21
+ getDragHandleProps: (headerId: string, isPlaceholder: boolean, pinned?: "left" | "right" | "") => HTMLAttributes<HTMLTableCellElement>;
22
+ renderDropIndicator: (columnId: string) => ReactNode;
22
23
  isCellDropTarget: (columnId: string) => boolean;
23
- getCellProps: (columnId: string, styles?: ColumnStyles) => React.HTMLAttributes<HTMLTableCellElement>;
24
+ getCellProps: (columnId: string, styles?: ColumnStyles) => HTMLAttributes<HTMLTableCellElement>;
24
25
  };
25
26
  export {};