@finos/legend-cube-builder 0.0.0-stage → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +64 -2
- package/docs/adding-an-operation.md +92 -0
- package/docs/hosting.md +79 -0
- package/docs/testing.md +83 -0
- package/lib/__lib__/LegendCubeCommand.d.ts +26 -0
- package/lib/__lib__/LegendCubeCommand.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeCommand.js +40 -0
- package/lib/__lib__/LegendCubeCommand.js.map +1 -0
- package/lib/__lib__/LegendCubeHelpText.d.ts +19 -0
- package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeHelpText.js +35 -0
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -0
- package/lib/__lib__/LegendCubeLabels.d.ts +87 -0
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeLabels.js +128 -0
- package/lib/__lib__/LegendCubeLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeTesting.d.ts +33 -0
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeTesting.js +34 -0
- package/lib/__lib__/LegendCubeTesting.js.map +1 -0
- package/lib/__test-utils__/CubeCanvasTestUtils.d.ts +24 -0
- package/lib/__test-utils__/CubeCanvasTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubeCanvasTestUtils.js +37 -0
- package/lib/__test-utils__/CubeCanvasTestUtils.js.map +1 -0
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts +47 -0
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -0
- package/lib/__test-utils__/CubeEngineTestSupport.js +106 -0
- package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -0
- package/lib/__test-utils__/CubeNorthwindTestQueries.d.ts +31 -0
- package/lib/__test-utils__/CubeNorthwindTestQueries.d.ts.map +1 -0
- package/lib/__test-utils__/CubeNorthwindTestQueries.js +102 -0
- package/lib/__test-utils__/CubeNorthwindTestQueries.js.map +1 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.d.ts +42 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.js +92 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.js.map +1 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts +33 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubePageTestUtils.js +68 -0
- package/lib/__test-utils__/CubePageTestUtils.js.map +1 -0
- package/lib/__test-utils__/CubeTestApplication.d.ts +30 -0
- package/lib/__test-utils__/CubeTestApplication.d.ts.map +1 -0
- package/lib/__test-utils__/CubeTestApplication.js +57 -0
- package/lib/__test-utils__/CubeTestApplication.js.map +1 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts +41 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeEngine.js +91 -0
- package/lib/__test-utils__/FakeCubeEngine.js.map +1 -0
- package/lib/components/CubeButton.d.ts +20 -0
- package/lib/components/CubeButton.d.ts.map +1 -0
- package/lib/components/CubeButton.js +24 -0
- package/lib/components/CubeButton.js.map +1 -0
- package/lib/components/CubeEditor.d.ts +31 -0
- package/lib/components/CubeEditor.d.ts.map +1 -0
- package/lib/components/CubeEditor.js +90 -0
- package/lib/components/CubeEditor.js.map +1 -0
- package/lib/components/CubeNodeIcon.d.ts +23 -0
- package/lib/components/CubeNodeIcon.d.ts.map +1 -0
- package/lib/components/CubeNodeIcon.js +42 -0
- package/lib/components/CubeNodeIcon.js.map +1 -0
- package/lib/components/canvas/CubeCanvas.d.ts +37 -0
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvas.js +137 -0
- package/lib/components/canvas/CubeCanvas.js.map +1 -0
- package/lib/components/canvas/CubeCanvasContext.d.ts +19 -0
- package/lib/components/canvas/CubeCanvasContext.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasContext.js +22 -0
- package/lib/components/canvas/CubeCanvasContext.js.map +1 -0
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts +28 -0
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasContextMenu.js +35 -0
- package/lib/components/canvas/CubeCanvasContextMenu.js.map +1 -0
- package/lib/components/canvas/CubeCanvasDnd.d.ts +43 -0
- package/lib/components/canvas/CubeCanvasDnd.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasDnd.js +51 -0
- package/lib/components/canvas/CubeCanvasDnd.js.map +1 -0
- package/lib/components/canvas/CubeCanvasEdge.d.ts +24 -0
- package/lib/components/canvas/CubeCanvasEdge.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasEdge.js +33 -0
- package/lib/components/canvas/CubeCanvasEdge.js.map +1 -0
- package/lib/components/canvas/CubeCanvasElements.d.ts +66 -0
- package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasElements.js +97 -0
- package/lib/components/canvas/CubeCanvasElements.js.map +1 -0
- package/lib/components/canvas/CubeCanvasLayout.d.ts +32 -0
- package/lib/components/canvas/CubeCanvasLayout.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasLayout.js +63 -0
- package/lib/components/canvas/CubeCanvasLayout.js.map +1 -0
- package/lib/components/canvas/CubeCanvasNode.d.ts +29 -0
- package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -0
- package/lib/components/canvas/CubeCanvasNode.js +75 -0
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -0
- package/lib/components/editors/CubeColumnPicker.d.ts +47 -0
- package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -0
- package/lib/components/editors/CubeColumnPicker.js +56 -0
- package/lib/components/editors/CubeColumnPicker.js.map +1 -0
- package/lib/components/editors/CubeDistinctEditor.d.ts +23 -0
- package/lib/components/editors/CubeDistinctEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeDistinctEditor.js +24 -0
- package/lib/components/editors/CubeDistinctEditor.js.map +1 -0
- package/lib/components/editors/CubeFilterEditor.d.ts +26 -0
- package/lib/components/editors/CubeFilterEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeFilterEditor.js +90 -0
- package/lib/components/editors/CubeFilterEditor.js.map +1 -0
- package/lib/components/editors/CubeIntegerField.d.ts +29 -0
- package/lib/components/editors/CubeIntegerField.d.ts.map +1 -0
- package/lib/components/editors/CubeIntegerField.js +30 -0
- package/lib/components/editors/CubeIntegerField.js.map +1 -0
- package/lib/components/editors/CubeJoinEditor.d.ts +26 -0
- package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeJoinEditor.js +84 -0
- package/lib/components/editors/CubeJoinEditor.js.map +1 -0
- package/lib/components/editors/CubeNodeEditorPanel.d.ts +29 -0
- package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -0
- package/lib/components/editors/CubeNodeEditorPanel.js +72 -0
- package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -0
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts +44 -0
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -0
- package/lib/components/editors/CubeNodeEditorRegistry.js +43 -0
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -0
- package/lib/components/editors/CubeRenameEditor.d.ts +26 -0
- package/lib/components/editors/CubeRenameEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeRenameEditor.js +58 -0
- package/lib/components/editors/CubeRenameEditor.js.map +1 -0
- package/lib/components/editors/CubeRestrictEditor.d.ts +26 -0
- package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeRestrictEditor.js +23 -0
- package/lib/components/editors/CubeRestrictEditor.js.map +1 -0
- package/lib/components/editors/CubeRowCountEditor.d.ts +25 -0
- package/lib/components/editors/CubeRowCountEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeRowCountEditor.js +38 -0
- package/lib/components/editors/CubeRowCountEditor.js.map +1 -0
- package/lib/components/editors/CubeSliceEditor.d.ts +25 -0
- package/lib/components/editors/CubeSliceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeSliceEditor.js +40 -0
- package/lib/components/editors/CubeSliceEditor.js.map +1 -0
- package/lib/components/editors/CubeSortEditor.d.ts +27 -0
- package/lib/components/editors/CubeSortEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeSortEditor.js +72 -0
- package/lib/components/editors/CubeSortEditor.js.map +1 -0
- package/lib/components/editors/CubeSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeSourceEditor.js +41 -0
- package/lib/components/editors/CubeSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeValueEditor.d.ts +40 -0
- package/lib/components/editors/CubeValueEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeValueEditor.js +178 -0
- package/lib/components/editors/CubeValueEditor.js.map +1 -0
- package/lib/components/grid/CubeGridRegion.d.ts +23 -0
- package/lib/components/grid/CubeGridRegion.d.ts.map +1 -0
- package/lib/components/grid/CubeGridRegion.js +94 -0
- package/lib/components/grid/CubeGridRegion.js.map +1 -0
- package/lib/components/grid/CubeGridValues.d.ts +25 -0
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -0
- package/lib/components/grid/CubeGridValues.js +95 -0
- package/lib/components/grid/CubeGridValues.js.map +1 -0
- package/lib/components/grid/CubeResultGrid.d.ts +39 -0
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -0
- package/lib/components/grid/CubeResultGrid.js +86 -0
- package/lib/components/grid/CubeResultGrid.js.map +1 -0
- package/lib/components/palette/CubePalette.d.ts +29 -0
- package/lib/components/palette/CubePalette.d.ts.map +1 -0
- package/lib/components/palette/CubePalette.js +73 -0
- package/lib/components/palette/CubePalette.js.map +1 -0
- package/lib/components/show-pure/CubeShowPureDialog.d.ts +23 -0
- package/lib/components/show-pure/CubeShowPureDialog.d.ts.map +1 -0
- package/lib/components/show-pure/CubeShowPureDialog.js +37 -0
- package/lib/components/show-pure/CubeShowPureDialog.js.map +1 -0
- package/lib/components/source-picker/CubeSourcePicker.d.ts +22 -0
- package/lib/components/source-picker/CubeSourcePicker.d.ts.map +1 -0
- package/lib/components/source-picker/CubeSourcePicker.js +89 -0
- package/lib/components/source-picker/CubeSourcePicker.js.map +1 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts +26 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts.map +1 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js +45 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js.map +1 -0
- package/lib/graph-manager/CubeEngine.d.ts +128 -0
- package/lib/graph-manager/CubeEngine.d.ts.map +1 -0
- package/lib/graph-manager/CubeEngine.js +61 -0
- package/lib/graph-manager/CubeEngine.js.map +1 -0
- package/lib/graph-manager/CubeModelOutlineHelper.d.ts +33 -0
- package/lib/graph-manager/CubeModelOutlineHelper.d.ts.map +1 -0
- package/lib/graph-manager/CubeModelOutlineHelper.js +45 -0
- package/lib/graph-manager/CubeModelOutlineHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts +26 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js +22 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.d.ts +27 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.js +76 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.d.ts +27 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.js +82 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts +32 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js +195 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts +20 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +174 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.d.ts +24 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.js +43 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts +45 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js +171 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +79 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/stores/CubeEditorState.d.ts +236 -0
- package/lib/stores/CubeEditorState.d.ts.map +1 -0
- package/lib/stores/CubeEditorState.js +632 -0
- package/lib/stores/CubeEditorState.js.map +1 -0
- package/lib/stores/CubeExecutionState.d.ts +67 -0
- package/lib/stores/CubeExecutionState.d.ts.map +1 -0
- package/lib/stores/CubeExecutionState.js +212 -0
- package/lib/stores/CubeExecutionState.js.map +1 -0
- package/lib/stores/CubeGridQuickActions.d.ts +40 -0
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -0
- package/lib/stores/CubeGridQuickActions.js +86 -0
- package/lib/stores/CubeGridQuickActions.js.map +1 -0
- package/lib/stores/CubeHost.d.ts +31 -0
- package/lib/stores/CubeHost.d.ts.map +1 -0
- package/lib/stores/CubeHost.js +17 -0
- package/lib/stores/CubeHost.js.map +1 -0
- package/lib/stores/CubeNodeEditorState.d.ts +103 -0
- package/lib/stores/CubeNodeEditorState.d.ts.map +1 -0
- package/lib/stores/CubeNodeEditorState.js +262 -0
- package/lib/stores/CubeNodeEditorState.js.map +1 -0
- package/lib/stores/CubeShowPureState.d.ts +41 -0
- package/lib/stores/CubeShowPureState.d.ts.map +1 -0
- package/lib/stores/CubeShowPureState.js +100 -0
- package/lib/stores/CubeShowPureState.js.map +1 -0
- package/lib/stores/CubeSourcePickerState.d.ts +98 -0
- package/lib/stores/CubeSourcePickerState.d.ts.map +1 -0
- package/lib/stores/CubeSourcePickerState.js +334 -0
- package/lib/stores/CubeSourcePickerState.js.map +1 -0
- package/lib/stores/CubeSpecTransferState.d.ts +60 -0
- package/lib/stores/CubeSpecTransferState.d.ts.map +1 -0
- package/lib/stores/CubeSpecTransferState.js +167 -0
- package/lib/stores/CubeSpecTransferState.js.map +1 -0
- package/lib/stores/LocalModelCatalog.d.ts +37 -0
- package/lib/stores/LocalModelCatalog.d.ts.map +1 -0
- package/lib/stores/LocalModelCatalog.js +49 -0
- package/lib/stores/LocalModelCatalog.js.map +1 -0
- package/lib/stores/editors/CubeFilterDraft.d.ts +61 -0
- package/lib/stores/editors/CubeFilterDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeFilterDraft.js +186 -0
- package/lib/stores/editors/CubeFilterDraft.js.map +1 -0
- package/lib/stores/editors/CubeIntegerText.d.ts +24 -0
- package/lib/stores/editors/CubeIntegerText.d.ts.map +1 -0
- package/lib/stores/editors/CubeIntegerText.js +33 -0
- package/lib/stores/editors/CubeIntegerText.js.map +1 -0
- package/lib/stores/editors/CubeJoinDraft.d.ts +71 -0
- package/lib/stores/editors/CubeJoinDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeJoinDraft.js +145 -0
- package/lib/stores/editors/CubeJoinDraft.js.map +1 -0
- package/lib/stores/editors/CubeNodeDraft.d.ts +38 -0
- package/lib/stores/editors/CubeNodeDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeNodeDraft.js +35 -0
- package/lib/stores/editors/CubeNodeDraft.js.map +1 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +35 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.js +55 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -0
- package/lib/stores/editors/CubeRenameDraft.d.ts +44 -0
- package/lib/stores/editors/CubeRenameDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeRenameDraft.js +79 -0
- package/lib/stores/editors/CubeRenameDraft.js.map +1 -0
- package/lib/stores/editors/CubeRestrictDraft.d.ts +37 -0
- package/lib/stores/editors/CubeRestrictDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeRestrictDraft.js +73 -0
- package/lib/stores/editors/CubeRestrictDraft.js.map +1 -0
- package/lib/stores/editors/CubeRowCountDraft.d.ts +42 -0
- package/lib/stores/editors/CubeRowCountDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeRowCountDraft.js +55 -0
- package/lib/stores/editors/CubeRowCountDraft.js.map +1 -0
- package/lib/stores/editors/CubeSliceDraft.d.ts +42 -0
- package/lib/stores/editors/CubeSliceDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeSliceDraft.js +72 -0
- package/lib/stores/editors/CubeSliceDraft.js.map +1 -0
- package/lib/stores/editors/CubeSortDraft.d.ts +49 -0
- package/lib/stores/editors/CubeSortDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeSortDraft.js +99 -0
- package/lib/stores/editors/CubeSortDraft.js.map +1 -0
- package/lib/stores/fixtures/CubeNorthwindModel.d.ts +23 -0
- package/lib/stores/fixtures/CubeNorthwindModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeNorthwindModel.js +338 -0
- package/lib/stores/fixtures/CubeNorthwindModel.js.map +1 -0
- package/package.json +81 -3
- package/src/__lib__/LegendCubeCommand.ts +44 -0
- package/src/__lib__/LegendCubeHelpText.ts +58 -0
- package/src/__lib__/LegendCubeLabels.ts +171 -0
- package/src/__lib__/LegendCubeTesting.ts +33 -0
- package/src/__test-utils__/CubeCanvasTestUtils.ts +53 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +172 -0
- package/src/__test-utils__/CubeNorthwindTestQueries.ts +165 -0
- package/src/__test-utils__/CubeOperationsTestUtils.ts +177 -0
- package/src/__test-utils__/CubePageTestUtils.tsx +96 -0
- package/src/__test-utils__/CubeTestApplication.ts +82 -0
- package/src/__test-utils__/FakeCubeEngine.ts +145 -0
- package/src/components/CubeButton.tsx +35 -0
- package/src/components/CubeEditor.tsx +239 -0
- package/src/components/CubeNodeIcon.tsx +64 -0
- package/src/components/canvas/CubeCanvas.tsx +262 -0
- package/src/components/canvas/CubeCanvasContext.ts +31 -0
- package/src/components/canvas/CubeCanvasContextMenu.tsx +89 -0
- package/src/components/canvas/CubeCanvasDnd.ts +82 -0
- package/src/components/canvas/CubeCanvasEdge.tsx +57 -0
- package/src/components/canvas/CubeCanvasElements.ts +153 -0
- package/src/components/canvas/CubeCanvasLayout.ts +88 -0
- package/src/components/canvas/CubeCanvasNode.tsx +149 -0
- package/src/components/editors/CubeColumnPicker.tsx +138 -0
- package/src/components/editors/CubeDistinctEditor.tsx +28 -0
- package/src/components/editors/CubeFilterEditor.tsx +309 -0
- package/src/components/editors/CubeIntegerField.tsx +51 -0
- package/src/components/editors/CubeJoinEditor.tsx +247 -0
- package/src/components/editors/CubeNodeEditorPanel.tsx +215 -0
- package/src/components/editors/CubeNodeEditorRegistry.ts +81 -0
- package/src/components/editors/CubeRenameEditor.tsx +143 -0
- package/src/components/editors/CubeRestrictEditor.tsx +103 -0
- package/src/components/editors/CubeRowCountEditor.tsx +53 -0
- package/src/components/editors/CubeSliceEditor.tsx +69 -0
- package/src/components/editors/CubeSortEditor.tsx +206 -0
- package/src/components/editors/CubeSourceEditor.tsx +106 -0
- package/src/components/editors/CubeValueEditor.tsx +333 -0
- package/src/components/grid/CubeGridRegion.tsx +275 -0
- package/src/components/grid/CubeGridValues.ts +125 -0
- package/src/components/grid/CubeResultGrid.tsx +138 -0
- package/src/components/palette/CubePalette.tsx +177 -0
- package/src/components/show-pure/CubeShowPureDialog.tsx +101 -0
- package/src/components/source-picker/CubeSourcePicker.tsx +304 -0
- package/src/components/spec-transfer/CubeSpecTransferDialog.tsx +157 -0
- package/src/graph-manager/CubeEngine.ts +169 -0
- package/src/graph-manager/CubeModelOutlineHelper.ts +58 -0
- package/src/graph-manager/protocol/pure/CubeEngineBuilder.ts +34 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.ts +109 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.ts +115 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts +257 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +243 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.ts +58 -0
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts +278 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +127 -0
- package/src/index.ts +41 -0
- package/src/stores/CubeEditorState.ts +807 -0
- package/src/stores/CubeExecutionState.ts +288 -0
- package/src/stores/CubeGridQuickActions.ts +129 -0
- package/src/stores/CubeHost.ts +32 -0
- package/src/stores/CubeNodeEditorState.ts +324 -0
- package/src/stores/CubeShowPureState.ts +118 -0
- package/src/stores/CubeSourcePickerState.ts +426 -0
- package/src/stores/CubeSpecTransferState.ts +198 -0
- package/src/stores/LocalModelCatalog.ts +70 -0
- package/src/stores/editors/CubeFilterDraft.ts +241 -0
- package/src/stores/editors/CubeIntegerText.ts +34 -0
- package/src/stores/editors/CubeJoinDraft.ts +224 -0
- package/src/stores/editors/CubeNodeDraft.ts +46 -0
- package/src/stores/editors/CubeNodeDraftRegistry.ts +83 -0
- package/src/stores/editors/CubeRenameDraft.ts +110 -0
- package/src/stores/editors/CubeRestrictDraft.ts +83 -0
- package/src/stores/editors/CubeRowCountDraft.ts +69 -0
- package/src/stores/editors/CubeSliceDraft.ts +87 -0
- package/src/stores/editors/CubeSortDraft.ts +135 -0
- package/src/stores/fixtures/CubeNorthwindModel.ts +355 -0
- package/tsconfig.json +133 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { buildSchemasAndValidity, createNodeRegistry, CubeDocument, diffSchemas, findLostSortOrders, MESSAGE_SORT_COLUMNS_CUT, MESSAGE_SORT_COLUMNS_DROPPED, MESSAGE_SORT_ORDER_LOST, QueryEmitter, RelationalTableSource, rereadQueryFilterValues, } from '@finos/legend-cube';
|
|
17
|
+
import { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';
|
|
18
|
+
import { LEGEND_CUBE_COMMAND_KEY } from '../__lib__/LegendCubeCommand.js';
|
|
19
|
+
import { CUBE_EDITOR_CLOSED_REASON, DEFAULT_ROW_LIMIT, getSchemaDriftWarning, getSourceRecheckWarning, LEGEND_CUBE_USER_DATA_KEY, MAX_UNDO_STEPS, } from '../__lib__/LegendCubeLabels.js';
|
|
20
|
+
import { CubeEngineError, CubeEngineErrorKind, } from '../graph-manager/CubeEngine.js';
|
|
21
|
+
import { getDatabaseType } from '../graph-manager/CubeModelOutlineHelper.js';
|
|
22
|
+
import { CubeExecutionState } from './CubeExecutionState.js';
|
|
23
|
+
import { CubeNodeEditorState } from './CubeNodeEditorState.js';
|
|
24
|
+
import { CubeShowPureState } from './CubeShowPureState.js';
|
|
25
|
+
import { CubeSourcePickerState } from './CubeSourcePickerState.js';
|
|
26
|
+
import { CubeSpecTransferState } from './CubeSpecTransferState.js';
|
|
27
|
+
const isValidRowLimit = (value) => value !== undefined && Number.isSafeInteger(value) && value >= 1;
|
|
28
|
+
/** Focus is where text is typed, so Ctrl+Z is the field's own undo */
|
|
29
|
+
const isTypingText = () => {
|
|
30
|
+
const element = document.activeElement;
|
|
31
|
+
return (element instanceof HTMLInputElement ||
|
|
32
|
+
element instanceof HTMLTextAreaElement ||
|
|
33
|
+
(element instanceof HTMLElement && element.isContentEditable));
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The state of one Cube page (PLAN §7.8). The document is immutable: every
|
|
37
|
+
* edit makes a new one through `applyDocument`, which keeps the previous one
|
|
38
|
+
* for undo. Domain and port values are held by reference, never observed
|
|
39
|
+
* deeply.
|
|
40
|
+
*/
|
|
41
|
+
export class CubeEditorState {
|
|
42
|
+
host;
|
|
43
|
+
/** One registry for inference, emission and the saved spec */
|
|
44
|
+
registry;
|
|
45
|
+
execution;
|
|
46
|
+
sourcePicker;
|
|
47
|
+
specTransfer;
|
|
48
|
+
showPure;
|
|
49
|
+
nodeEditor;
|
|
50
|
+
document;
|
|
51
|
+
/** Earlier documents, oldest first */
|
|
52
|
+
history = [];
|
|
53
|
+
/** Engine errors by node id: shown with the node's own errors, never part of inference */
|
|
54
|
+
hostIssues = new Map();
|
|
55
|
+
/**
|
|
56
|
+
* Warnings by node key, e.g. a table that changed since the cube was saved:
|
|
57
|
+
* shown on the node, never errors, and gone once the node is replaced
|
|
58
|
+
*/
|
|
59
|
+
warnings = new Map();
|
|
60
|
+
/**
|
|
61
|
+
* The outline of each model the cube used, loaded when an editor needs it,
|
|
62
|
+
* e.g. for the Join's 'type unknown' warning; by reference, never observed
|
|
63
|
+
* deeply
|
|
64
|
+
*/
|
|
65
|
+
modelOutlines = new Map();
|
|
66
|
+
/** Sources sent to the engine to be typed again, until it answers */
|
|
67
|
+
pendingSources = new Set();
|
|
68
|
+
/** The rows a run returns; kept per user, never in the cube */
|
|
69
|
+
rowLimit;
|
|
70
|
+
/** The palette shows icons only; kept per user, never in the cube */
|
|
71
|
+
isPaletteCollapsed;
|
|
72
|
+
/**
|
|
73
|
+
* The cube was saved by a newer version of Cube: it can be viewed and run,
|
|
74
|
+
* but not changed, undone or exported (Settled before M1.8)
|
|
75
|
+
*/
|
|
76
|
+
readOnly = false;
|
|
77
|
+
/** Documents in the undo history that were read-only, so undo restores the flag */
|
|
78
|
+
readOnlyDocuments = new WeakSet();
|
|
79
|
+
/** Documents an import replaced: undoing back to one opens another cube again */
|
|
80
|
+
importedOver = new WeakSet();
|
|
81
|
+
constructor(host, document = new CubeDocument()) {
|
|
82
|
+
makeObservable(this, {
|
|
83
|
+
pendingSources: observable.ref,
|
|
84
|
+
modelOutlines: observable.ref,
|
|
85
|
+
modelOutline: computed,
|
|
86
|
+
loadModelOutline: flow,
|
|
87
|
+
document: observable.ref,
|
|
88
|
+
history: observable.ref,
|
|
89
|
+
hostIssues: observable.ref,
|
|
90
|
+
warnings: observable.ref,
|
|
91
|
+
derivedWarnings: computed,
|
|
92
|
+
isResolvingSources: computed,
|
|
93
|
+
rowLimit: observable,
|
|
94
|
+
isPaletteCollapsed: observable,
|
|
95
|
+
readOnly: observable,
|
|
96
|
+
analysis: computed,
|
|
97
|
+
emitter: computed,
|
|
98
|
+
canUndo: computed,
|
|
99
|
+
isDialogOpen: computed,
|
|
100
|
+
applyDocument: action,
|
|
101
|
+
undo: action,
|
|
102
|
+
importDocument: action,
|
|
103
|
+
reresolveSources: flow,
|
|
104
|
+
refreshSource: flow,
|
|
105
|
+
applyQuery: action,
|
|
106
|
+
select: action,
|
|
107
|
+
connect: action,
|
|
108
|
+
addNode: action,
|
|
109
|
+
addConfiguredNode: action,
|
|
110
|
+
dropNode: action,
|
|
111
|
+
removeNode: action,
|
|
112
|
+
swapInputs: action,
|
|
113
|
+
setShowGraph: action,
|
|
114
|
+
setPaletteCollapsed: action,
|
|
115
|
+
setHostIssue: action,
|
|
116
|
+
clearHostIssues: action,
|
|
117
|
+
setRowLimit: action,
|
|
118
|
+
});
|
|
119
|
+
this.host = host;
|
|
120
|
+
this.registry = createNodeRegistry();
|
|
121
|
+
this.document = document;
|
|
122
|
+
const storedLimit = host.applicationStore.userDataService.getNumericValue(LEGEND_CUBE_USER_DATA_KEY.ROW_LIMIT);
|
|
123
|
+
this.rowLimit = isValidRowLimit(storedLimit)
|
|
124
|
+
? storedLimit
|
|
125
|
+
: DEFAULT_ROW_LIMIT;
|
|
126
|
+
this.isPaletteCollapsed =
|
|
127
|
+
host.applicationStore.userDataService.getBooleanValue(LEGEND_CUBE_USER_DATA_KEY.PALETTE_COLLAPSED) ?? false;
|
|
128
|
+
this.execution = new CubeExecutionState(this);
|
|
129
|
+
this.sourcePicker = new CubeSourcePickerState(this);
|
|
130
|
+
this.specTransfer = new CubeSpecTransferState(this);
|
|
131
|
+
this.showPure = new CubeShowPureState(this);
|
|
132
|
+
this.nodeEditor = new CubeNodeEditorState(this);
|
|
133
|
+
}
|
|
134
|
+
/** Each node's schema and errors, query-level rules included, as the emitter sees them */
|
|
135
|
+
get analysis() {
|
|
136
|
+
return buildSchemasAndValidity(this.document.query, this.registry.queryRules);
|
|
137
|
+
}
|
|
138
|
+
get emitter() {
|
|
139
|
+
return new QueryEmitter(this.document.query, this.registry);
|
|
140
|
+
}
|
|
141
|
+
/** The cube shown has tables being typed again, after an import */
|
|
142
|
+
get isResolvingSources() {
|
|
143
|
+
return this.document.query.nodes.some((node) => this.pendingSources.has(node));
|
|
144
|
+
}
|
|
145
|
+
/** The source is being typed again by the engine, e.g. after an import */
|
|
146
|
+
isPendingSource(node) {
|
|
147
|
+
return this.pendingSources.has(node);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Warnings worked out from the query, by node id: a Sort whose order is
|
|
151
|
+
* lost before it is used (PLAN §11.4). Never stored and never errors, so
|
|
152
|
+
* Execute stays enabled; they go as soon as the query no longer loses it.
|
|
153
|
+
* A partial loss names each node that removes some of the Sort's columns,
|
|
154
|
+
* then the columns that came after a removed one. A loss waits until the
|
|
155
|
+
* Sort and every node it names have no errors, e.g. a Restrict just added,
|
|
156
|
+
* with no column yet: their own errors come first.
|
|
157
|
+
*/
|
|
158
|
+
get derivedWarnings() {
|
|
159
|
+
const { validity, schemas } = this.analysis;
|
|
160
|
+
const isValid = (nodeId) => validity.get(nodeId)?.length === 0;
|
|
161
|
+
const { query } = this.document;
|
|
162
|
+
return new Map(Array.from(findLostSortOrders(query, undefined, schemas))
|
|
163
|
+
.filter(([sortId, loss]) => isValid(sortId) &&
|
|
164
|
+
isValid(loss.nodeId) &&
|
|
165
|
+
(loss.removals ?? []).every(({ nodeId }) => isValid(nodeId)))
|
|
166
|
+
.map(([sortId, loss]) => [
|
|
167
|
+
sortId,
|
|
168
|
+
loss.removals
|
|
169
|
+
? [
|
|
170
|
+
...loss.removals.map(({ nodeId, columns }) => MESSAGE_SORT_COLUMNS_DROPPED(columns, nodeId)),
|
|
171
|
+
...(loss.cutColumns?.length
|
|
172
|
+
? [MESSAGE_SORT_COLUMNS_CUT(loss.cutColumns)]
|
|
173
|
+
: []),
|
|
174
|
+
]
|
|
175
|
+
: [MESSAGE_SORT_ORDER_LOST(loss.nodeId)],
|
|
176
|
+
]));
|
|
177
|
+
}
|
|
178
|
+
/** A node's warnings: the stored ones (by key), then the derived ones (by id) */
|
|
179
|
+
getNodeWarnings(node) {
|
|
180
|
+
return [
|
|
181
|
+
...(this.warnings.get(node.key) ?? []),
|
|
182
|
+
...(this.derivedWarnings.get(node.id) ?? []),
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* The node's errors, each once: its own and those of the query rules, then
|
|
187
|
+
* the first line of the engine's error on it
|
|
188
|
+
*/
|
|
189
|
+
getNodeErrors(nodeId) {
|
|
190
|
+
const hostIssue = this.hostIssues.get(nodeId);
|
|
191
|
+
return [
|
|
192
|
+
...new Set([
|
|
193
|
+
...(this.analysis.validity.get(nodeId) ?? []),
|
|
194
|
+
...(hostIssue ? [hostIssue.firstLine] : []),
|
|
195
|
+
]),
|
|
196
|
+
];
|
|
197
|
+
}
|
|
198
|
+
/** The outline of the cube's model, once an editor has loaded it */
|
|
199
|
+
get modelOutline() {
|
|
200
|
+
const model = this.document.context?.model;
|
|
201
|
+
return model === undefined ? undefined : this.getModelOutline(model);
|
|
202
|
+
}
|
|
203
|
+
/** The outline of a model, once loaded */
|
|
204
|
+
getModelOutline(model) {
|
|
205
|
+
return this.modelOutlines.get(model);
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The database type a run of the query up to the node needs, with the
|
|
209
|
+
* model's runtime (PLAN §11.4), from the model's outline once it is loaded
|
|
210
|
+
* (`loadModelOutline`): the type of the runtime's connections to the
|
|
211
|
+
* databases the node reads. None without an outline, which writes every
|
|
212
|
+
* operation the native way.
|
|
213
|
+
*/
|
|
214
|
+
getRunDatabaseType(query, nodeId, model, runtime) {
|
|
215
|
+
const outline = this.getModelOutline(model);
|
|
216
|
+
if (!outline) {
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
const databases = new Set();
|
|
220
|
+
const visit = (id) => {
|
|
221
|
+
const node = query.getNode(id);
|
|
222
|
+
if (node instanceof RelationalTableSource) {
|
|
223
|
+
databases.add(node.database);
|
|
224
|
+
}
|
|
225
|
+
query
|
|
226
|
+
.getInputIds(id)
|
|
227
|
+
.forEach((inputId) => inputId !== undefined && visit(inputId));
|
|
228
|
+
};
|
|
229
|
+
visit(nodeId);
|
|
230
|
+
return getDatabaseType(outline, runtime, [...databases]);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Loads the outline of a model, the cube's by default, once per model. It
|
|
234
|
+
* only adds warnings and database types, so a model that fails to load
|
|
235
|
+
* shows none and runs every operation the native way.
|
|
236
|
+
*/
|
|
237
|
+
*loadModelOutline(model = this.document.context?.model) {
|
|
238
|
+
if (model === undefined || this.modelOutlines.has(model)) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
const outline = (yield this.host.modelCatalog.loadOutline(model));
|
|
243
|
+
this.modelOutlines = new Map([...this.modelOutlines, [model, outline]]);
|
|
244
|
+
}
|
|
245
|
+
catch {
|
|
246
|
+
// no outline, no warning: nothing is blocked on it
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/** One of Cube's dialogs is open: the source picker, Import or Export, Show Pure */
|
|
250
|
+
get isDialogOpen() {
|
|
251
|
+
return (this.sourcePicker.isOpen ||
|
|
252
|
+
this.specTransfer.mode !== undefined ||
|
|
253
|
+
this.showPure.isOpen);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* The page's keyboard shortcuts, while it is open (spec §17.12). Each does
|
|
257
|
+
* nothing when its button can't be used, and nothing while a Cube dialog
|
|
258
|
+
* is open, since a dialog doesn't stop the app's shortcuts (user's choice,
|
|
259
|
+
* 2026-10-07). Undo leaves Ctrl+Z to a text field that has the focus.
|
|
260
|
+
*/
|
|
261
|
+
registerCommands() {
|
|
262
|
+
const { commandService, alertUnhandledError } = this.host.applicationStore;
|
|
263
|
+
commandService.registerCommand({
|
|
264
|
+
key: LEGEND_CUBE_COMMAND_KEY.EXECUTE,
|
|
265
|
+
trigger: () => !this.isDialogOpen &&
|
|
266
|
+
this.execution.canExecute &&
|
|
267
|
+
!this.execution.isRunning,
|
|
268
|
+
action: () => {
|
|
269
|
+
flowResult(this.execution.execute()).catch(alertUnhandledError);
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
commandService.registerCommand({
|
|
273
|
+
key: LEGEND_CUBE_COMMAND_KEY.UNDO,
|
|
274
|
+
trigger: () => !this.isDialogOpen && this.canUndo && !isTypingText(),
|
|
275
|
+
action: () => this.undo(),
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
deregisterCommands() {
|
|
279
|
+
Object.values(LEGEND_CUBE_COMMAND_KEY).forEach((key) => this.host.applicationStore.commandService.deregisterCommand(key));
|
|
280
|
+
}
|
|
281
|
+
get canUndo() {
|
|
282
|
+
return this.history.length > 0 && !this.readOnly;
|
|
283
|
+
}
|
|
284
|
+
/** The one way to change the cube; the document before goes to the undo history */
|
|
285
|
+
applyDocument(next) {
|
|
286
|
+
if (next === this.document) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
this.pushHistory();
|
|
290
|
+
this.replaceDocument(next);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Opens another cube in place of this one, e.g. an imported spec: one undo
|
|
294
|
+
* step. Stops any run and any table being added, closes the node editor
|
|
295
|
+
* without applying its edits, and drops the last run's rows and errors,
|
|
296
|
+
* which belong to the cube before. Never runs the cube.
|
|
297
|
+
*/
|
|
298
|
+
importDocument(next, readOnly) {
|
|
299
|
+
this.pushHistory();
|
|
300
|
+
this.importedOver.add(this.document);
|
|
301
|
+
this.execution.reset();
|
|
302
|
+
this.sourcePicker.close();
|
|
303
|
+
this.nodeEditor.discard(CUBE_EDITOR_CLOSED_REASON.CUBE_REPLACED);
|
|
304
|
+
this.hostIssues = new Map();
|
|
305
|
+
// warnings are kept: they are by node key, which the imported nodes don't
|
|
306
|
+
// share, and Undo brings back the nodes they belong to
|
|
307
|
+
this.document = next;
|
|
308
|
+
this.readOnly = readOnly;
|
|
309
|
+
flowResult(this.reresolveSources()).catch(this.host.applicationStore.alertUnhandledError);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Types the cube's tables again, in one engine call, outside the undo
|
|
313
|
+
* history (PLAN §10.3, Settled before M1.8):
|
|
314
|
+
* - a table whose columns are the saved ones is left as it is;
|
|
315
|
+
* - a table that changed takes its new columns, with a warning listing the
|
|
316
|
+
* changes;
|
|
317
|
+
* - a table with saved columns that can't be typed keeps them, with a
|
|
318
|
+
* warning; one without them shows the engine's error.
|
|
319
|
+
*
|
|
320
|
+
* Then filter values saved as invalid text are read again against the
|
|
321
|
+
* columns. The answer goes to every document holding the very source
|
|
322
|
+
* objects that were typed: the cube shown and the undo snapshots taken
|
|
323
|
+
* meanwhile, so undoing an edit made while the tables were typed keeps
|
|
324
|
+
* them typed. A source the user changed meanwhile is a new object, and is
|
|
325
|
+
* left alone.
|
|
326
|
+
*
|
|
327
|
+
* `only` types just these sources of the cube shown, e.g. one Refresh. A
|
|
328
|
+
* table found unchanged loses any earlier warning.
|
|
329
|
+
*/
|
|
330
|
+
*reresolveSources(only) {
|
|
331
|
+
const { context, query } = this.document;
|
|
332
|
+
const sources = (only ?? query.nodes).filter((node) => node instanceof RelationalTableSource &&
|
|
333
|
+
query.getNode(node.id) === node);
|
|
334
|
+
if (!context || !sources.length) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
this.pendingSources = new Set([...this.pendingSources, ...sources]);
|
|
338
|
+
let answers;
|
|
339
|
+
try {
|
|
340
|
+
answers = (yield this.host.engine.resolveSchemas(context.model, new Map(sources.map((source) => [
|
|
341
|
+
source.id,
|
|
342
|
+
[source.database, source.schema, source.table],
|
|
343
|
+
]))));
|
|
344
|
+
}
|
|
345
|
+
catch (error) {
|
|
346
|
+
const failure = error instanceof CubeEngineError
|
|
347
|
+
? error
|
|
348
|
+
: new CubeEngineError(CubeEngineErrorKind.NETWORK, error instanceof Error ? error.message : String(error));
|
|
349
|
+
answers = new Map(sources.map((source) => [source.id, failure]));
|
|
350
|
+
}
|
|
351
|
+
finally {
|
|
352
|
+
this.pendingSources = new Set([...this.pendingSources].filter((node) => !sources.includes(node)));
|
|
353
|
+
}
|
|
354
|
+
const warnings = new Map(this.warnings);
|
|
355
|
+
/** Each typed source, by the object that was sent, and what replaces it */
|
|
356
|
+
const replacements = new Map();
|
|
357
|
+
sources.forEach((source) => {
|
|
358
|
+
const answer = answers.get(source.id) ??
|
|
359
|
+
new CubeEngineError(CubeEngineErrorKind.COMPILE, 'The engine gave no schema for this table', source.id);
|
|
360
|
+
const saved = source.resolution.kind === 'resolved'
|
|
361
|
+
? source.resolution.schema
|
|
362
|
+
: undefined;
|
|
363
|
+
if (answer instanceof CubeEngineError) {
|
|
364
|
+
if (saved) {
|
|
365
|
+
warnings.set(source.key, [getSourceRecheckWarning(answer.firstLine)]);
|
|
366
|
+
}
|
|
367
|
+
else if (source.resolution.kind !== 'failed' ||
|
|
368
|
+
source.resolution.message !== answer.detail) {
|
|
369
|
+
// a table that fails as it did before is left as it is
|
|
370
|
+
replacements.set(source, source.withResolution({ kind: 'failed', message: answer.detail }));
|
|
371
|
+
}
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
if (saved?.isIdenticalTo(answer)) {
|
|
375
|
+
warnings.delete(source.key);
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const resolved = source.withResolution({
|
|
379
|
+
kind: 'resolved',
|
|
380
|
+
schema: answer,
|
|
381
|
+
});
|
|
382
|
+
if (saved) {
|
|
383
|
+
warnings.set(resolved.key, [
|
|
384
|
+
getSchemaDriftWarning(diffSchemas(saved, answer)),
|
|
385
|
+
]);
|
|
386
|
+
}
|
|
387
|
+
replacements.set(source, resolved);
|
|
388
|
+
});
|
|
389
|
+
this.warnings = warnings;
|
|
390
|
+
if (!replacements.size) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
// documents that shared a query share its checked one, so an undo
|
|
394
|
+
// between them still finds the query unchanged
|
|
395
|
+
const checkedQueries = new Map();
|
|
396
|
+
const check = (document) => {
|
|
397
|
+
let checked = checkedQueries.get(document.query);
|
|
398
|
+
if (checked === undefined) {
|
|
399
|
+
let replaced = document.query;
|
|
400
|
+
replacements.forEach((resolved, source) => {
|
|
401
|
+
if (replaced.getNode(source.id) === source) {
|
|
402
|
+
replaced = replaced.replace(resolved);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
checked =
|
|
406
|
+
replaced === document.query
|
|
407
|
+
? replaced
|
|
408
|
+
: rereadQueryFilterValues(replaced, this.registry.queryRules);
|
|
409
|
+
checkedQueries.set(document.query, checked);
|
|
410
|
+
}
|
|
411
|
+
if (checked === document.query) {
|
|
412
|
+
return document;
|
|
413
|
+
}
|
|
414
|
+
const next = document.withQuery(checked);
|
|
415
|
+
if (this.readOnlyDocuments.has(document)) {
|
|
416
|
+
this.readOnlyDocuments.add(next);
|
|
417
|
+
}
|
|
418
|
+
if (this.importedOver.has(document)) {
|
|
419
|
+
this.importedOver.add(next);
|
|
420
|
+
}
|
|
421
|
+
return next;
|
|
422
|
+
};
|
|
423
|
+
this.history = this.history.map(check);
|
|
424
|
+
const next = check(this.document);
|
|
425
|
+
if (next !== this.document) {
|
|
426
|
+
this.replaceDocument(next);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Types a table again with the engine, from its Source panel (spec §17.6),
|
|
431
|
+
* as a re-check after an import does: no undo step, nothing changes when
|
|
432
|
+
* its columns are the same, and a warning lists any change.
|
|
433
|
+
*/
|
|
434
|
+
*refreshSource(nodeId) {
|
|
435
|
+
const source = this.document.query.getNode(nodeId);
|
|
436
|
+
if (source instanceof RelationalTableSource) {
|
|
437
|
+
yield flowResult(this.reresolveSources([source]));
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Restores the document before the last edit; does nothing when there is
|
|
442
|
+
* no history. A restored query is a new object (PLAN §4.3), so rows that
|
|
443
|
+
* ran before the edit show as stale. An edit that left the query alone,
|
|
444
|
+
* such as a rename, keeps it, with its rows and engine errors. Undoing an
|
|
445
|
+
* import closes the node editor and the picker, as the import did.
|
|
446
|
+
*/
|
|
447
|
+
undo() {
|
|
448
|
+
const previous = this.history.at(-1);
|
|
449
|
+
if (!previous || !this.canUndo) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
this.history = this.history.slice(0, -1);
|
|
453
|
+
this.readOnly = this.readOnlyDocuments.has(previous);
|
|
454
|
+
if (this.importedOver.has(previous)) {
|
|
455
|
+
// the cube before an import is another cube, as the import was
|
|
456
|
+
this.sourcePicker.close();
|
|
457
|
+
this.nodeEditor.discard(CUBE_EDITOR_CLOSED_REASON.CUBE_REPLACED);
|
|
458
|
+
}
|
|
459
|
+
const { query } = this.document;
|
|
460
|
+
this.replaceDocument(previous.withQuery(previous.query === query ? query : previous.query.clone()));
|
|
461
|
+
}
|
|
462
|
+
pushHistory() {
|
|
463
|
+
if (this.readOnly) {
|
|
464
|
+
this.readOnlyDocuments.add(this.document);
|
|
465
|
+
}
|
|
466
|
+
this.history = [...this.history, this.document].slice(-MAX_UNDO_STEPS);
|
|
467
|
+
}
|
|
468
|
+
/** Engine errors belong to the query they came from, so they are dropped when the query changes */
|
|
469
|
+
replaceDocument(next) {
|
|
470
|
+
if (next.query !== this.document.query) {
|
|
471
|
+
this.hostIssues = new Map();
|
|
472
|
+
this.execution.clearError();
|
|
473
|
+
}
|
|
474
|
+
this.document = next;
|
|
475
|
+
}
|
|
476
|
+
applyQuery(next) {
|
|
477
|
+
this.applyDocument(this.document.withQuery(next));
|
|
478
|
+
}
|
|
479
|
+
/** Makes a node the capture node, the one Execute runs */
|
|
480
|
+
select(nodeId) {
|
|
481
|
+
if (this.document.query.canSelect(nodeId)) {
|
|
482
|
+
this.applyQuery(this.document.query.select(nodeId));
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Feeds a node into another, on the port if given, else the first free one.
|
|
487
|
+
* Does nothing when the query doesn't allow it or the cube is read-only.
|
|
488
|
+
*/
|
|
489
|
+
connect(sourceId, targetId, port) {
|
|
490
|
+
const { query } = this.document;
|
|
491
|
+
if (!this.readOnly && query.canConnect(sourceId, targetId, port)) {
|
|
492
|
+
this.applyQuery(query.connect(sourceId, targetId, port));
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Whether a node of the type can be added: a transform, unconnected or
|
|
497
|
+
* spliced in after `afterId`, when the query allows it; a source only
|
|
498
|
+
* unconnected, through the source picker. Never while the cube is read-only.
|
|
499
|
+
*/
|
|
500
|
+
canAddNode(type, afterId) {
|
|
501
|
+
const definition = this.registry.get(type);
|
|
502
|
+
if (this.readOnly || !definition) {
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
if (definition.kind === 'source') {
|
|
506
|
+
return afterId === undefined;
|
|
507
|
+
}
|
|
508
|
+
const { query } = this.document;
|
|
509
|
+
return query.canAdd(definition.create(query.generateId(type)), afterId);
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Adds a node of the type, as the palette and the context menu do (spec
|
|
513
|
+
* §17.4): a transform with its default settings, unconnected or spliced in
|
|
514
|
+
* after `afterId`; a source opens the source picker, which adds it once
|
|
515
|
+
* the engine has typed it. Does nothing `canAddNode` refuses.
|
|
516
|
+
*/
|
|
517
|
+
addNode(type, afterId) {
|
|
518
|
+
const definition = this.registry.get(type);
|
|
519
|
+
if (!definition || !this.canAddNode(type, afterId)) {
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
if (definition.kind === 'source') {
|
|
523
|
+
this.sourcePicker.open();
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
const { query } = this.document;
|
|
527
|
+
this.applyQuery(query.add(definition.create(query.generateId(type)), afterId));
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Adds a node made elsewhere, with its settings, as the grid's quick
|
|
531
|
+
* actions do (spec §12.4): spliced in after `afterId`, so it becomes the
|
|
532
|
+
* node that runs when that one did, as one undo step. Does nothing in a
|
|
533
|
+
* read-only cube, or when the query can't take it.
|
|
534
|
+
*/
|
|
535
|
+
addConfiguredNode(node, afterId) {
|
|
536
|
+
const { query } = this.document;
|
|
537
|
+
if (this.readOnly || !query.canAdd(node, afterId)) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
this.applyQuery(query.add(node, afterId));
|
|
541
|
+
}
|
|
542
|
+
/** Whether dropping a node on another does anything: connect it, or else move it after it */
|
|
543
|
+
canDropNode(nodeId, targetId) {
|
|
544
|
+
const { query } = this.document;
|
|
545
|
+
return (!this.readOnly &&
|
|
546
|
+
(query.canConnect(nodeId, targetId) || query.canMove(nodeId, targetId)));
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Drops a node on another (spec §17.4): it feeds the target's first free
|
|
550
|
+
* port if it can, else it moves to after the target
|
|
551
|
+
*/
|
|
552
|
+
dropNode(nodeId, targetId) {
|
|
553
|
+
if (!this.canDropNode(nodeId, targetId)) {
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
const { query } = this.document;
|
|
557
|
+
this.applyQuery(query.canConnect(nodeId, targetId)
|
|
558
|
+
? query.connect(nodeId, targetId)
|
|
559
|
+
: query.move(nodeId, targetId));
|
|
560
|
+
}
|
|
561
|
+
canRemoveNode(nodeId) {
|
|
562
|
+
return !this.readOnly && this.document.query.canRemove(nodeId);
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Removes a node, healing the chain around it. Removing the last node also
|
|
566
|
+
* clears the cube's model and runtime, in the same undo step, so the next
|
|
567
|
+
* table can come from any model (user's choice, 2026-10-07).
|
|
568
|
+
*/
|
|
569
|
+
removeNode(nodeId) {
|
|
570
|
+
if (!this.canRemoveNode(nodeId)) {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
// the node editor, if it shows the node, closes by itself
|
|
574
|
+
const query = this.document.query.remove(nodeId);
|
|
575
|
+
this.applyDocument(query.isEmpty
|
|
576
|
+
? this.document.withContext(undefined).withQuery(query)
|
|
577
|
+
: this.document.withQuery(query));
|
|
578
|
+
}
|
|
579
|
+
canSwapInputs(nodeId) {
|
|
580
|
+
return !this.readOnly && this.document.query.canSwapInputs(nodeId);
|
|
581
|
+
}
|
|
582
|
+
/** Swaps a binary node's two inputs; its settings follow them, e.g. a Join's key columns */
|
|
583
|
+
swapInputs(nodeId) {
|
|
584
|
+
if (this.canSwapInputs(nodeId)) {
|
|
585
|
+
this.applyQuery(this.document.query.swapInputs(nodeId));
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Shows or hides the graph, which the cube saves (spec §17.1). An undoable
|
|
590
|
+
* edit that leaves the query, and so the rows, as they are (M1.8b).
|
|
591
|
+
*/
|
|
592
|
+
setShowGraph(showGraph) {
|
|
593
|
+
const { meta } = this.document;
|
|
594
|
+
if (meta.presentation.showGraph !== showGraph) {
|
|
595
|
+
this.applyDocument(this.document.withMeta({
|
|
596
|
+
...meta,
|
|
597
|
+
presentation: { ...meta.presentation, showGraph },
|
|
598
|
+
}));
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
setHostIssue(nodeId, error) {
|
|
602
|
+
this.hostIssues = new Map([
|
|
603
|
+
...this.hostIssues,
|
|
604
|
+
[nodeId, { firstLine: error.firstLine, detail: error.detail }],
|
|
605
|
+
]);
|
|
606
|
+
}
|
|
607
|
+
clearHostIssues() {
|
|
608
|
+
if (this.hostIssues.size) {
|
|
609
|
+
this.hostIssues = new Map();
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
/** Sets and remembers the row limit; a value that isn't a whole number of at least 1 is refused */
|
|
613
|
+
setRowLimit(value) {
|
|
614
|
+
if (!isValidRowLimit(value)) {
|
|
615
|
+
return false;
|
|
616
|
+
}
|
|
617
|
+
this.rowLimit = value;
|
|
618
|
+
this.host.applicationStore.userDataService.persistValue(LEGEND_CUBE_USER_DATA_KEY.ROW_LIMIT, value);
|
|
619
|
+
return true;
|
|
620
|
+
}
|
|
621
|
+
/** Collapses or expands the palette, and remembers it for the user */
|
|
622
|
+
setPaletteCollapsed(collapsed) {
|
|
623
|
+
this.isPaletteCollapsed = collapsed;
|
|
624
|
+
this.host.applicationStore.userDataService.persistValue(LEGEND_CUBE_USER_DATA_KEY.PALETTE_COLLAPSED, collapsed);
|
|
625
|
+
}
|
|
626
|
+
/** Stops any run; call when the page closes */
|
|
627
|
+
dispose() {
|
|
628
|
+
this.execution.stop();
|
|
629
|
+
this.nodeEditor.dispose();
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
//# sourceMappingURL=CubeEditorState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeEditorState.js","sourceRoot":"","sources":["../../src/stores/CubeEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EA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