@glideappsfinal/glide-data-grid 6.0.9

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 (745) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc +68 -0
  3. package/API.md +1466 -0
  4. package/CHANGELOG.md +895 -0
  5. package/LICENSE +21 -0
  6. package/README.md +190 -0
  7. package/build.sh +21 -0
  8. package/dist/cjs/cells/boolean-cell.js +87 -0
  9. package/dist/cjs/cells/boolean-cell.js.map +1 -0
  10. package/dist/cjs/cells/bubble-cell.js +53 -0
  11. package/dist/cjs/cells/bubble-cell.js.map +1 -0
  12. package/dist/cjs/cells/cell-types.js +2 -0
  13. package/dist/cjs/cells/cell-types.js.map +1 -0
  14. package/dist/cjs/cells/drilldown-cell.js +171 -0
  15. package/dist/cjs/cells/drilldown-cell.js.map +1 -0
  16. package/dist/cjs/cells/image-cell.js +94 -0
  17. package/dist/cjs/cells/image-cell.js.map +1 -0
  18. package/dist/cjs/cells/index.js +29 -0
  19. package/dist/cjs/cells/index.js.map +1 -0
  20. package/dist/cjs/cells/loading-cell.js +41 -0
  21. package/dist/cjs/cells/loading-cell.js.map +1 -0
  22. package/dist/cjs/cells/markdown-cell.js +30 -0
  23. package/dist/cjs/cells/markdown-cell.js.map +1 -0
  24. package/dist/cjs/cells/marker-cell.js +80 -0
  25. package/dist/cjs/cells/marker-cell.js.map +1 -0
  26. package/dist/cjs/cells/new-row-cell.js +53 -0
  27. package/dist/cjs/cells/new-row-cell.js.map +1 -0
  28. package/dist/cjs/cells/number-cell.js +44 -0
  29. package/dist/cjs/cells/number-cell.js.map +1 -0
  30. package/dist/cjs/cells/protected-cell.js +35 -0
  31. package/dist/cjs/cells/protected-cell.js.map +1 -0
  32. package/dist/cjs/cells/row-id-cell.js +23 -0
  33. package/dist/cjs/cells/row-id-cell.js.map +1 -0
  34. package/dist/cjs/cells/text-cell.js +48 -0
  35. package/dist/cjs/cells/text-cell.js.map +1 -0
  36. package/dist/cjs/cells/uri-cell.js +104 -0
  37. package/dist/cjs/cells/uri-cell.js.map +1 -0
  38. package/dist/cjs/common/browser-detect.js +20 -0
  39. package/dist/cjs/common/browser-detect.js.map +1 -0
  40. package/dist/cjs/common/image-window-loader.js +98 -0
  41. package/dist/cjs/common/image-window-loader.js.map +1 -0
  42. package/dist/cjs/common/is-hotkey.js +76 -0
  43. package/dist/cjs/common/is-hotkey.js.map +1 -0
  44. package/dist/cjs/common/math.js +297 -0
  45. package/dist/cjs/common/math.js.map +1 -0
  46. package/dist/cjs/common/render-state-provider.js +70 -0
  47. package/dist/cjs/common/render-state-provider.js.map +1 -0
  48. package/dist/cjs/common/resize-detector.js +27 -0
  49. package/dist/cjs/common/resize-detector.js.map +1 -0
  50. package/dist/cjs/common/styles.js +135 -0
  51. package/dist/cjs/common/styles.js.map +1 -0
  52. package/dist/cjs/common/support.js +60 -0
  53. package/dist/cjs/common/support.js.map +1 -0
  54. package/dist/cjs/common/utils.js +193 -0
  55. package/dist/cjs/common/utils.js.map +1 -0
  56. package/dist/cjs/data-editor/copy-paste.js +269 -0
  57. package/dist/cjs/data-editor/copy-paste.js.map +1 -0
  58. package/dist/cjs/data-editor/data-editor-fns.js +190 -0
  59. package/dist/cjs/data-editor/data-editor-fns.js.map +1 -0
  60. package/dist/cjs/data-editor/data-editor-keybindings.js +126 -0
  61. package/dist/cjs/data-editor/data-editor-keybindings.js.map +1 -0
  62. package/dist/cjs/data-editor/data-editor.js +2892 -0
  63. package/dist/cjs/data-editor/data-editor.js.map +1 -0
  64. package/dist/cjs/data-editor/group-rename.css +2 -0
  65. package/dist/cjs/data-editor/group-rename.js +49 -0
  66. package/dist/cjs/data-editor/group-rename.js.map +1 -0
  67. package/dist/cjs/data-editor/row-grouping-api.js +34 -0
  68. package/dist/cjs/data-editor/row-grouping-api.js.map +1 -0
  69. package/dist/cjs/data-editor/row-grouping.js +189 -0
  70. package/dist/cjs/data-editor/row-grouping.js.map +1 -0
  71. package/dist/cjs/data-editor/use-autoscroll.js +36 -0
  72. package/dist/cjs/data-editor/use-autoscroll.js.map +1 -0
  73. package/dist/cjs/data-editor/use-cells-for-selection.js +53 -0
  74. package/dist/cjs/data-editor/use-cells-for-selection.js.map +1 -0
  75. package/dist/cjs/data-editor/use-column-sizer.js +189 -0
  76. package/dist/cjs/data-editor/use-column-sizer.js.map +1 -0
  77. package/dist/cjs/data-editor/use-initial-scroll-offset.js +81 -0
  78. package/dist/cjs/data-editor/use-initial-scroll-offset.js.map +1 -0
  79. package/dist/cjs/data-editor/use-rem-adjuster.js +29 -0
  80. package/dist/cjs/data-editor/use-rem-adjuster.js.map +1 -0
  81. package/dist/cjs/data-editor/visible-region.js +2 -0
  82. package/dist/cjs/data-editor/visible-region.js.map +1 -0
  83. package/dist/cjs/data-editor-all.js +19 -0
  84. package/dist/cjs/data-editor-all.js.map +1 -0
  85. package/dist/cjs/index.js +36 -0
  86. package/dist/cjs/index.js.map +1 -0
  87. package/dist/cjs/internal/click-outside-container/click-outside-container.js +34 -0
  88. package/dist/cjs/internal/click-outside-container/click-outside-container.js.map +1 -0
  89. package/dist/cjs/internal/data-editor-container/data-grid-container.js +36 -0
  90. package/dist/cjs/internal/data-editor-container/data-grid-container.js.map +1 -0
  91. package/dist/cjs/internal/data-grid/animation-manager.js +95 -0
  92. package/dist/cjs/internal/data-grid/animation-manager.js.map +1 -0
  93. package/dist/cjs/internal/data-grid/cell-set.js +56 -0
  94. package/dist/cjs/internal/data-grid/cell-set.js.map +1 -0
  95. package/dist/cjs/internal/data-grid/color-parser.js +122 -0
  96. package/dist/cjs/internal/data-grid/color-parser.js.map +1 -0
  97. package/dist/cjs/internal/data-grid/data-grid-sprites.js +64 -0
  98. package/dist/cjs/internal/data-grid/data-grid-sprites.js.map +1 -0
  99. package/dist/cjs/internal/data-grid/data-grid-types.js +299 -0
  100. package/dist/cjs/internal/data-grid/data-grid-types.js.map +1 -0
  101. package/dist/cjs/internal/data-grid/data-grid.js +1208 -0
  102. package/dist/cjs/internal/data-grid/data-grid.js.map +1 -0
  103. package/dist/cjs/internal/data-grid/event-args.js +30 -0
  104. package/dist/cjs/internal/data-grid/event-args.js.map +1 -0
  105. package/dist/cjs/internal/data-grid/image-window-loader-interface.js +2 -0
  106. package/dist/cjs/internal/data-grid/image-window-loader-interface.js.map +1 -0
  107. package/dist/cjs/internal/data-grid/render/data-grid-lib.js +652 -0
  108. package/dist/cjs/internal/data-grid/render/data-grid-lib.js.map +1 -0
  109. package/dist/cjs/internal/data-grid/render/data-grid-render.blit.js +218 -0
  110. package/dist/cjs/internal/data-grid/render/data-grid-render.blit.js.map +1 -0
  111. package/dist/cjs/internal/data-grid/render/data-grid-render.cells.js +369 -0
  112. package/dist/cjs/internal/data-grid/render/data-grid-render.cells.js.map +1 -0
  113. package/dist/cjs/internal/data-grid/render/data-grid-render.header.js +440 -0
  114. package/dist/cjs/internal/data-grid/render/data-grid-render.header.js.map +1 -0
  115. package/dist/cjs/internal/data-grid/render/data-grid-render.js +316 -0
  116. package/dist/cjs/internal/data-grid/render/data-grid-render.js.map +1 -0
  117. package/dist/cjs/internal/data-grid/render/data-grid-render.lines.js +256 -0
  118. package/dist/cjs/internal/data-grid/render/data-grid-render.lines.js.map +1 -0
  119. package/dist/cjs/internal/data-grid/render/data-grid-render.walk.js +157 -0
  120. package/dist/cjs/internal/data-grid/render/data-grid-render.walk.js.map +1 -0
  121. package/dist/cjs/internal/data-grid/render/data-grid.render.rings.js +203 -0
  122. package/dist/cjs/internal/data-grid/render/data-grid.render.rings.js.map +1 -0
  123. package/dist/cjs/internal/data-grid/render/draw-checkbox.js +65 -0
  124. package/dist/cjs/internal/data-grid/render/draw-checkbox.js.map +1 -0
  125. package/dist/cjs/internal/data-grid/render/draw-edit-hover-indicator.js +38 -0
  126. package/dist/cjs/internal/data-grid/render/draw-edit-hover-indicator.js.map +1 -0
  127. package/dist/cjs/internal/data-grid/render/draw-grid-arg.js +2 -0
  128. package/dist/cjs/internal/data-grid/render/draw-grid-arg.js.map +1 -0
  129. package/dist/cjs/internal/data-grid/sprites.js +288 -0
  130. package/dist/cjs/internal/data-grid/sprites.js.map +1 -0
  131. package/dist/cjs/internal/data-grid/use-animation-queue.js +33 -0
  132. package/dist/cjs/internal/data-grid/use-animation-queue.js.map +1 -0
  133. package/dist/cjs/internal/data-grid/use-selection-behavior.js +112 -0
  134. package/dist/cjs/internal/data-grid/use-selection-behavior.js.map +1 -0
  135. package/dist/cjs/internal/data-grid-dnd/data-grid-dnd.js +239 -0
  136. package/dist/cjs/internal/data-grid-dnd/data-grid-dnd.js.map +1 -0
  137. package/dist/cjs/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js +77 -0
  138. package/dist/cjs/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js.map +1 -0
  139. package/dist/cjs/internal/data-grid-overlay-editor/data-grid-overlay-editor.js +124 -0
  140. package/dist/cjs/internal/data-grid-overlay-editor/data-grid-overlay-editor.js.map +1 -0
  141. package/dist/cjs/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.js +34 -0
  142. package/dist/cjs/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.js.map +1 -0
  143. package/dist/cjs/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.js +10 -0
  144. package/dist/cjs/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.js.map +1 -0
  145. package/dist/cjs/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.js +50 -0
  146. package/dist/cjs/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.js.map +1 -0
  147. package/dist/cjs/internal/data-grid-overlay-editor/private/image-overlay-editor-style.js +56 -0
  148. package/dist/cjs/internal/data-grid-overlay-editor/private/image-overlay-editor-style.js.map +1 -0
  149. package/dist/cjs/internal/data-grid-overlay-editor/private/image-overlay-editor.js +21 -0
  150. package/dist/cjs/internal/data-grid-overlay-editor/private/image-overlay-editor.js.map +1 -0
  151. package/dist/cjs/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.js +76 -0
  152. package/dist/cjs/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.js.map +1 -0
  153. package/dist/cjs/internal/data-grid-overlay-editor/private/markdown-overlay-editor.js +32 -0
  154. package/dist/cjs/internal/data-grid-overlay-editor/private/markdown-overlay-editor.js.map +1 -0
  155. package/dist/cjs/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js +15 -0
  156. package/dist/cjs/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js.map +1 -0
  157. package/dist/cjs/internal/data-grid-overlay-editor/private/number-overlay-editor.js +30 -0
  158. package/dist/cjs/internal/data-grid-overlay-editor/private/number-overlay-editor.js.map +1 -0
  159. package/dist/cjs/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.js +53 -0
  160. package/dist/cjs/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.js.map +1 -0
  161. package/dist/cjs/internal/data-grid-overlay-editor/private/uri-overlay-editor.js +21 -0
  162. package/dist/cjs/internal/data-grid-overlay-editor/private/uri-overlay-editor.js.map +1 -0
  163. package/dist/cjs/internal/data-grid-overlay-editor/use-stay-on-screen.js +47 -0
  164. package/dist/cjs/internal/data-grid-overlay-editor/use-stay-on-screen.js.map +1 -0
  165. package/dist/cjs/internal/data-grid-search/data-grid-search-style.js +96 -0
  166. package/dist/cjs/internal/data-grid-search/data-grid-search-style.js.map +1 -0
  167. package/dist/cjs/internal/data-grid-search/data-grid-search.js +297 -0
  168. package/dist/cjs/internal/data-grid-search/data-grid-search.js.map +1 -0
  169. package/dist/cjs/internal/growing-entry/growing-entry-style.js +60 -0
  170. package/dist/cjs/internal/growing-entry/growing-entry-style.js.map +1 -0
  171. package/dist/cjs/internal/growing-entry/growing-entry.js +41 -0
  172. package/dist/cjs/internal/growing-entry/growing-entry.js.map +1 -0
  173. package/dist/cjs/internal/markdown-div/markdown-div.js +41 -0
  174. package/dist/cjs/internal/markdown-div/markdown-div.js.map +1 -0
  175. package/dist/cjs/internal/markdown-div/private/markdown-container.js +19 -0
  176. package/dist/cjs/internal/markdown-div/private/markdown-container.js.map +1 -0
  177. package/dist/cjs/internal/scrolling-data-grid/infinite-scroller.js +265 -0
  178. package/dist/cjs/internal/scrolling-data-grid/infinite-scroller.js.map +1 -0
  179. package/dist/cjs/internal/scrolling-data-grid/scrolling-data-grid.js +155 -0
  180. package/dist/cjs/internal/scrolling-data-grid/scrolling-data-grid.js.map +1 -0
  181. package/dist/cjs/internal/scrolling-data-grid/use-kinetic-scroll.js +65 -0
  182. package/dist/cjs/internal/scrolling-data-grid/use-kinetic-scroll.js.map +1 -0
  183. package/dist/dts/cells/boolean-cell.d.ts +4 -0
  184. package/dist/dts/cells/boolean-cell.d.ts.map +1 -0
  185. package/dist/dts/cells/bubble-cell.d.ts +4 -0
  186. package/dist/dts/cells/bubble-cell.d.ts.map +1 -0
  187. package/dist/dts/cells/cell-types.d.ts +89 -0
  188. package/dist/dts/cells/cell-types.d.ts.map +1 -0
  189. package/dist/dts/cells/drilldown-cell.d.ts +4 -0
  190. package/dist/dts/cells/drilldown-cell.d.ts.map +1 -0
  191. package/dist/dts/cells/image-cell.d.ts +5 -0
  192. package/dist/dts/cells/image-cell.d.ts.map +1 -0
  193. package/dist/dts/cells/index.d.ts +4 -0
  194. package/dist/dts/cells/index.d.ts.map +1 -0
  195. package/dist/dts/cells/loading-cell.d.ts +4 -0
  196. package/dist/dts/cells/loading-cell.d.ts.map +1 -0
  197. package/dist/dts/cells/markdown-cell.d.ts +4 -0
  198. package/dist/dts/cells/markdown-cell.d.ts.map +1 -0
  199. package/dist/dts/cells/marker-cell.d.ts +4 -0
  200. package/dist/dts/cells/marker-cell.d.ts.map +1 -0
  201. package/dist/dts/cells/new-row-cell.d.ts +4 -0
  202. package/dist/dts/cells/new-row-cell.d.ts.map +1 -0
  203. package/dist/dts/cells/number-cell.d.ts +4 -0
  204. package/dist/dts/cells/number-cell.d.ts.map +1 -0
  205. package/dist/dts/cells/protected-cell.d.ts +4 -0
  206. package/dist/dts/cells/protected-cell.d.ts.map +1 -0
  207. package/dist/dts/cells/row-id-cell.d.ts +4 -0
  208. package/dist/dts/cells/row-id-cell.d.ts.map +1 -0
  209. package/dist/dts/cells/text-cell.d.ts +4 -0
  210. package/dist/dts/cells/text-cell.d.ts.map +1 -0
  211. package/dist/dts/cells/uri-cell.d.ts +4 -0
  212. package/dist/dts/cells/uri-cell.d.ts.map +1 -0
  213. package/dist/dts/common/browser-detect.d.ts +11 -0
  214. package/dist/dts/common/browser-detect.d.ts.map +1 -0
  215. package/dist/dts/common/image-window-loader.d.ts +15 -0
  216. package/dist/dts/common/image-window-loader.d.ts.map +1 -0
  217. package/dist/dts/common/is-hotkey.d.ts +7 -0
  218. package/dist/dts/common/is-hotkey.d.ts.map +1 -0
  219. package/dist/dts/common/math.d.ts +20 -0
  220. package/dist/dts/common/math.d.ts.map +1 -0
  221. package/dist/dts/common/render-state-provider.d.ts +20 -0
  222. package/dist/dts/common/render-state-provider.d.ts.map +1 -0
  223. package/dist/dts/common/resize-detector.d.ts +11 -0
  224. package/dist/dts/common/resize-detector.d.ts.map +1 -0
  225. package/dist/dts/common/styles.d.ts +61 -0
  226. package/dist/dts/common/styles.d.ts.map +1 -0
  227. package/dist/dts/common/support.d.ts +13 -0
  228. package/dist/dts/common/support.d.ts.map +1 -0
  229. package/dist/dts/common/utils.d.ts +38 -0
  230. package/dist/dts/common/utils.d.ts.map +1 -0
  231. package/dist/dts/data-editor/copy-paste.d.ts +22 -0
  232. package/dist/dts/data-editor/copy-paste.d.ts.map +1 -0
  233. package/dist/dts/data-editor/data-editor-fns.d.ts +16 -0
  234. package/dist/dts/data-editor/data-editor-fns.d.ts.map +1 -0
  235. package/dist/dts/data-editor/data-editor-keybindings.d.ts +62 -0
  236. package/dist/dts/data-editor/data-editor-keybindings.d.ts.map +1 -0
  237. package/dist/dts/data-editor/data-editor.d.ts +532 -0
  238. package/dist/dts/data-editor/data-editor.d.ts.map +1 -0
  239. package/dist/dts/data-editor/group-rename.d.ts +12 -0
  240. package/dist/dts/data-editor/group-rename.d.ts.map +1 -0
  241. package/dist/dts/data-editor/row-grouping-api.d.ts +21 -0
  242. package/dist/dts/data-editor/row-grouping-api.d.ts.map +1 -0
  243. package/dist/dts/data-editor/row-grouping.d.ts +82 -0
  244. package/dist/dts/data-editor/row-grouping.d.ts.map +1 -0
  245. package/dist/dts/data-editor/use-autoscroll.d.ts +4 -0
  246. package/dist/dts/data-editor/use-autoscroll.d.ts.map +1 -0
  247. package/dist/dts/data-editor/use-cells-for-selection.d.ts +7 -0
  248. package/dist/dts/data-editor/use-cells-for-selection.d.ts.map +1 -0
  249. package/dist/dts/data-editor/use-column-sizer.d.ts +11 -0
  250. package/dist/dts/data-editor/use-column-sizer.d.ts.map +1 -0
  251. package/dist/dts/data-editor/use-initial-scroll-offset.d.ts +9 -0
  252. package/dist/dts/data-editor/use-initial-scroll-offset.d.ts.map +1 -0
  253. package/dist/dts/data-editor/use-rem-adjuster.d.ts +22 -0
  254. package/dist/dts/data-editor/use-rem-adjuster.d.ts.map +1 -0
  255. package/dist/dts/data-editor/visible-region.d.ts +19 -0
  256. package/dist/dts/data-editor/visible-region.d.ts.map +1 -0
  257. package/dist/dts/data-editor-all.d.ts +8 -0
  258. package/dist/dts/data-editor-all.d.ts.map +1 -0
  259. package/dist/dts/index.d.ts +52 -0
  260. package/dist/dts/index.d.ts.map +1 -0
  261. package/dist/dts/internal/click-outside-container/click-outside-container.d.ts +15 -0
  262. package/dist/dts/internal/click-outside-container/click-outside-container.d.ts.map +1 -0
  263. package/dist/dts/internal/data-editor-container/data-grid-container.d.ts +10 -0
  264. package/dist/dts/internal/data-editor-container/data-grid-container.d.ts.map +1 -0
  265. package/dist/dts/internal/data-grid/animation-manager.d.ts +26 -0
  266. package/dist/dts/internal/data-grid/animation-manager.d.ts.map +1 -0
  267. package/dist/dts/internal/data-grid/cell-set.d.ts +17 -0
  268. package/dist/dts/internal/data-grid/cell-set.d.ts.map +1 -0
  269. package/dist/dts/internal/data-grid/color-parser.d.ts +16 -0
  270. package/dist/dts/internal/data-grid/color-parser.d.ts.map +1 -0
  271. package/dist/dts/internal/data-grid/data-grid-sprites.d.ts +35 -0
  272. package/dist/dts/internal/data-grid/data-grid-sprites.d.ts.map +1 -0
  273. package/dist/dts/internal/data-grid/data-grid-types.d.ts +443 -0
  274. package/dist/dts/internal/data-grid/data-grid-types.d.ts.map +1 -0
  275. package/dist/dts/internal/data-grid/data-grid.d.ts +244 -0
  276. package/dist/dts/internal/data-grid/data-grid.d.ts.map +1 -0
  277. package/dist/dts/internal/data-grid/event-args.d.ts +117 -0
  278. package/dist/dts/internal/data-grid/event-args.d.ts.map +1 -0
  279. package/dist/dts/internal/data-grid/image-window-loader-interface.d.ts +9 -0
  280. package/dist/dts/internal/data-grid/image-window-loader-interface.d.ts.map +1 -0
  281. package/dist/dts/internal/data-grid/render/data-grid-lib.d.ts +60 -0
  282. package/dist/dts/internal/data-grid/render/data-grid-lib.d.ts.map +1 -0
  283. package/dist/dts/internal/data-grid/render/data-grid-render.blit.d.ts +20 -0
  284. package/dist/dts/internal/data-grid/render/data-grid-render.blit.d.ts.map +1 -0
  285. package/dist/dts/internal/data-grid/render/data-grid-render.cells.d.ts +32 -0
  286. package/dist/dts/internal/data-grid/render/data-grid-render.cells.d.ts.map +1 -0
  287. package/dist/dts/internal/data-grid/render/data-grid-render.d.ts +3 -0
  288. package/dist/dts/internal/data-grid/render/data-grid-render.d.ts.map +1 -0
  289. package/dist/dts/internal/data-grid/render/data-grid-render.header.d.ts +22 -0
  290. package/dist/dts/internal/data-grid/render/data-grid-render.header.d.ts.map +1 -0
  291. package/dist/dts/internal/data-grid/render/data-grid-render.lines.d.ts +10 -0
  292. package/dist/dts/internal/data-grid/render/data-grid-render.lines.d.ts.map +1 -0
  293. package/dist/dts/internal/data-grid/render/data-grid-render.walk.d.ts +14 -0
  294. package/dist/dts/internal/data-grid/render/data-grid-render.walk.d.ts.map +1 -0
  295. package/dist/dts/internal/data-grid/render/data-grid.render.rings.d.ts +8 -0
  296. package/dist/dts/internal/data-grid/render/data-grid.render.rings.d.ts.map +1 -0
  297. package/dist/dts/internal/data-grid/render/draw-checkbox.d.ts +4 -0
  298. package/dist/dts/internal/data-grid/render/draw-checkbox.d.ts.map +1 -0
  299. package/dist/dts/internal/data-grid/render/draw-edit-hover-indicator.d.ts +4 -0
  300. package/dist/dts/internal/data-grid/render/draw-edit-hover-indicator.d.ts.map +1 -0
  301. package/dist/dts/internal/data-grid/render/draw-grid-arg.d.ts +73 -0
  302. package/dist/dts/internal/data-grid/render/draw-grid-arg.d.ts.map +1 -0
  303. package/dist/dts/internal/data-grid/sprites.d.ts +34 -0
  304. package/dist/dts/internal/data-grid/sprites.d.ts.map +1 -0
  305. package/dist/dts/internal/data-grid/use-animation-queue.d.ts +5 -0
  306. package/dist/dts/internal/data-grid/use-animation-queue.d.ts.map +1 -0
  307. package/dist/dts/internal/data-grid/use-selection-behavior.d.ts +13 -0
  308. package/dist/dts/internal/data-grid/use-selection-behavior.d.ts.map +1 -0
  309. package/dist/dts/internal/data-grid-dnd/data-grid-dnd.d.ts +63 -0
  310. package/dist/dts/internal/data-grid-dnd/data-grid-dnd.d.ts.map +1 -0
  311. package/dist/dts/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.d.ts +9 -0
  312. package/dist/dts/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.d.ts.map +1 -0
  313. package/dist/dts/internal/data-grid-overlay-editor/data-grid-overlay-editor.d.ts +32 -0
  314. package/dist/dts/internal/data-grid-overlay-editor/data-grid-overlay-editor.d.ts.map +1 -0
  315. package/dist/dts/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.d.ts +2 -0
  316. package/dist/dts/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.d.ts.map +1 -0
  317. package/dist/dts/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.d.ts +7 -0
  318. package/dist/dts/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.d.ts.map +1 -0
  319. package/dist/dts/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.d.ts +8 -0
  320. package/dist/dts/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.d.ts.map +1 -0
  321. package/dist/dts/internal/data-grid-overlay-editor/private/image-overlay-editor-style.d.ts +2 -0
  322. package/dist/dts/internal/data-grid-overlay-editor/private/image-overlay-editor-style.d.ts.map +1 -0
  323. package/dist/dts/internal/data-grid-overlay-editor/private/image-overlay-editor.d.ts +13 -0
  324. package/dist/dts/internal/data-grid-overlay-editor/private/image-overlay-editor.d.ts.map +1 -0
  325. package/dist/dts/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.d.ts +6 -0
  326. package/dist/dts/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.d.ts.map +1 -0
  327. package/dist/dts/internal/data-grid-overlay-editor/private/markdown-overlay-editor.d.ts +14 -0
  328. package/dist/dts/internal/data-grid-overlay-editor/private/markdown-overlay-editor.d.ts.map +1 -0
  329. package/dist/dts/internal/data-grid-overlay-editor/private/number-overlay-editor-style.d.ts +2 -0
  330. package/dist/dts/internal/data-grid-overlay-editor/private/number-overlay-editor-style.d.ts.map +1 -0
  331. package/dist/dts/internal/data-grid-overlay-editor/private/number-overlay-editor.d.ts +17 -0
  332. package/dist/dts/internal/data-grid-overlay-editor/private/number-overlay-editor.d.ts.map +1 -0
  333. package/dist/dts/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.d.ts +2 -0
  334. package/dist/dts/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.d.ts.map +1 -0
  335. package/dist/dts/internal/data-grid-overlay-editor/private/uri-overlay-editor.d.ts +13 -0
  336. package/dist/dts/internal/data-grid-overlay-editor/private/uri-overlay-editor.d.ts.map +1 -0
  337. package/dist/dts/internal/data-grid-overlay-editor/use-stay-on-screen.d.ts +8 -0
  338. package/dist/dts/internal/data-grid-overlay-editor/use-stay-on-screen.d.ts.map +1 -0
  339. package/dist/dts/internal/data-grid-search/data-grid-search-style.d.ts +2 -0
  340. package/dist/dts/internal/data-grid-search/data-grid-search-style.d.ts.map +1 -0
  341. package/dist/dts/internal/data-grid-search/data-grid-search.d.ts +41 -0
  342. package/dist/dts/internal/data-grid-search/data-grid-search.d.ts.map +1 -0
  343. package/dist/dts/internal/growing-entry/growing-entry-style.d.ts +4 -0
  344. package/dist/dts/internal/growing-entry/growing-entry-style.d.ts.map +1 -0
  345. package/dist/dts/internal/growing-entry/growing-entry.d.ts +12 -0
  346. package/dist/dts/internal/growing-entry/growing-entry.d.ts.map +1 -0
  347. package/dist/dts/internal/markdown-div/markdown-div.d.ts +14 -0
  348. package/dist/dts/internal/markdown-div/markdown-div.d.ts.map +1 -0
  349. package/dist/dts/internal/markdown-div/private/markdown-container.d.ts +2 -0
  350. package/dist/dts/internal/markdown-div/private/markdown-container.d.ts.map +1 -0
  351. package/dist/dts/internal/scrolling-data-grid/infinite-scroller.d.ts +38 -0
  352. package/dist/dts/internal/scrolling-data-grid/infinite-scroller.d.ts.map +1 -0
  353. package/dist/dts/internal/scrolling-data-grid/scrolling-data-grid.d.ts +57 -0
  354. package/dist/dts/internal/scrolling-data-grid/scrolling-data-grid.d.ts.map +1 -0
  355. package/dist/dts/internal/scrolling-data-grid/use-kinetic-scroll.d.ts +3 -0
  356. package/dist/dts/internal/scrolling-data-grid/use-kinetic-scroll.d.ts.map +1 -0
  357. package/dist/esm/cells/boolean-cell.js +87 -0
  358. package/dist/esm/cells/boolean-cell.js.map +1 -0
  359. package/dist/esm/cells/bubble-cell.js +53 -0
  360. package/dist/esm/cells/bubble-cell.js.map +1 -0
  361. package/dist/esm/cells/cell-types.js +2 -0
  362. package/dist/esm/cells/cell-types.js.map +1 -0
  363. package/dist/esm/cells/drilldown-cell.js +171 -0
  364. package/dist/esm/cells/drilldown-cell.js.map +1 -0
  365. package/dist/esm/cells/image-cell.js +94 -0
  366. package/dist/esm/cells/image-cell.js.map +1 -0
  367. package/dist/esm/cells/index.js +30 -0
  368. package/dist/esm/cells/index.js.map +1 -0
  369. package/dist/esm/cells/loading-cell.js +41 -0
  370. package/dist/esm/cells/loading-cell.js.map +1 -0
  371. package/dist/esm/cells/markdown-cell.js +30 -0
  372. package/dist/esm/cells/markdown-cell.js.map +1 -0
  373. package/dist/esm/cells/marker-cell.js +80 -0
  374. package/dist/esm/cells/marker-cell.js.map +1 -0
  375. package/dist/esm/cells/new-row-cell.js +53 -0
  376. package/dist/esm/cells/new-row-cell.js.map +1 -0
  377. package/dist/esm/cells/number-cell.js +44 -0
  378. package/dist/esm/cells/number-cell.js.map +1 -0
  379. package/dist/esm/cells/protected-cell.js +35 -0
  380. package/dist/esm/cells/protected-cell.js.map +1 -0
  381. package/dist/esm/cells/row-id-cell.js +23 -0
  382. package/dist/esm/cells/row-id-cell.js.map +1 -0
  383. package/dist/esm/cells/text-cell.js +48 -0
  384. package/dist/esm/cells/text-cell.js.map +1 -0
  385. package/dist/esm/cells/uri-cell.js +104 -0
  386. package/dist/esm/cells/uri-cell.js.map +1 -0
  387. package/dist/esm/common/browser-detect.js +20 -0
  388. package/dist/esm/common/browser-detect.js.map +1 -0
  389. package/dist/esm/common/image-window-loader.js +98 -0
  390. package/dist/esm/common/image-window-loader.js.map +1 -0
  391. package/dist/esm/common/is-hotkey.js +76 -0
  392. package/dist/esm/common/is-hotkey.js.map +1 -0
  393. package/dist/esm/common/math.js +297 -0
  394. package/dist/esm/common/math.js.map +1 -0
  395. package/dist/esm/common/render-state-provider.js +70 -0
  396. package/dist/esm/common/render-state-provider.js.map +1 -0
  397. package/dist/esm/common/resize-detector.js +27 -0
  398. package/dist/esm/common/resize-detector.js.map +1 -0
  399. package/dist/esm/common/styles.js +135 -0
  400. package/dist/esm/common/styles.js.map +1 -0
  401. package/dist/esm/common/support.js +60 -0
  402. package/dist/esm/common/support.js.map +1 -0
  403. package/dist/esm/common/utils.js +193 -0
  404. package/dist/esm/common/utils.js.map +1 -0
  405. package/dist/esm/data-editor/copy-paste.js +269 -0
  406. package/dist/esm/data-editor/copy-paste.js.map +1 -0
  407. package/dist/esm/data-editor/data-editor-fns.js +197 -0
  408. package/dist/esm/data-editor/data-editor-fns.js.map +1 -0
  409. package/dist/esm/data-editor/data-editor-keybindings.js +126 -0
  410. package/dist/esm/data-editor/data-editor-keybindings.js.map +1 -0
  411. package/dist/esm/data-editor/data-editor.js +2892 -0
  412. package/dist/esm/data-editor/data-editor.js.map +1 -0
  413. package/dist/esm/data-editor/group-rename.css +2 -0
  414. package/dist/esm/data-editor/group-rename.js +49 -0
  415. package/dist/esm/data-editor/group-rename.js.map +1 -0
  416. package/dist/esm/data-editor/row-grouping-api.js +34 -0
  417. package/dist/esm/data-editor/row-grouping-api.js.map +1 -0
  418. package/dist/esm/data-editor/row-grouping.js +189 -0
  419. package/dist/esm/data-editor/row-grouping.js.map +1 -0
  420. package/dist/esm/data-editor/use-autoscroll.js +36 -0
  421. package/dist/esm/data-editor/use-autoscroll.js.map +1 -0
  422. package/dist/esm/data-editor/use-cells-for-selection.js +53 -0
  423. package/dist/esm/data-editor/use-cells-for-selection.js.map +1 -0
  424. package/dist/esm/data-editor/use-column-sizer.js +189 -0
  425. package/dist/esm/data-editor/use-column-sizer.js.map +1 -0
  426. package/dist/esm/data-editor/use-initial-scroll-offset.js +81 -0
  427. package/dist/esm/data-editor/use-initial-scroll-offset.js.map +1 -0
  428. package/dist/esm/data-editor/use-rem-adjuster.js +29 -0
  429. package/dist/esm/data-editor/use-rem-adjuster.js.map +1 -0
  430. package/dist/esm/data-editor/visible-region.js +2 -0
  431. package/dist/esm/data-editor/visible-region.js.map +1 -0
  432. package/dist/esm/data-editor-all.js +19 -0
  433. package/dist/esm/data-editor-all.js.map +1 -0
  434. package/dist/esm/index.js +36 -0
  435. package/dist/esm/index.js.map +1 -0
  436. package/dist/esm/internal/click-outside-container/click-outside-container.js +34 -0
  437. package/dist/esm/internal/click-outside-container/click-outside-container.js.map +1 -0
  438. package/dist/esm/internal/data-editor-container/data-grid-container.js +36 -0
  439. package/dist/esm/internal/data-editor-container/data-grid-container.js.map +1 -0
  440. package/dist/esm/internal/data-grid/animation-manager.js +95 -0
  441. package/dist/esm/internal/data-grid/animation-manager.js.map +1 -0
  442. package/dist/esm/internal/data-grid/cell-set.js +56 -0
  443. package/dist/esm/internal/data-grid/cell-set.js.map +1 -0
  444. package/dist/esm/internal/data-grid/color-parser.js +122 -0
  445. package/dist/esm/internal/data-grid/color-parser.js.map +1 -0
  446. package/dist/esm/internal/data-grid/data-grid-sprites.js +65 -0
  447. package/dist/esm/internal/data-grid/data-grid-sprites.js.map +1 -0
  448. package/dist/esm/internal/data-grid/data-grid-types.js +299 -0
  449. package/dist/esm/internal/data-grid/data-grid-types.js.map +1 -0
  450. package/dist/esm/internal/data-grid/data-grid.js +1209 -0
  451. package/dist/esm/internal/data-grid/data-grid.js.map +1 -0
  452. package/dist/esm/internal/data-grid/event-args.js +30 -0
  453. package/dist/esm/internal/data-grid/event-args.js.map +1 -0
  454. package/dist/esm/internal/data-grid/image-window-loader-interface.js +2 -0
  455. package/dist/esm/internal/data-grid/image-window-loader-interface.js.map +1 -0
  456. package/dist/esm/internal/data-grid/render/data-grid-lib.js +653 -0
  457. package/dist/esm/internal/data-grid/render/data-grid-lib.js.map +1 -0
  458. package/dist/esm/internal/data-grid/render/data-grid-render.blit.js +219 -0
  459. package/dist/esm/internal/data-grid/render/data-grid-render.blit.js.map +1 -0
  460. package/dist/esm/internal/data-grid/render/data-grid-render.cells.js +370 -0
  461. package/dist/esm/internal/data-grid/render/data-grid-render.cells.js.map +1 -0
  462. package/dist/esm/internal/data-grid/render/data-grid-render.header.js +440 -0
  463. package/dist/esm/internal/data-grid/render/data-grid-render.header.js.map +1 -0
  464. package/dist/esm/internal/data-grid/render/data-grid-render.js +320 -0
  465. package/dist/esm/internal/data-grid/render/data-grid-render.js.map +1 -0
  466. package/dist/esm/internal/data-grid/render/data-grid-render.lines.js +261 -0
  467. package/dist/esm/internal/data-grid/render/data-grid-render.lines.js.map +1 -0
  468. package/dist/esm/internal/data-grid/render/data-grid-render.walk.js +158 -0
  469. package/dist/esm/internal/data-grid/render/data-grid-render.walk.js.map +1 -0
  470. package/dist/esm/internal/data-grid/render/data-grid.render.rings.js +205 -0
  471. package/dist/esm/internal/data-grid/render/data-grid.render.rings.js.map +1 -0
  472. package/dist/esm/internal/data-grid/render/draw-checkbox.js +65 -0
  473. package/dist/esm/internal/data-grid/render/draw-checkbox.js.map +1 -0
  474. package/dist/esm/internal/data-grid/render/draw-edit-hover-indicator.js +38 -0
  475. package/dist/esm/internal/data-grid/render/draw-edit-hover-indicator.js.map +1 -0
  476. package/dist/esm/internal/data-grid/render/draw-grid-arg.js +2 -0
  477. package/dist/esm/internal/data-grid/render/draw-grid-arg.js.map +1 -0
  478. package/dist/esm/internal/data-grid/sprites.js +288 -0
  479. package/dist/esm/internal/data-grid/sprites.js.map +1 -0
  480. package/dist/esm/internal/data-grid/use-animation-queue.js +34 -0
  481. package/dist/esm/internal/data-grid/use-animation-queue.js.map +1 -0
  482. package/dist/esm/internal/data-grid/use-selection-behavior.js +112 -0
  483. package/dist/esm/internal/data-grid/use-selection-behavior.js.map +1 -0
  484. package/dist/esm/internal/data-grid-dnd/data-grid-dnd.js +239 -0
  485. package/dist/esm/internal/data-grid-dnd/data-grid-dnd.js.map +1 -0
  486. package/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js +77 -0
  487. package/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js.map +1 -0
  488. package/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor.js +124 -0
  489. package/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor.js.map +1 -0
  490. package/dist/esm/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.js +34 -0
  491. package/dist/esm/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.js.map +1 -0
  492. package/dist/esm/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.js +10 -0
  493. package/dist/esm/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.js.map +1 -0
  494. package/dist/esm/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.js +50 -0
  495. package/dist/esm/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.js.map +1 -0
  496. package/dist/esm/internal/data-grid-overlay-editor/private/image-overlay-editor-style.js +56 -0
  497. package/dist/esm/internal/data-grid-overlay-editor/private/image-overlay-editor-style.js.map +1 -0
  498. package/dist/esm/internal/data-grid-overlay-editor/private/image-overlay-editor.js +21 -0
  499. package/dist/esm/internal/data-grid-overlay-editor/private/image-overlay-editor.js.map +1 -0
  500. package/dist/esm/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.js +76 -0
  501. package/dist/esm/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.js.map +1 -0
  502. package/dist/esm/internal/data-grid-overlay-editor/private/markdown-overlay-editor.js +32 -0
  503. package/dist/esm/internal/data-grid-overlay-editor/private/markdown-overlay-editor.js.map +1 -0
  504. package/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js +15 -0
  505. package/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js.map +1 -0
  506. package/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor.js +30 -0
  507. package/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor.js.map +1 -0
  508. package/dist/esm/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.js +53 -0
  509. package/dist/esm/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.js.map +1 -0
  510. package/dist/esm/internal/data-grid-overlay-editor/private/uri-overlay-editor.js +21 -0
  511. package/dist/esm/internal/data-grid-overlay-editor/private/uri-overlay-editor.js.map +1 -0
  512. package/dist/esm/internal/data-grid-overlay-editor/use-stay-on-screen.js +47 -0
  513. package/dist/esm/internal/data-grid-overlay-editor/use-stay-on-screen.js.map +1 -0
  514. package/dist/esm/internal/data-grid-search/data-grid-search-style.js +96 -0
  515. package/dist/esm/internal/data-grid-search/data-grid-search-style.js.map +1 -0
  516. package/dist/esm/internal/data-grid-search/data-grid-search.js +297 -0
  517. package/dist/esm/internal/data-grid-search/data-grid-search.js.map +1 -0
  518. package/dist/esm/internal/growing-entry/growing-entry-style.js +60 -0
  519. package/dist/esm/internal/growing-entry/growing-entry-style.js.map +1 -0
  520. package/dist/esm/internal/growing-entry/growing-entry.js +41 -0
  521. package/dist/esm/internal/growing-entry/growing-entry.js.map +1 -0
  522. package/dist/esm/internal/markdown-div/markdown-div.js +41 -0
  523. package/dist/esm/internal/markdown-div/markdown-div.js.map +1 -0
  524. package/dist/esm/internal/markdown-div/private/markdown-container.js +19 -0
  525. package/dist/esm/internal/markdown-div/private/markdown-container.js.map +1 -0
  526. package/dist/esm/internal/scrolling-data-grid/infinite-scroller.js +265 -0
  527. package/dist/esm/internal/scrolling-data-grid/infinite-scroller.js.map +1 -0
  528. package/dist/esm/internal/scrolling-data-grid/scrolling-data-grid.js +155 -0
  529. package/dist/esm/internal/scrolling-data-grid/scrolling-data-grid.js.map +1 -0
  530. package/dist/esm/internal/scrolling-data-grid/use-kinetic-scroll.js +65 -0
  531. package/dist/esm/internal/scrolling-data-grid/use-kinetic-scroll.js.map +1 -0
  532. package/dist/index.css +2 -0
  533. package/package.json +81 -0
  534. package/src/cells/boolean-cell.tsx +135 -0
  535. package/src/cells/bubble-cell.tsx +68 -0
  536. package/src/cells/cell-types.ts +124 -0
  537. package/src/cells/drilldown-cell.tsx +244 -0
  538. package/src/cells/image-cell.tsx +117 -0
  539. package/src/cells/index.ts +31 -0
  540. package/src/cells/loading-cell.tsx +56 -0
  541. package/src/cells/markdown-cell.tsx +44 -0
  542. package/src/cells/marker-cell.tsx +110 -0
  543. package/src/cells/new-row-cell.tsx +60 -0
  544. package/src/cells/number-cell.tsx +64 -0
  545. package/src/cells/protected-cell.tsx +42 -0
  546. package/src/cells/row-id-cell.tsx +35 -0
  547. package/src/cells/text-cell.tsx +63 -0
  548. package/src/cells/uri-cell.tsx +155 -0
  549. package/src/common/browser-detect.ts +25 -0
  550. package/src/common/image-window-loader.ts +114 -0
  551. package/src/common/is-hotkey.ts +86 -0
  552. package/src/common/math.ts +357 -0
  553. package/src/common/render-state-provider.ts +87 -0
  554. package/src/common/resize-detector.ts +43 -0
  555. package/src/common/styles.ts +214 -0
  556. package/src/common/support.ts +67 -0
  557. package/src/common/utils.tsx +284 -0
  558. package/src/data-editor/copy-paste.ts +320 -0
  559. package/src/data-editor/data-editor-fns.ts +227 -0
  560. package/src/data-editor/data-editor-keybindings.ts +198 -0
  561. package/src/data-editor/data-editor.tsx +4382 -0
  562. package/src/data-editor/group-rename.tsx +67 -0
  563. package/src/data-editor/row-grouping-api.ts +72 -0
  564. package/src/data-editor/row-grouping.ts +326 -0
  565. package/src/data-editor/stories/data-editor-repros.stories.tsx +107 -0
  566. package/src/data-editor/stories/data-editor.stories.tsx +796 -0
  567. package/src/data-editor/stories/utils.tsx +827 -0
  568. package/src/data-editor/use-autoscroll.ts +41 -0
  569. package/src/data-editor/use-cells-for-selection.ts +72 -0
  570. package/src/data-editor/use-column-sizer.ts +253 -0
  571. package/src/data-editor/use-initial-scroll-offset.ts +102 -0
  572. package/src/data-editor/use-rem-adjuster.ts +59 -0
  573. package/src/data-editor/visible-region.ts +20 -0
  574. package/src/data-editor-all.tsx +36 -0
  575. package/src/docs/00-faq.stories.tsx +63 -0
  576. package/src/docs/01-getting-started.stories.tsx +299 -0
  577. package/src/docs/02-editing-data.stories.tsx +365 -0
  578. package/src/docs/03-grid-column.stories.tsx +146 -0
  579. package/src/docs/04-streaming-data.stories.tsx +434 -0
  580. package/src/docs/05-copy-paste.stories.tsx.tsx +279 -0
  581. package/src/docs/06-search.stories.tsx +219 -0
  582. package/src/docs/07-column-grouping.stories.tsx +212 -0
  583. package/src/docs/08-theming.stories.tsx +409 -0
  584. package/src/docs/09-menus.stories.tsx +344 -0
  585. package/src/docs/doc-wrapper.tsx +512 -0
  586. package/src/docs/examples/add-column.stories.tsx +62 -0
  587. package/src/docs/examples/add-data-to-middle.stories.tsx +93 -0
  588. package/src/docs/examples/add-data-to-top.stories.tsx +70 -0
  589. package/src/docs/examples/add-data.stories.tsx +74 -0
  590. package/src/docs/examples/all-cell-kinds.stories.tsx +61 -0
  591. package/src/docs/examples/append-row-handle.stories.tsx +79 -0
  592. package/src/docs/examples/automatic-row-markers.stories.tsx +57 -0
  593. package/src/docs/examples/built-in-search.stories.tsx +83 -0
  594. package/src/docs/examples/cell-activated-event.stories.tsx +92 -0
  595. package/src/docs/examples/column-group-collapse.stories.tsx +105 -0
  596. package/src/docs/examples/column-groups.stories.tsx +51 -0
  597. package/src/docs/examples/content-alignment.stories.tsx +64 -0
  598. package/src/docs/examples/controlled-search.stories.tsx +93 -0
  599. package/src/docs/examples/controlled-selection.stories.tsx +98 -0
  600. package/src/docs/examples/copy-support.stories.tsx +63 -0
  601. package/src/docs/examples/custom-editors.stories.tsx +90 -0
  602. package/src/docs/examples/custom-event-target.stories.tsx +157 -0
  603. package/src/docs/examples/custom-group-header.stories.tsx +423 -0
  604. package/src/docs/examples/custom-header-icons.stories.tsx +76 -0
  605. package/src/docs/examples/custom-header.stories.tsx +67 -0
  606. package/src/docs/examples/custom-renderers.stories.tsx +72 -0
  607. package/src/docs/examples/drag-source.stories.tsx +63 -0
  608. package/src/docs/examples/drop-events.stories.tsx +155 -0
  609. package/src/docs/examples/fill-handle.stories.tsx +118 -0
  610. package/src/docs/examples/freeze-columns.stories.tsx +59 -0
  611. package/src/docs/examples/freeze-rows.stories.tsx +71 -0
  612. package/src/docs/examples/get-mouse-args.stories.tsx +61 -0
  613. package/src/docs/examples/header-menus.stories.tsx +162 -0
  614. package/src/docs/examples/highlight-cells.stories.tsx +84 -0
  615. package/src/docs/examples/imperative-scroll.stories.tsx +96 -0
  616. package/src/docs/examples/input-blending.stories.tsx +116 -0
  617. package/src/docs/examples/keybindings.stories.tsx +90 -0
  618. package/src/docs/examples/layout-integration.stories.tsx +48 -0
  619. package/src/docs/examples/multi-level-column-groups.stories.tsx +119 -0
  620. package/src/docs/examples/multi-select-columns.stories.tsx +47 -0
  621. package/src/docs/examples/new-column-button.stories.tsx +56 -0
  622. package/src/docs/examples/obscured-grid.stories.tsx +70 -0
  623. package/src/docs/examples/observe-visible-region.stories.tsx +56 -0
  624. package/src/docs/examples/one-hundred-thousand-columns.stories.tsx +31 -0
  625. package/src/docs/examples/one-million-rows.stories.tsx +37 -0
  626. package/src/docs/examples/overscroll.stories.tsx +74 -0
  627. package/src/docs/examples/padding.stories.tsx +74 -0
  628. package/src/docs/examples/paste-support.stories.tsx +73 -0
  629. package/src/docs/examples/prevent-diagonal-scroll.stories.tsx +47 -0
  630. package/src/docs/examples/rapid-updates.stories.tsx +108 -0
  631. package/src/docs/examples/rearrange-columns.stories.tsx +76 -0
  632. package/src/docs/examples/reorder-rows.stories.tsx +83 -0
  633. package/src/docs/examples/resizable-columns.stories.tsx +67 -0
  634. package/src/docs/examples/right-element.stories.tsx +87 -0
  635. package/src/docs/examples/right-to-left.stories.tsx +73 -0
  636. package/src/docs/examples/row-and-header-sizes.stories.tsx +75 -0
  637. package/src/docs/examples/row-grouping.stories.tsx +142 -0
  638. package/src/docs/examples/row-hover.stories.tsx +67 -0
  639. package/src/docs/examples/row-markers.stories.tsx +74 -0
  640. package/src/docs/examples/row-selections.stories.tsx +84 -0
  641. package/src/docs/examples/scaled-view.stories.tsx +36 -0
  642. package/src/docs/examples/scroll-offset.stories.tsx +49 -0
  643. package/src/docs/examples/scroll-shadows.stories.tsx +83 -0
  644. package/src/docs/examples/search-as-filter.stories.tsx +76 -0
  645. package/src/docs/examples/selection-serialization.stories.tsx +208 -0
  646. package/src/docs/examples/server-side-data.stories.tsx +219 -0
  647. package/src/docs/examples/shadow-dom.stories.tsx +107 -0
  648. package/src/docs/examples/silly-numbers.stories.tsx +40 -0
  649. package/src/docs/examples/small-editable-grid.stories.tsx +39 -0
  650. package/src/docs/examples/smooth-scrolling-grid.stories.tsx +56 -0
  651. package/src/docs/examples/span-cell.stories.tsx +99 -0
  652. package/src/docs/examples/stretch-column-size.stories.tsx +55 -0
  653. package/src/docs/examples/ten-million-cells.stories.tsx +34 -0
  654. package/src/docs/examples/theme-per-column.stories.tsx +88 -0
  655. package/src/docs/examples/theme-per-row.stories.tsx +73 -0
  656. package/src/docs/examples/theme-support.stories.tsx +150 -0
  657. package/src/docs/examples/tooltips.stories.tsx +119 -0
  658. package/src/docs/examples/trailing-row-options.stories.tsx +106 -0
  659. package/src/docs/examples/uneven-rows.stories.tsx +44 -0
  660. package/src/docs/examples/validate-data.stories.tsx +63 -0
  661. package/src/docs/examples/wrapping-text.stories.tsx +97 -0
  662. package/src/docs/template.tsx +69 -0
  663. package/src/index.ts +87 -0
  664. package/src/internal/click-outside-container/click-outside-container.tsx +50 -0
  665. package/src/internal/data-editor-container/data-grid-container.tsx +48 -0
  666. package/src/internal/data-grid/animation-manager.ts +119 -0
  667. package/src/internal/data-grid/cell-set.ts +65 -0
  668. package/src/internal/data-grid/color-parser.ts +141 -0
  669. package/src/internal/data-grid/data-grid-sprites.ts +107 -0
  670. package/src/internal/data-grid/data-grid-types.ts +742 -0
  671. package/src/internal/data-grid/data-grid.stories.tsx +410 -0
  672. package/src/internal/data-grid/data-grid.tsx +1978 -0
  673. package/src/internal/data-grid/event-args.ts +157 -0
  674. package/src/internal/data-grid/image-window-loader-interface.ts +9 -0
  675. package/src/internal/data-grid/render/data-grid-lib.ts +906 -0
  676. package/src/internal/data-grid/render/data-grid-render.blit.ts +291 -0
  677. package/src/internal/data-grid/render/data-grid-render.cells.ts +564 -0
  678. package/src/internal/data-grid/render/data-grid-render.header.ts +842 -0
  679. package/src/internal/data-grid/render/data-grid-render.lines.ts +379 -0
  680. package/src/internal/data-grid/render/data-grid-render.ts +825 -0
  681. package/src/internal/data-grid/render/data-grid-render.walk.ts +243 -0
  682. package/src/internal/data-grid/render/data-grid.render.rings.ts +348 -0
  683. package/src/internal/data-grid/render/draw-checkbox.ts +122 -0
  684. package/src/internal/data-grid/render/draw-edit-hover-indicator.ts +61 -0
  685. package/src/internal/data-grid/render/draw-grid-arg.ts +85 -0
  686. package/src/internal/data-grid/sprites.ts +321 -0
  687. package/src/internal/data-grid/use-animation-queue.ts +41 -0
  688. package/src/internal/data-grid/use-selection-behavior.ts +152 -0
  689. package/src/internal/data-grid-dnd/data-grid-dnd.tsx +450 -0
  690. package/src/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.tsx +83 -0
  691. package/src/internal/data-grid-overlay-editor/data-grid-overlay-editor.tsx +262 -0
  692. package/src/internal/data-grid-overlay-editor/private/bubbles-overlay-editor-style.tsx +34 -0
  693. package/src/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.tsx +21 -0
  694. package/src/internal/data-grid-overlay-editor/private/drilldown-overlay-editor.tsx +63 -0
  695. package/src/internal/data-grid-overlay-editor/private/image-overlay-editor-style.tsx +56 -0
  696. package/src/internal/data-grid-overlay-editor/private/image-overlay-editor.tsx +51 -0
  697. package/src/internal/data-grid-overlay-editor/private/markdown-overlay-editor-style.tsx +80 -0
  698. package/src/internal/data-grid-overlay-editor/private/markdown-overlay-editor.tsx +65 -0
  699. package/src/internal/data-grid-overlay-editor/private/number-overlay-editor-style.tsx +15 -0
  700. package/src/internal/data-grid-overlay-editor/private/number-overlay-editor.tsx +77 -0
  701. package/src/internal/data-grid-overlay-editor/private/uri-overlay-editor-style.tsx +53 -0
  702. package/src/internal/data-grid-overlay-editor/private/uri-overlay-editor.tsx +52 -0
  703. package/src/internal/data-grid-overlay-editor/use-stay-on-screen.ts +61 -0
  704. package/src/internal/data-grid-search/data-grid-search-style.tsx +96 -0
  705. package/src/internal/data-grid-search/data-grid-search.tsx +578 -0
  706. package/src/internal/growing-entry/growing-entry-style.tsx +62 -0
  707. package/src/internal/growing-entry/growing-entry.tsx +74 -0
  708. package/src/internal/markdown-div/markdown-div.tsx +55 -0
  709. package/src/internal/markdown-div/private/markdown-container.tsx +19 -0
  710. package/src/internal/scrolling-data-grid/infinite-scroller.tsx +379 -0
  711. package/src/internal/scrolling-data-grid/scrolling-data-grid.stories.tsx +164 -0
  712. package/src/internal/scrolling-data-grid/scrolling-data-grid.tsx +353 -0
  713. package/src/internal/scrolling-data-grid/use-kinetic-scroll.ts +78 -0
  714. package/src/stories/story-utils.tsx +72 -0
  715. package/test/animation-manager.test.ts +147 -0
  716. package/test/cells.test.tsx +122 -0
  717. package/test/click-outside-container.test.tsx +62 -0
  718. package/test/color-parser.test.ts +68 -0
  719. package/test/common.test.ts +74 -0
  720. package/test/compact-selection.test.ts +221 -0
  721. package/test/copy-paste.test.ts +485 -0
  722. package/test/data-editor-fns.test.ts +153 -0
  723. package/test/data-editor-input.test.tsx +683 -0
  724. package/test/data-editor-resize.test.tsx +271 -0
  725. package/test/data-editor.test.tsx +4945 -0
  726. package/test/data-grid-lib.test.ts +457 -0
  727. package/test/data-grid-overlay.test.tsx +67 -0
  728. package/test/data-grid-types.test.ts +52 -0
  729. package/test/data-grid.test.tsx +399 -0
  730. package/test/image-window-loader.test.ts +211 -0
  731. package/test/math.test.ts +201 -0
  732. package/test/render-state-provider.test.ts +86 -0
  733. package/test/row-grouping-api.test.ts +77 -0
  734. package/test/row-grouping.test.ts +586 -0
  735. package/test/test-utils.tsx +365 -0
  736. package/test/uri-cell.test.ts +124 -0
  737. package/test/use-animation-queue.test.ts +53 -0
  738. package/test/use-autoscroll.test.tsx +108 -0
  739. package/test/use-column-sizer.test.tsx +414 -0
  740. package/test/use-deep-memo.test.ts +41 -0
  741. package/test/use-kinetic-scroll.test.ts +57 -0
  742. package/test/use-rem-adjuster.test.ts +69 -0
  743. package/test/utils.test.ts +127 -0
  744. package/vitest.config.ts +40 -0
  745. package/vitest.setup.ts +13 -0
package/API.md ADDED
@@ -0,0 +1,1466 @@
1
+ # Basic Usage
2
+
3
+ ## HTML/CSS Prerequisites
4
+
5
+ The Grid depends on there being a root level "portal" div in your HTML. Insert this snippet as the last child of your `<body>` tag:
6
+
7
+ ```HTML
8
+ <div id="portal" style="position: fixed; left: 0; top: 0; z-index: 9999;" />
9
+ ```
10
+
11
+ or you can create a portal element yourself using the `createPortal` function from `react-dom` and pass it to the DataEditor via the `portalElementRef` prop.
12
+
13
+ ```jsx
14
+ const portalRef = useRef(null);
15
+ <>
16
+ {
17
+ createPortal(
18
+ <div ref={portalRef} style="position: fixed; left: 0; top: 0; z-index: 9999;" />,
19
+ document.body
20
+ )
21
+ }
22
+ <DataEditor width={500} height={300} portalElementRef={portalRef} {...props} />
23
+ </>
24
+ ```
25
+
26
+ Once you've got that done, the easiest way to use the Data Grid is to give it a fixed size:
27
+
28
+ ```jsx
29
+ <DataEditor width={500} height={300} {...props} />
30
+ ```
31
+
32
+ ## Changes to your data
33
+
34
+ The Grid will never change any of your underlying data. You have to do so yourself when one of the callbacks is invoked. For example, when the user edits the value in a cell, the Grid will invoke the `onCellEdited` callback. If you don't implement that callback, or if it doesn't change the undelying data to the new value, the Grid will keep displaying the old value.
35
+
36
+ Note that there is currently no way to tell the grid that data has changed. It has to be forced to redraw by passing a different object to the `getCellContent` property. This triggers the entire grid to redraw. You should avoid changing the `getCellContent` object ID as much as possible otherwise.
37
+
38
+ If you want to use the default Image overlay preview you must remember to include the react-responsive-carousel css file or it will not function correctly. This should be available in your node-modules.
39
+
40
+ ```ts
41
+ import "react-responsive-carousel/lib/styles/carousel.min.css";
42
+ ```
43
+
44
+ ## A note on col/row values
45
+
46
+ Grid always passes col/row coordinate pairs in the format [col, row] and never [row, col]. This is to more accurately match an [x, y] world, even though most english speakers will tend to say "row col".
47
+
48
+ # API Overview
49
+
50
+ Details of each property can be found by clicking on it.
51
+
52
+ ## Types
53
+
54
+ | Name | Description |
55
+ | ------------------------------- | --------------------------------------------------------------------- |
56
+ | [GridColumn](#gridcolumn) | A column description. Passed to the `columns` property. |
57
+ | [GridCell](#gridcell) | The basic interface for defining a cell |
58
+ | [GridSelection](#gridselection) | The most basic representation of the selected cells in the data grid. |
59
+ | [Theme](#theme) | The theme used by the data grid to get all color and font information |
60
+
61
+ ## Ref Methods
62
+
63
+ | Name | Description |
64
+ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
65
+ | [appendRow](#appendrow) | Append a row to the data grid. |
66
+ | [appendColumn](#appendcolumn) | Append a column to the data grid. |
67
+ | [emit](#emit) | Used to emit commands normally emitted by keyboard shortcuts. |
68
+ | [focus](#focus) | Focuses the data grid. |
69
+ | [getBounds](#getbounds) | Gets the current screen-space bounds of a desired cell. |
70
+ | [remeasureColumns](#remeasurecolumns) | Causes the columns in the selection to have their natural sizes recomputed and re-emitted as a resize event. |
71
+ | [scrollTo](#scrollto) | Tells the data-grid to scroll to a particular location. |
72
+ | [updateCells](#updatecells) | Invalidates the rendering of a list of passed cells. |
73
+ | [getMouseArgsForPosition](#getmouseargsforposition) | Gets the mouse args from pointer event position. |
74
+
75
+ ## Required Props
76
+
77
+ All data grids must set these props. These props are the bare minimum required to set up a functional data grid. Not all features will function with only these props but basic functionality will be present.
78
+
79
+ | Name | Description |
80
+ | --------------------------------- | ------------------------------------------------------- |
81
+ | [columns](#columns) | All columns in the data grid. |
82
+ | [getCellContent](#getcellcontent) | A callback to get the content of a given cell location. |
83
+ | [rows](#rows) | The number of rows in the data-grid. |
84
+
85
+ ## Important Props
86
+
87
+ Most data grids will want to set the majority of these props one way or another.
88
+
89
+ | Name | Description |
90
+ |---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
91
+ | [fixedShadowX](#fixedshadow) | Enable/disable a shadow behind fixed columns on the X axis. |
92
+ | [fixedShadowY](#fixedshadow) | Enable/disable a shadow behind the header(s) on the Y axis. |
93
+ | [freezeColumns](#freezecolumns) | The number of columns which should remain in place when scrolling horizontally. The row marker column, if enabled is always frozen and is not included in this count. |
94
+ | [getCellsForSelection](#getcellsforselection) | Used to fetch large amounts of cells at once. Used for copy/paste, if unset copy will not work. |
95
+ | [markdownDivCreateNode](#markdowndivcreatenode) | If specified, it will be used to render Markdown, instead of the default Markdown renderer used by the Grid. You'll want to use this if you need to process your Markdown for security purposes, or if you want to use a renderer with different Markdown features. |
96
+ | [onVisibleRegionChanged](#onvisibleregionchanged) | Emits whenever the visible rows/columns changes. |
97
+ | [provideEditor](#provideeditor) | Callback for providing a custom editor for a cell. |
98
+ | [portalElementRef](#portalelementref) | A ref to the portal element to use for the overlay editor. |
99
+ | [rowHeight](#rowheight) | Callback or number used to specify the height of a given row. |
100
+ | [rowMarkers](#rowmarkers) | Enable/disable row marker column on the left. Can show row numbers, selection boxes, or both. |
101
+ | [smoothScrollX](#smoothscroll) | Enable/disable smooth scrolling on the X axis. |
102
+ | [smoothScrollY](#smoothscroll) | Enable/disable smooth scrolling on the Y axis. |
103
+
104
+ ## Search
105
+
106
+ | Name | Description |
107
+ | ------------------------------------------------- | ------------------------------------------------------------------------------------- |
108
+ | [onSearchClose](#onsearchclose) | Emitted when the search interface close button is clicked. |
109
+ | [onSearchResultsChanged](#onsearchresultschanged) | Emitted when the search results change. |
110
+ | [onSearchValueChange](#onsearchvaluechange) | Emitted when the user types a new value into the search box. |
111
+ | [searchResults](#searchresults) | Overrides the search results and highlights all items for the user to enumerate over. |
112
+ | [searchValue](#searchvalue) | Sets the search value for the search box. |
113
+ | [showSearch](#showsearch) | Show/hide the search interface. |
114
+
115
+ ## Styling
116
+
117
+ | Name | Description |
118
+ | ------------------------------------------- | ----------------------------------------------------------------------- |
119
+ | [getGroupDetails](#getgroupdetails) | Callback to provide additional details for group headers such as icons. |
120
+ | [getRowThemeOverride](#getrowthemeoverride) | Callback to provide theme override for any row. |
121
+ | [groupHeaderHeight](#groupheaderheight) | The height in pixels of the column group headers. |
122
+ | [headerHeight](#headerheight) | The height in pixels of the column headers. |
123
+ | [headerIcons](#headericons) | Additional header icons for use by `GridColumn`. |
124
+ | [overscrollX](#overscroll) | Allows overscrolling the data grid horizontally by a set amount. |
125
+ | [overscrollY](#overscroll) | Allows overscrolling the data grid vertically by a set amount. |
126
+ | [rightElement](#rightelement) | A node which will be placed at the right edge of the data grid. |
127
+ | [rightElementProps](#rightelement) | Changes how the right element renders. |
128
+ | [rowMarkerStartIndex](#rowmarkerstartindex) | The index of the first element in the grid |
129
+ | [rowMarkerTheme](#rowmarkertheme) | Overrides the theme for row markers |
130
+ | [rowMarkerWidth](#rowmarkerwidth) | The width of the row markers. |
131
+ | [scaleToRem](#scaletorem) | Scales most elements in the theme to match rem scaling automatically |
132
+ | [verticalBorder](#verticalborder) | Enable/disable vertical borders for any `GridColumn` |
133
+
134
+ ## Selection Handling
135
+
136
+ | Name | Description |
137
+ | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
138
+ | [columnSelect](#rangeselect) | Controls if multiple columns can be selected at once. |
139
+ | [columnSelectionBlending](#rangeselectionblending) | Controls how column selections may be mixed with other selection types. |
140
+ | [drawFocusRing](#drawfocusring) | Determins if the focus ring should be drawn by the grid. |
141
+ | [fillHandle](#fillhandle) | Controls the presence of the fill indicator |
142
+ | [gridSelection](#gridselection) | The current selection active in the data grid. Includes both the selection cell and the selected range. |
143
+ | [highlightRegions](#highlightregions) | Adds additional highlights to the data grid for showing contextually important cells. |
144
+ | [onGridSelectionChange](#gridselection) | Emitted whenever the `gridSelection` should change. |
145
+ | [onSelectionCleared](#onselectioncleared) | Emitted when the selection is explicitly cleared. |
146
+ | [rangeSelect](#rangeselect) | Controls if multiple ranges can be selected at once. |
147
+ | [rangeSelectionBlending](#rangeselectionblending) | Controls how range selections may be mixed with other selection types. |
148
+ | [rowSelect](#rangeselect) | Controls if multiple rows can be selected at aonce. |
149
+ | [rowSelectionBlending](#rangeselectionblending) | Controls how row selections may be mixed with other selection types. |
150
+ | [spanRangeBehavior](#spanrangebehavior) | Determines if the `gridSelection` should allow partial spans or not. |
151
+
152
+ ## Editing
153
+
154
+ | Name | Description |
155
+ | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
156
+ | [coercePasteValue](#coercepastevalue) | Allows coercion of pasted values. |
157
+ | [imageEditorOverride](#imageeditoroverride) | Used to provide an override to the default image editor for the data grid. `provideEditor` may be a better choice for most people. |
158
+ | [onCellEdited](#oncelledited) | Emitted whenever a cell edit is completed. |
159
+ | [onCellsEdited](#oncelledited) | Emitted whenever a cell edit is completed and provides all edits inbound as a single batch. |
160
+ | [onDelete](#ondelete) | Emitted whenever the user has requested the deletion of the selection. |
161
+ | [onFillPattern](#onfillpattern) | Emitted when the fill handle is used to replace the contents of a region of the grid. |
162
+ | [onFinishedEditing](#onfinishedediting) | Emitted when editing has finished, regardless of data changing or not. |
163
+ | [onGroupHeaderRenamed](#ongroupheaderrenamed) | Emitted whe the user wishes to rename a group. |
164
+ | [onPaste](#onpaste) | Emitted any time data is pasted to the grid. Allows controlling paste behavior. |
165
+ | [onRowAppended](#trailingrowoptions) | Emitted whenever a row append operation is requested. Append location can be set in callback. |
166
+ | [onColumnAppended](#oncolumnappended) | Emitted whenever a column append operation is requested. Append location can be set in callback. |
167
+ | [trailingRowOptions](#trailingrowoptions) | Controls the built in trailing row to allow appending new rows. |
168
+
169
+ ## Input Interaction
170
+
171
+ | Name | Description |
172
+ | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
173
+ | [keybindings](#keybindings) | Controls which keybindings are enabled while the grid is selected. |
174
+ | [maxColumnAutoWidth](#maxcolumnwidth) | Sets the maximum width a column can be auto-sized to. |
175
+ | [maxColumnWidth](#maxcolumnwidth) | Sets the maximum width the user can resize a column to. |
176
+ | [minColumnWidth](#maxcolumnwidth) | Sets the minimum width the user can resize a column to. |
177
+ | [onCellActivated](#oncellactivated) | Emitted when a cell is activated, such as by pressing Enter, Space, double clicking, or typing. |
178
+ | [onCellClicked](#oncellclicked) | Emitted when a cell is clicked. |
179
+ | [onCellContextMenu](#oncellcontextmenu) | Emitted when a cell should show a context menu. Usually right click. |
180
+ | [onColumnMoved](#oncolumnmoved) | Emitted when a column has been dragged to a new location. |
181
+ | [onColumnResize](#oncolumnresize) | Emitted when a column has been resized to a new size. |
182
+ | [onColumnResizeEnd](#oncolumnresize) | Emitted when a column has been resized to a new size and the user has stopped interacting wtih the resize handle. |
183
+ | [onGroupHeaderClicked](#ongroupheaderclicked) | Emitted when a group header is clicked. |
184
+ | [onGroupHeaderContextMenu](#ongroupheadercontextmenu) | Emitted when a group header should show a context menu. Usually right click. |
185
+ | [onHeaderClicked](#onheaderclicked) | Emitted when a column header is clicked. |
186
+ | [onHeaderContextMenu](#onheadercontextmenu) | Emitted when a column header should show a context menu. Usually right click. |
187
+ | [onHeaderMenuClick](#onheadermenuclick) | Emitted when the menu dropdown arrow on a column header is clicked. |
188
+ | [onItemHovered](#onitemhovered) | Emitted when the hovered item changes. |
189
+ | [onKeyDown](#onkey) | Emitted when a key is pressed. |
190
+ | [onKeyUp](#onkey) | Emitted when a key is released. |
191
+ | [onMouseMove](#onmousemove) | Emitted whenever the mouse moves. Be careful, can cause performance issues. |
192
+ | [onRowMoved](#onrowmoved) | Emitted when a row has been dragged to a new location. |
193
+ | [preventDiagonalScrolling](#preventdiagonalscrolling) | Prevents diagonal scrolling |
194
+ | [rowSelectionMode](#rowselectionmode) | Determines if row selection requires a modifier key to enable multi-selection or not. |
195
+ | [columnSelectionMode](#columnselectionmode) | Determines if column selection requires a modifier key to enable multi-selection or not. |
196
+ | [scrollToEnd](#scrolltoend) | When set to true, the grid will scroll to the end. The ref has a better method to do this and this prop should not be used but it will remain supported for the foreseeable future. |
197
+ | [showMinimap](#showminimap) | Shows the interactive minimap of the grid. |
198
+ | [validateCell](#validatecell) | When returns false indicates to the user the value will not be accepted. When returns a new GridCell the value is coerced to match. |
199
+
200
+ ## Drag and Drop
201
+
202
+ | Name | Description |
203
+ | ------------------------- | ------------------------------------------------------------- |
204
+ | [onDragLeave](#ondrop) | Emitted when an external drag event exits the drop region. |
205
+ | [onDragOverCell](#ondrop) | Emitted when an external drag event is started over a cell. |
206
+ | [onDrop](#ondrop) | Emitted when an external drag event is completed on the grid. |
207
+
208
+ ## Custom Cells
209
+
210
+ | Name | Description |
211
+ | ---------------------------------- | ------------------------------------------------------ |
212
+ | [customRenderers](#customRenderer) | Custom renderers for `GridCellKind.Custom`. |
213
+ | [renderers](#renderers) | Overrides built-in cell renderers. |
214
+ | [drawCell](#drawcell) | Callback used to override the rendering of any cell. |
215
+ | [drawHeader](#drawheader) | Callback used to override the rendering of any header. |
216
+
217
+ ## Rarely Used
218
+
219
+ | Name | Description |
220
+ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
221
+ | [experimental](#experimental) | Contains experimental flags. Nothing in here is considered stable API and is mostly used for features that are not yet settled. |
222
+ | [imageWindowLoader](#imagewindowloader) | Replaces the default image window loader with an externally provided one. Useful for cases where images need to be loaded in a non-standard method. |
223
+ | [initialSize](#initialsize) | Passing this enables the grid to optimize its first paint and avoid a flicker. Only useful if the grid size is known ahead of time. |
224
+ | [isDraggable](#isdraggable) | Makes the grid as a whole draggable. Disables many interactions. |
225
+ | [isOutsideClick](#isoutsideclick) | Allows bypassing the default outside click handler for overlay editors. |
226
+ | [onDragStart](#isdraggable) | Emitted when a drag starts and `isDraggable` is true. |
227
+ | [scrollOffsetX](#scrolloffset) | Sets the initial scroll offset in the x direction. |
228
+ | [scrollOffsetY](#scrolloffset) | Sets the initial scroll offset in the y direction. |
229
+
230
+ # Keybindings
231
+
232
+ | Key Combo | Default | Flag | Description |
233
+ | ---------------------------- | ------- | ------------------- | ---------------------------------------------------------------------------------------- |
234
+ | Arrow | ✔️ | N/A | Moves the currently selected cell and clears other selections |
235
+ | Shift + Arrow | ✔️ | N/A | Extends the current selection range in the direction pressed. |
236
+ | Alt + Arrow | ✔️ | N/A | Moves the currently selected cell and retains the current selection |
237
+ | Ctrl/Cmd + Arrow \| Home/End | ✔️ | N/A | Move the selection as far as possible in the direction pressed. |
238
+ | Ctrl/Cmd + Shift + Arrow | ✔️ | N/A | Extends the selection as far as possible in the direction pressed. |
239
+ | Shift + Home/End | ✔️ | N/A | Extends the selection as far as possible in the direction pressed. |
240
+ | Ctrl/Cmd + A | ✔️ | `selectAll` | Selects all cells. |
241
+ | Shift + Space | ✔️ | `selectRow` | Selecs the current row. |
242
+ | Ctrl + Space | ✔️ | `selectCol` | Selects the current col. |
243
+ | PageUp/PageDown | ✔️ | `pageUp`/`pageDown` | Moves the current selection up/down by one page. |
244
+ | Escape | ✔️ | `clear` | Clear the current selection. |
245
+ | Ctrl/Cmd + D | ❌ | `downFill` | Data from the first row of the range will be down filled into the rows below it |
246
+ | Ctrl/Cmd + R | ❌ | `rightFill` | Data from the first column of the range will be right filled into the columns next to it |
247
+ | Ctrl/Cmd + C | ✔️ | `copy` | Copies the current selection. |
248
+ | Ctrl/Cmd + V | ✔️ | `paste` | Pastes the current buffer into the grid. |
249
+ | Ctrl/Cmd + F | ❌ | `search` | Opens the search interface. |
250
+ | Ctrl/Cmd + Home/End | ✔️ | `first`/`last` | Move the selection to the first/last cell in the data grid. |
251
+ | Ctrl/Cmd + Shift + Home/End | ✔️ | `first`/`last` | Extend the selection to the first/last cell in the data grid. |
252
+
253
+ # Full API Docs
254
+
255
+ ## GridColumn
256
+
257
+ Grid columns are the basic horizontal building block of the data grid. At their most basic level a `GridColumn` is just an object which contains a `title` and a `width` or `id`. Their type looks like:
258
+
259
+ ```ts
260
+ interface BaseGridColumn {
261
+ readonly title: string;
262
+ readonly group?: string;
263
+ readonly icon?: GridColumnIcon | string;
264
+ readonly overlayIcon?: GridColumnIcon | string;
265
+ readonly hasMenu?: boolean;
266
+ readonly style?: "normal" | "highlight";
267
+ readonly grow?: number;
268
+ readonly themeOverride?: Partial<Theme>;
269
+ readonly trailingRowOptions?: {
270
+ readonly hint?: string;
271
+ readonly addIcon?: string;
272
+ readonly targetColumn?: number | GridColumn;
273
+ readonly themeOverride?: Partial<Theme>;
274
+ readonly disabled?: boolean;
275
+ };
276
+ }
277
+
278
+ interface SizedGridColumn extends BaseGridColumn {
279
+ readonly width: number;
280
+ readonly id?: string;
281
+ }
282
+
283
+ interface AutoGridColumn extends BaseGridColumn {
284
+ readonly id: string;
285
+ }
286
+
287
+ export type GridColumn = SizedGridColumn | AutoGridColumn;
288
+ ```
289
+
290
+ | Property | Description |
291
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
292
+ | title | The title of the column |
293
+ | group | The name of the group the column belongs to |
294
+ | icon | The icon the column belongs to. The icon must be either one of the predefined icons or an icon passed to the `headerIcons` prop |
295
+ | overlayIcon | An icon which is painted on top offset bottom right of the `icon`. Must be a predefined icon or an icon passed to the `headerIcons` prop |
296
+ | hasMenu | Enables/disables the menu dropdown indicator. If not enabled, `onHeaderMenuClick` will not be emitted. |
297
+ | style | Makes the column use the highlighted theming from the `Theme`. `themeOverride` can be used to perform the same effect. |
298
+ | grow | When set to a number > 0 the column will grow to consume extra available space according to the weight of its grow property. |
299
+ | themeOverride | A `Partial<Theme>` which can be used to override the theming of the header as well as all cells within the column. |
300
+ | trailingRowOptions | Overrides the `DataEditor` level prop for [`trailingRowOptions`](#trailingrowoptions) for this column |
301
+
302
+ ---
303
+
304
+ ## GridCell
305
+
306
+ `GridCell` is the basic content building block of a data grid. There are many types of cells available out of the box and more available in additional packages.
307
+
308
+ | Cell Kind | Description |
309
+ | --------- | -------------------------------------------------------------------------------------------------------------- |
310
+ | Uri | Displays uris. Can be edited. |
311
+ | Text | Displays arbitrary text. |
312
+ | Image | Displays one or more images. |
313
+ | RowID | Designed to show primary keys in data sources. |
314
+ | Number | Displays numbers with formatting options and better editing support. |
315
+ | Bubble | Displays lists of data in little bubbles. |
316
+ | Boolean | Displays a checkbox which can be directly edited if desired. |
317
+ | Loading | Useful for when data is loading. Rendering is basically free. |
318
+ | Markdown | Displays markdown when opened. |
319
+ | Drilldown | Similar to a bubble cell, but allows embedding text and images with each cell. |
320
+ | Protected | Displays stars instead of data. Useful for indicating that hidden data is present but unavailable to the user. |
321
+ | Custom | Has no rendering by default and must be provided via a custom renderer |
322
+
323
+ All grid cells support the following properties
324
+
325
+ ```ts
326
+ interface BaseGridCell {
327
+ readonly allowOverlay: boolean;
328
+ readonly lastUpdated?: number;
329
+ readonly style?: "normal" | "faded";
330
+ readonly themeOverride?: Partial<Theme>;
331
+ readonly span?: readonly [number, number];
332
+ readonly contentAlign?: "left" | "right" | "center";
333
+ readonly cursor?: CSSProperties["cursor"];
334
+ }
335
+ ```
336
+
337
+ | Property | Description |
338
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
339
+ | allowOverlay | Determins if an overlay editor or previewer should be shown when activating this cell. |
340
+ | lastUpdated | If set, the grid will render this cell with a highlighted background which fades out. Uses performance.now() instead of Date.now(). |
341
+ | style | If set to `faded` the cell will draw with a transparent appearance. |
342
+ | themeOverride | A partial theme override to use when drawing this cell. |
343
+ | span | If set the `span` controls which horizontal span a cell belongs to. Spans are inclusive and must be correctly reported for all cells in the span range. |
344
+ | contentAlign | Changes the default text alignment for the cell. |
345
+ | cursor | An override for the cell cursor when hovered. |
346
+
347
+ ---
348
+
349
+ ## GridSelection
350
+
351
+ `GridSelection` is the most basic representation of the selected cells, rows, and columns in the data grid. The `current` property accounts for the selected cell and the range of cells selected as well. It is the selection which is modified by keyboard and mouse interaction when clicking on the cells themselves.
352
+
353
+ The `rows` and `columns` properties both account for the columns or rows which have been explicitly selected by the user. Selecting a range which encompases the entire set of cells within a column/row does not implicitly set it into this part of the collection. This allows for distinguishing between cases when the user wishes to delete all contents of a row/column and delete the row/column itself.
354
+
355
+ ```ts
356
+ interface GridSelection {
357
+ readonly current?: {
358
+ readonly cell: Item;
359
+ readonly range: Readonly<Rectangle>;
360
+ readonly rangeStack: readonly Readonly<Rectangle>[];
361
+ };
362
+ readonly columns: CompactSelection;
363
+ readonly rows: CompactSelection;
364
+ }
365
+ ```
366
+
367
+ The `cell` is the [col, row] formatted cell which will have the focus ring drawn around it. The `range` should always include the `cell` and represents additional cells which can be edited via copy, delete and other events. The `range` may or may not include partial spans depending on the [`spanRangeBehavior`](#spanrangebehavior) set.
368
+
369
+ ---
370
+
371
+ ## Theme
372
+
373
+ The data grid uses the `Theme` provided to the DataEditer in the `theme` prop. This is used to style editors as well as the grid itself. The theme interface is flat. The data grid comes with a built in theme which it will use to fill in any missing values.
374
+
375
+ | Property | Type | CSS Variable | Description |
376
+ | --------------------- | ------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- |
377
+ | accentColor | string | --gdg-accent-color | The primary accent color of the grid. This will show up in focus rings and selected rows/headers. |
378
+ | accentFg | string | --gdg-accent-fg | A foreground color which works well on top of the accent color. |
379
+ | accentLight | string | --gdg-accent-light | A lighter version of the accent color used to hint selection. |
380
+ | textDark | string | --gdg-text-dark | The standard text color. |
381
+ | textMedium | string | --gdg-text-medium | A lighter text color used for non-editable data in some cases. |
382
+ | textLight | string | --gdg-text-light | An even lighter text color |
383
+ | textBubble | string | --gdg-text-bubble | The text color used in bubbles |
384
+ | bgIconHeader | string | --gdg-bg-icon-header | The background color for header icons |
385
+ | fgIconHeader | string | --gdg-fg-icon-header | The foreground color for header icons |
386
+ | textHeader | string | --gdg-text-header | The header text color |
387
+ | textGroupHeader | string \| undefined | --gdg-text-group-header | The group header text color, if none provided the `textHeader` is used instead. |
388
+ | textHeaderSelected | string | --gdg-text-header-selected | The text color used for selected headers |
389
+ | bgCell | string | --gdg-bg-cell | The primary background color of the data grid. |
390
+ | bgCellMedium | string | --gdg-bg-cell-medium | Used for disabled or otherwise off colored cells. |
391
+ | bgHeader | string | --gdg-bg-header | The header background color |
392
+ | bgHeaderHasFocus | string | --gdg-bg-header-has | The header background color when its column contains the selected cell |
393
+ | bgHeaderHovered | string | --gdg-bg-header-hovered | The header background color when it is hovered |
394
+ | bgGroupHeader | string \| undefined | --gdg-bg-group-header | The group header background color, if none provided the `bgHeader` is used instead. |
395
+ | bgGroupHeaderHovered | string \| undefined | --gdg-bg-group-header-hovered | The group header background color when it is hovered, if none provided the `bgHeaderHovered` is used instead. |
396
+ | bgBubble | string | --gdg-bg-bubble | The background color used in bubbles |
397
+ | bgBubbleSelected | string | --gdg-bg-bubble-selected | The background color used in bubbles when the cell is selected |
398
+ | bgSearchResult | string | --gdg-bg-search-result | The background color used for cells which match the search string |
399
+ | borderColor | string | --gdg-border-color | The color of all vertical borders and horizontal borders if a horizontal override is not provided |
400
+ | horizontalBorderColor | string \| undefined | --gdg-horizontal-border-color | The horizontal border color override |
401
+ | drilldownBorder | string | --gdg-drilldown-border | The ring color of a drilldown cell |
402
+ | linkColor | string | --gdg-link-color | What color to render links |
403
+ | cellHorizontalPadding | number | --gdg-cell-horizontal-padding | The internal horizontal padding size of a cell. |
404
+ | cellVerticalPadding | number | --gdg-cell-vertical-padding | The internal vertical padding size of a cell. |
405
+ | headerFontStyle | string | --gdg-header-font-style | The font style of the header. e.g. `bold 15px` |
406
+ | baseFontStyle | string | --gdg-base-font-style | The font style used for cells by default, e.g. `13px` |
407
+ | fontFamily | string | --gdg-font-family | The font family used by the data grid. |
408
+ | editorFontSize | string | --gdg-editor-font-size | The font size used by overlay editors. |
409
+ | lineHeight | number | None | A unitless scaler which defines the height of a line of text relative to the ink size. |
410
+ | bubbleHeight | number | --gdg-bubble-height | The height (in pixels) of a bubble. |
411
+ | bubblePadding | number | --gdg-bubble-padding | The left & right padding (in pixels) of a bubble. |
412
+ | bubbleMargin | number | --gdg-bubble-margin | The margin (in pixels) between bubbles. |
413
+ | checkboxMaxSize | number | --gdg-checkbox-max-size | The maximum size of checkboxes (in pixels), e.g. for boolean cell and row markers. |
414
+ | roundingRadius | number \| undefined | --gdg-rounding-radius | The radius of rounded corners used by various grid elements (in pixels). |
415
+
416
+ ---
417
+
418
+ ## updateCells
419
+
420
+ Example usage:
421
+
422
+ ```ts
423
+ dataGridRef.current.updateCells([{ cell: [10, 10] }, { cell: [11, 10] }, { cell: [12, 10] }]);
424
+ ```
425
+
426
+ Causes the data grid to rerender these specific cells. Rerendering a single cell is significantly faster than invalidating the `getCellContent` callback as in the latter case all cells must be redrawn.
427
+
428
+ ---
429
+
430
+ ## getBounds
431
+
432
+ ```ts
433
+ getBounds: (col?: number, row?: number) => Rectangle | undefined;
434
+ ```
435
+
436
+ `getBounds` returns the current bounding box of a cell. This does not need to be a currently rendered cell. If called with `col` and `row` as undefined, the bounding box of the entire data grid scroll area is returned.
437
+
438
+ ---
439
+
440
+ ## scrollTo
441
+
442
+ ```ts
443
+ scrollTo: (
444
+ col: number,
445
+ row: number,
446
+ dir?: "horizontal" | "vertical" | "both",
447
+ paddingX?: number,
448
+ paddingY?: number,
449
+ options?: {
450
+ hAlign?: "start" | "center" | "end";
451
+ vAlign?: "start" | "center" | "end";
452
+ behavior?: ScrollBehavior; // "auto" | "smooth" | "instant"
453
+ }
454
+ ) => void;
455
+ ```
456
+
457
+ Requests the data grid to scroll to a particular location. If only one direction is requested it will get as close as it can without scrolling the off axis. Padding can be applied to inset the cell by a certain amount.
458
+
459
+ ---
460
+
461
+ | [focus](#focus) | Focuses the data grid. |
462
+ | [emit](#emit) | Used to emit commands normally emitted by keyboard shortcuts. |
463
+
464
+ ## appendRow
465
+
466
+ ```ts
467
+ appendRow: (
468
+ col: number,
469
+ openOverlay: boolean = true,
470
+ behavior?: ScrollBehavior; // "auto" | "smooth" | "instant"
471
+ ) => Promise<void>;
472
+ ```
473
+
474
+ Appends a row to the data grid.
475
+
476
+ ---
477
+
478
+ ## appendColumn
479
+
480
+ ```ts
481
+ appendColumn: (row: number, openOverlay?: boolean) => Promise<void>;
482
+ ```
483
+
484
+ Appends a column to the data grid.
485
+
486
+ ---
487
+
488
+ ## focus
489
+
490
+ ```ts
491
+ focus: () => void;
492
+ ```
493
+
494
+ Causes the data grid to become focused.
495
+
496
+ ---
497
+
498
+ ## emit
499
+
500
+ ```ts
501
+ type EmitEvents = "copy" | "paste" | "delete" | "fill-right" | "fill-down";
502
+
503
+ emit: (eventName: EmitEvents) => Promise<void>;
504
+ ```
505
+
506
+ Emits the event into the data grid as if the user had pressed the keyboard shortcut.
507
+
508
+ ---
509
+
510
+ ## getMouseArgsForPosition
511
+
512
+ ```ts
513
+ getMouseArgsForPosition: (posX: number, posY: number, ev?: MouseEvent | TouchEvent) => GridMouseEventArgs | undefined;
514
+ ```
515
+
516
+ Returns grid coordinates and context for a pointer event position. Useful for handling interactions outside of built-in callbacks.
517
+
518
+ ---
519
+
520
+ ## columns
521
+
522
+ ```ts
523
+ columns: readonly GridColumn[];
524
+ ```
525
+
526
+ `columns` is an array of objects of type `GridColumn` describing the column headers. The length of the array is the number of columns to display.
527
+
528
+ ---
529
+
530
+ ## rows
531
+
532
+ ```ts
533
+ rows: number;
534
+ ```
535
+
536
+ `rows` is the number of rows to display.
537
+
538
+ ---
539
+
540
+ ## getCellContent
541
+
542
+ ```ts
543
+ getCellContent: (cell: Item) => GridCell;
544
+ ```
545
+
546
+ `getCellContent` returns an object of type `GridCell` describing the contents for the cell at the given coordinates.
547
+
548
+ ---
549
+
550
+ ## freezeColumns
551
+
552
+ ```ts
553
+ freezeColumns?: number;
554
+ ```
555
+
556
+ Set to a positive number to freeze columns on the left side of the grid during horizontal scrolling.
557
+
558
+ ---
559
+
560
+ ## getCellsForSelection
561
+
562
+ ```ts
563
+ type CellArray = readonly (readonly GridCell[])[];
564
+ type GetCellsThunk = () => Promise<CellArray>;
565
+
566
+ getCellsForSelection?: true | (selection: Rectangle) => CellArray | GetCellsThunk;
567
+ ```
568
+
569
+ `getCellsForSelection` is called when the user copies a selection to the clipboard or the data editor needs to inspect data which may be outside the curently visible range. It must return a two-dimensional array (an array of rows, where each row is an array of cells) of the cells in the selection's rectangle. Note that the rectangle can include cells that are not currently visible.
570
+
571
+ If `true` is passed instead of a callback, the data grid will internally use the `getCellContent` callback to provide a basic implementation of `getCellsForSelection`. This can make it easier to light up more data grid functionality, but may have negative side effects if your data source is not able to handle being queried for data outside the normal window.
572
+
573
+ If `getCellsForSelection` returns a thunk, the data may be loaded asynchronously, however the data grid may be unable to properly react to column spans when performing range selections. Copying large amounts of data out of the grid will depend on the performance of the thunk as well.
574
+
575
+ ---
576
+
577
+ ## markdownDivCreateNode
578
+
579
+ ```ts
580
+ markdownDivCreateNode?: (content: string) => DocumentFragment;
581
+ ```
582
+
583
+ If `markdownDivCreateNode` is specified, then it will be used to render Markdown, instead of the default Markdown renderer used by the Grid. You'll want to use this if you need to process your Markdown for security purposes, or if you want to use a renderer with different Markdown features.
584
+
585
+ ---
586
+
587
+ ## onVisibleRegionChanged
588
+
589
+ ```ts
590
+ onVisibleRegionChanged?: (
591
+ range: Rectangle,
592
+ tx: number,
593
+ ty: number,
594
+ extras: { selected?: Item; freezeRegion?: Rectangle };
595
+ ) => void;
596
+ ```
597
+
598
+ `onVisibleRegionChanged` is called whenever the visible region changed. The new visible region is passed as a `Rectangle`. The x and y transforms of the cell region are passed as `tx` and `ty`. The current selection and frozen region are passed in the `extras` object.
599
+
600
+ ---
601
+
602
+ ## provideEditor
603
+
604
+ ```ts
605
+ export type ProvideEditorComponent<T extends InnerGridCell> = React.FunctionComponent<{
606
+ readonly onChange: (newValue: T) => void;
607
+ readonly onFinishedEditing: (newValue?: T, movement?: readonly [-1 | 0 | 1, -1 | 0 | 1]) => void;
608
+ readonly isHighlighted: boolean;
609
+ readonly value: T;
610
+ readonly initialValue?: string;
611
+ readonly validatedSelection?: SelectionRange;
612
+ readonly imageEditorOverride?: ImageEditorType;
613
+ readonly markdownDivCreateNode?: (content: string) => DocumentFragment;
614
+ readonly target: Rectangle;
615
+ readonly forceEditMode: boolean;
616
+ readonly isValid?: boolean;
617
+ }>;
618
+
619
+ export type ProvideEditorCallbackResult<T extends InnerGridCell> =
620
+ | (ProvideEditorComponent<T> & {
621
+ disablePadding?: boolean;
622
+ disableStyling?: boolean;
623
+ })
624
+ | ObjectEditorCallbackResult<T>
625
+ | undefined;
626
+
627
+ export type ProvideEditorCallback<T extends InnerGridCell> = (
628
+ cell: T & { location?: Item; activation?: CellActivatedEventArgs }
629
+ ) => ProvideEditorCallbackResult<T>;
630
+
631
+ provideEditor?: ProvideEditorCallback<GridCell>;
632
+ ```
633
+
634
+ When provided the `provideEditor` callbacks job is to be a constructor for functional components which have the correct properties to be used by the data grid as an editor. The editor must implement `onChange` and `onFinishedEditing` callbacks as well support the `isHighlighted` flag which tells the editor to begin with any editable text pre-selected so typing will immediately begin to overwrite it.
635
+ The `cell` passed to this callback includes a `location` of the activated cell and an `activation` event describing how the editor was opened.
636
+
637
+ ---
638
+
639
+ ## portalElementRef
640
+
641
+ Defaults to div#portal
642
+
643
+ ---
644
+
645
+ ## rowHeight
646
+
647
+ ```ts
648
+ rowHeight: number | ((index: number) => number);
649
+ ```
650
+
651
+ `rowHeight` is the height of a row in the table. It defaults to `34`. By passing a function instead of a number you can give different heights to each row. The `index` is the zero-based absolute row index.
652
+
653
+ ---
654
+
655
+ ## rowMarkers
656
+
657
+ ```ts
658
+ rowMarkers?: "checkbox" | "number" | "both" | "none";
659
+ ```
660
+
661
+ `rowMarkers` determines whether to display the marker column on the very left. It defaults to `none`. Note that this column doesn't count as a table column, i.e. it has no index, and doesn't change column indexes.
662
+
663
+ ---
664
+
665
+ ## smoothScroll
666
+
667
+ ```ts
668
+ smoothScrollX?: boolean;
669
+ smoothScrollY?: boolean;
670
+ ```
671
+
672
+ Controls smooth scrolling in the data grid. Defaults to `false`. If smooth scrolling is not enabled the grid will always be cell aligned in the non-smooth scrolling axis.
673
+
674
+ ---
675
+
676
+ ## fixedShadow
677
+
678
+ ```ts
679
+ fixedShadowX?: boolean;
680
+ fixedShadowY?: boolean;
681
+ ```
682
+
683
+ Controls shadows behind fixed columns and header rows. Defaults to `true`.
684
+
685
+ ---
686
+
687
+ ## showSearch
688
+
689
+ ```ts
690
+ showSearch?: boolean;
691
+ ```
692
+
693
+ `showSearch` causes the search box built into the data grid to become visible. The data grid does not provide an in-built way to show the search box, so it is suggested to hook into the ctrl/cmd+f accelerator or add a button to your apps chrome.
694
+
695
+ ---
696
+
697
+ ## onSearchClose
698
+
699
+ ```ts
700
+ onSearchClose?: () => void;
701
+ ```
702
+
703
+ If `onSearchClose` is not provided and `showSearch` is set to true, the search box will be shown but there will be no close button. Providing an `onSearchClose` callback enables the close button and the event will emit when it is clicked.
704
+
705
+ ---
706
+
707
+ ## searchValue
708
+
709
+ ```ts
710
+ readonly searchValue?: string;
711
+ ```
712
+
713
+ This property is used to set the current search value in the data grid. It accepts a string that represents the term or phrase to be used for searching within the grid. By setting `searchValue`, you can programmatically control the search value.
714
+
715
+ ---
716
+
717
+ ## onSearchResultsChanged
718
+
719
+ ```ts
720
+ readonly onSearchResultsChanged?: (results: readonly Item[], navIndex: number) => void;
721
+ ```
722
+
723
+ This event handler is called when there is a change in the search results of the data grid's search field. It provides two parameters: `results` and `navIndex`. The `results` parameter is an array of `Item` objects, each representing a cell or row that matches the current search query. The `navIndex` parameter is the index of the currently selected or highlighted search result within the `results` array.
724
+
725
+ ---
726
+
727
+ ## onSearchValueChange
728
+
729
+ ```ts
730
+ readonly onSearchValueChange?: (newVal: string) => void;
731
+ ```
732
+
733
+ This event is emitted whenever the search value in the data grid changes. The handler `onSearchValueChange` is provided with a single argument `newVal`, which is the updated string value entered in the search field. Implementing this event allows you to execute custom actions in response to changes in the search input. This can include triggering search operations based on the new value, updating the user interface elements to reflect the change, or any other related functionality that needs to respond to updates in the search term within your data grid.
734
+
735
+ ---
736
+
737
+ ## searchResults
738
+
739
+ ```ts
740
+ readonly searchResults?: readonly Item[];
741
+ ```
742
+
743
+ This property allows you to specify the search results to be displayed in the data grid. If `searchResults` is not provided, the grid will use its internal search provider to determine and display search results. By setting the `searchResults` property, you can override the default search behavior and supply a custom array of `Item` objects as the search results. These `Item` objects typically refer to the cells or rows in the grid that match a custom search criterion. This is particularly useful if you need to implement a specialized search functionality that differs from the built-in search capabilities of the grid.
744
+
745
+ ---
746
+
747
+ ## drawCell
748
+
749
+ ```ts
750
+ drawCell?: (
751
+ args: {
752
+ ctx: CanvasRenderingContext2D;
753
+ cell: GridCell;
754
+ theme: Theme;
755
+ rect: Rectangle;
756
+ col: number;
757
+ row: number;
758
+ hoverAmount: number;
759
+ hoverX: number | undefined;
760
+ hoverY: number | undefined;
761
+ highlighted: boolean;
762
+ imageLoader: ImageWindowLoader;
763
+ },
764
+ drawContent: () => void
765
+ ) => void;
766
+ ```
767
+
768
+ The `drawCell` property enables custom rendering of cells in the Grid. This function is called for each cell during the rendering process and is provided with a comprehensive set of parameters. These parameters include the drawing context (`ctx`), cell data (`cell`), theming details (`theme`), the cell's rectangle (`rect`), column and row indices (`col`, `row`), hover state information (`hoverAmount`, `hoverX`, `hoverY`), a highlight flag (`highlighted`), and an image loader (`imageLoader`).
769
+
770
+ Additionally, `drawCell` provides a `drawContent` method, which, when called, immediately draws the default content of the cell onto the canvas. This design offers flexibility in how you render each cell. For instance, you can first draw a custom background, then call `drawContent` to render the cell's standard contents, and finally add an overlay or additional embellishments. This approach allows for layered rendering, where you can seamlessly integrate custom graphics or styles with the grid's inherent rendering logic.
771
+
772
+ ---
773
+
774
+ ## drawHeader
775
+
776
+ ```ts
777
+ drawHeader?: (args: {
778
+ ctx: CanvasRenderingContext2D;
779
+ column: GridColumn;
780
+ theme: Theme;
781
+ rect: Rectangle;
782
+ hoverAmount: number;
783
+ hoverX: number | undefined;
784
+ hoverY: number | undefined;
785
+ isSelected: boolean;
786
+ isHovered: boolean;
787
+ hasSelectedCell: boolean;
788
+ spriteManager: SpriteManager;
789
+ menuBounds: Rectangle;
790
+ }) => boolean;
791
+ ```
792
+
793
+ `drawHeader` may be specified to override the rendering of a header. The grid will call this for every header it needs to render. Header rendering is not as well optimized because they do not redraw as often, but very heavy drawing methods can negatively impact horizontal scrolling performance. The return result works the same way as `drawCell`, `false` means the default rendering will happen and `true` means the default rendering will not happen.
794
+
795
+ It is possible to return `false` after rendering just a background and the regular foreground rendering will happen.
796
+
797
+ ---
798
+
799
+ ## renderers
800
+
801
+ ```ts
802
+ readonly renderers?: readonly InternalCellRenderer<InnerGridCell>[];
803
+ ```
804
+
805
+ An array of cell renderers used when drawing built-in cell types. Provide this prop to override default cell renderers. If omitted, `AllCellRenderers` is used.
806
+
807
+ ---
808
+
809
+ ## getGroupDetails
810
+
811
+ ```ts
812
+ getGroupDetails?: (groupName: string) => ({
813
+ name: string;
814
+ icon?: string;
815
+ overrideTheme?: Partial<Theme>;
816
+ actions?: {
817
+ title: string;
818
+ onClick: (e: GridMouseGroupHeaderEventArgs) => void;
819
+ icon: GridColumnIcon | string;
820
+ }[];
821
+ });
822
+ ```
823
+
824
+ `getGroupDetails` is invoked whenever a group header is rendered. The group details are used to provide a name override for the group as well as an icon, a list of actions which can be activated by the user, and an overrideTheme which will impact the rendering of all child cells of the group and all column headers in the group.
825
+
826
+ ---
827
+
828
+ ## getRowThemeOverride
829
+
830
+ ```ts
831
+ getRowThemeOverride?: (row: number) => Partial<Theme> | undefined;
832
+ ```
833
+
834
+ Whenever a row is rendered the row theme override is fetched if provided. This function should aim to be extremely fast as it may be invoked many times per render. All cells in the row have this theme merged into their theme prior to rendering.
835
+
836
+ ---
837
+
838
+ ## groupHeaderHeight
839
+
840
+ ```ts
841
+ groupHeaderHeight?: number;
842
+ ```
843
+
844
+ The height of the group headers in the data grid. If not provided this will default to the [`headerHeight`](#headerheight) value.
845
+
846
+ ---
847
+
848
+ ## headerHeight
849
+
850
+ ```ts
851
+ headerHeight: number;
852
+ ```
853
+
854
+ `headerHeight` is the height of the table header. It defaults to `36`.
855
+
856
+ ---
857
+
858
+ ## headerIcons
859
+
860
+ ```ts
861
+ headerIcons?: Record<string, (spriteProps: { fgColor: string, bgColor: string }) => string>;
862
+ ```
863
+
864
+ Providing custom header icons to the data grid must be done with a somewhat non-standard mechanism to allow theming and scaling. The `headerIcons` property takes a dictionary which maps icon names to functions which can take a foreground and background color and returns back a string representation of an svg. The svg should contain a header similar to this `<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">` and interpolate the fg/bg colors into the string.
865
+
866
+ We recognize this process is not fantastic from a graphics workflow standpoint, improvements are very welcome here.
867
+
868
+ ---
869
+
870
+ ## overscroll
871
+
872
+ ```ts
873
+ overscrollX?: number;
874
+ overscrollY?: number;
875
+ ```
876
+
877
+ The overscroll properties are used to allow the grid to scroll past the logical end of the content by a fixed number of pixels. This is useful particularly on the X axis if you allow for resizing columns as it can make resizing the final column significantly easier.
878
+
879
+ ---
880
+
881
+ ## rightElement
882
+
883
+ ```ts
884
+ rightElementProps?: {
885
+ readonly sticky?: boolean;
886
+ readonly fill?: boolean;
887
+ };
888
+ rightElement?: React.ReactNode;
889
+ ```
890
+
891
+ The right element is a DOM node which can be inserted at the end of the horizontal scroll region. This can be used to create a right handle panel, make a big add button, or display messages. If `rightElementProps.sticky` is set to true the right element will be visible at all times, otherwise the user will need to scroll to the end to reveal it.
892
+
893
+ If `rightElementProps.fill` is set, the right elements container will fill to consume all remaining space (if any) at the end of the grid. This does not play nice with growing columns.
894
+
895
+ ---
896
+
897
+ ## rowMarkerStartIndex
898
+
899
+ ```ts
900
+ readonly rowMarkerStartIndex?: number;
901
+ ```
902
+
903
+ This property is used to set the starting index for row markers in a React component. The `rowMarkerStartIndex` accepts a numerical value that specifies the initial index from which the row markers in the data grid will begin counting. By default, this value is set to `1`. This property is particularly useful when you need the row numbering to start from a specific value other than the default, such as when displaying paginated data or aligning with an external data set's indexing.
904
+
905
+ ---
906
+
907
+ ## rowMarkerWidth
908
+
909
+ ```ts
910
+ rowMarkerWidth?: number;
911
+ ```
912
+
913
+ `rowMarkerWidth` is the width of the marker column on the very left. By default, it adapts based on the number of rows in your data set.
914
+
915
+ ---
916
+
917
+ ## scaleToRem
918
+
919
+ ```ts
920
+ readonly scaleToRem?: boolean;
921
+ ```
922
+
923
+ This property is a boolean flag that enables automatic scaling of most elements in the data grid's theme to match the REM (Root EM) scaling. When set to `true`, it adjusts the sizing of various elements like fonts, paddings, and other dimensions to align with the REM units defined in your application's styles. This ensures that the data grid's appearance is consistent with the overall scaling and typography of your application, especially in responsive designs or when dealing with accessibility requirements. The default value of this property is `false`, meaning that without explicit activation, the grid's elements will not automatically scale based on REM units.
924
+
925
+ ---
926
+
927
+ ## rowMarkerStartIndex
928
+
929
+ ```ts
930
+ rowMarkerStartIndex?: number;
931
+ ```
932
+
933
+ `rowMarkerStartIndex` is the starting index of your rows. Defaults to 1, however a custom value may be needed for situations such as paging.
934
+
935
+ ---
936
+
937
+ ## verticalBorder
938
+
939
+ ```ts
940
+ verticalBorder?: ((col: number) => boolean) | boolean;
941
+ ```
942
+
943
+ Controls the drawing of the left hand vertical border of a column. If set to a boolean value it controls all borders. Defaults to `true`.
944
+
945
+ ---
946
+
947
+ ## gridSelection
948
+
949
+ ```ts
950
+ gridSelection?: GridSelection;
951
+ onGridSelectionChange?: (newSelection: GridSelection | undefined) => void;
952
+ ```
953
+
954
+ The currently selected `cell` and `range` in the data grid. If provided the `onGridSelectionChange` event should also be used as this property is controlled via that event. If this property is not provided, nor should the `onGridSelectionChange` event be.
955
+
956
+ ---
957
+
958
+ ## spanRangeBehavior
959
+
960
+ ```ts
961
+ spanRangeBehavior?: "default" | "allowPartial";
962
+ ```
963
+
964
+ If set to `default` the `gridSelection` will always be expanded to fully include any spans within it. This means in some cases the `range` of the selection may be inflated to the size of the entire sheet, however the user will be unable to highlight partial spans.
965
+
966
+ If `allowPartial` is set no inflation behavior will be enforced.
967
+
968
+ ---
969
+
970
+ ## onSelectionCleared
971
+
972
+ ```ts
973
+ onSelectionCleared?: () => void;
974
+ ```
975
+
976
+ Emitted when the current selection is cleared, usually when the user presses "Escape". `rowSelection`, `columnSelection`, and `gridSelection` should all be empty when this event is emitted. This event only emits when the user explicitly attempts to clear the selection.
977
+
978
+ ---
979
+
980
+ ## rangeSelect
981
+
982
+ ```ts
983
+ rangeSelect?: "none" | "cell" | "rect" | "multi-cell" | "multi-rect"; // default rect
984
+ columnSelect?: "none" | "single" | "multi"; // default multi
985
+ rowSelect?: "none" | "single" | "multi"; // default multi
986
+ ```
987
+
988
+ Controls if multi-selection is allowed. If disabled, shift/ctrl/command clicking will work as if no modifiers are pressed.
989
+
990
+ When range select is set to cell, only one cell may be selected at a time. When set to rect one one rect at a time. The multi variants allow for multiples of the rect or cell to be selected.
991
+
992
+ ---
993
+
994
+ ## rangeSelectionBlending
995
+
996
+ ```ts
997
+ rangeSelectionBlending?: "exclusive" | "mixed" | "additive"; // default exclusive
998
+ columnSelectionBlending?: "exclusive" | "mixed" | "additive"; // default exclusive
999
+ rowSelectionBlending?: "exclusive" | "mixed" | "additive"; // default exclusive
1000
+ ```
1001
+
1002
+ Controls which types of selections can exist at the same time in the grid. If selection blending is set to `exclusive`, the grid will clear other types of selections when the exclusive selection is made. By default row, column, and range selections are exclusive. If `mixed` is set, other types of selections are kept only when a multi-key (e.g., Cmd/Ctrl) is held. If `additive` is set, other types of selections are always kept; selections accumulate without a modifier.
1003
+
1004
+ ---
1005
+
1006
+ ## highlightRegions
1007
+
1008
+ ```ts
1009
+ interface Highlight {
1010
+ readonly color: string;
1011
+ readonly range: Rectangle;
1012
+ }
1013
+
1014
+ highlightRegions?: readonly Highlight[];
1015
+ ```
1016
+
1017
+ Highlight regions are regions on the grid which get drawn with a background color and a dashed line around the region. The color string must be css parseable and the opacity will be removed for the drawing of the dashed line. Opacity should be used to allow overlapping selections to properly blend in background colors.
1018
+
1019
+ ---
1020
+
1021
+ ## fillHandle
1022
+
1023
+ ```ts
1024
+ fillHandle?: boolean | Partial<FillHandleConfig>;
1025
+ ```
1026
+
1027
+ Controls the presence of the fill handle used for filling cells with the mouse.
1028
+
1029
+ **Configuration for the fill-handle (the small drag handle that appears in the
1030
+ bottom-right of the current selection).**
1031
+
1032
+ ```ts
1033
+ interface FillHandleConfig {
1034
+ /** Shape of the handle. Defaults to "square". */
1035
+ shape?: "square" | "circle";
1036
+ /** Width/height (or diameter for circles) in CSS pixels. Defaults to `4`. */
1037
+ size?: number;
1038
+ /** Horizontal offset from the bottom-right corner of the cell (px). */
1039
+ offsetX?: number;
1040
+ /** Vertical offset from the bottom-right corner of the cell (px). Default is `-2`. */
1041
+ offsetY?: number;
1042
+ /** Stroke width (px) of the outline that surrounds the handle. Defaults to `0`. */
1043
+ outline?: number;
1044
+ }
1045
+ ```
1046
+
1047
+ ---
1048
+
1049
+ ## allowedFillDirections
1050
+
1051
+ ```ts
1052
+ allowedFillDirections?: "horizontal" | "vertical" | "orthogonal" | "any"; // default "orthogonal"
1053
+ ```
1054
+
1055
+ Controls which directions the fill-handle may extend when the user drags it.
1056
+
1057
+ - "horizontal": Only left/right expansion is allowed.
1058
+ - "vertical": Only up/down expansion is allowed.
1059
+ - "orthogonal": Expands to the closest orthogonal edge (up/down/left/right). This is the default.
1060
+ - "any": Expands freely in both axes (forms a rectangle to the pointer).
1061
+
1062
+ ---
1063
+
1064
+ ## onFillPattern
1065
+
1066
+ ```ts
1067
+ onFillPattern?: (event: FillPatternEventArgs) => void;
1068
+
1069
+ interface FillPatternEventArgs extends PreventableEvent {
1070
+ patternSource: Rectangle;
1071
+ fillDestination: Rectangle;
1072
+ }
1073
+ ```
1074
+
1075
+ Emitted whenever the user initiates a pattern fill using the fill handle. The event provides both the source
1076
+ pattern region and the destination region about to be filled. Call `event.preventDefault()` to cancel the fill.
1077
+
1078
+ Example: prevent filling into protected regions
1079
+
1080
+ ```ts
1081
+ <DataEditor
1082
+ onFillPattern={e => {
1083
+ const { fillDestination } = e;
1084
+ if (/* your condition */ false) {
1085
+ e.preventDefault();
1086
+ }
1087
+ }}
1088
+ {...props}
1089
+ />
1090
+ ```
1091
+
1092
+ ---
1093
+
1094
+ ## onDelete
1095
+
1096
+ ```ts
1097
+ onDelete?: (selection: GridSelection) => GridSelection | boolean;
1098
+ ```
1099
+
1100
+ `onDelete` is called when the user deletes one or more rows. `gridSelection` is current selection. If the callback returns false, deletion will not happen. If it returns true, all cells inside all selected rows, columns and ranges will be deleted. If the callback returns a GridSelection, the newly returned selection will be deleted instead.
1101
+
1102
+ ---
1103
+
1104
+ ## imageEditorOverride
1105
+
1106
+ ```ts
1107
+ imageEditorOverride?: ImageEditorType;
1108
+ ```
1109
+
1110
+ If `imageEditorOverride` is specified, then it will be used instead of the default image editor overlay, which is what the user sees when they double-click on an image cell.
1111
+
1112
+ ---
1113
+
1114
+ ## onCellEdited
1115
+
1116
+ ```ts
1117
+ onCellEdited?: (cell: Item, newValue: EditableGridCell) => void;
1118
+ onCellsEdited?: (newValues: readonly { location: Item; value: EditableGridCell }[]) => boolean | void;
1119
+ ```
1120
+
1121
+ `onCellEdited` is called when the user finishes editing a cell. Note that you are responsible for setting the new value of the cell.
1122
+
1123
+ `onCellsEdited` is called whenever a batch of cells is about to be edited. If the callback returns `true`, `onCellEdited` will not be called for an cells in the event.
1124
+
1125
+ ---
1126
+
1127
+ ## onDeleteRows
1128
+
1129
+ ```ts
1130
+ onDeleteRows?: (rows: readonly number[]) => void;
1131
+ ```
1132
+
1133
+ `onDeleteRows` is called when the user deletes one or more rows. `rows` is an array with the absolute indexes of the deletes rows. Note that it is on you to actually effect the deletion of those rows.
1134
+
1135
+ ---
1136
+
1137
+ ## onFinishedEditing
1138
+
1139
+ ```ts
1140
+ onFinishedEditing?: (newValue: GridCell | undefined, movement: Item) => void;
1141
+ ```
1142
+
1143
+ Emitted whenever the data grid exits edit mode. The movement indicates which direction the user requested the selection move towards. `-1` is left/up, `1` is right/down.
1144
+
1145
+ ---
1146
+
1147
+ ## onGroupHeaderRenamed
1148
+
1149
+ ```ts
1150
+ onGroupHeaderRenamed?: (groupName: string, newVal: string) => void
1151
+ ```
1152
+
1153
+ If provided group headers will have an icon allowing users to rename them. When a user renames a group header this event will be emitted. It is up to the developer to actually rename the header.
1154
+
1155
+ ---
1156
+
1157
+ ## onPaste
1158
+
1159
+ ```ts
1160
+ onPaste?: ((target: Item, values: readonly (readonly string[])[]) => boolean) | boolean;
1161
+ ```
1162
+
1163
+ `onPaste` is called when data is pasted into the grid. If left undefined, the `DataEditor` will operate in a fallback mode and attempt to paste the text buffer into the current cell assuming the current cell is not readonly and can accept the data type. If `onPaste` is set to false or the function returns false, the grid will simply ignore paste. If `onPaste` evaluates to true the grid will attempt to split the data by tabs and newlines and paste into available cells.
1164
+
1165
+ The grid will not attempt to add additional rows if more data is pasted then can fit. In that case it is advisable to simply return false from onPaste and handle the paste manually.
1166
+
1167
+ ---
1168
+
1169
+ ## coercePasteValue
1170
+
1171
+ ```ts
1172
+ coercePasteValue?: (val: string, cell: GridCell) => GridCell | undefined;
1173
+ ```
1174
+
1175
+ This callback allows coercion of pasted values before they are passed to edit functions. `val` contains the pasted value and `cell` is the target of the paste. Returning `undefined` will accept the default behavior of the grid, or a `GridCell` may be returned which will be used for paste instead.
1176
+
1177
+ ---
1178
+
1179
+ ## trailingRowOptions
1180
+
1181
+ ```ts
1182
+ trailingRowOptions?: {
1183
+ readonly tint?: boolean; // DataEditor level only
1184
+ readonly sticky?: boolean; // DataEditor level only
1185
+ readonly hint?: string;
1186
+ readonly addIcon?: string;
1187
+ readonly targetColumn?: number | GridColumn;
1188
+ readonly themeOverride?: Partial<Theme>; // GridColumn only
1189
+ readonly disabled?: boolean; // GridColumn only
1190
+ }
1191
+ ```
1192
+
1193
+ ---
1194
+
1195
+ ## onRowAppended
1196
+
1197
+ ```ts
1198
+ onRowAppended?: () => Promise<"top" | "bottom" | number | undefined> | void;
1199
+ ```
1200
+
1201
+ `onRowAppended` controls adding new rows at the bottom of the Grid. If `onRowAppended` is defined, an empty row will display at the bottom. When the user clicks on one of its cells, `onRowAppended` is called, which is responsible for appending the new row. The appearance of the blank row can be configured using `trailingRowOptions`.
1202
+
1203
+ The callback can optionally return (or resolve to) one of the following values to control focus after the row is added:
1204
+
1205
+ - `"top"` – focus the first row in the grid.
1206
+ - `"bottom"` – focus the last row in the grid (default behaviour).
1207
+ - `number` – focus the row at the specified zero-based index.
1208
+ - `undefined` – default focus behaviour (equivalent to `"bottom"`).
1209
+
1210
+ ---
1211
+
1212
+ ## onColumnAppended
1213
+
1214
+ ```ts
1215
+ onColumnAppended?: () => Promise<"left" | "right" | number | undefined> | void;
1216
+ ```
1217
+
1218
+ `onColumnAppended` controls adding new columns to the Grid. When defined, the callback is invoked when the user requests to append a column (for example by editing past the last column). Your implementation is responsible for inserting the new column into the `columns` prop supplied to the grid.
1219
+
1220
+ The callback can optionally return (or resolve to) one of the following values to control focus after the column is added:
1221
+
1222
+ - `"left"` – focus the first column in the grid.
1223
+ - `"right"` – focus the last column in the grid (default behaviour).
1224
+ - `number` – focus the column at the specified zero-based index.
1225
+ - `undefined` – default focus behaviour (equivalent to `"right"`).
1226
+
1227
+ ---
1228
+
1229
+ ## maxColumnWidth
1230
+
1231
+ ```ts
1232
+ maxColumnWidth?: number;
1233
+ minColumnWidth?: number;
1234
+ ```
1235
+
1236
+ If `maxColumnWidth` is set with a value greater than 50, then columns will have a maximum size of that many pixels.
1237
+ If the value is less than 50, it will be increased to 50. If it isn't set, the default value will be 500.
1238
+
1239
+ ---
1240
+
1241
+ ## onCellClicked
1242
+
1243
+ ```ts
1244
+ onCellClicked?: (cell: Item) => void;
1245
+ ```
1246
+
1247
+ `onCellClicked` is called whenever the user clicks a cell in the grid.
1248
+
1249
+ ---
1250
+
1251
+ ## onCellActivated
1252
+
1253
+ ```ts
1254
+ onCellActivated?: (
1255
+ cell: Item,
1256
+ event: CellActivatedEventArgs
1257
+ ) => void;
1258
+ ```
1259
+
1260
+ `onCellActivated` is called whenever the user double clicks, presses Enter or Space, or begins typing with a cell selected. The second argument describes how the activation occurred.
1261
+
1262
+ The `event` parameter is one of:
1263
+
1264
+ - `KeyboardCellActivatedEvent` – contains `inputType: "keyboard"` and a `key` field with the physical key pressed.
1265
+ - `PointerCellActivatedEvent` – contains `inputType: "pointer"`, a `pointerActivation` reason such as `"double-click"` or `"single-click"`, and an optional `pointerType` (`"mouse"`, `"touch"`, or `"pen"`).
1266
+
1267
+ ---
1268
+
1269
+ ## onCellContextMenu
1270
+
1271
+ ---
1272
+
1273
+ ## onColumnMoved
1274
+
1275
+ ```ts
1276
+ onColumnMoved?: (startIndex: number, endIndex: number) => void;
1277
+ ```
1278
+
1279
+ `onColumnMoved` is called when the user finishes moving a column. `startIndex` is the index of the column that was moved, and `endIndex` is the index at which it should end up. Note that you have to effect the move of the column, and pass the reordered columns back in the `columns` property.
1280
+
1281
+ ---
1282
+
1283
+ ## onColumnResize
1284
+
1285
+ ```ts
1286
+ onColumnResize?: (column: GridColumn, newSize: number, columnIndex: number) => void;
1287
+ onColumnResizeEnd?: (column: GridColumn, newSize: number, columnIndex: number) => void;
1288
+ ```
1289
+
1290
+ `onColumnResize` is called when the user is resizing a column. `newSize` is the new size of the column. Note that you have change the size of the column in the `GridColumn` and pass it back to the grid in the `columns` property.
1291
+ `onColumnReizeEnd` is called with the same arguments, but only once the user ceases interaction with the resize handle.
1292
+
1293
+ ## onColumnResizeStart
1294
+
1295
+ ```ts
1296
+ onColumnResizeStart?: (column: GridColumn, newSize: number, columnIndex: number) => void;
1297
+ ```
1298
+
1299
+ `onColumnResize` is called when the user starts resizing a column. `newSize` is the new size of the column.
1300
+
1301
+ ## onColumnResizeEnd
1302
+
1303
+ ```ts
1304
+ onColumnResizeEnd?: (column: GridColumn, newSize: number, columnIndex: number) => void;
1305
+ ```
1306
+
1307
+ `onColumnResize` is called when the user ends resizing a column. `newSize` is the new size of the column.
1308
+
1309
+ ---
1310
+
1311
+ ## onGroupHeaderClicked
1312
+
1313
+ ```ts
1314
+ onGroupHeaderClicked?: (colIndex: number, event: GroupHeaderClickedEventArgs) => void;
1315
+ ```
1316
+
1317
+ Emitted whenever a group header is clicked.
1318
+
1319
+ ---
1320
+
1321
+ ## onGroupHeaderContextMenu
1322
+
1323
+ ```ts
1324
+ onGroupHeaderContextMenu?: (colIndex: number, event: GroupHeaderClickedEventArgs) => void
1325
+ ```
1326
+
1327
+ Emitted whenever a group header's context menu should be presented, usually right click.
1328
+
1329
+ ---
1330
+
1331
+ ## onHeaderClicked
1332
+
1333
+ ```ts
1334
+ onHeaderClicked?: (colIndex: number, event: HeaderClickedEventArgs) => void;
1335
+ ```
1336
+
1337
+ Emitted whenever a header is clicked.
1338
+
1339
+ ---
1340
+
1341
+ ## onHeaderContextMenu
1342
+
1343
+ ```ts
1344
+ onHeaderContextMenu?: (colIndex: number, event: HeaderClickedEventArgs) => void;
1345
+ ```
1346
+
1347
+ Emitted whenever a column header's context menu should be presented, usually right click.
1348
+
1349
+ ---
1350
+
1351
+ ## onHeaderMenuClick
1352
+
1353
+ ```ts
1354
+ onHeaderMenuClick?: (col: number, screenPosition: Rectangle) => void;
1355
+ ```
1356
+
1357
+ `onHeaderMenuClick` is called when the user clicks the menu button on a column header. `col` is the column index, and `screenPosition` is the bounds of the column header. You are responsible for drawing and handling the menu.
1358
+
1359
+ ---
1360
+
1361
+ ## onItemHovered
1362
+
1363
+ ```ts
1364
+ onItemHovered?: (args: GridMouseEventArgs) => void;
1365
+ ```
1366
+
1367
+ `onItemHovered` is called when the user hovers over a cell, a header, or outside the grid.
1368
+
1369
+ ---
1370
+
1371
+ ## onMouseMove
1372
+
1373
+ ```ts
1374
+ onMouseMove?: (args: GridMouseEventArgs) => void;
1375
+ ```
1376
+
1377
+ Emitted any time the mouse moves. Most behaviors relying on this should be debounced for performance reasons.
1378
+
1379
+ ---
1380
+
1381
+ ## onRowMoved
1382
+
1383
+ ```ts
1384
+ onRowMoved?: (startIndex: number, endIndex: number) => void;
1385
+ ```
1386
+
1387
+ Called whenever a row re-order operation is completed. Setting the callback enables re-ordering by dragging the first column of a row.
1388
+
1389
+ ---
1390
+
1391
+ ## preventDiagonalScrolling
1392
+
1393
+ ```ts
1394
+ preventDiagonalScrolling?: booling;
1395
+ ```
1396
+
1397
+ Set to true to prevent any diagonal scrolling.
1398
+
1399
+ ---
1400
+
1401
+ ## rowSelectionMode
1402
+
1403
+ ```ts
1404
+ rowSelectionMode?: "auto" | "multi";
1405
+ ```
1406
+
1407
+ `rowSelectionMode` changes how selecting a row marker behaves. In auto mode it adapts to touch or mouse environments automatically, in multi-mode it always acts as if the multi key (Ctrl) is pressed.
1408
+
1409
+ ---
1410
+
1411
+ ## columnSelectionMode
1412
+
1413
+ ```ts
1414
+ columnSelectionMode?: "auto" | "multi";
1415
+ ```
1416
+
1417
+ `columnSelectionMode` changes how selecting columns behaves. In auto mode it adapts to touch or mouse environments automatically, in multi-mode it always acts as if the multi key (Ctrl) is pressed.
1418
+
1419
+ ---
1420
+
1421
+ ## showMinimap
1422
+
1423
+ ```ts
1424
+ showMinimap?: boolean;
1425
+ ```
1426
+
1427
+ Enables/disables the interactive minimap. Default to `false`.
1428
+
1429
+ ---
1430
+
1431
+ ## scrollToEnd
1432
+
1433
+ ```ts
1434
+ scrollToEnd?: boolean;
1435
+ ```
1436
+
1437
+ When this property changes to `true`, the Grid will scroll all the way to the right. Glide uses that when the user clicks the "Add Column" button.
1438
+
1439
+ ---
1440
+
1441
+ ## validateCell
1442
+
1443
+ ```ts
1444
+ readonly validateCell?: (cell: Item, newValue: EditableGridCell) => boolean | EditableGridCell;
1445
+ ```
1446
+
1447
+ When returns false indicates to the user the value will not be accepted. When returns a new GridCell the value is coerced to match.
1448
+
1449
+ ---
1450
+
1451
+ ## isDraggable
1452
+
1453
+ ```ts
1454
+ isDraggable?: boolean;
1455
+ onDragStart?: (args: GridDragEventArgs) => void;
1456
+ ```
1457
+
1458
+ If `isDraggable` is set, the whole Grid is draggable, and `onDragStart` will be called when dragging starts. You can use this to build a UI where the user can drag the Grid around.
1459
+
1460
+ ---
1461
+
1462
+ ## experimental
1463
+
1464
+ Behavior not defined or officially supported. Feel free to check out what this does in github but anything in here is up for grabs to be changed at any time.
1465
+
1466
+ ---