@1771technologies/lytenyte-pro 1.0.12-dev.1 → 1.0.12-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (499) hide show
  1. package/dist/+types.d.ts +5836 -0
  2. package/dist/+types.js +1 -0
  3. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +2 -0
  4. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +43 -0
  5. package/dist/cell-selection/are-rects-equal.d.ts +2 -0
  6. package/dist/cell-selection/are-rects-equal.js +6 -0
  7. package/dist/cell-selection/bound-selection-rect.d.ts +2 -0
  8. package/dist/cell-selection/bound-selection-rect.js +17 -0
  9. package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
  10. package/dist/cell-selection/cell-selection-containers.js +91 -0
  11. package/dist/cell-selection/cell-selection-driver.d.ts +1 -0
  12. package/dist/cell-selection/cell-selection-driver.js +285 -0
  13. package/dist/cell-selection/cell-style-row.d.ts +8 -0
  14. package/dist/cell-selection/cell-style-row.js +84 -0
  15. package/dist/cell-selection/deselect-rect-range.d.ts +2 -0
  16. package/dist/cell-selection/deselect-rect-range.js +43 -0
  17. package/dist/cell-selection/expand-cell-selection-down.d.ts +5 -0
  18. package/dist/cell-selection/expand-cell-selection-down.js +39 -0
  19. package/dist/cell-selection/expand-cell-selection-end.d.ts +5 -0
  20. package/dist/cell-selection/expand-cell-selection-end.js +40 -0
  21. package/dist/cell-selection/expand-cell-selection-start.d.ts +5 -0
  22. package/dist/cell-selection/expand-cell-selection-start.js +39 -0
  23. package/dist/cell-selection/expand-cell-selection-up.d.ts +5 -0
  24. package/dist/cell-selection/expand-cell-selection-up.js +39 -0
  25. package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
  26. package/dist/cell-selection/full-width-start-end-index.js +5 -0
  27. package/dist/cell-selection/get-root-cell.d.ts +2 -0
  28. package/dist/cell-selection/get-root-cell.js +6 -0
  29. package/dist/cell-selection/index.d.ts +18 -0
  30. package/dist/cell-selection/index.js +18 -0
  31. package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
  32. package/dist/cell-selection/is-bottom-rect.js +7 -0
  33. package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
  34. package/dist/cell-selection/is-center-col-rect.js +5 -0
  35. package/dist/cell-selection/is-center-rect.d.ts +2 -0
  36. package/dist/cell-selection/is-center-rect.js +5 -0
  37. package/dist/cell-selection/is-end-rect.d.ts +5 -0
  38. package/dist/cell-selection/is-end-rect.js +4 -0
  39. package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
  40. package/dist/cell-selection/is-overlapping-rect.js +6 -0
  41. package/dist/cell-selection/is-start-rect.d.ts +5 -0
  42. package/dist/cell-selection/is-start-rect.js +4 -0
  43. package/dist/cell-selection/is-top-rect.d.ts +2 -0
  44. package/dist/cell-selection/is-top-rect.js +4 -0
  45. package/dist/cell-selection/is-within-selection-rect.d.ts +2 -0
  46. package/dist/cell-selection/is-within-selection-rect.js +3 -0
  47. package/dist/cell-selection/split-cell-selection-rect.d.ts +46 -0
  48. package/dist/cell-selection/split-cell-selection-rect.js +88 -0
  49. package/dist/cell-selection/split-on-pivot.d.ts +3 -0
  50. package/dist/cell-selection/split-on-pivot.js +50 -0
  51. package/dist/cell-selection/update-additive-cell-selection.d.ts +5 -0
  52. package/dist/cell-selection/update-additive-cell-selection.js +23 -0
  53. package/dist/cell-selection/use-edge-scroll.d.ts +10 -0
  54. package/dist/cell-selection/use-edge-scroll.js +66 -0
  55. package/dist/cells/+types.cell.d.ts +13 -0
  56. package/dist/cells/+types.cell.js +1 -0
  57. package/dist/cells/cell-default.d.ts +2 -0
  58. package/dist/cells/cell-default.js +8 -0
  59. package/dist/cells/cell-editor.d.ts +6 -0
  60. package/dist/cells/cell-editor.js +103 -0
  61. package/dist/cells/cell-spacer.d.ts +9 -0
  62. package/dist/cells/cell-spacer.js +34 -0
  63. package/dist/cells/cell.d.ts +5 -0
  64. package/dist/cells/cell.js +43 -0
  65. package/dist/cells/use-cell-style.d.ts +3 -0
  66. package/dist/cells/use-cell-style.js +51 -0
  67. package/dist/column-manager/branch-lookup-context.d.ts +4 -0
  68. package/dist/column-manager/branch-lookup-context.js +3 -0
  69. package/dist/column-manager/branch.d.ts +15 -0
  70. package/dist/column-manager/branch.js +54 -0
  71. package/dist/column-manager/column-manager.d.ts +13 -0
  72. package/dist/column-manager/column-manager.js +18 -0
  73. package/dist/column-manager/context.d.ts +7 -0
  74. package/dist/column-manager/context.js +3 -0
  75. package/dist/column-manager/label.d.ts +5 -0
  76. package/dist/column-manager/label.js +18 -0
  77. package/dist/column-manager/leaf.d.ts +6 -0
  78. package/dist/column-manager/leaf.js +58 -0
  79. package/dist/column-manager/move-handle.d.ts +5 -0
  80. package/dist/column-manager/move-handle.js +73 -0
  81. package/dist/column-manager/panel.d.ts +1 -0
  82. package/dist/column-manager/panel.js +2 -0
  83. package/dist/column-manager/root.d.ts +8 -0
  84. package/dist/column-manager/root.js +7 -0
  85. package/dist/column-manager/use-column-manager.d.ts +10 -0
  86. package/dist/column-manager/use-column-manager.js +24 -0
  87. package/dist/column-manager/use-columns-from-context.d.ts +3 -0
  88. package/dist/column-manager/use-columns-from-context.js +23 -0
  89. package/dist/column-manager/visibility-checkbox.d.ts +9 -0
  90. package/dist/column-manager/visibility-checkbox.js +30 -0
  91. package/dist/context.d.ts +10 -0
  92. package/dist/context.js +4 -0
  93. package/dist/filter-tree/branch.d.ts +13 -0
  94. package/dist/filter-tree/branch.js +21 -0
  95. package/dist/filter-tree/context.d.ts +27 -0
  96. package/dist/filter-tree/context.js +5 -0
  97. package/dist/filter-tree/filter-tree.d.ts +14 -0
  98. package/dist/filter-tree/filter-tree.js +18 -0
  99. package/dist/filter-tree/hooks/use-filter-tree.d.ts +38 -0
  100. package/dist/filter-tree/hooks/use-filter-tree.js +101 -0
  101. package/dist/filter-tree/hooks/use-tree-item.d.ts +8 -0
  102. package/dist/filter-tree/hooks/use-tree-item.js +116 -0
  103. package/dist/filter-tree/inclusion-checkbox.d.ts +9 -0
  104. package/dist/filter-tree/inclusion-checkbox.js +14 -0
  105. package/dist/filter-tree/label.d.ts +5 -0
  106. package/dist/filter-tree/label.js +18 -0
  107. package/dist/filter-tree/leaf.d.ts +6 -0
  108. package/dist/filter-tree/leaf.js +14 -0
  109. package/dist/filter-tree/root.d.ts +13 -0
  110. package/dist/filter-tree/root.js +30 -0
  111. package/dist/grid-box/+types.d.ts +15 -0
  112. package/dist/grid-box/+types.js +1 -0
  113. package/dist/grid-box/context.d.ts +9 -0
  114. package/dist/grid-box/context.js +3 -0
  115. package/dist/grid-box/grid-box.d.ts +12 -0
  116. package/dist/grid-box/grid-box.js +14 -0
  117. package/dist/grid-box/item.d.ts +10 -0
  118. package/dist/grid-box/item.js +63 -0
  119. package/dist/grid-box/panel.d.ts +1 -0
  120. package/dist/grid-box/panel.js +9 -0
  121. package/dist/grid-box/root.d.ts +9 -0
  122. package/dist/grid-box/root.js +8 -0
  123. package/dist/grid-box/use-aggregation-box-items.d.ts +18 -0
  124. package/dist/grid-box/use-aggregation-box-items.js +61 -0
  125. package/dist/grid-box/use-column-box-items.d.ts +34 -0
  126. package/dist/grid-box/use-column-box-items.js +78 -0
  127. package/dist/grid-box/use-row-group-box-items.d.ts +18 -0
  128. package/dist/grid-box/use-row-group-box-items.js +169 -0
  129. package/dist/grid-provider/context.d.ts +5 -0
  130. package/dist/grid-provider/context.js +2 -0
  131. package/dist/grid-provider/provider.d.ts +3 -0
  132. package/dist/grid-provider/provider.js +2 -0
  133. package/dist/grid-provider/use-grid.d.ts +3 -0
  134. package/dist/grid-provider/use-grid.js +3 -0
  135. package/dist/grid.d.ts +18 -0
  136. package/dist/grid.js +28 -0
  137. package/dist/header/header-cell.d.ts +10 -0
  138. package/dist/header/header-cell.js +22 -0
  139. package/dist/header/header-group-cell.d.ts +5 -0
  140. package/dist/header/header-group-cell.js +16 -0
  141. package/dist/header/header-row.d.ts +4 -0
  142. package/dist/header/header-row.js +10 -0
  143. package/dist/header/header.d.ts +1 -0
  144. package/dist/header/header.js +12 -0
  145. package/dist/header/resize-handler.d.ts +12 -0
  146. package/dist/header/resize-handler.js +136 -0
  147. package/dist/header/use-drag-move.d.ts +14 -0
  148. package/dist/header/use-drag-move.js +97 -0
  149. package/dist/header/use-header-cell-renderer.d.ts +4 -0
  150. package/dist/header/use-header-cell-renderer.js +36 -0
  151. package/dist/icons/index.d.ts +1 -0
  152. package/dist/icons/index.js +3 -0
  153. package/dist/index.d.ts +13 -0
  154. package/dist/index.js +13 -0
  155. package/dist/license.d.ts +3 -0
  156. package/dist/license.js +214 -0
  157. package/dist/listbox/context.d.ts +6 -0
  158. package/dist/listbox/context.js +3 -0
  159. package/dist/listbox/item.d.ts +1 -0
  160. package/dist/listbox/item.js +25 -0
  161. package/dist/listbox/panel.d.ts +1 -0
  162. package/dist/listbox/panel.js +50 -0
  163. package/dist/listbox/root.d.ts +6 -0
  164. package/dist/listbox/root.js +12 -0
  165. package/dist/root/dialog-driver.d.ts +1 -0
  166. package/dist/root/dialog-driver.js +21 -0
  167. package/dist/root/popover-driver.d.ts +1 -0
  168. package/dist/root/popover-driver.js +21 -0
  169. package/dist/root/root.d.ts +8 -0
  170. package/dist/root/root.js +125 -0
  171. package/dist/row-data-source-client/+constants.d.ts +2 -0
  172. package/dist/row-data-source-client/+constants.js +2 -0
  173. package/dist/row-data-source-client/+types.d.ts +27 -0
  174. package/dist/row-data-source-client/+types.js +1 -0
  175. package/dist/row-data-source-client/built-ins/avg.d.ts +10 -0
  176. package/dist/row-data-source-client/built-ins/avg.js +16 -0
  177. package/dist/row-data-source-client/built-ins/built-ins.d.ts +44 -0
  178. package/dist/row-data-source-client/built-ins/built-ins.js +44 -0
  179. package/dist/row-data-source-client/built-ins/count.d.ts +10 -0
  180. package/dist/row-data-source-client/built-ins/count.js +16 -0
  181. package/dist/row-data-source-client/built-ins/first.d.ts +10 -0
  182. package/dist/row-data-source-client/built-ins/first.js +12 -0
  183. package/dist/row-data-source-client/built-ins/group.d.ts +1 -0
  184. package/dist/row-data-source-client/built-ins/group.js +3 -0
  185. package/dist/row-data-source-client/built-ins/last.d.ts +10 -0
  186. package/dist/row-data-source-client/built-ins/last.js +12 -0
  187. package/dist/row-data-source-client/built-ins/max.d.ts +11 -0
  188. package/dist/row-data-source-client/built-ins/max.js +25 -0
  189. package/dist/row-data-source-client/built-ins/min.d.ts +11 -0
  190. package/dist/row-data-source-client/built-ins/min.js +25 -0
  191. package/dist/row-data-source-client/built-ins/sum.d.ts +10 -0
  192. package/dist/row-data-source-client/built-ins/sum.js +21 -0
  193. package/dist/row-data-source-client/filter/+types.d.ts +23 -0
  194. package/dist/row-data-source-client/filter/+types.js +1 -0
  195. package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +2 -0
  196. package/dist/row-data-source-client/filter/compute-filtered-rows.js +109 -0
  197. package/dist/row-data-source-client/pivots/create-agg-model.d.ts +6 -0
  198. package/dist/row-data-source-client/pivots/create-agg-model.js +13 -0
  199. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +2 -0
  200. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +50 -0
  201. package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +2 -0
  202. package/dist/row-data-source-client/pivots/create-pivot-columns.js +22 -0
  203. package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +2 -0
  204. package/dist/row-data-source-client/pivots/create-pivot-tree.js +23 -0
  205. package/dist/row-data-source-client/tree/client-tree.d.ts +18 -0
  206. package/dist/row-data-source-client/tree/client-tree.js +76 -0
  207. package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +2 -0
  208. package/dist/row-data-source-client/tree/evaluator-aggregation.js +8 -0
  209. package/dist/row-data-source-client/tree/evaluator-group.d.ts +2 -0
  210. package/dist/row-data-source-client/tree/evaluator-group.js +9 -0
  211. package/dist/row-data-source-client/tree/traverse.d.ts +2 -0
  212. package/dist/row-data-source-client/tree/traverse.js +22 -0
  213. package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +10 -0
  214. package/dist/row-data-source-client/use-client-data-source-paginated.js +572 -0
  215. package/dist/row-data-source-client/use-client-data-source.d.ts +10 -0
  216. package/dist/row-data-source-client/use-client-data-source.js +666 -0
  217. package/dist/row-data-source-client/use-client-tree-data-source.d.ts +9 -0
  218. package/dist/row-data-source-client/use-client-tree-data-source.js +511 -0
  219. package/dist/row-data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
  220. package/dist/row-data-source-server/async-tree/+constants.async-tree.js +1 -0
  221. package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +59 -0
  222. package/dist/row-data-source-server/async-tree/+types.async-tree.js +1 -0
  223. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
  224. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
  225. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
  226. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +36 -0
  227. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +2 -0
  228. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +24 -0
  229. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +2 -0
  230. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +14 -0
  231. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +2 -0
  232. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +18 -0
  233. package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +2 -0
  234. package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +14 -0
  235. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
  236. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +18 -0
  237. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
  238. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
  239. package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +2 -0
  240. package/dist/row-data-source-server/async-tree/make-async-tree.js +19 -0
  241. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
  242. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
  243. package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
  244. package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +17 -0
  245. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
  246. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +52 -0
  247. package/dist/row-data-source-server/range-tree/range-tree.d.ts +66 -0
  248. package/dist/row-data-source-server/range-tree/range-tree.js +102 -0
  249. package/dist/row-data-source-server/server-data.d.ts +48 -0
  250. package/dist/row-data-source-server/server-data.js +378 -0
  251. package/dist/row-data-source-server/use-server-data-source.d.ts +3 -0
  252. package/dist/row-data-source-server/use-server-data-source.js +344 -0
  253. package/dist/row-data-source-server/utils/get-node-depth.d.ts +2 -0
  254. package/dist/row-data-source-server/utils/get-node-depth.js +9 -0
  255. package/dist/row-data-source-server/utils/get-node-path.d.ts +2 -0
  256. package/dist/row-data-source-server/utils/get-node-path.js +9 -0
  257. package/dist/row-data-source-server/utils/get-request-id.d.ts +1 -0
  258. package/dist/row-data-source-server/utils/get-request-id.js +6 -0
  259. package/dist/rows/row/context.d.ts +14 -0
  260. package/dist/rows/row/context.js +13 -0
  261. package/dist/rows/row/row.d.ts +7 -0
  262. package/dist/rows/row/row.js +25 -0
  263. package/dist/rows/row/use-row-context-value.d.ts +6 -0
  264. package/dist/rows/row/use-row-context-value.js +44 -0
  265. package/dist/rows/row-detail-row.d.ts +4 -0
  266. package/dist/rows/row-detail-row.js +130 -0
  267. package/dist/rows/row-full-width.d.ts +8 -0
  268. package/dist/rows/row-full-width.js +19 -0
  269. package/dist/rows/rows-container.d.ts +1 -0
  270. package/dist/rows/rows-container.js +9 -0
  271. package/dist/rows/rows-sections.d.ts +3 -0
  272. package/dist/rows/rows-sections.js +27 -0
  273. package/dist/rows/scrollers/native-scroller.d.ts +2 -0
  274. package/dist/rows/scrollers/native-scroller.js +4 -0
  275. package/dist/sort-manager/+types.d.ts +13 -0
  276. package/dist/sort-manager/+types.js +1 -0
  277. package/dist/sort-manager/context.d.ts +14 -0
  278. package/dist/sort-manager/context.js +5 -0
  279. package/dist/sort-manager/hooks/use-sort-manager.d.ts +15 -0
  280. package/dist/sort-manager/hooks/use-sort-manager.js +56 -0
  281. package/dist/sort-manager/hooks/use-sort-row-item.d.ts +51 -0
  282. package/dist/sort-manager/hooks/use-sort-row-item.js +145 -0
  283. package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +5 -0
  284. package/dist/sort-manager/hooks/use-sortable-column-items.js +13 -0
  285. package/dist/sort-manager/root.d.ts +3 -0
  286. package/dist/sort-manager/root.js +14 -0
  287. package/dist/sort-manager/sort-add.d.ts +8 -0
  288. package/dist/sort-manager/sort-add.js +14 -0
  289. package/dist/sort-manager/sort-apply.d.ts +7 -0
  290. package/dist/sort-manager/sort-apply.js +24 -0
  291. package/dist/sort-manager/sort-cancel.d.ts +7 -0
  292. package/dist/sort-manager/sort-cancel.js +27 -0
  293. package/dist/sort-manager/sort-clear.d.ts +7 -0
  294. package/dist/sort-manager/sort-clear.js +22 -0
  295. package/dist/sort-manager/sort-column-select.d.ts +10 -0
  296. package/dist/sort-manager/sort-column-select.js +20 -0
  297. package/dist/sort-manager/sort-direction-select.d.ts +10 -0
  298. package/dist/sort-manager/sort-direction-select.js +24 -0
  299. package/dist/sort-manager/sort-manager.d.ts +16 -0
  300. package/dist/sort-manager/sort-manager.js +26 -0
  301. package/dist/sort-manager/sort-remove.d.ts +7 -0
  302. package/dist/sort-manager/sort-remove.js +14 -0
  303. package/dist/sort-manager/sort-row.d.ts +5 -0
  304. package/dist/sort-manager/sort-row.js +7 -0
  305. package/dist/sort-manager/sort-rows.d.ts +1 -0
  306. package/dist/sort-manager/sort-rows.js +6 -0
  307. package/dist/sort-manager/sort-value-select.d.ts +11 -0
  308. package/dist/sort-manager/sort-value-select.js +25 -0
  309. package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +3 -0
  310. package/dist/sort-manager/utils/sort-item-to-sort-model.js +62 -0
  311. package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +3 -0
  312. package/dist/sort-manager/utils/sort-model-to-sort-items.js +50 -0
  313. package/dist/state/+types.d.ts +35 -0
  314. package/dist/state/+types.js +1 -0
  315. package/dist/state/api/cell-root.d.ts +5 -0
  316. package/dist/state/api/cell-root.js +64 -0
  317. package/dist/state/api/column-autosize.d.ts +5 -0
  318. package/dist/state/api/column-autosize.js +72 -0
  319. package/dist/state/api/column-by-id.d.ts +2 -0
  320. package/dist/state/api/column-by-id.js +6 -0
  321. package/dist/state/api/column-field.d.ts +2 -0
  322. package/dist/state/api/column-field.js +23 -0
  323. package/dist/state/api/column-from-index.d.ts +2 -0
  324. package/dist/state/api/column-from-index.js +6 -0
  325. package/dist/state/api/column-group-toggle.d.ts +2 -0
  326. package/dist/state/api/column-group-toggle.js +10 -0
  327. package/dist/state/api/column-index.d.ts +2 -0
  328. package/dist/state/api/column-index.js +7 -0
  329. package/dist/state/api/column-move.d.ts +2 -0
  330. package/dist/state/api/column-move.js +49 -0
  331. package/dist/state/api/column-resize.d.ts +2 -0
  332. package/dist/state/api/column-resize.js +9 -0
  333. package/dist/state/api/column-update.d.ts +5 -0
  334. package/dist/state/api/column-update.js +26 -0
  335. package/dist/state/api/dialog-frame.d.ts +8 -0
  336. package/dist/state/api/dialog-frame.js +16 -0
  337. package/dist/state/api/edit-begin.d.ts +5 -0
  338. package/dist/state/api/edit-begin.js +87 -0
  339. package/dist/state/api/edit-end.d.ts +5 -0
  340. package/dist/state/api/edit-end.js +43 -0
  341. package/dist/state/api/edit-is-cell-active.d.ts +5 -0
  342. package/dist/state/api/edit-is-cell-active.js +22 -0
  343. package/dist/state/api/edit-update.d.ts +5 -0
  344. package/dist/state/api/edit-update.js +88 -0
  345. package/dist/state/api/event-listeners.d.ts +5 -0
  346. package/dist/state/api/event-listeners.js +19 -0
  347. package/dist/state/api/export-csv.d.ts +3 -0
  348. package/dist/state/api/export-csv.js +40 -0
  349. package/dist/state/api/export-data-rect.d.ts +2 -0
  350. package/dist/state/api/export-data-rect.js +24 -0
  351. package/dist/state/api/focus-cell.d.ts +5 -0
  352. package/dist/state/api/focus-cell.js +117 -0
  353. package/dist/state/api/popover-frame.d.ts +8 -0
  354. package/dist/state/api/popover-frame.js +16 -0
  355. package/dist/state/api/position-from-element.d.ts +2 -0
  356. package/dist/state/api/position-from-element.js +9 -0
  357. package/dist/state/api/row-by-id.d.ts +2 -0
  358. package/dist/state/api/row-by-id.js +5 -0
  359. package/dist/state/api/row-by-index.d.ts +2 -0
  360. package/dist/state/api/row-by-index.js +9 -0
  361. package/dist/state/api/row-detail-is-expanded.d.ts +2 -0
  362. package/dist/state/api/row-detail-is-expanded.js +6 -0
  363. package/dist/state/api/row-detail-rendered-height.d.ts +5 -0
  364. package/dist/state/api/row-detail-rendered-height.js +14 -0
  365. package/dist/state/api/row-detail-toggle.d.ts +2 -0
  366. package/dist/state/api/row-detail-toggle.js +32 -0
  367. package/dist/state/api/row-group-apply-expansions.d.ts +2 -0
  368. package/dist/state/api/row-group-apply-expansions.js +20 -0
  369. package/dist/state/api/row-group-column-index.d.ts +2 -0
  370. package/dist/state/api/row-group-column-index.js +14 -0
  371. package/dist/state/api/row-group-is-expanded.d.ts +2 -0
  372. package/dist/state/api/row-group-is-expanded.js +15 -0
  373. package/dist/state/api/row-group-toggle.d.ts +2 -0
  374. package/dist/state/api/row-group-toggle.js +7 -0
  375. package/dist/state/api/row-handle-select.d.ts +5 -0
  376. package/dist/state/api/row-handle-select.js +43 -0
  377. package/dist/state/api/row-select-all.d.ts +2 -0
  378. package/dist/state/api/row-select-all.js +17 -0
  379. package/dist/state/api/row-select.d.ts +5 -0
  380. package/dist/state/api/row-select.js +35 -0
  381. package/dist/state/api/row-selected.d.ts +2 -0
  382. package/dist/state/api/row-selected.js +13 -0
  383. package/dist/state/api/scroll-into-view.d.ts +5 -0
  384. package/dist/state/api/scroll-into-view.js +50 -0
  385. package/dist/state/api/sort-for-column.d.ts +2 -0
  386. package/dist/state/api/sort-for-column.js +9 -0
  387. package/dist/state/api/use-row-drag.d.ts +2 -0
  388. package/dist/state/api/use-row-drag.js +27 -0
  389. package/dist/state/helpers/cell-row-group.d.ts +2 -0
  390. package/dist/state/helpers/cell-row-group.js +19 -0
  391. package/dist/state/helpers/column-add-row-group.d.ts +10 -0
  392. package/dist/state/helpers/column-add-row-group.js +74 -0
  393. package/dist/state/helpers/column-layout.d.ts +3 -0
  394. package/dist/state/helpers/column-layout.js +59 -0
  395. package/dist/state/helpers/column-marker.d.ts +8 -0
  396. package/dist/state/helpers/column-marker.js +43 -0
  397. package/dist/state/helpers/column-view.d.ts +21 -0
  398. package/dist/state/helpers/column-view.js +33 -0
  399. package/dist/state/helpers/edit-on-change.d.ts +15 -0
  400. package/dist/state/helpers/edit-on-change.js +27 -0
  401. package/dist/state/helpers/empty-row-data-source.d.ts +2 -0
  402. package/dist/state/helpers/empty-row-data-source.js +18 -0
  403. package/dist/state/helpers/get-data-rect.d.ts +13 -0
  404. package/dist/state/helpers/get-data-rect.js +65 -0
  405. package/dist/state/helpers/get-full-width-callback.d.ts +2 -0
  406. package/dist/state/helpers/get-full-width-callback.js +10 -0
  407. package/dist/state/helpers/get-span-callback.d.ts +2 -0
  408. package/dist/state/helpers/get-span-callback.js +22 -0
  409. package/dist/state/helpers/resolve-column.d.ts +4 -0
  410. package/dist/state/helpers/resolve-column.js +29 -0
  411. package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +17 -0
  412. package/dist/state/helpers/row-layout/get-focus-criteria.js +62 -0
  413. package/dist/state/helpers/row-layout/row-layout.d.ts +19 -0
  414. package/dist/state/helpers/row-layout/row-layout.js +181 -0
  415. package/dist/state/use-lytenyte.d.ts +3 -0
  416. package/dist/state/use-lytenyte.js +671 -0
  417. package/dist/tree-view/branch/branch.d.ts +14 -0
  418. package/dist/tree-view/branch/branch.js +63 -0
  419. package/dist/tree-view/branch/use-branch-keys.d.ts +2 -0
  420. package/dist/tree-view/branch/use-branch-keys.js +87 -0
  421. package/dist/tree-view/context.d.ts +22 -0
  422. package/dist/tree-view/context.js +3 -0
  423. package/dist/tree-view/depth-provider.d.ts +2 -0
  424. package/dist/tree-view/depth-provider.js +3 -0
  425. package/dist/tree-view/hooks/use-tree-view-paths.d.ts +2 -0
  426. package/dist/tree-view/hooks/use-tree-view-paths.js +9 -0
  427. package/dist/tree-view/index.d.ts +16 -0
  428. package/dist/tree-view/index.js +16 -0
  429. package/dist/tree-view/leaf.d.ts +4 -0
  430. package/dist/tree-view/leaf.js +28 -0
  431. package/dist/tree-view/navigation/get-all-ids.d.ts +1 -0
  432. package/dist/tree-view/navigation/get-all-ids.js +7 -0
  433. package/dist/tree-view/navigation/get-first-node.d.ts +1 -0
  434. package/dist/tree-view/navigation/get-first-node.js +7 -0
  435. package/dist/tree-view/navigation/get-last-node.d.ts +1 -0
  436. package/dist/tree-view/navigation/get-last-node.js +7 -0
  437. package/dist/tree-view/navigation/get-next-node.d.ts +1 -0
  438. package/dist/tree-view/navigation/get-next-node.js +13 -0
  439. package/dist/tree-view/navigation/get-prev-node.d.ts +1 -0
  440. package/dist/tree-view/navigation/get-prev-node.js +13 -0
  441. package/dist/tree-view/panel/make-handle-navigation.d.ts +2 -0
  442. package/dist/tree-view/panel/make-handle-navigation.js +39 -0
  443. package/dist/tree-view/panel/make-handle-selection.d.ts +2 -0
  444. package/dist/tree-view/panel/make-handle-selection.js +92 -0
  445. package/dist/tree-view/panel/make-handle-typeahead.d.ts +1 -0
  446. package/dist/tree-view/panel/make-handle-typeahead.js +45 -0
  447. package/dist/tree-view/panel/panel.d.ts +1 -0
  448. package/dist/tree-view/panel/panel.js +30 -0
  449. package/dist/tree-view/panel/use-tree-navigation.d.ts +1 -0
  450. package/dist/tree-view/panel/use-tree-navigation.js +63 -0
  451. package/dist/tree-view/root.d.ts +17 -0
  452. package/dist/tree-view/root.js +63 -0
  453. package/dist/tree-view/utils/get-focusable-nodes.d.ts +1 -0
  454. package/dist/tree-view/utils/get-focusable-nodes.js +5 -0
  455. package/dist/tree-view/utils/get-focused-node.d.ts +1 -0
  456. package/dist/tree-view/utils/get-focused-node.js +14 -0
  457. package/dist/tree-view/utils/get-ids-between-nodes.d.ts +1 -0
  458. package/dist/tree-view/utils/get-ids-between-nodes.js +15 -0
  459. package/dist/tree-view/utils/get-panel.d.ts +1 -0
  460. package/dist/tree-view/utils/get-panel.js +7 -0
  461. package/dist/tree-view/utils/get-parent-node.d.ts +1 -0
  462. package/dist/tree-view/utils/get-parent-node.js +10 -0
  463. package/dist/tree-view/utils/get-sibling-branches.d.ts +1 -0
  464. package/dist/tree-view/utils/get-sibling-branches.js +14 -0
  465. package/dist/tree-view/utils/get-tree-node-id.d.ts +1 -0
  466. package/dist/tree-view/utils/get-tree-node-id.js +3 -0
  467. package/dist/tree-view/utils/is-branch-node.d.ts +1 -0
  468. package/dist/tree-view/utils/is-branch-node.js +3 -0
  469. package/dist/tree-view/utils/is-leaf-node.d.ts +1 -0
  470. package/dist/tree-view/utils/is-leaf-node.js +3 -0
  471. package/dist/tree-view/utils/is-tree-node-disabled.d.ts +1 -0
  472. package/dist/tree-view/utils/is-tree-node-disabled.js +3 -0
  473. package/dist/tree-view/utils/select-node.d.ts +2 -0
  474. package/dist/tree-view/utils/select-node.js +15 -0
  475. package/dist/tree-view/utils/toggle-all-selections.d.ts +2 -0
  476. package/dist/tree-view/utils/toggle-all-selections.js +9 -0
  477. package/dist/tree-view/utils/toggle-selection.d.ts +2 -0
  478. package/dist/tree-view/utils/toggle-selection.js +21 -0
  479. package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +2 -0
  480. package/dist/tree-view/virtualized/force-sync-scrolling.js +23 -0
  481. package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +2 -0
  482. package/dist/tree-view/virtualized/get-virtual-tree-paths.js +14 -0
  483. package/dist/tree-view/virtualized/make-virtual-tree.d.ts +31 -0
  484. package/dist/tree-view/virtualized/make-virtual-tree.js +90 -0
  485. package/dist/tree-view/virtualized/use-flattened-tree.d.ts +9 -0
  486. package/dist/tree-view/virtualized/use-flattened-tree.js +36 -0
  487. package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +2 -0
  488. package/dist/tree-view/virtualized/use-row-start-and-end.js +27 -0
  489. package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +22 -0
  490. package/dist/tree-view/virtualized/use-virtualized-tree.js +100 -0
  491. package/dist/types/types.d.ts +8 -0
  492. package/dist/types/types.js +1 -0
  493. package/dist/utils/cycle-sorts.d.ts +2 -0
  494. package/dist/utils/cycle-sorts.js +16 -0
  495. package/dist/viewport/begin-editing.d.ts +5 -0
  496. package/dist/viewport/begin-editing.js +15 -0
  497. package/dist/viewport/viewport.d.ts +1 -0
  498. package/dist/viewport/viewport.js +78 -0
  499. package/package.json +7 -7
@@ -0,0 +1 @@
1
+ export declare const Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useGridRoot } from "../context.js";
4
+ import { fastDeepMemo } from "@1771technologies/lytenyte-react-hooks";
5
+ import { HeaderReact } from "@1771technologies/lytenyte-shared";
6
+ const HeaderImpl = forwardRef(function Header(props, forwarded) {
7
+ const grid = useGridRoot().grid;
8
+ const xPositions = grid.state.xPositions.useValue();
9
+ const columnVisible = grid.state.columnMeta.useValue();
10
+ return (_jsx(HeaderReact, { ...props, ref: forwarded, floatingRowEnabled: grid.state.floatingRowEnabled.useValue(), floatingRowHeight: grid.state.floatingRowHeight.useValue(), headerGroupHeight: grid.state.headerGroupHeight.useValue(), headerHeight: grid.state.headerHeight.useValue(), rows: grid.internal.headerRows.useValue(), xPositions: xPositions, countBeforeEnd: columnVisible.columnVisibleCenterCount + columnVisible.columnVisibleStartCount, width: grid.state.widthTotal.useValue() }));
11
+ });
12
+ export const Header = fastDeepMemo(HeaderImpl);
@@ -0,0 +1,12 @@
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
2
+ import type { HeaderCellLayout } from "../+types";
3
+ import { type CSSProperties } from "react";
4
+ interface ResizeHandlerProps<T> {
5
+ readonly as?: SlotComponent;
6
+ readonly cell: HeaderCellLayout<T>;
7
+ readonly xPositions: Uint32Array;
8
+ readonly className?: string;
9
+ readonly style?: CSSProperties;
10
+ }
11
+ export declare function ResizeHandler<T>({ as, cell, xPositions, style, className, }: ResizeHandlerProps<T>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
12
+ export {};
@@ -0,0 +1,136 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useSlot } from "@1771technologies/lytenyte-react-hooks";
3
+ import {} from "react";
4
+ import { DEFAULT_COLUMN_WIDTH_MAX, DEFAULT_COLUMN_WIDTH_MIN, sizeFromCoord, } from "@1771technologies/lytenyte-shared";
5
+ import { useGridRoot } from "../context.js";
6
+ import { getComputedStyle } from "@1771technologies/lytenyte-dom-utils";
7
+ import { clamp, getClientX } from "@1771technologies/lytenyte-js-utils";
8
+ export function ResizeHandler({ as, cell, xPositions, style, className, }) {
9
+ const width = sizeFromCoord(cell.colStart, xPositions, cell.colSpan);
10
+ const sx = useGridRoot().grid;
11
+ const double = sx.state.columnDoubleClickToAutosize.useValue();
12
+ const defaultProps = {
13
+ role: "button",
14
+ "data-ln-header-resizer": "true",
15
+ "aria-label": `Resize ${cell.column.name ?? cell.column.id}`,
16
+ tabIndex: -1,
17
+ onDoubleClick: () => {
18
+ if (!double)
19
+ return;
20
+ sx.api.columnAutosize({
21
+ columns: [cell.column],
22
+ includeHeader: true,
23
+ });
24
+ },
25
+ onPointerDown: (ev) => {
26
+ const vp = sx.state.viewport.get();
27
+ if (!vp)
28
+ return;
29
+ if (ev.pointerType === "mouse" && ev.button !== 0)
30
+ return;
31
+ ev.preventDefault();
32
+ ev.stopPropagation();
33
+ const isRtl = sx.state.rtl.get();
34
+ let startX = null;
35
+ let anim = null;
36
+ const style = getComputedStyle(vp);
37
+ const overflow = style.overflowX;
38
+ vp.style.overflowX = "hidden";
39
+ const base = sx.state.columnBase.get();
40
+ const minWidth = cell.column.widthMin ?? base.widthMin ?? DEFAULT_COLUMN_WIDTH_MIN;
41
+ const maxWidth = cell.column.widthMax ?? base.widthMax ?? DEFAULT_COLUMN_WIDTH_MAX;
42
+ const maxDelta = maxWidth - width;
43
+ const minDelta = minWidth - width;
44
+ const deltaRef = { current: 0 };
45
+ const controller = new AbortController();
46
+ document.addEventListener("pointermove", (ev) => {
47
+ if (startX === null) {
48
+ startX = getClientX(ev);
49
+ return;
50
+ }
51
+ const endAdjust = cell.colPin === "end" ? -1 : 1;
52
+ const rtlAdjust = isRtl ? -1 : 1;
53
+ deltaRef.current = clamp(minDelta, (getClientX(ev) - startX) * endAdjust * rtlAdjust, maxDelta);
54
+ if (anim)
55
+ return;
56
+ anim = requestAnimationFrame(() => {
57
+ const newWidth = width + deltaRef.current;
58
+ sx.api.columnResize({ [cell.id]: newWidth });
59
+ // TODO @Mike: the below method is a much faster, but potentially much tricky way to get resizing done. We should investigate
60
+ // the best approach to lever this. The main issues are around resizing group headers and ensuring column cells pinned to the
61
+ // end of the grid do not get shifted.
62
+ // const id = sx.state.gridId.get();
63
+ // const query = `[data-ln-row][data-ln-gridid="${id}"] [data-ln-cell="true"][data-ln-colindex="${cell.colStart}"]`;
64
+ // const headerQuery = `[data-ln-header-row] [data-ln-header-cell="true"][data-ln-header-id="${cell.id}"]`;
65
+ // const floatingQuery = `[data-ln-header-row] [data-ln-header-cell="true"][data-ln-header-id="${cell.id}"][data-ln-header-floating="true"]`;
66
+ // const header = vp.querySelector(headerQuery) as HTMLElement;
67
+ // const floating = vp.querySelector(floatingQuery) as HTMLElement | undefined;
68
+ // if (!header) return;
69
+ // const pin = header.getAttribute("data-ln-pin");
70
+ // const cells = Array.from(vp.querySelectorAll(query)) as HTMLElement[];
71
+ // const headers = [header];
72
+ // if (floating) headers.push(floating);
73
+ // headers.forEach((c) => {
74
+ // if (!isHTMLElement(c)) return;
75
+ // c.style.removeProperty("min-width");
76
+ // c.style.removeProperty("max-width");
77
+ // c.style.width = `${width + deltaRef.current}px`;
78
+ // if (pin === "end") {
79
+ // const viewportWidth = sx.state.viewportWidthInner.get();
80
+ // const spaceLeft = xPositions.at(-1)! - xPositions[cell.colStart];
81
+ // const x = viewportWidth - spaceLeft - deltaRef.current;
82
+ // c.style.transform = getTranslate(isRtl ? -x : x, 0);
83
+ // }
84
+ // });
85
+ // const widthPx = `${width + deltaRef.current}px`;
86
+ // cells.forEach((c) => {
87
+ // if (!isHTMLElement(c)) return;
88
+ // c.style.minWidth = widthPx;
89
+ // c.style.maxWidth = widthPx;
90
+ // c.style.width = widthPx;
91
+ // });
92
+ // const headerAfterQuery = `${headerQuery} ~ [data-ln-header-cell="true"]`;
93
+ // let after: HTMLElement[];
94
+ // if (pin !== "end") {
95
+ // after = Array.from(vp.querySelectorAll(headerAfterQuery)) as HTMLElement[];
96
+ // } else {
97
+ // after = [];
98
+ // }
99
+ // after.forEach((c) => {
100
+ // if (!isHTMLElement(c)) return;
101
+ // const thisPin = c.getAttribute("data-ln-pin");
102
+ // if (pin === "end" && thisPin === "end") return;
103
+ // if (pin !== "end" && thisPin === "end") return;
104
+ // const colindex = getColIndexFromEl(c);
105
+ // const transform = xPositions[colindex] + deltaRef.current;
106
+ // c.style.transform = getTranslate(transform * (isRtl ? -1 : 1), 0);
107
+ // });
108
+ anim = null;
109
+ });
110
+ }, { signal: controller.signal });
111
+ window.addEventListener("pointerup", () => {
112
+ if (anim)
113
+ cancelAnimationFrame(anim);
114
+ controller.abort();
115
+ vp.style.overflowX = overflow;
116
+ const newWidth = width + deltaRef.current;
117
+ sx.api.columnResize({ [cell.id]: newWidth });
118
+ }, { signal: controller.signal });
119
+ },
120
+ className,
121
+ style: {
122
+ height: "100%",
123
+ width: "6px",
124
+ ...style,
125
+ top: "0px",
126
+ insetInlineEnd: cell.colPin !== "end" ? "0px" : undefined,
127
+ insetInlineStart: cell.colPin === "end" ? "0px" : undefined,
128
+ position: "absolute",
129
+ },
130
+ };
131
+ const edge = useSlot({
132
+ props: [defaultProps],
133
+ slot: as ?? _jsx("div", {}),
134
+ });
135
+ return edge;
136
+ }
@@ -0,0 +1,14 @@
1
+ import type { Grid, HeaderCellFloating, HeaderCellLayout, HeaderGroupCellLayout } from "../+types.js";
2
+ import { type JSX } from "react";
3
+ import type { InternalAtoms } from "../state/+types.js";
4
+ export declare function useDragMove<T>(grid: Grid<T> & {
5
+ internal: InternalAtoms;
6
+ }, cell: HeaderGroupCellLayout | HeaderCellLayout<T> | HeaderCellFloating<T>, onDragStart?: JSX.IntrinsicElements["div"]["onDragStart"]): {
7
+ draggable?: undefined;
8
+ onDragStart?: undefined;
9
+ ref?: undefined;
10
+ } | {
11
+ draggable: true;
12
+ onDragStart: (e: import("react").DragEvent<Element>) => void;
13
+ ref: any;
14
+ };
@@ -0,0 +1,97 @@
1
+ import { COLUMN_MARKER_ID, getHoveredColumnIndex, getNearestFocusable, GROUP_COLUMN_PREFIX, useDraggable, } from "@1771technologies/lytenyte-shared";
2
+ import { useMemo, useRef } from "react";
3
+ export function useDragMove(grid, cell, onDragStart) {
4
+ const ctx = grid.state;
5
+ const meta = ctx.columnMeta.useValue();
6
+ const base = ctx.columnBase.useValue();
7
+ const columns = useMemo(() => {
8
+ const columns = [];
9
+ for (let i = cell.colStart; i < cell.colEnd; i++) {
10
+ columns.push(meta.columnsVisible[i]);
11
+ }
12
+ return columns;
13
+ }, [cell.colEnd, cell.colStart, meta.columnsVisible]);
14
+ const isMovable = useMemo(() => {
15
+ return columns.every((c) => !c.id.startsWith(GROUP_COLUMN_PREFIX) &&
16
+ c.id !== COLUMN_MARKER_ID &&
17
+ (c.uiHints?.movable ?? base.uiHints?.movable ?? false));
18
+ }, [base.uiHints?.movable, columns]);
19
+ const swapDirection = useRef(null);
20
+ const swapIndex = useRef(-1);
21
+ const swapPrevIndex = useRef(-1);
22
+ const isForward = useRef(false);
23
+ const prevPos = useRef(-1);
24
+ const { dragProps } = useDraggable({
25
+ getItems: () => ({}),
26
+ onDragStart: () => {
27
+ if (cell.kind === "group")
28
+ grid.internal.draggingHeader.set(cell);
29
+ },
30
+ onDragEnd: () => {
31
+ grid.internal.draggingHeader.set(null);
32
+ },
33
+ onDragMove: (p) => {
34
+ const element = document.elementFromPoint(p.position.x, p.position.y);
35
+ const vp = grid.state.viewport.get();
36
+ if (!vp?.contains(element))
37
+ return;
38
+ const nearest = getNearestFocusable(element);
39
+ if (!nearest)
40
+ return;
41
+ if (prevPos.current < p.position.x)
42
+ isForward.current = true;
43
+ if (prevPos.current > p.position.x)
44
+ isForward.current = false;
45
+ prevPos.current = p.position.x;
46
+ const meta = grid.state.columnMeta.get();
47
+ const index = getHoveredColumnIndex({
48
+ viewport: vp,
49
+ centerCount: meta.columnVisibleCenterCount,
50
+ startCount: meta.columnVisibleStartCount,
51
+ endCount: meta.columnVisibleEndCount,
52
+ clientX: p.position.x,
53
+ rtl: grid.state.rtl.get(),
54
+ xPositions: grid.state.xPositions.get(),
55
+ });
56
+ if (index == null)
57
+ return;
58
+ const columnTarget = grid.api.columnByIndex(index);
59
+ if (columnTarget) {
60
+ if (columnTarget.id === COLUMN_MARKER_ID || columnTarget.id.startsWith(GROUP_COLUMN_PREFIX))
61
+ return;
62
+ }
63
+ const first = columns[0];
64
+ const currentIndex = grid.api.columnIndex(first);
65
+ const columnIndices = columns.map((c) => grid.api.columnIndex(c));
66
+ if (columnIndices.includes(index))
67
+ return;
68
+ const ignoreMove = swapDirection.current === isForward.current &&
69
+ swapIndex.current === currentIndex &&
70
+ index === swapPrevIndex.current;
71
+ if (currentIndex === index || ignoreMove)
72
+ return;
73
+ swapDirection.current = isForward.current;
74
+ swapIndex.current = index;
75
+ swapPrevIndex.current = currentIndex;
76
+ grid.api.columnMove({
77
+ moveColumns: columns,
78
+ moveTarget: index,
79
+ before: currentIndex > index,
80
+ updatePinState: true,
81
+ });
82
+ },
83
+ });
84
+ const finalProps = useMemo(() => {
85
+ if (cell.kind === "floating" || !isMovable)
86
+ return {};
87
+ return {
88
+ draggable: true,
89
+ onDragStart: (e) => {
90
+ onDragStart?.(e);
91
+ dragProps.onDragStart(e);
92
+ },
93
+ ref: dragProps.ref,
94
+ };
95
+ }, [cell.kind, dragProps, isMovable, onDragStart]);
96
+ return finalProps;
97
+ }
@@ -0,0 +1,4 @@
1
+ import type { HeaderCellFloating, HeaderCellLayout, HeaderCellRendererParams } from "../+types";
2
+ declare function DefaultRenderer(p: HeaderCellRendererParams<any>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function useHeaderCellRenderer<T>(cell: HeaderCellLayout<T> | HeaderCellFloating<T>): import("../+types").HeaderFloatingCellRendererFn<any> | import("../+types").HeaderCellRendererFn<T> | typeof DefaultRenderer;
4
+ export {};
@@ -0,0 +1,36 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { useGridRoot } from "../context.js";
4
+ function DefaultRenderer(p) {
5
+ return _jsx(_Fragment, { children: p.column.name ?? p.column.id });
6
+ }
7
+ export function useHeaderCellRenderer(cell) {
8
+ const ctx = useGridRoot().grid;
9
+ const base = ctx.state.columnBase.useValue();
10
+ const floatingRenderers = ctx.state.floatingCellRenderers.useValue();
11
+ const headerRenderers = ctx.state.headerCellRenderers.useValue();
12
+ return useMemo(() => {
13
+ if (cell.kind === "cell") {
14
+ const renderer = cell.column.headerRenderer ?? base.headerRenderer ?? DefaultRenderer;
15
+ if (typeof renderer === "string")
16
+ return headerRenderers[renderer] ?? DefaultRenderer;
17
+ else
18
+ return renderer;
19
+ }
20
+ else {
21
+ const renderer = cell.column.floatingCellRenderer ?? base.floatingCellRenderer ?? DefaultRenderer;
22
+ if (typeof renderer === "string")
23
+ return floatingRenderers[renderer] ?? DefaultRenderer;
24
+ else
25
+ return renderer;
26
+ }
27
+ }, [
28
+ base.floatingCellRenderer,
29
+ base.headerRenderer,
30
+ cell.column.floatingCellRenderer,
31
+ cell.column.headerRenderer,
32
+ cell.kind,
33
+ floatingRenderers,
34
+ headerRenderers,
35
+ ]);
36
+ }
@@ -0,0 +1 @@
1
+ export { AddIcon, AddSmallIcon, AggregateIcon, AggregationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightCurvedIcon, ArrowRightIcon, ArrowUpIcon, AutosizeIcon, BackIcon, BookmarkIcon, BooleanIcon, CalendarIcon, ChartIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Close2Icon, CloseIcon, CollapseGroupIcon, Columns2Icon, ColumnsIcon, CopyIcon, CornerRadiusIcon, CustomizeThemeIcon, CutIcon, CsvIcon, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, ExcelIcon, ExpandGroupIcon, ExpandIcon, Expression2Icon, ExpressionIcon, ExternalLinkIcon, File2Icon, FileIcon, FilterIcon, FolderIcon, GlobeIcon, GridViewIcon, GroupByColIcon, HamburgerIcon, HelpIcon, HiddenIcon, HistoryIcon, ImportIcon, LinkIcon, ListViewIcon, LoadingIcon, LocationIcon, ModalIcon, MoreIcon, MoreVerticalIcon, MultilineIcon, NumberIcon, PasteIcon, PieIcon, PinColumnIcon, RefreshIcon, SearchIcon, SettingsIcon, ShareIcon, SingleLineIcon, Sort2Icon, SortIcon, SpacingHIcon, SpacingIcon, StickColumnIcon, SwapIcon, TagIcon, TaskIcon, TextIcon, ThemesIcon, Tickmark2Icon, TickmarkIcon, TimeIcon, UploadIcon, UserIcon, ViewIcon, } from "@1771technologies/lytenyte-core/icons";
@@ -0,0 +1,3 @@
1
+ export { AddIcon, AddSmallIcon, AggregateIcon, AggregationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightCurvedIcon, ArrowRightIcon, ArrowUpIcon, AutosizeIcon, BackIcon, BookmarkIcon, BooleanIcon, CalendarIcon, ChartIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Close2Icon, CloseIcon, CollapseGroupIcon, Columns2Icon, ColumnsIcon, CopyIcon, CornerRadiusIcon, CustomizeThemeIcon, CutIcon, CsvIcon, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, ExcelIcon, ExpandGroupIcon, ExpandIcon, Expression2Icon, ExpressionIcon, ExternalLinkIcon, File2Icon, FileIcon, FilterIcon, FolderIcon, GlobeIcon, GridViewIcon, GroupByColIcon, HamburgerIcon, HelpIcon, HiddenIcon, HistoryIcon, ImportIcon, LinkIcon, ListViewIcon, LoadingIcon, LocationIcon, ModalIcon, MoreIcon, MoreVerticalIcon, MultilineIcon, NumberIcon, PasteIcon, PieIcon, PinColumnIcon, RefreshIcon, SearchIcon, SettingsIcon, ShareIcon, SingleLineIcon, Sort2Icon, SortIcon, SpacingHIcon, SpacingIcon, StickColumnIcon, SwapIcon, TagIcon, TaskIcon, TextIcon, ThemesIcon, Tickmark2Icon, TickmarkIcon, TimeIcon, UploadIcon, UserIcon, ViewIcon,
2
+ // eslint-disable-next-line import/extensions
3
+ } from "@1771technologies/lytenyte-core/icons";
@@ -0,0 +1,13 @@
1
+ export { GROUP_COLUMN_PREFIX, COLUMN_MARKER_ID, GROUP_COLUMN_SINGLE_ID, GROUP_COLUMN_MULTI_PREFIX, } from "@1771technologies/lytenyte-shared";
2
+ export { Grid } from "./grid.js";
3
+ export { SortManager } from "./sort-manager/sort-manager.js";
4
+ export { FilterTree } from "./filter-tree/filter-tree.js";
5
+ export { ColumnManager } from "./column-manager/column-manager.js";
6
+ export { GridBox } from "./grid-box/grid-box.js";
7
+ export { DropWrap } from "@1771technologies/lytenyte-dragon";
8
+ export { activateLicense } from "./license.js";
9
+ export { measureText } from "@1771technologies/lytenyte-shared";
10
+ export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source.js";
11
+ export { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated.js";
12
+ export { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source.js";
13
+ export { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source.js";
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ export { GROUP_COLUMN_PREFIX, COLUMN_MARKER_ID, GROUP_COLUMN_SINGLE_ID, GROUP_COLUMN_MULTI_PREFIX, } from "@1771technologies/lytenyte-shared";
2
+ export { Grid } from "./grid.js";
3
+ export { SortManager } from "./sort-manager/sort-manager.js";
4
+ export { FilterTree } from "./filter-tree/filter-tree.js";
5
+ export { ColumnManager } from "./column-manager/column-manager.js";
6
+ export { GridBox } from "./grid-box/grid-box.js";
7
+ export { DropWrap } from "@1771technologies/lytenyte-dragon";
8
+ export { activateLicense } from "./license.js";
9
+ export { measureText } from "@1771technologies/lytenyte-shared";
10
+ export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source.js";
11
+ export { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated.js";
12
+ export { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source.js";
13
+ export { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source.js";
@@ -0,0 +1,3 @@
1
+ export function activateLicense(license: any): boolean;
2
+ export let hasAValidLicense: boolean;
3
+ export let licenseState: null;
@@ -0,0 +1,214 @@
1
+ const hashSalt = "faec0f3c45281b1fe12d87e64a6c3271";
2
+ const issueDate = new Date("2025-09-11");
3
+ function getHostname() {
4
+ const win = globalThis?.document?.defaultView || (typeof window !== "undefined" ? window : null);
5
+ const loc = win?.location;
6
+ const { hostname = "" } = loc ?? {};
7
+ return hostname;
8
+ }
9
+ function isWebsiteUrl() {
10
+ const hostname = getHostname();
11
+ return hostname.match(/^((?:\w+\.)?1771technologies\.com)$/) !== null;
12
+ }
13
+ function isLocalhost() {
14
+ const hostname = getHostname();
15
+ return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
16
+ }
17
+ export let hasAValidLicense = isWebsiteUrl() || isLocalhost();
18
+ export let licenseState = null;
19
+ export function activateLicense(license) {
20
+ const parts = license.split("|");
21
+ const details = parts[0];
22
+ const hash = parts[1];
23
+ const detailHash = new MD5().md5(details + hashSalt);
24
+ if (detailHash !== hash) {
25
+ console.error(`
26
+ ********************************************************************************
27
+ LyteNyte Grid PRO
28
+
29
+ Invalid license key. Please verify the key and try again.
30
+
31
+ Visit https://1771technolgies.com for more information.
32
+ ********************************************************************************
33
+ `);
34
+ licenseState = "invalid";
35
+ return false;
36
+ }
37
+ const detailParts = details.split(" ");
38
+ const endDate = new Date(detailParts[1]);
39
+ if (issueDate > endDate) {
40
+ console.error(`
41
+ ********************************************************************************
42
+ LyteNyte Grid PRO
43
+
44
+ License key expired. Your license covers earlier versions only.
45
+
46
+ Visit https://1771technolgies.com for more information.
47
+ ********************************************************************************
48
+ `);
49
+ licenseState = "expired";
50
+ return false;
51
+ }
52
+ hasAValidLicense = true;
53
+ return true;
54
+ }
55
+ // see: https://www.myersdaily.org/joseph/javascript/md5-text.html
56
+ // https://stackoverflow.com/a/1655795
57
+ class MD5 {
58
+ md5cycle(x, k) {
59
+ let a = x[0];
60
+ let b = x[1];
61
+ let c = x[2];
62
+ let d = x[3];
63
+ a = this.ff(a, b, c, d, k[0], 7, -680876936);
64
+ d = this.ff(d, a, b, c, k[1], 12, -389564586);
65
+ c = this.ff(c, d, a, b, k[2], 17, 606105819);
66
+ b = this.ff(b, c, d, a, k[3], 22, -1044525330);
67
+ a = this.ff(a, b, c, d, k[4], 7, -176418897);
68
+ d = this.ff(d, a, b, c, k[5], 12, 1200080426);
69
+ c = this.ff(c, d, a, b, k[6], 17, -1473231341);
70
+ b = this.ff(b, c, d, a, k[7], 22, -45705983);
71
+ a = this.ff(a, b, c, d, k[8], 7, 1770035416);
72
+ d = this.ff(d, a, b, c, k[9], 12, -1958414417);
73
+ c = this.ff(c, d, a, b, k[10], 17, -42063);
74
+ b = this.ff(b, c, d, a, k[11], 22, -1990404162);
75
+ a = this.ff(a, b, c, d, k[12], 7, 1804603682);
76
+ d = this.ff(d, a, b, c, k[13], 12, -40341101);
77
+ c = this.ff(c, d, a, b, k[14], 17, -1502002290);
78
+ b = this.ff(b, c, d, a, k[15], 22, 1236535329);
79
+ a = this.gg(a, b, c, d, k[1], 5, -165796510);
80
+ d = this.gg(d, a, b, c, k[6], 9, -1069501632);
81
+ c = this.gg(c, d, a, b, k[11], 14, 643717713);
82
+ b = this.gg(b, c, d, a, k[0], 20, -373897302);
83
+ a = this.gg(a, b, c, d, k[5], 5, -701558691);
84
+ d = this.gg(d, a, b, c, k[10], 9, 38016083);
85
+ c = this.gg(c, d, a, b, k[15], 14, -660478335);
86
+ b = this.gg(b, c, d, a, k[4], 20, -405537848);
87
+ a = this.gg(a, b, c, d, k[9], 5, 568446438);
88
+ d = this.gg(d, a, b, c, k[14], 9, -1019803690);
89
+ c = this.gg(c, d, a, b, k[3], 14, -187363961);
90
+ b = this.gg(b, c, d, a, k[8], 20, 1163531501);
91
+ a = this.gg(a, b, c, d, k[13], 5, -1444681467);
92
+ d = this.gg(d, a, b, c, k[2], 9, -51403784);
93
+ c = this.gg(c, d, a, b, k[7], 14, 1735328473);
94
+ b = this.gg(b, c, d, a, k[12], 20, -1926607734);
95
+ a = this.hh(a, b, c, d, k[5], 4, -378558);
96
+ d = this.hh(d, a, b, c, k[8], 11, -2022574463);
97
+ c = this.hh(c, d, a, b, k[11], 16, 1839030562);
98
+ b = this.hh(b, c, d, a, k[14], 23, -35309556);
99
+ a = this.hh(a, b, c, d, k[1], 4, -1530992060);
100
+ d = this.hh(d, a, b, c, k[4], 11, 1272893353);
101
+ c = this.hh(c, d, a, b, k[7], 16, -155497632);
102
+ b = this.hh(b, c, d, a, k[10], 23, -1094730640);
103
+ a = this.hh(a, b, c, d, k[13], 4, 681279174);
104
+ d = this.hh(d, a, b, c, k[0], 11, -358537222);
105
+ c = this.hh(c, d, a, b, k[3], 16, -722521979);
106
+ b = this.hh(b, c, d, a, k[6], 23, 76029189);
107
+ a = this.hh(a, b, c, d, k[9], 4, -640364487);
108
+ d = this.hh(d, a, b, c, k[12], 11, -421815835);
109
+ c = this.hh(c, d, a, b, k[15], 16, 530742520);
110
+ b = this.hh(b, c, d, a, k[2], 23, -995338651);
111
+ a = this.ii(a, b, c, d, k[0], 6, -198630844);
112
+ d = this.ii(d, a, b, c, k[7], 10, 1126891415);
113
+ c = this.ii(c, d, a, b, k[14], 15, -1416354905);
114
+ b = this.ii(b, c, d, a, k[5], 21, -57434055);
115
+ a = this.ii(a, b, c, d, k[12], 6, 1700485571);
116
+ d = this.ii(d, a, b, c, k[3], 10, -1894986606);
117
+ c = this.ii(c, d, a, b, k[10], 15, -1051523);
118
+ b = this.ii(b, c, d, a, k[1], 21, -2054922799);
119
+ a = this.ii(a, b, c, d, k[8], 6, 1873313359);
120
+ d = this.ii(d, a, b, c, k[15], 10, -30611744);
121
+ c = this.ii(c, d, a, b, k[6], 15, -1560198380);
122
+ b = this.ii(b, c, d, a, k[13], 21, 1309151649);
123
+ a = this.ii(a, b, c, d, k[4], 6, -145523070);
124
+ d = this.ii(d, a, b, c, k[11], 10, -1120210379);
125
+ c = this.ii(c, d, a, b, k[2], 15, 718787259);
126
+ b = this.ii(b, c, d, a, k[9], 21, -343485551);
127
+ x[0] = this.add32(a, x[0]);
128
+ x[1] = this.add32(b, x[1]);
129
+ x[2] = this.add32(c, x[2]);
130
+ x[3] = this.add32(d, x[3]);
131
+ }
132
+ cmn(q, a, b, x, s, t) {
133
+ a = this.add32(this.add32(a, q), this.add32(x, t));
134
+ return this.add32((a << s) | (a >>> (32 - s)), b);
135
+ }
136
+ ff(a, b, c, d, x, s, t) {
137
+ return this.cmn((b & c) | (~b & d), a, b, x, s, t);
138
+ }
139
+ gg(a, b, c, d, x, s, t) {
140
+ return this.cmn((b & d) | (c & ~d), a, b, x, s, t);
141
+ }
142
+ hh(a, b, c, d, x, s, t) {
143
+ return this.cmn(b ^ c ^ d, a, b, x, s, t);
144
+ }
145
+ ii(a, b, c, d, x, s, t) {
146
+ return this.cmn(c ^ (b | ~d), a, b, x, s, t);
147
+ }
148
+ md51(s) {
149
+ const n = s.length;
150
+ const state = [1732584193, -271733879, -1732584194, 271733878];
151
+ let i;
152
+ for (i = 64; i <= s.length; i += 64) {
153
+ this.md5cycle(state, this.md5blk(s.substring(i - 64, i)));
154
+ }
155
+ s = s.substring(i - 64);
156
+ const tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
157
+ for (i = 0; i < s.length; i++) {
158
+ tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
159
+ }
160
+ tail[i >> 2] |= 0x80 << (i % 4 << 3);
161
+ if (i > 55) {
162
+ this.md5cycle(state, tail);
163
+ for (i = 0; i < 16; i++) {
164
+ tail[i] = 0;
165
+ }
166
+ }
167
+ tail[14] = n * 8;
168
+ this.md5cycle(state, tail);
169
+ return state;
170
+ }
171
+ /* there needs to be support for Unicode here, * unless we pretend that we can redefine the MD-5
172
+ * algorithm for multi-byte characters (perhaps by adding every four 16-bit characters and
173
+ * shortening the sum to 32 bits). Otherwise I suthis.ggest performing MD-5 as if every character
174
+ * was two bytes--e.g., 0040 0025 = @%--but then how will an ordinary MD-5 sum be matched?
175
+ * There is no way to standardize text to something like UTF-8 before transformation; speed cost is
176
+ * utterly prohibitive. The JavaScript standard itself needs to look at this: it should start
177
+ * providing access to strings as preformed UTF-8 8-bit unsigned value arrays.
178
+ */
179
+ md5blk(s) {
180
+ const md5blks = [];
181
+ for (let i = 0; i < 64; i += 4) {
182
+ md5blks[i >> 2] =
183
+ s.charCodeAt(i) +
184
+ (s.charCodeAt(i + 1) << 8) +
185
+ (s.charCodeAt(i + 2) << 16) +
186
+ (s.charCodeAt(i + 3) << 24);
187
+ }
188
+ return md5blks;
189
+ }
190
+ rhex(n) {
191
+ const hex_chr = "0123456789abcdef".split("");
192
+ let s = "";
193
+ let j = 0;
194
+ for (; j < 4; j++) {
195
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
196
+ }
197
+ return s;
198
+ }
199
+ hex(x) {
200
+ for (let i = 0; i < x.length; i++) {
201
+ x[i] = this.rhex(x[i]);
202
+ }
203
+ return x.join("");
204
+ }
205
+ md5(s) {
206
+ return this.hex(this.md51(s));
207
+ }
208
+ add32(a, b) {
209
+ return this.add32Std(a, b);
210
+ }
211
+ add32Std(a, b) {
212
+ return (a + b) & 0xffffffff;
213
+ }
214
+ }
@@ -0,0 +1,6 @@
1
+ export interface ListboxContext {
2
+ readonly orientation: "horizontal" | "vertical";
3
+ readonly rtl: boolean;
4
+ }
5
+ export declare const context: import("react").Context<ListboxContext>;
6
+ export declare const useListboxContext: () => ListboxContext;
@@ -0,0 +1,3 @@
1
+ import { createContext, useContext } from "react";
2
+ export const context = createContext({ orientation: "vertical", rtl: false });
3
+ export const useListboxContext = () => useContext(context);
@@ -0,0 +1 @@
1
+ export declare const Item: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useListboxContext } from "./context.js";
4
+ import { getTabbables } from "@1771technologies/lytenyte-dom-utils";
5
+ export const Item = forwardRef(function Item(props, forwarded) {
6
+ const ctx = useListboxContext();
7
+ return (_jsx("div", { ...props, role: "option", onKeyDownCapture: (ev) => {
8
+ const next = ctx.rtl ? "ArrowLeft" : "ArrowRight";
9
+ const prev = ctx.rtl ? "ArrowRight" : "ArrowLeft";
10
+ if (ev.key !== next && ev.key !== prev)
11
+ return;
12
+ ev.preventDefault();
13
+ const items = getTabbables(ev.currentTarget);
14
+ if (!items.length)
15
+ return;
16
+ items.unshift(ev.currentTarget);
17
+ const index = items.findIndex((c) => document.activeElement === c);
18
+ const nextIndex = ev.key === next ? index + 1 : index - 1;
19
+ const itemToFocus = items[nextIndex];
20
+ if (!itemToFocus)
21
+ return;
22
+ ev.stopPropagation();
23
+ itemToFocus.focus();
24
+ }, ref: forwarded, tabIndex: 0, "data-ln-listbox-item": true }));
25
+ });
@@ -0,0 +1 @@
1
+ export declare const Panel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;