@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeConcatEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeConcatEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAGlB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"CubeConcatEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeConcatEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAGlB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,IAAI,EA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,YAE9B,uBAAuB,CAAC,OAAO,CAAC,GAC7B,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
17
|
+
/**
|
|
18
|
+
* The Filter by Expression editor (PLAN §11.11): the condition's code in a
|
|
19
|
+
* code editor, Validate (F10), which the engine does, and the input's
|
|
20
|
+
* columns, which a click writes at the end of the code.
|
|
21
|
+
*/
|
|
22
|
+
export declare const CubeExpressionFilterEditor: ((props: CubeNodeEditorProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=CubeExpressionFilterEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeExpressionFilterEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeExpressionFilterEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAsBH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA8DvE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,WAC7B,mBAAmB;;CAwF5B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { CompressIcon, ExpandIcon } from '@finos/legend-art';
|
|
18
|
+
import { CompilationError, SourceInformation } from '@finos/legend-graph';
|
|
19
|
+
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
|
20
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
21
|
+
import { flowResult } from 'mobx';
|
|
22
|
+
import { observer } from 'mobx-react-lite';
|
|
23
|
+
import { useState } from 'react';
|
|
24
|
+
import { EXPRESSION_FILTER_EDITOR_NOTES, getExactColumnTypeLabel, READ_ONLY_CUBE_TITLE, } from '../../__lib__/LegendCubeLabels.js';
|
|
25
|
+
import { CubeExpressionFilterDraft, } from '../../stores/editors/CubeExpressionFilterDraft.js';
|
|
26
|
+
import { CubeButton } from '../CubeButton.js';
|
|
27
|
+
import { CubeColumnTypeIcon } from './CubeColumnPicker.js';
|
|
28
|
+
import { columnAccessOf } from './CubeExtendEditor.js';
|
|
29
|
+
/** The code editor's language: legend-code-editor's `CODE_EDITOR_LANGUAGE.PURE` */
|
|
30
|
+
const PURE = 'pure';
|
|
31
|
+
/** The error the code editor marks, from the condition's problem located in its code */
|
|
32
|
+
const markerOf = (problem) => {
|
|
33
|
+
const location = problem?.location;
|
|
34
|
+
if (!problem || !location) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const error = new CompilationError(problem.message);
|
|
38
|
+
error.sourceInformation = new SourceInformation(location.sourceId, location.startLine, location.startColumn, location.endLine, location.endColumn);
|
|
39
|
+
return error;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* What the editor says under the code: its problem, but one Cube refused,
|
|
43
|
+
* which the panel's problems show; that it is checked, or that it waits
|
|
44
|
+
*/
|
|
45
|
+
const CubeConditionStatus = observer((props) => {
|
|
46
|
+
const { draft } = props;
|
|
47
|
+
const { problem } = draft;
|
|
48
|
+
if (problem?.refused) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
if (problem) {
|
|
52
|
+
return (_jsxs("div", { className: "text-sm text-[var(--color-status-error)]", children: [_jsx("div", { children: problem.message }), problem.hint && (_jsx("div", { className: "text-[var(--color-text-secondary)]", children: problem.hint }))] }));
|
|
53
|
+
}
|
|
54
|
+
if (!draft.isValidated) {
|
|
55
|
+
return (_jsx("div", { className: "text-sm text-[var(--color-text-muted)]", children: "Not validated yet" }));
|
|
56
|
+
}
|
|
57
|
+
return draft.isChecked ? (_jsx("div", { className: "text-sm text-[var(--color-text-secondary)]", children: "One Boolean of a row: the rows for which it is true are kept" })) : null;
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* The Filter by Expression editor (PLAN §11.11): the condition's code in a
|
|
61
|
+
* code editor, Validate (F10), which the engine does, and the input's
|
|
62
|
+
* columns, which a click writes at the end of the code.
|
|
63
|
+
*/
|
|
64
|
+
export const CubeExpressionFilterEditor = observer((props) => {
|
|
65
|
+
const { inputSchemas, readOnly } = props;
|
|
66
|
+
const draft = guaranteeType(props.draft, CubeExpressionFilterDraft);
|
|
67
|
+
const [schema] = inputSchemas;
|
|
68
|
+
const [expanded, setExpanded] = useState(false);
|
|
69
|
+
const disabled = readOnly || draft.validating;
|
|
70
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 text-base", children: [_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "flex-1", children: "Condition" }), _jsx("button", { className: "flex h-6 w-6 items-center justify-center text-[var(--color-text-secondary)]", "aria-label": "Expand the condition", title: expanded ? 'Show fewer lines' : 'Show more lines', onClick: () => setExpanded(!expanded), children: expanded ? _jsx(CompressIcon, {}) : _jsx(ExpandIcon, {}) })] }), _jsx("div", { "aria-label": "Condition", className: "overflow-hidden rounded-sm border border-[var(--color-border-default)]", style: { height: expanded ? 240 : 96 }, children: _jsx(CodeEditor, { inputValue: draft.code, updateInput: (code) => draft.setCode(code), language: PURE, isReadOnly: disabled, hideMinimap: true, hideGutter: true, hideActionBar: true, error: markerOf(draft.problem), extraEditorOptions: {
|
|
71
|
+
lineNumbers: 'off',
|
|
72
|
+
wordWrap: 'on',
|
|
73
|
+
scrollBeyondLastLine: false,
|
|
74
|
+
} }) }), _jsx(CubeConditionStatus, { draft: draft }), _jsx("div", { className: "flex items-center gap-2", children: _jsx(CubeButton, { primary: !draft.isValidated, title: readOnly
|
|
75
|
+
? READ_ONLY_CUBE_TITLE
|
|
76
|
+
: "Check the condition with the engine, and plan it for this cube's database (F10)", disabled: disabled, onClick: () => {
|
|
77
|
+
flowResult(draft.validate()).catch(props.editorState.host.applicationStore.alertUnhandledError);
|
|
78
|
+
}, children: draft.validating ? 'Validating…' : 'Validate' }) }), _jsx("span", { children: "Input columns" }), _jsx("ul", { "aria-label": "Input columns", className: "flex flex-wrap gap-1", children: schema.columns.map((column) => (_jsx("li", { children: _jsxs("button", { 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)]", title: `Write ${columnAccessOf(column.name)} at the end of the condition (${getExactColumnTypeLabel(column)})`, disabled: disabled, onClick: () => {
|
|
79
|
+
const separator = /\s$/u.test(draft.code) ? '' : ' ';
|
|
80
|
+
draft.setCode(`${draft.code}${separator}${columnAccessOf(column.name)}`);
|
|
81
|
+
}, children: [_jsx(CubeColumnTypeIcon, { type: column.type }), column.name] }) }, column.name))) }), _jsx("ul", { className: "flex list-disc flex-col gap-1 pl-4 text-sm text-[var(--color-text-secondary)]", children: EXPRESSION_FILTER_EDITOR_NOTES.map((note) => (_jsx("li", { children: note }, note))) })] }));
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=CubeExpressionFilterEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeExpressionFilterEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeExpressionFilterEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,yBAAyB,GAC1B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,mFAAmF;AACnF,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,wFAAwF;AACxF,MAAM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Ac,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAC1D,CAAC;wBACJ,CAAC,aAED,KAAC,kBAAkB,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAI,EACxC,MAAM,CAAC,IAAI,IACL,IAdF,MAAM,CAAC,IAAI,CAef,CACN,CAAC,GACC,EACL,aAAI,SAAS,EAAC,+EAA+E,YAC1F,8BAA8B,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC5C,uBAAgB,IAAI,IAAX,IAAI,CAAa,CAC3B,CAAC,GACC,IACD,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
17
|
+
/** How an expression reads a column: `$x.NAME`, or `$x.'a name'` for one that isn't an identifier */
|
|
18
|
+
export declare const columnAccessOf: (name: string) => string;
|
|
17
19
|
/**
|
|
18
20
|
* The Extend editor (spec §17.6, PLAN §11.7): a row per new column, its name
|
|
19
21
|
* and its expression in a code editor, Validate (F10), which the engine does,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeExtendEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeExtendEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"CubeExtendEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeExtendEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAKvE,qGAAqG;AACrG,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,MAGoB,CAAC;AA2InE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WAAoB,mBAAmB;;CA2ElE,CAAC"}
|
|
@@ -21,14 +21,14 @@ import { guaranteeType } from '@finos/legend-shared';
|
|
|
21
21
|
import { flowResult } from 'mobx';
|
|
22
22
|
import { observer } from 'mobx-react-lite';
|
|
23
23
|
import { useState } from 'react';
|
|
24
|
-
import { COLUMN_NAME_RULES_HINT, EXTEND_EDITOR_NOTES,
|
|
24
|
+
import { COLUMN_NAME_RULES_HINT, EXTEND_EDITOR_NOTES, getExactColumnTypeLabel, READ_ONLY_CUBE_TITLE, } from '../../__lib__/LegendCubeLabels.js';
|
|
25
25
|
import { CubeExtendDraft, } from '../../stores/editors/CubeExtendDraft.js';
|
|
26
26
|
import { CubeButton } from '../CubeButton.js';
|
|
27
27
|
import { CubeColumnTypeIcon } from './CubeColumnPicker.js';
|
|
28
28
|
/** The code editor's language: legend-code-editor's `CODE_EDITOR_LANGUAGE.PURE` */
|
|
29
29
|
const PURE = 'pure';
|
|
30
30
|
/** How an expression reads a column: `$x.NAME`, or `$x.'a name'` for one that isn't an identifier */
|
|
31
|
-
const columnAccessOf = (name) => /^[A-Za-z_][A-Za-z0-9_]*$/u.test(name)
|
|
31
|
+
export const columnAccessOf = (name) => /^[A-Za-z_][A-Za-z0-9_]*$/u.test(name)
|
|
32
32
|
? `$x.${name}`
|
|
33
33
|
: `$x.'${name.replace(/\\/gu, '\\\\').replace(/'/gu, "\\'")}'`;
|
|
34
34
|
/** The error the code editor marks, from a row's problem located in its code */
|
|
@@ -76,7 +76,7 @@ export const CubeExtendEditor = observer((props) => {
|
|
|
76
76
|
const target = draft.rows.find((row) => row.key === focusedKey) ?? draft.rows.at(-1);
|
|
77
77
|
return (_jsxs("div", { className: "flex flex-col gap-2 text-base", children: [_jsx("span", { children: "New columns" }), _jsx("ul", { "aria-label": "New columns", children: draft.rows.map((row, index) => (_jsx(CubeExtendRowEditor, { draft: draft, row: row, position: index + 1, count: draft.rows.length, readOnly: readOnly, onFocus: () => setFocusedKey(row.key) }, row.key))) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CubeButton, { title: readOnly ? READ_ONLY_CUBE_TITLE : 'Add a new column', disabled: readOnly || draft.validating, onClick: () => draft.addRow(), children: "Add column" }), _jsx(CubeButton, { primary: !draft.isValidated, title: "Check the expressions with the engine, type them, and plan them for this cube's database (F10)", disabled: readOnly || draft.validating, onClick: () => {
|
|
78
78
|
flowResult(draft.validate()).catch(props.editorState.host.applicationStore.alertUnhandledError);
|
|
79
|
-
}, children: draft.validating ? 'Validating…' : 'Validate' })] }), _jsx("span", { children: "Input columns" }), _jsx("ul", { "aria-label": "Input columns", className: "flex flex-wrap gap-1", children: schema.columns.map((column) => (_jsx("li", { children: _jsxs("button", { 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)]", title: `Write ${columnAccessOf(column.name)} at the end of the expression last used (${
|
|
79
|
+
}, children: draft.validating ? 'Validating…' : 'Validate' })] }), _jsx("span", { children: "Input columns" }), _jsx("ul", { "aria-label": "Input columns", className: "flex flex-wrap gap-1", children: schema.columns.map((column) => (_jsx("li", { children: _jsxs("button", { 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)]", title: `Write ${columnAccessOf(column.name)} at the end of the expression last used (${getExactColumnTypeLabel(column)})`, disabled: readOnly || draft.validating || !target, onClick: () => {
|
|
80
80
|
if (target) {
|
|
81
81
|
const separator = /\s$/u.test(target.code) ? '' : ' ';
|
|
82
82
|
draft.setCode(target.key, `${target.code}${separator}${columnAccessOf(column.name)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeExtendEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeExtendEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,aAAa,EACb,WAAW,EACX,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AC,MAAM,EACjD,OAAO,EAAE,GAAG,EAAE;4BACZ,IAAI,MAAM,EAAE,CAAC;gCACX,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;gCACtD,KAAK,CAAC,OAAO,CACX,MAAM,CAAC,GAAG,EACV,GAAG,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAC3D,CAAC;4BACJ,CAAC;wBACH,CAAC,aAED,KAAC,kBAAkB,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAI,EACxC,MAAM,CAAC,IAAI,IACL,IAjBF,MAAM,CAAC,IAAI,CAkBf,CACN,CAAC,GACC,EACL,aAAI,SAAS,EAAC,+EAA+E,YAC1F,CAAC,GAAG,mBAAmB,EAAE,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC9D,uBAAgB,IAAI,IAAX,IAAI,CAAa,CAC3B,CAAC,GACC,IACD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeFilterEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeFilterEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeFilterEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeFilterEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiCH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAwPvE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,WAAoB,mBAAmB;;CA0BlE,CAAC"}
|
|
@@ -15,9 +15,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { clsx, TimesIcon } from '@finos/legend-art';
|
|
18
|
-
import { ColumnComparisonFilter, CompositeFilter, CompositeFilterOperator, FILTER_OPERATOR_DESCRIPTIONS, getAvailableOperators, getFilterValueShape, isDateOrTimestampType, isExactFloatComparison, isFilterOperator, MESSAGE_FILTER_UNSUPPORTED, NEGATIVE_OPERATORS, NotFilter, } from '@finos/legend-cube';
|
|
19
|
-
import { guaranteeType } from '@finos/legend-shared';
|
|
18
|
+
import { ColumnComparisonFilter, CompositeFilter, CompositeFilterOperator, FILTER_OPERATOR_DESCRIPTIONS, findPatternWildcardOperator, getAvailableOperators, getFilterValueShape, isDateOrTimestampType, isExactFloatComparison, isFilterOperator, MESSAGE_FILTER_UNSUPPORTED, NEGATIVE_OPERATORS, NotFilter, } from '@finos/legend-cube';
|
|
19
|
+
import { guaranteeType, noop } from '@finos/legend-shared';
|
|
20
|
+
import { flowResult } from 'mobx';
|
|
20
21
|
import { observer } from 'mobx-react-lite';
|
|
22
|
+
import { useEffect } from 'react';
|
|
21
23
|
import { DATE_OR_TIMESTAMP_WARNING, FILTER_FLOAT_COMPARISON_HINT, FILTER_NULL_NOTE, } from '../../__lib__/LegendCubeLabels.js';
|
|
22
24
|
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
23
25
|
import { CubeFilterDraft } from '../../stores/editors/CubeFilterDraft.js';
|
|
@@ -83,8 +85,17 @@ const CubeFilterGroup = observer((props) => {
|
|
|
83
85
|
* kept, marked, to be fixed. Blank conditions are not stored.
|
|
84
86
|
*/
|
|
85
87
|
export const CubeFilterEditor = observer((props) => {
|
|
88
|
+
const { editorState } = props;
|
|
86
89
|
const draft = guaranteeType(props.draft, CubeFilterDraft);
|
|
87
90
|
const [schema] = props.inputSchemas;
|
|
91
|
+
// a pattern given % or _ is refused on some databases, which the model's
|
|
92
|
+
// outline tells (PLAN §11.11)
|
|
93
|
+
const givesWildcard = findPatternWildcardOperator(draft.tree) !== undefined;
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (givesWildcard) {
|
|
96
|
+
flowResult(editorState.loadModelOutline()).catch(noop());
|
|
97
|
+
}
|
|
98
|
+
}, [editorState, givesWildcard]);
|
|
88
99
|
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(CubeFilterGroup, { draft: draft, schema: schema, readOnly: props.readOnly, group: draft.tree, isTop: true }), _jsx("div", { className: "text-sm text-[var(--color-text-secondary)]", children: FILTER_NULL_NOTE })] }));
|
|
89
100
|
});
|
|
90
101
|
//# sourceMappingURL=CubeFilterEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeFilterEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeFilterEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAE5B,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,SAAS,GAEV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"CubeFilterEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeFilterEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAE5B,2BAA2B,EAC3B,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,0BAA0B,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AU,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;IACjC,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,aAClC,KAAC,eAAe,IACd,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,KAAK,EAAE,IAAI,GACX,EACF,cAAK,SAAS,EAAC,4CAA4C,YACxD,gBAAgB,GACb,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
17
|
+
/**
|
|
18
|
+
* A function source (PLAN §6.5): the function, the runtime the cube runs
|
|
19
|
+
* on, a value for each parameter, which Apply stores, its columns, and
|
|
20
|
+
* Refresh, which types it again
|
|
21
|
+
*/
|
|
22
|
+
export declare const CubeFunctionSourceEditor: ((props: CubeNodeEditorProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=CubeFunctionSourceEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeFunctionSourceEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeFunctionSourceEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA+CvE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,WAC3B,mBAAmB;;CAyD5B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FunctionSource, getFunctionParameterValueError, } from '@finos/legend-cube';
|
|
18
|
+
import { PanelLoadingIndicator } from '@finos/legend-art';
|
|
19
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
20
|
+
import { flowResult } from 'mobx';
|
|
21
|
+
import { observer } from 'mobx-react-lite';
|
|
22
|
+
import { useId } from 'react';
|
|
23
|
+
import { CUBE_PENDING_LABEL } from '../../__lib__/LegendCubeLabels.js';
|
|
24
|
+
import { CubeFunctionDraft } from '../../stores/editors/CubeFunctionDraft.js';
|
|
25
|
+
import { CubeButton } from '../CubeButton.js';
|
|
26
|
+
import { CubeSchemaColumnsTable } from '../CubeSchemaColumnsTable.js';
|
|
27
|
+
const INPUT_CLASS = '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)]';
|
|
28
|
+
const CubeFunctionValueInput = observer((props) => {
|
|
29
|
+
const { draft, index, readOnly } = props;
|
|
30
|
+
const id = useId();
|
|
31
|
+
const parameter = draft.original.parameters[index];
|
|
32
|
+
if (!parameter) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const error = getFunctionParameterValueError(parameter, draft.values[index]);
|
|
36
|
+
return (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("label", { className: "w-32 shrink-0 truncate text-base", htmlFor: id, title: parameter.name, children: parameter.name }), _jsx("input", { id: id, className: INPUT_CLASS, placeholder: `${parameter.type.displayName}${parameter.optional ? ', optional' : ''}`, disabled: readOnly, "aria-invalid": error !== undefined, value: draft.valueTexts[index] ?? '', onChange: (event) => draft.setValueText(index, event.target.value) })] }), error !== undefined && (_jsx("span", { className: "pl-[8.5rem] text-sm text-[var(--color-status-error)]", children: error }))] }));
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* A function source (PLAN §6.5): the function, the runtime the cube runs
|
|
40
|
+
* on, a value for each parameter, which Apply stores, its columns, and
|
|
41
|
+
* Refresh, which types it again
|
|
42
|
+
*/
|
|
43
|
+
export const CubeFunctionSourceEditor = observer((props) => {
|
|
44
|
+
const { editorState, readOnly } = props;
|
|
45
|
+
const draft = guaranteeType(props.draft, CubeFunctionDraft);
|
|
46
|
+
const source = guaranteeType(draft.original, FunctionSource);
|
|
47
|
+
const { resolution } = source;
|
|
48
|
+
const refreshing = editorState.isPendingSource(source);
|
|
49
|
+
return (_jsxs("div", { className: "relative flex flex-col gap-2", children: [_jsxs("dl", { className: "grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-base", children: [_jsx("dt", { className: "text-[var(--color-text-secondary)]", children: "Function" }), _jsx("dd", { className: "min-w-0 break-all", title: source.signature, children: source.function }), _jsx("dt", { className: "text-[var(--color-text-secondary)]", children: "Runtime" }), _jsx("dd", { className: "min-w-0 break-all", children: editorState.document.context?.runtime ?? '' })] }), source.parameters.map((parameter, index) => (_jsx(CubeFunctionValueInput, { draft: draft, index: index, readOnly: readOnly }, parameter.name))), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CubeButton, { title: "Read the function's columns again", disabled: refreshing, onClick: () => {
|
|
50
|
+
flowResult(editorState.refreshSource(source.id)).catch(editorState.host.applicationStore.alertUnhandledError);
|
|
51
|
+
}, children: "Refresh" }), refreshing && (_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.REFRESHING_SOURCE }))] }), _jsx(PanelLoadingIndicator, { isLoading: refreshing }), resolution.kind === 'resolved' ? (_jsx(CubeSchemaColumnsTable, { schema: resolution.schema })) : (_jsx("div", { className: "whitespace-pre-wrap text-base text-[var(--color-text-secondary)]", children: resolution.kind === 'failed'
|
|
52
|
+
? resolution.message
|
|
53
|
+
: 'The function has not been typed yet.' }))] }));
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=CubeFunctionSourceEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeFunctionSourceEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeFunctionSourceEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EACd,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAA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E,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,IAHb,SAAS,CAAC,IAAI,CAInB,CACH,CAAC,EACF,eAAK,SAAS,EAAC,yBAAyB,aACtC,KAAC,UAAU,IACT,KAAK,EAAC,mCAAmC,EACzC,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE;4BACZ,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CACpD,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CACtD,CAAC;wBACJ,CAAC,wBAGU,EACZ,UAAU,IAAI,CACb,eAAM,SAAS,EAAC,8CAA8C,YAC3D,kBAAkB,CAAC,iBAAiB,GAChC,CACR,IACG,EACN,KAAC,qBAAqB,IAAC,SAAS,EAAE,UAAU,GAAI,EAC/C,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,CAChC,KAAC,sBAAsB,IAAC,MAAM,EAAE,UAAU,CAAC,MAAM,GAAI,CACtD,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,kEAAkE,YAC9E,UAAU,CAAC,IAAI,KAAK,QAAQ;oBAC3B,CAAC,CAAC,UAAU,CAAC,OAAO;oBACpB,CAAC,CAAC,sCAAsC,GACtC,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeJoinEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeJoinEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeJoinEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeJoinEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAoBH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAqBvE;;;GAGG;AACH,eAAO,MAAM,cAAc,WAAoB,mBAAmB;;CAsFhE,CAAC"}
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { getDuplicateJoinColumns, isJoinType, JOIN_TYPE_LABELS, JOIN_TYPES, planJoinDuplicateFix, } from '@finos/legend-cube';
|
|
17
|
+
import { foldColumnName, getDuplicateJoinColumns, isJoinType, JOIN_TYPE_LABELS, JOIN_TYPES, planJoinDuplicateFix, } from '@finos/legend-cube';
|
|
18
18
|
import { guaranteeType, noop } from '@finos/legend-shared';
|
|
19
19
|
import { flowResult } from 'mobx';
|
|
20
20
|
import { observer } from 'mobx-react-lite';
|
|
@@ -23,6 +23,20 @@ import { READ_ONLY_CUBE_TITLE } from '../../__lib__/LegendCubeLabels.js';
|
|
|
23
23
|
import { CubeJoinDraft } from '../../stores/editors/CubeJoinDraft.js';
|
|
24
24
|
import { CubeButton } from '../CubeButton.js';
|
|
25
25
|
import { CubeJoinKeyRows } from './CubeJoinKeyRows.js';
|
|
26
|
+
/**
|
|
27
|
+
* What the autofix does to a shared column, as the Join editor lists it
|
|
28
|
+
* (PLAN §11.14): its Left rename, or that it keeps its name (a key both sides
|
|
29
|
+
* give as one column), then each Right column of its name in any case and
|
|
30
|
+
* its rename, the Right's name shown when it differs (`id → id_2`)
|
|
31
|
+
*/
|
|
32
|
+
const describeFix = (fix, name) => {
|
|
33
|
+
const left = fix.left.find(({ from }) => from === name);
|
|
34
|
+
const rights = fix.right.filter(({ from }) => foldColumnName(from) === foldColumnName(name));
|
|
35
|
+
return [
|
|
36
|
+
left ? `${name} → ${left.to} (Left)` : `${name} kept (Left)`,
|
|
37
|
+
...rights.map(({ from, to }) => from === name ? `${to} (Right)` : `${from} → ${to} (Right)`),
|
|
38
|
+
].join(', ');
|
|
39
|
+
};
|
|
26
40
|
/**
|
|
27
41
|
* The Join editor (spec §17.6): the join type, pairs of key columns
|
|
28
42
|
* (`CubeJoinKeyRows`), and Swap Inputs.
|
|
@@ -45,9 +59,7 @@ export const CubeJoinEditor = observer((props) => {
|
|
|
45
59
|
if (isJoinType(event.target.value)) {
|
|
46
60
|
draft.setJoinType(event.target.value);
|
|
47
61
|
}
|
|
48
|
-
}, children: JOIN_TYPES.map((joinType) => (_jsx("option", { value: joinType, children: JOIN_TYPE_LABELS[joinType] }, joinType))) })] }), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { title: "Swap the Left and Right inputs; the join columns follow them. Applies your changes too.", disabled: !editorState.nodeEditor.canSwapInputs, onClick: () => editorState.nodeEditor.swapInputs(), children: "Swap Inputs" })] }), _jsx(CubeJoinKeyRows, { editorProps: props, draft: draft, leftSchema: leftSchema, rightSchema: rightSchema }), duplicates.length > 0 && (_jsxs("div", { className: "text-sm text-[var(--color-status-warn)]", children: [_jsx("div", { children: "In both inputs and not joined on, so the output can't keep both:" }), _jsx("ul", { "aria-label": "Columns in both inputs", children: duplicates.map((name
|
|
49
|
-
? `${name} → ${fix.left[index]?.to} (Left), ${fix.right[index]?.to} (Right)`
|
|
50
|
-
: name }, name))) }), _jsx("div", { className: "mt-1", children: _jsx(CubeButton, { title: readOnly
|
|
62
|
+
}, children: JOIN_TYPES.map((joinType) => (_jsx("option", { value: joinType, children: JOIN_TYPE_LABELS[joinType] }, joinType))) })] }), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { title: "Swap the Left and Right inputs; the join columns follow them. Applies your changes too.", disabled: !editorState.nodeEditor.canSwapInputs, onClick: () => editorState.nodeEditor.swapInputs(), children: "Swap Inputs" })] }), _jsx(CubeJoinKeyRows, { editorProps: props, draft: draft, leftSchema: leftSchema, rightSchema: rightSchema }), duplicates.length > 0 && (_jsxs("div", { className: "text-sm text-[var(--color-status-warn)]", children: [_jsx("div", { children: "In both inputs and not joined on, so the output can't keep both:" }), _jsx("ul", { "aria-label": "Columns in both inputs", children: duplicates.map((name) => (_jsx("li", { className: "break-all font-mono", children: fix ? describeFix(fix, name) : name }, name))) }), _jsx("div", { className: "mt-1", children: _jsx(CubeButton, { title: readOnly
|
|
51
63
|
? READ_ONLY_CUBE_TITLE
|
|
52
64
|
: 'Add a Rename before each input that gives these columns new names. Applies your changes too, as one step to undo.', disabled: !editorState.nodeEditor.canRenameDuplicateColumns, onClick: () => editorState.nodeEditor.renameDuplicateColumns(), children: "Rename them" }) })] }))] }));
|
|
53
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeJoinEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeJoinEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,UAAU,
|
|
1
|
+
{"version":3,"file":"CubeJoinEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeJoinEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,UAAU,EAEV,oBAAoB,GAErB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,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AAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,EACD,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CACxB,eAAK,SAAS,EAAC,yCAAyC,aACtD,6FAGM,EACN,2BAAe,wBAAwB,YACpC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,aAAe,SAAS,EAAC,qBAAqB,YAC3C,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAD7B,IAAI,CAER,CACN,CAAC,GACC,EACL,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,UAAU,IACT,KAAK,EACH,QAAQ;gCACN,CAAC,CAAC,oBAAoB;gCACtB,CAAC,CAAC,mHAAmH,EAEzH,QAAQ,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,yBAAyB,EAC3D,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,4BAGnD,GACT,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNodeEditorPanel.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeNodeEditorPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeNodeEditorPanel.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeNodeEditorPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAyBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAmBvE;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,WACtB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CA6NzC,CAAC"}
|
|
@@ -18,8 +18,8 @@ import { QuestionCircleIcon, TimesIcon, WarningIcon } from '@finos/legend-art';
|
|
|
18
18
|
import { isIncompleteError, isSchemasError, isTypingError, UnknownNode, } from '@finos/legend-cube';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
|
20
20
|
import { useEffect, useId, useRef } from 'react';
|
|
21
|
-
import { CUBE_NODE_HELP_TEXT, SELECT_NODE_TOOLTIP, } from '../../__lib__/LegendCubeHelpText.js';
|
|
22
|
-
import { READ_ONLY_CUBE_TITLE, toEditorTitle, } from '../../__lib__/LegendCubeLabels.js';
|
|
21
|
+
import { CUBE_NODE_HELP_TEXT, RUN_THIS_STEP_LABEL, RUNNING_NODE_LABEL, SELECT_NODE_TOOLTIP, } from '../../__lib__/LegendCubeHelpText.js';
|
|
22
|
+
import { getCubeNodeBadge, READ_ONLY_CUBE_TITLE, toEditorTitle, } from '../../__lib__/LegendCubeLabels.js';
|
|
23
23
|
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
24
24
|
import { CUBE_NODE_DRAFT_FACTORIES } from '../../stores/editors/CubeNodeDraftRegistry.js';
|
|
25
25
|
import { CubeButton } from '../CubeButton.js';
|
|
@@ -30,7 +30,8 @@ import { CUBE_NODE_EDITORS } from './CubeNodeEditorRegistry.js';
|
|
|
30
30
|
const validateEdited = (node, inputSchemas) => {
|
|
31
31
|
const errors = [];
|
|
32
32
|
node.validate(inputSchemas, errors);
|
|
33
|
-
// waiting for the engine to type an Extend
|
|
33
|
+
// waiting for the engine to type an Extend, or check a filter's condition,
|
|
34
|
+
// is no problem (PLAN §11.7, §11.11)
|
|
34
35
|
return [...new Set(errors)].filter((error) => !isTypingError(error));
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
@@ -85,14 +86,20 @@ export const CubeNodeEditorPanel = observer((props) => {
|
|
|
85
86
|
const isEditable = CUBE_NODE_DRAFT_FACTORIES.has(node.type);
|
|
86
87
|
// a draft that waits, e.g. on a Validate, says why in place of its problems
|
|
87
88
|
const waiting = draft.applyDisabledReason;
|
|
89
|
+
// the node's own, then those of the database it runs on (PLAN §11.11)
|
|
88
90
|
const problems = isEditable && !inputProblems.length && waiting === undefined
|
|
89
|
-
?
|
|
91
|
+
? [
|
|
92
|
+
...new Set([
|
|
93
|
+
...validateEdited(edited, inputSchemas),
|
|
94
|
+
...editorState.getNodeDatabaseProblems(query, edited),
|
|
95
|
+
]),
|
|
96
|
+
]
|
|
90
97
|
: [];
|
|
91
98
|
const warnings = editorState.getNodeWarnings(node);
|
|
92
99
|
return (_jsxs("div", { ref: rootRef, className: "flex flex-col rounded border border-[var(--color-border-default)] bg-[var(--color-bg-panel)] shadow-lg", role: "dialog", "aria-modal": false,
|
|
93
100
|
// focusable, so opening a node from the keyboard moves into it
|
|
94
|
-
tabIndex: -1, "aria-labelledby": titleId, "data-testid": LEGEND_CUBE_TEST_ID.NODE_EDITOR, children: [_jsxs("div", { className: "flex h-8 shrink-0 items-center gap-2 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2", children: [_jsx(CubeNodeIcon, { icon: definition?.icon, className: "shrink-0 text-[var(--color-text-secondary)]" }), _jsx("span", { id: titleId, className: "min-w-0 truncate text-lg font-medium", children: toEditorTitle(definition?.label ?? 'Unknown') }), _jsx("span", { className: "shrink-0 text-base text-[var(--color-text-muted)]", children: node.id }), definition
|
|
95
|
-
CUBE_NODE_HELP_TEXT[UnknownNode.TYPE], role: "img", "aria-label": "Help", children: _jsx(QuestionCircleIcon, {}) }), _jsx("span", { className: "flex-1" }), isCapture ? (_jsx("span", { className: "shrink-0 text-
|
|
101
|
+
tabIndex: -1, "aria-labelledby": titleId, "data-testid": LEGEND_CUBE_TEST_ID.NODE_EDITOR, children: [_jsxs("div", { className: "flex h-8 shrink-0 items-center gap-2 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2", children: [_jsx(CubeNodeIcon, { icon: definition?.icon, className: "shrink-0 text-[var(--color-text-secondary)]" }), _jsx("span", { id: titleId, className: "min-w-0 truncate text-lg font-medium", children: toEditorTitle(definition?.label ?? 'Unknown') }), _jsx("span", { className: "shrink-0 text-base text-[var(--color-text-muted)]", children: node.id }), definition && getCubeNodeBadge(definition) && (_jsx("span", { className: "shrink-0 rounded-sm bg-[var(--color-accent)] px-1 text-xs font-medium text-[var(--color-text-on-accent)]", children: getCubeNodeBadge(definition) })), _jsx("span", { className: "shrink-0 text-[var(--color-text-secondary)]", title: CUBE_NODE_HELP_TEXT[node.type] ??
|
|
102
|
+
CUBE_NODE_HELP_TEXT[UnknownNode.TYPE], role: "img", "aria-label": "Help", children: _jsx(QuestionCircleIcon, {}) }), _jsx("span", { className: "flex-1" }), isCapture ? (_jsx("span", { className: "shrink-0 rounded-sm bg-[var(--color-accent)] px-1 text-sm font-medium text-[var(--color-text-on-accent)]", title: "This is the step that runs: Execute shows its rows", children: `▶ ${RUNNING_NODE_LABEL}` })) : (_jsx("button", { className: "shrink-0 text-base text-[var(--color-accent)] underline", title: SELECT_NODE_TOOLTIP, onClick: () => editorState.select(node.id), children: RUN_THIS_STEP_LABEL })), _jsx("button", { className: "flex h-6 w-6 shrink-0 items-center justify-center text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]", title: nodeEditor.hasChanges && !readOnly
|
|
96
103
|
? draft.applyDisabledReason !== undefined
|
|
97
104
|
? `Can't close yet: ${draft.applyDisabledReason}, or Cancel`
|
|
98
105
|
: 'Close, applying the changes'
|
|
@@ -103,8 +110,11 @@ export const CubeNodeEditorPanel = observer((props) => {
|
|
|
103
110
|
_jsx("div", { className: "max-h-[56px] shrink-0 overflow-y-auto break-words border-t border-[var(--color-border-default)] px-2 py-1 text-base text-[var(--color-status-error)]", role: "alert", "aria-label": "Problems", children: problems.map((problem) => (_jsx("div", { children: problem }, problem))) })), isEditable && (_jsxs("div", { className: "flex h-10 shrink-0 items-center justify-end gap-2 border-t border-[var(--color-border-default)] px-2", children: [_jsx(CubeButton, { title: "Drop the changes and close", onClick: () => closing(() => nodeEditor.cancel()), children: "Cancel" }), _jsx(CubeButton, { primary: true, title: readOnly
|
|
104
111
|
? READ_ONLY_CUBE_TITLE
|
|
105
112
|
: (draft.applyDisabledReason ??
|
|
106
|
-
'Store the changes
|
|
113
|
+
'Store the changes as one step to undo, and close'), disabled: readOnly ||
|
|
107
114
|
!nodeEditor.hasChanges ||
|
|
108
|
-
draft.applyDisabledReason !== undefined,
|
|
115
|
+
draft.applyDisabledReason !== undefined,
|
|
116
|
+
// Apply closes, as the other ways out but Cancel do (UX
|
|
117
|
+
// audit B4, user, 2026-10-11)
|
|
118
|
+
onClick: () => closing(() => nodeEditor.finish()), children: "Apply" })] }))] }));
|
|
109
119
|
});
|
|
110
120
|
//# sourceMappingURL=CubeNodeEditorPanel.js.map
|