@prt-ts/fluent-react-table-v2 9.40.0-build.4.0 → 9.40.0-build.6.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/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@prt-ts/fluent-react-table-v2",
3
- "version": "9.40.0-build.4.0",
3
+ "version": "9.40.0-build.6.0",
4
4
  "main": "./index.js",
5
5
  "types": "./src\\index.d.ts",
6
6
  "peerDependencies": {
7
7
  "react": ">=17.0.0",
8
8
  "react-dom": ">=17.0.0",
9
9
  "@fluentui/react-components": ">=9.40.0",
10
+ "@fluentui/react-datepicker-compat": ">=0.4.5",
10
11
  "@fluentui/react-icons": ">=2.0.221"
11
12
  },
12
13
  "dependencies": {
@@ -1,11 +1,14 @@
1
1
  import * as React from 'react';
2
- import { Table } from '@tanstack/react-table';
2
+ import { Table, TableState } from '@tanstack/react-table';
3
+ import { TableView } from '../../types';
3
4
  type GridHeaderProps<TItem extends object> = {
4
5
  table: Table<TItem>;
5
6
  gridTitle: JSX.Element | React.ReactNode;
6
7
  headerMenu?: JSX.Element | React.ReactNode;
7
8
  globalFilter: string;
8
9
  setGlobalFilter: (value: string) => void;
10
+ tableViews: TableView[];
11
+ applyTableState: (tableState: Partial<TableState>) => boolean;
9
12
  openFilterDrawer: boolean;
10
13
  setFilterDrawerOpen: React.Dispatch<React.SetStateAction<boolean>>;
11
14
  resetToGridDefaultView: () => boolean;
@@ -1,3 +1,4 @@
1
+ import { TableState } from '@tanstack/react-table';
1
2
  import { TableProps } from '..';
2
3
  import { TableRef, TableView } from '../types';
3
4
  import * as React from 'react';
@@ -8,4 +9,5 @@ export declare const useGridContainer: <TItem extends object>(props: TableProps<
8
9
  headerMenu: JSX.Element | React.ReactNode;
9
10
  setGlobalFilter: React.Dispatch<React.SetStateAction<string>>;
10
11
  resetToDefaultView: () => boolean;
12
+ applyTableState: (tableState: Partial<TableState>) => boolean;
11
13
  };
@@ -1,4 +1,4 @@
1
1
  export { Table } from "./components";
2
- export type { TableProps, TableRef } from "./types";
2
+ export type { TableProps, TableRef, TableView } from "./types";
3
3
  export type { ColumnDef, TableState } from "@tanstack/react-table";
4
4
  export { createColumnHelper } from "@tanstack/react-table";
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ExpandedState, GroupingState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
3
+ import { TableView } from "./TableView";
3
4
  export type TableProps<TItem extends object> = {
4
5
  /**
5
6
  * Table Columns definitions.
@@ -79,4 +80,8 @@ export type TableProps<TItem extends object> = {
79
80
  * @default defaultNoItemComponent
80
81
  */
81
82
  noItemPage?: React.ReactNode;
83
+ /**
84
+ * Table Views
85
+ */
86
+ views?: TableView[];
82
87
  };
@@ -1,9 +1,7 @@
1
1
  import { Table, TableState } from "@tanstack/react-table";
2
- import { TableView } from "./TableView";
3
2
  export type TableRef<TItem extends object> = {
4
3
  table: Table<TItem>;
5
4
  getTableState: () => Partial<TableState>;
6
5
  applyTableState: (tableState: Partial<TableState>) => boolean;
7
6
  resetToDefaultView: () => boolean;
8
- setTableAvailableViews: (views: TableView[]) => void;
9
7
  };
@@ -1,4 +1,4 @@
1
- import { TableState } from "@fluentui/react-components";
1
+ import { TableState } from "@tanstack/react-table";
2
2
  export type TableView = {
3
3
  id: number;
4
4
  viewName: string;