@tanstack/table-core 9.0.0-beta.50 → 9.0.0-beta.52
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/features/column-grouping/createGroupedRowModel.cjs +22 -14
- package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.cts +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.ts +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.js +21 -13
- package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
- package/dist/features/{aggregation → row-aggregation}/aggregationFns.cjs +93 -48
- package/dist/features/row-aggregation/aggregationFns.cjs.map +1 -0
- package/dist/features/{aggregation → row-aggregation}/aggregationFns.d.cts +2 -2
- package/dist/features/{aggregation → row-aggregation}/aggregationFns.d.ts +2 -2
- package/dist/features/{aggregation → row-aggregation}/aggregationFns.js +82 -37
- package/dist/features/row-aggregation/aggregationFns.js.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.cjs +36 -0
- package/dist/features/row-aggregation/rowAggregationFeature.cjs.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.d.cts +10 -0
- package/dist/features/row-aggregation/rowAggregationFeature.d.ts +10 -0
- package/dist/features/{aggregation/aggregationFeature.js → row-aggregation/rowAggregationFeature.js} +8 -11
- package/dist/features/row-aggregation/rowAggregationFeature.js.map +1 -0
- package/dist/features/{aggregation/aggregationFeature.types.cjs → row-aggregation/rowAggregationFeature.types.cjs} +2 -2
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs.map +1 -0
- package/dist/features/{aggregation/aggregationFeature.types.d.cts → row-aggregation/rowAggregationFeature.types.d.cts} +8 -8
- package/dist/features/{aggregation/aggregationFeature.types.d.ts → row-aggregation/rowAggregationFeature.types.d.ts} +8 -8
- package/dist/features/{aggregation/aggregationFeature.types.js → row-aggregation/rowAggregationFeature.types.js} +2 -2
- package/dist/features/row-aggregation/rowAggregationFeature.types.js.map +1 -0
- package/dist/features/{aggregation/aggregationFeature.utils.cjs → row-aggregation/rowAggregationFeature.utils.cjs} +37 -6
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs.map +1 -0
- package/dist/features/{aggregation/aggregationFeature.utils.d.cts → row-aggregation/rowAggregationFeature.utils.d.cts} +18 -4
- package/dist/features/{aggregation/aggregationFeature.utils.d.ts → row-aggregation/rowAggregationFeature.utils.d.ts} +18 -4
- package/dist/features/{aggregation/aggregationFeature.utils.js → row-aggregation/rowAggregationFeature.utils.js} +37 -7
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js.map +1 -0
- package/dist/features/stockFeatures.cjs +2 -2
- package/dist/features/stockFeatures.cjs.map +1 -1
- package/dist/features/stockFeatures.d.cts +2 -2
- package/dist/features/stockFeatures.d.ts +2 -2
- package/dist/features/stockFeatures.js +2 -2
- package/dist/features/stockFeatures.js.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/static-functions.cjs +9 -8
- package/dist/static-functions.d.cts +2 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/types/Cell.d.cts +2 -2
- package/dist/types/Cell.d.ts +2 -2
- package/dist/types/Column.d.cts +2 -2
- package/dist/types/Column.d.ts +2 -2
- package/dist/types/ColumnDef.d.cts +2 -2
- package/dist/types/ColumnDef.d.ts +2 -2
- package/dist/types/Row.d.cts +2 -2
- package/dist/types/Row.d.ts +2 -2
- package/dist/types/RowModelFns.d.cts +2 -2
- package/dist/types/RowModelFns.d.ts +2 -2
- package/dist/types/TableFeatures.d.cts +2 -2
- package/dist/types/TableFeatures.d.ts +2 -2
- package/dist/types/TableOptions.d.cts +3 -3
- package/dist/types/TableOptions.d.ts +3 -3
- package/dist/worker/initTableWorker.cjs.map +1 -1
- package/dist/worker/initTableWorker.js.map +1 -1
- package/package.json +1 -1
- package/skills/aggregation/SKILL.md +6 -6
- package/skills/api-not-found/SKILL.md +1 -1
- package/skills/client-vs-server/SKILL.md +1 -1
- package/skills/column-faceting/SKILL.md +1 -1
- package/skills/column-filtering/SKILL.md +1 -1
- package/skills/column-ordering/SKILL.md +1 -1
- package/skills/column-pinning/SKILL.md +1 -1
- package/skills/column-resizing/SKILL.md +1 -1
- package/skills/column-sizing/SKILL.md +1 -1
- package/skills/column-visibility/SKILL.md +1 -1
- package/skills/core/SKILL.md +1 -1
- package/skills/custom-features/SKILL.md +1 -1
- package/skills/expanding/SKILL.md +1 -1
- package/skills/global-filtering/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/migrate-v8-to-v9/SKILL.md +8 -8
- package/skills/pagination/SKILL.md +1 -1
- package/skills/row-pinning/SKILL.md +1 -1
- package/skills/row-selection/SKILL.md +1 -1
- package/skills/sorting/SKILL.md +1 -1
- package/skills/table-features/SKILL.md +5 -5
- package/skills/typescript/SKILL.md +1 -1
- package/src/features/column-grouping/createGroupedRowModel.ts +49 -12
- package/src/features/{aggregation → row-aggregation}/aggregationFns.ts +81 -43
- package/src/features/{aggregation/aggregationFeature.ts → row-aggregation/rowAggregationFeature.ts} +5 -9
- package/src/features/{aggregation/aggregationFeature.types.ts → row-aggregation/rowAggregationFeature.types.ts} +6 -6
- package/src/features/{aggregation/aggregationFeature.utils.ts → row-aggregation/rowAggregationFeature.utils.ts} +61 -4
- package/src/features/stockFeatures.ts +3 -3
- package/src/index.ts +4 -4
- package/src/static-functions.ts +1 -1
- package/src/types/Cell.ts +2 -2
- package/src/types/Column.ts +2 -2
- package/src/types/ColumnDef.ts +2 -2
- package/src/types/Row.ts +2 -2
- package/src/types/RowModelFns.ts +2 -2
- package/src/types/TableFeatures.ts +2 -2
- package/src/types/TableOptions.ts +3 -3
- package/src/worker/initTableWorker.ts +1 -1
- package/dist/features/aggregation/aggregationFeature.cjs +0 -39
- package/dist/features/aggregation/aggregationFeature.cjs.map +0 -1
- package/dist/features/aggregation/aggregationFeature.d.cts +0 -10
- package/dist/features/aggregation/aggregationFeature.d.ts +0 -10
- package/dist/features/aggregation/aggregationFeature.js.map +0 -1
- package/dist/features/aggregation/aggregationFeature.types.cjs.map +0 -1
- package/dist/features/aggregation/aggregationFeature.types.js.map +0 -1
- package/dist/features/aggregation/aggregationFeature.utils.cjs.map +0 -1
- package/dist/features/aggregation/aggregationFeature.utils.js.map +0 -1
- package/dist/features/aggregation/aggregationFns.cjs.map +0 -1
- package/dist/features/aggregation/aggregationFns.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { constructAggregationFn } from './
|
|
2
|
-
import type { AggregationContext } from './aggregationFeature.types'
|
|
1
|
+
import { constructAggregationFn } from './rowAggregationFeature.types'
|
|
3
2
|
|
|
4
3
|
type RangeValue = Date | number
|
|
5
4
|
|
|
@@ -23,19 +22,9 @@ function compareRangeValues(left: RangeValue, right: RangeValue) {
|
|
|
23
22
|
return leftValue - rightValue
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for (let i = 0; i < context.rows.length; i++) {
|
|
31
|
-
const value = context.getValue(context.rows[i]!)
|
|
32
|
-
const valueKind = getRangeKind(value)
|
|
33
|
-
if (!valueKind) continue
|
|
34
|
-
kind ??= valueKind
|
|
35
|
-
if (valueKind === kind) values.push(value as RangeValue)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return values
|
|
25
|
+
/** Comparable representation of a range value; `Date`s compare by time. */
|
|
26
|
+
function toRangeNumber(value: RangeValue): number {
|
|
27
|
+
return value instanceof Date ? value.getTime() : value
|
|
39
28
|
}
|
|
40
29
|
|
|
41
30
|
/**
|
|
@@ -49,9 +38,10 @@ export const aggregationFn_sum = constructAggregationFn<
|
|
|
49
38
|
number
|
|
50
39
|
>({
|
|
51
40
|
aggregate: (context) => {
|
|
41
|
+
const rows = context.rows
|
|
52
42
|
let sum = 0
|
|
53
|
-
for (let i = 0; i <
|
|
54
|
-
const value = context.getValue(
|
|
43
|
+
for (let i = 0; i < rows.length; i++) {
|
|
44
|
+
const value = context.getValue(rows[i]!)
|
|
55
45
|
sum += typeof value === 'number' ? value : 0
|
|
56
46
|
}
|
|
57
47
|
return sum
|
|
@@ -77,10 +67,23 @@ export const aggregationFn_min = constructAggregationFn<
|
|
|
77
67
|
RangeValue | undefined
|
|
78
68
|
>({
|
|
79
69
|
aggregate: (context) => {
|
|
80
|
-
const
|
|
81
|
-
let
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
const rows = context.rows
|
|
71
|
+
let kind: 'date' | 'number' | undefined
|
|
72
|
+
let result: RangeValue | undefined
|
|
73
|
+
let resultNumber = 0
|
|
74
|
+
for (let i = 0; i < rows.length; i++) {
|
|
75
|
+
const value = context.getValue(rows[i]!)
|
|
76
|
+
const valueKind = getRangeKind(value)
|
|
77
|
+
if (!valueKind || (kind !== undefined && valueKind !== kind)) continue
|
|
78
|
+
const valueNumber = toRangeNumber(value as RangeValue)
|
|
79
|
+
if (kind === undefined) {
|
|
80
|
+
kind = valueKind
|
|
81
|
+
result = value as RangeValue
|
|
82
|
+
resultNumber = valueNumber
|
|
83
|
+
} else if (valueNumber - resultNumber < 0) {
|
|
84
|
+
result = value as RangeValue
|
|
85
|
+
resultNumber = valueNumber
|
|
86
|
+
}
|
|
84
87
|
}
|
|
85
88
|
return result
|
|
86
89
|
},
|
|
@@ -113,10 +116,23 @@ export const aggregationFn_max = constructAggregationFn<
|
|
|
113
116
|
RangeValue | undefined
|
|
114
117
|
>({
|
|
115
118
|
aggregate: (context) => {
|
|
116
|
-
const
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
const rows = context.rows
|
|
120
|
+
let kind: 'date' | 'number' | undefined
|
|
121
|
+
let result: RangeValue | undefined
|
|
122
|
+
let resultNumber = 0
|
|
123
|
+
for (let i = 0; i < rows.length; i++) {
|
|
124
|
+
const value = context.getValue(rows[i]!)
|
|
125
|
+
const valueKind = getRangeKind(value)
|
|
126
|
+
if (!valueKind || (kind !== undefined && valueKind !== kind)) continue
|
|
127
|
+
const valueNumber = toRangeNumber(value as RangeValue)
|
|
128
|
+
if (kind === undefined) {
|
|
129
|
+
kind = valueKind
|
|
130
|
+
result = value as RangeValue
|
|
131
|
+
resultNumber = valueNumber
|
|
132
|
+
} else if (valueNumber - resultNumber > 0) {
|
|
133
|
+
result = value as RangeValue
|
|
134
|
+
resultNumber = valueNumber
|
|
135
|
+
}
|
|
120
136
|
}
|
|
121
137
|
return result
|
|
122
138
|
},
|
|
@@ -150,15 +166,33 @@ export const aggregationFn_extent = constructAggregationFn<
|
|
|
150
166
|
[RangeValue | undefined, RangeValue | undefined]
|
|
151
167
|
>({
|
|
152
168
|
aggregate: (context) => {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
let min
|
|
156
|
-
let max
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
169
|
+
const rows = context.rows
|
|
170
|
+
let kind: 'date' | 'number' | undefined
|
|
171
|
+
let min: RangeValue | undefined
|
|
172
|
+
let max: RangeValue | undefined
|
|
173
|
+
let minNumber = 0
|
|
174
|
+
let maxNumber = 0
|
|
175
|
+
for (let i = 0; i < rows.length; i++) {
|
|
176
|
+
const value = context.getValue(rows[i]!)
|
|
177
|
+
const valueKind = getRangeKind(value)
|
|
178
|
+
if (!valueKind || (kind !== undefined && valueKind !== kind)) continue
|
|
179
|
+
const valueNumber = toRangeNumber(value as RangeValue)
|
|
180
|
+
if (kind === undefined) {
|
|
181
|
+
kind = valueKind
|
|
182
|
+
min = max = value as RangeValue
|
|
183
|
+
minNumber = maxNumber = valueNumber
|
|
184
|
+
} else {
|
|
185
|
+
if (valueNumber - minNumber < 0) {
|
|
186
|
+
min = value as RangeValue
|
|
187
|
+
minNumber = valueNumber
|
|
188
|
+
}
|
|
189
|
+
if (valueNumber - maxNumber > 0) {
|
|
190
|
+
max = value as RangeValue
|
|
191
|
+
maxNumber = valueNumber
|
|
192
|
+
}
|
|
193
|
+
}
|
|
161
194
|
}
|
|
195
|
+
if (kind === undefined) return [undefined, undefined]
|
|
162
196
|
return [min, max]
|
|
163
197
|
},
|
|
164
198
|
merge: ({ subRowResults }) => {
|
|
@@ -205,10 +239,11 @@ export const aggregationFn_mean = constructAggregationFn<
|
|
|
205
239
|
number | undefined
|
|
206
240
|
>({
|
|
207
241
|
aggregate: (context) => {
|
|
242
|
+
const rows = context.rows
|
|
208
243
|
let count = 0
|
|
209
244
|
let sum = 0
|
|
210
|
-
for (let i = 0; i <
|
|
211
|
-
const value = context.getValue(
|
|
245
|
+
for (let i = 0; i < rows.length; i++) {
|
|
246
|
+
const value = context.getValue(rows[i]!)
|
|
212
247
|
if (value == null) continue
|
|
213
248
|
const numberValue = typeof value === 'number' ? value : +value
|
|
214
249
|
if (!Number.isNaN(numberValue)) {
|
|
@@ -231,10 +266,11 @@ export const aggregationFn_median = constructAggregationFn<
|
|
|
231
266
|
number | undefined
|
|
232
267
|
>({
|
|
233
268
|
aggregate: (context) => {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
269
|
+
const rows = context.rows
|
|
270
|
+
if (!rows.length) return undefined
|
|
271
|
+
const values = new Array<number>(rows.length)
|
|
272
|
+
for (let i = 0; i < rows.length; i++) {
|
|
273
|
+
const value = context.getValue(rows[i]!)
|
|
238
274
|
if (typeof value !== 'number') return undefined
|
|
239
275
|
values[i] = value
|
|
240
276
|
}
|
|
@@ -254,9 +290,10 @@ export const aggregationFn_unique = constructAggregationFn<
|
|
|
254
290
|
Array<unknown>
|
|
255
291
|
>({
|
|
256
292
|
aggregate: (context) => {
|
|
293
|
+
const rows = context.rows
|
|
257
294
|
const values = new Set<unknown>()
|
|
258
|
-
for (let i = 0; i <
|
|
259
|
-
values.add(context.getValue(
|
|
295
|
+
for (let i = 0; i < rows.length; i++) {
|
|
296
|
+
values.add(context.getValue(rows[i]!))
|
|
260
297
|
}
|
|
261
298
|
return Array.from(values)
|
|
262
299
|
},
|
|
@@ -270,9 +307,10 @@ export const aggregationFn_uniqueCount = constructAggregationFn<
|
|
|
270
307
|
number
|
|
271
308
|
>({
|
|
272
309
|
aggregate: (context) => {
|
|
310
|
+
const rows = context.rows
|
|
273
311
|
const values = new Set<unknown>()
|
|
274
|
-
for (let i = 0; i <
|
|
275
|
-
values.add(context.getValue(
|
|
312
|
+
for (let i = 0; i < rows.length; i++) {
|
|
313
|
+
values.add(context.getValue(rows[i]!))
|
|
276
314
|
}
|
|
277
315
|
return values.size
|
|
278
316
|
},
|
package/src/features/{aggregation/aggregationFeature.ts → row-aggregation/rowAggregationFeature.ts}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { assignPrototypeAPIs
|
|
1
|
+
import { assignPrototypeAPIs } from '../../utils'
|
|
2
2
|
import {
|
|
3
3
|
cell_getIsAggregated,
|
|
4
4
|
column_getAggregationFns,
|
|
5
5
|
column_getAggregationValue,
|
|
6
6
|
column_getAutoAggregationFn,
|
|
7
7
|
formatAggregatedCellValue,
|
|
8
|
-
} from './
|
|
8
|
+
} from './rowAggregationFeature.utils'
|
|
9
9
|
import type { TableFeature } from '../../types/TableFeatures'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Independent aggregation feature for grouped values and root/custom-row totals.
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
14
|
+
export const rowAggregationFeature: TableFeature = {
|
|
15
15
|
getDefaultColumnDef: () => ({
|
|
16
16
|
aggregatedCell: ({ column, getValue }: any) =>
|
|
17
17
|
formatAggregatedCellValue(getValue(), column.columnDef.aggregationFn),
|
|
@@ -24,7 +24,7 @@ export const aggregationFeature: TableFeature = {
|
|
|
24
24
|
}),
|
|
25
25
|
|
|
26
26
|
assignCellPrototype: (prototype, table) => {
|
|
27
|
-
assignPrototypeAPIs('
|
|
27
|
+
assignPrototypeAPIs('rowAggregationFeature', prototype, table, {
|
|
28
28
|
cell_getIsAggregated: {
|
|
29
29
|
fn: (cell) => cell_getIsAggregated(cell),
|
|
30
30
|
},
|
|
@@ -32,7 +32,7 @@ export const aggregationFeature: TableFeature = {
|
|
|
32
32
|
},
|
|
33
33
|
|
|
34
34
|
assignColumnPrototype: (prototype, table) => {
|
|
35
|
-
assignPrototypeAPIs('
|
|
35
|
+
assignPrototypeAPIs('rowAggregationFeature', prototype, table, {
|
|
36
36
|
column_getAggregationFns: {
|
|
37
37
|
fn: (column) => column_getAggregationFns(column),
|
|
38
38
|
},
|
|
@@ -53,8 +53,4 @@ export const aggregationFeature: TableFeature = {
|
|
|
53
53
|
;(column as any)._aggregationValueCache = undefined
|
|
54
54
|
;(column as any)._resolvedAggregationFnsCache = undefined
|
|
55
55
|
},
|
|
56
|
-
|
|
57
|
-
initRowInstanceData: (row) => {
|
|
58
|
-
;(row as any)._aggregationValuesCache = makeObjectMap()
|
|
59
|
-
},
|
|
60
56
|
}
|
|
@@ -229,7 +229,7 @@ export interface ResolvedAggregationFn<
|
|
|
229
229
|
id: string | undefined
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
/** Column-definition options installed by `
|
|
232
|
+
/** Column-definition options installed by `rowAggregationFeature`. */
|
|
233
233
|
export interface ColumnDef_Aggregation<
|
|
234
234
|
in out TFeatures extends TableFeatures,
|
|
235
235
|
in out TData extends RowData,
|
|
@@ -260,7 +260,7 @@ export interface ColumnDef_Aggregation<
|
|
|
260
260
|
) => AggregationValueResult | undefined
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
/** Column instance APIs installed by `
|
|
263
|
+
/** Column instance APIs installed by `rowAggregationFeature`. */
|
|
264
264
|
export interface Column_Aggregation<
|
|
265
265
|
in out TFeatures extends TableFeatures,
|
|
266
266
|
in out TData extends RowData,
|
|
@@ -294,7 +294,7 @@ export interface AggregationValueOptions<
|
|
|
294
294
|
rows?: ReadonlyArray<Row<TFeatures, TData>>
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
/** Cell instance APIs installed by `
|
|
297
|
+
/** Cell instance APIs installed by `rowAggregationFeature`. */
|
|
298
298
|
export interface Cell_Aggregation {
|
|
299
299
|
/** Whether this cell displays an aggregate on a synthetic grouped row. */
|
|
300
300
|
getIsAggregated: () => boolean
|
|
@@ -302,8 +302,8 @@ export interface Cell_Aggregation {
|
|
|
302
302
|
|
|
303
303
|
/** Internal per-row cache used while grouped aggregates are evaluated. */
|
|
304
304
|
export interface Row_Aggregation {
|
|
305
|
-
/** Cached aggregate results keyed by column id. */
|
|
306
|
-
_aggregationValuesCache
|
|
305
|
+
/** Cached aggregate results keyed by column id; created lazily on grouped rows. */
|
|
306
|
+
_aggregationValuesCache?: Record<string, unknown>
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
/** Values passed to a column-level aggregation-value provider. */
|
|
@@ -328,7 +328,7 @@ export interface AggregationValueResult<TResult = unknown> {
|
|
|
328
328
|
value: TResult
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
/** Table options installed by `
|
|
331
|
+
/** Table options installed by `rowAggregationFeature`. */
|
|
332
332
|
export interface TableOptions_Aggregation {
|
|
333
333
|
/**
|
|
334
334
|
* Disables local `column.getAggregationValue()` calculation when a column
|
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
AggregationValueOptions,
|
|
13
13
|
ColumnAggregationValue,
|
|
14
14
|
ResolvedAggregationFn,
|
|
15
|
-
} from './
|
|
15
|
+
} from './rowAggregationFeature.types'
|
|
16
16
|
|
|
17
17
|
interface AggregationCacheEntry {
|
|
18
18
|
aggregationFnOption: unknown
|
|
@@ -95,6 +95,52 @@ export function normalizeAggregationRows<
|
|
|
95
95
|
return result
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Frontier selection for rows that are distinct nodes of a single row tree —
|
|
100
|
+
* the row models the table builds itself. Skips `normalizeAggregationRows`'
|
|
101
|
+
* duplicate-id guard (disjoint subtrees cannot revisit a row) and returns
|
|
102
|
+
* `rows` unchanged when no row descends, so the default `maxDepth: 0` case
|
|
103
|
+
* costs nothing per aggregation.
|
|
104
|
+
*/
|
|
105
|
+
export function normalizeUniqueAggregationRows<
|
|
106
|
+
TFeatures extends TableFeatures,
|
|
107
|
+
TData extends RowData,
|
|
108
|
+
>(
|
|
109
|
+
rows: ReadonlyArray<Row<TFeatures, TData>>,
|
|
110
|
+
maxDepth = 0,
|
|
111
|
+
): ReadonlyArray<Row<TFeatures, TData>> {
|
|
112
|
+
const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)
|
|
113
|
+
|
|
114
|
+
let needsDescent = false
|
|
115
|
+
if (normalizedMaxDepth > 0) {
|
|
116
|
+
for (let i = 0; i < rows.length; i++) {
|
|
117
|
+
if (rows[i]!.subRows.length) {
|
|
118
|
+
needsDescent = true
|
|
119
|
+
break
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (!needsDescent) return rows
|
|
124
|
+
|
|
125
|
+
const result: Array<Row<TFeatures, TData>> = []
|
|
126
|
+
|
|
127
|
+
const visit = (row: Row<TFeatures, TData>, depth: number) => {
|
|
128
|
+
if (row.subRows.length && depth < normalizedMaxDepth) {
|
|
129
|
+
for (let i = 0; i < row.subRows.length; i++) {
|
|
130
|
+
visit(row.subRows[i]!, depth + 1)
|
|
131
|
+
}
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
result.push(row)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
for (let i = 0; i < rows.length; i++) {
|
|
138
|
+
visit(rows[i]!, 0)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return result
|
|
142
|
+
}
|
|
143
|
+
|
|
98
144
|
function getAutoAggregationFnName(
|
|
99
145
|
value: unknown,
|
|
100
146
|
): 'extent' | 'sum' | undefined {
|
|
@@ -267,13 +313,21 @@ export function aggregateColumnValue<
|
|
|
267
313
|
column: Column<TFeatures, TData, unknown>
|
|
268
314
|
groupingRow?: Row<TFeatures, TData>
|
|
269
315
|
rows: ReadonlyArray<Row<TFeatures, TData>>
|
|
316
|
+
/**
|
|
317
|
+
* Marks `rows` as distinct nodes of a single row tree (rows the table's own
|
|
318
|
+
* row models produced), enabling frontier selection without the
|
|
319
|
+
* duplicate-id guard. Caller-supplied row arrays must omit this.
|
|
320
|
+
*/
|
|
321
|
+
uniqueRows?: boolean
|
|
270
322
|
}): unknown {
|
|
271
|
-
const { subRows, column, groupingRow, rows } = args
|
|
323
|
+
const { subRows, column, groupingRow, rows, uniqueRows } = args
|
|
272
324
|
const internalColumn = column as Column_Internal<TFeatures, TData, unknown>
|
|
273
325
|
const maxDepth = resolveMaxAggregationDepth(
|
|
274
326
|
args.maxDepth ?? internalColumn.columnDef.maxAggregationDepth,
|
|
275
327
|
)
|
|
276
|
-
const aggregationRows =
|
|
328
|
+
const aggregationRows = uniqueRows
|
|
329
|
+
? normalizeUniqueAggregationRows(rows, maxDepth)
|
|
330
|
+
: normalizeAggregationRows(rows, maxDepth)
|
|
277
331
|
const entries = column_getAggregationFns(internalColumn)
|
|
278
332
|
const isMultiple = Array.isArray(internalColumn.columnDef.aggregationFn)
|
|
279
333
|
const canMerge =
|
|
@@ -284,6 +338,8 @@ export function aggregateColumnValue<
|
|
|
284
338
|
(row as any).groupingColumnId !== column.id,
|
|
285
339
|
)
|
|
286
340
|
|
|
341
|
+
const getValue = (row: Row<TFeatures, TData>) => row.getValue(column.id)
|
|
342
|
+
|
|
287
343
|
const execute = (entry: ResolvedAggregationFn<TFeatures, TData>) => {
|
|
288
344
|
const definition = entry.aggregationFn
|
|
289
345
|
if (!definition) return undefined
|
|
@@ -292,7 +348,7 @@ export function aggregateColumnValue<
|
|
|
292
348
|
...(subRows ? { subRows } : {}),
|
|
293
349
|
column,
|
|
294
350
|
columnId: column.id,
|
|
295
|
-
getValue
|
|
351
|
+
getValue,
|
|
296
352
|
...(groupingRow ? { groupingRow } : {}),
|
|
297
353
|
maxDepth,
|
|
298
354
|
rows: aggregationRows,
|
|
@@ -378,6 +434,7 @@ export function column_getAggregationValue<
|
|
|
378
434
|
column: column as any,
|
|
379
435
|
maxDepth: resolvedMaxDepth,
|
|
380
436
|
rows: model.rows,
|
|
437
|
+
uniqueRows: true,
|
|
381
438
|
})
|
|
382
439
|
;(column as any)._aggregationValueCache = {
|
|
383
440
|
aggregationFnOption,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { columnFacetingFeature } from './column-faceting/columnFacetingFeature'
|
|
2
|
-
import {
|
|
2
|
+
import { rowAggregationFeature } from './row-aggregation/rowAggregationFeature'
|
|
3
3
|
import { columnFilteringFeature } from './column-filtering/columnFilteringFeature'
|
|
4
4
|
import { columnGroupingFeature } from './column-grouping/columnGroupingFeature'
|
|
5
5
|
import { columnOrderingFeature } from './column-ordering/columnOrderingFeature'
|
|
@@ -15,7 +15,7 @@ import { rowSelectionFeature } from './row-selection/rowSelectionFeature'
|
|
|
15
15
|
import { rowSortingFeature } from './row-sorting/rowSortingFeature'
|
|
16
16
|
|
|
17
17
|
export interface StockFeatures {
|
|
18
|
-
|
|
18
|
+
rowAggregationFeature: typeof rowAggregationFeature
|
|
19
19
|
columnFacetingFeature: typeof columnFacetingFeature
|
|
20
20
|
columnFilteringFeature: typeof columnFilteringFeature
|
|
21
21
|
columnGroupingFeature: typeof columnGroupingFeature
|
|
@@ -38,7 +38,7 @@ export interface StockFeatures {
|
|
|
38
38
|
* Use individual feature exports for tree-shaking, or this aggregate when a table should include every built-in feature.
|
|
39
39
|
*/
|
|
40
40
|
export const stockFeatures: StockFeatures = {
|
|
41
|
-
|
|
41
|
+
rowAggregationFeature,
|
|
42
42
|
columnFacetingFeature,
|
|
43
43
|
columnFilteringFeature,
|
|
44
44
|
columnGroupingFeature,
|
package/src/index.ts
CHANGED
|
@@ -64,10 +64,10 @@ export * from './core/table/coreTablesFeature.types'
|
|
|
64
64
|
|
|
65
65
|
export * from './features/stockFeatures'
|
|
66
66
|
|
|
67
|
-
//
|
|
68
|
-
export * from './features/aggregation/
|
|
69
|
-
export * from './features/aggregation/
|
|
70
|
-
export * from './features/aggregation/aggregationFns'
|
|
67
|
+
// rowAggregationFeature
|
|
68
|
+
export * from './features/row-aggregation/rowAggregationFeature'
|
|
69
|
+
export * from './features/row-aggregation/rowAggregationFeature.types'
|
|
70
|
+
export * from './features/row-aggregation/aggregationFns'
|
|
71
71
|
|
|
72
72
|
// columnFacetingFeature
|
|
73
73
|
export * from './features/column-faceting/columnFacetingFeature'
|
package/src/static-functions.ts
CHANGED
|
@@ -15,7 +15,7 @@ export * from './core/row-models/coreRowModelsFeature.utils'
|
|
|
15
15
|
export * from './core/table/coreTablesFeature.utils'
|
|
16
16
|
|
|
17
17
|
// Features
|
|
18
|
-
export * from './features/aggregation/
|
|
18
|
+
export * from './features/row-aggregation/rowAggregationFeature.utils'
|
|
19
19
|
export * from './features/column-faceting/columnFacetingFeature.utils'
|
|
20
20
|
export * from './features/column-filtering/columnFilteringFeature.utils'
|
|
21
21
|
export * from './features/column-grouping/columnGroupingFeature.utils'
|
package/src/types/Cell.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Cell_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'
|
|
2
|
-
import type { Cell_Aggregation } from '../features/aggregation/
|
|
2
|
+
import type { Cell_Aggregation } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
3
3
|
import type { CellData, RowData } from './type-utils'
|
|
4
4
|
import type { ExtractFeatureMapTypes, TableFeatures } from './TableFeatures'
|
|
5
5
|
import type { Cell_Cell } from '../core/cells/coreCellsFeature.types'
|
|
@@ -11,7 +11,7 @@ export interface Cell_Core<
|
|
|
11
11
|
> extends Cell_Cell<TFeatures, TData, TValue> {}
|
|
12
12
|
|
|
13
13
|
export interface Cell_FeatureMap {
|
|
14
|
-
|
|
14
|
+
rowAggregationFeature: Cell_Aggregation
|
|
15
15
|
columnGroupingFeature: Cell_ColumnGrouping
|
|
16
16
|
}
|
|
17
17
|
|
package/src/types/Column.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Table_Internal } from './Table'
|
|
2
2
|
import type { Column_RowSorting } from '../features/row-sorting/rowSortingFeature.types'
|
|
3
|
-
import type { Column_Aggregation } from '../features/aggregation/
|
|
3
|
+
import type { Column_Aggregation } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
4
4
|
import type { Column_ColumnFaceting } from '../features/column-faceting/columnFacetingFeature.types'
|
|
5
5
|
import type { Column_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'
|
|
6
6
|
import type { Column_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'
|
|
@@ -25,7 +25,7 @@ export interface Column_FeatureMap<
|
|
|
25
25
|
in out TFeatures extends TableFeatures,
|
|
26
26
|
in out TData extends RowData,
|
|
27
27
|
> {
|
|
28
|
-
|
|
28
|
+
rowAggregationFeature: Column_Aggregation<TFeatures, TData>
|
|
29
29
|
columnFacetingFeature: Column_ColumnFaceting<TFeatures, TData>
|
|
30
30
|
columnFilteringFeature: Column_ColumnFiltering<TFeatures, TData>
|
|
31
31
|
columnGroupingFeature: Column_ColumnGrouping
|
package/src/types/ColumnDef.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
import type { CellContext } from '../core/cells/coreCellsFeature.types'
|
|
8
8
|
import type { HeaderContext } from '../core/headers/coreHeadersFeature.types'
|
|
9
9
|
import type { ColumnDef_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'
|
|
10
|
-
import type { ColumnDef_Aggregation } from '../features/aggregation/
|
|
10
|
+
import type { ColumnDef_Aggregation } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
11
11
|
import type { ColumnDef_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'
|
|
12
12
|
import type { ColumnDef_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'
|
|
13
13
|
import type { ColumnDef_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'
|
|
@@ -133,7 +133,7 @@ export interface ColumnDef_FeatureMap<
|
|
|
133
133
|
in out TData extends RowData,
|
|
134
134
|
TValue extends CellData,
|
|
135
135
|
> {
|
|
136
|
-
|
|
136
|
+
rowAggregationFeature: ColumnDef_Aggregation<TFeatures, TData, TValue>
|
|
137
137
|
columnVisibilityFeature: ColumnDef_ColumnVisibility
|
|
138
138
|
columnPinningFeature: ColumnDef_ColumnPinning
|
|
139
139
|
columnFilteringFeature: ColumnDef_ColumnFiltering<TFeatures, TData>
|
package/src/types/Row.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Row_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'
|
|
2
|
-
import type { Row_Aggregation } from '../features/aggregation/
|
|
2
|
+
import type { Row_Aggregation } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
3
3
|
import type { Row_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'
|
|
4
4
|
import type { Row_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'
|
|
5
5
|
import type { Row_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'
|
|
@@ -19,7 +19,7 @@ export interface Row_FeatureMap<
|
|
|
19
19
|
in out TFeatures extends TableFeatures,
|
|
20
20
|
in out TData extends RowData,
|
|
21
21
|
> {
|
|
22
|
-
|
|
22
|
+
rowAggregationFeature: Row_Aggregation
|
|
23
23
|
columnFilteringFeature: Row_ColumnFiltering<TFeatures, TData>
|
|
24
24
|
columnGroupingFeature: Row_ColumnGrouping
|
|
25
25
|
columnPinningFeature: Row_ColumnPinning<TFeatures, TData>
|
package/src/types/RowModelFns.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RowModelFns_RowSorting } from '../features/row-sorting/rowSortingFeature.types'
|
|
2
|
-
import type { RowModelFns_Aggregation } from '../features/aggregation/
|
|
2
|
+
import type { RowModelFns_Aggregation } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
3
3
|
import type { RowData } from './type-utils'
|
|
4
4
|
import type { RowModelFns_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'
|
|
5
5
|
import type { ExtractFeatureMapTypes, TableFeatures } from './TableFeatures'
|
|
@@ -10,7 +10,7 @@ export interface RowModelFns_FeatureMap<
|
|
|
10
10
|
in out TFeatures extends TableFeatures,
|
|
11
11
|
in out TData extends RowData,
|
|
12
12
|
> {
|
|
13
|
-
|
|
13
|
+
rowAggregationFeature: RowModelFns_Aggregation<TFeatures, TData>
|
|
14
14
|
columnFilteringFeature: RowModelFns_ColumnFiltering<TFeatures, TData>
|
|
15
15
|
rowSortingFeature: RowModelFns_RowSorting<TFeatures, TData>
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ import type { StockFeatures } from '../features/stockFeatures'
|
|
|
10
10
|
import type { RowModel } from '../core/row-models/coreRowModelsFeature.types'
|
|
11
11
|
import type { FilterFn } from '../features/column-filtering/columnFilteringFeature.types'
|
|
12
12
|
import type { SortFn } from '../features/row-sorting/rowSortingFeature.types'
|
|
13
|
-
import type { AggregationFnDef } from '../features/aggregation/
|
|
13
|
+
import type { AggregationFnDef } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Detects whether a type is `any`.
|
|
@@ -92,7 +92,7 @@ export interface FeatureSlotPrereqs {
|
|
|
92
92
|
/**
|
|
93
93
|
* Named aggregation functions require the independent aggregation feature.
|
|
94
94
|
*/
|
|
95
|
-
aggregationFns: '
|
|
95
|
+
aggregationFns: 'rowAggregationFeature'
|
|
96
96
|
/**
|
|
97
97
|
* Column resizing builds on the column sizing state and APIs.
|
|
98
98
|
*/
|
|
@@ -4,7 +4,7 @@ import type { TableOptions_Columns } from '../core/columns/coreColumnsFeature.ty
|
|
|
4
4
|
import type { TableOptions_Rows } from '../core/rows/coreRowsFeature.types'
|
|
5
5
|
import type { TableOptions_Table } from '../core/table/coreTablesFeature.types'
|
|
6
6
|
import type { TableOptions_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'
|
|
7
|
-
import type { TableOptions_Aggregation } from '../features/aggregation/
|
|
7
|
+
import type { TableOptions_Aggregation } from '../features/row-aggregation/rowAggregationFeature.types'
|
|
8
8
|
import type { TableOptions_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'
|
|
9
9
|
import type { TableOptions_ColumnOrdering } from '../features/column-ordering/columnOrderingFeature.types'
|
|
10
10
|
import type { TableOptions_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'
|
|
@@ -59,7 +59,7 @@ export interface TableOptions_FeatureMap<
|
|
|
59
59
|
in out TFeatures extends TableFeatures,
|
|
60
60
|
in out TData extends RowData,
|
|
61
61
|
> {
|
|
62
|
-
|
|
62
|
+
rowAggregationFeature: TableOptions_Aggregation
|
|
63
63
|
columnFilteringFeature: TableOptions_ColumnFiltering<TFeatures, TData>
|
|
64
64
|
columnGroupingFeature: TableOptions_ColumnGrouping
|
|
65
65
|
columnOrderingFeature: TableOptions_ColumnOrdering
|
|
@@ -76,7 +76,7 @@ export interface TableOptions_FeatureMap<
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
type TableOptions_StockFeatureKeys =
|
|
79
|
-
| '
|
|
79
|
+
| 'rowAggregationFeature'
|
|
80
80
|
| 'columnFilteringFeature'
|
|
81
81
|
| 'columnGroupingFeature'
|
|
82
82
|
| 'columnOrderingFeature'
|
|
@@ -84,7 +84,7 @@ export function initTableWorker<
|
|
|
84
84
|
// per group. Sync tables aggregate lazily (visible cells only), so
|
|
85
85
|
// auto-aggregating every column would explode on high-cardinality
|
|
86
86
|
// grouping for values nothing renders. Read the RAW column defs:
|
|
87
|
-
//
|
|
87
|
+
// rowAggregationFeature injects default aggregatedCell/aggregationFn
|
|
88
88
|
// into every resolved columnDef, so the resolved defs can't tell
|
|
89
89
|
// explicit from default.
|
|
90
90
|
aggregateColumnIds = flattenColumnDefs(config.columns as Array<any>)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_aggregationFeature_utils = require('./aggregationFeature.utils.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/features/aggregation/aggregationFeature.ts
|
|
5
|
-
/**
|
|
6
|
-
* Independent aggregation feature for grouped values and root/custom-row totals.
|
|
7
|
-
*/
|
|
8
|
-
const aggregationFeature = {
|
|
9
|
-
getDefaultColumnDef: () => ({
|
|
10
|
-
aggregatedCell: ({ column, getValue }) => require_aggregationFeature_utils.formatAggregatedCellValue(getValue(), column.columnDef.aggregationFn),
|
|
11
|
-
aggregationFn: "auto",
|
|
12
|
-
maxAggregationDepth: 0
|
|
13
|
-
}),
|
|
14
|
-
getDefaultTableOptions: () => ({ manualAggregation: false }),
|
|
15
|
-
assignCellPrototype: (prototype, table) => {
|
|
16
|
-
require_utils.assignPrototypeAPIs("aggregationFeature", prototype, table, { cell_getIsAggregated: { fn: (cell) => require_aggregationFeature_utils.cell_getIsAggregated(cell) } });
|
|
17
|
-
},
|
|
18
|
-
assignColumnPrototype: (prototype, table) => {
|
|
19
|
-
require_utils.assignPrototypeAPIs("aggregationFeature", prototype, table, {
|
|
20
|
-
column_getAggregationFns: { fn: (column) => require_aggregationFeature_utils.column_getAggregationFns(column) },
|
|
21
|
-
column_getAggregationValue: { fn: (column, options) => require_aggregationFeature_utils.column_getAggregationValue(column, options) },
|
|
22
|
-
column_getAutoAggregationFn: {
|
|
23
|
-
fn: (column) => require_aggregationFeature_utils.column_getAutoAggregationFn(column),
|
|
24
|
-
memoDeps: (column) => [column.table.getCoreRowModel(), column.table._rowModelFns.aggregationFns]
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
initColumnInstanceData: (column) => {
|
|
29
|
-
column._aggregationValueCache = void 0;
|
|
30
|
-
column._resolvedAggregationFnsCache = void 0;
|
|
31
|
-
},
|
|
32
|
-
initRowInstanceData: (row) => {
|
|
33
|
-
row._aggregationValuesCache = require_utils.makeObjectMap();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
exports.aggregationFeature = aggregationFeature;
|
|
39
|
-
//# sourceMappingURL=aggregationFeature.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aggregationFeature.cjs","names":["formatAggregatedCellValue","cell_getIsAggregated","column_getAggregationFns","column_getAggregationValue","column_getAutoAggregationFn","makeObjectMap"],"sources":["../../../src/features/aggregation/aggregationFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, makeObjectMap } from '../../utils'\nimport {\n cell_getIsAggregated,\n column_getAggregationFns,\n column_getAggregationValue,\n column_getAutoAggregationFn,\n formatAggregatedCellValue,\n} from './aggregationFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Independent aggregation feature for grouped values and root/custom-row totals.\n */\nexport const aggregationFeature: TableFeature = {\n getDefaultColumnDef: () => ({\n aggregatedCell: ({ column, getValue }: any) =>\n formatAggregatedCellValue(getValue(), column.columnDef.aggregationFn),\n aggregationFn: 'auto',\n maxAggregationDepth: 0,\n }),\n\n getDefaultTableOptions: () => ({\n manualAggregation: false,\n }),\n\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('aggregationFeature', prototype, table, {\n cell_getIsAggregated: {\n fn: (cell) => cell_getIsAggregated(cell),\n },\n })\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('aggregationFeature', prototype, table, {\n column_getAggregationFns: {\n fn: (column) => column_getAggregationFns(column),\n },\n column_getAggregationValue: {\n fn: (column, options) => column_getAggregationValue(column, options),\n },\n column_getAutoAggregationFn: {\n fn: (column) => column_getAutoAggregationFn(column),\n memoDeps: (column) => [\n column.table.getCoreRowModel(),\n column.table._rowModelFns.aggregationFns,\n ],\n },\n })\n },\n\n initColumnInstanceData: (column) => {\n ;(column as any)._aggregationValueCache = undefined\n ;(column as any)._resolvedAggregationFnsCache = undefined\n },\n\n initRowInstanceData: (row) => {\n ;(row as any)._aggregationValuesCache = makeObjectMap()\n },\n}\n"],"mappings":";;;;;;;AAaA,MAAa,qBAAmC;CAC9C,4BAA4B;EAC1B,iBAAiB,EAAE,QAAQ,eACzBA,2DAA0B,SAAS,GAAG,OAAO,UAAU,aAAa;EACtE,eAAe;EACf,qBAAqB;CACvB;CAEA,+BAA+B,EAC7B,mBAAmB,MACrB;CAEA,sBAAsB,WAAW,UAAU;EACzC,kCAAoB,sBAAsB,WAAW,OAAO,EAC1D,sBAAsB,EACpB,KAAK,SAASC,sDAAqB,IAAI,EACzC,EACF,CAAC;CACH;CAEA,wBAAwB,WAAW,UAAU;EAC3C,kCAAoB,sBAAsB,WAAW,OAAO;GAC1D,0BAA0B,EACxB,KAAK,WAAWC,0DAAyB,MAAM,EACjD;GACA,4BAA4B,EAC1B,KAAK,QAAQ,YAAYC,4DAA2B,QAAQ,OAAO,EACrE;GACA,6BAA6B;IAC3B,KAAK,WAAWC,6DAA4B,MAAM;IAClD,WAAW,WAAW,CACpB,OAAO,MAAM,gBAAgB,GAC7B,OAAO,MAAM,aAAa,cAC5B;GACF;EACF,CAAC;CACH;CAEA,yBAAyB,WAAW;EACjC,AAAC,OAAe,yBAAyB;EACzC,AAAC,OAAe,+BAA+B;CAClD;CAEA,sBAAsB,QAAQ;EAC3B,AAAC,IAAY,0BAA0BC,4BAAc;CACxD;AACF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TableFeature } from "../../types/TableFeatures.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/features/aggregation/aggregationFeature.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Independent aggregation feature for grouped values and root/custom-row totals.
|
|
6
|
-
*/
|
|
7
|
-
declare const aggregationFeature: TableFeature;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { aggregationFeature };
|
|
10
|
-
//# sourceMappingURL=aggregationFeature.d.cts.map
|