@1771technologies/lytenyte-pro 1.0.12-dev.1 → 1.0.12-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/+types.d.ts +5796 -0
- package/dist/+types.js +1 -0
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +2 -0
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +43 -0
- package/dist/cell-selection/are-rects-equal.d.ts +2 -0
- package/dist/cell-selection/are-rects-equal.js +6 -0
- package/dist/cell-selection/bound-selection-rect.d.ts +2 -0
- package/dist/cell-selection/bound-selection-rect.js +17 -0
- package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
- package/dist/cell-selection/cell-selection-containers.js +91 -0
- package/dist/cell-selection/cell-selection-driver.d.ts +1 -0
- package/dist/cell-selection/cell-selection-driver.js +285 -0
- package/dist/cell-selection/cell-style-row.d.ts +8 -0
- package/dist/cell-selection/cell-style-row.js +84 -0
- package/dist/cell-selection/deselect-rect-range.d.ts +2 -0
- package/dist/cell-selection/deselect-rect-range.js +43 -0
- package/dist/cell-selection/expand-cell-selection-down.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-down.js +39 -0
- package/dist/cell-selection/expand-cell-selection-end.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-end.js +40 -0
- package/dist/cell-selection/expand-cell-selection-start.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-start.js +39 -0
- package/dist/cell-selection/expand-cell-selection-up.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-up.js +39 -0
- package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
- package/dist/cell-selection/full-width-start-end-index.js +5 -0
- package/dist/cell-selection/get-root-cell.d.ts +2 -0
- package/dist/cell-selection/get-root-cell.js +6 -0
- package/dist/cell-selection/index.d.ts +18 -0
- package/dist/cell-selection/index.js +18 -0
- package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
- package/dist/cell-selection/is-bottom-rect.js +7 -0
- package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
- package/dist/cell-selection/is-center-col-rect.js +5 -0
- package/dist/cell-selection/is-center-rect.d.ts +2 -0
- package/dist/cell-selection/is-center-rect.js +5 -0
- package/dist/cell-selection/is-end-rect.d.ts +5 -0
- package/dist/cell-selection/is-end-rect.js +4 -0
- package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
- package/dist/cell-selection/is-overlapping-rect.js +6 -0
- package/dist/cell-selection/is-start-rect.d.ts +5 -0
- package/dist/cell-selection/is-start-rect.js +4 -0
- package/dist/cell-selection/is-top-rect.d.ts +2 -0
- package/dist/cell-selection/is-top-rect.js +4 -0
- package/dist/cell-selection/is-within-selection-rect.d.ts +2 -0
- package/dist/cell-selection/is-within-selection-rect.js +3 -0
- package/dist/cell-selection/split-cell-selection-rect.d.ts +46 -0
- package/dist/cell-selection/split-cell-selection-rect.js +88 -0
- package/dist/cell-selection/split-on-pivot.d.ts +3 -0
- package/dist/cell-selection/split-on-pivot.js +50 -0
- package/dist/cell-selection/update-additive-cell-selection.d.ts +5 -0
- package/dist/cell-selection/update-additive-cell-selection.js +23 -0
- package/dist/cell-selection/use-edge-scroll.d.ts +10 -0
- package/dist/cell-selection/use-edge-scroll.js +66 -0
- package/dist/cells/+types.cell.d.ts +13 -0
- package/dist/cells/+types.cell.js +1 -0
- package/dist/cells/cell-default.d.ts +2 -0
- package/dist/cells/cell-default.js +8 -0
- package/dist/cells/cell-editor.d.ts +6 -0
- package/dist/cells/cell-editor.js +103 -0
- package/dist/cells/cell-spacer.d.ts +9 -0
- package/dist/cells/cell-spacer.js +34 -0
- package/dist/cells/cell.d.ts +5 -0
- package/dist/cells/cell.js +43 -0
- package/dist/cells/use-cell-style.d.ts +3 -0
- package/dist/cells/use-cell-style.js +51 -0
- package/dist/column-manager/branch-lookup-context.d.ts +4 -0
- package/dist/column-manager/branch-lookup-context.js +3 -0
- package/dist/column-manager/branch.d.ts +15 -0
- package/dist/column-manager/branch.js +54 -0
- package/dist/column-manager/column-manager.d.ts +13 -0
- package/dist/column-manager/column-manager.js +18 -0
- package/dist/column-manager/context.d.ts +7 -0
- package/dist/column-manager/context.js +3 -0
- package/dist/column-manager/label.d.ts +5 -0
- package/dist/column-manager/label.js +18 -0
- package/dist/column-manager/leaf.d.ts +6 -0
- package/dist/column-manager/leaf.js +58 -0
- package/dist/column-manager/move-handle.d.ts +5 -0
- package/dist/column-manager/move-handle.js +73 -0
- package/dist/column-manager/panel.d.ts +1 -0
- package/dist/column-manager/panel.js +2 -0
- package/dist/column-manager/root.d.ts +8 -0
- package/dist/column-manager/root.js +7 -0
- package/dist/column-manager/use-column-manager.d.ts +10 -0
- package/dist/column-manager/use-column-manager.js +24 -0
- package/dist/column-manager/use-columns-from-context.d.ts +3 -0
- package/dist/column-manager/use-columns-from-context.js +23 -0
- package/dist/column-manager/visibility-checkbox.d.ts +9 -0
- package/dist/column-manager/visibility-checkbox.js +30 -0
- package/dist/context.d.ts +10 -0
- package/dist/context.js +4 -0
- package/dist/filter-tree/branch.d.ts +13 -0
- package/dist/filter-tree/branch.js +21 -0
- package/dist/filter-tree/context.d.ts +27 -0
- package/dist/filter-tree/context.js +5 -0
- package/dist/filter-tree/filter-tree.d.ts +14 -0
- package/dist/filter-tree/filter-tree.js +18 -0
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +38 -0
- package/dist/filter-tree/hooks/use-filter-tree.js +101 -0
- package/dist/filter-tree/hooks/use-tree-item.d.ts +8 -0
- package/dist/filter-tree/hooks/use-tree-item.js +116 -0
- package/dist/filter-tree/inclusion-checkbox.d.ts +9 -0
- package/dist/filter-tree/inclusion-checkbox.js +14 -0
- package/dist/filter-tree/label.d.ts +5 -0
- package/dist/filter-tree/label.js +18 -0
- package/dist/filter-tree/leaf.d.ts +6 -0
- package/dist/filter-tree/leaf.js +14 -0
- package/dist/filter-tree/root.d.ts +13 -0
- package/dist/filter-tree/root.js +30 -0
- package/dist/grid-box/+types.d.ts +15 -0
- package/dist/grid-box/+types.js +1 -0
- package/dist/grid-box/context.d.ts +9 -0
- package/dist/grid-box/context.js +3 -0
- package/dist/grid-box/grid-box.d.ts +12 -0
- package/dist/grid-box/grid-box.js +14 -0
- package/dist/grid-box/item.d.ts +10 -0
- package/dist/grid-box/item.js +63 -0
- package/dist/grid-box/panel.d.ts +1 -0
- package/dist/grid-box/panel.js +9 -0
- package/dist/grid-box/root.d.ts +9 -0
- package/dist/grid-box/root.js +8 -0
- package/dist/grid-box/use-aggregation-box-items.d.ts +18 -0
- package/dist/grid-box/use-aggregation-box-items.js +61 -0
- package/dist/grid-box/use-column-box-items.d.ts +34 -0
- package/dist/grid-box/use-column-box-items.js +78 -0
- package/dist/grid-box/use-row-group-box-items.d.ts +18 -0
- package/dist/grid-box/use-row-group-box-items.js +169 -0
- package/dist/grid-provider/context.d.ts +5 -0
- package/dist/grid-provider/context.js +2 -0
- package/dist/grid-provider/provider.d.ts +3 -0
- package/dist/grid-provider/provider.js +2 -0
- package/dist/grid-provider/use-grid.d.ts +3 -0
- package/dist/grid-provider/use-grid.js +3 -0
- package/dist/grid.d.ts +18 -0
- package/dist/grid.js +28 -0
- package/dist/header/header-cell.d.ts +10 -0
- package/dist/header/header-cell.js +22 -0
- package/dist/header/header-group-cell.d.ts +5 -0
- package/dist/header/header-group-cell.js +16 -0
- package/dist/header/header-row.d.ts +4 -0
- package/dist/header/header-row.js +10 -0
- package/dist/header/header.d.ts +1 -0
- package/dist/header/header.js +12 -0
- package/dist/header/resize-handler.d.ts +12 -0
- package/dist/header/resize-handler.js +136 -0
- package/dist/header/use-drag-move.d.ts +14 -0
- package/dist/header/use-drag-move.js +97 -0
- package/dist/header/use-header-cell-renderer.d.ts +4 -0
- package/dist/header/use-header-cell-renderer.js +36 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +3 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/license.d.ts +3 -0
- package/dist/license.js +214 -0
- package/dist/listbox/context.d.ts +6 -0
- package/dist/listbox/context.js +3 -0
- package/dist/listbox/item.d.ts +1 -0
- package/dist/listbox/item.js +25 -0
- package/dist/listbox/panel.d.ts +1 -0
- package/dist/listbox/panel.js +50 -0
- package/dist/listbox/root.d.ts +6 -0
- package/dist/listbox/root.js +12 -0
- package/dist/root/dialog-driver.d.ts +1 -0
- package/dist/root/dialog-driver.js +21 -0
- package/dist/root/popover-driver.d.ts +1 -0
- package/dist/root/popover-driver.js +21 -0
- package/dist/root/root.d.ts +8 -0
- package/dist/root/root.js +125 -0
- package/dist/row-data-source-client/+constants.d.ts +2 -0
- package/dist/row-data-source-client/+constants.js +2 -0
- package/dist/row-data-source-client/+types.d.ts +27 -0
- package/dist/row-data-source-client/+types.js +1 -0
- package/dist/row-data-source-client/built-ins/avg.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/avg.js +16 -0
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +44 -0
- package/dist/row-data-source-client/built-ins/built-ins.js +44 -0
- package/dist/row-data-source-client/built-ins/count.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/count.js +16 -0
- package/dist/row-data-source-client/built-ins/first.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/first.js +12 -0
- package/dist/row-data-source-client/built-ins/group.d.ts +1 -0
- package/dist/row-data-source-client/built-ins/group.js +3 -0
- package/dist/row-data-source-client/built-ins/last.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/last.js +12 -0
- package/dist/row-data-source-client/built-ins/max.d.ts +11 -0
- package/dist/row-data-source-client/built-ins/max.js +25 -0
- package/dist/row-data-source-client/built-ins/min.d.ts +11 -0
- package/dist/row-data-source-client/built-ins/min.js +25 -0
- package/dist/row-data-source-client/built-ins/sum.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/sum.js +21 -0
- package/dist/row-data-source-client/filter/+types.d.ts +23 -0
- package/dist/row-data-source-client/filter/+types.js +1 -0
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +2 -0
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +109 -0
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +6 -0
- package/dist/row-data-source-client/pivots/create-agg-model.js +13 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +50 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +22 -0
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +23 -0
- package/dist/row-data-source-client/tree/client-tree.d.ts +18 -0
- package/dist/row-data-source-client/tree/client-tree.js +76 -0
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +2 -0
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +8 -0
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +2 -0
- package/dist/row-data-source-client/tree/evaluator-group.js +9 -0
- package/dist/row-data-source-client/tree/traverse.d.ts +2 -0
- package/dist/row-data-source-client/tree/traverse.js +22 -0
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +10 -0
- package/dist/row-data-source-client/use-client-data-source-paginated.js +572 -0
- package/dist/row-data-source-client/use-client-data-source.d.ts +10 -0
- package/dist/row-data-source-client/use-client-data-source.js +666 -0
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +9 -0
- package/dist/row-data-source-client/use-client-tree-data-source.js +511 -0
- package/dist/row-data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
- package/dist/row-data-source-server/async-tree/+constants.async-tree.js +1 -0
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +59 -0
- package/dist/row-data-source-server/async-tree/+types.async-tree.js +1 -0
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +36 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +24 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +14 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +18 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +14 -0
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +18 -0
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
- package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/make-async-tree.js +19 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +17 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +52 -0
- package/dist/row-data-source-server/range-tree/range-tree.d.ts +66 -0
- package/dist/row-data-source-server/range-tree/range-tree.js +102 -0
- package/dist/row-data-source-server/server-data.d.ts +48 -0
- package/dist/row-data-source-server/server-data.js +378 -0
- package/dist/row-data-source-server/use-server-data-source.d.ts +3 -0
- package/dist/row-data-source-server/use-server-data-source.js +344 -0
- package/dist/row-data-source-server/utils/get-node-depth.d.ts +2 -0
- package/dist/row-data-source-server/utils/get-node-depth.js +9 -0
- package/dist/row-data-source-server/utils/get-node-path.d.ts +2 -0
- package/dist/row-data-source-server/utils/get-node-path.js +9 -0
- package/dist/row-data-source-server/utils/get-request-id.d.ts +1 -0
- package/dist/row-data-source-server/utils/get-request-id.js +6 -0
- package/dist/rows/row/context.d.ts +14 -0
- package/dist/rows/row/context.js +13 -0
- package/dist/rows/row/row.d.ts +7 -0
- package/dist/rows/row/row.js +25 -0
- package/dist/rows/row/use-row-context-value.d.ts +6 -0
- package/dist/rows/row/use-row-context-value.js +44 -0
- package/dist/rows/row-detail-row.d.ts +4 -0
- package/dist/rows/row-detail-row.js +130 -0
- package/dist/rows/row-full-width.d.ts +8 -0
- package/dist/rows/row-full-width.js +19 -0
- package/dist/rows/rows-container.d.ts +1 -0
- package/dist/rows/rows-container.js +9 -0
- package/dist/rows/rows-sections.d.ts +3 -0
- package/dist/rows/rows-sections.js +27 -0
- package/dist/rows/scrollers/native-scroller.d.ts +2 -0
- package/dist/rows/scrollers/native-scroller.js +4 -0
- package/dist/sort-manager/+types.d.ts +13 -0
- package/dist/sort-manager/+types.js +1 -0
- package/dist/sort-manager/context.d.ts +14 -0
- package/dist/sort-manager/context.js +5 -0
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +15 -0
- package/dist/sort-manager/hooks/use-sort-manager.js +56 -0
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +51 -0
- package/dist/sort-manager/hooks/use-sort-row-item.js +145 -0
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +5 -0
- package/dist/sort-manager/hooks/use-sortable-column-items.js +13 -0
- package/dist/sort-manager/root.d.ts +3 -0
- package/dist/sort-manager/root.js +14 -0
- package/dist/sort-manager/sort-add.d.ts +8 -0
- package/dist/sort-manager/sort-add.js +14 -0
- package/dist/sort-manager/sort-apply.d.ts +7 -0
- package/dist/sort-manager/sort-apply.js +24 -0
- package/dist/sort-manager/sort-cancel.d.ts +7 -0
- package/dist/sort-manager/sort-cancel.js +27 -0
- package/dist/sort-manager/sort-clear.d.ts +7 -0
- package/dist/sort-manager/sort-clear.js +22 -0
- package/dist/sort-manager/sort-column-select.d.ts +10 -0
- package/dist/sort-manager/sort-column-select.js +20 -0
- package/dist/sort-manager/sort-direction-select.d.ts +10 -0
- package/dist/sort-manager/sort-direction-select.js +24 -0
- package/dist/sort-manager/sort-manager.d.ts +16 -0
- package/dist/sort-manager/sort-manager.js +26 -0
- package/dist/sort-manager/sort-remove.d.ts +7 -0
- package/dist/sort-manager/sort-remove.js +14 -0
- package/dist/sort-manager/sort-row.d.ts +5 -0
- package/dist/sort-manager/sort-row.js +7 -0
- package/dist/sort-manager/sort-rows.d.ts +1 -0
- package/dist/sort-manager/sort-rows.js +6 -0
- package/dist/sort-manager/sort-value-select.d.ts +11 -0
- package/dist/sort-manager/sort-value-select.js +25 -0
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +3 -0
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +62 -0
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +3 -0
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +50 -0
- package/dist/state/+types.d.ts +35 -0
- package/dist/state/+types.js +1 -0
- package/dist/state/api/cell-root.d.ts +5 -0
- package/dist/state/api/cell-root.js +64 -0
- package/dist/state/api/column-autosize.d.ts +5 -0
- package/dist/state/api/column-autosize.js +72 -0
- package/dist/state/api/column-by-id.d.ts +2 -0
- package/dist/state/api/column-by-id.js +6 -0
- package/dist/state/api/column-field.d.ts +2 -0
- package/dist/state/api/column-field.js +23 -0
- package/dist/state/api/column-from-index.d.ts +2 -0
- package/dist/state/api/column-from-index.js +6 -0
- package/dist/state/api/column-group-toggle.d.ts +2 -0
- package/dist/state/api/column-group-toggle.js +10 -0
- package/dist/state/api/column-index.d.ts +2 -0
- package/dist/state/api/column-index.js +7 -0
- package/dist/state/api/column-move.d.ts +2 -0
- package/dist/state/api/column-move.js +49 -0
- package/dist/state/api/column-resize.d.ts +2 -0
- package/dist/state/api/column-resize.js +9 -0
- package/dist/state/api/column-update.d.ts +5 -0
- package/dist/state/api/column-update.js +26 -0
- package/dist/state/api/dialog-frame.d.ts +8 -0
- package/dist/state/api/dialog-frame.js +16 -0
- package/dist/state/api/edit-begin.d.ts +5 -0
- package/dist/state/api/edit-begin.js +87 -0
- package/dist/state/api/edit-end.d.ts +5 -0
- package/dist/state/api/edit-end.js +43 -0
- package/dist/state/api/edit-is-cell-active.d.ts +5 -0
- package/dist/state/api/edit-is-cell-active.js +22 -0
- package/dist/state/api/edit-update.d.ts +5 -0
- package/dist/state/api/edit-update.js +88 -0
- package/dist/state/api/event-listeners.d.ts +5 -0
- package/dist/state/api/event-listeners.js +19 -0
- package/dist/state/api/export-csv.d.ts +3 -0
- package/dist/state/api/export-csv.js +40 -0
- package/dist/state/api/export-data-rect.d.ts +2 -0
- package/dist/state/api/export-data-rect.js +24 -0
- package/dist/state/api/focus-cell.d.ts +5 -0
- package/dist/state/api/focus-cell.js +117 -0
- package/dist/state/api/popover-frame.d.ts +8 -0
- package/dist/state/api/popover-frame.js +16 -0
- package/dist/state/api/position-from-element.d.ts +2 -0
- package/dist/state/api/position-from-element.js +9 -0
- package/dist/state/api/row-by-id.d.ts +2 -0
- package/dist/state/api/row-by-id.js +5 -0
- package/dist/state/api/row-by-index.d.ts +2 -0
- package/dist/state/api/row-by-index.js +9 -0
- package/dist/state/api/row-detail-is-expanded.d.ts +2 -0
- package/dist/state/api/row-detail-is-expanded.js +6 -0
- package/dist/state/api/row-detail-rendered-height.d.ts +5 -0
- package/dist/state/api/row-detail-rendered-height.js +14 -0
- package/dist/state/api/row-detail-toggle.d.ts +2 -0
- package/dist/state/api/row-detail-toggle.js +32 -0
- package/dist/state/api/row-group-apply-expansions.d.ts +2 -0
- package/dist/state/api/row-group-apply-expansions.js +20 -0
- package/dist/state/api/row-group-column-index.d.ts +2 -0
- package/dist/state/api/row-group-column-index.js +14 -0
- package/dist/state/api/row-group-is-expanded.d.ts +2 -0
- package/dist/state/api/row-group-is-expanded.js +15 -0
- package/dist/state/api/row-group-toggle.d.ts +2 -0
- package/dist/state/api/row-group-toggle.js +7 -0
- package/dist/state/api/row-handle-select.d.ts +5 -0
- package/dist/state/api/row-handle-select.js +43 -0
- package/dist/state/api/row-select-all.d.ts +2 -0
- package/dist/state/api/row-select-all.js +17 -0
- package/dist/state/api/row-select.d.ts +5 -0
- package/dist/state/api/row-select.js +35 -0
- package/dist/state/api/row-selected.d.ts +2 -0
- package/dist/state/api/row-selected.js +13 -0
- package/dist/state/api/scroll-into-view.d.ts +5 -0
- package/dist/state/api/scroll-into-view.js +50 -0
- package/dist/state/api/sort-for-column.d.ts +2 -0
- package/dist/state/api/sort-for-column.js +9 -0
- package/dist/state/api/use-row-drag.d.ts +2 -0
- package/dist/state/api/use-row-drag.js +19 -0
- package/dist/state/helpers/cell-row-group.d.ts +2 -0
- package/dist/state/helpers/cell-row-group.js +19 -0
- package/dist/state/helpers/column-add-row-group.d.ts +10 -0
- package/dist/state/helpers/column-add-row-group.js +74 -0
- package/dist/state/helpers/column-layout.d.ts +3 -0
- package/dist/state/helpers/column-layout.js +59 -0
- package/dist/state/helpers/column-marker.d.ts +8 -0
- package/dist/state/helpers/column-marker.js +43 -0
- package/dist/state/helpers/column-view.d.ts +21 -0
- package/dist/state/helpers/column-view.js +33 -0
- package/dist/state/helpers/edit-on-change.d.ts +15 -0
- package/dist/state/helpers/edit-on-change.js +27 -0
- package/dist/state/helpers/empty-row-data-source.d.ts +2 -0
- package/dist/state/helpers/empty-row-data-source.js +18 -0
- package/dist/state/helpers/get-data-rect.d.ts +13 -0
- package/dist/state/helpers/get-data-rect.js +65 -0
- package/dist/state/helpers/get-full-width-callback.d.ts +2 -0
- package/dist/state/helpers/get-full-width-callback.js +10 -0
- package/dist/state/helpers/get-span-callback.d.ts +2 -0
- package/dist/state/helpers/get-span-callback.js +22 -0
- package/dist/state/helpers/resolve-column.d.ts +4 -0
- package/dist/state/helpers/resolve-column.js +29 -0
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +17 -0
- package/dist/state/helpers/row-layout/get-focus-criteria.js +62 -0
- package/dist/state/helpers/row-layout/row-layout.d.ts +19 -0
- package/dist/state/helpers/row-layout/row-layout.js +181 -0
- package/dist/state/use-lytenyte.d.ts +3 -0
- package/dist/state/use-lytenyte.js +671 -0
- package/dist/tree-view/branch/branch.d.ts +14 -0
- package/dist/tree-view/branch/branch.js +63 -0
- package/dist/tree-view/branch/use-branch-keys.d.ts +2 -0
- package/dist/tree-view/branch/use-branch-keys.js +87 -0
- package/dist/tree-view/context.d.ts +22 -0
- package/dist/tree-view/context.js +3 -0
- package/dist/tree-view/depth-provider.d.ts +2 -0
- package/dist/tree-view/depth-provider.js +3 -0
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +2 -0
- package/dist/tree-view/hooks/use-tree-view-paths.js +9 -0
- package/dist/tree-view/index.d.ts +16 -0
- package/dist/tree-view/index.js +16 -0
- package/dist/tree-view/leaf.d.ts +4 -0
- package/dist/tree-view/leaf.js +28 -0
- package/dist/tree-view/navigation/get-all-ids.d.ts +1 -0
- package/dist/tree-view/navigation/get-all-ids.js +7 -0
- package/dist/tree-view/navigation/get-first-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-first-node.js +7 -0
- package/dist/tree-view/navigation/get-last-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-last-node.js +7 -0
- package/dist/tree-view/navigation/get-next-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-next-node.js +13 -0
- package/dist/tree-view/navigation/get-prev-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-prev-node.js +13 -0
- package/dist/tree-view/panel/make-handle-navigation.d.ts +2 -0
- package/dist/tree-view/panel/make-handle-navigation.js +39 -0
- package/dist/tree-view/panel/make-handle-selection.d.ts +2 -0
- package/dist/tree-view/panel/make-handle-selection.js +92 -0
- package/dist/tree-view/panel/make-handle-typeahead.d.ts +1 -0
- package/dist/tree-view/panel/make-handle-typeahead.js +45 -0
- package/dist/tree-view/panel/panel.d.ts +1 -0
- package/dist/tree-view/panel/panel.js +30 -0
- package/dist/tree-view/panel/use-tree-navigation.d.ts +1 -0
- package/dist/tree-view/panel/use-tree-navigation.js +63 -0
- package/dist/tree-view/root.d.ts +17 -0
- package/dist/tree-view/root.js +63 -0
- package/dist/tree-view/utils/get-focusable-nodes.d.ts +1 -0
- package/dist/tree-view/utils/get-focusable-nodes.js +5 -0
- package/dist/tree-view/utils/get-focused-node.d.ts +1 -0
- package/dist/tree-view/utils/get-focused-node.js +14 -0
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +1 -0
- package/dist/tree-view/utils/get-ids-between-nodes.js +15 -0
- package/dist/tree-view/utils/get-panel.d.ts +1 -0
- package/dist/tree-view/utils/get-panel.js +7 -0
- package/dist/tree-view/utils/get-parent-node.d.ts +1 -0
- package/dist/tree-view/utils/get-parent-node.js +10 -0
- package/dist/tree-view/utils/get-sibling-branches.d.ts +1 -0
- package/dist/tree-view/utils/get-sibling-branches.js +14 -0
- package/dist/tree-view/utils/get-tree-node-id.d.ts +1 -0
- package/dist/tree-view/utils/get-tree-node-id.js +3 -0
- package/dist/tree-view/utils/is-branch-node.d.ts +1 -0
- package/dist/tree-view/utils/is-branch-node.js +3 -0
- package/dist/tree-view/utils/is-leaf-node.d.ts +1 -0
- package/dist/tree-view/utils/is-leaf-node.js +3 -0
- package/dist/tree-view/utils/is-tree-node-disabled.d.ts +1 -0
- package/dist/tree-view/utils/is-tree-node-disabled.js +3 -0
- package/dist/tree-view/utils/select-node.d.ts +2 -0
- package/dist/tree-view/utils/select-node.js +15 -0
- package/dist/tree-view/utils/toggle-all-selections.d.ts +2 -0
- package/dist/tree-view/utils/toggle-all-selections.js +9 -0
- package/dist/tree-view/utils/toggle-selection.d.ts +2 -0
- package/dist/tree-view/utils/toggle-selection.js +21 -0
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +2 -0
- package/dist/tree-view/virtualized/force-sync-scrolling.js +23 -0
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +2 -0
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +14 -0
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +31 -0
- package/dist/tree-view/virtualized/make-virtual-tree.js +90 -0
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +9 -0
- package/dist/tree-view/virtualized/use-flattened-tree.js +36 -0
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +2 -0
- package/dist/tree-view/virtualized/use-row-start-and-end.js +27 -0
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +22 -0
- package/dist/tree-view/virtualized/use-virtualized-tree.js +100 -0
- package/dist/types/types.d.ts +8 -0
- package/dist/types/types.js +1 -0
- package/dist/utils/cycle-sorts.d.ts +2 -0
- package/dist/utils/cycle-sorts.js +16 -0
- package/dist/viewport/begin-editing.d.ts +5 -0
- package/dist/viewport/begin-editing.js +15 -0
- package/dist/viewport/viewport.d.ts +1 -0
- package/dist/viewport/viewport.js +78 -0
- package/package.json +7 -8
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SortRows: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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"];
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|