@1771technologies/lytenyte-pro 1.0.0-beta.33 → 1.0.0-beta.36
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.
- package/dist/+types.d.ts +4203 -4009
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +38 -38
- package/dist/cell-selection/are-rects-equal.js +6 -4
- package/dist/cell-selection/bound-selection-rect.js +14 -14
- package/dist/cell-selection/cell-selection-containers.js +108 -78
- package/dist/cell-selection/cell-selection-driver.js +250 -262
- package/dist/cell-selection/cell-style-row.d.ts +12 -6
- package/dist/cell-selection/cell-style-row.js +82 -79
- package/dist/cell-selection/deselect-rect-range.js +41 -40
- package/dist/cell-selection/expand-cell-selection-down.d.ts +5 -2
- package/dist/cell-selection/expand-cell-selection-down.js +29 -33
- package/dist/cell-selection/expand-cell-selection-end.d.ts +5 -2
- package/dist/cell-selection/expand-cell-selection-end.js +30 -34
- package/dist/cell-selection/expand-cell-selection-start.d.ts +5 -2
- package/dist/cell-selection/expand-cell-selection-start.js +29 -33
- package/dist/cell-selection/expand-cell-selection-up.d.ts +5 -2
- package/dist/cell-selection/expand-cell-selection-up.js +29 -33
- package/dist/cell-selection/full-width-start-end-index.js +3 -3
- package/dist/cell-selection/get-root-cell.d.ts +5 -1
- package/dist/cell-selection/get-root-cell.js +77 -79
- package/dist/cell-selection/is-bottom-rect.js +5 -5
- package/dist/cell-selection/is-center-col-rect.d.ts +5 -2
- package/dist/cell-selection/is-center-col-rect.js +5 -3
- package/dist/cell-selection/is-center-rect.js +3 -3
- package/dist/cell-selection/is-end-rect.d.ts +5 -2
- package/dist/cell-selection/is-end-rect.js +2 -2
- package/dist/cell-selection/is-overlapping-rect.js +6 -4
- package/dist/cell-selection/is-start-rect.d.ts +5 -2
- package/dist/cell-selection/is-start-rect.js +2 -2
- package/dist/cell-selection/is-top-rect.js +2 -2
- package/dist/cell-selection/is-within-selection-rect.js +1 -1
- package/dist/cell-selection/split-cell-selection-rect.d.ts +12 -6
- package/dist/cell-selection/split-cell-selection-rect.js +53 -47
- package/dist/cell-selection/update-additive-cell-selection.d.ts +5 -2
- package/dist/cell-selection/update-additive-cell-selection.js +16 -17
- package/dist/cell-selection/use-edge-scroll.d.ts +8 -6
- package/dist/cell-selection/use-edge-scroll.js +65 -63
- package/dist/cells/cell-default.d.ts +5 -1
- package/dist/cells/cell-default.js +5 -5
- package/dist/cells/cell-editor.d.ts +4 -2
- package/dist/cells/cell-editor.js +129 -92
- package/dist/cells/cell.d.ts +16 -3
- package/dist/cells/cell.js +56 -27
- package/dist/column-manager/branch-lookup-context.d.ts +3 -1
- package/dist/column-manager/branch.d.ts +17 -9
- package/dist/column-manager/branch.js +64 -46
- package/dist/column-manager/column-manager.d.ts +57 -8
- package/dist/column-manager/column-manager.js +8 -8
- package/dist/column-manager/context.d.ts +1 -1
- package/dist/column-manager/label.d.ts +10 -2
- package/dist/column-manager/label.js +11 -12
- package/dist/column-manager/leaf.d.ts +10 -2
- package/dist/column-manager/leaf.js +61 -49
- package/dist/column-manager/move-handle.d.ts +14 -6
- package/dist/column-manager/move-handle.js +52 -48
- package/dist/column-manager/panel.d.ts +10 -1
- package/dist/column-manager/root.d.ts +7 -3
- package/dist/column-manager/root.js +4 -1
- package/dist/column-manager/use-column-manager.d.ts +6 -3
- package/dist/column-manager/use-column-manager.js +14 -15
- package/dist/column-manager/use-columns-from-context.d.ts +3 -1
- package/dist/column-manager/use-columns-from-context.js +18 -18
- package/dist/column-manager/visibility-checkbox.d.ts +14 -6
- package/dist/column-manager/visibility-checkbox.js +36 -23
- package/dist/context.d.ts +4 -4
- package/dist/filter-tree/branch.d.ts +16 -5
- package/dist/filter-tree/branch.js +23 -13
- package/dist/filter-tree/context.d.ts +16 -16
- package/dist/filter-tree/filter-tree.d.ts +49 -8
- package/dist/filter-tree/filter-tree.js +8 -8
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +35 -29
- package/dist/filter-tree/hooks/use-filter-tree.js +94 -92
- package/dist/filter-tree/hooks/use-tree-item.d.ts +4 -4
- package/dist/filter-tree/hooks/use-tree-item.js +99 -106
- package/dist/filter-tree/inclusion-checkbox.d.ts +14 -6
- package/dist/filter-tree/inclusion-checkbox.js +19 -9
- package/dist/filter-tree/label.d.ts +10 -2
- package/dist/filter-tree/label.js +11 -12
- package/dist/filter-tree/leaf.d.ts +10 -2
- package/dist/filter-tree/leaf.js +15 -5
- package/dist/filter-tree/root.d.ts +23 -7
- package/dist/filter-tree/root.js +51 -23
- package/dist/grid-box/+types.d.ts +11 -11
- package/dist/grid-box/context.d.ts +3 -3
- package/dist/grid-box/grid-box.d.ts +26 -6
- package/dist/grid-box/grid-box.js +6 -6
- package/dist/grid-box/item.d.ts +13 -5
- package/dist/grid-box/item.js +73 -56
- package/dist/grid-box/panel.d.ts +13 -1
- package/dist/grid-box/panel.js +9 -2
- package/dist/grid-box/root.d.ts +11 -5
- package/dist/grid-box/root.js +11 -2
- package/dist/grid-box/use-aggregation-box-items.d.ts +16 -13
- package/dist/grid-box/use-aggregation-box-items.js +56 -57
- package/dist/grid-box/use-column-box-items.d.ts +33 -23
- package/dist/grid-box/use-column-box-items.js +87 -75
- package/dist/grid-box/use-row-group-box-items.d.ts +17 -12
- package/dist/grid-box/use-row-group-box-items.js +120 -123
- package/dist/grid-provider/context.d.ts +4 -2
- package/dist/grid-provider/provider.d.ts +4 -2
- package/dist/grid-provider/use-grid.d.ts +1 -1
- package/dist/grid.d.ts +126 -14
- package/dist/grid.js +14 -14
- package/dist/header/header-cell.d.ts +13 -5
- package/dist/header/header-cell.js +41 -15
- package/dist/header/header-group-cell.d.ts +10 -2
- package/dist/header/header-group-cell.js +26 -8
- package/dist/header/header-row.d.ts +10 -2
- package/dist/header/header-row.js +2 -2
- package/dist/header/header.d.ts +10 -1
- package/dist/header/header.js +11 -2
- package/dist/header/resize-handler.d.ts +15 -6
- package/dist/header/resize-handler.js +131 -122
- package/dist/header/use-drag-move.d.ts +22 -11
- package/dist/header/use-drag-move.js +95 -94
- package/dist/header/use-header-cell-renderer.d.ts +9 -2
- package/dist/header/use-header-cell-renderer.js +25 -29
- package/dist/icons/index.d.ts +92 -1
- package/dist/icons/index.js +92 -1
- package/dist/index.d.ts +22 -5
- package/dist/index.js +22 -5
- package/dist/license.js +174 -174
- package/dist/listbox/context.d.ts +2 -2
- package/dist/listbox/item.d.ts +10 -1
- package/dist/listbox/item.js +23 -19
- package/dist/listbox/panel.d.ts +10 -1
- package/dist/listbox/panel.js +69 -43
- package/dist/listbox/root.d.ts +5 -3
- package/dist/listbox/root.js +7 -7
- package/dist/root/dialog-driver.js +22 -16
- package/dist/root/popover-driver.js +27 -16
- package/dist/root/root.d.ts +7 -3
- package/dist/root/root.js +111 -107
- package/dist/row-data-source-client/+types.d.ts +17 -17
- package/dist/row-data-source-client/built-ins/avg.js +3 -4
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +16 -16
- package/dist/row-data-source-client/built-ins/built-ins.js +16 -16
- package/dist/row-data-source-client/built-ins/count.js +3 -5
- package/dist/row-data-source-client/built-ins/first.js +1 -1
- package/dist/row-data-source-client/built-ins/group.js +1 -1
- package/dist/row-data-source-client/built-ins/last.js +1 -1
- package/dist/row-data-source-client/built-ins/max.js +9 -13
- package/dist/row-data-source-client/built-ins/min.js +9 -13
- package/dist/row-data-source-client/built-ins/sum.js +8 -10
- package/dist/row-data-source-client/filter/+types.d.ts +35 -13
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +16 -2
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +102 -102
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +8 -4
- package/dist/row-data-source-client/pivots/create-agg-model.js +8 -9
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +6 -1
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +42 -46
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +6 -1
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +16 -17
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +7 -1
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +19 -19
- package/dist/row-data-source-client/tree/client-tree.d.ts +19 -13
- package/dist/row-data-source-client/tree/client-tree.js +64 -67
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +4 -1
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +6 -6
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +4 -1
- package/dist/row-data-source-client/tree/evaluator-group.js +6 -7
- package/dist/row-data-source-client/tree/traverse.d.ts +5 -1
- package/dist/row-data-source-client/tree/traverse.js +15 -18
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +9 -5
- package/dist/row-data-source-client/use-client-data-source-paginated.js +566 -551
- package/dist/row-data-source-client/use-client-data-source.d.ts +9 -5
- package/dist/row-data-source-client/use-client-data-source.js +696 -661
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +9 -5
- package/dist/row-data-source-client/use-client-tree-data-source.js +523 -512
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +36 -33
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +4 -1
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +18 -22
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +4 -1
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +17 -25
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +18 -18
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +9 -10
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +4 -1
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +13 -14
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +9 -10
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +4 -1
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +13 -13
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +4 -1
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +1 -1
- package/dist/row-data-source-server/async-tree/make-async-tree.js +14 -14
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +3 -1
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +6 -6
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +5 -1
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +11 -14
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +4 -1
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +42 -46
- package/dist/row-data-source-server/range-tree/range-tree.d.ts +28 -28
- package/dist/row-data-source-server/range-tree/range-tree.js +49 -48
- package/dist/row-data-source-server/use-server-data-source.d.ts +11 -2
- package/dist/row-data-source-server/use-server-data-source.js +688 -675
- package/dist/row-data-source-server/utils/get-node-depth.js +7 -7
- package/dist/row-data-source-server/utils/get-node-path.js +7 -7
- package/dist/row-data-source-server/utils/get-request-id.js +3 -4
- package/dist/rows/row/context.d.ts +2 -2
- package/dist/rows/row/row.d.ts +16 -3
- package/dist/rows/row/row.js +19 -4
- package/dist/rows/row/use-row-context-value.d.ts +5 -2
- package/dist/rows/row/use-row-context-value.js +23 -26
- package/dist/rows/row-detail-row.d.ts +4 -2
- package/dist/rows/row-detail-row.js +147 -124
- package/dist/rows/row-full-width.d.ts +12 -4
- package/dist/rows/row-full-width.js +35 -7
- package/dist/rows/rows-container.d.ts +10 -1
- package/dist/rows/rows-container.js +12 -3
- package/dist/rows/rows-sections.d.ts +30 -3
- package/dist/rows/rows-sections.js +42 -10
- package/dist/rows/scrollers/native-scroller.d.ts +3 -1
- package/dist/rows/scrollers/native-scroller.js +17 -13
- package/dist/sort-manager/+types.d.ts +14 -7
- package/dist/sort-manager/context.d.ts +4 -4
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +9 -9
- package/dist/sort-manager/hooks/use-sort-manager.js +45 -49
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +57 -46
- package/dist/sort-manager/hooks/use-sort-row-item.js +126 -131
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +6 -3
- package/dist/sort-manager/hooks/use-sortable-column-items.js +10 -10
- package/dist/sort-manager/root.d.ts +7 -1
- package/dist/sort-manager/root.js +10 -10
- package/dist/sort-manager/sort-add.d.ts +13 -5
- package/dist/sort-manager/sort-add.js +8 -8
- package/dist/sort-manager/sort-apply.d.ts +12 -4
- package/dist/sort-manager/sort-apply.js +16 -16
- package/dist/sort-manager/sort-cancel.d.ts +12 -4
- package/dist/sort-manager/sort-cancel.js +19 -19
- package/dist/sort-manager/sort-clear.d.ts +12 -4
- package/dist/sort-manager/sort-clear.js +15 -16
- package/dist/sort-manager/sort-column-select.d.ts +14 -6
- package/dist/sort-manager/sort-column-select.js +22 -14
- package/dist/sort-manager/sort-direction-select.d.ts +14 -6
- package/dist/sort-manager/sort-direction-select.js +27 -19
- package/dist/sort-manager/sort-manager.d.ts +93 -12
- package/dist/sort-manager/sort-manager.js +12 -12
- package/dist/sort-manager/sort-remove.d.ts +12 -4
- package/dist/sort-manager/sort-remove.js +8 -8
- package/dist/sort-manager/sort-row.d.ts +10 -2
- package/dist/sort-manager/sort-row.js +4 -1
- package/dist/sort-manager/sort-rows.d.ts +10 -1
- package/dist/sort-manager/sort-rows.js +1 -1
- package/dist/sort-manager/sort-value-select.d.ts +15 -7
- package/dist/sort-manager/sort-value-select.js +28 -19
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +4 -1
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +46 -49
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +4 -1
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +36 -44
- package/dist/state/+types.d.ts +43 -29
- package/dist/state/api/column-autosize.d.ts +4 -2
- package/dist/state/api/column-autosize.js +62 -63
- package/dist/state/api/column-by-id.js +4 -4
- package/dist/state/api/column-field.js +17 -20
- package/dist/state/api/column-from-index.js +4 -4
- package/dist/state/api/column-group-toggle.js +8 -8
- package/dist/state/api/column-index.js +5 -5
- package/dist/state/api/column-move.js +48 -46
- package/dist/state/api/column-resize.js +9 -7
- package/dist/state/api/column-update.d.ts +4 -2
- package/dist/state/api/column-update.js +23 -23
- package/dist/state/api/dialog-frame.d.ts +8 -4
- package/dist/state/api/dialog-frame.js +11 -12
- package/dist/state/api/edit-begin.d.ts +4 -2
- package/dist/state/api/edit-begin.js +71 -84
- package/dist/state/api/edit-end.d.ts +4 -2
- package/dist/state/api/edit-end.js +38 -41
- package/dist/state/api/edit-is-cell-active.d.ts +4 -2
- package/dist/state/api/edit-is-cell-active.js +17 -24
- package/dist/state/api/edit-update.d.ts +4 -2
- package/dist/state/api/edit-update.js +74 -85
- package/dist/state/api/event-listeners.d.ts +12 -3
- package/dist/state/api/event-listeners.js +16 -17
- package/dist/state/api/export-csv.js +33 -35
- package/dist/state/api/export-data-rect.js +21 -21
- package/dist/state/api/focus-cell.d.ts +4 -2
- package/dist/state/api/focus-cell.js +110 -109
- package/dist/state/api/popover-frame.d.ts +8 -4
- package/dist/state/api/popover-frame.js +11 -12
- package/dist/state/api/position-from-element.js +5 -6
- package/dist/state/api/row-by-id.js +3 -3
- package/dist/state/api/row-by-index.js +11 -6
- package/dist/state/api/row-detail-is-expanded.d.ts +3 -1
- package/dist/state/api/row-detail-is-expanded.js +4 -4
- package/dist/state/api/row-detail-rendered-height.d.ts +4 -2
- package/dist/state/api/row-detail-rendered-height.js +10 -12
- package/dist/state/api/row-detail-toggle.js +26 -30
- package/dist/state/api/row-group-apply-expansions.d.ts +3 -1
- package/dist/state/api/row-group-apply-expansions.js +15 -17
- package/dist/state/api/row-group-column-index.d.ts +3 -1
- package/dist/state/api/row-group-column-index.js +14 -12
- package/dist/state/api/row-group-is-expanded.d.ts +3 -1
- package/dist/state/api/row-group-is-expanded.js +11 -13
- package/dist/state/api/row-group-toggle.js +5 -5
- package/dist/state/api/row-handle-select.d.ts +4 -2
- package/dist/state/api/row-handle-select.js +36 -40
- package/dist/state/api/row-select-all.js +14 -15
- package/dist/state/api/row-select.d.ts +4 -2
- package/dist/state/api/row-select.js +30 -33
- package/dist/state/api/row-selected.js +10 -11
- package/dist/state/api/scroll-into-view.d.ts +4 -2
- package/dist/state/api/scroll-into-view.js +47 -47
- package/dist/state/api/sort-for-column.js +6 -7
- package/dist/state/api/use-row-drag.js +22 -24
- package/dist/state/helpers/cell-row-group.d.ts +5 -1
- package/dist/state/helpers/cell-row-group.js +18 -16
- package/dist/state/helpers/column-add-row-group.d.ts +18 -7
- package/dist/state/helpers/column-add-row-group.js +71 -66
- package/dist/state/helpers/column-layout.d.ts +7 -1
- package/dist/state/helpers/column-layout.js +60 -60
- package/dist/state/helpers/column-marker.d.ts +8 -4
- package/dist/state/helpers/column-marker.js +38 -34
- package/dist/state/helpers/column-view.d.ts +21 -15
- package/dist/state/helpers/column-view.js +56 -32
- package/dist/state/helpers/edit-on-change.d.ts +18 -10
- package/dist/state/helpers/edit-on-change.js +25 -25
- package/dist/state/helpers/empty-row-data-source.js +16 -16
- package/dist/state/helpers/get-data-rect.d.ts +20 -10
- package/dist/state/helpers/get-data-rect.js +67 -62
- package/dist/state/helpers/get-full-width-callback.d.ts +5 -1
- package/dist/state/helpers/get-full-width-callback.js +5 -6
- package/dist/state/helpers/get-span-callback.d.ts +6 -1
- package/dist/state/helpers/get-span-callback.js +15 -18
- package/dist/state/helpers/resolve-column.d.ts +6 -2
- package/dist/state/helpers/resolve-column.js +23 -23
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +15 -12
- package/dist/state/helpers/row-layout/get-focus-criteria.js +57 -56
- package/dist/state/helpers/row-layout/row-layout.d.ts +15 -9
- package/dist/state/helpers/row-layout/row-layout.js +387 -401
- package/dist/state/use-lytenyte.js +567 -528
- package/dist/tree-view/branch/branch.d.ts +19 -11
- package/dist/tree-view/branch/branch.js +106 -54
- package/dist/tree-view/branch/use-branch-keys.d.ts +5 -1
- package/dist/tree-view/branch/use-branch-keys.js +71 -74
- package/dist/tree-view/context.d.ts +21 -17
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +7 -1
- package/dist/tree-view/hooks/use-tree-view-paths.js +5 -5
- package/dist/tree-view/index.d.ts +35 -7
- package/dist/tree-view/index.js +7 -7
- package/dist/tree-view/leaf.d.ts +10 -2
- package/dist/tree-view/leaf.js +30 -21
- package/dist/tree-view/navigation/get-all-ids.js +3 -3
- package/dist/tree-view/navigation/get-first-node.js +3 -3
- package/dist/tree-view/navigation/get-last-node.js +3 -3
- package/dist/tree-view/navigation/get-next-node.js +6 -8
- package/dist/tree-view/navigation/get-prev-node.js +6 -8
- package/dist/tree-view/panel/make-handle-navigation.js +23 -31
- package/dist/tree-view/panel/make-handle-selection.js +68 -77
- package/dist/tree-view/panel/make-handle-typeahead.js +34 -40
- package/dist/tree-view/panel/panel.d.ts +10 -1
- package/dist/tree-view/panel/panel.js +40 -20
- package/dist/tree-view/panel/use-tree-navigation.js +64 -52
- package/dist/tree-view/root.d.ts +20 -14
- package/dist/tree-view/root.js +53 -55
- package/dist/tree-view/utils/get-focusable-nodes.js +4 -2
- package/dist/tree-view/utils/get-focused-node.js +11 -11
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +5 -1
- package/dist/tree-view/utils/get-ids-between-nodes.js +10 -11
- package/dist/tree-view/utils/get-panel.js +5 -5
- package/dist/tree-view/utils/get-parent-node.js +6 -7
- package/dist/tree-view/utils/get-sibling-branches.js +8 -10
- package/dist/tree-view/utils/get-tree-node-id.js +1 -1
- package/dist/tree-view/utils/is-branch-node.js +1 -1
- package/dist/tree-view/utils/is-leaf-node.js +1 -1
- package/dist/tree-view/utils/is-tree-node-disabled.js +1 -1
- package/dist/tree-view/utils/select-node.d.ts +5 -1
- package/dist/tree-view/utils/select-node.js +8 -11
- package/dist/tree-view/utils/toggle-all-selections.js +4 -6
- package/dist/tree-view/utils/toggle-selection.js +15 -18
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +3 -1
- package/dist/tree-view/virtualized/force-sync-scrolling.js +24 -18
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +3 -1
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +11 -12
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +26 -21
- package/dist/tree-view/virtualized/make-virtual-tree.js +79 -85
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +17 -8
- package/dist/tree-view/virtualized/use-flattened-tree.js +30 -31
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +6 -1
- package/dist/tree-view/virtualized/use-row-start-and-end.js +21 -23
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +21 -15
- package/dist/tree-view/virtualized/use-virtualized-tree.js +103 -90
- package/dist/utils/cycle-sorts.js +12 -14
- package/dist/viewport/begin-editing.d.ts +6 -2
- package/dist/viewport/begin-editing.js +9 -13
- package/dist/viewport/viewport.d.ts +10 -1
- package/dist/viewport/viewport.js +93 -70
- package/package.json +7 -7
package/dist/tree-view/root.js
CHANGED
|
@@ -5,59 +5,57 @@ import { useCombinedRefs, useEvent } from "@1771technologies/lytenyte-react-hook
|
|
|
5
5
|
import { getAllIds } from "./navigation/get-all-ids.js";
|
|
6
6
|
import { getIdsBetweenNodes } from "./utils/get-ids-between-nodes.js";
|
|
7
7
|
export const TreeRoot = forwardRef((p, forwarded) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
]);
|
|
62
|
-
return _jsx(context.Provider, { value: value, children: p.children });
|
|
8
|
+
const [panel, setPanel] = useState(null);
|
|
9
|
+
const [expansions, onExpansionChange] = useState({});
|
|
10
|
+
const [selection, setSelections] = useState(() => new Set());
|
|
11
|
+
const ref = useCombinedRefs(setPanel, forwarded);
|
|
12
|
+
const selectionPivotRef = useRef(null);
|
|
13
|
+
const allIds = useEvent((el) => {
|
|
14
|
+
if (p.getAllIds) return p.getAllIds(el);
|
|
15
|
+
return getAllIds(el);
|
|
16
|
+
});
|
|
17
|
+
const idsBetween = useEvent((left, right, panel) => {
|
|
18
|
+
if (p.getIdsBetweenNodes) return p.getIdsBetweenNodes(left, right, panel);
|
|
19
|
+
return getIdsBetweenNodes(left, right, panel);
|
|
20
|
+
});
|
|
21
|
+
const onFocusChange = useEvent((el) => {
|
|
22
|
+
p.onFocusChange?.(el);
|
|
23
|
+
});
|
|
24
|
+
const value = useMemo(() => {
|
|
25
|
+
return {
|
|
26
|
+
panel,
|
|
27
|
+
panelRef: ref,
|
|
28
|
+
selectionMode: p.selectMode ?? "single",
|
|
29
|
+
transitionEnterMs: p.transitionEnter ?? 0,
|
|
30
|
+
transitionExitMs: p.transitionExit ?? 0,
|
|
31
|
+
gridWrappedBranches: p.gridWrappedBranches ?? false,
|
|
32
|
+
expansions: p.expansions ?? expansions,
|
|
33
|
+
onExpansionChange: p.onExpansionChange ?? onExpansionChange,
|
|
34
|
+
selection: p.selection ?? selection,
|
|
35
|
+
onSelectionChange: p.onSelectionChange ?? setSelections,
|
|
36
|
+
selectionPivotRef,
|
|
37
|
+
expansionDefault: p.expansionDefault ?? false,
|
|
38
|
+
onFocusChange,
|
|
39
|
+
getAllIds: allIds,
|
|
40
|
+
getIdsBetweenNodes: idsBetween,
|
|
41
|
+
};
|
|
42
|
+
}, [
|
|
43
|
+
allIds,
|
|
44
|
+
expansions,
|
|
45
|
+
idsBetween,
|
|
46
|
+
onFocusChange,
|
|
47
|
+
p.expansionDefault,
|
|
48
|
+
p.expansions,
|
|
49
|
+
p.gridWrappedBranches,
|
|
50
|
+
p.onExpansionChange,
|
|
51
|
+
p.onSelectionChange,
|
|
52
|
+
p.selectMode,
|
|
53
|
+
p.selection,
|
|
54
|
+
p.transitionEnter,
|
|
55
|
+
p.transitionExit,
|
|
56
|
+
panel,
|
|
57
|
+
ref,
|
|
58
|
+
selection,
|
|
59
|
+
]);
|
|
60
|
+
return _jsx(context.Provider, { value: value, children: p.children });
|
|
63
61
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { getFocusables, isHTMLElement } from "@1771technologies/lytenyte-dom-utils";
|
|
2
2
|
export function getFocusableNodes(panel) {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const focusNodes = getFocusables(panel).filter(
|
|
4
|
+
(c) => isHTMLElement(c) && c.getAttribute("data-ln-tree-node") === "true",
|
|
5
|
+
);
|
|
6
|
+
return focusNodes;
|
|
5
7
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { isLastTraversableNode } from "@1771technologies/lytenyte-dom-utils";
|
|
2
2
|
export function getFocusedNode() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
if (!document.activeElement) return null;
|
|
4
|
+
let current = document.activeElement;
|
|
5
|
+
while (
|
|
6
|
+
current &&
|
|
7
|
+
!isLastTraversableNode(current) &&
|
|
8
|
+
current.getAttribute("data-ln-tree-node") !== "true"
|
|
9
|
+
) {
|
|
10
|
+
current = current.parentElement;
|
|
11
|
+
}
|
|
12
|
+
if (current?.getAttribute("data-ln-tree-node")) return current;
|
|
13
|
+
return null;
|
|
14
14
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { getFocusableNodes } from "./get-focusable-nodes.js";
|
|
2
2
|
import { getTreeNodeId } from "./get-tree-node-id.js";
|
|
3
3
|
export function getIdsBetweenNodes(start, end, panel) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return ids;
|
|
4
|
+
const focusables = getFocusableNodes(panel);
|
|
5
|
+
let startIndex = focusables.indexOf(start);
|
|
6
|
+
let endIndex = focusables.indexOf(end);
|
|
7
|
+
if (startIndex == -1 || endIndex == -1) return [];
|
|
8
|
+
[startIndex, endIndex] = [Math.min(startIndex, endIndex), Math.max(startIndex, endIndex)];
|
|
9
|
+
const ids = [];
|
|
10
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
11
|
+
ids.push(getTreeNodeId(focusables[i]));
|
|
12
|
+
}
|
|
13
|
+
return ids;
|
|
15
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function getPanel(el) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
let current = el;
|
|
3
|
+
while (current && !current.getAttribute("data-ln-tree-panel")) {
|
|
4
|
+
current = current.parentElement;
|
|
5
|
+
}
|
|
6
|
+
return current;
|
|
7
7
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { isBranchNode } from "./is-branch-node.js";
|
|
2
2
|
export function getParentNode(el) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return current;
|
|
3
|
+
let current = el.parentElement;
|
|
4
|
+
while (current && !current.getAttribute("data-ln-tree-panel") && !isBranchNode(current)) {
|
|
5
|
+
current = current.parentElement;
|
|
6
|
+
}
|
|
7
|
+
if (current?.getAttribute("data-ln-tree-panel")) return null;
|
|
8
|
+
return current;
|
|
10
9
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { isHTMLElement } from "@1771technologies/lytenyte-dom-utils";
|
|
2
2
|
import { isBranchNode } from "./is-branch-node.js";
|
|
3
3
|
export function getSiblingBranches(el) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
return branchSiblings;
|
|
4
|
+
const children = el.parentElement?.children;
|
|
5
|
+
if (!children) return;
|
|
6
|
+
const branchSiblings = [];
|
|
7
|
+
for (let i = 0; i < children.length; i++) {
|
|
8
|
+
const node = children[i];
|
|
9
|
+
if (isHTMLElement(node) && isBranchNode(node)) branchSiblings.push(node);
|
|
10
|
+
}
|
|
11
|
+
return branchSiblings;
|
|
14
12
|
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { TreeViewRootContext } from "../context.js";
|
|
2
|
-
export declare function selectNode(
|
|
2
|
+
export declare function selectNode(
|
|
3
|
+
node: HTMLElement | null | undefined,
|
|
4
|
+
ctx: TreeViewRootContext,
|
|
5
|
+
focus?: boolean,
|
|
6
|
+
): void;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { getTreeNodeId } from "./get-tree-node-id.js";
|
|
2
2
|
import { isTreeNodeDisabled } from "./is-tree-node-disabled.js";
|
|
3
3
|
export function selectNode(node, ctx, focus) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const next = new Set(ctx.selection);
|
|
13
|
-
next.add(id);
|
|
14
|
-
ctx.onSelectionChange(next);
|
|
4
|
+
if (!node || isTreeNodeDisabled(node)) return;
|
|
5
|
+
if (focus) node.focus();
|
|
6
|
+
const id = getTreeNodeId(node);
|
|
7
|
+
if (ctx.selection.has(id)) return;
|
|
8
|
+
ctx.selectionPivotRef.current = id;
|
|
9
|
+
const next = new Set(ctx.selection);
|
|
10
|
+
next.add(id);
|
|
11
|
+
ctx.onSelectionChange(next);
|
|
15
12
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { getAllIds } from "../navigation/get-all-ids.js";
|
|
2
2
|
export function toggleAllSelections(ctx) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
else
|
|
8
|
-
ctx.onSelectionChange(allIds);
|
|
3
|
+
const allIds = getAllIds(ctx.panel);
|
|
4
|
+
const selection = ctx.selection;
|
|
5
|
+
if (allIds.isSubsetOf(selection)) ctx.onSelectionChange(new Set());
|
|
6
|
+
else ctx.onSelectionChange(allIds);
|
|
9
7
|
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { getTreeNodeId } from "./get-tree-node-id.js";
|
|
2
2
|
export function toggleSelection(el, ctx) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
ctx.selectionPivotRef.current = id;
|
|
19
|
-
}
|
|
20
|
-
ctx.onSelectionChange(next);
|
|
3
|
+
const id = getTreeNodeId(el);
|
|
4
|
+
if (ctx.selectionMode === "single") {
|
|
5
|
+
if (ctx.selection.has(id)) ctx.onSelectionChange(new Set());
|
|
6
|
+
else ctx.onSelectionChange(new Set([id]));
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const next = new Set(ctx.selection);
|
|
10
|
+
if (next.has(id)) {
|
|
11
|
+
next.delete(id);
|
|
12
|
+
ctx.selectionPivotRef.current = null;
|
|
13
|
+
} else {
|
|
14
|
+
next.add(id);
|
|
15
|
+
ctx.selectionPivotRef.current = id;
|
|
16
|
+
}
|
|
17
|
+
ctx.onSelectionChange(next);
|
|
21
18
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
|
-
export declare function ForceSyncScrolling(
|
|
2
|
+
export declare function ForceSyncScrolling(
|
|
3
|
+
props: PropsWithChildren,
|
|
4
|
+
): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,22 +2,28 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { useTreeRoot } from "../context.js";
|
|
4
4
|
export function ForceSyncScrolling(props) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
const [scroll, setScroll] = useState(0);
|
|
6
|
+
const ctx = useTreeRoot();
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (!ctx.panel) return;
|
|
9
|
+
const controller = new AbortController();
|
|
10
|
+
ctx.panel.addEventListener(
|
|
11
|
+
"scroll",
|
|
12
|
+
() => {
|
|
13
|
+
setScroll(Math.max(0, ctx.panel.scrollTop));
|
|
14
|
+
},
|
|
15
|
+
{ signal: controller.signal },
|
|
16
|
+
);
|
|
17
|
+
return () => controller.abort();
|
|
18
|
+
}, [ctx.panel]);
|
|
19
|
+
return _jsx("div", {
|
|
20
|
+
style: {
|
|
21
|
+
position: "sticky",
|
|
22
|
+
top: 0,
|
|
23
|
+
height: 0,
|
|
24
|
+
width: "100%",
|
|
25
|
+
transform: `translate3d(0px, -${scroll}px, 0px)`,
|
|
26
|
+
},
|
|
27
|
+
children: props.children,
|
|
28
|
+
});
|
|
23
29
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { PathBranch, PathLeaf, PathProvidedItem } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
export declare function buildVirtualTreePartial<T extends PathProvidedItem>(
|
|
2
|
+
export declare function buildVirtualTreePartial<T extends PathProvidedItem>(
|
|
3
|
+
items: (PathBranch<T> | PathLeaf<T>)[],
|
|
4
|
+
): [string[], PathBranch<T> | PathLeaf<T>][];
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
export function buildVirtualTreePartial(items) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return paths;
|
|
2
|
+
const paths = items.map((c) => {
|
|
3
|
+
if (c.kind === "leaf") {
|
|
4
|
+
const parent = c.parent;
|
|
5
|
+
if (parent.kind === "root") return ["", c];
|
|
6
|
+
const path = parent.id.split("#");
|
|
7
|
+
return [path, c];
|
|
8
|
+
}
|
|
9
|
+
const path = c.id.split("#");
|
|
10
|
+
return [path, c];
|
|
11
|
+
});
|
|
12
|
+
return paths;
|
|
14
13
|
}
|
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
import type { PathBranch, PathLeaf, PathProvidedItem } from "@1771technologies/lytenyte-shared";
|
|
2
2
|
import type { CSSProperties } from "react";
|
|
3
3
|
export interface TreeVirtualBranch<T extends PathProvidedItem> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
readonly kind: "branch";
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly branch: PathBranch<T>;
|
|
7
|
+
readonly children: TreeVirtualItem<T>[];
|
|
8
|
+
readonly rowIndex: number;
|
|
9
|
+
readonly attrs: {
|
|
10
|
+
readonly style: CSSProperties;
|
|
11
|
+
"data-ln-row-index": number;
|
|
12
|
+
readonly "aria-posinset": number;
|
|
13
|
+
readonly "aria-setsize": number;
|
|
14
|
+
};
|
|
15
15
|
}
|
|
16
16
|
export interface TreeVirtualLeaf<T extends PathProvidedItem> {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
readonly kind: "leaf";
|
|
18
|
+
readonly leaf: PathLeaf<T>;
|
|
19
|
+
readonly rowIndex: number;
|
|
20
|
+
readonly attrs: {
|
|
21
|
+
readonly style: CSSProperties;
|
|
22
|
+
"data-ln-row-index": number;
|
|
23
|
+
readonly "aria-posinset": number;
|
|
24
|
+
readonly "aria-setsize": number;
|
|
25
|
+
};
|
|
26
26
|
}
|
|
27
27
|
export type TreeVirtualItem<T extends PathProvidedItem> = TreeVirtualBranch<T> | TreeVirtualLeaf<T>;
|
|
28
28
|
type Path = string[];
|
|
29
29
|
type PathEntry<T extends PathProvidedItem> = [Path | "", PathBranch<T> | PathLeaf<T>];
|
|
30
|
-
export declare function makeVirtualTree<T extends PathProvidedItem>(
|
|
30
|
+
export declare function makeVirtualTree<T extends PathProvidedItem>(
|
|
31
|
+
paths: PathEntry<T>[],
|
|
32
|
+
nodeToIndex: Map<PathBranch<T> | PathLeaf<T>, number>,
|
|
33
|
+
itemHeight: number,
|
|
34
|
+
nonAdjacentPathTrees: boolean,
|
|
35
|
+
): TreeVirtualItem<T>[];
|
|
31
36
|
export {};
|