@tanstack/table-core 9.0.0-beta.19 → 9.0.0-beta.20

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 (79) hide show
  1. package/dist/core/cells/constructCell.d.cts +1 -1
  2. package/dist/core/cells/constructCell.d.ts +1 -1
  3. package/dist/core/cells/coreCellsFeature.types.d.cts +1 -1
  4. package/dist/core/cells/coreCellsFeature.types.d.ts +1 -1
  5. package/dist/core/cells/coreCellsFeature.utils.d.cts +1 -1
  6. package/dist/core/cells/coreCellsFeature.utils.d.ts +1 -1
  7. package/dist/core/columns/constructColumn.cjs +5 -0
  8. package/dist/core/columns/constructColumn.cjs.map +1 -1
  9. package/dist/core/columns/constructColumn.d.cts +2 -2
  10. package/dist/core/columns/constructColumn.d.ts +2 -2
  11. package/dist/core/columns/constructColumn.js +5 -0
  12. package/dist/core/columns/constructColumn.js.map +1 -1
  13. package/dist/core/columns/coreColumnsFeature.types.d.cts +2 -2
  14. package/dist/core/columns/coreColumnsFeature.types.d.ts +2 -2
  15. package/dist/core/columns/coreColumnsFeature.utils.d.cts +2 -2
  16. package/dist/core/columns/coreColumnsFeature.utils.d.ts +2 -2
  17. package/dist/core/headers/buildHeaderGroups.d.cts +1 -1
  18. package/dist/core/headers/buildHeaderGroups.d.ts +1 -1
  19. package/dist/core/headers/constructHeader.d.cts +1 -1
  20. package/dist/core/headers/constructHeader.d.ts +1 -1
  21. package/dist/core/headers/coreHeadersFeature.types.d.cts +1 -1
  22. package/dist/core/headers/coreHeadersFeature.types.d.ts +1 -1
  23. package/dist/core/headers/coreHeadersFeature.utils.d.cts +1 -1
  24. package/dist/core/headers/coreHeadersFeature.utils.d.ts +1 -1
  25. package/dist/core/row-models/coreRowModelsFeature.types.d.cts +1 -1
  26. package/dist/core/row-models/coreRowModelsFeature.types.d.ts +1 -1
  27. package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +1 -1
  28. package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +1 -1
  29. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +1 -1
  30. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +1 -1
  31. package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +1 -1
  32. package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +1 -1
  33. package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +1 -1
  34. package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +1 -1
  35. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +1 -1
  36. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +1 -1
  37. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +1 -1
  38. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +1 -1
  39. package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +1 -1
  40. package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +1 -1
  41. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +1 -1
  42. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +1 -1
  43. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +1 -1
  44. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +1 -1
  45. package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +1 -1
  46. package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +1 -1
  47. package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +1 -1
  48. package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +1 -1
  49. package/dist/features/row-pinning/rowPinningFeature.utils.cjs +2 -2
  50. package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
  51. package/dist/features/row-pinning/rowPinningFeature.utils.js +2 -2
  52. package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
  53. package/dist/features/row-sorting/rowSortingFeature.types.d.cts +1 -1
  54. package/dist/features/row-sorting/rowSortingFeature.types.d.ts +1 -1
  55. package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +1 -1
  56. package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +1 -1
  57. package/dist/index.d.cts +9 -9
  58. package/dist/index.d.ts +9 -9
  59. package/dist/types/Column.d.cts +4 -4
  60. package/dist/types/Column.d.ts +4 -4
  61. package/dist/types/ColumnDef.d.cts +3 -3
  62. package/dist/types/ColumnDef.d.ts +3 -3
  63. package/dist/types/Row.d.cts +1 -1
  64. package/dist/types/Row.d.ts +1 -1
  65. package/dist/types/RowModel.d.cts +1 -1
  66. package/dist/types/RowModel.d.ts +1 -1
  67. package/dist/types/RowModelFns.d.cts +1 -1
  68. package/dist/types/RowModelFns.d.ts +1 -1
  69. package/dist/types/Table.d.cts +5 -5
  70. package/dist/types/Table.d.ts +5 -5
  71. package/dist/types/TableFeatures.d.cts +154 -15
  72. package/dist/types/TableFeatures.d.ts +154 -15
  73. package/dist/types/TableOptions.d.cts +6 -6
  74. package/dist/types/TableOptions.d.ts +6 -6
  75. package/dist/types/TableState.d.cts +4 -4
  76. package/dist/types/TableState.d.ts +4 -4
  77. package/package.json +1 -1
  78. package/src/core/columns/constructColumn.ts +6 -0
  79. package/src/types/TableFeatures.ts +161 -15
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Row } from "../../types/Row.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
  import { Cell } from "../../types/Cell.cjs";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Row } from "../../types/Row.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
  import { Cell } from "../../types/Cell.js";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, Getter, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Row } from "../../types/Row.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
  import { Cell } from "../../types/Cell.cjs";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, Getter, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Row } from "../../types/Row.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
  import { Cell } from "../../types/Cell.js";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, NoInfer, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Row } from "../../types/Row.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
  import { Cell } from "../../types/Cell.cjs";
7
7
  //#region src/core/cells/coreCellsFeature.utils.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, NoInfer, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Row } from "../../types/Row.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
  import { Cell } from "../../types/Cell.js";
7
7
  //#region src/core/cells/coreCellsFeature.utils.d.ts
@@ -53,6 +53,11 @@ function constructColumn(table, columnDef, depth, parent) {
53
53
  column.depth = depth;
54
54
  column.id = `${String(id)}`;
55
55
  column.parent = parent;
56
+ const features = Object.values(table._features);
57
+ for (let i = 0; i < features.length; i++) {
58
+ var _initColumnInstanceDa, _ref2;
59
+ (_initColumnInstanceDa = (_ref2 = features[i]).initColumnInstanceData) === null || _initColumnInstanceDa === void 0 || _initColumnInstanceDa.call(_ref2, column);
60
+ }
56
61
  return column;
57
62
  }
58
63
 
@@ -1 +1 @@
1
- {"version":3,"file":"constructColumn.cjs","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,MAAM;EACjC,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,KAAK;EACpE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,oBAGX;EACf,GAAG;CACL;CAEA,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,GAAG,IAAI,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,GAAG,GAAG;EAC7B,MAAM,OAAO,YAAY,MAAM,GAAG;EAClC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,sBAChD;GAEJ;GAEA,OAAO;EACT;CACF,OACE,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,iEACN;EAEF,MAAM,IAAI,MAAM;CAClB;CAGA,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,CAAC;CAClB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,EAAE;CACxB,OAAO,SAAS;CAEhB,OAAO;AACT"}
1
+ {"version":3,"file":"constructColumn.cjs","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n // Initialize instance-specific data for features that need it\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.initColumnInstanceData?.(column)\n }\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,MAAM;EACjC,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,KAAK;EACpE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,oBAGX;EACf,GAAG;CACL;CAEA,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,GAAG,IAAI,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,GAAG,GAAG;EAC7B,MAAM,OAAO,YAAY,MAAM,GAAG;EAClC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,sBAChD;GAEJ;GAEA,OAAO;EACT;CACF,OACE,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,iEACN;EAEF,MAAM,IAAI,MAAM;CAClB;CAGA,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,CAAC;CAClB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,EAAE;CACxB,OAAO,SAAS;CAGhB,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;CAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;EACxC,2CAAS,IAAI,0GAAyB,MAAM;CAC9C;CAEA,OAAO;AACT"}
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
- import { Table } from "../../types/Table.cjs";
4
2
  import { ColumnDef } from "../../types/ColumnDef.cjs";
3
+ import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/core/columns/constructColumn.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
- import { Table } from "../../types/Table.js";
4
2
  import { ColumnDef } from "../../types/ColumnDef.js";
3
+ import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
 
7
7
  //#region src/core/columns/constructColumn.d.ts
@@ -52,6 +52,11 @@ function constructColumn(table, columnDef, depth, parent) {
52
52
  column.depth = depth;
53
53
  column.id = `${String(id)}`;
54
54
  column.parent = parent;
55
+ const features = Object.values(table._features);
56
+ for (let i = 0; i < features.length; i++) {
57
+ var _initColumnInstanceDa, _ref2;
58
+ (_initColumnInstanceDa = (_ref2 = features[i]).initColumnInstanceData) === null || _initColumnInstanceDa === void 0 || _initColumnInstanceDa.call(_ref2, column);
59
+ }
55
60
  return column;
56
61
  }
57
62
 
@@ -1 +1 @@
1
- {"version":3,"file":"constructColumn.js","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,MAAM;EACjC,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,KAAK;EACpE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,oBAGX;EACf,GAAG;CACL;CAEA,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,GAAG,IAAI,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,GAAG,GAAG;EAC7B,MAAM,OAAO,YAAY,MAAM,GAAG;EAClC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,sBAChD;GAEJ;GAEA,OAAO;EACT;CACF,OACE,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,iEACN;EAEF,MAAM,IAAI,MAAM;CAClB;CAGA,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,CAAC;CAClB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,EAAE;CACxB,OAAO,SAAS;CAEhB,OAAO;AACT"}
1
+ {"version":3,"file":"constructColumn.js","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n // Initialize instance-specific data for features that need it\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.initColumnInstanceData?.(column)\n }\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,MAAM;EACjC,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,KAAK;EACpE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,oBAGX;EACf,GAAG;CACL;CAEA,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,GAAG,IAAI,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,GAAG,GAAG;EAC7B,MAAM,OAAO,YAAY,MAAM,GAAG;EAClC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,sBAChD;GAEJ;GAEA,OAAO;EACT;CACF,OACE,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,iEACN;EAEF,MAAM,IAAI,MAAM;CAClB;CAGA,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,CAAC;CAClB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,EAAE;CACxB,OAAO,SAAS;CAGhB,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;CAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;EACxC,2CAAS,IAAI,0GAAyB,MAAM;CAC9C;CAEA,OAAO;AACT"}
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
- import { Table } from "../../types/Table.cjs";
4
2
  import { AccessorFn, ColumnDef } from "../../types/ColumnDef.cjs";
3
+ import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/core/columns/coreColumnsFeature.types.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
- import { Table } from "../../types/Table.js";
4
2
  import { AccessorFn, ColumnDef } from "../../types/ColumnDef.js";
3
+ import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
 
7
7
  //#region src/core/columns/coreColumnsFeature.types.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
- import { Table } from "../../types/Table.cjs";
4
2
  import { ColumnDef } from "../../types/ColumnDef.cjs";
3
+ import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/core/columns/coreColumnsFeature.utils.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
- import { Table } from "../../types/Table.js";
4
2
  import { ColumnDef } from "../../types/ColumnDef.js";
3
+ import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
 
7
7
  //#region src/core/columns/coreColumnsFeature.utils.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.cjs";
3
- import { Column } from "../../types/Column.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/core/headers/buildHeaderGroups.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.js";
3
- import { Column } from "../../types/Column.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
 
7
7
  //#region src/core/headers/buildHeaderGroups.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
2
  import { Header } from "../../types/Header.cjs";
3
- import { Column } from "../../types/Column.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/core/headers/constructHeader.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
2
  import { Header } from "../../types/Header.js";
3
- import { Column } from "../../types/Column.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
 
7
7
  //#region src/core/headers/constructHeader.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.cjs";
3
3
  import { Header } from "../../types/Header.cjs";
4
- import { Column } from "../../types/Column.cjs";
5
4
  import { Table } from "../../types/Table.cjs";
5
+ import { Column } from "../../types/Column.cjs";
6
6
  import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
 
8
8
  //#region src/core/headers/coreHeadersFeature.types.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.js";
3
3
  import { Header } from "../../types/Header.js";
4
- import { Column } from "../../types/Column.js";
5
4
  import { Table } from "../../types/Table.js";
5
+ import { Column } from "../../types/Column.js";
6
6
  import { TableFeatures } from "../../types/TableFeatures.js";
7
7
 
8
8
  //#region src/core/headers/coreHeadersFeature.types.d.ts
@@ -1,8 +1,8 @@
1
1
  import { RowData } from "../../types/type-utils.cjs";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.cjs";
3
3
  import { Header } from "../../types/Header.cjs";
4
- import { Column } from "../../types/Column.cjs";
5
4
  import { Table } from "../../types/Table.cjs";
5
+ import { Column } from "../../types/Column.cjs";
6
6
  import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
  //#region src/core/headers/coreHeadersFeature.utils.d.ts
8
8
  /**
@@ -1,8 +1,8 @@
1
1
  import { RowData } from "../../types/type-utils.js";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.js";
3
3
  import { Header } from "../../types/Header.js";
4
- import { Column } from "../../types/Column.js";
5
4
  import { Table } from "../../types/Table.js";
5
+ import { Column } from "../../types/Column.js";
6
6
  import { TableFeatures } from "../../types/TableFeatures.js";
7
7
  //#region src/core/headers/coreHeadersFeature.utils.d.ts
8
8
  /**
@@ -1,9 +1,9 @@
1
1
  import { RowData } from "../../types/type-utils.cjs";
2
- import { Table_RowModels_Sorted } from "../../features/row-sorting/rowSortingFeature.types.cjs";
3
2
  import { Table_RowModels_Expanded } from "../../features/row-expanding/rowExpandingFeature.types.cjs";
4
3
  import { Row } from "../../types/Row.cjs";
5
4
  import { Table_RowModels_Filtered } from "../../features/column-filtering/columnFilteringFeature.types.cjs";
6
5
  import { Table_RowModels_Paginated } from "../../features/row-pagination/rowPaginationFeature.types.cjs";
6
+ import { Table_RowModels_Sorted } from "../../features/row-sorting/rowSortingFeature.types.cjs";
7
7
  import { TableFeatures } from "../../types/TableFeatures.cjs";
8
8
  import { Table_RowModels_Faceted } from "../../features/column-faceting/columnFacetingFeature.types.cjs";
9
9
  import { Table_RowModels_Grouped } from "../../features/column-grouping/columnGroupingFeature.types.cjs";
@@ -1,9 +1,9 @@
1
1
  import { RowData } from "../../types/type-utils.js";
2
- import { Table_RowModels_Sorted } from "../../features/row-sorting/rowSortingFeature.types.js";
3
2
  import { Table_RowModels_Expanded } from "../../features/row-expanding/rowExpandingFeature.types.js";
4
3
  import { Row } from "../../types/Row.js";
5
4
  import { Table_RowModels_Filtered } from "../../features/column-filtering/columnFilteringFeature.types.js";
6
5
  import { Table_RowModels_Paginated } from "../../features/row-pagination/rowPaginationFeature.types.js";
6
+ import { Table_RowModels_Sorted } from "../../features/row-sorting/rowSortingFeature.types.js";
7
7
  import { TableFeatures } from "../../types/TableFeatures.js";
8
8
  import { Table_RowModels_Faceted } from "../../features/column-faceting/columnFacetingFeature.types.js";
9
9
  import { Table_RowModels_Grouped } from "../../features/column-grouping/columnGroupingFeature.types.js";
@@ -1,6 +1,6 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Table } from "../../types/Table.cjs";
3
+ import { Column } from "../../types/Column.cjs";
4
4
  import { TableFeatures } from "../../types/TableFeatures.cjs";
5
5
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Table } from "../../types/Table.js";
3
+ import { Column } from "../../types/Column.js";
4
4
  import { TableFeatures } from "../../types/TableFeatures.js";
5
5
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, OnChangeFn, RowData, Updater } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Row } from "../../types/Row.cjs";
4
3
  import { BuiltInFilterFn } from "../../fns/filterFns.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { IsAny, TableFeatures } from "../../types/TableFeatures.cjs";
6
6
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, OnChangeFn, RowData, Updater } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Row } from "../../types/Row.js";
4
3
  import { BuiltInFilterFn } from "../../fns/filterFns.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { IsAny, TableFeatures } from "../../types/TableFeatures.js";
6
6
  import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { ColumnFiltersState, FilterFn } from "./columnFilteringFeature.types.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
 
7
7
  //#region src/features/column-filtering/columnFilteringFeature.utils.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { ColumnFiltersState, FilterFn } from "./columnFilteringFeature.types.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
 
7
7
  //#region src/features/column-filtering/columnFilteringFeature.utils.d.ts
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Row } from "../../types/Row.cjs";
4
3
  import { Table } from "../../types/Table.cjs";
4
+ import { Column } from "../../types/Column.cjs";
5
5
  import { TableFeatures } from "../../types/TableFeatures.cjs";
6
6
  import { AggregationFn, GroupingState, Row_ColumnGrouping } from "./columnGroupingFeature.types.cjs";
7
7
  import { Cell } from "../../types/Cell.cjs";
@@ -1,7 +1,7 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Row } from "../../types/Row.js";
4
3
  import { Table } from "../../types/Table.js";
4
+ import { Column } from "../../types/Column.js";
5
5
  import { TableFeatures } from "../../types/TableFeatures.js";
6
6
  import { AggregationFn, GroupingState, Row_ColumnGrouping } from "./columnGroupingFeature.types.js";
7
7
  import { Cell } from "../../types/Cell.js";
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
2
  import { ColumnPinningPosition } from "../column-pinning/columnPinningFeature.types.cjs";
3
3
  import { ColumnOrderState } from "./columnOrderingFeature.types.cjs";
4
- import { Column } from "../../types/Column.cjs";
5
4
  import { Table } from "../../types/Table.cjs";
5
+ import { Column } from "../../types/Column.cjs";
6
6
  import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
 
8
8
  //#region src/features/column-ordering/columnOrderingFeature.utils.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
2
  import { ColumnPinningPosition } from "../column-pinning/columnPinningFeature.types.js";
3
3
  import { ColumnOrderState } from "./columnOrderingFeature.types.js";
4
- import { Column } from "../../types/Column.js";
5
4
  import { Table } from "../../types/Table.js";
5
+ import { Column } from "../../types/Column.js";
6
6
  import { TableFeatures } from "../../types/TableFeatures.js";
7
7
 
8
8
  //#region src/features/column-ordering/columnOrderingFeature.utils.d.ts
@@ -2,9 +2,9 @@ import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.cjs";
3
3
  import { Header } from "../../types/Header.cjs";
4
4
  import { ColumnPinningPosition, ColumnPinningState } from "./columnPinningFeature.types.cjs";
5
- import { Column } from "../../types/Column.cjs";
6
5
  import { Row } from "../../types/Row.cjs";
7
6
  import { Table } from "../../types/Table.cjs";
7
+ import { Column } from "../../types/Column.cjs";
8
8
  import { TableFeatures } from "../../types/TableFeatures.cjs";
9
9
  import { Cell } from "../../types/Cell.cjs";
10
10
 
@@ -2,9 +2,9 @@ import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
2
  import { HeaderGroup } from "../../types/HeaderGroup.js";
3
3
  import { Header } from "../../types/Header.js";
4
4
  import { ColumnPinningPosition, ColumnPinningState } from "./columnPinningFeature.types.js";
5
- import { Column } from "../../types/Column.js";
6
5
  import { Row } from "../../types/Row.js";
7
6
  import { Table } from "../../types/Table.js";
7
+ import { Column } from "../../types/Column.js";
8
8
  import { TableFeatures } from "../../types/TableFeatures.js";
9
9
  import { Cell } from "../../types/Cell.js";
10
10
 
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
2
  import { columnResizingState } from "./columnResizingFeature.types.cjs";
3
3
  import { Header } from "../../types/Header.cjs";
4
- import { Column } from "../../types/Column.cjs";
5
4
  import { Table } from "../../types/Table.cjs";
5
+ import { Column } from "../../types/Column.cjs";
6
6
  import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
 
8
8
  //#region src/features/column-resizing/columnResizingFeature.utils.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
2
  import { columnResizingState } from "./columnResizingFeature.types.js";
3
3
  import { Header } from "../../types/Header.js";
4
- import { Column } from "../../types/Column.js";
5
4
  import { Table } from "../../types/Table.js";
5
+ import { Column } from "../../types/Column.js";
6
6
  import { TableFeatures } from "../../types/TableFeatures.js";
7
7
 
8
8
  //#region src/features/column-resizing/columnResizingFeature.utils.d.ts
@@ -2,8 +2,8 @@ import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
2
  import { ColumnSizingState } from "./columnSizingFeature.types.cjs";
3
3
  import { Header } from "../../types/Header.cjs";
4
4
  import { ColumnPinningPosition } from "../column-pinning/columnPinningFeature.types.cjs";
5
- import { Column } from "../../types/Column.cjs";
6
5
  import { Table } from "../../types/Table.cjs";
6
+ import { Column } from "../../types/Column.cjs";
7
7
  import { TableFeatures } from "../../types/TableFeatures.cjs";
8
8
 
9
9
  //#region src/features/column-sizing/columnSizingFeature.utils.d.ts
@@ -2,8 +2,8 @@ import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
2
  import { ColumnSizingState } from "./columnSizingFeature.types.js";
3
3
  import { Header } from "../../types/Header.js";
4
4
  import { ColumnPinningPosition } from "../column-pinning/columnPinningFeature.types.js";
5
- import { Column } from "../../types/Column.js";
6
5
  import { Table } from "../../types/Table.js";
6
+ import { Column } from "../../types/Column.js";
7
7
  import { TableFeatures } from "../../types/TableFeatures.js";
8
8
 
9
9
  //#region src/features/column-sizing/columnSizingFeature.utils.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { ColumnVisibilityState } from "./columnVisibilityFeature.types.cjs";
4
3
  import { Row } from "../../types/Row.cjs";
5
4
  import { Table } from "../../types/Table.cjs";
5
+ import { Column } from "../../types/Column.cjs";
6
6
  import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
  import { Cell } from "../../types/Cell.cjs";
8
8
  //#region src/features/column-visibility/columnVisibilityFeature.utils.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData, Updater } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { ColumnVisibilityState } from "./columnVisibilityFeature.types.js";
4
3
  import { Row } from "../../types/Row.js";
5
4
  import { Table } from "../../types/Table.js";
5
+ import { Column } from "../../types/Column.js";
6
6
  import { TableFeatures } from "../../types/TableFeatures.js";
7
7
  import { Cell } from "../../types/Cell.js";
8
8
  //#region src/features/column-visibility/columnVisibilityFeature.utils.d.ts
@@ -1,6 +1,6 @@
1
1
  import { CellData, OnChangeFn, RowData, Updater } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { FilterFn, FilterFnOption } from "../column-filtering/columnFilteringFeature.types.cjs";
3
+ import { Column } from "../../types/Column.cjs";
4
4
  import { TableFeatures } from "../../types/TableFeatures.cjs";
5
5
 
6
6
  //#region src/features/global-filtering/globalFilteringFeature.types.d.ts
@@ -1,6 +1,6 @@
1
1
  import { CellData, OnChangeFn, RowData, Updater } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { FilterFn, FilterFnOption } from "../column-filtering/columnFilteringFeature.types.js";
3
+ import { Column } from "../../types/Column.js";
4
4
  import { TableFeatures } from "../../types/TableFeatures.js";
5
5
 
6
6
  //#region src/features/global-filtering/globalFilteringFeature.types.d.ts
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.cjs";
2
- import { Column } from "../../types/Column.cjs";
3
2
  import { Row } from "../../types/Row.cjs";
4
3
  import { FilterFn } from "../column-filtering/columnFilteringFeature.types.cjs";
5
4
  import { Table } from "../../types/Table.cjs";
5
+ import { Column } from "../../types/Column.cjs";
6
6
  import { TableFeatures } from "../../types/TableFeatures.cjs";
7
7
  //#region src/features/global-filtering/globalFilteringFeature.utils.d.ts
8
8
  /**
@@ -1,8 +1,8 @@
1
1
  import { CellData, RowData } from "../../types/type-utils.js";
2
- import { Column } from "../../types/Column.js";
3
2
  import { Row } from "../../types/Row.js";
4
3
  import { FilterFn } from "../column-filtering/columnFilteringFeature.types.js";
5
4
  import { Table } from "../../types/Table.js";
5
+ import { Column } from "../../types/Column.js";
6
6
  import { TableFeatures } from "../../types/TableFeatures.js";
7
7
  //#region src/features/global-filtering/globalFilteringFeature.utils.d.ts
8
8
  /**
@@ -129,7 +129,7 @@ function table_getCenterRows(table) {
129
129
  var _table$atoms$rowPinni3;
130
130
  const { top, bottom } = ((_table$atoms$rowPinni3 = table.atoms.rowPinning) === null || _table$atoms$rowPinni3 === void 0 ? void 0 : _table$atoms$rowPinni3.get()) ?? getDefaultRowPinningState();
131
131
  const allRows = table.getRowModel().rows;
132
- const topAndBottom = new Set([...top, ...bottom]);
132
+ const topAndBottom = /* @__PURE__ */ new Set([...top, ...bottom]);
133
133
  return allRows.filter((d) => !topAndBottom.has(d.id));
134
134
  }
135
135
  /**
@@ -193,7 +193,7 @@ function row_getPinnedIndex(row) {
193
193
  function row_pin(row, position, includeLeafRows, includeParentRows) {
194
194
  const leafRowIds = includeLeafRows ? row.getLeafRows().map(({ id }) => id) : [];
195
195
  const parentRowIds = includeParentRows ? row.getParentRows().map(({ id }) => id) : [];
196
- const rowIds = new Set([
196
+ const rowIds = /* @__PURE__ */ new Set([
197
197
  ...parentRowIds,
198
198
  row.id,
199
199
  ...leafRowIds