@popmenu/table 0.46.0 → 0.47.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/build/components/ColumnFilterChip/ColumnFilterChip.d.ts +9 -0
- package/build/components/ColumnFilterChip/index.d.ts +1 -0
- package/build/components/ColumnFilterResetButton/ColumnFilterResetButton.d.ts +3 -0
- package/build/components/ColumnFilterResetButton/index.d.ts +1 -0
- package/build/components/FilterPanel/FilterControl/FilterControl.d.ts +3 -0
- package/build/components/FilterPanel/FilterControl/SelectFilter/SelectFilter.d.ts +5 -0
- package/build/components/FilterPanel/FilterControl/SelectFilter/SelectFilterStyles.d.ts +1 -0
- package/build/components/FilterPanel/FilterControl/SelectFilter/index.d.ts +1 -0
- package/build/components/FilterPanel/FilterControl/index.d.ts +1 -0
- package/build/components/FilterPanel/FilterPanel.d.ts +2 -0
- package/build/components/FilterPanel/FilterPanelProps.d.ts +11 -0
- package/build/components/FilterPanel/Panel/Panel.d.ts +7 -0
- package/build/components/FilterPanel/Panel/PanelStyles.d.ts +1 -0
- package/build/components/FilterPanel/Panel/index.d.ts +1 -0
- package/build/components/FilterPanel/Trigger/Trigger.d.ts +7 -0
- package/build/components/FilterPanel/Trigger/TriggerStyles.d.ts +1 -0
- package/build/components/FilterPanel/Trigger/index.d.ts +1 -0
- package/build/components/FilterPanel/index.d.ts +1 -0
- package/build/components/GlobalFilter/GlobalFilterStyles.d.ts +1 -0
- package/build/components/RowActions/RowActions.d.ts +3 -0
- package/build/components/RowActions/RowActionsProps.d.ts +11 -0
- package/build/components/RowActions/index.d.ts +2 -0
- package/build/components/Table/Table.d.ts +16 -2
- package/build/components/Table/TableProps.d.ts +28 -40
- package/build/components/Table/TableStyles.d.ts +1 -1
- package/build/components/Table/index.d.ts +1 -1
- package/build/components/TableBody/TableBody.d.ts +4 -2
- package/build/components/TableBody/index.d.ts +1 -1
- package/build/components/TableCell/TableCell.d.ts +4 -2
- package/build/components/TableCell/index.d.ts +1 -1
- package/build/components/TableContext/index.d.ts +3 -0
- package/build/components/TableFooter/TableFooter.d.ts +4 -2
- package/build/components/TableFooter/index.d.ts +1 -1
- package/build/components/TableHeader/TableHeader.d.ts +4 -2
- package/build/components/TableHeader/index.d.ts +1 -1
- package/build/components/TableHeaderCell/TableHeaderCell.d.ts +2 -2
- package/build/components/TableHeaderCell/TableHeaderCellProps.d.ts +5 -7
- package/build/components/TableHeaderCell/TableHeaderCellStyles.d.ts +3 -1
- package/build/components/TableHeaderCell/index.d.ts +2 -1
- package/build/components/TableHeaderRow/TableHeaderRow.d.ts +4 -2
- package/build/components/TableHeaderRow/index.d.ts +1 -1
- package/build/components/TableRow/TableRow.d.ts +4 -2
- package/build/components/TableRow/index.d.ts +1 -1
- package/build/components/index.d.ts +10 -1
- package/build/hooks/index.d.ts +1 -1
- package/build/hooks/useColumnFilters.d.ts +9 -0
- package/build/index.d.ts +0 -1
- package/build/index.es.js +2553 -390
- package/build/index.es.js.map +1 -1
- package/build/index.js +2576 -397
- package/build/index.js.map +1 -1
- package/build/util/coercedValueIncludesString.d.ts +2 -0
- package/build/util/getTableMinHeight.d.ts +2 -0
- package/build/util/index.d.ts +2 -0
- package/build/util/validateRowAction.d.ts +2 -0
- package/package.json +4 -4
- package/build/components/Table/util/makeColumns.d.ts +0 -7
- package/build/components/TableActionsCell/TableActionsCell.d.ts +0 -3
- package/build/components/TableActionsCell/TableActionsCellProps.d.ts +0 -10
- package/build/components/TableActionsCell/index.d.ts +0 -2
- package/build/hooks/useManualPagination/index.d.ts +0 -1
- package/build/hooks/useManualPagination/useManualPagination.d.ts +0 -5
- package/build/hooks/useManualPagination/useManualPaginationTypes.d.ts +0 -52
package/build/util/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popmenu/table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Popmenu Design System Team",
|
|
6
6
|
"description": "React components for all Popmenu apps on the web.",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@material-ui/core": "^4.12.2",
|
|
26
26
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
27
|
-
"react": "
|
|
28
|
-
"react
|
|
27
|
+
"@tanstack/react-table": "^8.7.4",
|
|
28
|
+
"react": "17.x"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "a6eee5eee4880b5278ab49bece98d40d18000f56"
|
|
32
32
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Column } from 'react-table';
|
|
2
|
-
import { TableProps } from '../TableProps';
|
|
3
|
-
interface MakeColumnsConfig extends Pick<TableProps, 'columns' | 'actions'> {
|
|
4
|
-
actionColumnId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const makeColumns: (config: MakeColumnsConfig) => Array<Column>;
|
|
7
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Cell, TableInstance } from 'react-table';
|
|
3
|
-
export interface TableActionsCellProps extends TableInstance {
|
|
4
|
-
cell: Cell;
|
|
5
|
-
actions: Record<string, {
|
|
6
|
-
icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
7
|
-
label: string;
|
|
8
|
-
action: (cell: Cell) => void;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useManualPagination } from './useManualPagination';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { UseManualPaginationConfig, UseManualPaginationResult } from './useManualPaginationTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Makes props for the Table component that will enable manual pagination and also provides page state.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useManualPagination: (config: UseManualPaginationConfig) => UseManualPaginationResult;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { TableInstance } from 'react-table';
|
|
2
|
-
interface PaginationEvent {
|
|
3
|
-
/** Index of the page a user has selected. */
|
|
4
|
-
index: number;
|
|
5
|
-
/** The entire table instance by react-table. */
|
|
6
|
-
instance: TableInstance;
|
|
7
|
-
}
|
|
8
|
-
export interface UseManualPaginationConfig {
|
|
9
|
-
/** The total number of records available. */
|
|
10
|
-
total: number;
|
|
11
|
-
/** Sets the default page to show when the table is first presented. */
|
|
12
|
-
initialPageIndex?: number;
|
|
13
|
-
/** Sets the default page size to show when the table is first presented. */
|
|
14
|
-
initialPageSize?: number;
|
|
15
|
-
/** Callback triggered when a pagination even occurs. setPageIndex, which is the second arg of the callback,
|
|
16
|
-
* is required to be called manually. */
|
|
17
|
-
onPaginate?: (paginationEvent: PaginationEvent, setPageIndex: (index: number) => void) => void;
|
|
18
|
-
}
|
|
19
|
-
interface ManualPaginationProps {
|
|
20
|
-
/** A callback for pagination events. Should map to the Table component's onPaginate prop */
|
|
21
|
-
onPaginate: (index: number, instance: TableInstance) => void;
|
|
22
|
-
/** Additional configuration for the Table component. Should map to the Table component's tableOptions prop */
|
|
23
|
-
tableOptions: {
|
|
24
|
-
useControlledState: (state: Record<string, unknown>) => Record<string, unknown>;
|
|
25
|
-
};
|
|
26
|
-
/** Additional configuration for the Table component. Should map to the Table component's paginationOptions prop */
|
|
27
|
-
paginationOptions: {
|
|
28
|
-
initialState: {
|
|
29
|
-
pageIndex: number;
|
|
30
|
-
pageSize: number;
|
|
31
|
-
};
|
|
32
|
-
manualPagination: boolean;
|
|
33
|
-
pageCount: number;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
interface PageState {
|
|
37
|
-
/** The number of rows a Table shows per page */
|
|
38
|
-
pageSize: number;
|
|
39
|
-
/** The page index a Table will show */
|
|
40
|
-
pageIndex: number;
|
|
41
|
-
/** Updates pageSize */
|
|
42
|
-
setPageSize: (size: number) => void;
|
|
43
|
-
/** Updates pageIndex */
|
|
44
|
-
setPageIndex: (index: number) => void;
|
|
45
|
-
}
|
|
46
|
-
export interface UseManualPaginationResult {
|
|
47
|
-
/** A collection of props for the Table component that will enable manual pagination. Apply with spread operator. */
|
|
48
|
-
manualPaginationProps: ManualPaginationProps;
|
|
49
|
-
/** Stateful values for controlling pages of a Table */
|
|
50
|
-
pageState: PageState;
|
|
51
|
-
}
|
|
52
|
-
export {};
|