@toolbox-web/grid 0.2.8 → 0.3.1

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 (273) hide show
  1. package/README.md +13 -13
  2. package/all.d.ts +25 -5659
  3. package/all.d.ts.map +1 -0
  4. package/all.js +524 -450
  5. package/all.js.map +1 -1
  6. package/index.d.ts +8 -2678
  7. package/index.d.ts.map +1 -0
  8. package/index.js +3929 -25
  9. package/index.js.map +1 -1
  10. package/lib/core/constants.d.ts +114 -0
  11. package/lib/core/constants.d.ts.map +1 -0
  12. package/lib/core/grid.d.ts +337 -0
  13. package/lib/core/grid.d.ts.map +1 -0
  14. package/lib/core/internal/aggregators.d.ts +67 -0
  15. package/lib/core/internal/aggregators.d.ts.map +1 -0
  16. package/lib/core/internal/column-state.d.ts +124 -0
  17. package/lib/core/internal/column-state.d.ts.map +1 -0
  18. package/lib/core/internal/columns.d.ts +107 -0
  19. package/lib/core/internal/columns.d.ts.map +1 -0
  20. package/lib/core/internal/dom-builder.d.ts +115 -0
  21. package/lib/core/internal/dom-builder.d.ts.map +1 -0
  22. package/lib/core/internal/editing.d.ts +76 -0
  23. package/lib/core/internal/editing.d.ts.map +1 -0
  24. package/lib/core/internal/editors.d.ts +8 -0
  25. package/lib/core/internal/editors.d.ts.map +1 -0
  26. package/lib/core/internal/event-delegation.d.ts +11 -0
  27. package/lib/core/internal/event-delegation.d.ts.map +1 -0
  28. package/lib/core/internal/grid-internals.d.ts +83 -0
  29. package/lib/core/internal/grid-internals.d.ts.map +1 -0
  30. package/lib/core/internal/header.d.ts +7 -0
  31. package/lib/core/internal/header.d.ts.map +1 -0
  32. package/lib/core/internal/idle-scheduler.d.ts +65 -0
  33. package/lib/core/internal/idle-scheduler.d.ts.map +1 -0
  34. package/lib/core/internal/inference.d.ts +12 -0
  35. package/lib/core/internal/inference.d.ts.map +1 -0
  36. package/lib/core/internal/keyboard.d.ts +18 -0
  37. package/lib/core/internal/keyboard.d.ts.map +1 -0
  38. package/lib/core/internal/resize.d.ts +3 -0
  39. package/lib/core/internal/resize.d.ts.map +1 -0
  40. package/lib/core/internal/rows.d.ts +35 -0
  41. package/lib/core/internal/rows.d.ts.map +1 -0
  42. package/lib/core/internal/sanitize.d.ts +13 -0
  43. package/lib/core/internal/sanitize.d.ts.map +1 -0
  44. package/lib/core/internal/shell.d.ts +228 -0
  45. package/lib/core/internal/shell.d.ts.map +1 -0
  46. package/lib/core/internal/sorting.d.ts +24 -0
  47. package/lib/core/internal/sorting.d.ts.map +1 -0
  48. package/lib/core/internal/touch-scroll.d.ts +54 -0
  49. package/lib/core/internal/touch-scroll.d.ts.map +1 -0
  50. package/lib/core/internal/utils.d.ts +38 -0
  51. package/lib/core/internal/utils.d.ts.map +1 -0
  52. package/lib/core/internal/virtualization.d.ts +66 -0
  53. package/lib/core/internal/virtualization.d.ts.map +1 -0
  54. package/lib/core/plugin/base-plugin.d.ts +616 -0
  55. package/lib/core/plugin/base-plugin.d.ts.map +1 -0
  56. package/lib/core/plugin/index.d.ts +11 -0
  57. package/lib/core/plugin/index.d.ts.map +1 -0
  58. package/lib/core/plugin/plugin-manager.d.ts +183 -0
  59. package/lib/core/plugin/plugin-manager.d.ts.map +1 -0
  60. package/lib/core/plugin/types.d.ts +196 -0
  61. package/lib/core/plugin/types.d.ts.map +1 -0
  62. package/lib/core/types.d.ts +841 -0
  63. package/lib/core/types.d.ts.map +1 -0
  64. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +46 -0
  65. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -0
  66. package/lib/plugins/clipboard/copy.d.ts +47 -0
  67. package/lib/plugins/clipboard/copy.d.ts.map +1 -0
  68. package/lib/plugins/clipboard/index.d.ts +7 -0
  69. package/lib/plugins/clipboard/index.d.ts.map +1 -0
  70. package/lib/plugins/clipboard/index.js.map +1 -1
  71. package/lib/plugins/clipboard/paste.d.ts +25 -0
  72. package/lib/plugins/clipboard/paste.d.ts.map +1 -0
  73. package/lib/plugins/clipboard/types.d.ts +40 -0
  74. package/lib/plugins/clipboard/types.d.ts.map +1 -0
  75. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +54 -0
  76. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -0
  77. package/lib/plugins/column-virtualization/column-virtualization.d.ts +53 -0
  78. package/lib/plugins/column-virtualization/column-virtualization.d.ts.map +1 -0
  79. package/lib/plugins/column-virtualization/index.d.ts +7 -0
  80. package/lib/plugins/column-virtualization/index.d.ts.map +1 -0
  81. package/lib/plugins/column-virtualization/index.js.map +1 -1
  82. package/lib/plugins/column-virtualization/types.d.ts +41 -0
  83. package/lib/plugins/column-virtualization/types.d.ts.map +1 -0
  84. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +52 -0
  85. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -0
  86. package/lib/plugins/context-menu/index.d.ts +7 -0
  87. package/lib/plugins/context-menu/index.d.ts.map +1 -0
  88. package/lib/plugins/context-menu/index.js +24 -24
  89. package/lib/plugins/context-menu/index.js.map +1 -1
  90. package/lib/plugins/context-menu/menu.d.ts +38 -0
  91. package/lib/plugins/context-menu/menu.d.ts.map +1 -0
  92. package/lib/plugins/context-menu/types.d.ts +77 -0
  93. package/lib/plugins/context-menu/types.d.ts.map +1 -0
  94. package/lib/plugins/export/ExportPlugin.d.ts +53 -0
  95. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -0
  96. package/lib/plugins/export/csv.d.ts +31 -0
  97. package/lib/plugins/export/csv.d.ts.map +1 -0
  98. package/lib/plugins/export/excel.d.ts +12 -0
  99. package/lib/plugins/export/excel.d.ts.map +1 -0
  100. package/lib/plugins/export/index.d.ts +7 -0
  101. package/lib/plugins/export/index.d.ts.map +1 -0
  102. package/lib/plugins/export/index.js.map +1 -1
  103. package/lib/plugins/export/types.d.ts +57 -0
  104. package/lib/plugins/export/types.d.ts.map +1 -0
  105. package/lib/plugins/filtering/FilteringPlugin.d.ts +128 -0
  106. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -0
  107. package/lib/plugins/filtering/filter-model.d.ts +38 -0
  108. package/lib/plugins/filtering/filter-model.d.ts.map +1 -0
  109. package/lib/plugins/filtering/index.d.ts +7 -0
  110. package/lib/plugins/filtering/index.d.ts.map +1 -0
  111. package/lib/plugins/filtering/index.js +5 -5
  112. package/lib/plugins/filtering/index.js.map +1 -1
  113. package/lib/plugins/filtering/types.d.ts +157 -0
  114. package/lib/plugins/filtering/types.d.ts.map +1 -0
  115. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +51 -0
  116. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -0
  117. package/lib/plugins/grouping-columns/grouping-columns.d.ts +41 -0
  118. package/lib/plugins/grouping-columns/grouping-columns.d.ts.map +1 -0
  119. package/lib/plugins/grouping-columns/index.d.ts +7 -0
  120. package/lib/plugins/grouping-columns/index.d.ts.map +1 -0
  121. package/lib/plugins/grouping-columns/index.js +58 -42
  122. package/lib/plugins/grouping-columns/index.js.map +1 -1
  123. package/lib/plugins/grouping-columns/types.d.ts +91 -0
  124. package/lib/plugins/grouping-columns/types.d.ts.map +1 -0
  125. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +120 -0
  126. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -0
  127. package/lib/plugins/grouping-rows/grouping-rows.d.ts +51 -0
  128. package/lib/plugins/grouping-rows/grouping-rows.d.ts.map +1 -0
  129. package/lib/plugins/grouping-rows/index.d.ts +7 -0
  130. package/lib/plugins/grouping-rows/index.d.ts.map +1 -0
  131. package/lib/plugins/grouping-rows/index.js +51 -51
  132. package/lib/plugins/grouping-rows/index.js.map +1 -1
  133. package/lib/plugins/grouping-rows/types.d.ts +95 -0
  134. package/lib/plugins/grouping-rows/types.d.ts.map +1 -0
  135. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +147 -0
  136. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -0
  137. package/lib/plugins/master-detail/index.d.ts +7 -0
  138. package/lib/plugins/master-detail/index.d.ts.map +1 -0
  139. package/lib/plugins/master-detail/index.js +235 -78
  140. package/lib/plugins/master-detail/index.js.map +1 -1
  141. package/lib/plugins/master-detail/master-detail.d.ts +30 -0
  142. package/lib/plugins/master-detail/master-detail.d.ts.map +1 -0
  143. package/lib/plugins/master-detail/types.d.ts +40 -0
  144. package/lib/plugins/master-detail/types.d.ts.map +1 -0
  145. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +58 -0
  146. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -0
  147. package/lib/plugins/multi-sort/index.d.ts +7 -0
  148. package/lib/plugins/multi-sort/index.d.ts.map +1 -0
  149. package/lib/plugins/multi-sort/index.js.map +1 -1
  150. package/lib/plugins/multi-sort/multi-sort.d.ts +51 -0
  151. package/lib/plugins/multi-sort/multi-sort.d.ts.map +1 -0
  152. package/lib/plugins/multi-sort/types.d.ts +25 -0
  153. package/lib/plugins/multi-sort/types.d.ts.map +1 -0
  154. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +58 -0
  155. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -0
  156. package/lib/plugins/pinned-columns/index.d.ts +7 -0
  157. package/lib/plugins/pinned-columns/index.d.ts.map +1 -0
  158. package/lib/plugins/pinned-columns/index.js.map +1 -1
  159. package/lib/plugins/pinned-columns/pinned-columns.d.ts +62 -0
  160. package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +1 -0
  161. package/lib/plugins/pinned-columns/types.d.ts +20 -0
  162. package/lib/plugins/pinned-columns/types.d.ts.map +1 -0
  163. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +64 -0
  164. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -0
  165. package/lib/plugins/pinned-rows/index.d.ts +7 -0
  166. package/lib/plugins/pinned-rows/index.d.ts.map +1 -0
  167. package/lib/plugins/pinned-rows/index.js +1 -1
  168. package/lib/plugins/pinned-rows/index.js.map +1 -1
  169. package/lib/plugins/pinned-rows/pinned-rows.d.ts +43 -0
  170. package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +1 -0
  171. package/lib/plugins/pinned-rows/types.d.ts +95 -0
  172. package/lib/plugins/pinned-rows/types.d.ts.map +1 -0
  173. package/lib/plugins/pivot/PivotPlugin.d.ts +94 -0
  174. package/lib/plugins/pivot/PivotPlugin.d.ts.map +1 -0
  175. package/lib/plugins/pivot/index.d.ts +7 -0
  176. package/lib/plugins/pivot/index.d.ts.map +1 -0
  177. package/lib/plugins/pivot/index.js.map +1 -1
  178. package/lib/plugins/pivot/pivot-engine.d.ts +50 -0
  179. package/lib/plugins/pivot/pivot-engine.d.ts.map +1 -0
  180. package/lib/plugins/pivot/pivot-model.d.ts +6 -0
  181. package/lib/plugins/pivot/pivot-model.d.ts.map +1 -0
  182. package/lib/plugins/pivot/pivot-panel.d.ts +25 -0
  183. package/lib/plugins/pivot/pivot-panel.d.ts.map +1 -0
  184. package/lib/plugins/pivot/pivot-rows.d.ts +33 -0
  185. package/lib/plugins/pivot/pivot-rows.d.ts.map +1 -0
  186. package/lib/plugins/pivot/types.d.ts +62 -0
  187. package/lib/plugins/pivot/types.d.ts.map +1 -0
  188. package/lib/plugins/reorder/ReorderPlugin.d.ts +81 -0
  189. package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -0
  190. package/lib/plugins/reorder/column-drag.d.ts +41 -0
  191. package/lib/plugins/reorder/column-drag.d.ts.map +1 -0
  192. package/lib/plugins/reorder/index.d.ts +7 -0
  193. package/lib/plugins/reorder/index.d.ts.map +1 -0
  194. package/lib/plugins/reorder/index.js +51 -48
  195. package/lib/plugins/reorder/index.js.map +1 -1
  196. package/lib/plugins/reorder/types.d.ts +54 -0
  197. package/lib/plugins/reorder/types.d.ts.map +1 -0
  198. package/lib/plugins/selection/SelectionPlugin.d.ts +77 -0
  199. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -0
  200. package/lib/plugins/selection/index.d.ts +8 -0
  201. package/lib/plugins/selection/index.d.ts.map +1 -0
  202. package/lib/plugins/selection/index.js +86 -75
  203. package/lib/plugins/selection/index.js.map +1 -1
  204. package/lib/plugins/selection/range-selection.d.ts +109 -0
  205. package/lib/plugins/selection/range-selection.d.ts.map +1 -0
  206. package/lib/plugins/selection/row-selection.d.ts +48 -0
  207. package/lib/plugins/selection/row-selection.d.ts.map +1 -0
  208. package/lib/plugins/selection/types.d.ts +80 -0
  209. package/lib/plugins/selection/types.d.ts.map +1 -0
  210. package/lib/plugins/server-side/ServerSidePlugin.d.ts +56 -0
  211. package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +1 -0
  212. package/lib/plugins/server-side/cache.d.ts +14 -0
  213. package/lib/plugins/server-side/cache.d.ts.map +1 -0
  214. package/lib/plugins/server-side/datasource.d.ts +12 -0
  215. package/lib/plugins/server-side/datasource.d.ts.map +1 -0
  216. package/lib/plugins/server-side/index.d.ts +7 -0
  217. package/lib/plugins/server-side/index.d.ts.map +1 -0
  218. package/lib/plugins/server-side/index.js.map +1 -1
  219. package/lib/plugins/server-side/types.d.ts +43 -0
  220. package/lib/plugins/server-side/types.d.ts.map +1 -0
  221. package/lib/plugins/tree/TreePlugin.d.ts +49 -0
  222. package/lib/plugins/tree/TreePlugin.d.ts.map +1 -0
  223. package/lib/plugins/tree/index.d.ts +8 -0
  224. package/lib/plugins/tree/index.d.ts.map +1 -0
  225. package/lib/plugins/tree/index.js.map +1 -1
  226. package/lib/plugins/tree/tree-data.d.ts +42 -0
  227. package/lib/plugins/tree/tree-data.d.ts.map +1 -0
  228. package/lib/plugins/tree/tree-detect.d.ts +24 -0
  229. package/lib/plugins/tree/tree-detect.d.ts.map +1 -0
  230. package/lib/plugins/tree/types.d.ts +61 -0
  231. package/lib/plugins/tree/types.d.ts.map +1 -0
  232. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +68 -0
  233. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -0
  234. package/lib/plugins/undo-redo/history.d.ts +64 -0
  235. package/lib/plugins/undo-redo/history.d.ts.map +1 -0
  236. package/lib/plugins/undo-redo/index.d.ts +7 -0
  237. package/lib/plugins/undo-redo/index.d.ts.map +1 -0
  238. package/lib/plugins/undo-redo/index.js.map +1 -1
  239. package/lib/plugins/undo-redo/types.d.ts +41 -0
  240. package/lib/plugins/undo-redo/types.d.ts.map +1 -0
  241. package/lib/plugins/visibility/VisibilityPlugin.d.ts +135 -0
  242. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -0
  243. package/lib/plugins/visibility/index.d.ts +8 -0
  244. package/lib/plugins/visibility/index.d.ts.map +1 -0
  245. package/lib/plugins/visibility/index.js.map +1 -1
  246. package/lib/plugins/visibility/types.d.ts +33 -0
  247. package/lib/plugins/visibility/types.d.ts.map +1 -0
  248. package/lib/plugins/visibility/visibility.d.ts +30 -0
  249. package/lib/plugins/visibility/visibility.d.ts.map +1 -0
  250. package/package.json +6 -2
  251. package/public.d.ts +52 -0
  252. package/public.d.ts.map +1 -0
  253. package/umd/grid.all.umd.js +32 -74
  254. package/umd/grid.all.umd.js.map +1 -1
  255. package/umd/grid.umd.js +22 -64
  256. package/umd/grid.umd.js.map +1 -1
  257. package/umd/plugins/context-menu.umd.js +1 -1
  258. package/umd/plugins/context-menu.umd.js.map +1 -1
  259. package/umd/plugins/filtering.umd.js +1 -1
  260. package/umd/plugins/filtering.umd.js.map +1 -1
  261. package/umd/plugins/grouping-columns.umd.js +1 -1
  262. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  263. package/umd/plugins/grouping-rows.umd.js +1 -1
  264. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  265. package/umd/plugins/master-detail.umd.js +1 -1
  266. package/umd/plugins/master-detail.umd.js.map +1 -1
  267. package/umd/plugins/pinned-rows.umd.js +1 -1
  268. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  269. package/umd/plugins/pivot.umd.js.map +1 -1
  270. package/umd/plugins/selection.umd.js +1 -1
  271. package/umd/plugins/selection.umd.js.map +1 -1
  272. package/index-YjW60MHD.js +0 -3235
  273. package/index-YjW60MHD.js.map +0 -1
@@ -0,0 +1,107 @@
1
+ import { ColumnConfig, ColumnInternal, InternalGrid } from '../types';
2
+ /**
3
+ * Parse `<tbw-grid-column>` elements from the host light DOM into column config objects,
4
+ * capturing template elements for later cloning / compilation.
5
+ */
6
+ export declare function parseLightDomColumns(host: HTMLElement): ColumnInternal[];
7
+ /**
8
+ * Merge programmatic columns with light DOM columns by field name, allowing DOM-provided
9
+ * attributes / templates to supplement (not overwrite) programmatic definitions.
10
+ * Any DOM columns without a programmatic counterpart are appended.
11
+ */
12
+ export declare function mergeColumns(programmatic: ColumnConfig[] | undefined, dom: ColumnConfig[] | undefined): ColumnInternal[];
13
+ /**
14
+ * Safely add a token to an element's `part` attribute (supporting the CSS ::part API)
15
+ * without duplicating values. Falls back to string manipulation if `el.part` API isn't present.
16
+ */
17
+ export declare function addPart(el: HTMLElement, token: string): void;
18
+ /**
19
+ * Resolve the effective column list for the grid by combining:
20
+ * 1. Programmatic columns (`grid._columns`)
21
+ * 2. Light DOM `<tbw-grid-column>` definitions (cached)
22
+ * 3. Inferred columns (if none provided)
23
+ * Also compiles inline template expressions into fast functions.
24
+ * Columns with `hidden: true` in config are added to hidden tracking.
25
+ */
26
+ export declare function getColumnConfiguration(grid: InternalGrid): void;
27
+ /**
28
+ * Measure rendered header + visible cell content to assign initial pixel widths
29
+ * to columns when in `content` fit mode. Runs only once unless fit mode changes.
30
+ */
31
+ export declare function autoSizeColumns(grid: InternalGrid): void;
32
+ /**
33
+ * Compute and apply the CSS grid template string that drives column layout.
34
+ * Uses `fr` units for flexible (non user-resized) columns in stretch mode, otherwise
35
+ * explicit pixel widths or auto sizing.
36
+ */
37
+ export declare function updateTemplate(grid: InternalGrid): void;
38
+ /**
39
+ * Set the visibility of a column.
40
+ * @param grid - The grid instance
41
+ * @param field - The field name of the column
42
+ * @param visible - Whether the column should be visible
43
+ * @param callbacks - Grid callbacks for triggering setup/state changes
44
+ * @returns True if visibility was changed, false if column not found or locked
45
+ */
46
+ export declare function setColumnVisible<T>(grid: InternalGrid<T>, field: string, visible: boolean, callbacks: {
47
+ setup: () => void;
48
+ requestStateChange: () => void;
49
+ }): boolean;
50
+ /**
51
+ * Toggle the visibility of a column.
52
+ * @param grid - The grid instance
53
+ * @param field - The field name of the column
54
+ * @param callbacks - Grid callbacks for triggering setup/state changes
55
+ * @returns True if visibility was toggled, false if column not found or locked
56
+ */
57
+ export declare function toggleColumnVisibility<T>(grid: InternalGrid<T>, field: string, callbacks: {
58
+ setup: () => void;
59
+ requestStateChange: () => void;
60
+ }): boolean;
61
+ /**
62
+ * Check if a column is currently visible.
63
+ * @param grid - The grid instance
64
+ * @param field - The field name of the column
65
+ * @returns True if visible, false if hidden or not found
66
+ */
67
+ export declare function isColumnVisible<T>(grid: InternalGrid<T>, field: string): boolean;
68
+ /**
69
+ * Show all columns.
70
+ * @param grid - The grid instance
71
+ * @param callbacks - Grid callbacks for triggering setup/state changes
72
+ */
73
+ export declare function showAllColumns<T>(grid: InternalGrid<T>, callbacks: {
74
+ setup: () => void;
75
+ requestStateChange: () => void;
76
+ }): void;
77
+ /**
78
+ * Get list of all column fields (including hidden).
79
+ * Returns columns reflecting current display order (after reordering).
80
+ * Hidden columns are interleaved at their original relative positions.
81
+ * @param grid - The grid instance
82
+ * @returns Array of all field names with their visibility status
83
+ */
84
+ export declare function getAllColumns<T>(grid: InternalGrid<T>): Array<{
85
+ field: string;
86
+ header: string;
87
+ visible: boolean;
88
+ lockVisible?: boolean;
89
+ }>;
90
+ /**
91
+ * Reorder columns according to the specified field order.
92
+ * This directly updates _columns in place without going through processColumns.
93
+ * @param grid - The grid instance
94
+ * @param order - Array of field names in the desired order
95
+ * @param callbacks - Grid callbacks for triggering re-render
96
+ */
97
+ export declare function setColumnOrder<T>(grid: InternalGrid<T>, order: string[], callbacks: {
98
+ renderHeader: () => void;
99
+ refreshVirtualWindow: (full: boolean) => void;
100
+ }): void;
101
+ /**
102
+ * Get the current column order as an array of field names.
103
+ * @param grid - The grid instance
104
+ * @returns Array of field names in display order
105
+ */
106
+ export declare function getColumnOrder<T>(grid: InternalGrid<T>): string[];
107
+ //# sourceMappingURL=columns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK3E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,cAAc,EAAE,CA8ExE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,YAAY,EAAE,YAAY,EAAE,GAAG,SAAS,EACxC,GAAG,EAAE,YAAY,EAAE,GAAG,SAAS,GAC9B,cAAc,EAAE,CA6BlB;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAS5D;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAqB/D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CA4BxD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CA0BvD;AAeD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,IAAI,CAAC;IAAC,kBAAkB,EAAE,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M,EAAE,CAEjE"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * DOM Builder - Direct DOM construction for performance.
3
+ *
4
+ * Using direct DOM APIs instead of innerHTML is significantly faster:
5
+ * - No HTML parsing by the browser
6
+ * - No template string concatenation
7
+ * - Immediate element creation without serialization/deserialization
8
+ *
9
+ * Benchmark: DOM construction is ~2-3x faster than innerHTML for complex structures.
10
+ */
11
+ /**
12
+ * Create an element with attributes and optional children.
13
+ * Optimized helper that avoids repeated function calls.
14
+ */
15
+ export declare function createElement<K extends keyof HTMLElementTagNameMap>(tag: K, attrs?: Record<string, string>, children?: (Node | string | null | undefined)[]): HTMLElementTagNameMap[K];
16
+ /**
17
+ * Create a text node (shorthand).
18
+ */
19
+ export declare function text(content: string): Text;
20
+ /**
21
+ * Create an element with class (common pattern).
22
+ */
23
+ export declare function div(className?: string, attrs?: Record<string, string>): HTMLDivElement;
24
+ /**
25
+ * Create a button element.
26
+ */
27
+ export declare function button(className?: string, attrs?: Record<string, string>, content?: string | Node): HTMLButtonElement;
28
+ /**
29
+ * Create a slot element for light DOM projection.
30
+ */
31
+ export declare function slot(name?: string): HTMLSlotElement;
32
+ /**
33
+ * Append multiple children to a parent element.
34
+ */
35
+ export declare function appendChildren(parent: Element, children: (Node | null | undefined)[]): void;
36
+ /**
37
+ * Set multiple attributes on an element.
38
+ */
39
+ export declare function setAttrs(el: Element, attrs: Record<string, string | undefined>): void;
40
+ /**
41
+ * Clone the grid content structure.
42
+ * Using template cloning is faster than createElement for nested structures.
43
+ */
44
+ export declare function cloneGridContent(): DocumentFragment;
45
+ /**
46
+ * Build the grid root structure using direct DOM construction.
47
+ * This is called once per grid instance during initial render.
48
+ */
49
+ export interface GridDOMOptions {
50
+ hasShell: boolean;
51
+ /** Shell header element (pre-built) */
52
+ shellHeader?: Element;
53
+ /** Shell body element with tool panel (pre-built) */
54
+ shellBody?: Element;
55
+ }
56
+ /**
57
+ * Build the complete grid DOM structure.
58
+ * Returns a DocumentFragment ready to be appended to shadow root.
59
+ */
60
+ export declare function buildGridDOM(options: GridDOMOptions): DocumentFragment;
61
+ /**
62
+ * Build shell header using direct DOM construction.
63
+ */
64
+ export interface ShellHeaderOptions {
65
+ title?: string;
66
+ hasLightDomButtons: boolean;
67
+ hasPanels: boolean;
68
+ isPanelOpen: boolean;
69
+ toolPanelIcon: string;
70
+ /** Config toolbar buttons (pre-sorted by order) */
71
+ configButtons: Array<{
72
+ id: string;
73
+ label: string;
74
+ icon?: string;
75
+ disabled?: boolean;
76
+ hasElement?: boolean;
77
+ hasRender?: boolean;
78
+ action?: () => void;
79
+ }>;
80
+ /** API toolbar buttons (pre-sorted by order) */
81
+ apiButtons: Array<{
82
+ id: string;
83
+ label: string;
84
+ icon?: string;
85
+ disabled?: boolean;
86
+ hasElement?: boolean;
87
+ hasRender?: boolean;
88
+ action?: () => void;
89
+ }>;
90
+ }
91
+ /**
92
+ * Build shell header element directly without innerHTML.
93
+ */
94
+ export declare function buildShellHeader(options: ShellHeaderOptions): HTMLDivElement;
95
+ /**
96
+ * Build shell body (grid content + optional tool panel).
97
+ */
98
+ export interface ShellBodyOptions {
99
+ position: 'left' | 'right';
100
+ isPanelOpen: boolean;
101
+ expandIcon: string;
102
+ collapseIcon: string;
103
+ /** Sorted panels for accordion */
104
+ panels: Array<{
105
+ id: string;
106
+ title: string;
107
+ icon?: string;
108
+ isExpanded: boolean;
109
+ }>;
110
+ }
111
+ /**
112
+ * Build shell body element directly without innerHTML.
113
+ */
114
+ export declare function buildShellBody(options: ShellBodyOptions): HTMLDivElement;
115
+ //# sourceMappingURL=dom-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-builder.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/dom-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,GAAG,EAAE,CAAC,EACN,KAAK,CA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,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,CA2FxE"}
@@ -0,0 +1,76 @@
1
+ import { ColumnConfig, InternalGrid } from '../types';
2
+ /**
3
+ * CSS selector for focusable editor elements within a cell.
4
+ * Used by multiple modules to find and focus the active editor.
5
+ */
6
+ export declare const FOCUSABLE_EDITOR_SELECTOR = "input,select,textarea,[contenteditable=\"true\"],[contenteditable=\"\"],[tabindex]:not([tabindex=\"-1\"])";
7
+ /**
8
+ * Check if a row element has any cells in editing mode.
9
+ * Uses a cached count on the row element for O(1) lookup instead of querySelector.
10
+ */
11
+ export declare function hasEditingCells(rowEl: HTMLElement): boolean;
12
+ /**
13
+ * Clear all editing state from a row element.
14
+ * Called when the row is recycled or fully re-rendered.
15
+ */
16
+ export declare function clearEditingState(rowEl: HTMLElement): void;
17
+ /**
18
+ * Snapshot original row data and mark the row as actively being edited.
19
+ */
20
+ export declare function startRowEdit(grid: InternalGrid, rowIndex: number, rowData: any): void;
21
+ /**
22
+ * Finish editing for a row. If `revert` is true restore original snapshot and clear change marks.
23
+ * Otherwise emit a row-commit event describing change status.
24
+ */
25
+ export declare function exitRowEdit(grid: InternalGrid, rowIndex: number, revert: boolean): void;
26
+ /**
27
+ * Commit a single cell value change, updating the row object, marking the row as changed (first-time flag),
28
+ * and emitting a `cell-commit` event with row + field metadata.
29
+ */
30
+ export declare function commitCellValue(grid: InternalGrid, rowIndex: number, column: ColumnConfig<any>, newValue: any, rowData: any): void;
31
+ /**
32
+ * Replace a cell's content with an editor resolved from column configuration (custom editor, template, external
33
+ * mount spec or default editor by type). Manages commit / cancel lifecycle and value restoration.
34
+ *
35
+ * @param skipFocus - When true, don't auto-focus the editor. Used when creating multiple editors
36
+ * at once (e.g., beginBulkEdit) so the caller can control focus.
37
+ */
38
+ export declare function inlineEnterEdit(grid: InternalGrid, rowData: any, rowIndex: number, column: ColumnConfig<any>, cell: HTMLElement, skipFocus?: boolean): void;
39
+ /**
40
+ * Get all changed rows from the grid.
41
+ * @param grid - The grid instance
42
+ * @returns Array of changed row data objects
43
+ */
44
+ export declare function getChangedRows<T>(grid: InternalGrid<T>): T[];
45
+ /**
46
+ * Get indices of all changed rows.
47
+ * @param grid - The grid instance
48
+ * @returns Array of row indices that have been modified
49
+ */
50
+ export declare function getChangedRowIndices(grid: InternalGrid): number[];
51
+ /**
52
+ * Reset all changed row markers.
53
+ * @param grid - The grid instance
54
+ * @param silent - If true, don't emit the reset event
55
+ */
56
+ export declare function resetChangedRows<T>(grid: InternalGrid<T>, silent?: boolean): void;
57
+ /**
58
+ * Begin bulk editing for a row. Enters edit mode on all editable cells.
59
+ * @param grid - The grid instance
60
+ * @param rowIndex - The row index to start editing
61
+ * @param callbacks - Grid callbacks for finding row elements
62
+ */
63
+ export declare function beginBulkEdit<T>(grid: InternalGrid<T>, rowIndex: number, callbacks: {
64
+ findRenderedRowElement: (rowIndex: number) => HTMLElement | null;
65
+ }): void;
66
+ /**
67
+ * Commit the currently active row edit.
68
+ * @param grid - The grid instance
69
+ */
70
+ export declare function commitActiveRowEdit(grid: InternalGrid): void;
71
+ /**
72
+ * Cancel the currently active row edit, reverting to original values.
73
+ * @param grid - The grid instance
74
+ */
75
+ export declare function cancelActiveRowEdit(grid: InternalGrid): void;
76
+ //# sourceMappingURL=editing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/editing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI3D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,8GACiE,CAAC;AAWxG;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAE3D;AAwBD;;;GAGG;AACH,wBAAgB,i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AAW,GAAG,IAAI,CAAA;CAAE,GAC9E,IAAI,CA6CN;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAI5D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAI5D"}
@@ -0,0 +1,8 @@
1
+ import { ColumnConfig, EditorContext } from '../types';
2
+ /**
3
+ * Returns a default editor factory function for the given column type.
4
+ * Each editor handles commit on blur/Enter, and cancel on Escape.
5
+ * Note: Focus is NOT called here - the calling code handles focusing after DOM insertion.
6
+ */
7
+ export declare function defaultEditorFor(column: ColumnConfig<any>): (ctx: EditorContext) => HTMLElement | string;
8
+ //# sourceMappingURL=editors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editors.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/editors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,WAAW,GAAG,MAAM,CAiFxG"}
@@ -0,0 +1,11 @@
1
+ import { InternalGrid } from '../types';
2
+ /**
3
+ * Set up delegated event listeners on the grid body.
4
+ * Call once during grid initialization.
5
+ *
6
+ * @param grid - The grid instance
7
+ * @param bodyEl - The .rows element containing all data rows
8
+ * @param signal - AbortSignal for cleanup
9
+ */
10
+ export declare function setupCellEventDelegation(grid: InternalGrid, bodyEl: HTMLElement, signal: AbortSignal): void;
11
+ //# sourceMappingURL=event-delegation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-delegation.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/event-delegation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,UAAU,CAAC;AA6J3D;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAmF3G"}
@@ -0,0 +1,83 @@
1
+ import { BaseGridPlugin } from '../plugin';
2
+ import { ColumnInternal, GridConfig, InternalGrid } from '../types';
3
+ /**
4
+ * Callback interface for grid operations that modules need to trigger.
5
+ * These are provided by the grid to modules so they can trigger re-renders,
6
+ * emit events, etc. without direct coupling.
7
+ */
8
+ export interface GridCallbacks<T = any> {
9
+ /** Emit a custom event from the grid element */
10
+ emit: (eventName: string, detail: any) => void;
11
+ /** Trigger full grid setup (re-parse columns, re-render) */
12
+ setup: () => void;
13
+ /** Refresh the virtual window (re-render visible rows) */
14
+ refreshVirtualWindow: (full: boolean) => void;
15
+ /** Update CSS grid template for column widths */
16
+ updateTemplate: () => void;
17
+ /** Render the header row */
18
+ renderHeader: () => void;
19
+ /** Get array of attached plugins */
20
+ getPlugins: () => BaseGridPlugin[];
21
+ /** Find rendered row element by index */
22
+ findRenderedRowElement: (rowIndex: number) => HTMLElement | null;
23
+ }
24
+ /**
25
+ * Interface for internal grid state access.
26
+ *
27
+ * Extracted modules (columns.ts, column-state.ts, editing.ts, shell.ts) receive
28
+ * this interface instead of the full Grid class. This:
29
+ * 1. Makes dependencies explicit
30
+ * 2. Enables tree-shaking (modules don't depend on entire Grid)
31
+ * 3. Improves testability (can mock this interface)
32
+ */
33
+ export interface GridInternals<T = any> {
34
+ /** The merged effective config - single source of truth */
35
+ effectiveConfig: GridConfig<T>;
36
+ /** All columns including hidden */
37
+ _columns: ColumnInternal<T>[];
38
+ /** Visible columns only (computed from _columns) */
39
+ readonly _visibleColumns: ColumnInternal<T>[];
40
+ /** Processed rows (after plugin hooks) */
41
+ _rows: T[];
42
+ /** Source rows before processing */
43
+ readonly sourceRows: T[];
44
+ /** Currently active edit row index (-1 if none) */
45
+ _activeEditRows: number;
46
+ /** Snapshots of row data before editing started */
47
+ _rowEditSnapshots: Map<number, T>;
48
+ /** Set of row indices that have been modified */
49
+ _changedRowIndices: Set<number>;
50
+ /** Currently focused row index */
51
+ _focusRow: number;
52
+ /** Currently focused column index */
53
+ _focusCol: number;
54
+ /** Current sort state */
55
+ _sortState: {
56
+ field: string;
57
+ direction: 1 | -1;
58
+ } | null;
59
+ /** Shadow root of the grid element */
60
+ readonly shadowRoot: ShadowRoot | null;
61
+ /** Header row element */
62
+ readonly _headerRowEl: HTMLElement;
63
+ /** Body container element (holds rendered rows) */
64
+ readonly _bodyEl: HTMLElement;
65
+ /** Row element pool for virtualization */
66
+ _rowPool: HTMLElement[];
67
+ /** Epoch counter for row rendering (incremented on structural changes) */
68
+ __rowRenderEpoch: number;
69
+ /** Grid operation callbacks */
70
+ readonly _callbacks: GridCallbacks<T>;
71
+ }
72
+ /**
73
+ * Create a GridInternals adapter from an InternalGrid instance.
74
+ *
75
+ * This function bridges the gap between the full grid and the minimal interface
76
+ * that extracted modules need. Call this in grid.ts to create the adapter once.
77
+ *
78
+ * @param grid - The full grid instance
79
+ * @param callbacks - Callbacks for grid operations
80
+ * @returns GridInternals interface backed by the grid
81
+ */
82
+ export declare function createGridInternals<T>(grid: InternalGrid<T>, callbacks: GridCallbacks<T>): GridInternals<T>;
83
+ //# sourceMappingURL=grid-internals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid-internals.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/grid-internals.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG;IACpC,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AS,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;KAAE,GAAG,IAAI,CAAC;IAGxD,sCAAsC;IACtC,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC,yBAAyB;IACzB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,EAAE,CAAC;IAGxB,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,CAAC;IAGzB,+BAA+B;IAC/B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACvC;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAgG3G"}
@@ -0,0 +1,7 @@
1
+ import { InternalGrid } from '../types';
2
+ /**
3
+ * Rebuild the header row DOM based on current column configuration, attaching
4
+ * sorting and resize affordances where enabled.
5
+ */
6
+ export declare function renderHeader(grid: InternalGrid): void;
7
+ //# sourceMappingURL=header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/header.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,UAAU,CAAC;AAiBtE;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CA2FrD"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Idle Scheduler - Defer non-critical work to browser idle periods.
3
+ *
4
+ * Uses requestIdleCallback where available, with fallback to setTimeout.
5
+ * This allows the main thread to remain responsive during startup.
6
+ */
7
+ /**
8
+ * IdleDeadline-compatible interface for fallback.
9
+ */
10
+ interface IdleDeadlineLike {
11
+ didTimeout: boolean;
12
+ timeRemaining(): number;
13
+ }
14
+ /**
15
+ * Schedule work to run during browser idle time.
16
+ * Falls back to setTimeout(0) if requestIdleCallback is not available.
17
+ *
18
+ * @param callback - Work to run when idle
19
+ * @param options - Optional timeout configuration
20
+ * @returns Handle for cancellation
21
+ */
22
+ export declare function scheduleIdle(callback: (deadline: IdleDeadlineLike) => void, options?: {
23
+ timeout?: number;
24
+ }): number;
25
+ /**
26
+ * Cancel a scheduled idle callback.
27
+ */
28
+ export declare function cancelIdle(handle: number): void;
29
+ /**
30
+ * Deferred work queue that runs tasks during idle periods.
31
+ * Groups related work and processes in priority order.
32
+ */
33
+ export declare class IdleQueue {
34
+ private tasks;
35
+ private scheduled;
36
+ private handle;
37
+ /**
38
+ * Add a task to the queue.
39
+ * @param fn - Function to execute
40
+ * @param priority - Priority (lower = run sooner). Default 10.
41
+ */
42
+ add(fn: () => void, priority?: number): void;
43
+ /**
44
+ * Process tasks until we run out of time or tasks.
45
+ */
46
+ private process;
47
+ /**
48
+ * Cancel all pending tasks.
49
+ */
50
+ cancel(): void;
51
+ /**
52
+ * Check if the queue is empty.
53
+ */
54
+ get isEmpty(): boolean;
55
+ }
56
+ /**
57
+ * Get the global idle queue (creates if needed).
58
+ */
59
+ export declare function getIdleQueue(): IdleQueue;
60
+ /**
61
+ * Schedule work to run during idle time using the global queue.
62
+ */
63
+ export declare function deferToIdle(fn: () => void, priority?: number): void;
64
+ export {};
65
+ //# sourceMappingURL=idle-scheduler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idle-scheduler.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/idle-scheduler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;GAEG;AACH,UAAU,gBAAgB;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,IAAI,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAanH;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAM/C;AAUD;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAuB;IAErC;;;;OAIG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,QAAQ,SAAK,GAAG,IAAI;IASxC;;OAEG;IACH,OAAO,CAAC,OAAO;IAyBf;;OAEG;IACH,MAAM,IAAI,IAAI;IASd;;OAEG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;CACF;AAOD;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAKxC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,QAAQ,SAAK,GAAG,IAAI,CAE/D"}
@@ -0,0 +1,12 @@
1
+ import { ColumnConfigMap, InferredColumnResult, PrimitiveColumnType } from '../types';
2
+ /**
3
+ * Best-effort primitive type inference for a cell value used during automatic column generation.
4
+ */
5
+ declare function inferType(value: any): PrimitiveColumnType;
6
+ /**
7
+ * Derive column definitions from provided configuration or by inspecting the first row of data.
8
+ * Returns both the resolved column array and a field->type map.
9
+ */
10
+ export declare function inferColumns<TRow extends Record<string, unknown>>(rows: TRow[], provided?: ColumnConfigMap<TRow>): InferredColumnResult<TRow>;
11
+ export { inferType };
12
+ //# sourceMappingURL=inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/inference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC3F;;GAEG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,mBAAmB,CAOlD;AACD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,IAAI,EAAE,IAAI,EAAE,EACZ,QAAQ,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,GAC/B,oBAAoB,CAAC,IAAI,CAAC,CAmB5B;AACD,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { InternalGrid } from '../types';
2
+ export declare function handleGridKeyDown(grid: InternalGrid, e: KeyboardEvent): void;
3
+ /**
4
+ * Options for ensureCellVisible to control scroll behavior.
5
+ */
6
+ interface EnsureCellVisibleOptions {
7
+ /** Force scroll to the leftmost position (for Home key) */
8
+ forceScrollLeft?: boolean;
9
+ /** Force scroll to the rightmost position (for End key) */
10
+ forceScrollRight?: boolean;
11
+ }
12
+ /**
13
+ * Scroll the viewport (virtualized or static) so the focused cell's row is visible
14
+ * and apply visual focus styling / tabindex management.
15
+ */
16
+ export declare function ensureCellVisible(grid: InternalGrid, options?: EnsureCellVisibleOptions): void;
17
+ export {};
18
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/keyboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,GAAG,IAAI,CA0H5E;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,IAAI,CA2F9F"}
@@ -0,0 +1,3 @@
1
+ import { InternalGrid, ResizeController } from '../types';
2
+ export declare function createResizeController(grid: InternalGrid): ResizeController;
3
+ //# sourceMappingURL=resize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/resize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE/D,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAmF3E"}
@@ -0,0 +1,35 @@
1
+ import { InternalGrid } from '../types';
2
+ /** Callback type for plugin row rendering hook */
3
+ export type RenderRowHook = (row: any, rowEl: HTMLElement, rowIndex: number) => boolean;
4
+ /**
5
+ * Create a row element from template. Significantly faster than createElement + setAttribute.
6
+ */
7
+ export declare function createRowFromTemplate(): HTMLDivElement;
8
+ /**
9
+ * Pre-compute display values for a range of rows.
10
+ * Call this after rows change to warm the cache for visible + overscan rows.
11
+ */
12
+ export declare function precomputeCellCache(grid: InternalGrid, startRow: number, endRow: number, epoch: number | undefined): void;
13
+ /**
14
+ * Invalidate the cell cache (call when rows or columns change).
15
+ */
16
+ export declare function invalidateCellCache(grid: InternalGrid): void;
17
+ /**
18
+ * Render / patch the visible window of rows [start, end) using a recyclable DOM pool.
19
+ * Newly required row elements are created and appended; excess are detached.
20
+ * Uses an epoch counter to force full row rebuilds when structural changes (like columns) occur.
21
+ * @param renderRowHook - Optional callback that plugins can use to render custom rows (e.g., group rows).
22
+ * If it returns true, default rendering is skipped for that row.
23
+ */
24
+ export declare function renderVisibleRows(grid: InternalGrid, start: number, end: number, epoch?: number, renderRowHook?: RenderRowHook): void;
25
+ /**
26
+ * Full reconstruction of a row's set of cells including templated, external view, and formatted content.
27
+ * Attaches event handlers for editing and accessibility per cell.
28
+ */
29
+ export declare function renderInlineRow(grid: InternalGrid, rowEl: HTMLElement, rowData: any, rowIndex: number): void;
30
+ /**
31
+ * Handle click / double click interaction to focus cells and optionally start row editing
32
+ * according to the grid's configured edit activation mode.
33
+ */
34
+ export declare function handleRowClick(grid: InternalGrid, e: MouseEvent, rowEl: HTMLElement, isDbl: boolean): void;
35
+ //# sourceMappingURL=rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,UAAU,CAAC;AAY3D,kDAAkD;AAClD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AA2BxF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,cAAc,CAEtD;AAuFD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,IAAI,CAYN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAI5D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,aAAa,GAC5B,IAAI,CAyLN;AA6ID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CA0J5G;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CA8G1G"}
@@ -0,0 +1,13 @@
1
+ import { EvalContext } from '../types';
2
+ /**
3
+ * Sanitize an HTML string by removing dangerous tags and attributes.
4
+ * This is a defense-in-depth measure for content rendered via innerHTML.
5
+ *
6
+ * @param html - Raw HTML string to sanitize
7
+ * @returns Sanitized HTML string safe for innerHTML
8
+ */
9
+ export declare function sanitizeHTML(html: string): string;
10
+ export declare function evalTemplateString(raw: string, ctx: EvalContext): string;
11
+ export declare function finalCellScrub(cell: HTMLElement): void;
12
+ export declare function compileTemplate(raw: string): (ctx: EvalContext) => string;
13
+ //# sourceMappingURL=sanitize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/core/internal/sanitize.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAwD5C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYjD;AAiED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,MAAM,CAgBxE;AAqCD,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAetD;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,SAExB,WAAW,YAO7B"}