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

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 (381) hide show
  1. package/dist/+types.d.ts +3957 -4135
  2. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +38 -38
  3. package/dist/cell-selection/are-rects-equal.js +4 -6
  4. package/dist/cell-selection/bound-selection-rect.js +14 -14
  5. package/dist/cell-selection/cell-selection-containers.js +78 -108
  6. package/dist/cell-selection/cell-selection-driver.js +262 -250
  7. package/dist/cell-selection/cell-style-row.d.ts +6 -12
  8. package/dist/cell-selection/cell-style-row.js +79 -82
  9. package/dist/cell-selection/deselect-rect-range.js +40 -41
  10. package/dist/cell-selection/expand-cell-selection-down.d.ts +2 -5
  11. package/dist/cell-selection/expand-cell-selection-down.js +33 -29
  12. package/dist/cell-selection/expand-cell-selection-end.d.ts +2 -5
  13. package/dist/cell-selection/expand-cell-selection-end.js +34 -30
  14. package/dist/cell-selection/expand-cell-selection-start.d.ts +2 -5
  15. package/dist/cell-selection/expand-cell-selection-start.js +33 -29
  16. package/dist/cell-selection/expand-cell-selection-up.d.ts +2 -5
  17. package/dist/cell-selection/expand-cell-selection-up.js +33 -29
  18. package/dist/cell-selection/full-width-start-end-index.js +3 -3
  19. package/dist/cell-selection/get-root-cell.d.ts +1 -5
  20. package/dist/cell-selection/get-root-cell.js +79 -77
  21. package/dist/cell-selection/is-bottom-rect.js +5 -5
  22. package/dist/cell-selection/is-center-col-rect.d.ts +2 -5
  23. package/dist/cell-selection/is-center-col-rect.js +3 -5
  24. package/dist/cell-selection/is-center-rect.js +3 -3
  25. package/dist/cell-selection/is-end-rect.d.ts +2 -5
  26. package/dist/cell-selection/is-end-rect.js +2 -2
  27. package/dist/cell-selection/is-overlapping-rect.js +4 -6
  28. package/dist/cell-selection/is-start-rect.d.ts +2 -5
  29. package/dist/cell-selection/is-start-rect.js +2 -2
  30. package/dist/cell-selection/is-top-rect.js +2 -2
  31. package/dist/cell-selection/is-within-selection-rect.js +1 -1
  32. package/dist/cell-selection/split-cell-selection-rect.d.ts +6 -12
  33. package/dist/cell-selection/split-cell-selection-rect.js +47 -53
  34. package/dist/cell-selection/update-additive-cell-selection.d.ts +2 -5
  35. package/dist/cell-selection/update-additive-cell-selection.js +19 -18
  36. package/dist/cell-selection/use-edge-scroll.d.ts +6 -8
  37. package/dist/cell-selection/use-edge-scroll.js +63 -65
  38. package/dist/cells/cell-default.d.ts +1 -5
  39. package/dist/cells/cell-default.js +5 -5
  40. package/dist/cells/cell-editor.d.ts +2 -4
  41. package/dist/cells/cell-editor.js +86 -121
  42. package/dist/cells/cell.d.ts +3 -16
  43. package/dist/cells/cell.js +27 -55
  44. package/dist/column-manager/branch-lookup-context.d.ts +1 -3
  45. package/dist/column-manager/branch.d.ts +4 -12
  46. package/dist/column-manager/branch.js +29 -39
  47. package/dist/column-manager/column-manager.d.ts +9 -58
  48. package/dist/column-manager/column-manager.js +9 -9
  49. package/dist/column-manager/context.d.ts +1 -1
  50. package/dist/column-manager/label.d.ts +2 -10
  51. package/dist/column-manager/label.js +12 -11
  52. package/dist/column-manager/leaf.d.ts +2 -10
  53. package/dist/column-manager/leaf.js +32 -42
  54. package/dist/column-manager/move-handle.d.ts +6 -14
  55. package/dist/column-manager/move-handle.js +50 -54
  56. package/dist/column-manager/root.d.ts +3 -9
  57. package/dist/column-manager/root.js +13 -26
  58. package/dist/column-manager/use-column-manager.d.ts +12 -12
  59. package/dist/column-manager/use-column-manager.js +20 -20
  60. package/dist/column-manager/use-columns-from-context.js +18 -18
  61. package/dist/column-manager/visibility-checkbox.d.ts +6 -14
  62. package/dist/column-manager/visibility-checkbox.js +23 -36
  63. package/dist/context.d.ts +4 -4
  64. package/dist/filter-tree/branch.d.ts +5 -13
  65. package/dist/filter-tree/branch.js +13 -23
  66. package/dist/filter-tree/context.d.ts +16 -16
  67. package/dist/filter-tree/filter-tree.d.ts +8 -49
  68. package/dist/filter-tree/filter-tree.js +8 -8
  69. package/dist/filter-tree/hooks/use-filter-tree.d.ts +29 -35
  70. package/dist/filter-tree/hooks/use-filter-tree.js +92 -94
  71. package/dist/filter-tree/hooks/use-tree-item.d.ts +4 -4
  72. package/dist/filter-tree/hooks/use-tree-item.js +106 -99
  73. package/dist/filter-tree/inclusion-checkbox.d.ts +6 -14
  74. package/dist/filter-tree/inclusion-checkbox.js +9 -19
  75. package/dist/filter-tree/label.d.ts +2 -10
  76. package/dist/filter-tree/label.js +12 -11
  77. package/dist/filter-tree/leaf.d.ts +2 -10
  78. package/dist/filter-tree/leaf.js +5 -15
  79. package/dist/filter-tree/root.d.ts +7 -23
  80. package/dist/filter-tree/root.js +23 -51
  81. package/dist/grid-box/+types.d.ts +9 -9
  82. package/dist/grid-box/context.d.ts +3 -3
  83. package/dist/grid-box/grid-box.d.ts +6 -26
  84. package/dist/grid-box/grid-box.js +6 -6
  85. package/dist/grid-box/item.d.ts +3 -11
  86. package/dist/grid-box/item.js +26 -29
  87. package/dist/grid-box/panel.d.ts +1 -13
  88. package/dist/grid-box/panel.js +2 -9
  89. package/dist/grid-box/root.d.ts +5 -11
  90. package/dist/grid-box/root.js +2 -11
  91. package/dist/grid-box/use-aggregation-box-items.d.ts +13 -16
  92. package/dist/grid-box/use-aggregation-box-items.js +55 -54
  93. package/dist/grid-box/use-column-box-items.d.ts +21 -31
  94. package/dist/grid-box/use-column-box-items.js +78 -90
  95. package/dist/grid-box/use-row-group-box-items.d.ts +12 -17
  96. package/dist/grid-box/use-row-group-box-items.js +124 -116
  97. package/dist/grid-provider/context.d.ts +2 -4
  98. package/dist/grid-provider/provider.d.ts +2 -4
  99. package/dist/grid-provider/use-grid.d.ts +1 -1
  100. package/dist/grid.d.ts +26 -150
  101. package/dist/grid.js +26 -38
  102. package/dist/header/header-cell.d.ts +5 -13
  103. package/dist/header/header-cell.js +15 -41
  104. package/dist/header/header-group-cell.d.ts +2 -10
  105. package/dist/header/header-group-cell.js +6 -21
  106. package/dist/header/header-row.d.ts +2 -10
  107. package/dist/header/header-row.js +2 -2
  108. package/dist/header/header.d.ts +1 -10
  109. package/dist/header/header.js +2 -11
  110. package/dist/header/resize-handler.d.ts +6 -15
  111. package/dist/header/resize-handler.js +118 -128
  112. package/dist/header/use-drag-move.d.ts +11 -22
  113. package/dist/header/use-drag-move.js +87 -83
  114. package/dist/header/use-header-cell-renderer.d.ts +2 -9
  115. package/dist/header/use-header-cell-renderer.js +29 -24
  116. package/dist/icons/index.d.ts +1 -92
  117. package/dist/icons/index.js +1 -92
  118. package/dist/license.js +174 -174
  119. package/dist/listbox/context.d.ts +2 -2
  120. package/dist/listbox/item.d.ts +1 -10
  121. package/dist/listbox/item.js +19 -23
  122. package/dist/listbox/panel.d.ts +1 -10
  123. package/dist/listbox/panel.js +43 -69
  124. package/dist/listbox/root.d.ts +3 -5
  125. package/dist/listbox/root.js +7 -7
  126. package/dist/root/dialog-driver.js +16 -22
  127. package/dist/root/popover-driver.js +16 -27
  128. package/dist/root/root.d.ts +3 -7
  129. package/dist/root/root.js +107 -111
  130. package/dist/row-data-source-client/+types.d.ts +17 -17
  131. package/dist/row-data-source-client/built-ins/avg.js +4 -3
  132. package/dist/row-data-source-client/built-ins/built-ins.d.ts +16 -16
  133. package/dist/row-data-source-client/built-ins/built-ins.js +16 -16
  134. package/dist/row-data-source-client/built-ins/count.js +5 -3
  135. package/dist/row-data-source-client/built-ins/first.js +1 -1
  136. package/dist/row-data-source-client/built-ins/group.js +1 -1
  137. package/dist/row-data-source-client/built-ins/last.js +1 -1
  138. package/dist/row-data-source-client/built-ins/max.js +13 -9
  139. package/dist/row-data-source-client/built-ins/min.js +13 -9
  140. package/dist/row-data-source-client/built-ins/sum.js +10 -8
  141. package/dist/row-data-source-client/filter/+types.d.ts +13 -35
  142. package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +2 -16
  143. package/dist/row-data-source-client/filter/compute-filtered-rows.js +102 -102
  144. package/dist/row-data-source-client/pivots/create-agg-model.d.ts +4 -8
  145. package/dist/row-data-source-client/pivots/create-agg-model.js +9 -8
  146. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +1 -6
  147. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +46 -42
  148. package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +1 -6
  149. package/dist/row-data-source-client/pivots/create-pivot-columns.js +17 -16
  150. package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +1 -7
  151. package/dist/row-data-source-client/pivots/create-pivot-tree.js +19 -19
  152. package/dist/row-data-source-client/tree/client-tree.d.ts +13 -19
  153. package/dist/row-data-source-client/tree/client-tree.js +67 -64
  154. package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +1 -4
  155. package/dist/row-data-source-client/tree/evaluator-aggregation.js +6 -6
  156. package/dist/row-data-source-client/tree/evaluator-group.d.ts +1 -4
  157. package/dist/row-data-source-client/tree/evaluator-group.js +7 -6
  158. package/dist/row-data-source-client/tree/traverse.d.ts +1 -5
  159. package/dist/row-data-source-client/tree/traverse.js +18 -15
  160. package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +5 -9
  161. package/dist/row-data-source-client/use-client-data-source-paginated.js +523 -523
  162. package/dist/row-data-source-client/use-client-data-source.d.ts +5 -9
  163. package/dist/row-data-source-client/use-client-data-source.js +647 -665
  164. package/dist/row-data-source-client/use-client-tree-data-source.d.ts +5 -9
  165. package/dist/row-data-source-client/use-client-tree-data-source.js +500 -494
  166. package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +33 -36
  167. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +1 -4
  168. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +22 -18
  169. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +1 -4
  170. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +25 -17
  171. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +18 -18
  172. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +10 -9
  173. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +1 -4
  174. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +14 -13
  175. package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +10 -9
  176. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +1 -4
  177. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +13 -13
  178. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +1 -4
  179. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +1 -1
  180. package/dist/row-data-source-server/async-tree/make-async-tree.js +14 -14
  181. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +1 -3
  182. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +6 -6
  183. package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +1 -5
  184. package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +14 -11
  185. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +1 -4
  186. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +46 -42
  187. package/dist/row-data-source-server/range-tree/range-tree.d.ts +28 -28
  188. package/dist/row-data-source-server/range-tree/range-tree.js +48 -49
  189. package/dist/row-data-source-server/use-server-data-source.d.ts +2 -11
  190. package/dist/row-data-source-server/use-server-data-source.js +652 -662
  191. package/dist/row-data-source-server/utils/get-node-depth.js +7 -7
  192. package/dist/row-data-source-server/utils/get-node-path.js +7 -7
  193. package/dist/row-data-source-server/utils/get-request-id.js +4 -3
  194. package/dist/rows/row/context.d.ts +2 -2
  195. package/dist/rows/row/row.d.ts +3 -16
  196. package/dist/rows/row/row.js +4 -19
  197. package/dist/rows/row/use-row-context-value.d.ts +2 -5
  198. package/dist/rows/row/use-row-context-value.js +26 -23
  199. package/dist/rows/row-detail-row.d.ts +2 -4
  200. package/dist/rows/row-detail-row.js +124 -147
  201. package/dist/rows/row-full-width.d.ts +4 -12
  202. package/dist/rows/row-full-width.js +7 -35
  203. package/dist/rows/rows-container.d.ts +1 -10
  204. package/dist/rows/rows-container.js +3 -12
  205. package/dist/rows/rows-sections.d.ts +3 -30
  206. package/dist/rows/rows-sections.js +10 -42
  207. package/dist/rows/scrollers/native-scroller.d.ts +1 -3
  208. package/dist/rows/scrollers/native-scroller.js +13 -17
  209. package/dist/sort-manager/+types.d.ts +7 -14
  210. package/dist/sort-manager/context.d.ts +4 -4
  211. package/dist/sort-manager/hooks/use-sort-manager.d.ts +9 -9
  212. package/dist/sort-manager/hooks/use-sort-manager.js +49 -45
  213. package/dist/sort-manager/hooks/use-sort-row-item.d.ts +46 -57
  214. package/dist/sort-manager/hooks/use-sort-row-item.js +131 -126
  215. package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +3 -6
  216. package/dist/sort-manager/hooks/use-sortable-column-items.js +10 -10
  217. package/dist/sort-manager/root.d.ts +1 -7
  218. package/dist/sort-manager/root.js +10 -10
  219. package/dist/sort-manager/sort-add.d.ts +5 -13
  220. package/dist/sort-manager/sort-add.js +8 -8
  221. package/dist/sort-manager/sort-apply.d.ts +4 -12
  222. package/dist/sort-manager/sort-apply.js +16 -16
  223. package/dist/sort-manager/sort-cancel.d.ts +4 -12
  224. package/dist/sort-manager/sort-cancel.js +19 -19
  225. package/dist/sort-manager/sort-clear.d.ts +4 -12
  226. package/dist/sort-manager/sort-clear.js +16 -15
  227. package/dist/sort-manager/sort-column-select.d.ts +6 -14
  228. package/dist/sort-manager/sort-column-select.js +15 -26
  229. package/dist/sort-manager/sort-direction-select.d.ts +6 -14
  230. package/dist/sort-manager/sort-direction-select.js +19 -27
  231. package/dist/sort-manager/sort-manager.d.ts +12 -93
  232. package/dist/sort-manager/sort-manager.js +12 -12
  233. package/dist/sort-manager/sort-remove.d.ts +4 -12
  234. package/dist/sort-manager/sort-remove.js +8 -8
  235. package/dist/sort-manager/sort-row.d.ts +2 -10
  236. package/dist/sort-manager/sort-row.js +1 -4
  237. package/dist/sort-manager/sort-rows.d.ts +1 -10
  238. package/dist/sort-manager/sort-rows.js +1 -1
  239. package/dist/sort-manager/sort-value-select.d.ts +7 -15
  240. package/dist/sort-manager/sort-value-select.js +19 -28
  241. package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +1 -4
  242. package/dist/sort-manager/utils/sort-item-to-sort-model.js +49 -46
  243. package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +1 -4
  244. package/dist/sort-manager/utils/sort-model-to-sort-items.js +44 -36
  245. package/dist/state/+types.d.ts +28 -41
  246. package/dist/state/api/column-autosize.d.ts +2 -4
  247. package/dist/state/api/column-autosize.js +63 -62
  248. package/dist/state/api/column-by-id.js +4 -4
  249. package/dist/state/api/column-field.js +20 -17
  250. package/dist/state/api/column-from-index.js +4 -4
  251. package/dist/state/api/column-group-toggle.js +8 -8
  252. package/dist/state/api/column-index.js +5 -5
  253. package/dist/state/api/column-move.js +46 -48
  254. package/dist/state/api/column-resize.js +7 -9
  255. package/dist/state/api/column-update.js +11 -11
  256. package/dist/state/api/dialog-frame.d.ts +4 -8
  257. package/dist/state/api/dialog-frame.js +12 -11
  258. package/dist/state/api/edit-begin.d.ts +2 -4
  259. package/dist/state/api/edit-begin.js +84 -71
  260. package/dist/state/api/edit-end.d.ts +2 -4
  261. package/dist/state/api/edit-end.js +41 -38
  262. package/dist/state/api/edit-is-cell-active.d.ts +2 -4
  263. package/dist/state/api/edit-is-cell-active.js +24 -17
  264. package/dist/state/api/edit-update.d.ts +2 -4
  265. package/dist/state/api/edit-update.js +85 -74
  266. package/dist/state/api/event-listeners.d.ts +3 -12
  267. package/dist/state/api/event-listeners.js +17 -16
  268. package/dist/state/api/export-csv.js +35 -33
  269. package/dist/state/api/export-data-rect.js +21 -21
  270. package/dist/state/api/focus-cell.d.ts +2 -4
  271. package/dist/state/api/focus-cell.js +109 -110
  272. package/dist/state/api/popover-frame.d.ts +4 -8
  273. package/dist/state/api/popover-frame.js +12 -11
  274. package/dist/state/api/position-from-element.js +6 -5
  275. package/dist/state/api/row-by-id.js +3 -3
  276. package/dist/state/api/row-by-index.js +6 -11
  277. package/dist/state/api/row-detail-is-expanded.d.ts +1 -3
  278. package/dist/state/api/row-detail-is-expanded.js +4 -4
  279. package/dist/state/api/row-detail-rendered-height.d.ts +2 -4
  280. package/dist/state/api/row-detail-rendered-height.js +12 -10
  281. package/dist/state/api/row-detail-toggle.js +30 -26
  282. package/dist/state/api/row-group-apply-expansions.d.ts +1 -3
  283. package/dist/state/api/row-group-apply-expansions.js +17 -15
  284. package/dist/state/api/row-group-column-index.d.ts +1 -3
  285. package/dist/state/api/row-group-column-index.js +12 -14
  286. package/dist/state/api/row-group-is-expanded.d.ts +1 -3
  287. package/dist/state/api/row-group-is-expanded.js +13 -11
  288. package/dist/state/api/row-group-toggle.js +5 -5
  289. package/dist/state/api/row-handle-select.d.ts +2 -4
  290. package/dist/state/api/row-handle-select.js +40 -36
  291. package/dist/state/api/row-select-all.js +15 -14
  292. package/dist/state/api/row-select.d.ts +2 -4
  293. package/dist/state/api/row-select.js +33 -30
  294. package/dist/state/api/row-selected.js +11 -10
  295. package/dist/state/api/scroll-into-view.d.ts +2 -4
  296. package/dist/state/api/scroll-into-view.js +47 -47
  297. package/dist/state/api/sort-for-column.js +7 -6
  298. package/dist/state/api/use-row-drag.js +24 -22
  299. package/dist/state/helpers/cell-row-group.d.ts +1 -5
  300. package/dist/state/helpers/cell-row-group.js +16 -18
  301. package/dist/state/helpers/column-add-row-group.d.ts +6 -16
  302. package/dist/state/helpers/column-add-row-group.js +58 -63
  303. package/dist/state/helpers/column-layout.d.ts +1 -7
  304. package/dist/state/helpers/column-layout.js +60 -60
  305. package/dist/state/helpers/column-marker.d.ts +4 -8
  306. package/dist/state/helpers/column-marker.js +34 -38
  307. package/dist/state/helpers/column-view.d.ts +15 -21
  308. package/dist/state/helpers/column-view.js +32 -56
  309. package/dist/state/helpers/edit-on-change.d.ts +10 -18
  310. package/dist/state/helpers/edit-on-change.js +24 -24
  311. package/dist/state/helpers/empty-row-data-source.js +16 -15
  312. package/dist/state/helpers/get-data-rect.d.ts +10 -20
  313. package/dist/state/helpers/get-data-rect.js +62 -67
  314. package/dist/state/helpers/get-full-width-callback.d.ts +1 -5
  315. package/dist/state/helpers/get-full-width-callback.js +6 -5
  316. package/dist/state/helpers/get-span-callback.d.ts +1 -6
  317. package/dist/state/helpers/get-span-callback.js +18 -15
  318. package/dist/state/helpers/resolve-column.d.ts +2 -6
  319. package/dist/state/helpers/resolve-column.js +18 -18
  320. package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +12 -15
  321. package/dist/state/helpers/row-layout/get-focus-criteria.js +56 -57
  322. package/dist/state/helpers/row-layout/row-layout.d.ts +9 -15
  323. package/dist/state/helpers/row-layout/row-layout.js +401 -387
  324. package/dist/state/use-lytenyte.js +516 -556
  325. package/dist/tree-view/branch/branch.d.ts +8 -16
  326. package/dist/tree-view/branch/branch.js +52 -104
  327. package/dist/tree-view/branch/use-branch-keys.d.ts +1 -5
  328. package/dist/tree-view/branch/use-branch-keys.js +74 -71
  329. package/dist/tree-view/context.d.ts +17 -21
  330. package/dist/tree-view/hooks/use-tree-view-paths.d.ts +1 -6
  331. package/dist/tree-view/hooks/use-tree-view-paths.js +5 -5
  332. package/dist/tree-view/index.d.ts +7 -35
  333. package/dist/tree-view/index.js +7 -7
  334. package/dist/tree-view/leaf.d.ts +2 -10
  335. package/dist/tree-view/leaf.js +20 -29
  336. package/dist/tree-view/navigation/get-all-ids.js +3 -3
  337. package/dist/tree-view/navigation/get-first-node.js +3 -3
  338. package/dist/tree-view/navigation/get-last-node.js +3 -3
  339. package/dist/tree-view/navigation/get-next-node.js +8 -6
  340. package/dist/tree-view/navigation/get-prev-node.js +8 -6
  341. package/dist/tree-view/panel/make-handle-navigation.js +31 -23
  342. package/dist/tree-view/panel/make-handle-selection.js +77 -68
  343. package/dist/tree-view/panel/make-handle-typeahead.js +40 -34
  344. package/dist/tree-view/panel/panel.d.ts +1 -10
  345. package/dist/tree-view/panel/panel.js +20 -40
  346. package/dist/tree-view/panel/use-tree-navigation.js +52 -64
  347. package/dist/tree-view/root.d.ts +14 -20
  348. package/dist/tree-view/root.js +55 -53
  349. package/dist/tree-view/utils/get-focusable-nodes.js +2 -4
  350. package/dist/tree-view/utils/get-focused-node.js +11 -11
  351. package/dist/tree-view/utils/get-ids-between-nodes.d.ts +1 -5
  352. package/dist/tree-view/utils/get-ids-between-nodes.js +11 -10
  353. package/dist/tree-view/utils/get-panel.js +5 -5
  354. package/dist/tree-view/utils/get-parent-node.js +7 -6
  355. package/dist/tree-view/utils/get-sibling-branches.js +10 -8
  356. package/dist/tree-view/utils/get-tree-node-id.js +1 -1
  357. package/dist/tree-view/utils/is-branch-node.js +1 -1
  358. package/dist/tree-view/utils/is-leaf-node.js +1 -1
  359. package/dist/tree-view/utils/is-tree-node-disabled.js +1 -1
  360. package/dist/tree-view/utils/select-node.d.ts +1 -5
  361. package/dist/tree-view/utils/select-node.js +11 -8
  362. package/dist/tree-view/utils/toggle-all-selections.js +6 -4
  363. package/dist/tree-view/utils/toggle-selection.js +18 -15
  364. package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +1 -3
  365. package/dist/tree-view/virtualized/force-sync-scrolling.js +18 -24
  366. package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +1 -3
  367. package/dist/tree-view/virtualized/get-virtual-tree-paths.js +12 -11
  368. package/dist/tree-view/virtualized/make-virtual-tree.d.ts +21 -26
  369. package/dist/tree-view/virtualized/make-virtual-tree.js +85 -79
  370. package/dist/tree-view/virtualized/use-flattened-tree.d.ts +8 -17
  371. package/dist/tree-view/virtualized/use-flattened-tree.js +31 -30
  372. package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +1 -6
  373. package/dist/tree-view/virtualized/use-row-start-and-end.js +23 -21
  374. package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +15 -21
  375. package/dist/tree-view/virtualized/use-virtualized-tree.js +90 -103
  376. package/dist/utils/cycle-sorts.js +14 -12
  377. package/dist/viewport/begin-editing.d.ts +2 -6
  378. package/dist/viewport/begin-editing.js +13 -9
  379. package/dist/viewport/viewport.d.ts +1 -10
  380. package/dist/viewport/viewport.js +70 -93
  381. package/package.json +7 -7
@@ -3,398 +3,412 @@ import { getFocusCriteria } from "./get-focus-criteria";
3
3
  /**
4
4
  * This is quite a complex function so read each part carefully.
5
5
  */
6
- export function makeRowLayout({ layout: n, layoutMap, rds, columns, focus }) {
7
- // Initializes the layout sections for the view.
8
- const top = [];
9
- const center = [];
10
- const bottom = [];
11
- // Compute the focus setup for the view. The cell that is currently focused must always be mounted.
12
- // However things get tricky since the cell may be scrolled out of view. Additionally it may be in any
13
- // quadrant of the grid. This function returns the specification of where exactly the focus cell is.
14
- const f = getFocusCriteria(n, focus);
15
- /**
16
- * TOP ROW LAYOUT START
17
- */
18
- for (let r = n.rowTopStart; r < n.rowTopEnd; r++) {
19
- const row = layoutMap.get(r);
20
- if (!row) {
21
- continue;
22
- }
23
- const node = rds.rowForIndex(r);
24
- if (!node) {
25
- console.error(`Row data source did not return a row for a valid row position at index: ${r}`);
26
- break;
27
- }
28
- const rowLastPinTop = n.rowTopEnd - 1 === r ? true : undefined;
29
- if (isFullWidthMap(row)) {
30
- top.push({
31
- id: node.get()?.id ?? `${r}`,
32
- rowIndex: r,
33
- kind: "full-width",
34
- rowPin: "top",
35
- row: node,
36
- rowLastPinTop,
37
- });
38
- continue;
39
- }
40
- const cellLayout = [];
41
- for (let c = n.colStartStart; c < n.colStartEnd; c++) {
42
- const v = row.get(c);
43
- if (!v || v.length === 3) continue;
44
- cellLayout.push({
45
- id: columns[c].id,
46
- kind: "cell",
47
- colIndex: c,
48
- rowIndex: r,
49
- rowSpan: v[0],
50
- colSpan: v[1],
51
- rowPin: "top",
52
- colPin: "start",
53
- colLastStartPin: c + v[1] === n.colStartEnd ? true : undefined,
54
- rowLastPinTop,
55
- row: node,
56
- column: columns[c],
57
- });
58
- }
59
- for (let c = n.colCenterStart; c < n.colCenterEnd; c++) {
60
- const v = row.get(c);
61
- if (!v || v.length === 3) continue;
62
- cellLayout.push({
63
- id: columns[c].id,
64
- kind: "cell",
65
- colIndex: c,
66
- rowIndex: r,
67
- rowSpan: v[0],
68
- colSpan: v[1],
69
- rowPin: "top",
70
- colPin: null,
71
- rowLastPinTop,
72
- row: node,
73
- column: columns[c],
74
- });
75
- }
76
- // For the top section, only the center cells may be out of view. The focused cell may be before or after the
77
- // center cells (if they are in the center cells we will be rendering them anyway).
78
- if (f.isTop && (f.isColCenterBefore || f.isColCenterAfter)) {
79
- const v = row.get(f.colIndex);
80
- if (v && v.length !== 3) {
81
- const cell = {
82
- id: columns[f.colIndex].id,
83
- kind: "cell",
84
- colIndex: f.colIndex,
85
- rowIndex: f.rowIndex,
86
- rowSpan: v[0],
87
- colSpan: v[1],
88
- rowPin: "top",
89
- colPin: null,
90
- rowLastPinTop,
91
- row: node,
92
- column: columns[f.colIndex],
93
- };
94
- if (f.isColCenterBefore) cellLayout.unshift(cell);
95
- else cellLayout.push(cell);
96
- }
97
- }
98
- for (let c = n.colEndStart; c < n.colEndEnd; c++) {
99
- const v = row.get(c);
100
- if (!v || v.length === 3) continue;
101
- cellLayout.push({
102
- id: columns[c].id,
103
- kind: "cell",
104
- colIndex: c,
105
- rowIndex: r,
106
- rowSpan: v[0],
107
- colSpan: v[1],
108
- rowPin: "top",
109
- colPin: "end",
110
- colFirstEndPin: c === n.colCenterLast ? true : undefined,
111
- rowLastPinTop,
112
- row: node,
113
- column: columns[c],
114
- });
115
- }
116
- top.push({
117
- id: node.get()?.id ?? `${r}`,
118
- rowIndex: r,
119
- kind: "row",
120
- cells: cellLayout,
121
- rowPin: "top",
122
- row: node,
123
- rowLastPinTop,
124
- });
125
- }
126
- /**
127
- * TOP ROW LAYOUT END
128
- */
129
- /**
130
- * CENTER ROW LAYOUT START
131
- */
132
- for (let r = n.rowCenterStart; r < n.rowCenterEnd; r++) {
133
- const row = layoutMap.get(r);
134
- if (!row) {
135
- continue;
136
- }
137
- const node = rds.rowForIndex(r);
138
- if (!node) {
139
- console.error(`Row data source did not return a row for a valid row position at index: ${r}`);
140
- break;
141
- }
142
- if (isFullWidthMap(row)) {
143
- center.push({
144
- id: node.get()?.id ?? `${r}`,
145
- rowIndex: r,
146
- kind: "full-width",
147
- rowPin: null,
148
- row: node,
149
- });
150
- continue;
151
- }
152
- const cellLayout = [];
153
- for (let c = n.colStartStart; c < n.colStartEnd; c++) {
154
- const v = row.get(c);
155
- if (!v || v.length === 3) continue;
156
- cellLayout.push({
157
- id: columns[c].id,
158
- kind: "cell",
159
- colIndex: c,
160
- rowIndex: r,
161
- rowSpan: v[0],
162
- colSpan: v[1],
163
- rowPin: null,
164
- colPin: "start",
165
- colLastStartPin: c + v[1] === n.colStartEnd ? true : undefined,
166
- row: node,
167
- column: columns[c],
168
- });
169
- }
170
- for (let c = n.colCenterStart; c < n.colCenterEnd; c++) {
171
- const v = row.get(c);
172
- if (!v || v.length === 3) continue;
173
- cellLayout.push({
174
- id: columns[c].id,
175
- kind: "cell",
176
- colIndex: c,
177
- rowIndex: r,
178
- rowSpan: v[0],
179
- colSpan: v[1],
180
- rowPin: null,
181
- colPin: null,
182
- row: node,
183
- column: columns[c],
184
- });
185
- }
186
- if (
187
- !f.isBot &&
188
- !f.isTop &&
189
- !f.isRowCenterAfter &&
190
- !f.isRowCenterAfter &&
191
- (f.isColCenterAfter || f.isColCenterBefore)
192
- ) {
193
- const v = row.get(f.colIndex);
194
- if (v && v.length !== 3) {
195
- const cell = {
196
- id: columns[f.colIndex].id,
197
- kind: "cell",
198
- colIndex: f.colIndex,
199
- rowIndex: f.rowIndex,
200
- rowSpan: v[0],
201
- colSpan: v[1],
202
- rowPin: null,
203
- colPin: null,
204
- row: node,
205
- column: columns[f.colIndex],
206
- };
207
- if (f.isColCenterAfter) cellLayout.push(cell);
208
- else cellLayout.unshift(cell);
209
- }
210
- }
211
- for (let c = n.colEndStart; c < n.colEndEnd; c++) {
212
- const v = row.get(c);
213
- if (!v || v.length === 3) continue;
214
- cellLayout.push({
215
- id: columns[c].id,
216
- kind: "cell",
217
- colIndex: c,
218
- rowIndex: r,
219
- rowSpan: v[0],
220
- colSpan: v[1],
221
- rowPin: null,
222
- colPin: "end",
223
- colFirstEndPin: c === n.colCenterLast ? true : undefined,
224
- row: node,
225
- column: columns[c],
226
- });
227
- }
228
- center.push({
229
- id: node.get()?.id ?? `${r}`,
230
- rowIndex: r,
231
- kind: "row",
232
- cells: cellLayout,
233
- rowPin: null,
234
- row: node,
235
- });
236
- }
237
- if (f.isRowCenterBefore || f.isRowCenterAfter) {
238
- const row = layoutMap.get(f.rowIndex);
239
- const node = rds.rowForIndex(f.rowIndex);
240
- if (row && node) {
241
- if (isFullWidthMap(row)) {
242
- center.push({
243
- id: node.get()?.id ?? `${f.rowIndex}`,
244
- rowIndex: f.rowIndex,
245
- kind: "full-width",
246
- rowPin: null,
247
- row: node,
248
- rowIsFocusRow: true,
6
+ export function makeRowLayout({ layout: n, layoutMap, rds, columns, focus, }) {
7
+ // Initializes the layout sections for the view.
8
+ const top = [];
9
+ const center = [];
10
+ const bottom = [];
11
+ // Compute the focus setup for the view. The cell that is currently focused must always be mounted.
12
+ // However things get tricky since the cell may be scrolled out of view. Additionally it may be in any
13
+ // quadrant of the grid. This function returns the specification of where exactly the focus cell is.
14
+ const f = getFocusCriteria(n, focus);
15
+ /**
16
+ * TOP ROW LAYOUT START
17
+ */
18
+ for (let r = n.rowTopStart; r < n.rowTopEnd; r++) {
19
+ const row = layoutMap.get(r);
20
+ if (!row) {
21
+ continue;
22
+ }
23
+ const node = rds.rowForIndex(r);
24
+ if (!node) {
25
+ console.error(`Row data source did not return a row for a valid row position at index: ${r}`);
26
+ break;
27
+ }
28
+ const rowLastPinTop = n.rowTopEnd - 1 === r ? true : undefined;
29
+ if (isFullWidthMap(row)) {
30
+ top.push({
31
+ id: node.get()?.id ?? `${r}`,
32
+ rowIndex: r,
33
+ kind: "full-width",
34
+ rowPin: "top",
35
+ row: node,
36
+ rowLastPinTop,
37
+ });
38
+ continue;
39
+ }
40
+ const cellLayout = [];
41
+ for (let c = n.colStartStart; c < n.colStartEnd; c++) {
42
+ const v = row.get(c);
43
+ if (!v || v.length === 3)
44
+ continue;
45
+ cellLayout.push({
46
+ id: columns[c].id,
47
+ kind: "cell",
48
+ colIndex: c,
49
+ rowIndex: r,
50
+ rowSpan: v[0],
51
+ colSpan: v[1],
52
+ rowPin: "top",
53
+ colPin: "start",
54
+ colLastStartPin: c + v[1] === n.colStartEnd ? true : undefined,
55
+ rowLastPinTop,
56
+ row: node,
57
+ column: columns[c],
58
+ });
59
+ }
60
+ for (let c = n.colCenterStart; c < n.colCenterEnd; c++) {
61
+ const v = row.get(c);
62
+ if (!v || v.length === 3)
63
+ continue;
64
+ cellLayout.push({
65
+ id: columns[c].id,
66
+ kind: "cell",
67
+ colIndex: c,
68
+ rowIndex: r,
69
+ rowSpan: v[0],
70
+ colSpan: v[1],
71
+ rowPin: "top",
72
+ colPin: null,
73
+ rowLastPinTop,
74
+ row: node,
75
+ column: columns[c],
76
+ });
77
+ }
78
+ // For the top section, only the center cells may be out of view. The focused cell may be before or after the
79
+ // center cells (if they are in the center cells we will be rendering them anyway).
80
+ if (f.isTop && (f.isColCenterBefore || f.isColCenterAfter)) {
81
+ const v = row.get(f.colIndex);
82
+ if (v && v.length !== 3) {
83
+ const cell = {
84
+ id: columns[f.colIndex].id,
85
+ kind: "cell",
86
+ colIndex: f.colIndex,
87
+ rowIndex: f.rowIndex,
88
+ rowSpan: v[0],
89
+ colSpan: v[1],
90
+ rowPin: "top",
91
+ colPin: null,
92
+ rowLastPinTop,
93
+ row: node,
94
+ column: columns[f.colIndex],
95
+ };
96
+ if (f.isColCenterBefore)
97
+ cellLayout.unshift(cell);
98
+ else
99
+ cellLayout.push(cell);
100
+ }
101
+ }
102
+ for (let c = n.colEndStart; c < n.colEndEnd; c++) {
103
+ const v = row.get(c);
104
+ if (!v || v.length === 3)
105
+ continue;
106
+ cellLayout.push({
107
+ id: columns[c].id,
108
+ kind: "cell",
109
+ colIndex: c,
110
+ rowIndex: r,
111
+ rowSpan: v[0],
112
+ colSpan: v[1],
113
+ rowPin: "top",
114
+ colPin: "end",
115
+ colFirstEndPin: c === n.colCenterLast ? true : undefined,
116
+ rowLastPinTop,
117
+ row: node,
118
+ column: columns[c],
119
+ });
120
+ }
121
+ top.push({
122
+ id: node.get()?.id ?? `${r}`,
123
+ rowIndex: r,
124
+ kind: "row",
125
+ cells: cellLayout,
126
+ rowPin: "top",
127
+ row: node,
128
+ rowLastPinTop,
249
129
  });
250
- } else {
130
+ }
131
+ /**
132
+ * TOP ROW LAYOUT END
133
+ */
134
+ /**
135
+ * CENTER ROW LAYOUT START
136
+ */
137
+ for (let r = n.rowCenterStart; r < n.rowCenterEnd; r++) {
138
+ const row = layoutMap.get(r);
139
+ if (!row) {
140
+ continue;
141
+ }
142
+ const node = rds.rowForIndex(r);
143
+ if (!node) {
144
+ console.error(`Row data source did not return a row for a valid row position at index: ${r}`);
145
+ break;
146
+ }
147
+ if (isFullWidthMap(row)) {
148
+ center.push({
149
+ id: node.get()?.id ?? `${r}`,
150
+ rowIndex: r,
151
+ kind: "full-width",
152
+ rowPin: null,
153
+ row: node,
154
+ });
155
+ continue;
156
+ }
251
157
  const cellLayout = [];
252
- const v = row.get(f.colIndex);
253
- if (v && v.length !== 3) {
254
- cellLayout.push({
255
- id: columns[f.colIndex].id,
256
- kind: "cell",
257
- colIndex: f.colIndex,
258
- rowIndex: f.rowIndex,
259
- rowSpan: v[0],
260
- colSpan: v[1],
158
+ for (let c = n.colStartStart; c < n.colStartEnd; c++) {
159
+ const v = row.get(c);
160
+ if (!v || v.length === 3)
161
+ continue;
162
+ cellLayout.push({
163
+ id: columns[c].id,
164
+ kind: "cell",
165
+ colIndex: c,
166
+ rowIndex: r,
167
+ rowSpan: v[0],
168
+ colSpan: v[1],
169
+ rowPin: null,
170
+ colPin: "start",
171
+ colLastStartPin: c + v[1] === n.colStartEnd ? true : undefined,
172
+ row: node,
173
+ column: columns[c],
174
+ });
175
+ }
176
+ for (let c = n.colCenterStart; c < n.colCenterEnd; c++) {
177
+ const v = row.get(c);
178
+ if (!v || v.length === 3)
179
+ continue;
180
+ cellLayout.push({
181
+ id: columns[c].id,
182
+ kind: "cell",
183
+ colIndex: c,
184
+ rowIndex: r,
185
+ rowSpan: v[0],
186
+ colSpan: v[1],
187
+ rowPin: null,
188
+ colPin: null,
189
+ row: node,
190
+ column: columns[c],
191
+ });
192
+ }
193
+ if (!f.isBot &&
194
+ !f.isTop &&
195
+ !f.isRowCenterAfter &&
196
+ !f.isRowCenterAfter &&
197
+ (f.isColCenterAfter || f.isColCenterBefore)) {
198
+ const v = row.get(f.colIndex);
199
+ if (v && v.length !== 3) {
200
+ const cell = {
201
+ id: columns[f.colIndex].id,
202
+ kind: "cell",
203
+ colIndex: f.colIndex,
204
+ rowIndex: f.rowIndex,
205
+ rowSpan: v[0],
206
+ colSpan: v[1],
207
+ rowPin: null,
208
+ colPin: null,
209
+ row: node,
210
+ column: columns[f.colIndex],
211
+ };
212
+ if (f.isColCenterAfter)
213
+ cellLayout.push(cell);
214
+ else
215
+ cellLayout.unshift(cell);
216
+ }
217
+ }
218
+ for (let c = n.colEndStart; c < n.colEndEnd; c++) {
219
+ const v = row.get(c);
220
+ if (!v || v.length === 3)
221
+ continue;
222
+ cellLayout.push({
223
+ id: columns[c].id,
224
+ kind: "cell",
225
+ colIndex: c,
226
+ rowIndex: r,
227
+ rowSpan: v[0],
228
+ colSpan: v[1],
229
+ rowPin: null,
230
+ colPin: "end",
231
+ colFirstEndPin: c === n.colCenterLast ? true : undefined,
232
+ row: node,
233
+ column: columns[c],
234
+ });
235
+ }
236
+ center.push({
237
+ id: node.get()?.id ?? `${r}`,
238
+ rowIndex: r,
239
+ kind: "row",
240
+ cells: cellLayout,
261
241
  rowPin: null,
262
- colPin: f.isStart ? "start" : f.isEnd ? "end" : null,
263
- rowIsFocusRow: true,
264
242
  row: node,
265
- column: columns[f.colIndex],
266
- });
267
- }
268
- const rowLayout = {
269
- id: node.get()?.id ?? `${f.rowIndex}`,
270
- rowIndex: f.rowIndex,
271
- kind: "row",
272
- cells: cellLayout,
273
- rowPin: null,
274
- row: node,
275
- rowIsFocusRow: true,
276
- };
277
- if (f.isRowCenterAfter) center.push(rowLayout);
278
- else center.unshift(rowLayout);
279
- }
280
- }
281
- }
282
- /**
283
- * CENTER ROW LAYOUT END
284
- */
285
- /**
286
- * BOTTOM ROW LAYOUT START
287
- */
288
- for (let r = n.rowBotStart; r < n.rowBotEnd; r++) {
289
- const row = layoutMap.get(r);
290
- if (!row) {
291
- continue;
292
- }
293
- const node = rds.rowForIndex(r);
294
- if (!node) {
295
- console.error(`Row data source did not return a row for a valid row position at index: ${r}`);
296
- break;
297
- }
298
- const rowFirstPinBottom = r === n.rowBotStart ? true : undefined;
299
- if (isFullWidthMap(row)) {
300
- bottom.push({
301
- id: node.get()?.id ?? `${r}`,
302
- rowIndex: r,
303
- kind: "full-width",
304
- rowPin: "bottom",
305
- row: node,
306
- rowFirstPinBottom,
307
- });
308
- continue;
309
- }
310
- const cellLayout = [];
311
- for (let c = n.colStartStart; c < n.colStartEnd; c++) {
312
- const v = row.get(c);
313
- if (!v || v.length === 3) continue;
314
- cellLayout.push({
315
- id: columns[c].id,
316
- kind: "cell",
317
- colIndex: c,
318
- rowIndex: r,
319
- rowSpan: v[0],
320
- colSpan: v[1],
321
- rowPin: "bottom",
322
- colPin: "start",
323
- colLastStartPin: c + v[1] === n.colStartEnd ? true : undefined,
324
- rowFirstPinBottom,
325
- row: node,
326
- column: columns[c],
327
- });
328
- }
329
- for (let c = n.colCenterStart; c < n.colCenterEnd; c++) {
330
- const v = row.get(c);
331
- if (!v || v.length === 3) continue;
332
- cellLayout.push({
333
- id: columns[c].id,
334
- kind: "cell",
335
- colIndex: c,
336
- rowIndex: r,
337
- rowSpan: v[0],
338
- colSpan: v[1],
339
- rowPin: "bottom",
340
- colPin: null,
341
- rowFirstPinBottom,
342
- row: node,
343
- column: columns[c],
344
- });
243
+ });
345
244
  }
346
- if (f.isBot && (f.isColCenterAfter || f.isColCenterBefore)) {
347
- const v = row.get(f.colIndex);
348
- if (v && v.length !== 3) {
349
- const cell = {
350
- id: columns[f.colIndex].id,
351
- kind: "cell",
352
- colIndex: f.colIndex,
353
- rowIndex: f.rowIndex,
354
- rowSpan: v[0],
355
- colSpan: v[1],
356
- rowPin: "bottom",
357
- colPin: null,
358
- row: node,
359
- column: columns[f.colIndex],
360
- };
361
- cellLayout.push(cell);
362
- }
245
+ if (f.isRowCenterBefore || f.isRowCenterAfter) {
246
+ const row = layoutMap.get(f.rowIndex);
247
+ const node = rds.rowForIndex(f.rowIndex);
248
+ if (row && node) {
249
+ if (isFullWidthMap(row)) {
250
+ center.push({
251
+ id: node.get()?.id ?? `${f.rowIndex}`,
252
+ rowIndex: f.rowIndex,
253
+ kind: "full-width",
254
+ rowPin: null,
255
+ row: node,
256
+ rowIsFocusRow: true,
257
+ });
258
+ }
259
+ else {
260
+ const cellLayout = [];
261
+ const v = row.get(f.colIndex);
262
+ if (v && v.length !== 3) {
263
+ cellLayout.push({
264
+ id: columns[f.colIndex].id,
265
+ kind: "cell",
266
+ colIndex: f.colIndex,
267
+ rowIndex: f.rowIndex,
268
+ rowSpan: v[0],
269
+ colSpan: v[1],
270
+ rowPin: null,
271
+ colPin: f.isStart ? "start" : f.isEnd ? "end" : null,
272
+ rowIsFocusRow: true,
273
+ row: node,
274
+ column: columns[f.colIndex],
275
+ });
276
+ }
277
+ const rowLayout = {
278
+ id: node.get()?.id ?? `${f.rowIndex}`,
279
+ rowIndex: f.rowIndex,
280
+ kind: "row",
281
+ cells: cellLayout,
282
+ rowPin: null,
283
+ row: node,
284
+ rowIsFocusRow: true,
285
+ };
286
+ if (f.isRowCenterAfter)
287
+ center.push(rowLayout);
288
+ else
289
+ center.unshift(rowLayout);
290
+ }
291
+ }
363
292
  }
364
- for (let c = n.colEndStart; c < n.colEndEnd; c++) {
365
- const v = row.get(c);
366
- if (!v || v.length === 3) continue;
367
- cellLayout.push({
368
- id: columns[c].id,
369
- kind: "cell",
370
- colIndex: c,
371
- rowIndex: r,
372
- rowSpan: v[0],
373
- colSpan: v[1],
374
- rowPin: "bottom",
375
- colPin: "end",
376
- colFirstEndPin: c === n.colCenterLast ? true : undefined,
377
- rowFirstPinBottom,
378
- row: node,
379
- column: columns[c],
380
- });
293
+ /**
294
+ * CENTER ROW LAYOUT END
295
+ */
296
+ /**
297
+ * BOTTOM ROW LAYOUT START
298
+ */
299
+ for (let r = n.rowBotStart; r < n.rowBotEnd; r++) {
300
+ const row = layoutMap.get(r);
301
+ if (!row) {
302
+ continue;
303
+ }
304
+ const node = rds.rowForIndex(r);
305
+ if (!node) {
306
+ console.error(`Row data source did not return a row for a valid row position at index: ${r}`);
307
+ break;
308
+ }
309
+ const rowFirstPinBottom = r === n.rowBotStart ? true : undefined;
310
+ if (isFullWidthMap(row)) {
311
+ bottom.push({
312
+ id: node.get()?.id ?? `${r}`,
313
+ rowIndex: r,
314
+ kind: "full-width",
315
+ rowPin: "bottom",
316
+ row: node,
317
+ rowFirstPinBottom,
318
+ });
319
+ continue;
320
+ }
321
+ const cellLayout = [];
322
+ for (let c = n.colStartStart; c < n.colStartEnd; c++) {
323
+ const v = row.get(c);
324
+ if (!v || v.length === 3)
325
+ continue;
326
+ cellLayout.push({
327
+ id: columns[c].id,
328
+ kind: "cell",
329
+ colIndex: c,
330
+ rowIndex: r,
331
+ rowSpan: v[0],
332
+ colSpan: v[1],
333
+ rowPin: "bottom",
334
+ colPin: "start",
335
+ colLastStartPin: c + v[1] === n.colStartEnd ? true : undefined,
336
+ rowFirstPinBottom,
337
+ row: node,
338
+ column: columns[c],
339
+ });
340
+ }
341
+ for (let c = n.colCenterStart; c < n.colCenterEnd; c++) {
342
+ const v = row.get(c);
343
+ if (!v || v.length === 3)
344
+ continue;
345
+ cellLayout.push({
346
+ id: columns[c].id,
347
+ kind: "cell",
348
+ colIndex: c,
349
+ rowIndex: r,
350
+ rowSpan: v[0],
351
+ colSpan: v[1],
352
+ rowPin: "bottom",
353
+ colPin: null,
354
+ rowFirstPinBottom,
355
+ row: node,
356
+ column: columns[c],
357
+ });
358
+ }
359
+ if (f.isBot && (f.isColCenterAfter || f.isColCenterBefore)) {
360
+ const v = row.get(f.colIndex);
361
+ if (v && v.length !== 3) {
362
+ const cell = {
363
+ id: columns[f.colIndex].id,
364
+ kind: "cell",
365
+ colIndex: f.colIndex,
366
+ rowIndex: f.rowIndex,
367
+ rowSpan: v[0],
368
+ colSpan: v[1],
369
+ rowPin: "bottom",
370
+ colPin: null,
371
+ row: node,
372
+ column: columns[f.colIndex],
373
+ };
374
+ cellLayout.push(cell);
375
+ }
376
+ }
377
+ for (let c = n.colEndStart; c < n.colEndEnd; c++) {
378
+ const v = row.get(c);
379
+ if (!v || v.length === 3)
380
+ continue;
381
+ cellLayout.push({
382
+ id: columns[c].id,
383
+ kind: "cell",
384
+ colIndex: c,
385
+ rowIndex: r,
386
+ rowSpan: v[0],
387
+ colSpan: v[1],
388
+ rowPin: "bottom",
389
+ colPin: "end",
390
+ colFirstEndPin: c === n.colCenterLast ? true : undefined,
391
+ rowFirstPinBottom,
392
+ row: node,
393
+ column: columns[c],
394
+ });
395
+ }
396
+ bottom.push({
397
+ id: node.get()?.id ?? `${r}`,
398
+ rowIndex: r,
399
+ kind: "row",
400
+ cells: cellLayout,
401
+ rowPin: "bottom",
402
+ row: node,
403
+ rowFirstPinBottom,
404
+ });
381
405
  }
382
- bottom.push({
383
- id: node.get()?.id ?? `${r}`,
384
- rowIndex: r,
385
- kind: "row",
386
- cells: cellLayout,
387
- rowPin: "bottom",
388
- row: node,
389
- rowFirstPinBottom,
390
- });
391
- }
392
- /**
393
- * BOTTOM ROW LAYOUT END
394
- */
395
- return {
396
- top,
397
- center,
398
- bottom,
399
- };
406
+ /**
407
+ * BOTTOM ROW LAYOUT END
408
+ */
409
+ return {
410
+ top,
411
+ center,
412
+ bottom,
413
+ };
400
414
  }