@1771technologies/lytenyte-pro 1.0.0-beta.0 → 1.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/+types.d.ts +4135 -3940
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +1 -1
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +39 -39
- package/dist/cell-selection/are-rects-equal.d.ts +1 -1
- package/dist/cell-selection/are-rects-equal.js +6 -4
- package/dist/cell-selection/bound-selection-rect.d.ts +1 -1
- 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 -254
- 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.d.ts +1 -1
- package/dist/cell-selection/deselect-rect-range.js +42 -41
- package/dist/cell-selection/expand-cell-selection-down.d.ts +7 -4
- package/dist/cell-selection/expand-cell-selection-down.js +30 -34
- package/dist/cell-selection/expand-cell-selection-end.d.ts +7 -4
- package/dist/cell-selection/expand-cell-selection-end.js +31 -35
- package/dist/cell-selection/expand-cell-selection-start.d.ts +7 -4
- package/dist/cell-selection/expand-cell-selection-start.js +30 -34
- package/dist/cell-selection/expand-cell-selection-up.d.ts +7 -4
- package/dist/cell-selection/expand-cell-selection-up.js +30 -34
- package/dist/cell-selection/full-width-start-end-index.d.ts +1 -1
- package/dist/cell-selection/full-width-start-end-index.js +3 -3
- package/dist/cell-selection/get-root-cell.d.ts +6 -2
- package/dist/cell-selection/get-root-cell.js +79 -81
- package/dist/cell-selection/is-bottom-rect.d.ts +1 -1
- package/dist/cell-selection/is-bottom-rect.js +5 -5
- package/dist/cell-selection/is-center-col-rect.d.ts +6 -3
- package/dist/cell-selection/is-center-col-rect.js +5 -3
- package/dist/cell-selection/is-center-rect.d.ts +1 -1
- package/dist/cell-selection/is-center-rect.js +3 -3
- package/dist/cell-selection/is-end-rect.d.ts +6 -3
- package/dist/cell-selection/is-end-rect.js +2 -2
- package/dist/cell-selection/is-overlapping-rect.d.ts +1 -1
- package/dist/cell-selection/is-overlapping-rect.js +6 -4
- package/dist/cell-selection/is-start-rect.d.ts +6 -3
- package/dist/cell-selection/is-start-rect.js +2 -2
- package/dist/cell-selection/is-top-rect.d.ts +1 -1
- package/dist/cell-selection/is-top-rect.js +2 -2
- package/dist/cell-selection/is-within-selection-rect.d.ts +1 -1
- package/dist/cell-selection/is-within-selection-rect.js +1 -1
- package/dist/cell-selection/split-cell-selection-rect.d.ts +13 -7
- package/dist/cell-selection/split-cell-selection-rect.js +53 -47
- package/dist/cell-selection/update-additive-cell-selection.d.ts +7 -4
- package/dist/cell-selection/update-additive-cell-selection.js +22 -23
- package/dist/cell-selection/use-edge-scroll.d.ts +10 -8
- 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 +121 -86
- package/dist/cells/cell.d.ts +16 -3
- package/dist/cells/cell.js +55 -26
- package/dist/column-manager/branch-lookup-context.d.ts +3 -1
- package/dist/column-manager/branch.d.ts +12 -4
- package/dist/column-manager/branch.js +39 -29
- package/dist/column-manager/column-manager.d.ts +58 -9
- 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 +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 +42 -32
- package/dist/column-manager/move-handle.d.ts +14 -6
- package/dist/column-manager/move-handle.js +54 -50
- package/dist/column-manager/root.d.ts +9 -3
- package/dist/column-manager/root.js +26 -13
- package/dist/column-manager/use-column-manager.d.ts +14 -14
- package/dist/column-manager/use-column-manager.js +21 -21
- package/dist/column-manager/use-columns-from-context.d.ts +2 -2
- package/dist/column-manager/use-columns-from-context.js +19 -19
- 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 +13 -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 +53 -12
- package/dist/filter-tree/filter-tree.js +16 -16
- 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 +6 -6
- package/dist/filter-tree/hooks/use-tree-item.js +101 -108
- 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 +10 -10
- package/dist/grid-box/context.d.ts +4 -4
- 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 +11 -3
- package/dist/grid-box/item.js +29 -26
- 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 +18 -15
- package/dist/grid-box/use-aggregation-box-items.js +54 -55
- package/dist/grid-box/use-column-box-items.d.ts +33 -23
- package/dist/grid-box/use-column-box-items.js +90 -78
- package/dist/grid-box/use-row-group-box-items.d.ts +19 -14
- package/dist/grid-box/use-row-group-box-items.js +116 -124
- package/dist/grid-provider/context.d.ts +6 -4
- package/dist/grid-provider/provider.d.ts +5 -3
- package/dist/grid-provider/provider.js +1 -1
- package/dist/grid-provider/use-grid.d.ts +2 -2
- package/dist/grid-provider/use-grid.js +1 -1
- package/dist/grid.d.ts +150 -25
- package/dist/grid.js +39 -25
- 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 +21 -6
- 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 +128 -117
- package/dist/header/use-drag-move.d.ts +23 -12
- package/dist/header/use-drag-move.js +83 -87
- package/dist/header/use-header-cell-renderer.d.ts +9 -2
- package/dist/header/use-header-cell-renderer.js +24 -29
- package/dist/icons/index.d.ts +92 -0
- package/dist/icons/index.js +92 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- 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 +17 -17
- package/dist/row-data-source-client/built-ins/built-ins.js +17 -17
- 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 +18 -19
- 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 +5 -2
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +6 -6
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +5 -2
- package/dist/row-data-source-client/tree/evaluator-group.js +6 -7
- package/dist/row-data-source-client/tree/traverse.d.ts +6 -2
- package/dist/row-data-source-client/tree/traverse.js +16 -19
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +11 -7
- package/dist/row-data-source-client/use-client-data-source-paginated.js +528 -512
- package/dist/row-data-source-client/use-client-data-source.d.ts +11 -7
- package/dist/row-data-source-client/use-client-data-source.js +673 -639
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +10 -6
- package/dist/row-data-source-client/use-client-tree-data-source.js +499 -489
- 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 +19 -23
- 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 +17 -17
- 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 +12 -3
- package/dist/row-data-source-server/use-server-data-source.js +667 -654
- 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 +7 -7
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +10 -10
- package/dist/sort-manager/hooks/use-sort-manager.js +47 -51
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +58 -47
- package/dist/sort-manager/hooks/use-sort-row-item.js +127 -132
- 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 +26 -15
- 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 +5 -2
- 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 +5 -2
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +36 -44
- package/dist/state/+types.d.ts +41 -28
- package/dist/state/api/column-autosize.d.ts +5 -3
- package/dist/state/api/column-autosize.js +63 -64
- 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 +49 -47
- package/dist/state/api/column-resize.js +9 -7
- package/dist/state/api/column-update.js +11 -11
- package/dist/state/api/dialog-frame.d.ts +9 -5
- package/dist/state/api/dialog-frame.js +11 -12
- package/dist/state/api/edit-begin.d.ts +5 -3
- package/dist/state/api/edit-begin.js +72 -85
- package/dist/state/api/edit-end.d.ts +5 -3
- package/dist/state/api/edit-end.js +38 -41
- package/dist/state/api/edit-is-cell-active.d.ts +5 -3
- package/dist/state/api/edit-is-cell-active.js +17 -24
- package/dist/state/api/edit-update.d.ts +5 -3
- package/dist/state/api/edit-update.js +75 -86
- 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 +34 -36
- package/dist/state/api/export-data-rect.js +22 -22
- package/dist/state/api/focus-cell.d.ts +5 -3
- package/dist/state/api/focus-cell.js +110 -109
- package/dist/state/api/popover-frame.d.ts +10 -6
- 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 +6 -4
- 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 +16 -6
- package/dist/state/helpers/column-add-row-group.js +63 -58
- 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 +24 -24
- package/dist/state/helpers/empty-row-data-source.js +15 -15
- 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 +18 -18
- 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 +556 -516
- package/dist/tree-view/branch/branch.d.ts +16 -8
- package/dist/tree-view/branch/branch.js +104 -52
- 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 +6 -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 +29 -20
- 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 +15 -9
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { getDataRect } from "../helpers/get-data-rect";
|
|
1
|
+
import { getDataRect } from "../helpers/get-data-rect.js";
|
|
2
2
|
export const makeExportDataRect = (grid) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
return (p) => {
|
|
4
|
+
const s = grid.state;
|
|
5
|
+
const rowCount = s.rowDataStore.rowCount.get();
|
|
6
|
+
const visible = s.columnMeta.get().columnsVisible;
|
|
7
|
+
const rowStart = p?.dataRect?.rowStart ?? 0;
|
|
8
|
+
const rowEnd = p?.dataRect?.rowEnd ?? rowCount;
|
|
9
|
+
const columnStart = p?.dataRect?.columnStart ?? 0;
|
|
10
|
+
const columnEnd = p?.dataRect?.columnEnd ?? visible.length;
|
|
11
|
+
const rows = [];
|
|
12
|
+
for (let i = rowStart; i < rowEnd; i++) {
|
|
13
|
+
rows.push(grid.api.rowByIndex(i) ?? null);
|
|
14
|
+
}
|
|
15
|
+
return getDataRect({
|
|
16
|
+
rows,
|
|
17
|
+
visible,
|
|
18
|
+
columnField: grid.api.columnField,
|
|
19
|
+
uniformGroupHeaders: p?.uniformGroupHeaders,
|
|
20
|
+
columnEnd,
|
|
21
|
+
columnStart,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
24
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Grid, GridApi } from "../../+types";
|
|
2
|
-
import type { InternalAtoms } from "../+types";
|
|
3
|
-
export declare const makeFocusCell: (
|
|
2
|
+
import type { InternalAtoms } from "../+types.js";
|
|
3
|
+
export declare const makeFocusCell: (
|
|
4
|
+
grid: Grid<any> & {
|
|
4
5
|
internal: InternalAtoms;
|
|
5
|
-
}
|
|
6
|
+
},
|
|
7
|
+
) => GridApi<any>["focusCell"];
|
|
@@ -1,117 +1,118 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
focusCell,
|
|
3
|
+
getHeaderRows,
|
|
4
|
+
handleNavigationKeys,
|
|
5
|
+
isColumnFloatingHeader,
|
|
6
|
+
} from "@1771technologies/lytenyte-shared";
|
|
2
7
|
import { clamp } from "@1771technologies/lytenyte-js-utils";
|
|
3
8
|
export const makeFocusCell = (grid) => {
|
|
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
|
-
|
|
9
|
+
return (position) => {
|
|
10
|
+
const vp = grid.state.viewport.get();
|
|
11
|
+
if (!vp) return false;
|
|
12
|
+
if (typeof position === "string") {
|
|
13
|
+
let key = "";
|
|
14
|
+
if (position === "up") key = "ArrowUp";
|
|
15
|
+
else if (position === "down") key = "ArrowDown";
|
|
16
|
+
else if (position === "next") key = grid.state.rtl.get() ? "ArrowLeft" : "ArrowRight";
|
|
17
|
+
else if (position === "prev") key = grid.state.rtl.get() ? "ArrowRight" : "ArrowLeft";
|
|
18
|
+
if (!key) return false;
|
|
19
|
+
const ds = grid.state.rowDataStore;
|
|
20
|
+
handleNavigationKeys(
|
|
21
|
+
{
|
|
22
|
+
key,
|
|
23
|
+
ctrlKey: false,
|
|
24
|
+
metaKey: false,
|
|
25
|
+
preventDefault: () => {},
|
|
26
|
+
stopPropagation: () => {},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
vp,
|
|
30
|
+
rowCount: ds.rowCount.get(),
|
|
31
|
+
topCount: ds.rowTopCount.get(),
|
|
32
|
+
centerCount: ds.rowCenterCount.get(),
|
|
33
|
+
columnCount: grid.state.columnMeta.get().columnsVisible.length,
|
|
34
|
+
focusActive: grid.internal.focusActive,
|
|
35
|
+
id: grid.state.gridId.get(),
|
|
36
|
+
layout: grid.internal.layout.get(),
|
|
37
|
+
rtl: grid.state.rtl.get(),
|
|
38
|
+
scrollIntoView: grid.api.scrollIntoView,
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
if ("kind" in position) {
|
|
44
|
+
if (position.kind === "header-cell") {
|
|
45
|
+
grid.api.scrollIntoView({ column: position.colIndex });
|
|
46
|
+
const run = () => {
|
|
47
|
+
const header = getHeaderRows(vp);
|
|
48
|
+
if (!header) return false;
|
|
49
|
+
for (const row of header) {
|
|
50
|
+
const cell = row.querySelector(
|
|
51
|
+
`[data-ln-header-cell][data-ln-colindex="${position.colIndex}"]`,
|
|
52
|
+
);
|
|
53
|
+
if (!cell) continue;
|
|
54
|
+
if (isColumnFloatingHeader(cell)) continue;
|
|
55
|
+
cell.focus();
|
|
39
56
|
return true;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return false;
|
|
48
|
-
for (const row of header) {
|
|
49
|
-
const cell = row.querySelector(`[data-ln-header-cell][data-ln-colindex="${position.colIndex}"]`);
|
|
50
|
-
if (!cell)
|
|
51
|
-
continue;
|
|
52
|
-
if (isColumnFloatingHeader(cell))
|
|
53
|
-
continue;
|
|
54
|
-
cell.focus();
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
};
|
|
59
|
-
if (!run()) {
|
|
60
|
-
setTimeout(() => {
|
|
61
|
-
if (!run()) {
|
|
62
|
-
setTimeout(() => run(), 20);
|
|
63
|
-
}
|
|
64
|
-
}, 8);
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
else if (position.kind === "header-group-cell") {
|
|
69
|
-
grid.api.scrollIntoView({ column: position.colIndex });
|
|
70
|
-
const run = () => {
|
|
71
|
-
const header = getHeaderRows(vp);
|
|
72
|
-
if (!header)
|
|
73
|
-
return false;
|
|
74
|
-
const row = header[position.hierarchyRowIndex];
|
|
75
|
-
if (!row)
|
|
76
|
-
return false;
|
|
77
|
-
const headers = Array.from(row.querySelectorAll("[data-ln-header-range]"));
|
|
78
|
-
const match = headers.find((c) => {
|
|
79
|
-
const [colStartStr, colEndStr] = c.getAttribute("data-ln-header-range").split(",");
|
|
80
|
-
const colStart = Number.parseInt(colStartStr);
|
|
81
|
-
const colEnd = Number.parseInt(colEndStr);
|
|
82
|
-
return colStart <= position.colIndex && position.colIndex < colEnd;
|
|
83
|
-
});
|
|
84
|
-
if (match) {
|
|
85
|
-
match.focus();
|
|
86
|
-
grid.internal.focusActive.set((prev) => ({ ...prev, colIndex }));
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
return false;
|
|
90
|
-
};
|
|
91
|
-
if (!run()) {
|
|
92
|
-
setTimeout(() => {
|
|
93
|
-
if (!run()) {
|
|
94
|
-
setTimeout(() => run(), 20);
|
|
95
|
-
}
|
|
96
|
-
}, 8);
|
|
97
|
-
}
|
|
98
|
-
return true;
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
};
|
|
60
|
+
if (!run()) {
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
if (!run()) {
|
|
63
|
+
setTimeout(() => run(), 20);
|
|
99
64
|
}
|
|
100
|
-
|
|
101
|
-
|
|
65
|
+
}, 8);
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
} else if (position.kind === "header-group-cell") {
|
|
69
|
+
grid.api.scrollIntoView({ column: position.colIndex });
|
|
70
|
+
const run = () => {
|
|
71
|
+
const header = getHeaderRows(vp);
|
|
72
|
+
if (!header) return false;
|
|
73
|
+
const row = header[position.hierarchyRowIndex];
|
|
74
|
+
if (!row) return false;
|
|
75
|
+
const headers = Array.from(row.querySelectorAll("[data-ln-header-range]"));
|
|
76
|
+
const match = headers.find((c) => {
|
|
77
|
+
const [colStartStr, colEndStr] = c.getAttribute("data-ln-header-range").split(",");
|
|
78
|
+
const colStart = Number.parseInt(colStartStr);
|
|
79
|
+
const colEnd = Number.parseInt(colEndStr);
|
|
80
|
+
return colStart <= position.colIndex && position.colIndex < colEnd;
|
|
81
|
+
});
|
|
82
|
+
if (match) {
|
|
83
|
+
match.focus();
|
|
84
|
+
grid.internal.focusActive.set((prev) => ({ ...prev, colIndex }));
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
};
|
|
89
|
+
if (!run()) {
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
if (!run()) {
|
|
92
|
+
setTimeout(() => run(), 20);
|
|
102
93
|
}
|
|
94
|
+
}, 8);
|
|
103
95
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
focusCell({
|
|
107
|
-
colIndex,
|
|
108
|
-
rowIndex: position.row,
|
|
109
|
-
focusActive: grid.internal.focusActive,
|
|
110
|
-
id: grid.state.gridId.get(),
|
|
111
|
-
layout: grid.internal.layout.get(),
|
|
112
|
-
scrollIntoView: grid.api.scrollIntoView,
|
|
113
|
-
vp,
|
|
114
|
-
});
|
|
96
|
+
return true;
|
|
97
|
+
} else {
|
|
115
98
|
return false;
|
|
116
|
-
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const columnCount = grid.state.columnMeta.get().columnsVisible.length - 1;
|
|
102
|
+
const colIndex = clamp(
|
|
103
|
+
0,
|
|
104
|
+
typeof position.column === "number" ? position.column : grid.api.columnIndex(position.column),
|
|
105
|
+
columnCount,
|
|
106
|
+
);
|
|
107
|
+
focusCell({
|
|
108
|
+
colIndex,
|
|
109
|
+
rowIndex: position.row,
|
|
110
|
+
focusActive: grid.internal.focusActive,
|
|
111
|
+
id: grid.state.gridId.get(),
|
|
112
|
+
layout: grid.internal.layout.get(),
|
|
113
|
+
scrollIntoView: grid.api.scrollIntoView,
|
|
114
|
+
vp,
|
|
115
|
+
});
|
|
116
|
+
return false;
|
|
117
|
+
};
|
|
117
118
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type { InternalAtoms } from "../+types";
|
|
2
|
-
import type { Grid, GridApi } from "../../+types";
|
|
3
|
-
export declare const makePopoverFrameOpen: (
|
|
1
|
+
import type { InternalAtoms } from "../+types.js";
|
|
2
|
+
import type { Grid, GridApi } from "../../+types.js";
|
|
3
|
+
export declare const makePopoverFrameOpen: (
|
|
4
|
+
grid: Grid<any> & {
|
|
4
5
|
internal: InternalAtoms;
|
|
5
|
-
}
|
|
6
|
-
|
|
6
|
+
},
|
|
7
|
+
) => GridApi<any>["popoverFrameOpen"];
|
|
8
|
+
export declare const makePopoverFrameClose: (
|
|
9
|
+
grid: Grid<any> & {
|
|
7
10
|
internal: InternalAtoms;
|
|
8
|
-
}
|
|
11
|
+
},
|
|
12
|
+
) => GridApi<any>["popoverFrameClose"];
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
export const makePopoverFrameOpen = (grid) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
return (id, target, context) => {
|
|
3
|
+
grid.internal.popoverFrames.set((prev) => ({ ...prev, [id]: { target, context } }));
|
|
4
|
+
};
|
|
5
5
|
};
|
|
6
6
|
export const makePopoverFrameClose = (grid) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
7
|
+
return (id) => {
|
|
8
|
+
grid.internal.popoverFrames.set((prev) => {
|
|
9
|
+
if (!id) return {};
|
|
10
|
+
const next = { ...prev };
|
|
11
|
+
delete next[id];
|
|
12
|
+
return next;
|
|
13
|
+
});
|
|
14
|
+
};
|
|
16
15
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { getNearestFocusable, getPositionFromFocusable } from "@1771technologies/lytenyte-shared";
|
|
2
2
|
export const makePositionFromElement = () => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
3
|
+
return (el) => {
|
|
4
|
+
const focusable = getNearestFocusable(el);
|
|
5
|
+
if (!focusable) return null;
|
|
6
|
+
return getPositionFromFocusable(focusable);
|
|
7
|
+
};
|
|
9
8
|
};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { rowIndexForSection } from "@1771technologies/lytenyte-shared";
|
|
2
2
|
export const makeRowByIndex = (grid) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
return (index, section = "flat") => {
|
|
4
|
+
const rowIndex = rowIndexForSection(
|
|
5
|
+
index,
|
|
6
|
+
section,
|
|
7
|
+
grid.state.rowDataStore.rowTopCount.get(),
|
|
8
|
+
grid.state.rowDataStore.rowBottomCount.get(),
|
|
9
|
+
grid.state.rowDataStore.rowCount.get(),
|
|
10
|
+
);
|
|
11
|
+
if (rowIndex == null) return null;
|
|
12
|
+
return grid.state.rowDataSource.get().rowByIndex(rowIndex);
|
|
13
|
+
};
|
|
9
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const makeRowDetailIsExpanded = (grid) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
return (rowOrId) => {
|
|
3
|
+
const id = typeof rowOrId === "string" ? rowOrId : rowOrId.id;
|
|
4
|
+
return grid.state.rowDetailExpansions.get().has(id);
|
|
5
|
+
};
|
|
6
6
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { InternalAtoms } from "../+types";
|
|
2
|
-
import type { Grid, GridApi } from "../../+types";
|
|
3
|
-
export declare const makeRowDetailRenderedHeight: (
|
|
1
|
+
import type { InternalAtoms } from "../+types.js";
|
|
2
|
+
import type { Grid, GridApi } from "../../+types.js";
|
|
3
|
+
export declare const makeRowDetailRenderedHeight: (
|
|
4
|
+
grid: Grid<any> & {
|
|
4
5
|
internal: InternalAtoms;
|
|
5
|
-
}
|
|
6
|
+
},
|
|
7
|
+
) => GridApi<any>["rowDetailRenderedHeight"];
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
export const makeRowDetailRenderedHeight = (grid) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return cache[index] ?? grid.state.rowDetailAutoHeightGuess.get();
|
|
13
|
-
};
|
|
2
|
+
return (rowOrId) => {
|
|
3
|
+
const index = grid.state.rowDataSource
|
|
4
|
+
.get()
|
|
5
|
+
.rowToIndex(typeof rowOrId === "string" ? rowOrId : rowOrId.id);
|
|
6
|
+
if (index == null || !grid.api.rowDetailIsExpanded(rowOrId)) return 0;
|
|
7
|
+
const rowDetailHeight = grid.state.rowDetailHeight.get();
|
|
8
|
+
if (typeof rowDetailHeight === "number") return rowDetailHeight;
|
|
9
|
+
const cache = grid.internal.rowDetailAutoHeightCache.get();
|
|
10
|
+
return cache[index] ?? grid.state.rowDetailAutoHeightGuess.get();
|
|
11
|
+
};
|
|
14
12
|
};
|
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
export const makeRowDetailToggle = (grid) => {
|
|
2
|
-
|
|
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
|
-
expansions: next,
|
|
29
|
-
grid: grid,
|
|
30
|
-
});
|
|
31
|
-
};
|
|
2
|
+
return (rowOrId, state) => {
|
|
3
|
+
const row =
|
|
4
|
+
typeof rowOrId === "string" ? grid.api.rowById(rowOrId) : grid.api.rowById(rowOrId.id);
|
|
5
|
+
if (!row) return;
|
|
6
|
+
const isExpanded = grid.api.rowDetailIsExpanded(rowOrId);
|
|
7
|
+
const v = state != null ? state : !isExpanded;
|
|
8
|
+
if (v === isExpanded) return;
|
|
9
|
+
const s = grid.state.rowDetailExpansions.get();
|
|
10
|
+
const next = new Set(s);
|
|
11
|
+
if (v) next.add(row.id);
|
|
12
|
+
else next.delete(row.id);
|
|
13
|
+
let prevented = false;
|
|
14
|
+
grid.api.eventFire("rowDetailExpansionBegin", {
|
|
15
|
+
expansions: next,
|
|
16
|
+
grid: grid,
|
|
17
|
+
preventDefault: () => {
|
|
18
|
+
prevented = true;
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
if (prevented) return;
|
|
22
|
+
grid.state.rowDetailExpansions.set(next);
|
|
23
|
+
grid.api.eventFire("rowDetailExpansionEnd", {
|
|
24
|
+
expansions: next,
|
|
25
|
+
grid: grid,
|
|
26
|
+
});
|
|
27
|
+
};
|
|
32
28
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { Grid, GridApi } from "../../+types";
|
|
2
|
-
export declare const makeRowGroupApplyExpansions: (
|
|
2
|
+
export declare const makeRowGroupApplyExpansions: (
|
|
3
|
+
grid: Grid<any>,
|
|
4
|
+
) => GridApi<any>["rowGroupApplyExpansions"];
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
export const makeRowGroupApplyExpansions = (grid) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
try {
|
|
9
|
-
api.eventFire("rowExpandBegin", { expansions, grid, preventDefault: preventNext });
|
|
10
|
-
if (prevented)
|
|
11
|
-
return;
|
|
12
|
-
const rds = grid.state.rowDataSource.get();
|
|
13
|
-
rds.rowExpand(expansions);
|
|
14
|
-
api.eventFire("rowExpand", { expansions, grid });
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
api.eventFire("rowExpandError", { expansions, grid, error });
|
|
18
|
-
}
|
|
2
|
+
return (expansions) => {
|
|
3
|
+
const api = grid.api;
|
|
4
|
+
let prevented = false;
|
|
5
|
+
const preventNext = () => {
|
|
6
|
+
prevented = true;
|
|
19
7
|
};
|
|
8
|
+
try {
|
|
9
|
+
api.eventFire("rowExpandBegin", { expansions, grid, preventDefault: preventNext });
|
|
10
|
+
if (prevented) return;
|
|
11
|
+
const rds = grid.state.rowDataSource.get();
|
|
12
|
+
rds.rowExpand(expansions);
|
|
13
|
+
api.eventFire("rowExpand", { expansions, grid });
|
|
14
|
+
} catch (error) {
|
|
15
|
+
api.eventFire("rowExpandError", { expansions, grid, error });
|
|
16
|
+
}
|
|
17
|
+
};
|
|
20
18
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
GROUP_COLUMN_PREFIX,
|
|
3
|
+
GROUP_COLUMN_SINGLE_ID,
|
|
4
|
+
GROUP_COLUMN_TREE_DATA,
|
|
5
|
+
} from "@1771technologies/lytenyte-shared";
|
|
2
6
|
export const makeRowGroupColumnIndex = (grid) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return Number.parseInt(n);
|
|
13
|
-
};
|
|
7
|
+
return (c) => {
|
|
8
|
+
if (!grid.state.rowGroupModel.get().length || !c.id.startsWith(GROUP_COLUMN_PREFIX)) {
|
|
9
|
+
return -1;
|
|
10
|
+
}
|
|
11
|
+
if (c.id === GROUP_COLUMN_SINGLE_ID || c.id === GROUP_COLUMN_TREE_DATA) return 0;
|
|
12
|
+
const n = c.id.split(":").at(-1);
|
|
13
|
+
if (n == null) return -1;
|
|
14
|
+
return Number.parseInt(n);
|
|
15
|
+
};
|
|
14
16
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
export const makeRowGroupIsExpanded = (grid) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return row.depth <= defaultExpansion;
|
|
14
|
-
};
|
|
2
|
+
return (row) => {
|
|
3
|
+
const mode = grid.state.columnPivotMode.get();
|
|
4
|
+
const expansions = mode
|
|
5
|
+
? grid.state.columnPivotRowGroupExpansions.get()
|
|
6
|
+
: grid.state.rowGroupExpansions.get();
|
|
7
|
+
const expanded = expansions[row.id];
|
|
8
|
+
if (typeof expanded === "boolean") return expanded;
|
|
9
|
+
const defaultExpansion = grid.state.rowGroupDefaultExpansion.get();
|
|
10
|
+
if (typeof defaultExpansion === "boolean") return defaultExpansion;
|
|
11
|
+
return row.depth <= defaultExpansion;
|
|
12
|
+
};
|
|
15
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const makeRowGroupToggle = (grid) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
return (row, state) => {
|
|
3
|
+
const api = grid.api;
|
|
4
|
+
const next = state == null ? !api.rowGroupIsExpanded(row) : state;
|
|
5
|
+
api.rowGroupApplyExpansions({ [row.id]: next });
|
|
6
|
+
};
|
|
7
7
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Grid, GridApi } from "../../+types";
|
|
2
2
|
import type { InternalAtoms } from "../+types";
|
|
3
|
-
export declare const makeRowHandleSelect: (
|
|
3
|
+
export declare const makeRowHandleSelect: (
|
|
4
|
+
grid: Grid<any> & {
|
|
4
5
|
internal: InternalAtoms;
|
|
5
|
-
}
|
|
6
|
+
},
|
|
7
|
+
) => GridApi<any>["rowHandleSelect"];
|