@1771technologies/lytenyte-pro 1.0.12-dev.1 → 1.0.12-dev.2
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 +5836 -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 +27 -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 -7
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import type { GridBoxItem } from "./+types";
|
|
3
|
+
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
4
|
+
export interface GridBoxItemProps {
|
|
5
|
+
readonly item: GridBoxItem;
|
|
6
|
+
readonly itemAs?: SlotComponent;
|
|
7
|
+
readonly itemClassName?: string;
|
|
8
|
+
readonly itemStyle?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const BoxItem: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & GridBoxItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Item } from "../listbox/item.js";
|
|
4
|
+
import { dragState, DropWrap, useDraggable } from "@1771technologies/lytenyte-dragon";
|
|
5
|
+
import { useCombinedRefs, useSlot, } from "@1771technologies/lytenyte-react-hooks";
|
|
6
|
+
import { useGridBoxContext } from "./context.js";
|
|
7
|
+
export const BoxItem = forwardRef(function BoxItem({ item, itemAs, itemClassName, itemStyle, children, ...props }, forwarded) {
|
|
8
|
+
const { accepted } = useGridBoxContext();
|
|
9
|
+
const { dragProps } = useDraggable({
|
|
10
|
+
getItems: () => {
|
|
11
|
+
return {
|
|
12
|
+
siteLocalData: item.dragData,
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
placeholder: item.dragPlaceholder ? (_, el) => item.dragPlaceholder(el) : undefined,
|
|
16
|
+
});
|
|
17
|
+
const ref = useCombinedRefs(forwarded, dragProps.ref);
|
|
18
|
+
const extraProps = item.draggable ? { ...dragProps, ref } : { ref: forwarded };
|
|
19
|
+
const renderer = useSlot({
|
|
20
|
+
props: [
|
|
21
|
+
{
|
|
22
|
+
children: (_jsx(Item, { ...extraProps, onKeyDown: (ev) => {
|
|
23
|
+
if (ev.key === " ") {
|
|
24
|
+
item.onAction?.(ev.currentTarget);
|
|
25
|
+
ev.preventDefault();
|
|
26
|
+
}
|
|
27
|
+
if (ev.key === "Backspace" || ev.key === "Delete")
|
|
28
|
+
item.onDelete?.(ev.currentTarget);
|
|
29
|
+
}, onClick: (ev) => item.onAction(ev.currentTarget), className: itemClassName, style: itemStyle, "data-ln-source": item.source, "data-ln-index": item.index, children: children })),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
slot: itemAs ?? _jsx("div", {}),
|
|
33
|
+
});
|
|
34
|
+
return (_jsx(DropWrap, { ...props, active: item.active, onEnter: (e) => {
|
|
35
|
+
const data = dragState.active.get();
|
|
36
|
+
const thisSource = e.getAttribute("data-ln-source");
|
|
37
|
+
const dragSource = data?.getAttribute("data-ln-source");
|
|
38
|
+
if (!data)
|
|
39
|
+
return;
|
|
40
|
+
if (thisSource !== dragSource) {
|
|
41
|
+
e.setAttribute("data-ln-is-after", "true");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const overIndex = Number.parseInt(e.getAttribute("data-ln-index"));
|
|
45
|
+
const dragIndex = Number.parseInt(data.getAttribute("data-ln-index"));
|
|
46
|
+
if (Number.isNaN(dragIndex) || Number.isNaN(overIndex) || overIndex === dragIndex)
|
|
47
|
+
return;
|
|
48
|
+
if (overIndex < dragIndex) {
|
|
49
|
+
e.setAttribute("data-ln-is-before", "true");
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
e.setAttribute("data-ln-is-after", "true");
|
|
53
|
+
}
|
|
54
|
+
}, onLeave: (el) => {
|
|
55
|
+
el.removeAttribute("data-ln-is-before");
|
|
56
|
+
el.removeAttribute("data-ln-is-after");
|
|
57
|
+
}, "data-ln-source": item.source, "data-ln-index": item.index, accepted: item.active === false ? [] : accepted, onDrop: (e) => {
|
|
58
|
+
const el = e.dropElement;
|
|
59
|
+
el.removeAttribute("data-ln-is-before");
|
|
60
|
+
el.removeAttribute("data-ln-is-after");
|
|
61
|
+
item.onDrop(e);
|
|
62
|
+
}, as: renderer }));
|
|
63
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GridBoxPanel: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onDrop">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Panel } from "../listbox/panel.js";
|
|
4
|
+
import { DropWrap } from "@1771technologies/lytenyte-dragon";
|
|
5
|
+
import { useGridBoxContext } from "./context.js";
|
|
6
|
+
export const GridBoxPanel = forwardRef(function GridBoxPanel(props, forwarded) {
|
|
7
|
+
const ctx = useGridBoxContext();
|
|
8
|
+
return (_jsx(DropWrap, { ...props, accepted: ctx.accepted, "data-ln-orientation": ctx.orientation, onDrop: ctx.onRootDrop, ref: forwarded, as: _jsx(Panel, {}) }));
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
import type { DropEventParams, Grid } from "../+types.js";
|
|
3
|
+
export interface GridBoxRootProps<T> {
|
|
4
|
+
readonly orientation?: "vertical" | "horizontal";
|
|
5
|
+
readonly onRootDrop: (p: DropEventParams) => void;
|
|
6
|
+
readonly accepted: string[];
|
|
7
|
+
readonly grid: Grid<T>;
|
|
8
|
+
}
|
|
9
|
+
export declare function GridBoxRoot<T>({ grid, orientation, accepted, onRootDrop, children, }: PropsWithChildren<GridBoxRootProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Root } from "../listbox/root.js";
|
|
4
|
+
import { GridProvider } from "../grid-provider/provider.js";
|
|
5
|
+
import { GridBoxContext } from "./context.js";
|
|
6
|
+
export function GridBoxRoot({ grid, orientation = "vertical", accepted, onRootDrop, children, }) {
|
|
7
|
+
return (_jsx(GridProvider, { value: grid, children: _jsx(GridBoxContext.Provider, { value: useMemo(() => ({ accepted, orientation, onRootDrop }), [accepted, onRootDrop, orientation]), children: _jsx(Root, { orientation: orientation, children: children }) }) }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AggModelFn, DropEventParams, Grid } from "../+types.js";
|
|
2
|
+
import type { GridBoxItem } from "./+types.js";
|
|
3
|
+
export interface UseAggregationBoxItemsProps<T> {
|
|
4
|
+
readonly grid: Grid<T>;
|
|
5
|
+
readonly orientation?: "horizontal" | "vertical";
|
|
6
|
+
}
|
|
7
|
+
export declare function useAggregationBoxItems<T>({ grid, orientation }: UseAggregationBoxItemsProps<T>): {
|
|
8
|
+
rootProps: {
|
|
9
|
+
accepted: string[];
|
|
10
|
+
onRootDrop: (p: DropEventParams) => void;
|
|
11
|
+
orientation: "horizontal" | "vertical" | undefined;
|
|
12
|
+
grid: Grid<T>;
|
|
13
|
+
};
|
|
14
|
+
items: GridBoxItem<{
|
|
15
|
+
id: string;
|
|
16
|
+
agg: AggModelFn<T>;
|
|
17
|
+
}>[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useEvent } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
+
export function useAggregationBoxItems({ grid, orientation }) {
|
|
4
|
+
const model = grid.state.aggModel.useValue();
|
|
5
|
+
const gridId = grid.state.gridId.useValue();
|
|
6
|
+
const items = useMemo(() => {
|
|
7
|
+
const items = Object.entries(model).map(([id, agg], i) => {
|
|
8
|
+
const column = grid.api.columnById(id);
|
|
9
|
+
const name = column?.name ?? column?.id ?? id;
|
|
10
|
+
return {
|
|
11
|
+
draggable: false,
|
|
12
|
+
id,
|
|
13
|
+
index: i,
|
|
14
|
+
source: "aggregation",
|
|
15
|
+
data: { id, agg },
|
|
16
|
+
dragData: {},
|
|
17
|
+
label: name,
|
|
18
|
+
onAction: () => { },
|
|
19
|
+
onDelete: () => {
|
|
20
|
+
grid.state.aggModel.set((prev) => {
|
|
21
|
+
const next = { ...prev };
|
|
22
|
+
delete next[id];
|
|
23
|
+
return next;
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
onDrop: () => { },
|
|
27
|
+
dragPlaceholder: undefined,
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
return items;
|
|
31
|
+
}, [model, grid.api, grid.state.aggModel]);
|
|
32
|
+
const onRootDrop = useEvent((p) => {
|
|
33
|
+
const aggId = `${gridId}-agg`;
|
|
34
|
+
const c = p.state.siteLocalData?.[aggId];
|
|
35
|
+
if (!c)
|
|
36
|
+
return;
|
|
37
|
+
const current = model[c.id];
|
|
38
|
+
if (!current) {
|
|
39
|
+
const base = grid.state.columnBase.get();
|
|
40
|
+
const agg = c.uiHints?.aggDefault ??
|
|
41
|
+
c.uiHints?.aggsAllowed?.[0] ??
|
|
42
|
+
base.uiHints?.aggDefault ??
|
|
43
|
+
base.uiHints?.aggsAllowed?.[0];
|
|
44
|
+
if (!agg)
|
|
45
|
+
return;
|
|
46
|
+
const next = { fn: agg };
|
|
47
|
+
grid.state.aggModel.set((prev) => ({ ...prev, [c.id]: next }));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return useMemo(() => {
|
|
51
|
+
return {
|
|
52
|
+
rootProps: {
|
|
53
|
+
accepted: [`${gridId}-agg`],
|
|
54
|
+
onRootDrop,
|
|
55
|
+
orientation,
|
|
56
|
+
grid,
|
|
57
|
+
},
|
|
58
|
+
items,
|
|
59
|
+
};
|
|
60
|
+
}, [grid, gridId, items, onRootDrop, orientation]);
|
|
61
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Column, DropEventParams, Grid } from "../+types.js";
|
|
2
|
+
import type { GridBoxItem } from "./+types.js";
|
|
3
|
+
export interface OnDropParams<T> {
|
|
4
|
+
readonly target: Column<T>;
|
|
5
|
+
readonly src: Column<T>;
|
|
6
|
+
readonly isBefore: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface OnRootDropParams<T> {
|
|
9
|
+
readonly column: Column<T>;
|
|
10
|
+
}
|
|
11
|
+
export interface OnActionParams<T> {
|
|
12
|
+
readonly column: Column<T>;
|
|
13
|
+
readonly el: HTMLElement;
|
|
14
|
+
}
|
|
15
|
+
export interface UseColumnBoxItemArgs<T> {
|
|
16
|
+
readonly grid: Grid<T>;
|
|
17
|
+
readonly orientation?: "horizontal" | "vertical";
|
|
18
|
+
readonly draggable?: boolean;
|
|
19
|
+
readonly itemFilter?: (c: Column<T>) => boolean;
|
|
20
|
+
readonly placeholder?: (el: HTMLElement) => HTMLElement;
|
|
21
|
+
readonly onRootDrop?: (p: OnRootDropParams<T>) => void;
|
|
22
|
+
readonly onDrop?: (p: OnDropParams<T>) => void;
|
|
23
|
+
readonly onAction?: (c: OnActionParams<T>) => void;
|
|
24
|
+
readonly onDelete?: (c: OnActionParams<T>) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function useColumnBoxItems<T>({ grid, onRootDrop, onDrop, onDelete, onAction, orientation, draggable, itemFilter, placeholder, }: UseColumnBoxItemArgs<T>): {
|
|
27
|
+
rootProps: {
|
|
28
|
+
accepted: string[];
|
|
29
|
+
orientation: "horizontal" | "vertical" | undefined;
|
|
30
|
+
onRootDrop: (p: DropEventParams) => void;
|
|
31
|
+
grid: Grid<T>;
|
|
32
|
+
};
|
|
33
|
+
items: GridBoxItem<Column<T>>[];
|
|
34
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useEvent } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
+
export function useColumnBoxItems({ grid, onRootDrop, onDrop, onDelete, onAction, orientation, draggable = true, itemFilter, placeholder, }) {
|
|
4
|
+
const columns = grid.state.columns.useValue();
|
|
5
|
+
const base = grid.state.columnBase.useValue();
|
|
6
|
+
const gridId = grid.state.gridId.useValue();
|
|
7
|
+
const items = useMemo(() => {
|
|
8
|
+
const groupId = `${gridId}-group`;
|
|
9
|
+
const aggId = `${gridId}-agg`;
|
|
10
|
+
const columnId = `${gridId}-column`;
|
|
11
|
+
return columns
|
|
12
|
+
.filter((c) => {
|
|
13
|
+
return itemFilter ? itemFilter(c) : true;
|
|
14
|
+
})
|
|
15
|
+
.map((c, i) => {
|
|
16
|
+
const canGroup = c.uiHints?.rowGroupable ?? base.uiHints?.rowGroupable ?? false;
|
|
17
|
+
const canAgg = Boolean(c.uiHints?.aggDefault ??
|
|
18
|
+
c.uiHints?.aggDefault?.length ??
|
|
19
|
+
base.uiHints?.aggDefault ??
|
|
20
|
+
base.uiHints?.aggsAllowed?.length);
|
|
21
|
+
const data = {
|
|
22
|
+
[columnId]: c,
|
|
23
|
+
};
|
|
24
|
+
if (canGroup)
|
|
25
|
+
data[groupId] = c.id;
|
|
26
|
+
if (canAgg)
|
|
27
|
+
data[aggId] = c;
|
|
28
|
+
return {
|
|
29
|
+
label: c.name ?? c.id,
|
|
30
|
+
id: c.id,
|
|
31
|
+
index: i,
|
|
32
|
+
source: "columns",
|
|
33
|
+
draggable,
|
|
34
|
+
data: c,
|
|
35
|
+
dragPlaceholder: placeholder,
|
|
36
|
+
dragData: data,
|
|
37
|
+
onAction: (el) => onAction?.({ column: c, el }),
|
|
38
|
+
onDelete: (el) => onDelete?.({ column: c, el }),
|
|
39
|
+
onDrop: (p) => {
|
|
40
|
+
const src = p.state.siteLocalData?.[columnId];
|
|
41
|
+
const target = c;
|
|
42
|
+
const dragIndex = columns.findIndex((x) => x.id === src.id);
|
|
43
|
+
const overIndex = columns.findIndex((x) => x.id === c.id);
|
|
44
|
+
const isBefore = overIndex < dragIndex;
|
|
45
|
+
if (overIndex === dragIndex)
|
|
46
|
+
return;
|
|
47
|
+
onDrop?.({ src, target, isBefore });
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}, [
|
|
52
|
+
base.uiHints?.aggDefault,
|
|
53
|
+
base.uiHints?.aggsAllowed?.length,
|
|
54
|
+
base.uiHints?.rowGroupable,
|
|
55
|
+
columns,
|
|
56
|
+
draggable,
|
|
57
|
+
gridId,
|
|
58
|
+
itemFilter,
|
|
59
|
+
onAction,
|
|
60
|
+
onDelete,
|
|
61
|
+
onDrop,
|
|
62
|
+
placeholder,
|
|
63
|
+
]);
|
|
64
|
+
const onRootDropEv = useEvent((p) => {
|
|
65
|
+
const columnId = `${gridId}-column`;
|
|
66
|
+
const src = p.state.siteLocalData?.[columnId];
|
|
67
|
+
onRootDrop?.(src);
|
|
68
|
+
});
|
|
69
|
+
return useMemo(() => ({
|
|
70
|
+
rootProps: {
|
|
71
|
+
accepted: [`${gridId}-column`],
|
|
72
|
+
orientation: orientation,
|
|
73
|
+
onRootDrop: onRootDropEv,
|
|
74
|
+
grid,
|
|
75
|
+
},
|
|
76
|
+
items,
|
|
77
|
+
}), [grid, gridId, items, onRootDropEv, orientation]);
|
|
78
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DropEventParams, Grid, RowGroupModelItem } from "../+types.js";
|
|
2
|
+
import type { GridBoxItem } from "./+types.js";
|
|
3
|
+
export interface UseRowGroupBoxItems<T> {
|
|
4
|
+
readonly grid: Grid<T>;
|
|
5
|
+
readonly orientation?: "horizontal" | "vertical";
|
|
6
|
+
readonly hideColumnOnGroup?: boolean;
|
|
7
|
+
readonly includeGroupables?: boolean;
|
|
8
|
+
readonly placeholder?: (el: HTMLElement) => HTMLElement;
|
|
9
|
+
}
|
|
10
|
+
export declare function useRowGroupBoxItems<T>({ grid, orientation, hideColumnOnGroup, includeGroupables, placeholder, }: UseRowGroupBoxItems<T>): {
|
|
11
|
+
rootProps: {
|
|
12
|
+
accepted: string[];
|
|
13
|
+
onRootDrop: (p: DropEventParams) => void;
|
|
14
|
+
orientation: "horizontal" | "vertical" | undefined;
|
|
15
|
+
grid: Grid<T>;
|
|
16
|
+
};
|
|
17
|
+
items: GridBoxItem<RowGroupModelItem<T>>[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useEvent } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
+
export function useRowGroupBoxItems({ grid, orientation, hideColumnOnGroup = true, includeGroupables = false, placeholder, }) {
|
|
4
|
+
const rowGroupModel = grid.state.rowGroupModel.useValue();
|
|
5
|
+
const gridId = grid.state.gridId.useValue();
|
|
6
|
+
const columns = grid.state.columns.useValue();
|
|
7
|
+
const base = grid.state.columnBase.useValue();
|
|
8
|
+
const items = useMemo(() => {
|
|
9
|
+
const groupId = `${gridId}-group`;
|
|
10
|
+
const groupables = (includeGroupables
|
|
11
|
+
? columns.map((c) => {
|
|
12
|
+
const canGroup = c.uiHints?.rowGroupable ?? base.uiHints?.rowGroupable;
|
|
13
|
+
if (!canGroup)
|
|
14
|
+
return null;
|
|
15
|
+
if (rowGroupModel.find((x) => typeof x === "string" && x === c.id))
|
|
16
|
+
return null;
|
|
17
|
+
return c;
|
|
18
|
+
})
|
|
19
|
+
: [])
|
|
20
|
+
.filter((c) => c != null)
|
|
21
|
+
.map((c, i) => {
|
|
22
|
+
return {
|
|
23
|
+
data: c.id,
|
|
24
|
+
dragData: { [groupId]: c.id },
|
|
25
|
+
draggable: false,
|
|
26
|
+
source: "groups",
|
|
27
|
+
id: c.id,
|
|
28
|
+
index: i + rowGroupModel.length,
|
|
29
|
+
label: c.name ?? c.id,
|
|
30
|
+
onAction: () => { },
|
|
31
|
+
onDelete: () => { },
|
|
32
|
+
onDrop: () => { },
|
|
33
|
+
active: false,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
return rowGroupModel
|
|
37
|
+
.map((c, i) => {
|
|
38
|
+
const onDelete = () => {
|
|
39
|
+
grid.state.rowGroupModel.set((prev) => prev.filter((x) => x !== c));
|
|
40
|
+
if (typeof c === "string")
|
|
41
|
+
grid.api.columnUpdate({ [c]: { hide: false } });
|
|
42
|
+
};
|
|
43
|
+
const onDrop = (p) => {
|
|
44
|
+
const target = c;
|
|
45
|
+
const src = p.state.siteLocalData?.[groupId];
|
|
46
|
+
const overIndex = rowGroupModel.findIndex((x) => x === c);
|
|
47
|
+
const dragIndex = rowGroupModel.findIndex((x) => x === src);
|
|
48
|
+
const isBefore = overIndex < dragIndex;
|
|
49
|
+
if (overIndex === dragIndex)
|
|
50
|
+
return;
|
|
51
|
+
const srcIndex = rowGroupModel.findIndex((x) => {
|
|
52
|
+
if (typeof src !== typeof x)
|
|
53
|
+
return;
|
|
54
|
+
const cid = typeof src === "string" ? src : src.id;
|
|
55
|
+
const xid = typeof x === "string" ? x : x.id;
|
|
56
|
+
return cid === xid;
|
|
57
|
+
});
|
|
58
|
+
const targetIndex = rowGroupModel.indexOf(target);
|
|
59
|
+
// This is an external
|
|
60
|
+
if (srcIndex === -1) {
|
|
61
|
+
grid.state.rowGroupModel.set((prev) => {
|
|
62
|
+
const next = [...prev];
|
|
63
|
+
next.splice(isBefore ? targetIndex : targetIndex + 1, 0, src);
|
|
64
|
+
return next;
|
|
65
|
+
});
|
|
66
|
+
if (typeof src === "string" && hideColumnOnGroup) {
|
|
67
|
+
grid.api.columnUpdate({ [src]: { hide: true } });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
grid.state.rowGroupModel.set((prev) => {
|
|
72
|
+
const next = [...prev];
|
|
73
|
+
next.splice(srcIndex, 1);
|
|
74
|
+
const targetIndex = next.indexOf(target);
|
|
75
|
+
next.splice(isBefore ? targetIndex : targetIndex + 1, 0, src);
|
|
76
|
+
return next;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
if (typeof c === "string") {
|
|
81
|
+
const column = grid.api.columnById(c);
|
|
82
|
+
if (!column)
|
|
83
|
+
return null;
|
|
84
|
+
return {
|
|
85
|
+
dragData: { [groupId]: c },
|
|
86
|
+
data: c,
|
|
87
|
+
draggable: true,
|
|
88
|
+
source: "groups",
|
|
89
|
+
id: c,
|
|
90
|
+
index: i,
|
|
91
|
+
label: column.name ?? column.id,
|
|
92
|
+
onAction: () => { },
|
|
93
|
+
onDelete: onDelete,
|
|
94
|
+
onDrop: onDrop,
|
|
95
|
+
dragPlaceholder: placeholder,
|
|
96
|
+
active: true,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return {
|
|
101
|
+
dragData: { [groupId]: c },
|
|
102
|
+
data: c,
|
|
103
|
+
draggable: true,
|
|
104
|
+
id: c.id,
|
|
105
|
+
source: "groups",
|
|
106
|
+
index: i,
|
|
107
|
+
label: c.name ?? c.id,
|
|
108
|
+
onAction: () => { },
|
|
109
|
+
onDelete: onDelete,
|
|
110
|
+
onDrop,
|
|
111
|
+
active: true,
|
|
112
|
+
dragPlaceholder: placeholder,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
.filter((c) => c !== null)
|
|
117
|
+
.concat(groupables);
|
|
118
|
+
}, [
|
|
119
|
+
base.uiHints?.rowGroupable,
|
|
120
|
+
columns,
|
|
121
|
+
grid.api,
|
|
122
|
+
grid.state.rowGroupModel,
|
|
123
|
+
gridId,
|
|
124
|
+
hideColumnOnGroup,
|
|
125
|
+
includeGroupables,
|
|
126
|
+
placeholder,
|
|
127
|
+
rowGroupModel,
|
|
128
|
+
]);
|
|
129
|
+
const onRootDrop = useEvent((p) => {
|
|
130
|
+
const groupId = `${gridId}-group`;
|
|
131
|
+
const c = p.state.siteLocalData?.[groupId];
|
|
132
|
+
if (!c)
|
|
133
|
+
return;
|
|
134
|
+
// Is the item in the model.
|
|
135
|
+
const currentIndex = rowGroupModel.findIndex((x) => {
|
|
136
|
+
if (typeof c !== typeof x)
|
|
137
|
+
return;
|
|
138
|
+
const cid = typeof c === "string" ? c : c.id;
|
|
139
|
+
const xid = typeof x === "string" ? x : x.id;
|
|
140
|
+
return cid === xid;
|
|
141
|
+
});
|
|
142
|
+
// We failed to find the item, so add it to the end. If
|
|
143
|
+
if (currentIndex === -1) {
|
|
144
|
+
grid.state.rowGroupModel.set((prev) => [...prev, c]);
|
|
145
|
+
if (typeof c === "string" && hideColumnOnGroup) {
|
|
146
|
+
grid.api.columnUpdate({ [c]: { hide: true } });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
grid.state.rowGroupModel.set((prev) => {
|
|
151
|
+
const next = [...prev];
|
|
152
|
+
next.splice(currentIndex, 1);
|
|
153
|
+
next.push(c);
|
|
154
|
+
return next;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
return useMemo(() => {
|
|
159
|
+
return {
|
|
160
|
+
rootProps: {
|
|
161
|
+
accepted: [`${gridId}-group`],
|
|
162
|
+
onRootDrop,
|
|
163
|
+
orientation,
|
|
164
|
+
grid,
|
|
165
|
+
},
|
|
166
|
+
items,
|
|
167
|
+
};
|
|
168
|
+
}, [grid, gridId, items, onRootDrop, orientation]);
|
|
169
|
+
}
|
package/dist/grid.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Root } from "./root/root.js";
|
|
2
|
+
import { useLyteNyte } from "./state/use-lytenyte.js";
|
|
3
|
+
export declare const Grid: {
|
|
4
|
+
Root: typeof Root;
|
|
5
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
HeaderGroupCell: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("./header/header-group-cell.js").HeaderGroupCellProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
HeaderRow: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("./header/header-row.js").HeaderRowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
HeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("./header/header-cell.js").HeaderCellProps<any>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Cell: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children"> & import("./cells/cell.js").CellProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
RowFullWidth: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("./rows/row-full-width.js").RowFullWidthProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
RowsContainer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
RowsBottom: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
RowsTop: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Row: import("react").NamedExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onDrag"> & import("./rows/row/row.js").RowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
RowsCenter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
Viewport: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
useLyteNyte: typeof useLyteNyte;
|
|
18
|
+
};
|
package/dist/grid.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Cell } from "./cells/cell.js";
|
|
2
|
+
import { Header } from "./header/header.js";
|
|
3
|
+
import { HeaderCell } from "./header/header-cell.js";
|
|
4
|
+
import { HeaderGroupCell } from "./header/header-group-cell.js";
|
|
5
|
+
import { HeaderRow } from "./header/header-row.js";
|
|
6
|
+
import { Root } from "./root/root.js";
|
|
7
|
+
import { RowFullWidth } from "./rows/row-full-width.js";
|
|
8
|
+
import { Row } from "./rows/row/row.js";
|
|
9
|
+
import { RowsContainer } from "./rows/rows-container.js";
|
|
10
|
+
import { RowsBottom, RowsCenter, RowsTop } from "./rows/rows-sections.js";
|
|
11
|
+
import { useLyteNyte } from "./state/use-lytenyte.js";
|
|
12
|
+
import { Viewport } from "./viewport/viewport.js";
|
|
13
|
+
export const Grid = {
|
|
14
|
+
Root,
|
|
15
|
+
Header,
|
|
16
|
+
HeaderGroupCell,
|
|
17
|
+
HeaderRow,
|
|
18
|
+
HeaderCell,
|
|
19
|
+
Cell,
|
|
20
|
+
RowFullWidth,
|
|
21
|
+
RowsContainer,
|
|
22
|
+
RowsBottom,
|
|
23
|
+
RowsTop,
|
|
24
|
+
Row,
|
|
25
|
+
RowsCenter,
|
|
26
|
+
Viewport,
|
|
27
|
+
useLyteNyte,
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import type { HeaderCellFloating, HeaderCellLayout } from "../+types";
|
|
3
|
+
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
4
|
+
export interface HeaderCellProps<T> {
|
|
5
|
+
readonly cell: HeaderCellLayout<T> | HeaderCellFloating<T>;
|
|
6
|
+
readonly resizerAs?: SlotComponent;
|
|
7
|
+
readonly resizerClassName?: string;
|
|
8
|
+
readonly resizerStyle?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const HeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & HeaderCellProps<any>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useGridRoot } from "../context.js";
|
|
4
|
+
import { COLUMN_MARKER_ID, HeaderCellReact } from "@1771technologies/lytenyte-shared";
|
|
5
|
+
import { fastDeepMemo, useCombinedRefs, } from "@1771technologies/lytenyte-react-hooks";
|
|
6
|
+
import { useHeaderCellRenderer } from "./use-header-cell-renderer.js";
|
|
7
|
+
import { ResizeHandler } from "./resize-handler.js";
|
|
8
|
+
import { useDragMove } from "./use-drag-move.js";
|
|
9
|
+
const HeaderCellImpl = forwardRef(function HeaderCell({ cell, resizerAs, resizerStyle, resizerClassName, children, ...props }, forwarded) {
|
|
10
|
+
const grid = useGridRoot().grid;
|
|
11
|
+
const ctx = grid.state;
|
|
12
|
+
const xPositions = ctx.xPositions.useValue();
|
|
13
|
+
const base = ctx.columnBase.useValue();
|
|
14
|
+
const Renderer = useHeaderCellRenderer(cell);
|
|
15
|
+
const resizable = cell.id === COLUMN_MARKER_ID
|
|
16
|
+
? false
|
|
17
|
+
: (cell.column.uiHints?.resizable ?? base.uiHints?.resizable ?? false);
|
|
18
|
+
const { ref, ...dragProps } = useDragMove(grid, cell, props.onDragStart);
|
|
19
|
+
const combined = useCombinedRefs(forwarded, ref);
|
|
20
|
+
return (_jsxs(HeaderCellReact, { ...props, ...dragProps, ref: combined, cell: cell, columnId: cell.column.id, isFloating: cell.kind === "floating", xPositions: xPositions, children: [children == undefined ? _jsx(Renderer, { column: cell.column, grid: grid }) : children, resizable && cell.kind === "cell" && (_jsx(ResizeHandler, { cell: cell, xPositions: xPositions, as: resizerAs, className: resizerClassName, style: resizerStyle }))] }));
|
|
21
|
+
});
|
|
22
|
+
export const HeaderCell = fastDeepMemo(HeaderCellImpl);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HeaderGroupCellLayout } from "../+types";
|
|
2
|
+
export interface HeaderGroupCellProps {
|
|
3
|
+
readonly cell: HeaderGroupCellLayout;
|
|
4
|
+
}
|
|
5
|
+
export declare const HeaderGroupCell: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & HeaderGroupCellProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useGridRoot } from "../context.js";
|
|
4
|
+
import { HeaderGroupCellReact } from "@1771technologies/lytenyte-shared";
|
|
5
|
+
import { fastDeepMemo, useCombinedRefs } from "@1771technologies/lytenyte-react-hooks";
|
|
6
|
+
import { useDragMove } from "./use-drag-move.js";
|
|
7
|
+
const HeaderGroupCellImpl = forwardRef(function HeaderCell({ cell, children, ...props }, forwarded) {
|
|
8
|
+
const grid = useGridRoot().grid;
|
|
9
|
+
const ctx = grid.state;
|
|
10
|
+
const { ref, ...dragProps } = useDragMove(grid, cell, props.onDragStart);
|
|
11
|
+
const combined = useCombinedRefs(ref, forwarded);
|
|
12
|
+
const isExpanded = grid.state.columnGroupExpansions.useValue()[cell.id] ??
|
|
13
|
+
grid.state.columnGroupDefaultExpansion.get();
|
|
14
|
+
return (_jsx(HeaderGroupCellReact, { ...props, ...dragProps, ref: combined, cell: cell, cellId: cell.id, height: ctx.headerGroupHeight.useValue(), xPositions: ctx.xPositions.useValue(), isHiddenMove: cell.isHiddenMove ?? false, "data-ln-collapsible": cell.isCollapsible, "data-ln-collapsed": !isExpanded, children: children == undefined ? cell.id : children }));
|
|
15
|
+
});
|
|
16
|
+
export const HeaderGroupCell = fastDeepMemo(HeaderGroupCellImpl);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export interface HeaderRowProps {
|
|
2
|
+
readonly headerRowIndex: number;
|
|
3
|
+
}
|
|
4
|
+
export declare const HeaderRow: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & HeaderRowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fastDeepMemo } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { useGridRoot } from "../context.js";
|
|
5
|
+
import { HeaderRowReact } from "@1771technologies/lytenyte-shared";
|
|
6
|
+
const HeaderRowImpl = forwardRef(function HeaderRow(props, forwarded) {
|
|
7
|
+
const maxRow = useGridRoot().grid.view.get().header.maxRow;
|
|
8
|
+
return _jsx(HeaderRowReact, { ...props, ref: forwarded, maxRow: maxRow });
|
|
9
|
+
});
|
|
10
|
+
export const HeaderRow = fastDeepMemo(HeaderRowImpl);
|