@finos/legend-cube-builder 0.0.3 → 0.0.5
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/README.md +59 -20
- package/docs/adding-an-operation.md +112 -13
- package/docs/demo/DEMO-FAST-NOTES.md +67 -0
- package/docs/demo/README.md +102 -0
- package/docs/demo/specs/duckdb-sales-pivot.cube.json +110 -0
- package/docs/demo/specs/trades-desks-1-joined.cube.json +123 -0
- package/docs/demo/specs/trades-desks-2-grouped.cube.json +140 -0
- package/docs/demo/specs/trades-desks-3-ranked.cube.json +158 -0
- package/docs/demo/specs/trades-desks-4-extended.cube.json +208 -0
- package/docs/demo/specs/trades-desks-5-final.cube.json +248 -0
- package/docs/hosting.md +132 -7
- package/docs/testing.md +146 -9
- package/lib/__lib__/LegendCubeCommand.d.ts +4 -1
- package/lib/__lib__/LegendCubeCommand.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeCommand.js +12 -0
- package/lib/__lib__/LegendCubeCommand.js.map +1 -1
- package/lib/__lib__/LegendCubeDataProductLabels.d.ts +45 -0
- package/lib/__lib__/LegendCubeDataProductLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeDataProductLabels.js +60 -0
- package/lib/__lib__/LegendCubeDataProductLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeDirectConnectionLabels.d.ts +56 -0
- package/lib/__lib__/LegendCubeDirectConnectionLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeDirectConnectionLabels.js +76 -0
- package/lib/__lib__/LegendCubeDirectConnectionLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeFunctionLabels.d.ts +29 -0
- package/lib/__lib__/LegendCubeFunctionLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeFunctionLabels.js +31 -0
- package/lib/__lib__/LegendCubeFunctionLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeHelpText.d.ts +5 -1
- package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeHelpText.js +25 -3
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeIngestLabels.d.ts +25 -0
- package/lib/__lib__/LegendCubeIngestLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeIngestLabels.js +29 -0
- package/lib/__lib__/LegendCubeIngestLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeLabels.d.ts +171 -6
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +226 -13
- package/lib/__lib__/LegendCubeLabels.js.map +1 -1
- package/lib/__lib__/LegendCubeProjectLabels.d.ts +22 -0
- package/lib/__lib__/LegendCubeProjectLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeProjectLabels.js +23 -0
- package/lib/__lib__/LegendCubeProjectLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.d.ts +26 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.js +26 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeServiceLabels.d.ts +27 -0
- package/lib/__lib__/LegendCubeServiceLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeServiceLabels.js +32 -0
- package/lib/__lib__/LegendCubeServiceLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeTesting.d.ts +8 -0
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeTesting.js +8 -0
- package/lib/__lib__/LegendCubeTesting.js.map +1 -1
- package/lib/__test-utils__/CubeCanvasTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubeCanvasTestUtils.js +1 -1
- package/lib/__test-utils__/CubeCanvasTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeConnectionTestSupport.d.ts +22 -0
- package/lib/__test-utils__/CubeConnectionTestSupport.d.ts.map +1 -0
- package/lib/__test-utils__/CubeConnectionTestSupport.js +30 -0
- package/lib/__test-utils__/CubeConnectionTestSupport.js.map +1 -0
- package/lib/__test-utils__/CubeDirectConnectionFixtures.d.ts +31 -0
- package/lib/__test-utils__/CubeDirectConnectionFixtures.d.ts.map +1 -0
- package/lib/__test-utils__/CubeDirectConnectionFixtures.js +63 -0
- package/lib/__test-utils__/CubeDirectConnectionFixtures.js.map +1 -0
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts +13 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.js +23 -2
- package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts +44 -0
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubeExpressionTestUtils.js +100 -0
- package/lib/__test-utils__/CubeExpressionTestUtils.js.map +1 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.d.ts +26 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.d.ts.map +1 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.js +56 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.js.map +1 -0
- package/lib/__test-utils__/CubeLambdaCorpus.d.ts +36 -0
- package/lib/__test-utils__/CubeLambdaCorpus.d.ts.map +1 -0
- package/lib/__test-utils__/CubeLambdaCorpus.js +83 -0
- package/lib/__test-utils__/CubeLambdaCorpus.js.map +1 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.d.ts +25 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubeOperationsTestUtils.js +56 -10
- package/lib/__test-utils__/CubeOperationsTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubePageTestUtils.d.ts +18 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubePageTestUtils.js +46 -1
- package/lib/__test-utils__/CubePageTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.d.ts +14 -1
- package/lib/__test-utils__/CubeTestApplication.d.ts.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.js +25 -1
- package/lib/__test-utils__/CubeTestApplication.js.map +1 -1
- package/lib/__test-utils__/FakeCubeConnectionExplorer.d.ts +33 -0
- package/lib/__test-utils__/FakeCubeConnectionExplorer.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeConnectionExplorer.js +67 -0
- package/lib/__test-utils__/FakeCubeConnectionExplorer.js.map +1 -0
- package/lib/__test-utils__/FakeCubeDataProductCatalog.d.ts +45 -0
- package/lib/__test-utils__/FakeCubeDataProductCatalog.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeDataProductCatalog.js +137 -0
- package/lib/__test-utils__/FakeCubeDataProductCatalog.js.map +1 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts +7 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.js +31 -1
- package/lib/__test-utils__/FakeCubeEngine.js.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts +41 -0
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeIngestCatalog.js +123 -0
- package/lib/__test-utils__/FakeCubeIngestCatalog.js.map +1 -0
- package/lib/__test-utils__/FakeCubeProjectCatalog.d.ts +30 -0
- package/lib/__test-utils__/FakeCubeProjectCatalog.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeProjectCatalog.js +64 -0
- package/lib/__test-utils__/FakeCubeProjectCatalog.js.map +1 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.d.ts +26 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.js +40 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.js.map +1 -0
- package/lib/components/CubeAddItems.d.ts +35 -0
- package/lib/components/CubeAddItems.d.ts.map +1 -0
- package/lib/components/CubeAddItems.js +85 -0
- package/lib/components/CubeAddItems.js.map +1 -0
- package/lib/components/CubeDialogTheme.d.ts +25 -0
- package/lib/components/CubeDialogTheme.d.ts.map +1 -0
- package/lib/components/CubeDialogTheme.js +25 -0
- package/lib/components/CubeDialogTheme.js.map +1 -0
- package/lib/components/CubeEditor.d.ts +17 -2
- package/lib/components/CubeEditor.d.ts.map +1 -1
- package/lib/components/CubeEditor.js +39 -17
- package/lib/components/CubeEditor.js.map +1 -1
- package/lib/components/CubeEntrySourceBanner.d.ts +23 -0
- package/lib/components/CubeEntrySourceBanner.d.ts.map +1 -0
- package/lib/components/CubeEntrySourceBanner.js +32 -0
- package/lib/components/CubeEntrySourceBanner.js.map +1 -0
- package/lib/components/CubeFileMenu.d.ts +28 -0
- package/lib/components/CubeFileMenu.d.ts.map +1 -0
- package/lib/components/CubeFileMenu.js +77 -0
- package/lib/components/CubeFileMenu.js.map +1 -0
- package/lib/components/CubeLambdaImportBanner.d.ts +26 -0
- package/lib/components/CubeLambdaImportBanner.d.ts.map +1 -0
- package/lib/components/CubeLambdaImportBanner.js +47 -0
- package/lib/components/CubeLambdaImportBanner.js.map +1 -0
- package/lib/components/CubeNodeIcon.d.ts.map +1 -1
- package/lib/components/CubeNodeIcon.js +12 -1
- package/lib/components/CubeNodeIcon.js.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.d.ts +21 -0
- package/lib/components/CubeSchemaColumnsTable.d.ts.map +1 -0
- package/lib/components/CubeSchemaColumnsTable.js +6 -0
- package/lib/components/CubeSchemaColumnsTable.js.map +1 -0
- package/lib/components/canvas/CubeCanvas.d.ts +4 -3
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvas.js +68 -16
- package/lib/components/canvas/CubeCanvas.js.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts +8 -4
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.js +20 -9
- package/lib/components/canvas/CubeCanvasContextMenu.js.map +1 -1
- package/lib/components/canvas/CubeCanvasDnd.d.ts +7 -5
- package/lib/components/canvas/CubeCanvasDnd.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasDnd.js +14 -9
- package/lib/components/canvas/CubeCanvasDnd.js.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts +18 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.js +63 -5
- package/lib/components/canvas/CubeCanvasElements.js.map +1 -1
- package/lib/components/canvas/CubeCanvasLayout.js +1 -1
- package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.js +35 -21
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
- package/lib/components/canvas/CubeCanvasNodeFocus.d.ts +22 -0
- package/lib/components/canvas/CubeCanvasNodeFocus.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasNodeFocus.js +31 -0
- package/lib/components/canvas/CubeCanvasNodeFocus.js.map +1 -0
- package/lib/components/canvas/CubeNodeEditorAnchor.d.ts +44 -0
- package/lib/components/canvas/CubeNodeEditorAnchor.d.ts.map +1 -0
- package/lib/components/canvas/CubeNodeEditorAnchor.js +51 -0
- package/lib/components/canvas/CubeNodeEditorAnchor.js.map +1 -0
- package/lib/components/dev-settings/CubeDevSettings.d.ts +35 -0
- package/lib/components/dev-settings/CubeDevSettings.d.ts.map +1 -0
- package/lib/components/dev-settings/CubeDevSettings.js +50 -0
- package/lib/components/dev-settings/CubeDevSettings.js.map +1 -0
- package/lib/components/editors/CubeAggregationRowEditor.d.ts +48 -0
- package/lib/components/editors/CubeAggregationRowEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeAggregationRowEditor.js +72 -0
- package/lib/components/editors/CubeAggregationRowEditor.js.map +1 -0
- package/lib/components/editors/CubeColumnChecklist.d.ts +42 -0
- package/lib/components/editors/CubeColumnChecklist.d.ts.map +1 -0
- package/lib/components/editors/CubeColumnChecklist.js +41 -0
- package/lib/components/editors/CubeColumnChecklist.js.map +1 -0
- package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnPicker.js +3 -3
- package/lib/components/editors/CubeColumnPicker.js.map +1 -1
- package/lib/components/editors/CubeConcatEditor.d.ts +33 -0
- package/lib/components/editors/CubeConcatEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeConcatEditor.js +147 -0
- package/lib/components/editors/CubeConcatEditor.js.map +1 -0
- package/lib/components/editors/CubeDataProductSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeDataProductSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeDataProductSourceEditor.js +53 -0
- package/lib/components/editors/CubeDataProductSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeDifferenceEditor.d.ts +25 -0
- package/lib/components/editors/CubeDifferenceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeDifferenceEditor.js +29 -0
- package/lib/components/editors/CubeDifferenceEditor.js.map +1 -0
- package/lib/components/editors/CubeExpressionFilterEditor.d.ts +25 -0
- package/lib/components/editors/CubeExpressionFilterEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js +83 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js.map +1 -0
- package/lib/components/editors/CubeExtendEditor.d.ts +27 -0
- package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeExtendEditor.js +86 -0
- package/lib/components/editors/CubeExtendEditor.js.map +1 -0
- package/lib/components/editors/CubeFilterEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeFilterEditor.js +15 -4
- package/lib/components/editors/CubeFilterEditor.js.map +1 -1
- package/lib/components/editors/CubeFunctionSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeFunctionSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeFunctionSourceEditor.js +55 -0
- package/lib/components/editors/CubeFunctionSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeGroupEditor.d.ts +28 -0
- package/lib/components/editors/CubeGroupEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeGroupEditor.js +70 -0
- package/lib/components/editors/CubeGroupEditor.js.map +1 -0
- package/lib/components/editors/CubeIngestSourceEditor.d.ts +26 -0
- package/lib/components/editors/CubeIngestSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeIngestSourceEditor.js +47 -0
- package/lib/components/editors/CubeIngestSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeJoinEditor.d.ts +2 -4
- package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeJoinEditor.js +21 -39
- package/lib/components/editors/CubeJoinEditor.js.map +1 -1
- package/lib/components/editors/CubeJoinKeyRows.d.ts +34 -0
- package/lib/components/editors/CubeJoinKeyRows.d.ts.map +1 -0
- package/lib/components/editors/CubeJoinKeyRows.js +65 -0
- package/lib/components/editors/CubeJoinKeyRows.js.map +1 -0
- package/lib/components/editors/CubeNodeEditorPanel.d.ts +7 -5
- package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.js +64 -16
- package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts +44 -0
- package/lib/components/editors/CubeNodeEditorPopper.d.ts.map +1 -0
- package/lib/components/editors/CubeNodeEditorPopper.js +133 -0
- package/lib/components/editors/CubeNodeEditorPopper.js.map +1 -0
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js +23 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
- package/lib/components/editors/CubePartitionEditor.d.ts +30 -0
- package/lib/components/editors/CubePartitionEditor.d.ts.map +1 -0
- package/lib/components/editors/CubePartitionEditor.js +93 -0
- package/lib/components/editors/CubePartitionEditor.js.map +1 -0
- package/lib/components/editors/CubePivotEditor.d.ts +26 -0
- package/lib/components/editors/CubePivotEditor.d.ts.map +1 -0
- package/lib/components/editors/CubePivotEditor.js +93 -0
- package/lib/components/editors/CubePivotEditor.js.map +1 -0
- package/lib/components/editors/CubeRenameEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeRenameEditor.js +6 -4
- package/lib/components/editors/CubeRenameEditor.js.map +1 -1
- package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeRestrictEditor.js +2 -2
- package/lib/components/editors/CubeRestrictEditor.js.map +1 -1
- package/lib/components/editors/CubeServiceSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeServiceSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeServiceSourceEditor.js +41 -0
- package/lib/components/editors/CubeServiceSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeSortEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeSortEditor.js +10 -37
- package/lib/components/editors/CubeSortEditor.js.map +1 -1
- package/lib/components/editors/CubeSortRowEditor.d.ts +47 -0
- package/lib/components/editors/CubeSortRowEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeSortRowEditor.js +62 -0
- package/lib/components/editors/CubeSortRowEditor.js.map +1 -0
- package/lib/components/editors/CubeSourceEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeSourceEditor.js +18 -5
- package/lib/components/editors/CubeSourceEditor.js.map +1 -1
- package/lib/components/editors/CubeWarehouseControl.d.ts +30 -0
- package/lib/components/editors/CubeWarehouseControl.d.ts.map +1 -0
- package/lib/components/editors/CubeWarehouseControl.js +44 -0
- package/lib/components/editors/CubeWarehouseControl.js.map +1 -0
- package/lib/components/editors/useCubeNodeEditorDismiss.d.ts +31 -0
- package/lib/components/editors/useCubeNodeEditorDismiss.d.ts.map +1 -0
- package/lib/components/editors/useCubeNodeEditorDismiss.js +83 -0
- package/lib/components/editors/useCubeNodeEditorDismiss.js.map +1 -0
- package/lib/components/examples/CubeExamplesDialog.d.ts +26 -0
- package/lib/components/examples/CubeExamplesDialog.d.ts.map +1 -0
- package/lib/components/examples/CubeExamplesDialog.js +68 -0
- package/lib/components/examples/CubeExamplesDialog.js.map +1 -0
- package/lib/components/grid/CubeColumnFormatDialog.d.ts +28 -0
- package/lib/components/grid/CubeColumnFormatDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeColumnFormatDialog.js +94 -0
- package/lib/components/grid/CubeColumnFormatDialog.js.map +1 -0
- package/lib/components/grid/CubeDrilldownBar.d.ts +37 -0
- package/lib/components/grid/CubeDrilldownBar.d.ts.map +1 -0
- package/lib/components/grid/CubeDrilldownBar.js +77 -0
- package/lib/components/grid/CubeDrilldownBar.js.map +1 -0
- package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
- package/lib/components/grid/CubeGridRegion.js +56 -31
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeGridValues.d.ts +47 -1
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
- package/lib/components/grid/CubeGridValues.js +152 -1
- package/lib/components/grid/CubeGridValues.js.map +1 -1
- package/lib/components/grid/CubeResultGrid.d.ts +68 -5
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeResultGrid.js +316 -31
- package/lib/components/grid/CubeResultGrid.js.map +1 -1
- package/lib/components/grid/CubeRunStatsPanel.d.ts +28 -0
- package/lib/components/grid/CubeRunStatsPanel.d.ts.map +1 -0
- package/lib/components/grid/CubeRunStatsPanel.js +61 -0
- package/lib/components/grid/CubeRunStatsPanel.js.map +1 -0
- package/lib/components/grid/CubeServerSideGrid.d.ts +36 -0
- package/lib/components/grid/CubeServerSideGrid.d.ts.map +1 -0
- package/lib/components/grid/CubeServerSideGrid.js +114 -0
- package/lib/components/grid/CubeServerSideGrid.js.map +1 -0
- package/lib/components/grid/CubeSqlDialog.d.ts +24 -0
- package/lib/components/grid/CubeSqlDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeSqlDialog.js +39 -0
- package/lib/components/grid/CubeSqlDialog.js.map +1 -0
- package/lib/components/grid/CubeSqlFormat.d.ts +20 -0
- package/lib/components/grid/CubeSqlFormat.d.ts.map +1 -0
- package/lib/components/grid/CubeSqlFormat.js +32 -0
- package/lib/components/grid/CubeSqlFormat.js.map +1 -0
- package/lib/components/palette/CubePalette.d.ts.map +1 -1
- package/lib/components/palette/CubePalette.js +44 -14
- package/lib/components/palette/CubePalette.js.map +1 -1
- package/lib/components/show-pure/CubeShowPureDialog.d.ts +4 -1
- package/lib/components/show-pure/CubeShowPureDialog.d.ts.map +1 -1
- package/lib/components/show-pure/CubeShowPureDialog.js +8 -4
- package/lib/components/show-pure/CubeShowPureDialog.js.map +1 -1
- package/lib/components/source-picker/CubeDataProductTab.d.ts +27 -0
- package/lib/components/source-picker/CubeDataProductTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeDataProductTab.js +123 -0
- package/lib/components/source-picker/CubeDataProductTab.js.map +1 -0
- package/lib/components/source-picker/CubeDirectConnectionTab.d.ts +27 -0
- package/lib/components/source-picker/CubeDirectConnectionTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeDirectConnectionTab.js +89 -0
- package/lib/components/source-picker/CubeDirectConnectionTab.js.map +1 -0
- package/lib/components/source-picker/CubeFunctionSteps.d.ts +36 -0
- package/lib/components/source-picker/CubeFunctionSteps.d.ts.map +1 -0
- package/lib/components/source-picker/CubeFunctionSteps.js +76 -0
- package/lib/components/source-picker/CubeFunctionSteps.js.map +1 -0
- package/lib/components/source-picker/CubeIngestTab.d.ts +28 -0
- package/lib/components/source-picker/CubeIngestTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeIngestTab.js +89 -0
- package/lib/components/source-picker/CubeIngestTab.js.map +1 -0
- package/lib/components/source-picker/CubeInlineModelTab.d.ts +38 -0
- package/lib/components/source-picker/CubeInlineModelTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeInlineModelTab.js +81 -0
- package/lib/components/source-picker/CubeInlineModelTab.js.map +1 -0
- package/lib/components/source-picker/CubePickerListItem.d.ts +47 -0
- package/lib/components/source-picker/CubePickerListItem.d.ts.map +1 -0
- package/lib/components/source-picker/CubePickerListItem.js +62 -0
- package/lib/components/source-picker/CubePickerListItem.js.map +1 -0
- package/lib/components/source-picker/CubePickerStep.d.ts +27 -0
- package/lib/components/source-picker/CubePickerStep.d.ts.map +1 -0
- package/lib/components/source-picker/CubePickerStep.js +23 -0
- package/lib/components/source-picker/CubePickerStep.js.map +1 -0
- package/lib/components/source-picker/CubeProjectTab.d.ts +28 -0
- package/lib/components/source-picker/CubeProjectTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeProjectTab.js +53 -0
- package/lib/components/source-picker/CubeProjectTab.js.map +1 -0
- package/lib/components/source-picker/CubeServiceTab.d.ts +27 -0
- package/lib/components/source-picker/CubeServiceTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeServiceTab.js +36 -0
- package/lib/components/source-picker/CubeServiceTab.js.map +1 -0
- package/lib/components/source-picker/CubeSourcePicker.d.ts +6 -0
- package/lib/components/source-picker/CubeSourcePicker.d.ts.map +1 -1
- package/lib/components/source-picker/CubeSourcePicker.js +33 -58
- package/lib/components/source-picker/CubeSourcePicker.js.map +1 -1
- package/lib/components/source-picker/CubeTablePreview.d.ts +29 -0
- package/lib/components/source-picker/CubeTablePreview.d.ts.map +1 -0
- package/lib/components/source-picker/CubeTablePreview.js +10 -0
- package/lib/components/source-picker/CubeTablePreview.js.map +1 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.d.ts +27 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.d.ts.map +1 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.js +38 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.js.map +1 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts.map +1 -1
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js +9 -3
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js.map +1 -1
- package/lib/graph-manager/CubeConnectionExplorer.d.ts +90 -0
- package/lib/graph-manager/CubeConnectionExplorer.d.ts.map +1 -0
- package/lib/graph-manager/CubeConnectionExplorer.js +34 -0
- package/lib/graph-manager/CubeConnectionExplorer.js.map +1 -0
- package/lib/graph-manager/CubeDataProduct.d.ts +66 -0
- package/lib/graph-manager/CubeDataProduct.d.ts.map +1 -0
- package/lib/graph-manager/CubeDataProduct.js +102 -0
- package/lib/graph-manager/CubeDataProduct.js.map +1 -0
- package/lib/graph-manager/CubeDataProductCatalog.d.ts +177 -0
- package/lib/graph-manager/CubeDataProductCatalog.d.ts.map +1 -0
- package/lib/graph-manager/CubeDataProductCatalog.js +116 -0
- package/lib/graph-manager/CubeDataProductCatalog.js.map +1 -0
- package/lib/graph-manager/CubeDirectConnection.d.ts +38 -0
- package/lib/graph-manager/CubeDirectConnection.d.ts.map +1 -0
- package/lib/graph-manager/CubeDirectConnection.js +48 -0
- package/lib/graph-manager/CubeDirectConnection.js.map +1 -0
- package/lib/graph-manager/CubeEngine.d.ts +83 -3
- package/lib/graph-manager/CubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/CubeEngine.js +4 -1
- package/lib/graph-manager/CubeEngine.js.map +1 -1
- package/lib/graph-manager/CubeEngineClientSettings.d.ts +43 -0
- package/lib/graph-manager/CubeEngineClientSettings.d.ts.map +1 -0
- package/lib/graph-manager/CubeEngineClientSettings.js +51 -0
- package/lib/graph-manager/CubeEngineClientSettings.js.map +1 -0
- package/lib/graph-manager/CubeIngest.d.ts +55 -0
- package/lib/graph-manager/CubeIngest.d.ts.map +1 -0
- package/lib/graph-manager/CubeIngest.js +98 -0
- package/lib/graph-manager/CubeIngest.js.map +1 -0
- package/lib/graph-manager/CubeIngestCatalog.d.ts +142 -0
- package/lib/graph-manager/CubeIngestCatalog.d.ts.map +1 -0
- package/lib/graph-manager/CubeIngestCatalog.js +86 -0
- package/lib/graph-manager/CubeIngestCatalog.js.map +1 -0
- package/lib/graph-manager/CubeLakehouseEnvironment.d.ts +26 -0
- package/lib/graph-manager/CubeLakehouseEnvironment.d.ts.map +1 -0
- package/lib/graph-manager/CubeLakehouseEnvironment.js +17 -0
- package/lib/graph-manager/CubeLakehouseEnvironment.js.map +1 -0
- package/lib/graph-manager/CubeLakehouseRuntime.d.ts +29 -0
- package/lib/graph-manager/CubeLakehouseRuntime.d.ts.map +1 -0
- package/lib/graph-manager/CubeLakehouseRuntime.js +40 -0
- package/lib/graph-manager/CubeLakehouseRuntime.js.map +1 -0
- package/lib/graph-manager/CubeProject.d.ts +41 -0
- package/lib/graph-manager/CubeProject.d.ts.map +1 -0
- package/lib/graph-manager/CubeProject.js +84 -0
- package/lib/graph-manager/CubeProject.js.map +1 -0
- package/lib/graph-manager/CubeProjectCatalog.d.ts +35 -0
- package/lib/graph-manager/CubeProjectCatalog.d.ts.map +1 -0
- package/lib/graph-manager/CubeProjectCatalog.js +17 -0
- package/lib/graph-manager/CubeProjectCatalog.js.map +1 -0
- package/lib/graph-manager/CubeService.d.ts +20 -0
- package/lib/graph-manager/CubeService.d.ts.map +1 -0
- package/lib/graph-manager/CubeService.js +22 -0
- package/lib/graph-manager/CubeService.js.map +1 -0
- package/lib/graph-manager/CubeServiceCatalog.d.ts +31 -0
- package/lib/graph-manager/CubeServiceCatalog.d.ts.map +1 -0
- package/lib/graph-manager/CubeServiceCatalog.js +17 -0
- package/lib/graph-manager/CubeServiceCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts +111 -2
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js +108 -1
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductArtifact.d.ts +44 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductArtifact.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductArtifact.js +192 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductArtifact.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts +32 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js +88 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectConnection.d.ts +41 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectConnection.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectConnection.js +246 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectConnection.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectModel.d.ts +43 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectModel.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectModel.js +112 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDirectModel.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.js +30 -4
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExpression.d.ts +23 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExpression.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExpression.js +68 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExpression.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.d.ts +30 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.js +229 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.d.ts +30 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js +149 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts +57 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js +120 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLakehouseEnvironmentResolver.d.ts +33 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLakehouseEnvironmentResolver.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLakehouseEnvironmentResolver.js +94 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLakehouseEnvironmentResolver.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.d.ts +34 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.js +332 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js +111 -13
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +3 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeSchemaExploration.d.ts +67 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeSchemaExploration.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeSchemaExploration.js +238 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeSchemaExploration.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts +35 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js +65 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeDataProductCatalog.d.ts +104 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeDataProductCatalog.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeDataProductCatalog.js +484 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeDataProductCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts +115 -3
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js +654 -21
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeIngestCatalog.d.ts +69 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeIngestCatalog.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeIngestCatalog.js +270 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeIngestCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.d.ts +35 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js +94 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.d.ts +31 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.js +69 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeConnectionExplorerTestUtils.d.ts +25 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeConnectionExplorerTestUtils.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeConnectionExplorerTestUtils.js +47 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeConnectionExplorerTestUtils.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductFixtures.d.ts +28 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductFixtures.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductFixtures.js +310 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductFixtures.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductSearchFixtures.d.ts +33 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductSearchFixtures.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductSearchFixtures.js +188 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductSearchFixtures.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +33 -3
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +22 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +19 -1
- package/lib/index.js.map +1 -1
- package/lib/stores/CubeAddPlacement.d.ts +39 -0
- package/lib/stores/CubeAddPlacement.d.ts.map +1 -0
- package/lib/stores/CubeAddPlacement.js +51 -0
- package/lib/stores/CubeAddPlacement.js.map +1 -0
- package/lib/stores/CubeDataProductRecheck.d.ts +27 -0
- package/lib/stores/CubeDataProductRecheck.d.ts.map +1 -0
- package/lib/stores/CubeDataProductRecheck.js +54 -0
- package/lib/stores/CubeDataProductRecheck.js.map +1 -0
- package/lib/stores/CubeDataProductRuntimeState.d.ts +88 -0
- package/lib/stores/CubeDataProductRuntimeState.d.ts.map +1 -0
- package/lib/stores/CubeDataProductRuntimeState.js +190 -0
- package/lib/stores/CubeDataProductRuntimeState.js.map +1 -0
- package/lib/stores/CubeDataProductWarehouse.d.ts +19 -0
- package/lib/stores/CubeDataProductWarehouse.d.ts.map +1 -0
- package/lib/stores/CubeDataProductWarehouse.js +25 -0
- package/lib/stores/CubeDataProductWarehouse.js.map +1 -0
- package/lib/stores/CubeDevSettingsState.d.ts +47 -0
- package/lib/stores/CubeDevSettingsState.d.ts.map +1 -0
- package/lib/stores/CubeDevSettingsState.js +99 -0
- package/lib/stores/CubeDevSettingsState.js.map +1 -0
- package/lib/stores/CubeEditorState.d.ts +242 -28
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +751 -66
- package/lib/stores/CubeEditorState.js.map +1 -1
- package/lib/stores/CubeEngineChecks.d.ts +59 -0
- package/lib/stores/CubeEngineChecks.d.ts.map +1 -0
- package/lib/stores/CubeEngineChecks.js +100 -0
- package/lib/stores/CubeEngineChecks.js.map +1 -0
- package/lib/stores/CubeEntrySource.d.ts +78 -0
- package/lib/stores/CubeEntrySource.d.ts.map +1 -0
- package/lib/stores/CubeEntrySource.js +200 -0
- package/lib/stores/CubeEntrySource.js.map +1 -0
- package/lib/stores/CubeExamples.d.ts +43 -0
- package/lib/stores/CubeExamples.d.ts.map +1 -0
- package/lib/stores/CubeExamples.js +333 -0
- package/lib/stores/CubeExamples.js.map +1 -0
- package/lib/stores/CubeExamplesState.d.ts +45 -0
- package/lib/stores/CubeExamplesState.d.ts.map +1 -0
- package/lib/stores/CubeExamplesState.js +81 -0
- package/lib/stores/CubeExamplesState.js.map +1 -0
- package/lib/stores/CubeExecutionState.d.ts +6 -2
- package/lib/stores/CubeExecutionState.d.ts.map +1 -1
- package/lib/stores/CubeExecutionState.js +39 -38
- package/lib/stores/CubeExecutionState.js.map +1 -1
- package/lib/stores/CubeExportState.d.ts +41 -0
- package/lib/stores/CubeExportState.d.ts.map +1 -0
- package/lib/stores/CubeExportState.js +134 -0
- package/lib/stores/CubeExportState.js.map +1 -0
- package/lib/stores/CubeExpressionFilterCheck.d.ts +51 -0
- package/lib/stores/CubeExpressionFilterCheck.d.ts.map +1 -0
- package/lib/stores/CubeExpressionFilterCheck.js +134 -0
- package/lib/stores/CubeExpressionFilterCheck.js.map +1 -0
- package/lib/stores/CubeExtendTyping.d.ts +64 -0
- package/lib/stores/CubeExtendTyping.d.ts.map +1 -0
- package/lib/stores/CubeExtendTyping.js +149 -0
- package/lib/stores/CubeExtendTyping.js.map +1 -0
- package/lib/stores/CubeFunctionRecheck.d.ts +30 -0
- package/lib/stores/CubeFunctionRecheck.d.ts.map +1 -0
- package/lib/stores/CubeFunctionRecheck.js +67 -0
- package/lib/stores/CubeFunctionRecheck.js.map +1 -0
- package/lib/stores/CubeGridFetcher.d.ts +75 -0
- package/lib/stores/CubeGridFetcher.d.ts.map +1 -0
- package/lib/stores/CubeGridFetcher.js +197 -0
- package/lib/stores/CubeGridFetcher.js.map +1 -0
- package/lib/stores/CubeGridQuickActions.d.ts +27 -7
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
- package/lib/stores/CubeGridQuickActions.js +79 -21
- package/lib/stores/CubeGridQuickActions.js.map +1 -1
- package/lib/stores/CubeGridState.d.ts +136 -0
- package/lib/stores/CubeGridState.d.ts.map +1 -0
- package/lib/stores/CubeGridState.js +317 -0
- package/lib/stores/CubeGridState.js.map +1 -0
- package/lib/stores/CubeHost.d.ts +74 -1
- package/lib/stores/CubeHost.d.ts.map +1 -1
- package/lib/stores/CubeHost.js +25 -1
- package/lib/stores/CubeHost.js.map +1 -1
- package/lib/stores/CubeIngestRecheck.d.ts +26 -0
- package/lib/stores/CubeIngestRecheck.d.ts.map +1 -0
- package/lib/stores/CubeIngestRecheck.js +53 -0
- package/lib/stores/CubeIngestRecheck.js.map +1 -0
- package/lib/stores/CubeLambdaImportState.d.ts +118 -0
- package/lib/stores/CubeLambdaImportState.d.ts.map +1 -0
- package/lib/stores/CubeLambdaImportState.js +302 -0
- package/lib/stores/CubeLambdaImportState.js.map +1 -0
- package/lib/stores/CubeLambdaSources.d.ts +45 -0
- package/lib/stores/CubeLambdaSources.d.ts.map +1 -0
- package/lib/stores/CubeLambdaSources.js +261 -0
- package/lib/stores/CubeLambdaSources.js.map +1 -0
- package/lib/stores/CubeNodeEditorState.d.ts +101 -5
- package/lib/stores/CubeNodeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeNodeEditorState.js +221 -10
- package/lib/stores/CubeNodeEditorState.js.map +1 -1
- package/lib/stores/CubeQueryRun.d.ts +59 -0
- package/lib/stores/CubeQueryRun.d.ts.map +1 -0
- package/lib/stores/CubeQueryRun.js +101 -0
- package/lib/stores/CubeQueryRun.js.map +1 -0
- package/lib/stores/CubeRunStatsState.d.ts +61 -0
- package/lib/stores/CubeRunStatsState.d.ts.map +1 -0
- package/lib/stores/CubeRunStatsState.js +54 -0
- package/lib/stores/CubeRunStatsState.js.map +1 -0
- package/lib/stores/CubeRunningStepLambda.d.ts +25 -0
- package/lib/stores/CubeRunningStepLambda.d.ts.map +1 -0
- package/lib/stores/CubeRunningStepLambda.js +45 -0
- package/lib/stores/CubeRunningStepLambda.js.map +1 -0
- package/lib/stores/CubeServiceRecheck.d.ts +29 -0
- package/lib/stores/CubeServiceRecheck.d.ts.map +1 -0
- package/lib/stores/CubeServiceRecheck.js +33 -0
- package/lib/stores/CubeServiceRecheck.js.map +1 -0
- package/lib/stores/CubeShowPureState.d.ts +18 -2
- package/lib/stores/CubeShowPureState.d.ts.map +1 -1
- package/lib/stores/CubeShowPureState.js +46 -13
- package/lib/stores/CubeShowPureState.js.map +1 -1
- package/lib/stores/CubeSourcePickerState.d.ts +70 -65
- package/lib/stores/CubeSourcePickerState.d.ts.map +1 -1
- package/lib/stores/CubeSourcePickerState.js +207 -267
- package/lib/stores/CubeSourcePickerState.js.map +1 -1
- package/lib/stores/CubeSpecTransferState.d.ts +2 -2
- package/lib/stores/CubeSpecTransferState.js +2 -2
- package/lib/stores/LocalModelCatalog.d.ts +2 -0
- package/lib/stores/LocalModelCatalog.d.ts.map +1 -1
- package/lib/stores/LocalModelCatalog.js +19 -3
- package/lib/stores/LocalModelCatalog.js.map +1 -1
- package/lib/stores/editors/CubeAggregationRows.d.ts +80 -0
- package/lib/stores/editors/CubeAggregationRows.d.ts.map +1 -0
- package/lib/stores/editors/CubeAggregationRows.js +164 -0
- package/lib/stores/editors/CubeAggregationRows.js.map +1 -0
- package/lib/stores/editors/CubeConcatDraft.d.ts +30 -0
- package/lib/stores/editors/CubeConcatDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeConcatDraft.js +44 -0
- package/lib/stores/editors/CubeConcatDraft.js.map +1 -0
- package/lib/stores/editors/CubeDifferenceDraft.d.ts +49 -0
- package/lib/stores/editors/CubeDifferenceDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeDifferenceDraft.js +111 -0
- package/lib/stores/editors/CubeDifferenceDraft.js.map +1 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts +91 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js +254 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js.map +1 -0
- package/lib/stores/editors/CubeExtendDraft.d.ts +110 -0
- package/lib/stores/editors/CubeExtendDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeExtendDraft.js +359 -0
- package/lib/stores/editors/CubeExtendDraft.js.map +1 -0
- package/lib/stores/editors/CubeFunctionDraft.d.ts +34 -0
- package/lib/stores/editors/CubeFunctionDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeFunctionDraft.js +69 -0
- package/lib/stores/editors/CubeFunctionDraft.js.map +1 -0
- package/lib/stores/editors/CubeGroupDraft.d.ts +61 -0
- package/lib/stores/editors/CubeGroupDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeGroupDraft.js +106 -0
- package/lib/stores/editors/CubeGroupDraft.js.map +1 -0
- package/lib/stores/editors/CubeJoinDraft.d.ts +9 -10
- package/lib/stores/editors/CubeJoinDraft.d.ts.map +1 -1
- package/lib/stores/editors/CubeJoinDraft.js +92 -21
- package/lib/stores/editors/CubeJoinDraft.js.map +1 -1
- package/lib/stores/editors/CubeJoinKeyPairs.d.ts +38 -0
- package/lib/stores/editors/CubeJoinKeyPairs.d.ts.map +1 -0
- package/lib/stores/editors/CubeJoinKeyPairs.js +33 -0
- package/lib/stores/editors/CubeJoinKeyPairs.js.map +1 -0
- package/lib/stores/editors/CubeNodeDraft.d.ts +20 -6
- package/lib/stores/editors/CubeNodeDraft.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraft.js +23 -5
- package/lib/stores/editors/CubeNodeDraft.js.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +4 -2
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js +39 -3
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
- package/lib/stores/editors/CubePartitionDraft.d.ts +70 -0
- package/lib/stores/editors/CubePartitionDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubePartitionDraft.js +154 -0
- package/lib/stores/editors/CubePartitionDraft.js.map +1 -0
- package/lib/stores/editors/CubePivotDraft.d.ts +93 -0
- package/lib/stores/editors/CubePivotDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubePivotDraft.js +267 -0
- package/lib/stores/editors/CubePivotDraft.js.map +1 -0
- package/lib/stores/editors/CubeSortDraft.d.ts +2 -10
- package/lib/stores/editors/CubeSortDraft.d.ts.map +1 -1
- package/lib/stores/editors/CubeSortDraft.js +9 -35
- package/lib/stores/editors/CubeSortDraft.js.map +1 -1
- package/lib/stores/editors/CubeSortRows.d.ts +34 -0
- package/lib/stores/editors/CubeSortRows.d.ts.map +1 -0
- package/lib/stores/editors/CubeSortRows.js +50 -0
- package/lib/stores/editors/CubeSortRows.js.map +1 -0
- package/lib/stores/fixtures/CubeNorthwindModel.d.ts +7 -0
- package/lib/stores/fixtures/CubeNorthwindModel.d.ts.map +1 -1
- package/lib/stores/fixtures/CubeNorthwindModel.js +99 -87
- package/lib/stores/fixtures/CubeNorthwindModel.js.map +1 -1
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts +26 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js +46 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js.map +1 -0
- package/lib/stores/fixtures/CubeSampleSql.d.ts +34 -0
- package/lib/stores/fixtures/CubeSampleSql.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeSampleSql.js +64 -0
- package/lib/stores/fixtures/CubeSampleSql.js.map +1 -0
- package/lib/stores/fixtures/CubeSportsModel.d.ts +27 -0
- package/lib/stores/fixtures/CubeSportsModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeSportsModel.js +158 -0
- package/lib/stores/fixtures/CubeSportsModel.js.map +1 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts +33 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeTradesModel.js +227 -0
- package/lib/stores/fixtures/CubeTradesModel.js.map +1 -0
- package/lib/stores/source-picker/CubeCsvSetupSql.d.ts +71 -0
- package/lib/stores/source-picker/CubeCsvSetupSql.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeCsvSetupSql.js +392 -0
- package/lib/stores/source-picker/CubeCsvSetupSql.js.map +1 -0
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts +215 -0
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeDataProductTabState.js +766 -0
- package/lib/stores/source-picker/CubeDataProductTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts +163 -0
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js +668 -0
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeIngestTabState.d.ts +127 -0
- package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeIngestTabState.js +510 -0
- package/lib/stores/source-picker/CubeIngestTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts +203 -0
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeInlineModelTabState.js +734 -0
- package/lib/stores/source-picker/CubeInlineModelTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeProjectTabState.d.ts +77 -0
- package/lib/stores/source-picker/CubeProjectTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeProjectTabState.js +206 -0
- package/lib/stores/source-picker/CubeProjectTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeServiceTabState.d.ts +74 -0
- package/lib/stores/source-picker/CubeServiceTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeServiceTabState.js +216 -0
- package/lib/stores/source-picker/CubeServiceTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts +60 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.js +45 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.js.map +1 -0
- package/package.json +12 -7
- package/src/__lib__/LegendCubeCommand.ts +12 -0
- package/src/__lib__/LegendCubeDataProductLabels.ts +91 -0
- package/src/__lib__/LegendCubeDirectConnectionLabels.ts +111 -0
- package/src/__lib__/LegendCubeFunctionLabels.ts +41 -0
- package/src/__lib__/LegendCubeHelpText.ts +48 -2
- package/src/__lib__/LegendCubeIngestLabels.ts +40 -0
- package/src/__lib__/LegendCubeLabels.ts +327 -12
- package/src/__lib__/LegendCubeProjectLabels.ts +25 -0
- package/src/__lib__/LegendCubeProjectSourceLabels.ts +26 -0
- package/src/__lib__/LegendCubeServiceLabels.ts +41 -0
- package/src/__lib__/LegendCubeTesting.ts +8 -0
- package/src/__test-utils__/CubeCanvasTestUtils.ts +1 -1
- package/src/__test-utils__/CubeConnectionTestSupport.ts +45 -0
- package/src/__test-utils__/CubeDirectConnectionFixtures.ts +70 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +40 -1
- package/src/__test-utils__/CubeExpressionTestUtils.ts +146 -0
- package/src/__test-utils__/CubeFunctionTestOutline.ts +78 -0
- package/src/__test-utils__/CubeLambdaCorpus.ts +137 -0
- package/src/__test-utils__/CubeOperationsTestUtils.ts +93 -18
- package/src/__test-utils__/CubePageTestUtils.tsx +69 -0
- package/src/__test-utils__/CubeTestApplication.ts +46 -2
- package/src/__test-utils__/FakeCubeConnectionExplorer.ts +111 -0
- package/src/__test-utils__/FakeCubeDataProductCatalog.ts +227 -0
- package/src/__test-utils__/FakeCubeEngine.ts +52 -1
- package/src/__test-utils__/FakeCubeIngestCatalog.ts +198 -0
- package/src/__test-utils__/FakeCubeProjectCatalog.ts +89 -0
- package/src/__test-utils__/FakeCubeServiceCatalog.ts +57 -0
- package/src/components/CubeAddItems.tsx +186 -0
- package/src/components/CubeDialogTheme.ts +25 -0
- package/src/components/CubeEditor.tsx +195 -140
- package/src/components/CubeEntrySourceBanner.tsx +64 -0
- package/src/components/CubeFileMenu.tsx +127 -0
- package/src/components/CubeLambdaImportBanner.tsx +97 -0
- package/src/components/CubeNodeIcon.tsx +20 -0
- package/src/components/CubeSchemaColumnsTable.tsx +54 -0
- package/src/components/canvas/CubeCanvas.tsx +94 -20
- package/src/components/canvas/CubeCanvasContextMenu.tsx +64 -32
- package/src/components/canvas/CubeCanvasDnd.ts +16 -9
- package/src/components/canvas/CubeCanvasElements.ts +84 -5
- package/src/components/canvas/CubeCanvasLayout.ts +1 -1
- package/src/components/canvas/CubeCanvasNode.tsx +88 -43
- package/src/components/canvas/CubeCanvasNodeFocus.ts +37 -0
- package/src/components/canvas/CubeNodeEditorAnchor.ts +82 -0
- package/src/components/dev-settings/CubeDevSettings.tsx +154 -0
- package/src/components/editors/CubeAggregationRowEditor.tsx +224 -0
- package/src/components/editors/CubeColumnChecklist.tsx +136 -0
- package/src/components/editors/CubeColumnPicker.tsx +6 -3
- package/src/components/editors/CubeConcatEditor.tsx +374 -0
- package/src/components/editors/CubeDataProductSourceEditor.tsx +134 -0
- package/src/components/editors/CubeDifferenceEditor.tsx +87 -0
- package/src/components/editors/CubeExpressionFilterEditor.tsx +193 -0
- package/src/components/editors/CubeExtendEditor.tsx +271 -0
- package/src/components/editors/CubeFilterEditor.tsx +20 -1
- package/src/components/editors/CubeFunctionSourceEditor.tsx +140 -0
- package/src/components/editors/CubeGroupEditor.tsx +135 -0
- package/src/components/editors/CubeIngestSourceEditor.tsx +104 -0
- package/src/components/editors/CubeJoinEditor.tsx +34 -135
- package/src/components/editors/CubeJoinKeyRows.tsx +183 -0
- package/src/components/editors/CubeNodeEditorPanel.tsx +111 -36
- package/src/components/editors/CubeNodeEditorPopper.tsx +191 -0
- package/src/components/editors/CubeNodeEditorRegistry.ts +33 -0
- package/src/components/editors/CubePartitionEditor.tsx +208 -0
- package/src/components/editors/CubePivotEditor.tsx +277 -0
- package/src/components/editors/CubeRenameEditor.tsx +10 -5
- package/src/components/editors/CubeRestrictEditor.tsx +9 -3
- package/src/components/editors/CubeServiceSourceEditor.tsx +77 -0
- package/src/components/editors/CubeSortEditor.tsx +20 -142
- package/src/components/editors/CubeSortRowEditor.tsx +176 -0
- package/src/components/editors/CubeSourceEditor.tsx +42 -30
- package/src/components/editors/CubeWarehouseControl.tsx +113 -0
- package/src/components/editors/useCubeNodeEditorDismiss.ts +103 -0
- package/src/components/examples/CubeExamplesDialog.tsx +199 -0
- package/src/components/grid/CubeColumnFormatDialog.tsx +289 -0
- package/src/components/grid/CubeDrilldownBar.tsx +219 -0
- package/src/components/grid/CubeGridRegion.tsx +214 -60
- package/src/components/grid/CubeGridValues.ts +201 -1
- package/src/components/grid/CubeResultGrid.tsx +461 -43
- package/src/components/grid/CubeRunStatsPanel.tsx +156 -0
- package/src/components/grid/CubeServerSideGrid.tsx +200 -0
- package/src/components/grid/CubeSqlDialog.tsx +90 -0
- package/src/components/grid/CubeSqlFormat.ts +37 -0
- package/src/components/palette/CubePalette.tsx +70 -19
- package/src/components/show-pure/CubeShowPureDialog.tsx +19 -5
- package/src/components/source-picker/CubeDataProductTab.tsx +486 -0
- package/src/components/source-picker/CubeDirectConnectionTab.tsx +352 -0
- package/src/components/source-picker/CubeFunctionSteps.tsx +244 -0
- package/src/components/source-picker/CubeIngestTab.tsx +312 -0
- package/src/components/source-picker/CubeInlineModelTab.tsx +220 -0
- package/src/components/source-picker/CubePickerListItem.tsx +118 -0
- package/src/components/source-picker/CubePickerStep.tsx +49 -0
- package/src/components/source-picker/CubeProjectTab.tsx +117 -0
- package/src/components/source-picker/CubeServiceTab.tsx +151 -0
- package/src/components/source-picker/CubeSourcePicker.tsx +99 -228
- package/src/components/source-picker/CubeTablePreview.tsx +49 -0
- package/src/components/spec-transfer/CubeImportPureDialog.tsx +122 -0
- package/src/components/spec-transfer/CubeSpecTransferDialog.tsx +22 -9
- package/src/graph-manager/CubeConnectionExplorer.ts +106 -0
- package/src/graph-manager/CubeDataProduct.ts +150 -0
- package/src/graph-manager/CubeDataProductCatalog.ts +256 -0
- package/src/graph-manager/CubeDirectConnection.ts +67 -0
- package/src/graph-manager/CubeEngine.ts +94 -2
- package/src/graph-manager/CubeEngineClientSettings.ts +64 -0
- package/src/graph-manager/CubeIngest.ts +159 -0
- package/src/graph-manager/CubeIngestCatalog.ts +202 -0
- package/src/graph-manager/CubeLakehouseEnvironment.ts +27 -0
- package/src/graph-manager/CubeLakehouseRuntime.ts +43 -0
- package/src/graph-manager/CubeProject.ts +117 -0
- package/src/graph-manager/CubeProjectCatalog.ts +40 -0
- package/src/graph-manager/CubeService.ts +29 -0
- package/src/graph-manager/CubeServiceCatalog.ts +35 -0
- package/src/graph-manager/protocol/pure/CubeEngineBuilder.ts +256 -2
- package/src/graph-manager/protocol/pure/v1/V1_CubeDataProductArtifact.ts +251 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.ts +107 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeDirectConnection.ts +339 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeDirectModel.ts +151 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.ts +45 -4
- package/src/graph-manager/protocol/pure/v1/V1_CubeExpression.ts +89 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.ts +312 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.ts +227 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestModel.ts +174 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLakehouseEnvironmentResolver.ts +141 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.ts +471 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts +153 -18
- package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +3 -1
- package/src/graph-manager/protocol/pure/v1/V1_CubeSchemaExploration.ts +361 -0
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts +122 -0
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeDataProductCatalog.ts +744 -0
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts +1083 -25
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeIngestCatalog.ts +459 -0
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.ts +152 -0
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.ts +92 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeConnectionExplorerTestUtils.ts +61 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductFixtures.ts +337 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeDataProductSearchFixtures.ts +206 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +48 -2
- package/src/index.ts +52 -2
- package/src/stores/CubeAddPlacement.ts +87 -0
- package/src/stores/CubeDataProductRecheck.ts +93 -0
- package/src/stores/CubeDataProductRuntimeState.ts +256 -0
- package/src/stores/CubeDataProductWarehouse.ts +40 -0
- package/src/stores/CubeDevSettingsState.ts +117 -0
- package/src/stores/CubeEditorState.ts +1030 -92
- package/src/stores/CubeEngineChecks.ts +240 -0
- package/src/stores/CubeEntrySource.ts +278 -0
- package/src/stores/CubeExamples.ts +526 -0
- package/src/stores/CubeExamplesState.ts +110 -0
- package/src/stores/CubeExecutionState.ts +50 -62
- package/src/stores/CubeExportState.ts +196 -0
- package/src/stores/CubeExpressionFilterCheck.ts +218 -0
- package/src/stores/CubeExtendTyping.ts +251 -0
- package/src/stores/CubeFunctionRecheck.ts +97 -0
- package/src/stores/CubeGridFetcher.ts +302 -0
- package/src/stores/CubeGridQuickActions.ts +97 -20
- package/src/stores/CubeGridState.ts +450 -0
- package/src/stores/CubeHost.ts +119 -1
- package/src/stores/CubeIngestRecheck.ts +92 -0
- package/src/stores/CubeLambdaImportState.ts +434 -0
- package/src/stores/CubeLambdaSources.ts +390 -0
- package/src/stores/CubeNodeEditorState.ts +278 -9
- package/src/stores/CubeQueryRun.ts +169 -0
- package/src/stores/CubeRunStatsState.ts +91 -0
- package/src/stores/CubeRunningStepLambda.ts +62 -0
- package/src/stores/CubeServiceRecheck.ts +53 -0
- package/src/stores/CubeShowPureState.ts +57 -15
- package/src/stores/CubeSourcePickerState.ts +231 -325
- package/src/stores/CubeSpecTransferState.ts +2 -2
- package/src/stores/LocalModelCatalog.ts +27 -3
- package/src/stores/editors/CubeAggregationRows.ts +299 -0
- package/src/stores/editors/CubeConcatDraft.ts +49 -0
- package/src/stores/editors/CubeDifferenceDraft.ts +147 -0
- package/src/stores/editors/CubeExpressionFilterDraft.ts +385 -0
- package/src/stores/editors/CubeExtendDraft.ts +532 -0
- package/src/stores/editors/CubeFunctionDraft.ts +92 -0
- package/src/stores/editors/CubeGroupDraft.ts +145 -0
- package/src/stores/editors/CubeJoinDraft.ts +130 -41
- package/src/stores/editors/CubeJoinKeyPairs.ts +68 -0
- package/src/stores/editors/CubeNodeDraft.ts +26 -6
- package/src/stores/editors/CubeNodeDraftRegistry.ts +52 -2
- package/src/stores/editors/CubePartitionDraft.ts +214 -0
- package/src/stores/editors/CubePivotDraft.ts +355 -0
- package/src/stores/editors/CubeSortDraft.ts +17 -54
- package/src/stores/editors/CubeSortRows.ts +84 -0
- package/src/stores/fixtures/CubeNorthwindModel.ts +103 -88
- package/src/stores/fixtures/CubeSalesDuckDbModel.ts +54 -0
- package/src/stores/fixtures/CubeSampleSql.ts +85 -0
- package/src/stores/fixtures/CubeSportsModel.ts +182 -0
- package/src/stores/fixtures/CubeTradesModel.ts +276 -0
- package/src/stores/source-picker/CubeCsvSetupSql.ts +444 -0
- package/src/stores/source-picker/CubeDataProductTabState.ts +966 -0
- package/src/stores/source-picker/CubeDirectConnectionTabState.ts +846 -0
- package/src/stores/source-picker/CubeIngestTabState.ts +625 -0
- package/src/stores/source-picker/CubeInlineModelTabState.ts +928 -0
- package/src/stores/source-picker/CubeProjectTabState.ts +250 -0
- package/src/stores/source-picker/CubeServiceTabState.ts +288 -0
- package/src/stores/source-picker/CubeSourcePickerTab.ts +79 -0
- package/tsconfig.json +139 -0
|
@@ -15,11 +15,17 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
DataProductAccessPointSource,
|
|
19
|
+
IngestDatasetSource,
|
|
18
20
|
buildSchemasAndValidity,
|
|
19
21
|
createNodeRegistry,
|
|
20
22
|
CubeDocument,
|
|
21
23
|
diffSchemas,
|
|
24
|
+
dependsOnDatabaseType,
|
|
22
25
|
findLostSortOrders,
|
|
26
|
+
getDatabaseProblemOfType,
|
|
27
|
+
getDatabaseProblems,
|
|
28
|
+
isTypingError,
|
|
23
29
|
MESSAGE_SORT_COLUMNS_CUT,
|
|
24
30
|
MESSAGE_SORT_COLUMNS_DROPPED,
|
|
25
31
|
MESSAGE_SORT_ORDER_LOST,
|
|
@@ -28,10 +34,18 @@ import {
|
|
|
28
34
|
type Query,
|
|
29
35
|
QueryEmitter,
|
|
30
36
|
type QueryNode,
|
|
37
|
+
type QueryRule,
|
|
31
38
|
RelationalTableSource,
|
|
32
39
|
rereadQueryFilterValues,
|
|
33
40
|
type Schema,
|
|
34
41
|
type SchemaInferenceResult,
|
|
42
|
+
ServiceSource,
|
|
43
|
+
type SourceDefinition,
|
|
44
|
+
foldColumnName,
|
|
45
|
+
FunctionSource,
|
|
46
|
+
copyQueryNode,
|
|
47
|
+
type CubeContext,
|
|
48
|
+
SourceNode,
|
|
35
49
|
} from '@finos/legend-cube';
|
|
36
50
|
import type { CommandRegistrar } from '@finos/legend-application';
|
|
37
51
|
import type { GeneratorFn } from '@finos/legend-shared';
|
|
@@ -40,10 +54,13 @@ import {
|
|
|
40
54
|
computed,
|
|
41
55
|
flow,
|
|
42
56
|
flowResult,
|
|
57
|
+
type IReactionDisposer,
|
|
43
58
|
makeObservable,
|
|
44
59
|
observable,
|
|
60
|
+
reaction,
|
|
45
61
|
} from 'mobx';
|
|
46
62
|
import { LEGEND_CUBE_COMMAND_KEY } from '../__lib__/LegendCubeCommand.js';
|
|
63
|
+
import { LEGEND_CUBE_TEST_ID } from '../__lib__/LegendCubeTesting.js';
|
|
47
64
|
import {
|
|
48
65
|
CUBE_EDITOR_CLOSED_REASON,
|
|
49
66
|
DEFAULT_ROW_LIMIT,
|
|
@@ -52,16 +69,61 @@ import {
|
|
|
52
69
|
LEGEND_CUBE_USER_DATA_KEY,
|
|
53
70
|
MAX_UNDO_STEPS,
|
|
54
71
|
} from '../__lib__/LegendCubeLabels.js';
|
|
72
|
+
import {
|
|
73
|
+
CUBE_DATA_PRODUCT_RECHECK_MESSAGE,
|
|
74
|
+
getAccessPointDriftWarning,
|
|
75
|
+
getAccessPointRecheckWarning,
|
|
76
|
+
} from '../__lib__/LegendCubeDataProductLabels.js';
|
|
77
|
+
import {
|
|
78
|
+
CUBE_INGEST_RECHECK_MESSAGE,
|
|
79
|
+
getDataSetDriftWarning,
|
|
80
|
+
getDataSetRecheckWarning,
|
|
81
|
+
} from '../__lib__/LegendCubeIngestLabels.js';
|
|
82
|
+
import { isCubeDataProductModel } from '../graph-manager/CubeDataProduct.js';
|
|
83
|
+
import { isCubeIngestModel } from '../graph-manager/CubeIngest.js';
|
|
84
|
+
import { isCubeServiceModel } from '../graph-manager/CubeService.js';
|
|
55
85
|
import {
|
|
56
86
|
CubeEngineError,
|
|
57
87
|
CubeEngineErrorKind,
|
|
58
88
|
type CubeModelOutline,
|
|
89
|
+
type NodeId,
|
|
59
90
|
} from '../graph-manager/CubeEngine.js';
|
|
91
|
+
import {
|
|
92
|
+
CUBE_LAKEHOUSE_RUNTIME_KIND,
|
|
93
|
+
getLakehouseDatabaseType,
|
|
94
|
+
} from '../graph-manager/CubeLakehouseRuntime.js';
|
|
60
95
|
import { getDatabaseType } from '../graph-manager/CubeModelOutlineHelper.js';
|
|
96
|
+
import { recheckCubeDataProductSources } from './CubeDataProductRecheck.js';
|
|
97
|
+
import { recheckCubeIngestSources } from './CubeIngestRecheck.js';
|
|
98
|
+
import { recheckCubeServiceSources } from './CubeServiceRecheck.js';
|
|
99
|
+
import {
|
|
100
|
+
CUBE_FUNCTION_MESSAGE,
|
|
101
|
+
getFunctionDriftWarning,
|
|
102
|
+
getFunctionRecheckWarning,
|
|
103
|
+
} from '../__lib__/LegendCubeFunctionLabels.js';
|
|
104
|
+
import { recheckCubeFunctionSources } from './CubeFunctionRecheck.js';
|
|
105
|
+
import { CubeDataProductRuntimeState } from './CubeDataProductRuntimeState.js';
|
|
106
|
+
import { CubeExamplesState } from './CubeExamplesState.js';
|
|
107
|
+
import { CubeExportState } from './CubeExportState.js';
|
|
108
|
+
import { CubeGridFetcher } from './CubeGridFetcher.js';
|
|
109
|
+
import { CubeGridState } from './CubeGridState.js';
|
|
110
|
+
import { CubeDevSettingsState } from './CubeDevSettingsState.js';
|
|
111
|
+
import { CubeRunStatsState } from './CubeRunStatsState.js';
|
|
61
112
|
import { CubeExecutionState } from './CubeExecutionState.js';
|
|
62
|
-
import
|
|
113
|
+
import { CubeExpressionFilterDraft } from './editors/CubeExpressionFilterDraft.js';
|
|
114
|
+
import { CubeExtendDraft } from './editors/CubeExtendDraft.js';
|
|
115
|
+
import {
|
|
116
|
+
buildCubeEngineCheckRequest,
|
|
117
|
+
type CubeEngineCheckedNode,
|
|
118
|
+
createStaleCubeEngineCheckRule,
|
|
119
|
+
getCubeEngineCheckUpstream,
|
|
120
|
+
isCubeEngineCheckedNode,
|
|
121
|
+
} from './CubeEngineChecks.js';
|
|
122
|
+
import { getCubeExtendUpstream } from './CubeExtendTyping.js';
|
|
123
|
+
import { type CubeHost, loadCubeModelOutline } from './CubeHost.js';
|
|
63
124
|
import { CubeNodeEditorState } from './CubeNodeEditorState.js';
|
|
64
125
|
import { CubeShowPureState } from './CubeShowPureState.js';
|
|
126
|
+
import { CubeLambdaImportState } from './CubeLambdaImportState.js';
|
|
65
127
|
import { CubeSourcePickerState } from './CubeSourcePickerState.js';
|
|
66
128
|
import { CubeSpecTransferState } from './CubeSpecTransferState.js';
|
|
67
129
|
|
|
@@ -84,6 +146,20 @@ const isTypingText = (): boolean => {
|
|
|
84
146
|
);
|
|
85
147
|
};
|
|
86
148
|
|
|
149
|
+
/** Focus is in the node editor, whose shortcuts give it back to the node (PLAN §11.8) */
|
|
150
|
+
const isFocusInNodeEditor = (): boolean =>
|
|
151
|
+
document.activeElement?.closest(
|
|
152
|
+
`[data-testid="${LEGEND_CUBE_TEST_ID.NODE_EDITOR}"]`,
|
|
153
|
+
) !== null && document.activeElement !== null;
|
|
154
|
+
|
|
155
|
+
/** A source Cube types again to see drift: a table, a function, an access point, an ingest data set or a service */
|
|
156
|
+
type RecheckedSource =
|
|
157
|
+
| RelationalTableSource
|
|
158
|
+
| FunctionSource
|
|
159
|
+
| DataProductAccessPointSource
|
|
160
|
+
| IngestDatasetSource
|
|
161
|
+
| ServiceSource;
|
|
162
|
+
|
|
87
163
|
/**
|
|
88
164
|
* The state of one Cube page (PLAN §7.8). The document is immutable: every
|
|
89
165
|
* edit makes a new one through `applyDocument`, which keeps the previous one
|
|
@@ -94,15 +170,59 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
94
170
|
readonly host: CubeHost;
|
|
95
171
|
/** One registry for inference, emission and the saved spec */
|
|
96
172
|
readonly registry: NodeRegistry;
|
|
173
|
+
/**
|
|
174
|
+
* The editor's own query rule: an Extend typed, or a Filter by Expression
|
|
175
|
+
* checked, for another input than its own waits to be checked again (PLAN
|
|
176
|
+
* §11.7, §11.11)
|
|
177
|
+
*/
|
|
178
|
+
private readonly staleEngineChecks: QueryRule;
|
|
179
|
+
/**
|
|
180
|
+
* The editor's query rule for the database a node runs on: `%` or `_`
|
|
181
|
+
* given to a pattern on DuckDB (PLAN §11.11), once the model's outline
|
|
182
|
+
* tells the database
|
|
183
|
+
*/
|
|
184
|
+
private readonly databaseRefusals: QueryRule;
|
|
97
185
|
readonly execution: CubeExecutionState;
|
|
186
|
+
/** The latest runs, fetches and exports (spec §12.6) */
|
|
187
|
+
readonly runStats: CubeRunStatsState;
|
|
188
|
+
/** The Dev Settings, at the top left (PLAN §11.16) */
|
|
189
|
+
readonly devSettings: CubeDevSettingsState;
|
|
190
|
+
/** The grid's server-side levels (PLAN §11.10) */
|
|
191
|
+
readonly gridFetcher: CubeGridFetcher;
|
|
192
|
+
/** The grid's mode and its server-side levels (PLAN §11.10) */
|
|
193
|
+
readonly grid: CubeGridState;
|
|
194
|
+
/** The results' export (spec §12.5) */
|
|
195
|
+
readonly export: CubeExportState;
|
|
196
|
+
/** Where a lakehouse cube runs, a data product's or an ingest one's: its class and warehouse */
|
|
197
|
+
readonly dataProductRuntime: CubeDataProductRuntimeState;
|
|
98
198
|
readonly sourcePicker: CubeSourcePickerState;
|
|
99
199
|
readonly specTransfer: CubeSpecTransferState;
|
|
200
|
+
readonly examples: CubeExamplesState;
|
|
100
201
|
readonly showPure: CubeShowPureState;
|
|
202
|
+
/** Import Pure: the lambda the page opened on, read into the cube (PLAN §11.18) */
|
|
203
|
+
readonly lambdaImport: CubeLambdaImportState;
|
|
101
204
|
readonly nodeEditor: CubeNodeEditorState;
|
|
102
205
|
|
|
103
206
|
document: CubeDocument;
|
|
104
207
|
/** Earlier documents, oldest first */
|
|
105
208
|
history: readonly CubeDocument[] = [];
|
|
209
|
+
/**
|
|
210
|
+
* The step copied last, as it was, with the cube's context then, which a
|
|
211
|
+
* pasted source needs; kept for the page, across cubes
|
|
212
|
+
*/
|
|
213
|
+
copiedNode:
|
|
214
|
+
| { readonly node: QueryNode; readonly context: CubeContext | undefined }
|
|
215
|
+
| undefined;
|
|
216
|
+
/**
|
|
217
|
+
* The changes undone, the latest last, to redo; a new change clears them.
|
|
218
|
+
* Each keeps whether it was read-only and whether undoing it left another
|
|
219
|
+
* cube (an import), so a redo restores both
|
|
220
|
+
*/
|
|
221
|
+
redoStack: readonly {
|
|
222
|
+
readonly document: CubeDocument;
|
|
223
|
+
readonly readOnly: boolean;
|
|
224
|
+
readonly opensAnotherCube: boolean;
|
|
225
|
+
}[] = [];
|
|
106
226
|
/** Engine errors by node id: shown with the node's own errors, never part of inference */
|
|
107
227
|
hostIssues: ReadonlyMap<string, CubeHostIssue> = new Map();
|
|
108
228
|
/**
|
|
@@ -111,14 +231,31 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
111
231
|
*/
|
|
112
232
|
warnings: ReadonlyMap<number, readonly string[]> = new Map();
|
|
113
233
|
/**
|
|
114
|
-
* The outline of each model the cube used,
|
|
115
|
-
*
|
|
116
|
-
*
|
|
234
|
+
* The outline of each model the cube used, by the model's JSON
|
|
235
|
+
* (`modelKey`): loaded when the cube reads a table, or an editor or a run
|
|
236
|
+
* needs it, e.g. for the Join's 'type unknown' warning or the database a
|
|
237
|
+
* node runs on (PLAN §11.12); by reference, never observed deeply
|
|
117
238
|
*/
|
|
118
|
-
private modelOutlines: ReadonlyMap<
|
|
119
|
-
|
|
239
|
+
private modelOutlines: ReadonlyMap<string, CubeModelOutline> = new Map();
|
|
240
|
+
/** Each model's key in `modelOutlines`, its JSON, worked out once per model object */
|
|
241
|
+
private readonly modelKeys = new WeakMap<ModelContext, string>();
|
|
242
|
+
/** The outlines on their way, by model key, so a second load waits for the first */
|
|
243
|
+
private readonly loadingOutlines = new Map<
|
|
244
|
+
string,
|
|
245
|
+
Promise<CubeModelOutline>
|
|
246
|
+
>();
|
|
120
247
|
/** Sources sent to the engine to be typed again, until it answers */
|
|
121
248
|
private pendingSources: ReadonlySet<QueryNode> = new Set();
|
|
249
|
+
/** Extends and Filters by Expression sent to the engine to be checked, until it answers (PLAN §11.7, §11.11) */
|
|
250
|
+
private checkingNodes: ReadonlySet<QueryNode> = new Set();
|
|
251
|
+
/** Checks the nodes that wait for the engine, whenever one does (PLAN §11.7 Q4) */
|
|
252
|
+
private readonly rechecking: IReactionDisposer;
|
|
253
|
+
/**
|
|
254
|
+
* Loads the model's outline once the cube reads a table, so the database it
|
|
255
|
+
* runs on is known before any run: some nodes are refused there, or written
|
|
256
|
+
* another way (PLAN §11.4, §11.11, §11.12)
|
|
257
|
+
*/
|
|
258
|
+
private readonly outlineLoading: IReactionDisposer;
|
|
122
259
|
/** The rows a run returns; kept per user, never in the cube */
|
|
123
260
|
rowLimit: number;
|
|
124
261
|
/** The palette shows icons only; kept per user, never in the cube */
|
|
@@ -134,13 +271,23 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
134
271
|
private readonly importedOver = new WeakSet<CubeDocument>();
|
|
135
272
|
|
|
136
273
|
constructor(host: CubeHost, document = new CubeDocument()) {
|
|
137
|
-
makeObservable<
|
|
274
|
+
makeObservable<
|
|
275
|
+
CubeEditorState,
|
|
276
|
+
'pendingSources' | 'modelOutlines' | 'checkingNodes'
|
|
277
|
+
>(this, {
|
|
138
278
|
pendingSources: observable.ref,
|
|
279
|
+
checkingNodes: observable.ref,
|
|
280
|
+
nodesToCheck: computed,
|
|
281
|
+
isCheckingExpressions: computed,
|
|
282
|
+
checkExpressions: flow,
|
|
139
283
|
modelOutlines: observable.ref,
|
|
140
284
|
modelOutline: computed,
|
|
141
285
|
loadModelOutline: flow,
|
|
142
286
|
document: observable.ref,
|
|
143
287
|
history: observable.ref,
|
|
288
|
+
redoStack: observable.ref,
|
|
289
|
+
canRedo: computed,
|
|
290
|
+
redo: action,
|
|
144
291
|
hostIssues: observable.ref,
|
|
145
292
|
warnings: observable.ref,
|
|
146
293
|
derivedWarnings: computed,
|
|
@@ -151,10 +298,17 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
151
298
|
analysis: computed,
|
|
152
299
|
emitter: computed,
|
|
153
300
|
canUndo: computed,
|
|
301
|
+
hasEditsToApply: computed,
|
|
302
|
+
executeEdited: action,
|
|
303
|
+
undoEdited: action,
|
|
304
|
+
redoEdited: action,
|
|
154
305
|
isDialogOpen: computed,
|
|
155
306
|
applyDocument: action,
|
|
156
307
|
undo: action,
|
|
157
308
|
importDocument: action,
|
|
309
|
+
openDocument: action,
|
|
310
|
+
startNewCube: action,
|
|
311
|
+
isEmptyCube: computed,
|
|
158
312
|
reresolveSources: flow,
|
|
159
313
|
refreshSource: flow,
|
|
160
314
|
applyQuery: action,
|
|
@@ -164,15 +318,34 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
164
318
|
addConfiguredNode: action,
|
|
165
319
|
dropNode: action,
|
|
166
320
|
removeNode: action,
|
|
321
|
+
copiedNode: observable.ref,
|
|
322
|
+
canPaste: computed,
|
|
323
|
+
copyNode: action,
|
|
324
|
+
pasteNode: action,
|
|
325
|
+
duplicateNode: action,
|
|
167
326
|
swapInputs: action,
|
|
168
327
|
setShowGraph: action,
|
|
169
328
|
setPaletteCollapsed: action,
|
|
170
329
|
setHostIssue: action,
|
|
171
330
|
clearHostIssues: action,
|
|
172
331
|
setRowLimit: action,
|
|
332
|
+
setColumnWidth: action,
|
|
173
333
|
});
|
|
174
334
|
this.host = host;
|
|
175
335
|
this.registry = createNodeRegistry();
|
|
336
|
+
this.staleEngineChecks = createStaleCubeEngineCheckRule(
|
|
337
|
+
this.registry,
|
|
338
|
+
() => this.document.context?.model,
|
|
339
|
+
);
|
|
340
|
+
this.databaseRefusals = (query) =>
|
|
341
|
+
new Map(
|
|
342
|
+
query.nodes
|
|
343
|
+
.map((node): [string, string[]] => [
|
|
344
|
+
node.id,
|
|
345
|
+
this.getNodeDatabaseProblems(query, node),
|
|
346
|
+
])
|
|
347
|
+
.filter(([, problems]) => problems.length > 0),
|
|
348
|
+
);
|
|
176
349
|
this.document = document;
|
|
177
350
|
const storedLimit = host.applicationStore.userDataService.getNumericValue(
|
|
178
351
|
LEGEND_CUBE_USER_DATA_KEY.ROW_LIMIT,
|
|
@@ -185,18 +358,60 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
185
358
|
LEGEND_CUBE_USER_DATA_KEY.PALETTE_COLLAPSED,
|
|
186
359
|
) ?? false;
|
|
187
360
|
this.execution = new CubeExecutionState(this);
|
|
361
|
+
this.runStats = new CubeRunStatsState();
|
|
362
|
+
this.devSettings = new CubeDevSettingsState(host);
|
|
363
|
+
this.gridFetcher = new CubeGridFetcher(this);
|
|
364
|
+
this.grid = new CubeGridState(this);
|
|
365
|
+
this.export = new CubeExportState(this);
|
|
366
|
+
this.dataProductRuntime = new CubeDataProductRuntimeState(this);
|
|
188
367
|
this.sourcePicker = new CubeSourcePickerState(this);
|
|
189
368
|
this.specTransfer = new CubeSpecTransferState(this);
|
|
369
|
+
this.examples = new CubeExamplesState(this);
|
|
190
370
|
this.showPure = new CubeShowPureState(this);
|
|
371
|
+
this.lambdaImport = new CubeLambdaImportState(this);
|
|
191
372
|
this.nodeEditor = new CubeNodeEditorState(this);
|
|
373
|
+
this.rechecking = reaction(
|
|
374
|
+
() => this.nodesToCheck,
|
|
375
|
+
(waiting) => {
|
|
376
|
+
if (waiting.length) {
|
|
377
|
+
flowResult(this.checkExpressions(waiting)).catch(
|
|
378
|
+
this.host.applicationStore.alertUnhandledError,
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{ fireImmediately: true },
|
|
383
|
+
);
|
|
384
|
+
// the model, while the cube reads a table: another model loads too
|
|
385
|
+
this.outlineLoading = reaction(
|
|
386
|
+
() =>
|
|
387
|
+
this.document.query.nodes.some(
|
|
388
|
+
(node) => node instanceof RelationalTableSource,
|
|
389
|
+
)
|
|
390
|
+
? this.document.context?.model
|
|
391
|
+
: undefined,
|
|
392
|
+
(model) => {
|
|
393
|
+
if (model !== undefined) {
|
|
394
|
+
flowResult(this.loadModelOutline(model)).catch(
|
|
395
|
+
this.host.applicationStore.alertUnhandledError,
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{ fireImmediately: true },
|
|
400
|
+
);
|
|
192
401
|
}
|
|
193
402
|
|
|
194
|
-
/**
|
|
403
|
+
/**
|
|
404
|
+
* Each node's schema and errors, query-level rules included, as the
|
|
405
|
+
* emitter sees them; an Extend or a Filter by Expression checked for
|
|
406
|
+
* another input than its own waiting, and a filter its database would
|
|
407
|
+
* misread refused, which only the editor can tell
|
|
408
|
+
*/
|
|
195
409
|
get analysis(): SchemaInferenceResult {
|
|
196
|
-
return buildSchemasAndValidity(
|
|
197
|
-
this.
|
|
198
|
-
this.
|
|
199
|
-
|
|
410
|
+
return buildSchemasAndValidity(this.document.query, [
|
|
411
|
+
...this.registry.queryRules,
|
|
412
|
+
this.staleEngineChecks,
|
|
413
|
+
this.databaseRefusals,
|
|
414
|
+
]);
|
|
200
415
|
}
|
|
201
416
|
|
|
202
417
|
get emitter(): QueryEmitter {
|
|
@@ -215,6 +430,141 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
215
430
|
return this.pendingSources.has(node);
|
|
216
431
|
}
|
|
217
432
|
|
|
433
|
+
/**
|
|
434
|
+
* The Extends and Filters by Expression of the cube shown that wait for
|
|
435
|
+
* the engine, their input valid, and that aren't being checked (PLAN §11.7,
|
|
436
|
+
* §11.11): new expressions, or an input that changed
|
|
437
|
+
*/
|
|
438
|
+
get nodesToCheck(): readonly CubeEngineCheckedNode[] {
|
|
439
|
+
const { validity } = this.analysis;
|
|
440
|
+
return this.document.query.nodes.filter(
|
|
441
|
+
(node): node is CubeEngineCheckedNode =>
|
|
442
|
+
isCubeEngineCheckedNode(node) &&
|
|
443
|
+
!this.checkingNodes.has(node) &&
|
|
444
|
+
(validity.get(node.id) ?? []).some(isTypingError),
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/** The cube shown has expressions the engine is checking: an Extend's columns, a filter's condition */
|
|
449
|
+
get isCheckingExpressions(): boolean {
|
|
450
|
+
return this.document.query.nodes.some((node) =>
|
|
451
|
+
this.checkingNodes.has(node),
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** The node waits for the engine to check it, or is being checked: an Extend or a Filter by Expression (PLAN §11.7, §11.11) */
|
|
456
|
+
isTypingNode(node: QueryNode): boolean {
|
|
457
|
+
return (
|
|
458
|
+
this.checkingNodes.has(node) ||
|
|
459
|
+
(this.analysis.validity.get(node.id) ?? []).some(isTypingError)
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Checks expressions with the engine, in one call, outside the undo history
|
|
465
|
+
* (PLAN §11.7 Q4, §11.11): an Extend's columns typed, a Filter by
|
|
466
|
+
* Expression's condition checked, each for the input it has now, after its
|
|
467
|
+
* input's relation, as typing types any node. The check goes in place of
|
|
468
|
+
* the very nodes sent, in the cube shown and the undo snapshots that give
|
|
469
|
+
* the engine the same input; one the user changed meanwhile is left to
|
|
470
|
+
* check again. Each check records the input as the engine was given it
|
|
471
|
+
* (`upstream`). A check the engine couldn't give says why; when the engine
|
|
472
|
+
* can't be reached, a check still current for the input is kept, with a
|
|
473
|
+
* warning, as a source's saved columns are.
|
|
474
|
+
*/
|
|
475
|
+
*checkExpressions(
|
|
476
|
+
nodes: readonly CubeEngineCheckedNode[],
|
|
477
|
+
): GeneratorFn<void> {
|
|
478
|
+
const { context, query } = this.document;
|
|
479
|
+
if (!context) {
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
const { schemas } = this.analysis;
|
|
483
|
+
const emitter = new QueryEmitter(query, this.registry);
|
|
484
|
+
const requests = nodes.flatMap((node) => {
|
|
485
|
+
const [inputId] = query.getInputIds(node.id);
|
|
486
|
+
const input = inputId === undefined ? undefined : schemas.get(inputId);
|
|
487
|
+
if (
|
|
488
|
+
query.getNode(node.id) !== node ||
|
|
489
|
+
this.checkingNodes.has(node) ||
|
|
490
|
+
!input
|
|
491
|
+
) {
|
|
492
|
+
return [];
|
|
493
|
+
}
|
|
494
|
+
const request = buildCubeEngineCheckRequest(
|
|
495
|
+
query,
|
|
496
|
+
node,
|
|
497
|
+
input,
|
|
498
|
+
getCubeExtendUpstream(emitter, node.id, context.model),
|
|
499
|
+
this.registry,
|
|
500
|
+
);
|
|
501
|
+
return request ? [request] : [];
|
|
502
|
+
});
|
|
503
|
+
if (!requests.length) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
const sent: readonly QueryNode[] = requests.map(({ node }) => node);
|
|
507
|
+
this.checkingNodes = new Set([...this.checkingNodes, ...sent]);
|
|
508
|
+
let answers: ReadonlyMap<NodeId, Schema | CubeEngineError>;
|
|
509
|
+
try {
|
|
510
|
+
answers = (yield this.host.engine.typeLambdas(
|
|
511
|
+
context.model,
|
|
512
|
+
new Map(requests.flatMap(({ lambdas }) => [...lambdas])),
|
|
513
|
+
)) as ReadonlyMap<NodeId, Schema | CubeEngineError>;
|
|
514
|
+
} catch (error) {
|
|
515
|
+
const failure =
|
|
516
|
+
error instanceof CubeEngineError
|
|
517
|
+
? error
|
|
518
|
+
: new CubeEngineError(
|
|
519
|
+
CubeEngineErrorKind.NETWORK,
|
|
520
|
+
error instanceof Error ? error.message : String(error),
|
|
521
|
+
);
|
|
522
|
+
answers = new Map(
|
|
523
|
+
requests.flatMap(({ lambdas }) =>
|
|
524
|
+
[...lambdas.keys()].map((key) => [key, failure] as const),
|
|
525
|
+
),
|
|
526
|
+
);
|
|
527
|
+
} finally {
|
|
528
|
+
this.checkingNodes = new Set(
|
|
529
|
+
[...this.checkingNodes].filter((node) => !sent.includes(node)),
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
// a check that comes back the same leaves its node, and the query, alone
|
|
533
|
+
const warnings = new Map(this.warnings);
|
|
534
|
+
const replacements = new Map<QueryNode, QueryNode>(
|
|
535
|
+
requests.flatMap((request) => {
|
|
536
|
+
const { node } = request;
|
|
537
|
+
const outcome = request.read(answers);
|
|
538
|
+
if (outcome.keptWarning !== undefined) {
|
|
539
|
+
warnings.set(node.key, [outcome.keptWarning]);
|
|
540
|
+
return [];
|
|
541
|
+
}
|
|
542
|
+
warnings.delete(node.key);
|
|
543
|
+
return outcome.node ? [[node, outcome.node] as const] : [];
|
|
544
|
+
}),
|
|
545
|
+
);
|
|
546
|
+
this.warnings = warnings;
|
|
547
|
+
// an undo snapshot whose input differs keeps the check it had
|
|
548
|
+
const emitters = new Map<Query, QueryEmitter>([[query, emitter]]);
|
|
549
|
+
this.replaceOutsideHistory(replacements, (snapshot, resolved) => {
|
|
550
|
+
const upstream = getCubeEngineCheckUpstream(
|
|
551
|
+
resolved as CubeEngineCheckedNode,
|
|
552
|
+
);
|
|
553
|
+
if (upstream === undefined) {
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
let snapshotEmitter = emitters.get(snapshot);
|
|
557
|
+
if (!snapshotEmitter) {
|
|
558
|
+
snapshotEmitter = new QueryEmitter(snapshot, this.registry);
|
|
559
|
+
emitters.set(snapshot, snapshotEmitter);
|
|
560
|
+
}
|
|
561
|
+
return (
|
|
562
|
+
getCubeExtendUpstream(snapshotEmitter, resolved.id, context.model) ===
|
|
563
|
+
upstream
|
|
564
|
+
);
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
|
|
218
568
|
/**
|
|
219
569
|
* Warnings worked out from the query, by node id: a Sort whose order is
|
|
220
570
|
* lost before it is used (PLAN §11.4). Never stored and never errors, so
|
|
@@ -281,17 +631,31 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
281
631
|
return model === undefined ? undefined : this.getModelOutline(model);
|
|
282
632
|
}
|
|
283
633
|
|
|
634
|
+
/**
|
|
635
|
+
* A model's key for its outline: its JSON, so a cube imported on the same
|
|
636
|
+
* model, a new object with the same content, shares the outline loaded
|
|
637
|
+
*/
|
|
638
|
+
private modelKey(model: ModelContext): string {
|
|
639
|
+
let key = this.modelKeys.get(model);
|
|
640
|
+
if (key === undefined) {
|
|
641
|
+
key = JSON.stringify(model);
|
|
642
|
+
this.modelKeys.set(model, key);
|
|
643
|
+
}
|
|
644
|
+
return key;
|
|
645
|
+
}
|
|
646
|
+
|
|
284
647
|
/** The outline of a model, once loaded */
|
|
285
648
|
getModelOutline(model: ModelContext): CubeModelOutline | undefined {
|
|
286
|
-
return this.modelOutlines.get(model);
|
|
649
|
+
return this.modelOutlines.get(this.modelKey(model));
|
|
287
650
|
}
|
|
288
651
|
|
|
289
652
|
/**
|
|
290
653
|
* The database type a run of the query up to the node needs, with the
|
|
291
|
-
* model's runtime (PLAN §11.4)
|
|
292
|
-
* (
|
|
293
|
-
*
|
|
294
|
-
*
|
|
654
|
+
* model's runtime (PLAN §11.4): for a data product or ingest cube, the
|
|
655
|
+
* database its lakehouse runtime routes to (§11.12); else, from the model's
|
|
656
|
+
* outline once it is loaded (`loadModelOutline`), the type of the runtime's
|
|
657
|
+
* connections to the databases the node reads. None without an outline,
|
|
658
|
+
* which writes every operation the native way.
|
|
295
659
|
*/
|
|
296
660
|
getRunDatabaseType(
|
|
297
661
|
query: Query,
|
|
@@ -299,6 +663,9 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
299
663
|
model: ModelContext,
|
|
300
664
|
runtime: string,
|
|
301
665
|
): string | undefined {
|
|
666
|
+
if (isCubeDataProductModel(model) || isCubeIngestModel(model)) {
|
|
667
|
+
return getLakehouseDatabaseType(CUBE_LAKEHOUSE_RUNTIME_KIND);
|
|
668
|
+
}
|
|
302
669
|
const outline = this.getModelOutline(model);
|
|
303
670
|
if (!outline) {
|
|
304
671
|
return undefined;
|
|
@@ -308,6 +675,11 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
308
675
|
const node = query.getNode(id);
|
|
309
676
|
if (node instanceof RelationalTableSource) {
|
|
310
677
|
databases.add(node.database);
|
|
678
|
+
} else if (node instanceof FunctionSource) {
|
|
679
|
+
// a function reads what Cube can't see: any database of the runtime
|
|
680
|
+
outline.runtimes
|
|
681
|
+
.find(({ path }) => path === runtime)
|
|
682
|
+
?.connections?.forEach(({ storePath }) => databases.add(storePath));
|
|
311
683
|
}
|
|
312
684
|
query
|
|
313
685
|
.getInputIds(id)
|
|
@@ -318,30 +690,85 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
318
690
|
}
|
|
319
691
|
|
|
320
692
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
693
|
+
* A node's problems on the database the query up to it runs on, with the
|
|
694
|
+
* cube's runtime (`getRunDatabaseType`): a Pivot where it can't run (PLAN
|
|
695
|
+
* §11.12); a filter giving `%` or `_` to a pattern on DuckDB, which would
|
|
696
|
+
* match them as wildcards (§11.11). None when the database isn't known.
|
|
697
|
+
*/
|
|
698
|
+
getNodeDatabaseProblems(query: Query, node: QueryNode): string[] {
|
|
699
|
+
const { context } = this.document;
|
|
700
|
+
const runtime = context?.runtime;
|
|
701
|
+
if (!context || runtime === undefined || !dependsOnDatabaseType(node)) {
|
|
702
|
+
return [];
|
|
703
|
+
}
|
|
704
|
+
return getDatabaseProblems(
|
|
705
|
+
node,
|
|
706
|
+
this.getRunDatabaseType(query, node.id, context.model, runtime),
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Why a node of the type can't be added after the node, on the database the
|
|
712
|
+
* query up to that node runs on (PLAN §11.12): a Pivot where it can't run.
|
|
713
|
+
* `undefined` when it can, or the database isn't known.
|
|
714
|
+
*/
|
|
715
|
+
getAddDatabaseProblem(
|
|
716
|
+
type: string,
|
|
717
|
+
afterId: string | undefined,
|
|
718
|
+
): string | undefined {
|
|
719
|
+
const { context, query } = this.document;
|
|
720
|
+
const runtime = context?.runtime;
|
|
721
|
+
if (!context || runtime === undefined || afterId === undefined) {
|
|
722
|
+
return undefined;
|
|
723
|
+
}
|
|
724
|
+
return getDatabaseProblemOfType(
|
|
725
|
+
type,
|
|
726
|
+
this.getRunDatabaseType(query, afterId, context.model, runtime),
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Loads the outline of a model, the cube's by default, once per model: a
|
|
732
|
+
* load already on its way is waited for, not started again, e.g. a run's
|
|
733
|
+
* while the cube's opening load is still out. It only adds warnings,
|
|
734
|
+
* database types and a database's refusals (PLAN §11.11, §11.12), so a
|
|
735
|
+
* model that fails to load shows none and runs every operation the native
|
|
736
|
+
* way.
|
|
324
737
|
*/
|
|
325
738
|
*loadModelOutline(
|
|
326
739
|
model: ModelContext | undefined = this.document.context?.model,
|
|
327
740
|
): GeneratorFn<void> {
|
|
328
|
-
if (model === undefined
|
|
741
|
+
if (model === undefined) {
|
|
329
742
|
return;
|
|
330
743
|
}
|
|
744
|
+
const key = this.modelKey(model);
|
|
745
|
+
if (this.modelOutlines.has(key)) {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
let loading = this.loadingOutlines.get(key);
|
|
749
|
+
if (!loading) {
|
|
750
|
+
loading = loadCubeModelOutline(this.host, model);
|
|
751
|
+
this.loadingOutlines.set(key, loading);
|
|
752
|
+
}
|
|
331
753
|
try {
|
|
332
|
-
const outline = (yield
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
754
|
+
const outline = (yield loading) as CubeModelOutline;
|
|
755
|
+
if (!this.modelOutlines.has(key)) {
|
|
756
|
+
this.modelOutlines = new Map([...this.modelOutlines, [key, outline]]);
|
|
757
|
+
}
|
|
336
758
|
} catch {
|
|
337
759
|
// no outline, no warning: nothing is blocked on it
|
|
760
|
+
} finally {
|
|
761
|
+
this.loadingOutlines.delete(key);
|
|
338
762
|
}
|
|
339
763
|
}
|
|
340
764
|
|
|
341
|
-
/** One of Cube's dialogs is open: the source picker, Import or Export, Show Pure */
|
|
765
|
+
/** One of Cube's dialogs is open: the source picker, Examples, the group rows' settings, Import or Export, Show Pure */
|
|
342
766
|
get isDialogOpen(): boolean {
|
|
343
767
|
return (
|
|
344
768
|
this.sourcePicker.isOpen ||
|
|
769
|
+
this.examples.isOpen ||
|
|
770
|
+
this.grid.isSettingsShown ||
|
|
771
|
+
this.grid.formatColumn !== undefined ||
|
|
345
772
|
this.specTransfer.mode !== undefined ||
|
|
346
773
|
this.showPure.isOpen
|
|
347
774
|
);
|
|
@@ -351,27 +778,110 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
351
778
|
* The page's keyboard shortcuts, while it is open (spec §17.12). Each does
|
|
352
779
|
* nothing when its button can't be used, and nothing while a Cube dialog
|
|
353
780
|
* is open, since a dialog doesn't stop the app's shortcuts (user's choice,
|
|
354
|
-
* 2026-10-07)
|
|
781
|
+
* 2026-10-07), or while something opened from the node editor holds it
|
|
782
|
+
* open. Like their buttons, they finish the node editor first (PLAN §11.8):
|
|
783
|
+
* F9 runs the edited query, and Ctrl+Z undoes what finishing applied. Undo
|
|
784
|
+
* leaves Ctrl+Z to a text field that has the focus.
|
|
355
785
|
*/
|
|
356
786
|
registerCommands(): void {
|
|
357
|
-
const { commandService
|
|
787
|
+
const { commandService } = this.host.applicationStore;
|
|
358
788
|
commandService.registerCommand({
|
|
359
789
|
key: LEGEND_CUBE_COMMAND_KEY.EXECUTE,
|
|
360
790
|
trigger: () =>
|
|
361
791
|
!this.isDialogOpen &&
|
|
362
|
-
this.
|
|
363
|
-
!this.execution.isRunning
|
|
792
|
+
!this.nodeEditor.isHeld &&
|
|
793
|
+
!this.execution.isRunning &&
|
|
794
|
+
(this.execution.canExecute || this.hasEditsToApply),
|
|
795
|
+
action: () =>
|
|
796
|
+
this.nodeEditor.runFromKeyboard(
|
|
797
|
+
() => this.executeEdited(),
|
|
798
|
+
isFocusInNodeEditor(),
|
|
799
|
+
),
|
|
800
|
+
});
|
|
801
|
+
// F10 in the Extend and Filter by Expression editors (PLAN §11.7, §11.11)
|
|
802
|
+
commandService.registerCommand({
|
|
803
|
+
key: LEGEND_CUBE_COMMAND_KEY.VALIDATE_EXPRESSIONS,
|
|
804
|
+
trigger: () => {
|
|
805
|
+
const { draft } = this.nodeEditor;
|
|
806
|
+
return (
|
|
807
|
+
!this.isDialogOpen &&
|
|
808
|
+
!this.readOnly &&
|
|
809
|
+
(draft instanceof CubeExtendDraft ||
|
|
810
|
+
draft instanceof CubeExpressionFilterDraft) &&
|
|
811
|
+
!draft.validating
|
|
812
|
+
);
|
|
813
|
+
},
|
|
364
814
|
action: () => {
|
|
365
|
-
|
|
815
|
+
const { draft } = this.nodeEditor;
|
|
816
|
+
if (
|
|
817
|
+
draft instanceof CubeExtendDraft ||
|
|
818
|
+
draft instanceof CubeExpressionFilterDraft
|
|
819
|
+
) {
|
|
820
|
+
flowResult(draft.validate()).catch(
|
|
821
|
+
this.host.applicationStore.alertUnhandledError,
|
|
822
|
+
);
|
|
823
|
+
}
|
|
366
824
|
},
|
|
367
825
|
});
|
|
826
|
+
commandService.registerCommand({
|
|
827
|
+
key: LEGEND_CUBE_COMMAND_KEY.REDO,
|
|
828
|
+
trigger: () =>
|
|
829
|
+
!this.isDialogOpen &&
|
|
830
|
+
!this.nodeEditor.isHeld &&
|
|
831
|
+
this.canRedo &&
|
|
832
|
+
!isTypingText(),
|
|
833
|
+
action: () =>
|
|
834
|
+
this.nodeEditor.runFromKeyboard(
|
|
835
|
+
() => this.redoEdited(),
|
|
836
|
+
isFocusInNodeEditor(),
|
|
837
|
+
),
|
|
838
|
+
});
|
|
368
839
|
commandService.registerCommand({
|
|
369
840
|
key: LEGEND_CUBE_COMMAND_KEY.UNDO,
|
|
370
|
-
trigger: () =>
|
|
371
|
-
|
|
841
|
+
trigger: () =>
|
|
842
|
+
!this.isDialogOpen &&
|
|
843
|
+
!this.nodeEditor.isHeld &&
|
|
844
|
+
(this.canUndo || this.hasEditsToApply) &&
|
|
845
|
+
!isTypingText(),
|
|
846
|
+
action: () =>
|
|
847
|
+
this.nodeEditor.runFromKeyboard(
|
|
848
|
+
() => this.undoEdited(),
|
|
849
|
+
isFocusInNodeEditor(),
|
|
850
|
+
),
|
|
372
851
|
});
|
|
373
852
|
}
|
|
374
853
|
|
|
854
|
+
/** The node editor has edits that closing it would apply */
|
|
855
|
+
get hasEditsToApply(): boolean {
|
|
856
|
+
return this.nodeEditor.hasChanges && !this.readOnly;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Execute, as its button and F9 do (spec §17.5): finishes the node editor
|
|
861
|
+
* first, so the edits run, then runs the query if it can; runs nothing
|
|
862
|
+
* when the edits had to be dropped, since the run would not be what the
|
|
863
|
+
* user edited
|
|
864
|
+
*/
|
|
865
|
+
executeEdited(): void {
|
|
866
|
+
if (!this.nodeEditor.finishApplied() || !this.execution.canExecute) {
|
|
867
|
+
return;
|
|
868
|
+
}
|
|
869
|
+
flowResult(this.execution.execute()).catch(
|
|
870
|
+
this.host.applicationStore.alertUnhandledError,
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Undo, as its button and Ctrl+Z do: finishes the node editor first, then
|
|
876
|
+
* undoes the last change, which drops the edits it just applied; when the
|
|
877
|
+
* edits had to be dropped instead, that was the undo
|
|
878
|
+
*/
|
|
879
|
+
undoEdited(): void {
|
|
880
|
+
if (this.nodeEditor.finishApplied()) {
|
|
881
|
+
this.undo();
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
375
885
|
deregisterCommands(): void {
|
|
376
886
|
Object.values(LEGEND_CUBE_COMMAND_KEY).forEach((key) =>
|
|
377
887
|
this.host.applicationStore.commandService.deregisterCommand(key),
|
|
@@ -382,6 +892,10 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
382
892
|
return this.history.length > 0 && !this.readOnly;
|
|
383
893
|
}
|
|
384
894
|
|
|
895
|
+
get canRedo(): boolean {
|
|
896
|
+
return this.redoStack.length > 0;
|
|
897
|
+
}
|
|
898
|
+
|
|
385
899
|
/** The one way to change the cube; the document before goes to the undo history */
|
|
386
900
|
applyDocument(next: CubeDocument): void {
|
|
387
901
|
if (next === this.document) {
|
|
@@ -397,6 +911,41 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
397
911
|
* without applying its edits, and drops the last run's rows and errors,
|
|
398
912
|
* which belong to the cube before. Never runs the cube.
|
|
399
913
|
*/
|
|
914
|
+
/** Whether the cube is a new one: no name, no context, no node */
|
|
915
|
+
get isEmptyCube(): boolean {
|
|
916
|
+
const { document } = this;
|
|
917
|
+
return (
|
|
918
|
+
document.name === undefined &&
|
|
919
|
+
document.context === undefined &&
|
|
920
|
+
document.query.nodes.length === 0
|
|
921
|
+
);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Replaces the cube with a new, empty one, as an import does (one undo
|
|
926
|
+
* step, so Undo brings the cube back); a cube already new is left as it is
|
|
927
|
+
*/
|
|
928
|
+
startNewCube(): void {
|
|
929
|
+
if (!this.isEmptyCube) {
|
|
930
|
+
this.importDocument(new CubeDocument(), false);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Opens the page on a cube read for it, as `initialDocument` opens one:
|
|
936
|
+
* no undo step, as there was no cube before it (Import Pure's
|
|
937
|
+
* `initialLambda`, PLAN §11.18). Its sources come typed; its expressions
|
|
938
|
+
* are checked as any are.
|
|
939
|
+
*/
|
|
940
|
+
openDocument(next: CubeDocument): void {
|
|
941
|
+
this.execution.reset();
|
|
942
|
+
this.sourcePicker.close();
|
|
943
|
+
this.nodeEditor.discard(CUBE_EDITOR_CLOSED_REASON.CUBE_REPLACED);
|
|
944
|
+
this.hostIssues = new Map();
|
|
945
|
+
this.document = next;
|
|
946
|
+
this.readOnly = false;
|
|
947
|
+
}
|
|
948
|
+
|
|
400
949
|
importDocument(next: CubeDocument, readOnly: boolean): void {
|
|
401
950
|
this.pushHistory();
|
|
402
951
|
this.importedOver.add(this.document);
|
|
@@ -411,11 +960,18 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
411
960
|
flowResult(this.reresolveSources()).catch(
|
|
412
961
|
this.host.applicationStore.alertUnhandledError,
|
|
413
962
|
);
|
|
963
|
+
// checked once on load too, as sources are checked again: the model may
|
|
964
|
+
// have changed the types of its functions (PLAN §11.7, §11.11)
|
|
965
|
+
flowResult(
|
|
966
|
+
this.checkExpressions(next.query.nodes.filter(isCubeEngineCheckedNode)),
|
|
967
|
+
).catch(this.host.applicationStore.alertUnhandledError);
|
|
414
968
|
}
|
|
415
969
|
|
|
416
970
|
/**
|
|
417
|
-
* Types the cube's
|
|
418
|
-
*
|
|
971
|
+
* Types the cube's sources again, outside the undo history (PLAN §10.3,
|
|
972
|
+
* Settled before M1.8): its tables in one engine call, a data product
|
|
973
|
+
* cube's access points through the catalog, from the deployed artifact at
|
|
974
|
+
* the cube's version (PLAN §6.8). Warnings name the kind of source:
|
|
419
975
|
* - a table whose columns are the saved ones is left as it is;
|
|
420
976
|
* - a table that changed takes its new columns, with a warning listing the
|
|
421
977
|
* changes;
|
|
@@ -430,60 +986,157 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
430
986
|
* left alone.
|
|
431
987
|
*
|
|
432
988
|
* `only` types just these sources of the cube shown, e.g. one Refresh. A
|
|
433
|
-
* table found unchanged loses any earlier warning.
|
|
989
|
+
* table found unchanged loses any earlier warning. `fresh` reads a data
|
|
990
|
+
* product's artifact again rather than what this page visit read.
|
|
434
991
|
*/
|
|
435
992
|
*reresolveSources(
|
|
436
|
-
only?: readonly
|
|
993
|
+
only?: readonly RecheckedSource[],
|
|
994
|
+
fresh = false,
|
|
437
995
|
): GeneratorFn<void> {
|
|
438
996
|
const { context, query } = this.document;
|
|
439
|
-
|
|
997
|
+
if (!context) {
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
const kept = (only ?? query.nodes).filter(
|
|
1001
|
+
(node) => query.getNode(node.id) === node,
|
|
1002
|
+
);
|
|
1003
|
+
const tables = kept.filter(
|
|
440
1004
|
(node): node is RelationalTableSource =>
|
|
441
|
-
node instanceof RelationalTableSource
|
|
442
|
-
query.getNode(node.id) === node,
|
|
1005
|
+
node instanceof RelationalTableSource,
|
|
443
1006
|
);
|
|
444
|
-
|
|
1007
|
+
// an access point on a cube of tables is the no-mix rule's to flag
|
|
1008
|
+
const accessPoints = isCubeDataProductModel(context.model)
|
|
1009
|
+
? kept.filter(
|
|
1010
|
+
(node): node is DataProductAccessPointSource =>
|
|
1011
|
+
node instanceof DataProductAccessPointSource,
|
|
1012
|
+
)
|
|
1013
|
+
: [];
|
|
1014
|
+
const dataSets = isCubeIngestModel(context.model)
|
|
1015
|
+
? kept.filter(
|
|
1016
|
+
(node): node is IngestDatasetSource =>
|
|
1017
|
+
node instanceof IngestDatasetSource,
|
|
1018
|
+
)
|
|
1019
|
+
: [];
|
|
1020
|
+
// a function on another kind of cube is the no-mix rule's to flag
|
|
1021
|
+
const functions =
|
|
1022
|
+
isCubeDataProductModel(context.model) ||
|
|
1023
|
+
isCubeIngestModel(context.model) ||
|
|
1024
|
+
isCubeServiceModel(context.model)
|
|
1025
|
+
? []
|
|
1026
|
+
: kept.filter(
|
|
1027
|
+
(node): node is FunctionSource => node instanceof FunctionSource,
|
|
1028
|
+
);
|
|
1029
|
+
// services are typed in one place, still to come (PLAN §6.4)
|
|
1030
|
+
const services = isCubeServiceModel(context.model)
|
|
1031
|
+
? kept.filter(
|
|
1032
|
+
(node): node is ServiceSource => node instanceof ServiceSource,
|
|
1033
|
+
)
|
|
1034
|
+
: [];
|
|
1035
|
+
const sources: readonly RecheckedSource[] = [
|
|
1036
|
+
...tables,
|
|
1037
|
+
...functions,
|
|
1038
|
+
...accessPoints,
|
|
1039
|
+
...dataSets,
|
|
1040
|
+
...services,
|
|
1041
|
+
];
|
|
1042
|
+
if (!sources.length) {
|
|
445
1043
|
return;
|
|
446
1044
|
}
|
|
447
1045
|
this.pendingSources = new Set([...this.pendingSources, ...sources]);
|
|
448
1046
|
let answers: ReadonlyMap<string, Schema | CubeEngineError>;
|
|
449
1047
|
try {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
1048
|
+
const [
|
|
1049
|
+
tableAnswers,
|
|
1050
|
+
accessPointAnswers,
|
|
1051
|
+
dataSetAnswers,
|
|
1052
|
+
serviceAnswers,
|
|
1053
|
+
functionAnswers,
|
|
1054
|
+
] = (yield Promise.all([
|
|
1055
|
+
tables.length
|
|
1056
|
+
? this.host.engine
|
|
1057
|
+
.resolveSchemas(
|
|
1058
|
+
context.model,
|
|
1059
|
+
new Map(
|
|
1060
|
+
tables.map((source) => [
|
|
1061
|
+
source.id,
|
|
1062
|
+
[source.database, source.schema, source.table],
|
|
1063
|
+
]),
|
|
1064
|
+
),
|
|
1065
|
+
)
|
|
1066
|
+
.catch((error: unknown) => {
|
|
1067
|
+
const failure =
|
|
1068
|
+
error instanceof CubeEngineError
|
|
1069
|
+
? error
|
|
1070
|
+
: new CubeEngineError(
|
|
1071
|
+
CubeEngineErrorKind.NETWORK,
|
|
1072
|
+
error instanceof Error ? error.message : String(error),
|
|
1073
|
+
);
|
|
1074
|
+
return new Map(tables.map((source) => [source.id, failure]));
|
|
1075
|
+
})
|
|
1076
|
+
: new Map(),
|
|
1077
|
+
accessPoints.length
|
|
1078
|
+
? recheckCubeDataProductSources(
|
|
1079
|
+
this.host.dataProductCatalog,
|
|
1080
|
+
context.model,
|
|
1081
|
+
accessPoints,
|
|
1082
|
+
fresh,
|
|
1083
|
+
)
|
|
1084
|
+
: new Map(),
|
|
1085
|
+
dataSets.length
|
|
1086
|
+
? recheckCubeIngestSources(
|
|
1087
|
+
this.host.ingestCatalog,
|
|
1088
|
+
context.model,
|
|
1089
|
+
dataSets,
|
|
1090
|
+
fresh,
|
|
1091
|
+
)
|
|
1092
|
+
: new Map(),
|
|
1093
|
+
services.length
|
|
1094
|
+
? recheckCubeServiceSources(
|
|
1095
|
+
this.host.serviceCatalog,
|
|
1096
|
+
context.model,
|
|
1097
|
+
services,
|
|
1098
|
+
)
|
|
1099
|
+
: new Map(),
|
|
1100
|
+
functions.length
|
|
1101
|
+
? recheckCubeFunctionSources(
|
|
1102
|
+
this.host.engine,
|
|
1103
|
+
context.model,
|
|
1104
|
+
functions,
|
|
1105
|
+
)
|
|
1106
|
+
: new Map(),
|
|
1107
|
+
])) as ReadonlyMap<string, Schema | CubeEngineError>[];
|
|
1108
|
+
answers = new Map([
|
|
1109
|
+
...(tableAnswers ?? []),
|
|
1110
|
+
...(accessPointAnswers ?? []),
|
|
1111
|
+
...(dataSetAnswers ?? []),
|
|
1112
|
+
...(serviceAnswers ?? []),
|
|
1113
|
+
...(functionAnswers ?? []),
|
|
1114
|
+
]);
|
|
468
1115
|
} finally {
|
|
469
1116
|
this.pendingSources = new Set(
|
|
470
1117
|
[...this.pendingSources].filter(
|
|
471
|
-
(node) => !sources.includes(node as
|
|
1118
|
+
(node) => !sources.includes(node as RecheckedSource),
|
|
472
1119
|
),
|
|
473
1120
|
);
|
|
474
1121
|
}
|
|
475
1122
|
const warnings = new Map(this.warnings);
|
|
476
1123
|
/** Each typed source, by the object that was sent, and what replaces it */
|
|
477
|
-
const replacements = new Map<
|
|
478
|
-
RelationalTableSource,
|
|
479
|
-
RelationalTableSource
|
|
480
|
-
>();
|
|
1124
|
+
const replacements = new Map<RecheckedSource, RecheckedSource>();
|
|
481
1125
|
sources.forEach((source) => {
|
|
1126
|
+
const isAccessPoint = source instanceof DataProductAccessPointSource;
|
|
1127
|
+
const isDataSet = source instanceof IngestDatasetSource;
|
|
1128
|
+
const isFunction = source instanceof FunctionSource;
|
|
482
1129
|
const answer =
|
|
483
1130
|
answers.get(source.id) ??
|
|
484
1131
|
new CubeEngineError(
|
|
485
1132
|
CubeEngineErrorKind.COMPILE,
|
|
486
|
-
|
|
1133
|
+
isAccessPoint
|
|
1134
|
+
? CUBE_DATA_PRODUCT_RECHECK_MESSAGE.NO_ANSWER
|
|
1135
|
+
: isDataSet
|
|
1136
|
+
? CUBE_INGEST_RECHECK_MESSAGE.NO_ANSWER
|
|
1137
|
+
: isFunction
|
|
1138
|
+
? CUBE_FUNCTION_MESSAGE.NO_ANSWER
|
|
1139
|
+
: 'The engine gave no schema for this table',
|
|
487
1140
|
source.id,
|
|
488
1141
|
);
|
|
489
1142
|
const saved =
|
|
@@ -492,7 +1145,15 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
492
1145
|
: undefined;
|
|
493
1146
|
if (answer instanceof CubeEngineError) {
|
|
494
1147
|
if (saved) {
|
|
495
|
-
warnings.set(source.key, [
|
|
1148
|
+
warnings.set(source.key, [
|
|
1149
|
+
isAccessPoint
|
|
1150
|
+
? getAccessPointRecheckWarning(answer.firstLine)
|
|
1151
|
+
: isDataSet
|
|
1152
|
+
? getDataSetRecheckWarning(answer.firstLine)
|
|
1153
|
+
: isFunction
|
|
1154
|
+
? getFunctionRecheckWarning(answer.firstLine)
|
|
1155
|
+
: getSourceRecheckWarning(answer.firstLine),
|
|
1156
|
+
]);
|
|
496
1157
|
} else if (
|
|
497
1158
|
source.resolution.kind !== 'failed' ||
|
|
498
1159
|
source.resolution.message !== answer.detail
|
|
@@ -514,13 +1175,34 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
514
1175
|
schema: answer,
|
|
515
1176
|
});
|
|
516
1177
|
if (saved) {
|
|
1178
|
+
const diff = diffSchemas(saved, answer);
|
|
517
1179
|
warnings.set(resolved.key, [
|
|
518
|
-
|
|
1180
|
+
isAccessPoint
|
|
1181
|
+
? getAccessPointDriftWarning(diff)
|
|
1182
|
+
: isDataSet
|
|
1183
|
+
? getDataSetDriftWarning(diff)
|
|
1184
|
+
: isFunction
|
|
1185
|
+
? getFunctionDriftWarning(diff)
|
|
1186
|
+
: getSchemaDriftWarning(diff),
|
|
519
1187
|
]);
|
|
520
1188
|
}
|
|
521
1189
|
replacements.set(source, resolved);
|
|
522
1190
|
});
|
|
523
1191
|
this.warnings = warnings;
|
|
1192
|
+
this.replaceOutsideHistory(replacements);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Puts nodes the engine checked in place of the very objects that were
|
|
1197
|
+
* sent, outside the undo history: in the cube shown and in the undo
|
|
1198
|
+
* snapshots taken meanwhile, so undoing an edit made meanwhile keeps them.
|
|
1199
|
+
* A node the user changed meanwhile is a new object, and is left alone.
|
|
1200
|
+
* Filter values saved as invalid text are read again against the columns.
|
|
1201
|
+
*/
|
|
1202
|
+
private replaceOutsideHistory(
|
|
1203
|
+
replacements: ReadonlyMap<QueryNode, QueryNode>,
|
|
1204
|
+
accepts?: (query: Query, resolved: QueryNode) => boolean,
|
|
1205
|
+
): void {
|
|
524
1206
|
if (!replacements.size) {
|
|
525
1207
|
return;
|
|
526
1208
|
}
|
|
@@ -532,7 +1214,10 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
532
1214
|
if (checked === undefined) {
|
|
533
1215
|
let replaced = document.query;
|
|
534
1216
|
replacements.forEach((resolved, source) => {
|
|
535
|
-
if (
|
|
1217
|
+
if (
|
|
1218
|
+
replaced.getNode(source.id) === source &&
|
|
1219
|
+
(accepts?.(document.query, resolved) ?? true)
|
|
1220
|
+
) {
|
|
536
1221
|
replaced = replaced.replace(resolved);
|
|
537
1222
|
}
|
|
538
1223
|
});
|
|
@@ -555,6 +1240,11 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
555
1240
|
return next;
|
|
556
1241
|
};
|
|
557
1242
|
this.history = this.history.map(check);
|
|
1243
|
+
// a change undone meanwhile is redone with the checked nodes too
|
|
1244
|
+
this.redoStack = this.redoStack.map((entry) => ({
|
|
1245
|
+
...entry,
|
|
1246
|
+
document: check(entry.document),
|
|
1247
|
+
}));
|
|
558
1248
|
const next = check(this.document);
|
|
559
1249
|
if (next !== this.document) {
|
|
560
1250
|
this.replaceDocument(next);
|
|
@@ -562,22 +1252,32 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
562
1252
|
}
|
|
563
1253
|
|
|
564
1254
|
/**
|
|
565
|
-
* Types a
|
|
566
|
-
*
|
|
567
|
-
*
|
|
1255
|
+
* Types a source again, from its Source panel (spec §17.6), as a re-check
|
|
1256
|
+
* after an import does: a table with the engine, an access point through
|
|
1257
|
+
* the catalog. No undo step, nothing changes when its columns are the
|
|
1258
|
+
* same, and a warning lists any change.
|
|
568
1259
|
*/
|
|
569
1260
|
*refreshSource(nodeId: string): GeneratorFn<void> {
|
|
570
1261
|
const source = this.document.query.getNode(nodeId);
|
|
571
|
-
if (
|
|
572
|
-
|
|
1262
|
+
if (
|
|
1263
|
+
source instanceof RelationalTableSource ||
|
|
1264
|
+
source instanceof DataProductAccessPointSource ||
|
|
1265
|
+
source instanceof IngestDatasetSource ||
|
|
1266
|
+
source instanceof ServiceSource ||
|
|
1267
|
+
source instanceof FunctionSource
|
|
1268
|
+
) {
|
|
1269
|
+
// a Refresh reads the deployed artifact or definition again
|
|
1270
|
+
yield flowResult(this.reresolveSources([source], true));
|
|
573
1271
|
}
|
|
574
1272
|
}
|
|
575
1273
|
|
|
576
1274
|
/**
|
|
577
1275
|
* Restores the document before the last edit; does nothing when there is
|
|
578
1276
|
* no history. A restored query is a new object (PLAN §4.3), so rows that
|
|
579
|
-
* ran before the edit show as stale. An edit that left the query
|
|
580
|
-
* such as a rename, keeps
|
|
1277
|
+
* ran before the edit show as stale. An edit that left the query and the
|
|
1278
|
+
* context alone, such as a rename, keeps them, with the rows and engine
|
|
1279
|
+
* errors; undoing a warehouse edit brings back the context the rows ran
|
|
1280
|
+
* with. Undoing an
|
|
581
1281
|
* import closes the node editor and the picker, as the import did.
|
|
582
1282
|
*/
|
|
583
1283
|
undo(): void {
|
|
@@ -586,30 +1286,103 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
586
1286
|
return;
|
|
587
1287
|
}
|
|
588
1288
|
this.history = this.history.slice(0, -1);
|
|
1289
|
+
this.redoStack = [
|
|
1290
|
+
...this.redoStack,
|
|
1291
|
+
{
|
|
1292
|
+
document: this.document,
|
|
1293
|
+
readOnly: this.readOnly,
|
|
1294
|
+
opensAnotherCube: this.importedOver.has(previous),
|
|
1295
|
+
},
|
|
1296
|
+
];
|
|
589
1297
|
this.readOnly = this.readOnlyDocuments.has(previous);
|
|
590
1298
|
if (this.importedOver.has(previous)) {
|
|
591
1299
|
// the cube before an import is another cube, as the import was
|
|
592
1300
|
this.sourcePicker.close();
|
|
593
1301
|
this.nodeEditor.discard(CUBE_EDITOR_CLOSED_REASON.CUBE_REPLACED);
|
|
594
1302
|
}
|
|
595
|
-
const { query } = this.document;
|
|
1303
|
+
const { query, meta } = this.document;
|
|
1304
|
+
const restored = previous.withQuery(
|
|
1305
|
+
previous.query === query ? query : previous.query.clone(),
|
|
1306
|
+
);
|
|
1307
|
+
// widths take no undo step, so the same cube keeps the ones set since
|
|
1308
|
+
// (review of M7); the cube before an import keeps its own
|
|
1309
|
+
this.replaceDocument(
|
|
1310
|
+
this.importedOver.has(previous)
|
|
1311
|
+
? restored
|
|
1312
|
+
: restored.withMeta({
|
|
1313
|
+
...restored.meta,
|
|
1314
|
+
presentation: {
|
|
1315
|
+
...restored.meta.presentation,
|
|
1316
|
+
columnWidths: meta.presentation.columnWidths,
|
|
1317
|
+
},
|
|
1318
|
+
}),
|
|
1319
|
+
);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* Brings back the last change undone, as Ctrl+Shift+Z does: the cube shown
|
|
1324
|
+
* goes back to the undo history, and a change that opened another cube
|
|
1325
|
+
* (an import, New) closes the editor and the source dialog again
|
|
1326
|
+
*/
|
|
1327
|
+
redo(): void {
|
|
1328
|
+
const next = this.redoStack.at(-1);
|
|
1329
|
+
if (!next) {
|
|
1330
|
+
return;
|
|
1331
|
+
}
|
|
1332
|
+
this.redoStack = this.redoStack.slice(0, -1);
|
|
1333
|
+
this.pushHistory(true);
|
|
1334
|
+
if (next.opensAnotherCube) {
|
|
1335
|
+
this.importedOver.add(this.history.at(-1) as CubeDocument);
|
|
1336
|
+
this.sourcePicker.close();
|
|
1337
|
+
this.nodeEditor.discard(CUBE_EDITOR_CLOSED_REASON.CUBE_REPLACED);
|
|
1338
|
+
}
|
|
1339
|
+
this.readOnly = next.readOnly;
|
|
1340
|
+
const { query, meta } = this.document;
|
|
1341
|
+
const restored = next.document.withQuery(
|
|
1342
|
+
next.document.query === query ? query : next.document.query.clone(),
|
|
1343
|
+
);
|
|
1344
|
+
// widths take no undo step: the same cube keeps the ones set since
|
|
596
1345
|
this.replaceDocument(
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
1346
|
+
next.opensAnotherCube
|
|
1347
|
+
? restored
|
|
1348
|
+
: restored.withMeta({
|
|
1349
|
+
...restored.meta,
|
|
1350
|
+
presentation: {
|
|
1351
|
+
...restored.meta.presentation,
|
|
1352
|
+
columnWidths: meta.presentation.columnWidths,
|
|
1353
|
+
},
|
|
1354
|
+
}),
|
|
600
1355
|
);
|
|
601
1356
|
}
|
|
602
1357
|
|
|
603
|
-
|
|
1358
|
+
/** Redo, as its button and Ctrl+Shift+Z do: finishes the node editor first */
|
|
1359
|
+
redoEdited(): void {
|
|
1360
|
+
if (this.nodeEditor.finishApplied() && this.canRedo) {
|
|
1361
|
+
this.redo();
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/** Keeps the cube shown for undo; a new change, not a redo, drops what was undone */
|
|
1366
|
+
private pushHistory(keepRedo = false): void {
|
|
604
1367
|
if (this.readOnly) {
|
|
605
1368
|
this.readOnlyDocuments.add(this.document);
|
|
606
1369
|
}
|
|
607
1370
|
this.history = [...this.history, this.document].slice(-MAX_UNDO_STEPS);
|
|
1371
|
+
if (!keepRedo) {
|
|
1372
|
+
this.redoStack = [];
|
|
1373
|
+
}
|
|
608
1374
|
}
|
|
609
1375
|
|
|
610
|
-
/**
|
|
1376
|
+
/**
|
|
1377
|
+
* Engine errors belong to the query and the context they came from, so
|
|
1378
|
+
* they are dropped when either changes, e.g. a data product cube's
|
|
1379
|
+
* warehouse
|
|
1380
|
+
*/
|
|
611
1381
|
private replaceDocument(next: CubeDocument): void {
|
|
612
|
-
if (
|
|
1382
|
+
if (
|
|
1383
|
+
next.query !== this.document.query ||
|
|
1384
|
+
next.context !== this.document.context
|
|
1385
|
+
) {
|
|
613
1386
|
this.hostIssues = new Map();
|
|
614
1387
|
this.execution.clearError();
|
|
615
1388
|
}
|
|
@@ -638,10 +1411,53 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
638
1411
|
}
|
|
639
1412
|
}
|
|
640
1413
|
|
|
1414
|
+
/**
|
|
1415
|
+
* The kinds of source the host serves: data products, ingest data sets and
|
|
1416
|
+
* services only with their catalogs, tables and functions only with a tab
|
|
1417
|
+
* that reads them (Studio offers ingest data sets alone). The cube's kind
|
|
1418
|
+
* may still disable one (`canAddNode`)
|
|
1419
|
+
*/
|
|
1420
|
+
get offeredSources(): readonly SourceDefinition[] {
|
|
1421
|
+
const {
|
|
1422
|
+
modelTab,
|
|
1423
|
+
projectTab,
|
|
1424
|
+
projectFunctionTab,
|
|
1425
|
+
directTab,
|
|
1426
|
+
dataProductTab,
|
|
1427
|
+
ingestTab,
|
|
1428
|
+
serviceTab,
|
|
1429
|
+
} = this.sourcePicker;
|
|
1430
|
+
const isServed = (type: string): boolean => {
|
|
1431
|
+
switch (type) {
|
|
1432
|
+
case DataProductAccessPointSource.TYPE:
|
|
1433
|
+
return dataProductTab.isAvailable;
|
|
1434
|
+
case IngestDatasetSource.TYPE:
|
|
1435
|
+
return ingestTab.isAvailable;
|
|
1436
|
+
case ServiceSource.TYPE:
|
|
1437
|
+
return serviceTab.isAvailable;
|
|
1438
|
+
case FunctionSource.TYPE:
|
|
1439
|
+
return modelTab.isAvailable || projectFunctionTab.isAvailable;
|
|
1440
|
+
case RelationalTableSource.TYPE:
|
|
1441
|
+
return (
|
|
1442
|
+
modelTab.isAvailable ||
|
|
1443
|
+
projectTab.isAvailable ||
|
|
1444
|
+
directTab.isAvailable
|
|
1445
|
+
);
|
|
1446
|
+
default:
|
|
1447
|
+
return true;
|
|
1448
|
+
}
|
|
1449
|
+
};
|
|
1450
|
+
return this.registry.sources.filter((definition) =>
|
|
1451
|
+
isServed(definition.type),
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
|
|
641
1455
|
/**
|
|
642
1456
|
* Whether a node of the type can be added: a transform, unconnected or
|
|
643
1457
|
* spliced in after `afterId`, when the query allows it; a source only
|
|
644
1458
|
* unconnected, through the source picker. Never while the cube is read-only.
|
|
1459
|
+
* The low-level rule: the palette, drops and menus place nodes through
|
|
1460
|
+
* `CubeAddPlacement` (PLAN §11.8).
|
|
645
1461
|
*/
|
|
646
1462
|
canAddNode(type: string, afterId?: string): boolean {
|
|
647
1463
|
const definition = this.registry.get(type);
|
|
@@ -649,31 +1465,37 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
649
1465
|
return false;
|
|
650
1466
|
}
|
|
651
1467
|
if (definition.kind === 'source') {
|
|
652
|
-
|
|
1468
|
+
// through its tab, which the cube's kind may disable (PLAN §6.8)
|
|
1469
|
+
const tab = this.sourcePicker.tabForSourceType(type);
|
|
1470
|
+
return (
|
|
1471
|
+
afterId === undefined &&
|
|
1472
|
+
tab !== undefined &&
|
|
1473
|
+
this.sourcePicker.isTabEnabled(tab)
|
|
1474
|
+
);
|
|
653
1475
|
}
|
|
654
1476
|
const { query } = this.document;
|
|
655
1477
|
return query.canAdd(definition.create(query.generateId(type)), afterId);
|
|
656
1478
|
}
|
|
657
1479
|
|
|
658
1480
|
/**
|
|
659
|
-
* Adds a node of the type
|
|
660
|
-
*
|
|
1481
|
+
* Adds a node of the type (spec §17.4), the low-level add that
|
|
1482
|
+
* `CubeAddPlacement` places for the palette, drops and menus: a transform with its default settings, unconnected or spliced in
|
|
661
1483
|
* after `afterId`; a source opens the source picker, which adds it once
|
|
662
1484
|
* the engine has typed it. Does nothing `canAddNode` refuses.
|
|
663
1485
|
*/
|
|
664
|
-
addNode(type: string, afterId?: string):
|
|
1486
|
+
addNode(type: string, afterId?: string): string | undefined {
|
|
665
1487
|
const definition = this.registry.get(type);
|
|
666
1488
|
if (!definition || !this.canAddNode(type, afterId)) {
|
|
667
|
-
return;
|
|
1489
|
+
return undefined;
|
|
668
1490
|
}
|
|
669
1491
|
if (definition.kind === 'source') {
|
|
670
|
-
this.sourcePicker.
|
|
671
|
-
return;
|
|
1492
|
+
this.sourcePicker.openForSourceType(type);
|
|
1493
|
+
return undefined;
|
|
672
1494
|
}
|
|
673
1495
|
const { query } = this.document;
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
1496
|
+
const id = query.generateId(type);
|
|
1497
|
+
this.applyQuery(query.add(definition.create(id), afterId));
|
|
1498
|
+
return id;
|
|
677
1499
|
}
|
|
678
1500
|
|
|
679
1501
|
/**
|
|
@@ -737,6 +1559,95 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
737
1559
|
);
|
|
738
1560
|
}
|
|
739
1561
|
|
|
1562
|
+
/** Whether a step can be copied: a known type's, so its copy reads back */
|
|
1563
|
+
canCopyNode(nodeId: string): boolean {
|
|
1564
|
+
const node = this.document.query.getNode(nodeId);
|
|
1565
|
+
return node !== undefined && this.registry.get(node.type) !== undefined;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
/** Copies a step, as Cmd/Ctrl+C on it does, for Paste */
|
|
1569
|
+
copyNode(nodeId: string): void {
|
|
1570
|
+
const node = this.document.query.getNode(nodeId);
|
|
1571
|
+
if (node && this.canCopyNode(nodeId)) {
|
|
1572
|
+
this.copiedNode = { node, context: this.document.context };
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Whether the step copied can be pasted here: a transform always; a source
|
|
1578
|
+
* only into a cube of the same model and runtime, or an empty cube, which
|
|
1579
|
+
* takes them, as a first table does
|
|
1580
|
+
*/
|
|
1581
|
+
get canPaste(): boolean {
|
|
1582
|
+
const copied = this.copiedNode;
|
|
1583
|
+
return (
|
|
1584
|
+
copied !== undefined &&
|
|
1585
|
+
!this.readOnly &&
|
|
1586
|
+
this.canTakeCopy(copied.node, copied.context)
|
|
1587
|
+
);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
/** Pastes the step copied: after the step given when it takes an input, else on its own; one undo step */
|
|
1591
|
+
pasteNode(afterId?: string): void {
|
|
1592
|
+
const copied = this.copiedNode;
|
|
1593
|
+
if (copied && this.canPaste) {
|
|
1594
|
+
this.addCopy(copied.node, copied.context, afterId);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
canDuplicateNode(nodeId: string): boolean {
|
|
1599
|
+
return !this.readOnly && this.canCopyNode(nodeId);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
/** A copy of the step after it, as Cmd/Ctrl+D does, leaving the step copied for Paste as it was */
|
|
1603
|
+
duplicateNode(nodeId: string): void {
|
|
1604
|
+
const node = this.document.query.getNode(nodeId);
|
|
1605
|
+
if (node && this.canDuplicateNode(nodeId)) {
|
|
1606
|
+
this.addCopy(node, this.document.context, nodeId);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
private canTakeCopy(
|
|
1611
|
+
node: QueryNode,
|
|
1612
|
+
context: CubeContext | undefined,
|
|
1613
|
+
): boolean {
|
|
1614
|
+
if (!(node instanceof SourceNode)) {
|
|
1615
|
+
return true;
|
|
1616
|
+
}
|
|
1617
|
+
const { document } = this;
|
|
1618
|
+
return (
|
|
1619
|
+
document.query.isEmpty ||
|
|
1620
|
+
JSON.stringify(document.context) === JSON.stringify(context)
|
|
1621
|
+
);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
private addCopy(
|
|
1625
|
+
node: QueryNode,
|
|
1626
|
+
context: CubeContext | undefined,
|
|
1627
|
+
afterId?: string,
|
|
1628
|
+
): void {
|
|
1629
|
+
const { document } = this;
|
|
1630
|
+
const copy = copyQueryNode(
|
|
1631
|
+
node,
|
|
1632
|
+
document.query.generateId(node.type),
|
|
1633
|
+
this.registry,
|
|
1634
|
+
);
|
|
1635
|
+
if (!copy) {
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
const after =
|
|
1639
|
+
afterId !== undefined && document.query.canAdd(copy, afterId)
|
|
1640
|
+
? afterId
|
|
1641
|
+
: undefined;
|
|
1642
|
+
const query = document.query.add(copy, after);
|
|
1643
|
+
// a source pasted into an empty cube brings its model and runtime
|
|
1644
|
+
this.applyDocument(
|
|
1645
|
+
copy instanceof SourceNode && document.query.isEmpty && context
|
|
1646
|
+
? document.withContext(context).withQuery(query)
|
|
1647
|
+
: document.withQuery(query),
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
740
1651
|
canSwapInputs(nodeId: string): boolean {
|
|
741
1652
|
return !this.readOnly && this.document.query.canSwapInputs(nodeId);
|
|
742
1653
|
}
|
|
@@ -764,6 +1675,31 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
764
1675
|
}
|
|
765
1676
|
}
|
|
766
1677
|
|
|
1678
|
+
/**
|
|
1679
|
+
* Keeps a grid column's width, which the cube saves (PLAN §11.10): by the
|
|
1680
|
+
* column's name, in any case. Presentation the user sets by dragging, so
|
|
1681
|
+
* no undo step, and the rows stay current.
|
|
1682
|
+
*/
|
|
1683
|
+
setColumnWidth(column: string, width: number): void {
|
|
1684
|
+
if (!Number.isFinite(width) || width <= 0) {
|
|
1685
|
+
return;
|
|
1686
|
+
}
|
|
1687
|
+
const { meta } = this.document;
|
|
1688
|
+
const { presentation } = meta;
|
|
1689
|
+
const others = presentation.columnWidths.filter(
|
|
1690
|
+
(each) => foldColumnName(each.column) !== foldColumnName(column),
|
|
1691
|
+
);
|
|
1692
|
+
this.replaceDocument(
|
|
1693
|
+
this.document.withMeta({
|
|
1694
|
+
...meta,
|
|
1695
|
+
presentation: {
|
|
1696
|
+
...presentation,
|
|
1697
|
+
columnWidths: [...others, { column, width: Math.round(width) }],
|
|
1698
|
+
},
|
|
1699
|
+
}),
|
|
1700
|
+
);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
767
1703
|
setHostIssue(nodeId: string, error: CubeEngineError): void {
|
|
768
1704
|
this.hostIssues = new Map([
|
|
769
1705
|
...this.hostIssues,
|
|
@@ -801,6 +1737,8 @@ export class CubeEditorState implements CommandRegistrar {
|
|
|
801
1737
|
|
|
802
1738
|
/** Stops any run; call when the page closes */
|
|
803
1739
|
dispose(): void {
|
|
1740
|
+
this.rechecking();
|
|
1741
|
+
this.outlineLoading();
|
|
804
1742
|
this.execution.stop();
|
|
805
1743
|
this.nodeEditor.dispose();
|
|
806
1744
|
}
|