@1771technologies/lytenyte-pro 1.0.0-beta.12 → 1.0.0-beta.14
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 +3969 -4155
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +38 -38
- package/dist/cell-selection/are-rects-equal.js +4 -6
- package/dist/cell-selection/bound-selection-rect.js +14 -14
- package/dist/cell-selection/cell-selection-containers.js +78 -108
- package/dist/cell-selection/cell-selection-driver.js +262 -250
- package/dist/cell-selection/cell-style-row.d.ts +6 -12
- package/dist/cell-selection/cell-style-row.js +79 -82
- package/dist/cell-selection/deselect-rect-range.js +40 -41
- package/dist/cell-selection/expand-cell-selection-down.d.ts +2 -5
- package/dist/cell-selection/expand-cell-selection-down.js +33 -29
- package/dist/cell-selection/expand-cell-selection-end.d.ts +2 -5
- package/dist/cell-selection/expand-cell-selection-end.js +34 -30
- package/dist/cell-selection/expand-cell-selection-start.d.ts +2 -5
- package/dist/cell-selection/expand-cell-selection-start.js +33 -29
- package/dist/cell-selection/expand-cell-selection-up.d.ts +2 -5
- package/dist/cell-selection/expand-cell-selection-up.js +33 -29
- package/dist/cell-selection/full-width-start-end-index.js +3 -3
- package/dist/cell-selection/get-root-cell.d.ts +1 -5
- package/dist/cell-selection/get-root-cell.js +79 -77
- package/dist/cell-selection/is-bottom-rect.js +5 -5
- package/dist/cell-selection/is-center-col-rect.d.ts +2 -5
- package/dist/cell-selection/is-center-col-rect.js +3 -5
- package/dist/cell-selection/is-center-rect.js +3 -3
- package/dist/cell-selection/is-end-rect.d.ts +2 -5
- package/dist/cell-selection/is-end-rect.js +2 -2
- package/dist/cell-selection/is-overlapping-rect.js +4 -6
- package/dist/cell-selection/is-start-rect.d.ts +2 -5
- 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 +6 -12
- package/dist/cell-selection/split-cell-selection-rect.js +47 -53
- package/dist/cell-selection/update-additive-cell-selection.d.ts +2 -5
- package/dist/cell-selection/update-additive-cell-selection.js +19 -18
- package/dist/cell-selection/use-edge-scroll.d.ts +6 -8
- package/dist/cell-selection/use-edge-scroll.js +63 -65
- package/dist/cells/cell-default.d.ts +1 -5
- package/dist/cells/cell-default.js +5 -5
- package/dist/cells/cell-editor.d.ts +2 -4
- package/dist/cells/cell-editor.js +86 -121
- package/dist/cells/cell.d.ts +3 -16
- package/dist/cells/cell.js +27 -56
- package/dist/column-manager/branch-lookup-context.d.ts +1 -3
- package/dist/column-manager/branch.d.ts +4 -12
- package/dist/column-manager/branch.js +43 -40
- package/dist/column-manager/column-manager.d.ts +9 -58
- package/dist/column-manager/column-manager.js +9 -9
- package/dist/column-manager/context.d.ts +1 -1
- package/dist/column-manager/label.d.ts +2 -10
- package/dist/column-manager/label.js +13 -12
- package/dist/column-manager/leaf.d.ts +2 -10
- package/dist/column-manager/leaf.js +49 -43
- package/dist/column-manager/move-handle.d.ts +6 -14
- package/dist/column-manager/move-handle.js +50 -54
- package/dist/column-manager/root.d.ts +3 -9
- package/dist/column-manager/root.js +13 -26
- package/dist/column-manager/use-column-manager.d.ts +16 -12
- package/dist/column-manager/use-column-manager.js +21 -21
- package/dist/column-manager/use-columns-from-context.js +18 -18
- package/dist/column-manager/visibility-checkbox.d.ts +6 -14
- package/dist/column-manager/visibility-checkbox.js +23 -36
- package/dist/context.d.ts +4 -4
- package/dist/filter-tree/branch.d.ts +5 -13
- package/dist/filter-tree/branch.js +13 -23
- package/dist/filter-tree/context.d.ts +16 -16
- package/dist/filter-tree/filter-tree.d.ts +8 -49
- package/dist/filter-tree/filter-tree.js +8 -8
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +29 -35
- package/dist/filter-tree/hooks/use-filter-tree.js +92 -94
- package/dist/filter-tree/hooks/use-tree-item.d.ts +4 -4
- package/dist/filter-tree/hooks/use-tree-item.js +106 -99
- package/dist/filter-tree/inclusion-checkbox.d.ts +6 -14
- package/dist/filter-tree/inclusion-checkbox.js +9 -19
- package/dist/filter-tree/label.d.ts +2 -10
- package/dist/filter-tree/label.js +13 -12
- package/dist/filter-tree/leaf.d.ts +2 -10
- package/dist/filter-tree/leaf.js +5 -15
- package/dist/filter-tree/root.d.ts +7 -23
- package/dist/filter-tree/root.js +23 -51
- package/dist/grid-box/+types.d.ts +11 -9
- package/dist/grid-box/context.d.ts +3 -3
- package/dist/grid-box/grid-box.d.ts +6 -26
- package/dist/grid-box/grid-box.js +6 -6
- package/dist/grid-box/item.d.ts +6 -11
- package/dist/grid-box/item.js +51 -31
- package/dist/grid-box/panel.d.ts +1 -13
- package/dist/grid-box/panel.js +2 -9
- package/dist/grid-box/root.d.ts +5 -11
- package/dist/grid-box/root.js +2 -11
- package/dist/grid-box/use-aggregation-box-items.d.ts +13 -16
- package/dist/grid-box/use-aggregation-box-items.js +57 -54
- package/dist/grid-box/use-column-box-items.d.ts +25 -31
- package/dist/grid-box/use-column-box-items.js +80 -90
- package/dist/grid-box/use-row-group-box-items.d.ts +12 -17
- package/dist/grid-box/use-row-group-box-items.js +128 -116
- package/dist/grid-provider/context.d.ts +2 -4
- package/dist/grid-provider/provider.d.ts +2 -4
- package/dist/grid-provider/use-grid.d.ts +1 -1
- package/dist/grid.d.ts +26 -150
- package/dist/grid.js +26 -38
- package/dist/header/header-cell.d.ts +5 -13
- package/dist/header/header-cell.js +15 -41
- package/dist/header/header-group-cell.d.ts +2 -10
- package/dist/header/header-group-cell.js +6 -21
- package/dist/header/header-row.d.ts +2 -10
- package/dist/header/header-row.js +2 -2
- package/dist/header/header.d.ts +1 -10
- package/dist/header/header.js +2 -11
- package/dist/header/resize-handler.d.ts +6 -15
- package/dist/header/resize-handler.js +122 -128
- package/dist/header/use-drag-move.d.ts +11 -22
- package/dist/header/use-drag-move.js +87 -83
- package/dist/header/use-header-cell-renderer.d.ts +2 -9
- package/dist/header/use-header-cell-renderer.js +29 -24
- package/dist/icons/index.d.ts +1 -92
- package/dist/icons/index.js +1 -92
- package/dist/license.js +174 -174
- package/dist/listbox/context.d.ts +2 -2
- package/dist/listbox/item.d.ts +1 -10
- package/dist/listbox/item.js +19 -23
- package/dist/listbox/panel.d.ts +1 -10
- package/dist/listbox/panel.js +43 -69
- package/dist/listbox/root.d.ts +3 -5
- package/dist/listbox/root.js +7 -7
- package/dist/root/dialog-driver.js +16 -22
- package/dist/root/popover-driver.js +16 -27
- package/dist/root/root.d.ts +3 -7
- package/dist/root/root.js +107 -111
- package/dist/row-data-source-client/+types.d.ts +17 -17
- package/dist/row-data-source-client/built-ins/avg.js +4 -3
- 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 +5 -3
- 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 +13 -9
- package/dist/row-data-source-client/built-ins/min.js +13 -9
- package/dist/row-data-source-client/built-ins/sum.js +10 -8
- package/dist/row-data-source-client/filter/+types.d.ts +13 -35
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +2 -16
- 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 +4 -8
- package/dist/row-data-source-client/pivots/create-agg-model.js +9 -8
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +1 -6
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +46 -42
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +1 -6
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +17 -16
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +1 -7
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +19 -19
- package/dist/row-data-source-client/tree/client-tree.d.ts +13 -19
- package/dist/row-data-source-client/tree/client-tree.js +67 -64
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +1 -4
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +6 -6
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +1 -4
- package/dist/row-data-source-client/tree/evaluator-group.js +7 -6
- package/dist/row-data-source-client/tree/traverse.d.ts +1 -5
- package/dist/row-data-source-client/tree/traverse.js +18 -15
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +5 -9
- package/dist/row-data-source-client/use-client-data-source-paginated.js +535 -539
- package/dist/row-data-source-client/use-client-data-source.d.ts +5 -9
- package/dist/row-data-source-client/use-client-data-source.js +660 -682
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +5 -9
- package/dist/row-data-source-client/use-client-tree-data-source.js +512 -510
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +33 -36
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +1 -4
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +22 -18
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +1 -4
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +25 -17
- 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 +10 -9
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +1 -4
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +14 -13
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +10 -9
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +1 -4
- 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 +1 -4
- 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 +1 -3
- 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 +1 -5
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +14 -11
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +1 -4
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +46 -42
- 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 +48 -49
- package/dist/row-data-source-server/use-server-data-source.d.ts +2 -11
- package/dist/row-data-source-server/use-server-data-source.js +652 -665
- 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 +4 -3
- package/dist/rows/row/context.d.ts +2 -2
- package/dist/rows/row/row.d.ts +3 -16
- package/dist/rows/row/row.js +4 -19
- package/dist/rows/row/use-row-context-value.d.ts +2 -5
- package/dist/rows/row/use-row-context-value.js +26 -23
- package/dist/rows/row-detail-row.d.ts +2 -4
- package/dist/rows/row-detail-row.js +124 -147
- package/dist/rows/row-full-width.d.ts +4 -12
- package/dist/rows/row-full-width.js +7 -35
- package/dist/rows/rows-container.d.ts +1 -10
- package/dist/rows/rows-container.js +3 -12
- package/dist/rows/rows-sections.d.ts +3 -30
- package/dist/rows/rows-sections.js +10 -42
- package/dist/rows/scrollers/native-scroller.d.ts +1 -3
- package/dist/rows/scrollers/native-scroller.js +13 -17
- package/dist/sort-manager/+types.d.ts +7 -14
- 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 +49 -45
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +46 -57
- package/dist/sort-manager/hooks/use-sort-row-item.js +131 -126
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +3 -6
- package/dist/sort-manager/hooks/use-sortable-column-items.js +10 -10
- package/dist/sort-manager/root.d.ts +1 -7
- package/dist/sort-manager/root.js +10 -10
- package/dist/sort-manager/sort-add.d.ts +5 -13
- package/dist/sort-manager/sort-add.js +9 -9
- package/dist/sort-manager/sort-apply.d.ts +4 -12
- package/dist/sort-manager/sort-apply.js +17 -17
- package/dist/sort-manager/sort-cancel.d.ts +4 -12
- package/dist/sort-manager/sort-cancel.js +20 -20
- package/dist/sort-manager/sort-clear.d.ts +4 -12
- package/dist/sort-manager/sort-clear.js +17 -16
- package/dist/sort-manager/sort-column-select.d.ts +6 -14
- package/dist/sort-manager/sort-column-select.js +15 -26
- package/dist/sort-manager/sort-direction-select.d.ts +6 -14
- package/dist/sort-manager/sort-direction-select.js +19 -27
- package/dist/sort-manager/sort-manager.d.ts +12 -93
- package/dist/sort-manager/sort-manager.js +12 -12
- package/dist/sort-manager/sort-remove.d.ts +4 -12
- package/dist/sort-manager/sort-remove.js +9 -9
- package/dist/sort-manager/sort-row.d.ts +2 -10
- package/dist/sort-manager/sort-row.js +1 -4
- package/dist/sort-manager/sort-rows.d.ts +1 -10
- package/dist/sort-manager/sort-rows.js +1 -1
- package/dist/sort-manager/sort-value-select.d.ts +7 -15
- package/dist/sort-manager/sort-value-select.js +20 -29
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +1 -4
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +49 -46
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +1 -4
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +44 -36
- package/dist/state/+types.d.ts +29 -41
- package/dist/state/api/column-autosize.d.ts +2 -4
- package/dist/state/api/column-autosize.js +63 -62
- package/dist/state/api/column-by-id.js +4 -4
- package/dist/state/api/column-field.js +20 -17
- 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 +46 -48
- package/dist/state/api/column-resize.js +7 -9
- package/dist/state/api/column-update.d.ts +4 -1
- package/dist/state/api/column-update.js +24 -11
- package/dist/state/api/dialog-frame.d.ts +4 -8
- package/dist/state/api/dialog-frame.js +12 -11
- package/dist/state/api/edit-begin.d.ts +2 -4
- package/dist/state/api/edit-begin.js +84 -71
- package/dist/state/api/edit-end.d.ts +2 -4
- package/dist/state/api/edit-end.js +41 -38
- package/dist/state/api/edit-is-cell-active.d.ts +2 -4
- package/dist/state/api/edit-is-cell-active.js +24 -17
- package/dist/state/api/edit-update.d.ts +2 -4
- package/dist/state/api/edit-update.js +85 -74
- package/dist/state/api/event-listeners.d.ts +3 -12
- package/dist/state/api/event-listeners.js +17 -16
- package/dist/state/api/export-csv.js +35 -33
- package/dist/state/api/export-data-rect.js +21 -21
- package/dist/state/api/focus-cell.d.ts +2 -4
- package/dist/state/api/focus-cell.js +109 -110
- package/dist/state/api/popover-frame.d.ts +4 -8
- package/dist/state/api/popover-frame.js +12 -11
- package/dist/state/api/position-from-element.js +6 -5
- package/dist/state/api/row-by-id.js +3 -3
- package/dist/state/api/row-by-index.js +6 -11
- package/dist/state/api/row-detail-is-expanded.d.ts +1 -3
- package/dist/state/api/row-detail-is-expanded.js +4 -4
- package/dist/state/api/row-detail-rendered-height.d.ts +2 -4
- package/dist/state/api/row-detail-rendered-height.js +12 -10
- package/dist/state/api/row-detail-toggle.js +30 -26
- package/dist/state/api/row-group-apply-expansions.d.ts +1 -3
- package/dist/state/api/row-group-apply-expansions.js +17 -15
- package/dist/state/api/row-group-column-index.d.ts +1 -3
- package/dist/state/api/row-group-column-index.js +12 -14
- package/dist/state/api/row-group-is-expanded.d.ts +1 -3
- package/dist/state/api/row-group-is-expanded.js +13 -11
- package/dist/state/api/row-group-toggle.js +5 -5
- package/dist/state/api/row-handle-select.d.ts +2 -4
- package/dist/state/api/row-handle-select.js +40 -36
- package/dist/state/api/row-select-all.js +15 -14
- package/dist/state/api/row-select.d.ts +2 -4
- package/dist/state/api/row-select.js +33 -30
- package/dist/state/api/row-selected.js +11 -10
- package/dist/state/api/scroll-into-view.d.ts +2 -4
- package/dist/state/api/scroll-into-view.js +47 -47
- package/dist/state/api/sort-for-column.js +7 -6
- package/dist/state/api/use-row-drag.js +24 -22
- package/dist/state/helpers/cell-row-group.d.ts +1 -5
- package/dist/state/helpers/cell-row-group.js +16 -18
- package/dist/state/helpers/column-add-row-group.d.ts +7 -16
- package/dist/state/helpers/column-add-row-group.js +65 -63
- package/dist/state/helpers/column-layout.d.ts +1 -7
- package/dist/state/helpers/column-layout.js +60 -60
- package/dist/state/helpers/column-marker.d.ts +4 -8
- package/dist/state/helpers/column-marker.js +34 -38
- package/dist/state/helpers/column-view.d.ts +15 -21
- package/dist/state/helpers/column-view.js +32 -56
- package/dist/state/helpers/edit-on-change.d.ts +10 -18
- package/dist/state/helpers/edit-on-change.js +24 -24
- package/dist/state/helpers/empty-row-data-source.js +16 -16
- package/dist/state/helpers/get-data-rect.d.ts +10 -20
- package/dist/state/helpers/get-data-rect.js +62 -67
- package/dist/state/helpers/get-full-width-callback.d.ts +1 -5
- package/dist/state/helpers/get-full-width-callback.js +6 -5
- package/dist/state/helpers/get-span-callback.d.ts +1 -6
- package/dist/state/helpers/get-span-callback.js +18 -15
- package/dist/state/helpers/resolve-column.d.ts +2 -6
- package/dist/state/helpers/resolve-column.js +18 -18
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +12 -15
- package/dist/state/helpers/row-layout/get-focus-criteria.js +56 -57
- package/dist/state/helpers/row-layout/row-layout.d.ts +9 -15
- package/dist/state/helpers/row-layout/row-layout.js +401 -387
- package/dist/state/use-lytenyte.js +521 -556
- package/dist/tree-view/branch/branch.d.ts +8 -16
- package/dist/tree-view/branch/branch.js +52 -104
- package/dist/tree-view/branch/use-branch-keys.d.ts +1 -5
- package/dist/tree-view/branch/use-branch-keys.js +74 -71
- package/dist/tree-view/context.d.ts +17 -21
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +1 -6
- package/dist/tree-view/hooks/use-tree-view-paths.js +5 -5
- package/dist/tree-view/index.d.ts +7 -35
- package/dist/tree-view/index.js +7 -7
- package/dist/tree-view/leaf.d.ts +2 -10
- package/dist/tree-view/leaf.js +20 -29
- 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 +8 -6
- package/dist/tree-view/navigation/get-prev-node.js +8 -6
- package/dist/tree-view/panel/make-handle-navigation.js +31 -23
- package/dist/tree-view/panel/make-handle-selection.js +77 -68
- package/dist/tree-view/panel/make-handle-typeahead.js +40 -34
- package/dist/tree-view/panel/panel.d.ts +1 -10
- package/dist/tree-view/panel/panel.js +20 -40
- package/dist/tree-view/panel/use-tree-navigation.js +52 -64
- package/dist/tree-view/root.d.ts +14 -20
- package/dist/tree-view/root.js +55 -53
- package/dist/tree-view/utils/get-focusable-nodes.js +2 -4
- package/dist/tree-view/utils/get-focused-node.js +11 -11
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +1 -5
- package/dist/tree-view/utils/get-ids-between-nodes.js +11 -10
- package/dist/tree-view/utils/get-panel.js +5 -5
- package/dist/tree-view/utils/get-parent-node.js +7 -6
- package/dist/tree-view/utils/get-sibling-branches.js +10 -8
- 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 +1 -5
- package/dist/tree-view/utils/select-node.js +11 -8
- package/dist/tree-view/utils/toggle-all-selections.js +6 -4
- package/dist/tree-view/utils/toggle-selection.js +18 -15
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +1 -3
- package/dist/tree-view/virtualized/force-sync-scrolling.js +18 -24
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +1 -3
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +12 -11
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +21 -26
- package/dist/tree-view/virtualized/make-virtual-tree.js +85 -79
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +8 -17
- package/dist/tree-view/virtualized/use-flattened-tree.js +31 -30
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +1 -6
- package/dist/tree-view/virtualized/use-row-start-and-end.js +23 -21
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +15 -21
- package/dist/tree-view/virtualized/use-virtualized-tree.js +90 -103
- package/dist/utils/cycle-sorts.js +14 -12
- package/dist/viewport/begin-editing.d.ts +2 -6
- package/dist/viewport/begin-editing.js +13 -9
- package/dist/viewport/viewport.d.ts +1 -10
- package/dist/viewport/viewport.js +70 -93
- package/package.json +7 -7
|
@@ -2,86 +2,83 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useGridRoot } from "../context";
|
|
4
4
|
import { getTranslate, sizeFromCoord } from "@1771technologies/lytenyte-shared";
|
|
5
|
-
export function CellStyleRow({ rect, isRowPinnedTop, isDeselect, isRowPinnedBottom, isPivot }) {
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"data-ln-cell-selection-rect": true,
|
|
84
|
-
"data-ln-cell-selection-is-deselect": isDeselect,
|
|
85
|
-
"data-ln-cell-selection-is-pivot": isPivot,
|
|
86
|
-
});
|
|
5
|
+
export function CellStyleRow({ rect, isRowPinnedTop, isDeselect, isRowPinnedBottom, isPivot, }) {
|
|
6
|
+
const cx = useGridRoot();
|
|
7
|
+
const xPositions = cx.grid.state.xPositions.useValue();
|
|
8
|
+
const yPositions = cx.grid.state.yPositions.useValue();
|
|
9
|
+
const rtl = cx.grid.state.rtl.useValue();
|
|
10
|
+
const meta = cx.grid.state.columnMeta.useValue();
|
|
11
|
+
const startCount = meta.columnVisibleStartCount;
|
|
12
|
+
const centerCount = meta.columnVisibleCenterCount;
|
|
13
|
+
const ds = cx.grid.state.rowDataStore;
|
|
14
|
+
const rowCount = ds.rowCount.useValue();
|
|
15
|
+
const rowTopCount = ds.rowTopCount.useValue();
|
|
16
|
+
const rowBotCount = ds.rowBottomCount.useValue();
|
|
17
|
+
const vpWidth = cx.grid.state.viewportWidthInner.useValue();
|
|
18
|
+
const style = useMemo(() => {
|
|
19
|
+
const isStart = rect.columnStart < startCount;
|
|
20
|
+
const isEnd = rect.columnStart >= startCount + centerCount;
|
|
21
|
+
const isTop = isRowPinnedTop;
|
|
22
|
+
const isBot = isRowPinnedBottom;
|
|
23
|
+
const columnIndex = rect.columnStart;
|
|
24
|
+
const rowIndex = rect.rowStart;
|
|
25
|
+
const width = sizeFromCoord(rect.columnStart, xPositions, rect.columnEnd - rect.columnStart);
|
|
26
|
+
const height = sizeFromCoord(rect.rowStart, yPositions, rect.rowEnd - rect.rowStart);
|
|
27
|
+
const firstBotIndex = rowCount - rowBotCount;
|
|
28
|
+
const x = isEnd
|
|
29
|
+
? xPositions[columnIndex] - xPositions.at(-1) + vpWidth
|
|
30
|
+
: xPositions[columnIndex];
|
|
31
|
+
let y;
|
|
32
|
+
if (isBot)
|
|
33
|
+
y = yPositions[rowIndex] - yPositions[firstBotIndex];
|
|
34
|
+
else if (isTop)
|
|
35
|
+
y = yPositions[rowIndex] - yPositions[rowTopCount];
|
|
36
|
+
else {
|
|
37
|
+
y = `calc(${yPositions[rowIndex] - yPositions[rowTopCount]}px - var(--ln-y-offset, 0px))`;
|
|
38
|
+
}
|
|
39
|
+
const transform = getTranslate(x * (rtl ? -1 : 1), y);
|
|
40
|
+
const pinnedRow = isTop || isBot;
|
|
41
|
+
const pinnedCell = isStart || isEnd;
|
|
42
|
+
const style = {
|
|
43
|
+
height,
|
|
44
|
+
width,
|
|
45
|
+
transform,
|
|
46
|
+
position: "absolute",
|
|
47
|
+
pointerEvents: "none",
|
|
48
|
+
top: 0,
|
|
49
|
+
zIndex: 1,
|
|
50
|
+
gridRowStart: "1",
|
|
51
|
+
gridRowEnd: "2",
|
|
52
|
+
gridColumnStart: "1",
|
|
53
|
+
gridColumnEnd: "2",
|
|
54
|
+
};
|
|
55
|
+
if (pinnedCell) {
|
|
56
|
+
style.insetInlineStart = "0px";
|
|
57
|
+
style.position = "sticky";
|
|
58
|
+
style.zIndex = pinnedRow ? 6 : 3;
|
|
59
|
+
}
|
|
60
|
+
if (pinnedRow) {
|
|
61
|
+
style.position = "sticky";
|
|
62
|
+
style.top = "0px";
|
|
63
|
+
style.zIndex = pinnedCell ? 6 : 3;
|
|
64
|
+
}
|
|
65
|
+
return style;
|
|
66
|
+
}, [
|
|
67
|
+
centerCount,
|
|
68
|
+
isRowPinnedBottom,
|
|
69
|
+
isRowPinnedTop,
|
|
70
|
+
rect.columnEnd,
|
|
71
|
+
rect.columnStart,
|
|
72
|
+
rect.rowEnd,
|
|
73
|
+
rect.rowStart,
|
|
74
|
+
rowBotCount,
|
|
75
|
+
rowCount,
|
|
76
|
+
rowTopCount,
|
|
77
|
+
rtl,
|
|
78
|
+
startCount,
|
|
79
|
+
vpWidth,
|
|
80
|
+
xPositions,
|
|
81
|
+
yPositions,
|
|
82
|
+
]);
|
|
83
|
+
return (_jsx("div", { style: style, "data-ln-cell-selection-rect": true, "data-ln-cell-selection-is-deselect": isDeselect, "data-ln-cell-selection-is-pivot": isPivot }));
|
|
87
84
|
}
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
import { isOverlappingRect } from "./is-overlapping-rect.js";
|
|
2
2
|
export function deselectRectRange(rect, deselectRect) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
(rect) => !(rect.rowStart >= rect.rowEnd || rect.columnStart >= rect.columnEnd)
|
|
43
|
-
);
|
|
3
|
+
if (!isOverlappingRect(rect, deselectRect))
|
|
4
|
+
return [rect];
|
|
5
|
+
const result = [];
|
|
6
|
+
// Check for top split
|
|
7
|
+
if (deselectRect.rowStart > rect.rowStart) {
|
|
8
|
+
result.push({
|
|
9
|
+
rowStart: rect.rowStart,
|
|
10
|
+
rowEnd: deselectRect.rowStart,
|
|
11
|
+
columnStart: rect.columnStart,
|
|
12
|
+
columnEnd: rect.columnEnd,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
// Check for bottom split
|
|
16
|
+
if (deselectRect.rowEnd < rect.rowEnd) {
|
|
17
|
+
result.push({
|
|
18
|
+
rowStart: deselectRect.rowEnd,
|
|
19
|
+
rowEnd: rect.rowEnd,
|
|
20
|
+
columnStart: rect.columnStart,
|
|
21
|
+
columnEnd: rect.columnEnd,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// Check for left split
|
|
25
|
+
if (deselectRect.columnStart > rect.columnStart) {
|
|
26
|
+
result.push({
|
|
27
|
+
rowStart: Math.max(deselectRect.rowStart, rect.rowStart),
|
|
28
|
+
rowEnd: Math.min(deselectRect.rowEnd, rect.rowEnd),
|
|
29
|
+
columnStart: rect.columnStart,
|
|
30
|
+
columnEnd: deselectRect.columnStart,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// Check for right split
|
|
34
|
+
if (deselectRect.columnEnd < rect.columnEnd) {
|
|
35
|
+
result.push({
|
|
36
|
+
rowStart: Math.max(deselectRect.rowStart, rect.rowStart),
|
|
37
|
+
rowEnd: Math.min(deselectRect.rowEnd, rect.rowEnd),
|
|
38
|
+
columnStart: deselectRect.columnEnd,
|
|
39
|
+
columnEnd: rect.columnEnd,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return result.filter((rect) => !(rect.rowStart >= rect.rowEnd || rect.columnStart >= rect.columnEnd));
|
|
44
43
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { Grid } from "../+types.js";
|
|
2
2
|
import type { InternalAtoms } from "../state/+types.js";
|
|
3
|
-
export declare function expandCellSelectionDown(
|
|
4
|
-
grid: Grid<any> & {
|
|
3
|
+
export declare function expandCellSelectionDown(grid: Grid<any> & {
|
|
5
4
|
internal: InternalAtoms;
|
|
6
|
-
|
|
7
|
-
meta: boolean,
|
|
8
|
-
): void;
|
|
5
|
+
}, meta: boolean): void;
|
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionDown(grid, meta) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
const cellSelections = grid.state.cellSelections.get();
|
|
4
|
+
const rect = cellSelections.at(-1);
|
|
5
|
+
const pivot = grid.internal.cellSelectionPivot.get();
|
|
6
|
+
if (!rect || !pivot)
|
|
7
|
+
return;
|
|
8
|
+
if (meta) {
|
|
9
|
+
const rowCount = grid.state.rowDataStore.rowCount.get();
|
|
10
|
+
if (pivot.rowStart === rowCount - 1)
|
|
11
|
+
return;
|
|
12
|
+
const next = { ...rect, rowStart: pivot.rowStart, rowEnd: rowCount };
|
|
13
|
+
const nextSelections = [...cellSelections];
|
|
14
|
+
nextSelections[nextSelections.length - 1] = next;
|
|
15
|
+
grid.state.cellSelections.set(nextSelections);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let next;
|
|
19
|
+
let focusRow;
|
|
20
|
+
if (rect.rowStart < pivot.rowStart) {
|
|
21
|
+
let rowOffset = 1;
|
|
22
|
+
for (let i = rect.columnStart; i < rect.columnEnd; i++) {
|
|
23
|
+
const cell = getRootCell(grid, rect.rowStart, i);
|
|
24
|
+
if (cell)
|
|
25
|
+
rowOffset = Math.max(rowOffset, cell.rowSpan);
|
|
26
|
+
}
|
|
27
|
+
focusRow = rect.rowStart + rowOffset;
|
|
28
|
+
next = { ...rect, rowStart: focusRow };
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
focusRow = rect.rowEnd + 1;
|
|
32
|
+
next = { ...rect, rowEnd: focusRow };
|
|
33
|
+
focusRow -= 1;
|
|
34
|
+
}
|
|
35
|
+
grid.api.scrollIntoView({ row: focusRow });
|
|
11
36
|
const nextSelections = [...cellSelections];
|
|
12
37
|
nextSelections[nextSelections.length - 1] = next;
|
|
13
38
|
grid.state.cellSelections.set(nextSelections);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
let next;
|
|
17
|
-
let focusRow;
|
|
18
|
-
if (rect.rowStart < pivot.rowStart) {
|
|
19
|
-
let rowOffset = 1;
|
|
20
|
-
for (let i = rect.columnStart; i < rect.columnEnd; i++) {
|
|
21
|
-
const cell = getRootCell(grid, rect.rowStart, i);
|
|
22
|
-
if (cell) rowOffset = Math.max(rowOffset, cell.rowSpan);
|
|
23
|
-
}
|
|
24
|
-
focusRow = rect.rowStart + rowOffset;
|
|
25
|
-
next = { ...rect, rowStart: focusRow };
|
|
26
|
-
} else {
|
|
27
|
-
focusRow = rect.rowEnd + 1;
|
|
28
|
-
next = { ...rect, rowEnd: focusRow };
|
|
29
|
-
focusRow -= 1;
|
|
30
|
-
}
|
|
31
|
-
grid.api.scrollIntoView({ row: focusRow });
|
|
32
|
-
const nextSelections = [...cellSelections];
|
|
33
|
-
nextSelections[nextSelections.length - 1] = next;
|
|
34
|
-
grid.state.cellSelections.set(nextSelections);
|
|
35
39
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { Grid } from "../+types.js";
|
|
2
2
|
import type { InternalAtoms } from "../state/+types.js";
|
|
3
|
-
export declare function expandCellSelectionEnd(
|
|
4
|
-
grid: Grid<any> & {
|
|
3
|
+
export declare function expandCellSelectionEnd(grid: Grid<any> & {
|
|
5
4
|
internal: InternalAtoms;
|
|
6
|
-
|
|
7
|
-
meta: boolean,
|
|
8
|
-
): void;
|
|
5
|
+
}, meta: boolean): void;
|
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionEnd(grid, meta) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
const selections = grid.state.cellSelections.get();
|
|
4
|
+
const cellSelectionPivot = grid.internal.cellSelectionPivot.get();
|
|
5
|
+
const rect = selections.at(-1);
|
|
6
|
+
const pivot = cellSelectionPivot;
|
|
7
|
+
if (!rect || !pivot)
|
|
8
|
+
return;
|
|
9
|
+
if (meta) {
|
|
10
|
+
const colCount = grid.state.columnMeta.get().columnsVisible.length;
|
|
11
|
+
if (pivot.columnStart === colCount - 1)
|
|
12
|
+
return;
|
|
13
|
+
const next = { ...rect, columnStart: pivot.columnStart, columnEnd: colCount };
|
|
14
|
+
const nextSelections = [...selections];
|
|
15
|
+
nextSelections[nextSelections.length - 1] = next;
|
|
16
|
+
grid.state.cellSelections.set(nextSelections);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let next;
|
|
20
|
+
let focusColumn;
|
|
21
|
+
if (rect.columnStart < pivot.columnStart) {
|
|
22
|
+
let colOffset = 1;
|
|
23
|
+
for (let i = rect.rowStart; i < rect.rowEnd; i++) {
|
|
24
|
+
const cell = getRootCell(grid, i, rect.columnStart);
|
|
25
|
+
if (cell)
|
|
26
|
+
colOffset = Math.max(colOffset, cell.colSpan);
|
|
27
|
+
}
|
|
28
|
+
focusColumn = rect.columnStart + colOffset;
|
|
29
|
+
next = { ...rect, columnStart: focusColumn };
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
focusColumn = rect.columnEnd + 1;
|
|
33
|
+
next = { ...rect, columnEnd: focusColumn };
|
|
34
|
+
focusColumn -= 1;
|
|
35
|
+
}
|
|
36
|
+
grid.api.scrollIntoView({ column: focusColumn });
|
|
12
37
|
const nextSelections = [...selections];
|
|
13
38
|
nextSelections[nextSelections.length - 1] = next;
|
|
14
39
|
grid.state.cellSelections.set(nextSelections);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
let next;
|
|
18
|
-
let focusColumn;
|
|
19
|
-
if (rect.columnStart < pivot.columnStart) {
|
|
20
|
-
let colOffset = 1;
|
|
21
|
-
for (let i = rect.rowStart; i < rect.rowEnd; i++) {
|
|
22
|
-
const cell = getRootCell(grid, i, rect.columnStart);
|
|
23
|
-
if (cell) colOffset = Math.max(colOffset, cell.colSpan);
|
|
24
|
-
}
|
|
25
|
-
focusColumn = rect.columnStart + colOffset;
|
|
26
|
-
next = { ...rect, columnStart: focusColumn };
|
|
27
|
-
} else {
|
|
28
|
-
focusColumn = rect.columnEnd + 1;
|
|
29
|
-
next = { ...rect, columnEnd: focusColumn };
|
|
30
|
-
focusColumn -= 1;
|
|
31
|
-
}
|
|
32
|
-
grid.api.scrollIntoView({ column: focusColumn });
|
|
33
|
-
const nextSelections = [...selections];
|
|
34
|
-
nextSelections[nextSelections.length - 1] = next;
|
|
35
|
-
grid.state.cellSelections.set(nextSelections);
|
|
36
40
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { InternalAtoms } from "../state/+types.js";
|
|
2
2
|
import type { Grid } from "../+types.js";
|
|
3
|
-
export declare function expandCellSelectionStart(
|
|
4
|
-
grid: Grid<any> & {
|
|
3
|
+
export declare function expandCellSelectionStart(grid: Grid<any> & {
|
|
5
4
|
internal: InternalAtoms;
|
|
6
|
-
|
|
7
|
-
meta: boolean,
|
|
8
|
-
): void;
|
|
5
|
+
}, meta: boolean): void;
|
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionStart(grid, meta) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
|
|
3
|
+
const selections = grid.state.cellSelections.get();
|
|
4
|
+
const cellSelectionPivot = grid.internal.cellSelectionPivot.get();
|
|
5
|
+
const rect = selections.at(-1);
|
|
6
|
+
const pivot = cellSelectionPivot;
|
|
7
|
+
if (!rect || !pivot)
|
|
8
|
+
return;
|
|
9
|
+
if (meta) {
|
|
10
|
+
if (pivot.columnStart === 0)
|
|
11
|
+
return;
|
|
12
|
+
const next = { ...rect, columnStart: 0, columnEnd: pivot.columnEnd };
|
|
13
|
+
const nextSelections = [...selections];
|
|
14
|
+
nextSelections[nextSelections.length - 1] = next;
|
|
15
|
+
grid.state.cellSelections.set(nextSelections);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let next;
|
|
19
|
+
let focusColumn;
|
|
20
|
+
if (rect.columnEnd > pivot.columnEnd) {
|
|
21
|
+
let colOffset = 1;
|
|
22
|
+
for (let i = rect.rowStart; i < rect.rowEnd; i++) {
|
|
23
|
+
const cell = getRootCell(grid, i, rect.columnEnd - 1);
|
|
24
|
+
if (cell)
|
|
25
|
+
colOffset = Math.max(colOffset, cell.colSpan);
|
|
26
|
+
}
|
|
27
|
+
focusColumn = rect.columnEnd - colOffset;
|
|
28
|
+
next = { ...rect, columnEnd: focusColumn };
|
|
29
|
+
focusColumn -= 1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
focusColumn = rect.columnStart - 1;
|
|
33
|
+
next = { ...rect, columnStart: focusColumn };
|
|
34
|
+
}
|
|
35
|
+
grid.api.scrollIntoView({ column: focusColumn });
|
|
11
36
|
const nextSelections = [...selections];
|
|
12
37
|
nextSelections[nextSelections.length - 1] = next;
|
|
13
38
|
grid.state.cellSelections.set(nextSelections);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
let next;
|
|
17
|
-
let focusColumn;
|
|
18
|
-
if (rect.columnEnd > pivot.columnEnd) {
|
|
19
|
-
let colOffset = 1;
|
|
20
|
-
for (let i = rect.rowStart; i < rect.rowEnd; i++) {
|
|
21
|
-
const cell = getRootCell(grid, i, rect.columnEnd - 1);
|
|
22
|
-
if (cell) colOffset = Math.max(colOffset, cell.colSpan);
|
|
23
|
-
}
|
|
24
|
-
focusColumn = rect.columnEnd - colOffset;
|
|
25
|
-
next = { ...rect, columnEnd: focusColumn };
|
|
26
|
-
focusColumn -= 1;
|
|
27
|
-
} else {
|
|
28
|
-
focusColumn = rect.columnStart - 1;
|
|
29
|
-
next = { ...rect, columnStart: focusColumn };
|
|
30
|
-
}
|
|
31
|
-
grid.api.scrollIntoView({ column: focusColumn });
|
|
32
|
-
const nextSelections = [...selections];
|
|
33
|
-
nextSelections[nextSelections.length - 1] = next;
|
|
34
|
-
grid.state.cellSelections.set(nextSelections);
|
|
35
39
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { InternalAtoms } from "../state/+types.js";
|
|
2
2
|
import type { Grid } from "../+types.js";
|
|
3
|
-
export declare function expandCellSelectionUp(
|
|
4
|
-
grid: Grid<any> & {
|
|
3
|
+
export declare function expandCellSelectionUp(grid: Grid<any> & {
|
|
5
4
|
internal: InternalAtoms;
|
|
6
|
-
|
|
7
|
-
meta: boolean,
|
|
8
|
-
): void;
|
|
5
|
+
}, meta: boolean): void;
|
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionUp(grid, meta) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
|
|
3
|
+
const selections = grid.state.cellSelections.get();
|
|
4
|
+
const cellSelectionPivot = grid.internal.cellSelectionPivot.get();
|
|
5
|
+
const rect = selections.at(-1);
|
|
6
|
+
const pivot = cellSelectionPivot;
|
|
7
|
+
if (!rect || !pivot)
|
|
8
|
+
return;
|
|
9
|
+
if (meta) {
|
|
10
|
+
if (pivot.rowStart === 0)
|
|
11
|
+
return;
|
|
12
|
+
const next = { ...rect, rowEnd: pivot.rowEnd, rowStart: 0 };
|
|
13
|
+
const nextSelections = [...selections];
|
|
14
|
+
nextSelections[nextSelections.length - 1] = next;
|
|
15
|
+
grid.state.cellSelections.set(nextSelections);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let next;
|
|
19
|
+
let focusRow;
|
|
20
|
+
if (rect.rowEnd > pivot.rowEnd) {
|
|
21
|
+
let rowOffset = 1;
|
|
22
|
+
for (let i = rect.columnStart; i < rect.columnEnd; i++) {
|
|
23
|
+
const cell = getRootCell(grid, rect.rowEnd - 1, i);
|
|
24
|
+
if (cell)
|
|
25
|
+
rowOffset = Math.max(rowOffset, cell.rowSpan);
|
|
26
|
+
}
|
|
27
|
+
focusRow = rect.rowEnd - rowOffset;
|
|
28
|
+
next = { ...rect, rowEnd: focusRow };
|
|
29
|
+
focusRow -= 1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
focusRow = rect.rowStart - 1;
|
|
33
|
+
next = { ...rect, rowStart: focusRow };
|
|
34
|
+
}
|
|
35
|
+
grid.api.scrollIntoView({ row: focusRow });
|
|
11
36
|
const nextSelections = [...selections];
|
|
12
37
|
nextSelections[nextSelections.length - 1] = next;
|
|
13
38
|
grid.state.cellSelections.set(nextSelections);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
let next;
|
|
17
|
-
let focusRow;
|
|
18
|
-
if (rect.rowEnd > pivot.rowEnd) {
|
|
19
|
-
let rowOffset = 1;
|
|
20
|
-
for (let i = rect.columnStart; i < rect.columnEnd; i++) {
|
|
21
|
-
const cell = getRootCell(grid, rect.rowEnd - 1, i);
|
|
22
|
-
if (cell) rowOffset = Math.max(rowOffset, cell.rowSpan);
|
|
23
|
-
}
|
|
24
|
-
focusRow = rect.rowEnd - rowOffset;
|
|
25
|
-
next = { ...rect, rowEnd: focusRow };
|
|
26
|
-
focusRow -= 1;
|
|
27
|
-
} else {
|
|
28
|
-
focusRow = rect.rowStart - 1;
|
|
29
|
-
next = { ...rect, rowStart: focusRow };
|
|
30
|
-
}
|
|
31
|
-
grid.api.scrollIntoView({ row: focusRow });
|
|
32
|
-
const nextSelections = [...selections];
|
|
33
|
-
nextSelections[nextSelections.length - 1] = next;
|
|
34
|
-
grid.state.cellSelections.set(nextSelections);
|
|
35
39
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function fullWidthStartEndIndex(grid) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const meta = grid.state.columnMeta.get();
|
|
3
|
+
const lastIndex = meta.columnsVisible.length;
|
|
4
|
+
return [0, lastIndex];
|
|
5
5
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import type { Grid, PositionGridCell } from "../+types.js";
|
|
2
|
-
export declare const getRootCell: (
|
|
3
|
-
grid: Grid<any>,
|
|
4
|
-
rowIndex: number,
|
|
5
|
-
columnIndex: number,
|
|
6
|
-
) => PositionGridCell["root"];
|
|
2
|
+
export declare const getRootCell: (grid: Grid<any>, rowIndex: number, columnIndex: number) => PositionGridCell["root"];
|