@1771technologies/lytenyte-pro 2.0.0-dev.0 → 2.0.0-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/__play__/alpha.play.d.ts +3 -0
- package/dist/__play__/alpha.play.js +56 -0
- package/dist/__play__/basic-server-data/data.d.ts +10 -0
- package/dist/__play__/basic-server-data/data.js +17746 -0
- package/dist/__play__/basic-server-data/server.d.ts +36 -0
- package/dist/__play__/basic-server-data/server.js +105 -0
- package/dist/__play__/buttons.play.d.ts +4 -0
- package/dist/__play__/buttons.play.js +7 -0
- package/dist/__play__/inputs.play.d.ts +3 -0
- package/dist/__play__/inputs.play.js +13 -0
- package/dist/__play__/server.play.d.ts +3 -0
- package/dist/__play__/server.play.js +66 -0
- package/dist/__play__/tree.play.d.ts +3 -0
- package/dist/__play__/tree.play.js +47 -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 +3 -0
- package/dist/cell-selection/bound-selection-rect.js +16 -0
- package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
- package/dist/cell-selection/cell-selection-containers.js +86 -0
- package/dist/cell-selection/cell-selection-driver/cell-selection-driver.d.ts +1 -0
- package/dist/cell-selection/cell-selection-driver/cell-selection-driver.js +279 -0
- package/dist/cell-selection/cell-selection-driver/use-cell-focus-change.d.ts +6 -0
- package/dist/cell-selection/cell-selection-driver/use-cell-focus-change.js +34 -0
- package/dist/cell-selection/cell-style-row.d.ts +8 -0
- package/dist/cell-selection/cell-style-row.js +79 -0
- package/dist/cell-selection/data-rect-from-cell-position.d.ts +3 -0
- package/dist/cell-selection/data-rect-from-cell-position.js +17 -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-selection-down.d.ts +3 -0
- package/dist/cell-selection/expand-selection-down.js +78 -0
- package/dist/cell-selection/expand-selection-end.d.ts +3 -0
- package/dist/cell-selection/expand-selection-end.js +76 -0
- package/dist/cell-selection/expand-selection-start.d.ts +3 -0
- package/dist/cell-selection/expand-selection-start.js +73 -0
- package/dist/cell-selection/expand-selection-up.d.ts +3 -0
- package/dist/cell-selection/expand-selection-up.js +74 -0
- package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
- package/dist/cell-selection/full-width-start-end-index.js +4 -0
- package/dist/cell-selection/get-root-cell.d.ts +3 -0
- package/dist/cell-selection/get-root-cell.js +6 -0
- package/dist/cell-selection/index.d.ts +13 -0
- package/dist/cell-selection/index.js +13 -0
- package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
- package/dist/cell-selection/is-bottom-rect.js +4 -0
- package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
- package/dist/cell-selection/is-center-col-rect.js +3 -0
- package/dist/cell-selection/is-center-rect.d.ts +2 -0
- package/dist/cell-selection/is-center-rect.js +4 -0
- package/dist/cell-selection/is-end-rect.d.ts +5 -0
- package/dist/cell-selection/is-end-rect.js +3 -0
- package/dist/cell-selection/is-fully-within-rect.d.ts +2 -0
- package/dist/cell-selection/is-fully-within-rect.js +6 -0
- package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
- package/dist/cell-selection/is-overlapping-rect.js +5 -0
- package/dist/cell-selection/is-start-rect.d.ts +5 -0
- package/dist/cell-selection/is-start-rect.js +3 -0
- package/dist/cell-selection/is-top-rect.d.ts +2 -0
- package/dist/cell-selection/is-top-rect.js +3 -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 +47 -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 +4 -0
- package/dist/cell-selection/update-additive-cell-selection.js +21 -0
- package/dist/cell-selection/use-edge-scroll.d.ts +6 -0
- package/dist/cell-selection/use-edge-scroll.js +71 -0
- package/dist/components/checkbox/checkbox.d.ts +15 -0
- package/dist/components/checkbox/checkbox.js +42 -0
- package/dist/components/checkbox/checkbox.play.d.ts +2 -0
- package/dist/components/checkbox/checkbox.play.js +6 -0
- package/dist/components/column-manager/column-manager.d.ts +13 -0
- package/dist/components/column-manager/column-manager.js +47 -0
- package/dist/components/external/clsx.d.ts +2 -0
- package/dist/components/external/clsx.js +44 -0
- package/dist/components/external/floating-ui.d.ts +268 -0
- package/dist/components/external/floating-ui.js +1802 -0
- package/dist/components/headless/dialog/arrow.d.ts +6 -0
- package/dist/components/headless/dialog/arrow.js +16 -0
- package/dist/components/headless/dialog/close.d.ts +10 -0
- package/dist/components/headless/dialog/close.js +22 -0
- package/dist/components/headless/dialog/container.d.ts +5 -0
- package/dist/components/headless/dialog/container.js +221 -0
- package/dist/components/headless/dialog/context.d.ts +32 -0
- package/dist/components/headless/dialog/context.js +3 -0
- package/dist/components/headless/dialog/description.d.ts +9 -0
- package/dist/components/headless/dialog/description.js +20 -0
- package/dist/components/headless/dialog/index.parts.d.ts +30 -0
- package/dist/components/headless/dialog/index.parts.js +17 -0
- package/dist/components/headless/dialog/root.d.ts +32 -0
- package/dist/components/headless/dialog/root.js +75 -0
- package/dist/components/headless/dialog/title.d.ts +9 -0
- package/dist/components/headless/dialog/title.js +20 -0
- package/dist/components/headless/dialog/transform-origin.d.ts +5 -0
- package/dist/components/headless/dialog/transform-origin.js +38 -0
- package/dist/components/headless/dialog/trigger.d.ts +10 -0
- package/dist/components/headless/dialog/trigger.js +24 -0
- package/dist/components/headless/dialog/use-dialog.d.ts +4 -0
- package/dist/components/headless/dialog/use-dialog.js +12 -0
- package/dist/components/headless/menu/checkbox-item.d.ts +11 -0
- package/dist/components/headless/menu/checkbox-item.js +42 -0
- package/dist/components/headless/menu/combo/combo-checkbox.d.ts +11 -0
- package/dist/components/headless/menu/combo/combo-checkbox.js +38 -0
- package/dist/components/headless/menu/combo/combo-context.d.ts +9 -0
- package/dist/components/headless/menu/combo/combo-context.js +3 -0
- package/dist/components/headless/menu/combo/combo-input.d.ts +7 -0
- package/dist/components/headless/menu/combo/combo-input.js +58 -0
- package/dist/components/headless/menu/combo/combo-menu.d.ts +5 -0
- package/dist/components/headless/menu/combo/combo-menu.js +24 -0
- package/dist/components/headless/menu/combo/combo-option.d.ts +9 -0
- package/dist/components/headless/menu/combo/combo-option.js +37 -0
- package/dist/components/headless/menu/container.d.ts +5 -0
- package/dist/components/headless/menu/container.js +19 -0
- package/dist/components/headless/menu/dom.d.ts +4 -0
- package/dist/components/headless/menu/dom.js +20 -0
- package/dist/components/headless/menu/index.d.ts +54 -0
- package/dist/components/headless/menu/index.js +39 -0
- package/dist/components/headless/menu/item/handle-vertical-navigation.d.ts +2 -0
- package/dist/components/headless/menu/item/handle-vertical-navigation.js +28 -0
- package/dist/components/headless/menu/item/item.d.ts +9 -0
- package/dist/components/headless/menu/item/item.js +45 -0
- package/dist/components/headless/menu/item/use-menu-item-events.d.ts +1 -0
- package/dist/components/headless/menu/item/use-menu-item-events.js +25 -0
- package/dist/components/headless/menu/menu-divider.d.ts +5 -0
- package/dist/components/headless/menu/menu-divider.js +6 -0
- package/dist/components/headless/menu/menu-group.d.ts +5 -0
- package/dist/components/headless/menu/menu-group.js +6 -0
- package/dist/components/headless/menu/menu-header.d.ts +5 -0
- package/dist/components/headless/menu/menu-header.js +6 -0
- package/dist/components/headless/menu/popover.d.ts +5 -0
- package/dist/components/headless/menu/popover.js +7 -0
- package/dist/components/headless/menu/radio-group/context.d.ts +11 -0
- package/dist/components/headless/menu/radio-group/context.js +7 -0
- package/dist/components/headless/menu/radio-group/radio-item.d.ts +10 -0
- package/dist/components/headless/menu/radio-group/radio-item.js +44 -0
- package/dist/components/headless/menu/submenu/submenu-context.d.ts +9 -0
- package/dist/components/headless/menu/submenu/submenu-context.js +3 -0
- package/dist/components/headless/menu/submenu/submenu-trigger.d.ts +7 -0
- package/dist/components/headless/menu/submenu/submenu-trigger.js +70 -0
- package/dist/components/headless/menu/submenu/submenu.d.ts +21 -0
- package/dist/components/headless/menu/submenu/submenu.js +55 -0
- package/dist/components/headless/menu/submenu/use-submenu-position.d.ts +5 -0
- package/dist/components/headless/menu/submenu/use-submenu-position.js +31 -0
- package/dist/components/headless/menu/use-menu.d.ts +1 -0
- package/dist/components/headless/menu/use-menu.js +52 -0
- package/dist/components/headless/popover/container.d.ts +5 -0
- package/dist/components/headless/popover/container.js +7 -0
- package/dist/components/headless/popover/context.d.ts +6 -0
- package/dist/components/headless/popover/context.js +3 -0
- package/dist/components/headless/popover/index.d.ts +30 -0
- package/dist/components/headless/popover/index.js +17 -0
- package/dist/components/headless/popover/root.d.ts +6 -0
- package/dist/components/headless/popover/root.js +8 -0
- package/dist/components/headless/popover/trigger.d.ts +7 -0
- package/dist/components/headless/popover/trigger.js +11 -0
- package/dist/components/pill-manager/container.d.ts +5 -0
- package/dist/components/pill-manager/container.js +127 -0
- package/dist/components/pill-manager/expander.d.ts +9 -0
- package/dist/components/pill-manager/expander.js +21 -0
- package/dist/components/pill-manager/icons.d.ts +12 -0
- package/dist/components/pill-manager/icons.js +35 -0
- package/dist/components/pill-manager/index.d.ts +33 -0
- package/dist/components/pill-manager/index.js +13 -0
- package/dist/components/pill-manager/item.d.ts +10 -0
- package/dist/components/pill-manager/item.js +178 -0
- package/dist/components/pill-manager/label.d.ts +10 -0
- package/dist/components/pill-manager/label.js +31 -0
- package/dist/components/pill-manager/pill-manager.play.d.ts +3 -0
- package/dist/components/pill-manager/pill-manager.play.js +73 -0
- package/dist/components/pill-manager/pill-row.context.d.ts +8 -0
- package/dist/components/pill-manager/pill-row.context.js +4 -0
- package/dist/components/pill-manager/pill-row.d.ts +12 -0
- package/dist/components/pill-manager/pill-row.js +22 -0
- package/dist/components/pill-manager/root.context.d.ts +40 -0
- package/dist/components/pill-manager/root.context.js +4 -0
- package/dist/components/pill-manager/root.d.ts +25 -0
- package/dist/components/pill-manager/root.js +33 -0
- package/dist/components/pill-manager/row-default.d.ts +3 -0
- package/dist/components/pill-manager/row-default.js +14 -0
- package/dist/components/pill-manager/types.d.ts +21 -0
- package/dist/components/pill-manager/types.js +1 -0
- package/dist/components/row-group-cell.d.ts +13 -0
- package/dist/components/row-group-cell.js +40 -0
- package/dist/components/select-all.d.ts +12 -0
- package/dist/components/select-all.js +34 -0
- package/dist/components/smart-select/chip-context.d.ts +8 -0
- package/dist/components/smart-select/chip-context.js +4 -0
- package/dist/components/smart-select/chip-remove.d.ts +1 -0
- package/dist/components/smart-select/chip-remove.js +13 -0
- package/dist/components/smart-select/chip.d.ts +13 -0
- package/dist/components/smart-select/chip.js +79 -0
- package/dist/components/smart-select/container.d.ts +1 -0
- package/dist/components/smart-select/container.js +13 -0
- package/dist/components/smart-select/context.d.ts +31 -0
- package/dist/components/smart-select/context.js +4 -0
- package/dist/components/smart-select/index.d.ts +30 -0
- package/dist/components/smart-select/index.js +19 -0
- package/dist/components/smart-select/option.d.ts +8 -0
- package/dist/components/smart-select/option.js +36 -0
- package/dist/components/smart-select/root.d.ts +17 -0
- package/dist/components/smart-select/root.js +165 -0
- package/dist/components/smart-select/smart-select.play.d.ts +2 -0
- package/dist/components/smart-select/smart-select.play.js +36 -0
- package/dist/components/smart-select/triggers/basic-trigger.d.ts +1 -0
- package/dist/components/smart-select/triggers/basic-trigger.js +18 -0
- package/dist/components/smart-select/triggers/combo-trigger.d.ts +1 -0
- package/dist/components/smart-select/triggers/combo-trigger.js +17 -0
- package/dist/components/smart-select/triggers/is-selectable-option.d.ts +1 -0
- package/dist/components/smart-select/triggers/is-selectable-option.js +3 -0
- package/dist/components/smart-select/triggers/multi-combo-trigger.d.ts +11 -0
- package/dist/components/smart-select/triggers/multi-combo-trigger.js +38 -0
- package/dist/components/smart-select/triggers/multi-trigger.d.ts +6 -0
- package/dist/components/smart-select/triggers/multi-trigger.js +8 -0
- package/dist/components/smart-select/triggers/use-combo-controls.d.ts +9 -0
- package/dist/components/smart-select/triggers/use-combo-controls.js +145 -0
- package/dist/components/smart-select/triggers/use-trigger-controls.d.ts +5 -0
- package/dist/components/smart-select/triggers/use-trigger-controls.js +126 -0
- package/dist/components/smart-select/type.d.ts +44 -0
- package/dist/components/smart-select/type.js +1 -0
- package/dist/components/smart-select/use-async-options.d.ts +8 -0
- package/dist/components/smart-select/use-async-options.js +42 -0
- package/dist/components/tree-view/index.d.ts +4 -0
- package/dist/components/tree-view/index.js +2 -0
- package/dist/components/tree-view/root.d.ts +37 -0
- package/dist/components/tree-view/root.js +139 -0
- package/dist/components/tree-view/select-all.d.ts +7 -0
- package/dist/components/tree-view/select-all.js +22 -0
- package/dist/components/tree-view/tree-children.d.ts +2 -0
- package/dist/components/tree-view/tree-children.js +15 -0
- package/dist/components/tree-view/types.d.ts +31 -0
- package/dist/components/tree-view/types.js +1 -0
- package/dist/components/types.d.ts +4 -0
- package/dist/components/types.js +1 -0
- package/dist/components/virtual-from-coordinates.d.ts +2 -0
- package/dist/components/virtual-from-coordinates.js +15 -0
- package/dist/components.d.ts +16 -0
- package/dist/components.js +11 -0
- package/dist/data-source-client/hooks/get-valid-leafs.d.ts +3 -0
- package/dist/data-source-client/hooks/get-valid-leafs.js +11 -0
- package/dist/data-source-client/hooks/use-controlled-ds-state.d.ts +13 -0
- package/dist/data-source-client/hooks/use-controlled-ds-state.js +39 -0
- package/dist/data-source-client/hooks/use-flattened-data.d.ts +18 -0
- package/dist/data-source-client/hooks/use-flattened-data.js +40 -0
- package/dist/data-source-client/hooks/use-flattened-groups.d.ts +5 -0
- package/dist/data-source-client/hooks/use-flattened-groups.js +63 -0
- package/dist/data-source-client/hooks/use-flattened-piece.d.ts +14 -0
- package/dist/data-source-client/hooks/use-flattened-piece.js +55 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-child.d.ts +2 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-child.js +11 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-last.d.ts +2 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-last.js +14 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse.d.ts +2 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse.js +17 -0
- package/dist/data-source-client/hooks/use-group-tree/use-group-tree.d.ts +31 -0
- package/dist/data-source-client/hooks/use-group-tree/use-group-tree.js +152 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/apply-reference-column.d.ts +2 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/apply-reference-column.js +22 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/evaluate-label-filter.d.ts +2 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/evaluate-label-filter.js +9 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths-with-totals.d.ts +18 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths-with-totals.js +140 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths.d.ts +4 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths.js +31 -0
- package/dist/data-source-client/hooks/use-pivot/use-agg-model.d.ts +4 -0
- package/dist/data-source-client/hooks/use-pivot/use-agg-model.js +45 -0
- package/dist/data-source-client/hooks/use-pivot/use-filtered-data.d.ts +2 -0
- package/dist/data-source-client/hooks/use-pivot/use-filtered-data.js +18 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.d.ts +14 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.js +151 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-data.d.ts +32 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-data.js +83 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-group-fn.d.ts +4 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-group-fn.js +23 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-state.d.ts +16 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-state.js +40 -0
- package/dist/data-source-client/use-client-data-source.d.ts +91 -0
- package/dist/data-source-client/use-client-data-source.js +169 -0
- package/dist/data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
- package/dist/data-source-server/async-tree/+constants.async-tree.js +1 -0
- package/dist/data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
- package/dist/data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
- package/dist/data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
- package/dist/data-source-server/async-tree/apply-set-action-to-tree.js +26 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-unique.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-unique.js +20 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-valid.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-valid.js +12 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-fit.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-fit.js +18 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-kinds.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-kinds.js +12 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action.js +24 -0
- package/dist/data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
- package/dist/data-source-server/async-tree/get-parent-node-by-path.js +18 -0
- package/dist/data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
- package/dist/data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
- package/dist/data-source-server/async-tree/make-async-tree.d.ts +2 -0
- package/dist/data-source-server/async-tree/make-async-tree.js +64 -0
- package/dist/data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
- package/dist/data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
- package/dist/data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
- package/dist/data-source-server/async-tree/maybe-apply-resize.js +17 -0
- package/dist/data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
- package/dist/data-source-server/async-tree/maybe-apply-set-action-items.js +54 -0
- package/dist/data-source-server/async-tree/types.d.ts +70 -0
- package/dist/data-source-server/async-tree/types.js +1 -0
- package/dist/data-source-server/range-tree/range-tree.d.ts +66 -0
- package/dist/data-source-server/range-tree/range-tree.js +102 -0
- package/dist/data-source-server/server-data.d.ts +73 -0
- package/dist/data-source-server/server-data.js +553 -0
- package/dist/data-source-server/source/use-on-rows-updated.d.ts +4 -0
- package/dist/data-source-server/source/use-on-rows-updated.js +29 -0
- package/dist/data-source-server/source/use-on-view-change.d.ts +3 -0
- package/dist/data-source-server/source/use-on-view-change.js +13 -0
- package/dist/data-source-server/source/use-row-add.d.ts +3 -0
- package/dist/data-source-server/source/use-row-add.js +36 -0
- package/dist/data-source-server/source/use-row-by-id.d.ts +2 -0
- package/dist/data-source-server/source/use-row-by-id.js +8 -0
- package/dist/data-source-server/source/use-row-by-index.d.ts +9 -0
- package/dist/data-source-server/source/use-row-by-index.js +89 -0
- package/dist/data-source-server/source/use-row-children.d.ts +2 -0
- package/dist/data-source-server/source/use-row-children.js +16 -0
- package/dist/data-source-server/source/use-row-delete.d.ts +3 -0
- package/dist/data-source-server/source/use-row-delete.js +39 -0
- package/dist/data-source-server/source/use-row-id-to-row-index.d.ts +2 -0
- package/dist/data-source-server/source/use-row-id-to-row-index.js +7 -0
- package/dist/data-source-server/source/use-row-index-to-row-id.d.ts +2 -0
- package/dist/data-source-server/source/use-row-index-to-row-id.js +7 -0
- package/dist/data-source-server/source/use-row-leafs.d.ts +2 -0
- package/dist/data-source-server/source/use-row-leafs.js +20 -0
- package/dist/data-source-server/source/use-row-parents.d.ts +2 -0
- package/dist/data-source-server/source/use-row-parents.js +16 -0
- package/dist/data-source-server/source/use-row-siblings.d.ts +2 -0
- package/dist/data-source-server/source/use-row-siblings.js +15 -0
- package/dist/data-source-server/source/use-rows-between.d.ts +2 -0
- package/dist/data-source-server/source/use-rows-between.js +20 -0
- package/dist/data-source-server/source/use-source-state.d.ts +28 -0
- package/dist/data-source-server/source/use-source-state.js +47 -0
- package/dist/data-source-server/source/use-source.d.ts +5 -0
- package/dist/data-source-server/source/use-source.js +66 -0
- package/dist/data-source-server/types.d.ts +42 -0
- package/dist/data-source-server/types.js +1 -0
- package/dist/data-source-server/use-server-data-source.d.ts +51 -0
- package/dist/data-source-server/use-server-data-source.js +192 -0
- package/dist/data-source-server/utils/get-node-depth.d.ts +2 -0
- package/dist/data-source-server/utils/get-node-depth.js +9 -0
- package/dist/data-source-server/utils/get-node-path.d.ts +2 -0
- package/dist/data-source-server/utils/get-node-path.js +9 -0
- package/dist/data-source-server/utils/get-request-id.d.ts +1 -0
- package/dist/data-source-server/utils/get-request-id.js +6 -0
- package/dist/data-source-tree/source/use-controlled-state.d.ts +8 -0
- package/dist/data-source-tree/source/use-controlled-state.js +21 -0
- package/dist/data-source-tree/source/use-flattened.d.ts +17 -0
- package/dist/data-source-tree/source/use-flattened.js +65 -0
- package/dist/data-source-tree/source/use-on-rows-updated.d.ts +3 -0
- package/dist/data-source-tree/source/use-on-rows-updated.js +49 -0
- package/dist/data-source-tree/source/use-row-by-id.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-by-id.js +7 -0
- package/dist/data-source-tree/source/use-row-children.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-children.js +11 -0
- package/dist/data-source-tree/source/use-row-leafs.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-leafs.js +20 -0
- package/dist/data-source-tree/source/use-row-parents.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-parents.js +16 -0
- package/dist/data-source-tree/source/use-row-siblings.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-siblings.js +12 -0
- package/dist/data-source-tree/source/use-tree.d.ts +3 -0
- package/dist/data-source-tree/source/use-tree.js +59 -0
- package/dist/data-source-tree/types.d.ts +16 -0
- package/dist/data-source-tree/types.js +1 -0
- package/dist/data-source-tree/use-tree-data-source.d.ts +41 -0
- package/dist/data-source-tree/use-tree-data-source.js +101 -0
- package/dist/data-source-tree/utils/is-object.d.ts +1 -0
- package/dist/data-source-tree/utils/is-object.js +3 -0
- package/dist/hooks/use-slot/get-element-ref.d.ts +2 -0
- package/dist/hooks/use-slot/get-element-ref.js +20 -0
- package/dist/hooks/use-slot/index.d.ts +3 -0
- package/dist/hooks/use-slot/index.js +1 -0
- package/dist/hooks/use-slot/merge-props.d.ts +4 -0
- package/dist/hooks/use-slot/merge-props.js +27 -0
- package/dist/hooks/use-slot/react-version.d.ts +3 -0
- package/dist/hooks/use-slot/react-version.js +5 -0
- package/dist/hooks/use-slot/types.d.ts +4 -0
- package/dist/hooks/use-slot/types.js +1 -0
- package/dist/hooks/use-slot/use-slot.d.ts +12 -0
- package/dist/hooks/use-slot/use-slot.js +28 -0
- package/dist/hooks/use-transitioned-open.d.ts +2 -0
- package/dist/hooks/use-transitioned-open.js +50 -0
- package/dist/index.d.ts +121 -0
- package/dist/index.js +23 -0
- package/dist/license/index.d.ts +1 -0
- package/dist/license/index.js +1 -0
- package/dist/license/license.d.ts +3 -0
- package/dist/license/license.js +215 -0
- package/dist/license/md5-hash.d.ts +9 -0
- package/dist/license/md5-hash.js +167 -0
- package/dist/license.d.ts +3 -0
- package/dist/license.js +214 -0
- package/dist/root/context.d.ts +16 -0
- package/dist/root/context.js +4 -0
- package/dist/root/hooks/use-pro-api.d.ts +2 -0
- package/dist/root/hooks/use-pro-api.js +8 -0
- package/dist/root/root.d.ts +15 -0
- package/dist/root/root.js +112 -0
- package/dist/types/api.d.ts +100 -0
- package/dist/types/api.js +1 -0
- package/dist/types/column.d.ts +73 -0
- package/dist/types/column.js +1 -0
- package/dist/types/events.d.ts +56 -0
- package/dist/types/events.js +1 -0
- package/dist/types/grid.d.ts +47 -0
- package/dist/types/grid.js +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +1 -0
- package/dist/types/props.d.ts +187 -0
- package/dist/types/props.js +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DataRequest } from "../../data-source-server/types";
|
|
2
|
+
export declare function Server(reqs: DataRequest[], groupModel: string[]): Promise<({
|
|
3
|
+
asOfTime: number;
|
|
4
|
+
data: {
|
|
5
|
+
kind: "leaf";
|
|
6
|
+
id: string;
|
|
7
|
+
data: {
|
|
8
|
+
id: string;
|
|
9
|
+
Age: number;
|
|
10
|
+
Gender: string;
|
|
11
|
+
"Education Level": string;
|
|
12
|
+
"Job Title": string;
|
|
13
|
+
"Years of Experience": number;
|
|
14
|
+
Salary: number;
|
|
15
|
+
};
|
|
16
|
+
}[];
|
|
17
|
+
start: number;
|
|
18
|
+
end: number;
|
|
19
|
+
kind: "center";
|
|
20
|
+
path: (string | null)[];
|
|
21
|
+
size: number;
|
|
22
|
+
} | {
|
|
23
|
+
kind: "center";
|
|
24
|
+
asOfTime: number;
|
|
25
|
+
data: {
|
|
26
|
+
kind: "branch";
|
|
27
|
+
childCount: number;
|
|
28
|
+
data: {};
|
|
29
|
+
id: string;
|
|
30
|
+
key: string;
|
|
31
|
+
}[];
|
|
32
|
+
path: (string | null)[];
|
|
33
|
+
start: number;
|
|
34
|
+
end: number;
|
|
35
|
+
size: number;
|
|
36
|
+
})[]>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { data } from "./data.js";
|
|
2
|
+
const sleep = () => new Promise((res) => setTimeout(res, 0));
|
|
3
|
+
export async function Server(reqs, groupModel) {
|
|
4
|
+
// Simulate latency and server work.
|
|
5
|
+
await sleep();
|
|
6
|
+
return reqs.map((c) => {
|
|
7
|
+
// Return flat items if there are no row groups
|
|
8
|
+
if (!groupModel.length) {
|
|
9
|
+
return {
|
|
10
|
+
asOfTime: Date.now(),
|
|
11
|
+
data: data.slice(c.start, c.end).map((x) => {
|
|
12
|
+
return {
|
|
13
|
+
kind: "leaf",
|
|
14
|
+
id: x.id,
|
|
15
|
+
data: x,
|
|
16
|
+
};
|
|
17
|
+
}),
|
|
18
|
+
start: c.start,
|
|
19
|
+
end: c.end,
|
|
20
|
+
kind: "center",
|
|
21
|
+
path: c.path,
|
|
22
|
+
size: data.length,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const groupLevel = c.path.length;
|
|
26
|
+
const groupKeys = groupModel.slice(0, groupLevel + 1);
|
|
27
|
+
const filteredForGrouping = data.filter((row) => {
|
|
28
|
+
return c.path.every((v, i) => {
|
|
29
|
+
const groupKey = groupModel[i];
|
|
30
|
+
return `${row[groupKey]}` === v;
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
// This is the leaf level of the grouping
|
|
34
|
+
if (groupLevel === groupModel.length) {
|
|
35
|
+
return {
|
|
36
|
+
kind: "center",
|
|
37
|
+
asOfTime: Date.now(),
|
|
38
|
+
start: c.start,
|
|
39
|
+
end: c.end,
|
|
40
|
+
path: c.path,
|
|
41
|
+
data: filteredForGrouping.slice(c.start, c.end).map((x) => {
|
|
42
|
+
return {
|
|
43
|
+
kind: "leaf",
|
|
44
|
+
id: x.id,
|
|
45
|
+
data: x,
|
|
46
|
+
};
|
|
47
|
+
}),
|
|
48
|
+
size: filteredForGrouping.length,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const groupedData = Object.groupBy(filteredForGrouping, (r) => {
|
|
52
|
+
const groupPath = groupKeys.map((g) => {
|
|
53
|
+
if (typeof g !== "string")
|
|
54
|
+
throw new Error("Non-string groups are not supported by this dummy implementation");
|
|
55
|
+
return r[g];
|
|
56
|
+
});
|
|
57
|
+
return groupPath.join(" / ");
|
|
58
|
+
});
|
|
59
|
+
// Sort the groups to make them nicer
|
|
60
|
+
const rows = Object.entries(groupedData).sort((x, y) => {
|
|
61
|
+
const left = x[0];
|
|
62
|
+
const right = y[0];
|
|
63
|
+
const asNumberLeft = Number.parseFloat(left.split("/").at(-1).trim());
|
|
64
|
+
const asNumberRight = Number.parseFloat(right.split("/").at(-1).trim());
|
|
65
|
+
if (Number.isNaN(asNumberLeft) || Number.isNaN(asNumberRight)) {
|
|
66
|
+
if (!left && !right)
|
|
67
|
+
return 0;
|
|
68
|
+
if (!left)
|
|
69
|
+
return 1;
|
|
70
|
+
if (!right)
|
|
71
|
+
return -1;
|
|
72
|
+
return left.localeCompare(right);
|
|
73
|
+
}
|
|
74
|
+
return asNumberLeft - asNumberRight;
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
kind: "center",
|
|
78
|
+
asOfTime: Date.now(),
|
|
79
|
+
data: rows.slice(c.start, c.end).map((x) => {
|
|
80
|
+
const childRows = x[1];
|
|
81
|
+
const nextGroup = groupLevel + 1;
|
|
82
|
+
let childCnt;
|
|
83
|
+
if (nextGroup === groupModel.length)
|
|
84
|
+
childCnt = childRows.length;
|
|
85
|
+
else {
|
|
86
|
+
childCnt = Object.keys(Object.groupBy(childRows, (x) => {
|
|
87
|
+
const groupKey = groupModel[nextGroup];
|
|
88
|
+
return x[groupKey];
|
|
89
|
+
})).length;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
kind: "branch",
|
|
93
|
+
childCount: childCnt,
|
|
94
|
+
data: {}, // See aggregations
|
|
95
|
+
id: x[0],
|
|
96
|
+
key: x[0].split(" / ").at(-1),
|
|
97
|
+
};
|
|
98
|
+
}),
|
|
99
|
+
path: c.path,
|
|
100
|
+
start: c.start,
|
|
101
|
+
end: c.end,
|
|
102
|
+
size: rows.length,
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "../../css/light-dark.css";
|
|
3
|
+
import "@1771technologies/lytenyte-design/shadcn-vars.css";
|
|
4
|
+
import "../../css/components.css";
|
|
5
|
+
export default function Buttons() {
|
|
6
|
+
return (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, className: "ln-light", children: [_jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [_jsx("button", { "data-ln-size": "sm", "data-ln-button": "primary", children: "Button" }), _jsx("button", { "data-ln-size": "md", "data-ln-button": "primary", children: "Button" }), _jsx("button", { "data-ln-size": "lg", "data-ln-button": "primary", children: "Button" }), _jsx("button", { "data-ln-size": "mx", "data-ln-button": "primary", children: "Button" })] }), _jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [_jsx("button", { "data-ln-size": "sm", "data-ln-button": "primary", disabled: true, children: "Button" }), _jsx("button", { "data-ln-size": "md", "data-ln-button": "primary", disabled: true, children: "Button" }), _jsx("button", { "data-ln-size": "lg", "data-ln-button": "primary", disabled: true, children: "Button" }), _jsx("button", { "data-ln-size": "mx", "data-ln-button": "primary", disabled: true, children: "Button" })] }), _jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [_jsx("button", { "data-ln-size": "sm", "data-ln-button": "secondary", children: "Button" }), _jsx("button", { "data-ln-size": "md", "data-ln-button": "secondary", children: "Button" }), _jsx("button", { "data-ln-size": "lg", "data-ln-button": "secondary", children: "Button" }), _jsx("button", { "data-ln-size": "mx", "data-ln-button": "secondary", children: "Button" })] }), _jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [_jsx("button", { "data-ln-size": "sm", "data-ln-button": "tertiary", children: "Button" }), _jsx("button", { "data-ln-size": "md", "data-ln-button": "tertiary", children: "Button" }), _jsx("button", { "data-ln-size": "lg", "data-ln-button": "tertiary", children: "Button" }), _jsx("button", { "data-ln-size": "mx", "data-ln-button": "tertiary", children: "Button" })] })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "../../css/light-dark.css";
|
|
3
|
+
import "../../css/components/input.css";
|
|
4
|
+
export default function Inputs() {
|
|
5
|
+
return (_jsxs("div", { style: {
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: "column",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
gap: 20,
|
|
11
|
+
padding: 20,
|
|
12
|
+
}, children: [_jsx("input", { "data-ln-input": true }), _jsx("button", { "data-ln-input": true, style: { width: 152 }, children: "Greater Than" })] }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from "@1771technologies/play-frame";
|
|
3
|
+
import "@1771technologies/lytenyte-design/fonts.css";
|
|
4
|
+
import "../../css/grid-full.css";
|
|
5
|
+
import { useRef, useState } from "react";
|
|
6
|
+
import { RowGroupCell } from "../components/row-group-cell.js";
|
|
7
|
+
import { useServerDataSource } from "../data-source-server/use-server-data-source.js";
|
|
8
|
+
import { Server } from "./basic-server-data/server.js";
|
|
9
|
+
import { Grid } from "../index.js";
|
|
10
|
+
const columns = [
|
|
11
|
+
{
|
|
12
|
+
id: "Gender",
|
|
13
|
+
width: 120,
|
|
14
|
+
widthFlex: 1,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "Education Level",
|
|
18
|
+
name: "Education",
|
|
19
|
+
width: 160,
|
|
20
|
+
hide: true,
|
|
21
|
+
widthFlex: 1,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "Age",
|
|
25
|
+
type: "number",
|
|
26
|
+
width: 100,
|
|
27
|
+
widthFlex: 1,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "Years of Experience",
|
|
31
|
+
name: "YoE",
|
|
32
|
+
type: "number",
|
|
33
|
+
width: 100,
|
|
34
|
+
widthFlex: 1,
|
|
35
|
+
},
|
|
36
|
+
{ id: "Salary", type: "number", width: 160, widthFlex: 1 },
|
|
37
|
+
];
|
|
38
|
+
export default function Experimental() {
|
|
39
|
+
const ds = useServerDataSource({
|
|
40
|
+
rowGroupDefaultExpansion: true,
|
|
41
|
+
queryFn: async ({ requests }) => {
|
|
42
|
+
return Server(requests, []);
|
|
43
|
+
},
|
|
44
|
+
queryKey: [],
|
|
45
|
+
rowUpdateOptimistically: true,
|
|
46
|
+
onRowsAdded: async () => {
|
|
47
|
+
//
|
|
48
|
+
},
|
|
49
|
+
onRowsDeleted: async () => { },
|
|
50
|
+
});
|
|
51
|
+
const [rowGroupColumn, setRowGroupColumn] = useState({
|
|
52
|
+
cellRenderer: RowGroupCell,
|
|
53
|
+
});
|
|
54
|
+
const isLoading = ds.isLoading.useValue();
|
|
55
|
+
const error = ds.loadingError.useValue();
|
|
56
|
+
const { resolvedTheme } = useTheme();
|
|
57
|
+
const ref = useRef(null);
|
|
58
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { style: { height: 40 }, children: [_jsxs(_Fragment, { children: [isLoading && _jsx("div", { children: "Loading..." }), error && _jsx("div", { children: `${error}` })] }), _jsx("button", { onClick: () => {
|
|
59
|
+
ref.current?.rowSelect({ selected: "all" });
|
|
60
|
+
}, children: "Select All" }), _jsx("button", { onClick: () => ref.current?.rowAdd([{ id: crypto.randomUUID(), data: {}, kind: "leaf", depth: 0 }]), children: "Add Row" })] }), _jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: _jsx("div", { className: "ln-grid " + (resolvedTheme === "light" ? "ln-light" : "ln-dark"), style: { height: "90vh", width: "90vw" }, children: _jsx(Grid, { columns: columns, rowSource: ds, rowGroupColumn: rowGroupColumn, onRowGroupColumnChange: setRowGroupColumn, columnMarker: {
|
|
61
|
+
on: true,
|
|
62
|
+
cellRenderer: ({ api, row }) => {
|
|
63
|
+
return _jsx("button", { onClick: () => api.rowDelete([row]), children: "X" });
|
|
64
|
+
},
|
|
65
|
+
}, ref: ref }) }) })] }));
|
|
66
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from "@1771technologies/play-frame";
|
|
3
|
+
import "@1771technologies/lytenyte-design/fonts.css";
|
|
4
|
+
import "../../css/grid-full.css";
|
|
5
|
+
import { useMemo, useRef } from "react";
|
|
6
|
+
import { Grid } from "../index.js";
|
|
7
|
+
import { useTreeDataSource } from "../data-source-tree/use-tree-data-source.js";
|
|
8
|
+
import { RowGroupCell } from "../components/row-group-cell.js";
|
|
9
|
+
const columns = [
|
|
10
|
+
{
|
|
11
|
+
id: "x",
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
export default function Experimental() {
|
|
15
|
+
const ds = useTreeDataSource({
|
|
16
|
+
filter: (v) => v.x > 1,
|
|
17
|
+
data: {
|
|
18
|
+
one: { x: 12 },
|
|
19
|
+
two: {
|
|
20
|
+
x: 11,
|
|
21
|
+
fire: {
|
|
22
|
+
x: 11,
|
|
23
|
+
},
|
|
24
|
+
axel: {
|
|
25
|
+
x: 12,
|
|
26
|
+
cooked: {
|
|
27
|
+
x: 12,
|
|
28
|
+
},
|
|
29
|
+
timer: {
|
|
30
|
+
x: 1,
|
|
31
|
+
fly: {
|
|
32
|
+
y: 1,
|
|
33
|
+
x: 0.5,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const { resolvedTheme } = useTheme();
|
|
41
|
+
const ref = useRef(null);
|
|
42
|
+
return (_jsx(_Fragment, { children: _jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: _jsx("div", { className: "ln-grid " + (resolvedTheme === "light" ? "ln-light" : "ln-dark"), style: { height: "90vh", width: "90vw" }, children: _jsx(Grid, { columns: columns, rowSource: ds, ref: ref, rowGroupColumn: useMemo(() => {
|
|
43
|
+
return {
|
|
44
|
+
cellRenderer: RowGroupCell,
|
|
45
|
+
};
|
|
46
|
+
}, []) }) }) }) }));
|
|
47
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getRootCell } from "./get-root-cell.js";
|
|
2
|
+
export function adjustRectForRowAndCellSpan(cellRoot, rect) {
|
|
3
|
+
let { rowStart, rowEnd, columnStart, columnEnd } = rect;
|
|
4
|
+
// Check the top row of the rect.
|
|
5
|
+
for (let i = columnStart; i < columnEnd; i++) {
|
|
6
|
+
let cell = getRootCell(cellRoot, rowStart, i);
|
|
7
|
+
if (cell) {
|
|
8
|
+
columnStart = Math.min(columnStart, cell.colIndex);
|
|
9
|
+
columnEnd = Math.max(columnEnd, cell.colIndex + cell.colSpan);
|
|
10
|
+
rowStart = Math.min(rowStart, cell.rowIndex);
|
|
11
|
+
rowEnd = Math.max(rowEnd, cell.rowIndex + cell.rowSpan);
|
|
12
|
+
}
|
|
13
|
+
cell = getRootCell(cellRoot, rowEnd - 1, i);
|
|
14
|
+
if (cell) {
|
|
15
|
+
columnStart = Math.min(columnStart, cell.colIndex);
|
|
16
|
+
columnEnd = Math.max(columnEnd, cell.colIndex + cell.colSpan);
|
|
17
|
+
rowStart = Math.min(rowStart, cell.rowIndex);
|
|
18
|
+
rowEnd = Math.max(rowEnd, cell.rowIndex + cell.rowSpan);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
for (let i = rowStart; i < rowEnd; i++) {
|
|
22
|
+
let cell = getRootCell(cellRoot, i, columnStart);
|
|
23
|
+
if (cell) {
|
|
24
|
+
columnStart = Math.min(columnStart, cell.colIndex);
|
|
25
|
+
columnEnd = Math.max(columnEnd, cell.colIndex + cell.colSpan);
|
|
26
|
+
rowStart = Math.min(rowStart, cell.rowIndex);
|
|
27
|
+
rowEnd = Math.max(rowEnd, cell.rowIndex + cell.rowSpan);
|
|
28
|
+
}
|
|
29
|
+
cell = getRootCell(cellRoot, i, columnEnd - 1);
|
|
30
|
+
if (cell) {
|
|
31
|
+
columnStart = Math.min(columnStart, cell.colIndex);
|
|
32
|
+
columnEnd = Math.max(columnEnd, cell.colIndex + cell.colSpan);
|
|
33
|
+
rowStart = Math.min(rowStart, cell.rowIndex);
|
|
34
|
+
rowEnd = Math.max(rowEnd, cell.rowIndex + cell.rowSpan);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
rowStart,
|
|
39
|
+
rowEnd,
|
|
40
|
+
columnStart,
|
|
41
|
+
columnEnd,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { clamp } from "@1771technologies/lytenyte-shared";
|
|
2
|
+
export function boundSelectionRect(view, rowCount, rect) {
|
|
3
|
+
const maxRow = rowCount;
|
|
4
|
+
const minRow = 0;
|
|
5
|
+
const maxColumn = view.visibleColumns.length;
|
|
6
|
+
const minColumn = 0;
|
|
7
|
+
const rowStartMaybe = clamp(minRow, rect.rowStart, maxRow);
|
|
8
|
+
const rowEndMaybe = clamp(minRow, rect.rowEnd, maxRow);
|
|
9
|
+
const colStartMaybe = clamp(minColumn, rect.columnStart, maxColumn);
|
|
10
|
+
const colEndMaybe = clamp(minColumn, rect.columnEnd, maxColumn);
|
|
11
|
+
const rowStart = Math.min(rowStartMaybe, rowEndMaybe);
|
|
12
|
+
const rowEnd = Math.max(rowStartMaybe, rowEndMaybe);
|
|
13
|
+
const columnStart = Math.min(colStartMaybe, colEndMaybe);
|
|
14
|
+
const columnEnd = Math.max(colStartMaybe, colEndMaybe);
|
|
15
|
+
return { rowStart, rowEnd, columnStart, columnEnd };
|
|
16
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { CellStyleRow } from "./cell-style-row.js";
|
|
4
|
+
import { isTopRect } from "./is-top-rect.js";
|
|
5
|
+
import { isCenterRect } from "./is-center-rect.js";
|
|
6
|
+
import { isBottomRect } from "./is-bottom-rect.js";
|
|
7
|
+
import { useRoot } from "@1771technologies/lytenyte-core/internal";
|
|
8
|
+
import { useProRoot } from "../root/context.js";
|
|
9
|
+
export const CellSelectionTop = memo(function CellSelectionTop() {
|
|
10
|
+
const { source } = useRoot();
|
|
11
|
+
const { cellSelectionSplits: allRects, cellSelectionAdditiveRects: additive, cellSelectionIsDeselect, } = useProRoot();
|
|
12
|
+
const topCount = source.useTopCount();
|
|
13
|
+
const topRects = useMemo(() => {
|
|
14
|
+
return allRects.filter((rect) => isTopRect(topCount, rect));
|
|
15
|
+
}, [allRects, topCount]);
|
|
16
|
+
const isDeselect = cellSelectionIsDeselect.current;
|
|
17
|
+
const additiveRects = useMemo(() => {
|
|
18
|
+
if (!additive)
|
|
19
|
+
return [];
|
|
20
|
+
return additive.filter((rect) => isTopRect(topCount, rect));
|
|
21
|
+
}, [additive, topCount]);
|
|
22
|
+
return (_jsxs("div", { role: "presentation", style: {
|
|
23
|
+
width: "100%",
|
|
24
|
+
height: 0,
|
|
25
|
+
display: "grid",
|
|
26
|
+
gridTemplateRows: "0px",
|
|
27
|
+
gridTemplateColumns: "0px",
|
|
28
|
+
}, children: [topRects.map((rect, i) => {
|
|
29
|
+
return _jsx(CellStyleRow, { rect: rect, isRowPinnedTop: true }, i);
|
|
30
|
+
}), additiveRects.map((rect) => {
|
|
31
|
+
return _jsx(CellStyleRow, { rect: rect, isDeselect: isDeselect }, rect.columnStart);
|
|
32
|
+
})] }));
|
|
33
|
+
});
|
|
34
|
+
export const CellSelectionCenter = memo(function CellSelectionCenter() {
|
|
35
|
+
const { source } = useRoot();
|
|
36
|
+
const { cellSelectionSplits: allRects, cellSelectionAdditiveRects: additive, cellSelectionIsDeselect, } = useProRoot();
|
|
37
|
+
const topCount = source.useTopCount();
|
|
38
|
+
const rowCount = source.useRowCount();
|
|
39
|
+
const botCount = source.useBottomCount();
|
|
40
|
+
const centerRects = useMemo(() => {
|
|
41
|
+
return allRects.filter((rect) => isCenterRect(rowCount, botCount, topCount, rect));
|
|
42
|
+
}, [allRects, botCount, rowCount, topCount]);
|
|
43
|
+
const isDeselect = cellSelectionIsDeselect.current;
|
|
44
|
+
const additiveRects = useMemo(() => {
|
|
45
|
+
if (!additive)
|
|
46
|
+
return [];
|
|
47
|
+
return additive.filter((rect) => isCenterRect(rowCount, botCount, topCount, rect));
|
|
48
|
+
}, [additive, botCount, rowCount, topCount]);
|
|
49
|
+
return (_jsxs("div", { role: "presentation", style: {
|
|
50
|
+
width: "100%",
|
|
51
|
+
height: 0,
|
|
52
|
+
display: "grid",
|
|
53
|
+
gridTemplateRows: "0px",
|
|
54
|
+
gridTemplateColumns: "0px",
|
|
55
|
+
}, children: [centerRects.map((rect, i) => {
|
|
56
|
+
return _jsx(CellStyleRow, { rect: rect }, i);
|
|
57
|
+
}), additiveRects.map((rect) => {
|
|
58
|
+
return _jsx(CellStyleRow, { rect: rect, isDeselect: isDeselect }, rect.columnStart);
|
|
59
|
+
})] }));
|
|
60
|
+
});
|
|
61
|
+
export const CellSelectionBottom = memo(function CellSelectionBottom() {
|
|
62
|
+
const { source } = useRoot();
|
|
63
|
+
const { cellSelectionSplits: allRects, cellSelectionAdditiveRects: additive, cellSelectionIsDeselect, } = useProRoot();
|
|
64
|
+
const rowCount = source.useRowCount();
|
|
65
|
+
const botCount = source.useBottomCount();
|
|
66
|
+
const bottomRects = useMemo(() => {
|
|
67
|
+
return allRects.filter((rect) => isBottomRect(rowCount, botCount, rect));
|
|
68
|
+
}, [allRects, botCount, rowCount]);
|
|
69
|
+
const isDeselect = cellSelectionIsDeselect.current;
|
|
70
|
+
const additiveRects = useMemo(() => {
|
|
71
|
+
if (!additive)
|
|
72
|
+
return [];
|
|
73
|
+
return additive.filter((rect) => isBottomRect(rowCount, botCount, rect));
|
|
74
|
+
}, [additive, botCount, rowCount]);
|
|
75
|
+
return (_jsxs("div", { role: "presentation", style: {
|
|
76
|
+
width: "100%",
|
|
77
|
+
height: 0,
|
|
78
|
+
display: "grid",
|
|
79
|
+
gridTemplateRows: "0px",
|
|
80
|
+
gridTemplateColumns: "0px",
|
|
81
|
+
}, children: [bottomRects.map((rect, i) => {
|
|
82
|
+
return _jsx(CellStyleRow, { rect: rect, isRowPinnedBottom: true }, i);
|
|
83
|
+
}), additiveRects.map((rect) => {
|
|
84
|
+
return _jsx(CellStyleRow, { rect: rect, isDeselect: isDeselect }, rect.columnStart);
|
|
85
|
+
})] }));
|
|
86
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CellSelectionDriver(): import("react/jsx-runtime").JSX.Element;
|