@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":"CubeResultGrid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeResultGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeResultGrid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeResultGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAIjB,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,8BAA8B,CAAC;AAStC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAM9E,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AAUvC,KAAK,OAAO,GAAG,SAAS,eAAe,EAAE,CAAC;AAE1C,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,eAAe,CAAC;AAuGnD;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GAAI,GAAG,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AAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACjE,KACA,IAiBF,CAAC;AAiBF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;kBACf,sBAAsB;kBAEtB,sBAAsB;kBAMtB,sBAAsB;kBAItB,sBAAsB;CAIrC,CAAC;AAoBF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,8CACjB;IACN,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB,6CA8DF,CAAC"}
|
|
@@ -15,32 +15,139 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { clsx } from '@finos/legend-art';
|
|
18
|
+
import { AggregationFunction, DEFAULT_PRESENTATION, foldColumnName, getColumnFormat, } from '@finos/legend-cube';
|
|
18
19
|
import { DataGrid, } from '@finos/legend-lego/data-grid';
|
|
20
|
+
import { flowResult } from 'mobx';
|
|
19
21
|
import { memo, useCallback, useMemo } from 'react';
|
|
20
|
-
import { NULL_CELL_TEXT } from '../../__lib__/LegendCubeLabels.js';
|
|
22
|
+
import { CUBE_FORMAT_NOT_A_NUMBER, NULL_CELL_TEXT, READ_ONLY_CUBE_TITLE, } from '../../__lib__/LegendCubeLabels.js';
|
|
21
23
|
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
import { getCubeExportFileName } from '../../stores/CubeExportState.js';
|
|
25
|
+
import { CubeGridCellKind, getCubeGridQuickActions, } from '../../stores/CubeGridQuickActions.js';
|
|
26
|
+
import { CUBE_GRID_COLUMN_ID_PREFIX, } from '../../stores/CubeGridState.js';
|
|
27
|
+
import { compareCellValues, formatCellValue, formatColumnValue, formatGroupRowValue, getTypeScale, isNumericFamily, } from './CubeGridValues.js';
|
|
28
|
+
const COLUMN_ID_PREFIX = CUBE_GRID_COLUMN_ID_PREFIX;
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
+
* A cell of a row, and what it holds: a run row's value; on a group row, its
|
|
31
|
+
* key in a group column, else its aggregation, or nothing
|
|
32
|
+
*/
|
|
33
|
+
const cellOf = (editorState, row, position) => {
|
|
34
|
+
if (!row || Array.isArray(row)) {
|
|
35
|
+
return [
|
|
36
|
+
row?.[position] ?? null,
|
|
37
|
+
CubeGridCellKind.VALUE,
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
const data = row;
|
|
41
|
+
const value = data.cells[position];
|
|
42
|
+
if (!data.isGroup) {
|
|
43
|
+
return [value ?? null, CubeGridCellKind.VALUE];
|
|
44
|
+
}
|
|
45
|
+
const name = editorState.execution.result?.schema.columns[position]?.name;
|
|
46
|
+
const keys = editorState.grid.drilldown?.columns.slice(0, data.keys.length);
|
|
47
|
+
return name !== undefined && keys?.includes(name)
|
|
48
|
+
? [value ?? null, CubeGridCellKind.VALUE]
|
|
49
|
+
: value === undefined
|
|
50
|
+
? [null, CubeGridCellKind.EMPTY]
|
|
51
|
+
: [value, CubeGridCellKind.AGGREGATE];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The menu's Export (spec §12.5, PLAN §11.10), in place of ag-grid's export of
|
|
55
|
+
* the fetched rows: CSV of the whole query, run on the engine with no row
|
|
56
|
+
* limit and sorted as the grid is; Excel of the rows the grid shows
|
|
57
|
+
*/
|
|
58
|
+
const getCubeExportItem = (editorState, params) => {
|
|
59
|
+
const { result } = editorState.execution;
|
|
60
|
+
const { isExporting } = editorState.export;
|
|
61
|
+
return {
|
|
62
|
+
name: 'Export',
|
|
63
|
+
subMenu: [
|
|
64
|
+
{
|
|
65
|
+
name: 'CSV (whole query)',
|
|
66
|
+
disabled: !result || isExporting,
|
|
67
|
+
tooltip: 'Runs the whole query on the engine, with no row limit, sorted as the grid is',
|
|
68
|
+
action: () => {
|
|
69
|
+
if (result) {
|
|
70
|
+
const sortModel = params.api
|
|
71
|
+
.getColumnState()
|
|
72
|
+
.filter((column) => column.sort)
|
|
73
|
+
.sort((a, b) => (a.sortIndex ?? 0) - (b.sortIndex ?? 0))
|
|
74
|
+
.map((column) => ({
|
|
75
|
+
colId: column.colId,
|
|
76
|
+
sort: column.sort,
|
|
77
|
+
}));
|
|
78
|
+
const depth = editorState.grid.drilldown?.columns.length ?? 0;
|
|
79
|
+
flowResult(editorState.export.exportCsv(result, editorState.grid.toSorts(result, sortModel, depth))).catch(editorState.host.applicationStore.alertUnhandledError);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'Excel (rows shown)',
|
|
85
|
+
tooltip: 'The rows the grid has loaded, expanded groups included, as the grid shows them',
|
|
86
|
+
action: () => params.api.exportDataAsExcel({
|
|
87
|
+
fileName: getCubeExportFileName(editorState.document.name, 'xlsx'),
|
|
88
|
+
// a group row's key as the grid shows it, not ag-grid's ' -> key'
|
|
89
|
+
processRowGroupCallback: ({ node }) => {
|
|
90
|
+
const data = node.data;
|
|
91
|
+
if (data && !Array.isArray(data)) {
|
|
92
|
+
const key = data.keys.at(-1) ?? null;
|
|
93
|
+
return key === null ? NULL_CELL_TEXT : String(key);
|
|
94
|
+
}
|
|
95
|
+
return node.key ?? NULL_CELL_TEXT;
|
|
96
|
+
},
|
|
97
|
+
}),
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/** ag-grid's own items the menu keeps (spec §12.4), after the cell's */
|
|
103
|
+
const CUBE_GRID_MENU_ITEMS = [
|
|
104
|
+
'autoSizeAll',
|
|
105
|
+
'resetColumns',
|
|
106
|
+
'separator',
|
|
107
|
+
'copy',
|
|
108
|
+
'copyWithHeaders',
|
|
109
|
+
];
|
|
110
|
+
/**
|
|
111
|
+
* The grid's context menu (spec §12.4, PLAN §11.10), curated: on a cell,
|
|
112
|
+
* 'Drilldown by' its column and the quick actions, then a separator; then,
|
|
113
|
+
* anywhere, sizing and resetting the columns, copying, and Cube's Export. Not
|
|
114
|
+
* ag-grid's cut, paste or client export, which would export the fetched rows
|
|
115
|
+
* only. Read when the menu opens, so it reflects the cube and the run as they
|
|
116
|
+
* are then.
|
|
30
117
|
*/
|
|
31
118
|
export const getCubeGridContextMenuItems = (editorState, params) => {
|
|
32
|
-
const
|
|
119
|
+
const common = [
|
|
120
|
+
...CUBE_GRID_MENU_ITEMS,
|
|
121
|
+
getCubeExportItem(editorState, params),
|
|
122
|
+
];
|
|
33
123
|
const colId = params.column?.getColId();
|
|
34
124
|
if (!colId?.startsWith(COLUMN_ID_PREFIX)) {
|
|
35
|
-
return
|
|
125
|
+
return common;
|
|
36
126
|
}
|
|
37
127
|
const position = Number(colId.slice(COLUMN_ID_PREFIX.length));
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
128
|
+
// local mode's group rows hold ag-grid's totals, not a row (review of M7)
|
|
129
|
+
const [cell, kind] = params.node?.group && !params.node.data
|
|
130
|
+
? [null, CubeGridCellKind.EMPTY]
|
|
131
|
+
: cellOf(editorState, params.node?.data, position);
|
|
132
|
+
const actions = getCubeGridQuickActions(editorState, position, cell, kind);
|
|
133
|
+
const column = editorState.execution.result?.schema.columns[position];
|
|
134
|
+
if (!actions.length || !column) {
|
|
135
|
+
return common;
|
|
42
136
|
}
|
|
137
|
+
const drilldownBlocker = editorState.grid.getAddLevelBlocker(column.name);
|
|
138
|
+
// only number columns are formatted (spec §13.1)
|
|
139
|
+
const formatBlocker = editorState.readOnly
|
|
140
|
+
? READ_ONLY_CUBE_TITLE
|
|
141
|
+
: isNumericFamily(column.type.family)
|
|
142
|
+
? undefined
|
|
143
|
+
: CUBE_FORMAT_NOT_A_NUMBER;
|
|
43
144
|
return [
|
|
145
|
+
{
|
|
146
|
+
name: `Drilldown by "${column.name}"`,
|
|
147
|
+
disabled: drilldownBlocker !== undefined,
|
|
148
|
+
...(drilldownBlocker === undefined ? {} : { tooltip: drilldownBlocker }),
|
|
149
|
+
action: () => editorState.grid.addLevel(column.name),
|
|
150
|
+
},
|
|
44
151
|
...actions.map((quickAction) => {
|
|
45
152
|
const tooltip = quickAction.disabledReason ?? quickAction.hint;
|
|
46
153
|
return {
|
|
@@ -51,21 +158,190 @@ export const getCubeGridContextMenuItems = (editorState, params) => {
|
|
|
51
158
|
};
|
|
52
159
|
}),
|
|
53
160
|
'separator',
|
|
54
|
-
|
|
161
|
+
{
|
|
162
|
+
name: 'Format Column…',
|
|
163
|
+
disabled: formatBlocker !== undefined,
|
|
164
|
+
...(formatBlocker === undefined ? {} : { tooltip: formatBlocker }),
|
|
165
|
+
action: () => editorState.grid.openFormat(column.name),
|
|
166
|
+
},
|
|
167
|
+
...common,
|
|
55
168
|
];
|
|
56
169
|
};
|
|
57
170
|
/**
|
|
58
171
|
* A cell: its value as the column's family shows it (`formatCellValue`), with
|
|
59
|
-
* the exact value on hover when the two differ
|
|
172
|
+
* the exact value on hover when the two differ; nothing for a group row's
|
|
173
|
+
* column with no aggregation (`undefined`)
|
|
60
174
|
*/
|
|
61
|
-
const CubeCell = (props) => {
|
|
62
|
-
if (props.value ===
|
|
175
|
+
export const CubeCell = (props) => {
|
|
176
|
+
if (props.value === undefined) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
if (props.value === null) {
|
|
63
180
|
return (_jsx("span", { className: "text-[var(--color-text-muted)]", children: NULL_CELL_TEXT }));
|
|
64
181
|
}
|
|
65
182
|
const exact = String(props.value);
|
|
66
|
-
const
|
|
183
|
+
const row = props.data;
|
|
184
|
+
// a value a group row aggregates: local mode's group rows, or a server-side
|
|
185
|
+
// group row's cell in a column that isn't one of the group's keys
|
|
186
|
+
const isGroupRowKey = row !== undefined &&
|
|
187
|
+
!Array.isArray(row) &&
|
|
188
|
+
row.isGroup &&
|
|
189
|
+
(props.levels ?? [])
|
|
190
|
+
.slice(0, row.keys.length)
|
|
191
|
+
.includes(props.columnName ?? '');
|
|
192
|
+
// never a group's key: year 2024 and id 13 keep no comma
|
|
193
|
+
const isAggregate = !isGroupRowKey &&
|
|
194
|
+
(props.node.group === true ||
|
|
195
|
+
(row !== undefined &&
|
|
196
|
+
!Array.isArray(row) &&
|
|
197
|
+
row.isGroup));
|
|
198
|
+
// local mode's group row totalling the column by ag-grid's own count
|
|
199
|
+
const isLocalCount = props.node.group === true && props.column?.getAggFunc() === 'count';
|
|
200
|
+
const isCount = isLocalCount ||
|
|
201
|
+
(props.countOnGroupRows === true &&
|
|
202
|
+
row !== undefined &&
|
|
203
|
+
!Array.isArray(row) &&
|
|
204
|
+
row.isGroup &&
|
|
205
|
+
!(props.levels ?? [])
|
|
206
|
+
.slice(0, row.keys.length)
|
|
207
|
+
.includes(props.columnName ?? ''));
|
|
208
|
+
const formatted = props.format && !isCount
|
|
209
|
+
? formatColumnValue(props.value, props.format)
|
|
210
|
+
: undefined;
|
|
211
|
+
if (formatted) {
|
|
212
|
+
return (_jsx("span", { title: exact, className: clsx({
|
|
213
|
+
'text-[var(--color-status-error)]': props.format?.redIfNegative && formatted.negative,
|
|
214
|
+
}), children: formatted.text }));
|
|
215
|
+
}
|
|
216
|
+
const shown = isAggregate
|
|
217
|
+
? formatGroupRowValue(props.value, props.family, props.scale)
|
|
218
|
+
: formatCellValue(props.value, props.family);
|
|
67
219
|
return shown === exact ? _jsx(_Fragment, { children: exact }) : _jsx("span", { title: exact, children: shown });
|
|
68
220
|
};
|
|
221
|
+
/** The class of a number column's cells, which Excel exports as numbers (`CUBE_EXCEL_STYLES`) */
|
|
222
|
+
const CUBE_EXCEL_NUMBER_CLASS = 'cube-excel-number';
|
|
223
|
+
/**
|
|
224
|
+
* The grid's Excel styles: a number column's cells are numbers in the
|
|
225
|
+
* workbook, where ag-grid would write the exact text it holds as text
|
|
226
|
+
*/
|
|
227
|
+
export const CUBE_EXCEL_STYLES = [
|
|
228
|
+
{ id: CUBE_EXCEL_NUMBER_CLASS, dataType: 'Number' },
|
|
229
|
+
];
|
|
230
|
+
/** The group-row aggregations that count, whose cells keep no format */
|
|
231
|
+
const COUNT_AGGREGATIONS = [
|
|
232
|
+
AggregationFunction.COUNT,
|
|
233
|
+
AggregationFunction.DISTINCT_COUNT,
|
|
234
|
+
];
|
|
235
|
+
/**
|
|
236
|
+
* The grid's columns: the run's, from Cube's own schema of the node that ran,
|
|
237
|
+
* by position, so any column name works, with the type in the header's
|
|
238
|
+
* tooltip; numbers right-aligned and sorted exactly as the engine wrote them
|
|
239
|
+
*/
|
|
240
|
+
export const buildCubeColumnDefs = (result, valueAt, presentation = DEFAULT_PRESENTATION, drilldown) => result.schema.columns.map((column, position) => {
|
|
241
|
+
const numeric = isNumericFamily(column.type.family);
|
|
242
|
+
const width = presentation.columnWidths.find((each) => foldColumnName(each.column) === foldColumnName(column.name))?.width;
|
|
243
|
+
return {
|
|
244
|
+
colId: `${COLUMN_ID_PREFIX}${position}`,
|
|
245
|
+
headerName: column.name,
|
|
246
|
+
headerTooltip: `${column.type.displayName}${column.nullable ? '?' : ''} (${column.type.fullName})`,
|
|
247
|
+
valueGetter: (params) => valueAt(params.data, position),
|
|
248
|
+
cellRenderer: CubeCell,
|
|
249
|
+
cellRendererParams: {
|
|
250
|
+
family: column.type.family,
|
|
251
|
+
// only number columns are formatted (spec §13.1)
|
|
252
|
+
format: numeric
|
|
253
|
+
? getColumnFormat(presentation.columnHints ?? [], column.name)
|
|
254
|
+
: undefined,
|
|
255
|
+
countOnGroupRows: drilldown
|
|
256
|
+
? COUNT_AGGREGATIONS.includes(drilldown.aggregationOf(column.name))
|
|
257
|
+
: false,
|
|
258
|
+
columnName: column.name,
|
|
259
|
+
levels: drilldown?.columns ?? [],
|
|
260
|
+
scale: getTypeScale(column.type),
|
|
261
|
+
},
|
|
262
|
+
...(width === undefined ? {} : { width }),
|
|
263
|
+
...(numeric
|
|
264
|
+
? {
|
|
265
|
+
type: 'rightAligned',
|
|
266
|
+
comparator: compareCellValues,
|
|
267
|
+
// a number in Excel, though it reaches the grid as exact text; a
|
|
268
|
+
// column's own cell class replaces its type's, so the type's is
|
|
269
|
+
// kept too
|
|
270
|
+
cellClass: ['ag-right-aligned-cell', CUBE_EXCEL_NUMBER_CLASS],
|
|
271
|
+
}
|
|
272
|
+
: {}),
|
|
273
|
+
};
|
|
274
|
+
});
|
|
275
|
+
/**
|
|
276
|
+
* Keeps a column's width when the user resizes it, by dragging or from the
|
|
277
|
+
* menu (PLAN §11.10): the cube saves it, with no undo step
|
|
278
|
+
*/
|
|
279
|
+
export const keepCubeColumnWidths = (editorState, result, event) => {
|
|
280
|
+
if (!event.finished ||
|
|
281
|
+
(event.source !== 'uiColumnResized' && event.source !== 'autosizeColumns')) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
(event.columns ?? []).forEach((column) => {
|
|
285
|
+
const colId = column.getColId();
|
|
286
|
+
const name = colId.startsWith(COLUMN_ID_PREFIX)
|
|
287
|
+
? result.schema.columns[Number(colId.slice(COLUMN_ID_PREFIX.length))]
|
|
288
|
+
?.name
|
|
289
|
+
: undefined;
|
|
290
|
+
if (name !== undefined) {
|
|
291
|
+
editorState.setColumnWidth(name, column.getActualWidth());
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
/** A value as a JS number, for local mode's filters and totals; `null` for none or text that isn't one */
|
|
296
|
+
const toNumber = (value) => {
|
|
297
|
+
if (value === null || value === undefined || value === '') {
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
const number = Number(value);
|
|
301
|
+
return Number.isFinite(number) ? number : null;
|
|
302
|
+
};
|
|
303
|
+
/** The numbers among a group's values, for local mode's totals */
|
|
304
|
+
const numbersOf = (params) => params.values
|
|
305
|
+
.map((value) => toNumber(value))
|
|
306
|
+
.filter((value) => value !== null);
|
|
307
|
+
/**
|
|
308
|
+
* Local mode's totals over a group's values, read as JS numbers: the engine
|
|
309
|
+
* writes integers and decimals as exact text, which ag-grid's own would join
|
|
310
|
+
* as text; a total past a double's precision is rounded, as local mode works
|
|
311
|
+
* on the fetched rows in the browser
|
|
312
|
+
*/
|
|
313
|
+
export const LOCAL_AGGREGATIONS = {
|
|
314
|
+
sum: (params) => numbersOf(params).reduce((total, value) => total + value, 0),
|
|
315
|
+
avg: (params) => {
|
|
316
|
+
const numbers = numbersOf(params);
|
|
317
|
+
return numbers.length
|
|
318
|
+
? numbers.reduce((total, value) => total + value, 0) / numbers.length
|
|
319
|
+
: null;
|
|
320
|
+
},
|
|
321
|
+
min: (params) => {
|
|
322
|
+
const numbers = numbersOf(params);
|
|
323
|
+
return numbers.length ? Math.min(...numbers) : null;
|
|
324
|
+
},
|
|
325
|
+
max: (params) => {
|
|
326
|
+
const numbers = numbersOf(params);
|
|
327
|
+
return numbers.length ? Math.max(...numbers) : null;
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
const LOCAL_COLUMN_DEFAULTS = {
|
|
331
|
+
enableRowGroup: true,
|
|
332
|
+
enablePivot: true,
|
|
333
|
+
enableValue: true,
|
|
334
|
+
filter: 'agTextColumnFilter',
|
|
335
|
+
};
|
|
336
|
+
const LOCAL_SIDE_BAR = {
|
|
337
|
+
toolPanels: ['columns', 'filters'],
|
|
338
|
+
};
|
|
339
|
+
const LOCAL_STATUS_BAR = {
|
|
340
|
+
statusPanels: [
|
|
341
|
+
{ statusPanel: 'agTotalAndFilteredRowCountComponent', align: 'left' },
|
|
342
|
+
{ statusPanel: 'agAggregationComponent', align: 'right' },
|
|
343
|
+
],
|
|
344
|
+
};
|
|
69
345
|
/**
|
|
70
346
|
* The rows of a run (PLAN §9): columns from Cube's own schema of the capture
|
|
71
347
|
* node, by position, so any column name works. Numbers are right-aligned and
|
|
@@ -73,26 +349,23 @@ const CubeCell = (props) => {
|
|
|
73
349
|
* offers the quick actions (`getCubeGridContextMenuItems`).
|
|
74
350
|
*/
|
|
75
351
|
export const CubeResultGrid = memo((props) => {
|
|
76
|
-
const { editorState, result, darkMode } = props;
|
|
352
|
+
const { editorState, result, presentation, darkMode } = props;
|
|
77
353
|
const getContextMenuItems = useCallback((params) => getCubeGridContextMenuItems(editorState, params), [editorState]);
|
|
78
|
-
const columnDefs = useMemo(() => result.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
cellRendererParams: { family: column.type.family },
|
|
87
|
-
...(numeric
|
|
88
|
-
? { type: 'rightAligned', comparator: compareCellValues }
|
|
89
|
-
: {}),
|
|
90
|
-
};
|
|
91
|
-
}), [result]);
|
|
354
|
+
const columnDefs = useMemo(() => buildCubeColumnDefs(result, (row, position) => row?.[position] ?? null, presentation).map((column, position) => isNumericFamily(result.schema.columns[position]?.type.family)
|
|
355
|
+
? {
|
|
356
|
+
...column,
|
|
357
|
+
filter: 'agNumberColumnFilter',
|
|
358
|
+
filterValueGetter: (params) => toNumber(params.data?.[position] ?? null),
|
|
359
|
+
allowedAggFuncs: ['sum', 'avg', 'min', 'max', 'count'],
|
|
360
|
+
}
|
|
361
|
+
: { ...column, allowedAggFuncs: ['count'] }), [result, presentation]);
|
|
92
362
|
return (_jsx("div", { className: clsx('h-full w-full', {
|
|
93
363
|
'ag-theme-balham': !darkMode,
|
|
94
364
|
'ag-theme-balham-dark': darkMode,
|
|
95
|
-
}), "data-testid": LEGEND_CUBE_TEST_ID.RESULT_GRID, children: _jsx(DataGrid, { rowData: result.rows, columnDefs: columnDefs, suppressFieldDotNotation: true, tooltipShowDelay: 500, getContextMenuItems: getContextMenuItems
|
|
365
|
+
}), "data-testid": LEGEND_CUBE_TEST_ID.RESULT_GRID, children: _jsx(DataGrid, { rowData: result.rows, columnDefs: columnDefs, suppressFieldDotNotation: true, tooltipShowDelay: 500, getContextMenuItems: getContextMenuItems,
|
|
366
|
+
// local mode (spec §12.1): ag-grid's own grouping, pivot and
|
|
367
|
+
// filters on the run's rows, with their panels and totals
|
|
368
|
+
defaultColDef: LOCAL_COLUMN_DEFAULTS, aggFuncs: LOCAL_AGGREGATIONS, rowGroupPanelShow: "always", sideBar: LOCAL_SIDE_BAR, statusBar: LOCAL_STATUS_BAR, cellSelection: true, excelStyles: CUBE_EXCEL_STYLES, onColumnResized: (event) => keepCubeColumnWidths(editorState, result, event) }) }));
|
|
96
369
|
});
|
|
97
370
|
CubeResultGrid.displayName = 'CubeResultGrid';
|
|
98
371
|
//# sourceMappingURL=CubeResultGrid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeResultGrid.js","sourceRoot":"","sources":["../../../src/components/grid/CubeResultGrid.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EACL,QAAQ,GAMT,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAIzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAI7B,gEAAgE;AAChE,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,WAA4B,EAC5B,MAAkD,EACU,EAAE;IAC9D,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IACxC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CA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AAM,EAAE,KAAK,CAAC,GAElD,GACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { CubeEditorState } from '../../stores/CubeEditorState.js';
|
|
17
|
+
/**
|
|
18
|
+
* The page's latest runs, newest first (spec §12.6, PLAN §11.10): each
|
|
19
|
+
* Execute, fetch of the grid's rows, export and Pivot value load, with when
|
|
20
|
+
* it finished, how long it took, and its SQL to read and copy; its Pure, as
|
|
21
|
+
* it ran, and its lambda's JSON, and why it failed (PLAN §11.16)
|
|
22
|
+
*/
|
|
23
|
+
export declare const CubeRunStatsPanel: ((props: {
|
|
24
|
+
editorState: CubeEditorState;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=CubeRunStatsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeRunStatsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeRunStatsPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAgBvE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,WACpB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAiHzC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { flowResult } from 'mobx';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
20
|
+
import { MAX_CUBE_RUN_STATS, } from '../../stores/CubeRunStatsState.js';
|
|
21
|
+
import { CubeButton } from '../CubeButton.js';
|
|
22
|
+
import { formatDuration } from './CubeGridValues.js';
|
|
23
|
+
import { formatCubeSql, formatCubeSqlStatement } from './CubeSqlFormat.js';
|
|
24
|
+
/** Why a run has no Pure nor JSON: it failed before its lambda was written */
|
|
25
|
+
const NO_LAMBDA_TITLE = 'This run failed before its query was written';
|
|
26
|
+
/** A run's time of day, as the viewer's clock shows it */
|
|
27
|
+
const formatTime = (finishedAt) => new Date(finishedAt).toLocaleTimeString();
|
|
28
|
+
/**
|
|
29
|
+
* The page's latest runs, newest first (spec §12.6, PLAN §11.10): each
|
|
30
|
+
* Execute, fetch of the grid's rows, export and Pivot value load, with when
|
|
31
|
+
* it finished, how long it took, and its SQL to read and copy; its Pure, as
|
|
32
|
+
* it ran, and its lambda's JSON, and why it failed (PLAN §11.16)
|
|
33
|
+
*/
|
|
34
|
+
export const CubeRunStatsPanel = observer((props) => {
|
|
35
|
+
const { editorState } = props;
|
|
36
|
+
const { applicationStore } = editorState.host;
|
|
37
|
+
const { entries } = editorState.runStats;
|
|
38
|
+
const copy = (sql) => {
|
|
39
|
+
applicationStore.clipboardService
|
|
40
|
+
.copyTextToClipboard(formatCubeSql(sql))
|
|
41
|
+
.catch(applicationStore.alertUnhandledError);
|
|
42
|
+
};
|
|
43
|
+
const showPure = (entry) => {
|
|
44
|
+
flowResult(editorState.showPure.openRun(entry)).catch(applicationStore.alertUnhandledError);
|
|
45
|
+
};
|
|
46
|
+
const copyJson = (entry) => {
|
|
47
|
+
if (entry.lambda !== undefined) {
|
|
48
|
+
applicationStore.clipboardService
|
|
49
|
+
.copyTextToClipboard(editorState.host.engine.serializeLambda(entry.lambda), { notifySuccessMessage: 'The lambda JSON was copied' })
|
|
50
|
+
.catch(applicationStore.alertUnhandledError);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return (_jsxs("div", { className: "max-h-60 shrink-0 overflow-auto border-b border-[var(--color-border-default)] p-2 text-base", "data-testid": LEGEND_CUBE_TEST_ID.RUN_STATS, children: [!entries.length ? (_jsx("div", { className: "text-[var(--color-text-secondary)]", children: "Nothing has run yet." })) : (_jsx("ol", { className: "flex flex-col gap-1", "aria-label": "Latest runs", children: entries.map((entry) => (_jsxs("li", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: "min-w-0 flex-1 truncate", title: entry.label, children: entry.label }), _jsx("span", { className: "text-[var(--color-text-secondary)]", children: formatTime(entry.finishedAt) }), _jsx("span", { className: "w-16 text-right text-[var(--color-text-secondary)]", children: formatDuration(entry.durationMs) }), _jsx(CubeButton, { disabled: entry.lambda === undefined, title: entry.lambda === undefined
|
|
54
|
+
? NO_LAMBDA_TITLE
|
|
55
|
+
: 'Show the Pure query this run sent', onClick: () => showPure(entry), children: "Show Pure" }), _jsx(CubeButton, { disabled: entry.lambda === undefined, title: entry.lambda === undefined
|
|
56
|
+
? NO_LAMBDA_TITLE
|
|
57
|
+
: 'Copy the lambda this run sent, as the engine received it', onClick: () => copyJson(entry), children: "Copy JSON" }), _jsx(CubeButton, { disabled: !entry.sql.length, title: entry.sql.length
|
|
58
|
+
? 'Copy the SQL'
|
|
59
|
+
: 'The engine gave no SQL for this run', onClick: () => copy(entry.sql), children: "Copy SQL" })] }), entry.error !== undefined && (_jsx("div", { className: "whitespace-pre-wrap break-words text-sm text-[var(--color-status-error)]", children: `Failed: ${entry.error}` })), entry.sql.length > 0 && (_jsxs("details", { children: [_jsx("summary", { className: "cursor-pointer text-sm text-[var(--color-text-secondary)]", children: "SQL" }), entry.sql.map((statement, index) => (_jsx("pre", { className: "whitespace-pre-wrap font-mono text-sm", children: formatCubeSqlStatement(statement) }, index)))] }))] }, entry.id))) })), _jsx("div", { className: "mt-1 text-sm text-[var(--color-text-muted)]", children: `The latest ${MAX_CUBE_RUN_STATS} runs on this page are kept.` })] }));
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=CubeRunStatsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeRunStatsPanel.js","sourceRoot":"","sources":["../../../src/components/grid/CubeRunStatsPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAEL,kBAAkB,GACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,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E,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAC3B,KAAK,EACH,KAAK,CAAC,GAAG,CAAC,MAAM;wCACd,CAAC,CAAC,cAAc;wCAChB,CAAC,CAAC,qCAAqC,EAE3C,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,yBAGnB,IACT,EACL,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,CAC5B,cAAK,SAAS,EAAC,0EAA0E,YACtF,WAAW,KAAK,CAAC,KAAK,EAAE,GACrB,CACP,EACA,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CACvB,8BACE,kBAAS,SAAS,EAAC,2DAA2D,oBAEpE,EACT,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CACnC,cAIE,SAAS,EAAC,uCAAuC,YAEhD,sBAAsB,CAAC,SAAS,CAAC,IAH7B,KAAK,CAIN,CACP,CAAC,IACM,CACX,KAlEM,KAAK,CAAC,EAAE,CAmEZ,CACN,CAAC,GACC,CACN,EACD,cAAK,SAAS,EAAC,6CAA6C,YACzD,cAAc,kBAAkB,8BAA8B,GAC3D,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { Presentation } from '@finos/legend-cube';
|
|
17
|
+
import type { CubeEditorState } from '../../stores/CubeEditorState.js';
|
|
18
|
+
import type { CubeExecutionResult } from '../../stores/CubeExecutionState.js';
|
|
19
|
+
/**
|
|
20
|
+
* The rows of a run in server-side mode (spec §12.1, PLAN §11.10): ag-grid's
|
|
21
|
+
* server-side row model asks for each level as it is shown, sorted by its
|
|
22
|
+
* headers, and the grid's state answers from the run on screen. With a
|
|
23
|
+
* drill-down, the levels are groups of the run's rows, each expandable down
|
|
24
|
+
* to the rows, shown in a column of their own with each group's count.
|
|
25
|
+
* Every level is answered whole, cut at the run's row limit, and ag-grid's
|
|
26
|
+
* blocks are taken from it.
|
|
27
|
+
*/
|
|
28
|
+
export declare const CubeServerSideGrid: import("react").MemoExoticComponent<(props: {
|
|
29
|
+
editorState: CubeEditorState;
|
|
30
|
+
result: CubeExecutionResult;
|
|
31
|
+
/** The drill-down's levels, as the run names them: the grid is built anew when they change */
|
|
32
|
+
levels: readonly string[];
|
|
33
|
+
presentation: Presentation;
|
|
34
|
+
darkMode: boolean;
|
|
35
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
36
|
+
//# sourceMappingURL=CubeServerSideGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeServerSideGrid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeServerSideGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAYnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AA0C9E;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,8CACrB;IACN,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,8FAA8F;IAC9F,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB,6CA6GF,CAAC"}
|