@simple-table/angular 4.0.1 → 4.0.2

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 (194) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/index.es.js +1 -1
  3. package/dist/types/buildVanillaConfig.d.ts +7 -0
  4. package/dist/types/index.d.ts +8 -0
  5. package/dist/types/{angular/src/lib → lib}/SimpleTableComponent.d.ts +13 -1
  6. package/dist/types/{angular/src/types.d.ts → types.d.ts} +17 -7
  7. package/package.json +12 -7
  8. package/styles.css.d.ts +1 -0
  9. package/dist/types/angular/src/buildVanillaConfig.d.ts +0 -5
  10. package/dist/types/angular/src/index.d.ts +0 -8
  11. package/dist/types/core/src/consts/column-constraints.d.ts +0 -58
  12. package/dist/types/core/src/consts/general-consts.d.ts +0 -32
  13. package/dist/types/core/src/core/SimpleTableVanilla.d.ts +0 -369
  14. package/dist/types/core/src/core/api/TableAPIImpl.d.ts +0 -78
  15. package/dist/types/core/src/core/dom/DOMManager.d.ts +0 -52
  16. package/dist/types/core/src/core/initialization/TableInitializer.d.ts +0 -34
  17. package/dist/types/core/src/core/rendering/RenderOrchestrator.d.ts +0 -172
  18. package/dist/types/core/src/core/rendering/SectionRenderer.d.ts +0 -119
  19. package/dist/types/core/src/core/rendering/TableRenderer.d.ts +0 -120
  20. package/dist/types/core/src/hooks/ariaAnnouncements.d.ts +0 -37
  21. package/dist/types/core/src/hooks/contentHeight.d.ts +0 -29
  22. package/dist/types/core/src/hooks/expandedDepths.d.ts +0 -69
  23. package/dist/types/core/src/hooks/handleOutsideClick.d.ts +0 -50
  24. package/dist/types/core/src/hooks/previousValue.d.ts +0 -30
  25. package/dist/types/core/src/hooks/scrollbarVisibility.d.ts +0 -65
  26. package/dist/types/core/src/hooks/scrollbarWidth.d.ts +0 -52
  27. package/dist/types/core/src/hooks/useAggregatedRows.d.ts +0 -14
  28. package/dist/types/core/src/hooks/useQuickFilter.d.ts +0 -14
  29. package/dist/types/core/src/hooks/windowResize.d.ts +0 -31
  30. package/dist/types/core/src/icons/AngleDownIcon.d.ts +0 -1
  31. package/dist/types/core/src/icons/AngleLeftIcon.d.ts +0 -1
  32. package/dist/types/core/src/icons/AngleRightIcon.d.ts +0 -1
  33. package/dist/types/core/src/icons/AngleUpIcon.d.ts +0 -1
  34. package/dist/types/core/src/icons/AscIcon.d.ts +0 -1
  35. package/dist/types/core/src/icons/CheckIcon.d.ts +0 -1
  36. package/dist/types/core/src/icons/DescIcon.d.ts +0 -1
  37. package/dist/types/core/src/icons/DragIcon.d.ts +0 -1
  38. package/dist/types/core/src/icons/FilterIcon.d.ts +0 -1
  39. package/dist/types/core/src/icons/SelectIcon.d.ts +0 -1
  40. package/dist/types/core/src/icons/index.d.ts +0 -14
  41. package/dist/types/core/src/index.d.ts +0 -58
  42. package/dist/types/core/src/managers/AnimationCoordinator.d.ts +0 -356
  43. package/dist/types/core/src/managers/AutoScaleManager.d.ts +0 -33
  44. package/dist/types/core/src/managers/DimensionManager.d.ts +0 -84
  45. package/dist/types/core/src/managers/DragHandlerManager.d.ts +0 -44
  46. package/dist/types/core/src/managers/FilterManager.d.ts +0 -36
  47. package/dist/types/core/src/managers/PivotManager.d.ts +0 -35
  48. package/dist/types/core/src/managers/RowManager.d.ts +0 -56
  49. package/dist/types/core/src/managers/RowSelectionManager.d.ts +0 -72
  50. package/dist/types/core/src/managers/ScrollManager.d.ts +0 -38
  51. package/dist/types/core/src/managers/SectionScrollController.d.ts +0 -74
  52. package/dist/types/core/src/managers/SelectionManager/SelectionManager.d.ts +0 -251
  53. package/dist/types/core/src/managers/SelectionManager/index.d.ts +0 -2
  54. package/dist/types/core/src/managers/SelectionManager/keyboardUtils.d.ts +0 -7
  55. package/dist/types/core/src/managers/SelectionManager/mouseUtils.d.ts +0 -16
  56. package/dist/types/core/src/managers/SelectionManager/selectionRangeUtils.d.ts +0 -7
  57. package/dist/types/core/src/managers/SelectionManager/types.d.ts +0 -28
  58. package/dist/types/core/src/managers/SortManager.d.ts +0 -42
  59. package/dist/types/core/src/types/AggregationTypes.d.ts +0 -8
  60. package/dist/types/core/src/types/AnimationsConfig.d.ts +0 -16
  61. package/dist/types/core/src/types/BoundingBox.d.ts +0 -11
  62. package/dist/types/core/src/types/Cell.d.ts +0 -7
  63. package/dist/types/core/src/types/CellChangeProps.d.ts +0 -9
  64. package/dist/types/core/src/types/CellClickProps.d.ts +0 -11
  65. package/dist/types/core/src/types/CellRendererProps.d.ts +0 -32
  66. package/dist/types/core/src/types/CellValue.d.ts +0 -2
  67. package/dist/types/core/src/types/ColumnEditorConfig.d.ts +0 -42
  68. package/dist/types/core/src/types/ColumnEditorCustomRendererProps.d.ts +0 -14
  69. package/dist/types/core/src/types/ColumnEditorRowRendererProps.d.ts +0 -39
  70. package/dist/types/core/src/types/ColumnVisibilityTypes.d.ts +0 -4
  71. package/dist/types/core/src/types/CustomTheme.d.ts +0 -28
  72. package/dist/types/core/src/types/DragHandlerProps.d.ts +0 -14
  73. package/dist/types/core/src/types/EnumOption.d.ts +0 -5
  74. package/dist/types/core/src/types/FilterTypes.d.ts +0 -31
  75. package/dist/types/core/src/types/FlattenedHeader.d.ts +0 -10
  76. package/dist/types/core/src/types/FooterPosition.d.ts +0 -3
  77. package/dist/types/core/src/types/FooterRendererProps.d.ts +0 -17
  78. package/dist/types/core/src/types/GenerateRowIdParams.d.ts +0 -11
  79. package/dist/types/core/src/types/GetRowId.d.ts +0 -16
  80. package/dist/types/core/src/types/HandleResizeStartProps.d.ts +0 -25
  81. package/dist/types/core/src/types/HeaderDropdownProps.d.ts +0 -14
  82. package/dist/types/core/src/types/HeaderObject.d.ts +0 -133
  83. package/dist/types/core/src/types/HeaderRendererProps.d.ts +0 -17
  84. package/dist/types/core/src/types/IconsConfig.d.ts +0 -19
  85. package/dist/types/core/src/types/OnNextPage.d.ts +0 -2
  86. package/dist/types/core/src/types/OnRowGroupExpandProps.d.ts +0 -16
  87. package/dist/types/core/src/types/OnSortProps.d.ts +0 -3
  88. package/dist/types/core/src/types/PanelSection.d.ts +0 -1
  89. package/dist/types/core/src/types/Pinned.d.ts +0 -1
  90. package/dist/types/core/src/types/PinnedSectionsState.d.ts +0 -6
  91. package/dist/types/core/src/types/PivotTypes.d.ts +0 -37
  92. package/dist/types/core/src/types/QuickFilterTypes.d.ts +0 -21
  93. package/dist/types/core/src/types/Row.d.ts +0 -3
  94. package/dist/types/core/src/types/RowButton.d.ts +0 -6
  95. package/dist/types/core/src/types/RowId.d.ts +0 -1
  96. package/dist/types/core/src/types/RowSelectionChangeProps.d.ts +0 -7
  97. package/dist/types/core/src/types/RowSelectionMode.d.ts +0 -8
  98. package/dist/types/core/src/types/RowState.d.ts +0 -12
  99. package/dist/types/core/src/types/RowStateRendererProps.d.ts +0 -18
  100. package/dist/types/core/src/types/SharedTableProps.d.ts +0 -24
  101. package/dist/types/core/src/types/SimpleTableConfig.d.ts +0 -124
  102. package/dist/types/core/src/types/SimpleTableProps.d.ts +0 -125
  103. package/dist/types/core/src/types/SortColumn.d.ts +0 -8
  104. package/dist/types/core/src/types/TableAPI.d.ts +0 -82
  105. package/dist/types/core/src/types/TableHeaderProps.d.ts +0 -17
  106. package/dist/types/core/src/types/TableRow.d.ts +0 -39
  107. package/dist/types/core/src/types/TableRowProps.d.ts +0 -29
  108. package/dist/types/core/src/types/Theme.d.ts +0 -2
  109. package/dist/types/core/src/types/UpdateCellProps.d.ts +0 -8
  110. package/dist/types/core/src/utils/accordionAnimation.d.ts +0 -25
  111. package/dist/types/core/src/utils/aggregationUtils.d.ts +0 -7
  112. package/dist/types/core/src/utils/ariaRowOwnership.d.ts +0 -37
  113. package/dist/types/core/src/utils/asRows.d.ts +0 -7
  114. package/dist/types/core/src/utils/bodyCell/cellLiveRef.d.ts +0 -9
  115. package/dist/types/core/src/utils/bodyCell/content.d.ts +0 -5
  116. package/dist/types/core/src/utils/bodyCell/editing.d.ts +0 -4
  117. package/dist/types/core/src/utils/bodyCell/editors/booleanDropdown.d.ts +0 -2
  118. package/dist/types/core/src/utils/bodyCell/editors/datePicker.d.ts +0 -2
  119. package/dist/types/core/src/utils/bodyCell/editors/dropdown.d.ts +0 -18
  120. package/dist/types/core/src/utils/bodyCell/editors/enumDropdown.d.ts +0 -2
  121. package/dist/types/core/src/utils/bodyCell/eventTracking.d.ts +0 -3
  122. package/dist/types/core/src/utils/bodyCell/expansion.d.ts +0 -12
  123. package/dist/types/core/src/utils/bodyCell/selection.d.ts +0 -7
  124. package/dist/types/core/src/utils/bodyCell/styling.d.ts +0 -11
  125. package/dist/types/core/src/utils/bodyCell/types.d.ts +0 -170
  126. package/dist/types/core/src/utils/bodyCellRenderer.d.ts +0 -6
  127. package/dist/types/core/src/utils/cellClipboardUtils.d.ts +0 -25
  128. package/dist/types/core/src/utils/cellScrollUtils.d.ts +0 -10
  129. package/dist/types/core/src/utils/cellUtils.d.ts +0 -18
  130. package/dist/types/core/src/utils/charts/createBarChart.d.ts +0 -20
  131. package/dist/types/core/src/utils/charts/createLineAreaChart.d.ts +0 -25
  132. package/dist/types/core/src/utils/collapseUtils.d.ts +0 -31
  133. package/dist/types/core/src/utils/columnEditor/columnEditorUtils.d.ts +0 -27
  134. package/dist/types/core/src/utils/columnEditor/createCheckbox.d.ts +0 -21
  135. package/dist/types/core/src/utils/columnEditor/createColumnEditor.d.ts +0 -26
  136. package/dist/types/core/src/utils/columnEditor/createColumnEditorPopout.d.ts +0 -23
  137. package/dist/types/core/src/utils/columnEditor/createColumnEditorRow.d.ts +0 -41
  138. package/dist/types/core/src/utils/csvExportUtils.d.ts +0 -14
  139. package/dist/types/core/src/utils/dateUtils.d.ts +0 -18
  140. package/dist/types/core/src/utils/externalScroll.d.ts +0 -58
  141. package/dist/types/core/src/utils/filterUtils.d.ts +0 -5
  142. package/dist/types/core/src/utils/filters/createBooleanFilter.d.ts +0 -15
  143. package/dist/types/core/src/utils/filters/createCustomSelect.d.ts +0 -20
  144. package/dist/types/core/src/utils/filters/createDateFilter.d.ts +0 -15
  145. package/dist/types/core/src/utils/filters/createDatePicker.d.ts +0 -10
  146. package/dist/types/core/src/utils/filters/createDropdown.d.ts +0 -33
  147. package/dist/types/core/src/utils/filters/createEnumFilter.d.ts +0 -15
  148. package/dist/types/core/src/utils/filters/createFilterActions.d.ts +0 -12
  149. package/dist/types/core/src/utils/filters/createFilterDropdown.d.ts +0 -15
  150. package/dist/types/core/src/utils/filters/createFilterInput.d.ts +0 -16
  151. package/dist/types/core/src/utils/filters/createNumberFilter.d.ts +0 -15
  152. package/dist/types/core/src/utils/filters/createStringFilter.d.ts +0 -15
  153. package/dist/types/core/src/utils/footer/createTableFooter.d.ts +0 -21
  154. package/dist/types/core/src/utils/formatters.d.ts +0 -3
  155. package/dist/types/core/src/utils/generalUtils.d.ts +0 -4
  156. package/dist/types/core/src/utils/headerCell/collapsing.d.ts +0 -6
  157. package/dist/types/core/src/utils/headerCell/dragging.d.ts +0 -5
  158. package/dist/types/core/src/utils/headerCell/editing.d.ts +0 -4
  159. package/dist/types/core/src/utils/headerCell/eventTracking.d.ts +0 -28
  160. package/dist/types/core/src/utils/headerCell/filtering.d.ts +0 -3
  161. package/dist/types/core/src/utils/headerCell/resizing.d.ts +0 -3
  162. package/dist/types/core/src/utils/headerCell/selection.d.ts +0 -10
  163. package/dist/types/core/src/utils/headerCell/sorting.d.ts +0 -3
  164. package/dist/types/core/src/utils/headerCell/styling.d.ts +0 -7
  165. package/dist/types/core/src/utils/headerCell/types.d.ts +0 -110
  166. package/dist/types/core/src/utils/headerCellRenderer.d.ts +0 -4
  167. package/dist/types/core/src/utils/headerUtils.d.ts +0 -41
  168. package/dist/types/core/src/utils/headerWidthUtils.d.ts +0 -121
  169. package/dist/types/core/src/utils/horizontalScrollbarRenderer.d.ts +0 -27
  170. package/dist/types/core/src/utils/infiniteScrollUtils.d.ts +0 -145
  171. package/dist/types/core/src/utils/loadingPlaceholderUtils.d.ts +0 -11
  172. package/dist/types/core/src/utils/nestedGridRowRenderer.d.ts +0 -50
  173. package/dist/types/core/src/utils/pinnedColumnUtils.d.ts +0 -29
  174. package/dist/types/core/src/utils/pivot/pivotRows.d.ts +0 -16
  175. package/dist/types/core/src/utils/propSyncEqual.d.ts +0 -60
  176. package/dist/types/core/src/utils/quickFilterUtils.d.ts +0 -14
  177. package/dist/types/core/src/utils/resizeUtils/autoExpandResize.d.ts +0 -32
  178. package/dist/types/core/src/utils/resizeUtils/compensation.d.ts +0 -17
  179. package/dist/types/core/src/utils/resizeUtils/domUpdates.d.ts +0 -15
  180. package/dist/types/core/src/utils/resizeUtils/index.d.ts +0 -26
  181. package/dist/types/core/src/utils/resizeUtils/maxWidth.d.ts +0 -9
  182. package/dist/types/core/src/utils/resizeUtils/parentHeaderResize.d.ts +0 -11
  183. package/dist/types/core/src/utils/resizeUtils/sectionWidths.d.ts +0 -36
  184. package/dist/types/core/src/utils/rowFlattening.d.ts +0 -30
  185. package/dist/types/core/src/utils/rowProcessing.d.ts +0 -65
  186. package/dist/types/core/src/utils/rowSelectionUtils.d.ts +0 -62
  187. package/dist/types/core/src/utils/rowSeparatorRenderer.d.ts +0 -16
  188. package/dist/types/core/src/utils/rowUtils.d.ts +0 -187
  189. package/dist/types/core/src/utils/sortUtils.d.ts +0 -8
  190. package/dist/types/core/src/utils/stateRowRenderer.d.ts +0 -15
  191. package/dist/types/core/src/utils/stickyParentsRenderer.d.ts +0 -53
  192. /package/dist/types/{angular/src/MountRegistry.d.ts → MountRegistry.d.ts} +0 -0
  193. /package/dist/types/{angular/src/lib → lib}/provideSimpleTable.d.ts +0 -0
  194. /package/dist/types/{angular/src/utils → utils}/wrapAngularRenderer.d.ts +0 -0
@@ -1,145 +0,0 @@
1
- import TableRow from "../types/TableRow";
2
- import { CustomTheme } from "../types/CustomTheme";
3
- import { Accessor } from "../types/HeaderObject";
4
- /**
5
- * Sorted array of [position, extraHeight] tuples for nested grids
6
- * Position: the row index in flattened array
7
- * ExtraHeight: additional height beyond standard rowHeight (in pixels)
8
- * Array is kept sorted by position for efficient binary search
9
- */
10
- export type HeightOffsets = Array<[number, number]>;
11
- /**
12
- * Precomputed cumulative height data structure for O(1) row position lookups
13
- * and O(log n) viewport calculations
14
- */
15
- export interface CumulativeHeightMap {
16
- /** Array where index i contains the top pixel position of row i */
17
- rowTopPositions: number[];
18
- /** Total height of all rows combined */
19
- totalHeight: number;
20
- }
21
- /**
22
- * Build a cumulative height map for efficient viewport calculations
23
- * This precomputes the top position of every row, enabling:
24
- * - O(1) lookup of row top position
25
- * - O(log n) binary search to find rows in viewport
26
- *
27
- * @param rowCount - Total number of rows
28
- * @param rowHeight - Standard height of each row
29
- * @param heightOffsets - Array of [position, extraHeight] for variable-height rows
30
- * @param customTheme - Theme configuration for separator width
31
- * @returns Cumulative height map with row positions
32
- */
33
- export declare const buildCumulativeHeightMap: (rowCount: number, rowHeight: number, heightOffsets: HeightOffsets | undefined, customTheme: CustomTheme) => CumulativeHeightMap;
34
- /**
35
- * Find the row index at a given scroll position using binary search
36
- * Returns the index of the row that contains or is closest to the scroll position
37
- *
38
- * @param scrollTop - The scroll position in pixels
39
- * @param heightMap - Precomputed cumulative height map
40
- * @returns Row index at the scroll position
41
- */
42
- export declare const findRowAtScrollPosition: (scrollTop: number, heightMap: CumulativeHeightMap) => number;
43
- /**
44
- * Calculate cumulative extra height from nested grids above a given position
45
- * Uses binary search for O(log n) performance
46
- * @param position - The row position to calculate height for
47
- * @param heightOffsets - Sorted array of [position, extraHeight] tuples
48
- * @returns Total extra height from all nested grids above this position
49
- */
50
- export declare const getCumulativeExtraHeight: (position: number, heightOffsets?: HeightOffsets) => number;
51
- export declare const getTotalRowCount: (tableRows: TableRow[]) => number;
52
- /**
53
- * Calculate the total height of all rows including nested grids with extra heights
54
- * @param totalRowCount - Total number of rows
55
- * @param rowHeight - Standard height of each row
56
- * @param heightOffsets - Array of [position, extraHeight] tuples for rows with non-standard heights
57
- * @param customTheme - Custom theme configuration for separator width
58
- * @returns Total height in pixels
59
- */
60
- export declare const calculateTotalHeight: (totalRowCount: number, rowHeight: number, heightOffsets: HeightOffsets | undefined, customTheme: CustomTheme) => number;
61
- /**
62
- * Viewport range calculation result containing start/end indices and the actual rows
63
- */
64
- export interface ViewportRange {
65
- startIndex: number;
66
- endIndex: number;
67
- rows: TableRow[];
68
- }
69
- /**
70
- * Complete viewport calculations with multiple strategies
71
- * Provides three different ways to calculate visible rows for different use cases
72
- */
73
- export interface ViewportCalculations {
74
- /** Rows to render in the DOM (includes overscan buffer for smooth scrolling) */
75
- rendered: ViewportRange;
76
- /** Rows that are completely visible within the viewport boundaries */
77
- fullyVisible: ViewportRange;
78
- /** Rows that are at least partially visible in the viewport */
79
- partiallyVisible: ViewportRange;
80
- }
81
- /**
82
- * Calculate all viewport ranges for virtual scrolling with variable-height row support
83
- * Returns three different viewport calculations:
84
- * - rendered: What should be in the DOM (includes overscan buffer)
85
- * - fullyVisible: Rows completely visible (useful for scroll-to-view logic)
86
- * - partiallyVisible: Rows at least partially visible (useful for scroll boundaries)
87
- *
88
- * This function now supports variable-height rows by using a cumulative height map
89
- * for O(log n) viewport calculations instead of assuming fixed row heights.
90
- */
91
- export declare const getViewportCalculations: ({ bufferRowCount, contentHeight, rowHeight, scrollTop, tableRows, scrollDirection, heightMap, }: {
92
- bufferRowCount: number;
93
- contentHeight: number;
94
- rowHeight: number;
95
- scrollTop: number;
96
- tableRows: TableRow[];
97
- scrollDirection?: "up" | "down" | "none";
98
- heightMap?: CumulativeHeightMap;
99
- }) => {
100
- rendered: {
101
- startIndex: number;
102
- endIndex: number;
103
- rows: TableRow[];
104
- };
105
- fullyVisible: {
106
- startIndex: number;
107
- endIndex: number;
108
- rows: TableRow[];
109
- };
110
- partiallyVisible: {
111
- startIndex: number;
112
- endIndex: number;
113
- rows: TableRow[];
114
- };
115
- };
116
- /**
117
- * Get visible rows with pixel-based overscan
118
- * Uses the viewport calculations internally and returns the rendered rows
119
- * Maintains backward compatibility with existing code
120
- */
121
- export declare const getVisibleRows: ({ bufferRowCount, contentHeight, rowHeight, scrollTop, tableRows, scrollDirection, heightMap, }: {
122
- bufferRowCount: number;
123
- contentHeight: number;
124
- rowHeight: number;
125
- scrollTop: number;
126
- tableRows: TableRow[];
127
- scrollDirection?: "up" | "down" | "none";
128
- heightMap?: CumulativeHeightMap;
129
- }) => TableRow[];
130
- export declare const calculateSeparatorTopPosition: ({ position, rowHeight, heightOffsets, customTheme, }: {
131
- position: number;
132
- rowHeight: number;
133
- heightOffsets?: HeightOffsets;
134
- customTheme: CustomTheme;
135
- }) => number;
136
- export declare const calculateRowTopPosition: ({ position, rowHeight, heightOffsets, customTheme, }: {
137
- position: number;
138
- rowHeight: number;
139
- heightOffsets?: HeightOffsets;
140
- customTheme: CustomTheme;
141
- }) => number;
142
- export declare const getStickyParents: (allTableRows: TableRow[], renderedRows: TableRow[], fullyVisibleRows: TableRow[], partiallyVisibleRows: TableRow[], rowGrouping: Accessor[]) => {
143
- stickyParents: TableRow[];
144
- regularRows: TableRow[];
145
- };
@@ -1,11 +0,0 @@
1
- import type Row from "../types/Row";
2
- import type { GetRowId } from "../types/GetRowId";
3
- /** Mark and return a fresh empty row used as an `isLoading` skeleton placeholder. */
4
- export declare const createLoadingPlaceholderRow: () => Row;
5
- export declare const isLoadingPlaceholderRow: (row: Row) => boolean;
6
- /**
7
- * Consumer `getRowId` often collapses empty placeholders to the same key.
8
- * Skip it for placeholders so WeakMap identity / positional ids stay unique.
9
- */
10
- export declare const wrapGetRowIdForLoadingPlaceholders: (getRowId: GetRowId | undefined) => GetRowId | undefined;
11
- export declare const createLoadingPlaceholderRows: (count: number) => Row[];
@@ -1,50 +0,0 @@
1
- /**
2
- * Vanilla equivalent of React NestedGridRow: renders a full-width row that contains
3
- * a nested SimpleTable when a row has nestedTable config (expandable + nestedTable headers).
4
- */
5
- import type TableRow from "../types/TableRow";
6
- import type { CustomTheme } from "../types/CustomTheme";
7
- import type { SimpleTableConfig } from "../types/SimpleTableConfig";
8
- import { type HeightOffsets } from "./infiniteScrollUtils";
9
- /**
10
- * Minimal surface of a table instance this renderer drives. Declared
11
- * structurally so this module never has to statically import the concrete
12
- * `SimpleTableVanilla` class — that import would close a cycle
13
- * (SimpleTableVanilla → RenderOrchestrator → TableRenderer → SectionRenderer →
14
- * nestedGridRowRenderer → SimpleTableVanilla). The class is injected at render
15
- * time via {@link NestedTableFactory} instead.
16
- */
17
- export interface NestedTableInstance {
18
- mount: () => void;
19
- destroy: () => void;
20
- }
21
- /** Factory injected by the host table to instantiate a nested table. */
22
- export type NestedTableFactory = (container: HTMLElement, config: SimpleTableConfig) => NestedTableInstance;
23
- export interface NestedGridRowRenderContext {
24
- rowHeight: number;
25
- heightOffsets: HeightOffsets | undefined;
26
- customTheme: CustomTheme;
27
- theme?: string;
28
- rowGrouping?: (string | number)[];
29
- depth: number;
30
- loadingStateRenderer?: SimpleTableConfig["loadingStateRenderer"];
31
- errorStateRenderer?: SimpleTableConfig["errorStateRenderer"];
32
- emptyStateRenderer?: SimpleTableConfig["emptyStateRenderer"];
33
- icons?: SimpleTableConfig["icons"];
34
- /** Injected constructor for nested tables (breaks the import cycle). */
35
- createNestedTable?: NestedTableFactory;
36
- }
37
- /**
38
- * Creates a nested grid row element: a div with class "st-row st-nested-grid-row"
39
- * that contains a nested SimpleTableVanilla instance.
40
- * Returns the row element and a cleanup function to destroy the nested table.
41
- */
42
- export declare function createNestedGridRow(tableRow: TableRow, context: NestedGridRowRenderContext): {
43
- element: HTMLElement;
44
- cleanup: () => void;
45
- };
46
- /**
47
- * Creates a spacer row for pinned sections: same position/height as a nested grid row
48
- * but no inner table (keeps scroll height in sync).
49
- */
50
- export declare function createNestedGridSpacer(tableRow: TableRow, context: Pick<NestedGridRowRenderContext, "rowHeight" | "heightOffsets" | "customTheme">): HTMLElement;
@@ -1,29 +0,0 @@
1
- import HeaderObject, { Accessor } from "../types/HeaderObject";
2
- import { PinnedSectionsState } from "../types/PinnedSectionsState";
3
- import { PanelSection } from "../types/PanelSection";
4
- export type { PinnedSectionsState, PanelSection };
5
- /** Root-level columns only, preserving order within each pin group. */
6
- export declare function partitionRootHeadersByPin(headers: HeaderObject[]): {
7
- pinnedLeft: HeaderObject[];
8
- unpinned: HeaderObject[];
9
- pinnedRight: HeaderObject[];
10
- };
11
- export declare function isHeaderEssential(header: HeaderObject, essentialAccessors: ReadonlySet<string>): boolean;
12
- /** Accessors for every header with `isEssential` in the tree (including nested). */
13
- export declare function collectEssentialAccessors(headers: HeaderObject[]): Set<string>;
14
- /** Within one sibling list: all essential columns must form a left prefix. */
15
- export declare function hasEssentialPrefixOrder(siblings: HeaderObject[], essentialAccessors: ReadonlySet<string>): boolean;
16
- /** Root array mixes pin sections; validate each pin group separately, then recurse into children. */
17
- export declare function validateFullHeaderTreeEssentialOrder(headers: HeaderObject[], essentialAccessors: ReadonlySet<string>): boolean;
18
- export declare function getPinnedSectionsState(headers: HeaderObject[]): PinnedSectionsState;
19
- /**
20
- * Rebuilds root `headers` order and `pinned` flags from section accessor lists.
21
- * Clamps essential columns to the left within each section. Returns null if accessors don't match roots.
22
- */
23
- export declare function rebuildHeadersFromPinnedState(headers: HeaderObject[], state: PinnedSectionsState, essentialAccessors: ReadonlySet<string>): HeaderObject[] | null;
24
- /**
25
- * Move a root column to another pin section.
26
- * Appends within left/right targets. For `main`, left-pinned columns are inserted at the
27
- * start of main; right-pinned (and other) columns are inserted at the end of main.
28
- */
29
- export declare function moveRootColumnPinSide(headers: HeaderObject[], accessor: Accessor, target: Exclude<PanelSection, "main"> | "main", essentialAccessors: ReadonlySet<string>): HeaderObject[] | null;
@@ -1,16 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- import type { Accessor } from "../../types/HeaderObject";
3
- import type Row from "../../types/Row";
4
- import type { PivotConfig, PivotResult } from "../../types/PivotTypes";
5
- export type PivotRowsProps = {
6
- rows: Row[];
7
- pivot: PivotConfig;
8
- /** Field catalog (`defaultHeaders`) for labels, types, widths, formatters. */
9
- fieldHeaders: HeaderObject[];
10
- };
11
- export declare const buildPivotAccessor: (colKey: string, valueAccessor: Accessor) => string;
12
- export declare const buildPivotRowTotalAccessor: (valueAccessor: Accessor) => string;
13
- /**
14
- * Pure transform: flat source rows + pivot config → pivoted rows and generated headers.
15
- */
16
- export declare const pivotRows: ({ rows, pivot, fieldHeaders }: PivotRowsProps) => PivotResult;
@@ -1,60 +0,0 @@
1
- /**
2
- * Shared prop-sync helpers for framework adapters.
3
- * Used to skip no-op `defaultHeaders` / `rows` updates when consumers rebuild
4
- * column configs or shallow-clone rows every render.
5
- */
6
- import type { GetRowIdParams } from "../types/GetRowId";
7
- /** Minimal header shape for structural comparison (renderers ignored). */
8
- export type HeaderStructureLike = {
9
- accessor: string | number | symbol;
10
- width?: number | string;
11
- minWidth?: number | string;
12
- maxWidth?: number | string;
13
- label?: string;
14
- type?: string;
15
- pinned?: string | boolean | null;
16
- hide?: boolean;
17
- isSortable?: boolean;
18
- filterable?: boolean;
19
- align?: string;
20
- collapsible?: boolean;
21
- collapseDefault?: boolean;
22
- showWhen?: string;
23
- isEditable?: boolean;
24
- isEssential?: boolean;
25
- disableReorder?: boolean;
26
- expandable?: boolean;
27
- excludeFromRender?: boolean;
28
- autoSizeMode?: string;
29
- tooltip?: string;
30
- quickFilterable?: boolean;
31
- filterOperators?: ReadonlyArray<string>;
32
- children?: ReadonlyArray<HeaderStructureLike>;
33
- };
34
- /**
35
- * True when two header trees describe the same columns (accessors, widths,
36
- * flags, nesting). Ignores renderer identity.
37
- */
38
- export declare function headersStructurallyEqual(a: ReadonlyArray<HeaderStructureLike> | undefined, b: ReadonlyArray<HeaderStructureLike> | undefined): boolean;
39
- /** Collect every accessor in a header tree (for renderer-cache pruning). */
40
- export declare function collectHeaderAccessors(headers: ReadonlyArray<HeaderStructureLike>, into?: Set<string>): Set<string>;
41
- /**
42
- * Shallow equality of a single row object (own enumerable keys, `===` values).
43
- * Identical references are equal. In-place mutation on a shared object is
44
- * invisible — callers must pass new object identities when data changes.
45
- */
46
- export declare function shallowEqualRow(a: object, b: object): boolean;
47
- /** Compatible with `GetRowId`; return may be nullish for sync helpers. */
48
- export type GetRowIdLike = (params: GetRowIdParams) => string | number | null | undefined;
49
- /**
50
- * Above this length, skip per-field shallow compares when row object identity
51
- * differs. Same-array-ref and same-row-object cases stay O(1) / O(n) pointer
52
- * checks. Protects huge client datasets from O(n × fields) scans.
53
- */
54
- export declare const SHALLOW_ROW_COMPARE_MAX = 50000;
55
- /**
56
- * True when `next` is a no-op relative to `prev` for table sync:
57
- * same length, matching `getRowId` sequence (when provided), and each row
58
- * either the same object or shallow-equal (for modest list sizes).
59
- */
60
- export declare function rowsShallowUnchanged(prev: ReadonlyArray<object> | undefined, next: ReadonlyArray<object> | undefined, getRowId?: GetRowIdLike): boolean;
@@ -1,14 +0,0 @@
1
- import { SmartFilterToken } from "../types/QuickFilterTypes";
2
- /**
3
- * Parses a smart filter query into tokens
4
- * Supports:
5
- * - Multi-word: "john engineer" → matches rows containing both "john" AND "engineer"
6
- * - Phrase: "john doe" → matches exact phrase
7
- * - Negation: -inactive → excludes rows containing "inactive"
8
- * - Column-specific: name:john → searches only in name column
9
- */
10
- export declare const parseSmartFilter: (query: string) => SmartFilterToken[];
11
- /**
12
- * Checks if a value matches a simple filter (case-insensitive contains)
13
- */
14
- export declare const matchesSimpleFilter: (value: string, filterText: string, caseSensitive: boolean) => boolean;
@@ -1,32 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- import type { Pinned } from "../../types/Pinned";
3
- /**
4
- * Handle resize with autoExpandColumns enabled.
5
- *
6
- * Neighbors compensate a growing column only down to their shrink floor (their
7
- * natural width — declared, content-measured, or user-set). Once all
8
- * neighbors are at their floor, the main section keeps growing past the
9
- * container width and overflows into horizontal scroll instead of blocking
10
- * the drag. Pinned sections cannot scroll their own content, so their growth
11
- * stays capped by the neighbors' available surplus (plus the pinned-width
12
- * policy cap).
13
- */
14
- export declare const handleResizeWithAutoExpand: ({ childrenToResize, collapsedHeaders, containerWidth, delta, headers, initialWidthsMap, isParentResize, resizedHeader, reverse, rootPinned, sectionHeaders, sectionWidth, sectionViewportWidth, shrinkFloors, startWidth, }: {
15
- childrenToResize?: HeaderObject[];
16
- collapsedHeaders?: Set<string>;
17
- containerWidth: number;
18
- delta: number;
19
- headers: HeaderObject[];
20
- initialWidthsMap: Map<string, number>;
21
- isParentResize?: boolean;
22
- resizedHeader: HeaderObject;
23
- reverse: boolean;
24
- rootPinned: Pinned | undefined;
25
- sectionHeaders: HeaderObject[];
26
- sectionWidth: number;
27
- /** Visible viewport width of the section (main: container minus pinned). 0 when unknown. */
28
- sectionViewportWidth?: number;
29
- /** Accessor -> natural width; the shrink floor for compensating neighbors. */
30
- shrinkFloors?: Map<string, number>;
31
- startWidth: number;
32
- }) => void;
@@ -1,17 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- /**
3
- * Distribute compensation among columns proportionally based on available headroom
4
- * Used in autoExpandColumns mode
5
- * Positive compensation = shrink columns, Negative compensation = grow columns
6
- *
7
- * `shrinkFloors` (accessor -> px) sets each column's shrink floor — its natural
8
- * width (declared, content-measured, or user-set). Columns give up only their
9
- * surplus (expanded) space and are never squeezed below their natural width.
10
- * Falls back to MIN_COLUMN_WIDTH when a column has no known floor.
11
- */
12
- export declare const distributeCompensationProportionally: ({ columnsToShrink, totalCompensation, initialWidthsMap, shrinkFloors, }: {
13
- columnsToShrink: HeaderObject[];
14
- totalCompensation: number;
15
- initialWidthsMap: Map<string, number>;
16
- shrinkFloors?: Map<string, number>;
17
- }) => void;
@@ -1,15 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- import type { Pinned } from "../../types/Pinned";
3
- /**
4
- * Get the pinned value from the root header (for nested headers, children inherit from parent)
5
- */
6
- export declare const getRootPinned: (header: HeaderObject, headers: HeaderObject[]) => Pinned | undefined;
7
- /**
8
- * Update column widths and positions directly in the DOM without triggering React re-renders
9
- * This is used during resize drag for better performance
10
- *
11
- * IMPORTANT: Positions are calculated per pinned section (left/main/right each start at 0)
12
- * @param collapsedHeaders - Set of collapsed header accessors; only visible children are laid out (matches findLeafHeaders / SectionRenderer).
13
- * @param overrideWidths - Optional map of accessor -> width to use for position calculation (e.g. after resize so DOM reflects just-set value)
14
- */
15
- export declare const updateColumnWidthsInDOM: (headers: HeaderObject[], collapsedHeaders?: Set<string>, overrideWidths?: Map<string, number>) => void;
@@ -1,26 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- import type { Accessor } from "../../types/HeaderObject";
3
- import type { HandleResizeStartProps } from "../../types/HandleResizeStartProps";
4
- /**
5
- * Handler for when resize dragging starts
6
- */
7
- export declare const handleResizeStart: ({ autoExpandColumns, collapsedHeaders, containerWidth, event, header, headers, mainBodyRef, onColumnWidthChange, onAutoExpandNaturalWidths, reverse, setHeaders, setIsResizing, shrinkFloors, startWidth, }: HandleResizeStartProps) => void;
8
- export type ApplyColumnAutoFitWithAutoExpandParams = {
9
- collapsedHeaders: Set<Accessor>;
10
- containerWidth: number;
11
- getTargetLeafWidth: (leafHeader: HeaderObject) => number;
12
- header: HeaderObject;
13
- headerCellElement: HTMLElement | null;
14
- headers: HeaderObject[];
15
- mainBodyRef: HandleResizeStartProps["mainBodyRef"];
16
- /** Persist the auto-fitted column(s)' widths as their natural widths. */
17
- onAutoExpandNaturalWidths?: (widths: Map<string, number>) => void;
18
- reverse: boolean;
19
- /** Natural-width shrink floors (accessor -> px) for compensating neighbors. */
20
- shrinkFloors?: Map<string, number>;
21
- };
22
- /**
23
- * Apply a one-shot "fit to content" width for a column while preserving autoExpand
24
- * compensation (same redistribution rules as dragging the resize handle).
25
- */
26
- export declare const applyColumnAutoFitWithAutoExpand: ({ header, headers, collapsedHeaders, containerWidth, mainBodyRef, reverse, headerCellElement, getTargetLeafWidth, onAutoExpandNaturalWidths, shrinkFloors, }: ApplyColumnAutoFitWithAutoExpandParams) => void;
@@ -1,9 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- /**
3
- * Calculate the maximum allowable width for a header based on container constraints
4
- */
5
- export declare const calculateMaxHeaderWidth: ({ header, headers, collapsedHeaders, }: {
6
- header: HeaderObject;
7
- headers: HeaderObject[];
8
- collapsedHeaders?: Set<string>;
9
- }) => number;
@@ -1,11 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- /**
3
- * Handle resizing of parent headers with multiple children
4
- */
5
- export declare const handleParentHeaderResize: ({ delta, leafHeaders, minWidth, startWidth, maxWidth, }: {
6
- delta: number;
7
- leafHeaders: HeaderObject[];
8
- minWidth: number;
9
- startWidth: number;
10
- maxWidth: number;
11
- }) => void;
@@ -1,36 +0,0 @@
1
- import type HeaderObject from "../../types/HeaderObject";
2
- /**
3
- * Width of the *visible* portion of the main (non-pinned) section: the container
4
- * width minus the pinned section widths.
5
- *
6
- * This is the viewport used for column virtualization (getVisibleBodyCells /
7
- * getVisibleCells) — NOT `mainWidth` from {@link recalculateAllSectionWidths},
8
- * which is the full *content* width (sum of all main column widths). Passing the
9
- * content width here makes every column count as "in viewport", disabling column
10
- * virtualization (all columns render). See the column-virtualization regression
11
- * tests.
12
- *
13
- * Returns `undefined` when the container has not been measured yet
14
- * (`containerWidth` 0) so callers fall back to a live `clientWidth` read instead
15
- * of virtualizing against a 0px viewport.
16
- */
17
- export declare const getMainSectionViewportWidth: ({ containerWidth, leftWidth, rightWidth, }: {
18
- containerWidth: number;
19
- leftWidth: number;
20
- rightWidth: number;
21
- }) => number | undefined;
22
- /**
23
- * Recalculate widths for all sections (left, right, main)
24
- * Returns both constrained widths (for display) and raw content widths (for scrolling)
25
- */
26
- export declare const recalculateAllSectionWidths: ({ headers, containerWidth, collapsedHeaders, }: {
27
- headers: HeaderObject[];
28
- containerWidth?: number;
29
- collapsedHeaders?: Set<string>;
30
- }) => {
31
- leftWidth: number;
32
- rightWidth: number;
33
- mainWidth: number;
34
- leftContentWidth: number;
35
- rightContentWidth: number;
36
- };
@@ -1,30 +0,0 @@
1
- import HeaderObject, { Accessor } from "../types/HeaderObject";
2
- import Row from "../types/Row";
3
- import RowState from "../types/RowState";
4
- import TableRow from "../types/TableRow";
5
- import { HeightOffsets } from "./infiniteScrollUtils";
6
- import { CustomTheme } from "../types/CustomTheme";
7
- import { GetRowId } from "../types/GetRowId";
8
- export interface FlattenRowsConfig {
9
- rows: Row[];
10
- rowGrouping?: Accessor[];
11
- getRowId?: GetRowId;
12
- expandedRows?: Map<string, number>;
13
- collapsedRows?: Map<string, number>;
14
- expandedDepths?: Set<number>;
15
- rowStateMap?: Map<string | number, RowState>;
16
- hasLoadingRenderer?: boolean;
17
- hasErrorRenderer?: boolean;
18
- hasEmptyRenderer?: boolean;
19
- headers?: HeaderObject[];
20
- rowHeight?: number;
21
- headerHeight?: number;
22
- customTheme?: CustomTheme;
23
- }
24
- export interface FlattenRowsResult {
25
- flattenedRows: TableRow[];
26
- heightOffsets: HeightOffsets;
27
- paginatableRows: TableRow[];
28
- parentEndPositions: number[];
29
- }
30
- export declare function flattenRows(config: FlattenRowsConfig): FlattenRowsResult;
@@ -1,65 +0,0 @@
1
- import { CumulativeHeightMap } from "./infiniteScrollUtils";
2
- import { Accessor } from "../types/HeaderObject";
3
- import TableRow from "../types/TableRow";
4
- import { HeightOffsets } from "./infiniteScrollUtils";
5
- import { CustomTheme } from "../types/CustomTheme";
6
- export interface ProcessRowsConfig {
7
- flattenedRows: TableRow[];
8
- paginatableRows: TableRow[];
9
- parentEndPositions: number[];
10
- currentPage: number;
11
- rowsPerPage: number;
12
- shouldPaginate: boolean;
13
- serverSidePagination: boolean;
14
- contentHeight: number | undefined;
15
- rowHeight: number;
16
- scrollTop: number;
17
- scrollDirection?: "up" | "down" | "none";
18
- heightOffsets?: HeightOffsets;
19
- customTheme: CustomTheme;
20
- enableStickyParents: boolean;
21
- rowGrouping?: Accessor[];
22
- }
23
- export interface ProcessRowsResult {
24
- currentTableRows: TableRow[];
25
- rowsToRender: TableRow[];
26
- /** Visible range start index into currentTableRows (when virtualized). */
27
- renderedStartIndex: number;
28
- /** Visible range end index into currentTableRows (when virtualized). */
29
- renderedEndIndex: number;
30
- stickyParents: TableRow[];
31
- regularRows: TableRow[];
32
- partiallyVisibleRows: TableRow[];
33
- paginatedHeightOffsets: HeightOffsets | undefined;
34
- heightMap: CumulativeHeightMap | undefined;
35
- /** Pre-pagination flattened rows (each row's `position` is its global index).
36
- * Used by animation snapshot to include off-page rows so cross-page sort can
37
- * FLIP cells in/out from off-screen. */
38
- allFlattenedRows: TableRow[];
39
- /** Global flattened-list index where the current page starts. 0 when no
40
- * pagination is active. Used by animation snapshot to convert global
41
- * positions into page-relative `top` values. */
42
- pageStartIndex: number;
43
- }
44
- export declare function processRows(config: ProcessRowsConfig): ProcessRowsResult;
45
- /** Layout inputs that do not depend on scroll position (reuse across scroll-raf frames). */
46
- export interface ProcessRowsScrollReuseBase {
47
- currentTableRows: TableRow[];
48
- paginatedHeightOffsets: HeightOffsets | undefined;
49
- heightMap: CumulativeHeightMap | undefined;
50
- allFlattenedRows: TableRow[];
51
- pageStartIndex: number;
52
- }
53
- /**
54
- * Recomputes only viewport-dependent fields when pagination, height map, and row list
55
- * are unchanged (vertical scroll only). Avoids re-running applyPagination and
56
- * buildCumulativeHeightMap on every scroll frame.
57
- */
58
- export declare function recomputeProcessRowsViewport(base: ProcessRowsScrollReuseBase, config: {
59
- contentHeight: number | undefined;
60
- rowHeight: number;
61
- scrollTop: number;
62
- scrollDirection?: "up" | "down" | "none";
63
- enableStickyParents: boolean;
64
- rowGrouping?: Accessor[];
65
- }): ProcessRowsResult;
@@ -1,62 +0,0 @@
1
- import Row from "../types/Row";
2
- import TableRow from "../types/TableRow";
3
- import HeaderObject from "../types/HeaderObject";
4
- import type { RowSelectionMode } from "../types/RowSelectionMode";
5
- /**
6
- * Whether the checkbox / row-buttons column should be injected into headers.
7
- * Always shown when `rowButtons` is set (buttons need a home).
8
- */
9
- export declare const shouldShowRowSelectionColumn: (config: {
10
- enableRowSelection?: boolean;
11
- showRowSelectionColumn?: boolean;
12
- rowButtons?: unknown[];
13
- }) => boolean;
14
- /**
15
- * Get the set of selected row IDs from an array of table rows
16
- */
17
- export declare const getSelectedRowIds: (tableRows: TableRow[]) => string[];
18
- /**
19
- * Check if a specific row is selected
20
- */
21
- export declare const isRowSelected: (rowId: string, selectedRows: Set<string>) => boolean;
22
- /**
23
- * Check if all rows are selected
24
- */
25
- export declare const areAllRowsSelected: (tableRows: TableRow[], selectedRows: Set<string>) => boolean;
26
- /**
27
- * Toggle selection of a single row (multiple mode).
28
- */
29
- export declare const toggleRowSelection: (rowId: string, selectedRows: Set<string>) => Set<string>;
30
- /**
31
- * Set whether a row is selected, respecting selection mode.
32
- */
33
- export declare const setRowSelected: (rowId: string, isSelected: boolean, selectedRows: Set<string>, mode?: RowSelectionMode) => Set<string>;
34
- /**
35
- * Select a range of visible rows (inclusive) by index into `tableRows`.
36
- * Used for Shift+arrow keyboard range selection in multiple mode.
37
- */
38
- export declare const selectRowRange: (tableRows: TableRow[], startIndex: number, endIndex: number, baseSelection?: Set<string>) => Set<string>;
39
- /**
40
- * Select all rows
41
- */
42
- export declare const selectAllRows: (tableRows: TableRow[]) => Set<string>;
43
- /**
44
- * Deselect all rows
45
- */
46
- export declare const deselectAllRows: () => Set<string>;
47
- /**
48
- * Get the selected rows from the table rows array
49
- */
50
- export declare const getSelectedRows: (tableRows: TableRow[], selectedRows: Set<string>) => Row[];
51
- /**
52
- * Find a row by its string row id in the current table rows.
53
- */
54
- export declare const findRowById: (tableRows: TableRow[], rowId: string) => Row | undefined;
55
- /**
56
- * Get the count of selected rows
57
- */
58
- export declare const getSelectedRowCount: (selectedRows: Set<string>) => number;
59
- /**
60
- * Create a selection header for the checkbox column
61
- */
62
- export declare const createSelectionHeader: (width: number) => HeaderObject;