@toolbox-web/grid 1.24.1 → 1.25.0

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 (422) hide show
  1. package/all.d.ts +0 -1
  2. package/all.js +2 -2
  3. package/all.js.map +1 -1
  4. package/index.d.ts +0 -1
  5. package/index.js +1 -1
  6. package/index.js.map +1 -1
  7. package/lib/core/constants.d.ts +0 -1
  8. package/lib/core/grid.d.ts +145 -33
  9. package/lib/core/internal/aggregators.d.ts +0 -1
  10. package/lib/core/internal/aria.d.ts +8 -1
  11. package/lib/core/internal/columns.d.ts +3 -4
  12. package/lib/core/internal/config-manager.d.ts +2 -54
  13. package/lib/core/internal/dom-builder.d.ts +0 -1
  14. package/lib/core/internal/event-delegation.d.ts +3 -4
  15. package/lib/core/internal/feature-hook.d.ts +0 -1
  16. package/lib/core/internal/focus-manager.d.ts +49 -0
  17. package/lib/core/internal/header.d.ts +2 -3
  18. package/lib/core/internal/idle-scheduler.d.ts +0 -1
  19. package/lib/core/internal/inference.d.ts +0 -1
  20. package/lib/core/internal/keyboard.d.ts +3 -4
  21. package/lib/core/internal/loading.d.ts +0 -1
  22. package/lib/core/internal/render-scheduler.d.ts +3 -66
  23. package/lib/core/internal/resize.d.ts +2 -3
  24. package/lib/core/internal/row-animation.d.ts +0 -1
  25. package/lib/core/internal/row-manager.d.ts +31 -0
  26. package/lib/core/internal/rows.d.ts +4 -5
  27. package/lib/core/internal/sanitize.d.ts +0 -1
  28. package/lib/core/internal/shell.d.ts +7 -25
  29. package/lib/core/internal/sorting.d.ts +3 -4
  30. package/lib/core/internal/style-injector.d.ts +0 -1
  31. package/lib/core/internal/touch-scroll.d.ts +31 -12
  32. package/lib/core/internal/utils.d.ts +8 -1
  33. package/lib/core/internal/validate-config.d.ts +4 -5
  34. package/lib/core/internal/virtualization-manager.d.ts +48 -0
  35. package/lib/core/internal/virtualization.d.ts +0 -1
  36. package/lib/core/plugin/base-plugin.d.ts +2 -3
  37. package/lib/core/plugin/expander-column.d.ts +0 -1
  38. package/lib/core/plugin/index.d.ts +0 -1
  39. package/lib/core/plugin/plugin-manager.d.ts +2 -1
  40. package/lib/core/plugin/types.d.ts +7 -2
  41. package/lib/core/styles/index.d.ts +0 -1
  42. package/lib/core/types.d.ts +364 -54
  43. package/lib/features/clipboard.d.ts +0 -1
  44. package/lib/features/column-virtualization.d.ts +0 -1
  45. package/lib/features/context-menu.d.ts +0 -1
  46. package/lib/features/editing.d.ts +0 -1
  47. package/lib/features/export.d.ts +0 -1
  48. package/lib/features/filtering.d.ts +0 -1
  49. package/lib/features/grouping-columns.d.ts +0 -1
  50. package/lib/features/grouping-rows.d.ts +0 -1
  51. package/lib/features/master-detail.d.ts +0 -1
  52. package/lib/features/multi-sort.d.ts +1 -2
  53. package/lib/features/multi-sort.js.map +1 -1
  54. package/lib/features/pinned-columns.d.ts +0 -1
  55. package/lib/features/pinned-rows.d.ts +0 -1
  56. package/lib/features/pivot.d.ts +0 -1
  57. package/lib/features/print.d.ts +0 -1
  58. package/lib/features/registry.d.ts +0 -1
  59. package/lib/features/reorder-columns.d.ts +1 -2
  60. package/lib/features/reorder-columns.js.map +1 -1
  61. package/lib/features/reorder-rows.d.ts +1 -2
  62. package/lib/features/reorder-rows.js.map +1 -1
  63. package/lib/features/responsive.d.ts +0 -1
  64. package/lib/features/selection.d.ts +0 -1
  65. package/lib/features/server-side.d.ts +0 -1
  66. package/lib/features/tree.d.ts +0 -1
  67. package/lib/features/undo-redo.d.ts +0 -1
  68. package/lib/features/visibility.d.ts +0 -1
  69. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +0 -1
  70. package/lib/plugins/clipboard/copy.d.ts +0 -1
  71. package/lib/plugins/clipboard/index.d.ts +0 -1
  72. package/lib/plugins/clipboard/index.js +1 -1
  73. package/lib/plugins/clipboard/index.js.map +1 -1
  74. package/lib/plugins/clipboard/paste.d.ts +0 -1
  75. package/lib/plugins/clipboard/types.d.ts +6 -1
  76. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +0 -1
  77. package/lib/plugins/column-virtualization/column-virtualization.d.ts +0 -1
  78. package/lib/plugins/column-virtualization/index.d.ts +0 -1
  79. package/lib/plugins/column-virtualization/index.js +1 -1
  80. package/lib/plugins/column-virtualization/index.js.map +1 -1
  81. package/lib/plugins/column-virtualization/types.d.ts +0 -1
  82. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +16 -1
  83. package/lib/plugins/context-menu/index.d.ts +1 -2
  84. package/lib/plugins/context-menu/index.js +1 -1
  85. package/lib/plugins/context-menu/index.js.map +1 -1
  86. package/lib/plugins/context-menu/menu.d.ts +14 -1
  87. package/lib/plugins/context-menu/types.d.ts +13 -3
  88. package/lib/plugins/editing/EditingPlugin.d.ts +4 -6
  89. package/lib/plugins/editing/editors.d.ts +0 -1
  90. package/lib/plugins/editing/index.d.ts +0 -1
  91. package/lib/plugins/editing/index.js +1 -1
  92. package/lib/plugins/editing/index.js.map +1 -1
  93. package/lib/plugins/editing/internal/cell-validation.d.ts +0 -1
  94. package/lib/plugins/editing/internal/dirty-tracking-manager.d.ts +0 -1
  95. package/lib/plugins/editing/internal/dirty-tracking.d.ts +2 -2
  96. package/lib/plugins/editing/internal/editor-injection.d.ts +3 -4
  97. package/lib/plugins/editing/internal/helpers.d.ts +0 -1
  98. package/lib/plugins/editing/types.d.ts +15 -14
  99. package/lib/plugins/export/ExportPlugin.d.ts +0 -1
  100. package/lib/plugins/export/csv.d.ts +0 -1
  101. package/lib/plugins/export/excel.d.ts +0 -1
  102. package/lib/plugins/export/index.d.ts +0 -1
  103. package/lib/plugins/export/index.js +1 -1
  104. package/lib/plugins/export/index.js.map +1 -1
  105. package/lib/plugins/export/types.d.ts +4 -1
  106. package/lib/plugins/filtering/FilteringPlugin.d.ts +0 -1
  107. package/lib/plugins/filtering/filter-model.d.ts +0 -1
  108. package/lib/plugins/filtering/filter-panel-date.d.ts +0 -1
  109. package/lib/plugins/filtering/filter-panel-default.d.ts +0 -1
  110. package/lib/plugins/filtering/filter-panel-number.d.ts +0 -1
  111. package/lib/plugins/filtering/index.d.ts +0 -1
  112. package/lib/plugins/filtering/index.js +1 -1
  113. package/lib/plugins/filtering/index.js.map +1 -1
  114. package/lib/plugins/filtering/types.d.ts +4 -1
  115. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +0 -1
  116. package/lib/plugins/grouping-columns/grouping-columns.d.ts +2 -3
  117. package/lib/plugins/grouping-columns/index.d.ts +1 -2
  118. package/lib/plugins/grouping-columns/index.js +1 -1
  119. package/lib/plugins/grouping-columns/index.js.map +1 -1
  120. package/lib/plugins/grouping-columns/types.d.ts +33 -7
  121. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +0 -1
  122. package/lib/plugins/grouping-rows/grouping-rows.d.ts +0 -1
  123. package/lib/plugins/grouping-rows/index.d.ts +0 -1
  124. package/lib/plugins/grouping-rows/index.js +1 -1
  125. package/lib/plugins/grouping-rows/index.js.map +1 -1
  126. package/lib/plugins/grouping-rows/types.d.ts +4 -1
  127. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +0 -1
  128. package/lib/plugins/master-detail/index.d.ts +0 -1
  129. package/lib/plugins/master-detail/index.js +1 -1
  130. package/lib/plugins/master-detail/index.js.map +1 -1
  131. package/lib/plugins/master-detail/master-detail.d.ts +0 -1
  132. package/lib/plugins/master-detail/types.d.ts +4 -1
  133. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +3 -3
  134. package/lib/plugins/multi-sort/index.d.ts +1 -2
  135. package/lib/plugins/multi-sort/index.js +1 -1
  136. package/lib/plugins/multi-sort/index.js.map +1 -1
  137. package/lib/plugins/multi-sort/multi-sort.d.ts +0 -1
  138. package/lib/plugins/multi-sort/types.d.ts +5 -1
  139. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +0 -1
  140. package/lib/plugins/pinned-columns/index.d.ts +0 -1
  141. package/lib/plugins/pinned-columns/index.js +1 -1
  142. package/lib/plugins/pinned-columns/index.js.map +1 -1
  143. package/lib/plugins/pinned-columns/pinned-columns.d.ts +0 -1
  144. package/lib/plugins/pinned-columns/types.d.ts +0 -1
  145. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +0 -1
  146. package/lib/plugins/pinned-rows/index.d.ts +0 -1
  147. package/lib/plugins/pinned-rows/index.js +1 -1
  148. package/lib/plugins/pinned-rows/index.js.map +1 -1
  149. package/lib/plugins/pinned-rows/pinned-rows.d.ts +0 -1
  150. package/lib/plugins/pinned-rows/types.d.ts +0 -1
  151. package/lib/plugins/pivot/PivotPlugin.d.ts +0 -1
  152. package/lib/plugins/pivot/index.d.ts +0 -1
  153. package/lib/plugins/pivot/index.js +1 -1
  154. package/lib/plugins/pivot/index.js.map +1 -1
  155. package/lib/plugins/pivot/pivot-engine.d.ts +0 -1
  156. package/lib/plugins/pivot/pivot-model.d.ts +0 -1
  157. package/lib/plugins/pivot/pivot-panel.d.ts +0 -1
  158. package/lib/plugins/pivot/pivot-rows.d.ts +0 -1
  159. package/lib/plugins/pivot/types.d.ts +0 -1
  160. package/lib/plugins/print/PrintPlugin.d.ts +0 -1
  161. package/lib/plugins/print/index.d.ts +0 -1
  162. package/lib/plugins/print/index.js +1 -1
  163. package/lib/plugins/print/index.js.map +1 -1
  164. package/lib/plugins/print/print-isolated.d.ts +0 -1
  165. package/lib/plugins/print/types.d.ts +6 -1
  166. package/lib/plugins/reorder-columns/ReorderPlugin.d.ts +5 -5
  167. package/lib/plugins/reorder-columns/column-drag.d.ts +3 -2
  168. package/lib/plugins/reorder-columns/index.d.ts +0 -1
  169. package/lib/plugins/reorder-columns/index.js +1 -1
  170. package/lib/plugins/reorder-columns/index.js.map +1 -1
  171. package/lib/plugins/reorder-columns/types.d.ts +4 -1
  172. package/lib/plugins/reorder-rows/RowReorderPlugin.d.ts +3 -3
  173. package/lib/plugins/reorder-rows/index.d.ts +0 -1
  174. package/lib/plugins/reorder-rows/index.js +1 -1
  175. package/lib/plugins/reorder-rows/index.js.map +1 -1
  176. package/lib/plugins/reorder-rows/types.d.ts +4 -1
  177. package/lib/plugins/responsive/ResponsivePlugin.d.ts +0 -1
  178. package/lib/plugins/responsive/index.d.ts +0 -1
  179. package/lib/plugins/responsive/index.js +1 -1
  180. package/lib/plugins/responsive/index.js.map +1 -1
  181. package/lib/plugins/responsive/types.d.ts +4 -1
  182. package/lib/plugins/selection/SelectionPlugin.d.ts +1 -3
  183. package/lib/plugins/selection/index.d.ts +0 -1
  184. package/lib/plugins/selection/index.js +1 -1
  185. package/lib/plugins/selection/index.js.map +1 -1
  186. package/lib/plugins/selection/range-selection.d.ts +0 -1
  187. package/lib/plugins/selection/row-selection.d.ts +0 -1
  188. package/lib/plugins/selection/types.d.ts +4 -1
  189. package/lib/plugins/server-side/ServerSidePlugin.d.ts +0 -1
  190. package/lib/plugins/server-side/cache.d.ts +0 -1
  191. package/lib/plugins/server-side/datasource.d.ts +0 -1
  192. package/lib/plugins/server-side/index.d.ts +0 -1
  193. package/lib/plugins/server-side/index.js +1 -1
  194. package/lib/plugins/server-side/index.js.map +1 -1
  195. package/lib/plugins/server-side/types.d.ts +0 -1
  196. package/lib/plugins/shared/data-collection.d.ts +0 -1
  197. package/lib/plugins/tree/TreePlugin.d.ts +0 -1
  198. package/lib/plugins/tree/index.d.ts +0 -1
  199. package/lib/plugins/tree/index.js +1 -1
  200. package/lib/plugins/tree/index.js.map +1 -1
  201. package/lib/plugins/tree/tree-data.d.ts +0 -1
  202. package/lib/plugins/tree/tree-detect.d.ts +0 -1
  203. package/lib/plugins/tree/types.d.ts +4 -1
  204. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +1 -2
  205. package/lib/plugins/undo-redo/history.d.ts +0 -1
  206. package/lib/plugins/undo-redo/index.d.ts +0 -1
  207. package/lib/plugins/undo-redo/index.js +1 -1
  208. package/lib/plugins/undo-redo/index.js.map +1 -1
  209. package/lib/plugins/undo-redo/types.d.ts +6 -1
  210. package/lib/plugins/visibility/VisibilityPlugin.d.ts +0 -1
  211. package/lib/plugins/visibility/index.d.ts +0 -1
  212. package/lib/plugins/visibility/index.js +1 -1
  213. package/lib/plugins/visibility/index.js.map +1 -1
  214. package/lib/plugins/visibility/types.d.ts +0 -1
  215. package/lib/plugins/visibility/visibility.d.ts +0 -1
  216. package/package.json +1 -1
  217. package/public.d.ts +31 -12
  218. package/umd/grid.all.umd.js +1 -1
  219. package/umd/grid.all.umd.js.map +1 -1
  220. package/umd/grid.umd.js +1 -1
  221. package/umd/grid.umd.js.map +1 -1
  222. package/umd/plugins/clipboard.umd.js +1 -1
  223. package/umd/plugins/clipboard.umd.js.map +1 -1
  224. package/umd/plugins/column-virtualization.umd.js +1 -1
  225. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  226. package/umd/plugins/context-menu.umd.js +1 -1
  227. package/umd/plugins/context-menu.umd.js.map +1 -1
  228. package/umd/plugins/editing.umd.js +1 -1
  229. package/umd/plugins/editing.umd.js.map +1 -1
  230. package/umd/plugins/filtering.umd.js +1 -1
  231. package/umd/plugins/filtering.umd.js.map +1 -1
  232. package/umd/plugins/grouping-columns.umd.js +1 -1
  233. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  234. package/umd/plugins/master-detail.umd.js +1 -1
  235. package/umd/plugins/master-detail.umd.js.map +1 -1
  236. package/umd/plugins/multi-sort.umd.js +1 -1
  237. package/umd/plugins/multi-sort.umd.js.map +1 -1
  238. package/umd/plugins/pinned-columns.umd.js +1 -1
  239. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  240. package/umd/plugins/pinned-rows.umd.js +1 -1
  241. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  242. package/umd/plugins/print.umd.js +1 -1
  243. package/umd/plugins/print.umd.js.map +1 -1
  244. package/umd/plugins/reorder-columns.umd.js +1 -1
  245. package/umd/plugins/reorder-columns.umd.js.map +1 -1
  246. package/umd/plugins/reorder-rows.umd.js +1 -1
  247. package/umd/plugins/reorder-rows.umd.js.map +1 -1
  248. package/umd/plugins/responsive.umd.js +1 -1
  249. package/umd/plugins/responsive.umd.js.map +1 -1
  250. package/umd/plugins/selection.umd.js +1 -1
  251. package/umd/plugins/selection.umd.js.map +1 -1
  252. package/umd/plugins/server-side.umd.js.map +1 -1
  253. package/umd/plugins/tree.umd.js +1 -1
  254. package/umd/plugins/tree.umd.js.map +1 -1
  255. package/umd/plugins/undo-redo.umd.js.map +1 -1
  256. package/umd/plugins/visibility.umd.js +1 -1
  257. package/umd/plugins/visibility.umd.js.map +1 -1
  258. package/all.d.ts.map +0 -1
  259. package/index.d.ts.map +0 -1
  260. package/lib/core/constants.d.ts.map +0 -1
  261. package/lib/core/grid.d.ts.map +0 -1
  262. package/lib/core/internal/aggregators.d.ts.map +0 -1
  263. package/lib/core/internal/aria.d.ts.map +0 -1
  264. package/lib/core/internal/columns.d.ts.map +0 -1
  265. package/lib/core/internal/config-manager.d.ts.map +0 -1
  266. package/lib/core/internal/dom-builder.d.ts.map +0 -1
  267. package/lib/core/internal/event-delegation.d.ts.map +0 -1
  268. package/lib/core/internal/feature-hook.d.ts.map +0 -1
  269. package/lib/core/internal/header.d.ts.map +0 -1
  270. package/lib/core/internal/idle-scheduler.d.ts.map +0 -1
  271. package/lib/core/internal/inference.d.ts.map +0 -1
  272. package/lib/core/internal/keyboard.d.ts.map +0 -1
  273. package/lib/core/internal/loading.d.ts.map +0 -1
  274. package/lib/core/internal/render-scheduler.d.ts.map +0 -1
  275. package/lib/core/internal/resize.d.ts.map +0 -1
  276. package/lib/core/internal/row-animation.d.ts.map +0 -1
  277. package/lib/core/internal/rows.d.ts.map +0 -1
  278. package/lib/core/internal/sanitize.d.ts.map +0 -1
  279. package/lib/core/internal/shell.d.ts.map +0 -1
  280. package/lib/core/internal/sorting.d.ts.map +0 -1
  281. package/lib/core/internal/style-injector.d.ts.map +0 -1
  282. package/lib/core/internal/touch-scroll.d.ts.map +0 -1
  283. package/lib/core/internal/utils.d.ts.map +0 -1
  284. package/lib/core/internal/validate-config.d.ts.map +0 -1
  285. package/lib/core/internal/virtualization.d.ts.map +0 -1
  286. package/lib/core/plugin/base-plugin.d.ts.map +0 -1
  287. package/lib/core/plugin/expander-column.d.ts.map +0 -1
  288. package/lib/core/plugin/index.d.ts.map +0 -1
  289. package/lib/core/plugin/plugin-manager.d.ts.map +0 -1
  290. package/lib/core/plugin/types.d.ts.map +0 -1
  291. package/lib/core/styles/index.d.ts.map +0 -1
  292. package/lib/core/types.d.ts.map +0 -1
  293. package/lib/features/clipboard.d.ts.map +0 -1
  294. package/lib/features/column-virtualization.d.ts.map +0 -1
  295. package/lib/features/context-menu.d.ts.map +0 -1
  296. package/lib/features/editing.d.ts.map +0 -1
  297. package/lib/features/export.d.ts.map +0 -1
  298. package/lib/features/filtering.d.ts.map +0 -1
  299. package/lib/features/grouping-columns.d.ts.map +0 -1
  300. package/lib/features/grouping-rows.d.ts.map +0 -1
  301. package/lib/features/magic-string.es-CkyDP9Ir.mjs.map +0 -1
  302. package/lib/features/master-detail.d.ts.map +0 -1
  303. package/lib/features/multi-sort.d.ts.map +0 -1
  304. package/lib/features/pinned-columns.d.ts.map +0 -1
  305. package/lib/features/pinned-rows.d.ts.map +0 -1
  306. package/lib/features/pivot.d.ts.map +0 -1
  307. package/lib/features/print.d.ts.map +0 -1
  308. package/lib/features/registry.d.ts.map +0 -1
  309. package/lib/features/registry.spec.js +0 -5
  310. package/lib/features/registry.spec.js.map +0 -1
  311. package/lib/features/reorder-columns.d.ts.map +0 -1
  312. package/lib/features/reorder-rows.d.ts.map +0 -1
  313. package/lib/features/responsive.d.ts.map +0 -1
  314. package/lib/features/selection.d.ts.map +0 -1
  315. package/lib/features/server-side.d.ts.map +0 -1
  316. package/lib/features/tree.d.ts.map +0 -1
  317. package/lib/features/undo-redo.d.ts.map +0 -1
  318. package/lib/features/visibility.d.ts.map +0 -1
  319. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +0 -1
  320. package/lib/plugins/clipboard/copy.d.ts.map +0 -1
  321. package/lib/plugins/clipboard/index.d.ts.map +0 -1
  322. package/lib/plugins/clipboard/paste.d.ts.map +0 -1
  323. package/lib/plugins/clipboard/types.d.ts.map +0 -1
  324. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +0 -1
  325. package/lib/plugins/column-virtualization/column-virtualization.d.ts.map +0 -1
  326. package/lib/plugins/column-virtualization/index.d.ts.map +0 -1
  327. package/lib/plugins/column-virtualization/types.d.ts.map +0 -1
  328. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +0 -1
  329. package/lib/plugins/context-menu/index.d.ts.map +0 -1
  330. package/lib/plugins/context-menu/menu.d.ts.map +0 -1
  331. package/lib/plugins/context-menu/types.d.ts.map +0 -1
  332. package/lib/plugins/editing/EditingPlugin.d.ts.map +0 -1
  333. package/lib/plugins/editing/editors.d.ts.map +0 -1
  334. package/lib/plugins/editing/index.d.ts.map +0 -1
  335. package/lib/plugins/editing/internal/cell-validation.d.ts.map +0 -1
  336. package/lib/plugins/editing/internal/dirty-tracking-manager.d.ts.map +0 -1
  337. package/lib/plugins/editing/internal/dirty-tracking.d.ts.map +0 -1
  338. package/lib/plugins/editing/internal/editor-injection.d.ts.map +0 -1
  339. package/lib/plugins/editing/internal/helpers.d.ts.map +0 -1
  340. package/lib/plugins/editing/types.d.ts.map +0 -1
  341. package/lib/plugins/export/ExportPlugin.d.ts.map +0 -1
  342. package/lib/plugins/export/csv.d.ts.map +0 -1
  343. package/lib/plugins/export/excel.d.ts.map +0 -1
  344. package/lib/plugins/export/index.d.ts.map +0 -1
  345. package/lib/plugins/export/types.d.ts.map +0 -1
  346. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +0 -1
  347. package/lib/plugins/filtering/filter-model.d.ts.map +0 -1
  348. package/lib/plugins/filtering/filter-panel-date.d.ts.map +0 -1
  349. package/lib/plugins/filtering/filter-panel-default.d.ts.map +0 -1
  350. package/lib/plugins/filtering/filter-panel-number.d.ts.map +0 -1
  351. package/lib/plugins/filtering/index.d.ts.map +0 -1
  352. package/lib/plugins/filtering/types.d.ts.map +0 -1
  353. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +0 -1
  354. package/lib/plugins/grouping-columns/grouping-columns.d.ts.map +0 -1
  355. package/lib/plugins/grouping-columns/index.d.ts.map +0 -1
  356. package/lib/plugins/grouping-columns/types.d.ts.map +0 -1
  357. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +0 -1
  358. package/lib/plugins/grouping-rows/grouping-rows.d.ts.map +0 -1
  359. package/lib/plugins/grouping-rows/index.d.ts.map +0 -1
  360. package/lib/plugins/grouping-rows/types.d.ts.map +0 -1
  361. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +0 -1
  362. package/lib/plugins/master-detail/index.d.ts.map +0 -1
  363. package/lib/plugins/master-detail/master-detail.d.ts.map +0 -1
  364. package/lib/plugins/master-detail/types.d.ts.map +0 -1
  365. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +0 -1
  366. package/lib/plugins/multi-sort/index.d.ts.map +0 -1
  367. package/lib/plugins/multi-sort/multi-sort.d.ts.map +0 -1
  368. package/lib/plugins/multi-sort/types.d.ts.map +0 -1
  369. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +0 -1
  370. package/lib/plugins/pinned-columns/index.d.ts.map +0 -1
  371. package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +0 -1
  372. package/lib/plugins/pinned-columns/types.d.ts.map +0 -1
  373. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +0 -1
  374. package/lib/plugins/pinned-rows/index.d.ts.map +0 -1
  375. package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +0 -1
  376. package/lib/plugins/pinned-rows/types.d.ts.map +0 -1
  377. package/lib/plugins/pivot/PivotPlugin.d.ts.map +0 -1
  378. package/lib/plugins/pivot/index.d.ts.map +0 -1
  379. package/lib/plugins/pivot/pivot-engine.d.ts.map +0 -1
  380. package/lib/plugins/pivot/pivot-model.d.ts.map +0 -1
  381. package/lib/plugins/pivot/pivot-panel.d.ts.map +0 -1
  382. package/lib/plugins/pivot/pivot-rows.d.ts.map +0 -1
  383. package/lib/plugins/pivot/types.d.ts.map +0 -1
  384. package/lib/plugins/print/PrintPlugin.d.ts.map +0 -1
  385. package/lib/plugins/print/index.d.ts.map +0 -1
  386. package/lib/plugins/print/print-isolated.d.ts.map +0 -1
  387. package/lib/plugins/print/types.d.ts.map +0 -1
  388. package/lib/plugins/reorder-columns/ReorderPlugin.d.ts.map +0 -1
  389. package/lib/plugins/reorder-columns/column-drag.d.ts.map +0 -1
  390. package/lib/plugins/reorder-columns/index.d.ts.map +0 -1
  391. package/lib/plugins/reorder-columns/types.d.ts.map +0 -1
  392. package/lib/plugins/reorder-rows/RowReorderPlugin.d.ts.map +0 -1
  393. package/lib/plugins/reorder-rows/index.d.ts.map +0 -1
  394. package/lib/plugins/reorder-rows/types.d.ts.map +0 -1
  395. package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +0 -1
  396. package/lib/plugins/responsive/index.d.ts.map +0 -1
  397. package/lib/plugins/responsive/types.d.ts.map +0 -1
  398. package/lib/plugins/selection/SelectionPlugin.d.ts.map +0 -1
  399. package/lib/plugins/selection/index.d.ts.map +0 -1
  400. package/lib/plugins/selection/range-selection.d.ts.map +0 -1
  401. package/lib/plugins/selection/row-selection.d.ts.map +0 -1
  402. package/lib/plugins/selection/types.d.ts.map +0 -1
  403. package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +0 -1
  404. package/lib/plugins/server-side/cache.d.ts.map +0 -1
  405. package/lib/plugins/server-side/datasource.d.ts.map +0 -1
  406. package/lib/plugins/server-side/index.d.ts.map +0 -1
  407. package/lib/plugins/server-side/types.d.ts.map +0 -1
  408. package/lib/plugins/shared/data-collection.d.ts.map +0 -1
  409. package/lib/plugins/tree/TreePlugin.d.ts.map +0 -1
  410. package/lib/plugins/tree/index.d.ts.map +0 -1
  411. package/lib/plugins/tree/tree-data.d.ts.map +0 -1
  412. package/lib/plugins/tree/tree-detect.d.ts.map +0 -1
  413. package/lib/plugins/tree/types.d.ts.map +0 -1
  414. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +0 -1
  415. package/lib/plugins/undo-redo/history.d.ts.map +0 -1
  416. package/lib/plugins/undo-redo/index.d.ts.map +0 -1
  417. package/lib/plugins/undo-redo/types.d.ts.map +0 -1
  418. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +0 -1
  419. package/lib/plugins/visibility/index.d.ts.map +0 -1
  420. package/lib/plugins/visibility/types.d.ts.map +0 -1
  421. package/lib/plugins/visibility/visibility.d.ts.map +0 -1
  422. package/public.d.ts.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { ShellState } from './internal/shell';
1
2
  import { RowPosition } from './internal/virtualization';
2
3
  import { PluginQuery } from './plugin/base-plugin';
3
4
  import { AfterCellRenderContext, AfterRowRenderContext, CellMouseEvent } from './plugin/types';
@@ -22,7 +23,7 @@ export type RowPositionEntry = RowPosition;
22
23
  * // Query existing grid
23
24
  * const grid = document.querySelector('tbw-grid') as DataGridElement<Employee>;
24
25
  * grid.rows = employees;
25
- * grid.addEventListener('cell-click', (e) => console.log(e.detail));
26
+ * grid.on('cell-click', (detail) => console.log(detail));
26
27
  *
27
28
  * // Create grid programmatically
28
29
  * import { createGrid } from '@toolbox-web/grid';
@@ -382,6 +383,13 @@ export interface PublicGrid<T = any> {
382
383
  * @category Plugin Development
383
384
  */
384
385
  export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
386
+ /** The element's `id` attribute. Available because DataGridElement extends HTMLElement. */
387
+ id: string;
388
+ /**
389
+ * The grid's host HTMLElement (`this`). Use instead of casting `grid as unknown as HTMLElement`.
390
+ * @internal
391
+ */
392
+ readonly _hostElement: HTMLElement;
385
393
  querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
386
394
  querySelector<E extends Element = Element>(selectors: string): E | null;
387
395
  querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
@@ -431,9 +439,13 @@ export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
431
439
  changedRows?: T[];
432
440
  /** Get IDs of all changed rows. Injected by EditingPlugin. */
433
441
  changedRowIds?: string[];
442
+ /** Internal Set for O(1) lookup in the render hot path. Injected by EditingPlugin. @internal */
443
+ _changedRowIdSet?: ReadonlySet<string>;
434
444
  effectiveConfig?: GridConfig<T>;
435
445
  findHeaderRow?: () => HTMLElement;
436
446
  refreshVirtualWindow: (full: boolean, skipAfterRender?: boolean) => boolean;
447
+ /** @internal Trigger a COLUMNS-phase re-render. */
448
+ refreshColumns?: () => void;
437
449
  updateTemplate?: () => void;
438
450
  findRenderedRowElement?: (rowIndex: number) => HTMLElement | null;
439
451
  /** Get a row by its ID. Implemented in grid.ts */
@@ -462,7 +474,7 @@ export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
462
474
  /** Dispatch row click to plugin system, returns true if handled */
463
475
  _dispatchRowClick?: (event: MouseEvent, rowIndex: number, row: any, rowEl: HTMLElement) => boolean;
464
476
  /** Dispatch header click to plugin system, returns true if handled */
465
- _dispatchHeaderClick?: (event: MouseEvent, col: ColumnConfig, headerEl: HTMLElement) => boolean;
477
+ _dispatchHeaderClick?: (event: MouseEvent | KeyboardEvent, col: ColumnConfig, headerEl: HTMLElement) => boolean;
466
478
  /** Dispatch keydown to plugin system, returns true if handled */
467
479
  _dispatchKeyDown?: (event: KeyboardEvent) => boolean;
468
480
  /** Dispatch cell mouse events for drag operations. Returns true if any plugin started a drag. */
@@ -489,7 +501,48 @@ export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
489
501
  queryPlugins?: <T>(query: PluginQuery) => T[];
490
502
  /** Request emission of column-state-change event (debounced) */
491
503
  requestStateChange?: () => void;
504
+ /** @internal */ _renderVisibleRows(start: number, end: number, epoch?: number): void;
505
+ /** @internal */ _updateAriaCounts(totalRows: number, totalCols: number): void;
506
+ /** @internal */ _requestSchedulerPhase(phase: number, source: string): void;
507
+ /** @internal */ _rebuildRowIdMap(): void;
508
+ /** @internal */ _emitDataChange(): void;
509
+ /** @internal */ _getPluginExtraHeight(): number;
510
+ /** @internal */ _getPluginRowHeight(row: T, index: number): number | undefined;
511
+ /** @internal */ _getPluginExtraHeightBefore(start: number): number;
512
+ /** @internal */ _adjustPluginVirtualStart(start: number, scrollTop: number, rowHeight: number): number | undefined;
513
+ /** @internal */ _afterPluginRender(): void;
514
+ /** @internal */ _emitPluginEvent(event: string, detail: unknown): void;
515
+ /** @internal */ _schedulerMergeConfig(): void;
516
+ /** @internal */ _schedulerProcessColumns(): void;
517
+ /** @internal */ _schedulerProcessRows(): void;
518
+ /** @internal */ _schedulerRenderHeader(): void;
519
+ /** @internal */ _schedulerUpdateTemplate(): void;
520
+ /** @internal */ _schedulerAfterRender(): void;
521
+ /** @internal */ readonly _schedulerIsConnected: boolean;
522
+ /** @internal The render root element for DOM queries. */
523
+ readonly _renderRoot: Element;
524
+ /** @internal Emit a custom event from the grid. */
525
+ _emit(eventName: string, detail: unknown): void;
526
+ /** @internal Get accordion expand/collapse icons from effective config. */
527
+ readonly _accordionIcons: {
528
+ expand: IconValue;
529
+ collapse: IconValue;
530
+ };
531
+ /** @internal Shell state for config manager shell merging. */
532
+ readonly _shellState: ShellState;
533
+ /** @internal Clear the row pool and body element. */
534
+ _clearRowPool(): void;
535
+ /** @internal Run grid setup (DOM rebuild). */
536
+ _setup(): void;
537
+ /** @internal Apply animation configuration to host element. */
538
+ _applyAnimationConfig(config: GridConfig): void;
492
539
  }
540
+ /**
541
+ * Grid reference type combining InternalGrid with HTMLElement.
542
+ * Used by extracted managers that need both internal grid state and DOM APIs.
543
+ * @internal
544
+ */
545
+ export type GridHost<T = any> = InternalGrid<T> & HTMLElement;
493
546
  /**
494
547
  * Built-in primitive column types with automatic formatting and editing support.
495
548
  *
@@ -839,9 +892,12 @@ export interface ColumnConfig<TRow = any> extends BaseColumnConfig<TRow, any> {
839
892
  *
840
893
  * // Status-based styling
841
894
  * cellClass: (value) => [`status-${value}`]
895
+ *
896
+ * // Single class as string
897
+ * cellClass: (value) => value < 0 ? 'negative' : ''
842
898
  * ```
843
899
  */
844
- cellClass?: (value: unknown, row: TRow, column: ColumnConfig<TRow>) => string[];
900
+ cellClass?: (value: unknown, row: TRow, column: ColumnConfig<TRow>) => string | string[];
845
901
  /**
846
902
  * Custom header label renderer. Customize the label content while the grid
847
903
  * handles sort icons, filter buttons, resize handles, and click interactions.
@@ -1032,9 +1088,9 @@ export interface ColumnEditorContext<TRow = any, TValue = any> {
1032
1088
  * @example
1033
1089
  * ```typescript
1034
1090
  * // In a cell-commit listener:
1035
- * grid.addEventListener('cell-commit', (e) => {
1036
- * if (e.detail.field === 'quantity') {
1037
- * e.detail.updateRow({ total: e.detail.row.price * e.detail.value });
1091
+ * grid.on('cell-commit', (detail) => {
1092
+ * if (detail.field === 'quantity') {
1093
+ * detail.updateRow({ total: detail.row.price * detail.value });
1038
1094
  * }
1039
1095
  * });
1040
1096
  * ```
@@ -1323,8 +1379,10 @@ export interface FrameworkAdapter {
1323
1379
  /**
1324
1380
  * Creates a view renderer function from a light DOM element.
1325
1381
  * The renderer receives cell context and returns DOM or string.
1382
+ * Returns undefined if no renderer template is registered, allowing the grid
1383
+ * to use its default rendering.
1326
1384
  */
1327
- createRenderer<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnViewRenderer<TRow, TValue>;
1385
+ createRenderer<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnViewRenderer<TRow, TValue> | undefined;
1328
1386
  /**
1329
1387
  * Creates an editor spec from a light DOM element.
1330
1388
  * The editor receives context with commit/cancel and returns DOM.
@@ -1345,6 +1403,20 @@ export interface FrameworkAdapter {
1345
1403
  * @returns Type defaults for renderer/editor, or undefined if not registered
1346
1404
  */
1347
1405
  getTypeDefault?<TRow = unknown>(type: string): TypeDefault<TRow> | undefined;
1406
+ /**
1407
+ * Pre-process a grid config before the grid core applies it.
1408
+ * Framework adapters use this to convert framework-specific component references
1409
+ * (Angular classes, Vue components, React elements) to DOM-returning functions.
1410
+ *
1411
+ * Called automatically by the grid's `set gridConfig` setter when a
1412
+ * `__frameworkAdapter` is present on the grid instance.
1413
+ *
1414
+ * Must be **idempotent** — already-processed configs must pass through safely.
1415
+ *
1416
+ * @param config - The raw grid config (may contain framework-specific values)
1417
+ * @returns Processed config with DOM-returning functions
1418
+ */
1419
+ processConfig?<TRow = unknown>(config: GridConfig<TRow>): GridConfig<TRow>;
1348
1420
  /**
1349
1421
  * Called when a cell's content is about to be wiped (e.g., when exiting edit mode,
1350
1422
  * scroll-recycling a row, or rebuilding a row).
@@ -1366,6 +1438,16 @@ export interface FrameworkAdapter {
1366
1438
  * @param container - The container element returned by a create* method
1367
1439
  */
1368
1440
  unmount?(container: HTMLElement): void;
1441
+ /**
1442
+ * Parse a `<tbw-grid-detail>` element and return a detail renderer function.
1443
+ * Used by MasterDetailPlugin to support framework-specific detail templates.
1444
+ */
1445
+ parseDetailElement?<TRow = unknown>(element: Element): ((row: TRow, rowIndex: number) => HTMLElement | string) | undefined;
1446
+ /**
1447
+ * Parse a `<tbw-grid-responsive-card>` element and return a card renderer function.
1448
+ * Used by ResponsivePlugin to support framework-specific card templates.
1449
+ */
1450
+ parseResponsiveCardElement?<TRow = unknown>(element: Element): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
1369
1451
  }
1370
1452
  /**
1371
1453
  * Column internal properties used during light DOM parsing.
@@ -1890,9 +1972,12 @@ export interface GridConfig<TRow = any> {
1890
1972
  *
1891
1973
  * // Status-based row styling
1892
1974
  * rowClass: (row) => [`priority-${row.priority}`]
1975
+ *
1976
+ * // Single class as string
1977
+ * rowClass: (row) => row.isNew ? 'new-row' : ''
1893
1978
  * ```
1894
1979
  */
1895
- rowClass?: (row: TRow) => string[];
1980
+ rowClass?: (row: TRow) => string | string[];
1896
1981
  /** Sizing mode for columns. Can also be set via `fitMode` prop. */
1897
1982
  fitMode?: FitMode;
1898
1983
  /**
@@ -2328,6 +2413,31 @@ export interface LoadingContext {
2328
2413
  * @see {@link LoadingSize} for size variants ('large' | 'small')
2329
2414
  */
2330
2415
  export type LoadingRenderer = (context: LoadingContext) => HTMLElement | string;
2416
+ /**
2417
+ * Detail for the `data-change` event.
2418
+ *
2419
+ * Fired whenever the grid's row data changes — including new data assignment,
2420
+ * row insertion/removal, and in-place mutations via `updateRow()`.
2421
+ *
2422
+ * Use this to keep external UI in sync with the grid's current data state
2423
+ * (row counts, summaries, charts, etc.).
2424
+ *
2425
+ * @example
2426
+ * ```typescript
2427
+ * grid.on('data-change', ({ rowCount, sourceRowCount }) => {
2428
+ * console.log(`${rowCount} rows visible of ${sourceRowCount} total`);
2429
+ * });
2430
+ * ```
2431
+ *
2432
+ * @see {@link DataGridEventMap} for all event types
2433
+ * @category Events
2434
+ */
2435
+ export interface DataChangeDetail {
2436
+ /** Number of visible (processed) rows */
2437
+ rowCount: number;
2438
+ /** Total number of source rows (before filtering/grouping) */
2439
+ sourceRowCount: number;
2440
+ }
2331
2441
  /**
2332
2442
  * Indicates the origin of a data change.
2333
2443
  * Used to prevent infinite loops in cascade update handlers.
@@ -2338,14 +2448,14 @@ export type LoadingRenderer = (context: LoadingContext) => HTMLElement | string;
2338
2448
  *
2339
2449
  * @example
2340
2450
  * ```typescript
2341
- * grid.addEventListener('cell-change', (e) => {
2342
- * const { source, field, newValue } = e.detail;
2451
+ * grid.on('cell-change', (detail) => {
2452
+ * const { source, field, newValue } = detail;
2343
2453
  *
2344
2454
  * // Only cascade updates for user edits
2345
2455
  * if (source === 'user' && field === 'price') {
2346
2456
  * // Update calculated field (marked as 'cascade')
2347
- * grid.updateRow(e.detail.rowId, {
2348
- * total: newValue * e.detail.row.quantity,
2457
+ * grid.updateRow(detail.rowId, {
2458
+ * total: newValue * detail.row.quantity,
2349
2459
  * });
2350
2460
  * }
2351
2461
  *
@@ -2369,9 +2479,7 @@ export type UpdateSource = 'user' | 'cascade' | 'api';
2369
2479
  *
2370
2480
  * @example
2371
2481
  * ```typescript
2372
- * grid.addEventListener('cell-change', (e: CustomEvent<CellChangeDetail>) => {
2373
- * const { row, rowId, field, oldValue, newValue, source } = e.detail;
2374
- *
2482
+ * grid.on('cell-change', ({ row, rowId, field, oldValue, newValue, source }) => {
2375
2483
  * console.log(`${field} changed from ${oldValue} to ${newValue}`);
2376
2484
  * console.log(`Change source: ${source}`);
2377
2485
  *
@@ -2811,11 +2919,12 @@ export interface ToolPanelDefinition {
2811
2919
  * container.appendChild(span);
2812
2920
  *
2813
2921
  * // Update on data changes
2814
- * const update = () => span.textContent = `${grid.rows.length} rows`;
2815
- * grid.addEventListener('data-change', update);
2922
+ * const unsub = grid.on('data-change', () => {
2923
+ * span.textContent = `${grid.rows.length} rows`;
2924
+ * });
2816
2925
  *
2817
2926
  * return () => {
2818
- * grid.removeEventListener('data-change', update);
2927
+ * unsub();
2819
2928
  * };
2820
2929
  * },
2821
2930
  * });
@@ -2927,9 +3036,9 @@ export interface GridColumnState {
2927
3036
  *
2928
3037
  * @example
2929
3038
  * ```typescript
2930
- * grid.addEventListener('cell-click', (e: CustomEvent<CellClickDetail>) => {
2931
- * const { row, field, value, rowIndex, colIndex } = e.detail;
2932
- * console.log(`Clicked ${field} = ${value} in row ${rowIndex}`);\n *
3039
+ * grid.on('cell-click', ({ row, field, value, rowIndex, colIndex }) => {
3040
+ * console.log(`Clicked ${field} = ${value} in row ${rowIndex}`);
3041
+ *
2933
3042
  * // Access the full row data
2934
3043
  * if (row.status === 'pending') {
2935
3044
  * showApprovalDialog(row);
@@ -2963,8 +3072,7 @@ export interface CellClickDetail<TRow = unknown> {
2963
3072
  *
2964
3073
  * @example
2965
3074
  * ```typescript
2966
- * grid.addEventListener('row-click', (e: CustomEvent<RowClickDetail>) => {
2967
- * const { row, rowIndex, rowEl } = e.detail;
3075
+ * grid.on('row-click', ({ row, rowIndex, rowEl }) => {
2968
3076
  * console.log(`Clicked row ${rowIndex}: ${row.name}`);
2969
3077
  *
2970
3078
  * // Highlight the row
@@ -2992,9 +3100,7 @@ export interface RowClickDetail<TRow = unknown> {
2992
3100
  *
2993
3101
  * @example
2994
3102
  * ```typescript
2995
- * grid.addEventListener('sort-change', (e: CustomEvent<SortChangeDetail>) => {
2996
- * const { field, direction } = e.detail;
2997
- *
3103
+ * grid.on('sort-change', ({ field, direction }) => {
2998
3104
  * if (direction === 0) {
2999
3105
  * console.log(`Sort cleared on ${field}`);
3000
3106
  * } else {
@@ -3022,8 +3128,7 @@ export interface SortChangeDetail {
3022
3128
  *
3023
3129
  * @example
3024
3130
  * ```typescript
3025
- * grid.addEventListener('column-resize', (e: CustomEvent<ColumnResizeDetail>) => {
3026
- * const { field, width } = e.detail;
3131
+ * grid.on('column-resize', ({ field, width }) => {
3027
3132
  * console.log(`Column ${field} resized to ${width}px`);
3028
3133
  *
3029
3134
  * // Persist to user preferences
@@ -3056,9 +3161,7 @@ export type CellActivateTrigger = 'keyboard' | 'pointer';
3056
3161
  *
3057
3162
  * @example
3058
3163
  * ```typescript
3059
- * grid.addEventListener('cell-activate', (e: CustomEvent<CellActivateDetail>) => {
3060
- * const { row, field, value, trigger, cellEl } = e.detail;
3061
- *
3164
+ * grid.on('cell-activate', ({ row, field, value, trigger, cellEl }, event) => {
3062
3165
  * if (trigger === 'keyboard') {
3063
3166
  * console.log('Activated via Enter key');
3064
3167
  * } else {
@@ -3067,8 +3170,8 @@ export type CellActivateTrigger = 'keyboard' | 'pointer';
3067
3170
  *
3068
3171
  * // Start custom editing for specific columns
3069
3172
  * if (field === 'notes') {
3173
+ * event.preventDefault(); // Prevent default editing
3070
3174
  * openNotesEditor(row, cellEl);
3071
- * e.preventDefault(); // Prevent default editing
3072
3175
  * }
3073
3176
  * });
3074
3177
  * ```
@@ -3097,7 +3200,7 @@ export interface CellActivateDetail<TRow = unknown> {
3097
3200
  }
3098
3201
  /**
3099
3202
  * @deprecated Use `CellActivateDetail` instead. Will be removed in next major version.
3100
- * Kept for backwards compatibility.
3203
+ * Kept for backwards compatibility. Will be removed in v2.
3101
3204
  *
3102
3205
  * @category Events
3103
3206
  */
@@ -3116,8 +3219,7 @@ export interface ActivateCellDetail {
3116
3219
  * @example
3117
3220
  * ```typescript
3118
3221
  * // Framework adapter listens for this event
3119
- * grid.addEventListener('mount-external-view', (e: CustomEvent<ExternalMountViewDetail>) => {
3120
- * const { placeholder, spec, context } = e.detail;
3222
+ * grid.on('mount-external-view', ({ placeholder, spec, context }) => {
3121
3223
  * // Mount framework component into placeholder
3122
3224
  * mountComponent(spec.component, placeholder, context);
3123
3225
  * });
@@ -3146,8 +3248,7 @@ export interface ExternalMountViewDetail<TRow = unknown> {
3146
3248
  * @example
3147
3249
  * ```typescript
3148
3250
  * // Framework adapter listens for this event
3149
- * grid.addEventListener('mount-external-editor', (e: CustomEvent<ExternalMountEditorDetail>) => {
3150
- * const { placeholder, spec, context } = e.detail;
3251
+ * grid.on('mount-external-editor', ({ placeholder, spec, context }) => {
3151
3252
  * // Mount framework editor with commit/cancel wired
3152
3253
  * mountEditor(spec.component, placeholder, {
3153
3254
  * value: context.value,
@@ -3176,39 +3277,242 @@ export interface ExternalMountEditorDetail<TRow = unknown> {
3176
3277
  /**
3177
3278
  * Maps event names to their detail payload types.
3178
3279
  *
3179
- * Use this interface for strongly typed event handling.
3280
+ * Used by {@link DataGridElement.on | grid.on()} and `addEventListener()` for
3281
+ * fully typed event handling. Plugins extend this map via module augmentation.
3180
3282
  *
3181
3283
  * @example
3182
3284
  * ```typescript
3183
- * // Type-safe event listener
3184
- * function handleEvent<K extends keyof DataGridEventMap>(
3185
- * grid: DataGridElement,
3186
- * event: K,
3187
- * handler: (detail: DataGridEventMap[K]) => void,
3188
- * ): void {
3189
- * grid.addEventListener(event, (e: CustomEvent) => handler(e.detail));
3190
- * }
3191
- *
3192
- * handleEvent(grid, 'cell-click', (detail) => {
3193
- * console.log(detail.field); // Type-safe access
3285
+ * // Recommended: grid.on() auto-unwraps the detail
3286
+ * const off = grid.on('cell-click', ({ field, value, row }) => {
3287
+ * console.log(`Clicked ${field} = ${value}`);
3194
3288
  * });
3289
+ * off(); // unsubscribe
3290
+ *
3291
+ * // addEventListener works too (useful for { once, signal, capture })
3292
+ * grid.addEventListener('cell-click', (e) => {
3293
+ * console.log(e.detail.field);
3294
+ * }, { once: true });
3195
3295
  * ```
3196
3296
  *
3297
+ * @see {@link DataGridElement.on} for the recommended subscription API
3197
3298
  * @see {@link DataGridCustomEvent} for typed CustomEvent wrapper
3198
3299
  * @see {@link DGEvents} for event name constants
3199
3300
  * @category Events
3200
3301
  */
3201
3302
  export interface DataGridEventMap<TRow = unknown> {
3303
+ /**
3304
+ * Fired when a cell is clicked.
3305
+ * Provides full context: row data, column config, cell element, and the original mouse event.
3306
+ *
3307
+ * @example
3308
+ * ```typescript
3309
+ * grid.on('cell-click', ({ row, field, value, cellEl }) => {
3310
+ * console.log(`Clicked ${field} = ${value}`);
3311
+ *
3312
+ * // Open a detail dialog for a specific column
3313
+ * if (field === 'avatar') {
3314
+ * showImagePreview(row.avatarUrl, cellEl);
3315
+ * }
3316
+ * });
3317
+ * ```
3318
+ *
3319
+ * @see {@link CellClickDetail}
3320
+ * @group Core Events
3321
+ */
3202
3322
  'cell-click': CellClickDetail<TRow>;
3323
+ /**
3324
+ * Fired when a row is clicked (anywhere on the row).
3325
+ * Use for row-level actions like opening a detail panel or navigating.
3326
+ *
3327
+ * @example
3328
+ * ```typescript
3329
+ * grid.on('row-click', ({ row, rowIndex }) => {
3330
+ * console.log(`Row ${rowIndex}: ${row.name}`);
3331
+ *
3332
+ * // Navigate to detail page
3333
+ * router.navigate(`/employees/${row.id}`);
3334
+ * });
3335
+ * ```
3336
+ *
3337
+ * @see {@link RowClickDetail}
3338
+ * @group Core Events
3339
+ */
3203
3340
  'row-click': RowClickDetail<TRow>;
3341
+ /**
3342
+ * Fired when a cell is activated by Enter key or pointer click.
3343
+ * Unified event for both keyboard and pointer activation — use this
3344
+ * instead of the deprecated `activate-cell`.
3345
+ *
3346
+ * Call `event.preventDefault()` to suppress default behavior (e.g., inline editing).
3347
+ *
3348
+ * @example
3349
+ * ```typescript
3350
+ * grid.on('cell-activate', ({ row, field, trigger, cellEl }, event) => {
3351
+ * // Custom editing for a specific column
3352
+ * if (field === 'notes') {
3353
+ * event.preventDefault();
3354
+ * openRichTextEditor(row, cellEl);
3355
+ * }
3356
+ *
3357
+ * console.log(`Activated via ${trigger}`); // 'keyboard' | 'pointer'
3358
+ * });
3359
+ * ```
3360
+ *
3361
+ * @see {@link CellActivateDetail}
3362
+ * @see {@link CellActivateTrigger}
3363
+ * @group Core Events
3364
+ */
3204
3365
  'cell-activate': CellActivateDetail<TRow>;
3366
+ /**
3367
+ * Fired after any data mutation — user edits, cascade updates, or API calls.
3368
+ * This is an informational event for logging, auditing, or cascading updates
3369
+ * to related fields. Check `source` to distinguish edit origins.
3370
+ *
3371
+ * @example
3372
+ * ```typescript
3373
+ * grid.on('cell-change', ({ row, rowId, field, oldValue, newValue, source }) => {
3374
+ * console.log(`${field}: ${oldValue} → ${newValue} (${source})`);
3375
+ *
3376
+ * // Cascade: recalculate total when quantity changes
3377
+ * if (source === 'user' && field === 'quantity') {
3378
+ * grid.updateRow(rowId, { total: newValue * row.price });
3379
+ * }
3380
+ * });
3381
+ * ```
3382
+ *
3383
+ * @see {@link CellChangeDetail}
3384
+ * @see {@link UpdateSource}
3385
+ * @group Core Events
3386
+ */
3205
3387
  'cell-change': CellChangeDetail<TRow>;
3388
+ /**
3389
+ * Fired whenever the grid's row data changes — new data assignment,
3390
+ * row insertion/removal, or in-place mutations via `updateRow()`.
3391
+ * Use to keep external UI (row counts, summaries, charts) in sync.
3392
+ *
3393
+ * @example
3394
+ * ```typescript
3395
+ * grid.on('data-change', ({ rowCount, sourceRowCount }) => {
3396
+ * statusBar.textContent = `${rowCount} of ${sourceRowCount} rows`;
3397
+ * });
3398
+ * ```
3399
+ *
3400
+ * @see {@link DataChangeDetail}
3401
+ * @group Core Events
3402
+ */
3403
+ 'data-change': DataChangeDetail;
3404
+ /**
3405
+ * Emitted when a cell with an external view renderer (React, Angular, Vue component)
3406
+ * needs to be mounted. Framework adapters listen for this event internally.
3407
+ *
3408
+ * @example
3409
+ * ```typescript
3410
+ * // Custom framework adapter
3411
+ * grid.on('mount-external-view', ({ placeholder, spec, context }) => {
3412
+ * myFramework.render(spec.component, placeholder, {
3413
+ * row: context.row,
3414
+ * value: context.value,
3415
+ * });
3416
+ * });
3417
+ * ```
3418
+ *
3419
+ * @see {@link ExternalMountViewDetail}
3420
+ * @see {@link FrameworkAdapter}
3421
+ * @group Framework Adapter Events
3422
+ */
3206
3423
  'mount-external-view': ExternalMountViewDetail<TRow>;
3424
+ /**
3425
+ * Emitted when a cell with an external editor component (React, Angular, Vue)
3426
+ * needs to be mounted with commit/cancel bindings. Framework adapters listen
3427
+ * for this event internally.
3428
+ *
3429
+ * @example
3430
+ * ```typescript
3431
+ * // Custom framework adapter
3432
+ * grid.on('mount-external-editor', ({ placeholder, spec, context }) => {
3433
+ * myFramework.render(spec.component, placeholder, {
3434
+ * value: context.value,
3435
+ * onSave: context.commit,
3436
+ * onCancel: context.cancel,
3437
+ * });
3438
+ * });
3439
+ * ```
3440
+ *
3441
+ * @see {@link ExternalMountEditorDetail}
3442
+ * @see {@link FrameworkAdapter}
3443
+ * @group Framework Adapter Events
3444
+ */
3207
3445
  'mount-external-editor': ExternalMountEditorDetail<TRow>;
3446
+ /**
3447
+ * Fired when the sort state changes — column header click, programmatic sort,
3448
+ * or sort cleared. `direction: 0` indicates the sort was removed.
3449
+ *
3450
+ * @example
3451
+ * ```typescript
3452
+ * grid.on('sort-change', ({ field, direction }) => {
3453
+ * if (direction === 0) {
3454
+ * console.log('Sort cleared');
3455
+ * } else {
3456
+ * console.log(`Sorted by ${field} ${direction === 1 ? 'ASC' : 'DESC'}`);
3457
+ * }
3458
+ *
3459
+ * // Server-side sorting
3460
+ * fetchData({ sortBy: field, sortDir: direction });
3461
+ * });
3462
+ * ```
3463
+ *
3464
+ * @see {@link SortChangeDetail}
3465
+ * @see {@link SortHandler}
3466
+ * @group Core Events
3467
+ */
3208
3468
  'sort-change': SortChangeDetail;
3469
+ /**
3470
+ * Fired when a column is resized by the user dragging the resize handle.
3471
+ * Use to persist column widths to user preferences or localStorage.
3472
+ *
3473
+ * @example
3474
+ * ```typescript
3475
+ * grid.on('column-resize', ({ field, width }) => {
3476
+ * console.log(`Column "${field}" resized to ${width}px`);
3477
+ *
3478
+ * // Persist to localStorage
3479
+ * const widths = JSON.parse(localStorage.getItem('col-widths') ?? '{}');
3480
+ * widths[field] = width;
3481
+ * localStorage.setItem('col-widths', JSON.stringify(widths));
3482
+ * });
3483
+ * ```
3484
+ *
3485
+ * @see {@link ColumnResizeDetail}
3486
+ * @group Core Events
3487
+ */
3209
3488
  'column-resize': ColumnResizeDetail;
3210
- /** @deprecated Use 'cell-activate' instead */
3489
+ /**
3490
+ * @deprecated Use `cell-activate` instead. Will be removed in v2.
3491
+ * @see {@link ActivateCellDetail}
3492
+ * @group Core Events
3493
+ */
3211
3494
  'activate-cell': ActivateCellDetail;
3495
+ /**
3496
+ * Fired when column state changes — reordering, resizing, visibility toggle,
3497
+ * or sort changes. Use with `getColumnState()` / `columnState` setter for
3498
+ * full state persistence.
3499
+ *
3500
+ * @example
3501
+ * ```typescript
3502
+ * grid.on('column-state-change', (state) => {
3503
+ * localStorage.setItem('grid-state', JSON.stringify(state));
3504
+ * console.log(`${state.columns.length} columns in state`);
3505
+ * });
3506
+ *
3507
+ * // Restore on load
3508
+ * const saved = localStorage.getItem('grid-state');
3509
+ * if (saved) grid.columnState = JSON.parse(saved);
3510
+ * ```
3511
+ *
3512
+ * @see {@link GridColumnState}
3513
+ * @see {@link ColumnState}
3514
+ * @group Core Events
3515
+ */
3212
3516
  'column-state-change': GridColumnState;
3213
3517
  }
3214
3518
  /**
@@ -3238,19 +3542,26 @@ export type DataGridEventDetail<K extends keyof DataGridEventMap<unknown>, TRow
3238
3542
  /**
3239
3543
  * Custom event type for DataGrid events with typed detail payload.
3240
3544
  *
3241
- * Use this type when you need to cast or declare event handler parameters.
3545
+ * Primarily useful when you need to declare handler parameters with
3546
+ * `addEventListener`. For most use cases, prefer {@link DataGridElement.on | grid.on()}
3547
+ * which handles typing automatically.
3242
3548
  *
3243
3549
  * @example
3244
3550
  * ```typescript
3245
- * // Strongly typed event handler
3551
+ * // Typed handler for addEventListener
3246
3552
  * function onCellClick(e: DataGridCustomEvent<'cell-click', Employee>): void {
3247
3553
  * const { row, field, value } = e.detail;
3248
3554
  * console.log(`Clicked ${field} = ${value} on ${row.name}`);
3249
3555
  * }
3250
- *
3251
3556
  * grid.addEventListener('cell-click', onCellClick);
3557
+ *
3558
+ * // With grid.on() you don't need this type — it's inferred:
3559
+ * grid.on('cell-click', ({ row, field, value }) => {
3560
+ * console.log(`Clicked ${field} = ${value} on ${row.name}`);
3561
+ * });
3252
3562
  * ```
3253
3563
  *
3564
+ * @see {@link DataGridElement.on} for the recommended subscription API
3254
3565
  * @see {@link DataGridEventMap} for all event types
3255
3566
  * @see {@link DataGridEventDetail} for extracting detail type only
3256
3567
  * @category Events
@@ -3265,4 +3576,3 @@ export interface EvalContext {
3265
3576
  value: unknown;
3266
3577
  row: Record<string, unknown> | null;
3267
3578
  }
3268
- //# sourceMappingURL=types.d.ts.map
@@ -5,4 +5,3 @@ declare module '../core/types' {
5
5
  clipboard?: boolean | ClipboardConfig;
6
6
  }
7
7
  }
8
- //# sourceMappingURL=clipboard.d.ts.map
@@ -5,4 +5,3 @@ declare module '../core/types' {
5
5
  columnVirtualization?: boolean | ColumnVirtualizationConfig;
6
6
  }
7
7
  }
8
- //# sourceMappingURL=column-virtualization.d.ts.map
@@ -5,4 +5,3 @@ declare module '../core/types' {
5
5
  contextMenu?: boolean | ContextMenuConfig;
6
6
  }
7
7
  }
8
- //# sourceMappingURL=context-menu.d.ts.map
@@ -5,4 +5,3 @@ declare module '../core/types' {
5
5
  editing?: boolean | 'click' | 'dblclick' | 'manual' | EditingConfig;
6
6
  }
7
7
  }
8
- //# sourceMappingURL=editing.d.ts.map
@@ -5,4 +5,3 @@ declare module '../core/types' {
5
5
  export?: boolean | ExportConfig;
6
6
  }
7
7
  }
8
- //# sourceMappingURL=export.d.ts.map
@@ -5,4 +5,3 @@ declare module '../core/types' {
5
5
  filtering?: boolean | FilterConfig<TRow>;
6
6
  }
7
7
  }
8
- //# sourceMappingURL=filtering.d.ts.map