photon-grid-core 0.0.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/LICENSE +1 -0
- package/README.md +0 -0
- package/cell-selection/active-grid-registry.d.ts +37 -0
- package/cell-selection/active-grid-registry.d.ts.map +1 -0
- package/cell-selection/active-grid-registry.js +25 -0
- package/cell-selection/active-grid-registry.js.map +1 -0
- package/cell-selection/cell-selection-engine.d.ts +336 -0
- package/cell-selection/cell-selection-engine.d.ts.map +1 -0
- package/cell-selection/cell-selection-engine.js +1534 -0
- package/cell-selection/cell-selection-engine.js.map +1 -0
- package/cell-selection/selection-range.d.ts +16 -0
- package/cell-selection/selection-range.d.ts.map +1 -0
- package/cell-selection/selection-range.js +48 -0
- package/cell-selection/selection-range.js.map +1 -0
- package/cell-selection/selection-renderer.d.ts +24 -0
- package/cell-selection/selection-renderer.d.ts.map +1 -0
- package/cell-selection/selection-renderer.js +107 -0
- package/cell-selection/selection-renderer.js.map +1 -0
- package/chart/chart-analyzer/aggregation-analyzer.d.ts +18 -0
- package/chart/chart-analyzer/aggregation-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/aggregation-analyzer.js +63 -0
- package/chart/chart-analyzer/aggregation-analyzer.js.map +1 -0
- package/chart/chart-analyzer/bar-analyzer.d.ts +19 -0
- package/chart/chart-analyzer/bar-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/bar-analyzer.js +56 -0
- package/chart/chart-analyzer/bar-analyzer.js.map +1 -0
- package/chart/chart-analyzer/bubble-analyzer.d.ts +16 -0
- package/chart/chart-analyzer/bubble-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/bubble-analyzer.js +61 -0
- package/chart/chart-analyzer/bubble-analyzer.js.map +1 -0
- package/chart/chart-analyzer/cardinality-analyzer.d.ts +13 -0
- package/chart/chart-analyzer/cardinality-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/cardinality-analyzer.js +28 -0
- package/chart/chart-analyzer/cardinality-analyzer.js.map +1 -0
- package/chart/chart-analyzer/dimension-analyzer.d.ts +12 -0
- package/chart/chart-analyzer/dimension-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/dimension-analyzer.js +33 -0
- package/chart/chart-analyzer/dimension-analyzer.js.map +1 -0
- package/chart/chart-analyzer/histogram-analyzer.d.ts +11 -0
- package/chart/chart-analyzer/histogram-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/histogram-analyzer.js +43 -0
- package/chart/chart-analyzer/histogram-analyzer.js.map +1 -0
- package/chart/chart-analyzer/index.d.ts +58 -0
- package/chart/chart-analyzer/index.d.ts.map +1 -0
- package/chart/chart-analyzer/index.js +130 -0
- package/chart/chart-analyzer/index.js.map +1 -0
- package/chart/chart-analyzer/line-analyzer.d.ts +23 -0
- package/chart/chart-analyzer/line-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/line-analyzer.js +61 -0
- package/chart/chart-analyzer/line-analyzer.js.map +1 -0
- package/chart/chart-analyzer/measure-analyzer.d.ts +11 -0
- package/chart/chart-analyzer/measure-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/measure-analyzer.js +44 -0
- package/chart/chart-analyzer/measure-analyzer.js.map +1 -0
- package/chart/chart-analyzer/pie-analyzer.d.ts +19 -0
- package/chart/chart-analyzer/pie-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/pie-analyzer.js +64 -0
- package/chart/chart-analyzer/pie-analyzer.js.map +1 -0
- package/chart/chart-analyzer/recommendation-engine.d.ts +18 -0
- package/chart/chart-analyzer/recommendation-engine.d.ts.map +1 -0
- package/chart/chart-analyzer/recommendation-engine.js +82 -0
- package/chart/chart-analyzer/recommendation-engine.js.map +1 -0
- package/chart/chart-analyzer/scatter-analyzer.d.ts +16 -0
- package/chart/chart-analyzer/scatter-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/scatter-analyzer.js +70 -0
- package/chart/chart-analyzer/scatter-analyzer.js.map +1 -0
- package/chart/chart-analyzer/types.d.ts +52 -0
- package/chart/chart-analyzer/types.d.ts.map +1 -0
- package/chart/chart-analyzer/types.js +10 -0
- package/chart/chart-analyzer/types.js.map +1 -0
- package/chart/chart-analyzer.d.ts +12 -0
- package/chart/chart-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer.js +77 -0
- package/chart/chart-analyzer.js.map +1 -0
- package/chart/chart-data-transformer.d.ts +26 -0
- package/chart/chart-data-transformer.d.ts.map +1 -0
- package/chart/chart-data-transformer.js +93 -0
- package/chart/chart-data-transformer.js.map +1 -0
- package/chart/chart-engine.d.ts +38 -0
- package/chart/chart-engine.d.ts.map +1 -0
- package/chart/chart-engine.js +96 -0
- package/chart/chart-engine.js.map +1 -0
- package/chart/chart-panel.d.ts +54 -0
- package/chart/chart-panel.d.ts.map +1 -0
- package/chart/chart-panel.js +350 -0
- package/chart/chart-panel.js.map +1 -0
- package/chart/chart-renderer.d.ts +93 -0
- package/chart/chart-renderer.d.ts.map +1 -0
- package/chart/chart-renderer.js +1330 -0
- package/chart/chart-renderer.js.map +1 -0
- package/chart/sparkline/sparkline-renderer.d.ts +269 -0
- package/chart/sparkline/sparkline-renderer.d.ts.map +1 -0
- package/chart/sparkline/sparkline-renderer.js +875 -0
- package/chart/sparkline/sparkline-renderer.js.map +1 -0
- package/chart/sparkline/sparkline.types.d.ts +214 -0
- package/chart/sparkline/sparkline.types.d.ts.map +1 -0
- package/chart/sparkline/sparkline.types.js +8 -0
- package/chart/sparkline/sparkline.types.js.map +1 -0
- package/column-groups/column-group-drag-handler.d.ts +169 -0
- package/column-groups/column-group-drag-handler.d.ts.map +1 -0
- package/column-groups/column-group-drag-handler.js +517 -0
- package/column-groups/column-group-drag-handler.js.map +1 -0
- package/column-groups/column-group-header-builder.d.ts +106 -0
- package/column-groups/column-group-header-builder.d.ts.map +1 -0
- package/column-groups/column-group-header-builder.js +311 -0
- package/column-groups/column-group-header-builder.js.map +1 -0
- package/column-groups/column-group-model.d.ts +248 -0
- package/column-groups/column-group-model.d.ts.map +1 -0
- package/column-groups/column-group-model.js +668 -0
- package/column-groups/column-group-model.js.map +1 -0
- package/column-groups/column-group-state-manager.d.ts +110 -0
- package/column-groups/column-group-state-manager.d.ts.map +1 -0
- package/column-groups/column-group-state-manager.js +153 -0
- package/column-groups/column-group-state-manager.js.map +1 -0
- package/column-groups/column-group.types.d.ts +250 -0
- package/column-groups/column-group.types.d.ts.map +1 -0
- package/column-groups/column-group.types.js +20 -0
- package/column-groups/column-group.types.js.map +1 -0
- package/column-groups/display-group-builder.d.ts +91 -0
- package/column-groups/display-group-builder.d.ts.map +1 -0
- package/column-groups/display-group-builder.js +225 -0
- package/column-groups/display-group-builder.js.map +1 -0
- package/column-groups/display-group-drag-handler.d.ts +205 -0
- package/column-groups/display-group-drag-handler.d.ts.map +1 -0
- package/column-groups/display-group-drag-handler.js +536 -0
- package/column-groups/display-group-drag-handler.js.map +1 -0
- package/column-groups/display-group-engine.d.ts +310 -0
- package/column-groups/display-group-engine.d.ts.map +1 -0
- package/column-groups/display-group-engine.js +549 -0
- package/column-groups/display-group-engine.js.map +1 -0
- package/column-groups/display-group-header-builder.d.ts +94 -0
- package/column-groups/display-group-header-builder.d.ts.map +1 -0
- package/column-groups/display-group-header-builder.js +224 -0
- package/column-groups/display-group-header-builder.js.map +1 -0
- package/column-groups/display-group.types.d.ts +140 -0
- package/column-groups/display-group.types.d.ts.map +1 -0
- package/column-groups/display-group.types.js +2 -0
- package/column-groups/display-group.types.js.map +1 -0
- package/column-groups/index.d.ts +25 -0
- package/column-groups/index.d.ts.map +1 -0
- package/column-groups/index.js +26 -0
- package/column-groups/index.js.map +1 -0
- package/column-groups/logical-group-registry.d.ts +77 -0
- package/column-groups/logical-group-registry.d.ts.map +1 -0
- package/column-groups/logical-group-registry.js +118 -0
- package/column-groups/logical-group-registry.js.map +1 -0
- package/core/column-model.d.ts +30 -0
- package/core/column-model.d.ts.map +1 -0
- package/core/column-model.js +203 -0
- package/core/column-model.js.map +1 -0
- package/core/grid-api.d.ts +187 -0
- package/core/grid-api.d.ts.map +1 -0
- package/core/grid-api.js +569 -0
- package/core/grid-api.js.map +1 -0
- package/core/grid-context.d.ts +61 -0
- package/core/grid-context.d.ts.map +1 -0
- package/core/grid-context.js +2 -0
- package/core/grid-context.js.map +1 -0
- package/core/grid-core.d.ts +49 -0
- package/core/grid-core.d.ts.map +1 -0
- package/core/grid-core.js +675 -0
- package/core/grid-core.js.map +1 -0
- package/core/grid-store.d.ts +62 -0
- package/core/grid-store.d.ts.map +1 -0
- package/core/grid-store.js +104 -0
- package/core/grid-store.js.map +1 -0
- package/core/row-model.d.ts +32 -0
- package/core/row-model.d.ts.map +1 -0
- package/core/row-model.js +150 -0
- package/core/row-model.js.map +1 -0
- package/drag-drop/drag-autoscroll.d.ts +14 -0
- package/drag-drop/drag-autoscroll.d.ts.map +1 -0
- package/drag-drop/drag-autoscroll.js +66 -0
- package/drag-drop/drag-autoscroll.js.map +1 -0
- package/drag-drop/drag-drop-engine.d.ts +55 -0
- package/drag-drop/drag-drop-engine.d.ts.map +1 -0
- package/drag-drop/drag-drop-engine.js +179 -0
- package/drag-drop/drag-drop-engine.js.map +1 -0
- package/drag-drop/drag-preview.d.ts +32 -0
- package/drag-drop/drag-preview.d.ts.map +1 -0
- package/drag-drop/drag-preview.js +74 -0
- package/drag-drop/drag-preview.js.map +1 -0
- package/engines/aggregation/aggregation-engine.d.ts +66 -0
- package/engines/aggregation/aggregation-engine.d.ts.map +1 -0
- package/engines/aggregation/aggregation-engine.js +149 -0
- package/engines/aggregation/aggregation-engine.js.map +1 -0
- package/engines/clipboard/clipboard-engine.d.ts +89 -0
- package/engines/clipboard/clipboard-engine.d.ts.map +1 -0
- package/engines/clipboard/clipboard-engine.js +323 -0
- package/engines/clipboard/clipboard-engine.js.map +1 -0
- package/engines/editing/cell-editor-engine.d.ts +62 -0
- package/engines/editing/cell-editor-engine.d.ts.map +1 -0
- package/engines/editing/cell-editor-engine.js +359 -0
- package/engines/editing/cell-editor-engine.js.map +1 -0
- package/engines/editing/custom-dropdown-editor.d.ts +99 -0
- package/engines/editing/custom-dropdown-editor.d.ts.map +1 -0
- package/engines/editing/custom-dropdown-editor.js +355 -0
- package/engines/editing/custom-dropdown-editor.js.map +1 -0
- package/engines/editing/value-parser.d.ts +12 -0
- package/engines/editing/value-parser.d.ts.map +1 -0
- package/engines/editing/value-parser.js +125 -0
- package/engines/editing/value-parser.js.map +1 -0
- package/engines/export/export-engine.d.ts +16 -0
- package/engines/export/export-engine.d.ts.map +1 -0
- package/engines/export/export-engine.js +99 -0
- package/engines/export/export-engine.js.map +1 -0
- package/engines/filter/filter-condition.d.ts +7 -0
- package/engines/filter/filter-condition.d.ts.map +1 -0
- package/engines/filter/filter-condition.js +126 -0
- package/engines/filter/filter-condition.js.map +1 -0
- package/engines/filter/filter-engine.d.ts +35 -0
- package/engines/filter/filter-engine.d.ts.map +1 -0
- package/engines/filter/filter-engine.js +150 -0
- package/engines/filter/filter-engine.js.map +1 -0
- package/engines/filter/filter-panel.d.ts +103 -0
- package/engines/filter/filter-panel.d.ts.map +1 -0
- package/engines/filter/filter-panel.js +645 -0
- package/engines/filter/filter-panel.js.map +1 -0
- package/engines/grouping/group-node.d.ts +21 -0
- package/engines/grouping/group-node.d.ts.map +1 -0
- package/engines/grouping/group-node.js +96 -0
- package/engines/grouping/group-node.js.map +1 -0
- package/engines/grouping/grouping-engine.d.ts +33 -0
- package/engines/grouping/grouping-engine.d.ts.map +1 -0
- package/engines/grouping/grouping-engine.js +118 -0
- package/engines/grouping/grouping-engine.js.map +1 -0
- package/engines/master-detail/master-detail-engine.d.ts +77 -0
- package/engines/master-detail/master-detail-engine.d.ts.map +1 -0
- package/engines/master-detail/master-detail-engine.js +199 -0
- package/engines/master-detail/master-detail-engine.js.map +1 -0
- package/engines/pagination/pagination-engine.d.ts +33 -0
- package/engines/pagination/pagination-engine.d.ts.map +1 -0
- package/engines/pagination/pagination-engine.js +110 -0
- package/engines/pagination/pagination-engine.js.map +1 -0
- package/engines/selection/row-selection-engine.d.ts +26 -0
- package/engines/selection/row-selection-engine.d.ts.map +1 -0
- package/engines/selection/row-selection-engine.js +145 -0
- package/engines/selection/row-selection-engine.js.map +1 -0
- package/engines/sort/sort-comparator.d.ts +43 -0
- package/engines/sort/sort-comparator.d.ts.map +1 -0
- package/engines/sort/sort-comparator.js +113 -0
- package/engines/sort/sort-comparator.js.map +1 -0
- package/engines/sort/sort-engine.d.ts +67 -0
- package/engines/sort/sort-engine.d.ts.map +1 -0
- package/engines/sort/sort-engine.js +178 -0
- package/engines/sort/sort-engine.js.map +1 -0
- package/engines/summary/summary-engine.d.ts +17 -0
- package/engines/summary/summary-engine.d.ts.map +1 -0
- package/engines/summary/summary-engine.js +72 -0
- package/engines/summary/summary-engine.js.map +1 -0
- package/engines/tree/tree-data-service.d.ts +117 -0
- package/engines/tree/tree-data-service.d.ts.map +1 -0
- package/engines/tree/tree-data-service.js +296 -0
- package/engines/tree/tree-data-service.js.map +1 -0
- package/engines/tree/tree-expansion-service.d.ts +35 -0
- package/engines/tree/tree-expansion-service.d.ts.map +1 -0
- package/engines/tree/tree-expansion-service.js +84 -0
- package/engines/tree/tree-expansion-service.js.map +1 -0
- package/engines/tree/tree-node.d.ts +40 -0
- package/engines/tree/tree-node.d.ts.map +1 -0
- package/engines/tree/tree-node.js +199 -0
- package/engines/tree/tree-node.js.map +1 -0
- package/engines/tree/tree-selection-service.d.ts +35 -0
- package/engines/tree/tree-selection-service.d.ts.map +1 -0
- package/engines/tree/tree-selection-service.js +72 -0
- package/engines/tree/tree-selection-service.js.map +1 -0
- package/engines/undo-redo/undo-redo-engine.d.ts +114 -0
- package/engines/undo-redo/undo-redo-engine.d.ts.map +1 -0
- package/engines/undo-redo/undo-redo-engine.js +165 -0
- package/engines/undo-redo/undo-redo-engine.js.map +1 -0
- package/event-bus/event-bus.d.ts +21 -0
- package/event-bus/event-bus.d.ts.map +1 -0
- package/event-bus/event-bus.js +106 -0
- package/event-bus/event-bus.js.map +1 -0
- package/icons/icon-registry.d.ts +19 -0
- package/icons/icon-registry.d.ts.map +1 -0
- package/icons/icon-registry.js +37 -0
- package/icons/icon-registry.js.map +1 -0
- package/icons/icon-renderer.d.ts +18 -0
- package/icons/icon-renderer.d.ts.map +1 -0
- package/icons/icon-renderer.js +75 -0
- package/icons/icon-renderer.js.map +1 -0
- package/icons/icon-sets/core-icons.d.ts +2 -0
- package/icons/icon-sets/core-icons.d.ts.map +1 -0
- package/icons/icon-sets/core-icons.js +48 -0
- package/icons/icon-sets/core-icons.js.map +1 -0
- package/index.d.ts +72 -0
- package/index.d.ts.map +1 -0
- package/index.js +54 -0
- package/index.js.map +1 -0
- package/package.json +64 -0
- package/photon-ai/builtins/filter.commands.d.ts +4 -0
- package/photon-ai/builtins/filter.commands.d.ts.map +1 -0
- package/photon-ai/builtins/filter.commands.js +189 -0
- package/photon-ai/builtins/filter.commands.js.map +1 -0
- package/photon-ai/builtins/grouping.commands.d.ts +4 -0
- package/photon-ai/builtins/grouping.commands.d.ts.map +1 -0
- package/photon-ai/builtins/grouping.commands.js +115 -0
- package/photon-ai/builtins/grouping.commands.js.map +1 -0
- package/photon-ai/builtins/index.d.ts +10 -0
- package/photon-ai/builtins/index.d.ts.map +1 -0
- package/photon-ai/builtins/index.js +26 -0
- package/photon-ai/builtins/index.js.map +1 -0
- package/photon-ai/builtins/info.commands.d.ts +4 -0
- package/photon-ai/builtins/info.commands.d.ts.map +1 -0
- package/photon-ai/builtins/info.commands.js +201 -0
- package/photon-ai/builtins/info.commands.js.map +1 -0
- package/photon-ai/builtins/move.commands.d.ts +4 -0
- package/photon-ai/builtins/move.commands.d.ts.map +1 -0
- package/photon-ai/builtins/move.commands.js +53 -0
- package/photon-ai/builtins/move.commands.js.map +1 -0
- package/photon-ai/builtins/pin.commands.d.ts +4 -0
- package/photon-ai/builtins/pin.commands.d.ts.map +1 -0
- package/photon-ai/builtins/pin.commands.js +106 -0
- package/photon-ai/builtins/pin.commands.js.map +1 -0
- package/photon-ai/builtins/selection.commands.d.ts +4 -0
- package/photon-ai/builtins/selection.commands.d.ts.map +1 -0
- package/photon-ai/builtins/selection.commands.js +102 -0
- package/photon-ai/builtins/selection.commands.js.map +1 -0
- package/photon-ai/builtins/sort.commands.d.ts +4 -0
- package/photon-ai/builtins/sort.commands.d.ts.map +1 -0
- package/photon-ai/builtins/sort.commands.js +67 -0
- package/photon-ai/builtins/sort.commands.js.map +1 -0
- package/photon-ai/builtins/visibility.commands.d.ts +4 -0
- package/photon-ai/builtins/visibility.commands.d.ts.map +1 -0
- package/photon-ai/builtins/visibility.commands.js +75 -0
- package/photon-ai/builtins/visibility.commands.js.map +1 -0
- package/photon-ai/command-builder.d.ts +21 -0
- package/photon-ai/command-builder.d.ts.map +1 -0
- package/photon-ai/command-builder.js +18 -0
- package/photon-ai/command-builder.js.map +1 -0
- package/photon-ai/command-executor.d.ts +15 -0
- package/photon-ai/command-executor.d.ts.map +1 -0
- package/photon-ai/command-executor.js +26 -0
- package/photon-ai/command-executor.js.map +1 -0
- package/photon-ai/entity-resolver.d.ts +121 -0
- package/photon-ai/entity-resolver.d.ts.map +1 -0
- package/photon-ai/entity-resolver.js +393 -0
- package/photon-ai/entity-resolver.js.map +1 -0
- package/photon-ai/fuzzy-match.d.ts +12 -0
- package/photon-ai/fuzzy-match.d.ts.map +1 -0
- package/photon-ai/fuzzy-match.js +37 -0
- package/photon-ai/fuzzy-match.js.map +1 -0
- package/photon-ai/index.d.ts +15 -0
- package/photon-ai/index.d.ts.map +1 -0
- package/photon-ai/index.js +13 -0
- package/photon-ai/index.js.map +1 -0
- package/photon-ai/intent-parser.d.ts +20 -0
- package/photon-ai/intent-parser.d.ts.map +1 -0
- package/photon-ai/intent-parser.js +52 -0
- package/photon-ai/intent-parser.js.map +1 -0
- package/photon-ai/photon-ai-memory.d.ts +42 -0
- package/photon-ai/photon-ai-memory.d.ts.map +1 -0
- package/photon-ai/photon-ai-memory.js +86 -0
- package/photon-ai/photon-ai-memory.js.map +1 -0
- package/photon-ai/photon-ai-panel.d.ts +54 -0
- package/photon-ai/photon-ai-panel.d.ts.map +1 -0
- package/photon-ai/photon-ai-panel.js +191 -0
- package/photon-ai/photon-ai-panel.js.map +1 -0
- package/photon-ai/photon-ai-registry.d.ts +25 -0
- package/photon-ai/photon-ai-registry.d.ts.map +1 -0
- package/photon-ai/photon-ai-registry.js +41 -0
- package/photon-ai/photon-ai-registry.js.map +1 -0
- package/photon-ai/photon-ai-service.d.ts +71 -0
- package/photon-ai/photon-ai-service.d.ts.map +1 -0
- package/photon-ai/photon-ai-service.js +165 -0
- package/photon-ai/photon-ai-service.js.map +1 -0
- package/photon-ai/photon-ai.types.d.ts +100 -0
- package/photon-ai/photon-ai.types.d.ts.map +1 -0
- package/photon-ai/photon-ai.types.js +2 -0
- package/photon-ai/photon-ai.types.js.map +1 -0
- package/photon-ai/query-splitter.d.ts +22 -0
- package/photon-ai/query-splitter.d.ts.map +1 -0
- package/photon-ai/query-splitter.js +81 -0
- package/photon-ai/query-splitter.js.map +1 -0
- package/photon-ai/text-normalizer.d.ts +33 -0
- package/photon-ai/text-normalizer.d.ts.map +1 -0
- package/photon-ai/text-normalizer.js +132 -0
- package/photon-ai/text-normalizer.js.map +1 -0
- package/renderer/auto-scroller.d.ts +78 -0
- package/renderer/auto-scroller.d.ts.map +1 -0
- package/renderer/auto-scroller.js +141 -0
- package/renderer/auto-scroller.js.map +1 -0
- package/renderer/body-renderer.d.ts +191 -0
- package/renderer/body-renderer.d.ts.map +1 -0
- package/renderer/body-renderer.js +806 -0
- package/renderer/body-renderer.js.map +1 -0
- package/renderer/cell-renderer.d.ts +26 -0
- package/renderer/cell-renderer.d.ts.map +1 -0
- package/renderer/cell-renderer.js +201 -0
- package/renderer/cell-renderer.js.map +1 -0
- package/renderer/column-menu.d.ts +285 -0
- package/renderer/column-menu.d.ts.map +1 -0
- package/renderer/column-menu.js +873 -0
- package/renderer/column-menu.js.map +1 -0
- package/renderer/column-style-manager.d.ts +38 -0
- package/renderer/column-style-manager.d.ts.map +1 -0
- package/renderer/column-style-manager.js +110 -0
- package/renderer/column-style-manager.js.map +1 -0
- package/renderer/detail-row-renderer.d.ts +153 -0
- package/renderer/detail-row-renderer.d.ts.map +1 -0
- package/renderer/detail-row-renderer.js +388 -0
- package/renderer/detail-row-renderer.js.map +1 -0
- package/renderer/dom-utils.d.ts +22 -0
- package/renderer/dom-utils.d.ts.map +1 -0
- package/renderer/dom-utils.js +132 -0
- package/renderer/dom-utils.js.map +1 -0
- package/renderer/footer-renderer.d.ts +25 -0
- package/renderer/footer-renderer.d.ts.map +1 -0
- package/renderer/footer-renderer.js +168 -0
- package/renderer/footer-renderer.js.map +1 -0
- package/renderer/grid-renderer.d.ts +295 -0
- package/renderer/grid-renderer.d.ts.map +1 -0
- package/renderer/grid-renderer.js +1456 -0
- package/renderer/grid-renderer.js.map +1 -0
- package/renderer/group-context-menu.d.ts +79 -0
- package/renderer/group-context-menu.d.ts.map +1 -0
- package/renderer/group-context-menu.js +238 -0
- package/renderer/group-context-menu.js.map +1 -0
- package/renderer/group-drop-zone.d.ts +56 -0
- package/renderer/group-drop-zone.d.ts.map +1 -0
- package/renderer/group-drop-zone.js +376 -0
- package/renderer/group-drop-zone.js.map +1 -0
- package/renderer/header-renderer.d.ts +264 -0
- package/renderer/header-renderer.d.ts.map +1 -0
- package/renderer/header-renderer.js +1321 -0
- package/renderer/header-renderer.js.map +1 -0
- package/renderer/overlay-renderer.d.ts +16 -0
- package/renderer/overlay-renderer.d.ts.map +1 -0
- package/renderer/overlay-renderer.js +64 -0
- package/renderer/overlay-renderer.js.map +1 -0
- package/renderer/renderer-resolver.d.ts +18 -0
- package/renderer/renderer-resolver.d.ts.map +1 -0
- package/renderer/renderer-resolver.js +18 -0
- package/renderer/renderer-resolver.js.map +1 -0
- package/renderer/row-animator.d.ts +72 -0
- package/renderer/row-animator.d.ts.map +1 -0
- package/renderer/row-animator.js +175 -0
- package/renderer/row-animator.js.map +1 -0
- package/renderer/row-drag-renderer.d.ts +58 -0
- package/renderer/row-drag-renderer.d.ts.map +1 -0
- package/renderer/row-drag-renderer.js +395 -0
- package/renderer/row-drag-renderer.js.map +1 -0
- package/renderer/row-offset-search.d.ts +17 -0
- package/renderer/row-offset-search.d.ts.map +1 -0
- package/renderer/row-offset-search.js +31 -0
- package/renderer/row-offset-search.js.map +1 -0
- package/renderer/row-position-sheet.d.ts +11 -0
- package/renderer/row-position-sheet.d.ts.map +1 -0
- package/renderer/row-position-sheet.js +29 -0
- package/renderer/row-position-sheet.js.map +1 -0
- package/renderer/scroll-controller.d.ts +58 -0
- package/renderer/scroll-controller.d.ts.map +1 -0
- package/renderer/scroll-controller.js +200 -0
- package/renderer/scroll-controller.js.map +1 -0
- package/renderer/sticky-row-tracker.d.ts +40 -0
- package/renderer/sticky-row-tracker.d.ts.map +1 -0
- package/renderer/sticky-row-tracker.js +63 -0
- package/renderer/sticky-row-tracker.js.map +1 -0
- package/renderer/tooltip-renderer.d.ts +36 -0
- package/renderer/tooltip-renderer.d.ts.map +1 -0
- package/renderer/tooltip-renderer.js +133 -0
- package/renderer/tooltip-renderer.js.map +1 -0
- package/renderer/tree-cell-renderer.d.ts +37 -0
- package/renderer/tree-cell-renderer.d.ts.map +1 -0
- package/renderer/tree-cell-renderer.js +75 -0
- package/renderer/tree-cell-renderer.js.map +1 -0
- package/renderer/tree-sticky-row-tracker.d.ts +62 -0
- package/renderer/tree-sticky-row-tracker.d.ts.map +1 -0
- package/renderer/tree-sticky-row-tracker.js +120 -0
- package/renderer/tree-sticky-row-tracker.js.map +1 -0
- package/renderer/virtual-scroll-renderer.d.ts +37 -0
- package/renderer/virtual-scroll-renderer.d.ts.map +1 -0
- package/renderer/virtual-scroll-renderer.js +133 -0
- package/renderer/virtual-scroll-renderer.js.map +1 -0
- package/styles/base-styles.d.ts +3 -0
- package/styles/base-styles.d.ts.map +1 -0
- package/styles/base-styles.js +3045 -0
- package/styles/base-styles.js.map +1 -0
- package/styles/themes/theme-alpine.d.ts +2 -0
- package/styles/themes/theme-alpine.d.ts.map +1 -0
- package/styles/themes/theme-alpine.js +120 -0
- package/styles/themes/theme-alpine.js.map +1 -0
- package/styles/themes/theme-balham.d.ts +2 -0
- package/styles/themes/theme-balham.d.ts.map +1 -0
- package/styles/themes/theme-balham.js +120 -0
- package/styles/themes/theme-balham.js.map +1 -0
- package/styles/themes/theme-dark.d.ts +2 -0
- package/styles/themes/theme-dark.d.ts.map +1 -0
- package/styles/themes/theme-dark.js +216 -0
- package/styles/themes/theme-dark.js.map +1 -0
- package/styles/themes/theme-material.d.ts +2 -0
- package/styles/themes/theme-material.d.ts.map +1 -0
- package/styles/themes/theme-material.js +134 -0
- package/styles/themes/theme-material.js.map +1 -0
- package/styles/themes/theme-quartz.d.ts +2 -0
- package/styles/themes/theme-quartz.d.ts.map +1 -0
- package/styles/themes/theme-quartz.js +120 -0
- package/styles/themes/theme-quartz.js.map +1 -0
- package/theme/css-var-injector.d.ts +10 -0
- package/theme/css-var-injector.d.ts.map +1 -0
- package/theme/css-var-injector.js +63 -0
- package/theme/css-var-injector.js.map +1 -0
- package/theme/theme-manager.d.ts +20 -0
- package/theme/theme-manager.d.ts.map +1 -0
- package/theme/theme-manager.js +79 -0
- package/theme/theme-manager.js.map +1 -0
- package/theme/themes/dark-theme.d.ts +3 -0
- package/theme/themes/dark-theme.d.ts.map +1 -0
- package/theme/themes/dark-theme.js +149 -0
- package/theme/themes/dark-theme.js.map +1 -0
- package/theme/themes/light-theme.d.ts +3 -0
- package/theme/themes/light-theme.d.ts.map +1 -0
- package/theme/themes/light-theme.js +149 -0
- package/theme/themes/light-theme.js.map +1 -0
- package/types/column.types.d.ts +195 -0
- package/types/column.types.d.ts.map +1 -0
- package/types/column.types.js +2 -0
- package/types/column.types.js.map +1 -0
- package/types/event.types.d.ts +213 -0
- package/types/event.types.d.ts.map +1 -0
- package/types/event.types.js +67 -0
- package/types/event.types.js.map +1 -0
- package/types/filter.types.d.ts +42 -0
- package/types/filter.types.d.ts.map +1 -0
- package/types/filter.types.js +2 -0
- package/types/filter.types.js.map +1 -0
- package/types/grid.types.d.ts +214 -0
- package/types/grid.types.d.ts.map +1 -0
- package/types/grid.types.js +2 -0
- package/types/grid.types.js.map +1 -0
- package/types/master-detail.types.d.ts +112 -0
- package/types/master-detail.types.d.ts.map +1 -0
- package/types/master-detail.types.js +2 -0
- package/types/master-detail.types.js.map +1 -0
- package/types/photon-ai.types.d.ts +19 -0
- package/types/photon-ai.types.d.ts.map +1 -0
- package/types/photon-ai.types.js +2 -0
- package/types/photon-ai.types.js.map +1 -0
- package/types/renderer.types.d.ts +156 -0
- package/types/renderer.types.d.ts.map +1 -0
- package/types/renderer.types.js +19 -0
- package/types/renderer.types.js.map +1 -0
- package/types/row.types.d.ts +127 -0
- package/types/row.types.d.ts.map +1 -0
- package/types/row.types.js +9 -0
- package/types/row.types.js.map +1 -0
- package/types/theme.types.d.ts +159 -0
- package/types/theme.types.d.ts.map +1 -0
- package/types/theme.types.js +2 -0
- package/types/theme.types.js.map +1 -0
- package/types/tree-data.types.d.ts +94 -0
- package/types/tree-data.types.d.ts.map +1 -0
- package/types/tree-data.types.js +2 -0
- package/types/tree-data.types.js.map +1 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ColumnDef } from '../types/column.types';
|
|
2
|
+
import type { ColumnStyleManager } from '../renderer/column-style-manager';
|
|
3
|
+
import type { LogicalGroupRegistry } from './logical-group-registry';
|
|
4
|
+
import type { DisplayHeaderTree } from './display-group.types';
|
|
5
|
+
/**
|
|
6
|
+
* Stateless builder that produces a {@link DisplayHeaderTree} from the current
|
|
7
|
+
* displayed column order.
|
|
8
|
+
*
|
|
9
|
+
* The same builder instance can be reused — call `build()` whenever the
|
|
10
|
+
* displayed column order, column widths, or collapse state changes.
|
|
11
|
+
* Because the builder is stateless, `build()` always returns a fresh tree
|
|
12
|
+
* without any shared mutable state.
|
|
13
|
+
*
|
|
14
|
+
* ### Algorithm — O(n) per column
|
|
15
|
+
*
|
|
16
|
+
* Walk through visible columns **left to right**, maintaining an `openStack`
|
|
17
|
+
* of currently-open `DisplayGroupNode` instances:
|
|
18
|
+
*
|
|
19
|
+
* 1. Get the column's group path from the registry.
|
|
20
|
+
* 2. Find the **longest common prefix** between the open stack IDs and the path.
|
|
21
|
+
* 3. **Close** every group above the common-prefix depth — attach each closed
|
|
22
|
+
* node to its parent (or to `roots`), finalising its width.
|
|
23
|
+
* 4. **Open** new group instances from `commonLen` to `path.length - 1`.
|
|
24
|
+
* 5. Attach a `DisplayLeafNode` to the deepest open group (or `roots`).
|
|
25
|
+
* 6. Advance `cursor` by the column's pixel width.
|
|
26
|
+
*
|
|
27
|
+
* After the last column, close any remaining open groups.
|
|
28
|
+
*
|
|
29
|
+
* Then: compute `maxGroupDepth`, flatten the tree into `RenderedHeaderRow[]`
|
|
30
|
+
* (one per depth), and return the completed `DisplayHeaderTree`.
|
|
31
|
+
*
|
|
32
|
+
* ### Split groups
|
|
33
|
+
*
|
|
34
|
+
* When the same logical group's columns are interleaved with another group's
|
|
35
|
+
* columns in the displayed order, the algorithm naturally creates **multiple
|
|
36
|
+
* display instances** of that logical group — one per consecutive run.
|
|
37
|
+
* Each instance has a unique `instanceId` and an independently computed width.
|
|
38
|
+
*/
|
|
39
|
+
export declare class DisplayGroupBuilder {
|
|
40
|
+
/**
|
|
41
|
+
* Build the display header tree for a single panel's visible column list.
|
|
42
|
+
*
|
|
43
|
+
* @param columns - Visible columns in display order (left to right).
|
|
44
|
+
* @param registry - Logical group registry supplying paths and definitions.
|
|
45
|
+
* @param collapseState - Per-logical-group collapse flags (from the engine).
|
|
46
|
+
* @param colStyles - Column width resolver.
|
|
47
|
+
* @returns A fully-computed `DisplayHeaderTree` ready for DOM building.
|
|
48
|
+
*/
|
|
49
|
+
build(columns: ColumnDef[], registry: LogicalGroupRegistry, collapseState: ReadonlyMap<string, boolean>, colStyles: ColumnStyleManager): DisplayHeaderTree;
|
|
50
|
+
/**
|
|
51
|
+
* Find the longest common prefix length between the current open stack's
|
|
52
|
+
* logical group IDs and the incoming column's group path.
|
|
53
|
+
*
|
|
54
|
+
* @param stack - Currently open group nodes.
|
|
55
|
+
* @param path - Group path for the incoming column.
|
|
56
|
+
*/
|
|
57
|
+
private commonPrefixLen;
|
|
58
|
+
/**
|
|
59
|
+
* Recursively compute the maximum group nesting depth across all nodes.
|
|
60
|
+
* Returns `0` when there are no group nodes (all columns are flat).
|
|
61
|
+
*
|
|
62
|
+
* @param nodes - Display nodes to inspect.
|
|
63
|
+
*/
|
|
64
|
+
private computeMaxGroupDepth;
|
|
65
|
+
/**
|
|
66
|
+
* Flatten the display tree into one {@link RenderedHeaderRow} per group
|
|
67
|
+
* depth level (rows `0..maxGroupDepth-1`).
|
|
68
|
+
*
|
|
69
|
+
* - Group nodes produce `RenderedGroupCell` entries in their depth row.
|
|
70
|
+
* - Leaf nodes at any level produce `RenderedFillerCell` entries for every
|
|
71
|
+
* group-row depth where they have no ancestor group. This makes flat and
|
|
72
|
+
* shallow columns appear to span the full header height.
|
|
73
|
+
*
|
|
74
|
+
* Cells within each row are sorted by `left` position before returning.
|
|
75
|
+
*
|
|
76
|
+
* @param roots - Root-level display nodes.
|
|
77
|
+
* @param maxGroupDepth - Total number of group header rows to produce.
|
|
78
|
+
*/
|
|
79
|
+
private buildGroupRows;
|
|
80
|
+
/**
|
|
81
|
+
* Recursively fill the rows array from display tree nodes.
|
|
82
|
+
*
|
|
83
|
+
* @param nodes - Nodes at the current recursion level.
|
|
84
|
+
* @param rows - Output rows array, mutated in place.
|
|
85
|
+
* @param startDepth - The group-row depth these nodes contribute to.
|
|
86
|
+
* Root nodes → `startDepth = 0`.
|
|
87
|
+
* Children of a depth-0 group → `startDepth = 1`, etc.
|
|
88
|
+
*/
|
|
89
|
+
private fillRows;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=display-group-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-group-builder.d.ts","sourceRoot":"","sources":["../../src/column-groups/display-group-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAQV,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;;;OAQG;IACH,KAAK,CACH,OAAO,EAAQ,SAAS,EAAE,EAC1B,QAAQ,EAAO,oBAAoB,EACnC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,SAAS,EAAM,kBAAkB,GAChC,iBAAiB;IA4FpB;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAWvB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAY5B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,cAAc;IAYtB;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ;CAwCjB"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stateless builder that produces a {@link DisplayHeaderTree} from the current
|
|
3
|
+
* displayed column order.
|
|
4
|
+
*
|
|
5
|
+
* The same builder instance can be reused — call `build()` whenever the
|
|
6
|
+
* displayed column order, column widths, or collapse state changes.
|
|
7
|
+
* Because the builder is stateless, `build()` always returns a fresh tree
|
|
8
|
+
* without any shared mutable state.
|
|
9
|
+
*
|
|
10
|
+
* ### Algorithm — O(n) per column
|
|
11
|
+
*
|
|
12
|
+
* Walk through visible columns **left to right**, maintaining an `openStack`
|
|
13
|
+
* of currently-open `DisplayGroupNode` instances:
|
|
14
|
+
*
|
|
15
|
+
* 1. Get the column's group path from the registry.
|
|
16
|
+
* 2. Find the **longest common prefix** between the open stack IDs and the path.
|
|
17
|
+
* 3. **Close** every group above the common-prefix depth — attach each closed
|
|
18
|
+
* node to its parent (or to `roots`), finalising its width.
|
|
19
|
+
* 4. **Open** new group instances from `commonLen` to `path.length - 1`.
|
|
20
|
+
* 5. Attach a `DisplayLeafNode` to the deepest open group (or `roots`).
|
|
21
|
+
* 6. Advance `cursor` by the column's pixel width.
|
|
22
|
+
*
|
|
23
|
+
* After the last column, close any remaining open groups.
|
|
24
|
+
*
|
|
25
|
+
* Then: compute `maxGroupDepth`, flatten the tree into `RenderedHeaderRow[]`
|
|
26
|
+
* (one per depth), and return the completed `DisplayHeaderTree`.
|
|
27
|
+
*
|
|
28
|
+
* ### Split groups
|
|
29
|
+
*
|
|
30
|
+
* When the same logical group's columns are interleaved with another group's
|
|
31
|
+
* columns in the displayed order, the algorithm naturally creates **multiple
|
|
32
|
+
* display instances** of that logical group — one per consecutive run.
|
|
33
|
+
* Each instance has a unique `instanceId` and an independently computed width.
|
|
34
|
+
*/
|
|
35
|
+
export class DisplayGroupBuilder {
|
|
36
|
+
/**
|
|
37
|
+
* Build the display header tree for a single panel's visible column list.
|
|
38
|
+
*
|
|
39
|
+
* @param columns - Visible columns in display order (left to right).
|
|
40
|
+
* @param registry - Logical group registry supplying paths and definitions.
|
|
41
|
+
* @param collapseState - Per-logical-group collapse flags (from the engine).
|
|
42
|
+
* @param colStyles - Column width resolver.
|
|
43
|
+
* @returns A fully-computed `DisplayHeaderTree` ready for DOM building.
|
|
44
|
+
*/
|
|
45
|
+
build(columns, registry, collapseState, colStyles) {
|
|
46
|
+
const roots = [];
|
|
47
|
+
const openStack = [];
|
|
48
|
+
let cursor = 0;
|
|
49
|
+
/**
|
|
50
|
+
* Close groups until the stack depth reaches `targetDepth`.
|
|
51
|
+
* Each closed group is attached to its parent or to `roots`, with its
|
|
52
|
+
* final width computed as `cursor - node.left`.
|
|
53
|
+
*/
|
|
54
|
+
const closeDown = (targetDepth) => {
|
|
55
|
+
while (openStack.length > targetDepth) {
|
|
56
|
+
const closing = openStack.pop();
|
|
57
|
+
// Finalise width: everything between its left edge and the cursor
|
|
58
|
+
closing.width = cursor - closing.left;
|
|
59
|
+
const parent = openStack.length > 0 ? openStack[openStack.length - 1] : null;
|
|
60
|
+
if (parent) {
|
|
61
|
+
parent.children.push(closing);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
roots.push(closing);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
for (const col of columns) {
|
|
69
|
+
if (col.visible === false)
|
|
70
|
+
continue;
|
|
71
|
+
const path = registry.getPath(col.colId);
|
|
72
|
+
const colWidth = colStyles.getWidth(col.colId);
|
|
73
|
+
// Longest common prefix between the current open stack and this column's path
|
|
74
|
+
const common = this.commonPrefixLen(openStack, path);
|
|
75
|
+
closeDown(common);
|
|
76
|
+
// Open new group nodes for depths from `common` to `path.length - 1`.
|
|
77
|
+
// The stable instanceId uses the FIRST column that opens each group instance
|
|
78
|
+
// so that collapse/resize state persists across header rebuilds.
|
|
79
|
+
// Format: "${logicalGroupId}:${firstLeafColId}"
|
|
80
|
+
for (let d = common; d < path.length; d++) {
|
|
81
|
+
const groupId = path[d];
|
|
82
|
+
const def = registry.getGroup(groupId);
|
|
83
|
+
// col.colId is always the first leaf of a newly-opened instance because
|
|
84
|
+
// we walk columns left-to-right and a group is only opened once per run.
|
|
85
|
+
const instanceId = `${groupId}:${col.colId}`;
|
|
86
|
+
const node = {
|
|
87
|
+
kind: 'group',
|
|
88
|
+
instanceId,
|
|
89
|
+
logicalGroupId: groupId,
|
|
90
|
+
header: def?.header ?? groupId,
|
|
91
|
+
depth: d,
|
|
92
|
+
children: [],
|
|
93
|
+
left: cursor,
|
|
94
|
+
width: 0, // finalised on close
|
|
95
|
+
collapsed: collapseState.get(instanceId) ?? false,
|
|
96
|
+
resizable: def?.resizable !== false,
|
|
97
|
+
collapsedWidth: def?.collapsedWidth ?? 36,
|
|
98
|
+
headerCssClass: def?.headerCssClass,
|
|
99
|
+
headerRendererFn: def?.headerRendererFn,
|
|
100
|
+
};
|
|
101
|
+
openStack.push(node);
|
|
102
|
+
}
|
|
103
|
+
// Create and attach the leaf node
|
|
104
|
+
const leaf = {
|
|
105
|
+
kind: 'leaf',
|
|
106
|
+
colDef: col,
|
|
107
|
+
groupPath: path,
|
|
108
|
+
left: cursor,
|
|
109
|
+
width: colWidth,
|
|
110
|
+
};
|
|
111
|
+
const parent = openStack.length > 0 ? openStack[openStack.length - 1] : null;
|
|
112
|
+
if (parent) {
|
|
113
|
+
parent.children.push(leaf);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
roots.push(leaf);
|
|
117
|
+
}
|
|
118
|
+
cursor += colWidth;
|
|
119
|
+
}
|
|
120
|
+
// Close any groups still open after the last column
|
|
121
|
+
closeDown(0);
|
|
122
|
+
const maxGroupDepth = this.computeMaxGroupDepth(roots);
|
|
123
|
+
const groupRows = maxGroupDepth > 0 ? this.buildGroupRows(roots, maxGroupDepth) : [];
|
|
124
|
+
return { roots, maxGroupDepth, groupRows, totalWidth: cursor };
|
|
125
|
+
}
|
|
126
|
+
// ── Private helpers ───────────────────────────────────────────────────────
|
|
127
|
+
/**
|
|
128
|
+
* Find the longest common prefix length between the current open stack's
|
|
129
|
+
* logical group IDs and the incoming column's group path.
|
|
130
|
+
*
|
|
131
|
+
* @param stack - Currently open group nodes.
|
|
132
|
+
* @param path - Group path for the incoming column.
|
|
133
|
+
*/
|
|
134
|
+
commonPrefixLen(stack, path) {
|
|
135
|
+
const len = Math.min(stack.length, path.length);
|
|
136
|
+
for (let i = 0; i < len; i++) {
|
|
137
|
+
if (stack[i].logicalGroupId !== path[i])
|
|
138
|
+
return i;
|
|
139
|
+
}
|
|
140
|
+
return len;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Recursively compute the maximum group nesting depth across all nodes.
|
|
144
|
+
* Returns `0` when there are no group nodes (all columns are flat).
|
|
145
|
+
*
|
|
146
|
+
* @param nodes - Display nodes to inspect.
|
|
147
|
+
*/
|
|
148
|
+
computeMaxGroupDepth(nodes) {
|
|
149
|
+
let max = 0;
|
|
150
|
+
for (const n of nodes) {
|
|
151
|
+
if (n.kind === 'group') {
|
|
152
|
+
const childMax = this.computeMaxGroupDepth(n.children);
|
|
153
|
+
// This group occupies depth n.depth, contributing 1 group row
|
|
154
|
+
max = Math.max(max, n.depth + 1, childMax);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return max;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Flatten the display tree into one {@link RenderedHeaderRow} per group
|
|
161
|
+
* depth level (rows `0..maxGroupDepth-1`).
|
|
162
|
+
*
|
|
163
|
+
* - Group nodes produce `RenderedGroupCell` entries in their depth row.
|
|
164
|
+
* - Leaf nodes at any level produce `RenderedFillerCell` entries for every
|
|
165
|
+
* group-row depth where they have no ancestor group. This makes flat and
|
|
166
|
+
* shallow columns appear to span the full header height.
|
|
167
|
+
*
|
|
168
|
+
* Cells within each row are sorted by `left` position before returning.
|
|
169
|
+
*
|
|
170
|
+
* @param roots - Root-level display nodes.
|
|
171
|
+
* @param maxGroupDepth - Total number of group header rows to produce.
|
|
172
|
+
*/
|
|
173
|
+
buildGroupRows(roots, maxGroupDepth) {
|
|
174
|
+
const rows = Array.from({ length: maxGroupDepth }, () => []);
|
|
175
|
+
this.fillRows(roots, rows, 0);
|
|
176
|
+
return rows.map((cells, depth) => ({
|
|
177
|
+
depth,
|
|
178
|
+
cells: cells.slice().sort((a, b) => a.left - b.left),
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Recursively fill the rows array from display tree nodes.
|
|
183
|
+
*
|
|
184
|
+
* @param nodes - Nodes at the current recursion level.
|
|
185
|
+
* @param rows - Output rows array, mutated in place.
|
|
186
|
+
* @param startDepth - The group-row depth these nodes contribute to.
|
|
187
|
+
* Root nodes → `startDepth = 0`.
|
|
188
|
+
* Children of a depth-0 group → `startDepth = 1`, etc.
|
|
189
|
+
*/
|
|
190
|
+
fillRows(nodes, rows, startDepth) {
|
|
191
|
+
for (const node of nodes) {
|
|
192
|
+
if (node.kind === 'leaf') {
|
|
193
|
+
// Leaf at `startDepth` has no ancestor group from `startDepth` onward.
|
|
194
|
+
// Add filler cells from startDepth to the last group row so the column
|
|
195
|
+
// visually spans the full multi-row header height.
|
|
196
|
+
for (let d = startDepth; d < rows.length; d++) {
|
|
197
|
+
const filler = {
|
|
198
|
+
kind: 'filler',
|
|
199
|
+
id: `_filler_${node.colDef.colId}_d${d}`,
|
|
200
|
+
colId: node.colDef.colId,
|
|
201
|
+
left: node.left,
|
|
202
|
+
width: node.width,
|
|
203
|
+
depth: d,
|
|
204
|
+
};
|
|
205
|
+
rows[d].push(filler);
|
|
206
|
+
}
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
// Group node — add a cell at its designated depth row
|
|
210
|
+
if (node.depth < rows.length) {
|
|
211
|
+
const cell = {
|
|
212
|
+
kind: 'group',
|
|
213
|
+
node,
|
|
214
|
+
left: node.left,
|
|
215
|
+
width: node.width,
|
|
216
|
+
depth: node.depth,
|
|
217
|
+
};
|
|
218
|
+
rows[node.depth].push(cell);
|
|
219
|
+
}
|
|
220
|
+
// Recurse into children; they live at depth node.depth + 1
|
|
221
|
+
this.fillRows(node.children, rows, node.depth + 1);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=display-group-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-group-builder.js","sourceRoot":"","sources":["../../src/column-groups/display-group-builder.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;;;;OAQG;IACH,KAAK,CACH,OAA0B,EAC1B,QAAmC,EACnC,aAA2C,EAC3C,SAAiC;QAEjC,MAAM,K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IAAI;wBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;wBACjB,KAAK,EAAE,CAAC;qBACT,CAAC;oBACF,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACvB,CAAC;gBACD,SAAS;YACX,CAAC;YAED,sDAAsD;YACtD,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC7B,MAAM,IAAI,GAAsB;oBAC9B,IAAI,EAAG,OAAO;oBACd,IAAI;oBACJ,IAAI,EAAG,IAAI,CAAC,IAAI;oBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;iBAClB,CAAC;gBACF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC;YAED,2DAA2D;YAC3D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import type { DisplayGroupNode } from './display-group.types';
|
|
2
|
+
/**
|
|
3
|
+
* Fired by {@link DisplayGroupDragHandler} when the user drops a group at a
|
|
4
|
+
* new position.
|
|
5
|
+
*
|
|
6
|
+
* @param logicalGroupId - The logical group being moved.
|
|
7
|
+
* @param sourcePanel - The panel the drag originated from.
|
|
8
|
+
* @param targetPanel - The panel the group is dropped into.
|
|
9
|
+
* @param insertBeforeColId - First leaf column to the right of the drop target.
|
|
10
|
+
* `null` means append at the end of the target panel section.
|
|
11
|
+
*/
|
|
12
|
+
export type GroupMovedCallback = (logicalGroupId: string, sourcePanel: 'left' | null | 'right', targetPanel: 'left' | null | 'right', insertBeforeColId: string | null) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Callbacks used for real-time (AG Grid-style) group tree preview during drag.
|
|
15
|
+
*
|
|
16
|
+
* When provided the drag handler uses a live-rebuild path instead of CSS
|
|
17
|
+
* transforms: on every slot change the column order is updated in the store so
|
|
18
|
+
* the header re-renders with the group in its new position before the user drops.
|
|
19
|
+
*/
|
|
20
|
+
export interface GroupPreviewCallbacks {
|
|
21
|
+
/** Called once when the drag crosses the activation threshold. */
|
|
22
|
+
onPreviewStart: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Called on every slot change during the drag.
|
|
25
|
+
* The engine applies the move from the original snapshot so the header
|
|
26
|
+
* rebuilds with the group at the new position.
|
|
27
|
+
*/
|
|
28
|
+
onPreviewMove: GroupMovedCallback;
|
|
29
|
+
/**
|
|
30
|
+
* Called on mouseup to commit the final preview position.
|
|
31
|
+
* The store already reflects the correct order — this just clears the snapshot.
|
|
32
|
+
*/
|
|
33
|
+
onPreviewConfirm: () => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Handles atomic column-group drag and drop.
|
|
37
|
+
*
|
|
38
|
+
* ### Rules
|
|
39
|
+
* - Only **group header cells** (`.pg-th--group`) can be dragged.
|
|
40
|
+
* - Group children cannot escape their group during drag.
|
|
41
|
+
* - Drop targets are root-level positions only (before/after other groups or
|
|
42
|
+
* flat columns). Dropping inside another group is not supported.
|
|
43
|
+
* - Moving across panels changes the `pinned` property of all group leaves.
|
|
44
|
+
*
|
|
45
|
+
* ### Visual feedback — two modes
|
|
46
|
+
* **Live preview** (when `previewCallbacks` is provided):
|
|
47
|
+
* The column order is updated in the store on every slot change so the header
|
|
48
|
+
* re-renders in real time — identical to AG Grid behaviour. CSS transforms are
|
|
49
|
+
* not used; the rebuilt DOM IS the visual feedback.
|
|
50
|
+
*
|
|
51
|
+
* **CSS-transform** (legacy fallback):
|
|
52
|
+
* `translateX` rules are injected via a `<style>` tag to slide cells without
|
|
53
|
+
* touching the store. The final move is committed on mouseup.
|
|
54
|
+
*
|
|
55
|
+
* ### Drag activation threshold
|
|
56
|
+
* A drag is not activated until the pointer moves **5 px** — preventing
|
|
57
|
+
* accidental drags during collapse-toggle clicks.
|
|
58
|
+
*/
|
|
59
|
+
export declare class DisplayGroupDragHandler {
|
|
60
|
+
private readonly gridElGetter;
|
|
61
|
+
private readonly onGroupMoved;
|
|
62
|
+
private readonly previewCallbacks?;
|
|
63
|
+
private readonly leavesFor?;
|
|
64
|
+
private _didJustDrag;
|
|
65
|
+
private isDragging;
|
|
66
|
+
private dragGroupId;
|
|
67
|
+
private sourcePanel;
|
|
68
|
+
private ghostEl;
|
|
69
|
+
private indicatorEl;
|
|
70
|
+
private dragStyleEl;
|
|
71
|
+
private capturedCells;
|
|
72
|
+
private dragSourceIdx;
|
|
73
|
+
/** Last slot key seen in live-preview mode — `"<panel>:<insertBeforeColId|end>"`. */
|
|
74
|
+
private lastSlotKey;
|
|
75
|
+
private startX;
|
|
76
|
+
private startY;
|
|
77
|
+
private removeMoveUp;
|
|
78
|
+
/**
|
|
79
|
+
* @param gridElGetter - Returns the root `.pg-grid` element (may be null before mount).
|
|
80
|
+
* @param onGroupMoved - Committed on mouseup; receives the final group position.
|
|
81
|
+
* @param previewCallbacks - When provided, switches to the live-rebuild path (store mutations
|
|
82
|
+
* on every slot change, same as AG Grid's live column reorder). When omitted, the handler
|
|
83
|
+
* uses CSS transforms instead — smoother and without flicker.
|
|
84
|
+
* @param leavesFor - Returns the leaf column IDs for a logical group. Used by the
|
|
85
|
+
* CSS-transform path so that leaf header cells AND body cells animate in sync with the
|
|
86
|
+
* group header when the drag slot changes.
|
|
87
|
+
*/
|
|
88
|
+
constructor(gridElGetter: () => HTMLElement | null, onGroupMoved: GroupMovedCallback, previewCallbacks?: GroupPreviewCallbacks | undefined, leavesFor?: ((groupId: string) => readonly string[]) | undefined);
|
|
89
|
+
/**
|
|
90
|
+
* Called from `DisplayGroupHeaderBuilder.onGroupHeaderMouseDown` for each
|
|
91
|
+
* newly built group header cell. Wires a threshold-based drag using the
|
|
92
|
+
* `mousedown` event already delivered by the builder.
|
|
93
|
+
*
|
|
94
|
+
* @param e - The `mousedown` event from the group header cell.
|
|
95
|
+
* @param node - The display group node this cell represents.
|
|
96
|
+
* @param el - The DOM element of the group header cell.
|
|
97
|
+
*/
|
|
98
|
+
onHeaderMouseDown(e: MouseEvent, node: DisplayGroupNode, el: HTMLElement): void;
|
|
99
|
+
/**
|
|
100
|
+
* `true` for ~200 ms after a drag completes.
|
|
101
|
+
* Used by the header builder to suppress the click event fired after mouseup.
|
|
102
|
+
*/
|
|
103
|
+
get didJustDrag(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* `true` while a group header drag is currently in progress.
|
|
106
|
+
* Exposed so the store-watcher in `GridRenderer` can skip the full header
|
|
107
|
+
* destroy / rebuild cycle during live-preview group drag, preventing flicker.
|
|
108
|
+
*/
|
|
109
|
+
get isDraggingGroup(): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Tear down all event listeners and remove any remaining drag DOM artifacts.
|
|
112
|
+
* Must be called when the grid is destroyed or when the header is rebuilt.
|
|
113
|
+
*/
|
|
114
|
+
destroy(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Activate the drag once the movement threshold is exceeded.
|
|
117
|
+
* Creates the ghost chip, drop indicator, and style element.
|
|
118
|
+
*
|
|
119
|
+
* Adds `pg-grid--group-dragging` before live preview updates begin so the
|
|
120
|
+
* renderer can suppress normal transition effects while column order is being
|
|
121
|
+
* updated repeatedly under the pointer.
|
|
122
|
+
*/
|
|
123
|
+
private activateDrag;
|
|
124
|
+
private onMouseMove;
|
|
125
|
+
private onMouseUp;
|
|
126
|
+
/**
|
|
127
|
+
* Find the leaf column ID that the group should be inserted before.
|
|
128
|
+
* Inspects the leaf header row in the target panel, finding the first cell
|
|
129
|
+
* whose horizontal midpoint is to the right of the cursor.
|
|
130
|
+
*
|
|
131
|
+
* @param e - Current cursor position.
|
|
132
|
+
* @param targetPanel - Panel the drop is over.
|
|
133
|
+
* @param gridEl - Root `.pg-grid` element.
|
|
134
|
+
*/
|
|
135
|
+
private findInsertBeforeColId;
|
|
136
|
+
/**
|
|
137
|
+
* Capture all root-level drag slots from the depth-0 group header row.
|
|
138
|
+
*
|
|
139
|
+
* Slots include both:
|
|
140
|
+
* - **Group cells** (`.pg-th--group`): represent a whole logical group.
|
|
141
|
+
* - **Flat-column filler cells** (`.pg-th--depth-filler`): represent a single
|
|
142
|
+
* ungrouped column sitting between/around groups. Including these as slots
|
|
143
|
+
* lets the drag handler detect when the cursor crosses a flat-column boundary
|
|
144
|
+
* and animate the flat column (header + body cells) out of the way in real
|
|
145
|
+
* time — matching AG Grid's behaviour for mixed grouped/flat layouts.
|
|
146
|
+
*
|
|
147
|
+
* Cells are sorted by their `style.left` value because absolutely-positioned
|
|
148
|
+
* elements may appear in arbitrary DOM insertion order.
|
|
149
|
+
*
|
|
150
|
+
* Falls back to the leaf header row when no group rows exist (rare — only when
|
|
151
|
+
* the grid transitions from grouped to flat while a drag is in progress).
|
|
152
|
+
*
|
|
153
|
+
* @param gridEl - Root `.pg-grid` element.
|
|
154
|
+
* @param panel - Panel to inspect.
|
|
155
|
+
*/
|
|
156
|
+
private capturePanelCells;
|
|
157
|
+
/**
|
|
158
|
+
* Find the effective drop-slot index from the current cursor x position.
|
|
159
|
+
* Returns `capturedCells.length` to indicate "append at end".
|
|
160
|
+
*
|
|
161
|
+
* @param cursorX - Cursor x position in client coordinates.
|
|
162
|
+
*/
|
|
163
|
+
private findEffectiveSlot;
|
|
164
|
+
/**
|
|
165
|
+
* Apply `--pg-drag-x` and `--pg-drag-transition` rules via the injected `<style>`
|
|
166
|
+
* element to give a live preview of where the dragged group will land.
|
|
167
|
+
*
|
|
168
|
+
* - The **dragged group** and all of its leaf columns snap instantly
|
|
169
|
+
* (`--pg-drag-transition: 0ms`) so they track the slot-change in a single frame.
|
|
170
|
+
* - **Displaced groups** and their leaf columns animate smoothly with the default
|
|
171
|
+
* transition duration (180 ms) — matching AG Grid's animated reorder behaviour.
|
|
172
|
+
* - Body cells (`pg-cell[data-col-id]`) receive the same offset as their header
|
|
173
|
+
* counterpart, so the data rows shift in perfect sync with the header.
|
|
174
|
+
*
|
|
175
|
+
* Using the `--pg-drag-transition` CSS variable avoids specificity conflicts:
|
|
176
|
+
* the base CSS in `base-styles.ts` reads the variable and provides the default,
|
|
177
|
+
* while the per-cell override only needs to set the variable.
|
|
178
|
+
*
|
|
179
|
+
* @param effectiveIdx - Drop-slot index from {@link findEffectiveSlot}.
|
|
180
|
+
* @param gridEl - Root `.pg-grid` element (used to scope CSS selectors).
|
|
181
|
+
*/
|
|
182
|
+
private applyTransforms;
|
|
183
|
+
/**
|
|
184
|
+
* Reposition the drop-indicator line to show the insertion point.
|
|
185
|
+
*
|
|
186
|
+
* @param effectiveIdx - Slot index derived from cursor position.
|
|
187
|
+
*/
|
|
188
|
+
private updateIndicator;
|
|
189
|
+
/**
|
|
190
|
+
* Position the drop-indicator line by looking up the target cell directly in
|
|
191
|
+
* the live DOM. Used in live-preview mode where captured cell rects are stale
|
|
192
|
+
* after each header rebuild.
|
|
193
|
+
*
|
|
194
|
+
* @param colId - The `data-col-id` of the cell to insert before, or `null`
|
|
195
|
+
* to place the indicator at the end of the panel.
|
|
196
|
+
* @param panel - The panel the drop is targeting.
|
|
197
|
+
* @param gridEl - Root `.pg-grid` element.
|
|
198
|
+
*/
|
|
199
|
+
private updateIndicatorFromColId;
|
|
200
|
+
private detectPanelFromElement;
|
|
201
|
+
private detectPanelAtPoint;
|
|
202
|
+
private getPanelEl;
|
|
203
|
+
private cleanupDrag;
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=display-group-drag-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-group-drag-handler.d.ts","sourceRoot":"","sources":["../../src/column-groups/display-group-drag-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC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