@1771technologies/lytenyte-pro 1.0.0-beta.1 → 1.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,2 +1,7 @@
|
|
|
1
1
|
import type { Column, ColumnPivotModel, Grid, RowLeaf } from "../../+types";
|
|
2
|
-
export declare function createPivotColumns<T>(
|
|
2
|
+
export declare function createPivotColumns<T>(
|
|
3
|
+
model: ColumnPivotModel<T>,
|
|
4
|
+
lookup: Map<string, Column<T>>,
|
|
5
|
+
grid: Grid<T>,
|
|
6
|
+
leafRows: RowLeaf<T>[],
|
|
7
|
+
): Column<T>[];
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { createColumnPivotsFromPaths } from "./create-pivot-columns-from-paths";
|
|
2
|
-
import { createPivotTree } from "./create-pivot-tree";
|
|
1
|
+
import { createColumnPivotsFromPaths } from "./create-pivot-columns-from-paths.js";
|
|
2
|
+
import { createPivotTree } from "./create-pivot-tree.js";
|
|
3
3
|
export function createPivotColumns(model, lookup, grid, leafRows) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
return columns;
|
|
18
|
-
}
|
|
19
|
-
const tree = createPivotTree(grid, activeValues, activeColumns, lookup, leafRows);
|
|
20
|
-
const columns = createColumnPivotsFromPaths(grid, activeColumns, lookup, tree);
|
|
4
|
+
const activeColumns = model.columns.filter((c) => lookup.has(c.field) && (c.active ?? true));
|
|
5
|
+
const activeValues = model.values.filter((c) => lookup.has(c.field) && (c.active ?? true));
|
|
6
|
+
if (activeColumns.length === 0 && activeValues.length === 0) return [];
|
|
7
|
+
// This means we only have a values column defined. Hence we should just return this.
|
|
8
|
+
if (activeColumns.length === 0) {
|
|
9
|
+
const columns = activeValues.map((c) => {
|
|
10
|
+
const col = lookup.get(c.field);
|
|
11
|
+
return {
|
|
12
|
+
...col,
|
|
13
|
+
field: c.field,
|
|
14
|
+
};
|
|
15
|
+
});
|
|
21
16
|
return columns;
|
|
17
|
+
}
|
|
18
|
+
const tree = createPivotTree(grid, activeValues, activeColumns, lookup, leafRows);
|
|
19
|
+
const columns = createColumnPivotsFromPaths(grid, activeColumns, lookup, tree);
|
|
20
|
+
return columns;
|
|
22
21
|
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import type { Column, ColumnPivotModel, Grid, RowLeaf } from "../../+types";
|
|
2
|
-
export declare function createPivotTree<T>(
|
|
2
|
+
export declare function createPivotTree<T>(
|
|
3
|
+
grid: Grid<T>,
|
|
4
|
+
values: ColumnPivotModel<T>["values"],
|
|
5
|
+
columns: ColumnPivotModel<T>["columns"],
|
|
6
|
+
lookup: Map<string, Column<T>>,
|
|
7
|
+
leafRows: RowLeaf<T>[],
|
|
8
|
+
): string[];
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export function createPivotTree(grid, values, columns, lookup, leafRows) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const sx = grid;
|
|
3
|
+
const measureEntries = values.length ? values.map((c) => c.field) : ["__EMPTY_LNG__"];
|
|
4
|
+
if (!measureEntries.length || !columns.length) {
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
const pivotedColumns = columns.map((p) => lookup.get(p.field));
|
|
8
|
+
const separator = sx.state.columnGroupJoinDelimiter.get();
|
|
9
|
+
const paths = new Set();
|
|
10
|
+
for (let i = 0; i < leafRows.length; i++) {
|
|
11
|
+
const current = [];
|
|
12
|
+
const row = leafRows[i];
|
|
13
|
+
for (const column of pivotedColumns) {
|
|
14
|
+
const pivotKey = String(grid.api.columnField(column, row));
|
|
15
|
+
current.push(pivotKey);
|
|
6
16
|
}
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const paths = new Set();
|
|
10
|
-
for (let i = 0; i < leafRows.length; i++) {
|
|
11
|
-
const current = [];
|
|
12
|
-
const row = leafRows[i];
|
|
13
|
-
for (const column of pivotedColumns) {
|
|
14
|
-
const pivotKey = String(grid.api.columnField(column, row));
|
|
15
|
-
current.push(pivotKey);
|
|
16
|
-
}
|
|
17
|
-
for (const measure of measureEntries) {
|
|
18
|
-
paths.add([...current, measure].join(separator));
|
|
19
|
-
}
|
|
17
|
+
for (const measure of measureEntries) {
|
|
18
|
+
paths.add([...current, measure].join(separator));
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
}
|
|
21
|
+
measureEntries.forEach((id) => paths.add(`total${separator}${id}`));
|
|
22
|
+
return [...paths];
|
|
23
23
|
}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import type { AggregationItem, GroupItem, Root, TreeNode } from "../+types.js";
|
|
2
2
|
export interface ClientData<Data> {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
readonly root: Root<Data>;
|
|
4
|
+
readonly rowData: Data[];
|
|
5
|
+
readonly idsLeaf: Set<string>;
|
|
6
|
+
readonly idsBranch: Set<string>;
|
|
7
|
+
readonly idsAll: Set<string>;
|
|
8
|
+
readonly idToNode: Map<string, TreeNode<Data>>;
|
|
9
|
+
readonly idToSourceIndex: Map<string, number>;
|
|
10
10
|
}
|
|
11
11
|
export interface MakeClientDataArgs<Data> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
readonly rowData: Data[];
|
|
13
|
+
readonly rowBranchModel: GroupItem<Data>[] | ((d: Data) => (string | null | undefined)[]);
|
|
14
|
+
readonly rowAggModel: AggregationItem<Data>[];
|
|
15
|
+
readonly rowIdLeaf?: (d: Data, i: number) => string;
|
|
16
|
+
readonly rowIdGroup?: (path: string[]) => string;
|
|
17
17
|
}
|
|
18
|
-
export declare function makeClientTree<Data>({
|
|
18
|
+
export declare function makeClientTree<Data>({
|
|
19
|
+
rowData,
|
|
20
|
+
rowBranchModel,
|
|
21
|
+
rowAggModel,
|
|
22
|
+
rowIdLeaf,
|
|
23
|
+
rowIdGroup,
|
|
24
|
+
}: MakeClientDataArgs<Data>): ClientData<Data>;
|
|
@@ -2,75 +2,72 @@ import { BRANCH, LEAF } from "../+constants.js";
|
|
|
2
2
|
import { traverse } from "./traverse.js";
|
|
3
3
|
import { aggregationEvaluator } from "./evaluator-aggregation.js";
|
|
4
4
|
import { groupEvaluator } from "./evaluator-group.js";
|
|
5
|
-
export function makeClientTree({ rowData, rowBranchModel, rowAggModel, rowIdLeaf, rowIdGroup
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
export function makeClientTree({ rowData, rowBranchModel, rowAggModel, rowIdLeaf, rowIdGroup }) {
|
|
6
|
+
const root = new Map();
|
|
7
|
+
const idsLeaf = new Set();
|
|
8
|
+
const idsBranch = new Set();
|
|
9
|
+
const idsAll = new Set();
|
|
10
|
+
const idToNode = new Map();
|
|
11
|
+
const idToSourceIndex = new Map();
|
|
12
|
+
for (let i = 0; i < rowData.length; i++) {
|
|
13
|
+
const d = rowData[i];
|
|
14
|
+
const id = rowIdLeaf?.(d, i) ?? `${i}`;
|
|
15
|
+
const path = groupEvaluator(rowBranchModel, d);
|
|
16
|
+
idsLeaf.add(id);
|
|
17
|
+
idsAll.add(id);
|
|
18
|
+
let current = root;
|
|
19
|
+
const runningPath = [];
|
|
20
|
+
for (let i = 0; i < path.length; i++) {
|
|
21
|
+
const pathKey = path[i] ?? `<__null__>`;
|
|
22
|
+
runningPath.push(pathKey);
|
|
23
|
+
const lookup = i === 0 ? root : current.children;
|
|
24
|
+
// We need to create a branch node.
|
|
25
|
+
if (!lookup.has(pathKey)) {
|
|
26
|
+
const id = rowIdGroup?.(runningPath) ?? "+.+" + runningPath.join("/");
|
|
27
|
+
idsBranch.add(id);
|
|
17
28
|
idsAll.add(id);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
idsAll.add(id);
|
|
29
|
-
const branch = {
|
|
30
|
-
id,
|
|
31
|
-
kind: BRANCH,
|
|
32
|
-
depth: i,
|
|
33
|
-
children: new Map(),
|
|
34
|
-
data: {},
|
|
35
|
-
parent: current === root ? null : current,
|
|
36
|
-
key: pathKey,
|
|
37
|
-
leafIds: new Set(),
|
|
38
|
-
leafData: [],
|
|
39
|
-
};
|
|
40
|
-
lookup.set(pathKey, branch);
|
|
41
|
-
idToNode.set(id, branch);
|
|
42
|
-
}
|
|
43
|
-
const branch = lookup.get(pathKey);
|
|
44
|
-
branch.leafData.push(d);
|
|
45
|
-
branch.leafIds.add(id);
|
|
46
|
-
current = branch;
|
|
47
|
-
}
|
|
48
|
-
const leaf = {
|
|
49
|
-
kind: LEAF,
|
|
50
|
-
id,
|
|
51
|
-
depth: path.length,
|
|
52
|
-
data: d,
|
|
53
|
-
parent: current === root ? null : current,
|
|
29
|
+
const branch = {
|
|
30
|
+
id,
|
|
31
|
+
kind: BRANCH,
|
|
32
|
+
depth: i,
|
|
33
|
+
children: new Map(),
|
|
34
|
+
data: {},
|
|
35
|
+
parent: current === root ? null : current,
|
|
36
|
+
key: pathKey,
|
|
37
|
+
leafIds: new Set(),
|
|
38
|
+
leafData: [],
|
|
54
39
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
lookup.set(pathKey, branch);
|
|
41
|
+
idToNode.set(id, branch);
|
|
42
|
+
}
|
|
43
|
+
const branch = lookup.get(pathKey);
|
|
44
|
+
branch.leafData.push(d);
|
|
45
|
+
branch.leafIds.add(id);
|
|
46
|
+
current = branch;
|
|
61
47
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
root,
|
|
69
|
-
rowData,
|
|
70
|
-
idsLeaf: idsLeaf,
|
|
71
|
-
idsBranch: idsBranch,
|
|
72
|
-
idsAll: idsAll,
|
|
73
|
-
idToNode,
|
|
74
|
-
idToSourceIndex,
|
|
48
|
+
const leaf = {
|
|
49
|
+
kind: LEAF,
|
|
50
|
+
id,
|
|
51
|
+
depth: path.length,
|
|
52
|
+
data: d,
|
|
53
|
+
parent: current === root ? null : current,
|
|
75
54
|
};
|
|
55
|
+
idToNode.set(id, leaf);
|
|
56
|
+
idToSourceIndex.set(id, i);
|
|
57
|
+
if (rowBranchModel.length === 0) current.set(id, leaf);
|
|
58
|
+
else current.children.set(id, leaf);
|
|
59
|
+
}
|
|
60
|
+
traverse(root, (node) => {
|
|
61
|
+
if (node.kind === LEAF) return;
|
|
62
|
+
node.data = aggregationEvaluator(rowAggModel, node.leafData);
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
root,
|
|
66
|
+
rowData,
|
|
67
|
+
idsLeaf: idsLeaf,
|
|
68
|
+
idsBranch: idsBranch,
|
|
69
|
+
idsAll: idsAll,
|
|
70
|
+
idToNode,
|
|
71
|
+
idToSourceIndex,
|
|
72
|
+
};
|
|
76
73
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import type { AggregationItem } from "../+types";
|
|
2
|
-
export declare function aggregationEvaluator<Data>(
|
|
1
|
+
import type { AggregationItem } from "../+types.js";
|
|
2
|
+
export declare function aggregationEvaluator<Data>(
|
|
3
|
+
agg: AggregationItem<Data>[],
|
|
4
|
+
data: Data[],
|
|
5
|
+
): Record<string, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export function aggregationEvaluator(agg, data) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const result = {};
|
|
3
|
+
for (let i = 0; i < agg.length; i++) {
|
|
4
|
+
const a = agg[i];
|
|
5
|
+
result[a.name] = a.fn(data);
|
|
6
|
+
}
|
|
7
|
+
return result;
|
|
8
8
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import type { GroupItem } from "../+types";
|
|
2
|
-
export declare function groupEvaluator<Data>(
|
|
1
|
+
import type { GroupItem } from "../+types.js";
|
|
2
|
+
export declare function groupEvaluator<Data>(
|
|
3
|
+
g: GroupItem<Data>[] | ((d: Data) => (string | null | undefined)[]),
|
|
4
|
+
d: Data,
|
|
5
|
+
): (string | null | undefined)[];
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export function groupEvaluator(g, d) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return v;
|
|
2
|
+
if (typeof g === "function") return g(d);
|
|
3
|
+
const v = [];
|
|
4
|
+
for (let i = 0; i < g.length; i++) {
|
|
5
|
+
v.push(g[i].fn(d));
|
|
6
|
+
}
|
|
7
|
+
return v;
|
|
9
8
|
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import type { BranchNode, Root, TreeNode } from "../+types";
|
|
2
|
-
export declare function traverse<Data>(
|
|
1
|
+
import type { BranchNode, Root, TreeNode } from "../+types.js";
|
|
2
|
+
export declare function traverse<Data>(
|
|
3
|
+
root: Root<Data> | BranchNode<Data>,
|
|
4
|
+
fn: (node: TreeNode<Data>, lookupKey: string | null) => boolean | void,
|
|
5
|
+
comparator?: (l: TreeNode<Data>, r: TreeNode<Data>) => number,
|
|
6
|
+
): void;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { LEAF } from "../+constants";
|
|
1
|
+
import { LEAF } from "../+constants.js";
|
|
2
2
|
export function traverse(root, fn, comparator) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
children.sort((l, r) => comparator(l[1], r[1]));
|
|
18
|
-
stack.unshift(...children);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
3
|
+
const entries = root instanceof Map ? root.entries() : root.children.entries();
|
|
4
|
+
const stack = [...entries];
|
|
5
|
+
if (comparator) stack.sort((l, r) => comparator(l[1], r[1]));
|
|
6
|
+
while (stack.length) {
|
|
7
|
+
const [key, node] = stack.shift();
|
|
8
|
+
if (node.kind === LEAF) {
|
|
9
|
+
fn(node, key);
|
|
10
|
+
} else {
|
|
11
|
+
const continueWith = fn(node, key) ?? true;
|
|
12
|
+
if (continueWith) {
|
|
13
|
+
const children = [...node.children];
|
|
14
|
+
if (comparator) children.sort((l, r) => comparator(l[1], r[1]));
|
|
15
|
+
stack.unshift(...children);
|
|
16
|
+
}
|
|
21
17
|
}
|
|
18
|
+
}
|
|
22
19
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { GridAtom, RowDataSourceClientPaginated } from "../+types";
|
|
2
|
-
import { type ClientRowDataSourceParams } from "../+types";
|
|
1
|
+
import type { GridAtom, RowDataSourceClientPaginated } from "../+types.js";
|
|
2
|
+
import { type ClientRowDataSourceParams } from "../+types.js";
|
|
3
3
|
interface DataAtoms<T> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
readonly top: GridAtom<T[]>;
|
|
5
|
+
readonly center: GridAtom<T[]>;
|
|
6
|
+
readonly bottom: GridAtom<T[]>;
|
|
7
7
|
}
|
|
8
|
-
export declare function makeClientDataSourcePaginated<T>(
|
|
9
|
-
|
|
8
|
+
export declare function makeClientDataSourcePaginated<T>(
|
|
9
|
+
p: ClientRowDataSourceParams<T>,
|
|
10
|
+
): [RowDataSourceClientPaginated<T>, DataAtoms<T>];
|
|
11
|
+
export declare function useClientRowDataSourcePaginated<T>(
|
|
12
|
+
p: ClientRowDataSourceParams<T>,
|
|
13
|
+
): RowDataSourceClientPaginated<T>;
|
|
10
14
|
export {};
|