@tanstack/table-core 9.0.0-alpha.48 → 9.0.0-alpha.51

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 (162) hide show
  1. package/dist/core/cells/constructCell.cjs.map +1 -1
  2. package/dist/core/cells/constructCell.js.map +1 -1
  3. package/dist/core/cells/coreCellsFeature.cjs.map +1 -1
  4. package/dist/core/cells/coreCellsFeature.js.map +1 -1
  5. package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
  6. package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
  7. package/dist/core/columns/constructColumn.cjs.map +1 -1
  8. package/dist/core/columns/constructColumn.js.map +1 -1
  9. package/dist/core/columns/coreColumnsFeature.cjs.map +1 -1
  10. package/dist/core/columns/coreColumnsFeature.js.map +1 -1
  11. package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
  12. package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
  13. package/dist/core/coreFeatures.cjs.map +1 -1
  14. package/dist/core/coreFeatures.js.map +1 -1
  15. package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
  16. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  17. package/dist/core/headers/constructHeader.cjs.map +1 -1
  18. package/dist/core/headers/constructHeader.js.map +1 -1
  19. package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
  20. package/dist/core/headers/coreHeadersFeature.js.map +1 -1
  21. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  22. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  23. package/dist/core/reactivity/coreReactivityFeature.utils.cjs.map +1 -1
  24. package/dist/core/reactivity/coreReactivityFeature.utils.js.map +1 -1
  25. package/dist/core/row-models/coreRowModelsFeature.cjs.map +1 -1
  26. package/dist/core/row-models/coreRowModelsFeature.js.map +1 -1
  27. package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
  28. package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
  29. package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
  30. package/dist/core/row-models/createCoreRowModel.js.map +1 -1
  31. package/dist/core/rows/constructRow.cjs.map +1 -1
  32. package/dist/core/rows/constructRow.js.map +1 -1
  33. package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
  34. package/dist/core/rows/coreRowsFeature.js.map +1 -1
  35. package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
  36. package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
  37. package/dist/core/table/constructTable.cjs.map +1 -1
  38. package/dist/core/table/constructTable.js.map +1 -1
  39. package/dist/core/table/coreTablesFeature.cjs.map +1 -1
  40. package/dist/core/table/coreTablesFeature.js.map +1 -1
  41. package/dist/core/table/coreTablesFeature.types.d.cts +7 -0
  42. package/dist/core/table/coreTablesFeature.types.d.ts +7 -0
  43. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  44. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  45. package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
  46. package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
  47. package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
  48. package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
  49. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
  50. package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
  51. package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
  52. package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
  53. package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
  54. package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
  55. package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
  56. package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
  57. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
  58. package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
  59. package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
  60. package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
  61. package/dist/features/column-filtering/filterRowsUtils.cjs.map +1 -1
  62. package/dist/features/column-filtering/filterRowsUtils.js.map +1 -1
  63. package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
  64. package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
  65. package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
  66. package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
  67. package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
  68. package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
  69. package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
  70. package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
  71. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
  72. package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
  73. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  74. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  75. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  76. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  77. package/dist/features/column-resizing/columnResizingFeature.cjs.map +1 -1
  78. package/dist/features/column-resizing/columnResizingFeature.js.map +1 -1
  79. package/dist/features/column-resizing/columnResizingFeature.utils.cjs +1 -1
  80. package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
  81. package/dist/features/column-resizing/columnResizingFeature.utils.js +1 -1
  82. package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
  83. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  84. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  85. package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
  86. package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
  87. package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
  88. package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
  89. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
  90. package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
  91. package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
  92. package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
  93. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
  94. package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
  95. package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
  96. package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
  97. package/dist/features/row-expanding/rowExpandingFeature.cjs.map +1 -1
  98. package/dist/features/row-expanding/rowExpandingFeature.js.map +1 -1
  99. package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
  100. package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
  101. package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
  102. package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
  103. package/dist/features/row-pagination/rowPaginationFeature.cjs.map +1 -1
  104. package/dist/features/row-pagination/rowPaginationFeature.js.map +1 -1
  105. package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
  106. package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
  107. package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
  108. package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
  109. package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
  110. package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
  111. package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
  112. package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
  113. package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
  114. package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
  115. package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
  116. package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
  117. package/dist/features/row-sorting/rowSortingFeature.cjs.map +1 -1
  118. package/dist/features/row-sorting/rowSortingFeature.js.map +1 -1
  119. package/dist/features/row-sorting/rowSortingFeature.utils.cjs +1 -1
  120. package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
  121. package/dist/features/row-sorting/rowSortingFeature.utils.js +1 -1
  122. package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
  123. package/dist/features/stockFeatures.cjs.map +1 -1
  124. package/dist/features/stockFeatures.js.map +1 -1
  125. package/dist/flex-render.cjs.map +1 -1
  126. package/dist/flex-render.js.map +1 -1
  127. package/dist/fns/aggregationFns.cjs.map +1 -1
  128. package/dist/fns/aggregationFns.js.map +1 -1
  129. package/dist/fns/filterFns.cjs.map +1 -1
  130. package/dist/fns/filterFns.js.map +1 -1
  131. package/dist/fns/sortFns.cjs.map +1 -1
  132. package/dist/fns/sortFns.js.map +1 -1
  133. package/dist/helpers/columnHelper.cjs.map +1 -1
  134. package/dist/helpers/columnHelper.js.map +1 -1
  135. package/dist/helpers/tableFeatures.cjs.map +1 -1
  136. package/dist/helpers/tableFeatures.js.map +1 -1
  137. package/dist/helpers/tableOptions.cjs.map +1 -1
  138. package/dist/helpers/tableOptions.js.map +1 -1
  139. package/dist/store-reactivity-bindings.cjs.map +1 -1
  140. package/dist/store-reactivity-bindings.js.map +1 -1
  141. package/dist/utils.cjs +2 -1
  142. package/dist/utils.cjs.map +1 -1
  143. package/dist/utils.js +2 -1
  144. package/dist/utils.js.map +1 -1
  145. package/package.json +1 -1
  146. package/skills/column-definitions/SKILL.md +1 -1
  147. package/skills/column-layout/SKILL.md +1 -1
  148. package/skills/customizing-feature-behavior/SKILL.md +1 -1
  149. package/skills/filtering/SKILL.md +1 -1
  150. package/skills/grouping/SKILL.md +1 -1
  151. package/skills/migrate-v8-to-v9/SKILL.md +1 -1
  152. package/skills/pagination/SKILL.md +1 -1
  153. package/skills/row-expanding/SKILL.md +1 -1
  154. package/skills/row-pinning/SKILL.md +1 -1
  155. package/skills/row-selection/SKILL.md +1 -1
  156. package/skills/setup/SKILL.md +1 -1
  157. package/skills/sorting/SKILL.md +1 -1
  158. package/skills/state-management/SKILL.md +1 -1
  159. package/src/core/table/coreTablesFeature.types.ts +7 -0
  160. package/src/features/column-resizing/columnResizingFeature.utils.ts +1 -2
  161. package/src/features/row-sorting/rowSortingFeature.utils.ts +1 -1
  162. package/src/utils.ts +5 -1
@@ -1 +1 @@
1
- {"version":3,"file":"constructCell.cjs","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell 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 constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,OAAO;EAChC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,MAAM;;;CAGnE,OAAO,MAAM;;;;;;;AAQf,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,MAAM;CAC7C,MAAM,OAAO,OAAO,OAAO,cAAc;CAOzC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO"}
1
+ {"version":3,"file":"constructCell.cjs","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell 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 constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,MAAM;EAC/B,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,KAAK;EAChE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,KAAK;CAC5C,MAAM,OAAO,OAAO,OAAO,aAAa;CAOxC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"constructCell.js","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell 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 constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,OAAO;EAChC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,MAAM;;;CAGnE,OAAO,MAAM;;;;;;;AAQf,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,MAAM;CAC7C,MAAM,OAAO,OAAO,OAAO,cAAc;CAOzC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO"}
1
+ {"version":3,"file":"constructCell.js","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell 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 constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,MAAM;EAC/B,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,KAAK;EAChE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,KAAK;CAC5C,MAAM,OAAO,OAAO,OAAO,aAAa;CAOxC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreCellsFeature.cjs","names":["cell_getValue","cell_renderValue","cell_getContext"],"sources":["../../../src/core/cells/coreCellsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs } from '../../utils'\nimport {\n cell_getContext,\n cell_getValue,\n cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Cell_Cell, TableOptions_Cell } from './coreCellsFeature.types'\n\nexport interface CoreCellsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Cell: Cell_Cell<TableFeatures, RowData>\n // TableOptions: TableOptions_Cell\n}\n\n/**\n * Creates the stock core cells feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreCellsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreCellsFeatureConstructors<TFeatures, TData>> {\n return {\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n cell_getValue: {\n fn: (cell) => cell_getValue(cell),\n },\n cell_renderValue: {\n fn: (cell) => cell_renderValue(cell),\n },\n cell_getContext: {\n fn: (cell) => cell_getContext(cell),\n memoDeps: (cell) => [cell],\n },\n })\n },\n }\n}\n\n/**\n * The Core Cells feature provides the core cell functionality.\n */\nexport const coreCellsFeature = constructCoreCellsFeature()\n"],"mappings":";;;;;;;;;AAuBA,SAAgB,4BAGkD;CAChE,OAAO,EACL,sBAAsB,WAAW,UAAU;EACzC,kCAAoB,oBAAoB,WAAW,OAAO;GACxD,eAAe,EACb,KAAK,SAASA,6CAAc,KAAK,EAClC;GACD,kBAAkB,EAChB,KAAK,SAASC,gDAAiB,KAAK,EACrC;GACD,iBAAiB;IACf,KAAK,SAASC,+CAAgB,KAAK;IACnC,WAAW,SAAS,CAAC,KAAK;IAC3B;GACF,CAAC;IAEL;;;;;AAMH,MAAa,mBAAmB,2BAA2B"}
1
+ {"version":3,"file":"coreCellsFeature.cjs","names":["cell_getValue","cell_renderValue","cell_getContext"],"sources":["../../../src/core/cells/coreCellsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs } from '../../utils'\nimport {\n cell_getContext,\n cell_getValue,\n cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Cell_Cell, TableOptions_Cell } from './coreCellsFeature.types'\n\nexport interface CoreCellsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Cell: Cell_Cell<TableFeatures, RowData>\n // TableOptions: TableOptions_Cell\n}\n\n/**\n * Creates the stock core cells feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreCellsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreCellsFeatureConstructors<TFeatures, TData>> {\n return {\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n cell_getValue: {\n fn: (cell) => cell_getValue(cell),\n },\n cell_renderValue: {\n fn: (cell) => cell_renderValue(cell),\n },\n cell_getContext: {\n fn: (cell) => cell_getContext(cell),\n memoDeps: (cell) => [cell],\n },\n })\n },\n }\n}\n\n/**\n * The Core Cells feature provides the core cell functionality.\n */\nexport const coreCellsFeature = constructCoreCellsFeature()\n"],"mappings":";;;;;;;;;AAuBA,SAAgB,4BAGkD;CAChE,OAAO,EACL,sBAAsB,WAAW,UAAU;EACzC,kCAAoB,oBAAoB,WAAW,OAAO;GACxD,eAAe,EACb,KAAK,SAASA,6CAAc,IAAI,EAClC;GACA,kBAAkB,EAChB,KAAK,SAASC,gDAAiB,IAAI,EACrC;GACA,iBAAiB;IACf,KAAK,SAASC,+CAAgB,IAAI;IAClC,WAAW,SAAS,CAAC,IAAI;GAC3B;EACF,CAAC;CACH,EACF;AACF;;;;AAKA,MAAa,mBAAmB,0BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreCellsFeature.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs } from '../../utils'\nimport {\n cell_getContext,\n cell_getValue,\n cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Cell_Cell, TableOptions_Cell } from './coreCellsFeature.types'\n\nexport interface CoreCellsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Cell: Cell_Cell<TableFeatures, RowData>\n // TableOptions: TableOptions_Cell\n}\n\n/**\n * Creates the stock core cells feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreCellsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreCellsFeatureConstructors<TFeatures, TData>> {\n return {\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n cell_getValue: {\n fn: (cell) => cell_getValue(cell),\n },\n cell_renderValue: {\n fn: (cell) => cell_renderValue(cell),\n },\n cell_getContext: {\n fn: (cell) => cell_getContext(cell),\n memoDeps: (cell) => [cell],\n },\n })\n },\n }\n}\n\n/**\n * The Core Cells feature provides the core cell functionality.\n */\nexport const coreCellsFeature = constructCoreCellsFeature()\n"],"mappings":";;;;;;;;;AAuBA,SAAgB,4BAGkD;CAChE,OAAO,EACL,sBAAsB,WAAW,UAAU;EACzC,oBAAoB,oBAAoB,WAAW,OAAO;GACxD,eAAe,EACb,KAAK,SAAS,cAAc,KAAK,EAClC;GACD,kBAAkB,EAChB,KAAK,SAAS,iBAAiB,KAAK,EACrC;GACD,iBAAiB;IACf,KAAK,SAAS,gBAAgB,KAAK;IACnC,WAAW,SAAS,CAAC,KAAK;IAC3B;GACF,CAAC;IAEL;;;;;AAMH,MAAa,mBAAmB,2BAA2B"}
1
+ {"version":3,"file":"coreCellsFeature.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs } from '../../utils'\nimport {\n cell_getContext,\n cell_getValue,\n cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Cell_Cell, TableOptions_Cell } from './coreCellsFeature.types'\n\nexport interface CoreCellsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Cell: Cell_Cell<TableFeatures, RowData>\n // TableOptions: TableOptions_Cell\n}\n\n/**\n * Creates the stock core cells feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreCellsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreCellsFeatureConstructors<TFeatures, TData>> {\n return {\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n cell_getValue: {\n fn: (cell) => cell_getValue(cell),\n },\n cell_renderValue: {\n fn: (cell) => cell_renderValue(cell),\n },\n cell_getContext: {\n fn: (cell) => cell_getContext(cell),\n memoDeps: (cell) => [cell],\n },\n })\n },\n }\n}\n\n/**\n * The Core Cells feature provides the core cell functionality.\n */\nexport const coreCellsFeature = constructCoreCellsFeature()\n"],"mappings":";;;;;;;;;AAuBA,SAAgB,4BAGkD;CAChE,OAAO,EACL,sBAAsB,WAAW,UAAU;EACzC,oBAAoB,oBAAoB,WAAW,OAAO;GACxD,eAAe,EACb,KAAK,SAAS,cAAc,IAAI,EAClC;GACA,kBAAkB,EAChB,KAAK,SAAS,iBAAiB,IAAI,EACrC;GACA,iBAAiB;IACf,KAAK,SAAS,gBAAgB,IAAI;IAClC,WAAW,SAAS,CAAC,IAAI;GAC3B;EACF,CAAC;CACH,EACF;AACF;;;;AAKA,MAAa,mBAAmB,0BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreCellsFeature.utils.cjs","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,GAAG;;;;;;;;;;;;;AAc1C,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,UAAU,IAAI,KAAK,MAAM,QAAQ;;;;;;;;;;;;;AAc/C,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,UAAU;EAC/B,mBAAmB,KAAK,aAAa;EACtC"}
1
+ {"version":3,"file":"coreCellsFeature.utils.cjs","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,EAAE;AACzC;;;;;;;;;;;;AAaA,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,SAAS,KAAK,KAAK,MAAM,QAAQ;AAC/C;;;;;;;;;;;;AAaA,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,SAAS;EAC9B,mBAAmB,KAAK,YAAY;CACtC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreCellsFeature.utils.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,GAAG;;;;;;;;;;;;;AAc1C,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,UAAU,IAAI,KAAK,MAAM,QAAQ;;;;;;;;;;;;;AAc/C,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,UAAU;EAC/B,mBAAmB,KAAK,aAAa;EACtC"}
1
+ {"version":3,"file":"coreCellsFeature.utils.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,EAAE;AACzC;;;;;;;;;;;;AAaA,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,SAAS,KAAK,KAAK,MAAM,QAAQ;AAC/C;;;;;;;;;;;;AAaA,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,SAAS;EAC9B,mBAAmB,KAAK,YAAY;CACtC;AACF"}
@@ -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,OAAO;EAClC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,MAAM;;;CAGvE,OAAO,MAAM;;;;;;;AAQf,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,qBAGV;EAChB,GAAG;EACJ;CAED,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,IAAI,GAAG,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,IAAI,EAAE;EAC7B,MAAM,OAAO,YAAY,MAAM,IAAI;EACnC,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,uBAC/C;;GAIL,OAAO;;QAGT,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,kEACL;EAEH,MAAM,IAAI,OAAO;;CAInB,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,EAAE;CACnB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,GAAG;CACzB,OAAO,SAAS;CAEhB,OAAO"}
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 +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,kBAA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AAO"}
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 +1 @@
1
- {"version":3,"file":"coreColumnsFeature.cjs","names":["column_getFlatColumns","column_getLeafColumns","table_getDefaultColumnDef","table_getAllColumns","table_getAllFlatColumns","table_getAllFlatColumnsById","table_getAllLeafColumns","table_getAllLeafColumnsById","table_getColumn"],"sources":["../../../src/core/columns/coreColumnsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n column_getFlatColumns,\n column_getLeafColumns,\n table_getAllColumns,\n table_getAllFlatColumns,\n table_getAllFlatColumnsById,\n table_getAllLeafColumns,\n table_getAllLeafColumnsById,\n table_getColumn,\n table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// Column_Column,\n// TableOptions_Columns,\n// Table_Columns,\n// } from './coreColumnsFeature.types'\n\nexport interface CoreColumnsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Column: Column_Column<TFeatures, TData>\n // Table: Table_Columns<TFeatures, TData>\n // TableOptions: TableOptions_Columns<TFeatures, TData>\n}\n\n/**\n * Creates the stock core columns feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreColumnsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreColumnsFeatureConstructors<TFeatures, TData>> {\n return {\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n column_getFlatColumns: {\n fn: (column) => column_getFlatColumns(column),\n memoDeps: (column) => [column.table.options.columns],\n },\n column_getLeafColumns: {\n fn: (column) => column_getLeafColumns(column),\n memoDeps: (column) => [\n column.table.atoms.columnOrder?.get(),\n column.table.atoms.grouping?.get(),\n column.table.options.columns,\n column.table.options.groupedColumnMode,\n ],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreColumnsFeature', table, {\n table_getDefaultColumnDef: {\n fn: () => table_getDefaultColumnDef(table),\n memoDeps: () => [table.options.defaultColumn],\n },\n table_getAllColumns: {\n fn: () => table_getAllColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumns: {\n fn: () => table_getAllFlatColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumnsById: {\n fn: () => table_getAllFlatColumnsById(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllLeafColumns: {\n fn: () => table_getAllLeafColumns(table),\n memoDeps: () => [\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.options.columns,\n table.options.groupedColumnMode,\n ],\n },\n table_getAllLeafColumnsById: {\n fn: () => table_getAllLeafColumnsById(table),\n memoDeps: () => [table.getAllLeafColumns()],\n },\n table_getColumn: {\n fn: (columnId) => table_getColumn(table, columnId),\n },\n })\n },\n }\n}\n\n/**\n * The Core Columns feature provides the core column functionality.\n */\nexport const coreColumnsFeature = constructCoreColumnsFeature()\n"],"mappings":";;;;;;;;;AAkCA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,kCAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAWA,uDAAsB,OAAO;KAC7C,WAAW,WAAW,CAAC,OAAO,MAAM,QAAQ,QAAQ;KACrD;IACD,uBAAuB;KACrB,KAAK,WAAWC,uDAAsB,OAAO;KAC7C,WAAW,WAAW;;;gCACpB,OAAO,MAAM,MAAM,2FAAa,KAAK;gCACrC,OAAO,MAAM,MAAM,wFAAU,KAAK;OAClC,OAAO,MAAM,QAAQ;OACrB,OAAO,MAAM,QAAQ;OACtB;;KACF;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,8BAAgB,sBAAsB,OAAO;IAC3C,2BAA2B;KACzB,UAAUC,2DAA0B,MAAM;KAC1C,gBAAgB,CAAC,MAAM,QAAQ,cAAc;KAC9C;IACD,qBAAqB;KACnB,UAAUC,qDAAoB,MAAM;KACpC,gBAAgB,CAAC,MAAM,QAAQ,QAAQ;KACxC;IACD,yBAAyB;KACvB,UAAUC,yDAAwB,MAAM;KACxC,gBAAgB,CAAC,MAAM,QAAQ,QAAQ;KACxC;IACD,6BAA6B;KAC3B,UAAUC,6DAA4B,MAAM;KAC5C,gBAAgB,CAAC,MAAM,QAAQ,QAAQ;KACxC;IACD,yBAAyB;KACvB,UAAUC,yDAAwB,MAAM;KACxC,gBAAgB;;;gCACd,MAAM,MAAM,2FAAa,KAAK;gCAC9B,MAAM,MAAM,wFAAU,KAAK;OAC3B,MAAM,QAAQ;OACd,MAAM,QAAQ;OACf;;KACF;IACD,6BAA6B;KAC3B,UAAUC,6DAA4B,MAAM;KAC5C,gBAAgB,CAAC,MAAM,mBAAmB,CAAC;KAC5C;IACD,iBAAiB,EACf,KAAK,aAAaC,iDAAgB,OAAO,SAAS,EACnD;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,qBAAqB,6BAA6B"}
1
+ {"version":3,"file":"coreColumnsFeature.cjs","names":["column_getFlatColumns","column_getLeafColumns","table_getDefaultColumnDef","table_getAllColumns","table_getAllFlatColumns","table_getAllFlatColumnsById","table_getAllLeafColumns","table_getAllLeafColumnsById","table_getColumn"],"sources":["../../../src/core/columns/coreColumnsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n column_getFlatColumns,\n column_getLeafColumns,\n table_getAllColumns,\n table_getAllFlatColumns,\n table_getAllFlatColumnsById,\n table_getAllLeafColumns,\n table_getAllLeafColumnsById,\n table_getColumn,\n table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// Column_Column,\n// TableOptions_Columns,\n// Table_Columns,\n// } from './coreColumnsFeature.types'\n\nexport interface CoreColumnsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Column: Column_Column<TFeatures, TData>\n // Table: Table_Columns<TFeatures, TData>\n // TableOptions: TableOptions_Columns<TFeatures, TData>\n}\n\n/**\n * Creates the stock core columns feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreColumnsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreColumnsFeatureConstructors<TFeatures, TData>> {\n return {\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n column_getFlatColumns: {\n fn: (column) => column_getFlatColumns(column),\n memoDeps: (column) => [column.table.options.columns],\n },\n column_getLeafColumns: {\n fn: (column) => column_getLeafColumns(column),\n memoDeps: (column) => [\n column.table.atoms.columnOrder?.get(),\n column.table.atoms.grouping?.get(),\n column.table.options.columns,\n column.table.options.groupedColumnMode,\n ],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreColumnsFeature', table, {\n table_getDefaultColumnDef: {\n fn: () => table_getDefaultColumnDef(table),\n memoDeps: () => [table.options.defaultColumn],\n },\n table_getAllColumns: {\n fn: () => table_getAllColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumns: {\n fn: () => table_getAllFlatColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumnsById: {\n fn: () => table_getAllFlatColumnsById(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllLeafColumns: {\n fn: () => table_getAllLeafColumns(table),\n memoDeps: () => [\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.options.columns,\n table.options.groupedColumnMode,\n ],\n },\n table_getAllLeafColumnsById: {\n fn: () => table_getAllLeafColumnsById(table),\n memoDeps: () => [table.getAllLeafColumns()],\n },\n table_getColumn: {\n fn: (columnId) => table_getColumn(table, columnId),\n },\n })\n },\n }\n}\n\n/**\n * The Core Columns feature provides the core column functionality.\n */\nexport const coreColumnsFeature = constructCoreColumnsFeature()\n"],"mappings":";;;;;;;;;AAkCA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,kCAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAWA,uDAAsB,MAAM;KAC5C,WAAW,WAAW,CAAC,OAAO,MAAM,QAAQ,OAAO;IACrD;IACA,uBAAuB;KACrB,KAAK,WAAWC,uDAAsB,MAAM;KAC5C,WAAW,WAAW;;;gCACpB,OAAO,MAAM,MAAM,2FAAa,IAAI;gCACpC,OAAO,MAAM,MAAM,wFAAU,IAAI;OACjC,OAAO,MAAM,QAAQ;OACrB,OAAO,MAAM,QAAQ;MACvB;;IACF;GACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,8BAAgB,sBAAsB,OAAO;IAC3C,2BAA2B;KACzB,UAAUC,2DAA0B,KAAK;KACzC,gBAAgB,CAAC,MAAM,QAAQ,aAAa;IAC9C;IACA,qBAAqB;KACnB,UAAUC,qDAAoB,KAAK;KACnC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;IACxC;IACA,yBAAyB;KACvB,UAAUC,yDAAwB,KAAK;KACvC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;IACxC;IACA,6BAA6B;KAC3B,UAAUC,6DAA4B,KAAK;KAC3C,gBAAgB,CAAC,MAAM,QAAQ,OAAO;IACxC;IACA,yBAAyB;KACvB,UAAUC,yDAAwB,KAAK;KACvC,gBAAgB;;;gCACd,MAAM,MAAM,2FAAa,IAAI;gCAC7B,MAAM,MAAM,wFAAU,IAAI;OAC1B,MAAM,QAAQ;OACd,MAAM,QAAQ;MAChB;;IACF;IACA,6BAA6B;KAC3B,UAAUC,6DAA4B,KAAK;KAC3C,gBAAgB,CAAC,MAAM,kBAAkB,CAAC;IAC5C;IACA,iBAAiB,EACf,KAAK,aAAaC,iDAAgB,OAAO,QAAQ,EACnD;GACF,CAAC;EACH;CACF;AACF;;;;AAKA,MAAa,qBAAqB,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreColumnsFeature.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n column_getFlatColumns,\n column_getLeafColumns,\n table_getAllColumns,\n table_getAllFlatColumns,\n table_getAllFlatColumnsById,\n table_getAllLeafColumns,\n table_getAllLeafColumnsById,\n table_getColumn,\n table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// Column_Column,\n// TableOptions_Columns,\n// Table_Columns,\n// } from './coreColumnsFeature.types'\n\nexport interface CoreColumnsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Column: Column_Column<TFeatures, TData>\n // Table: Table_Columns<TFeatures, TData>\n // TableOptions: TableOptions_Columns<TFeatures, TData>\n}\n\n/**\n * Creates the stock core columns feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreColumnsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreColumnsFeatureConstructors<TFeatures, TData>> {\n return {\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n column_getFlatColumns: {\n fn: (column) => column_getFlatColumns(column),\n memoDeps: (column) => [column.table.options.columns],\n },\n column_getLeafColumns: {\n fn: (column) => column_getLeafColumns(column),\n memoDeps: (column) => [\n column.table.atoms.columnOrder?.get(),\n column.table.atoms.grouping?.get(),\n column.table.options.columns,\n column.table.options.groupedColumnMode,\n ],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreColumnsFeature', table, {\n table_getDefaultColumnDef: {\n fn: () => table_getDefaultColumnDef(table),\n memoDeps: () => [table.options.defaultColumn],\n },\n table_getAllColumns: {\n fn: () => table_getAllColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumns: {\n fn: () => table_getAllFlatColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumnsById: {\n fn: () => table_getAllFlatColumnsById(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllLeafColumns: {\n fn: () => table_getAllLeafColumns(table),\n memoDeps: () => [\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.options.columns,\n table.options.groupedColumnMode,\n ],\n },\n table_getAllLeafColumnsById: {\n fn: () => table_getAllLeafColumnsById(table),\n memoDeps: () => [table.getAllLeafColumns()],\n },\n table_getColumn: {\n fn: (columnId) => table_getColumn(table, columnId),\n },\n })\n },\n }\n}\n\n/**\n * The Core Columns feature provides the core column functionality.\n */\nexport const coreColumnsFeature = constructCoreColumnsFeature()\n"],"mappings":";;;;;;;;;AAkCA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,OAAO;KAC7C,WAAW,WAAW,CAAC,OAAO,MAAM,QAAQ,QAAQ;KACrD;IACD,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,OAAO;KAC7C,WAAW,WAAW;;;gCACpB,OAAO,MAAM,MAAM,2FAAa,KAAK;gCACrC,OAAO,MAAM,MAAM,wFAAU,KAAK;OAClC,OAAO,MAAM,QAAQ;OACrB,OAAO,MAAM,QAAQ;OACtB;;KACF;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,gBAAgB,sBAAsB,OAAO;IAC3C,2BAA2B;KACzB,UAAU,0BAA0B,MAAM;KAC1C,gBAAgB,CAAC,MAAM,QAAQ,cAAc;KAC9C;IACD,qBAAqB;KACnB,UAAU,oBAAoB,MAAM;KACpC,gBAAgB,CAAC,MAAM,QAAQ,QAAQ;KACxC;IACD,yBAAyB;KACvB,UAAU,wBAAwB,MAAM;KACxC,gBAAgB,CAAC,MAAM,QAAQ,QAAQ;KACxC;IACD,6BAA6B;KAC3B,UAAU,4BAA4B,MAAM;KAC5C,gBAAgB,CAAC,MAAM,QAAQ,QAAQ;KACxC;IACD,yBAAyB;KACvB,UAAU,wBAAwB,MAAM;KACxC,gBAAgB;;;gCACd,MAAM,MAAM,2FAAa,KAAK;gCAC9B,MAAM,MAAM,wFAAU,KAAK;OAC3B,MAAM,QAAQ;OACd,MAAM,QAAQ;OACf;;KACF;IACD,6BAA6B;KAC3B,UAAU,4BAA4B,MAAM;KAC5C,gBAAgB,CAAC,MAAM,mBAAmB,CAAC;KAC5C;IACD,iBAAiB,EACf,KAAK,aAAa,gBAAgB,OAAO,SAAS,EACnD;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,qBAAqB,6BAA6B"}
1
+ {"version":3,"file":"coreColumnsFeature.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n column_getFlatColumns,\n column_getLeafColumns,\n table_getAllColumns,\n table_getAllFlatColumns,\n table_getAllFlatColumnsById,\n table_getAllLeafColumns,\n table_getAllLeafColumnsById,\n table_getColumn,\n table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n// Column_Column,\n// TableOptions_Columns,\n// Table_Columns,\n// } from './coreColumnsFeature.types'\n\nexport interface CoreColumnsFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Column: Column_Column<TFeatures, TData>\n // Table: Table_Columns<TFeatures, TData>\n // TableOptions: TableOptions_Columns<TFeatures, TData>\n}\n\n/**\n * Creates the stock core columns feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreColumnsFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreColumnsFeatureConstructors<TFeatures, TData>> {\n return {\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n column_getFlatColumns: {\n fn: (column) => column_getFlatColumns(column),\n memoDeps: (column) => [column.table.options.columns],\n },\n column_getLeafColumns: {\n fn: (column) => column_getLeafColumns(column),\n memoDeps: (column) => [\n column.table.atoms.columnOrder?.get(),\n column.table.atoms.grouping?.get(),\n column.table.options.columns,\n column.table.options.groupedColumnMode,\n ],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreColumnsFeature', table, {\n table_getDefaultColumnDef: {\n fn: () => table_getDefaultColumnDef(table),\n memoDeps: () => [table.options.defaultColumn],\n },\n table_getAllColumns: {\n fn: () => table_getAllColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumns: {\n fn: () => table_getAllFlatColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumnsById: {\n fn: () => table_getAllFlatColumnsById(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllLeafColumns: {\n fn: () => table_getAllLeafColumns(table),\n memoDeps: () => [\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.options.columns,\n table.options.groupedColumnMode,\n ],\n },\n table_getAllLeafColumnsById: {\n fn: () => table_getAllLeafColumnsById(table),\n memoDeps: () => [table.getAllLeafColumns()],\n },\n table_getColumn: {\n fn: (columnId) => table_getColumn(table, columnId),\n },\n })\n },\n }\n}\n\n/**\n * The Core Columns feature provides the core column functionality.\n */\nexport const coreColumnsFeature = constructCoreColumnsFeature()\n"],"mappings":";;;;;;;;;AAkCA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,MAAM;KAC5C,WAAW,WAAW,CAAC,OAAO,MAAM,QAAQ,OAAO;IACrD;IACA,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,MAAM;KAC5C,WAAW,WAAW;;;gCACpB,OAAO,MAAM,MAAM,2FAAa,IAAI;gCACpC,OAAO,MAAM,MAAM,wFAAU,IAAI;OACjC,OAAO,MAAM,QAAQ;OACrB,OAAO,MAAM,QAAQ;MACvB;;IACF;GACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,gBAAgB,sBAAsB,OAAO;IAC3C,2BAA2B;KACzB,UAAU,0BAA0B,KAAK;KACzC,gBAAgB,CAAC,MAAM,QAAQ,aAAa;IAC9C;IACA,qBAAqB;KACnB,UAAU,oBAAoB,KAAK;KACnC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;IACxC;IACA,yBAAyB;KACvB,UAAU,wBAAwB,KAAK;KACvC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;IACxC;IACA,6BAA6B;KAC3B,UAAU,4BAA4B,KAAK;KAC3C,gBAAgB,CAAC,MAAM,QAAQ,OAAO;IACxC;IACA,yBAAyB;KACvB,UAAU,wBAAwB,KAAK;KACvC,gBAAgB;;;gCACd,MAAM,MAAM,2FAAa,IAAI;gCAC7B,MAAM,MAAM,wFAAU,IAAI;OAC1B,MAAM,QAAQ;OACd,MAAM,QAAQ;MAChB;;IACF;IACA,6BAA6B;KAC3B,UAAU,4BAA4B,KAAK;KAC3C,gBAAgB,CAAC,MAAM,kBAAkB,CAAC;IAC5C;IACA,iBAAiB,EACf,KAAK,aAAa,gBAAgB,OAAO,QAAQ,EACnD;GACF,CAAC;EACH;CACF;AACF;;;;AAKA,MAAa,qBAAqB,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreColumnsFeature.utils.cjs","names":["callMemoOrStaticFn","table_getOrderColumnsFn","constructColumn"],"sources":["../../../src/core/columns/coreColumnsFeature.utils.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n ColumnDef,\n ColumnDefResolved,\n GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\n/**\n * Flattens this column and every descendant column into a single array.\n *\n * Group columns appear before their child columns, which matches the normalized\n * column hierarchy produced during table construction.\n *\n * @example\n * ```ts\n * const flatColumns = column_getFlatColumns(column)\n * ```\n */\nexport function column_getFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]\n}\n\n/**\n * Collects the terminal leaf columns below this column.\n *\n * Group columns return their ordered descendants. Non-group columns return an\n * array containing only the column itself.\n *\n * @example\n * ```ts\n * const leafColumns = column_getLeafColumns(column)\n * ```\n */\nexport function column_getLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n if (column.columns.length) {\n const leafColumns = column.columns.flatMap(\n (col) => col.getLeafColumns(), // recursive\n )\n\n return callMemoOrStaticFn(\n column.table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns as any) as any\n }\n\n return [column]\n}\n\n/**\n * Merges built-in, feature, and user default column definitions.\n *\n * Built-in defaults provide a header and fallback cell renderer, feature\n * defaults can add feature-specific column options, and\n * `options.defaultColumn` wins last.\n *\n * @example\n * ```ts\n * const defaultColumn = table_getDefaultColumnDef(table)\n * ```\n */\nexport function table_getDefaultColumnDef<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Partial<ColumnDef<TFeatures, TData, unknown>> {\n return {\n header: (props) => {\n const resolvedColumnDef = props.header.column\n .columnDef as ColumnDefResolved<{}, TData>\n\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey\n }\n\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id\n }\n\n return null\n },\n cell: (props) => props.renderValue<any>()?.toString?.() ?? null,\n ...Object.values(table._features).reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef?.())\n }, {}),\n ...table.options.defaultColumn,\n } as Partial<ColumnDef<TFeatures, TData, unknown>>\n}\n\n/**\n * Normalizes `options.columns` into the table's nested column tree.\n *\n * Each column definition is constructed with its parent and depth, and group\n * column children are recursively constructed.\n *\n * @example\n * ```ts\n * const columns = table_getAllColumns(table)\n * ```\n */\nexport function table_getAllColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const recurseColumns = (\n colDefs: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>,\n parent?: Column<TFeatures, TData, unknown>,\n depth = 0,\n ): Array<Column<TFeatures, TData, unknown>> => {\n return colDefs.map((columnDef) => {\n const column = constructColumn(table, columnDef, depth, parent)\n\n const groupingColumnDef = columnDef as GroupColumnDef<\n TFeatures,\n TData,\n unknown\n >\n\n column.columns = groupingColumnDef.columns\n ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n : []\n\n return column\n })\n }\n\n return recurseColumns(table.options.columns)\n}\n\n/**\n * Flattens every table column, including group columns and leaf columns.\n *\n * Use this when parent/group columns must be included in addition to data leaf\n * columns.\n *\n * @example\n * ```ts\n * const flatColumns = table_getAllFlatColumns(table)\n * ```\n */\nexport function table_getAllFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n return table.getAllColumns().flatMap((column) => column.getFlatColumns())\n}\n\n/**\n * Builds an id lookup for every flat column in the table.\n *\n * Group columns and leaf columns are included. Later columns with the same id\n * replace earlier entries.\n *\n * @example\n * ```ts\n * const columnsById = table_getAllFlatColumnsById(table)\n * ```\n */\nexport function table_getAllFlatColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const flatColumns = table.getAllFlatColumns()\n for (let i = 0; i < flatColumns.length; i++) {\n const column = flatColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Collects all terminal leaf columns in their current table order.\n *\n * Column ordering features can reorder the collected leaves before the result\n * is returned.\n *\n * @example\n * ```ts\n * const leafColumns = table_getAllLeafColumns(table)\n * ```\n */\nexport function table_getAllLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const leafColumns = table.getAllColumns().flatMap(\n (c) => c.getLeafColumns(), // recursive\n )\n return callMemoOrStaticFn(\n table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns)\n}\n\n/**\n * Builds an id lookup for terminal leaf columns only.\n *\n * Parent/group columns are excluded, making this lookup appropriate for row\n * cells and feature state keyed by data columns.\n *\n * @example\n * ```ts\n * const leavesById = table_getAllLeafColumnsById(table)\n * ```\n */\nexport function table_getAllLeafColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const leafColumns = table.getAllLeafColumns()\n for (let i = 0; i < leafColumns.length; i++) {\n const column = leafColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Looks up a column by id from the flat column map.\n *\n * The lookup can return group columns or leaf columns. In development, a\n * missing id logs a warning to help catch stale column references.\n *\n * @example\n * ```ts\n * const column = table_getColumn(table, 'firstName')\n * ```\n */\nexport function table_getColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n): Column<TFeatures, TData, unknown> | undefined {\n const column = table.getAllFlatColumnsById()[columnId]\n\n if (process.env.NODE_ENV === 'development' && !column) {\n console.warn(`[Table] Column with id '${columnId}' does not exist.`)\n }\n\n return column\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,sBAKd,QACyC;CACzC,OAAO,CAAC,QAAQ,GAAG,OAAO,QAAQ,SAAS,QAAQ,IAAI,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;AAc3E,SAAgB,sBAKd,QACyC;CACzC,IAAI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OAAO,MAAM;;CAEtB,OAAO;;;;;;;;;;;;;AAcT,SAAgB,wBAId,OAC0C;CAC1C,MAAM,cAAc,MAAM,eAAe,CAAC,SACvC,MAAM,EAAE,gBAAgB,CAC1B;CACD,OAAOF,iCACL,OACA,mBACAC,4DACD,CAAC,YAAY;;;;;;;;;;;;;AAchB,SAAgB,4BAId,OACmD;CACnD,MAAM,SAA4D,EAAE;CACpE,MAAM,cAAc,MAAM,mBAAmB;CAC7C,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KAAK;EAC3C,MAAM,SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;;CAEtB,OAAO;;;;;;;;;;;;;AAcT,SAAgB,gBAId,OACA,UAC+C;CAC/C,MAAM,SAAS,MAAM,uBAAuB,CAAC;CAE7C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,CAAC,QAC7C,QAAQ,KAAK,2BAA2B,SAAS,mBAAmB;CAGtE,OAAO"}
1
+ {"version":3,"file":"coreColumnsFeature.utils.cjs","names":["callMemoOrStaticFn","table_getOrderColumnsFn","constructColumn"],"sources":["../../../src/core/columns/coreColumnsFeature.utils.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n ColumnDef,\n ColumnDefResolved,\n GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\n/**\n * Flattens this column and every descendant column into a single array.\n *\n * Group columns appear before their child columns, which matches the normalized\n * column hierarchy produced during table construction.\n *\n * @example\n * ```ts\n * const flatColumns = column_getFlatColumns(column)\n * ```\n */\nexport function column_getFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]\n}\n\n/**\n * Collects the terminal leaf columns below this column.\n *\n * Group columns return their ordered descendants. Non-group columns return an\n * array containing only the column itself.\n *\n * @example\n * ```ts\n * const leafColumns = column_getLeafColumns(column)\n * ```\n */\nexport function column_getLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n if (column.columns.length) {\n const leafColumns = column.columns.flatMap(\n (col) => col.getLeafColumns(), // recursive\n )\n\n return callMemoOrStaticFn(\n column.table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns as any) as any\n }\n\n return [column]\n}\n\n/**\n * Merges built-in, feature, and user default column definitions.\n *\n * Built-in defaults provide a header and fallback cell renderer, feature\n * defaults can add feature-specific column options, and\n * `options.defaultColumn` wins last.\n *\n * @example\n * ```ts\n * const defaultColumn = table_getDefaultColumnDef(table)\n * ```\n */\nexport function table_getDefaultColumnDef<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Partial<ColumnDef<TFeatures, TData, unknown>> {\n return {\n header: (props) => {\n const resolvedColumnDef = props.header.column\n .columnDef as ColumnDefResolved<{}, TData>\n\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey\n }\n\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id\n }\n\n return null\n },\n cell: (props) => props.renderValue<any>()?.toString?.() ?? null,\n ...Object.values(table._features).reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef?.())\n }, {}),\n ...table.options.defaultColumn,\n } as Partial<ColumnDef<TFeatures, TData, unknown>>\n}\n\n/**\n * Normalizes `options.columns` into the table's nested column tree.\n *\n * Each column definition is constructed with its parent and depth, and group\n * column children are recursively constructed.\n *\n * @example\n * ```ts\n * const columns = table_getAllColumns(table)\n * ```\n */\nexport function table_getAllColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const recurseColumns = (\n colDefs: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>,\n parent?: Column<TFeatures, TData, unknown>,\n depth = 0,\n ): Array<Column<TFeatures, TData, unknown>> => {\n return colDefs.map((columnDef) => {\n const column = constructColumn(table, columnDef, depth, parent)\n\n const groupingColumnDef = columnDef as GroupColumnDef<\n TFeatures,\n TData,\n unknown\n >\n\n column.columns = groupingColumnDef.columns\n ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n : []\n\n return column\n })\n }\n\n return recurseColumns(table.options.columns)\n}\n\n/**\n * Flattens every table column, including group columns and leaf columns.\n *\n * Use this when parent/group columns must be included in addition to data leaf\n * columns.\n *\n * @example\n * ```ts\n * const flatColumns = table_getAllFlatColumns(table)\n * ```\n */\nexport function table_getAllFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n return table.getAllColumns().flatMap((column) => column.getFlatColumns())\n}\n\n/**\n * Builds an id lookup for every flat column in the table.\n *\n * Group columns and leaf columns are included. Later columns with the same id\n * replace earlier entries.\n *\n * @example\n * ```ts\n * const columnsById = table_getAllFlatColumnsById(table)\n * ```\n */\nexport function table_getAllFlatColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const flatColumns = table.getAllFlatColumns()\n for (let i = 0; i < flatColumns.length; i++) {\n const column = flatColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Collects all terminal leaf columns in their current table order.\n *\n * Column ordering features can reorder the collected leaves before the result\n * is returned.\n *\n * @example\n * ```ts\n * const leafColumns = table_getAllLeafColumns(table)\n * ```\n */\nexport function table_getAllLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const leafColumns = table.getAllColumns().flatMap(\n (c) => c.getLeafColumns(), // recursive\n )\n return callMemoOrStaticFn(\n table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns)\n}\n\n/**\n * Builds an id lookup for terminal leaf columns only.\n *\n * Parent/group columns are excluded, making this lookup appropriate for row\n * cells and feature state keyed by data columns.\n *\n * @example\n * ```ts\n * const leavesById = table_getAllLeafColumnsById(table)\n * ```\n */\nexport function table_getAllLeafColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const leafColumns = table.getAllLeafColumns()\n for (let i = 0; i < leafColumns.length; i++) {\n const column = leafColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Looks up a column by id from the flat column map.\n *\n * The lookup can return group columns or leaf columns. In development, a\n * missing id logs a warning to help catch stale column references.\n *\n * @example\n * ```ts\n * const column = table_getColumn(table, 'firstName')\n * ```\n */\nexport function table_getColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n): Column<TFeatures, TData, unknown> | undefined {\n const column = table.getAllFlatColumnsById()[columnId]\n\n if (process.env.NODE_ENV === 'development' && !column) {\n console.warn(`[Table] Column with id '${columnId}' does not exist.`)\n }\n\n return column\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,sBAKd,QACyC;CACzC,OAAO,CAAC,QAAQ,GAAG,OAAO,QAAQ,SAAS,QAAQ,IAAI,eAAe,CAAC,CAAC;AAC1E;;;;;;;;;;;;AAaA,SAAgB,sBAKd,QACyC;CACzC,IAAI,OAAO,QAAQ,Q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SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;CACtB;CACA,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,wBAId,OAC0C;CAC1C,MAAM,cAAc,MAAM,cAAc,EAAE,SACvC,MAAM,EAAE,eAAe,CAC1B;CACA,OAAOF,iCACL,OACA,mBACAC,2DACF,EAAE,WAAW;AACf;;;;;;;;;;;;AAaA,SAAgB,4BAId,OACmD;CACnD,MAAM,SAA4D,CAAC;CACnE,MAAM,cAAc,MAAM,kBAAkB;CAC5C,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KAAK;EAC3C,MAAM,SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;CACtB;CACA,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,gBAId,OACA,UAC+C;CAC/C,MAAM,SAAS,MAAM,sBAAsB,EAAE;CAE7C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,CAAC,QAC7C,QAAQ,KAAK,2BAA2B,SAAS,kBAAkB;CAGrE,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreColumnsFeature.utils.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.utils.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n ColumnDef,\n ColumnDefResolved,\n GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\n/**\n * Flattens this column and every descendant column into a single array.\n *\n * Group columns appear before their child columns, which matches the normalized\n * column hierarchy produced during table construction.\n *\n * @example\n * ```ts\n * const flatColumns = column_getFlatColumns(column)\n * ```\n */\nexport function column_getFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]\n}\n\n/**\n * Collects the terminal leaf columns below this column.\n *\n * Group columns return their ordered descendants. Non-group columns return an\n * array containing only the column itself.\n *\n * @example\n * ```ts\n * const leafColumns = column_getLeafColumns(column)\n * ```\n */\nexport function column_getLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n if (column.columns.length) {\n const leafColumns = column.columns.flatMap(\n (col) => col.getLeafColumns(), // recursive\n )\n\n return callMemoOrStaticFn(\n column.table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns as any) as any\n }\n\n return [column]\n}\n\n/**\n * Merges built-in, feature, and user default column definitions.\n *\n * Built-in defaults provide a header and fallback cell renderer, feature\n * defaults can add feature-specific column options, and\n * `options.defaultColumn` wins last.\n *\n * @example\n * ```ts\n * const defaultColumn = table_getDefaultColumnDef(table)\n * ```\n */\nexport function table_getDefaultColumnDef<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Partial<ColumnDef<TFeatures, TData, unknown>> {\n return {\n header: (props) => {\n const resolvedColumnDef = props.header.column\n .columnDef as ColumnDefResolved<{}, TData>\n\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey\n }\n\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id\n }\n\n return null\n },\n cell: (props) => props.renderValue<any>()?.toString?.() ?? null,\n ...Object.values(table._features).reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef?.())\n }, {}),\n ...table.options.defaultColumn,\n } as Partial<ColumnDef<TFeatures, TData, unknown>>\n}\n\n/**\n * Normalizes `options.columns` into the table's nested column tree.\n *\n * Each column definition is constructed with its parent and depth, and group\n * column children are recursively constructed.\n *\n * @example\n * ```ts\n * const columns = table_getAllColumns(table)\n * ```\n */\nexport function table_getAllColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const recurseColumns = (\n colDefs: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>,\n parent?: Column<TFeatures, TData, unknown>,\n depth = 0,\n ): Array<Column<TFeatures, TData, unknown>> => {\n return colDefs.map((columnDef) => {\n const column = constructColumn(table, columnDef, depth, parent)\n\n const groupingColumnDef = columnDef as GroupColumnDef<\n TFeatures,\n TData,\n unknown\n >\n\n column.columns = groupingColumnDef.columns\n ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n : []\n\n return column\n })\n }\n\n return recurseColumns(table.options.columns)\n}\n\n/**\n * Flattens every table column, including group columns and leaf columns.\n *\n * Use this when parent/group columns must be included in addition to data leaf\n * columns.\n *\n * @example\n * ```ts\n * const flatColumns = table_getAllFlatColumns(table)\n * ```\n */\nexport function table_getAllFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n return table.getAllColumns().flatMap((column) => column.getFlatColumns())\n}\n\n/**\n * Builds an id lookup for every flat column in the table.\n *\n * Group columns and leaf columns are included. Later columns with the same id\n * replace earlier entries.\n *\n * @example\n * ```ts\n * const columnsById = table_getAllFlatColumnsById(table)\n * ```\n */\nexport function table_getAllFlatColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const flatColumns = table.getAllFlatColumns()\n for (let i = 0; i < flatColumns.length; i++) {\n const column = flatColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Collects all terminal leaf columns in their current table order.\n *\n * Column ordering features can reorder the collected leaves before the result\n * is returned.\n *\n * @example\n * ```ts\n * const leafColumns = table_getAllLeafColumns(table)\n * ```\n */\nexport function table_getAllLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const leafColumns = table.getAllColumns().flatMap(\n (c) => c.getLeafColumns(), // recursive\n )\n return callMemoOrStaticFn(\n table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns)\n}\n\n/**\n * Builds an id lookup for terminal leaf columns only.\n *\n * Parent/group columns are excluded, making this lookup appropriate for row\n * cells and feature state keyed by data columns.\n *\n * @example\n * ```ts\n * const leavesById = table_getAllLeafColumnsById(table)\n * ```\n */\nexport function table_getAllLeafColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const leafColumns = table.getAllLeafColumns()\n for (let i = 0; i < leafColumns.length; i++) {\n const column = leafColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Looks up a column by id from the flat column map.\n *\n * The lookup can return group columns or leaf columns. In development, a\n * missing id logs a warning to help catch stale column references.\n *\n * @example\n * ```ts\n * const column = table_getColumn(table, 'firstName')\n * ```\n */\nexport function table_getColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n): Column<TFeatures, TData, unknown> | undefined {\n const column = table.getAllFlatColumnsById()[columnId]\n\n if (process.env.NODE_ENV === 'development' && !column) {\n console.warn(`[Table] Column with id '${columnId}' does not exist.`)\n }\n\n return column\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,sBAKd,QACyC;CACzC,OAAO,CAAC,QAAQ,GAAG,OAAO,QAAQ,SAAS,QAAQ,IAAI,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;AAc3E,SAAgB,sBAKd,QACyC;CACzC,IAAI,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O,MAAM;;CAEtB,OAAO;;;;;;;;;;;;;AAcT,SAAgB,wBAId,OAC0C;CAC1C,MAAM,cAAc,MAAM,eAAe,CAAC,SACvC,MAAM,EAAE,gBAAgB,CAC1B;CACD,OAAO,mBACL,OACA,mBACA,wBACD,CAAC,YAAY;;;;;;;;;;;;;AAchB,SAAgB,4BAId,OACmD;CACnD,MAAM,SAA4D,EAAE;CACpE,MAAM,cAAc,MAAM,mBAAmB;CAC7C,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KAAK;EAC3C,MAAM,SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;;CAEtB,OAAO;;;;;;;;;;;;;AAcT,SAAgB,gBAId,OACA,UAC+C;CAC/C,MAAM,SAAS,MAAM,uBAAuB,CAAC;CAE7C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,CAAC,QAC7C,QAAQ,KAAK,2BAA2B,SAAS,mBAAmB;CAGtE,OAAO"}
1
+ {"version":3,"file":"coreColumnsFeature.utils.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.utils.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n ColumnDef,\n ColumnDefResolved,\n GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\n/**\n * Flattens this column and every descendant column into a single array.\n *\n * Group columns appear before their child columns, which matches the normalized\n * column hierarchy produced during table construction.\n *\n * @example\n * ```ts\n * const flatColumns = column_getFlatColumns(column)\n * ```\n */\nexport function column_getFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]\n}\n\n/**\n * Collects the terminal leaf columns below this column.\n *\n * Group columns return their ordered descendants. Non-group columns return an\n * array containing only the column itself.\n *\n * @example\n * ```ts\n * const leafColumns = column_getLeafColumns(column)\n * ```\n */\nexport function column_getLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n if (column.columns.length) {\n const leafColumns = column.columns.flatMap(\n (col) => col.getLeafColumns(), // recursive\n )\n\n return callMemoOrStaticFn(\n column.table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns as any) as any\n }\n\n return [column]\n}\n\n/**\n * Merges built-in, feature, and user default column definitions.\n *\n * Built-in defaults provide a header and fallback cell renderer, feature\n * defaults can add feature-specific column options, and\n * `options.defaultColumn` wins last.\n *\n * @example\n * ```ts\n * const defaultColumn = table_getDefaultColumnDef(table)\n * ```\n */\nexport function table_getDefaultColumnDef<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Partial<ColumnDef<TFeatures, TData, unknown>> {\n return {\n header: (props) => {\n const resolvedColumnDef = props.header.column\n .columnDef as ColumnDefResolved<{}, TData>\n\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey\n }\n\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id\n }\n\n return null\n },\n cell: (props) => props.renderValue<any>()?.toString?.() ?? null,\n ...Object.values(table._features).reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef?.())\n }, {}),\n ...table.options.defaultColumn,\n } as Partial<ColumnDef<TFeatures, TData, unknown>>\n}\n\n/**\n * Normalizes `options.columns` into the table's nested column tree.\n *\n * Each column definition is constructed with its parent and depth, and group\n * column children are recursively constructed.\n *\n * @example\n * ```ts\n * const columns = table_getAllColumns(table)\n * ```\n */\nexport function table_getAllColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const recurseColumns = (\n colDefs: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>,\n parent?: Column<TFeatures, TData, unknown>,\n depth = 0,\n ): Array<Column<TFeatures, TData, unknown>> => {\n return colDefs.map((columnDef) => {\n const column = constructColumn(table, columnDef, depth, parent)\n\n const groupingColumnDef = columnDef as GroupColumnDef<\n TFeatures,\n TData,\n unknown\n >\n\n column.columns = groupingColumnDef.columns\n ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n : []\n\n return column\n })\n }\n\n return recurseColumns(table.options.columns)\n}\n\n/**\n * Flattens every table column, including group columns and leaf columns.\n *\n * Use this when parent/group columns must be included in addition to data leaf\n * columns.\n *\n * @example\n * ```ts\n * const flatColumns = table_getAllFlatColumns(table)\n * ```\n */\nexport function table_getAllFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n return table.getAllColumns().flatMap((column) => column.getFlatColumns())\n}\n\n/**\n * Builds an id lookup for every flat column in the table.\n *\n * Group columns and leaf columns are included. Later columns with the same id\n * replace earlier entries.\n *\n * @example\n * ```ts\n * const columnsById = table_getAllFlatColumnsById(table)\n * ```\n */\nexport function table_getAllFlatColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const flatColumns = table.getAllFlatColumns()\n for (let i = 0; i < flatColumns.length; i++) {\n const column = flatColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Collects all terminal leaf columns in their current table order.\n *\n * Column ordering features can reorder the collected leaves before the result\n * is returned.\n *\n * @example\n * ```ts\n * const leafColumns = table_getAllLeafColumns(table)\n * ```\n */\nexport function table_getAllLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const leafColumns = table.getAllColumns().flatMap(\n (c) => c.getLeafColumns(), // recursive\n )\n return callMemoOrStaticFn(\n table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns)\n}\n\n/**\n * Builds an id lookup for terminal leaf columns only.\n *\n * Parent/group columns are excluded, making this lookup appropriate for row\n * cells and feature state keyed by data columns.\n *\n * @example\n * ```ts\n * const leavesById = table_getAllLeafColumnsById(table)\n * ```\n */\nexport function table_getAllLeafColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const leafColumns = table.getAllLeafColumns()\n for (let i = 0; i < leafColumns.length; i++) {\n const column = leafColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Looks up a column by id from the flat column map.\n *\n * The lookup can return group columns or leaf columns. In development, a\n * missing id logs a warning to help catch stale column references.\n *\n * @example\n * ```ts\n * const column = table_getColumn(table, 'firstName')\n * ```\n */\nexport function table_getColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n): Column<TFeatures, TData, unknown> | undefined {\n const column = table.getAllFlatColumnsById()[columnId]\n\n if (process.env.NODE_ENV === 'development' && !column) {\n console.warn(`[Table] Column with id '${columnId}' does not exist.`)\n }\n\n return column\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,sBAKd,QACyC;CACzC,OAAO,CAAC,QAAQ,GAAG,OAAO,QAAQ,SAAS,QAAQ,IAAI,eAAe,CAAC,CAAC;AAC1E;;;;;;;;;;;;AAaA,SAAgB,sBAKd,QACyC;CACzC,IAAI,OAAO,QAAQ,QAAQ;EACzB,MAAM,cAAc,OAAO,QAAQ,SAChC,QA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OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,wBAId,OAC0C;CAC1C,MAAM,cAAc,MAAM,cAAc,EAAE,SACvC,MAAM,EAAE,eAAe,CAC1B;CACA,OAAO,mBACL,OACA,mBACA,uBACF,EAAE,WAAW;AACf;;;;;;;;;;;;AAaA,SAAgB,4BAId,OACmD;CACnD,MAAM,SAA4D,CAAC;CACnE,MAAM,cAAc,MAAM,kBAAkB;CAC5C,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KAAK;EAC3C,MAAM,SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;CACtB;CACA,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,gBAId,OACA,UAC+C;CAC/C,MAAM,SAAS,MAAM,sBAAsB,EAAE;CAE7C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,CAAC,QAC7C,QAAQ,KAAK,2BAA2B,SAAS,kBAAkB;CAGrE,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreFeatures.cjs","names":[],"sources":["../../src/core/coreFeatures.ts"],"sourcesContent":["import { coreCellsFeature } from './cells/coreCellsFeature'\nimport { coreColumnsFeature } from './columns/coreColumnsFeature'\nimport { coreHeadersFeature } from './headers/coreHeadersFeature'\nimport { coreRowModelsFeature } from './row-models/coreRowModelsFeature'\nimport { coreRowsFeature } from './rows/coreRowsFeature'\nimport { coreTablesFeature } from './table/coreTablesFeature'\nimport type { TableReactivityBindings } from '../reactivity'\n\nexport interface CoreFeatures {\n coreReativityFeature?: TableReactivityBindings\n coreCellsFeature: typeof coreCellsFeature\n coreColumnsFeature: typeof coreColumnsFeature\n coreHeadersFeature: typeof coreHeadersFeature\n coreRowModelsFeature: typeof coreRowModelsFeature\n coreRowsFeature: typeof coreRowsFeature\n coreTablesFeature: typeof coreTablesFeature\n}\n\n/**\n * The built-in core feature set required by every table.\n *\n * These features provide table, column, row, header, cell, and core row-model behavior before optional feature plugins are added.\n */\nexport const coreFeatures: CoreFeatures = {\n coreCellsFeature,\n coreColumnsFeature,\n coreHeadersFeature,\n coreRowModelsFeature,\n coreRowsFeature,\n coreTablesFeature,\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,MAAa,eAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACD"}
1
+ {"version":3,"file":"coreFeatures.cjs","names":[],"sources":["../../src/core/coreFeatures.ts"],"sourcesContent":["import { coreCellsFeature } from './cells/coreCellsFeature'\nimport { coreColumnsFeature } from './columns/coreColumnsFeature'\nimport { coreHeadersFeature } from './headers/coreHeadersFeature'\nimport { coreRowModelsFeature } from './row-models/coreRowModelsFeature'\nimport { coreRowsFeature } from './rows/coreRowsFeature'\nimport { coreTablesFeature } from './table/coreTablesFeature'\nimport type { TableReactivityBindings } from '../reactivity'\n\nexport interface CoreFeatures {\n coreReativityFeature?: TableReactivityBindings\n coreCellsFeature: typeof coreCellsFeature\n coreColumnsFeature: typeof coreColumnsFeature\n coreHeadersFeature: typeof coreHeadersFeature\n coreRowModelsFeature: typeof coreRowModelsFeature\n coreRowsFeature: typeof coreRowsFeature\n coreTablesFeature: typeof coreTablesFeature\n}\n\n/**\n * The built-in core feature set required by every table.\n *\n * These features provide table, column, row, header, cell, and core row-model behavior before optional feature plugins are added.\n */\nexport const coreFeatures: CoreFeatures = {\n coreCellsFeature,\n coreColumnsFeature,\n coreHeadersFeature,\n coreRowModelsFeature,\n coreRowsFeature,\n coreTablesFeature,\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,MAAa,eAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreFeatures.js","names":[],"sources":["../../src/core/coreFeatures.ts"],"sourcesContent":["import { coreCellsFeature } from './cells/coreCellsFeature'\nimport { coreColumnsFeature } from './columns/coreColumnsFeature'\nimport { coreHeadersFeature } from './headers/coreHeadersFeature'\nimport { coreRowModelsFeature } from './row-models/coreRowModelsFeature'\nimport { coreRowsFeature } from './rows/coreRowsFeature'\nimport { coreTablesFeature } from './table/coreTablesFeature'\nimport type { TableReactivityBindings } from '../reactivity'\n\nexport interface CoreFeatures {\n coreReativityFeature?: TableReactivityBindings\n coreCellsFeature: typeof coreCellsFeature\n coreColumnsFeature: typeof coreColumnsFeature\n coreHeadersFeature: typeof coreHeadersFeature\n coreRowModelsFeature: typeof coreRowModelsFeature\n coreRowsFeature: typeof coreRowsFeature\n coreTablesFeature: typeof coreTablesFeature\n}\n\n/**\n * The built-in core feature set required by every table.\n *\n * These features provide table, column, row, header, cell, and core row-model behavior before optional feature plugins are added.\n */\nexport const coreFeatures: CoreFeatures = {\n coreCellsFeature,\n coreColumnsFeature,\n coreHeadersFeature,\n coreRowModelsFeature,\n coreRowsFeature,\n coreTablesFeature,\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,MAAa,eAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACD"}
1
+ {"version":3,"file":"coreFeatures.js","names":[],"sources":["../../src/core/coreFeatures.ts"],"sourcesContent":["import { coreCellsFeature } from './cells/coreCellsFeature'\nimport { coreColumnsFeature } from './columns/coreColumnsFeature'\nimport { coreHeadersFeature } from './headers/coreHeadersFeature'\nimport { coreRowModelsFeature } from './row-models/coreRowModelsFeature'\nimport { coreRowsFeature } from './rows/coreRowsFeature'\nimport { coreTablesFeature } from './table/coreTablesFeature'\nimport type { TableReactivityBindings } from '../reactivity'\n\nexport interface CoreFeatures {\n coreReativityFeature?: TableReactivityBindings\n coreCellsFeature: typeof coreCellsFeature\n coreColumnsFeature: typeof coreColumnsFeature\n coreHeadersFeature: typeof coreHeadersFeature\n coreRowModelsFeature: typeof coreRowModelsFeature\n coreRowsFeature: typeof coreRowsFeature\n coreTablesFeature: typeof coreTablesFeature\n}\n\n/**\n * The built-in core feature set required by every table.\n *\n * These features provide table, column, row, header, cell, and core row-model behavior before optional feature plugins are added.\n */\nexport const coreFeatures: CoreFeatures = {\n coreCellsFeature,\n coreColumnsFeature,\n coreHeadersFeature,\n coreRowModelsFeature,\n coreRowsFeature,\n coreTablesFeature,\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,MAAa,eAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildHeaderGroups.cjs","names":["callMemoOrStaticFn","column_getIsVisible","constructHeader"],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i]!\n if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {\n if (column.columns.length) {\n findMaxDepth(column.columns, depth + 1)\n }\n }\n }\n }\n\n findMaxDepth(allColumns)\n\n const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n const constructHeaderGroup = (\n headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n depth: number,\n ) => {\n // The header group we are creating\n const headerGroup: HeaderGroup<TFeatures, TData> = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: [],\n } as any\n\n // The parent columns we're going to scan next\n const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n // Scan each column for parents\n headersToGroup.forEach((headerToGroup) => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader =\n pendingParentHeaders[pendingParentHeaders.length - 1]\n\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n let column: Column<TFeatures, TData, TValue>\n let isPlaceholder = false\n\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent\n } else {\n // The parent header is repeated\n column = headerToGroup.column\n isPlaceholder = true\n }\n\n if (\n latestPendingParentHeader &&\n latestPendingParentHeader.column === column\n ) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup)\n } else {\n // This is a new header. Let's create it\n const header = constructHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup.id]\n .filter(Boolean)\n .join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder\n ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n : undefined,\n depth,\n index: pendingParentHeaders.length,\n })\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup)\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header)\n }\n\n headerGroup.headers.push(headerToGroup)\n headerToGroup.headerGroup = headerGroup\n })\n\n headerGroups.push(headerGroup)\n\n if (depth > 0) {\n constructHeaderGroup(pendingParentHeaders, depth - 1)\n }\n }\n\n const bottomHeaders = columnsToGroup.map((column, index) =>\n constructHeader(table, column, {\n depth: maxDepth,\n index,\n }),\n )\n\n constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n headerGroups.reverse()\n\n const recurseHeadersForSpans = (\n headers: Array<Header<TFeatures, TData, TValue>>,\n ): Array<{ colSpan: number; rowSpan: number }> => {\n const results: Array<{ colSpan: number; rowSpan: number }> = []\n\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n if (\n !callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)\n ) {\n continue\n }\n\n let colSpan = 0\n let minChildRowSpan = Infinity\n\n if (header.subHeaders.length) {\n const childSpans = recurseHeadersForSpans(header.subHeaders)\n for (let j = 0; j < childSpans.length; j++) {\n const child = childSpans[j]!\n colSpan += child.colSpan\n if (child.rowSpan < minChildRowSpan) {\n minChildRowSpan = child.rowSpan\n }\n }\n } else {\n colSpan = 1\n minChildRowSpan = 0\n }\n\n header.colSpan = colSpan\n header.rowSpan = minChildRowSpan\n\n results.push({ colSpan, rowSpan: header.rowSpan })\n }\n\n return results\n }\n\n recurseHeadersForSpans(\n (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n )\n\n return headerGroups\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,kBAKd,YACA,gBACA,OACA,cACA;;CAOA,IAAI,WAAW;CAEf,MAAM,gBACJ,SACA,QAAQ,MACL;EACH,WAAW,KAAK,IAAI,UAAU,MAAM;EAEpC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IAAIA,iCAAmB,QAAQ,gBAAgBC,0DAAoB,EACjE;QAAI,OAAO,QAAQ,QACjB,aAAa,OAAO,SAAS,QAAQ,EAAE;;;;CAM/C,aAAa,WAAW;CAExB,MAAM,eAAqD,EAAE;CAE7D,MAAM,wBACJ,gBACA,UACG;EAEH,MAAM,cAA6C;GACjD;GACA,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GACxD,SAAS,EAAE;GACZ;EAGD,MAAM,uBAAgE,EAAE;EAGxE,eAAe,SAAS,kBAAkB;GAGxC,MAAM,4BACJ,qBAAqB,qBAAqB,SAAS;GAEr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MAAM;KACjB,IAAI,MAAM,UAAU,iBAClB,kBAAkB,MAAM;;UAGvB;IACL,UAAU;IACV,kBAAkB;;GAGpB,OAAO,UAAU;GACjB,OAAO,UAAU;GAEjB,QAAQ,KAAK;IAAE;IAAS,SAAS,OAAO;IAAS,CAAC;;EAGpD,OAAO;;CAGT,0CACG,aAAa,oEAAI,YAAW,EAAE,CAChC;CAED,OAAO"}
1
+ {"version":3,"file":"buildHeaderGroups.cjs","names":["callMemoOrStaticFn","column_getIsVisible","constructHeader"],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i]!\n if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {\n if (column.columns.length) {\n findMaxDepth(column.columns, depth + 1)\n }\n }\n }\n }\n\n findMaxDepth(allColumns)\n\n const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n const constructHeaderGroup = (\n headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n depth: number,\n ) => {\n // The header group we are creating\n const headerGroup: HeaderGroup<TFeatures, TData> = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: [],\n } as any\n\n // The parent columns we're going to scan next\n const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n // Scan each column for parents\n headersToGroup.forEach((headerToGroup) => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader =\n pendingParentHeaders[pendingParentHeaders.length - 1]\n\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n let column: Column<TFeatures, TData, TValue>\n let isPlaceholder = false\n\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent\n } else {\n // The parent header is repeated\n column = headerToGroup.column\n isPlaceholder = true\n }\n\n if (\n latestPendingParentHeader &&\n latestPendingParentHeader.column === column\n ) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup)\n } else {\n // This is a new header. Let's create it\n const header = constructHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup.id]\n .filter(Boolean)\n .join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder\n ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n : undefined,\n depth,\n index: pendingParentHeaders.length,\n })\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup)\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header)\n }\n\n headerGroup.headers.push(headerToGroup)\n headerToGroup.headerGroup = headerGroup\n })\n\n headerGroups.push(headerGroup)\n\n if (depth > 0) {\n constructHeaderGroup(pendingParentHeaders, depth - 1)\n }\n }\n\n const bottomHeaders = columnsToGroup.map((column, index) =>\n constructHeader(table, column, {\n depth: maxDepth,\n index,\n }),\n )\n\n constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n headerGroups.reverse()\n\n const recurseHeadersForSpans = (\n headers: Array<Header<TFeatures, TData, TValue>>,\n ): Array<{ colSpan: number; rowSpan: number }> => {\n const results: Array<{ colSpan: number; rowSpan: number }> = []\n\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n if (\n !callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)\n ) {\n continue\n }\n\n let colSpan = 0\n let minChildRowSpan = Infinity\n\n if (header.subHeaders.length) {\n const childSpans = recurseHeadersForSpans(header.subHeaders)\n for (let j = 0; j < childSpans.length; j++) {\n const child = childSpans[j]!\n colSpan += child.colSpan\n if (child.rowSpan < minChildRowSpan) {\n minChildRowSpan = child.rowSpan\n }\n }\n } else {\n colSpan = 1\n minChildRowSpan = 0\n }\n\n header.colSpan = colSpan\n header.rowSpan = minChildRowSpan\n\n results.push({ colSpan, rowSpan: header.rowSpan })\n }\n\n return results\n }\n\n recurseHeadersForSpans(\n (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n )\n\n return headerGroups\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,kBAKd,YACA,gBACA,OACA,cACA;;CAOA,IAAI,WAAW;CAEf,MAAM,gBACJ,SACA,QAAQ,MACL;EACH,WAAW,KAAK,IAAI,UAAU,KAAK;EAEnC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IAAIA,iCAAmB,QAAQ,gBAAgBC,yDAAmB,GAChE;QAAI,OAAO,QAAQ,QACjB,aAAa,OAAO,SAAS,QAAQ,CAAC;GACxC;EAEJ;CACF;CAEA,aAAa,UAAU;CAEvB,MAAM,eAAqD,CAAC;CAE5D,MAAM,wBACJ,gBACA,UACG;EAEH,MAAM,cAA6C;GACjD;GACA,IAAI,CAAC,cAAc,GAAG,OAAO,EAAE,OAAO,OAAO,EAAE,KAAK,G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QAAQ;IAC5B,MAAM,aAAa,uBAAuB,OAAO,UAAU;IAC3D,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;KAC1C,MAAM,QAAQ,WAAW;KACzB,WAAW,MAAM;KACjB,IAAI,MAAM,UAAU,iBAClB,kBAAkB,MAAM;IAE5B;GACF,OAAO;IACL,UAAU;IACV,kBAAkB;GACpB;GAEA,OAAO,UAAU;GACjB,OAAO,UAAU;GAEjB,QAAQ,KAAK;IAAE;IAAS,SAAS,OAAO;GAAQ,CAAC;EACnD;EAEA,OAAO;CACT;CAEA,0CACG,aAAa,oEAAI,YAAW,CAAC,CAChC;CAEA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildHeaderGroups.js","names":[],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i]!\n if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {\n if (column.columns.length) {\n findMaxDepth(column.columns, depth + 1)\n }\n }\n }\n }\n\n findMaxDepth(allColumns)\n\n const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n const constructHeaderGroup = (\n headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n depth: number,\n ) => {\n // The header group we are creating\n const headerGroup: HeaderGroup<TFeatures, TData> = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: [],\n } as any\n\n // The parent columns we're going to scan next\n const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n // Scan each column for parents\n headersToGroup.forEach((headerToGroup) => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader =\n pendingParentHeaders[pendingParentHeaders.length - 1]\n\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n let column: Column<TFeatures, TData, TValue>\n let isPlaceholder = false\n\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent\n } else {\n // The parent header is repeated\n column = headerToGroup.column\n isPlaceholder = true\n }\n\n if (\n latestPendingParentHeader &&\n latestPendingParentHeader.column === column\n ) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup)\n } else {\n // This is a new header. Let's create it\n const header = constructHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup.id]\n .filter(Boolean)\n .join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder\n ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n : undefined,\n depth,\n index: pendingParentHeaders.length,\n })\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup)\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header)\n }\n\n headerGroup.headers.push(headerToGroup)\n headerToGroup.headerGroup = headerGroup\n })\n\n headerGroups.push(headerGroup)\n\n if (depth > 0) {\n constructHeaderGroup(pendingParentHeaders, depth - 1)\n }\n }\n\n const bottomHeaders = columnsToGroup.map((column, index) =>\n constructHeader(table, column, {\n depth: maxDepth,\n index,\n }),\n )\n\n constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n headerGroups.reverse()\n\n const recurseHeadersForSpans = (\n headers: Array<Header<TFeatures, TData, TValue>>,\n ): Array<{ colSpan: number; rowSpan: number }> => {\n const results: Array<{ colSpan: number; rowSpan: number }> = []\n\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n if (\n !callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)\n ) {\n continue\n }\n\n let colSpan = 0\n let minChildRowSpan = Infinity\n\n if (header.subHeaders.length) {\n const childSpans = recurseHeadersForSpans(header.subHeaders)\n for (let j = 0; j < childSpans.length; j++) {\n const child = childSpans[j]!\n colSpan += child.colSpan\n if (child.rowSpan < minChildRowSpan) {\n minChildRowSpan = child.rowSpan\n }\n }\n } else {\n colSpan = 1\n minChildRowSpan = 0\n }\n\n header.colSpan = colSpan\n header.rowSpan = minChildRowSpan\n\n results.push({ colSpan, rowSpan: header.rowSpan })\n }\n\n return results\n }\n\n recurseHeadersForSpans(\n (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n )\n\n return headerGroups\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,kBAKd,YACA,gBACA,OACA,cACA;;CAOA,IAAI,WAAW;CAEf,MAAM,gBACJ,SACA,QAAQ,MACL;EACH,WAAW,KAAK,IAAI,UAAU,MAAM;EAEpC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IAAI,mBAAmB,QAAQ,gBAAgB,oBAAoB,EACjE;QAAI,OAAO,QAAQ,QACjB,aAAa,OAAO,SAAS,QAAQ,EAAE;;;;CAM/C,aAAa,WAAW;CAExB,MAAM,eAAq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IACE,CAAC,mBAAmB,OAAO,QAAQ,gBAAgB,oBAAoB,EAEvE;GAGF,IAAI,UAAU;GACd,IAAI,kBAAkB;GAEtB,IAAI,OAAO,WAAW,QAAQ;IAC5B,MAAM,aAAa,uBAAuB,OAAO,WAAW;IAC5D,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;KAC1C,MAAM,QAAQ,WAAW;KACzB,WAAW,MAAM;KACjB,IAAI,MAAM,UAAU,iBAClB,kBAAkB,MAAM;;UAGvB;IACL,UAAU;IACV,kBAAkB;;GAGpB,OAAO,UAAU;GACjB,OAAO,UAAU;GAEjB,QAAQ,KAAK;IAAE;IAAS,SAAS,OAAO;IAAS,CAAC;;EAGpD,OAAO;;CAGT,0CACG,aAAa,oEAAI,YAAW,EAAE,CAChC;CAED,OAAO"}
1
+ {"version":3,"file":"buildHeaderGroups.js","names":[],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i]!\n if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {\n if (column.columns.length) {\n findMaxDepth(column.columns, depth + 1)\n }\n }\n }\n }\n\n findMaxDepth(allColumns)\n\n const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n const constructHeaderGroup = (\n headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n depth: number,\n ) => {\n // The header group we are creating\n const headerGroup: HeaderGroup<TFeatures, TData> = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: [],\n } as any\n\n // The parent columns we're going to scan next\n const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n // Scan each column for parents\n headersToGroup.forEach((headerToGroup) => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader =\n pendingParentHeaders[pendingParentHeaders.length - 1]\n\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n let column: Column<TFeatures, TData, TValue>\n let isPlaceholder = false\n\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent\n } else {\n // The parent header is repeated\n column = headerToGroup.column\n isPlaceholder = true\n }\n\n if (\n latestPendingParentHeader &&\n latestPendingParentHeader.column === column\n ) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup)\n } else {\n // This is a new header. Let's create it\n const header = constructHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup.id]\n .filter(Boolean)\n .join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder\n ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n : undefined,\n depth,\n index: pendingParentHeaders.length,\n })\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup)\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header)\n }\n\n headerGroup.headers.push(headerToGroup)\n headerToGroup.headerGroup = headerGroup\n })\n\n headerGroups.push(headerGroup)\n\n if (depth > 0) {\n constructHeaderGroup(pendingParentHeaders, depth - 1)\n }\n }\n\n const bottomHeaders = columnsToGroup.map((column, index) =>\n constructHeader(table, column, {\n depth: maxDepth,\n index,\n }),\n )\n\n constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n headerGroups.reverse()\n\n const recurseHeadersForSpans = (\n headers: Array<Header<TFeatures, TData, TValue>>,\n ): Array<{ colSpan: number; rowSpan: number }> => {\n const results: Array<{ colSpan: number; rowSpan: number }> = []\n\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n if (\n !callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)\n ) {\n continue\n }\n\n let colSpan = 0\n let minChildRowSpan = Infinity\n\n if (header.subHeaders.length) {\n const childSpans = recurseHeadersForSpans(header.subHeaders)\n for (let j = 0; j < childSpans.length; j++) {\n const child = childSpans[j]!\n colSpan += child.colSpan\n if (child.rowSpan < minChildRowSpan) {\n minChildRowSpan = child.rowSpan\n }\n }\n } else {\n colSpan = 1\n minChildRowSpan = 0\n }\n\n header.colSpan = colSpan\n header.rowSpan = minChildRowSpan\n\n results.push({ colSpan, rowSpan: header.rowSpan })\n }\n\n return results\n }\n\n recurseHeadersForSpans(\n (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n )\n\n return headerGroups\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,kBAKd,YACA,gBACA,OACA,cACA;;CAOA,IAAI,WAAW;CAEf,MAAM,gBACJ,SACA,QAAQ,MACL;EACH,WAAW,KAAK,IAAI,UAAU,KAAK;EAEnC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IAAI,mBAAmB,QAAQ,gBAAgB,mBAAmB,GAChE;QAAI,OAAO,QAAQ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UAAuD,CAAC;EAE9D,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IACE,CAAC,mBAAmB,OAAO,QAAQ,gBAAgB,mBAAmB,GAEtE;GAGF,IAAI,UAAU;GACd,IAAI,kBAAkB;GAEtB,IAAI,OAAO,WAAW,QAAQ;IAC5B,MAAM,aAAa,uBAAuB,OAAO,UAAU;IAC3D,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;KAC1C,MAAM,QAAQ,WAAW;KACzB,WAAW,MAAM;KACjB,IAAI,MAAM,UAAU,iBAClB,kBAAkB,MAAM;IAE5B;GACF,OAAO;IACL,UAAU;IACV,kBAAkB;GACpB;GAEA,OAAO,UAAU;GACjB,OAAO,UAAU;GAEjB,QAAQ,KAAK;IAAE;IAAS,SAAS,OAAO;GAAQ,CAAC;EACnD;EAEA,OAAO;CACT;CAEA,0CACG,aAAa,oEAAI,YAAW,CAAC,CAChC;CAEA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"constructHeader.cjs","names":[],"sources":["../../../src/core/headers/constructHeader.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)\n }\n }\n return table._headerPrototype\n}\n\n/**\n * Constructs a header 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 constructHeader<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n column: Column<TFeatures, TData, TValue>,\n options: {\n id?: string\n isPlaceholder?: boolean\n placeholderId?: string\n index: number\n depth: number\n },\n): Header<TFeatures, TData, TValue> {\n // Create header with shared prototype for memory efficiency\n const headerPrototype = getHeaderPrototype(table)\n const header = Object.create(headerPrototype) as Header_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n header.colSpan = 0\n header.column = column\n header.depth = options.depth\n header.headerGroup = null\n header.id = options.id ?? column.id\n header.index = options.index\n header.isPlaceholder = !!options.isPlaceholder\n header.placeholderId = options.placeholderId\n header.rowSpan = 0\n header.subHeaders = []\n\n return header as Header<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAWA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,OAAO;EAClC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,MAAM;;;CAGvE,OAAO,MAAM;;;;;;;AAQf,SAAgB,gBAKd,OACA,QACA,SAOkC;CAElC,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,UAAU;CACjB,OAAO,SAAS;CAChB,OAAO,QAAQ,QAAQ;CACvB,OAAO,cAAc;CACrB,OAAO,KAAK,QAAQ,MAAM,OAAO;CACjC,OAAO,QAAQ,QAAQ;CACvB,OAAO,gBAAgB,CAAC,CAAC,QAAQ;CACjC,OAAO,gBAAgB,QAAQ;CAC/B,OAAO,UAAU;CACjB,OAAO,aAAa,EAAE;CAEtB,OAAO"}
1
+ {"version":3,"file":"constructHeader.cjs","names":[],"sources":["../../../src/core/headers/constructHeader.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)\n }\n }\n return table._headerPrototype\n}\n\n/**\n * Constructs a header 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 constructHeader<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n column: Column<TFeatures, TData, TValue>,\n options: {\n id?: string\n isPlaceholder?: boolean\n placeholderId?: string\n index: number\n depth: number\n },\n): Header<TFeatures, TData, TValue> {\n // Create header with shared prototype for memory efficiency\n const headerPrototype = getHeaderPrototype(table)\n const header = Object.create(headerPrototype) as Header_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n header.colSpan = 0\n header.column = column\n header.depth = options.depth\n header.headerGroup = null\n header.id = options.id ?? column.id\n header.index = options.index\n header.isPlaceholder = !!options.isPlaceholder\n header.placeholderId = options.placeholderId\n header.rowSpan = 0\n header.subHeaders = []\n\n return header as Header<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAWA,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,QACA,SAOkC;CAElC,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,UAAU;CACjB,OAAO,SAAS;CAChB,OAAO,QAAQ,QAAQ;CACvB,OAAO,cAAc;CACrB,OAAO,KAAK,QAAQ,MAAM,OAAO;CACjC,OAAO,QAAQ,QAAQ;CACvB,OAAO,gBAAgB,CAAC,CAAC,QAAQ;CACjC,OAAO,gBAAgB,QAAQ;CAC/B,OAAO,UAAU;CACjB,OAAO,aAAa,CAAC;CAErB,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"constructHeader.js","names":[],"sources":["../../../src/core/headers/constructHeader.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)\n }\n }\n return table._headerPrototype\n}\n\n/**\n * Constructs a header 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 constructHeader<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n column: Column<TFeatures, TData, TValue>,\n options: {\n id?: string\n isPlaceholder?: boolean\n placeholderId?: string\n index: number\n depth: number\n },\n): Header<TFeatures, TData, TValue> {\n // Create header with shared prototype for memory efficiency\n const headerPrototype = getHeaderPrototype(table)\n const header = Object.create(headerPrototype) as Header_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n header.colSpan = 0\n header.column = column\n header.depth = options.depth\n header.headerGroup = null\n header.id = options.id ?? column.id\n header.index = options.index\n header.isPlaceholder = !!options.isPlaceholder\n header.placeholderId = options.placeholderId\n header.rowSpan = 0\n header.subHeaders = []\n\n return header as Header<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAWA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,OAAO;EAClC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,MAAM;;;CAGvE,OAAO,MAAM;;;;;;;AAQf,SAAgB,gBAKd,OACA,QACA,SAOkC;CAElC,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,UAAU;CACjB,OAAO,SAAS;CAChB,OAAO,QAAQ,QAAQ;CACvB,OAAO,cAAc;CACrB,OAAO,KAAK,QAAQ,MAAM,OAAO;CACjC,OAAO,QAAQ,QAAQ;CACvB,OAAO,gBAAgB,CAAC,CAAC,QAAQ;CACjC,OAAO,gBAAgB,QAAQ;CAC/B,OAAO,UAAU;CACjB,OAAO,aAAa,EAAE;CAEtB,OAAO"}
1
+ {"version":3,"file":"constructHeader.js","names":[],"sources":["../../../src/core/headers/constructHeader.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)\n }\n }\n return table._headerPrototype\n}\n\n/**\n * Constructs a header 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 constructHeader<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n column: Column<TFeatures, TData, TValue>,\n options: {\n id?: string\n isPlaceholder?: boolean\n placeholderId?: string\n index: number\n depth: number\n },\n): Header<TFeatures, TData, TValue> {\n // Create header with shared prototype for memory efficiency\n const headerPrototype = getHeaderPrototype(table)\n const header = Object.create(headerPrototype) as Header_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n header.colSpan = 0\n header.column = column\n header.depth = options.depth\n header.headerGroup = null\n header.id = options.id ?? column.id\n header.index = options.index\n header.isPlaceholder = !!options.isPlaceholder\n header.placeholderId = options.placeholderId\n header.rowSpan = 0\n header.subHeaders = []\n\n return header as Header<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAWA,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,QACA,SAOkC;CAElC,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,UAAU;CACjB,OAAO,SAAS;CAChB,OAAO,QAAQ,QAAQ;CACvB,OAAO,cAAc;CACrB,OAAO,KAAK,QAAQ,MAAM,OAAO;CACjC,OAAO,QAAQ,QAAQ;CACvB,OAAO,gBAAgB,CAAC,CAAC,QAAQ;CACjC,OAAO,gBAAgB,QAAQ;CAC/B,OAAO,UAAU;CACjB,OAAO,aAAa,CAAC;CAErB,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreHeadersFeature.cjs","names":["header_getLeafHeaders","header_getContext","table_getHeaderGroups","table_getFooterGroups","table_getFlatHeaders","table_getLeafHeaders"],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n header_getContext,\n header_getLeafHeaders,\n table_getFlatHeaders,\n table_getFooterGroups,\n table_getHeaderGroups,\n table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\nexport interface CoreHeadersFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Header: Header_Header<TFeatures, TData>\n // Table: Table_Headers<TFeatures, TData>\n}\n\n/**\n * Creates the stock core headers feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreHeadersFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n return {\n assignHeaderPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n header_getLeafHeaders: {\n fn: (header) => header_getLeafHeaders(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n header_getContext: {\n fn: (header) => header_getContext(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreHeadersFeature', table, {\n table_getHeaderGroups: {\n fn: () => table_getHeaderGroups(table),\n memoDeps: () => [\n table.options.columns,\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.atoms.columnPinning?.get(),\n table.atoms.columnVisibility?.get(),\n table.options.groupedColumnMode,\n ],\n },\n table_getFooterGroups: {\n fn: () => table_getFooterGroups(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getFlatHeaders: {\n fn: () => table_getFlatHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getLeafHeaders: {\n fn: () => table_getLeafHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n })\n },\n }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,kCAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAWA,uDAAsB,OAAO;KAC7C,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACD,mBAAmB;KACjB,KAAK,WAAWC,mDAAkB,OAAO;KACzC,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,8BAAgB,sBAAsB,OAAO;IAC3C,uBAAuB;KACrB,UAAUC,uDAAsB,MAAM;KACtC,gBAAgB;;;OACd,MAAM,QAAQ;gCACd,MAAM,MAAM,2FAAa,KAAK;gCAC9B,MAAM,MAAM,wFAAU,KAAK;gCAC3B,MAAM,MAAM,6FAAe,KAAK;gCAChC,MAAM,MAAM,gGAAkB,KAAK;OACnC,MAAM,QAAQ;OACf;;KACF;IACD,uBAAuB;KACrB,UAAUC,uDAAsB,MAAM;KACtC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAUC,sDAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAUC,sDAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,qBAAqB,6BAA6B"}
1
+ {"version":3,"file":"coreHeadersFeature.cjs","names":["header_getLeafHeaders","header_getContext","table_getHeaderGroups","table_getFooterGroups","table_getFlatHeaders","table_getLeafHeaders"],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n header_getContext,\n header_getLeafHeaders,\n table_getFlatHeaders,\n table_getFooterGroups,\n table_getHeaderGroups,\n table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\nexport interface CoreHeadersFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Header: Header_Header<TFeatures, TData>\n // Table: Table_Headers<TFeatures, TData>\n}\n\n/**\n * Creates the stock core headers feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreHeadersFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n return {\n assignHeaderPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n header_getLeafHeaders: {\n fn: (header) => header_getLeafHeaders(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n header_getContext: {\n fn: (header) => header_getContext(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreHeadersFeature', table, {\n table_getHeaderGroups: {\n fn: () => table_getHeaderGroups(table),\n memoDeps: () => [\n table.options.columns,\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.atoms.columnPinning?.get(),\n table.atoms.columnVisibility?.get(),\n table.options.groupedColumnMode,\n ],\n },\n table_getFooterGroups: {\n fn: () => table_getFooterGroups(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getFlatHeaders: {\n fn: () => table_getFlatHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getLeafHeaders: {\n fn: () => table_getLeafHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n })\n },\n }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,kCAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAWA,uDAAsB,MAAM;KAC5C,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,OAAO;IAC5D;IACA,mBAAmB;KACjB,KAAK,WAAWC,mDAAkB,MAAM;KACxC,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,OAAO;IAC5D;GACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,8BAAgB,sBAAsB,OAAO;IAC3C,uBAAuB;KACrB,UAAUC,uDAAsB,KAAK;KACrC,gBAAgB;;;OACd,MAAM,QAAQ;gCACd,MAAM,MAAM,2FAAa,IAAI;gCAC7B,MAAM,MAAM,wFAAU,IAAI;gCAC1B,MAAM,MAAM,6FAAe,IAAI;gCAC/B,MAAM,MAAM,gGAAkB,IAAI;OAClC,MAAM,QAAQ;MAChB;;IACF;IACA,uBAAuB;KACrB,UAAUC,uDAAsB,KAAK;KACrC,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;IAC1C;IACA,sBAAsB;KACpB,UAAUC,sDAAqB,KAAK;KACpC,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;IAC1C;IACA,sBAAsB;KACpB,UAAUC,sDAAqB,KAAK;KACpC,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;IAC1C;GACF,CAAC;EACH;CACF;AACF;;;;AAKA,MAAa,qBAAqB,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreHeadersFeature.js","names":[],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n header_getContext,\n header_getLeafHeaders,\n table_getFlatHeaders,\n table_getFooterGroups,\n table_getHeaderGroups,\n table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\nexport interface CoreHeadersFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Header: Header_Header<TFeatures, TData>\n // Table: Table_Headers<TFeatures, TData>\n}\n\n/**\n * Creates the stock core headers feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreHeadersFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n return {\n assignHeaderPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n header_getLeafHeaders: {\n fn: (header) => header_getLeafHeaders(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n header_getContext: {\n fn: (header) => header_getContext(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreHeadersFeature', table, {\n table_getHeaderGroups: {\n fn: () => table_getHeaderGroups(table),\n memoDeps: () => [\n table.options.columns,\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.atoms.columnPinning?.get(),\n table.atoms.columnVisibility?.get(),\n table.options.groupedColumnMode,\n ],\n },\n table_getFooterGroups: {\n fn: () => table_getFooterGroups(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getFlatHeaders: {\n fn: () => table_getFlatHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getLeafHeaders: {\n fn: () => table_getLeafHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n })\n },\n }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,OAAO;KAC7C,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACD,mBAAmB;KACjB,KAAK,WAAW,kBAAkB,OAAO;KACzC,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,gBAAgB,sBAAsB,OAAO;IAC3C,uBAAuB;KACrB,UAAU,sBAAsB,MAAM;KACtC,gBAAgB;;;OACd,MAAM,QAAQ;gCACd,MAAM,MAAM,2FAAa,KAAK;gCAC9B,MAAM,MAAM,wFAAU,KAAK;gCAC3B,MAAM,MAAM,6FAAe,KAAK;gCAChC,MAAM,MAAM,gGAAkB,KAAK;OACnC,MAAM,QAAQ;OACf;;KACF;IACD,uBAAuB;KACrB,UAAU,sBAAsB,MAAM;KACtC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAU,qBAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAU,qBAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,qBAAqB,6BAA6B"}
1
+ {"version":3,"file":"coreHeadersFeature.js","names":[],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n header_getContext,\n header_getLeafHeaders,\n table_getFlatHeaders,\n table_getFooterGroups,\n table_getHeaderGroups,\n table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\nexport interface CoreHeadersFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Header: Header_Header<TFeatures, TData>\n // Table: Table_Headers<TFeatures, TData>\n}\n\n/**\n * Creates the stock core headers feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreHeadersFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n return {\n assignHeaderPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n header_getLeafHeaders: {\n fn: (header) => header_getLeafHeaders(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n header_getContext: {\n fn: (header) => header_getContext(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreHeadersFeature', table, {\n table_getHeaderGroups: {\n fn: () => table_getHeaderGroups(table),\n memoDeps: () => [\n table.options.columns,\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.atoms.columnPinning?.get(),\n table.atoms.columnVisibility?.get(),\n table.options.groupedColumnMode,\n ],\n },\n table_getFooterGroups: {\n fn: () => table_getFooterGroups(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getFlatHeaders: {\n fn: () => table_getFlatHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getLeafHeaders: {\n fn: () => table_getLeafHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n })\n },\n }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,MAAM;KAC5C,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,OAAO;IAC5D;IACA,mBAAmB;KACjB,KAAK,WAAW,kBAAkB,MAAM;KACxC,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,OAAO;IAC5D;GACF,CAAC;EACH;EAEA,qBAAqB,UAAU;GAC7B,gBAAgB,sBAAsB,OAAO;IAC3C,uBAAuB;KACrB,UAAU,sBAAsB,KAAK;KACrC,gBAAgB;;;OACd,MAAM,QAAQ;gCACd,MAAM,MAAM,2FAAa,IAAI;gCAC7B,MAAM,MAAM,wFAAU,IAAI;gCAC1B,MAAM,MAAM,6FAAe,IAAI;gCAC/B,MAAM,MAAM,gGAAkB,IAAI;OAClC,MAAM,QAAQ;MAChB;;IACF;IACA,uBAAuB;KACrB,UAAU,sBAAsB,KAAK;KACrC,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;IAC1C;IACA,sBAAsB;KACpB,UAAU,qBAAqB,KAAK;KACpC,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;IAC1C;IACA,sBAAsB;KACpB,UAAU,qBAAqB,KAAK;KACpC,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;IAC1C;GACF,CAAC;EACH;CACF;AACF;;;;AAKA,MAAa,qBAAqB,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"coreHeadersFeature.utils.cjs","names":["getDefaultColumnPinningState","callMemoOrStaticFn","table_getVisibleLeafColumns","buildHeaderGroups","column_getIsVisible"],"sources":["../../../src/core/headers/coreHeadersFeature.utils.ts"],"sourcesContent":["import { getDefaultColumnPinningState } from '../../features/column-pinning/columnPinningFeature.utils'\nimport {\n column_getIsVisible,\n table_getVisibleLeafColumns,\n} from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { callMemoOrStaticFn } from '../../utils'\nimport { buildHeaderGroups } from './buildHeaderGroups'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header_Header } from './coreHeadersFeature.types'\nimport type { Column } from '../../types/Column'\n\n/**\n * Walks a header tree and collects all descendant leaf headers.\n *\n * The header itself is included after its descendants, matching the recursive\n * shape used by nested header groups.\n *\n * @example\n * ```ts\n * const leafHeaders = header_getLeafHeaders(header)\n * ```\n */\nexport function header_getLeafHeaders<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue,\n>(header: Header<TFeatures, TData, TValue>) {\n const leafHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n const recurseHeader = (h: Header_Header<TFeatures, TData, TValue>) => {\n if (h.subHeaders.length) {\n h.subHeaders.map(recurseHeader)\n }\n leafHeaders.push(h as Header<TFeatures, TData, TValue>)\n }\n\n recurseHeader(header)\n\n return leafHeaders\n}\n\n/**\n * Builds the render context passed to a column's `header` or `footer` template.\n *\n * The context contains the header, its column, and the owning table instance.\n *\n * @example\n * ```ts\n * const context = header_getContext(header)\n * ```\n */\nexport function header_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue,\n>(header: Header<TFeatures, TData, TValue>) {\n return {\n column: header.column,\n header,\n table: header.column.table,\n }\n}\n\n/**\n * Builds visible header groups for the current column tree.\n *\n * Column visibility and pinning are applied before groups are built. When no\n * columns are pinned, the fast path skips pin partitioning.\n *\n * @example\n * ```ts\n * const headerGroups = table_getHeaderGroups(table)\n * ```\n */\nexport function table_getHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const { left, right } =\n table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()\n const allColumns = table.getAllColumns()\n const leafColumns = callMemoOrStaticFn(\n table,\n 'getVisibleLeafColumns',\n table_getVisibleLeafColumns,\n ) as Array<Column<TFeatures, TData, unknown>>\n\n // Fast path: no columns are pinned — skip per-side lookups, partition, and spread.\n if (!left.length && !right.length) {\n return buildHeaderGroups(allColumns, leafColumns, table)\n }\n\n const leafColumnsById = table.getAllLeafColumnsById()\n\n const leftColumns: typeof leafColumns = []\n for (let i = 0; i < left.length; i++) {\n const column = leafColumnsById[left[i]!]\n if (\n column &&\n callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)\n ) {\n leftColumns.push(column)\n }\n }\n\n const rightColumns: typeof leafColumns = []\n for (let i = 0; i < right.length; i++) {\n const column = leafColumnsById[right[i]!]\n if (\n column &&\n callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)\n ) {\n rightColumns.push(column)\n }\n }\n\n const centerColumns = leafColumns.filter(\n (column) => !left.includes(column.id) && !right.includes(column.id),\n )\n\n return buildHeaderGroups(\n allColumns,\n [...leftColumns, ...centerColumns, ...rightColumns],\n table,\n )\n}\n\n/**\n * Builds footer groups by reversing the current header groups.\n *\n * Footer rendering uses the same header objects and grouping structure, but\n * renders them from leaf level back toward the root.\n *\n * @example\n * ```ts\n * const footerGroups = table_getFooterGroups(table)\n * ```\n */\nexport function table_getFooterGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const headerGroups = table.getHeaderGroups()\n return [...headerGroups].reverse()\n}\n\n/**\n * Flattens every header from every header group into one array.\n *\n * The result includes parent headers and placeholder headers, in header-group\n * order from top to bottom.\n *\n * @example\n * ```ts\n * const flatHeaders = table_getFlatHeaders(table)\n * ```\n */\nexport function table_getFlatHeaders<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const headerGroups = table.getHeaderGroups()\n const result: Array<Header<TFeatures, TData, unknown>> = []\n for (let i = 0; i < headerGroups.length; i++) {\n const headers = headerGroups[i]!.headers\n for (let j = 0; j < headers.length; j++) {\n result.push(headers[j]!)\n }\n }\n return result\n}\n\n/**\n * Collects only the leaf headers from the current header tree.\n *\n * Parent/group headers are skipped, making the result suitable for rendering\n * one header per visible leaf column.\n *\n * @example\n * ```ts\n * const leafHeaders = table_getLeafHeaders(table)\n * ```\n */\nexport function table_getLeafHeaders<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const topHeaders = table.getHeaderGroups()[0]?.headers ?? []\n const result: Array<Header<TFeatures, TData, unknown>> = []\n for (let i = 0; i < topHeaders.length; i++) {\n const leafHeaders = topHeaders[i]!.getLeafHeaders()\n for (let j = 0; j < leafHeaders.length; j++) {\n result.push(leafHeaders[j]!)\n }\n }\n return result\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,SAAgB,sBAId,QAA0C;CAC1C,MAAM,cAAuD,EAAE;CAE/D,MAAM,iBAAiB,MAA+C;EACpE,IAAI,EAAE,WAAW,QACf,EAAE,WAAW,IAAI,cAAc;EAEjC,YAAY,KAAK,EAAsC;;CAGzD,cAAc,OAAO;CAErB,OAAO;;;;;;;;;;;;AAaT,SAAgB,kBAId,QAA0C;CAC1C,OAAO;EACL,QAAQ,OAAO;EACf;EACA,OAAO,OAAO,OAAO;EACtB;;;;;;;;;;;;;AAcH,SAAgB,sBAGd,OAAyC;;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;;;AAcT,SAAgB,qBAGd,OAAyC;;CACzC,MAAM,uCAAa,MAAM,iBAAiB,CAAC,kFAAI,YAAW,EAAE;CAC5D,MAAM,SAAmD,EAAE;CAC3D,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;EAC1C,MAAM,cAAc,WAAW,GAAI,gBAAgB;EACnD,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KACtC,OAAO,KAAK,YAAY,GAAI;;CAGhC,OAAO"}
1
+ {"version":3,"file":"coreHeadersFeature.utils.cjs","names":["getDefaultColumnPinningState","callMemoOrStaticFn","table_getVisibleLeafColumns","buildHeaderGroups","column_getIsVisible"],"sources":["../../../src/core/headers/coreHeadersFeature.utils.ts"],"sourcesContent":["import { getDefaultColumnPinningState } from '../../features/column-pinning/columnPinningFeature.utils'\nimport {\n column_getIsVisible,\n table_getVisibleLeafColumns,\n} from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { callMemoOrStaticFn } from '../../utils'\nimport { buildHeaderGroups } from './buildHeaderGroups'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header_Header } from './coreHeadersFeature.types'\nimport type { Column } from '../../types/Column'\n\n/**\n * Walks a header tree and collects all descendant leaf headers.\n *\n * The header itself is included after its descendants, matching the recursive\n * shape used by nested header groups.\n *\n * @example\n * ```ts\n * const leafHeaders = header_getLeafHeaders(header)\n * ```\n */\nexport function header_getLeafHeaders<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue,\n>(header: Header<TFeatures, TData, TValue>) {\n const leafHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n const recurseHeader = (h: Header_Header<TFeatures, TData, TValue>) => {\n if (h.subHeaders.length) {\n h.subHeaders.map(recurseHeader)\n }\n leafHeaders.push(h as Header<TFeatures, TData, TValue>)\n }\n\n recurseHeader(header)\n\n return leafHeaders\n}\n\n/**\n * Builds the render context passed to a column's `header` or `footer` template.\n *\n * The context contains the header, its column, and the owning table instance.\n *\n * @example\n * ```ts\n * const context = header_getContext(header)\n * ```\n */\nexport function header_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue,\n>(header: Header<TFeatures, TData, TValue>) {\n return {\n column: header.column,\n header,\n table: header.column.table,\n }\n}\n\n/**\n * Builds visible header groups for the current column tree.\n *\n * Column visibility and pinning are applied before groups are built. When no\n * columns are pinned, the fast path skips pin partitioning.\n *\n * @example\n * ```ts\n * const headerGroups = table_getHeaderGroups(table)\n * ```\n */\nexport function table_getHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const { left, right } =\n table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()\n const allColumns = table.getAllColumns()\n const leafColumns = callMemoOrStaticFn(\n table,\n 'getVisibleLeafColumns',\n table_getVisibleLeafColumns,\n ) as Array<Column<TFeatures, TData, unknown>>\n\n // Fast path: no columns are pinned — skip per-side lookups, partition, and spread.\n if (!left.length && !right.length) {\n return buildHeaderGroups(allColumns, leafColumns, table)\n }\n\n const leafColumnsById = table.getAllLeafColumnsById()\n\n const leftColumns: typeof leafColumns = []\n for (let i = 0; i < left.length; i++) {\n const column = leafColumnsById[left[i]!]\n if (\n column &&\n callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)\n ) {\n leftColumns.push(column)\n }\n }\n\n const rightColumns: typeof leafColumns = []\n for (let i = 0; i < right.length; i++) {\n const column = leafColumnsById[right[i]!]\n if (\n column &&\n callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)\n ) {\n rightColumns.push(column)\n }\n }\n\n const centerColumns = leafColumns.filter(\n (column) => !left.includes(column.id) && !right.includes(column.id),\n )\n\n return buildHeaderGroups(\n allColumns,\n [...leftColumns, ...centerColumns, ...rightColumns],\n table,\n )\n}\n\n/**\n * Builds footer groups by reversing the current header groups.\n *\n * Footer rendering uses the same header objects and grouping structure, but\n * renders them from leaf level back toward the root.\n *\n * @example\n * ```ts\n * const footerGroups = table_getFooterGroups(table)\n * ```\n */\nexport function table_getFooterGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const headerGroups = table.getHeaderGroups()\n return [...headerGroups].reverse()\n}\n\n/**\n * Flattens every header from every header group into one array.\n *\n * The result includes parent headers and placeholder headers, in header-group\n * order from top to bottom.\n *\n * @example\n * ```ts\n * const flatHeaders = table_getFlatHeaders(table)\n * ```\n */\nexport function table_getFlatHeaders<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const headerGroups = table.getHeaderGroups()\n const result: Array<Header<TFeatures, TData, unknown>> = []\n for (let i = 0; i < headerGroups.length; i++) {\n const headers = headerGroups[i]!.headers\n for (let j = 0; j < headers.length; j++) {\n result.push(headers[j]!)\n }\n }\n return result\n}\n\n/**\n * Collects only the leaf headers from the current header tree.\n *\n * Parent/group headers are skipped, making the result suitable for rendering\n * one header per visible leaf column.\n *\n * @example\n * ```ts\n * const leafHeaders = table_getLeafHeaders(table)\n * ```\n */\nexport function table_getLeafHeaders<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n const topHeaders = table.getHeaderGroups()[0]?.headers ?? []\n const result: Array<Header<TFeatures, TData, unknown>> = []\n for (let i = 0; i < topHeaders.length; i++) {\n const leafHeaders = topHeaders[i]!.getLeafHeaders()\n for (let j = 0; j < leafHeaders.length; j++) {\n result.push(leafHeaders[j]!)\n }\n }\n return result\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,SAAgB,sBAId,QAA0C;CAC1C,MAAM,cAAuD,CAAC;CAE9D,MAAM,iBAAiB,MAA+C;EACpE,IAAI,EAAE,WAAW,QACf,EAAE,WAAW,IAAI,aAAa;EAEhC,YAAY,KAAK,CAAqC;CACxD;CAEA,cAAc,MAAM;CAEpB,OAAO;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