apex-grid 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/LICENSE +76 -5
  2. package/README.md +520 -10
  3. package/components/cell.d.ts +74 -0
  4. package/components/cell.js +376 -0
  5. package/components/cell.js.map +1 -0
  6. package/{dist/src/components → components}/filter-row.d.ts +13 -12
  7. package/components/filter-row.js +396 -0
  8. package/components/filter-row.js.map +1 -0
  9. package/components/grid.d.ts +1173 -0
  10. package/components/grid.js +620 -0
  11. package/components/grid.js.map +1 -0
  12. package/components/header-row.d.ts +43 -0
  13. package/components/header-row.js +205 -0
  14. package/components/header-row.js.map +1 -0
  15. package/{dist/src/components → components}/header.d.ts +11 -5
  16. package/components/header.js +263 -0
  17. package/components/header.js.map +1 -0
  18. package/components/paginator.d.ts +56 -0
  19. package/components/paginator.js +148 -0
  20. package/components/paginator.js.map +1 -0
  21. package/components/row.d.ts +43 -0
  22. package/components/row.js +239 -0
  23. package/components/row.js.map +1 -0
  24. package/components/toolbar.d.ts +60 -0
  25. package/components/toolbar.js +275 -0
  26. package/components/toolbar.js.map +1 -0
  27. package/{dist/src/components → components}/virtualizer.d.ts +2 -3
  28. package/{dist/src/components → components}/virtualizer.js +3 -3
  29. package/components/virtualizer.js.map +1 -0
  30. package/controllers/data-operation.d.ts +31 -0
  31. package/controllers/data-operation.js +53 -0
  32. package/controllers/data-operation.js.map +1 -0
  33. package/controllers/dom.d.ts +55 -0
  34. package/controllers/dom.js +221 -0
  35. package/controllers/dom.js.map +1 -0
  36. package/controllers/editing.d.ts +130 -0
  37. package/controllers/editing.js +197 -0
  38. package/controllers/editing.js.map +1 -0
  39. package/controllers/expansion.d.ts +68 -0
  40. package/controllers/expansion.js +126 -0
  41. package/controllers/expansion.js.map +1 -0
  42. package/{dist/src/controllers → controllers}/filter.d.ts +2 -3
  43. package/controllers/filter.js +105 -0
  44. package/controllers/filter.js.map +1 -0
  45. package/{dist/src/controllers → controllers}/navigation.d.ts +18 -8
  46. package/{dist/src/controllers → controllers}/navigation.js +31 -20
  47. package/controllers/navigation.js.map +1 -0
  48. package/controllers/pagination.d.ts +102 -0
  49. package/controllers/pagination.js +106 -0
  50. package/controllers/pagination.js.map +1 -0
  51. package/controllers/reorder.d.ts +78 -0
  52. package/controllers/reorder.js +124 -0
  53. package/controllers/reorder.js.map +1 -0
  54. package/{dist/src/controllers → controllers}/resize.d.ts +2 -3
  55. package/controllers/resize.js +52 -0
  56. package/controllers/resize.js.map +1 -0
  57. package/controllers/selection.d.ts +109 -0
  58. package/controllers/selection.js +168 -0
  59. package/controllers/selection.js.map +1 -0
  60. package/{dist/src/controllers → controllers}/sort.d.ts +1 -2
  61. package/controllers/sort.js +122 -0
  62. package/controllers/sort.js.map +1 -0
  63. package/controllers/state.d.ts +56 -0
  64. package/controllers/state.js +74 -0
  65. package/controllers/state.js.map +1 -0
  66. package/controllers/tree.d.ts +87 -0
  67. package/controllers/tree.js +0 -0
  68. package/controllers/tree.js.map +1 -0
  69. package/custom-elements.json +6901 -1554
  70. package/{dist/src/define.d.ts → define.d.ts} +0 -1
  71. package/define.js.map +1 -0
  72. package/docs/assets/hierarchy.js +1 -0
  73. package/docs/assets/highlight.css +127 -0
  74. package/docs/assets/icons.js +18 -0
  75. package/docs/assets/icons.svg +1 -0
  76. package/docs/assets/main.js +60 -0
  77. package/docs/assets/navigation.js +1 -0
  78. package/docs/assets/search.js +1 -0
  79. package/docs/assets/style.css +1633 -0
  80. package/docs/classes/ApexGrid.html +371 -0
  81. package/docs/functions/setup.html +22 -0
  82. package/docs/hierarchy.html +1 -0
  83. package/docs/index.html +504 -0
  84. package/docs/interfaces/ApexCellValueChangedEvent.html +11 -0
  85. package/docs/interfaces/ApexCellValueChangingEvent.html +13 -0
  86. package/docs/interfaces/ApexColumnMovedEvent.html +8 -0
  87. package/docs/interfaces/ApexColumnMovingEvent.html +11 -0
  88. package/docs/interfaces/ApexColumnPinnedEvent.html +6 -0
  89. package/docs/interfaces/ApexColumnPinningEvent.html +8 -0
  90. package/docs/interfaces/ApexDetailContext.html +8 -0
  91. package/docs/interfaces/ApexFilteredEvent.html +6 -0
  92. package/docs/interfaces/ApexFilteringEvent.html +12 -0
  93. package/docs/interfaces/ApexGridEventMap.html +68 -0
  94. package/docs/interfaces/ApexHeaderContext.html +6 -0
  95. package/docs/interfaces/ApexPageChangedEvent.html +10 -0
  96. package/docs/interfaces/ApexPageChangingEvent.html +10 -0
  97. package/docs/interfaces/ApexQuickFilterChangedEvent.html +4 -0
  98. package/docs/interfaces/ApexQuickFilterChangingEvent.html +6 -0
  99. package/docs/interfaces/ApexRowEditEndedEvent.html +6 -0
  100. package/docs/interfaces/ApexRowEditStartedEvent.html +4 -0
  101. package/docs/interfaces/ApexRowExpandedEvent.html +8 -0
  102. package/docs/interfaces/ApexRowExpandingEvent.html +11 -0
  103. package/docs/interfaces/ApexRowSelectedEvent.html +8 -0
  104. package/docs/interfaces/ApexRowSelectingEvent.html +11 -0
  105. package/docs/interfaces/ApexTreeRowExpandedEvent.html +8 -0
  106. package/docs/interfaces/ApexTreeRowExpandingEvent.html +10 -0
  107. package/docs/interfaces/BaseApexCellContext.html +16 -0
  108. package/docs/interfaces/BaseApexEditorContext.html +19 -0
  109. package/docs/interfaces/BaseColumnConfiguration.html +83 -0
  110. package/docs/interfaces/BaseColumnSortConfiguration.html +6 -0
  111. package/docs/interfaces/BaseFilterExpression.html +15 -0
  112. package/docs/interfaces/BaseSortExpression.html +12 -0
  113. package/docs/interfaces/CSVExportOptions.html +22 -0
  114. package/docs/interfaces/ColumnFilterConfiguration.html +4 -0
  115. package/docs/interfaces/DataPipelineConfiguration.html +15 -0
  116. package/docs/interfaces/ExportOptions.html +15 -0
  117. package/docs/interfaces/GridEditingConfiguration.html +10 -0
  118. package/docs/interfaces/GridExpansionConfiguration.html +15 -0
  119. package/docs/interfaces/GridSelectionConfiguration.html +11 -0
  120. package/docs/interfaces/GridSortConfiguration.html +6 -0
  121. package/docs/interfaces/GridTreeConfiguration.html +33 -0
  122. package/docs/interfaces/PaginationConfiguration.html +18 -0
  123. package/docs/interfaces/PaginationState.html +10 -0
  124. package/docs/interfaces/XLSXExportOptions.html +17 -0
  125. package/docs/media/package.json +83 -0
  126. package/docs/media/publish.yml +111 -0
  127. package/docs/modules.html +1 -0
  128. package/docs/types/ApexCellContext.html +2 -0
  129. package/docs/types/ApexEditorContext.html +2 -0
  130. package/docs/types/BasePropertyType.html +2 -0
  131. package/docs/types/BaseSortComparer.html +2 -0
  132. package/docs/types/ColumnConfiguration.html +2 -0
  133. package/docs/types/ColumnDropPosition.html +2 -0
  134. package/docs/types/ColumnSortConfiguration.html +2 -0
  135. package/docs/types/DataPipelineHook.html +2 -0
  136. package/docs/types/DataPipelineParams.html +8 -0
  137. package/docs/types/DataType.html +30 -0
  138. package/docs/types/EditMode.html +6 -0
  139. package/docs/types/EditTrigger.html +4 -0
  140. package/docs/types/ExportCellValue.html +5 -0
  141. package/docs/types/ExportSource.html +8 -0
  142. package/docs/types/FilterCriteria.html +6 -0
  143. package/docs/types/FilterExpression.html +2 -0
  144. package/docs/types/Keys.html +2 -0
  145. package/docs/types/PaginationMode.html +6 -0
  146. package/docs/types/PinPosition.html +5 -0
  147. package/docs/types/PropertyType.html +2 -0
  148. package/docs/types/SelectionMode.html +7 -0
  149. package/docs/types/SortComparer.html +2 -0
  150. package/docs/types/SortExpression.html +2 -0
  151. package/docs/types/SortState.html +2 -0
  152. package/docs/types/SortingDirection.html +3 -0
  153. package/index.d.ts +11 -0
  154. package/{dist/src/index.js → index.js} +1 -0
  155. package/index.js.map +1 -0
  156. package/internal/column-types.d.ts +94 -0
  157. package/internal/column-types.js +268 -0
  158. package/internal/column-types.js.map +1 -0
  159. package/{dist/src/internal → internal}/constants.d.ts +0 -1
  160. package/internal/constants.js.map +1 -0
  161. package/internal/export.d.ts +106 -0
  162. package/internal/export.js +122 -0
  163. package/internal/export.js.map +1 -0
  164. package/internal/flip.d.ts +80 -0
  165. package/internal/flip.js +52 -0
  166. package/internal/flip.js.map +1 -0
  167. package/internal/icons.d.ts +24 -0
  168. package/internal/icons.js +134 -0
  169. package/internal/icons.js.map +1 -0
  170. package/{dist/src/internal → internal}/is-defined.d.ts +0 -1
  171. package/internal/is-defined.js.map +1 -0
  172. package/{dist/src/internal → internal}/mixins/event-emitter.d.ts +0 -1
  173. package/internal/mixins/event-emitter.js.map +1 -0
  174. package/{dist/src/internal → internal}/normalize-case.d.ts +0 -1
  175. package/internal/normalize-case.js.map +1 -0
  176. package/{dist/src/internal → internal}/part-map.d.ts +0 -1
  177. package/{dist/src/internal → internal}/part-map.js +1 -1
  178. package/internal/part-map.js.map +1 -0
  179. package/{dist/src/internal → internal}/register.d.ts +3 -4
  180. package/internal/register.js +9 -0
  181. package/internal/register.js.map +1 -0
  182. package/{dist/src/internal → internal}/tags.d.ts +2 -1
  183. package/{dist/src/internal → internal}/tags.js +2 -0
  184. package/internal/tags.js.map +1 -0
  185. package/internal/theming.d.ts +34 -0
  186. package/internal/theming.js +123 -0
  187. package/internal/theming.js.map +1 -0
  188. package/internal/types.d.ts +619 -0
  189. package/internal/types.js.map +1 -0
  190. package/internal/utils.d.ts +29 -0
  191. package/internal/utils.js +75 -0
  192. package/internal/utils.js.map +1 -0
  193. package/{dist/src/internal → internal}/watch.d.ts +0 -1
  194. package/{dist/src/internal → internal}/watch.js +2 -2
  195. package/internal/watch.js.map +1 -0
  196. package/internal/xlsx.d.ts +22 -0
  197. package/internal/xlsx.js +228 -0
  198. package/internal/xlsx.js.map +1 -0
  199. package/{dist/src/operations → operations}/base.d.ts +0 -1
  200. package/operations/base.js.map +1 -0
  201. package/{dist/src/operations → operations}/filter/operands/boolean.d.ts +0 -1
  202. package/{dist/src/operations → operations}/filter/operands/boolean.js +5 -5
  203. package/operations/filter/operands/boolean.js.map +1 -0
  204. package/{dist/src/operations → operations}/filter/operands/number.d.ts +0 -1
  205. package/{dist/src/operations → operations}/filter/operands/number.js +2 -2
  206. package/operations/filter/operands/number.js.map +1 -0
  207. package/{dist/src/operations → operations}/filter/operands/string.d.ts +0 -1
  208. package/{dist/src/operations → operations}/filter/operands/string.js +2 -2
  209. package/operations/filter/operands/string.js.map +1 -0
  210. package/{dist/src/operations → operations}/filter/state.d.ts +1 -2
  211. package/{dist/src/operations → operations}/filter/state.js +3 -4
  212. package/operations/filter/state.js.map +1 -0
  213. package/{dist/src/operations → operations}/filter/tree.d.ts +1 -2
  214. package/{dist/src/operations → operations}/filter/tree.js +5 -6
  215. package/operations/filter/tree.js.map +1 -0
  216. package/{dist/src/operations → operations}/filter/types.d.ts +0 -1
  217. package/operations/filter/types.js.map +1 -0
  218. package/{dist/src/operations → operations}/filter.d.ts +0 -1
  219. package/{dist/src/operations → operations}/filter.js +4 -7
  220. package/operations/filter.js.map +1 -0
  221. package/operations/pagination.d.ts +19 -0
  222. package/operations/pagination.js +12 -0
  223. package/operations/pagination.js.map +1 -0
  224. package/operations/quick-filter.d.ts +21 -0
  225. package/operations/quick-filter.js +26 -0
  226. package/operations/quick-filter.js.map +1 -0
  227. package/{dist/src/operations → operations}/sort/types.d.ts +0 -1
  228. package/operations/sort/types.js.map +1 -0
  229. package/{dist/src/operations → operations}/sort.d.ts +0 -1
  230. package/{dist/src/operations → operations}/sort.js +5 -5
  231. package/operations/sort.js.map +1 -0
  232. package/package.json +25 -83
  233. package/setup.d.ts +58 -0
  234. package/setup.js +29 -0
  235. package/setup.js.map +1 -0
  236. package/{dist/src/styles/body-row/body-row-styles.css.d.ts → styles/_common.css.d.ts} +0 -1
  237. package/styles/_common.css.js +3 -0
  238. package/styles/_common.css.js.map +1 -0
  239. package/{dist/src/styles/body-cell/body-cell-styles.css.d.ts → styles/body-cell/body-cell.css.d.ts} +0 -1
  240. package/styles/body-cell/body-cell.css.js +3 -0
  241. package/styles/body-cell/body-cell.css.js.map +1 -0
  242. package/{dist/src/styles/filter-row/filter-row-styles.css.d.ts → styles/body-row/body-row.css.d.ts} +0 -1
  243. package/styles/body-row/body-row.css.js +3 -0
  244. package/styles/body-row/body-row.css.js.map +1 -0
  245. package/{dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts → styles/filter-row/filter-row.css.d.ts} +0 -1
  246. package/styles/filter-row/filter-row.css.js +3 -0
  247. package/styles/filter-row/filter-row.css.js.map +1 -0
  248. package/styles/grid/_grid.base.css.d.ts +1 -0
  249. package/styles/grid/_grid.base.css.js +3 -0
  250. package/styles/grid/_grid.base.css.js.map +1 -0
  251. package/styles/grid/themes/light/grid.bootstrap.css.d.ts +1 -0
  252. package/styles/grid/themes/light/grid.bootstrap.css.js +3 -0
  253. package/styles/grid/themes/light/grid.bootstrap.css.js.map +1 -0
  254. package/styles/grid/themes/light/grid.fluent.css.d.ts +1 -0
  255. package/styles/grid/themes/light/grid.fluent.css.js +3 -0
  256. package/styles/grid/themes/light/grid.fluent.css.js.map +1 -0
  257. package/styles/grid/themes/light/grid.indigo.css.d.ts +1 -0
  258. package/styles/grid/themes/light/grid.indigo.css.js +3 -0
  259. package/styles/grid/themes/light/grid.indigo.css.js.map +1 -0
  260. package/styles/grid/themes/light/grid.material.css.d.ts +1 -0
  261. package/styles/grid/themes/light/grid.material.css.js +3 -0
  262. package/styles/grid/themes/light/grid.material.css.js.map +1 -0
  263. package/styles/header-cell/header-cell.css.d.ts +1 -0
  264. package/styles/header-cell/header-cell.css.js +3 -0
  265. package/styles/header-cell/header-cell.css.js.map +1 -0
  266. package/styles/header-row/header-row.base.css.d.ts +1 -0
  267. package/styles/header-row/header-row.base.css.js +3 -0
  268. package/styles/header-row/header-row.base.css.js.map +1 -0
  269. package/styles/paginator/paginator.css.d.ts +1 -0
  270. package/styles/paginator/paginator.css.js +3 -0
  271. package/styles/paginator/paginator.css.js.map +1 -0
  272. package/styles/toolbar/toolbar.css.d.ts +1 -0
  273. package/styles/toolbar/toolbar.css.js +3 -0
  274. package/styles/toolbar/toolbar.css.js.map +1 -0
  275. package/styles.css +17 -0
  276. package/dist/bundle.js +0 -2194
  277. package/dist/docs/assets/highlight.css +0 -43
  278. package/dist/docs/assets/main.js +0 -58
  279. package/dist/docs/assets/search.js +0 -1
  280. package/dist/docs/assets/style.css +0 -1365
  281. package/dist/docs/classes/ApexGrid.html +0 -327
  282. package/dist/docs/index.html +0 -82
  283. package/dist/docs/interfaces/ApexFilteredEvent.html +0 -104
  284. package/dist/docs/interfaces/ApexFilteringEvent.html +0 -116
  285. package/dist/docs/interfaces/ApexGridEventMap.html +0 -127
  286. package/dist/docs/interfaces/ApexHeaderContext.html +0 -104
  287. package/dist/docs/interfaces/BaseApexCellContext.html +0 -120
  288. package/dist/docs/interfaces/BaseColumnConfiguration.html +0 -196
  289. package/dist/docs/interfaces/BaseColumnSortConfiguration.html +0 -106
  290. package/dist/docs/interfaces/BaseFilterExpression.html +0 -132
  291. package/dist/docs/interfaces/BaseSortExpression.html +0 -124
  292. package/dist/docs/interfaces/ColumnFilterConfiguration.html +0 -92
  293. package/dist/docs/interfaces/DataPipelineConfiguration.html +0 -104
  294. package/dist/docs/interfaces/GridSortConfiguration.html +0 -99
  295. package/dist/docs/modules.html +0 -102
  296. package/dist/docs/types/ApexCellContext.html +0 -74
  297. package/dist/docs/types/BasePropertyType.html +0 -74
  298. package/dist/docs/types/BaseSortComparer.html +0 -89
  299. package/dist/docs/types/ColumnConfiguration.html +0 -74
  300. package/dist/docs/types/ColumnSortConfiguration.html +0 -74
  301. package/dist/docs/types/DataPipelineHook.html +0 -85
  302. package/dist/docs/types/DataPipelineParams.html +0 -87
  303. package/dist/docs/types/DataType.html +0 -67
  304. package/dist/docs/types/FilterCriteria.html +0 -71
  305. package/dist/docs/types/FilterExpression.html +0 -74
  306. package/dist/docs/types/Keys.html +0 -72
  307. package/dist/docs/types/PropertyType.html +0 -74
  308. package/dist/docs/types/SortComparer.html +0 -74
  309. package/dist/docs/types/SortExpression.html +0 -74
  310. package/dist/docs/types/SortState.html +0 -72
  311. package/dist/docs/types/SortingDirection.html +0 -69
  312. package/dist/src/components/cell.d.ts +0 -36
  313. package/dist/src/components/cell.d.ts.map +0 -1
  314. package/dist/src/components/cell.js +0 -55
  315. package/dist/src/components/cell.js.map +0 -1
  316. package/dist/src/components/filter-row.d.ts.map +0 -1
  317. package/dist/src/components/filter-row.js +0 -316
  318. package/dist/src/components/filter-row.js.map +0 -1
  319. package/dist/src/components/grid.d.ts +0 -226
  320. package/dist/src/components/grid.d.ts.map +0 -1
  321. package/dist/src/components/grid.js +0 -309
  322. package/dist/src/components/grid.js.map +0 -1
  323. package/dist/src/components/header-row.d.ts +0 -24
  324. package/dist/src/components/header-row.d.ts.map +0 -1
  325. package/dist/src/components/header-row.js +0 -78
  326. package/dist/src/components/header-row.js.map +0 -1
  327. package/dist/src/components/header.d.ts.map +0 -1
  328. package/dist/src/components/header.js +0 -144
  329. package/dist/src/components/header.js.map +0 -1
  330. package/dist/src/components/row.d.ts +0 -25
  331. package/dist/src/components/row.d.ts.map +0 -1
  332. package/dist/src/components/row.js +0 -68
  333. package/dist/src/components/row.js.map +0 -1
  334. package/dist/src/components/virtualizer.d.ts.map +0 -1
  335. package/dist/src/components/virtualizer.js.map +0 -1
  336. package/dist/src/controllers/data-operation.d.ts +0 -18
  337. package/dist/src/controllers/data-operation.d.ts.map +0 -1
  338. package/dist/src/controllers/data-operation.js +0 -37
  339. package/dist/src/controllers/data-operation.js.map +0 -1
  340. package/dist/src/controllers/dom.d.ts +0 -20
  341. package/dist/src/controllers/dom.d.ts.map +0 -1
  342. package/dist/src/controllers/dom.js +0 -60
  343. package/dist/src/controllers/dom.js.map +0 -1
  344. package/dist/src/controllers/filter.d.ts.map +0 -1
  345. package/dist/src/controllers/filter.js +0 -119
  346. package/dist/src/controllers/filter.js.map +0 -1
  347. package/dist/src/controllers/navigation.d.ts.map +0 -1
  348. package/dist/src/controllers/navigation.js.map +0 -1
  349. package/dist/src/controllers/resize.d.ts.map +0 -1
  350. package/dist/src/controllers/resize.js +0 -70
  351. package/dist/src/controllers/resize.js.map +0 -1
  352. package/dist/src/controllers/sort.d.ts.map +0 -1
  353. package/dist/src/controllers/sort.js +0 -94
  354. package/dist/src/controllers/sort.js.map +0 -1
  355. package/dist/src/controllers/state.d.ts +0 -25
  356. package/dist/src/controllers/state.d.ts.map +0 -1
  357. package/dist/src/controllers/state.js +0 -40
  358. package/dist/src/controllers/state.js.map +0 -1
  359. package/dist/src/define.d.ts.map +0 -1
  360. package/dist/src/define.js.map +0 -1
  361. package/dist/src/index.d.ts +0 -9
  362. package/dist/src/index.d.ts.map +0 -1
  363. package/dist/src/index.js.map +0 -1
  364. package/dist/src/internal/constants.d.ts.map +0 -1
  365. package/dist/src/internal/constants.js.map +0 -1
  366. package/dist/src/internal/icon-registry.d.ts +0 -2
  367. package/dist/src/internal/icon-registry.d.ts.map +0 -1
  368. package/dist/src/internal/icon-registry.js +0 -29
  369. package/dist/src/internal/icon-registry.js.map +0 -1
  370. package/dist/src/internal/is-defined.d.ts.map +0 -1
  371. package/dist/src/internal/is-defined.js.map +0 -1
  372. package/dist/src/internal/mixins/event-emitter.d.ts.map +0 -1
  373. package/dist/src/internal/mixins/event-emitter.js.map +0 -1
  374. package/dist/src/internal/normalize-case.d.ts.map +0 -1
  375. package/dist/src/internal/normalize-case.js.map +0 -1
  376. package/dist/src/internal/part-map.d.ts.map +0 -1
  377. package/dist/src/internal/part-map.js.map +0 -1
  378. package/dist/src/internal/register.d.ts.map +0 -1
  379. package/dist/src/internal/register.js +0 -9
  380. package/dist/src/internal/register.js.map +0 -1
  381. package/dist/src/internal/tags.d.ts.map +0 -1
  382. package/dist/src/internal/tags.js.map +0 -1
  383. package/dist/src/internal/types.d.ts +0 -199
  384. package/dist/src/internal/types.d.ts.map +0 -1
  385. package/dist/src/internal/types.js.map +0 -1
  386. package/dist/src/internal/utils.d.ts +0 -7
  387. package/dist/src/internal/utils.d.ts.map +0 -1
  388. package/dist/src/internal/utils.js +0 -37
  389. package/dist/src/internal/utils.js.map +0 -1
  390. package/dist/src/internal/watch.d.ts.map +0 -1
  391. package/dist/src/internal/watch.js.map +0 -1
  392. package/dist/src/operations/base.d.ts.map +0 -1
  393. package/dist/src/operations/base.js.map +0 -1
  394. package/dist/src/operations/filter/operands/boolean.d.ts.map +0 -1
  395. package/dist/src/operations/filter/operands/boolean.js.map +0 -1
  396. package/dist/src/operations/filter/operands/number.d.ts.map +0 -1
  397. package/dist/src/operations/filter/operands/number.js.map +0 -1
  398. package/dist/src/operations/filter/operands/string.d.ts.map +0 -1
  399. package/dist/src/operations/filter/operands/string.js.map +0 -1
  400. package/dist/src/operations/filter/state.d.ts.map +0 -1
  401. package/dist/src/operations/filter/state.js.map +0 -1
  402. package/dist/src/operations/filter/tree.d.ts.map +0 -1
  403. package/dist/src/operations/filter/tree.js.map +0 -1
  404. package/dist/src/operations/filter/types.d.ts.map +0 -1
  405. package/dist/src/operations/filter/types.js.map +0 -1
  406. package/dist/src/operations/filter.d.ts.map +0 -1
  407. package/dist/src/operations/filter.js.map +0 -1
  408. package/dist/src/operations/sort/types.d.ts.map +0 -1
  409. package/dist/src/operations/sort/types.js.map +0 -1
  410. package/dist/src/operations/sort.d.ts.map +0 -1
  411. package/dist/src/operations/sort.js.map +0 -1
  412. package/dist/src/styles/body-cell/body-cell-styles.css.d.ts.map +0 -1
  413. package/dist/src/styles/body-cell/body-cell-styles.css.js +0 -71
  414. package/dist/src/styles/body-cell/body-cell-styles.css.js.map +0 -1
  415. package/dist/src/styles/body-row/body-row-styles.css.d.ts.map +0 -1
  416. package/dist/src/styles/body-row/body-row-styles.css.js +0 -38
  417. package/dist/src/styles/body-row/body-row-styles.css.js.map +0 -1
  418. package/dist/src/styles/filter-row/filter-row-styles.css.d.ts.map +0 -1
  419. package/dist/src/styles/filter-row/filter-row-styles.css.js +0 -96
  420. package/dist/src/styles/filter-row/filter-row-styles.css.js.map +0 -1
  421. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts +0 -2
  422. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts.map +0 -1
  423. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js +0 -83
  424. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js.map +0 -1
  425. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts.map +0 -1
  426. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js +0 -83
  427. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js.map +0 -1
  428. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts +0 -2
  429. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts.map +0 -1
  430. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js +0 -83
  431. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js.map +0 -1
  432. package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts +0 -2
  433. package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts.map +0 -1
  434. package/dist/src/styles/grid/themes/light/grid.material-styles.css.js +0 -83
  435. package/dist/src/styles/grid/themes/light/grid.material-styles.css.js.map +0 -1
  436. package/dist/src/styles/header-cell/header-cell-styles.css.d.ts +0 -2
  437. package/dist/src/styles/header-cell/header-cell-styles.css.d.ts.map +0 -1
  438. package/dist/src/styles/header-cell/header-cell-styles.css.js +0 -141
  439. package/dist/src/styles/header-cell/header-cell-styles.css.js.map +0 -1
  440. package/dist/src/styles/header-row/header-row.base-styles.css.d.ts +0 -2
  441. package/dist/src/styles/header-row/header-row.base-styles.css.d.ts.map +0 -1
  442. package/dist/src/styles/header-row/header-row.base-styles.css.js +0 -35
  443. package/dist/src/styles/header-row/header-row.base-styles.css.js.map +0 -1
  444. /package/{dist/src/define.js → define.js} +0 -0
  445. /package/{dist/docs → docs}/.nojekyll +0 -0
  446. /package/{dist/src/internal → internal}/constants.js +0 -0
  447. /package/{dist/src/internal → internal}/is-defined.js +0 -0
  448. /package/{dist/src/internal → internal}/mixins/event-emitter.js +0 -0
  449. /package/{dist/src/internal → internal}/normalize-case.js +0 -0
  450. /package/{dist/src/internal → internal}/types.js +0 -0
  451. /package/{dist/src/operations → operations}/base.js +0 -0
  452. /package/{dist/src/operations → operations}/filter/types.js +0 -0
  453. /package/{dist/src/operations → operations}/sort/types.js +0 -0
package/LICENSE CHANGED
@@ -1,9 +1,80 @@
1
- The MIT License (MIT)
1
+ ## 📄 License Options for ApexCharts
2
2
 
3
- Copyright (c) 2023 ApexCharts
3
+ ApexCharts is offered under a **dual-license model** to support individuals, startups, and commercial products of all sizes.
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ ---
6
6
 
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+ ### 🔓 Community License (Free)
8
8
 
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ For individuals, non-profits, educators, and small businesses with **less than $2 million USD in annual revenue**.
10
+
11
+ ✅ What’s allowed:
12
+
13
+ - Personal, educational, or non-profit use
14
+ - Commercial use by small orgs (< $2M annual revenue)
15
+ - Modifications and redistribution (with attribution)
16
+
17
+ 🚫 Not allowed:
18
+
19
+ - Use by companies or entities over $2M/year revenue
20
+ - Use in competing charting products
21
+ - Sublicensing under different terms
22
+
23
+ ➡ By using ApexCharts under this license, you confirm that **you qualify as a Small Organization**.
24
+
25
+ ---
26
+
27
+ ### 💼 Commercial License (Paid)
28
+
29
+ Required if **you or your affiliated organization earns $2 million USD or more per year**.
30
+
31
+ ✅ What's included:
32
+
33
+ - Use in internal tools and commercial applications
34
+ - Modifications and app-level distribution
35
+ - 12-month subscription with updates & support
36
+
37
+ 🚫 Not allowed:
38
+
39
+ - Redistribution in toolkits, SDKs, or platforms
40
+ - Use by unlicensed developers
41
+ - Competing charting products
42
+
43
+ ---
44
+
45
+ ### 🔄 OEM / Redistribution License (Paid)
46
+
47
+ Required if you are **embedding ApexCharts into a product or platform used by other people**, such as:
48
+
49
+ - No-code dashboards
50
+ - Developer platforms
51
+ - Embedded BI tools
52
+ - White-labeled apps or SDKs
53
+
54
+ ✅ What's included:
55
+
56
+ - Redistribution rights for 1 application or product
57
+ - 12-month subscription with updates & support
58
+
59
+ ✅ OEM **not required** if your app simply renders static charts and users **cannot** configure or interact with them.
60
+
61
+ ---
62
+
63
+ ### ⚠️ License Acceptance
64
+
65
+ By installing ApexCharts (e.g., via `npm install apexcharts`), you are agreeing to the applicable license based on your usage:
66
+
67
+ - Community License (if under $2M revenue)
68
+ - Commercial License (if over $2M revenue)
69
+ - OEM License (if redistributing to third-party users)
70
+
71
+ ---
72
+
73
+ ### 🛠 Need a License or Have Questions?
74
+
75
+ 📧 Contact us at [sales@apexcharts.com](mailto:sales@apexcharts.com)
76
+ 📚 Read full license agreements here: [https://apexcharts.com/license](https://apexcharts.com/license)
77
+
78
+ ---
79
+
80
+ Thank you for supporting ApexCharts! Your licensing helps keep it free and open for individuals and small teams.
package/README.md CHANGED
@@ -1,16 +1,526 @@
1
- # Apex data component grid
2
- [![Node.js CI](https://github.com/apexcharts/apexgrid/actions/workflows/node.js.yml/badge.svg)](https://github.com/apexcharts/apexgrid/actions/workflows/node.js.yml)
3
- [![Coverage Status](https://coveralls.io/repos/github/apexcharts/apexgrid/badge.svg?branch=master)](https://coveralls.io/github/apexcharts/apexgrid?branch=master)
1
+ # Apex Grid
4
2
 
3
+ [![Node.js CI](https://github.com/apexcharts/apex-grid/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/apexcharts/apex-grid/actions/workflows/node.js.yml)
4
+ [![Coverage Status](https://coveralls.io/repos/github/apexcharts/apex-grid/badge.svg?branch=main)](https://coveralls.io/github/apexcharts/apex-grid?branch=main)
5
+ [![npm](https://img.shields.io/npm/v/apex-grid.svg)](https://www.npmjs.com/package/apex-grid)
5
6
 
6
- This is still a **very** early proof of concept for a web component based data grid.
7
+ A Lit-based, framework-agnostic web component data grid. Ships as a single custom element `<apex-grid>` with a rich, opt-in feature set and full TypeScript types.
7
8
 
8
- ## Local Development
9
+ ## Features
9
10
 
10
- 1. Clone the repository.
11
- 2. Run `npm install`
12
- 3. Play and explore the codebase.
11
+ - **Row virtualization** via `@lit-labs/virtualizer` — only ~20 rows in the DOM at any time, regardless of dataset size.
12
+ - **Sorting** — single or multi-column, tri-state (asc / desc / none), per-column comparers.
13
+ - **Filtering** — per-column filter chips with string / number / boolean / date operands, plus a quick-filter (global search) input.
14
+ - **Pagination** — local slicing or remote mode with a `pageChanging` / `pageChanged` event pair; built-in `<apex-grid-paginator>`.
15
+ - **Column pinning** — pin to start or end; visual reordering only, source `columns` array is preserved.
16
+ - **Column reordering** — drag-and-drop with per-column opt-out, constrained to the column's pinning group.
17
+ - **Column resizing** — pointer-driven, with a min-width safeguard.
18
+ - **Inline editing** — cell or row mode, click or double-click trigger, per-column opt-in.
19
+ - **Row selection** — single or multiple, optional checkbox column, full programmatic API.
20
+ - **Row expansion (master-detail)** — opt-in chevron column with a `detailTemplate`.
21
+ - **Tree data (nested rows)** — AG Grid–style `getDataPath` pattern over a flat array.
22
+ - **CSV / XLSX export** — programmatic methods plus an optional toolbar dropdown.
23
+ - **Toolbar** — opt-in `<apex-grid-toolbar>` with debounced quick filter and export menu.
24
+ - **Templating** — slot-based templates for cells, headers, editors, and detail panels.
25
+ - **Theming** — Bootstrap / Fluent / Indigo / Material themes via `igniteui-webcomponents`, with light and dark variants.
26
+ - **Accessibility** — WCAG 2.2 AA semantics (`role="grid"` / `role="treegrid"`, `aria-rowcount`, `aria-colcount`, focus + keyboard navigation).
27
+ - **Provenance-signed npm releases** with OIDC trusted publishing.
13
28
 
14
- ## Local demo with Vite
29
+ ---
15
30
 
16
- Run `npm start` to open the demo page in `demo/index.html`
31
+ ## Quick Start
32
+
33
+ ### One-call setup
34
+
35
+ ```ts
36
+ import { setup } from 'apex-grid';
37
+ import 'igniteui-webcomponents/themes/light/bootstrap.css';
38
+
39
+ setup({ theme: 'bootstrap' });
40
+ ```
41
+
42
+ That single call registers `<apex-grid>`, calls `configureTheme('bootstrap')`, and adopts a default host stylesheet (`height: 100%; min-height: 240px`). The Ignite UI theme CSS still has to be imported by you — bundlers can't dynamically import CSS portably.
43
+
44
+ ### Render the grid
45
+
46
+ ```ts
47
+ import { html, render } from 'lit';
48
+ import 'apex-grid/define';
49
+ import type { ColumnConfiguration } from 'apex-grid';
50
+
51
+ type User = { id: number; name: string; age: number; subscribed: boolean };
52
+
53
+ const data: User[] = [
54
+ { id: 1, name: 'Ada Lovelace', age: 36, subscribed: true },
55
+ { id: 2, name: 'Carl Sagan', age: 62, subscribed: false },
56
+ { id: 3, name: 'Grace Hopper', age: 85, subscribed: true },
57
+ ];
58
+
59
+ const columns: ColumnConfiguration<User>[] = [
60
+ { key: 'id', type: 'number', headerText: 'ID', width: '80px', sort: true, filter: true },
61
+ { key: 'name', type: 'string', headerText: 'Name', width: '240px', sort: true, filter: true },
62
+ { key: 'age', type: 'number', headerText: 'Age', width: '100px', sort: true, filter: true },
63
+ { key: 'subscribed', type: 'boolean', headerText: 'Subscribed', width: '140px', sort: true, filter: true },
64
+ ];
65
+
66
+ render(
67
+ html`<apex-grid .data=${data} .columns=${columns}></apex-grid>`,
68
+ document.getElementById('app')!,
69
+ );
70
+ ```
71
+
72
+ ```html
73
+ <style>
74
+ apex-grid { height: 480px; }
75
+ </style>
76
+ <div id="app"></div>
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Manual setup (four steps)
82
+
83
+ If you'd rather not use `setup()`, this is what it does under the hood. Skipping any step produces a grid that "runs" but renders broken (no borders, no filter UI, or only a few collapsed rows).
84
+
85
+ ### 1. Install
86
+
87
+ ```bash
88
+ npm install apex-grid lit
89
+ ```
90
+
91
+ `igniteui-webcomponents` ships as a transitive dependency — no separate install.
92
+
93
+ ### 2. Register the custom element
94
+
95
+ ```ts
96
+ import 'apex-grid/define';
97
+ ```
98
+
99
+ Equivalent long form:
100
+
101
+ ```ts
102
+ import { ApexGrid } from 'apex-grid';
103
+ ApexGrid.register();
104
+ ```
105
+
106
+ Without this, `<apex-grid>` is an inert unknown element.
107
+
108
+ ### 3. Load a theme
109
+
110
+ The grid's filter dropdowns and sort indicators come from `igniteui-webcomponents`. Both the CSS import **and** the `configureTheme()` call are required:
111
+
112
+ ```ts
113
+ import { configureTheme } from 'igniteui-webcomponents';
114
+ import 'igniteui-webcomponents/themes/light/bootstrap.css';
115
+
116
+ configureTheme('bootstrap'); // 'bootstrap' | 'material' | 'fluent' | 'indigo'
117
+ ```
118
+
119
+ For dark mode, swap `light` → `dark` in the import path. The name passed to `configureTheme()` must match the imported CSS file.
120
+
121
+ ### 4. Size the host
122
+
123
+ `@lit-labs/virtualizer` requires a **bounded height**. Without one, the virtualizer collapses to its natural content height (~150px) and only a few rows ever render.
124
+
125
+ ```css
126
+ apex-grid {
127
+ height: 480px; /* any explicit pixel height; % works if the parent has a height */
128
+ }
129
+ ```
130
+
131
+ > [!TIP]
132
+ > `import 'apex-grid/styles.css'` ships a default rule that sets `height: 100%` with a `min-height: 240px` fallback.
133
+
134
+ > [!IMPORTANT]
135
+ > **Do not set `display` on `<apex-grid>`.** The component declares `:host { display: grid }` internally for its track layout (header / filter / body). Any consumer rule that sets `display` (including `block`, `flex`, `inline-block`) collapses the grid. If you accidentally do this, the grid emits a one-shot `console.warn` at startup pointing here.
136
+
137
+ ### What success looks like
138
+
139
+ When all four steps are in place you should see:
140
+
141
+ - **Visible borders** between rows and columns.
142
+ - **Sort arrows** (↕) next to each header when `sort: true`.
143
+ - A **filter row** below the headers with a "Filter" chip per column when `filter: true`.
144
+ - **Hover state** on rows.
145
+ - **Smooth scrolling** — DevTools shows only ~20 `<apex-grid-row>` elements at any time.
146
+
147
+ ### Troubleshooting
148
+
149
+ | What you see | Likely cause |
150
+ |---|---|
151
+ | Bare table, no borders, no filter UI | Step 3 — theme CSS not imported or `configureTheme()` not called |
152
+ | Only ~3 rows visible regardless of data size | Step 4 — no bounded height, **or** consumer CSS sets `display` on `<apex-grid>` (check console for the warning) |
153
+ | `<apex-grid>` blank tag in DOM | Step 2 — element not registered |
154
+ | Columns shown as literal `[object Object]` | `columns=` used as an attribute — must be a **property** (`.columns=${...}` in Lit, `[columns]=` in Angular, `:columns.prop=` in Vue, `el.columns = ...` in vanilla JS) |
155
+
156
+ ---
157
+
158
+ ## Features in depth
159
+
160
+ Each feature below is fully opt-in — you only pay for what you turn on. Snippets assume `const grid = document.querySelector('apex-grid')!`.
161
+
162
+ ### Sorting
163
+
164
+ ```ts
165
+ const columns = [
166
+ { key: 'name', sort: true }, // UI sort + tri-state
167
+ { key: 'age', sort: { direction: 'desc' } }, // initial state
168
+ ];
169
+
170
+ grid.sortConfiguration = { multiple: true, triState: true };
171
+ grid.sort({ key: 'age', direction: 'asc' });
172
+ grid.clearSort(); // or grid.clearSort('age')
173
+ ```
174
+
175
+ Events: `sorting` (cancellable), `sorted`.
176
+
177
+ ### Filtering
178
+
179
+ ```ts
180
+ const columns = [
181
+ { key: 'name', filter: true }, // UI filter chip
182
+ { key: 'age', filter: true, type: 'number' }, // operands by type
183
+ ];
184
+
185
+ import { StringOperands } from 'apex-grid';
186
+ grid.filter({ key: 'name', condition: StringOperands.contains, searchTerm: 'Ada' });
187
+ grid.clearFilter();
188
+ ```
189
+
190
+ Operand classes: `StringOperands`, `NumberOperands`, `BooleanOperands`. Events: `filtering` (cancellable), `filtered`.
191
+
192
+ ### Quick filter (global search)
193
+
194
+ ```ts
195
+ grid.showQuickFilter = true; // renders the toolbar input
196
+ grid.quickFilter = 'ada'; // or: await grid.setQuickFilter('ada')
197
+ ```
198
+
199
+ Custom matcher via `dataPipelineConfiguration.quickFilter`. Events: `quickFilterChanging` (cancellable), `quickFilterChanged`. Attribute: `show-quick-filter`, `quick-filter`.
200
+
201
+ ### Pagination
202
+
203
+ ```ts
204
+ grid.pagination = {
205
+ enabled: true,
206
+ pageSize: 25,
207
+ pageSizeOptions: [10, 25, 50, 100],
208
+ };
209
+
210
+ await grid.gotoPage(2);
211
+ await grid.setPageSize(50);
212
+ grid.nextPage(); grid.previousPage(); grid.firstPage(); grid.lastPage();
213
+ ```
214
+
215
+ Remote mode:
216
+
217
+ ```ts
218
+ grid.pagination = { enabled: true, mode: 'remote', pageSize: 25, totalItems: 1280 };
219
+ grid.addEventListener('pageChanged', async (e) => {
220
+ grid.data = await fetchPage(e.detail.page, e.detail.pageSize);
221
+ });
222
+ ```
223
+
224
+ Properties: `page`, `pageSize`, `pageCount`, `totalItems`, `pageItems`. Events: `pageChanging` (cancellable), `pageChanged`.
225
+
226
+ ### Column pinning
227
+
228
+ ```ts
229
+ const columns = [
230
+ { key: 'id', pinned: 'start' },
231
+ { key: 'name' },
232
+ { key: 'actions', pinned: 'end' },
233
+ ];
234
+
235
+ await grid.pinColumn('name', 'start');
236
+ await grid.unpinColumn('name'); // or pinColumn('name', null)
237
+ ```
238
+
239
+ The source `columns` array is **not** reordered — only the visual render order changes. Read `grid.displayColumns` for the render order. Events: `columnPinning` (cancellable), `columnPinned`.
240
+
241
+ ### Column reordering
242
+
243
+ ```html
244
+ <apex-grid column-reordering></apex-grid>
245
+ ```
246
+
247
+ Or programmatic:
248
+
249
+ ```ts
250
+ await grid.moveColumn('email', 'name', 'after');
251
+ ```
252
+
253
+ Per-column opt-out: `{ key: 'id', reorderable: false }`. Reordering is constrained to the column's own pinning group (start / unpinned / end). Events: `columnMoving` (cancellable), `columnMoved`. Attribute: `column-reordering`.
254
+
255
+ ### Inline editing
256
+
257
+ ```ts
258
+ const columns = [
259
+ { key: 'name', editable: true },
260
+ { key: 'age', editable: true, type: 'number' },
261
+ ];
262
+
263
+ grid.editing = { enabled: true, mode: 'cell', trigger: 'doubleClick' };
264
+
265
+ await grid.editCell(0, 'name');
266
+ await grid.commitEdit();
267
+ grid.cancelEdit();
268
+ ```
269
+
270
+ `mode: 'row'` puts all editable cells in the row into edit together. Properties: `editingCell`, `editingRow`. Events: `cellValueChanging` (cancellable), `cellValueChanged`, plus `rowEditStarted` / `rowEditEnded` in row mode.
271
+
272
+ ### Row selection
273
+
274
+ ```ts
275
+ grid.selection = { enabled: true, mode: 'multiple', showCheckboxColumn: true };
276
+
277
+ await grid.selectRow(data[0]);
278
+ await grid.toggleRowSelection(data[1]);
279
+ await grid.selectAllRows();
280
+ await grid.clearSelection();
281
+ grid.selectedRows; // snapshot
282
+ grid.selectedRows = [data[2]]; // replace selection (goes through `rowSelecting`)
283
+ ```
284
+
285
+ Events: `rowSelecting` (cancellable), `rowSelected`.
286
+
287
+ ### Row expansion (master-detail)
288
+
289
+ ```ts
290
+ grid.expansion = {
291
+ enabled: true,
292
+ detailTemplate: ({ data }) => html`<order-summary .order=${data}></order-summary>`,
293
+ isExpandable: (row) => row.hasDetails,
294
+ };
295
+
296
+ await grid.expandRow(data[0]);
297
+ await grid.toggleRowExpansion(data[0]);
298
+ await grid.expandAllRows();
299
+ await grid.collapseAllRows();
300
+ grid.expandedRows; // snapshot
301
+ ```
302
+
303
+ Events: `rowExpanding` (cancellable), `rowExpanded`.
304
+
305
+ ### Tree data (nested rows)
306
+
307
+ The data array stays **flat**. The grid derives the hierarchy from a `getDataPath(row)` callback that returns the path from root to that row — AG Grid's "tree data" pattern.
308
+
309
+ ```ts
310
+ type Person = { id: number; name: string; title: string; path: string[] };
311
+
312
+ const data: Person[] = [
313
+ { id: 1, name: 'Adrian', title: 'CEO', path: ['Adrian'] },
314
+ { id: 2, name: 'Bryan', title: 'VP Eng', path: ['Adrian', 'Bryan'] },
315
+ { id: 3, name: 'Cara', title: 'Manager', path: ['Adrian', 'Bryan', 'Cara'] },
316
+ ];
317
+
318
+ grid.tree = {
319
+ enabled: true,
320
+ getDataPath: (row) => row.path,
321
+ defaultExpanded: 1, // boolean | number — depth to expand
322
+ groupColumnKey: 'name', // which column shows the chevron + indent
323
+ childIndent: 20, // px per depth level
324
+ };
325
+
326
+ await grid.toggleTreeRow(data[0]);
327
+ await grid.expandAllTreeRows();
328
+ ```
329
+
330
+ Methods: `toggleTreeRow`, `expandTreeRow`, `collapseTreeRow`, `expandAllTreeRows`, `collapseAllTreeRows`, `isTreeRowExpanded`. Events: `treeRowExpanding` (cancellable), `treeRowExpanded`. When tree mode is active, the host element advertises `role="treegrid"`.
331
+
332
+ ### CSV / XLSX export
333
+
334
+ Programmatic:
335
+
336
+ ```ts
337
+ grid.exportToCSV(); // downloads data.csv
338
+ grid.exportToCSV({ filename: 'users', source: 'selected' });
339
+ const text = grid.exportToCSV({ filename: '' }); // no download, returns the string
340
+
341
+ grid.exportToXLSX({ filename: 'users', sheetName: 'Users' });
342
+ ```
343
+
344
+ `source` can be `'view'` (default — post-filter/post-sort), `'page'`, `'selected'`, or `'all'`. Per-column opt-out: `{ key: 'secret', exportable: false }`. XLSX preserves native cell types for numbers, booleans, and `Date` values.
345
+
346
+ Toolbar dropdown:
347
+
348
+ ```html
349
+ <apex-grid show-export></apex-grid>
350
+ ```
351
+
352
+ Renders a download icon in the toolbar's trailing actions area; the menu has "Export CSV" and "Export XLSX" entries. Toolbar `exportFilename` overrides the default `data` filename. Attribute: `show-export`.
353
+
354
+ ### Toolbar
355
+
356
+ Rendered automatically above the header row when at least one of `show-quick-filter` or `show-export` is on. CSS parts:
357
+
358
+ | Part | What |
359
+ |---|---|
360
+ | `toolbar` | Root container |
361
+ | `toolbar-search` | Quick-filter input wrapper |
362
+ | `search-field` | The bordered input field |
363
+ | `search-icon`, `search-input` | Leading icon, input element |
364
+ | `toolbar-actions` | Trailing actions area |
365
+ | `export-trigger` | Export menu button |
366
+ | `export-menu` | Dropdown panel |
367
+ | `export-menu-item` | Menu item |
368
+
369
+ Search input has a `debounce` attribute (default `200`ms).
370
+
371
+ ### Theming
372
+
373
+ Built-in themes: `bootstrap`, `material`, `fluent`, `indigo` — each with `light` and `dark` variants. Switch at runtime via `configureTheme(name)`.
374
+
375
+ Style with CSS parts on the grid, paginator, and toolbar:
376
+
377
+ ```css
378
+ apex-grid::part(paginator) { background: var(--surface-2); }
379
+ apex-grid-toolbar::part(search-input) { font-family: var(--font-mono); }
380
+ ```
381
+
382
+ ---
383
+
384
+ ## API Reference
385
+
386
+ ### Properties
387
+
388
+ | Property | Type | Default | Notes |
389
+ |---|---|---|---|
390
+ | `data` | `T[]` | `[]` | Source records (property only) |
391
+ | `columns` | `ColumnConfiguration<T>[]` | `[]` | Column configuration (property only) |
392
+ | `autoGenerate` | `boolean` | `false` | Infer columns from `data[0]` keys. Attr `auto-generate` |
393
+ | `sortConfiguration` | `GridSortConfiguration` | `{ multiple, triState }` | |
394
+ | `dataPipelineConfiguration` | `DataPipelineConfiguration<T>` | — | Custom sort/filter/pagination hooks |
395
+ | `pagination` | `PaginationConfiguration` | — | |
396
+ | `quickFilter` | `string` | `''` | Attr `quick-filter` |
397
+ | `showQuickFilter` | `boolean` | `false` | Attr `show-quick-filter` |
398
+ | `showExport` | `boolean` | `false` | Attr `show-export` |
399
+ | `columnReordering` | `boolean` | `false` | Attr `column-reordering` |
400
+ | `editing` | `GridEditingConfiguration` | — | |
401
+ | `selection` | `GridSelectionConfiguration` | — | |
402
+ | `expansion` | `GridExpansionConfiguration<T>` | — | |
403
+ | `tree` | `GridTreeConfiguration<T>` | — | |
404
+ | `sortExpressions` | `SortExpression<T>[]` | — | Get/set |
405
+ | `filterExpressions` | `FilterExpression<T>[]` | — | Get/set |
406
+ | `selectedRows` | `T[]` | — | Get/set |
407
+ | `expandedRows` | `T[]` | — | Get/set |
408
+ | `page`, `pageSize`, `pageCount`, `totalItems` | `number` | — | |
409
+ | `pageItems` | `readonly T[]` | — | Currently rendered slice |
410
+ | `dataView` | `readonly T[]` | — | Post-filter, post-sort |
411
+ | `displayColumns` | `readonly ColumnConfiguration<T>[]` | — | Render order (pinned start → unpinned → pinned end) |
412
+ | `editingCell` | `{ rowIndex, columnKey } \| null` | — | |
413
+ | `editingRow` | `number \| null` | — | Row-mode only |
414
+
415
+ ### Methods
416
+
417
+ ```ts
418
+ sort(expr): void
419
+ filter(expr): void
420
+ clearSort(key?): void
421
+ clearFilter(key?): void
422
+ setQuickFilter(value): Promise<boolean>
423
+
424
+ getColumn(keyOrIndex): ColumnConfiguration<T> | undefined
425
+ updateColumns(columns): void
426
+ pinColumn(key, 'start' | 'end' | null): Promise<boolean>
427
+ unpinColumn(key): Promise<boolean>
428
+ moveColumn(fromKey, toKey, 'before' | 'after'): Promise<boolean>
429
+
430
+ gotoPage(page): Promise<boolean>
431
+ setPageSize(size): Promise<boolean>
432
+ nextPage(); previousPage(); firstPage(); lastPage()
433
+
434
+ editCell(rowIndex, columnKey): Promise<boolean>
435
+ editRow(rowIndex): Promise<boolean>
436
+ commitEdit(): Promise<boolean>
437
+ cancelEdit(): void
438
+
439
+ selectRow(row); deselectRow(row); toggleRowSelection(row)
440
+ selectAllRows(); clearSelection(); isRowSelected(row)
441
+
442
+ expandRow(row); collapseRow(row); toggleRowExpansion(row)
443
+ expandAllRows(); collapseAllRows(); isRowExpanded(row)
444
+
445
+ toggleTreeRow(row); expandTreeRow(row); collapseTreeRow(row)
446
+ expandAllTreeRows(); collapseAllTreeRows(); isTreeRowExpanded(row)
447
+
448
+ exportToCSV(options?): string
449
+ exportToXLSX(options?): Uint8Array
450
+ ```
451
+
452
+ ### Events
453
+
454
+ All events bubble and are composed across shadow boundaries. Names ending in `-ing` are cancellable.
455
+
456
+ | Event | Cancellable | Detail |
457
+ |---|---|---|
458
+ | `sorting` / `sorted` | yes / no | `SortExpression<T>[]` |
459
+ | `filtering` / `filtered` | yes / no | `FilterExpression<T>[]` |
460
+ | `quickFilterChanging` / `quickFilterChanged` | yes / no | `{ value, nextValue? }` |
461
+ | `pageChanging` / `pageChanged` | yes / no | `{ page, pageSize, pageCount, totalItems }` |
462
+ | `columnPinning` / `columnPinned` | yes / no | `{ key, previous, next }` / `{ key, pinned }` |
463
+ | `columnMoving` / `columnMoved` | yes / no | `{ key, fromIndex, toKey, position }` / `{ key, fromIndex, toIndex }` |
464
+ | `cellValueChanging` / `cellValueChanged` | yes / no | `{ row, column, value, newValue }` |
465
+ | `rowEditStarted` / `rowEditEnded` | no / no | row context |
466
+ | `rowSelecting` / `rowSelected` | yes / no | `{ added, removed }` |
467
+ | `rowExpanding` / `rowExpanded` | yes / no | row context |
468
+ | `treeRowExpanding` / `treeRowExpanded` | yes / no | row context |
469
+
470
+ Programmatic `sort()` / `filter()` calls are silent — only UI-initiated changes emit `sorting` / `filtering`.
471
+
472
+ ### Attributes
473
+
474
+ `auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`.
475
+
476
+ ### CSS parts
477
+
478
+ | Component | Parts |
479
+ |---|---|
480
+ | `<apex-grid-toolbar>` | `toolbar`, `toolbar-search`, `search-field`, `search-icon`, `search-input`, `toolbar-actions`, `export-trigger`, `export-menu`, `export-menu-item` |
481
+ | `<apex-grid-paginator>` | `paginator`, `paginator-size`, `paginator-info`, `paginator-controls`, `paginator-page` |
482
+ | `<apex-grid-cell>` | `cell`, `editor` |
483
+
484
+ ---
485
+
486
+ ## Framework integration
487
+
488
+ `<apex-grid>` is a standard custom element. Bind properties (not attributes) for `data` / `columns`:
489
+
490
+ | Framework | Syntax |
491
+ |---|---|
492
+ | Lit | `<apex-grid .data=${data} .columns=${columns}>` |
493
+ | Angular | `<apex-grid [data]="data" [columns]="columns">` (use `CUSTOM_ELEMENTS_SCHEMA`) |
494
+ | Vue | `<apex-grid :data.prop="data" :columns.prop="columns">` |
495
+ | React (19+) | `<apex-grid data={data} columns={columns}>` |
496
+ | Vanilla | `el.data = data; el.columns = columns;` |
497
+
498
+ ---
499
+
500
+ ## Local development
501
+
502
+ ```bash
503
+ git clone https://github.com/apexcharts/apex-grid.git
504
+ cd apex-grid
505
+ npm install
506
+ npm start # demo at http://localhost:5173
507
+ npm test # web-test-runner
508
+ npm run lint
509
+ npm run build # builds dist/ + custom-elements.json + typedoc
510
+ ```
511
+
512
+ ## Releasing
513
+
514
+ Releases are automated by [.github/workflows/publish.yml](.github/workflows/publish.yml):
515
+
516
+ 1. Bump `"version"` in [package.json](package.json) — the single source of truth. The build injects it into `dist/package.json`.
517
+ 2. Commit with a message starting with `release:` and the same version, e.g. `release: 2.0.0` or `release: 2.0.0-rc.1`.
518
+ 3. Push to `main`.
519
+
520
+ The workflow then verifies the version triple-match, runs lint + tests + build, publishes `dist/` to npm with `--provenance` (OIDC trusted publishing — no token in secrets), and creates a `vX.Y.Z` git tag and GitHub Release with auto-generated notes. Pre-release versions (containing `-`) publish under the `next` dist-tag; stable versions under `latest`.
521
+
522
+ Any push whose head commit does not start with `release:` is a no-op for the workflow.
523
+
524
+ ## License
525
+
526
+ See [LICENSE.md](LICENSE.md).