@finos/legend-cube-builder 0.0.4 → 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 +9 -3
- package/docs/adding-an-operation.md +22 -12
- 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 +50 -3
- package/docs/testing.md +32 -0
- package/lib/__lib__/LegendCubeCommand.d.ts +2 -0
- package/lib/__lib__/LegendCubeCommand.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeCommand.js +7 -0
- package/lib/__lib__/LegendCubeCommand.js.map +1 -1
- 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 +14 -2
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeLabels.d.ts +100 -8
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +129 -14
- package/lib/__lib__/LegendCubeLabels.js.map +1 -1
- 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 +7 -0
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeTesting.js +7 -0
- package/lib/__lib__/LegendCubeTesting.js.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.js +2 -2
- package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts +8 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.js +20 -3
- package/lib/__test-utils__/CubeExpressionTestUtils.js.map +1 -1
- 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__/CubePageTestUtils.d.ts +6 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubePageTestUtils.js +21 -0
- package/lib/__test-utils__/CubePageTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.d.ts +9 -0
- package/lib/__test-utils__/CubeTestApplication.d.ts.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.js +16 -0
- package/lib/__test-utils__/CubeTestApplication.js.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.d.ts +5 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.js +17 -0
- package/lib/__test-utils__/FakeCubeEngine.js.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts +7 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.js +16 -0
- package/lib/__test-utils__/FakeCubeIngestCatalog.js.map +1 -1
- 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.map +1 -1
- package/lib/components/CubeAddItems.js +9 -6
- package/lib/components/CubeAddItems.js.map +1 -1
- 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 +12 -1
- package/lib/components/CubeEditor.d.ts.map +1 -1
- package/lib/components/CubeEditor.js +16 -14
- package/lib/components/CubeEditor.js.map +1 -1
- 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 +5 -1
- package/lib/components/CubeNodeIcon.js.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.d.ts.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.js +2 -2
- package/lib/components/CubeSchemaColumnsTable.js.map +1 -1
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvas.js +38 -5
- package/lib/components/canvas/CubeCanvas.js.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.js +2 -1
- package/lib/components/canvas/CubeCanvasContextMenu.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 +58 -3
- 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 +8 -4
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
- 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/CubeColumnChecklist.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnChecklist.js +2 -2
- package/lib/components/editors/CubeColumnChecklist.js.map +1 -1
- 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.js +2 -2
- package/lib/components/editors/CubeConcatEditor.js.map +1 -1
- 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 +2 -0
- package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeExtendEditor.js +3 -3
- package/lib/components/editors/CubeExtendEditor.js.map +1 -1
- package/lib/components/editors/CubeFilterEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeFilterEditor.js +13 -2
- 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/CubeJoinEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeJoinEditor.js +16 -4
- package/lib/components/editors/CubeJoinEditor.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.js +18 -8
- package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts +5 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.js +10 -2
- package/lib/components/editors/CubeNodeEditorPopper.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js +9 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
- 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/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/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 +40 -26
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeGridValues.d.ts +31 -1
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
- package/lib/components/grid/CubeGridValues.js +108 -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 +308 -35
- 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 +32 -13
- 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.map +1 -1
- package/lib/components/source-picker/CubeDataProductTab.js +37 -16
- package/lib/components/source-picker/CubeDataProductTab.js.map +1 -1
- package/lib/components/source-picker/CubeDirectConnectionTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeDirectConnectionTab.js +6 -4
- package/lib/components/source-picker/CubeDirectConnectionTab.js.map +1 -1
- 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.map +1 -1
- package/lib/components/source-picker/CubeIngestTab.js +39 -16
- package/lib/components/source-picker/CubeIngestTab.js.map +1 -1
- package/lib/components/source-picker/CubeInlineModelTab.d.ts +3 -2
- package/lib/components/source-picker/CubeInlineModelTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeInlineModelTab.js +23 -13
- package/lib/components/source-picker/CubeInlineModelTab.js.map +1 -1
- 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/CubeProjectTab.d.ts +4 -3
- package/lib/components/source-picker/CubeProjectTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeProjectTab.js +7 -4
- package/lib/components/source-picker/CubeProjectTab.js.map +1 -1
- 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.map +1 -1
- package/lib/components/source-picker/CubeSourcePicker.js +16 -3
- 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/CubeDataProductCatalog.d.ts +10 -0
- package/lib/graph-manager/CubeDataProductCatalog.d.ts.map +1 -1
- package/lib/graph-manager/CubeDataProductCatalog.js.map +1 -1
- package/lib/graph-manager/CubeEngine.d.ts +46 -1
- package/lib/graph-manager/CubeEngine.d.ts.map +1 -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 +5 -0
- package/lib/graph-manager/CubeIngest.d.ts.map +1 -1
- package/lib/graph-manager/CubeIngest.js +10 -0
- package/lib/graph-manager/CubeIngest.js.map +1 -1
- package/lib/graph-manager/CubeIngestCatalog.d.ts +26 -0
- package/lib/graph-manager/CubeIngestCatalog.d.ts.map +1 -1
- package/lib/graph-manager/CubeIngestCatalog.js +6 -0
- package/lib/graph-manager/CubeIngestCatalog.js.map +1 -1
- 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/CubeProjectCatalog.d.ts +3 -3
- 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 +52 -5
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js +63 -5
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts +9 -6
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js +12 -8
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js.map +1 -1
- 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.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js +18 -9
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts +4 -9
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js.map +1 -1
- 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 +49 -10
- 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_LegendCubeConnectionExplorer.d.ts +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js +74 -6
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js +7 -4
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js.map +1 -1
- 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_CubeEngineTestUtils.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +6 -2
- 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 +12 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -1
- package/lib/index.js.map +1 -1
- package/lib/stores/CubeAddPlacement.d.ts +10 -3
- package/lib/stores/CubeAddPlacement.d.ts.map +1 -1
- package/lib/stores/CubeAddPlacement.js +16 -5
- package/lib/stores/CubeAddPlacement.js.map +1 -1
- 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 +173 -43
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +498 -113
- 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/CubeExamples.d.ts.map +1 -1
- package/lib/stores/CubeExamples.js +39 -2
- package/lib/stores/CubeExamples.js.map +1 -1
- package/lib/stores/CubeExamplesState.d.ts +1 -1
- package/lib/stores/CubeExamplesState.d.ts.map +1 -1
- package/lib/stores/CubeExamplesState.js +2 -2
- package/lib/stores/CubeExamplesState.js.map +1 -1
- package/lib/stores/CubeExecutionState.d.ts.map +1 -1
- package/lib/stores/CubeExecutionState.js +24 -33
- 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 +6 -14
- package/lib/stores/CubeExtendTyping.d.ts.map +1 -1
- package/lib/stores/CubeExtendTyping.js +6 -33
- package/lib/stores/CubeExtendTyping.js.map +1 -1
- 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 +18 -6
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
- package/lib/stores/CubeGridQuickActions.js +32 -12
- 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 +42 -0
- package/lib/stores/CubeHost.d.ts.map +1 -1
- package/lib/stores/CubeHost.js +4 -0
- package/lib/stores/CubeHost.js.map +1 -1
- 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/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 +14 -1
- package/lib/stores/CubeShowPureState.d.ts.map +1 -1
- package/lib/stores/CubeShowPureState.js +41 -11
- package/lib/stores/CubeShowPureState.js.map +1 -1
- package/lib/stores/CubeSourcePickerState.d.ts +20 -4
- package/lib/stores/CubeSourcePickerState.d.ts.map +1 -1
- package/lib/stores/CubeSourcePickerState.js +75 -14
- package/lib/stores/CubeSourcePickerState.js.map +1 -1
- package/lib/stores/LocalModelCatalog.d.ts.map +1 -1
- package/lib/stores/LocalModelCatalog.js +3 -1
- package/lib/stores/LocalModelCatalog.js.map +1 -1
- 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/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/CubeNodeDraftRegistry.d.ts +4 -2
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js +20 -3
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
- 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/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/CubeTradesModel.d.ts +4 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts.map +1 -1
- package/lib/stores/fixtures/CubeTradesModel.js +31 -1
- package/lib/stores/fixtures/CubeTradesModel.js.map +1 -1
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts +34 -5
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeDataProductTabState.js +111 -26
- package/lib/stores/source-picker/CubeDataProductTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts +25 -2
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js +183 -31
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.d.ts +22 -9
- package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.js +84 -29
- package/lib/stores/source-picker/CubeIngestTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts +100 -4
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeInlineModelTabState.js +415 -28
- package/lib/stores/source-picker/CubeInlineModelTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeProjectTabState.d.ts +18 -3
- package/lib/stores/source-picker/CubeProjectTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeProjectTabState.js +26 -1
- package/lib/stores/source-picker/CubeProjectTabState.js.map +1 -1
- 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 +15 -3
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeSourcePickerTab.js +21 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.js.map +1 -1
- package/package.json +10 -9
- package/src/__lib__/LegendCubeCommand.ts +7 -0
- package/src/__lib__/LegendCubeFunctionLabels.ts +41 -0
- package/src/__lib__/LegendCubeHelpText.ts +23 -1
- package/src/__lib__/LegendCubeLabels.ts +170 -13
- package/src/__lib__/LegendCubeProjectSourceLabels.ts +26 -0
- package/src/__lib__/LegendCubeServiceLabels.ts +41 -0
- package/src/__lib__/LegendCubeTesting.ts +7 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +2 -1
- package/src/__test-utils__/CubeExpressionTestUtils.ts +29 -2
- package/src/__test-utils__/CubeFunctionTestOutline.ts +78 -0
- package/src/__test-utils__/CubeLambdaCorpus.ts +137 -0
- package/src/__test-utils__/CubePageTestUtils.tsx +34 -0
- package/src/__test-utils__/CubeTestApplication.ts +25 -0
- package/src/__test-utils__/FakeCubeEngine.ts +27 -0
- package/src/__test-utils__/FakeCubeIngestCatalog.ts +18 -0
- package/src/__test-utils__/FakeCubeServiceCatalog.ts +57 -0
- package/src/components/CubeAddItems.tsx +13 -6
- package/src/components/CubeDialogTheme.ts +25 -0
- package/src/components/CubeEditor.tsx +155 -129
- package/src/components/CubeFileMenu.tsx +127 -0
- package/src/components/CubeLambdaImportBanner.tsx +97 -0
- package/src/components/CubeNodeIcon.tsx +7 -0
- package/src/components/CubeSchemaColumnsTable.tsx +7 -2
- package/src/components/canvas/CubeCanvas.tsx +52 -13
- package/src/components/canvas/CubeCanvasContextMenu.tsx +33 -2
- package/src/components/canvas/CubeCanvasElements.ts +76 -3
- package/src/components/canvas/CubeCanvasLayout.ts +1 -1
- package/src/components/canvas/CubeCanvasNode.tsx +30 -3
- package/src/components/dev-settings/CubeDevSettings.tsx +154 -0
- package/src/components/editors/CubeColumnChecklist.tsx +8 -2
- package/src/components/editors/CubeColumnPicker.tsx +6 -3
- package/src/components/editors/CubeConcatEditor.tsx +2 -2
- package/src/components/editors/CubeExpressionFilterEditor.tsx +193 -0
- package/src/components/editors/CubeExtendEditor.tsx +3 -3
- package/src/components/editors/CubeFilterEditor.tsx +13 -1
- package/src/components/editors/CubeFunctionSourceEditor.tsx +140 -0
- package/src/components/editors/CubeJoinEditor.tsx +23 -4
- package/src/components/editors/CubeNodeEditorPanel.tsx +22 -10
- package/src/components/editors/CubeNodeEditorPopper.tsx +9 -1
- package/src/components/editors/CubeNodeEditorRegistry.ts +12 -0
- package/src/components/editors/CubePivotEditor.tsx +277 -0
- package/src/components/editors/CubeRestrictEditor.tsx +8 -2
- package/src/components/editors/CubeServiceSourceEditor.tsx +77 -0
- package/src/components/grid/CubeColumnFormatDialog.tsx +289 -0
- package/src/components/grid/CubeDrilldownBar.tsx +219 -0
- package/src/components/grid/CubeGridRegion.tsx +170 -54
- package/src/components/grid/CubeGridValues.ts +146 -1
- package/src/components/grid/CubeResultGrid.tsx +443 -41
- 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 +45 -12
- package/src/components/show-pure/CubeShowPureDialog.tsx +19 -5
- package/src/components/source-picker/CubeDataProductTab.tsx +169 -75
- package/src/components/source-picker/CubeDirectConnectionTab.tsx +42 -30
- package/src/components/source-picker/CubeFunctionSteps.tsx +244 -0
- package/src/components/source-picker/CubeIngestTab.tsx +159 -79
- package/src/components/source-picker/CubeInlineModelTab.tsx +110 -81
- package/src/components/source-picker/CubePickerListItem.tsx +118 -0
- package/src/components/source-picker/CubeProjectTab.tsx +6 -3
- package/src/components/source-picker/CubeServiceTab.tsx +151 -0
- package/src/components/source-picker/CubeSourcePicker.tsx +54 -18
- 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 +21 -8
- package/src/graph-manager/CubeDataProductCatalog.ts +11 -0
- package/src/graph-manager/CubeEngine.ts +51 -1
- package/src/graph-manager/CubeEngineClientSettings.ts +64 -0
- package/src/graph-manager/CubeIngest.ts +15 -0
- package/src/graph-manager/CubeIngestCatalog.ts +33 -0
- package/src/graph-manager/CubeLakehouseRuntime.ts +43 -0
- package/src/graph-manager/CubeProjectCatalog.ts +3 -3
- package/src/graph-manager/CubeService.ts +29 -0
- package/src/graph-manager/CubeServiceCatalog.ts +35 -0
- package/src/graph-manager/protocol/pure/CubeEngineBuilder.ts +115 -5
- package/src/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.ts +13 -7
- package/src/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.ts +312 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.ts +35 -9
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestModel.ts +6 -15
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.ts +471 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts +70 -15
- package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +3 -1
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts +7 -1
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts +122 -7
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.ts +9 -4
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.ts +92 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +6 -1
- package/src/index.ts +32 -2
- package/src/stores/CubeAddPlacement.ts +25 -5
- package/src/stores/CubeDevSettingsState.ts +117 -0
- package/src/stores/CubeEditorState.ts +687 -197
- package/src/stores/CubeEngineChecks.ts +240 -0
- package/src/stores/CubeExamples.ts +70 -1
- package/src/stores/CubeExamplesState.ts +4 -2
- package/src/stores/CubeExecutionState.ts +26 -57
- package/src/stores/CubeExportState.ts +196 -0
- package/src/stores/CubeExpressionFilterCheck.ts +218 -0
- package/src/stores/CubeExtendTyping.ts +6 -46
- package/src/stores/CubeFunctionRecheck.ts +97 -0
- package/src/stores/CubeGridFetcher.ts +302 -0
- package/src/stores/CubeGridQuickActions.ts +33 -11
- package/src/stores/CubeGridState.ts +450 -0
- package/src/stores/CubeHost.ts +48 -0
- package/src/stores/CubeLambdaImportState.ts +434 -0
- package/src/stores/CubeLambdaSources.ts +390 -0
- 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 +51 -12
- package/src/stores/CubeSourcePickerState.ts +89 -13
- package/src/stores/LocalModelCatalog.ts +6 -1
- package/src/stores/editors/CubeExpressionFilterDraft.ts +385 -0
- package/src/stores/editors/CubeFunctionDraft.ts +92 -0
- package/src/stores/editors/CubeNodeDraftRegistry.ts +27 -2
- package/src/stores/editors/CubePivotDraft.ts +355 -0
- package/src/stores/fixtures/CubeSalesDuckDbModel.ts +54 -0
- package/src/stores/fixtures/CubeTradesModel.ts +36 -1
- package/src/stores/source-picker/CubeDataProductTabState.ts +162 -35
- package/src/stores/source-picker/CubeDirectConnectionTabState.ts +246 -47
- package/src/stores/source-picker/CubeIngestTabState.ts +112 -38
- package/src/stores/source-picker/CubeInlineModelTabState.ts +514 -34
- package/src/stores/source-picker/CubeProjectTabState.ts +35 -3
- package/src/stores/source-picker/CubeServiceTabState.ts +288 -0
- package/src/stores/source-picker/CubeSourcePickerTab.ts +31 -2
- package/tsconfig.json +50 -0
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
|
|
17
|
+
import { CompressIcon, ExpandIcon } from '@finos/legend-art';
|
|
18
|
+
import type { Schema } from '@finos/legend-cube';
|
|
19
|
+
import { CompilationError, SourceInformation } from '@finos/legend-graph';
|
|
20
|
+
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
|
21
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
22
|
+
import { flowResult } from 'mobx';
|
|
23
|
+
import { observer } from 'mobx-react-lite';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
import {
|
|
26
|
+
EXPRESSION_FILTER_EDITOR_NOTES,
|
|
27
|
+
getExactColumnTypeLabel,
|
|
28
|
+
READ_ONLY_CUBE_TITLE,
|
|
29
|
+
} from '../../__lib__/LegendCubeLabels.js';
|
|
30
|
+
import {
|
|
31
|
+
type CubeConditionProblem,
|
|
32
|
+
CubeExpressionFilterDraft,
|
|
33
|
+
} from '../../stores/editors/CubeExpressionFilterDraft.js';
|
|
34
|
+
import { CubeButton } from '../CubeButton.js';
|
|
35
|
+
import { CubeColumnTypeIcon } from './CubeColumnPicker.js';
|
|
36
|
+
import { columnAccessOf } from './CubeExtendEditor.js';
|
|
37
|
+
import type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
38
|
+
|
|
39
|
+
/** The code editor's language: legend-code-editor's `CODE_EDITOR_LANGUAGE.PURE` */
|
|
40
|
+
const PURE = 'pure';
|
|
41
|
+
|
|
42
|
+
/** The error the code editor marks, from the condition's problem located in its code */
|
|
43
|
+
const markerOf = (
|
|
44
|
+
problem: CubeConditionProblem | undefined,
|
|
45
|
+
): CompilationError | undefined => {
|
|
46
|
+
const location = problem?.location;
|
|
47
|
+
if (!problem || !location) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const error = new CompilationError(problem.message);
|
|
51
|
+
error.sourceInformation = new SourceInformation(
|
|
52
|
+
location.sourceId,
|
|
53
|
+
location.startLine,
|
|
54
|
+
location.startColumn,
|
|
55
|
+
location.endLine,
|
|
56
|
+
location.endColumn,
|
|
57
|
+
);
|
|
58
|
+
return error;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* What the editor says under the code: its problem, but one Cube refused,
|
|
63
|
+
* which the panel's problems show; that it is checked, or that it waits
|
|
64
|
+
*/
|
|
65
|
+
const CubeConditionStatus = observer(
|
|
66
|
+
(props: { draft: CubeExpressionFilterDraft }) => {
|
|
67
|
+
const { draft } = props;
|
|
68
|
+
const { problem } = draft;
|
|
69
|
+
if (problem?.refused) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
if (problem) {
|
|
73
|
+
return (
|
|
74
|
+
<div className="text-sm text-[var(--color-status-error)]">
|
|
75
|
+
<div>{problem.message}</div>
|
|
76
|
+
{problem.hint && (
|
|
77
|
+
<div className="text-[var(--color-text-secondary)]">
|
|
78
|
+
{problem.hint}
|
|
79
|
+
</div>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
if (!draft.isValidated) {
|
|
85
|
+
return (
|
|
86
|
+
<div className="text-sm text-[var(--color-text-muted)]">
|
|
87
|
+
Not validated yet
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
return draft.isChecked ? (
|
|
92
|
+
<div className="text-sm text-[var(--color-text-secondary)]">
|
|
93
|
+
One Boolean of a row: the rows for which it is true are kept
|
|
94
|
+
</div>
|
|
95
|
+
) : null;
|
|
96
|
+
},
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The Filter by Expression editor (PLAN §11.11): the condition's code in a
|
|
101
|
+
* code editor, Validate (F10), which the engine does, and the input's
|
|
102
|
+
* columns, which a click writes at the end of the code.
|
|
103
|
+
*/
|
|
104
|
+
export const CubeExpressionFilterEditor = observer(
|
|
105
|
+
(props: CubeNodeEditorProps) => {
|
|
106
|
+
const { inputSchemas, readOnly } = props;
|
|
107
|
+
const draft = guaranteeType(props.draft, CubeExpressionFilterDraft);
|
|
108
|
+
const [schema] = inputSchemas as [Schema];
|
|
109
|
+
const [expanded, setExpanded] = useState(false);
|
|
110
|
+
const disabled = readOnly || draft.validating;
|
|
111
|
+
return (
|
|
112
|
+
<div className="flex flex-col gap-2 text-base">
|
|
113
|
+
<div className="flex items-center gap-1">
|
|
114
|
+
<span className="flex-1">Condition</span>
|
|
115
|
+
<button
|
|
116
|
+
className="flex h-6 w-6 items-center justify-center text-[var(--color-text-secondary)]"
|
|
117
|
+
aria-label="Expand the condition"
|
|
118
|
+
title={expanded ? 'Show fewer lines' : 'Show more lines'}
|
|
119
|
+
onClick={() => setExpanded(!expanded)}
|
|
120
|
+
>
|
|
121
|
+
{expanded ? <CompressIcon /> : <ExpandIcon />}
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
aria-label="Condition"
|
|
126
|
+
className="overflow-hidden rounded-sm border border-[var(--color-border-default)]"
|
|
127
|
+
style={{ height: expanded ? 240 : 96 }}
|
|
128
|
+
>
|
|
129
|
+
<CodeEditor
|
|
130
|
+
inputValue={draft.code}
|
|
131
|
+
updateInput={(code) => draft.setCode(code)}
|
|
132
|
+
language={PURE}
|
|
133
|
+
isReadOnly={disabled}
|
|
134
|
+
hideMinimap={true}
|
|
135
|
+
hideGutter={true}
|
|
136
|
+
hideActionBar={true}
|
|
137
|
+
error={markerOf(draft.problem)}
|
|
138
|
+
extraEditorOptions={{
|
|
139
|
+
lineNumbers: 'off',
|
|
140
|
+
wordWrap: 'on',
|
|
141
|
+
scrollBeyondLastLine: false,
|
|
142
|
+
}}
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
<CubeConditionStatus draft={draft} />
|
|
146
|
+
<div className="flex items-center gap-2">
|
|
147
|
+
<CubeButton
|
|
148
|
+
primary={!draft.isValidated}
|
|
149
|
+
title={
|
|
150
|
+
readOnly
|
|
151
|
+
? READ_ONLY_CUBE_TITLE
|
|
152
|
+
: "Check the condition with the engine, and plan it for this cube's database (F10)"
|
|
153
|
+
}
|
|
154
|
+
disabled={disabled}
|
|
155
|
+
onClick={() => {
|
|
156
|
+
flowResult(draft.validate()).catch(
|
|
157
|
+
props.editorState.host.applicationStore.alertUnhandledError,
|
|
158
|
+
);
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
{draft.validating ? 'Validating…' : 'Validate'}
|
|
162
|
+
</CubeButton>
|
|
163
|
+
</div>
|
|
164
|
+
<span>Input columns</span>
|
|
165
|
+
<ul aria-label="Input columns" className="flex flex-wrap gap-1">
|
|
166
|
+
{schema.columns.map((column) => (
|
|
167
|
+
<li key={column.name}>
|
|
168
|
+
<button
|
|
169
|
+
className="flex items-center gap-1 rounded-sm border border-[var(--color-border-subtle)] px-1 text-sm hover:bg-[var(--color-bg-hover)] disabled:text-[var(--color-text-disabled)]"
|
|
170
|
+
title={`Write ${columnAccessOf(column.name)} at the end of the condition (${getExactColumnTypeLabel(column)})`}
|
|
171
|
+
disabled={disabled}
|
|
172
|
+
onClick={() => {
|
|
173
|
+
const separator = /\s$/u.test(draft.code) ? '' : ' ';
|
|
174
|
+
draft.setCode(
|
|
175
|
+
`${draft.code}${separator}${columnAccessOf(column.name)}`,
|
|
176
|
+
);
|
|
177
|
+
}}
|
|
178
|
+
>
|
|
179
|
+
<CubeColumnTypeIcon type={column.type} />
|
|
180
|
+
{column.name}
|
|
181
|
+
</button>
|
|
182
|
+
</li>
|
|
183
|
+
))}
|
|
184
|
+
</ul>
|
|
185
|
+
<ul className="flex list-disc flex-col gap-1 pl-4 text-sm text-[var(--color-text-secondary)]">
|
|
186
|
+
{EXPRESSION_FILTER_EDITOR_NOTES.map((note) => (
|
|
187
|
+
<li key={note}>{note}</li>
|
|
188
|
+
))}
|
|
189
|
+
</ul>
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
|
+
},
|
|
193
|
+
);
|
|
@@ -31,7 +31,7 @@ import { useState } from 'react';
|
|
|
31
31
|
import {
|
|
32
32
|
COLUMN_NAME_RULES_HINT,
|
|
33
33
|
EXTEND_EDITOR_NOTES,
|
|
34
|
-
|
|
34
|
+
getExactColumnTypeLabel,
|
|
35
35
|
READ_ONLY_CUBE_TITLE,
|
|
36
36
|
} from '../../__lib__/LegendCubeLabels.js';
|
|
37
37
|
import {
|
|
@@ -46,7 +46,7 @@ import type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
|
46
46
|
const PURE = 'pure';
|
|
47
47
|
|
|
48
48
|
/** How an expression reads a column: `$x.NAME`, or `$x.'a name'` for one that isn't an identifier */
|
|
49
|
-
const columnAccessOf = (name: string): string =>
|
|
49
|
+
export const columnAccessOf = (name: string): string =>
|
|
50
50
|
/^[A-Za-z_][A-Za-z0-9_]*$/u.test(name)
|
|
51
51
|
? `$x.${name}`
|
|
52
52
|
: `$x.'${name.replace(/\\/gu, '\\\\').replace(/'/gu, "\\'")}'`;
|
|
@@ -243,7 +243,7 @@ export const CubeExtendEditor = observer((props: CubeNodeEditorProps) => {
|
|
|
243
243
|
<li key={column.name}>
|
|
244
244
|
<button
|
|
245
245
|
className="flex items-center gap-1 rounded-sm border border-[var(--color-border-subtle)] px-1 text-sm hover:bg-[var(--color-bg-hover)] disabled:text-[var(--color-text-disabled)]"
|
|
246
|
-
title={`Write ${columnAccessOf(column.name)} at the end of the expression last used (${
|
|
246
|
+
title={`Write ${columnAccessOf(column.name)} at the end of the expression last used (${getExactColumnTypeLabel(column)})`}
|
|
247
247
|
disabled={readOnly || draft.validating || !target}
|
|
248
248
|
onClick={() => {
|
|
249
249
|
if (target) {
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
CompositeFilterOperator,
|
|
22
22
|
FILTER_OPERATOR_DESCRIPTIONS,
|
|
23
23
|
type FilterRule,
|
|
24
|
+
findPatternWildcardOperator,
|
|
24
25
|
getAvailableOperators,
|
|
25
26
|
getFilterValueShape,
|
|
26
27
|
isDateOrTimestampType,
|
|
@@ -31,8 +32,10 @@ import {
|
|
|
31
32
|
NotFilter,
|
|
32
33
|
type Schema,
|
|
33
34
|
} from '@finos/legend-cube';
|
|
34
|
-
import { guaranteeType } from '@finos/legend-shared';
|
|
35
|
+
import { guaranteeType, noop } from '@finos/legend-shared';
|
|
36
|
+
import { flowResult } from 'mobx';
|
|
35
37
|
import { observer } from 'mobx-react-lite';
|
|
38
|
+
import { useEffect } from 'react';
|
|
36
39
|
import {
|
|
37
40
|
DATE_OR_TIMESTAMP_WARNING,
|
|
38
41
|
FILTER_FLOAT_COMPARISON_HINT,
|
|
@@ -297,8 +300,17 @@ const CubeFilterGroup = observer(
|
|
|
297
300
|
* kept, marked, to be fixed. Blank conditions are not stored.
|
|
298
301
|
*/
|
|
299
302
|
export const CubeFilterEditor = observer((props: CubeNodeEditorProps) => {
|
|
303
|
+
const { editorState } = props;
|
|
300
304
|
const draft = guaranteeType(props.draft, CubeFilterDraft);
|
|
301
305
|
const [schema] = props.inputSchemas as [Schema];
|
|
306
|
+
// a pattern given % or _ is refused on some databases, which the model's
|
|
307
|
+
// outline tells (PLAN §11.11)
|
|
308
|
+
const givesWildcard = findPatternWildcardOperator(draft.tree) !== undefined;
|
|
309
|
+
useEffect(() => {
|
|
310
|
+
if (givesWildcard) {
|
|
311
|
+
flowResult(editorState.loadModelOutline()).catch(noop());
|
|
312
|
+
}
|
|
313
|
+
}, [editorState, givesWildcard]);
|
|
302
314
|
return (
|
|
303
315
|
<div className="flex flex-col gap-2">
|
|
304
316
|
<CubeFilterGroup
|
|
@@ -0,0 +1,140 @@
|
|
|
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
|
+
|
|
17
|
+
import {
|
|
18
|
+
FunctionSource,
|
|
19
|
+
getFunctionParameterValueError,
|
|
20
|
+
} from '@finos/legend-cube';
|
|
21
|
+
import { PanelLoadingIndicator } from '@finos/legend-art';
|
|
22
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
23
|
+
import { flowResult } from 'mobx';
|
|
24
|
+
import { observer } from 'mobx-react-lite';
|
|
25
|
+
import { useId } from 'react';
|
|
26
|
+
import { CUBE_PENDING_LABEL } from '../../__lib__/LegendCubeLabels.js';
|
|
27
|
+
import { CubeFunctionDraft } from '../../stores/editors/CubeFunctionDraft.js';
|
|
28
|
+
import { CubeButton } from '../CubeButton.js';
|
|
29
|
+
import { CubeSchemaColumnsTable } from '../CubeSchemaColumnsTable.js';
|
|
30
|
+
import type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
31
|
+
|
|
32
|
+
const INPUT_CLASS =
|
|
33
|
+
'h-7 min-w-0 flex-1 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-input)] px-1 text-base text-[var(--color-text-primary)] disabled:text-[var(--color-text-secondary)]';
|
|
34
|
+
|
|
35
|
+
const CubeFunctionValueInput = observer(
|
|
36
|
+
(props: { draft: CubeFunctionDraft; index: number; readOnly: boolean }) => {
|
|
37
|
+
const { draft, index, readOnly } = props;
|
|
38
|
+
const id = useId();
|
|
39
|
+
const parameter = draft.original.parameters[index];
|
|
40
|
+
if (!parameter) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const error = getFunctionParameterValueError(
|
|
44
|
+
parameter,
|
|
45
|
+
draft.values[index],
|
|
46
|
+
);
|
|
47
|
+
return (
|
|
48
|
+
<div className="flex flex-col gap-0.5">
|
|
49
|
+
<div className="flex items-center gap-2">
|
|
50
|
+
<label
|
|
51
|
+
className="w-32 shrink-0 truncate text-base"
|
|
52
|
+
htmlFor={id}
|
|
53
|
+
title={parameter.name}
|
|
54
|
+
>
|
|
55
|
+
{parameter.name}
|
|
56
|
+
</label>
|
|
57
|
+
<input
|
|
58
|
+
id={id}
|
|
59
|
+
className={INPUT_CLASS}
|
|
60
|
+
placeholder={`${parameter.type.displayName}${parameter.optional ? ', optional' : ''}`}
|
|
61
|
+
disabled={readOnly}
|
|
62
|
+
aria-invalid={error !== undefined}
|
|
63
|
+
value={draft.valueTexts[index] ?? ''}
|
|
64
|
+
onChange={(event) => draft.setValueText(index, event.target.value)}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
{error !== undefined && (
|
|
68
|
+
<span className="pl-[8.5rem] text-sm text-[var(--color-status-error)]">
|
|
69
|
+
{error}
|
|
70
|
+
</span>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A function source (PLAN §6.5): the function, the runtime the cube runs
|
|
79
|
+
* on, a value for each parameter, which Apply stores, its columns, and
|
|
80
|
+
* Refresh, which types it again
|
|
81
|
+
*/
|
|
82
|
+
export const CubeFunctionSourceEditor = observer(
|
|
83
|
+
(props: CubeNodeEditorProps) => {
|
|
84
|
+
const { editorState, readOnly } = props;
|
|
85
|
+
const draft = guaranteeType(props.draft, CubeFunctionDraft);
|
|
86
|
+
const source = guaranteeType(draft.original, FunctionSource);
|
|
87
|
+
const { resolution } = source;
|
|
88
|
+
const refreshing = editorState.isPendingSource(source);
|
|
89
|
+
return (
|
|
90
|
+
<div className="relative flex flex-col gap-2">
|
|
91
|
+
<dl className="grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-base">
|
|
92
|
+
<dt className="text-[var(--color-text-secondary)]">Function</dt>
|
|
93
|
+
<dd className="min-w-0 break-all" title={source.signature}>
|
|
94
|
+
{source.function}
|
|
95
|
+
</dd>
|
|
96
|
+
<dt className="text-[var(--color-text-secondary)]">Runtime</dt>
|
|
97
|
+
<dd className="min-w-0 break-all">
|
|
98
|
+
{editorState.document.context?.runtime ?? ''}
|
|
99
|
+
</dd>
|
|
100
|
+
</dl>
|
|
101
|
+
{source.parameters.map((parameter, index) => (
|
|
102
|
+
<CubeFunctionValueInput
|
|
103
|
+
key={parameter.name}
|
|
104
|
+
draft={draft}
|
|
105
|
+
index={index}
|
|
106
|
+
readOnly={readOnly}
|
|
107
|
+
/>
|
|
108
|
+
))}
|
|
109
|
+
<div className="flex items-center gap-2">
|
|
110
|
+
<CubeButton
|
|
111
|
+
title="Read the function's columns again"
|
|
112
|
+
disabled={refreshing}
|
|
113
|
+
onClick={() => {
|
|
114
|
+
flowResult(editorState.refreshSource(source.id)).catch(
|
|
115
|
+
editorState.host.applicationStore.alertUnhandledError,
|
|
116
|
+
);
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
Refresh
|
|
120
|
+
</CubeButton>
|
|
121
|
+
{refreshing && (
|
|
122
|
+
<span className="text-base text-[var(--color-text-secondary)]">
|
|
123
|
+
{CUBE_PENDING_LABEL.REFRESHING_SOURCE}
|
|
124
|
+
</span>
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
127
|
+
<PanelLoadingIndicator isLoading={refreshing} />
|
|
128
|
+
{resolution.kind === 'resolved' ? (
|
|
129
|
+
<CubeSchemaColumnsTable schema={resolution.schema} />
|
|
130
|
+
) : (
|
|
131
|
+
<div className="whitespace-pre-wrap text-base text-[var(--color-text-secondary)]">
|
|
132
|
+
{resolution.kind === 'failed'
|
|
133
|
+
? resolution.message
|
|
134
|
+
: 'The function has not been typed yet.'}
|
|
135
|
+
</div>
|
|
136
|
+
)}
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
},
|
|
140
|
+
);
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
foldColumnName,
|
|
18
19
|
getDuplicateJoinColumns,
|
|
19
20
|
isJoinType,
|
|
20
21
|
JOIN_TYPE_LABELS,
|
|
21
22
|
JOIN_TYPES,
|
|
23
|
+
type JoinDuplicateFix,
|
|
22
24
|
planJoinDuplicateFix,
|
|
23
25
|
type Schema,
|
|
24
26
|
} from '@finos/legend-cube';
|
|
@@ -32,6 +34,25 @@ import { CubeButton } from '../CubeButton.js';
|
|
|
32
34
|
import { CubeJoinKeyRows } from './CubeJoinKeyRows.js';
|
|
33
35
|
import type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
34
36
|
|
|
37
|
+
/**
|
|
38
|
+
* What the autofix does to a shared column, as the Join editor lists it
|
|
39
|
+
* (PLAN §11.14): its Left rename, or that it keeps its name (a key both sides
|
|
40
|
+
* give as one column), then each Right column of its name in any case and
|
|
41
|
+
* its rename, the Right's name shown when it differs (`id → id_2`)
|
|
42
|
+
*/
|
|
43
|
+
const describeFix = (fix: JoinDuplicateFix, name: string): string => {
|
|
44
|
+
const left = fix.left.find(({ from }) => from === name);
|
|
45
|
+
const rights = fix.right.filter(
|
|
46
|
+
({ from }) => foldColumnName(from) === foldColumnName(name),
|
|
47
|
+
);
|
|
48
|
+
return [
|
|
49
|
+
left ? `${name} → ${left.to} (Left)` : `${name} kept (Left)`,
|
|
50
|
+
...rights.map(({ from, to }) =>
|
|
51
|
+
from === name ? `${to} (Right)` : `${from} → ${to} (Right)`,
|
|
52
|
+
),
|
|
53
|
+
].join(', ');
|
|
54
|
+
};
|
|
55
|
+
|
|
35
56
|
/**
|
|
36
57
|
* The Join editor (spec §17.6): the join type, pairs of key columns
|
|
37
58
|
* (`CubeJoinKeyRows`), and Swap Inputs.
|
|
@@ -99,11 +120,9 @@ export const CubeJoinEditor = observer((props: CubeNodeEditorProps) => {
|
|
|
99
120
|
both:
|
|
100
121
|
</div>
|
|
101
122
|
<ul aria-label="Columns in both inputs">
|
|
102
|
-
{duplicates.map((name
|
|
123
|
+
{duplicates.map((name) => (
|
|
103
124
|
<li key={name} className="break-all font-mono">
|
|
104
|
-
{fix
|
|
105
|
-
? `${name} → ${fix.left[index]?.to} (Left), ${fix.right[index]?.to} (Right)`
|
|
106
|
-
: name}
|
|
125
|
+
{fix ? describeFix(fix, name) : name}
|
|
107
126
|
</li>
|
|
108
127
|
))}
|
|
109
128
|
</ul>
|
|
@@ -27,9 +27,12 @@ import { observer } from 'mobx-react-lite';
|
|
|
27
27
|
import { useEffect, useId, useRef } from 'react';
|
|
28
28
|
import {
|
|
29
29
|
CUBE_NODE_HELP_TEXT,
|
|
30
|
+
RUN_THIS_STEP_LABEL,
|
|
31
|
+
RUNNING_NODE_LABEL,
|
|
30
32
|
SELECT_NODE_TOOLTIP,
|
|
31
33
|
} from '../../__lib__/LegendCubeHelpText.js';
|
|
32
34
|
import {
|
|
35
|
+
getCubeNodeBadge,
|
|
33
36
|
READ_ONLY_CUBE_TITLE,
|
|
34
37
|
toEditorTitle,
|
|
35
38
|
} from '../../__lib__/LegendCubeLabels.js';
|
|
@@ -48,7 +51,8 @@ const validateEdited = (
|
|
|
48
51
|
): string[] => {
|
|
49
52
|
const errors: string[] = [];
|
|
50
53
|
node.validate(inputSchemas, errors);
|
|
51
|
-
// waiting for the engine to type an Extend
|
|
54
|
+
// waiting for the engine to type an Extend, or check a filter's condition,
|
|
55
|
+
// is no problem (PLAN §11.7, §11.11)
|
|
52
56
|
return [...new Set(errors)].filter((error) => !isTypingError(error));
|
|
53
57
|
};
|
|
54
58
|
|
|
@@ -116,9 +120,15 @@ export const CubeNodeEditorPanel = observer(
|
|
|
116
120
|
const isEditable = CUBE_NODE_DRAFT_FACTORIES.has(node.type);
|
|
117
121
|
// a draft that waits, e.g. on a Validate, says why in place of its problems
|
|
118
122
|
const waiting = draft.applyDisabledReason;
|
|
123
|
+
// the node's own, then those of the database it runs on (PLAN §11.11)
|
|
119
124
|
const problems =
|
|
120
125
|
isEditable && !inputProblems.length && waiting === undefined
|
|
121
|
-
?
|
|
126
|
+
? [
|
|
127
|
+
...new Set([
|
|
128
|
+
...validateEdited(edited, inputSchemas),
|
|
129
|
+
...editorState.getNodeDatabaseProblems(query, edited),
|
|
130
|
+
]),
|
|
131
|
+
]
|
|
122
132
|
: [];
|
|
123
133
|
const warnings = editorState.getNodeWarnings(node);
|
|
124
134
|
return (
|
|
@@ -143,9 +153,9 @@ export const CubeNodeEditorPanel = observer(
|
|
|
143
153
|
<span className="shrink-0 text-base text-[var(--color-text-muted)]">
|
|
144
154
|
{node.id}
|
|
145
155
|
</span>
|
|
146
|
-
{definition
|
|
156
|
+
{definition && getCubeNodeBadge(definition) && (
|
|
147
157
|
<span className="shrink-0 rounded-sm bg-[var(--color-accent)] px-1 text-xs font-medium text-[var(--color-text-on-accent)]">
|
|
148
|
-
|
|
158
|
+
{getCubeNodeBadge(definition)}
|
|
149
159
|
</span>
|
|
150
160
|
)}
|
|
151
161
|
<span
|
|
@@ -162,10 +172,10 @@ export const CubeNodeEditorPanel = observer(
|
|
|
162
172
|
<span className="flex-1" />
|
|
163
173
|
{isCapture ? (
|
|
164
174
|
<span
|
|
165
|
-
className="shrink-0 text-
|
|
166
|
-
title=
|
|
175
|
+
className="shrink-0 rounded-sm bg-[var(--color-accent)] px-1 text-sm font-medium text-[var(--color-text-on-accent)]"
|
|
176
|
+
title="This is the step that runs: Execute shows its rows"
|
|
167
177
|
>
|
|
168
|
-
|
|
178
|
+
{`▶ ${RUNNING_NODE_LABEL}`}
|
|
169
179
|
</span>
|
|
170
180
|
) : (
|
|
171
181
|
<button
|
|
@@ -173,7 +183,7 @@ export const CubeNodeEditorPanel = observer(
|
|
|
173
183
|
title={SELECT_NODE_TOOLTIP}
|
|
174
184
|
onClick={() => editorState.select(node.id)}
|
|
175
185
|
>
|
|
176
|
-
|
|
186
|
+
{RUN_THIS_STEP_LABEL}
|
|
177
187
|
</button>
|
|
178
188
|
)}
|
|
179
189
|
<button
|
|
@@ -259,14 +269,16 @@ export const CubeNodeEditorPanel = observer(
|
|
|
259
269
|
readOnly
|
|
260
270
|
? READ_ONLY_CUBE_TITLE
|
|
261
271
|
: (draft.applyDisabledReason ??
|
|
262
|
-
'Store the changes
|
|
272
|
+
'Store the changes as one step to undo, and close')
|
|
263
273
|
}
|
|
264
274
|
disabled={
|
|
265
275
|
readOnly ||
|
|
266
276
|
!nodeEditor.hasChanges ||
|
|
267
277
|
draft.applyDisabledReason !== undefined
|
|
268
278
|
}
|
|
269
|
-
|
|
279
|
+
// Apply closes, as the other ways out but Cancel do (UX
|
|
280
|
+
// audit B4, user, 2026-10-11)
|
|
281
|
+
onClick={() => closing(() => nodeEditor.finish())}
|
|
270
282
|
>
|
|
271
283
|
Apply
|
|
272
284
|
</CubeButton>
|
|
@@ -37,7 +37,11 @@ import { useCubeNodeEditorDismiss } from './useCubeNodeEditorDismiss.js';
|
|
|
37
37
|
*/
|
|
38
38
|
export const CUBE_NODE_EDITOR_WIDTH = 432;
|
|
39
39
|
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Above the canvas and the grid, below MUI's dialogs (1300), so a dialog
|
|
42
|
+
* opened from the editor covers it; inside the dialog that hosts the page,
|
|
43
|
+
* if one does, so the page's own dialog doesn't
|
|
44
|
+
*/
|
|
41
45
|
export const CUBE_NODE_EDITOR_Z_INDEX = 1250;
|
|
42
46
|
|
|
43
47
|
/** The gap between the node and its editor, and between the editor and the window's edges */
|
|
@@ -157,6 +161,10 @@ export const CubeNodeEditorPopper = observer(
|
|
|
157
161
|
role="presentation"
|
|
158
162
|
popperRef={popperRef}
|
|
159
163
|
anchorEl={anchor}
|
|
164
|
+
// a page hosted in a dialog, as Studio hosts Cube, keeps the editor
|
|
165
|
+
// in the dialog's layer, above the page: on the body, under the
|
|
166
|
+
// dialogs' z-index, the dialog would hide it
|
|
167
|
+
container={canvas.closest<HTMLElement>('.MuiDialog-root')}
|
|
160
168
|
placement="bottom"
|
|
161
169
|
modifiers={MODIFIERS}
|
|
162
170
|
style={{
|
|
@@ -21,8 +21,11 @@ import {
|
|
|
21
21
|
IngestDatasetSource,
|
|
22
22
|
Distinct,
|
|
23
23
|
Drop,
|
|
24
|
+
ExpressionFilter,
|
|
25
|
+
Pivot,
|
|
24
26
|
Extend,
|
|
25
27
|
Filter,
|
|
28
|
+
FunctionSource,
|
|
26
29
|
Group,
|
|
27
30
|
Join,
|
|
28
31
|
Limit,
|
|
@@ -31,6 +34,7 @@ import {
|
|
|
31
34
|
Rename,
|
|
32
35
|
Restrict,
|
|
33
36
|
type Schema,
|
|
37
|
+
ServiceSource,
|
|
34
38
|
Slice,
|
|
35
39
|
Sort,
|
|
36
40
|
} from '@finos/legend-cube';
|
|
@@ -38,8 +42,12 @@ import type { CubeEditorState } from '../../stores/CubeEditorState.js';
|
|
|
38
42
|
import type { CubeNodeDraft } from '../../stores/editors/CubeNodeDraft.js';
|
|
39
43
|
import { CubeConcatEditor } from './CubeConcatEditor.js';
|
|
40
44
|
import { CubeDataProductSourceEditor } from './CubeDataProductSourceEditor.js';
|
|
45
|
+
import { CubeExpressionFilterEditor } from './CubeExpressionFilterEditor.js';
|
|
46
|
+
import { CubePivotEditor } from './CubePivotEditor.js';
|
|
41
47
|
import { CubeDifferenceEditor } from './CubeDifferenceEditor.js';
|
|
42
48
|
import { CubeIngestSourceEditor } from './CubeIngestSourceEditor.js';
|
|
49
|
+
import { CubeServiceSourceEditor } from './CubeServiceSourceEditor.js';
|
|
50
|
+
import { CubeFunctionSourceEditor } from './CubeFunctionSourceEditor.js';
|
|
43
51
|
import { CubeDistinctEditor } from './CubeDistinctEditor.js';
|
|
44
52
|
import { CubeExtendEditor } from './CubeExtendEditor.js';
|
|
45
53
|
import { CubeFilterEditor } from './CubeFilterEditor.js';
|
|
@@ -83,11 +91,15 @@ export const CUBE_NODE_EDITORS: ReadonlyMap<
|
|
|
83
91
|
React.FC<CubeNodeEditorProps>
|
|
84
92
|
> = new Map<string, React.FC<CubeNodeEditorProps>>([
|
|
85
93
|
[RelationalTableSource.TYPE, CubeSourceEditor],
|
|
94
|
+
[FunctionSource.TYPE, CubeFunctionSourceEditor],
|
|
86
95
|
[DataProductAccessPointSource.TYPE, CubeDataProductSourceEditor],
|
|
87
96
|
[IngestDatasetSource.TYPE, CubeIngestSourceEditor],
|
|
97
|
+
[ServiceSource.TYPE, CubeServiceSourceEditor],
|
|
88
98
|
[Sort.TYPE, CubeSortEditor],
|
|
89
99
|
[Group.TYPE, CubeGroupEditor],
|
|
90
100
|
[Filter.TYPE, CubeFilterEditor],
|
|
101
|
+
[ExpressionFilter.TYPE, CubeExpressionFilterEditor],
|
|
102
|
+
[Pivot.TYPE, CubePivotEditor],
|
|
91
103
|
[Restrict.TYPE, CubeRestrictEditor],
|
|
92
104
|
[Rename.TYPE, CubeRenameEditor],
|
|
93
105
|
[Distinct.TYPE, CubeDistinctEditor],
|