@1771technologies/lytenyte-pro 1.0.0-beta.1 → 1.0.0-beta.10

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 (396) hide show
  1. package/dist/+types.d.ts +4135 -3940
  2. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +1 -1
  3. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +39 -39
  4. package/dist/cell-selection/are-rects-equal.d.ts +1 -1
  5. package/dist/cell-selection/are-rects-equal.js +6 -4
  6. package/dist/cell-selection/bound-selection-rect.d.ts +1 -1
  7. package/dist/cell-selection/bound-selection-rect.js +14 -14
  8. package/dist/cell-selection/cell-selection-containers.js +108 -78
  9. package/dist/cell-selection/cell-selection-driver.js +250 -254
  10. package/dist/cell-selection/cell-style-row.d.ts +12 -6
  11. package/dist/cell-selection/cell-style-row.js +82 -79
  12. package/dist/cell-selection/deselect-rect-range.d.ts +1 -1
  13. package/dist/cell-selection/deselect-rect-range.js +42 -41
  14. package/dist/cell-selection/expand-cell-selection-down.d.ts +7 -4
  15. package/dist/cell-selection/expand-cell-selection-down.js +30 -34
  16. package/dist/cell-selection/expand-cell-selection-end.d.ts +7 -4
  17. package/dist/cell-selection/expand-cell-selection-end.js +31 -35
  18. package/dist/cell-selection/expand-cell-selection-start.d.ts +7 -4
  19. package/dist/cell-selection/expand-cell-selection-start.js +30 -34
  20. package/dist/cell-selection/expand-cell-selection-up.d.ts +7 -4
  21. package/dist/cell-selection/expand-cell-selection-up.js +30 -34
  22. package/dist/cell-selection/full-width-start-end-index.d.ts +1 -1
  23. package/dist/cell-selection/full-width-start-end-index.js +3 -3
  24. package/dist/cell-selection/get-root-cell.d.ts +6 -2
  25. package/dist/cell-selection/get-root-cell.js +79 -81
  26. package/dist/cell-selection/is-bottom-rect.d.ts +1 -1
  27. package/dist/cell-selection/is-bottom-rect.js +5 -5
  28. package/dist/cell-selection/is-center-col-rect.d.ts +6 -3
  29. package/dist/cell-selection/is-center-col-rect.js +5 -3
  30. package/dist/cell-selection/is-center-rect.d.ts +1 -1
  31. package/dist/cell-selection/is-center-rect.js +3 -3
  32. package/dist/cell-selection/is-end-rect.d.ts +6 -3
  33. package/dist/cell-selection/is-end-rect.js +2 -2
  34. package/dist/cell-selection/is-overlapping-rect.d.ts +1 -1
  35. package/dist/cell-selection/is-overlapping-rect.js +6 -4
  36. package/dist/cell-selection/is-start-rect.d.ts +6 -3
  37. package/dist/cell-selection/is-start-rect.js +2 -2
  38. package/dist/cell-selection/is-top-rect.d.ts +1 -1
  39. package/dist/cell-selection/is-top-rect.js +2 -2
  40. package/dist/cell-selection/is-within-selection-rect.d.ts +1 -1
  41. package/dist/cell-selection/is-within-selection-rect.js +1 -1
  42. package/dist/cell-selection/split-cell-selection-rect.d.ts +13 -7
  43. package/dist/cell-selection/split-cell-selection-rect.js +53 -47
  44. package/dist/cell-selection/update-additive-cell-selection.d.ts +7 -4
  45. package/dist/cell-selection/update-additive-cell-selection.js +22 -23
  46. package/dist/cell-selection/use-edge-scroll.d.ts +10 -8
  47. package/dist/cell-selection/use-edge-scroll.js +65 -63
  48. package/dist/cells/cell-default.d.ts +5 -1
  49. package/dist/cells/cell-default.js +5 -5
  50. package/dist/cells/cell-editor.d.ts +4 -2
  51. package/dist/cells/cell-editor.js +121 -86
  52. package/dist/cells/cell.d.ts +16 -3
  53. package/dist/cells/cell.js +55 -26
  54. package/dist/column-manager/branch-lookup-context.d.ts +3 -1
  55. package/dist/column-manager/branch.d.ts +12 -4
  56. package/dist/column-manager/branch.js +39 -29
  57. package/dist/column-manager/column-manager.d.ts +58 -9
  58. package/dist/column-manager/column-manager.js +9 -9
  59. package/dist/column-manager/context.d.ts +1 -1
  60. package/dist/column-manager/label.d.ts +10 -2
  61. package/dist/column-manager/label.js +11 -12
  62. package/dist/column-manager/leaf.d.ts +10 -2
  63. package/dist/column-manager/leaf.js +42 -32
  64. package/dist/column-manager/move-handle.d.ts +14 -6
  65. package/dist/column-manager/move-handle.js +54 -50
  66. package/dist/column-manager/root.d.ts +9 -3
  67. package/dist/column-manager/root.js +26 -13
  68. package/dist/column-manager/use-column-manager.d.ts +14 -14
  69. package/dist/column-manager/use-column-manager.js +21 -21
  70. package/dist/column-manager/use-columns-from-context.d.ts +2 -2
  71. package/dist/column-manager/use-columns-from-context.js +19 -19
  72. package/dist/column-manager/visibility-checkbox.d.ts +14 -6
  73. package/dist/column-manager/visibility-checkbox.js +36 -23
  74. package/dist/context.d.ts +4 -4
  75. package/dist/filter-tree/branch.d.ts +13 -5
  76. package/dist/filter-tree/branch.js +23 -13
  77. package/dist/filter-tree/context.d.ts +16 -16
  78. package/dist/filter-tree/filter-tree.d.ts +53 -12
  79. package/dist/filter-tree/filter-tree.js +16 -16
  80. package/dist/filter-tree/hooks/use-filter-tree.d.ts +35 -29
  81. package/dist/filter-tree/hooks/use-filter-tree.js +94 -92
  82. package/dist/filter-tree/hooks/use-tree-item.d.ts +6 -6
  83. package/dist/filter-tree/hooks/use-tree-item.js +101 -108
  84. package/dist/filter-tree/inclusion-checkbox.d.ts +14 -6
  85. package/dist/filter-tree/inclusion-checkbox.js +19 -9
  86. package/dist/filter-tree/label.d.ts +10 -2
  87. package/dist/filter-tree/label.js +11 -12
  88. package/dist/filter-tree/leaf.d.ts +10 -2
  89. package/dist/filter-tree/leaf.js +15 -5
  90. package/dist/filter-tree/root.d.ts +23 -7
  91. package/dist/filter-tree/root.js +51 -23
  92. package/dist/grid-box/+types.d.ts +10 -10
  93. package/dist/grid-box/context.d.ts +4 -4
  94. package/dist/grid-box/grid-box.d.ts +26 -6
  95. package/dist/grid-box/grid-box.js +6 -6
  96. package/dist/grid-box/item.d.ts +11 -3
  97. package/dist/grid-box/item.js +29 -26
  98. package/dist/grid-box/panel.d.ts +13 -1
  99. package/dist/grid-box/panel.js +9 -2
  100. package/dist/grid-box/root.d.ts +11 -5
  101. package/dist/grid-box/root.js +11 -2
  102. package/dist/grid-box/use-aggregation-box-items.d.ts +18 -15
  103. package/dist/grid-box/use-aggregation-box-items.js +54 -55
  104. package/dist/grid-box/use-column-box-items.d.ts +33 -23
  105. package/dist/grid-box/use-column-box-items.js +90 -78
  106. package/dist/grid-box/use-row-group-box-items.d.ts +19 -14
  107. package/dist/grid-box/use-row-group-box-items.js +116 -124
  108. package/dist/grid-provider/context.d.ts +6 -4
  109. package/dist/grid-provider/provider.d.ts +5 -3
  110. package/dist/grid-provider/provider.js +1 -1
  111. package/dist/grid-provider/use-grid.d.ts +2 -2
  112. package/dist/grid-provider/use-grid.js +1 -1
  113. package/dist/grid.d.ts +150 -25
  114. package/dist/grid.js +39 -25
  115. package/dist/header/header-cell.d.ts +13 -5
  116. package/dist/header/header-cell.js +41 -15
  117. package/dist/header/header-group-cell.d.ts +10 -2
  118. package/dist/header/header-group-cell.js +21 -6
  119. package/dist/header/header-row.d.ts +10 -2
  120. package/dist/header/header-row.js +2 -2
  121. package/dist/header/header.d.ts +10 -1
  122. package/dist/header/header.js +11 -2
  123. package/dist/header/resize-handler.d.ts +15 -6
  124. package/dist/header/resize-handler.js +128 -117
  125. package/dist/header/use-drag-move.d.ts +23 -12
  126. package/dist/header/use-drag-move.js +83 -87
  127. package/dist/header/use-header-cell-renderer.d.ts +9 -2
  128. package/dist/header/use-header-cell-renderer.js +24 -29
  129. package/dist/icons/index.d.ts +92 -0
  130. package/dist/icons/index.js +92 -0
  131. package/dist/index.d.ts +1 -0
  132. package/dist/index.js +1 -0
  133. package/dist/license.js +174 -174
  134. package/dist/listbox/context.d.ts +2 -2
  135. package/dist/listbox/item.d.ts +10 -1
  136. package/dist/listbox/item.js +23 -19
  137. package/dist/listbox/panel.d.ts +10 -1
  138. package/dist/listbox/panel.js +69 -43
  139. package/dist/listbox/root.d.ts +5 -3
  140. package/dist/listbox/root.js +7 -7
  141. package/dist/root/dialog-driver.js +22 -16
  142. package/dist/root/popover-driver.js +27 -16
  143. package/dist/root/root.d.ts +7 -3
  144. package/dist/root/root.js +111 -107
  145. package/dist/row-data-source-client/+types.d.ts +17 -17
  146. package/dist/row-data-source-client/built-ins/avg.js +3 -4
  147. package/dist/row-data-source-client/built-ins/built-ins.d.ts +17 -17
  148. package/dist/row-data-source-client/built-ins/built-ins.js +17 -17
  149. package/dist/row-data-source-client/built-ins/count.js +3 -5
  150. package/dist/row-data-source-client/built-ins/first.js +1 -1
  151. package/dist/row-data-source-client/built-ins/group.js +1 -1
  152. package/dist/row-data-source-client/built-ins/last.js +1 -1
  153. package/dist/row-data-source-client/built-ins/max.js +9 -13
  154. package/dist/row-data-source-client/built-ins/min.js +9 -13
  155. package/dist/row-data-source-client/built-ins/sum.js +8 -10
  156. package/dist/row-data-source-client/filter/+types.d.ts +35 -13
  157. package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +16 -2
  158. package/dist/row-data-source-client/filter/compute-filtered-rows.js +102 -102
  159. package/dist/row-data-source-client/pivots/create-agg-model.d.ts +8 -4
  160. package/dist/row-data-source-client/pivots/create-agg-model.js +8 -9
  161. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +6 -1
  162. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +42 -46
  163. package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +6 -1
  164. package/dist/row-data-source-client/pivots/create-pivot-columns.js +18 -19
  165. package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +7 -1
  166. package/dist/row-data-source-client/pivots/create-pivot-tree.js +19 -19
  167. package/dist/row-data-source-client/tree/client-tree.d.ts +19 -13
  168. package/dist/row-data-source-client/tree/client-tree.js +64 -67
  169. package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +5 -2
  170. package/dist/row-data-source-client/tree/evaluator-aggregation.js +6 -6
  171. package/dist/row-data-source-client/tree/evaluator-group.d.ts +5 -2
  172. package/dist/row-data-source-client/tree/evaluator-group.js +6 -7
  173. package/dist/row-data-source-client/tree/traverse.d.ts +6 -2
  174. package/dist/row-data-source-client/tree/traverse.js +16 -19
  175. package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +11 -7
  176. package/dist/row-data-source-client/use-client-data-source-paginated.js +528 -512
  177. package/dist/row-data-source-client/use-client-data-source.d.ts +11 -7
  178. package/dist/row-data-source-client/use-client-data-source.js +673 -639
  179. package/dist/row-data-source-client/use-client-tree-data-source.d.ts +10 -6
  180. package/dist/row-data-source-client/use-client-tree-data-source.js +499 -489
  181. package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +36 -33
  182. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +4 -1
  183. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +19 -23
  184. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +4 -1
  185. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +17 -25
  186. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +18 -18
  187. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +9 -10
  188. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +4 -1
  189. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +13 -14
  190. package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +9 -10
  191. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +4 -1
  192. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +13 -13
  193. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +4 -1
  194. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +1 -1
  195. package/dist/row-data-source-server/async-tree/make-async-tree.js +17 -17
  196. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +3 -1
  197. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +6 -6
  198. package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +5 -1
  199. package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +11 -14
  200. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +4 -1
  201. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +42 -46
  202. package/dist/row-data-source-server/range-tree/range-tree.d.ts +28 -28
  203. package/dist/row-data-source-server/range-tree/range-tree.js +49 -48
  204. package/dist/row-data-source-server/use-server-data-source.d.ts +12 -3
  205. package/dist/row-data-source-server/use-server-data-source.js +667 -654
  206. package/dist/row-data-source-server/utils/get-node-depth.js +7 -7
  207. package/dist/row-data-source-server/utils/get-node-path.js +7 -7
  208. package/dist/row-data-source-server/utils/get-request-id.js +3 -4
  209. package/dist/rows/row/context.d.ts +2 -2
  210. package/dist/rows/row/row.d.ts +16 -3
  211. package/dist/rows/row/row.js +19 -4
  212. package/dist/rows/row/use-row-context-value.d.ts +5 -2
  213. package/dist/rows/row/use-row-context-value.js +23 -26
  214. package/dist/rows/row-detail-row.d.ts +4 -2
  215. package/dist/rows/row-detail-row.js +147 -124
  216. package/dist/rows/row-full-width.d.ts +12 -4
  217. package/dist/rows/row-full-width.js +35 -7
  218. package/dist/rows/rows-container.d.ts +10 -1
  219. package/dist/rows/rows-container.js +12 -3
  220. package/dist/rows/rows-sections.d.ts +30 -3
  221. package/dist/rows/rows-sections.js +42 -10
  222. package/dist/rows/scrollers/native-scroller.d.ts +3 -1
  223. package/dist/rows/scrollers/native-scroller.js +17 -13
  224. package/dist/sort-manager/+types.d.ts +14 -7
  225. package/dist/sort-manager/context.d.ts +7 -7
  226. package/dist/sort-manager/hooks/use-sort-manager.d.ts +10 -10
  227. package/dist/sort-manager/hooks/use-sort-manager.js +47 -51
  228. package/dist/sort-manager/hooks/use-sort-row-item.d.ts +58 -47
  229. package/dist/sort-manager/hooks/use-sort-row-item.js +127 -132
  230. package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +6 -3
  231. package/dist/sort-manager/hooks/use-sortable-column-items.js +10 -10
  232. package/dist/sort-manager/root.d.ts +7 -1
  233. package/dist/sort-manager/root.js +10 -10
  234. package/dist/sort-manager/sort-add.d.ts +13 -5
  235. package/dist/sort-manager/sort-add.js +8 -8
  236. package/dist/sort-manager/sort-apply.d.ts +12 -4
  237. package/dist/sort-manager/sort-apply.js +16 -16
  238. package/dist/sort-manager/sort-cancel.d.ts +12 -4
  239. package/dist/sort-manager/sort-cancel.js +19 -19
  240. package/dist/sort-manager/sort-clear.d.ts +12 -4
  241. package/dist/sort-manager/sort-clear.js +15 -16
  242. package/dist/sort-manager/sort-column-select.d.ts +14 -6
  243. package/dist/sort-manager/sort-column-select.js +26 -15
  244. package/dist/sort-manager/sort-direction-select.d.ts +14 -6
  245. package/dist/sort-manager/sort-direction-select.js +27 -19
  246. package/dist/sort-manager/sort-manager.d.ts +93 -12
  247. package/dist/sort-manager/sort-manager.js +12 -12
  248. package/dist/sort-manager/sort-remove.d.ts +12 -4
  249. package/dist/sort-manager/sort-remove.js +8 -8
  250. package/dist/sort-manager/sort-row.d.ts +10 -2
  251. package/dist/sort-manager/sort-row.js +4 -1
  252. package/dist/sort-manager/sort-rows.d.ts +10 -1
  253. package/dist/sort-manager/sort-rows.js +1 -1
  254. package/dist/sort-manager/sort-value-select.d.ts +15 -7
  255. package/dist/sort-manager/sort-value-select.js +28 -19
  256. package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +5 -2
  257. package/dist/sort-manager/utils/sort-item-to-sort-model.js +46 -49
  258. package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +5 -2
  259. package/dist/sort-manager/utils/sort-model-to-sort-items.js +36 -44
  260. package/dist/state/+types.d.ts +41 -28
  261. package/dist/state/api/column-autosize.d.ts +5 -3
  262. package/dist/state/api/column-autosize.js +63 -64
  263. package/dist/state/api/column-by-id.js +4 -4
  264. package/dist/state/api/column-field.js +17 -20
  265. package/dist/state/api/column-from-index.js +4 -4
  266. package/dist/state/api/column-group-toggle.js +8 -8
  267. package/dist/state/api/column-index.js +5 -5
  268. package/dist/state/api/column-move.js +49 -47
  269. package/dist/state/api/column-resize.js +9 -7
  270. package/dist/state/api/column-update.js +11 -11
  271. package/dist/state/api/dialog-frame.d.ts +9 -5
  272. package/dist/state/api/dialog-frame.js +11 -12
  273. package/dist/state/api/edit-begin.d.ts +5 -3
  274. package/dist/state/api/edit-begin.js +72 -85
  275. package/dist/state/api/edit-end.d.ts +5 -3
  276. package/dist/state/api/edit-end.js +38 -41
  277. package/dist/state/api/edit-is-cell-active.d.ts +5 -3
  278. package/dist/state/api/edit-is-cell-active.js +17 -24
  279. package/dist/state/api/edit-update.d.ts +5 -3
  280. package/dist/state/api/edit-update.js +75 -86
  281. package/dist/state/api/event-listeners.d.ts +12 -3
  282. package/dist/state/api/event-listeners.js +16 -17
  283. package/dist/state/api/export-csv.js +34 -36
  284. package/dist/state/api/export-data-rect.js +22 -22
  285. package/dist/state/api/focus-cell.d.ts +5 -3
  286. package/dist/state/api/focus-cell.js +110 -109
  287. package/dist/state/api/popover-frame.d.ts +10 -6
  288. package/dist/state/api/popover-frame.js +11 -12
  289. package/dist/state/api/position-from-element.js +5 -6
  290. package/dist/state/api/row-by-id.js +3 -3
  291. package/dist/state/api/row-by-index.js +11 -6
  292. package/dist/state/api/row-detail-is-expanded.d.ts +3 -1
  293. package/dist/state/api/row-detail-is-expanded.js +4 -4
  294. package/dist/state/api/row-detail-rendered-height.d.ts +6 -4
  295. package/dist/state/api/row-detail-rendered-height.js +10 -12
  296. package/dist/state/api/row-detail-toggle.js +26 -30
  297. package/dist/state/api/row-group-apply-expansions.d.ts +3 -1
  298. package/dist/state/api/row-group-apply-expansions.js +15 -17
  299. package/dist/state/api/row-group-column-index.d.ts +3 -1
  300. package/dist/state/api/row-group-column-index.js +14 -12
  301. package/dist/state/api/row-group-is-expanded.d.ts +3 -1
  302. package/dist/state/api/row-group-is-expanded.js +11 -13
  303. package/dist/state/api/row-group-toggle.js +5 -5
  304. package/dist/state/api/row-handle-select.d.ts +4 -2
  305. package/dist/state/api/row-handle-select.js +36 -40
  306. package/dist/state/api/row-select-all.js +14 -15
  307. package/dist/state/api/row-select.d.ts +4 -2
  308. package/dist/state/api/row-select.js +30 -33
  309. package/dist/state/api/row-selected.js +10 -11
  310. package/dist/state/api/scroll-into-view.d.ts +4 -2
  311. package/dist/state/api/scroll-into-view.js +47 -47
  312. package/dist/state/api/sort-for-column.js +6 -7
  313. package/dist/state/api/use-row-drag.js +22 -24
  314. package/dist/state/helpers/cell-row-group.d.ts +5 -1
  315. package/dist/state/helpers/cell-row-group.js +18 -16
  316. package/dist/state/helpers/column-add-row-group.d.ts +16 -6
  317. package/dist/state/helpers/column-add-row-group.js +63 -58
  318. package/dist/state/helpers/column-layout.d.ts +7 -1
  319. package/dist/state/helpers/column-layout.js +60 -60
  320. package/dist/state/helpers/column-marker.d.ts +8 -4
  321. package/dist/state/helpers/column-marker.js +38 -34
  322. package/dist/state/helpers/column-view.d.ts +21 -15
  323. package/dist/state/helpers/column-view.js +56 -32
  324. package/dist/state/helpers/edit-on-change.d.ts +18 -10
  325. package/dist/state/helpers/edit-on-change.js +24 -24
  326. package/dist/state/helpers/empty-row-data-source.js +15 -15
  327. package/dist/state/helpers/get-data-rect.d.ts +20 -10
  328. package/dist/state/helpers/get-data-rect.js +67 -62
  329. package/dist/state/helpers/get-full-width-callback.d.ts +5 -1
  330. package/dist/state/helpers/get-full-width-callback.js +5 -6
  331. package/dist/state/helpers/get-span-callback.d.ts +6 -1
  332. package/dist/state/helpers/get-span-callback.js +15 -18
  333. package/dist/state/helpers/resolve-column.d.ts +6 -2
  334. package/dist/state/helpers/resolve-column.js +18 -18
  335. package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +15 -12
  336. package/dist/state/helpers/row-layout/get-focus-criteria.js +57 -56
  337. package/dist/state/helpers/row-layout/row-layout.d.ts +15 -9
  338. package/dist/state/helpers/row-layout/row-layout.js +387 -401
  339. package/dist/state/use-lytenyte.js +556 -516
  340. package/dist/tree-view/branch/branch.d.ts +16 -8
  341. package/dist/tree-view/branch/branch.js +104 -52
  342. package/dist/tree-view/branch/use-branch-keys.d.ts +5 -1
  343. package/dist/tree-view/branch/use-branch-keys.js +71 -74
  344. package/dist/tree-view/context.d.ts +21 -17
  345. package/dist/tree-view/hooks/use-tree-view-paths.d.ts +6 -1
  346. package/dist/tree-view/hooks/use-tree-view-paths.js +5 -5
  347. package/dist/tree-view/index.d.ts +35 -7
  348. package/dist/tree-view/index.js +7 -7
  349. package/dist/tree-view/leaf.d.ts +10 -2
  350. package/dist/tree-view/leaf.js +29 -20
  351. package/dist/tree-view/navigation/get-all-ids.js +3 -3
  352. package/dist/tree-view/navigation/get-first-node.js +3 -3
  353. package/dist/tree-view/navigation/get-last-node.js +3 -3
  354. package/dist/tree-view/navigation/get-next-node.js +6 -8
  355. package/dist/tree-view/navigation/get-prev-node.js +6 -8
  356. package/dist/tree-view/panel/make-handle-navigation.js +23 -31
  357. package/dist/tree-view/panel/make-handle-selection.js +68 -77
  358. package/dist/tree-view/panel/make-handle-typeahead.js +34 -40
  359. package/dist/tree-view/panel/panel.d.ts +10 -1
  360. package/dist/tree-view/panel/panel.js +40 -20
  361. package/dist/tree-view/panel/use-tree-navigation.js +64 -52
  362. package/dist/tree-view/root.d.ts +20 -14
  363. package/dist/tree-view/root.js +53 -55
  364. package/dist/tree-view/utils/get-focusable-nodes.js +4 -2
  365. package/dist/tree-view/utils/get-focused-node.js +11 -11
  366. package/dist/tree-view/utils/get-ids-between-nodes.d.ts +5 -1
  367. package/dist/tree-view/utils/get-ids-between-nodes.js +10 -11
  368. package/dist/tree-view/utils/get-panel.js +5 -5
  369. package/dist/tree-view/utils/get-parent-node.js +6 -7
  370. package/dist/tree-view/utils/get-sibling-branches.js +8 -10
  371. package/dist/tree-view/utils/get-tree-node-id.js +1 -1
  372. package/dist/tree-view/utils/is-branch-node.js +1 -1
  373. package/dist/tree-view/utils/is-leaf-node.js +1 -1
  374. package/dist/tree-view/utils/is-tree-node-disabled.js +1 -1
  375. package/dist/tree-view/utils/select-node.d.ts +5 -1
  376. package/dist/tree-view/utils/select-node.js +8 -11
  377. package/dist/tree-view/utils/toggle-all-selections.js +4 -6
  378. package/dist/tree-view/utils/toggle-selection.js +15 -18
  379. package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +3 -1
  380. package/dist/tree-view/virtualized/force-sync-scrolling.js +24 -18
  381. package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +3 -1
  382. package/dist/tree-view/virtualized/get-virtual-tree-paths.js +11 -12
  383. package/dist/tree-view/virtualized/make-virtual-tree.d.ts +26 -21
  384. package/dist/tree-view/virtualized/make-virtual-tree.js +79 -85
  385. package/dist/tree-view/virtualized/use-flattened-tree.d.ts +17 -8
  386. package/dist/tree-view/virtualized/use-flattened-tree.js +30 -31
  387. package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +6 -1
  388. package/dist/tree-view/virtualized/use-row-start-and-end.js +21 -23
  389. package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +21 -15
  390. package/dist/tree-view/virtualized/use-virtualized-tree.js +103 -90
  391. package/dist/utils/cycle-sorts.js +12 -14
  392. package/dist/viewport/begin-editing.d.ts +6 -2
  393. package/dist/viewport/begin-editing.js +9 -13
  394. package/dist/viewport/viewport.d.ts +10 -1
  395. package/dist/viewport/viewport.js +93 -70
  396. package/package.json +15 -9
@@ -1,34 +1,47 @@
1
1
  import type { LayoutMap } from "@1771technologies/lytenyte-shared";
2
- import type { DataRect, EditActivePosition, GridAtom, GridAtomReadonly, HeaderGroupCellLayout, PositionUnion, VirtualTarget } from "../+types";
2
+ import type {
3
+ DataRect,
4
+ EditActivePosition,
5
+ GridAtom,
6
+ GridAtomReadonly,
7
+ HeaderGroupCellLayout,
8
+ PositionUnion,
9
+ VirtualTarget,
10
+ } from "../+types";
3
11
  import type { Atom, createStore } from "@1771technologies/atom";
4
12
  export interface InternalAtoms {
5
- readonly headerRows: GridAtomReadonly<number>;
6
- readonly headerCols: GridAtomReadonly<number>;
7
- readonly headerHeightTotal: GridAtomReadonly<number>;
8
- readonly xScroll: GridAtom<number>;
9
- readonly yScroll: GridAtom<number>;
10
- readonly refreshKey: GridAtom<number>;
11
- readonly layout: GridAtomReadonly<LayoutMap>;
12
- readonly focusActive: GridAtom<PositionUnion | null>;
13
- readonly focusPrevColIndex: GridAtom<number | null>;
14
- readonly focusPrevRowIndex: GridAtom<number | null>;
15
- readonly editActivePos: GridAtom<EditActivePosition<any> | null>;
16
- readonly editData: GridAtom<any>;
17
- readonly editValidation: GridAtom<Record<string, any> | boolean>;
18
- readonly rowAutoHeightCache: GridAtom<Record<number, number>>;
19
- readonly rowDetailAutoHeightCache: GridAtom<Record<number, number>>;
20
- readonly rowSelectedIds: Atom<Set<string>>;
21
- readonly rowSelectionPivot: GridAtom<string | null>;
22
- readonly rowSelectionLastWasDeselect: GridAtom<boolean>;
23
- readonly draggingHeader: GridAtom<HeaderGroupCellLayout | null>;
24
- readonly dialogFrames: GridAtom<Record<string, any>>;
25
- readonly popoverFrames: GridAtom<Record<string, {
13
+ readonly headerRows: GridAtomReadonly<number>;
14
+ readonly headerCols: GridAtomReadonly<number>;
15
+ readonly headerHeightTotal: GridAtomReadonly<number>;
16
+ readonly xScroll: GridAtom<number>;
17
+ readonly yScroll: GridAtom<number>;
18
+ readonly refreshKey: GridAtom<number>;
19
+ readonly layout: GridAtomReadonly<LayoutMap>;
20
+ readonly focusActive: GridAtom<PositionUnion | null>;
21
+ readonly focusPrevColIndex: GridAtom<number | null>;
22
+ readonly focusPrevRowIndex: GridAtom<number | null>;
23
+ readonly editActivePos: GridAtom<EditActivePosition<any> | null>;
24
+ readonly editData: GridAtom<any>;
25
+ readonly editValidation: GridAtom<Record<string, any> | boolean>;
26
+ readonly rowAutoHeightCache: GridAtom<Record<number, number>>;
27
+ readonly rowDetailAutoHeightCache: GridAtom<Record<number, number>>;
28
+ readonly rowSelectedIds: Atom<Set<string>>;
29
+ readonly rowSelectionPivot: GridAtom<string | null>;
30
+ readonly rowSelectionLastWasDeselect: GridAtom<boolean>;
31
+ readonly draggingHeader: GridAtom<HeaderGroupCellLayout | null>;
32
+ readonly dialogFrames: GridAtom<Record<string, any>>;
33
+ readonly popoverFrames: GridAtom<
34
+ Record<
35
+ string,
36
+ {
26
37
  target: HTMLElement | VirtualTarget;
27
38
  context: any;
28
- }>>;
29
- readonly cellSelectionPivot: GridAtom<DataRect | null>;
30
- readonly cellSelectionAdditiveRects: GridAtom<DataRect[] | null>;
31
- readonly cellSelectionIsDeselect: GridAtom<boolean>;
32
- readonly cellSelectionSplits: GridAtomReadonly<DataRect[]>;
33
- readonly store: ReturnType<typeof createStore>;
39
+ }
40
+ >
41
+ >;
42
+ readonly cellSelectionPivot: GridAtom<DataRect | null>;
43
+ readonly cellSelectionAdditiveRects: GridAtom<DataRect[] | null>;
44
+ readonly cellSelectionIsDeselect: GridAtom<boolean>;
45
+ readonly cellSelectionSplits: GridAtomReadonly<DataRect[]>;
46
+ readonly store: ReturnType<typeof createStore>;
34
47
  }
@@ -1,5 +1,7 @@
1
- import type { InternalAtoms } from "../+types";
1
+ import type { InternalAtoms } from "../+types.js";
2
2
  import type { Grid, GridApi } from "../../+types";
3
- export declare const makeColumnAutosize: (grid: Grid<any> & {
3
+ export declare const makeColumnAutosize: (
4
+ grid: Grid<any> & {
4
5
  internal: InternalAtoms;
5
- }) => GridApi<any>["columnAutosize"];
6
+ },
7
+ ) => GridApi<any>["columnAutosize"];
@@ -1,72 +1,71 @@
1
1
  import { measureText } from "@1771technologies/lytenyte-shared";
2
- import { resolveColumn } from "../helpers/resolve-column";
2
+ import { resolveColumn } from "../helpers/resolve-column.js";
3
3
  export const makeColumnAutosize = (grid) => {
4
- return (params) => {
5
- const errorRef = { current: false };
6
- const meta = grid.state.columnMeta.get();
7
- const columns = params.columns
8
- ?.map((c) => resolveColumn(c, errorRef, meta))
9
- .map((c) => c && grid.api.columnById(c))
10
- .filter(Boolean) ?? grid.state.columnMeta.get().columnsVisible;
11
- if (errorRef.current) {
12
- console.error("Invalid column autosize column params");
13
- return {};
4
+ return (params) => {
5
+ const errorRef = { current: false };
6
+ const meta = grid.state.columnMeta.get();
7
+ const columns =
8
+ params.columns
9
+ ?.map((c) => resolveColumn(c, errorRef, meta))
10
+ .map((c) => c && grid.api.columnById(c))
11
+ .filter(Boolean) ?? grid.state.columnMeta.get().columnsVisible;
12
+ if (errorRef.current) {
13
+ console.error("Invalid column autosize column params");
14
+ return {};
15
+ }
16
+ if (columns.length === 0) return {};
17
+ const base = grid.state.columnBase.get();
18
+ const result = {};
19
+ const bounds = grid.state.viewBounds.get();
20
+ const rowFirstVisible = bounds.rowCenterStart;
21
+ const rowLastVisible = bounds.rowCenterEnd;
22
+ const rowTopCount = grid.state.rowDataStore.rowTopCount.get();
23
+ const rowBottomCount = grid.state.rowDataStore.rowBottomCount.get();
24
+ const rowCount = grid.state.rowDataStore.rowCount.get();
25
+ const rowStart = Math.max(rowFirstVisible, 0);
26
+ const rowEnd = rowLastVisible === 0 ? Math.min(50, rowCount - rowBottomCount) : rowLastVisible;
27
+ calculateWidths(rowStart, rowEnd);
28
+ if (rowTopCount) calculateWidths(0, rowTopCount);
29
+ if (rowBottomCount) calculateWidths(rowCount - rowBottomCount, rowCount);
30
+ if (params?.includeHeader) {
31
+ for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {
32
+ const column = columns[columnIndex];
33
+ const autoFn = column.autosizeHeaderFn ?? base.autosizeHeaderFn ?? defaultAutosizeHeader;
34
+ const width = autoFn({ grid, column: column });
35
+ if (width != null) result[column.id] = Math.max(width, result[column.id]);
36
+ }
37
+ }
38
+ if (params?.dryRun) return result;
39
+ const updates = Object.fromEntries(
40
+ Object.entries(result).map(([key, v]) => [key, { width: v }]),
41
+ );
42
+ grid.api.columnUpdate(updates);
43
+ return result;
44
+ function calculateWidths(start, end) {
45
+ for (let rowIndex = start; rowIndex < end; rowIndex++) {
46
+ const row = grid.api.rowByIndex(rowIndex);
47
+ if (!row) continue;
48
+ for (let i = 0; i < columns.length; i++) {
49
+ const column = columns[i];
50
+ const autoFn = column.autosizeCellFn ?? base.autosizeCellFn ?? defaultAutosize;
51
+ const width = autoFn({ column, grid, row });
52
+ result[column.id] ??= 0;
53
+ if (width != null) result[column.id] = Math.max(width, result[column.id]);
14
54
  }
15
- if (columns.length === 0)
16
- return {};
17
- const base = grid.state.columnBase.get();
18
- const result = {};
19
- const bounds = grid.state.viewBounds.get();
20
- const rowFirstVisible = bounds.rowCenterStart;
21
- const rowLastVisible = bounds.rowCenterEnd;
22
- const rowTopCount = grid.state.rowDataStore.rowTopCount.get();
23
- const rowBottomCount = grid.state.rowDataStore.rowBottomCount.get();
24
- const rowCount = grid.state.rowDataStore.rowCount.get();
25
- const rowStart = Math.max(rowFirstVisible, 0);
26
- const rowEnd = rowLastVisible === 0 ? Math.min(50, rowCount - rowBottomCount) : rowLastVisible;
27
- calculateWidths(rowStart, rowEnd);
28
- if (rowTopCount)
29
- calculateWidths(0, rowTopCount);
30
- if (rowBottomCount)
31
- calculateWidths(rowCount - rowBottomCount, rowCount);
32
- if (params?.includeHeader) {
33
- for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {
34
- const column = columns[columnIndex];
35
- const autoFn = column.autosizeHeaderFn ?? base.autosizeHeaderFn ?? defaultAutosizeHeader;
36
- const width = autoFn({ grid, column: column });
37
- if (width != null)
38
- result[column.id] = Math.max(width, result[column.id]);
39
- }
40
- }
41
- if (params?.dryRun)
42
- return result;
43
- const updates = Object.fromEntries(Object.entries(result).map(([key, v]) => [key, { width: v }]));
44
- grid.api.columnUpdate(updates);
45
- return result;
46
- function calculateWidths(start, end) {
47
- for (let rowIndex = start; rowIndex < end; rowIndex++) {
48
- const row = grid.api.rowByIndex(rowIndex);
49
- if (!row)
50
- continue;
51
- for (let i = 0; i < columns.length; i++) {
52
- const column = columns[i];
53
- const autoFn = column.autosizeCellFn ?? base.autosizeCellFn ?? defaultAutosize;
54
- const width = autoFn({ column, grid, row });
55
- result[column.id] ??= 0;
56
- if (width != null)
57
- result[column.id] = Math.max(width, result[column.id]);
58
- }
59
- }
60
- }
61
- };
55
+ }
56
+ }
57
+ };
62
58
  };
63
59
  function defaultAutosize(c) {
64
- const field = c.grid.api.columnField(c.column, c.row.kind === "leaf"
65
- ? { kind: "leaf", data: c.row.data }
66
- : { kind: "branch", data: c.row.data, key: c.row.key });
67
- return measureText(`${field}`, c.grid.state.viewport.get() ?? undefined).width + 8;
60
+ const field = c.grid.api.columnField(
61
+ c.column,
62
+ c.row.kind === "leaf"
63
+ ? { kind: "leaf", data: c.row.data }
64
+ : { kind: "branch", data: c.row.data, key: c.row.key },
65
+ );
66
+ return measureText(`${field}`, c.grid.state.viewport.get() ?? undefined).width + 8;
68
67
  }
69
68
  function defaultAutosizeHeader(c) {
70
- const text = c.column.name ?? c.column.id;
71
- return measureText(text, c.grid.state.viewport.get() ?? undefined).width + 8;
69
+ const text = c.column.name ?? c.column.id;
70
+ return measureText(text, c.grid.state.viewport.get() ?? undefined).width + 8;
72
71
  }
@@ -1,6 +1,6 @@
1
1
  export const makeColumnById = (grid) => {
2
- return (id) => {
3
- const lookup = grid.state.columnMeta.get();
4
- return lookup.columnLookup.get(id);
5
- };
2
+ return (id) => {
3
+ const lookup = grid.state.columnMeta.get();
4
+ return lookup.columnLookup.get(id);
5
+ };
6
6
  };
@@ -1,23 +1,20 @@
1
1
  import { get } from "@1771technologies/lytenyte-js-utils";
2
2
  export const makeColumnField = (grid) => {
3
- return (c, d) => {
4
- const meta = grid.state.columnMeta.get();
5
- const column = typeof c === "string" ? meta.columnLookup.get(c) : c;
6
- if (!column) {
7
- console.error(`Attempting to compute the field of a column that is not defined: ${c}`);
8
- return null;
9
- }
10
- const field = column.field ?? column.id;
11
- if (d.kind === "branch") {
12
- if (typeof field === "function")
13
- return field({ column, data: d, grid });
14
- return d.data?.[column.id];
15
- }
16
- const fieldType = typeof field;
17
- if (fieldType === "string" || fieldType === "number")
18
- return d.data?.[field];
19
- if (fieldType === "object")
20
- return get(d.data, field.path);
21
- return field({ column, data: d, grid });
22
- };
3
+ return (c, d) => {
4
+ const meta = grid.state.columnMeta.get();
5
+ const column = typeof c === "string" ? meta.columnLookup.get(c) : c;
6
+ if (!column) {
7
+ console.error(`Attempting to compute the field of a column that is not defined: ${c}`);
8
+ return null;
9
+ }
10
+ const field = column.field ?? column.id;
11
+ if (d.kind === "branch") {
12
+ if (typeof field === "function") return field({ column, data: d, grid });
13
+ return d.data?.[column.id];
14
+ }
15
+ const fieldType = typeof field;
16
+ if (fieldType === "string" || fieldType === "number") return d.data?.[field];
17
+ if (fieldType === "object") return get(d.data, field.path);
18
+ return field({ column, data: d, grid });
19
+ };
23
20
  };
@@ -1,6 +1,6 @@
1
1
  export const makeColumnFromIndex = (grid) => {
2
- return (index) => {
3
- const v = grid.state.columnMeta.get().columnsVisible;
4
- return v[index] ?? null;
5
- };
2
+ return (index) => {
3
+ const v = grid.state.columnMeta.get().columnsVisible;
4
+ return v[index] ?? null;
5
+ };
6
6
  };
@@ -1,10 +1,10 @@
1
1
  export const makeColumnGroupToggle = (grid) => {
2
- return (group, state) => {
3
- const delimiter = grid.state.columnGroupJoinDelimiter.get();
4
- const id = typeof group === "string" ? group : group.join(delimiter);
5
- const currentExpansions = grid.state.columnGroupExpansions.get();
6
- const currentState = currentExpansions[id] ?? grid.state.columnGroupDefaultExpansion.get();
7
- const next = state ?? !currentState;
8
- grid.state.columnGroupExpansions.set((prev) => ({ ...prev, [id]: next }));
9
- };
2
+ return (group, state) => {
3
+ const delimiter = grid.state.columnGroupJoinDelimiter.get();
4
+ const id = typeof group === "string" ? group : group.join(delimiter);
5
+ const currentExpansions = grid.state.columnGroupExpansions.get();
6
+ const currentState = currentExpansions[id] ?? grid.state.columnGroupDefaultExpansion.get();
7
+ const next = state ?? !currentState;
8
+ grid.state.columnGroupExpansions.set((prev) => ({ ...prev, [id]: next }));
9
+ };
10
10
  };
@@ -1,7 +1,7 @@
1
1
  export const makeColumnIndex = (grid) => {
2
- return (columnOrId) => {
3
- const v = grid.state.columnMeta.get().columnsVisible;
4
- const id = typeof columnOrId === "string" ? columnOrId : columnOrId.id;
5
- return v.findIndex((c) => c.id === id);
6
- };
2
+ return (columnOrId) => {
3
+ const v = grid.state.columnMeta.get().columnsVisible;
4
+ const id = typeof columnOrId === "string" ? columnOrId : columnOrId.id;
5
+ return v.findIndex((c) => c.id === id);
6
+ };
7
7
  };
@@ -1,49 +1,51 @@
1
- import { resolveColumn } from "../helpers/resolve-column";
1
+ import { resolveColumn } from "../helpers/resolve-column.js";
2
2
  export const makeColumnMove = (grid) => {
3
- return (params) => {
4
- const meta = grid.state.columnMeta.get();
5
- const errorRef = { current: false };
6
- const colSet = new Set(params.moveColumns.map((c) => {
7
- return resolveColumn(c, errorRef, meta);
8
- }));
9
- const dest = resolveColumn(params.moveTarget, errorRef, meta);
10
- if (errorRef.current)
11
- return;
12
- if (colSet.has(dest)) {
13
- console.error(`Destination column cannot be in the move columns`);
14
- return;
15
- }
16
- const columns = grid.state.columns.get();
17
- const columnsToMove = columns.filter((c) => colSet.has(c.id));
18
- const nextColumns = columns.filter((c) => !colSet.has(c.id));
19
- const indexOfDest = nextColumns.findIndex((c) => c.id === dest);
20
- const destCol = nextColumns[indexOfDest];
21
- let stop = false;
22
- grid.api.eventFire("columnMoveBegin", {
23
- grid,
24
- before: !!params.before,
25
- moveColumns: columnsToMove,
26
- moveTarget: destCol,
27
- preventDefault: () => {
28
- stop = true;
29
- },
30
- updatePinState: !!params.updatePinState,
31
- });
32
- if (stop)
33
- return;
34
- const offset = params.before ? 0 : 1;
35
- nextColumns.splice(indexOfDest + offset, 0, ...columnsToMove);
36
- grid.state.columns.set(nextColumns);
37
- if (params.updatePinState) {
38
- const updates = Object.fromEntries(columnsToMove.map((c) => [c.id, { pin: destCol.pin ?? null }]));
39
- grid.api.columnUpdate(updates);
40
- }
41
- grid.api.eventFire("columnMoveEnd", {
42
- grid,
43
- before: !!params.before,
44
- moveColumns: columnsToMove,
45
- moveTarget: destCol,
46
- updatePinState: !!params.updatePinState,
47
- });
48
- };
3
+ return (params) => {
4
+ const meta = grid.state.columnMeta.get();
5
+ const errorRef = { current: false };
6
+ const colSet = new Set(
7
+ params.moveColumns.map((c) => {
8
+ return resolveColumn(c, errorRef, meta);
9
+ }),
10
+ );
11
+ const dest = resolveColumn(params.moveTarget, errorRef, meta);
12
+ if (errorRef.current) return;
13
+ if (colSet.has(dest)) {
14
+ console.error(`Destination column cannot be in the move columns`);
15
+ return;
16
+ }
17
+ const columns = grid.state.columns.get();
18
+ const columnsToMove = columns.filter((c) => colSet.has(c.id));
19
+ const nextColumns = columns.filter((c) => !colSet.has(c.id));
20
+ const indexOfDest = nextColumns.findIndex((c) => c.id === dest);
21
+ const destCol = nextColumns[indexOfDest];
22
+ let stop = false;
23
+ grid.api.eventFire("columnMoveBegin", {
24
+ grid,
25
+ before: !!params.before,
26
+ moveColumns: columnsToMove,
27
+ moveTarget: destCol,
28
+ preventDefault: () => {
29
+ stop = true;
30
+ },
31
+ updatePinState: !!params.updatePinState,
32
+ });
33
+ if (stop) return;
34
+ const offset = params.before ? 0 : 1;
35
+ nextColumns.splice(indexOfDest + offset, 0, ...columnsToMove);
36
+ grid.state.columns.set(nextColumns);
37
+ if (params.updatePinState) {
38
+ const updates = Object.fromEntries(
39
+ columnsToMove.map((c) => [c.id, { pin: destCol.pin ?? null }]),
40
+ );
41
+ grid.api.columnUpdate(updates);
42
+ }
43
+ grid.api.eventFire("columnMoveEnd", {
44
+ grid,
45
+ before: !!params.before,
46
+ moveColumns: columnsToMove,
47
+ moveTarget: destCol,
48
+ updatePinState: !!params.updatePinState,
49
+ });
50
+ };
49
51
  };
@@ -1,9 +1,11 @@
1
1
  export const makeColumnResize = (grid) => {
2
- return (updates) => {
3
- const api = grid.api;
4
- const columnUpdates = Object.fromEntries(Object.entries(updates)
5
- .map(([c, v]) => [c, { width: v }])
6
- .filter((c) => api.columnById(c[0])));
7
- api.columnUpdate(columnUpdates);
8
- };
2
+ return (updates) => {
3
+ const api = grid.api;
4
+ const columnUpdates = Object.fromEntries(
5
+ Object.entries(updates)
6
+ .map(([c, v]) => [c, { width: v }])
7
+ .filter((c) => api.columnById(c[0])),
8
+ );
9
+ api.columnUpdate(columnUpdates);
10
+ };
9
11
  };
@@ -1,13 +1,13 @@
1
1
  export const makeColumnUpdate = (grid) => {
2
- return (updates) => {
3
- const columns = [...grid.state.columns.get()];
4
- for (let i = 0; i < columns.length; i++) {
5
- const column = columns[i];
6
- if (updates[column.id]) {
7
- const next = { ...column, ...updates[column.id] };
8
- columns[i] = next;
9
- }
10
- }
11
- grid.state.columns.set(columns);
12
- };
2
+ return (updates) => {
3
+ const columns = [...grid.state.columns.get()];
4
+ for (let i = 0; i < columns.length; i++) {
5
+ const column = columns[i];
6
+ if (updates[column.id]) {
7
+ const next = { ...column, ...updates[column.id] };
8
+ columns[i] = next;
9
+ }
10
+ }
11
+ grid.state.columns.set(columns);
12
+ };
13
13
  };
@@ -1,8 +1,12 @@
1
- import type { InternalAtoms } from "../+types";
1
+ import type { InternalAtoms } from "../+types.js";
2
2
  import type { Grid, GridApi } from "../../+types";
3
- export declare const makeDialogFrameOpen: (grid: Grid<any> & {
3
+ export declare const makeDialogFrameOpen: (
4
+ grid: Grid<any> & {
4
5
  internal: InternalAtoms;
5
- }) => GridApi<any>["dialogFrameOpen"];
6
- export declare const makeDialogFrameClose: (grid: Grid<any> & {
6
+ },
7
+ ) => GridApi<any>["dialogFrameOpen"];
8
+ export declare const makeDialogFrameClose: (
9
+ grid: Grid<any> & {
7
10
  internal: InternalAtoms;
8
- }) => GridApi<any>["dialogFrameClose"];
11
+ },
12
+ ) => GridApi<any>["dialogFrameClose"];
@@ -1,16 +1,15 @@
1
1
  export const makeDialogFrameOpen = (grid) => {
2
- return (id, context) => {
3
- grid.internal.dialogFrames.set((prev) => ({ ...prev, [id]: context }));
4
- };
2
+ return (id, context) => {
3
+ grid.internal.dialogFrames.set((prev) => ({ ...prev, [id]: context }));
4
+ };
5
5
  };
6
6
  export const makeDialogFrameClose = (grid) => {
7
- return (id) => {
8
- grid.internal.dialogFrames.set((prev) => {
9
- if (!id)
10
- return {};
11
- const next = { ...prev };
12
- delete next[id];
13
- return next;
14
- });
15
- };
7
+ return (id) => {
8
+ grid.internal.dialogFrames.set((prev) => {
9
+ if (!id) return {};
10
+ const next = { ...prev };
11
+ delete next[id];
12
+ return next;
13
+ });
14
+ };
16
15
  };
@@ -1,5 +1,7 @@
1
- import type { InternalAtoms } from "../+types";
1
+ import type { InternalAtoms } from "../+types.js";
2
2
  import type { Grid, GridApi } from "../../+types";
3
- export declare const makeEditBegin: (grid: Grid<any> & {
3
+ export declare const makeEditBegin: (
4
+ grid: Grid<any> & {
4
5
  internal: InternalAtoms;
5
- }) => GridApi<any>["editBegin"];
6
+ },
7
+ ) => GridApi<any>["editBegin"];