@tanstack/table-core 9.0.0-beta.14 → 9.0.0-beta.16
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/dist/core/cells/constructCell.d.cts +2 -2
- package/dist/core/cells/constructCell.d.ts +2 -2
- package/dist/core/cells/coreCellsFeature.types.d.cts +2 -2
- package/dist/core/cells/coreCellsFeature.types.d.ts +2 -2
- package/dist/core/cells/coreCellsFeature.utils.d.cts +2 -2
- package/dist/core/cells/coreCellsFeature.utils.d.ts +2 -2
- package/dist/core/columns/constructColumn.d.cts +2 -2
- package/dist/core/columns/constructColumn.d.ts +2 -2
- package/dist/core/columns/coreColumnsFeature.types.d.cts +2 -2
- package/dist/core/columns/coreColumnsFeature.types.d.ts +2 -2
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +8 -8
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +8 -8
- package/dist/core/headers/buildHeaderGroups.d.cts +2 -2
- package/dist/core/headers/buildHeaderGroups.d.ts +2 -2
- package/dist/core/headers/constructHeader.d.cts +2 -2
- package/dist/core/headers/constructHeader.d.ts +2 -2
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +6 -6
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +6 -6
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +13 -13
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +13 -13
- package/dist/core/row-models/createCoreRowModel.d.cts +2 -2
- package/dist/core/row-models/createCoreRowModel.d.ts +2 -2
- package/dist/core/rows/constructRow.d.cts +2 -2
- package/dist/core/rows/constructRow.d.ts +2 -2
- package/dist/core/rows/coreRowsFeature.types.d.cts +2 -2
- package/dist/core/rows/coreRowsFeature.types.d.ts +2 -2
- package/dist/core/rows/coreRowsFeature.utils.d.cts +3 -3
- package/dist/core/rows/coreRowsFeature.utils.d.ts +3 -3
- package/dist/core/table/coreTablesFeature.types.d.cts +1 -1
- package/dist/core/table/coreTablesFeature.types.d.ts +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +5 -5
- package/dist/core/table/coreTablesFeature.utils.d.ts +5 -5
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +8 -8
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +8 -8
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +12 -12
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +12 -12
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +11 -11
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +11 -11
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +9 -9
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +9 -9
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +29 -29
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +29 -29
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +6 -6
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +6 -6
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +12 -12
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +12 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +14 -14
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +14 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +6 -6
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +6 -6
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +10 -10
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +10 -10
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +17 -17
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +17 -17
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +7 -7
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +7 -7
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +15 -15
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +15 -15
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +16 -16
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +16 -16
- package/dist/fns/filterFns.cjs +2 -2
- package/dist/fns/filterFns.cjs.map +1 -1
- package/dist/fns/filterFns.js +2 -2
- package/dist/fns/filterFns.js.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/types/Column.d.cts +2 -4
- package/dist/types/Column.d.ts +2 -4
- package/dist/types/Table.d.cts +3 -16
- package/dist/types/Table.d.ts +3 -16
- package/dist/types/TableFeatures.d.cts +7 -7
- package/dist/types/TableFeatures.d.ts +7 -7
- package/dist/utils.d.cts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +2 -2
- package/src/core/headers/coreHeadersFeature.types.ts +2 -2
- package/src/fns/filterFns.ts +8 -2
- package/src/types/Column.ts +3 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellData, RowData, Updater } from "../../types/type-utils.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { ColumnFiltersState, FilterFn } from "./columnFilteringFeature.types.js";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import { TableFeatures } from "../../types/TableFeatures.js";
|
|
6
6
|
|
|
7
7
|
//#region src/features/column-filtering/columnFilteringFeature.utils.d.ts
|
|
@@ -29,7 +29,7 @@ declare function getDefaultColumnFiltersState(): ColumnFiltersState;
|
|
|
29
29
|
* const filterFn = column_getAutoFilterFn(column)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
declare function column_getAutoFilterFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
32
|
+
declare function column_getAutoFilterFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): FilterFn<TFeatures, TData> | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Resolves the filter function configured for a column.
|
|
35
35
|
*
|
|
@@ -42,7 +42,7 @@ declare function column_getAutoFilterFn<TFeatures extends TableFeatures, TData e
|
|
|
42
42
|
* const filterFn = column_getFilterFn(column)
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function column_getFilterFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
45
|
+
declare function column_getFilterFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): FilterFn<TFeatures, TData> | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Checks whether column filtering is enabled for this accessor column.
|
|
48
48
|
*
|
|
@@ -54,7 +54,7 @@ declare function column_getFilterFn<TFeatures extends TableFeatures, TData exten
|
|
|
54
54
|
* const canFilter = column_getCanFilter(column)
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
declare function column_getCanFilter<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
57
|
+
declare function column_getCanFilter<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): boolean;
|
|
58
58
|
/**
|
|
59
59
|
* Checks whether this column currently has an entry in `state.columnFilters`.
|
|
60
60
|
*
|
|
@@ -66,7 +66,7 @@ declare function column_getCanFilter<TFeatures extends TableFeatures, TData exte
|
|
|
66
66
|
* const isFiltered = column_getIsFiltered(column)
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
|
-
declare function column_getIsFiltered<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
69
|
+
declare function column_getIsFiltered<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): boolean;
|
|
70
70
|
/**
|
|
71
71
|
* Reads this column's current filter value from `state.columnFilters`.
|
|
72
72
|
*
|
|
@@ -77,7 +77,7 @@ declare function column_getIsFiltered<TFeatures extends TableFeatures, TData ext
|
|
|
77
77
|
* const value = column_getFilterValue(column)
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
declare function column_getFilterValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
80
|
+
declare function column_getFilterValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): unknown;
|
|
81
81
|
/**
|
|
82
82
|
* Finds this column's position in the ordered `state.columnFilters` array.
|
|
83
83
|
*
|
|
@@ -88,7 +88,7 @@ declare function column_getFilterValue<TFeatures extends TableFeatures, TData ex
|
|
|
88
88
|
* const index = column_getFilterIndex(column)
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function column_getFilterIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
91
|
+
declare function column_getFilterIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): number;
|
|
92
92
|
/**
|
|
93
93
|
* Adds, updates, or removes this column's filter value.
|
|
94
94
|
*
|
|
@@ -100,7 +100,7 @@ declare function column_getFilterIndex<TFeatures extends TableFeatures, TData ex
|
|
|
100
100
|
* column_setFilterValue(column, (old) => String(old ?? '').trim())
|
|
101
101
|
* ```
|
|
102
102
|
*/
|
|
103
|
-
declare function column_setFilterValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
103
|
+
declare function column_setFilterValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, value: any): void;
|
|
104
104
|
/**
|
|
105
105
|
* Routes a column filter updater through the table's filter change handler.
|
|
106
106
|
*
|
|
@@ -113,7 +113,7 @@ declare function column_setFilterValue<TFeatures extends TableFeatures, TData ex
|
|
|
113
113
|
* table_setColumnFilters(table, (old) => old.filter((filter) => filter.id !== 'age'))
|
|
114
114
|
* ```
|
|
115
115
|
*/
|
|
116
|
-
declare function table_setColumnFilters<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
116
|
+
declare function table_setColumnFilters<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<ColumnFiltersState>): void;
|
|
117
117
|
/**
|
|
118
118
|
* Resets `columnFilters` to the configured initial state or feature default.
|
|
119
119
|
*
|
|
@@ -126,7 +126,7 @@ declare function table_setColumnFilters<TFeatures extends TableFeatures, TData e
|
|
|
126
126
|
* table_resetColumnFilters(table, true)
|
|
127
127
|
* ```
|
|
128
128
|
*/
|
|
129
|
-
declare function table_resetColumnFilters<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
129
|
+
declare function table_resetColumnFilters<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, defaultState?: boolean): void;
|
|
130
130
|
/**
|
|
131
131
|
* Returns whether a filter value should be removed from filter state.
|
|
132
132
|
*
|
|
@@ -137,7 +137,7 @@ declare function table_resetColumnFilters<TFeatures extends TableFeatures, TData
|
|
|
137
137
|
* const removeFilter = shouldAutoRemoveFilter(filterFn, value, column)
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
declare function shouldAutoRemoveFilter<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(filterFn?: FilterFn<TFeatures, TData>, value?: any, column?:
|
|
140
|
+
declare function shouldAutoRemoveFilter<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(filterFn?: FilterFn<TFeatures, TData>, value?: any, column?: Column<TFeatures, TData, TValue>): boolean;
|
|
141
141
|
//#endregion
|
|
142
142
|
export { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters };
|
|
143
143
|
//# sourceMappingURL=columnFilteringFeature.utils.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { Row } from "../../types/Row.cjs";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
6
6
|
import { AggregationFn, GroupingState, Row_ColumnGrouping } from "./columnGroupingFeature.types.cjs";
|
|
7
7
|
import { Cell } from "../../types/Cell.cjs";
|
|
@@ -30,7 +30,7 @@ declare function getDefaultGroupingState(): GroupingState;
|
|
|
30
30
|
* column_toggleGrouping(column)
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare function column_toggleGrouping<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
33
|
+
declare function column_toggleGrouping<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): void;
|
|
34
34
|
/**
|
|
35
35
|
* Checks whether this column can be used for grouping.
|
|
36
36
|
*
|
|
@@ -42,7 +42,7 @@ declare function column_toggleGrouping<TFeatures extends TableFeatures, TData ex
|
|
|
42
42
|
* const canGroup = column_getCanGroup(column)
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function column_getCanGroup<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
45
|
+
declare function column_getCanGroup<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Checks whether this column id is present in `state.grouping`.
|
|
48
48
|
*
|
|
@@ -54,7 +54,7 @@ declare function column_getCanGroup<TFeatures extends TableFeatures, TData exten
|
|
|
54
54
|
* const isGrouped = column_getIsGrouped(column)
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
declare function column_getIsGrouped<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
57
|
+
declare function column_getIsGrouped<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): boolean;
|
|
58
58
|
/**
|
|
59
59
|
* Finds this column's position in the ordered grouping state.
|
|
60
60
|
*
|
|
@@ -65,7 +65,7 @@ declare function column_getIsGrouped<TFeatures extends TableFeatures, TData exte
|
|
|
65
65
|
* const index = column_getGroupedIndex(column)
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
declare function column_getGroupedIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
68
|
+
declare function column_getGroupedIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): number;
|
|
69
69
|
/**
|
|
70
70
|
* Creates a header/control handler that toggles grouping for this column.
|
|
71
71
|
*
|
|
@@ -76,7 +76,7 @@ declare function column_getGroupedIndex<TFeatures extends TableFeatures, TData e
|
|
|
76
76
|
* const onClick = column_getToggleGroupingHandler(column)
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare function column_getToggleGroupingHandler<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
79
|
+
declare function column_getToggleGroupingHandler<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): () => void;
|
|
80
80
|
/**
|
|
81
81
|
* Chooses a built-in aggregation function from the first core row value.
|
|
82
82
|
*
|
|
@@ -88,7 +88,7 @@ declare function column_getToggleGroupingHandler<TFeatures extends TableFeatures
|
|
|
88
88
|
* const aggregationFn = column_getAutoAggregationFn(column)
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
91
|
+
declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): AggregationFn<TFeatures, TData> | undefined;
|
|
92
92
|
/**
|
|
93
93
|
* Resolves the aggregation function configured for a column.
|
|
94
94
|
*
|
|
@@ -101,7 +101,7 @@ declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TD
|
|
|
101
101
|
* const aggregationFn = column_getAggregationFn(column)
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
declare function column_getAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
104
|
+
declare function column_getAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): AggregationFn<TFeatures, TData> | undefined;
|
|
105
105
|
/**
|
|
106
106
|
* Routes a grouping updater through the table's grouping change handler.
|
|
107
107
|
*
|
|
@@ -113,7 +113,7 @@ declare function column_getAggregationFn<TFeatures extends TableFeatures, TData
|
|
|
113
113
|
* table_setGrouping(table, (old) => [...old, 'status'])
|
|
114
114
|
* ```
|
|
115
115
|
*/
|
|
116
|
-
declare function table_setGrouping<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
116
|
+
declare function table_setGrouping<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<GroupingState>): void;
|
|
117
117
|
/**
|
|
118
118
|
* Resets `grouping` to the configured initial state or feature default.
|
|
119
119
|
*
|
|
@@ -126,7 +126,7 @@ declare function table_setGrouping<TFeatures extends TableFeatures, TData extend
|
|
|
126
126
|
* table_resetGrouping(table, true)
|
|
127
127
|
* ```
|
|
128
128
|
*/
|
|
129
|
-
declare function table_resetGrouping<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
129
|
+
declare function table_resetGrouping<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, defaultState?: boolean): void;
|
|
130
130
|
/**
|
|
131
131
|
* Checks whether this row was created as a grouped row.
|
|
132
132
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellData, RowData, Updater } from "../../types/type-utils.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { Row } from "../../types/Row.js";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import { TableFeatures } from "../../types/TableFeatures.js";
|
|
6
6
|
import { AggregationFn, GroupingState, Row_ColumnGrouping } from "./columnGroupingFeature.types.js";
|
|
7
7
|
import { Cell } from "../../types/Cell.js";
|
|
@@ -30,7 +30,7 @@ declare function getDefaultGroupingState(): GroupingState;
|
|
|
30
30
|
* column_toggleGrouping(column)
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare function column_toggleGrouping<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
33
|
+
declare function column_toggleGrouping<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): void;
|
|
34
34
|
/**
|
|
35
35
|
* Checks whether this column can be used for grouping.
|
|
36
36
|
*
|
|
@@ -42,7 +42,7 @@ declare function column_toggleGrouping<TFeatures extends TableFeatures, TData ex
|
|
|
42
42
|
* const canGroup = column_getCanGroup(column)
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function column_getCanGroup<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
45
|
+
declare function column_getCanGroup<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Checks whether this column id is present in `state.grouping`.
|
|
48
48
|
*
|
|
@@ -54,7 +54,7 @@ declare function column_getCanGroup<TFeatures extends TableFeatures, TData exten
|
|
|
54
54
|
* const isGrouped = column_getIsGrouped(column)
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
declare function column_getIsGrouped<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
57
|
+
declare function column_getIsGrouped<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): boolean;
|
|
58
58
|
/**
|
|
59
59
|
* Finds this column's position in the ordered grouping state.
|
|
60
60
|
*
|
|
@@ -65,7 +65,7 @@ declare function column_getIsGrouped<TFeatures extends TableFeatures, TData exte
|
|
|
65
65
|
* const index = column_getGroupedIndex(column)
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
declare function column_getGroupedIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
68
|
+
declare function column_getGroupedIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): number;
|
|
69
69
|
/**
|
|
70
70
|
* Creates a header/control handler that toggles grouping for this column.
|
|
71
71
|
*
|
|
@@ -76,7 +76,7 @@ declare function column_getGroupedIndex<TFeatures extends TableFeatures, TData e
|
|
|
76
76
|
* const onClick = column_getToggleGroupingHandler(column)
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare function column_getToggleGroupingHandler<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
79
|
+
declare function column_getToggleGroupingHandler<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): () => void;
|
|
80
80
|
/**
|
|
81
81
|
* Chooses a built-in aggregation function from the first core row value.
|
|
82
82
|
*
|
|
@@ -88,7 +88,7 @@ declare function column_getToggleGroupingHandler<TFeatures extends TableFeatures
|
|
|
88
88
|
* const aggregationFn = column_getAutoAggregationFn(column)
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
91
|
+
declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): AggregationFn<TFeatures, TData> | undefined;
|
|
92
92
|
/**
|
|
93
93
|
* Resolves the aggregation function configured for a column.
|
|
94
94
|
*
|
|
@@ -101,7 +101,7 @@ declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TD
|
|
|
101
101
|
* const aggregationFn = column_getAggregationFn(column)
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
declare function column_getAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
104
|
+
declare function column_getAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): AggregationFn<TFeatures, TData> | undefined;
|
|
105
105
|
/**
|
|
106
106
|
* Routes a grouping updater through the table's grouping change handler.
|
|
107
107
|
*
|
|
@@ -113,7 +113,7 @@ declare function column_getAggregationFn<TFeatures extends TableFeatures, TData
|
|
|
113
113
|
* table_setGrouping(table, (old) => [...old, 'status'])
|
|
114
114
|
* ```
|
|
115
115
|
*/
|
|
116
|
-
declare function table_setGrouping<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
116
|
+
declare function table_setGrouping<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<GroupingState>): void;
|
|
117
117
|
/**
|
|
118
118
|
* Resets `grouping` to the configured initial state or feature default.
|
|
119
119
|
*
|
|
@@ -126,7 +126,7 @@ declare function table_setGrouping<TFeatures extends TableFeatures, TData extend
|
|
|
126
126
|
* table_resetGrouping(table, true)
|
|
127
127
|
* ```
|
|
128
128
|
*/
|
|
129
|
-
declare function table_resetGrouping<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
129
|
+
declare function table_resetGrouping<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, defaultState?: boolean): void;
|
|
130
130
|
/**
|
|
131
131
|
* Checks whether this row was created as a grouped row.
|
|
132
132
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
|
|
2
2
|
import { ColumnPinningPosition } from "../column-pinning/columnPinningFeature.types.cjs";
|
|
3
3
|
import { ColumnOrderState } from "./columnOrderingFeature.types.cjs";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
7
7
|
|
|
8
8
|
//#region src/features/column-ordering/columnOrderingFeature.utils.d.ts
|
|
@@ -29,7 +29,7 @@ declare function getDefaultColumnOrderState(): ColumnOrderState;
|
|
|
29
29
|
* const index = column_getIndex(column, 'center')
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
declare function column_getIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
32
|
+
declare function column_getIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, position?: ColumnPinningPosition | 'center'): number;
|
|
33
33
|
/**
|
|
34
34
|
* Checks whether this column is the first visible column in a pinning region.
|
|
35
35
|
*
|
|
@@ -40,7 +40,7 @@ declare function column_getIndex<TFeatures extends TableFeatures, TData extends
|
|
|
40
40
|
* const isFirst = column_getIsFirstColumn(column, 'left')
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
declare function column_getIsFirstColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
43
|
+
declare function column_getIsFirstColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, position?: ColumnPinningPosition | 'center'): boolean;
|
|
44
44
|
/**
|
|
45
45
|
* Checks whether this column is the last visible column in a pinning region.
|
|
46
46
|
*
|
|
@@ -51,7 +51,7 @@ declare function column_getIsFirstColumn<TFeatures extends TableFeatures, TData
|
|
|
51
51
|
* const isLast = column_getIsLastColumn(column, 'right')
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
declare function column_getIsLastColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
54
|
+
declare function column_getIsLastColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, position?: ColumnPinningPosition | 'center'): boolean;
|
|
55
55
|
/**
|
|
56
56
|
* Routes a column order updater through the table's column-order change handler.
|
|
57
57
|
*
|
|
@@ -63,7 +63,7 @@ declare function column_getIsLastColumn<TFeatures extends TableFeatures, TData e
|
|
|
63
63
|
* table_setColumnOrder(table, ['firstName', 'lastName', 'age'])
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
declare function table_setColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
66
|
+
declare function table_setColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<ColumnOrderState>): void;
|
|
67
67
|
/**
|
|
68
68
|
* Resets `columnOrder` to the configured initial state or feature default.
|
|
69
69
|
*
|
|
@@ -76,7 +76,7 @@ declare function table_setColumnOrder<TFeatures extends TableFeatures, TData ext
|
|
|
76
76
|
* table_resetColumnOrder(table, true)
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare function table_resetColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
79
|
+
declare function table_resetColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, defaultState?: boolean): void;
|
|
80
80
|
/**
|
|
81
81
|
* Creates the ordering function used to arrange leaf columns.
|
|
82
82
|
*
|
|
@@ -88,7 +88,7 @@ declare function table_resetColumnOrder<TFeatures extends TableFeatures, TData e
|
|
|
88
88
|
* const orderColumnsForTable = table_getOrderColumnsFn(table)
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function table_getOrderColumnsFn<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
91
|
+
declare function table_getOrderColumnsFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>): (columns: Array<Column<TFeatures, TData, unknown>>) => Column<TFeatures, TData, unknown>[];
|
|
92
92
|
/**
|
|
93
93
|
* Applies grouped-column placement rules to an already ordered leaf-column list.
|
|
94
94
|
*
|
|
@@ -101,7 +101,7 @@ declare function table_getOrderColumnsFn<TFeatures extends TableFeatures, TData
|
|
|
101
101
|
* const orderedColumns = orderColumns(table, leafColumns)
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
declare function orderColumns<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
104
|
+
declare function orderColumns<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, leafColumns: Array<Column<TFeatures, TData, unknown>>): Column<TFeatures, TData, unknown>[];
|
|
105
105
|
//#endregion
|
|
106
106
|
export { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder };
|
|
107
107
|
//# sourceMappingURL=columnOrderingFeature.utils.d.cts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CellData, RowData, Updater } from "../../types/type-utils.js";
|
|
2
2
|
import { ColumnPinningPosition } from "../column-pinning/columnPinningFeature.types.js";
|
|
3
3
|
import { ColumnOrderState } from "./columnOrderingFeature.types.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
import { TableFeatures } from "../../types/TableFeatures.js";
|
|
7
7
|
|
|
8
8
|
//#region src/features/column-ordering/columnOrderingFeature.utils.d.ts
|
|
@@ -29,7 +29,7 @@ declare function getDefaultColumnOrderState(): ColumnOrderState;
|
|
|
29
29
|
* const index = column_getIndex(column, 'center')
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
declare function column_getIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
32
|
+
declare function column_getIndex<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, position?: ColumnPinningPosition | 'center'): number;
|
|
33
33
|
/**
|
|
34
34
|
* Checks whether this column is the first visible column in a pinning region.
|
|
35
35
|
*
|
|
@@ -40,7 +40,7 @@ declare function column_getIndex<TFeatures extends TableFeatures, TData extends
|
|
|
40
40
|
* const isFirst = column_getIsFirstColumn(column, 'left')
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
declare function column_getIsFirstColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
43
|
+
declare function column_getIsFirstColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, position?: ColumnPinningPosition | 'center'): boolean;
|
|
44
44
|
/**
|
|
45
45
|
* Checks whether this column is the last visible column in a pinning region.
|
|
46
46
|
*
|
|
@@ -51,7 +51,7 @@ declare function column_getIsFirstColumn<TFeatures extends TableFeatures, TData
|
|
|
51
51
|
* const isLast = column_getIsLastColumn(column, 'right')
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
declare function column_getIsLastColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column:
|
|
54
|
+
declare function column_getIsLastColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, position?: ColumnPinningPosition | 'center'): boolean;
|
|
55
55
|
/**
|
|
56
56
|
* Routes a column order updater through the table's column-order change handler.
|
|
57
57
|
*
|
|
@@ -63,7 +63,7 @@ declare function column_getIsLastColumn<TFeatures extends TableFeatures, TData e
|
|
|
63
63
|
* table_setColumnOrder(table, ['firstName', 'lastName', 'age'])
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
declare function table_setColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
66
|
+
declare function table_setColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<ColumnOrderState>): void;
|
|
67
67
|
/**
|
|
68
68
|
* Resets `columnOrder` to the configured initial state or feature default.
|
|
69
69
|
*
|
|
@@ -76,7 +76,7 @@ declare function table_setColumnOrder<TFeatures extends TableFeatures, TData ext
|
|
|
76
76
|
* table_resetColumnOrder(table, true)
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare function table_resetColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
79
|
+
declare function table_resetColumnOrder<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, defaultState?: boolean): void;
|
|
80
80
|
/**
|
|
81
81
|
* Creates the ordering function used to arrange leaf columns.
|
|
82
82
|
*
|
|
@@ -88,7 +88,7 @@ declare function table_resetColumnOrder<TFeatures extends TableFeatures, TData e
|
|
|
88
88
|
* const orderColumnsForTable = table_getOrderColumnsFn(table)
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function table_getOrderColumnsFn<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
91
|
+
declare function table_getOrderColumnsFn<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>): (columns: Array<Column<TFeatures, TData, unknown>>) => Column<TFeatures, TData, unknown>[];
|
|
92
92
|
/**
|
|
93
93
|
* Applies grouped-column placement rules to an already ordered leaf-column list.
|
|
94
94
|
*
|
|
@@ -101,7 +101,7 @@ declare function table_getOrderColumnsFn<TFeatures extends TableFeatures, TData
|
|
|
101
101
|
* const orderedColumns = orderColumns(table, leafColumns)
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
declare function orderColumns<TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
104
|
+
declare function orderColumns<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, leafColumns: Array<Column<TFeatures, TData, unknown>>): Column<TFeatures, TData, unknown>[];
|
|
105
105
|
//#endregion
|
|
106
106
|
export { column_getIndex, column_getIsFirstColumn, column_getIsLastColumn, getDefaultColumnOrderState, orderColumns, table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder };
|
|
107
107
|
//# sourceMappingURL=columnOrderingFeature.utils.d.ts.map
|