@1771technologies/lytenyte-pro 1.0.12-dev.0 → 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 -285
- 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 -671
- 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,26 +0,0 @@
|
|
|
1
|
-
import { Root } from "./root.js";
|
|
2
|
-
import { SortRow } from "./sort-row.js";
|
|
3
|
-
import { SortRows } from "./sort-rows.js";
|
|
4
|
-
import { useSortManager } from "./hooks/use-sort-manager.js";
|
|
5
|
-
import { SortColumnSelect } from "./sort-column-select.js";
|
|
6
|
-
import { SortValueSelect } from "./sort-value-select.js";
|
|
7
|
-
import { SortDirectionSelect } from "./sort-direction-select.js";
|
|
8
|
-
import { SortAdd } from "./sort-add.js";
|
|
9
|
-
import { SortRemove } from "./sort-remove.js";
|
|
10
|
-
import { SortCancel } from "./sort-cancel.js";
|
|
11
|
-
import { SortClear } from "./sort-clear.js";
|
|
12
|
-
import { SortApply } from "./sort-apply.js";
|
|
13
|
-
export const SortManager = {
|
|
14
|
-
Root,
|
|
15
|
-
Row: SortRow,
|
|
16
|
-
Rows: SortRows,
|
|
17
|
-
ColumnSelect: SortColumnSelect,
|
|
18
|
-
ValueSelect: SortValueSelect,
|
|
19
|
-
DirectionSelect: SortDirectionSelect,
|
|
20
|
-
Add: SortAdd,
|
|
21
|
-
Remove: SortRemove,
|
|
22
|
-
Cancel: SortCancel,
|
|
23
|
-
Clear: SortClear,
|
|
24
|
-
Apply: SortApply,
|
|
25
|
-
useSortManager,
|
|
26
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
2
|
-
export interface SortRemoveProps {
|
|
3
|
-
readonly as?: SlotComponent<{
|
|
4
|
-
onRemove: () => void;
|
|
5
|
-
}>;
|
|
6
|
-
}
|
|
7
|
-
export declare const SortRemove: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & SortRemoveProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useSlot } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { useSortRowCtx } from "./context.js";
|
|
5
|
-
export const SortRemove = forwardRef(function SortRemove({ as, ...props }, forwarded) {
|
|
6
|
-
const row = useSortRowCtx();
|
|
7
|
-
const renderer = useSlot({
|
|
8
|
-
props: [typeof as !== "function" ? { onClick: row.onDelete } : {}, props],
|
|
9
|
-
ref: forwarded,
|
|
10
|
-
slot: as ?? _jsx("button", { children: "x" }),
|
|
11
|
-
state: { onAdd: row.onDelete },
|
|
12
|
-
});
|
|
13
|
-
return renderer;
|
|
14
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SortRowItem } from "./hooks/use-sort-row-item.js";
|
|
2
|
-
export interface SortRowProps {
|
|
3
|
-
readonly row: SortRowItem;
|
|
4
|
-
}
|
|
5
|
-
export declare const SortRow: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & SortRowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { Item } from "../listbox/item.js";
|
|
4
|
-
import { rowContext } from "./context.js";
|
|
5
|
-
export const SortRow = forwardRef(function SortRow({ row, ...props }, forwarded) {
|
|
6
|
-
return (_jsx(rowContext.Provider, { value: row, children: _jsx(Item, { ...props, ref: forwarded }) }));
|
|
7
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SortRows: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
2
|
-
import type { Option } from "./+types";
|
|
3
|
-
export interface SortValueSelectProps {
|
|
4
|
-
readonly as?: SlotComponent<{
|
|
5
|
-
options: Option[];
|
|
6
|
-
onSelect: (v: Option | null) => void;
|
|
7
|
-
value: Option | null;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
11
|
-
export declare const SortValueSelect: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & SortValueSelectProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useSlot } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { useSortRowCtx } from "./context.js";
|
|
5
|
-
export const SortValueSelect = forwardRef(function SortValueSelect({ as, ...props }, forwarded) {
|
|
6
|
-
const row = useSortRowCtx();
|
|
7
|
-
const el = (_jsxs("select", { "aria-label": "Select sort value", value: row.sortSelected?.value ?? "", onChange: (e) => {
|
|
8
|
-
const item = row.sortOptions.find((c) => c.value === e.target.value);
|
|
9
|
-
row.sortOnSelect(item ?? null);
|
|
10
|
-
}, disabled: !row.sortOptions.length, children: [_jsx("option", { value: "", children: "Select..." }), row.sortOptions.map((c) => {
|
|
11
|
-
return (_jsx("option", { value: c.value, children: c.label }, c.value));
|
|
12
|
-
})] }));
|
|
13
|
-
const renderer = useSlot({
|
|
14
|
-
props: [props],
|
|
15
|
-
ref: forwarded,
|
|
16
|
-
slot: as ?? el,
|
|
17
|
-
state: {
|
|
18
|
-
options: row.sortOptions,
|
|
19
|
-
value: row.sortSelected,
|
|
20
|
-
onSelect: row.sortOnSelect,
|
|
21
|
-
disabled: !row.sortOptions.length,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
return renderer;
|
|
25
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export function sortItemsToSortModel(sortItems, lookup) {
|
|
2
|
-
return sortItems
|
|
3
|
-
.filter((c) => {
|
|
4
|
-
if (c.isCustom)
|
|
5
|
-
return true;
|
|
6
|
-
if (!c.columnId)
|
|
7
|
-
return false;
|
|
8
|
-
if (!c.sortOn)
|
|
9
|
-
return false;
|
|
10
|
-
if (!lookup.has(c.columnId))
|
|
11
|
-
return false;
|
|
12
|
-
return true;
|
|
13
|
-
})
|
|
14
|
-
.map((c) => {
|
|
15
|
-
const col = lookup.get(c.columnId);
|
|
16
|
-
if (c.isCustom) {
|
|
17
|
-
return c.originalSort;
|
|
18
|
-
}
|
|
19
|
-
if (col.type === "number") {
|
|
20
|
-
return {
|
|
21
|
-
columnId: col.id,
|
|
22
|
-
isDescending: c.sortDirection === "descending",
|
|
23
|
-
sort: {
|
|
24
|
-
columnId: col.id,
|
|
25
|
-
kind: "number",
|
|
26
|
-
options: {
|
|
27
|
-
absoluteValue: c.sortOn.includes("absolute"),
|
|
28
|
-
nullsFirst: c.sortOn.includes("nulls_first"),
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
if (col.type === "date" || col.type === "datetime") {
|
|
34
|
-
return {
|
|
35
|
-
columnId: col.id,
|
|
36
|
-
isDescending: c.sortDirection === "descending",
|
|
37
|
-
sort: {
|
|
38
|
-
columnId: col.id,
|
|
39
|
-
kind: "date",
|
|
40
|
-
options: {
|
|
41
|
-
includeTime: col.type === "datetime",
|
|
42
|
-
nullsFirst: c.sortOn.includes("nulls_first"),
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
columnId: col.id,
|
|
49
|
-
isDescending: c.sortDirection === "descending",
|
|
50
|
-
sort: {
|
|
51
|
-
columnId: col.id,
|
|
52
|
-
kind: "string",
|
|
53
|
-
options: {
|
|
54
|
-
caseInsensitive: c.sortOn?.includes("insensitive"),
|
|
55
|
-
ignorePunctuation: c.sortOn?.includes("ignore"),
|
|
56
|
-
nullsFirst: c.sortOn?.includes("nulls_first"),
|
|
57
|
-
trimWhitespace: c.sortOn?.includes("trim"),
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export function sortModelToSortItems(items, lookup) {
|
|
2
|
-
return items
|
|
3
|
-
.map((c) => {
|
|
4
|
-
const columnId = c.columnId;
|
|
5
|
-
const sortDirection = c.isDescending ? "descending" : "ascending";
|
|
6
|
-
if (c.sort.kind === "custom") {
|
|
7
|
-
return {
|
|
8
|
-
isCustom: true,
|
|
9
|
-
sortDirection,
|
|
10
|
-
columnId: c.columnId ?? undefined,
|
|
11
|
-
originalSort: c,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const column = lookup.get(columnId);
|
|
15
|
-
if (!column)
|
|
16
|
-
return;
|
|
17
|
-
let value = "values";
|
|
18
|
-
if (c.sort.kind === "string") {
|
|
19
|
-
const opts = c.sort.options;
|
|
20
|
-
if (opts?.nullsFirst)
|
|
21
|
-
value += "_nulls_first";
|
|
22
|
-
if (opts?.caseInsensitive)
|
|
23
|
-
value += "_insensitive";
|
|
24
|
-
if (opts?.ignorePunctuation)
|
|
25
|
-
value += "_ignore";
|
|
26
|
-
if (opts?.trimWhitespace)
|
|
27
|
-
value += "_trim";
|
|
28
|
-
}
|
|
29
|
-
if (c.sort.kind === "number") {
|
|
30
|
-
const opts = c.sort.options;
|
|
31
|
-
if (opts?.nullsFirst)
|
|
32
|
-
value += "_nulls_first";
|
|
33
|
-
if (opts?.absoluteValue)
|
|
34
|
-
value += "_absolute";
|
|
35
|
-
}
|
|
36
|
-
if (c.sort.kind === "date") {
|
|
37
|
-
const opts = c.sort.options;
|
|
38
|
-
if (opts?.nullsFirst)
|
|
39
|
-
value += "_nulls_first";
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
isCustom: false,
|
|
43
|
-
columnId,
|
|
44
|
-
sortDirection,
|
|
45
|
-
label: column?.name ?? column?.id,
|
|
46
|
-
sortOn: value,
|
|
47
|
-
};
|
|
48
|
-
})
|
|
49
|
-
.filter((c) => c != null);
|
|
50
|
-
}
|
package/dist/state/+types.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { LayoutState, WriteSignal } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
import type { Column, EditActivePosition, GridAtom, GridAtomReadonly, HeaderGroupCellLayout, PositionUnion, VirtualTarget } from "../+types";
|
|
3
|
-
import type { DataRectSplit } from "../cell-selection/split-cell-selection-rect";
|
|
4
|
-
export interface InternalAtoms {
|
|
5
|
-
readonly headerRows: GridAtomReadonly<number>;
|
|
6
|
-
readonly headerCols: GridAtomReadonly<number>;
|
|
7
|
-
readonly headerHeightTotal: GridAtomReadonly<number>;
|
|
8
|
-
readonly xScroll: GridAtom<number>;
|
|
9
|
-
readonly yScroll: GridAtom<number>;
|
|
10
|
-
readonly layout: LayoutState;
|
|
11
|
-
readonly hasSpans: GridAtomReadonly<boolean>;
|
|
12
|
-
readonly colBounds: GridAtomReadonly<[number, number]>;
|
|
13
|
-
readonly focusActive: GridAtom<PositionUnion | null>;
|
|
14
|
-
readonly focusPrevColIndex: GridAtom<number | null>;
|
|
15
|
-
readonly focusPrevRowIndex: GridAtom<number | null>;
|
|
16
|
-
readonly editActivePos: GridAtom<EditActivePosition<any> | null>;
|
|
17
|
-
readonly editData: GridAtom<any>;
|
|
18
|
-
readonly editValidation: GridAtom<Record<string, any> | boolean>;
|
|
19
|
-
readonly rowAutoHeightCache: GridAtom<Record<number, number>>;
|
|
20
|
-
readonly rowDetailAutoHeightCache: GridAtom<Record<number, number>>;
|
|
21
|
-
readonly rowSelectedIds: WriteSignal<Set<string>>;
|
|
22
|
-
readonly rowSelectionPivot: GridAtom<string | null>;
|
|
23
|
-
readonly rowSelectionLastWasDeselect: GridAtom<boolean>;
|
|
24
|
-
readonly rowGroupColumnState: GridAtom<Record<string, Partial<Column<any>>>>;
|
|
25
|
-
readonly draggingHeader: GridAtom<HeaderGroupCellLayout | null>;
|
|
26
|
-
readonly dialogFrames: GridAtom<Record<string, any>>;
|
|
27
|
-
readonly popoverFrames: GridAtom<Record<string, {
|
|
28
|
-
target: HTMLElement | VirtualTarget;
|
|
29
|
-
context: any;
|
|
30
|
-
}>>;
|
|
31
|
-
readonly cellSelectionPivot: GridAtom<DataRectSplit | null>;
|
|
32
|
-
readonly cellSelectionAdditiveRects: GridAtom<DataRectSplit[] | null>;
|
|
33
|
-
readonly cellSelectionIsDeselect: GridAtom<boolean>;
|
|
34
|
-
readonly cellSelectionSplits: GridAtomReadonly<DataRectSplit[]>;
|
|
35
|
-
}
|
package/dist/state/+types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { CONTAINS_DEAD_CELLS, FULL_WIDTH, updateLayout } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
import { getSpanFn } from "../helpers/get-span-callback.js";
|
|
3
|
-
import { getFullWidthCallback } from "../helpers/get-full-width-callback.js";
|
|
4
|
-
export const makeCellRoot = (grid) => {
|
|
5
|
-
return (row, column) => {
|
|
6
|
-
const l = grid.internal.layout;
|
|
7
|
-
const meta = grid.state.columnMeta.get();
|
|
8
|
-
const ds = grid.state.rowDataStore;
|
|
9
|
-
// Is this a valid position.
|
|
10
|
-
if (row < 0 || row >= ds.rowCount.get())
|
|
11
|
-
return null;
|
|
12
|
-
if (column < 0 || column >= meta.columnsVisible.length)
|
|
13
|
-
return null;
|
|
14
|
-
const rds = grid.state.rowDataSource.get();
|
|
15
|
-
const columns = meta.columnsVisible;
|
|
16
|
-
const rowFullWidthPredicate = grid.state.rowFullWidthPredicate.get();
|
|
17
|
-
if (!l.computed[row]) {
|
|
18
|
-
updateLayout({
|
|
19
|
-
base: l.base,
|
|
20
|
-
computed: l.computed,
|
|
21
|
-
lookup: l.lookup,
|
|
22
|
-
special: l.special,
|
|
23
|
-
botCount: ds.rowBottomCount.get(),
|
|
24
|
-
topCount: ds.rowTopCount.get(),
|
|
25
|
-
startCount: meta.columnVisibleStartCount,
|
|
26
|
-
centerCount: meta.columnVisibleCenterCount,
|
|
27
|
-
endCount: meta.columnVisibleEndCount,
|
|
28
|
-
computeColSpan: getSpanFn(rds, grid, columns, "col"),
|
|
29
|
-
computeRowSpan: getSpanFn(rds, grid, columns, "row"),
|
|
30
|
-
isFullWidth: getFullWidthCallback(rds, rowFullWidthPredicate.fn, grid),
|
|
31
|
-
isRowCutoff: (r) => {
|
|
32
|
-
const row = rds.rowByIndex(r);
|
|
33
|
-
return !row || row.kind === "branch";
|
|
34
|
-
},
|
|
35
|
-
rowStart: row,
|
|
36
|
-
rowEnd: row + 1,
|
|
37
|
-
rowMax: ds.rowCenterCount.get() + ds.rowTopCount.get(),
|
|
38
|
-
rowScanDistance: grid.state.rowScanDistance.get(),
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
const status = l.special[row];
|
|
42
|
-
if (status === FULL_WIDTH) {
|
|
43
|
-
return { kind: "full-width", rowIndex: row, colIndex: 0 };
|
|
44
|
-
}
|
|
45
|
-
if (status === CONTAINS_DEAD_CELLS) {
|
|
46
|
-
const spec = l.lookup.get(row);
|
|
47
|
-
// This cell is not covered
|
|
48
|
-
if (!spec || spec[column * 4] !== 0) {
|
|
49
|
-
return { kind: "cell", rowIndex: row, colIndex: column, root: null };
|
|
50
|
-
}
|
|
51
|
-
const rowSpan = spec[column * 4];
|
|
52
|
-
const colSpan = spec[column * 4 + 1];
|
|
53
|
-
const rowIndex = spec[column * 4 + 2];
|
|
54
|
-
const colIndex = spec[column * 4 + 3];
|
|
55
|
-
return {
|
|
56
|
-
kind: "cell",
|
|
57
|
-
rowIndex: row,
|
|
58
|
-
colIndex: column,
|
|
59
|
-
root: { colIndex, colSpan, rowIndex, rowSpan },
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
return { kind: "cell", rowIndex: row, colIndex: column, root: null };
|
|
63
|
-
};
|
|
64
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { measureText } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
import { resolveColumn } from "../helpers/resolve-column.js";
|
|
3
|
-
export const makeColumnAutosize = (grid) => {
|
|
4
|
-
return (params) => {
|
|
5
|
-
const errorRef = { current: false };
|
|
6
|
-
const meta = grid.state.columnMeta.get();
|
|
7
|
-
const columns = params.columns
|
|
8
|
-
?.map((c) => resolveColumn(c, errorRef, meta))
|
|
9
|
-
.map((c) => c && (typeof c === "string" ? grid.api.columnById(c) : c))
|
|
10
|
-
.filter(Boolean) ?? grid.state.columnMeta.get().columnsVisible;
|
|
11
|
-
if (errorRef.current) {
|
|
12
|
-
console.error("Invalid column autosize column params");
|
|
13
|
-
return {};
|
|
14
|
-
}
|
|
15
|
-
if (columns.length === 0)
|
|
16
|
-
return {};
|
|
17
|
-
const base = grid.state.columnBase.get();
|
|
18
|
-
const result = {};
|
|
19
|
-
const bounds = grid.state.viewBounds.get();
|
|
20
|
-
const rowFirstVisible = bounds.rowCenterStart;
|
|
21
|
-
const rowLastVisible = bounds.rowCenterEnd;
|
|
22
|
-
const rowTopCount = grid.state.rowDataStore.rowTopCount.get();
|
|
23
|
-
const rowBottomCount = grid.state.rowDataStore.rowBottomCount.get();
|
|
24
|
-
const rowCount = grid.state.rowDataStore.rowCount.get();
|
|
25
|
-
const rowStart = Math.max(rowFirstVisible, 0);
|
|
26
|
-
const rowEnd = rowLastVisible === 0 ? Math.min(50, rowCount - rowBottomCount) : rowLastVisible;
|
|
27
|
-
calculateWidths(rowStart, rowEnd);
|
|
28
|
-
if (rowTopCount)
|
|
29
|
-
calculateWidths(0, rowTopCount);
|
|
30
|
-
if (rowBottomCount)
|
|
31
|
-
calculateWidths(rowCount - rowBottomCount, rowCount);
|
|
32
|
-
if (params?.includeHeader) {
|
|
33
|
-
for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {
|
|
34
|
-
const column = columns[columnIndex];
|
|
35
|
-
const autoFn = column.autosizeHeaderFn ?? base.autosizeHeaderFn ?? defaultAutosizeHeader;
|
|
36
|
-
const width = autoFn({ grid, column: column });
|
|
37
|
-
if (width != null)
|
|
38
|
-
result[column.id] = Math.max(width, result[column.id]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (params?.dryRun)
|
|
42
|
-
return result;
|
|
43
|
-
const updates = Object.fromEntries(Object.entries(result).map(([key, v]) => [key, { width: v }]));
|
|
44
|
-
grid.api.columnUpdate(updates);
|
|
45
|
-
return result;
|
|
46
|
-
function calculateWidths(start, end) {
|
|
47
|
-
for (let rowIndex = start; rowIndex < end; rowIndex++) {
|
|
48
|
-
const row = grid.api.rowByIndex(rowIndex);
|
|
49
|
-
if (!row)
|
|
50
|
-
continue;
|
|
51
|
-
for (let i = 0; i < columns.length; i++) {
|
|
52
|
-
const column = columns[i];
|
|
53
|
-
const autoFn = column.autosizeCellFn ?? base.autosizeCellFn ?? defaultAutosize;
|
|
54
|
-
const width = autoFn({ column, grid, row });
|
|
55
|
-
result[column.id] ??= 0;
|
|
56
|
-
if (width != null)
|
|
57
|
-
result[column.id] = Math.max(width, result[column.id]);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
function defaultAutosize(c) {
|
|
64
|
-
const field = c.grid.api.columnField(c.column, c.row.kind === "leaf"
|
|
65
|
-
? { kind: "leaf", data: c.row.data }
|
|
66
|
-
: { kind: "branch", data: c.row.data, key: c.row.key });
|
|
67
|
-
return measureText(`${field}`, c.grid.state.viewport.get() ?? undefined).width + 8;
|
|
68
|
-
}
|
|
69
|
-
function defaultAutosizeHeader(c) {
|
|
70
|
-
const text = c.column.name ?? c.column.id;
|
|
71
|
-
return measureText(text, c.grid.state.viewport.get() ?? undefined).width + 8;
|
|
72
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { get } from "@1771technologies/lytenyte-js-utils";
|
|
2
|
-
export const makeColumnField = (grid) => {
|
|
3
|
-
return (c, d) => {
|
|
4
|
-
const meta = grid.state.columnMeta.get();
|
|
5
|
-
const column = typeof c === "string" ? meta.columnLookup.get(c) : c;
|
|
6
|
-
if (!column) {
|
|
7
|
-
console.error(`Attempting to compute the field of a column that is not defined: ${c}`);
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
const field = column.field ?? column.id;
|
|
11
|
-
if (d.kind === "branch") {
|
|
12
|
-
if (typeof field === "function")
|
|
13
|
-
return field({ column, data: d, grid });
|
|
14
|
-
return d.data?.[column.id];
|
|
15
|
-
}
|
|
16
|
-
const fieldType = typeof field;
|
|
17
|
-
if (fieldType === "string" || fieldType === "number")
|
|
18
|
-
return d.data?.[field];
|
|
19
|
-
if (fieldType === "object")
|
|
20
|
-
return get(d.data, field.path);
|
|
21
|
-
return field({ column, data: d, grid });
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const makeColumnGroupToggle = (grid) => {
|
|
2
|
-
return (group, state) => {
|
|
3
|
-
const delimiter = grid.state.columnGroupJoinDelimiter.get();
|
|
4
|
-
const id = typeof group === "string" ? group : group.join(delimiter);
|
|
5
|
-
const currentExpansions = grid.state.columnGroupExpansions.get();
|
|
6
|
-
const currentState = currentExpansions[id] ?? grid.state.columnGroupDefaultExpansion.get();
|
|
7
|
-
const next = state ?? !currentState;
|
|
8
|
-
grid.state.columnGroupExpansions.set((prev) => ({ ...prev, [id]: next }));
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { resolveColumn } from "../helpers/resolve-column.js";
|
|
2
|
-
export const makeColumnMove = (grid) => {
|
|
3
|
-
return (params) => {
|
|
4
|
-
const meta = grid.state.columnMeta.get();
|
|
5
|
-
const errorRef = { current: false };
|
|
6
|
-
const colSet = new Set(params.moveColumns.map((c) => {
|
|
7
|
-
return resolveColumn(c, errorRef, meta);
|
|
8
|
-
}));
|
|
9
|
-
const dest = resolveColumn(params.moveTarget, errorRef, meta);
|
|
10
|
-
if (errorRef.current)
|
|
11
|
-
return;
|
|
12
|
-
if (colSet.has(dest)) {
|
|
13
|
-
console.error(`Destination column cannot be in the move columns`);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const columns = grid.state.columns.get();
|
|
17
|
-
const columnsToMove = columns.filter((c) => colSet.has(c.id));
|
|
18
|
-
const nextColumns = columns.filter((c) => !colSet.has(c.id));
|
|
19
|
-
const indexOfDest = nextColumns.findIndex((c) => c.id === dest);
|
|
20
|
-
const destCol = nextColumns[indexOfDest];
|
|
21
|
-
let stop = false;
|
|
22
|
-
grid.api.eventFire("columnMoveBegin", {
|
|
23
|
-
grid,
|
|
24
|
-
before: !!params.before,
|
|
25
|
-
moveColumns: columnsToMove,
|
|
26
|
-
moveTarget: destCol,
|
|
27
|
-
preventDefault: () => {
|
|
28
|
-
stop = true;
|
|
29
|
-
},
|
|
30
|
-
updatePinState: !!params.updatePinState,
|
|
31
|
-
});
|
|
32
|
-
if (stop)
|
|
33
|
-
return;
|
|
34
|
-
const offset = params.before ? 0 : 1;
|
|
35
|
-
nextColumns.splice(indexOfDest + offset, 0, ...columnsToMove);
|
|
36
|
-
grid.state.columns.set(nextColumns);
|
|
37
|
-
if (params.updatePinState) {
|
|
38
|
-
const updates = Object.fromEntries(columnsToMove.map((c) => [c.id, { pin: destCol.pin ?? null }]));
|
|
39
|
-
grid.api.columnUpdate(updates);
|
|
40
|
-
}
|
|
41
|
-
grid.api.eventFire("columnMoveEnd", {
|
|
42
|
-
grid,
|
|
43
|
-
before: !!params.before,
|
|
44
|
-
moveColumns: columnsToMove,
|
|
45
|
-
moveTarget: destCol,
|
|
46
|
-
updatePinState: !!params.updatePinState,
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const makeColumnResize = (grid) => {
|
|
2
|
-
return (updates) => {
|
|
3
|
-
const api = grid.api;
|
|
4
|
-
const columnUpdates = Object.fromEntries(Object.entries(updates)
|
|
5
|
-
.map(([c, v]) => [c, { width: v }])
|
|
6
|
-
.filter((c) => api.columnById(c[0])));
|
|
7
|
-
api.columnUpdate(columnUpdates);
|
|
8
|
-
};
|
|
9
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { GROUP_COLUMN_PREFIX } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
export const makeColumnUpdate = (grid) => {
|
|
3
|
-
return (updates) => {
|
|
4
|
-
const columns = [...grid.state.columns.get()];
|
|
5
|
-
const groupColumns = grid.state.columnMeta
|
|
6
|
-
.get()
|
|
7
|
-
.columnsVisible.filter((c) => c.id.startsWith(GROUP_COLUMN_PREFIX));
|
|
8
|
-
const groupState = { ...grid.internal.rowGroupColumnState.get() };
|
|
9
|
-
for (let i = 0; i < groupColumns.length; i++) {
|
|
10
|
-
const column = groupColumns[i];
|
|
11
|
-
if (updates[column.id]) {
|
|
12
|
-
const next = { ...groupState[column.id], ...updates[column.id] };
|
|
13
|
-
groupState[column.id] = next;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
grid.internal.rowGroupColumnState.set(groupState);
|
|
17
|
-
for (let i = 0; i < columns.length; i++) {
|
|
18
|
-
const column = columns[i];
|
|
19
|
-
if (updates[column.id]) {
|
|
20
|
-
const next = { ...column, ...updates[column.id] };
|
|
21
|
-
columns[i] = next;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
grid.state.columns.set(columns);
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { InternalAtoms } from "../+types.js";
|
|
2
|
-
import type { Grid, GridApi } from "../../+types";
|
|
3
|
-
export declare const makeDialogFrameOpen: (grid: Grid<any> & {
|
|
4
|
-
internal: InternalAtoms;
|
|
5
|
-
}) => GridApi<any>["dialogFrameOpen"];
|
|
6
|
-
export declare const makeDialogFrameClose: (grid: Grid<any> & {
|
|
7
|
-
internal: InternalAtoms;
|
|
8
|
-
}) => GridApi<any>["dialogFrameClose"];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const makeDialogFrameOpen = (grid) => {
|
|
2
|
-
return (id, context) => {
|
|
3
|
-
grid.internal.dialogFrames.set((prev) => ({ ...prev, [id]: context }));
|
|
4
|
-
};
|
|
5
|
-
};
|
|
6
|
-
export const makeDialogFrameClose = (grid) => {
|
|
7
|
-
return (id) => {
|
|
8
|
-
grid.internal.dialogFrames.set((prev) => {
|
|
9
|
-
if (!id)
|
|
10
|
-
return {};
|
|
11
|
-
const next = { ...prev };
|
|
12
|
-
delete next[id];
|
|
13
|
-
return next;
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
};
|