@1771technologies/lytenyte-pro 1.0.11 → 1.0.12-dev.1
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/package.json +7 -7
- package/dist/+types.d.ts +0 -5836
- package/dist/+types.js +0 -1
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +0 -2
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +0 -43
- package/dist/cell-selection/are-rects-equal.d.ts +0 -2
- package/dist/cell-selection/are-rects-equal.js +0 -6
- package/dist/cell-selection/bound-selection-rect.d.ts +0 -2
- package/dist/cell-selection/bound-selection-rect.js +0 -17
- package/dist/cell-selection/cell-selection-containers.d.ts +0 -3
- package/dist/cell-selection/cell-selection-containers.js +0 -91
- package/dist/cell-selection/cell-selection-driver.d.ts +0 -1
- package/dist/cell-selection/cell-selection-driver.js +0 -281
- package/dist/cell-selection/cell-style-row.d.ts +0 -8
- package/dist/cell-selection/cell-style-row.js +0 -84
- package/dist/cell-selection/deselect-rect-range.d.ts +0 -2
- package/dist/cell-selection/deselect-rect-range.js +0 -43
- package/dist/cell-selection/expand-cell-selection-down.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-down.js +0 -39
- package/dist/cell-selection/expand-cell-selection-end.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-end.js +0 -40
- package/dist/cell-selection/expand-cell-selection-start.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-start.js +0 -39
- package/dist/cell-selection/expand-cell-selection-up.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-up.js +0 -39
- package/dist/cell-selection/full-width-start-end-index.d.ts +0 -2
- package/dist/cell-selection/full-width-start-end-index.js +0 -5
- package/dist/cell-selection/get-root-cell.d.ts +0 -2
- package/dist/cell-selection/get-root-cell.js +0 -6
- package/dist/cell-selection/index.d.ts +0 -18
- package/dist/cell-selection/index.js +0 -18
- package/dist/cell-selection/is-bottom-rect.d.ts +0 -2
- package/dist/cell-selection/is-bottom-rect.js +0 -7
- package/dist/cell-selection/is-center-col-rect.d.ts +0 -5
- package/dist/cell-selection/is-center-col-rect.js +0 -5
- package/dist/cell-selection/is-center-rect.d.ts +0 -2
- package/dist/cell-selection/is-center-rect.js +0 -5
- package/dist/cell-selection/is-end-rect.d.ts +0 -5
- package/dist/cell-selection/is-end-rect.js +0 -4
- package/dist/cell-selection/is-overlapping-rect.d.ts +0 -2
- package/dist/cell-selection/is-overlapping-rect.js +0 -6
- package/dist/cell-selection/is-start-rect.d.ts +0 -5
- package/dist/cell-selection/is-start-rect.js +0 -4
- package/dist/cell-selection/is-top-rect.d.ts +0 -2
- package/dist/cell-selection/is-top-rect.js +0 -4
- package/dist/cell-selection/is-within-selection-rect.d.ts +0 -2
- package/dist/cell-selection/is-within-selection-rect.js +0 -3
- package/dist/cell-selection/split-cell-selection-rect.d.ts +0 -46
- package/dist/cell-selection/split-cell-selection-rect.js +0 -88
- package/dist/cell-selection/split-on-pivot.d.ts +0 -3
- package/dist/cell-selection/split-on-pivot.js +0 -50
- package/dist/cell-selection/update-additive-cell-selection.d.ts +0 -5
- package/dist/cell-selection/update-additive-cell-selection.js +0 -23
- package/dist/cell-selection/use-edge-scroll.d.ts +0 -10
- package/dist/cell-selection/use-edge-scroll.js +0 -66
- package/dist/cells/+types.cell.d.ts +0 -13
- package/dist/cells/+types.cell.js +0 -1
- package/dist/cells/cell-default.d.ts +0 -2
- package/dist/cells/cell-default.js +0 -8
- package/dist/cells/cell-editor.d.ts +0 -6
- package/dist/cells/cell-editor.js +0 -103
- package/dist/cells/cell-spacer.d.ts +0 -9
- package/dist/cells/cell-spacer.js +0 -34
- package/dist/cells/cell.d.ts +0 -5
- package/dist/cells/cell.js +0 -43
- package/dist/cells/use-cell-style.d.ts +0 -3
- package/dist/cells/use-cell-style.js +0 -51
- package/dist/column-manager/branch-lookup-context.d.ts +0 -4
- package/dist/column-manager/branch-lookup-context.js +0 -3
- package/dist/column-manager/branch.d.ts +0 -15
- package/dist/column-manager/branch.js +0 -54
- package/dist/column-manager/column-manager.d.ts +0 -13
- package/dist/column-manager/column-manager.js +0 -18
- package/dist/column-manager/context.d.ts +0 -7
- package/dist/column-manager/context.js +0 -3
- package/dist/column-manager/label.d.ts +0 -5
- package/dist/column-manager/label.js +0 -18
- package/dist/column-manager/leaf.d.ts +0 -6
- package/dist/column-manager/leaf.js +0 -58
- package/dist/column-manager/move-handle.d.ts +0 -5
- package/dist/column-manager/move-handle.js +0 -73
- package/dist/column-manager/panel.d.ts +0 -1
- package/dist/column-manager/panel.js +0 -2
- package/dist/column-manager/root.d.ts +0 -8
- package/dist/column-manager/root.js +0 -7
- package/dist/column-manager/use-column-manager.d.ts +0 -10
- package/dist/column-manager/use-column-manager.js +0 -24
- package/dist/column-manager/use-columns-from-context.d.ts +0 -3
- package/dist/column-manager/use-columns-from-context.js +0 -23
- package/dist/column-manager/visibility-checkbox.d.ts +0 -9
- package/dist/column-manager/visibility-checkbox.js +0 -30
- package/dist/context.d.ts +0 -10
- package/dist/context.js +0 -4
- package/dist/filter-tree/branch.d.ts +0 -13
- package/dist/filter-tree/branch.js +0 -21
- package/dist/filter-tree/context.d.ts +0 -27
- package/dist/filter-tree/context.js +0 -5
- package/dist/filter-tree/filter-tree.d.ts +0 -14
- package/dist/filter-tree/filter-tree.js +0 -18
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +0 -38
- package/dist/filter-tree/hooks/use-filter-tree.js +0 -101
- package/dist/filter-tree/hooks/use-tree-item.d.ts +0 -8
- package/dist/filter-tree/hooks/use-tree-item.js +0 -116
- package/dist/filter-tree/inclusion-checkbox.d.ts +0 -9
- package/dist/filter-tree/inclusion-checkbox.js +0 -14
- package/dist/filter-tree/label.d.ts +0 -5
- package/dist/filter-tree/label.js +0 -18
- package/dist/filter-tree/leaf.d.ts +0 -6
- package/dist/filter-tree/leaf.js +0 -14
- package/dist/filter-tree/root.d.ts +0 -13
- package/dist/filter-tree/root.js +0 -30
- package/dist/grid-box/+types.d.ts +0 -15
- package/dist/grid-box/+types.js +0 -1
- package/dist/grid-box/context.d.ts +0 -9
- package/dist/grid-box/context.js +0 -3
- package/dist/grid-box/grid-box.d.ts +0 -12
- package/dist/grid-box/grid-box.js +0 -14
- package/dist/grid-box/item.d.ts +0 -10
- package/dist/grid-box/item.js +0 -63
- package/dist/grid-box/panel.d.ts +0 -1
- package/dist/grid-box/panel.js +0 -9
- package/dist/grid-box/root.d.ts +0 -9
- package/dist/grid-box/root.js +0 -8
- package/dist/grid-box/use-aggregation-box-items.d.ts +0 -18
- package/dist/grid-box/use-aggregation-box-items.js +0 -61
- package/dist/grid-box/use-column-box-items.d.ts +0 -34
- package/dist/grid-box/use-column-box-items.js +0 -78
- package/dist/grid-box/use-row-group-box-items.d.ts +0 -18
- package/dist/grid-box/use-row-group-box-items.js +0 -169
- package/dist/grid-provider/context.d.ts +0 -5
- package/dist/grid-provider/context.js +0 -2
- package/dist/grid-provider/provider.d.ts +0 -3
- package/dist/grid-provider/provider.js +0 -2
- package/dist/grid-provider/use-grid.d.ts +0 -3
- package/dist/grid-provider/use-grid.js +0 -3
- package/dist/grid.d.ts +0 -18
- package/dist/grid.js +0 -28
- package/dist/header/header-cell.d.ts +0 -10
- package/dist/header/header-cell.js +0 -24
- package/dist/header/header-group-cell.d.ts +0 -5
- package/dist/header/header-group-cell.js +0 -16
- package/dist/header/header-row.d.ts +0 -4
- package/dist/header/header-row.js +0 -10
- package/dist/header/header.d.ts +0 -1
- package/dist/header/header.js +0 -10
- package/dist/header/resize-handler.d.ts +0 -12
- package/dist/header/resize-handler.js +0 -139
- package/dist/header/use-drag-move.d.ts +0 -14
- package/dist/header/use-drag-move.js +0 -97
- package/dist/header/use-header-cell-renderer.d.ts +0 -4
- package/dist/header/use-header-cell-renderer.js +0 -36
- package/dist/icons/index.d.ts +0 -1
- package/dist/icons/index.js +0 -3
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -13
- package/dist/license.d.ts +0 -3
- package/dist/license.js +0 -214
- package/dist/listbox/context.d.ts +0 -6
- package/dist/listbox/context.js +0 -3
- package/dist/listbox/item.d.ts +0 -1
- package/dist/listbox/item.js +0 -25
- package/dist/listbox/panel.d.ts +0 -1
- package/dist/listbox/panel.js +0 -50
- package/dist/listbox/root.d.ts +0 -6
- package/dist/listbox/root.js +0 -12
- package/dist/root/dialog-driver.d.ts +0 -1
- package/dist/root/dialog-driver.js +0 -21
- package/dist/root/popover-driver.d.ts +0 -1
- package/dist/root/popover-driver.js +0 -21
- package/dist/root/root.d.ts +0 -8
- package/dist/root/root.js +0 -125
- package/dist/row-data-source-client/+constants.d.ts +0 -2
- package/dist/row-data-source-client/+constants.js +0 -2
- package/dist/row-data-source-client/+types.d.ts +0 -27
- package/dist/row-data-source-client/+types.js +0 -1
- package/dist/row-data-source-client/built-ins/avg.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/avg.js +0 -16
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +0 -44
- package/dist/row-data-source-client/built-ins/built-ins.js +0 -44
- package/dist/row-data-source-client/built-ins/count.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/count.js +0 -16
- package/dist/row-data-source-client/built-ins/first.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/first.js +0 -12
- package/dist/row-data-source-client/built-ins/group.d.ts +0 -1
- package/dist/row-data-source-client/built-ins/group.js +0 -3
- package/dist/row-data-source-client/built-ins/last.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/last.js +0 -12
- package/dist/row-data-source-client/built-ins/max.d.ts +0 -11
- package/dist/row-data-source-client/built-ins/max.js +0 -25
- package/dist/row-data-source-client/built-ins/min.d.ts +0 -11
- package/dist/row-data-source-client/built-ins/min.js +0 -25
- package/dist/row-data-source-client/built-ins/sum.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/sum.js +0 -21
- package/dist/row-data-source-client/filter/+types.d.ts +0 -23
- package/dist/row-data-source-client/filter/+types.js +0 -1
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +0 -2
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +0 -109
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +0 -6
- package/dist/row-data-source-client/pivots/create-agg-model.js +0 -13
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +0 -2
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +0 -50
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +0 -2
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +0 -22
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +0 -2
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +0 -23
- package/dist/row-data-source-client/tree/client-tree.d.ts +0 -18
- package/dist/row-data-source-client/tree/client-tree.js +0 -76
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +0 -2
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +0 -8
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +0 -2
- package/dist/row-data-source-client/tree/evaluator-group.js +0 -9
- package/dist/row-data-source-client/tree/traverse.d.ts +0 -2
- package/dist/row-data-source-client/tree/traverse.js +0 -22
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +0 -10
- package/dist/row-data-source-client/use-client-data-source-paginated.js +0 -572
- package/dist/row-data-source-client/use-client-data-source.d.ts +0 -10
- package/dist/row-data-source-client/use-client-data-source.js +0 -666
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +0 -9
- package/dist/row-data-source-client/use-client-tree-data-source.js +0 -511
- package/dist/row-data-source-server/async-tree/+constants.async-tree.d.ts +0 -1
- package/dist/row-data-source-server/async-tree/+constants.async-tree.js +0 -1
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +0 -59
- package/dist/row-data-source-server/async-tree/+types.async-tree.js +0 -1
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +0 -27
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +0 -36
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +0 -24
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +0 -14
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +0 -18
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +0 -14
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +0 -18
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +0 -3
- package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/make-async-tree.js +0 -19
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +0 -8
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +0 -17
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +0 -52
- package/dist/row-data-source-server/range-tree/range-tree.d.ts +0 -66
- package/dist/row-data-source-server/range-tree/range-tree.js +0 -102
- package/dist/row-data-source-server/server-data.d.ts +0 -48
- package/dist/row-data-source-server/server-data.js +0 -378
- package/dist/row-data-source-server/use-server-data-source.d.ts +0 -3
- package/dist/row-data-source-server/use-server-data-source.js +0 -344
- package/dist/row-data-source-server/utils/get-node-depth.d.ts +0 -2
- package/dist/row-data-source-server/utils/get-node-depth.js +0 -9
- package/dist/row-data-source-server/utils/get-node-path.d.ts +0 -2
- package/dist/row-data-source-server/utils/get-node-path.js +0 -9
- package/dist/row-data-source-server/utils/get-request-id.d.ts +0 -1
- package/dist/row-data-source-server/utils/get-request-id.js +0 -6
- package/dist/rows/row/context.d.ts +0 -14
- package/dist/rows/row/context.js +0 -13
- package/dist/rows/row/row.d.ts +0 -7
- package/dist/rows/row/row.js +0 -25
- package/dist/rows/row/use-row-context-value.d.ts +0 -6
- package/dist/rows/row/use-row-context-value.js +0 -44
- package/dist/rows/row-detail-row.d.ts +0 -4
- package/dist/rows/row-detail-row.js +0 -130
- package/dist/rows/row-full-width.d.ts +0 -8
- package/dist/rows/row-full-width.js +0 -19
- package/dist/rows/rows-container.d.ts +0 -1
- package/dist/rows/rows-container.js +0 -9
- package/dist/rows/rows-sections.d.ts +0 -3
- package/dist/rows/rows-sections.js +0 -27
- package/dist/rows/scrollers/native-scroller.d.ts +0 -2
- package/dist/rows/scrollers/native-scroller.js +0 -4
- package/dist/sort-manager/+types.d.ts +0 -13
- package/dist/sort-manager/+types.js +0 -1
- package/dist/sort-manager/context.d.ts +0 -14
- package/dist/sort-manager/context.js +0 -5
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +0 -15
- package/dist/sort-manager/hooks/use-sort-manager.js +0 -56
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +0 -51
- package/dist/sort-manager/hooks/use-sort-row-item.js +0 -145
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +0 -5
- package/dist/sort-manager/hooks/use-sortable-column-items.js +0 -13
- package/dist/sort-manager/root.d.ts +0 -3
- package/dist/sort-manager/root.js +0 -14
- package/dist/sort-manager/sort-add.d.ts +0 -8
- package/dist/sort-manager/sort-add.js +0 -14
- package/dist/sort-manager/sort-apply.d.ts +0 -7
- package/dist/sort-manager/sort-apply.js +0 -24
- package/dist/sort-manager/sort-cancel.d.ts +0 -7
- package/dist/sort-manager/sort-cancel.js +0 -27
- package/dist/sort-manager/sort-clear.d.ts +0 -7
- package/dist/sort-manager/sort-clear.js +0 -22
- package/dist/sort-manager/sort-column-select.d.ts +0 -10
- package/dist/sort-manager/sort-column-select.js +0 -20
- package/dist/sort-manager/sort-direction-select.d.ts +0 -10
- package/dist/sort-manager/sort-direction-select.js +0 -24
- package/dist/sort-manager/sort-manager.d.ts +0 -16
- package/dist/sort-manager/sort-manager.js +0 -26
- package/dist/sort-manager/sort-remove.d.ts +0 -7
- package/dist/sort-manager/sort-remove.js +0 -14
- package/dist/sort-manager/sort-row.d.ts +0 -5
- package/dist/sort-manager/sort-row.js +0 -7
- package/dist/sort-manager/sort-rows.d.ts +0 -1
- package/dist/sort-manager/sort-rows.js +0 -6
- package/dist/sort-manager/sort-value-select.d.ts +0 -11
- package/dist/sort-manager/sort-value-select.js +0 -25
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +0 -3
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +0 -62
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +0 -3
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +0 -50
- package/dist/state/+types.d.ts +0 -35
- package/dist/state/+types.js +0 -1
- package/dist/state/api/cell-root.d.ts +0 -5
- package/dist/state/api/cell-root.js +0 -64
- package/dist/state/api/column-autosize.d.ts +0 -5
- package/dist/state/api/column-autosize.js +0 -72
- package/dist/state/api/column-by-id.d.ts +0 -2
- package/dist/state/api/column-by-id.js +0 -6
- package/dist/state/api/column-field.d.ts +0 -2
- package/dist/state/api/column-field.js +0 -23
- package/dist/state/api/column-from-index.d.ts +0 -2
- package/dist/state/api/column-from-index.js +0 -6
- package/dist/state/api/column-group-toggle.d.ts +0 -2
- package/dist/state/api/column-group-toggle.js +0 -10
- package/dist/state/api/column-index.d.ts +0 -2
- package/dist/state/api/column-index.js +0 -7
- package/dist/state/api/column-move.d.ts +0 -2
- package/dist/state/api/column-move.js +0 -49
- package/dist/state/api/column-resize.d.ts +0 -2
- package/dist/state/api/column-resize.js +0 -9
- package/dist/state/api/column-update.d.ts +0 -5
- package/dist/state/api/column-update.js +0 -26
- package/dist/state/api/dialog-frame.d.ts +0 -8
- package/dist/state/api/dialog-frame.js +0 -16
- package/dist/state/api/edit-begin.d.ts +0 -5
- package/dist/state/api/edit-begin.js +0 -87
- package/dist/state/api/edit-end.d.ts +0 -5
- package/dist/state/api/edit-end.js +0 -43
- package/dist/state/api/edit-is-cell-active.d.ts +0 -5
- package/dist/state/api/edit-is-cell-active.js +0 -22
- package/dist/state/api/edit-update.d.ts +0 -5
- package/dist/state/api/edit-update.js +0 -88
- package/dist/state/api/event-listeners.d.ts +0 -5
- package/dist/state/api/event-listeners.js +0 -19
- package/dist/state/api/export-csv.d.ts +0 -3
- package/dist/state/api/export-csv.js +0 -40
- package/dist/state/api/export-data-rect.d.ts +0 -2
- package/dist/state/api/export-data-rect.js +0 -24
- package/dist/state/api/focus-cell.d.ts +0 -5
- package/dist/state/api/focus-cell.js +0 -117
- package/dist/state/api/popover-frame.d.ts +0 -8
- package/dist/state/api/popover-frame.js +0 -16
- package/dist/state/api/position-from-element.d.ts +0 -2
- package/dist/state/api/position-from-element.js +0 -9
- package/dist/state/api/row-by-id.d.ts +0 -2
- package/dist/state/api/row-by-id.js +0 -5
- package/dist/state/api/row-by-index.d.ts +0 -2
- package/dist/state/api/row-by-index.js +0 -9
- package/dist/state/api/row-detail-is-expanded.d.ts +0 -2
- package/dist/state/api/row-detail-is-expanded.js +0 -6
- package/dist/state/api/row-detail-rendered-height.d.ts +0 -5
- package/dist/state/api/row-detail-rendered-height.js +0 -14
- package/dist/state/api/row-detail-toggle.d.ts +0 -2
- package/dist/state/api/row-detail-toggle.js +0 -32
- package/dist/state/api/row-group-apply-expansions.d.ts +0 -2
- package/dist/state/api/row-group-apply-expansions.js +0 -20
- package/dist/state/api/row-group-column-index.d.ts +0 -2
- package/dist/state/api/row-group-column-index.js +0 -14
- package/dist/state/api/row-group-is-expanded.d.ts +0 -2
- package/dist/state/api/row-group-is-expanded.js +0 -15
- package/dist/state/api/row-group-toggle.d.ts +0 -2
- package/dist/state/api/row-group-toggle.js +0 -7
- package/dist/state/api/row-handle-select.d.ts +0 -5
- package/dist/state/api/row-handle-select.js +0 -43
- package/dist/state/api/row-select-all.d.ts +0 -2
- package/dist/state/api/row-select-all.js +0 -17
- package/dist/state/api/row-select.d.ts +0 -5
- package/dist/state/api/row-select.js +0 -35
- package/dist/state/api/row-selected.d.ts +0 -2
- package/dist/state/api/row-selected.js +0 -13
- package/dist/state/api/scroll-into-view.d.ts +0 -5
- package/dist/state/api/scroll-into-view.js +0 -50
- package/dist/state/api/sort-for-column.d.ts +0 -2
- package/dist/state/api/sort-for-column.js +0 -9
- package/dist/state/api/use-row-drag.d.ts +0 -2
- package/dist/state/api/use-row-drag.js +0 -27
- package/dist/state/helpers/cell-row-group.d.ts +0 -2
- package/dist/state/helpers/cell-row-group.js +0 -19
- package/dist/state/helpers/column-add-row-group.d.ts +0 -10
- package/dist/state/helpers/column-add-row-group.js +0 -74
- package/dist/state/helpers/column-layout.d.ts +0 -3
- package/dist/state/helpers/column-layout.js +0 -59
- package/dist/state/helpers/column-marker.d.ts +0 -8
- package/dist/state/helpers/column-marker.js +0 -43
- package/dist/state/helpers/column-view.d.ts +0 -21
- package/dist/state/helpers/column-view.js +0 -33
- package/dist/state/helpers/edit-on-change.d.ts +0 -15
- package/dist/state/helpers/edit-on-change.js +0 -27
- package/dist/state/helpers/empty-row-data-source.d.ts +0 -2
- package/dist/state/helpers/empty-row-data-source.js +0 -18
- package/dist/state/helpers/get-data-rect.d.ts +0 -13
- package/dist/state/helpers/get-data-rect.js +0 -65
- package/dist/state/helpers/get-full-width-callback.d.ts +0 -2
- package/dist/state/helpers/get-full-width-callback.js +0 -10
- package/dist/state/helpers/get-span-callback.d.ts +0 -2
- package/dist/state/helpers/get-span-callback.js +0 -22
- package/dist/state/helpers/resolve-column.d.ts +0 -4
- package/dist/state/helpers/resolve-column.js +0 -29
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +0 -17
- package/dist/state/helpers/row-layout/get-focus-criteria.js +0 -62
- package/dist/state/helpers/row-layout/row-layout.d.ts +0 -19
- package/dist/state/helpers/row-layout/row-layout.js +0 -181
- package/dist/state/use-lytenyte.d.ts +0 -3
- package/dist/state/use-lytenyte.js +0 -673
- package/dist/tree-view/branch/branch.d.ts +0 -14
- package/dist/tree-view/branch/branch.js +0 -63
- package/dist/tree-view/branch/use-branch-keys.d.ts +0 -2
- package/dist/tree-view/branch/use-branch-keys.js +0 -87
- package/dist/tree-view/context.d.ts +0 -22
- package/dist/tree-view/context.js +0 -3
- package/dist/tree-view/depth-provider.d.ts +0 -2
- package/dist/tree-view/depth-provider.js +0 -3
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +0 -2
- package/dist/tree-view/hooks/use-tree-view-paths.js +0 -9
- package/dist/tree-view/index.d.ts +0 -16
- package/dist/tree-view/index.js +0 -16
- package/dist/tree-view/leaf.d.ts +0 -4
- package/dist/tree-view/leaf.js +0 -28
- package/dist/tree-view/navigation/get-all-ids.d.ts +0 -1
- package/dist/tree-view/navigation/get-all-ids.js +0 -7
- package/dist/tree-view/navigation/get-first-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-first-node.js +0 -7
- package/dist/tree-view/navigation/get-last-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-last-node.js +0 -7
- package/dist/tree-view/navigation/get-next-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-next-node.js +0 -13
- package/dist/tree-view/navigation/get-prev-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-prev-node.js +0 -13
- package/dist/tree-view/panel/make-handle-navigation.d.ts +0 -2
- package/dist/tree-view/panel/make-handle-navigation.js +0 -39
- package/dist/tree-view/panel/make-handle-selection.d.ts +0 -2
- package/dist/tree-view/panel/make-handle-selection.js +0 -92
- package/dist/tree-view/panel/make-handle-typeahead.d.ts +0 -1
- package/dist/tree-view/panel/make-handle-typeahead.js +0 -45
- package/dist/tree-view/panel/panel.d.ts +0 -1
- package/dist/tree-view/panel/panel.js +0 -30
- package/dist/tree-view/panel/use-tree-navigation.d.ts +0 -1
- package/dist/tree-view/panel/use-tree-navigation.js +0 -63
- package/dist/tree-view/root.d.ts +0 -17
- package/dist/tree-view/root.js +0 -63
- package/dist/tree-view/utils/get-focusable-nodes.d.ts +0 -1
- package/dist/tree-view/utils/get-focusable-nodes.js +0 -5
- package/dist/tree-view/utils/get-focused-node.d.ts +0 -1
- package/dist/tree-view/utils/get-focused-node.js +0 -14
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +0 -1
- package/dist/tree-view/utils/get-ids-between-nodes.js +0 -15
- package/dist/tree-view/utils/get-panel.d.ts +0 -1
- package/dist/tree-view/utils/get-panel.js +0 -7
- package/dist/tree-view/utils/get-parent-node.d.ts +0 -1
- package/dist/tree-view/utils/get-parent-node.js +0 -10
- package/dist/tree-view/utils/get-sibling-branches.d.ts +0 -1
- package/dist/tree-view/utils/get-sibling-branches.js +0 -14
- package/dist/tree-view/utils/get-tree-node-id.d.ts +0 -1
- package/dist/tree-view/utils/get-tree-node-id.js +0 -3
- package/dist/tree-view/utils/is-branch-node.d.ts +0 -1
- package/dist/tree-view/utils/is-branch-node.js +0 -3
- package/dist/tree-view/utils/is-leaf-node.d.ts +0 -1
- package/dist/tree-view/utils/is-leaf-node.js +0 -3
- package/dist/tree-view/utils/is-tree-node-disabled.d.ts +0 -1
- package/dist/tree-view/utils/is-tree-node-disabled.js +0 -3
- package/dist/tree-view/utils/select-node.d.ts +0 -2
- package/dist/tree-view/utils/select-node.js +0 -15
- package/dist/tree-view/utils/toggle-all-selections.d.ts +0 -2
- package/dist/tree-view/utils/toggle-all-selections.js +0 -9
- package/dist/tree-view/utils/toggle-selection.d.ts +0 -2
- package/dist/tree-view/utils/toggle-selection.js +0 -21
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +0 -2
- package/dist/tree-view/virtualized/force-sync-scrolling.js +0 -23
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +0 -2
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +0 -14
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +0 -31
- package/dist/tree-view/virtualized/make-virtual-tree.js +0 -90
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +0 -9
- package/dist/tree-view/virtualized/use-flattened-tree.js +0 -36
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +0 -2
- package/dist/tree-view/virtualized/use-row-start-and-end.js +0 -27
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +0 -22
- package/dist/tree-view/virtualized/use-virtualized-tree.js +0 -100
- package/dist/types/types.d.ts +0 -8
- package/dist/types/types.js +0 -1
- package/dist/utils/cycle-sorts.d.ts +0 -2
- package/dist/utils/cycle-sorts.js +0 -16
- package/dist/viewport/begin-editing.d.ts +0 -5
- package/dist/viewport/begin-editing.js +0 -15
- package/dist/viewport/viewport.d.ts +0 -1
- package/dist/viewport/viewport.js +0 -78
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import { equal } from "@1771technologies/lytenyte-js-utils";
|
|
2
|
-
import { makeAsyncTree } from "./async-tree/make-async-tree.js";
|
|
3
|
-
import { RangeTree } from "./range-tree/range-tree.js";
|
|
4
|
-
import { getRequestId } from "./utils/get-request-id.js";
|
|
5
|
-
import { getNodePath } from "./utils/get-node-path.js";
|
|
6
|
-
import { getNodeDepth } from "./utils/get-node-depth.js";
|
|
7
|
-
const noopFetcher = async () => [];
|
|
8
|
-
export class ServerData {
|
|
9
|
-
#tree;
|
|
10
|
-
#top = { asOf: 0, rows: [] };
|
|
11
|
-
#bottom = { asOf: 0, rows: [] };
|
|
12
|
-
#blocksize;
|
|
13
|
-
#flat;
|
|
14
|
-
#dataFetcher = noopFetcher;
|
|
15
|
-
#pivotMode;
|
|
16
|
-
#expansions;
|
|
17
|
-
#pivotExpansions;
|
|
18
|
-
#onResetLoadBegin;
|
|
19
|
-
#onResetLoadError;
|
|
20
|
-
#onResetLoadEnd;
|
|
21
|
-
#onFlatten;
|
|
22
|
-
#rowViewBounds = [0, 0];
|
|
23
|
-
#prevRequests = [];
|
|
24
|
-
#loadingRows = new Set();
|
|
25
|
-
#rowsWithError = new Map();
|
|
26
|
-
#controllers = new Set();
|
|
27
|
-
#defaultExpansion;
|
|
28
|
-
constructor({ blocksize, pivotMode, pivotExpansions, expansions, onResetLoadBegin, onResetLoadEnd, onResetLoadError, onFlatten, defaultExpansion, }) {
|
|
29
|
-
this.#tree = makeAsyncTree();
|
|
30
|
-
this.#blocksize = blocksize;
|
|
31
|
-
this.#pivotMode = pivotMode;
|
|
32
|
-
this.#expansions = expansions;
|
|
33
|
-
this.#pivotExpansions = pivotExpansions;
|
|
34
|
-
this.#defaultExpansion = defaultExpansion;
|
|
35
|
-
this.#onResetLoadBegin = onResetLoadBegin;
|
|
36
|
-
this.#onResetLoadEnd = onResetLoadEnd;
|
|
37
|
-
this.#onResetLoadError = onResetLoadError;
|
|
38
|
-
this.#onFlatten = onFlatten;
|
|
39
|
-
}
|
|
40
|
-
// Properties
|
|
41
|
-
set dataFetcher(d) {
|
|
42
|
-
if (this.#dataFetcher === d)
|
|
43
|
-
return;
|
|
44
|
-
this.#dataFetcher = d;
|
|
45
|
-
this.reset();
|
|
46
|
-
}
|
|
47
|
-
set pivotMode(b) {
|
|
48
|
-
if (b === this.#pivotMode)
|
|
49
|
-
return;
|
|
50
|
-
this.#pivotMode = b;
|
|
51
|
-
this.reset();
|
|
52
|
-
}
|
|
53
|
-
set expansions(d) {
|
|
54
|
-
this.#expansions = d;
|
|
55
|
-
if (this.#pivotMode)
|
|
56
|
-
return;
|
|
57
|
-
this.#flatten();
|
|
58
|
-
}
|
|
59
|
-
set pivotExpansions(d) {
|
|
60
|
-
this.#pivotExpansions = d;
|
|
61
|
-
if (!this.#pivotMode)
|
|
62
|
-
return;
|
|
63
|
-
this.#flatten();
|
|
64
|
-
}
|
|
65
|
-
set defaultExpansion(d) {
|
|
66
|
-
this.#defaultExpansion = d;
|
|
67
|
-
}
|
|
68
|
-
set rowViewBounds(viewBounds) {
|
|
69
|
-
if (equal(viewBounds, this.#rowViewBounds))
|
|
70
|
-
return;
|
|
71
|
-
this.#rowViewBounds = viewBounds;
|
|
72
|
-
this.handleViewBoundsChange();
|
|
73
|
-
}
|
|
74
|
-
// Methods
|
|
75
|
-
reset = async () => {
|
|
76
|
-
// Abort all the existing requests in flight.
|
|
77
|
-
this.#controllers.forEach((c) => c.abort());
|
|
78
|
-
this.#tree = makeAsyncTree();
|
|
79
|
-
this.#flatten();
|
|
80
|
-
try {
|
|
81
|
-
this.#onResetLoadBegin();
|
|
82
|
-
this.#prevRequests = [
|
|
83
|
-
{
|
|
84
|
-
rowStartIndex: 0,
|
|
85
|
-
rowEndIndex: this.#blocksize,
|
|
86
|
-
id: getRequestId([], 0, this.#blocksize),
|
|
87
|
-
path: [],
|
|
88
|
-
start: 0,
|
|
89
|
-
end: this.#blocksize,
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
const res = await this.#dataFetcher(this.#prevRequests, this.#expansions, this.#pivotExpansions);
|
|
93
|
-
this.handleResponses(res);
|
|
94
|
-
}
|
|
95
|
-
catch (e) {
|
|
96
|
-
console.log(e);
|
|
97
|
-
this.#onResetLoadError(e);
|
|
98
|
-
}
|
|
99
|
-
finally {
|
|
100
|
-
this.#onResetLoadEnd();
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
handleRequests = async (requests, opts = {}) => {
|
|
104
|
-
const controller = new AbortController();
|
|
105
|
-
this.#controllers.add(controller);
|
|
106
|
-
const skip = opts.skipState ?? false;
|
|
107
|
-
// We need to request our new data now. There are a few scenarios to be aware. Once we are requesting rows,
|
|
108
|
-
// we should mark the rows loading. This means we mark the row indices as loading (maybe by range)?
|
|
109
|
-
// The load may fail, in which case we should mark the request as an error.
|
|
110
|
-
try {
|
|
111
|
-
// Mark these rows as loading
|
|
112
|
-
requests.forEach((req) => {
|
|
113
|
-
if (!skip)
|
|
114
|
-
for (let i = req.rowStartIndex; i < req.rowEndIndex; i++)
|
|
115
|
-
this.#loadingRows.add(i);
|
|
116
|
-
});
|
|
117
|
-
const responses = await this.#dataFetcher(requests, this.#expansions, this.#pivotExpansions);
|
|
118
|
-
// The request was aborted, so we can ignore it from this point
|
|
119
|
-
if (controller.signal.aborted)
|
|
120
|
-
return;
|
|
121
|
-
this.handleResponses(responses, () => {
|
|
122
|
-
if (!skip)
|
|
123
|
-
requests.forEach((req) => {
|
|
124
|
-
for (let i = req.rowStartIndex; i < req.rowEndIndex; i++)
|
|
125
|
-
this.#rowsWithError.delete(i);
|
|
126
|
-
for (let i = req.rowStartIndex; i < req.rowEndIndex; i++)
|
|
127
|
-
this.#loadingRows.delete(i);
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
opts?.onSuccess?.();
|
|
131
|
-
}
|
|
132
|
-
catch (e) {
|
|
133
|
-
if (controller.signal.aborted)
|
|
134
|
-
return;
|
|
135
|
-
opts?.onError?.(e);
|
|
136
|
-
if (!skip)
|
|
137
|
-
requests.forEach((req) => {
|
|
138
|
-
for (let i = req.rowStartIndex; i < req.rowEndIndex; i++)
|
|
139
|
-
this.#rowsWithError.set(i, e);
|
|
140
|
-
for (let i = req.rowStartIndex; i < req.rowEndIndex; i++)
|
|
141
|
-
this.#loadingRows.delete(i);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
finally {
|
|
145
|
-
this.#controllers.delete(controller);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
handleResponses = (data, beforeOnFlat) => {
|
|
149
|
-
const pinned = data.filter((c) => c.kind === "top" || c.kind === "bottom");
|
|
150
|
-
const center = data.filter((c) => c.kind !== "top" && c.kind !== "bottom");
|
|
151
|
-
// handle pinned
|
|
152
|
-
for (let i = 0; i < pinned.length; i++) {
|
|
153
|
-
const r = pinned[i];
|
|
154
|
-
if (r.kind === "top" && r.asOfTime > this.#top.asOf) {
|
|
155
|
-
this.#top = {
|
|
156
|
-
asOf: r.asOfTime,
|
|
157
|
-
rows: r.data.map((c) => ({ id: c.id, data: c.data, kind: "leaf" })),
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
else if (r.kind === "bottom" && r.asOfTime > this.#bottom.asOf) {
|
|
161
|
-
this.#bottom = {
|
|
162
|
-
asOf: r.asOfTime,
|
|
163
|
-
rows: r.data.map((c) => ({ id: c.id, data: c.data, kind: "leaf" })),
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
center.sort((l, r) => l.path.length - r.path.length);
|
|
168
|
-
for (let i = 0; i < center.length; i++) {
|
|
169
|
-
const r = center[i];
|
|
170
|
-
this.#tree.set({
|
|
171
|
-
path: r.path,
|
|
172
|
-
items: r.data.map((c, i) => {
|
|
173
|
-
if (c.kind === "leaf") {
|
|
174
|
-
return {
|
|
175
|
-
kind: "leaf",
|
|
176
|
-
data: {
|
|
177
|
-
kind: "leaf",
|
|
178
|
-
data: c.data,
|
|
179
|
-
id: c.id,
|
|
180
|
-
},
|
|
181
|
-
relIndex: r.start + i,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
return {
|
|
186
|
-
kind: "parent",
|
|
187
|
-
data: {
|
|
188
|
-
kind: "branch",
|
|
189
|
-
data: c.data,
|
|
190
|
-
depth: r.path.length,
|
|
191
|
-
id: c.id,
|
|
192
|
-
key: c.key,
|
|
193
|
-
},
|
|
194
|
-
path: c.key,
|
|
195
|
-
relIndex: r.start + i,
|
|
196
|
-
size: c.childCount,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
}),
|
|
200
|
-
size: r.size,
|
|
201
|
-
asOf: r.asOfTime,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
// Re-flatten our tree once everything has been re-updated.
|
|
205
|
-
this.#flatten(beforeOnFlat);
|
|
206
|
-
};
|
|
207
|
-
async handleViewBoundsChange() {
|
|
208
|
-
const [start, end] = this.#rowViewBounds;
|
|
209
|
-
const seen = new Set();
|
|
210
|
-
const requests = [];
|
|
211
|
-
for (let i = start; i < end; i++) {
|
|
212
|
-
const ranges = this.#flat.rangeTree.findRangesForRowIndex(i);
|
|
213
|
-
ranges.forEach((c) => {
|
|
214
|
-
if (c.parent.kind === "root") {
|
|
215
|
-
const blockIndex = Math.floor(i / this.#blocksize);
|
|
216
|
-
const start = blockIndex * this.#blocksize;
|
|
217
|
-
const end = Math.min(start + this.#blocksize, c.parent.size);
|
|
218
|
-
const path = [];
|
|
219
|
-
const reqId = getRequestId(path, start, start + this.#blocksize);
|
|
220
|
-
if (seen.has(reqId))
|
|
221
|
-
return;
|
|
222
|
-
seen.add(reqId);
|
|
223
|
-
const size = start + this.#blocksize > c.parent.size ? c.parent.size - start : this.#blocksize;
|
|
224
|
-
requests.push({ id: reqId, path, start, end, rowStartIndex: i, rowEndIndex: i + size });
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
const blockIndex = Math.floor((i - c.rowStart) / this.#blocksize);
|
|
228
|
-
const start = blockIndex * this.#blocksize;
|
|
229
|
-
const end = Math.min(start + this.#blocksize, c.parent.size);
|
|
230
|
-
const path = getNodePath(c.parent);
|
|
231
|
-
const reqId = getRequestId(path, start, start + this.#blocksize);
|
|
232
|
-
if (seen.has(reqId))
|
|
233
|
-
return;
|
|
234
|
-
seen.add(reqId);
|
|
235
|
-
const size = start + this.#blocksize > c.parent.size ? c.parent.size - start : this.#blocksize;
|
|
236
|
-
requests.push({ id: reqId, path, start, end, rowStartIndex: i, rowEndIndex: i + size });
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
const newRequests = requests.filter((c) => !this.#prevRequests.find((prev) => prev.id === c.id));
|
|
241
|
-
// We don't have any new requests to make in our view, so we can return
|
|
242
|
-
if (!newRequests.length)
|
|
243
|
-
return;
|
|
244
|
-
this.#prevRequests = requests;
|
|
245
|
-
await this.handleRequests(newRequests);
|
|
246
|
-
}
|
|
247
|
-
updateRow(id, data) {
|
|
248
|
-
const centerRow = this.#flat.rowIdToTreeNode.get(id);
|
|
249
|
-
if (centerRow) {
|
|
250
|
-
centerRow.data = { ...centerRow.data, data };
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
// Maybe its a pinned row?
|
|
254
|
-
const topIndex = this.#top.rows.findIndex((c) => c.id === id);
|
|
255
|
-
if (topIndex != -1) {
|
|
256
|
-
this.#top.rows[topIndex] = { ...this.#top.rows[topIndex], data };
|
|
257
|
-
}
|
|
258
|
-
const botIndex = this.#bottom.rows.findIndex((c) => c.id === id);
|
|
259
|
-
if (botIndex != -1) {
|
|
260
|
-
this.#top.rows[botIndex] = { ...this.#top.rows[botIndex], data };
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
#flatten = (beforeOnFlat) => {
|
|
264
|
-
const mode = this.#pivotMode;
|
|
265
|
-
const expansions = mode ? this.#pivotExpansions : this.#expansions;
|
|
266
|
-
const t = this.#tree;
|
|
267
|
-
const rowIdToRow = new Map();
|
|
268
|
-
const rowIndexToRow = new Map();
|
|
269
|
-
const rowIdToRowIndex = new Map();
|
|
270
|
-
const rowIdToTreeNode = new Map();
|
|
271
|
-
const ranges = [];
|
|
272
|
-
const blocksize = this.#blocksize;
|
|
273
|
-
const previousRequests = this.#prevRequests;
|
|
274
|
-
const withError = this.#rowsWithError;
|
|
275
|
-
const withLoading = this.#loadingRows;
|
|
276
|
-
const handleRequests = this.handleRequests;
|
|
277
|
-
const defaultExpansion = this.#defaultExpansion;
|
|
278
|
-
const postFlatRequests = [];
|
|
279
|
-
function processParent(node, start) {
|
|
280
|
-
const rows = [...node.byIndex.values()].sort((l, r) => l.relIndex - r.relIndex);
|
|
281
|
-
let offset = 0;
|
|
282
|
-
for (let i = 0; i < rows.length; i++) {
|
|
283
|
-
const row = rows[i];
|
|
284
|
-
const rowIndex = row.relIndex + start + offset;
|
|
285
|
-
rowIndexToRow.set(rowIndex, row.data);
|
|
286
|
-
rowIdToRowIndex.set(row.data.id, rowIndex);
|
|
287
|
-
rowIdToRow.set(row.data.id, row.data);
|
|
288
|
-
rowIdToTreeNode.set(row.data.id, row);
|
|
289
|
-
if (row.kind === "parent") {
|
|
290
|
-
const expanded = expansions[row.data.id] ??
|
|
291
|
-
(typeof defaultExpansion === "number"
|
|
292
|
-
? getNodeDepth(row) <= defaultExpansion
|
|
293
|
-
: defaultExpansion);
|
|
294
|
-
if (expanded && !row.byIndex.size) {
|
|
295
|
-
const path = getNodePath(row);
|
|
296
|
-
const start = 0;
|
|
297
|
-
const end = Math.min(start + blocksize, row.size);
|
|
298
|
-
const reqSize = end - start;
|
|
299
|
-
const req = {
|
|
300
|
-
path,
|
|
301
|
-
start: start,
|
|
302
|
-
end: end,
|
|
303
|
-
id: getRequestId(path, 0, blocksize),
|
|
304
|
-
rowStartIndex: rowIndex + 1,
|
|
305
|
-
rowEndIndex: rowIndex + 1 + reqSize,
|
|
306
|
-
};
|
|
307
|
-
// If we haven't already requested this node
|
|
308
|
-
if (!previousRequests.find((c) => c.id === req.id)) {
|
|
309
|
-
postFlatRequests.push([rowIndex, req]);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
else if (expanded) {
|
|
313
|
-
offset += processParent(row, rowIndex + 1);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
ranges.push({
|
|
318
|
-
rowStart: start,
|
|
319
|
-
rowEnd: offset + node.size + start,
|
|
320
|
-
parent: node,
|
|
321
|
-
});
|
|
322
|
-
return offset + node.size;
|
|
323
|
-
}
|
|
324
|
-
const topCount = this.#top.rows.length;
|
|
325
|
-
const bottomCount = this.#bottom.rows.length;
|
|
326
|
-
for (let i = 0; i < topCount; i++) {
|
|
327
|
-
const row = this.#top.rows[i];
|
|
328
|
-
rowIndexToRow.set(i, row);
|
|
329
|
-
rowIdToRow.set(row.id, row);
|
|
330
|
-
rowIdToRowIndex.set(row.id, i);
|
|
331
|
-
}
|
|
332
|
-
const size = processParent(t, topCount);
|
|
333
|
-
for (let i = 0; i < bottomCount; i++) {
|
|
334
|
-
const row = this.#bottom.rows[i];
|
|
335
|
-
const rowIndex = i + size;
|
|
336
|
-
rowIndexToRow.set(rowIndex, row);
|
|
337
|
-
rowIdToRow.set(row.id, row);
|
|
338
|
-
rowIdToRowIndex.set(row.id, rowIndex);
|
|
339
|
-
}
|
|
340
|
-
const rangeTree = new RangeTree(ranges);
|
|
341
|
-
if (postFlatRequests.length > 0) {
|
|
342
|
-
postFlatRequests.forEach((c) => {
|
|
343
|
-
withLoading.add(c[0]);
|
|
344
|
-
previousRequests.push(c[1]);
|
|
345
|
-
});
|
|
346
|
-
const reqs = postFlatRequests.map((c) => c[1]);
|
|
347
|
-
handleRequests(reqs, {
|
|
348
|
-
skipState: true,
|
|
349
|
-
onError: (e) => {
|
|
350
|
-
postFlatRequests.forEach((c) => {
|
|
351
|
-
withLoading.delete(c[0]);
|
|
352
|
-
withError.set(c[0], e);
|
|
353
|
-
});
|
|
354
|
-
},
|
|
355
|
-
onSuccess: () => {
|
|
356
|
-
postFlatRequests.forEach((c) => {
|
|
357
|
-
withLoading.delete(c[0]);
|
|
358
|
-
});
|
|
359
|
-
},
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
this.#flat = {
|
|
363
|
-
tree: t,
|
|
364
|
-
top: topCount,
|
|
365
|
-
center: size - topCount,
|
|
366
|
-
bottom: bottomCount,
|
|
367
|
-
rangeTree,
|
|
368
|
-
rowIndexToRow,
|
|
369
|
-
rowIdToRow,
|
|
370
|
-
rowIdToRowIndex,
|
|
371
|
-
rowIdToTreeNode,
|
|
372
|
-
errored: this.#rowsWithError,
|
|
373
|
-
loading: this.#loadingRows,
|
|
374
|
-
};
|
|
375
|
-
beforeOnFlat?.();
|
|
376
|
-
this.#onFlatten(this.#flat);
|
|
377
|
-
};
|
|
378
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { RowDataSourceServer, RowDataSourceServerParams } from "../+types.js";
|
|
2
|
-
export declare function makeServerDataSource<T>({ dataFetcher, dataInFilterItemFetcher, dataColumnPivotFetcher, cellUpdateHandler, cellUpdateOptimistically, blockSize, }: RowDataSourceServerParams<T>): RowDataSourceServer<T>;
|
|
3
|
-
export declare function useServerDataSource<T>(p: RowDataSourceServerParams<T>): RowDataSourceServer<T>;
|