@1771technologies/lytenyte-pro 1.0.20 → 2.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/all-colors.css +8 -0
- package/css/components/button.css +176 -0
- package/css/components/checkbox.css +54 -0
- package/css/components/input.css +64 -0
- package/css/components/tree-view.css +108 -0
- package/css/components.css +300 -0
- package/css/cotton-candy.css +1 -0
- package/css/dark.css +1 -0
- package/css/design.css +1 -0
- package/css/fonts.css +1 -0
- package/css/grid-full.css +3 -0
- package/css/grid.css +81 -0
- package/css/light-dark.css +3 -0
- package/css/light.css +1 -0
- package/css/pill-manager.css +184 -0
- package/css/shadcn-vars.css +1 -0
- package/css/shadcn.css +1 -0
- package/css/teal.css +1 -0
- package/css/term.css +1 -0
- package/css/tw.css +1 -0
- 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 -2
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +5 -5
- package/dist/cell-selection/are-rects-equal.d.ts +1 -1
- package/dist/cell-selection/bound-selection-rect.d.ts +3 -2
- package/dist/cell-selection/bound-selection-rect.js +2 -3
- package/dist/cell-selection/cell-selection-containers.js +32 -37
- 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 +1 -1
- package/dist/cell-selection/cell-style-row.js +27 -32
- 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 +1 -1
- 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 -2
- package/dist/cell-selection/full-width-start-end-index.js +2 -3
- package/dist/cell-selection/get-root-cell.d.ts +3 -2
- package/dist/cell-selection/get-root-cell.js +2 -2
- package/dist/cell-selection/index.d.ts +0 -5
- package/dist/cell-selection/index.js +0 -5
- package/dist/cell-selection/is-bottom-rect.d.ts +2 -2
- package/dist/cell-selection/is-bottom-rect.js +1 -4
- package/dist/cell-selection/is-center-col-rect.d.ts +2 -2
- package/dist/cell-selection/is-center-col-rect.js +2 -4
- package/dist/cell-selection/is-center-rect.d.ts +2 -2
- package/dist/cell-selection/is-center-rect.js +3 -4
- package/dist/cell-selection/is-end-rect.d.ts +2 -2
- package/dist/cell-selection/is-end-rect.js +2 -3
- 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 -2
- package/dist/cell-selection/is-overlapping-rect.js +4 -5
- package/dist/cell-selection/is-start-rect.d.ts +2 -2
- package/dist/cell-selection/is-start-rect.js +2 -3
- package/dist/cell-selection/is-top-rect.d.ts +2 -2
- package/dist/cell-selection/is-top-rect.js +1 -2
- package/dist/cell-selection/is-within-selection-rect.d.ts +1 -1
- package/dist/cell-selection/split-cell-selection-rect.d.ts +2 -1
- package/dist/cell-selection/split-on-pivot.d.ts +1 -1
- package/dist/cell-selection/update-additive-cell-selection.d.ts +4 -5
- package/dist/cell-selection/update-additive-cell-selection.js +9 -11
- package/dist/cell-selection/use-edge-scroll.d.ts +2 -6
- package/dist/cell-selection/use-edge-scroll.js +21 -16
- 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/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/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/types.d.ts +4 -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/apply-delete-action-to-tree.d.ts +2 -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-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/is-set-action-a-no-op-on-node.d.ts +2 -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-resize.d.ts +2 -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/range-tree/range-tree.d.ts +66 -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/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-path.d.ts +2 -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/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/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 +120 -13
- package/dist/index.js +22 -13
- package/dist/license/md5-hash.d.ts +1 -1
- package/dist/license/md5-hash.js +1 -1
- 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 +29 -16
- package/dist/+types.d.ts +0 -6177
- package/dist/__play__/cell-selections/cell-selection.play.d.ts +0 -5
- package/dist/__play__/cell-selections/cell-selection.play.js +0 -80
- package/dist/__play__/filter-select/filter-select.play.d.ts +0 -4
- package/dist/__play__/filter-select/filter-select.play.js +0 -76
- package/dist/__play__/test-utils/bank-data-smaller.d.ts +0 -19
- package/dist/__play__/test-utils/bank-data-smaller.js +0 -252
- package/dist/__play__/test-utils/row-handler.d.ts +0 -6
- package/dist/__play__/test-utils/row-handler.js +0 -32
- package/dist/cell-selection/cell-selection-driver.js +0 -289
- package/dist/cell-selection/expand-cell-selection-down.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-down.js +0 -39
- package/dist/cell-selection/expand-cell-selection-end.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-end.js +0 -40
- package/dist/cell-selection/expand-cell-selection-start.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-start.js +0 -39
- package/dist/cell-selection/expand-cell-selection-up.d.ts +0 -5
- package/dist/cell-selection/expand-cell-selection-up.js +0 -39
- package/dist/column-manager/branch-lookup-context.d.ts +0 -4
- package/dist/column-manager/branch-lookup-context.js +0 -3
- package/dist/column-manager/branch.d.ts +0 -15
- package/dist/column-manager/branch.js +0 -54
- package/dist/column-manager/column-manager.d.ts +0 -13
- package/dist/column-manager/column-manager.js +0 -18
- package/dist/column-manager/context.d.ts +0 -7
- package/dist/column-manager/context.js +0 -3
- package/dist/column-manager/label.d.ts +0 -5
- package/dist/column-manager/label.js +0 -18
- package/dist/column-manager/leaf.d.ts +0 -6
- package/dist/column-manager/leaf.js +0 -58
- package/dist/column-manager/move-handle.d.ts +0 -5
- package/dist/column-manager/move-handle.js +0 -72
- package/dist/column-manager/panel.d.ts +0 -1
- package/dist/column-manager/panel.js +0 -2
- package/dist/column-manager/root.d.ts +0 -8
- package/dist/column-manager/root.js +0 -7
- package/dist/column-manager/use-column-manager.d.ts +0 -10
- package/dist/column-manager/use-column-manager.js +0 -24
- package/dist/column-manager/use-columns-from-context.d.ts +0 -3
- package/dist/column-manager/use-columns-from-context.js +0 -23
- package/dist/column-manager/visibility-checkbox.d.ts +0 -9
- package/dist/column-manager/visibility-checkbox.js +0 -30
- package/dist/context.d.ts +0 -11
- package/dist/context.js +0 -5
- package/dist/filter-selects/apply.d.ts +0 -7
- package/dist/filter-selects/apply.js +0 -22
- package/dist/filter-selects/clear.d.ts +0 -7
- package/dist/filter-selects/clear.js +0 -22
- package/dist/filter-selects/context.d.ts +0 -13
- package/dist/filter-selects/context.js +0 -3
- package/dist/filter-selects/filter-combinator.d.ts +0 -10
- package/dist/filter-selects/filter-combinator.js +0 -19
- package/dist/filter-selects/filter-row-context.d.ts +0 -30
- package/dist/filter-selects/filter-row-context.js +0 -3
- package/dist/filter-selects/filter-row.d.ts +0 -13
- package/dist/filter-selects/filter-row.js +0 -118
- package/dist/filter-selects/index.d.ts +0 -22
- package/dist/filter-selects/index.js +0 -20
- package/dist/filter-selects/is-complete-filter.d.ts +0 -2
- package/dist/filter-selects/is-complete-filter.js +0 -5
- package/dist/filter-selects/operator-select.d.ts +0 -14
- package/dist/filter-selects/operator-select.js +0 -25
- package/dist/filter-selects/options.d.ts +0 -9
- package/dist/filter-selects/options.js +0 -100
- package/dist/filter-selects/reset.d.ts +0 -7
- package/dist/filter-selects/reset.js +0 -22
- package/dist/filter-selects/root.d.ts +0 -14
- package/dist/filter-selects/root.js +0 -5
- package/dist/filter-selects/to-filter-item.d.ts +0 -3
- package/dist/filter-selects/to-filter-item.js +0 -7
- package/dist/filter-selects/use-filter-select.d.ts +0 -38
- package/dist/filter-selects/use-filter-select.js +0 -167
- package/dist/filter-selects/value-input.d.ts +0 -12
- package/dist/filter-selects/value-input.js +0 -27
- package/dist/filter-tree/branch.d.ts +0 -13
- package/dist/filter-tree/branch.js +0 -21
- package/dist/filter-tree/context.d.ts +0 -27
- package/dist/filter-tree/context.js +0 -5
- package/dist/filter-tree/filter-tree.d.ts +0 -14
- package/dist/filter-tree/filter-tree.js +0 -18
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +0 -38
- package/dist/filter-tree/hooks/use-filter-tree.js +0 -101
- package/dist/filter-tree/hooks/use-tree-item.d.ts +0 -8
- package/dist/filter-tree/hooks/use-tree-item.js +0 -116
- package/dist/filter-tree/inclusion-checkbox.d.ts +0 -9
- package/dist/filter-tree/inclusion-checkbox.js +0 -14
- package/dist/filter-tree/label.d.ts +0 -5
- package/dist/filter-tree/label.js +0 -18
- package/dist/filter-tree/leaf.d.ts +0 -6
- package/dist/filter-tree/leaf.js +0 -14
- package/dist/filter-tree/root.d.ts +0 -13
- package/dist/filter-tree/root.js +0 -30
- package/dist/grid/cell.d.ts +0 -6
- package/dist/grid/cell.js +0 -3
- package/dist/grid/dialog-driver.d.ts +0 -1
- package/dist/grid/dialog-driver.js +0 -21
- package/dist/grid/header-cell.d.ts +0 -10
- package/dist/grid/header-cell.js +0 -3
- package/dist/grid/header-group-cell.d.ts +0 -6
- package/dist/grid/header-group-cell.js +0 -3
- package/dist/grid/header-row.d.ts +0 -5
- package/dist/grid/header-row.js +0 -2
- package/dist/grid/header.d.ts +0 -1
- package/dist/grid/header.js +0 -2
- package/dist/grid/popover-driver.d.ts +0 -1
- package/dist/grid/popover-driver.js +0 -21
- package/dist/grid/root.d.ts +0 -8
- package/dist/grid/root.js +0 -37
- package/dist/grid/row-full-width.d.ts +0 -9
- package/dist/grid/row-full-width.js +0 -3
- package/dist/grid/row.d.ts +0 -8
- package/dist/grid/row.js +0 -3
- package/dist/grid/rows-container.d.ts +0 -1
- package/dist/grid/rows-container.js +0 -2
- package/dist/grid/rows-sections.d.ts +0 -3
- package/dist/grid/rows-sections.js +0 -13
- package/dist/grid/viewport.d.ts +0 -1
- package/dist/grid/viewport.js +0 -9
- package/dist/grid-box/+types.d.ts +0 -15
- package/dist/grid-box/context.d.ts +0 -9
- package/dist/grid-box/context.js +0 -3
- package/dist/grid-box/grid-box.d.ts +0 -12
- package/dist/grid-box/grid-box.js +0 -14
- package/dist/grid-box/item.d.ts +0 -10
- package/dist/grid-box/item.js +0 -62
- package/dist/grid-box/panel.d.ts +0 -1
- package/dist/grid-box/panel.js +0 -9
- package/dist/grid-box/root.d.ts +0 -9
- package/dist/grid-box/root.js +0 -8
- package/dist/grid-box/use-aggregation-box-items.d.ts +0 -18
- package/dist/grid-box/use-aggregation-box-items.js +0 -61
- package/dist/grid-box/use-column-box-items.d.ts +0 -34
- package/dist/grid-box/use-column-box-items.js +0 -78
- package/dist/grid-box/use-row-group-box-items.d.ts +0 -18
- package/dist/grid-box/use-row-group-box-items.js +0 -169
- package/dist/grid-provider/context.d.ts +0 -5
- package/dist/grid-provider/context.js +0 -2
- package/dist/grid-provider/provider.d.ts +0 -3
- package/dist/grid-provider/provider.js +0 -2
- package/dist/grid-provider/use-grid.d.ts +0 -3
- package/dist/grid-provider/use-grid.js +0 -3
- package/dist/grid.d.ts +0 -18
- package/dist/grid.js +0 -28
- package/dist/icons/index.d.ts +0 -1
- package/dist/icons/index.js +0 -1
- package/dist/listbox/context.d.ts +0 -6
- package/dist/listbox/context.js +0 -3
- package/dist/listbox/item.d.ts +0 -1
- package/dist/listbox/item.js +0 -25
- package/dist/listbox/panel.d.ts +0 -1
- package/dist/listbox/panel.js +0 -50
- package/dist/listbox/root.d.ts +0 -6
- package/dist/listbox/root.js +0 -12
- package/dist/row-data-source-client/+constants.d.ts +0 -2
- package/dist/row-data-source-client/+constants.js +0 -2
- package/dist/row-data-source-client/+types.d.ts +0 -27
- package/dist/row-data-source-client/built-ins/avg.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/avg.js +0 -16
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +0 -44
- package/dist/row-data-source-client/built-ins/built-ins.js +0 -44
- package/dist/row-data-source-client/built-ins/count.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/count.js +0 -16
- package/dist/row-data-source-client/built-ins/first.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/first.js +0 -12
- package/dist/row-data-source-client/built-ins/group.d.ts +0 -1
- package/dist/row-data-source-client/built-ins/group.js +0 -3
- package/dist/row-data-source-client/built-ins/last.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/last.js +0 -12
- package/dist/row-data-source-client/built-ins/max.d.ts +0 -11
- package/dist/row-data-source-client/built-ins/max.js +0 -25
- package/dist/row-data-source-client/built-ins/min.d.ts +0 -11
- package/dist/row-data-source-client/built-ins/min.js +0 -25
- package/dist/row-data-source-client/built-ins/sum.d.ts +0 -10
- package/dist/row-data-source-client/built-ins/sum.js +0 -21
- package/dist/row-data-source-client/filter/+types.d.ts +0 -23
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +0 -2
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +0 -109
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +0 -6
- package/dist/row-data-source-client/pivots/create-agg-model.js +0 -13
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +0 -2
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +0 -50
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +0 -2
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +0 -22
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +0 -2
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +0 -23
- package/dist/row-data-source-client/tree/client-tree.d.ts +0 -18
- package/dist/row-data-source-client/tree/client-tree.js +0 -76
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +0 -2
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +0 -8
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +0 -2
- package/dist/row-data-source-client/tree/evaluator-group.js +0 -9
- package/dist/row-data-source-client/tree/traverse.d.ts +0 -2
- package/dist/row-data-source-client/tree/traverse.js +0 -22
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +0 -10
- package/dist/row-data-source-client/use-client-data-source-paginated.js +0 -573
- package/dist/row-data-source-client/use-client-data-source.d.ts +0 -10
- package/dist/row-data-source-client/use-client-data-source.js +0 -667
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +0 -9
- package/dist/row-data-source-client/use-client-tree-data-source.js +0 -512
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +0 -59
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +0 -36
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +0 -24
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +0 -14
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +0 -14
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/make-async-tree.js +0 -19
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +0 -2
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +0 -52
- package/dist/row-data-source-server/range-tree/range-tree.d.ts +0 -66
- package/dist/row-data-source-server/server-data.d.ts +0 -70
- package/dist/row-data-source-server/server-data.js +0 -519
- package/dist/row-data-source-server/use-server-data-source.d.ts +0 -3
- package/dist/row-data-source-server/use-server-data-source.js +0 -413
- package/dist/row-data-source-server/utils/get-node-depth.d.ts +0 -2
- package/dist/row-data-source-server/utils/get-node-path.d.ts +0 -2
- package/dist/sort-manager/+types.d.ts +0 -13
- package/dist/sort-manager/context.d.ts +0 -14
- package/dist/sort-manager/context.js +0 -5
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +0 -15
- package/dist/sort-manager/hooks/use-sort-manager.js +0 -56
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +0 -51
- package/dist/sort-manager/hooks/use-sort-row-item.js +0 -145
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +0 -5
- package/dist/sort-manager/hooks/use-sortable-column-items.js +0 -13
- package/dist/sort-manager/root.d.ts +0 -3
- package/dist/sort-manager/root.js +0 -14
- package/dist/sort-manager/sort-add.d.ts +0 -8
- package/dist/sort-manager/sort-add.js +0 -14
- package/dist/sort-manager/sort-apply.d.ts +0 -7
- package/dist/sort-manager/sort-apply.js +0 -24
- package/dist/sort-manager/sort-cancel.d.ts +0 -7
- package/dist/sort-manager/sort-cancel.js +0 -27
- package/dist/sort-manager/sort-clear.d.ts +0 -7
- package/dist/sort-manager/sort-clear.js +0 -22
- package/dist/sort-manager/sort-column-select.d.ts +0 -10
- package/dist/sort-manager/sort-column-select.js +0 -20
- package/dist/sort-manager/sort-direction-select.d.ts +0 -10
- package/dist/sort-manager/sort-direction-select.js +0 -24
- package/dist/sort-manager/sort-manager.d.ts +0 -16
- package/dist/sort-manager/sort-manager.js +0 -26
- package/dist/sort-manager/sort-remove.d.ts +0 -7
- package/dist/sort-manager/sort-remove.js +0 -14
- package/dist/sort-manager/sort-row.d.ts +0 -5
- package/dist/sort-manager/sort-row.js +0 -7
- package/dist/sort-manager/sort-rows.d.ts +0 -1
- package/dist/sort-manager/sort-rows.js +0 -6
- package/dist/sort-manager/sort-value-select.d.ts +0 -11
- package/dist/sort-manager/sort-value-select.js +0 -25
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +0 -3
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +0 -62
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +0 -3
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +0 -50
- package/dist/state/+types.d.ts +0 -36
- package/dist/state/api/cell-root.d.ts +0 -5
- package/dist/state/api/cell-root.js +0 -65
- package/dist/state/api/column-autosize.d.ts +0 -5
- package/dist/state/api/column-autosize.js +0 -72
- package/dist/state/api/column-by-id.d.ts +0 -2
- package/dist/state/api/column-by-id.js +0 -6
- package/dist/state/api/column-field.d.ts +0 -2
- package/dist/state/api/column-field.js +0 -23
- package/dist/state/api/column-from-index.d.ts +0 -2
- package/dist/state/api/column-from-index.js +0 -6
- package/dist/state/api/column-group-toggle.d.ts +0 -2
- package/dist/state/api/column-group-toggle.js +0 -10
- package/dist/state/api/column-index.d.ts +0 -2
- package/dist/state/api/column-index.js +0 -7
- package/dist/state/api/column-move.d.ts +0 -2
- package/dist/state/api/column-move.js +0 -49
- package/dist/state/api/column-resize.d.ts +0 -2
- package/dist/state/api/column-resize.js +0 -9
- package/dist/state/api/column-update.d.ts +0 -5
- package/dist/state/api/column-update.js +0 -26
- package/dist/state/api/dialog-frame.d.ts +0 -8
- package/dist/state/api/dialog-frame.js +0 -16
- package/dist/state/api/edit-begin.d.ts +0 -5
- package/dist/state/api/edit-begin.js +0 -87
- package/dist/state/api/edit-end.d.ts +0 -5
- package/dist/state/api/edit-end.js +0 -43
- package/dist/state/api/edit-is-cell-active.d.ts +0 -5
- package/dist/state/api/edit-is-cell-active.js +0 -22
- package/dist/state/api/edit-update.d.ts +0 -5
- package/dist/state/api/edit-update.js +0 -88
- package/dist/state/api/event-listeners.d.ts +0 -5
- package/dist/state/api/event-listeners.js +0 -19
- package/dist/state/api/export-csv.d.ts +0 -3
- package/dist/state/api/export-csv.js +0 -40
- package/dist/state/api/export-data-rect.d.ts +0 -2
- package/dist/state/api/export-data-rect.js +0 -24
- package/dist/state/api/popover-frame.d.ts +0 -8
- package/dist/state/api/popover-frame.js +0 -16
- package/dist/state/api/position-from-element.d.ts +0 -5
- package/dist/state/api/position-from-element.js +0 -9
- package/dist/state/api/row-by-id.d.ts +0 -2
- package/dist/state/api/row-by-id.js +0 -5
- package/dist/state/api/row-by-index.d.ts +0 -2
- package/dist/state/api/row-by-index.js +0 -9
- package/dist/state/api/row-detail-is-expanded.d.ts +0 -2
- package/dist/state/api/row-detail-is-expanded.js +0 -6
- package/dist/state/api/row-detail-rendered-height.d.ts +0 -5
- package/dist/state/api/row-detail-rendered-height.js +0 -14
- package/dist/state/api/row-detail-toggle.d.ts +0 -2
- package/dist/state/api/row-detail-toggle.js +0 -32
- package/dist/state/api/row-group-apply-expansions.d.ts +0 -2
- package/dist/state/api/row-group-apply-expansions.js +0 -20
- package/dist/state/api/row-group-column-index.d.ts +0 -2
- package/dist/state/api/row-group-column-index.js +0 -14
- package/dist/state/api/row-group-is-expanded.d.ts +0 -2
- package/dist/state/api/row-group-is-expanded.js +0 -15
- package/dist/state/api/row-group-toggle.d.ts +0 -2
- package/dist/state/api/row-group-toggle.js +0 -7
- package/dist/state/api/row-handle-select.d.ts +0 -5
- package/dist/state/api/row-handle-select.js +0 -43
- package/dist/state/api/row-select-all.d.ts +0 -2
- package/dist/state/api/row-select-all.js +0 -17
- package/dist/state/api/row-select.d.ts +0 -5
- package/dist/state/api/row-select.js +0 -35
- package/dist/state/api/row-selected.d.ts +0 -2
- package/dist/state/api/row-selected.js +0 -13
- package/dist/state/api/scroll-into-view.d.ts +0 -5
- package/dist/state/api/scroll-into-view.js +0 -50
- package/dist/state/api/sort-for-column.d.ts +0 -2
- package/dist/state/api/sort-for-column.js +0 -9
- package/dist/state/api/use-row-drag.d.ts +0 -2
- package/dist/state/api/use-row-drag.js +0 -20
- package/dist/state/helpers/cell-row-group.d.ts +0 -2
- package/dist/state/helpers/cell-row-group.js +0 -19
- package/dist/state/helpers/column-add-row-group.d.ts +0 -10
- package/dist/state/helpers/column-add-row-group.js +0 -74
- package/dist/state/helpers/column-layout.d.ts +0 -3
- package/dist/state/helpers/column-layout.js +0 -59
- package/dist/state/helpers/column-marker.d.ts +0 -8
- package/dist/state/helpers/column-marker.js +0 -45
- package/dist/state/helpers/column-view.d.ts +0 -21
- package/dist/state/helpers/column-view.js +0 -33
- package/dist/state/helpers/edit-on-change.d.ts +0 -15
- package/dist/state/helpers/edit-on-change.js +0 -27
- package/dist/state/helpers/empty-row-data-source.d.ts +0 -2
- package/dist/state/helpers/empty-row-data-source.js +0 -18
- package/dist/state/helpers/get-data-rect.d.ts +0 -13
- package/dist/state/helpers/get-data-rect.js +0 -65
- package/dist/state/helpers/get-full-width-callback.d.ts +0 -2
- package/dist/state/helpers/get-full-width-callback.js +0 -10
- package/dist/state/helpers/get-span-callback.d.ts +0 -2
- package/dist/state/helpers/get-span-callback.js +0 -22
- package/dist/state/helpers/resolve-column.d.ts +0 -4
- package/dist/state/helpers/resolve-column.js +0 -29
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +0 -17
- package/dist/state/helpers/row-layout/get-focus-criteria.js +0 -62
- package/dist/state/helpers/row-layout/row-layout.d.ts +0 -19
- package/dist/state/helpers/row-layout/row-layout.js +0 -162
- package/dist/state/use-lytenyte.d.ts +0 -3
- package/dist/state/use-lytenyte.js +0 -686
- package/dist/tree-view/branch/branch.d.ts +0 -14
- package/dist/tree-view/branch/branch.js +0 -63
- package/dist/tree-view/branch/use-branch-keys.d.ts +0 -2
- package/dist/tree-view/branch/use-branch-keys.js +0 -87
- package/dist/tree-view/context.d.ts +0 -22
- package/dist/tree-view/context.js +0 -3
- package/dist/tree-view/depth-provider.d.ts +0 -2
- package/dist/tree-view/depth-provider.js +0 -3
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +0 -2
- package/dist/tree-view/hooks/use-tree-view-paths.js +0 -9
- package/dist/tree-view/index.d.ts +0 -16
- package/dist/tree-view/index.js +0 -16
- package/dist/tree-view/leaf.d.ts +0 -4
- package/dist/tree-view/leaf.js +0 -28
- package/dist/tree-view/navigation/get-all-ids.d.ts +0 -1
- package/dist/tree-view/navigation/get-all-ids.js +0 -7
- package/dist/tree-view/navigation/get-first-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-first-node.js +0 -7
- package/dist/tree-view/navigation/get-last-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-last-node.js +0 -7
- package/dist/tree-view/navigation/get-next-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-next-node.js +0 -13
- package/dist/tree-view/navigation/get-prev-node.d.ts +0 -1
- package/dist/tree-view/navigation/get-prev-node.js +0 -13
- package/dist/tree-view/panel/make-handle-navigation.d.ts +0 -2
- package/dist/tree-view/panel/make-handle-navigation.js +0 -39
- package/dist/tree-view/panel/make-handle-selection.d.ts +0 -2
- package/dist/tree-view/panel/make-handle-selection.js +0 -92
- package/dist/tree-view/panel/make-handle-typeahead.d.ts +0 -1
- package/dist/tree-view/panel/make-handle-typeahead.js +0 -45
- package/dist/tree-view/panel/panel.d.ts +0 -1
- package/dist/tree-view/panel/panel.js +0 -30
- package/dist/tree-view/panel/use-tree-navigation.d.ts +0 -1
- package/dist/tree-view/panel/use-tree-navigation.js +0 -63
- package/dist/tree-view/root.d.ts +0 -17
- package/dist/tree-view/root.js +0 -63
- package/dist/tree-view/utils/get-focusable-nodes.d.ts +0 -1
- package/dist/tree-view/utils/get-focusable-nodes.js +0 -5
- package/dist/tree-view/utils/get-focused-node.d.ts +0 -1
- package/dist/tree-view/utils/get-focused-node.js +0 -14
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +0 -1
- package/dist/tree-view/utils/get-ids-between-nodes.js +0 -15
- package/dist/tree-view/utils/get-panel.d.ts +0 -1
- package/dist/tree-view/utils/get-panel.js +0 -7
- package/dist/tree-view/utils/get-parent-node.d.ts +0 -1
- package/dist/tree-view/utils/get-parent-node.js +0 -10
- package/dist/tree-view/utils/get-sibling-branches.d.ts +0 -1
- package/dist/tree-view/utils/get-sibling-branches.js +0 -14
- package/dist/tree-view/utils/get-tree-node-id.d.ts +0 -1
- package/dist/tree-view/utils/get-tree-node-id.js +0 -3
- package/dist/tree-view/utils/is-branch-node.d.ts +0 -1
- package/dist/tree-view/utils/is-branch-node.js +0 -3
- package/dist/tree-view/utils/is-leaf-node.d.ts +0 -1
- package/dist/tree-view/utils/is-leaf-node.js +0 -3
- package/dist/tree-view/utils/is-tree-node-disabled.d.ts +0 -1
- package/dist/tree-view/utils/is-tree-node-disabled.js +0 -3
- package/dist/tree-view/utils/select-node.d.ts +0 -2
- package/dist/tree-view/utils/select-node.js +0 -15
- package/dist/tree-view/utils/toggle-all-selections.d.ts +0 -2
- package/dist/tree-view/utils/toggle-all-selections.js +0 -9
- package/dist/tree-view/utils/toggle-selection.d.ts +0 -2
- package/dist/tree-view/utils/toggle-selection.js +0 -21
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +0 -2
- package/dist/tree-view/virtualized/force-sync-scrolling.js +0 -23
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +0 -2
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +0 -14
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +0 -31
- package/dist/tree-view/virtualized/make-virtual-tree.js +0 -90
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +0 -9
- package/dist/tree-view/virtualized/use-flattened-tree.js +0 -36
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +0 -2
- package/dist/tree-view/virtualized/use-row-start-and-end.js +0 -27
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +0 -22
- package/dist/tree-view/virtualized/use-virtualized-tree.js +0 -100
- package/dist/types/types.d.ts +0 -8
- package/main.css +0 -465
- /package/dist/cell-selection/{cell-selection-driver.d.ts → cell-selection-driver/cell-selection-driver.d.ts} +0 -0
- /package/dist/{types → components/pill-manager}/types.js +0 -0
- /package/dist/{+types.js → components/smart-select/type.js} +0 -0
- /package/dist/{grid-box/+types.js → components/tree-view/types.js} +0 -0
- /package/dist/{row-data-source-client/+types.js → components/types.js} +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/+constants.async-tree.d.ts +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/+constants.async-tree.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/apply-delete-action-to-tree.js +0 -0
- /package/dist/{row-data-source-server/async-tree → data-source-server/async-tree/data-integrity-checks}/check-set-action-item-keys-fit.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/get-parent-node-by-path.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/is-set-action-a-no-op-on-node.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/maybe-apply-parent-remove-self.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/async-tree/maybe-apply-resize.js +0 -0
- /package/dist/{row-data-source-client/filter/+types.js → data-source-server/async-tree/types.js} +0 -0
- /package/dist/{row-data-source-server → data-source-server}/range-tree/range-tree.js +0 -0
- /package/dist/{row-data-source-server/async-tree/+types.async-tree.js → data-source-server/types.js} +0 -0
- /package/dist/{row-data-source-server → data-source-server}/utils/get-node-depth.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/utils/get-node-path.js +0 -0
- /package/dist/{row-data-source-server → data-source-server}/utils/get-request-id.d.ts +0 -0
- /package/dist/{row-data-source-server → data-source-server}/utils/get-request-id.js +0 -0
- /package/dist/{sort-manager/+types.js → data-source-tree/types.js} +0 -0
- /package/dist/{state/+types.js → hooks/use-slot/types.js} +0 -0
|
@@ -1,573 +0,0 @@
|
|
|
1
|
-
import {} from "../+types.js";
|
|
2
|
-
import { useRef } from "react";
|
|
3
|
-
import { traverse } from "./tree/traverse.js";
|
|
4
|
-
import { dateComparator, numberComparator, stringComparator, } from "@1771technologies/lytenyte-shared";
|
|
5
|
-
import { computed, effect, makeAtom, peek, signal, } from "@1771technologies/lytenyte-core/yinternal";
|
|
6
|
-
import { clamp, equal, get } from "@1771technologies/lytenyte-shared";
|
|
7
|
-
import { makeClientTree } from "./tree/client-tree.js";
|
|
8
|
-
import { computeFilteredRows } from "./filter/compute-filtered-rows.js";
|
|
9
|
-
import { builtIns } from "./built-ins/built-ins.js";
|
|
10
|
-
export function makeClientDataSourcePaginated(p) {
|
|
11
|
-
const pageInternal = signal(0);
|
|
12
|
-
const rowsPerPage = signal(p.rowsPerPage ?? 50);
|
|
13
|
-
const pageCount = computed(() => Math.max(Math.ceil(flatLength() / rowsPerPage()), 1));
|
|
14
|
-
const page = computed(() => clamp(0, pageInternal(), pageCount() - 1));
|
|
15
|
-
page.set = (n) => {
|
|
16
|
-
const res = typeof n === "function" ? n(peek(pageInternal)) : n;
|
|
17
|
-
pageInternal.set(clamp(0, res, peek(pageCount) - 1));
|
|
18
|
-
return res;
|
|
19
|
-
};
|
|
20
|
-
const data = signal(p.data);
|
|
21
|
-
const topData = signal(p.topData ?? []);
|
|
22
|
-
const bottomData = signal(p.bottomData ?? []);
|
|
23
|
-
const dataToSrc$ = computed(() => {
|
|
24
|
-
return new Map(data().map((c, i) => [c, i]));
|
|
25
|
-
});
|
|
26
|
-
const cache = new Map();
|
|
27
|
-
const centerNodes = computed(() => {
|
|
28
|
-
const nodes = [];
|
|
29
|
-
const d = data();
|
|
30
|
-
for (let i = 0; i < d.length; i++) {
|
|
31
|
-
if (!cache.has(i)) {
|
|
32
|
-
cache.set(i, {
|
|
33
|
-
id: "",
|
|
34
|
-
kind: "leaf",
|
|
35
|
-
data: d[i],
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
const node = cache.get(i);
|
|
39
|
-
node.data = d[i];
|
|
40
|
-
nodes.push(node);
|
|
41
|
-
}
|
|
42
|
-
return nodes;
|
|
43
|
-
});
|
|
44
|
-
const topNodes = computed(() => {
|
|
45
|
-
return topData().map((c, i) => ({ data: c, id: `top-${i}`, kind: "leaf" }));
|
|
46
|
-
});
|
|
47
|
-
const botNodes = computed(() => {
|
|
48
|
-
return bottomData().map((c, i) => ({ data: c, id: `bottom-${i}`, kind: "leaf" }));
|
|
49
|
-
});
|
|
50
|
-
const pinnedIdMap = computed(() => {
|
|
51
|
-
const combined = new Map([...topNodes(), ...botNodes()].map((c) => [c.id, c]));
|
|
52
|
-
return combined;
|
|
53
|
-
});
|
|
54
|
-
const models = signal({
|
|
55
|
-
sort: [],
|
|
56
|
-
filter: {},
|
|
57
|
-
filterIn: {},
|
|
58
|
-
quickSearch: null,
|
|
59
|
-
agg: {},
|
|
60
|
-
group: [],
|
|
61
|
-
groupExpansions: {},
|
|
62
|
-
});
|
|
63
|
-
const sortModel = computed(() => models().sort);
|
|
64
|
-
const filterModel = computed(() => models().filter);
|
|
65
|
-
const filterInModel = computed(() => models().filterIn);
|
|
66
|
-
const rowGroupModel = computed(() => models().group);
|
|
67
|
-
const groupExpansions = computed(() => models().groupExpansions);
|
|
68
|
-
const aggModel = computed(() => models().agg);
|
|
69
|
-
const quickSearch = computed(() => models().quickSearch);
|
|
70
|
-
const grid$ = signal(null);
|
|
71
|
-
const snapshot = signal(0);
|
|
72
|
-
const tree = computed(() => {
|
|
73
|
-
snapshot();
|
|
74
|
-
const grid = grid$();
|
|
75
|
-
const rows = centerNodes();
|
|
76
|
-
const filtered = computeFilteredRows(rows, grid, filterModel(), filterInModel(), quickSearch(), grid?.state.quickSearchSensitivity.get() ?? "case-sensitive", false);
|
|
77
|
-
const rowGroups = rowGroupModel()
|
|
78
|
-
.map((c) => {
|
|
79
|
-
if (typeof c === "string")
|
|
80
|
-
return (r) => grid.api.columnField(c, r);
|
|
81
|
-
if (typeof c.field === "string" || typeof c.field === "number")
|
|
82
|
-
return (r) => r.data[c.field];
|
|
83
|
-
if (typeof c.field === "function")
|
|
84
|
-
return (r) => c.field({ data: r.data, grid: grid });
|
|
85
|
-
return (r) => get(r.data, c.field.path);
|
|
86
|
-
})
|
|
87
|
-
.map((c) => ({ fn: c }));
|
|
88
|
-
const rowAggModel = Object.entries(aggModel()).map(([name, agg]) => {
|
|
89
|
-
if (typeof agg.fn === "function") {
|
|
90
|
-
const fn = agg.fn;
|
|
91
|
-
return {
|
|
92
|
-
name,
|
|
93
|
-
fn: (rows) => fn(rows.map((c) => c.data), grid),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
const key = agg.fn;
|
|
97
|
-
const fn = (data) => {
|
|
98
|
-
const fieldData = data.map((r) => grid?.api.columnField(name, { kind: "leaf", data: r.data }));
|
|
99
|
-
return builtIns[key](fieldData);
|
|
100
|
-
};
|
|
101
|
-
return { name, fn };
|
|
102
|
-
});
|
|
103
|
-
return makeClientTree({
|
|
104
|
-
rowData: filtered,
|
|
105
|
-
rowAggModel: grid ? rowAggModel : [],
|
|
106
|
-
rowBranchModel: grid ? rowGroups : [],
|
|
107
|
-
rowIdGroup: p.rowIdBranch,
|
|
108
|
-
rowIdLeaf: p.rowIdLeaf,
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
const sortComparator = computed(() => {
|
|
112
|
-
const model = sortModel();
|
|
113
|
-
const grid = grid$();
|
|
114
|
-
if (!model.length || !grid)
|
|
115
|
-
return { fn: () => 0 };
|
|
116
|
-
const comparator = (l, r) => {
|
|
117
|
-
let res = 0;
|
|
118
|
-
for (const sortSpec of model) {
|
|
119
|
-
const sort = sortSpec.sort;
|
|
120
|
-
const columnId = sortSpec.columnId;
|
|
121
|
-
const ld = l.kind === 2
|
|
122
|
-
? { kind: "branch", data: l.data, key: l.key }
|
|
123
|
-
: { kind: "leaf", data: l.data.data };
|
|
124
|
-
const rd = r.kind === 2
|
|
125
|
-
? { kind: "branch", data: r.data, key: r.key }
|
|
126
|
-
: { kind: "leaf", data: r.data.data };
|
|
127
|
-
if (sort.kind === "custom") {
|
|
128
|
-
res = sort.comparator(ld, rd, sort.options ?? {});
|
|
129
|
-
}
|
|
130
|
-
else if (sort.kind === "number") {
|
|
131
|
-
const left = grid.api.columnField(columnId, ld);
|
|
132
|
-
const right = grid.api.columnField(columnId, rd);
|
|
133
|
-
res = numberComparator(left, right, sort.options ?? {});
|
|
134
|
-
}
|
|
135
|
-
else if (sort.kind === "date") {
|
|
136
|
-
const left = grid.api.columnField(columnId, ld);
|
|
137
|
-
const right = grid.api.columnField(columnId, rd);
|
|
138
|
-
res = dateComparator(left, right, sort.options ?? {});
|
|
139
|
-
}
|
|
140
|
-
else if (sort.kind === "string") {
|
|
141
|
-
const left = grid.api.columnField(columnId, ld);
|
|
142
|
-
const right = grid.api.columnField(columnId, rd);
|
|
143
|
-
res = stringComparator(left, right, sort.options ?? {});
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
res = 0;
|
|
147
|
-
}
|
|
148
|
-
res = sortSpec.isDescending ? -res : res;
|
|
149
|
-
if (res !== 0)
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
return res;
|
|
153
|
-
};
|
|
154
|
-
return { fn: comparator };
|
|
155
|
-
});
|
|
156
|
-
const idToNode = computed(() => {
|
|
157
|
-
const map = new Map();
|
|
158
|
-
traverse(tree().root, (node) => {
|
|
159
|
-
map.set(node.id, node);
|
|
160
|
-
});
|
|
161
|
-
return map;
|
|
162
|
-
});
|
|
163
|
-
const initialized = signal(false);
|
|
164
|
-
const flat = computed(() => {
|
|
165
|
-
if (!initialized())
|
|
166
|
-
return { flat: [], idMap: new Map(), idToIndexMap: new Map() };
|
|
167
|
-
const idMap = new Map();
|
|
168
|
-
const idToIndexMap = new Map();
|
|
169
|
-
const flattened = [];
|
|
170
|
-
const comparator = sortComparator();
|
|
171
|
-
const expansions = groupExpansions();
|
|
172
|
-
const defaultExpansion = grid$()?.state.rowGroupDefaultExpansion.get() ?? false;
|
|
173
|
-
let index = topNodes().length;
|
|
174
|
-
traverse(tree().root, (node) => {
|
|
175
|
-
if (node.kind === 1) {
|
|
176
|
-
node.data.id = node.id;
|
|
177
|
-
flattened.push(node.data);
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
flattened.push({
|
|
181
|
-
kind: "branch",
|
|
182
|
-
data: node.data,
|
|
183
|
-
id: node.id,
|
|
184
|
-
key: node.key,
|
|
185
|
-
depth: node.depth,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
idMap.set(node.id, flattened.at(-1));
|
|
189
|
-
idToIndexMap.set(node.id, index);
|
|
190
|
-
index++;
|
|
191
|
-
if (node.kind === 2) {
|
|
192
|
-
const expanded = expansions[node.id] ??
|
|
193
|
-
(typeof defaultExpansion === "number"
|
|
194
|
-
? node.depth <= defaultExpansion
|
|
195
|
-
: defaultExpansion);
|
|
196
|
-
return expanded;
|
|
197
|
-
}
|
|
198
|
-
}, comparator.fn);
|
|
199
|
-
return { flat: flattened, idMap, idToIndexMap };
|
|
200
|
-
});
|
|
201
|
-
const flatLength = computed(() => flat().flat.length);
|
|
202
|
-
const cleanup = [];
|
|
203
|
-
const init = (grid) => {
|
|
204
|
-
while (cleanup.length)
|
|
205
|
-
cleanup.pop()?.();
|
|
206
|
-
grid$.set(grid);
|
|
207
|
-
const store = grid.state.rowDataStore;
|
|
208
|
-
// Monitor row count changes
|
|
209
|
-
const rowCount = flatLength();
|
|
210
|
-
const perPage = rowsPerPage();
|
|
211
|
-
const currentPage = pageInternal();
|
|
212
|
-
const center = clamp(0, rowCount - currentPage * perPage, perPage);
|
|
213
|
-
store.rowCenterCount.set(center);
|
|
214
|
-
const updateCounts = () => {
|
|
215
|
-
const rowCount = flatLength();
|
|
216
|
-
const perPage = rowsPerPage();
|
|
217
|
-
const currentPage = pageInternal();
|
|
218
|
-
const center = clamp(0, rowCount - currentPage * perPage, perPage);
|
|
219
|
-
// Move to the last page if we are past the boundary
|
|
220
|
-
if (center === 0 && currentPage !== 0) {
|
|
221
|
-
const currentPage = pageCount() - 1;
|
|
222
|
-
page.set(currentPage);
|
|
223
|
-
snapshot.set((prev) => prev + 1);
|
|
224
|
-
const center = clamp(0, rowCount - currentPage * perPage, perPage);
|
|
225
|
-
store.rowCenterCount.set(center);
|
|
226
|
-
grid.state.rowDataStore.rowClearCache();
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
store.rowCenterCount.set(center);
|
|
230
|
-
grid.state.rowDataStore.rowClearCache();
|
|
231
|
-
};
|
|
232
|
-
cleanup.push(effect(() => {
|
|
233
|
-
flatLength();
|
|
234
|
-
page();
|
|
235
|
-
rowsPerPage();
|
|
236
|
-
updateCounts();
|
|
237
|
-
}));
|
|
238
|
-
cleanup.push(effect(() => {
|
|
239
|
-
pageInternal();
|
|
240
|
-
grid.state.rowDataStore.rowClearCache();
|
|
241
|
-
}));
|
|
242
|
-
const top = topData().length;
|
|
243
|
-
store.rowTopCount.set(top);
|
|
244
|
-
const bottom = bottomData().length;
|
|
245
|
-
store.rowBottomCount.set(bottom);
|
|
246
|
-
cleanup.push(effect(() => {
|
|
247
|
-
store.rowTopCount.set(topData().length);
|
|
248
|
-
store.rowBottomCount.set(bottomData().length);
|
|
249
|
-
grid.state.rowDataStore.rowClearCache();
|
|
250
|
-
}));
|
|
251
|
-
const sort = grid.state.sortModel.get();
|
|
252
|
-
const filter = grid.state.filterModel.get();
|
|
253
|
-
const filterIn = grid.state.filterInModel.get();
|
|
254
|
-
const group = grid.state.rowGroupModel.get();
|
|
255
|
-
const groupExpansions = grid.state.rowGroupExpansions.get();
|
|
256
|
-
const agg = grid.state.aggModel.get();
|
|
257
|
-
const quickSearch = grid.state.quickSearch.get();
|
|
258
|
-
models.set({
|
|
259
|
-
agg,
|
|
260
|
-
filter,
|
|
261
|
-
filterIn,
|
|
262
|
-
group,
|
|
263
|
-
quickSearch,
|
|
264
|
-
groupExpansions,
|
|
265
|
-
sort,
|
|
266
|
-
});
|
|
267
|
-
initialized.set(true);
|
|
268
|
-
cleanup.push(effect(() => {
|
|
269
|
-
models.set({
|
|
270
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
271
|
-
sort: grid.state.sortModel.$(),
|
|
272
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
273
|
-
agg: grid.state.aggModel.$(),
|
|
274
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
275
|
-
filter: grid.state.filterModel.$(),
|
|
276
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
277
|
-
group: grid.state.rowGroupModel.$(),
|
|
278
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
279
|
-
groupExpansions: grid.state.rowGroupExpansions.$(),
|
|
280
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
281
|
-
columnPivotGroupExpansions: grid.state.columnPivotColumnGroupExpansions.$(),
|
|
282
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
283
|
-
filterIn: grid.state.filterInModel.$(),
|
|
284
|
-
// @ts-expect-error The $ is defined, but only internally
|
|
285
|
-
quickSearch: grid.state.quickSearch.$(),
|
|
286
|
-
});
|
|
287
|
-
grid.state.rowDataStore.rowClearCache();
|
|
288
|
-
}));
|
|
289
|
-
};
|
|
290
|
-
const rowById = (id) => {
|
|
291
|
-
const pinned = peek(pinnedIdMap);
|
|
292
|
-
if (pinned.has(id))
|
|
293
|
-
return pinned.get(id);
|
|
294
|
-
const t = peek(flat);
|
|
295
|
-
return t.idMap.get(id) ?? null;
|
|
296
|
-
};
|
|
297
|
-
const rowByIndex = (index) => {
|
|
298
|
-
const top = peek(topNodes);
|
|
299
|
-
const bot = peek(botNodes);
|
|
300
|
-
const center = peek(flat).flat;
|
|
301
|
-
const topOffset = top.length;
|
|
302
|
-
const centerOffset = topOffset + center.length;
|
|
303
|
-
const botOffset = centerOffset + bot.length;
|
|
304
|
-
if (index < topOffset)
|
|
305
|
-
return top[index];
|
|
306
|
-
if (index < centerOffset) {
|
|
307
|
-
const pageOffset = index + peek(rowsPerPage) * peek(pageInternal);
|
|
308
|
-
return center[pageOffset - topOffset];
|
|
309
|
-
}
|
|
310
|
-
if (index < botOffset)
|
|
311
|
-
return bot[index - centerOffset];
|
|
312
|
-
return null;
|
|
313
|
-
};
|
|
314
|
-
const rowUpdate = (updates) => {
|
|
315
|
-
const grid = peek(grid$);
|
|
316
|
-
const d = peek(data);
|
|
317
|
-
const idMap = peek(idToNode);
|
|
318
|
-
const dataToSrc = peek(dataToSrc$);
|
|
319
|
-
for (const [key, next] of updates.entries()) {
|
|
320
|
-
const row = typeof key === "string" ? rowById(key) : rowByIndex(key);
|
|
321
|
-
const treeNode = typeof key === "string" ? idMap.get(key) : null;
|
|
322
|
-
if ((!row && !treeNode) || !grid) {
|
|
323
|
-
console.error(`Failed to find the row with identifier ${key} which is being updated.`);
|
|
324
|
-
continue;
|
|
325
|
-
}
|
|
326
|
-
if (row?.kind === "branch") {
|
|
327
|
-
row.data = next;
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
const data = row?.kind === "leaf" ? row.data : treeNode?.data.data;
|
|
331
|
-
const source = dataToSrc.get(data);
|
|
332
|
-
if (source == null) {
|
|
333
|
-
console.error(`Failed to find the row with identifier ${key} which is being updated.`);
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
d[source] = next;
|
|
337
|
-
cache.delete(source);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
data.set([...d]);
|
|
341
|
-
snapshot.set((prev) => prev + 1);
|
|
342
|
-
grid.state.rowDataStore.rowClearCache();
|
|
343
|
-
};
|
|
344
|
-
const rowToIndex = (rowId) => {
|
|
345
|
-
const f = peek(flat);
|
|
346
|
-
const top = peek(topNodes);
|
|
347
|
-
const bot = peek(botNodes);
|
|
348
|
-
const topCount = top.length;
|
|
349
|
-
const center = f.flat.length;
|
|
350
|
-
const rowIndex = f.idToIndexMap.get(rowId);
|
|
351
|
-
if (rowIndex != null)
|
|
352
|
-
return rowIndex;
|
|
353
|
-
if (rowIndex == null) {
|
|
354
|
-
const foundTop = top.findIndex((row) => row.id === rowId);
|
|
355
|
-
if (foundTop !== -1)
|
|
356
|
-
return foundTop;
|
|
357
|
-
const foundBot = bot.findIndex((row) => row.id === rowId);
|
|
358
|
-
if (foundBot !== -1)
|
|
359
|
-
return foundBot + topCount + center;
|
|
360
|
-
}
|
|
361
|
-
return null;
|
|
362
|
-
};
|
|
363
|
-
const rowAllChildIds = (rowId) => {
|
|
364
|
-
const t = tree();
|
|
365
|
-
const ids = [];
|
|
366
|
-
const node = t.idToNode.get(rowId);
|
|
367
|
-
if (node?.kind === 2) {
|
|
368
|
-
traverse(node, (n) => {
|
|
369
|
-
ids.push(n.id);
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
return ids;
|
|
373
|
-
};
|
|
374
|
-
return [
|
|
375
|
-
{
|
|
376
|
-
page: {
|
|
377
|
-
current: makeAtom(page),
|
|
378
|
-
pageCount: makeAtom(pageCount),
|
|
379
|
-
perPage: makeAtom(rowsPerPage),
|
|
380
|
-
},
|
|
381
|
-
init,
|
|
382
|
-
rowById,
|
|
383
|
-
rowByIndex,
|
|
384
|
-
rowAllChildIds,
|
|
385
|
-
rowUpdate,
|
|
386
|
-
inFilterItems: (c) => {
|
|
387
|
-
const grid = grid$();
|
|
388
|
-
if (!grid)
|
|
389
|
-
return [];
|
|
390
|
-
const data = centerNodes();
|
|
391
|
-
const values = new Set(data.map((row) => {
|
|
392
|
-
const field = grid.api.columnField(c, row);
|
|
393
|
-
return field;
|
|
394
|
-
}));
|
|
395
|
-
if (p.transformInFilterItem) {
|
|
396
|
-
return p.transformInFilterItem({ column: c, values: [...values] });
|
|
397
|
-
}
|
|
398
|
-
return [...values].map((x) => ({ id: `${x}`, label: `${x}`, value: x }));
|
|
399
|
-
},
|
|
400
|
-
rowAreAllSelected: (rowId) => {
|
|
401
|
-
const g = grid$();
|
|
402
|
-
if (!g)
|
|
403
|
-
return false;
|
|
404
|
-
const selected = g.state.rowSelectedIds.get();
|
|
405
|
-
if (rowId) {
|
|
406
|
-
const row = rowById(rowId);
|
|
407
|
-
if (!row)
|
|
408
|
-
return false;
|
|
409
|
-
const childIds = new Set(rowAllChildIds(rowId));
|
|
410
|
-
return childIds.isSubsetOf(selected);
|
|
411
|
-
}
|
|
412
|
-
const f = tree();
|
|
413
|
-
return f.idsAll.isSubsetOf(selected);
|
|
414
|
-
},
|
|
415
|
-
rowAdd: (newRows, place = "end") => {
|
|
416
|
-
data.set((prev) => {
|
|
417
|
-
if (!newRows.length)
|
|
418
|
-
return prev;
|
|
419
|
-
let next;
|
|
420
|
-
if (place === "beginning")
|
|
421
|
-
next = [...newRows, ...prev];
|
|
422
|
-
else if (place === "end")
|
|
423
|
-
next = [...prev, ...newRows];
|
|
424
|
-
else {
|
|
425
|
-
next = [...prev];
|
|
426
|
-
next.splice(place, 0, ...newRows);
|
|
427
|
-
}
|
|
428
|
-
return next;
|
|
429
|
-
});
|
|
430
|
-
const grid = peek(grid$);
|
|
431
|
-
grid?.state.rowDataStore.rowClearCache();
|
|
432
|
-
},
|
|
433
|
-
rowDelete: (rows) => {
|
|
434
|
-
const rowData = new Set(rows
|
|
435
|
-
.map((c) => {
|
|
436
|
-
if (typeof c === "number")
|
|
437
|
-
return rowByIndex(c)?.data;
|
|
438
|
-
else
|
|
439
|
-
return rowById(c)?.data;
|
|
440
|
-
})
|
|
441
|
-
.filter((c) => !!c));
|
|
442
|
-
data.set((prev) => {
|
|
443
|
-
if (!rowData.size)
|
|
444
|
-
return prev;
|
|
445
|
-
return prev.filter((d) => !rowData.has(d));
|
|
446
|
-
});
|
|
447
|
-
const grid = peek(grid$);
|
|
448
|
-
grid?.state.rowDataStore.rowClearCache();
|
|
449
|
-
},
|
|
450
|
-
rowSetBotData: (data) => {
|
|
451
|
-
bottomData.set(data);
|
|
452
|
-
const grid = peek(grid$);
|
|
453
|
-
grid?.state.rowDataStore.rowClearCache();
|
|
454
|
-
},
|
|
455
|
-
rowSetTopData: (data) => {
|
|
456
|
-
topData.set(data);
|
|
457
|
-
const grid = peek(grid$);
|
|
458
|
-
grid?.state.rowDataStore.rowClearCache();
|
|
459
|
-
},
|
|
460
|
-
rowSetCenterData: (d) => {
|
|
461
|
-
data.set(d);
|
|
462
|
-
const grid = grid$();
|
|
463
|
-
grid?.state.rowDataStore.rowClearCache();
|
|
464
|
-
cache.clear();
|
|
465
|
-
},
|
|
466
|
-
rowData: (section) => {
|
|
467
|
-
const d = [];
|
|
468
|
-
if (section === "top" || section === "flat") {
|
|
469
|
-
d.push(...peek(topData));
|
|
470
|
-
}
|
|
471
|
-
if (section === "center" || section === "flat") {
|
|
472
|
-
d.push(...peek(data));
|
|
473
|
-
}
|
|
474
|
-
if (section === "bottom" || section === "flat") {
|
|
475
|
-
d.push(...peek(bottomData));
|
|
476
|
-
}
|
|
477
|
-
return d;
|
|
478
|
-
},
|
|
479
|
-
rowExpand: (expansions) => {
|
|
480
|
-
const grid = peek(grid$);
|
|
481
|
-
if (!grid)
|
|
482
|
-
return;
|
|
483
|
-
grid.state.rowGroupExpansions.set((prev) => ({ ...prev, ...expansions }));
|
|
484
|
-
},
|
|
485
|
-
rowToIndex,
|
|
486
|
-
rowSelect: (params) => {
|
|
487
|
-
const grid = peek(grid$);
|
|
488
|
-
if (!grid)
|
|
489
|
-
return;
|
|
490
|
-
if (params.mode === "none")
|
|
491
|
-
return;
|
|
492
|
-
if (params.mode === "single") {
|
|
493
|
-
if (params.deselect) {
|
|
494
|
-
grid.state.rowSelectedIds.set(new Set());
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
grid.state.rowSelectedIds.set(new Set([params.startId]));
|
|
498
|
-
}
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
const ids = new Set();
|
|
502
|
-
if (params.startId === params.endId) {
|
|
503
|
-
ids.add(params.startId);
|
|
504
|
-
if (params.selectChildren) {
|
|
505
|
-
rowAllChildIds(params.startId).forEach((c) => ids.add(c));
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
const first = rowToIndex(params.startId);
|
|
510
|
-
const last = rowToIndex(params.endId);
|
|
511
|
-
if (first == null || last == null)
|
|
512
|
-
return;
|
|
513
|
-
const start = Math.min(first, last);
|
|
514
|
-
const end = Math.max(first, last);
|
|
515
|
-
for (let i = start; i <= end; i++) {
|
|
516
|
-
const row = rowByIndex(i);
|
|
517
|
-
if (!row)
|
|
518
|
-
continue;
|
|
519
|
-
if (params.selectChildren) {
|
|
520
|
-
rowAllChildIds(row.id).forEach((c) => ids.add(c));
|
|
521
|
-
}
|
|
522
|
-
if (row?.id)
|
|
523
|
-
ids.add(row.id);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
if (params.deselect) {
|
|
527
|
-
const current = grid.state.rowSelectedIds.get();
|
|
528
|
-
const next = current.difference(ids);
|
|
529
|
-
grid.state.rowSelectedIds.set(next);
|
|
530
|
-
}
|
|
531
|
-
else {
|
|
532
|
-
const current = grid.state.rowSelectedIds.get();
|
|
533
|
-
const next = current.union(ids);
|
|
534
|
-
grid.state.rowSelectedIds.set(next);
|
|
535
|
-
}
|
|
536
|
-
},
|
|
537
|
-
rowSelectAll: (params) => {
|
|
538
|
-
const grid = peek(grid$);
|
|
539
|
-
if (!grid)
|
|
540
|
-
return;
|
|
541
|
-
if (params.deselect) {
|
|
542
|
-
grid.state.rowSelectedIds.set(new Set());
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
const t = peek(tree);
|
|
546
|
-
grid.state.rowSelectedIds.set(new Set(t.idsAll));
|
|
547
|
-
},
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
top: makeAtom(topData),
|
|
551
|
-
center: makeAtom(data),
|
|
552
|
-
bottom: makeAtom(bottomData),
|
|
553
|
-
},
|
|
554
|
-
];
|
|
555
|
-
}
|
|
556
|
-
export function useClientRowDataSourcePaginated(p) {
|
|
557
|
-
const ds = useRef(null);
|
|
558
|
-
const dataAtomRef = useRef(null);
|
|
559
|
-
if (!ds.current)
|
|
560
|
-
[ds.current, dataAtomRef.current] = makeClientDataSourcePaginated(p);
|
|
561
|
-
const da = dataAtomRef.current;
|
|
562
|
-
if (p.reflectData) {
|
|
563
|
-
// Need to queue the microtask since it we cannot update state during render.
|
|
564
|
-
if (p.data !== da.center.get())
|
|
565
|
-
queueMicrotask(() => ds.current.rowSetCenterData(p.data));
|
|
566
|
-
if (!equal(p.topData ?? [], da.top.get())) {
|
|
567
|
-
queueMicrotask(() => ds.current.rowSetTopData(p.topData ?? []));
|
|
568
|
-
}
|
|
569
|
-
if (!equal(p.bottomData ?? [], da.bottom.get()))
|
|
570
|
-
queueMicrotask(() => ds.current.rowSetBotData(p.bottomData ?? []));
|
|
571
|
-
}
|
|
572
|
-
return ds.current;
|
|
573
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { GridAtom, RowDataSourceClient } from "../+types.js";
|
|
2
|
-
import { type ClientRowDataSourceParams } from "../+types.js";
|
|
3
|
-
interface DataAtoms<T> {
|
|
4
|
-
readonly top: GridAtom<T[]>;
|
|
5
|
-
readonly center: GridAtom<T[]>;
|
|
6
|
-
readonly bottom: GridAtom<T[]>;
|
|
7
|
-
}
|
|
8
|
-
export declare function makeClientDataSource<T>(p: ClientRowDataSourceParams<T>): [RowDataSourceClient<T>, DataAtoms<T>];
|
|
9
|
-
export declare function useClientRowDataSource<T>(p: ClientRowDataSourceParams<T>): RowDataSourceClient<T>;
|
|
10
|
-
export {};
|