@tanstack/table-core 9.0.0-beta.51 → 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.
Files changed (54) hide show
  1. package/dist/features/column-grouping/createGroupedRowModel.cjs +19 -11
  2. package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
  3. package/dist/features/column-grouping/createGroupedRowModel.js +20 -12
  4. package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
  5. package/dist/features/row-aggregation/aggregationFns.cjs +80 -35
  6. package/dist/features/row-aggregation/aggregationFns.cjs.map +1 -1
  7. package/dist/features/row-aggregation/aggregationFns.js +80 -35
  8. package/dist/features/row-aggregation/aggregationFns.js.map +1 -1
  9. package/dist/features/row-aggregation/rowAggregationFeature.cjs +0 -3
  10. package/dist/features/row-aggregation/rowAggregationFeature.cjs.map +1 -1
  11. package/dist/features/row-aggregation/rowAggregationFeature.js +1 -4
  12. package/dist/features/row-aggregation/rowAggregationFeature.js.map +1 -1
  13. package/dist/features/row-aggregation/rowAggregationFeature.types.cjs.map +1 -1
  14. package/dist/features/row-aggregation/rowAggregationFeature.types.d.cts +2 -2
  15. package/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +2 -2
  16. package/dist/features/row-aggregation/rowAggregationFeature.types.js.map +1 -1
  17. package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs +35 -4
  18. package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs.map +1 -1
  19. package/dist/features/row-aggregation/rowAggregationFeature.utils.d.cts +15 -1
  20. package/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +15 -1
  21. package/dist/features/row-aggregation/rowAggregationFeature.utils.js +35 -5
  22. package/dist/features/row-aggregation/rowAggregationFeature.utils.js.map +1 -1
  23. package/dist/static-functions.cjs +1 -0
  24. package/dist/static-functions.d.cts +2 -2
  25. package/dist/static-functions.d.ts +2 -2
  26. package/dist/static-functions.js +2 -2
  27. package/package.json +1 -1
  28. package/skills/aggregation/SKILL.md +1 -1
  29. package/skills/api-not-found/SKILL.md +1 -1
  30. package/skills/client-vs-server/SKILL.md +1 -1
  31. package/skills/column-faceting/SKILL.md +1 -1
  32. package/skills/column-filtering/SKILL.md +1 -1
  33. package/skills/column-ordering/SKILL.md +1 -1
  34. package/skills/column-pinning/SKILL.md +1 -1
  35. package/skills/column-resizing/SKILL.md +1 -1
  36. package/skills/column-sizing/SKILL.md +1 -1
  37. package/skills/column-visibility/SKILL.md +1 -1
  38. package/skills/core/SKILL.md +1 -1
  39. package/skills/custom-features/SKILL.md +1 -1
  40. package/skills/expanding/SKILL.md +1 -1
  41. package/skills/global-filtering/SKILL.md +1 -1
  42. package/skills/grouping/SKILL.md +1 -1
  43. package/skills/migrate-v8-to-v9/SKILL.md +1 -1
  44. package/skills/pagination/SKILL.md +1 -1
  45. package/skills/row-pinning/SKILL.md +1 -1
  46. package/skills/row-selection/SKILL.md +1 -1
  47. package/skills/sorting/SKILL.md +1 -1
  48. package/skills/table-features/SKILL.md +1 -1
  49. package/skills/typescript/SKILL.md +1 -1
  50. package/src/features/column-grouping/createGroupedRowModel.ts +47 -10
  51. package/src/features/row-aggregation/aggregationFns.ts +80 -42
  52. package/src/features/row-aggregation/rowAggregationFeature.ts +1 -5
  53. package/src/features/row-aggregation/rowAggregationFeature.types.ts +2 -2
  54. package/src/features/row-aggregation/rowAggregationFeature.utils.ts +60 -3
@@ -1 +1 @@
1
- {"version":3,"file":"rowAggregationFeature.utils.cjs","names":["makeObjectMap","hasOwn"],"sources":["../../../src/features/row-aggregation/rowAggregationFeature.utils.ts"],"sourcesContent":["import { hasOwn, makeObjectMap } from '../../utils'\nimport type { Cell } from '../../types/Cell'\nimport type { Column, Column_Internal } from '../../types/Column'\nimport type { Row } from '../../types/Row'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type {\n AggregationContext,\n AggregationFnDef,\n AggregationFnDescriptor,\n AggregationFnRef,\n AggregationValueOptions,\n ColumnAggregationValue,\n ResolvedAggregationFn,\n} from './rowAggregationFeature.types'\n\ninterface AggregationCacheEntry {\n aggregationFnOption: unknown\n dependency: unknown\n maxDepth: number\n registry: unknown\n value: unknown\n}\n\ninterface ResolvedAggregationFnsCacheEntry<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n coreRowModel: unknown\n option: unknown\n registry: unknown\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>\n}\n\nfunction isAggregationFnDef(value: unknown): value is AggregationFnDef {\n return !!value && typeof value === 'object' && 'aggregate' in value\n}\n\nfunction isAggregationFnDescriptor(\n value: unknown,\n): value is AggregationFnDescriptor<any, any> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'id' in value &&\n 'aggregationFn' in value\n )\n}\n\nfunction warn(message: string) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(message)\n }\n}\n\nfunction resolveMaxAggregationDepth(maxDepth: number | undefined) {\n return maxDepth === undefined || Number.isNaN(maxDepth)\n ? 0\n : Math.max(0, Math.floor(maxDepth))\n}\n\n/**\n * Selects unique rows at a maximum relative depth in encounter order.\n * Branches that end before the requested depth contribute their deepest row.\n */\nexport function normalizeAggregationRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: ReadonlyArray<Row<TFeatures, TData>>,\n maxDepth = 0,\n): Array<Row<TFeatures, TData>> {\n const result: Array<Row<TFeatures, TData>> = []\n const seen = new Set<string>()\n const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)\n\n const visit = (row: Row<TFeatures, TData>, depth: number) => {\n if (row.subRows.length && depth < normalizedMaxDepth) {\n for (let i = 0; i < row.subRows.length; i++) {\n visit(row.subRows[i]!, depth + 1)\n }\n return\n }\n\n if (!seen.has(row.id)) {\n seen.add(row.id)\n result.push(row)\n }\n }\n\n for (let i = 0; i < rows.length; i++) {\n visit(rows[i]!, 0)\n }\n\n return result\n}\n\nfunction getAutoAggregationFnName(\n value: unknown,\n): 'extent' | 'sum' | undefined {\n if (typeof value === 'number') {\n return 'sum'\n }\n\n if (value instanceof Date && !Number.isNaN(value.getTime())) {\n return 'extent'\n }\n\n return undefined\n}\n\n/** Resolves the `sum` or `extent` definition inferred from the first core row. */\nexport function column_getAutoAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const value = column.table.getCoreRowModel().flatRows[0]?.getValue(column.id)\n\n const name = getAutoAggregationFnName(value)\n if (!name) return undefined\n\n const aggregationFn = column.table._rowModelFns.aggregationFns?.[name]\n\n if (!aggregationFn) {\n warn(\n `aggregationFn '${name}' (auto) for column '${column.id}' is not registered`,\n )\n }\n\n return aggregationFn\n}\n\nfunction resolveAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n column: Column_Internal<TFeatures, TData, any>,\n ref: AggregationFnRef<TFeatures, TData, any, any>,\n): AggregationFnDef<TFeatures, TData, any, any> | undefined {\n if (isAggregationFnDef(ref)) return ref as any\n if (ref === 'auto') return column_getAutoAggregationFn(column)\n\n const aggregationFn =\n column.table._rowModelFns.aggregationFns?.[ref as string]\n if (!aggregationFn) {\n warn(\n `aggregationFn '${String(ref)}' for column '${column.id}' is not registered`,\n )\n }\n return aggregationFn\n}\n\n/** Resolves and validates a column's scalar or multiple aggregation option. */\nexport function column_getAggregationFns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n): ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>> {\n const option = column.columnDef.aggregationFn\n const registry = column.table._rowModelFns.aggregationFns\n const coreRowModel = column.table.getCoreRowModel()\n const previous = (column as any)._resolvedAggregationFnsCache as\n | ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n | undefined\n\n if (\n previous &&\n previous.option === option &&\n previous.registry === registry &&\n previous.coreRowModel === coreRowModel\n ) {\n return previous.value\n }\n\n const finish = (\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>,\n ) => {\n ;(column as any)._resolvedAggregationFnsCache = {\n coreRowModel,\n option,\n registry,\n value,\n } satisfies ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n return value\n }\n\n if (option == null) return finish([])\n\n if (!Array.isArray(option)) {\n return finish([\n {\n aggregationFn: resolveAggregationFn(column, option as any),\n id: typeof option === 'string' ? option : undefined,\n },\n ])\n }\n\n const ids = makeObjectMap<number>()\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n if (id !== undefined) ids[id] = (ids[id] ?? 0) + 1\n }\n\n const resolved: Array<ResolvedAggregationFn<TFeatures, TData>> = []\n\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n\n if (id === undefined) {\n warn(\n `aggregationFn at index ${i} for column '${column.id}' needs a stable id`,\n )\n resolved.push({ aggregationFn: undefined, id: undefined })\n continue\n }\n\n if (ids[id]! > 1) {\n warn(`aggregationFn id '${id}' for column '${column.id}' is duplicated`)\n resolved.push({ aggregationFn: undefined, id })\n continue\n }\n\n const ref = isAggregationFnDescriptor(item) ? item.aggregationFn : item\n resolved.push({\n aggregationFn: resolveAggregationFn(column, ref),\n id,\n })\n }\n\n return finish(resolved)\n}\n\nfunction getSubRowResult(\n subRowValue: unknown,\n isMultiple: boolean,\n id: string | undefined,\n) {\n if (!isMultiple) return subRowValue\n if (!id || !subRowValue || typeof subRowValue !== 'object') return undefined\n return hasOwn(subRowValue, id)\n ? (subRowValue as Record<string, unknown>)[id]\n : undefined\n}\n\n/** Executes every configured aggregation over a depth-selected row frontier. */\nexport function aggregateColumnValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(args: {\n maxDepth?: number\n subRows?: ReadonlyArray<Row<TFeatures, TData>>\n column: Column<TFeatures, TData, unknown>\n groupingRow?: Row<TFeatures, TData>\n rows: ReadonlyArray<Row<TFeatures, TData>>\n}): unknown {\n const { subRows, column, groupingRow, rows } = args\n const internalColumn = column as Column_Internal<TFeatures, TData, unknown>\n const maxDepth = resolveMaxAggregationDepth(\n args.maxDepth ?? internalColumn.columnDef.maxAggregationDepth,\n )\n const aggregationRows = normalizeAggregationRows(rows, maxDepth)\n const entries = column_getAggregationFns(internalColumn)\n const isMultiple = Array.isArray(internalColumn.columnDef.aggregationFn)\n const canMerge =\n !!subRows?.length &&\n subRows.every(\n (row) =>\n !!(row as any).groupingColumnId &&\n (row as any).groupingColumnId !== column.id,\n )\n\n const execute = (entry: ResolvedAggregationFn<TFeatures, TData>) => {\n const definition = entry.aggregationFn\n if (!definition) return undefined\n\n const context: AggregationContext<TFeatures, TData, unknown> = {\n ...(subRows ? { subRows } : {}),\n column,\n columnId: column.id,\n getValue: (row: Row<TFeatures, TData>) => row.getValue(column.id),\n ...(groupingRow ? { groupingRow } : {}),\n maxDepth,\n rows: aggregationRows,\n table: column.table as any,\n }\n\n if (canMerge && definition.merge) {\n return definition.merge({\n ...context,\n subRowResults: subRows.map((row) =>\n getSubRowResult(row.getValue(column.id), isMultiple, entry.id),\n ),\n subRows,\n })\n }\n\n return definition.aggregate(context)\n }\n\n if (!isMultiple) {\n return entries[0] ? execute(entries[0]) : undefined\n }\n\n const result = makeObjectMap<unknown>()\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]!\n if (entry.id !== undefined) {\n result[entry.id] = execute(entry)\n }\n }\n return result\n}\n\n/** Implements `column.getAggregationValue(options?)` and its default cache. */\nexport function column_getAggregationValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n options?: AggregationValueOptions<TFeatures, TData>,\n): ColumnAggregationValue<TFeatures> {\n const rows = options?.rows\n const resolvedMaxDepth = resolveMaxAggregationDepth(\n options?.maxDepth ?? column.columnDef.maxAggregationDepth,\n )\n const providedResult = column.columnDef.getAggregationValue?.({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n table: column.table as any,\n })\n\n if (providedResult) return providedResult.value as any\n if (column.table.options.manualAggregation) return undefined\n\n if (rows !== undefined) {\n return aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n }) as any\n }\n\n const model = column.table.getPreGroupedRowModel()\n const previous = (column as any)._aggregationValueCache as\n | AggregationCacheEntry\n | undefined\n const registry = column.table._rowModelFns.aggregationFns\n const aggregationFnOption = column.columnDef.aggregationFn\n\n if (\n previous &&\n previous.dependency === model &&\n previous.maxDepth === resolvedMaxDepth &&\n previous.registry === registry &&\n previous.aggregationFnOption === aggregationFnOption\n ) {\n return previous.value as any\n }\n\n const value = aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows: model.rows,\n })\n ;(column as any)._aggregationValueCache = {\n aggregationFnOption,\n dependency: model,\n maxDepth: resolvedMaxDepth,\n registry,\n value,\n } satisfies AggregationCacheEntry\n return value as any\n}\n\n/** Implements `cell.getIsAggregated()` for synthetic grouped rows. */\nexport function cell_getIsAggregated<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n const groupingColumnId = (cell.row as any).groupingColumnId as\n | string\n | undefined\n if (!groupingColumnId || groupingColumnId === cell.column.id) return false\n\n const grouping = (cell.column.table as any).atoms.grouping?.get?.() as\n | Array<string>\n | undefined\n if (grouping?.includes(cell.column.id)) return false\n\n return column_getAggregationFns(cell.column as any).some(\n (entry) => !!entry.aggregationFn,\n )\n}\n\n/** Formats the default scalar or keyed aggregated-cell representation. */\nexport function formatAggregatedCellValue(\n value: unknown,\n option: unknown,\n): string | null {\n if (value == null) return null\n\n if (Array.isArray(option) && typeof value === 'object') {\n const entries = Object.keys(value)\n return entries\n .map(\n (key) => `${key}: ${String((value as Record<string, unknown>)[key])}`,\n )\n .join(', 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E,YACA,SAAS,eAAe,SACxB,SAAS,aAAa,oBACtB,SAAS,aAAa,YACtB,SAAS,wBAAwB,qBAEjC,OAAO,SAAS;CAGlB,MAAM,QAAQ,qBAAqB;EACzB;EACR,UAAU;EACV,MAAM,MAAM;CACd,CAAC;CACA,AAAC,OAAe,yBAAyB;EACxC;EACA,YAAY;EACZ,UAAU;EACV;EACA;CACF;CACA,OAAO;AACT;;AAGA,SAAgB,qBAId,MAAsC;CACtC,MAAM,mBAAoB,KAAK,IAAY;CAG3C,IAAI,CAAC,oBAAoB,qBAAqB,KAAK,OAAO,IAAI,OAAO;CAKrE,KAHkB,KAAK,OAAO,MAAc,MAAM,UAAU,MAAM,EAGtD,EAAE,SAAS,KAAK,OAAO,EAAE,GAAG,OAAO;CAE/C,OAAO,yBAAyB,KAAK,MAAa,CAAC,CAAC,MACjD,UAAU,CAAC,CAAC,MAAM,aACrB;AACF;;AAGA,SAAgB,0BACd,OACA,QACe;CACf,IAAI,SAAS,MAAM,OAAO;CAE1B,IAAI,MAAM,QAAQ,MAAM,KAAK,OAAO,UAAU,UAE5C,OADgB,OAAO,KAAK,KACf,CAAC,CACX,KACE,QAAQ,GAAG,IAAI,IAAI,OAAQ,MAAkC,IAAI,GACpE,CAAC,CACA,KAAK,IAAI;CAGd,OAAO,OAAO,KAAK;AACrB"}
1
+ {"version":3,"file":"rowAggregationFeature.utils.cjs","names":["makeObjectMap","hasOwn"],"sources":["../../../src/features/row-aggregation/rowAggregationFeature.utils.ts"],"sourcesContent":["import { hasOwn, makeObjectMap } from '../../utils'\nimport type { Cell } from '../../types/Cell'\nimport type { Column, Column_Internal } from '../../types/Column'\nimport type { Row } from '../../types/Row'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type {\n AggregationContext,\n AggregationFnDef,\n AggregationFnDescriptor,\n AggregationFnRef,\n AggregationValueOptions,\n ColumnAggregationValue,\n ResolvedAggregationFn,\n} from './rowAggregationFeature.types'\n\ninterface AggregationCacheEntry {\n aggregationFnOption: unknown\n dependency: unknown\n maxDepth: number\n registry: unknown\n value: unknown\n}\n\ninterface ResolvedAggregationFnsCacheEntry<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n coreRowModel: unknown\n option: unknown\n registry: unknown\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>\n}\n\nfunction isAggregationFnDef(value: unknown): value is AggregationFnDef {\n return !!value && typeof value === 'object' && 'aggregate' in value\n}\n\nfunction isAggregationFnDescriptor(\n value: unknown,\n): value is AggregationFnDescriptor<any, any> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'id' in value &&\n 'aggregationFn' in value\n )\n}\n\nfunction warn(message: string) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(message)\n }\n}\n\nfunction resolveMaxAggregationDepth(maxDepth: number | undefined) {\n return maxDepth === undefined || Number.isNaN(maxDepth)\n ? 0\n : Math.max(0, Math.floor(maxDepth))\n}\n\n/**\n * Selects unique rows at a maximum relative depth in encounter order.\n * Branches that end before the requested depth contribute their deepest row.\n */\nexport function normalizeAggregationRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: ReadonlyArray<Row<TFeatures, TData>>,\n maxDepth = 0,\n): Array<Row<TFeatures, TData>> {\n const result: Array<Row<TFeatures, TData>> = []\n const seen = new Set<string>()\n const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)\n\n const visit = (row: Row<TFeatures, TData>, depth: number) => {\n if (row.subRows.length && depth < normalizedMaxDepth) {\n for (let i = 0; i < row.subRows.length; i++) {\n visit(row.subRows[i]!, depth + 1)\n }\n return\n }\n\n if (!seen.has(row.id)) {\n seen.add(row.id)\n result.push(row)\n }\n }\n\n for (let i = 0; i < rows.length; i++) {\n visit(rows[i]!, 0)\n }\n\n return result\n}\n\n/**\n * Frontier selection for rows that are distinct nodes of a single row tree —\n * the row models the table builds itself. Skips `normalizeAggregationRows`'\n * duplicate-id guard (disjoint subtrees cannot revisit a row) and returns\n * `rows` unchanged when no row descends, so the default `maxDepth: 0` case\n * costs nothing per aggregation.\n */\nexport function normalizeUniqueAggregationRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: ReadonlyArray<Row<TFeatures, TData>>,\n maxDepth = 0,\n): ReadonlyArray<Row<TFeatures, TData>> {\n const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)\n\n let needsDescent = false\n if (normalizedMaxDepth > 0) {\n for (let i = 0; i < rows.length; i++) {\n if (rows[i]!.subRows.length) {\n needsDescent = true\n break\n }\n }\n }\n if (!needsDescent) return rows\n\n const result: Array<Row<TFeatures, TData>> = []\n\n const visit = (row: Row<TFeatures, TData>, depth: number) => {\n if (row.subRows.length && depth < normalizedMaxDepth) {\n for (let i = 0; i < row.subRows.length; i++) {\n visit(row.subRows[i]!, depth + 1)\n }\n return\n }\n result.push(row)\n }\n\n for (let i = 0; i < rows.length; i++) {\n visit(rows[i]!, 0)\n }\n\n return result\n}\n\nfunction getAutoAggregationFnName(\n value: unknown,\n): 'extent' | 'sum' | undefined {\n if (typeof value === 'number') {\n return 'sum'\n }\n\n if (value instanceof Date && !Number.isNaN(value.getTime())) {\n return 'extent'\n }\n\n return undefined\n}\n\n/** Resolves the `sum` or `extent` definition inferred from the first core row. */\nexport function column_getAutoAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const value = column.table.getCoreRowModel().flatRows[0]?.getValue(column.id)\n\n const name = getAutoAggregationFnName(value)\n if (!name) return undefined\n\n const aggregationFn = column.table._rowModelFns.aggregationFns?.[name]\n\n if (!aggregationFn) {\n warn(\n `aggregationFn '${name}' (auto) for column '${column.id}' is not registered`,\n )\n }\n\n return aggregationFn\n}\n\nfunction resolveAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n column: Column_Internal<TFeatures, TData, any>,\n ref: AggregationFnRef<TFeatures, TData, any, any>,\n): AggregationFnDef<TFeatures, TData, any, any> | undefined {\n if (isAggregationFnDef(ref)) return ref as any\n if (ref === 'auto') return column_getAutoAggregationFn(column)\n\n const aggregationFn =\n column.table._rowModelFns.aggregationFns?.[ref as string]\n if (!aggregationFn) {\n warn(\n `aggregationFn '${String(ref)}' for column '${column.id}' is not registered`,\n )\n }\n return aggregationFn\n}\n\n/** Resolves and validates a column's scalar or multiple aggregation option. */\nexport function column_getAggregationFns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n): ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>> {\n const option = column.columnDef.aggregationFn\n const registry = column.table._rowModelFns.aggregationFns\n const coreRowModel = column.table.getCoreRowModel()\n const previous = (column as any)._resolvedAggregationFnsCache as\n | ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n | undefined\n\n if (\n previous &&\n previous.option === option &&\n previous.registry === registry &&\n previous.coreRowModel === coreRowModel\n ) {\n return previous.value\n }\n\n const finish = (\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>,\n ) => {\n ;(column as any)._resolvedAggregationFnsCache = {\n coreRowModel,\n option,\n registry,\n value,\n } satisfies ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n return value\n }\n\n if (option == null) return finish([])\n\n if (!Array.isArray(option)) {\n return finish([\n {\n aggregationFn: resolveAggregationFn(column, option as any),\n id: typeof option === 'string' ? option : undefined,\n },\n ])\n }\n\n const ids = makeObjectMap<number>()\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n if (id !== undefined) ids[id] = (ids[id] ?? 0) + 1\n }\n\n const resolved: Array<ResolvedAggregationFn<TFeatures, TData>> = []\n\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n\n if (id === undefined) {\n warn(\n `aggregationFn at index ${i} for column '${column.id}' needs a stable id`,\n )\n resolved.push({ aggregationFn: undefined, id: undefined })\n continue\n }\n\n if (ids[id]! > 1) {\n warn(`aggregationFn id '${id}' for column '${column.id}' is duplicated`)\n resolved.push({ aggregationFn: undefined, id })\n continue\n }\n\n const ref = isAggregationFnDescriptor(item) ? item.aggregationFn : item\n resolved.push({\n aggregationFn: resolveAggregationFn(column, ref),\n id,\n })\n }\n\n return finish(resolved)\n}\n\nfunction getSubRowResult(\n subRowValue: unknown,\n isMultiple: boolean,\n id: string | undefined,\n) {\n if (!isMultiple) return subRowValue\n if (!id || !subRowValue || typeof subRowValue !== 'object') return undefined\n return hasOwn(subRowValue, id)\n ? (subRowValue as Record<string, unknown>)[id]\n : undefined\n}\n\n/** Executes every configured aggregation over a depth-selected row frontier. */\nexport function aggregateColumnValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(args: {\n maxDepth?: number\n subRows?: ReadonlyArray<Row<TFeatures, TData>>\n column: Column<TFeatures, TData, unknown>\n groupingRow?: Row<TFeatures, TData>\n rows: ReadonlyArray<Row<TFeatures, TData>>\n /**\n * Marks `rows` as distinct nodes of a single row tree (rows the table's own\n * row models produced), enabling frontier selection without the\n * duplicate-id guard. Caller-supplied row arrays must omit this.\n */\n uniqueRows?: boolean\n}): unknown {\n const { subRows, column, groupingRow, rows, uniqueRows } = args\n const internalColumn = column as Column_Internal<TFeatures, TData, unknown>\n const maxDepth = resolveMaxAggregationDepth(\n args.maxDepth ?? internalColumn.columnDef.maxAggregationDepth,\n )\n const aggregationRows = uniqueRows\n ? normalizeUniqueAggregationRows(rows, maxDepth)\n : normalizeAggregationRows(rows, maxDepth)\n const entries = column_getAggregationFns(internalColumn)\n const isMultiple = Array.isArray(internalColumn.columnDef.aggregationFn)\n const canMerge =\n !!subRows?.length &&\n subRows.every(\n (row) =>\n !!(row as any).groupingColumnId &&\n (row as any).groupingColumnId !== column.id,\n )\n\n const getValue = (row: Row<TFeatures, TData>) => row.getValue(column.id)\n\n const execute = (entry: ResolvedAggregationFn<TFeatures, TData>) => {\n const definition = entry.aggregationFn\n if (!definition) return undefined\n\n const context: AggregationContext<TFeatures, TData, unknown> = {\n ...(subRows ? { subRows } : {}),\n column,\n columnId: column.id,\n getValue,\n ...(groupingRow ? { groupingRow } : {}),\n maxDepth,\n rows: aggregationRows,\n table: column.table as any,\n }\n\n if (canMerge && definition.merge) {\n return definition.merge({\n ...context,\n subRowResults: subRows.map((row) =>\n getSubRowResult(row.getValue(column.id), isMultiple, entry.id),\n ),\n subRows,\n })\n }\n\n return definition.aggregate(context)\n }\n\n if (!isMultiple) {\n return entries[0] ? execute(entries[0]) : undefined\n }\n\n const result = makeObjectMap<unknown>()\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]!\n if (entry.id !== undefined) {\n result[entry.id] = execute(entry)\n }\n }\n return result\n}\n\n/** Implements `column.getAggregationValue(options?)` and its default cache. */\nexport function column_getAggregationValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n options?: AggregationValueOptions<TFeatures, TData>,\n): ColumnAggregationValue<TFeatures> {\n const rows = options?.rows\n const resolvedMaxDepth = resolveMaxAggregationDepth(\n options?.maxDepth ?? column.columnDef.maxAggregationDepth,\n )\n const providedResult = column.columnDef.getAggregationValue?.({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n table: column.table as any,\n })\n\n if (providedResult) return providedResult.value as any\n if (column.table.options.manualAggregation) return undefined\n\n if (rows !== undefined) {\n return aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n }) as any\n }\n\n const model = column.table.getPreGroupedRowModel()\n const previous = (column as any)._aggregationValueCache as\n | AggregationCacheEntry\n | undefined\n const registry = column.table._rowModelFns.aggregationFns\n const aggregationFnOption = column.columnDef.aggregationFn\n\n if (\n previous &&\n previous.dependency === model &&\n previous.maxDepth === resolvedMaxDepth &&\n previous.registry === registry &&\n previous.aggregationFnOption === aggregationFnOption\n ) {\n return previous.value as any\n }\n\n const value = aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows: model.rows,\n uniqueRows: true,\n })\n ;(column as any)._aggregationValueCache = {\n aggregationFnOption,\n dependency: model,\n maxDepth: resolvedMaxDepth,\n registry,\n value,\n } satisfies AggregationCacheEntry\n return value as any\n}\n\n/** Implements `cell.getIsAggregated()` for synthetic grouped rows. */\nexport function cell_getIsAggregated<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n const groupingColumnId = (cell.row as any).groupingColumnId as\n | string\n | undefined\n if (!groupingColumnId || groupingColumnId === cell.column.id) return false\n\n const grouping = (cell.column.table as any).atoms.grouping?.get?.() as\n | Array<string>\n | undefined\n if (grouping?.includes(cell.column.id)) return false\n\n return column_getAggregationFns(cell.column as any).some(\n (entry) => !!entry.aggregationFn,\n )\n}\n\n/** Formats the default scalar or keyed aggregated-cell representation. */\nexport function formatAggregatedCellValue(\n value: unknown,\n option: unknown,\n): string | null {\n if (value == null) return null\n\n if (Array.isArray(option) && typeof value === 'object') {\n const entries = Object.keys(value)\n return entries\n .map(\n (key) => `${key}: ${String((value as Record<string, unknown>)[key])}`,\n )\n .join(', ')\n }\n\n return String(value)\n}\n"],"mappings":";;;AAkCA,SAAS,mBAAmB,OAA2C;CACrE,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,eAAe;AAChE;AAEA,SAAS,0BACP,OAC4C;CAC5C,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YACjB,QAAQ,SACR,mBAAmB;AAEvB;AAEA,SAAS,KAAK,SAAiB;CAC7B,IAAI,QAAQ,IAAI,aAAa,eAC3B,QAAQ,KAAK,OAAO;AAExB;AAEA,SAAS,2BAA2B,UAA8B;CAChE,OAAO,aAAa,UAAa,OAAO,MAAM,QAAQ,IAClD,IACA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AAgB,OAAO,eAAe;CAC1C,IAAI,OAAO,MAAM,QAAQ,mBAAmB,OAAO;CAEnD,IAAI,SAAS,QACX,OAAO,qBAAqB;EAClB;EACR,UAAU;EACV;CACF,CAAC;CAGH,MAAM,QAAQ,OAAO,MAAM,sBAAsB;CACjD,MAAM,WAAY,OAAe;CAGjC,MAAM,WAAW,OAAO,MAAM,aAAa;CAC3C,MAAM,sBAAsB,OAAO,UAAU;CAE7C,IACE,YACA,SAAS,eAAe,SACxB,SAAS,aAAa,oBACtB,SAAS,aAAa,YACtB,SAAS,wBAAwB,qBAEjC,OAAO,SAAS;CAGlB,MAAM,QAAQ,qBAAqB;EACzB;EACR,UAAU;EACV,MAAM,MAAM;EACZ,YAAY;CACd,CAAC;CACA,AAAC,OAAe,yBAAyB;EACxC;EACA,YAAY;EACZ,UAAU;EACV;EACA;CACF;CACA,OAAO;AACT;;AAGA,SAAgB,qBAId,MAAsC;CACtC,MAAM,mBAAoB,KAAK,IAAY;CAG3C,IAAI,CAAC,oBAAoB,qBAAqB,KAAK,OAAO,IAAI,OAAO;CAKrE,KAHkB,KAAK,OAAO,MAAc,MAAM,UAAU,MAAM,EAGtD,EAAE,SAAS,KAAK,OAAO,EAAE,GAAG,OAAO;CAE/C,OAAO,yBAAyB,KAAK,MAAa,CAAC,CAAC,MACjD,UAAU,CAAC,CAAC,MAAM,aACrB;AACF;;AAGA,SAAgB,0BACd,OACA,QACe;CACf,IAAI,SAAS,MAAM,OAAO;CAE1B,IAAI,MAAM,QAAQ,MAAM,KAAK,OAAO,UAAU,UAE5C,OADgB,OAAO,KAAK,KACf,CAAC,CACX,KACE,QAAQ,GAAG,IAAI,IAAI,OAAQ,MAAkC,IAAI,GACpE,CAAC,CACA,KAAK,IAAI;CAGd,OAAO,OAAO,KAAK;AACrB"}
@@ -11,6 +11,14 @@ import { TableFeatures } from "../../types/TableFeatures.cjs";
11
11
  * Branches that end before the requested depth contribute their deepest row.
12
12
  */
13
13
  declare function normalizeAggregationRows<TFeatures extends TableFeatures, TData extends RowData>(rows: ReadonlyArray<Row<TFeatures, TData>>, maxDepth?: number): Array<Row<TFeatures, TData>>;
14
+ /**
15
+ * Frontier selection for rows that are distinct nodes of a single row tree —
16
+ * the row models the table builds itself. Skips `normalizeAggregationRows`'
17
+ * duplicate-id guard (disjoint subtrees cannot revisit a row) and returns
18
+ * `rows` unchanged when no row descends, so the default `maxDepth: 0` case
19
+ * costs nothing per aggregation.
20
+ */
21
+ declare function normalizeUniqueAggregationRows<TFeatures extends TableFeatures, TData extends RowData>(rows: ReadonlyArray<Row<TFeatures, TData>>, maxDepth?: number): ReadonlyArray<Row<TFeatures, TData>>;
14
22
  /** Resolves the `sum` or `extent` definition inferred from the first core row. */
15
23
  declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): AggregationFnDef<TFeatures, TData, any, any> | undefined;
16
24
  /** Resolves and validates a column's scalar or multiple aggregation option. */
@@ -22,6 +30,12 @@ declare function aggregateColumnValue<TFeatures extends TableFeatures, TData ext
22
30
  column: Column<TFeatures, TData, unknown>;
23
31
  groupingRow?: Row<TFeatures, TData>;
24
32
  rows: ReadonlyArray<Row<TFeatures, TData>>;
33
+ /**
34
+ * Marks `rows` as distinct nodes of a single row tree (rows the table's own
35
+ * row models produced), enabling frontier selection without the
36
+ * duplicate-id guard. Caller-supplied row arrays must omit this.
37
+ */
38
+ uniqueRows?: boolean;
25
39
  }): unknown;
26
40
  /** Implements `column.getAggregationValue(options?)` and its default cache. */
27
41
  declare function column_getAggregationValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, options?: AggregationValueOptions<TFeatures, TData>): ColumnAggregationValue<TFeatures>;
@@ -30,5 +44,5 @@ declare function cell_getIsAggregated<TFeatures extends TableFeatures, TData ext
30
44
  /** Formats the default scalar or keyed aggregated-cell representation. */
31
45
  declare function formatAggregatedCellValue(value: unknown, option: unknown): string | null;
32
46
  //#endregion
33
- export { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows };
47
+ export { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows };
34
48
  //# sourceMappingURL=rowAggregationFeature.utils.d.cts.map
@@ -11,6 +11,14 @@ import { TableFeatures } from "../../types/TableFeatures.js";
11
11
  * Branches that end before the requested depth contribute their deepest row.
12
12
  */
13
13
  declare function normalizeAggregationRows<TFeatures extends TableFeatures, TData extends RowData>(rows: ReadonlyArray<Row<TFeatures, TData>>, maxDepth?: number): Array<Row<TFeatures, TData>>;
14
+ /**
15
+ * Frontier selection for rows that are distinct nodes of a single row tree —
16
+ * the row models the table builds itself. Skips `normalizeAggregationRows`'
17
+ * duplicate-id guard (disjoint subtrees cannot revisit a row) and returns
18
+ * `rows` unchanged when no row descends, so the default `maxDepth: 0` case
19
+ * costs nothing per aggregation.
20
+ */
21
+ declare function normalizeUniqueAggregationRows<TFeatures extends TableFeatures, TData extends RowData>(rows: ReadonlyArray<Row<TFeatures, TData>>, maxDepth?: number): ReadonlyArray<Row<TFeatures, TData>>;
14
22
  /** Resolves the `sum` or `extent` definition inferred from the first core row. */
15
23
  declare function column_getAutoAggregationFn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>): AggregationFnDef<TFeatures, TData, any, any> | undefined;
16
24
  /** Resolves and validates a column's scalar or multiple aggregation option. */
@@ -22,6 +30,12 @@ declare function aggregateColumnValue<TFeatures extends TableFeatures, TData ext
22
30
  column: Column<TFeatures, TData, unknown>;
23
31
  groupingRow?: Row<TFeatures, TData>;
24
32
  rows: ReadonlyArray<Row<TFeatures, TData>>;
33
+ /**
34
+ * Marks `rows` as distinct nodes of a single row tree (rows the table's own
35
+ * row models produced), enabling frontier selection without the
36
+ * duplicate-id guard. Caller-supplied row arrays must omit this.
37
+ */
38
+ uniqueRows?: boolean;
25
39
  }): unknown;
26
40
  /** Implements `column.getAggregationValue(options?)` and its default cache. */
27
41
  declare function column_getAggregationValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, options?: AggregationValueOptions<TFeatures, TData>): ColumnAggregationValue<TFeatures>;
@@ -30,5 +44,5 @@ declare function cell_getIsAggregated<TFeatures extends TableFeatures, TData ext
30
44
  /** Formats the default scalar or keyed aggregated-cell representation. */
31
45
  declare function formatAggregatedCellValue(value: unknown, option: unknown): string | null;
32
46
  //#endregion
33
- export { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows };
47
+ export { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows };
34
48
  //# sourceMappingURL=rowAggregationFeature.utils.d.ts.map
@@ -34,6 +34,34 @@ function normalizeAggregationRows(rows, maxDepth = 0) {
34
34
  for (let i = 0; i < rows.length; i++) visit(rows[i], 0);
35
35
  return result;
36
36
  }
37
+ /**
38
+ * Frontier selection for rows that are distinct nodes of a single row tree —
39
+ * the row models the table builds itself. Skips `normalizeAggregationRows`'
40
+ * duplicate-id guard (disjoint subtrees cannot revisit a row) and returns
41
+ * `rows` unchanged when no row descends, so the default `maxDepth: 0` case
42
+ * costs nothing per aggregation.
43
+ */
44
+ function normalizeUniqueAggregationRows(rows, maxDepth = 0) {
45
+ const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth);
46
+ let needsDescent = false;
47
+ if (normalizedMaxDepth > 0) {
48
+ for (let i = 0; i < rows.length; i++) if (rows[i].subRows.length) {
49
+ needsDescent = true;
50
+ break;
51
+ }
52
+ }
53
+ if (!needsDescent) return rows;
54
+ const result = [];
55
+ const visit = (row, depth) => {
56
+ if (row.subRows.length && depth < normalizedMaxDepth) {
57
+ for (let i = 0; i < row.subRows.length; i++) visit(row.subRows[i], depth + 1);
58
+ return;
59
+ }
60
+ result.push(row);
61
+ };
62
+ for (let i = 0; i < rows.length; i++) visit(rows[i], 0);
63
+ return result;
64
+ }
37
65
  function getAutoAggregationFnName(value) {
38
66
  if (typeof value === "number") return "sum";
39
67
  if (value instanceof Date && !Number.isNaN(value.getTime())) return "extent";
@@ -116,13 +144,14 @@ function getSubRowResult(subRowValue, isMultiple, id) {
116
144
  }
117
145
  /** Executes every configured aggregation over a depth-selected row frontier. */
118
146
  function aggregateColumnValue(args) {
119
- const { subRows, column, groupingRow, rows } = args;
147
+ const { subRows, column, groupingRow, rows, uniqueRows } = args;
120
148
  const internalColumn = column;
121
149
  const maxDepth = resolveMaxAggregationDepth(args.maxDepth ?? internalColumn.columnDef.maxAggregationDepth);
122
- const aggregationRows = normalizeAggregationRows(rows, maxDepth);
150
+ const aggregationRows = uniqueRows ? normalizeUniqueAggregationRows(rows, maxDepth) : normalizeAggregationRows(rows, maxDepth);
123
151
  const entries = column_getAggregationFns(internalColumn);
124
152
  const isMultiple = Array.isArray(internalColumn.columnDef.aggregationFn);
125
153
  const canMerge = !!subRows?.length && subRows.every((row) => !!row.groupingColumnId && row.groupingColumnId !== column.id);
154
+ const getValue = (row) => row.getValue(column.id);
126
155
  const execute = (entry) => {
127
156
  const definition = entry.aggregationFn;
128
157
  if (!definition) return void 0;
@@ -130,7 +159,7 @@ function aggregateColumnValue(args) {
130
159
  ...subRows ? { subRows } : {},
131
160
  column,
132
161
  columnId: column.id,
133
- getValue: (row) => row.getValue(column.id),
162
+ getValue,
134
163
  ...groupingRow ? { groupingRow } : {},
135
164
  maxDepth,
136
165
  rows: aggregationRows,
@@ -176,7 +205,8 @@ function column_getAggregationValue(column, options) {
176
205
  const value = aggregateColumnValue({
177
206
  column,
178
207
  maxDepth: resolvedMaxDepth,
179
- rows: model.rows
208
+ rows: model.rows,
209
+ uniqueRows: true
180
210
  });
181
211
  column._aggregationValueCache = {
182
212
  aggregationFnOption,
@@ -202,5 +232,5 @@ function formatAggregatedCellValue(value, option) {
202
232
  }
203
233
 
204
234
  //#endregion
205
- export { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows };
235
+ export { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows };
206
236
  //# sourceMappingURL=rowAggregationFeature.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rowAggregationFeature.utils.js","names":[],"sources":["../../../src/features/row-aggregation/rowAggregationFeature.utils.ts"],"sourcesContent":["import { hasOwn, makeObjectMap } from '../../utils'\nimport type { Cell } from '../../types/Cell'\nimport type { Column, Column_Internal } from '../../types/Column'\nimport type { Row } from '../../types/Row'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type {\n AggregationContext,\n AggregationFnDef,\n AggregationFnDescriptor,\n AggregationFnRef,\n AggregationValueOptions,\n ColumnAggregationValue,\n ResolvedAggregationFn,\n} from './rowAggregationFeature.types'\n\ninterface AggregationCacheEntry {\n aggregationFnOption: unknown\n dependency: unknown\n maxDepth: number\n registry: unknown\n value: unknown\n}\n\ninterface ResolvedAggregationFnsCacheEntry<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n coreRowModel: unknown\n option: unknown\n registry: unknown\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>\n}\n\nfunction isAggregationFnDef(value: unknown): value is AggregationFnDef {\n return !!value && typeof value === 'object' && 'aggregate' in value\n}\n\nfunction isAggregationFnDescriptor(\n value: unknown,\n): value is AggregationFnDescriptor<any, any> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'id' in value &&\n 'aggregationFn' in value\n )\n}\n\nfunction warn(message: string) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(message)\n }\n}\n\nfunction resolveMaxAggregationDepth(maxDepth: number | undefined) {\n return maxDepth === undefined || Number.isNaN(maxDepth)\n ? 0\n : Math.max(0, Math.floor(maxDepth))\n}\n\n/**\n * Selects unique rows at a maximum relative depth in encounter order.\n * Branches that end before the requested depth contribute their deepest row.\n */\nexport function normalizeAggregationRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: ReadonlyArray<Row<TFeatures, TData>>,\n maxDepth = 0,\n): Array<Row<TFeatures, TData>> {\n const result: Array<Row<TFeatures, TData>> = []\n const seen = new Set<string>()\n const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)\n\n const visit = (row: Row<TFeatures, TData>, depth: number) => {\n if (row.subRows.length && depth < normalizedMaxDepth) {\n for (let i = 0; i < row.subRows.length; i++) {\n visit(row.subRows[i]!, depth + 1)\n }\n return\n }\n\n if (!seen.has(row.id)) {\n seen.add(row.id)\n result.push(row)\n }\n }\n\n for (let i = 0; i < rows.length; i++) {\n visit(rows[i]!, 0)\n }\n\n return result\n}\n\nfunction getAutoAggregationFnName(\n value: unknown,\n): 'extent' | 'sum' | undefined {\n if (typeof value === 'number') {\n return 'sum'\n }\n\n if (value instanceof Date && !Number.isNaN(value.getTime())) {\n return 'extent'\n }\n\n return undefined\n}\n\n/** Resolves the `sum` or `extent` definition inferred from the first core row. */\nexport function column_getAutoAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const value = column.table.getCoreRowModel().flatRows[0]?.getValue(column.id)\n\n const name = getAutoAggregationFnName(value)\n if (!name) return undefined\n\n const aggregationFn = column.table._rowModelFns.aggregationFns?.[name]\n\n if (!aggregationFn) {\n warn(\n `aggregationFn '${name}' (auto) for column '${column.id}' is not registered`,\n )\n }\n\n return aggregationFn\n}\n\nfunction resolveAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n column: Column_Internal<TFeatures, TData, any>,\n ref: AggregationFnRef<TFeatures, TData, any, any>,\n): AggregationFnDef<TFeatures, TData, any, any> | undefined {\n if (isAggregationFnDef(ref)) return ref as any\n if (ref === 'auto') return column_getAutoAggregationFn(column)\n\n const aggregationFn =\n column.table._rowModelFns.aggregationFns?.[ref as string]\n if (!aggregationFn) {\n warn(\n `aggregationFn '${String(ref)}' for column '${column.id}' is not registered`,\n )\n }\n return aggregationFn\n}\n\n/** Resolves and validates a column's scalar or multiple aggregation option. */\nexport function column_getAggregationFns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n): ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>> {\n const option = column.columnDef.aggregationFn\n const registry = column.table._rowModelFns.aggregationFns\n const coreRowModel = column.table.getCoreRowModel()\n const previous = (column as any)._resolvedAggregationFnsCache as\n | ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n | undefined\n\n if (\n previous &&\n previous.option === option &&\n previous.registry === registry &&\n previous.coreRowModel === coreRowModel\n ) {\n return previous.value\n }\n\n const finish = (\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>,\n ) => {\n ;(column as any)._resolvedAggregationFnsCache = {\n coreRowModel,\n option,\n registry,\n value,\n } satisfies ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n return value\n }\n\n if (option == null) return finish([])\n\n if (!Array.isArray(option)) {\n return finish([\n {\n aggregationFn: resolveAggregationFn(column, option as any),\n id: typeof option === 'string' ? option : undefined,\n },\n ])\n }\n\n const ids = makeObjectMap<number>()\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n if (id !== undefined) ids[id] = (ids[id] ?? 0) + 1\n }\n\n const resolved: Array<ResolvedAggregationFn<TFeatures, TData>> = []\n\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n\n if (id === undefined) {\n warn(\n `aggregationFn at index ${i} for column '${column.id}' needs a stable id`,\n )\n resolved.push({ aggregationFn: undefined, id: undefined })\n continue\n }\n\n if (ids[id]! > 1) {\n warn(`aggregationFn id '${id}' for column '${column.id}' is duplicated`)\n resolved.push({ aggregationFn: undefined, id })\n continue\n }\n\n const ref = isAggregationFnDescriptor(item) ? item.aggregationFn : item\n resolved.push({\n aggregationFn: resolveAggregationFn(column, ref),\n id,\n })\n }\n\n return finish(resolved)\n}\n\nfunction getSubRowResult(\n subRowValue: unknown,\n isMultiple: boolean,\n id: string | undefined,\n) {\n if (!isMultiple) return subRowValue\n if (!id || !subRowValue || typeof subRowValue !== 'object') return undefined\n return hasOwn(subRowValue, id)\n ? (subRowValue as Record<string, unknown>)[id]\n : undefined\n}\n\n/** Executes every configured aggregation over a depth-selected row frontier. */\nexport function aggregateColumnValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(args: {\n maxDepth?: number\n subRows?: ReadonlyArray<Row<TFeatures, TData>>\n column: Column<TFeatures, TData, unknown>\n groupingRow?: Row<TFeatures, TData>\n rows: ReadonlyArray<Row<TFeatures, TData>>\n}): unknown {\n const { subRows, column, groupingRow, rows } = args\n const internalColumn = column as Column_Internal<TFeatures, TData, unknown>\n const maxDepth = resolveMaxAggregationDepth(\n args.maxDepth ?? internalColumn.columnDef.maxAggregationDepth,\n )\n const aggregationRows = normalizeAggregationRows(rows, maxDepth)\n const entries = column_getAggregationFns(internalColumn)\n const isMultiple = Array.isArray(internalColumn.columnDef.aggregationFn)\n const canMerge =\n !!subRows?.length &&\n subRows.every(\n (row) =>\n !!(row as any).groupingColumnId &&\n (row as any).groupingColumnId !== column.id,\n )\n\n const execute = (entry: ResolvedAggregationFn<TFeatures, TData>) => {\n const definition = entry.aggregationFn\n if (!definition) return undefined\n\n const context: AggregationContext<TFeatures, TData, unknown> = {\n ...(subRows ? { subRows } : {}),\n column,\n columnId: column.id,\n getValue: (row: Row<TFeatures, TData>) => row.getValue(column.id),\n ...(groupingRow ? { groupingRow } : {}),\n maxDepth,\n rows: aggregationRows,\n table: column.table as any,\n }\n\n if (canMerge && definition.merge) {\n return definition.merge({\n ...context,\n subRowResults: subRows.map((row) =>\n getSubRowResult(row.getValue(column.id), isMultiple, entry.id),\n ),\n subRows,\n })\n }\n\n return definition.aggregate(context)\n }\n\n if (!isMultiple) {\n return entries[0] ? execute(entries[0]) : undefined\n }\n\n const result = makeObjectMap<unknown>()\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]!\n if (entry.id !== undefined) {\n result[entry.id] = execute(entry)\n }\n }\n return result\n}\n\n/** Implements `column.getAggregationValue(options?)` and its default cache. */\nexport function column_getAggregationValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n options?: AggregationValueOptions<TFeatures, TData>,\n): ColumnAggregationValue<TFeatures> {\n const rows = options?.rows\n const resolvedMaxDepth = resolveMaxAggregationDepth(\n options?.maxDepth ?? column.columnDef.maxAggregationDepth,\n )\n const providedResult = column.columnDef.getAggregationValue?.({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n table: column.table as any,\n })\n\n if (providedResult) return providedResult.value as any\n if (column.table.options.manualAggregation) return undefined\n\n if (rows !== undefined) {\n return aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n }) as any\n }\n\n const model = column.table.getPreGroupedRowModel()\n const previous = (column as any)._aggregationValueCache as\n | AggregationCacheEntry\n | undefined\n const registry = column.table._rowModelFns.aggregationFns\n const aggregationFnOption = column.columnDef.aggregationFn\n\n if (\n previous &&\n previous.dependency === model &&\n previous.maxDepth === resolvedMaxDepth &&\n previous.registry === registry &&\n previous.aggregationFnOption === aggregationFnOption\n ) {\n return previous.value as any\n }\n\n const value = aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows: model.rows,\n })\n ;(column as any)._aggregationValueCache = {\n aggregationFnOption,\n dependency: model,\n maxDepth: resolvedMaxDepth,\n registry,\n value,\n } satisfies AggregationCacheEntry\n return value as any\n}\n\n/** Implements `cell.getIsAggregated()` for synthetic grouped rows. */\nexport function cell_getIsAggregated<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n const groupingColumnId = (cell.row as any).groupingColumnId as\n | string\n | undefined\n if (!groupingColumnId || groupingColumnId === cell.column.id) return false\n\n const grouping = (cell.column.table as any).atoms.grouping?.get?.() as\n | Array<string>\n | undefined\n if (grouping?.includes(cell.column.id)) return false\n\n return column_getAggregationFns(cell.column as any).some(\n (entry) => !!entry.aggregationFn,\n )\n}\n\n/** Formats the default scalar or keyed aggregated-cell representation. */\nexport function formatAggregatedCellValue(\n value: unknown,\n option: unknown,\n): string | null {\n if (value == null) return null\n\n if (Array.isArray(option) && typeof value === 'object') {\n const entries = Object.keys(value)\n return entries\n .map(\n (key) => `${key}: ${String((value as Record<string, unknown>)[key])}`,\n )\n .join(', ')\n }\n\n return String(value)\n}\n"],"mappings":";;;AAkCA,SAAS,mBAAmB,OAA2C;CACrE,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,eAAe;AAChE;AAEA,SAAS,0BACP,OAC4C;CAC5C,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YACjB,QAAQ,SACR,mBAAmB;AAEvB;AAEA,SAAS,KAAK,SAAiB;CAC7B,IAAI,QAAQ,IAAI,aAAa,eAC3B,QAAQ,KAAK,OAAO;AAExB;AAEA,SAAS,2BAA2B,UAA8B;CAChE,OAAO,aAAa,UAAa,OAAO,MAAM,QAAQ,IAClD,IACA,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,CAAC;AACtC;;;;;AAMA,SAAgB,yBAId,MACA,WAAW,GACm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yBAAyB,KAAK,MAAa,CAAC,CAAC,MACjD,UAAU,CAAC,CAAC,MAAM,aACrB;AACF;;AAGA,SAAgB,0BACd,OACA,QACe;CACf,IAAI,SAAS,MAAM,OAAO;CAE1B,IAAI,MAAM,QAAQ,MAAM,KAAK,OAAO,UAAU,UAE5C,OADgB,OAAO,KAAK,KACf,CAAC,CACX,KACE,QAAQ,GAAG,IAAI,IAAI,OAAQ,MAAkC,IAAI,GACpE,CAAC,CACA,KAAK,IAAI;CAGd,OAAO,OAAO,KAAK;AACrB"}
1
+ {"version":3,"file":"rowAggregationFeature.utils.js","names":[],"sources":["../../../src/features/row-aggregation/rowAggregationFeature.utils.ts"],"sourcesContent":["import { hasOwn, makeObjectMap } from '../../utils'\nimport type { Cell } from '../../types/Cell'\nimport type { Column, Column_Internal } from '../../types/Column'\nimport type { Row } from '../../types/Row'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type {\n AggregationContext,\n AggregationFnDef,\n AggregationFnDescriptor,\n AggregationFnRef,\n AggregationValueOptions,\n ColumnAggregationValue,\n ResolvedAggregationFn,\n} from './rowAggregationFeature.types'\n\ninterface AggregationCacheEntry {\n aggregationFnOption: unknown\n dependency: unknown\n maxDepth: number\n registry: unknown\n value: unknown\n}\n\ninterface ResolvedAggregationFnsCacheEntry<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n coreRowModel: unknown\n option: unknown\n registry: unknown\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>\n}\n\nfunction isAggregationFnDef(value: unknown): value is AggregationFnDef {\n return !!value && typeof value === 'object' && 'aggregate' in value\n}\n\nfunction isAggregationFnDescriptor(\n value: unknown,\n): value is AggregationFnDescriptor<any, any> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'id' in value &&\n 'aggregationFn' in value\n )\n}\n\nfunction warn(message: string) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(message)\n }\n}\n\nfunction resolveMaxAggregationDepth(maxDepth: number | undefined) {\n return maxDepth === undefined || Number.isNaN(maxDepth)\n ? 0\n : Math.max(0, Math.floor(maxDepth))\n}\n\n/**\n * Selects unique rows at a maximum relative depth in encounter order.\n * Branches that end before the requested depth contribute their deepest row.\n */\nexport function normalizeAggregationRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: ReadonlyArray<Row<TFeatures, TData>>,\n maxDepth = 0,\n): Array<Row<TFeatures, TData>> {\n const result: Array<Row<TFeatures, TData>> = []\n const seen = new Set<string>()\n const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)\n\n const visit = (row: Row<TFeatures, TData>, depth: number) => {\n if (row.subRows.length && depth < normalizedMaxDepth) {\n for (let i = 0; i < row.subRows.length; i++) {\n visit(row.subRows[i]!, depth + 1)\n }\n return\n }\n\n if (!seen.has(row.id)) {\n seen.add(row.id)\n result.push(row)\n }\n }\n\n for (let i = 0; i < rows.length; i++) {\n visit(rows[i]!, 0)\n }\n\n return result\n}\n\n/**\n * Frontier selection for rows that are distinct nodes of a single row tree —\n * the row models the table builds itself. Skips `normalizeAggregationRows`'\n * duplicate-id guard (disjoint subtrees cannot revisit a row) and returns\n * `rows` unchanged when no row descends, so the default `maxDepth: 0` case\n * costs nothing per aggregation.\n */\nexport function normalizeUniqueAggregationRows<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n rows: ReadonlyArray<Row<TFeatures, TData>>,\n maxDepth = 0,\n): ReadonlyArray<Row<TFeatures, TData>> {\n const normalizedMaxDepth = resolveMaxAggregationDepth(maxDepth)\n\n let needsDescent = false\n if (normalizedMaxDepth > 0) {\n for (let i = 0; i < rows.length; i++) {\n if (rows[i]!.subRows.length) {\n needsDescent = true\n break\n }\n }\n }\n if (!needsDescent) return rows\n\n const result: Array<Row<TFeatures, TData>> = []\n\n const visit = (row: Row<TFeatures, TData>, depth: number) => {\n if (row.subRows.length && depth < normalizedMaxDepth) {\n for (let i = 0; i < row.subRows.length; i++) {\n visit(row.subRows[i]!, depth + 1)\n }\n return\n }\n result.push(row)\n }\n\n for (let i = 0; i < rows.length; i++) {\n visit(rows[i]!, 0)\n }\n\n return result\n}\n\nfunction getAutoAggregationFnName(\n value: unknown,\n): 'extent' | 'sum' | undefined {\n if (typeof value === 'number') {\n return 'sum'\n }\n\n if (value instanceof Date && !Number.isNaN(value.getTime())) {\n return 'extent'\n }\n\n return undefined\n}\n\n/** Resolves the `sum` or `extent` definition inferred from the first core row. */\nexport function column_getAutoAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n const value = column.table.getCoreRowModel().flatRows[0]?.getValue(column.id)\n\n const name = getAutoAggregationFnName(value)\n if (!name) return undefined\n\n const aggregationFn = column.table._rowModelFns.aggregationFns?.[name]\n\n if (!aggregationFn) {\n warn(\n `aggregationFn '${name}' (auto) for column '${column.id}' is not registered`,\n )\n }\n\n return aggregationFn\n}\n\nfunction resolveAggregationFn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n column: Column_Internal<TFeatures, TData, any>,\n ref: AggregationFnRef<TFeatures, TData, any, any>,\n): AggregationFnDef<TFeatures, TData, any, any> | undefined {\n if (isAggregationFnDef(ref)) return ref as any\n if (ref === 'auto') return column_getAutoAggregationFn(column)\n\n const aggregationFn =\n column.table._rowModelFns.aggregationFns?.[ref as string]\n if (!aggregationFn) {\n warn(\n `aggregationFn '${String(ref)}' for column '${column.id}' is not registered`,\n )\n }\n return aggregationFn\n}\n\n/** Resolves and validates a column's scalar or multiple aggregation option. */\nexport function column_getAggregationFns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n): ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>> {\n const option = column.columnDef.aggregationFn\n const registry = column.table._rowModelFns.aggregationFns\n const coreRowModel = column.table.getCoreRowModel()\n const previous = (column as any)._resolvedAggregationFnsCache as\n | ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n | undefined\n\n if (\n previous &&\n previous.option === option &&\n previous.registry === registry &&\n previous.coreRowModel === coreRowModel\n ) {\n return previous.value\n }\n\n const finish = (\n value: ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>,\n ) => {\n ;(column as any)._resolvedAggregationFnsCache = {\n coreRowModel,\n option,\n registry,\n value,\n } satisfies ResolvedAggregationFnsCacheEntry<TFeatures, TData>\n return value\n }\n\n if (option == null) return finish([])\n\n if (!Array.isArray(option)) {\n return finish([\n {\n aggregationFn: resolveAggregationFn(column, option as any),\n id: typeof option === 'string' ? option : undefined,\n },\n ])\n }\n\n const ids = makeObjectMap<number>()\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n if (id !== undefined) ids[id] = (ids[id] ?? 0) + 1\n }\n\n const resolved: Array<ResolvedAggregationFn<TFeatures, TData>> = []\n\n for (let i = 0; i < option.length; i++) {\n const item = option[i]\n const id =\n typeof item === 'string'\n ? item\n : isAggregationFnDescriptor(item)\n ? item.id\n : undefined\n\n if (id === undefined) {\n warn(\n `aggregationFn at index ${i} for column '${column.id}' needs a stable id`,\n )\n resolved.push({ aggregationFn: undefined, id: undefined })\n continue\n }\n\n if (ids[id]! > 1) {\n warn(`aggregationFn id '${id}' for column '${column.id}' is duplicated`)\n resolved.push({ aggregationFn: undefined, id })\n continue\n }\n\n const ref = isAggregationFnDescriptor(item) ? item.aggregationFn : item\n resolved.push({\n aggregationFn: resolveAggregationFn(column, ref),\n id,\n })\n }\n\n return finish(resolved)\n}\n\nfunction getSubRowResult(\n subRowValue: unknown,\n isMultiple: boolean,\n id: string | undefined,\n) {\n if (!isMultiple) return subRowValue\n if (!id || !subRowValue || typeof subRowValue !== 'object') return undefined\n return hasOwn(subRowValue, id)\n ? (subRowValue as Record<string, unknown>)[id]\n : undefined\n}\n\n/** Executes every configured aggregation over a depth-selected row frontier. */\nexport function aggregateColumnValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(args: {\n maxDepth?: number\n subRows?: ReadonlyArray<Row<TFeatures, TData>>\n column: Column<TFeatures, TData, unknown>\n groupingRow?: Row<TFeatures, TData>\n rows: ReadonlyArray<Row<TFeatures, TData>>\n /**\n * Marks `rows` as distinct nodes of a single row tree (rows the table's own\n * row models produced), enabling frontier selection without the\n * duplicate-id guard. Caller-supplied row arrays must omit this.\n */\n uniqueRows?: boolean\n}): unknown {\n const { subRows, column, groupingRow, rows, uniqueRows } = args\n const internalColumn = column as Column_Internal<TFeatures, TData, unknown>\n const maxDepth = resolveMaxAggregationDepth(\n args.maxDepth ?? internalColumn.columnDef.maxAggregationDepth,\n )\n const aggregationRows = uniqueRows\n ? normalizeUniqueAggregationRows(rows, maxDepth)\n : normalizeAggregationRows(rows, maxDepth)\n const entries = column_getAggregationFns(internalColumn)\n const isMultiple = Array.isArray(internalColumn.columnDef.aggregationFn)\n const canMerge =\n !!subRows?.length &&\n subRows.every(\n (row) =>\n !!(row as any).groupingColumnId &&\n (row as any).groupingColumnId !== column.id,\n )\n\n const getValue = (row: Row<TFeatures, TData>) => row.getValue(column.id)\n\n const execute = (entry: ResolvedAggregationFn<TFeatures, TData>) => {\n const definition = entry.aggregationFn\n if (!definition) return undefined\n\n const context: AggregationContext<TFeatures, TData, unknown> = {\n ...(subRows ? { subRows } : {}),\n column,\n columnId: column.id,\n getValue,\n ...(groupingRow ? { groupingRow } : {}),\n maxDepth,\n rows: aggregationRows,\n table: column.table as any,\n }\n\n if (canMerge && definition.merge) {\n return definition.merge({\n ...context,\n subRowResults: subRows.map((row) =>\n getSubRowResult(row.getValue(column.id), isMultiple, entry.id),\n ),\n subRows,\n })\n }\n\n return definition.aggregate(context)\n }\n\n if (!isMultiple) {\n return entries[0] ? execute(entries[0]) : undefined\n }\n\n const result = makeObjectMap<unknown>()\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]!\n if (entry.id !== undefined) {\n result[entry.id] = execute(entry)\n }\n }\n return result\n}\n\n/** Implements `column.getAggregationValue(options?)` and its default cache. */\nexport function column_getAggregationValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n options?: AggregationValueOptions<TFeatures, TData>,\n): ColumnAggregationValue<TFeatures> {\n const rows = options?.rows\n const resolvedMaxDepth = resolveMaxAggregationDepth(\n options?.maxDepth ?? column.columnDef.maxAggregationDepth,\n )\n const providedResult = column.columnDef.getAggregationValue?.({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n table: column.table as any,\n })\n\n if (providedResult) return providedResult.value as any\n if (column.table.options.manualAggregation) return undefined\n\n if (rows !== undefined) {\n return aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows,\n }) as any\n }\n\n const model = column.table.getPreGroupedRowModel()\n const previous = (column as any)._aggregationValueCache as\n | AggregationCacheEntry\n | undefined\n const registry = column.table._rowModelFns.aggregationFns\n const aggregationFnOption = column.columnDef.aggregationFn\n\n if (\n previous &&\n previous.dependency === model &&\n previous.maxDepth === resolvedMaxDepth &&\n previous.registry === registry &&\n previous.aggregationFnOption === aggregationFnOption\n ) {\n return previous.value as any\n }\n\n const value = aggregateColumnValue({\n column: column as any,\n maxDepth: resolvedMaxDepth,\n rows: model.rows,\n uniqueRows: true,\n })\n ;(column as any)._aggregationValueCache = {\n aggregationFnOption,\n dependency: model,\n maxDepth: resolvedMaxDepth,\n registry,\n value,\n } satisfies AggregationCacheEntry\n return value as any\n}\n\n/** Implements `cell.getIsAggregated()` for synthetic grouped rows. */\nexport function cell_getIsAggregated<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n const groupingColumnId = (cell.row as any).groupingColumnId as\n | string\n | undefined\n if (!groupingColumnId || groupingColumnId === cell.column.id) return false\n\n const grouping = (cell.column.table as any).atoms.grouping?.get?.() as\n | Array<string>\n | undefined\n if (grouping?.includes(cell.column.id)) return false\n\n return column_getAggregationFns(cell.column as any).some(\n (entry) => !!entry.aggregationFn,\n )\n}\n\n/** Formats the default scalar or keyed aggregated-cell representation. */\nexport function formatAggregatedCellValue(\n value: unknown,\n option: unknown,\n): string | null {\n if (value == null) return null\n\n if (Array.isArray(option) && typeof value === 'object') {\n const entries = Object.keys(value)\n return entries\n .map(\n (key) => `${key}: ${String((value as Record<string, unknown>)[key])}`,\n )\n .join(', ')\n }\n\n return String(value)\n}\n"],"mappings":";;;AAkCA,SAAS,mBAAmB,OAA2C;CACrE,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,eAAe;AAChE;AAEA,SAAS,0BACP,OAC4C;CAC5C,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YACjB,QAAQ,SACR,mBAAmB;AAEvB;AAEA,SAAS,KAAK,SAAiB;CAC7B,IAAI,QAAQ,IAAI,aAAa,eAC3B,QAAQ,KAAK,OAAO;AAExB;AAEA,SAAS,2BAA2B,UAA8B;CAChE,OAAO,aAAa,UAAa,OAAO,MAAM,QAAQ,IAClD,IACA,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,CAAC;AACtC;;;;;AAMA,SAAgB,yBAId,MACA,WAAW,GACmB;CAC9B,MAAM,SAAuC,CAAC;CAC9C,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,qBAAqB,2BAA2B,QAAQ;CAE9D,MAAM,SAAS,KAA4B,UAAkB;EAC3D,IAAI,IAAI,QAAQ,UAAU,QAAQ,oBAAoB;GACpD,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,QAAQ,KACtC,MAAM,IAAI,QAAQ,IAAK,QAAQ,CAAC;GAElC;EACF;EAEA,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,GAAG;GACrB,KAAK,IAAI,IAAI,EAAE;GACf,OAAO,KAAK,GAAG;EACjB;CACF;CAEA,KAAK,IA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AU;EACV;EACA;CACF;CACA,OAAO;AACT;;AAGA,SAAgB,qBAId,MAAsC;CACtC,MAAM,mBAAoB,KAAK,IAAY;CAG3C,IAAI,CAAC,oBAAoB,qBAAqB,KAAK,OAAO,IAAI,OAAO;CAKrE,KAHkB,KAAK,OAAO,MAAc,MAAM,UAAU,MAAM,EAGtD,EAAE,SAAS,KAAK,OAAO,EAAE,GAAG,OAAO;CAE/C,OAAO,yBAAyB,KAAK,MAAa,CAAC,CAAC,MACjD,UAAU,CAAC,CAAC,MAAM,aACrB;AACF;;AAGA,SAAgB,0BACd,OACA,QACe;CACf,IAAI,SAAS,MAAM,OAAO;CAE1B,IAAI,MAAM,QAAQ,MAAM,KAAK,OAAO,UAAU,UAE5C,OADgB,OAAO,KAAK,KACf,CAAC,CACX,KACE,QAAQ,GAAG,IAAI,IAAI,OAAQ,MAAkC,IAAI,GACpE,CAAC,CACA,KAAK,IAAI;CAGd,OAAO,OAAO,KAAK;AACrB"}
@@ -101,6 +101,7 @@ exports.isRowSelected = require_rowSelectionFeature_utils.isRowSelected;
101
101
  exports.isSubRowSelected = require_rowSelectionFeature_utils.isSubRowSelected;
102
102
  exports.isTouchStartEvent = require_columnResizingFeature_utils.isTouchStartEvent;
103
103
  exports.normalizeAggregationRows = require_rowAggregationFeature_utils.normalizeAggregationRows;
104
+ exports.normalizeUniqueAggregationRows = require_rowAggregationFeature_utils.normalizeUniqueAggregationRows;
104
105
  exports.orderColumns = require_columnOrderingFeature_utils.orderColumns;
105
106
  exports.passiveEventSupported = require_columnResizingFeature_utils.passiveEventSupported;
106
107
  exports.row_getAllCells = require_coreRowsFeature_utils.row_getAllCells;
@@ -4,7 +4,7 @@ import { header_getContext, header_getLeafHeaders, table_getFlatHeaders, table_g
4
4
  import { row_getAllCells, row_getAllCellsByColumnId, row_getDisplayIndex, row_getLeafRows, row_getParentRow, row_getParentRows, row_getUniqueValues, row_getValue, row_renderValue, table_getMaxSubRowDepth, table_getRow, table_getRowId, table_getRowsInDisplayOrder } from "./core/rows/coreRowsFeature.utils.cjs";
5
5
  import { table_getCoreRowModel, table_getExpandedRowModel, table_getFilteredRowModel, table_getGroupedRowModel, table_getPaginatedRowModel, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSortedRowModel, table_getRowModel, table_getSortedRowModel } from "./core/row-models/coreRowModelsFeature.utils.cjs";
6
6
  import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.cjs";
7
- import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.cjs";
7
+ import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.cjs";
8
8
  import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.cjs";
9
9
  import { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters } from "./features/column-filtering/columnFilteringFeature.utils.cjs";
10
10
  import { cell_getIsGrouped, cell_getIsPlaceholder, column_getCanGroup, column_getGroupedIndex, column_getIsGrouped, column_getToggleGroupingHandler, column_toggleGrouping, getDefaultGroupingState, row_getGroupingValue, row_getIsGrouped, table_resetGrouping, table_setGrouping } from "./features/column-grouping/columnGroupingFeature.utils.cjs";
@@ -19,4 +19,4 @@ import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, t
19
19
  import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinnedIndex, row_pin, table_getBottomRows, table_getCenterRows, table_getIsSomeRowsPinned, table_getTopRows, table_resetRowPinning, table_setRowPinning } from "./features/row-pinning/rowPinningFeature.utils.cjs";
20
20
  import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.cjs";
21
21
  import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.cjs";
22
- export { aggregateColumnValue, cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
22
+ export { aggregateColumnValue, cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
@@ -4,7 +4,7 @@ import { header_getContext, header_getLeafHeaders, table_getFlatHeaders, table_g
4
4
  import { row_getAllCells, row_getAllCellsByColumnId, row_getDisplayIndex, row_getLeafRows, row_getParentRow, row_getParentRows, row_getUniqueValues, row_getValue, row_renderValue, table_getMaxSubRowDepth, table_getRow, table_getRowId, table_getRowsInDisplayOrder } from "./core/rows/coreRowsFeature.utils.js";
5
5
  import { table_getCoreRowModel, table_getExpandedRowModel, table_getFilteredRowModel, table_getGroupedRowModel, table_getPaginatedRowModel, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSortedRowModel, table_getRowModel, table_getSortedRowModel } from "./core/row-models/coreRowModelsFeature.utils.js";
6
6
  import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.js";
7
- import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.js";
7
+ import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.js";
8
8
  import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.js";
9
9
  import { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters } from "./features/column-filtering/columnFilteringFeature.utils.js";
10
10
  import { cell_getIsGrouped, cell_getIsPlaceholder, column_getCanGroup, column_getGroupedIndex, column_getIsGrouped, column_getToggleGroupingHandler, column_toggleGrouping, getDefaultGroupingState, row_getGroupingValue, row_getIsGrouped, table_resetGrouping, table_setGrouping } from "./features/column-grouping/columnGroupingFeature.utils.js";
@@ -19,4 +19,4 @@ import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, t
19
19
  import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinnedIndex, row_pin, table_getBottomRows, table_getCenterRows, table_getIsSomeRowsPinned, table_getTopRows, table_resetRowPinning, table_setRowPinning } from "./features/row-pinning/rowPinningFeature.utils.js";
20
20
  import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.js";
21
21
  import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.js";
22
- export { aggregateColumnValue, cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
22
+ export { aggregateColumnValue, cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
@@ -9,7 +9,7 @@ import { table_getCoreRowModel, table_getExpandedRowModel, table_getFilteredRowM
9
9
  import { row_getAllCells, row_getAllCellsByColumnId, row_getDisplayIndex, row_getLeafRows, row_getParentRow, row_getParentRows, row_getUniqueValues, row_getValue, row_renderValue, table_getMaxSubRowDepth, table_getRow, table_getRowId, table_getRowsInDisplayOrder } from "./core/rows/coreRowsFeature.utils.js";
10
10
  import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.js";
11
11
  import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.js";
12
- import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.js";
12
+ import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.js";
13
13
  import { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters } from "./features/column-filtering/columnFilteringFeature.utils.js";
14
14
  import { cell_getIsGrouped, cell_getIsPlaceholder, column_getCanGroup, column_getGroupedIndex, column_getIsGrouped, column_getToggleGroupingHandler, column_toggleGrouping, getDefaultGroupingState, row_getGroupingValue, row_getIsGrouped, table_resetGrouping, table_setGrouping } from "./features/column-grouping/columnGroupingFeature.utils.js";
15
15
  import { column_getAfter, column_getSize, column_getStart, column_resetSize, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, header_getSize, header_getStart, table_getCenterTotalSize, table_getColumnOffsets, table_getEndTotalSize, table_getStartTotalSize, table_getTotalSize, table_resetColumnSizing, table_setColumnSizing } from "./features/column-sizing/columnSizingFeature.utils.js";
@@ -20,4 +20,4 @@ import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinne
20
20
  import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.js";
21
21
  import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.js";
22
22
 
23
- export { aggregateColumnValue, cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
23
+ export { aggregateColumnValue, cell_getContext, cell_getIsAggregated, cell_getIsGrouped, cell_getIsPlaceholder, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetExpanded, table_autoResetPageIndex, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_nextPage, table_previousPage, table_reset, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/table-core",
3
- "version": "9.0.0-beta.51",
3
+ "version": "9.0.0-beta.52",
4
4
  "description": "Headless UI for building powerful tables & datagrids for TS/JS.",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features']
12
12
  sources:
@@ -5,7 +5,7 @@ description: >
5
5
  metadata:
6
6
  type: sub-skill
7
7
  library: '@tanstack/table-core'
8
- library_version: '9.0.0-beta.51'
8
+ library_version: '9.0.0-beta.52'
9
9
  requires: ['core', 'table-features']
10
10
  sources:
11
11
  - 'TanStack/table:packages/table-core/src/index.ts'
@@ -5,7 +5,7 @@ description: >
5
5
  metadata:
6
6
  type: sub-skill
7
7
  library: '@tanstack/table-core'
8
- library_version: '9.0.0-beta.51'
8
+ library_version: '9.0.0-beta.52'
9
9
  requires: ['core', 'table-features']
10
10
  sources:
11
11
  - 'TanStack/table:docs/guide/row-models.md'
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features', 'column-filtering']
12
12
  sources:
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features', 'client-vs-server']
12
12
  sources:
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features']
12
12
  sources:
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features', 'column-sizing']
12
12
  sources:
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features', 'column-sizing']
12
12
  sources:
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features']
12
12
  sources:
@@ -6,7 +6,7 @@ metadata:
6
6
  {
7
7
  type: sub-skill,
8
8
  library: '@tanstack/table-core',
9
- library_version: '9.0.0-beta.51',
9
+ library_version: '9.0.0-beta.52',
10
10
  }
11
11
  requires: ['core', 'table-features']
12
12
  sources: